@nutui/nutui-react-taro 2.0.0-alpha.3 → 2.0.0-alpha.5
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 +24 -0
- package/dist/esm/Address.js +3 -5
- package/dist/esm/Audio.js +3 -4
- package/dist/esm/Avatar.js +6 -5
- package/dist/esm/AvatarGroup.js +3 -7
- package/dist/esm/Calendar.js +3 -4
- package/dist/esm/CalendarItem.js +2 -3
- package/dist/esm/CellGroup.js +1 -1
- package/dist/esm/Checkbox.js +3 -3
- package/dist/esm/CheckboxGroup.js +3 -3
- package/dist/esm/CircleProgress.js +2 -3
- package/dist/esm/ConfigProvider.js +2 -3
- package/dist/esm/CountDown.js +2 -3
- package/dist/esm/DatePicker.js +3 -4
- package/dist/esm/Dialog.js +2 -3
- package/dist/esm/Elevator.js +1 -1
- package/dist/esm/Ellipsis.js +3 -4
- package/dist/esm/Empty.js +3 -5
- package/dist/esm/FixedNav.js +2 -3
- package/dist/esm/Form.js +2 -2
- package/dist/esm/Grid.js +3 -4
- package/dist/esm/GridItem.js +2 -3
- package/dist/esm/Image.js +2 -3
- package/dist/esm/Infiniteloading.js +2 -3
- package/dist/esm/Input.js +5 -3
- package/dist/esm/NumberKeyboard.js +2 -3
- package/dist/esm/Pagination.js +2 -3
- package/dist/esm/Picker.js +2 -3
- package/dist/esm/PullToRefresh.js +2 -3
- package/dist/esm/Range.js +2 -3
- package/dist/esm/SearchBar.js +2 -3
- package/dist/esm/ShortPassword.js +2 -3
- package/dist/esm/Signature.js +2 -3
- package/dist/esm/Skeleton.js +8 -5
- package/dist/esm/Swipe.js +1 -1
- package/dist/esm/Tabbar/style/index.js +1 -1
- package/dist/esm/Tabbar.js +6 -3
- package/dist/esm/TabbarItem.js +3 -4
- package/dist/esm/Table.js +2 -3
- package/dist/esm/TextArea.js +2 -3
- package/dist/esm/TimeDetail.js +2 -3
- package/dist/esm/TimePannel.js +2 -3
- package/dist/esm/TimeSelect.js +4 -5
- package/dist/esm/Uploader.js +2 -3
- package/dist/esm/VirtualList.js +2 -3
- package/dist/esm/WaterMark.js +2 -3
- package/dist/esm/{address.taro-67e32c33.js → address.taro-cab0ea22.js} +18 -4
- package/dist/esm/{audio.taro-51eafc9d.js → audio.taro-ff280f5e.js} +2 -2
- package/dist/esm/{avatar.taro-a840f345.js → avatar.taro-6e8f1f5c.js} +31 -29
- package/dist/esm/{avatargroup-0eadb514.js → avatargroup-f4375806.js} +9 -12
- package/dist/esm/{calendar.taro-b3ebdc35.js → calendar.taro-2fc9b899.js} +2 -2
- package/dist/esm/{calendaritem.taro-ab1ec154.js → calendaritem.taro-2d4a8c34.js} +1 -1
- package/dist/esm/{cellgroup.taro-660faffc.js → cellgroup.taro-e05ea802.js} +3 -2
- package/dist/esm/checkbox.taro-9d02f86c.js +175 -0
- package/dist/esm/{circleprogress.taro-d8973ae9.js → circleprogress.taro-d4943109.js} +21 -27
- package/dist/esm/{zh-CN-b4f493ba.js → configprovider.taro-ce34d482.js} +44 -1
- package/dist/esm/{countdown.taro-c14b5c1f.js → countdown.taro-3118ba23.js} +1 -1
- package/dist/esm/{datepicker.taro-7d522ff8.js → datepicker.taro-2e3e955b.js} +2 -2
- package/dist/esm/{dialog.taro-f9ca73a2.js → dialog.taro-eab19eab.js} +1 -1
- package/dist/esm/{elevator.taro-360a831f.js → elevator.taro-1a4e3356.js} +16 -8
- package/dist/esm/{ellipsis.taro-79044d54.js → ellipsis.taro-e1ac99a1.js} +7 -4
- package/dist/esm/{empty.taro-f8585835.js → empty.taro-26363c66.js} +12 -18
- package/dist/esm/{fixednav.taro-cca9a6df.js → fixednav.taro-ddb21e87.js} +1 -1
- package/dist/esm/{form.taro-7413d868.js → form.taro-423b0f0a.js} +1 -1
- package/dist/esm/{grid.taro-10eb7716.js → grid.taro-883a9c35.js} +1 -1
- package/dist/esm/{griditem.taro-fb15eeec.js → griditem.taro-16c7055b.js} +1 -1
- package/dist/esm/{image.taro-b897a058.js → image.taro-3025e659.js} +1 -1
- package/dist/esm/{infiniteloading.taro-cce53c60.js → infiniteloading.taro-721bca1f.js} +1 -1
- package/dist/esm/input.taro-06c1e4d5.js +167 -0
- package/dist/esm/{numberkeyboard.taro-10ab54d6.js → numberkeyboard.taro-d9b1721b.js} +1 -1
- package/dist/esm/nutui-react.es.js +45 -47
- package/dist/esm/{pagination.taro-df441058.js → pagination.taro-94f9be5e.js} +1 -1
- package/dist/esm/{picker.taro-9f1bb6a4.js → picker.taro-e16b4312.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-37dadbc5.js → pulltorefresh.taro-016d0079.js} +1 -1
- package/dist/esm/{range.taro-432d20d7.js → range.taro-8953e8c3.js} +1 -1
- package/dist/esm/{searchbar.taro-4aa300df.js → searchbar.taro-4467040f.js} +1 -1
- package/dist/esm/{shortpassword.taro-99645f99.js → shortpassword.taro-433b86a4.js} +1 -1
- package/dist/esm/{signature.taro-e5ede25a.js → signature.taro-a4d9b5c9.js} +1 -1
- package/dist/esm/{skeleton.taro-fabd423a.js → skeleton.taro-8ec11af9.js} +2 -2
- package/dist/esm/{swipe.taro-b18a73ff.js → swipe.taro-0b8cc872.js} +3 -5
- package/dist/esm/tabbar.taro-48413fb8.js +51 -0
- package/dist/esm/tabbaritem.taro-5afa3562.js +37 -0
- package/dist/esm/{table.taro-eca757f3.js → table.taro-327b4248.js} +1 -1
- package/dist/esm/{textarea.taro-e256e741.js → textarea.taro-add72cf3.js} +1 -1
- package/dist/esm/{timedetail.taro-cae362b9.js → timedetail.taro-82a2900b.js} +1 -1
- package/dist/esm/{timepannel.taro-d6f4cf80.js → timepannel.taro-0573bb65.js} +1 -1
- package/dist/esm/{timeselect.taro-804199f9.js → timeselect.taro-29124a34.js} +3 -3
- package/dist/esm/{uploader.taro-716f9a50.js → uploader.taro-c70d00de.js} +1 -1
- package/dist/esm/{virtuallist.taro-0bd611cb.js → virtuallist.taro-ba8e1f21.js} +1 -1
- package/dist/esm/{watermark.taro-8966896a.js → watermark.taro-168cdac5.js} +1 -1
- 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 +975 -1094
- package/dist/nutui.react.umd.js +973 -1092
- package/dist/packages/badge/badge.scss +0 -1
- package/dist/packages/cellgroup/cellgroup.scss +20 -16
- package/dist/packages/checkbox/checkbox.scss +8 -11
- package/dist/packages/circleprogress/circleprogress.scss +0 -9
- package/dist/packages/empty/empty.scss +0 -9
- package/dist/packages/input/input.scss +13 -180
- package/dist/packages/tabbar/tabbar.scss +16 -22
- package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/variables-jmapp.scss +12 -16
- package/dist/styles/variables.scss +12 -16
- package/dist/types/index.d.ts +86 -129
- package/package.json +1 -1
- package/dist/esm/Icon.js +0 -64
- package/dist/esm/checkbox.taro-ae460d3a.js +0 -168
- package/dist/esm/configprovider-9960f0fb.js +0 -19
- package/dist/esm/configprovider.taro-43a3c646.js +0 -45
- package/dist/esm/input.taro-f4e067f7.js +0 -237
- package/dist/esm/tabbar.taro-eefd0f8e.js +0 -59
- package/dist/esm/tabbaritem.taro-7a97e645.js +0 -55
- package/dist/packages/icon/icon.scss +0 -0
- /package/dist/esm/{AvatarContext-c96afdcc.js → context-c96afdcc.js} +0 -0
package/dist/nutui.react.mjs
CHANGED
|
@@ -5,14 +5,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.0.0-alpha.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.0-alpha.5 Wed May 10 2023 15:25:20 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
import React__default, { useCallback, createContext, useMemo, useContext, useState, useEffect, useRef, isValidElement, useImperativeHandle, forwardRef, useLayoutEffect, Component, memo } from "react";
|
|
14
|
-
import { View, ScrollView, Image as Image$2 } from "@tarojs/components";
|
|
15
|
-
import Taro, { getEnv, usePageScroll, getSystemInfoSync, pageScrollTo, nextTick, createSelectorQuery, canvasToTempFilePath, uploadFile, chooseMedia, chooseImage, useReady, createInnerAudioContext, getSystemInfo, createOffscreenCanvas } from "@tarojs/taro";
|
|
14
|
+
import { View, ScrollView, Input as Input$1, Image as Image$2 } from "@tarojs/components";
|
|
15
|
+
import Taro, { getEnv, usePageScroll, getSystemInfoSync, pageScrollTo, nextTick, createSelectorQuery, ENV_TYPE, canvasToTempFilePath, uploadFile, chooseMedia, chooseImage, useReady, createInnerAudioContext, getSystemInfo, createOffscreenCanvas } from "@tarojs/taro";
|
|
16
16
|
import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
17
17
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
18
18
|
var jsxRuntimeExports = {};
|
|
@@ -1007,7 +1007,7 @@ var classnames = {
|
|
|
1007
1007
|
})();
|
|
1008
1008
|
})(classnames);
|
|
1009
1009
|
const classNames = classnamesExports;
|
|
1010
|
-
const r$
|
|
1010
|
+
const r$x = {
|
|
1011
1011
|
name: "arrow-down2",
|
|
1012
1012
|
size: "",
|
|
1013
1013
|
classPrefix: "nut-icon",
|
|
@@ -1021,7 +1021,7 @@ const r$w = {
|
|
|
1021
1021
|
function w$1(n) {
|
|
1022
1022
|
return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
|
|
1023
1023
|
}
|
|
1024
|
-
function a$
|
|
1024
|
+
function a$x(n) {
|
|
1025
1025
|
const {
|
|
1026
1026
|
name: e,
|
|
1027
1027
|
size: l,
|
|
@@ -1035,7 +1035,7 @@ function a$w(n) {
|
|
|
1035
1035
|
onClick: i,
|
|
1036
1036
|
...h
|
|
1037
1037
|
} = {
|
|
1038
|
-
...r$
|
|
1038
|
+
...r$x,
|
|
1039
1039
|
...n
|
|
1040
1040
|
}, s = e ? e.indexOf("/") !== -1 : false, g = s ? "img" : u, C = (x) => {
|
|
1041
1041
|
i && i(x);
|
|
@@ -1056,9 +1056,9 @@ function a$w(n) {
|
|
|
1056
1056
|
d
|
|
1057
1057
|
);
|
|
1058
1058
|
}
|
|
1059
|
-
a$
|
|
1060
|
-
a$
|
|
1061
|
-
const r$
|
|
1059
|
+
a$x.defaultProps = r$x;
|
|
1060
|
+
a$x.displayName = "NutIconarrow-down2";
|
|
1061
|
+
const r$w = {
|
|
1062
1062
|
name: "arrow-up2",
|
|
1063
1063
|
size: "",
|
|
1064
1064
|
classPrefix: "nut-icon",
|
|
@@ -1072,7 +1072,7 @@ const r$v = {
|
|
|
1072
1072
|
function y$t(e) {
|
|
1073
1073
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1074
1074
|
}
|
|
1075
|
-
function a$
|
|
1075
|
+
function a$w(e) {
|
|
1076
1076
|
const {
|
|
1077
1077
|
name: t,
|
|
1078
1078
|
size: l,
|
|
@@ -1086,7 +1086,7 @@ function a$v(e) {
|
|
|
1086
1086
|
onClick: i,
|
|
1087
1087
|
...h
|
|
1088
1088
|
} = {
|
|
1089
|
-
...r$
|
|
1089
|
+
...r$w,
|
|
1090
1090
|
...e
|
|
1091
1091
|
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : m, C = (x) => {
|
|
1092
1092
|
i && i(x);
|
|
@@ -1107,9 +1107,9 @@ function a$v(e) {
|
|
|
1107
1107
|
p
|
|
1108
1108
|
);
|
|
1109
1109
|
}
|
|
1110
|
-
a$
|
|
1111
|
-
a$
|
|
1112
|
-
const r$
|
|
1110
|
+
a$w.defaultProps = r$w;
|
|
1111
|
+
a$w.displayName = "NutIconarrow-up2";
|
|
1112
|
+
const r$v = {
|
|
1113
1113
|
name: "check-checked",
|
|
1114
1114
|
size: "",
|
|
1115
1115
|
classPrefix: "nut-icon",
|
|
@@ -1123,7 +1123,7 @@ const r$u = {
|
|
|
1123
1123
|
function y$s(e) {
|
|
1124
1124
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1125
1125
|
}
|
|
1126
|
-
function a$
|
|
1126
|
+
function a$v(e) {
|
|
1127
1127
|
const {
|
|
1128
1128
|
name: c,
|
|
1129
1129
|
size: l,
|
|
@@ -1137,7 +1137,7 @@ function a$u(e) {
|
|
|
1137
1137
|
onClick: o,
|
|
1138
1138
|
...k
|
|
1139
1139
|
} = {
|
|
1140
|
-
...r$
|
|
1140
|
+
...r$v,
|
|
1141
1141
|
...e
|
|
1142
1142
|
}, s = c ? c.indexOf("/") !== -1 : false, p = s ? "img" : u, g = (x) => {
|
|
1143
1143
|
o && o(x);
|
|
@@ -1158,9 +1158,9 @@ function a$u(e) {
|
|
|
1158
1158
|
h
|
|
1159
1159
|
);
|
|
1160
1160
|
}
|
|
1161
|
-
a$
|
|
1162
|
-
a$
|
|
1163
|
-
const a$
|
|
1161
|
+
a$v.defaultProps = r$v;
|
|
1162
|
+
a$v.displayName = "NutIconcheck-checked";
|
|
1163
|
+
const a$u = {
|
|
1164
1164
|
name: "check-disabled",
|
|
1165
1165
|
size: "",
|
|
1166
1166
|
classPrefix: "nut-icon",
|
|
@@ -1174,7 +1174,7 @@ const a$t = {
|
|
|
1174
1174
|
function y$r(e) {
|
|
1175
1175
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1176
1176
|
}
|
|
1177
|
-
function r$
|
|
1177
|
+
function r$u(e) {
|
|
1178
1178
|
const {
|
|
1179
1179
|
name: t,
|
|
1180
1180
|
size: l,
|
|
@@ -1188,7 +1188,7 @@ function r$t(e) {
|
|
|
1188
1188
|
onClick: o,
|
|
1189
1189
|
...p
|
|
1190
1190
|
} = {
|
|
1191
|
-
...a$
|
|
1191
|
+
...a$u,
|
|
1192
1192
|
...e
|
|
1193
1193
|
}, s = t ? t.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
|
|
1194
1194
|
o && o(x);
|
|
@@ -1209,9 +1209,9 @@ function r$t(e) {
|
|
|
1209
1209
|
d
|
|
1210
1210
|
);
|
|
1211
1211
|
}
|
|
1212
|
-
r$
|
|
1213
|
-
r$
|
|
1214
|
-
const r$
|
|
1212
|
+
r$u.defaultProps = a$u;
|
|
1213
|
+
r$u.displayName = "NutIconcheck-disabled";
|
|
1214
|
+
const r$t = {
|
|
1215
1215
|
name: "check-normal",
|
|
1216
1216
|
size: "",
|
|
1217
1217
|
classPrefix: "nut-icon",
|
|
@@ -1225,7 +1225,7 @@ const r$s = {
|
|
|
1225
1225
|
function y$q(e) {
|
|
1226
1226
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1227
1227
|
}
|
|
1228
|
-
function a$
|
|
1228
|
+
function a$t(e) {
|
|
1229
1229
|
const {
|
|
1230
1230
|
name: n,
|
|
1231
1231
|
size: l,
|
|
@@ -1239,7 +1239,7 @@ function a$s(e) {
|
|
|
1239
1239
|
onClick: i,
|
|
1240
1240
|
...d
|
|
1241
1241
|
} = {
|
|
1242
|
-
...r$
|
|
1242
|
+
...r$t,
|
|
1243
1243
|
...e
|
|
1244
1244
|
}, s = n ? n.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
|
|
1245
1245
|
i && i(x);
|
|
@@ -1260,9 +1260,9 @@ function a$s(e) {
|
|
|
1260
1260
|
N
|
|
1261
1261
|
);
|
|
1262
1262
|
}
|
|
1263
|
-
a$
|
|
1264
|
-
a$
|
|
1265
|
-
const r$
|
|
1263
|
+
a$t.defaultProps = r$t;
|
|
1264
|
+
a$t.displayName = "NutIconcheck-normal";
|
|
1265
|
+
const r$s = {
|
|
1266
1266
|
name: "Check",
|
|
1267
1267
|
size: "",
|
|
1268
1268
|
classPrefix: "nut-icon",
|
|
@@ -1276,7 +1276,7 @@ const r$r = {
|
|
|
1276
1276
|
function y$p(e) {
|
|
1277
1277
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1278
1278
|
}
|
|
1279
|
-
function a$
|
|
1279
|
+
function a$s(e) {
|
|
1280
1280
|
const {
|
|
1281
1281
|
name: t,
|
|
1282
1282
|
size: l,
|
|
@@ -1290,7 +1290,7 @@ function a$r(e) {
|
|
|
1290
1290
|
onClick: o,
|
|
1291
1291
|
...d
|
|
1292
1292
|
} = {
|
|
1293
|
-
...r$
|
|
1293
|
+
...r$s,
|
|
1294
1294
|
...e
|
|
1295
1295
|
}, s = t ? t.indexOf("/") !== -1 : false, C = s ? "img" : u, k = (x) => {
|
|
1296
1296
|
o && o(x);
|
|
@@ -1311,9 +1311,9 @@ function a$r(e) {
|
|
|
1311
1311
|
N
|
|
1312
1312
|
);
|
|
1313
1313
|
}
|
|
1314
|
-
a$
|
|
1315
|
-
a$
|
|
1316
|
-
const r$
|
|
1314
|
+
a$s.defaultProps = r$s;
|
|
1315
|
+
a$s.displayName = "NutIconCheck";
|
|
1316
|
+
const r$r = {
|
|
1317
1317
|
name: "checked",
|
|
1318
1318
|
size: "",
|
|
1319
1319
|
classPrefix: "nut-icon",
|
|
@@ -1327,7 +1327,7 @@ const r$q = {
|
|
|
1327
1327
|
function y$o(e) {
|
|
1328
1328
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1329
1329
|
}
|
|
1330
|
-
function a$
|
|
1330
|
+
function a$r(e) {
|
|
1331
1331
|
const {
|
|
1332
1332
|
name: t,
|
|
1333
1333
|
size: l,
|
|
@@ -1341,7 +1341,7 @@ function a$q(e) {
|
|
|
1341
1341
|
onClick: o,
|
|
1342
1342
|
...p
|
|
1343
1343
|
} = {
|
|
1344
|
-
...r$
|
|
1344
|
+
...r$r,
|
|
1345
1345
|
...e
|
|
1346
1346
|
}, s = t ? t.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
|
|
1347
1347
|
o && o(x);
|
|
@@ -1362,9 +1362,9 @@ function a$q(e) {
|
|
|
1362
1362
|
d
|
|
1363
1363
|
);
|
|
1364
1364
|
}
|
|
1365
|
-
a$
|
|
1366
|
-
a$
|
|
1367
|
-
const r$
|
|
1365
|
+
a$r.defaultProps = r$r;
|
|
1366
|
+
a$r.displayName = "NutIconchecked";
|
|
1367
|
+
const r$q = {
|
|
1368
1368
|
name: "checklist",
|
|
1369
1369
|
size: "",
|
|
1370
1370
|
classPrefix: "nut-icon",
|
|
@@ -1378,7 +1378,7 @@ const r$p = {
|
|
|
1378
1378
|
function y$n(e) {
|
|
1379
1379
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1380
1380
|
}
|
|
1381
|
-
function a$
|
|
1381
|
+
function a$q(e) {
|
|
1382
1382
|
const {
|
|
1383
1383
|
name: t,
|
|
1384
1384
|
size: l,
|
|
@@ -1392,7 +1392,7 @@ function a$p(e) {
|
|
|
1392
1392
|
onClick: o,
|
|
1393
1393
|
...d
|
|
1394
1394
|
} = {
|
|
1395
|
-
...r$
|
|
1395
|
+
...r$q,
|
|
1396
1396
|
...e
|
|
1397
1397
|
}, s = t ? t.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
|
|
1398
1398
|
o && o(x);
|
|
@@ -1413,9 +1413,9 @@ function a$p(e) {
|
|
|
1413
1413
|
N
|
|
1414
1414
|
);
|
|
1415
1415
|
}
|
|
1416
|
-
a$
|
|
1417
|
-
a$
|
|
1418
|
-
const r$
|
|
1416
|
+
a$q.defaultProps = r$q;
|
|
1417
|
+
a$q.displayName = "NutIconchecklist";
|
|
1418
|
+
const r$p = {
|
|
1419
1419
|
name: "circle-close",
|
|
1420
1420
|
size: "",
|
|
1421
1421
|
classPrefix: "nut-icon",
|
|
@@ -1429,7 +1429,7 @@ const r$o = {
|
|
|
1429
1429
|
function y$m(e) {
|
|
1430
1430
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1431
1431
|
}
|
|
1432
|
-
function a$
|
|
1432
|
+
function a$p(e) {
|
|
1433
1433
|
const {
|
|
1434
1434
|
name: t,
|
|
1435
1435
|
size: l,
|
|
@@ -1443,7 +1443,7 @@ function a$o(e) {
|
|
|
1443
1443
|
onClick: o,
|
|
1444
1444
|
...h
|
|
1445
1445
|
} = {
|
|
1446
|
-
...r$
|
|
1446
|
+
...r$p,
|
|
1447
1447
|
...e
|
|
1448
1448
|
}, s = t ? t.indexOf("/") !== -1 : false, g = s ? "img" : u, C = (x) => {
|
|
1449
1449
|
o && o(x);
|
|
@@ -1464,9 +1464,9 @@ function a$o(e) {
|
|
|
1464
1464
|
N
|
|
1465
1465
|
);
|
|
1466
1466
|
}
|
|
1467
|
-
a$
|
|
1468
|
-
a$
|
|
1469
|
-
const r$
|
|
1467
|
+
a$p.defaultProps = r$p;
|
|
1468
|
+
a$p.displayName = "NutIconcircle-close";
|
|
1469
|
+
const r$o = {
|
|
1470
1470
|
name: "close",
|
|
1471
1471
|
size: "",
|
|
1472
1472
|
classPrefix: "nut-icon",
|
|
@@ -1480,7 +1480,7 @@ const r$n = {
|
|
|
1480
1480
|
function y$l(e) {
|
|
1481
1481
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1482
1482
|
}
|
|
1483
|
-
function a$
|
|
1483
|
+
function a$o(e) {
|
|
1484
1484
|
const {
|
|
1485
1485
|
name: t,
|
|
1486
1486
|
size: l,
|
|
@@ -1494,7 +1494,7 @@ function a$n(e) {
|
|
|
1494
1494
|
onClick: i,
|
|
1495
1495
|
...h
|
|
1496
1496
|
} = {
|
|
1497
|
-
...r$
|
|
1497
|
+
...r$o,
|
|
1498
1498
|
...e
|
|
1499
1499
|
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
|
|
1500
1500
|
i && i(x);
|
|
@@ -1515,9 +1515,9 @@ function a$n(e) {
|
|
|
1515
1515
|
N
|
|
1516
1516
|
);
|
|
1517
1517
|
}
|
|
1518
|
-
a$
|
|
1519
|
-
a$
|
|
1520
|
-
const r$
|
|
1518
|
+
a$o.defaultProps = r$o;
|
|
1519
|
+
a$o.displayName = "NutIconclose";
|
|
1520
|
+
const r$n = {
|
|
1521
1521
|
name: "del",
|
|
1522
1522
|
size: "",
|
|
1523
1523
|
classPrefix: "nut-icon",
|
|
@@ -1531,7 +1531,7 @@ const r$m = {
|
|
|
1531
1531
|
function y$k(e) {
|
|
1532
1532
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1533
1533
|
}
|
|
1534
|
-
function a$
|
|
1534
|
+
function a$n(e) {
|
|
1535
1535
|
const {
|
|
1536
1536
|
name: t,
|
|
1537
1537
|
size: l,
|
|
@@ -1545,7 +1545,7 @@ function a$m(e) {
|
|
|
1545
1545
|
onClick: o,
|
|
1546
1546
|
...h
|
|
1547
1547
|
} = {
|
|
1548
|
-
...r$
|
|
1548
|
+
...r$n,
|
|
1549
1549
|
...e
|
|
1550
1550
|
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
|
|
1551
1551
|
o && o(x);
|
|
@@ -1566,9 +1566,9 @@ function a$m(e) {
|
|
|
1566
1566
|
d
|
|
1567
1567
|
);
|
|
1568
1568
|
}
|
|
1569
|
-
a$
|
|
1570
|
-
a$
|
|
1571
|
-
const r$
|
|
1569
|
+
a$n.defaultProps = r$n;
|
|
1570
|
+
a$n.displayName = "NutIcondel";
|
|
1571
|
+
const r$m = {
|
|
1572
1572
|
name: "down-arrow",
|
|
1573
1573
|
size: "",
|
|
1574
1574
|
classPrefix: "nut-icon",
|
|
@@ -1582,7 +1582,7 @@ const r$l = {
|
|
|
1582
1582
|
function w(n) {
|
|
1583
1583
|
return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
|
|
1584
1584
|
}
|
|
1585
|
-
function a$
|
|
1585
|
+
function a$m(n) {
|
|
1586
1586
|
const {
|
|
1587
1587
|
name: e,
|
|
1588
1588
|
size: l,
|
|
@@ -1596,7 +1596,7 @@ function a$l(n) {
|
|
|
1596
1596
|
onClick: i,
|
|
1597
1597
|
...h
|
|
1598
1598
|
} = {
|
|
1599
|
-
...r$
|
|
1599
|
+
...r$m,
|
|
1600
1600
|
...n
|
|
1601
1601
|
}, s = e ? e.indexOf("/") !== -1 : false, g = s ? "img" : u, C = (x) => {
|
|
1602
1602
|
i && i(x);
|
|
@@ -1617,9 +1617,9 @@ function a$l(n) {
|
|
|
1617
1617
|
d
|
|
1618
1618
|
);
|
|
1619
1619
|
}
|
|
1620
|
-
a$
|
|
1621
|
-
a$
|
|
1622
|
-
const r$
|
|
1620
|
+
a$m.defaultProps = r$m;
|
|
1621
|
+
a$m.displayName = "NutIcondown-arrow";
|
|
1622
|
+
const r$l = {
|
|
1623
1623
|
name: "failure",
|
|
1624
1624
|
size: "",
|
|
1625
1625
|
classPrefix: "nut-icon",
|
|
@@ -1633,7 +1633,7 @@ const r$k = {
|
|
|
1633
1633
|
function y$j(e) {
|
|
1634
1634
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1635
1635
|
}
|
|
1636
|
-
function a$
|
|
1636
|
+
function a$l(e) {
|
|
1637
1637
|
const {
|
|
1638
1638
|
name: t,
|
|
1639
1639
|
size: l,
|
|
@@ -1647,7 +1647,7 @@ function a$k(e) {
|
|
|
1647
1647
|
onClick: o,
|
|
1648
1648
|
...h
|
|
1649
1649
|
} = {
|
|
1650
|
-
...r$
|
|
1650
|
+
...r$l,
|
|
1651
1651
|
...e
|
|
1652
1652
|
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : m, C = (x) => {
|
|
1653
1653
|
o && o(x);
|
|
@@ -1668,9 +1668,9 @@ function a$k(e) {
|
|
|
1668
1668
|
N
|
|
1669
1669
|
);
|
|
1670
1670
|
}
|
|
1671
|
-
a$
|
|
1672
|
-
a$
|
|
1673
|
-
const r$
|
|
1671
|
+
a$l.defaultProps = r$l;
|
|
1672
|
+
a$l.displayName = "NutIconfailure";
|
|
1673
|
+
const r$k = {
|
|
1674
1674
|
name: "image-error",
|
|
1675
1675
|
size: "",
|
|
1676
1676
|
classPrefix: "nut-icon",
|
|
@@ -1684,7 +1684,7 @@ const r$j = {
|
|
|
1684
1684
|
function y$i(e) {
|
|
1685
1685
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1686
1686
|
}
|
|
1687
|
-
function a$
|
|
1687
|
+
function a$k(e) {
|
|
1688
1688
|
const {
|
|
1689
1689
|
name: t,
|
|
1690
1690
|
size: l,
|
|
@@ -1698,7 +1698,7 @@ function a$j(e) {
|
|
|
1698
1698
|
onClick: o,
|
|
1699
1699
|
...g
|
|
1700
1700
|
} = {
|
|
1701
|
-
...r$
|
|
1701
|
+
...r$k,
|
|
1702
1702
|
...e
|
|
1703
1703
|
}, c = t ? t.indexOf("/") !== -1 : false, h = c ? "img" : u, C = (x) => {
|
|
1704
1704
|
o && o(x);
|
|
@@ -1719,9 +1719,9 @@ function a$j(e) {
|
|
|
1719
1719
|
N
|
|
1720
1720
|
);
|
|
1721
1721
|
}
|
|
1722
|
-
a$
|
|
1723
|
-
a$
|
|
1724
|
-
const a$
|
|
1722
|
+
a$k.defaultProps = r$k;
|
|
1723
|
+
a$k.displayName = "NutIconimage-error";
|
|
1724
|
+
const a$j = {
|
|
1725
1725
|
name: "image",
|
|
1726
1726
|
size: "",
|
|
1727
1727
|
classPrefix: "nut-icon",
|
|
@@ -1735,7 +1735,7 @@ const a$i = {
|
|
|
1735
1735
|
function y$h(e) {
|
|
1736
1736
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1737
1737
|
}
|
|
1738
|
-
function r$
|
|
1738
|
+
function r$j(e) {
|
|
1739
1739
|
const {
|
|
1740
1740
|
name: t,
|
|
1741
1741
|
size: l,
|
|
@@ -1749,7 +1749,7 @@ function r$i(e) {
|
|
|
1749
1749
|
onClick: o,
|
|
1750
1750
|
...g
|
|
1751
1751
|
} = {
|
|
1752
|
-
...a$
|
|
1752
|
+
...a$j,
|
|
1753
1753
|
...e
|
|
1754
1754
|
}, c = t ? t.indexOf("/") !== -1 : false, h = c ? "img" : u, C = (x) => {
|
|
1755
1755
|
o && o(x);
|
|
@@ -1770,9 +1770,9 @@ function r$i(e) {
|
|
|
1770
1770
|
N
|
|
1771
1771
|
);
|
|
1772
1772
|
}
|
|
1773
|
-
r$
|
|
1774
|
-
r$
|
|
1775
|
-
const r$
|
|
1773
|
+
r$j.defaultProps = a$j;
|
|
1774
|
+
r$j.displayName = "NutIconimage";
|
|
1775
|
+
const r$i = {
|
|
1776
1776
|
name: "joy-smile",
|
|
1777
1777
|
size: "",
|
|
1778
1778
|
classPrefix: "nut-icon",
|
|
@@ -1783,10 +1783,10 @@ const r$h = {
|
|
|
1783
1783
|
},
|
|
1784
1784
|
className: ""
|
|
1785
1785
|
};
|
|
1786
|
-
function
|
|
1786
|
+
function $$1(e) {
|
|
1787
1787
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1788
1788
|
}
|
|
1789
|
-
function a$
|
|
1789
|
+
function a$i(e) {
|
|
1790
1790
|
const {
|
|
1791
1791
|
name: t,
|
|
1792
1792
|
size: l,
|
|
@@ -1800,11 +1800,11 @@ function a$h(e) {
|
|
|
1800
1800
|
onClick: o,
|
|
1801
1801
|
...h
|
|
1802
1802
|
} = {
|
|
1803
|
-
...r$
|
|
1803
|
+
...r$i,
|
|
1804
1804
|
...e
|
|
1805
1805
|
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, y2 = (k) => {
|
|
1806
1806
|
o && o(k);
|
|
1807
|
-
}, C = () => c ? { src: t } : {}, n = {}, s =
|
|
1807
|
+
}, C = () => c ? { src: t } : {}, n = {}, s = $$1(l);
|
|
1808
1808
|
return s && (n.fontSize = s, n.width = s, n.height = s), React__default.createElement(
|
|
1809
1809
|
g,
|
|
1810
1810
|
{
|
|
@@ -1821,9 +1821,9 @@ function a$h(e) {
|
|
|
1821
1821
|
N
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
a$
|
|
1825
|
-
a$
|
|
1826
|
-
const r$
|
|
1824
|
+
a$i.defaultProps = r$i;
|
|
1825
|
+
a$i.displayName = "NutIconjoy-smile";
|
|
1826
|
+
const r$h = {
|
|
1827
1827
|
name: "left",
|
|
1828
1828
|
size: "",
|
|
1829
1829
|
classPrefix: "nut-icon",
|
|
@@ -1837,7 +1837,7 @@ const r$g = {
|
|
|
1837
1837
|
function y$g(e) {
|
|
1838
1838
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
1839
1839
|
}
|
|
1840
|
-
function a$
|
|
1840
|
+
function a$h(e) {
|
|
1841
1841
|
const {
|
|
1842
1842
|
name: t,
|
|
1843
1843
|
size: l,
|
|
@@ -1851,7 +1851,7 @@ function a$g(e) {
|
|
|
1851
1851
|
onClick: o,
|
|
1852
1852
|
...h
|
|
1853
1853
|
} = {
|
|
1854
|
-
...r$
|
|
1854
|
+
...r$h,
|
|
1855
1855
|
...e
|
|
1856
1856
|
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
|
|
1857
1857
|
o && o(x);
|
|
@@ -1872,9 +1872,9 @@ function a$g(e) {
|
|
|
1872
1872
|
N
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
|
-
a$
|
|
1876
|
-
a$
|
|
1877
|
-
const r$
|
|
1875
|
+
a$h.defaultProps = r$h;
|
|
1876
|
+
a$h.displayName = "NutIconleft";
|
|
1877
|
+
const r$g = {
|
|
1878
1878
|
name: "link",
|
|
1879
1879
|
size: "",
|
|
1880
1880
|
classPrefix: "nut-icon",
|
|
@@ -1888,7 +1888,7 @@ const r$f = {
|
|
|
1888
1888
|
function y$f(n) {
|
|
1889
1889
|
return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
|
|
1890
1890
|
}
|
|
1891
|
-
function a$
|
|
1891
|
+
function a$g(n) {
|
|
1892
1892
|
const {
|
|
1893
1893
|
name: e,
|
|
1894
1894
|
size: l,
|
|
@@ -1902,7 +1902,7 @@ function a$f(n) {
|
|
|
1902
1902
|
onClick: o,
|
|
1903
1903
|
...h
|
|
1904
1904
|
} = {
|
|
1905
|
-
...r$
|
|
1905
|
+
...r$g,
|
|
1906
1906
|
...n
|
|
1907
1907
|
}, c = e ? e.indexOf("/") !== -1 : false, k = c ? "img" : u, g = (x) => {
|
|
1908
1908
|
o && o(x);
|
|
@@ -1923,9 +1923,9 @@ function a$f(n) {
|
|
|
1923
1923
|
N
|
|
1924
1924
|
);
|
|
1925
1925
|
}
|
|
1926
|
-
a$
|
|
1927
|
-
a$
|
|
1928
|
-
const a$
|
|
1926
|
+
a$g.defaultProps = r$g;
|
|
1927
|
+
a$g.displayName = "NutIconlink";
|
|
1928
|
+
const a$f = {
|
|
1929
1929
|
name: "loading",
|
|
1930
1930
|
size: "",
|
|
1931
1931
|
classPrefix: "nut-icon",
|
|
@@ -1939,7 +1939,7 @@ const a$e = {
|
|
|
1939
1939
|
function y$e(n) {
|
|
1940
1940
|
return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
|
|
1941
1941
|
}
|
|
1942
|
-
function r$
|
|
1942
|
+
function r$f(n) {
|
|
1943
1943
|
const {
|
|
1944
1944
|
name: e,
|
|
1945
1945
|
size: l,
|
|
@@ -1953,7 +1953,7 @@ function r$e(n) {
|
|
|
1953
1953
|
onClick: o,
|
|
1954
1954
|
...g
|
|
1955
1955
|
} = {
|
|
1956
|
-
...a$
|
|
1956
|
+
...a$f,
|
|
1957
1957
|
...n
|
|
1958
1958
|
}, c = e ? e.indexOf("/") !== -1 : false, h = c ? "img" : u, C = (x) => {
|
|
1959
1959
|
o && o(x);
|
|
@@ -1974,9 +1974,9 @@ function r$e(n) {
|
|
|
1974
1974
|
d
|
|
1975
1975
|
);
|
|
1976
1976
|
}
|
|
1977
|
-
r$
|
|
1978
|
-
r$
|
|
1979
|
-
const a$
|
|
1977
|
+
r$f.defaultProps = a$f;
|
|
1978
|
+
r$f.displayName = "NutIconloading";
|
|
1979
|
+
const a$e = {
|
|
1980
1980
|
name: "location2",
|
|
1981
1981
|
size: "",
|
|
1982
1982
|
classPrefix: "nut-icon",
|
|
@@ -1990,7 +1990,7 @@ const a$d = {
|
|
|
1990
1990
|
function y$d(t) {
|
|
1991
1991
|
return t === "" ? "" : Number.isNaN(Number(t)) ? String(t) : `${t}px`;
|
|
1992
1992
|
}
|
|
1993
|
-
function r$
|
|
1993
|
+
function r$e(t) {
|
|
1994
1994
|
const {
|
|
1995
1995
|
name: n,
|
|
1996
1996
|
size: l,
|
|
@@ -2004,7 +2004,7 @@ function r$d(t) {
|
|
|
2004
2004
|
onClick: i,
|
|
2005
2005
|
...h
|
|
2006
2006
|
} = {
|
|
2007
|
-
...a$
|
|
2007
|
+
...a$e,
|
|
2008
2008
|
...t
|
|
2009
2009
|
}, o = n ? n.indexOf("/") !== -1 : false, g = o ? "img" : u, C = (x) => {
|
|
2010
2010
|
i && i(x);
|
|
@@ -2025,9 +2025,9 @@ function r$d(t) {
|
|
|
2025
2025
|
N
|
|
2026
2026
|
);
|
|
2027
2027
|
}
|
|
2028
|
-
r$
|
|
2029
|
-
r$
|
|
2030
|
-
const a$
|
|
2028
|
+
r$e.defaultProps = a$e;
|
|
2029
|
+
r$e.displayName = "NutIconlocation2";
|
|
2030
|
+
const a$d = {
|
|
2031
2031
|
name: "mask-close",
|
|
2032
2032
|
size: "",
|
|
2033
2033
|
classPrefix: "nut-icon",
|
|
@@ -2041,7 +2041,7 @@ const a$c = {
|
|
|
2041
2041
|
function y$c(e) {
|
|
2042
2042
|
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
2043
2043
|
}
|
|
2044
|
-
function r$
|
|
2044
|
+
function r$d(e) {
|
|
2045
2045
|
const {
|
|
2046
2046
|
name: t,
|
|
2047
2047
|
size: l,
|
|
@@ -2055,7 +2055,7 @@ function r$c(e) {
|
|
|
2055
2055
|
onClick: i,
|
|
2056
2056
|
...h
|
|
2057
2057
|
} = {
|
|
2058
|
-
...a$
|
|
2058
|
+
...a$d,
|
|
2059
2059
|
...e
|
|
2060
2060
|
}, c = t ? t.indexOf("/") !== -1 : false, k = c ? "img" : u, g = (x) => {
|
|
2061
2061
|
i && i(x);
|
|
@@ -2076,9 +2076,9 @@ function r$c(e) {
|
|
|
2076
2076
|
N
|
|
2077
2077
|
);
|
|
2078
2078
|
}
|
|
2079
|
-
r$
|
|
2080
|
-
r$
|
|
2081
|
-
const r$
|
|
2079
|
+
r$d.defaultProps = a$d;
|
|
2080
|
+
r$d.displayName = "NutIconmask-close";
|
|
2081
|
+
const r$c = {
|
|
2082
2082
|
name: "minus",
|
|
2083
2083
|
size: "",
|
|
2084
2084
|
classPrefix: "nut-icon",
|
|
@@ -2092,7 +2092,7 @@ const r$b = {
|
|
|
2092
2092
|
function y$b(n) {
|
|
2093
2093
|
return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
|
|
2094
2094
|
}
|
|
2095
|
-
function a$
|
|
2095
|
+
function a$c(n) {
|
|
2096
2096
|
const {
|
|
2097
2097
|
name: e,
|
|
2098
2098
|
size: l,
|
|
@@ -2106,7 +2106,7 @@ function a$b(n) {
|
|
|
2106
2106
|
onClick: o,
|
|
2107
2107
|
...h
|
|
2108
2108
|
} = {
|
|
2109
|
-
...r$
|
|
2109
|
+
...r$c,
|
|
2110
2110
|
...n
|
|
2111
2111
|
}, c = e ? e.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
|
|
2112
2112
|
o && o(x);
|
|
@@ -2127,8 +2127,59 @@ function a$b(n) {
|
|
|
2127
2127
|
N
|
|
2128
2128
|
);
|
|
2129
2129
|
}
|
|
2130
|
+
a$c.defaultProps = r$c;
|
|
2131
|
+
a$c.displayName = "NutIconminus";
|
|
2132
|
+
const r$b = {
|
|
2133
|
+
name: "my",
|
|
2134
|
+
size: "",
|
|
2135
|
+
classPrefix: "nut-icon",
|
|
2136
|
+
fontClassName: "nutui-iconfont",
|
|
2137
|
+
color: "",
|
|
2138
|
+
tag: "i",
|
|
2139
|
+
onClick: (e) => {
|
|
2140
|
+
},
|
|
2141
|
+
className: ""
|
|
2142
|
+
};
|
|
2143
|
+
function $(e) {
|
|
2144
|
+
return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
|
|
2145
|
+
}
|
|
2146
|
+
function a$b(e) {
|
|
2147
|
+
const {
|
|
2148
|
+
name: t,
|
|
2149
|
+
size: l,
|
|
2150
|
+
classPrefix: f,
|
|
2151
|
+
color: m,
|
|
2152
|
+
tag: u,
|
|
2153
|
+
children: N,
|
|
2154
|
+
className: i,
|
|
2155
|
+
fontClassName: p,
|
|
2156
|
+
style: d,
|
|
2157
|
+
onClick: o,
|
|
2158
|
+
...h
|
|
2159
|
+
} = {
|
|
2160
|
+
...r$b,
|
|
2161
|
+
...e
|
|
2162
|
+
}, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, y2 = (k) => {
|
|
2163
|
+
o && o(k);
|
|
2164
|
+
}, C = () => c ? { src: t } : {}, n = {}, s = $(l);
|
|
2165
|
+
return s && (n.fontSize = s, n.width = s, n.height = s), React__default.createElement(
|
|
2166
|
+
g,
|
|
2167
|
+
{
|
|
2168
|
+
className: c ? `nut-icon__img ${i || ""} ` : `${p} nut-icon ${f}-${t} ${i || ""}`,
|
|
2169
|
+
style: {
|
|
2170
|
+
color: m,
|
|
2171
|
+
...n,
|
|
2172
|
+
...d
|
|
2173
|
+
},
|
|
2174
|
+
...h,
|
|
2175
|
+
onClick: y2,
|
|
2176
|
+
...C()
|
|
2177
|
+
},
|
|
2178
|
+
N
|
|
2179
|
+
);
|
|
2180
|
+
}
|
|
2130
2181
|
a$b.defaultProps = r$b;
|
|
2131
|
-
a$b.displayName = "
|
|
2182
|
+
a$b.displayName = "NutIconmy";
|
|
2132
2183
|
const r$a = {
|
|
2133
2184
|
name: "notice",
|
|
2134
2185
|
size: "",
|
|
@@ -2777,7 +2828,7 @@ const Button = React__default.forwardRef(
|
|
|
2777
2828
|
style: { ...getStyle(), ...style },
|
|
2778
2829
|
onClick: (e) => handleClick(e),
|
|
2779
2830
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-button__warp", children: [
|
|
2780
|
-
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(r$
|
|
2831
|
+
loading && /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { className: "nut-icon-loading" }),
|
|
2781
2832
|
!loading && icon ? icon : null,
|
|
2782
2833
|
children && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: icon || loading ? "nut-button-text" : "", children })
|
|
2783
2834
|
] })
|
|
@@ -2797,7 +2848,7 @@ const defaultProps$1s = {
|
|
|
2797
2848
|
onClick: (event) => {
|
|
2798
2849
|
}
|
|
2799
2850
|
};
|
|
2800
|
-
const classPrefix$
|
|
2851
|
+
const classPrefix$f = "nut-cell";
|
|
2801
2852
|
const Cell = (props) => {
|
|
2802
2853
|
const {
|
|
2803
2854
|
children,
|
|
@@ -2828,24 +2879,24 @@ const Cell = (props) => {
|
|
|
2828
2879
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2829
2880
|
"div",
|
|
2830
2881
|
{
|
|
2831
|
-
className: classNames(classPrefix$
|
|
2882
|
+
className: classNames(classPrefix$f, className),
|
|
2832
2883
|
onClick: (event) => handleClick(event),
|
|
2833
2884
|
style: baseStyle,
|
|
2834
2885
|
...rest,
|
|
2835
2886
|
children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
2836
|
-
title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$
|
|
2837
|
-
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
2838
|
-
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
2887
|
+
title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$f}__left`, children: [
|
|
2888
|
+
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__title`, children: title }) : null,
|
|
2889
|
+
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__description`, children: description }) : null
|
|
2839
2890
|
] }) : null,
|
|
2840
2891
|
extra ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2841
2892
|
"div",
|
|
2842
2893
|
{
|
|
2843
|
-
className: `${classPrefix$
|
|
2894
|
+
className: `${classPrefix$f}__extra`,
|
|
2844
2895
|
style: styles,
|
|
2845
2896
|
children: extra
|
|
2846
2897
|
}
|
|
2847
2898
|
) : null,
|
|
2848
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
2899
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__divider` })
|
|
2849
2900
|
] })
|
|
2850
2901
|
}
|
|
2851
2902
|
);
|
|
@@ -2855,18 +2906,25 @@ Cell.displayName = "NutCell";
|
|
|
2855
2906
|
const defaultProps$1r = {
|
|
2856
2907
|
...ComponentDefaults,
|
|
2857
2908
|
title: "",
|
|
2858
|
-
description: ""
|
|
2909
|
+
description: "",
|
|
2910
|
+
divider: true
|
|
2859
2911
|
};
|
|
2860
|
-
const classPrefix$
|
|
2912
|
+
const classPrefix$e = "nut-cell-group";
|
|
2861
2913
|
const CellGroup = (props) => {
|
|
2862
|
-
const { children, className, style, title, description, ...rest } = {
|
|
2914
|
+
const { children, className, style, title, description, divider, ...rest } = {
|
|
2863
2915
|
...defaultProps$1r,
|
|
2864
2916
|
...props
|
|
2865
2917
|
};
|
|
2866
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$
|
|
2867
|
-
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
2868
|
-
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
2869
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2918
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$e, className), ...rest, children: [
|
|
2919
|
+
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$e}__title`, children: title }) : null,
|
|
2920
|
+
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$e}__description`, children: description }) : null,
|
|
2921
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2922
|
+
"div",
|
|
2923
|
+
{
|
|
2924
|
+
className: `${classPrefix$e}__wrap ${divider ? `${classPrefix$e}__wrap--divider` : ""}`,
|
|
2925
|
+
children
|
|
2926
|
+
}
|
|
2927
|
+
)
|
|
2870
2928
|
] });
|
|
2871
2929
|
};
|
|
2872
2930
|
CellGroup.defaultProps = defaultProps$1r;
|
|
@@ -3413,8 +3471,8 @@ const Image$1 = (props) => {
|
|
|
3413
3471
|
onError: error
|
|
3414
3472
|
}
|
|
3415
3473
|
),
|
|
3416
|
-
showLoading && loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: slotLoding || children || /* @__PURE__ */ jsxRuntimeExports.jsx(r$
|
|
3417
|
-
showError && isError && !loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: slotError || children || /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
3474
|
+
showLoading && loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: slotLoding || children || /* @__PURE__ */ jsxRuntimeExports.jsx(r$j, {}) }) : null,
|
|
3475
|
+
showError && isError && !loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: slotError || children || /* @__PURE__ */ jsxRuntimeExports.jsx(a$k, {}) }) : null
|
|
3418
3476
|
]
|
|
3419
3477
|
}
|
|
3420
3478
|
);
|
|
@@ -3561,21 +3619,21 @@ const defaultProps$1n = {
|
|
|
3561
3619
|
contentPosition: "center",
|
|
3562
3620
|
direction: "horizontal"
|
|
3563
3621
|
};
|
|
3564
|
-
const classPrefix$
|
|
3622
|
+
const classPrefix$d = `nut-divider`;
|
|
3565
3623
|
const Divider = (props) => {
|
|
3566
3624
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3567
3625
|
...defaultProps$1n,
|
|
3568
3626
|
...props
|
|
3569
3627
|
};
|
|
3570
3628
|
const classes = direction === "horizontal" ? classNames({
|
|
3571
|
-
[`${classPrefix$
|
|
3572
|
-
[`${classPrefix$
|
|
3573
|
-
[`${classPrefix$
|
|
3574
|
-
[`${classPrefix$
|
|
3575
|
-
[`${classPrefix$
|
|
3629
|
+
[`${classPrefix$d}`]: true,
|
|
3630
|
+
[`${classPrefix$d}__center`]: children,
|
|
3631
|
+
[`${classPrefix$d}__left`]: contentPosition === "left",
|
|
3632
|
+
[`${classPrefix$d}__right`]: contentPosition === "right",
|
|
3633
|
+
[`${classPrefix$d}__hairline`]: true
|
|
3576
3634
|
}) : classNames({
|
|
3577
|
-
[`${classPrefix$
|
|
3578
|
-
[`${classPrefix$
|
|
3635
|
+
[`${classPrefix$d}`]: true,
|
|
3636
|
+
[`${classPrefix$d}__vertical`]: direction === "vertical"
|
|
3579
3637
|
});
|
|
3580
3638
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
|
|
3581
3639
|
};
|
|
@@ -3739,7 +3797,7 @@ const Layout = (props) => {
|
|
|
3739
3797
|
};
|
|
3740
3798
|
Layout.defaultProps = defaultProps$1k;
|
|
3741
3799
|
Layout.displayName = "NutLayout";
|
|
3742
|
-
const classPrefix$
|
|
3800
|
+
const classPrefix$c = "nut-row";
|
|
3743
3801
|
const defaultProps$1j = {
|
|
3744
3802
|
...ComponentDefaults,
|
|
3745
3803
|
type: "",
|
|
@@ -3774,7 +3832,7 @@ const Row = (props) => {
|
|
|
3774
3832
|
${getClass("justify", justify)}
|
|
3775
3833
|
${getClass("align", align)}
|
|
3776
3834
|
${getClass("flex", wrap)}
|
|
3777
|
-
${classPrefix$
|
|
3835
|
+
${classPrefix$c}
|
|
3778
3836
|
`;
|
|
3779
3837
|
};
|
|
3780
3838
|
const parentRow = {
|
|
@@ -3850,7 +3908,7 @@ const defaultProps$1i = {
|
|
|
3850
3908
|
position: "top",
|
|
3851
3909
|
zIndex: 2e3
|
|
3852
3910
|
};
|
|
3853
|
-
const classPrefix$
|
|
3911
|
+
const classPrefix$b = "nut-sticky";
|
|
3854
3912
|
const Sticky = (props) => {
|
|
3855
3913
|
const {
|
|
3856
3914
|
position,
|
|
@@ -3952,7 +4010,7 @@ const Sticky = (props) => {
|
|
|
3952
4010
|
{
|
|
3953
4011
|
ref: rootRef,
|
|
3954
4012
|
style: rootStyle,
|
|
3955
|
-
className: classNames(classPrefix$
|
|
4013
|
+
className: classNames(classPrefix$b, className),
|
|
3956
4014
|
...rest,
|
|
3957
4015
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3958
4016
|
"div",
|
|
@@ -4068,6 +4126,7 @@ const Elevator = (props) => {
|
|
|
4068
4126
|
const [scrollStart, setScrollStart] = useState(false);
|
|
4069
4127
|
const state = useRef(initData);
|
|
4070
4128
|
const [scrollTop, setScrollTop] = useState(0);
|
|
4129
|
+
const [scrollY, setScrollY] = useState(0);
|
|
4071
4130
|
const resetScrollState = () => {
|
|
4072
4131
|
setScrollStart(false);
|
|
4073
4132
|
};
|
|
@@ -4105,7 +4164,11 @@ const Elevator = (props) => {
|
|
|
4105
4164
|
cacheIndex = state.current.listHeight.length - 2;
|
|
4106
4165
|
}
|
|
4107
4166
|
setCodeIndex(cacheIndex);
|
|
4108
|
-
|
|
4167
|
+
const scrollTop2 = state.current.listHeight[cacheIndex];
|
|
4168
|
+
setScrollTop(scrollTop2);
|
|
4169
|
+
if (sticky && scrollY !== scrollTop2) {
|
|
4170
|
+
setScrollY(Math.floor(scrollTop2) > 0 ? 1 : 0);
|
|
4171
|
+
}
|
|
4109
4172
|
};
|
|
4110
4173
|
const touchMove = (e) => {
|
|
4111
4174
|
const firstTouch = e.touches[0];
|
|
@@ -4153,7 +4216,10 @@ const Elevator = (props) => {
|
|
|
4153
4216
|
const target = e.target;
|
|
4154
4217
|
const { scrollTop: scrollTop2 } = target;
|
|
4155
4218
|
state.current.scrollY = Math.floor(scrollTop2);
|
|
4156
|
-
setScrollTop(scrollTop2);
|
|
4219
|
+
Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
|
|
4220
|
+
if (sticky && scrollTop2 !== scrollY) {
|
|
4221
|
+
setScrollY(Math.floor(scrollTop2) > 0 ? 1 : 0);
|
|
4222
|
+
}
|
|
4157
4223
|
for (let i = 0; i < listHeight.length - 1; i++) {
|
|
4158
4224
|
const height1 = listHeight[i];
|
|
4159
4225
|
const height2 = listHeight[i + 1];
|
|
@@ -4162,7 +4228,6 @@ const Elevator = (props) => {
|
|
|
4162
4228
|
return;
|
|
4163
4229
|
}
|
|
4164
4230
|
}
|
|
4165
|
-
setCurrentIndex(listHeight.length - 2);
|
|
4166
4231
|
};
|
|
4167
4232
|
useEffect(() => {
|
|
4168
4233
|
if (listview.current) {
|
|
@@ -4172,7 +4237,6 @@ const Elevator = (props) => {
|
|
|
4172
4237
|
}
|
|
4173
4238
|
}, [listview]);
|
|
4174
4239
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2} ${className}`, style, ...rest, children: [
|
|
4175
|
-
sticky && scrollTop > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__list__fixed`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__list__fixed__title`, children: list[currentIndex][floorKey] }) }) : null,
|
|
4176
4240
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4177
4241
|
"div",
|
|
4178
4242
|
{
|
|
@@ -4183,6 +4247,8 @@ const Elevator = (props) => {
|
|
|
4183
4247
|
{
|
|
4184
4248
|
scrollTop,
|
|
4185
4249
|
scrollY: true,
|
|
4250
|
+
scrollWithAnimation: true,
|
|
4251
|
+
scrollAnchoring: true,
|
|
4186
4252
|
className: `${classPrefix2}__list__inner`,
|
|
4187
4253
|
type: "list",
|
|
4188
4254
|
ref: listview,
|
|
@@ -4251,7 +4317,8 @@ const Elevator = (props) => {
|
|
|
4251
4317
|
);
|
|
4252
4318
|
})
|
|
4253
4319
|
}
|
|
4254
|
-
) })
|
|
4320
|
+
) }),
|
|
4321
|
+
sticky && scrollY > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__list__fixed`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__list__fixed__title`, children: list[currentIndex][floorKey] }) }) : null
|
|
4255
4322
|
] });
|
|
4256
4323
|
};
|
|
4257
4324
|
Elevator.defaultProps = defaultProps$1g;
|
|
@@ -4337,7 +4404,7 @@ const FixedNav = (props) => {
|
|
|
4337
4404
|
);
|
|
4338
4405
|
}) }) }),
|
|
4339
4406
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue(), children: content || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
4340
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
4407
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(a$h, { color: "#fff" }),
|
|
4341
4408
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText })
|
|
4342
4409
|
] }) })
|
|
4343
4410
|
]
|
|
@@ -6287,7 +6354,7 @@ const Popup = (props) => {
|
|
|
6287
6354
|
};
|
|
6288
6355
|
const renderIcon = () => {
|
|
6289
6356
|
if (closeable) {
|
|
6290
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: closeClasses, onClick: onHandleClickCloseIcon, children: React__default.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
6357
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: closeClasses, onClick: onHandleClickCloseIcon, children: React__default.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { width: 12, height: 12 }) });
|
|
6291
6358
|
}
|
|
6292
6359
|
return null;
|
|
6293
6360
|
};
|
|
@@ -6492,288 +6559,189 @@ const SubSideNavBar = (props) => {
|
|
|
6492
6559
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-subsidenavbar__content", children })
|
|
6493
6560
|
] });
|
|
6494
6561
|
};
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6562
|
+
function usePropsValue({
|
|
6563
|
+
value,
|
|
6564
|
+
defaultValue,
|
|
6565
|
+
finalValue,
|
|
6566
|
+
onChange = (value2) => {
|
|
6567
|
+
}
|
|
6568
|
+
}) {
|
|
6569
|
+
const [uncontrolled, setUncontrolled] = useState(
|
|
6570
|
+
defaultValue !== void 0 ? defaultValue : finalValue
|
|
6571
|
+
);
|
|
6572
|
+
const handleUncontrolledChange = (val) => {
|
|
6573
|
+
setUncontrolled(val);
|
|
6574
|
+
onChange == null ? void 0 : onChange(val);
|
|
6575
|
+
};
|
|
6576
|
+
if (value !== void 0) {
|
|
6577
|
+
return [value, onChange];
|
|
6502
6578
|
}
|
|
6579
|
+
return [uncontrolled, handleUncontrolledChange];
|
|
6580
|
+
}
|
|
6581
|
+
const defaultProps$1a = {
|
|
6582
|
+
...ComponentDefaults,
|
|
6583
|
+
value: "",
|
|
6584
|
+
dot: false,
|
|
6585
|
+
max: 99,
|
|
6586
|
+
top: "0",
|
|
6587
|
+
right: "5",
|
|
6588
|
+
color: ""
|
|
6503
6589
|
};
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
}
|
|
6521
|
-
if (void 0 !== o)
|
|
6522
|
-
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
6523
|
-
var l = o[y2];
|
|
6524
|
-
if (l && "string" == typeof l.valueOf())
|
|
6525
|
-
for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
6526
|
-
var h = g[d];
|
|
6527
|
-
h !== f && (v += " " + h);
|
|
6528
|
-
}
|
|
6529
|
-
}
|
|
6530
|
-
return v;
|
|
6590
|
+
const Badge = (props) => {
|
|
6591
|
+
const { className, style, value, max, children, dot, top, right, color } = {
|
|
6592
|
+
...defaultProps$1a,
|
|
6593
|
+
...props
|
|
6594
|
+
};
|
|
6595
|
+
const classPrefix2 = "nut-badge";
|
|
6596
|
+
const classes = classNames(classPrefix2, className);
|
|
6597
|
+
const contentClasses = classNames(
|
|
6598
|
+
{ [`${classPrefix2}__dot`]: dot },
|
|
6599
|
+
`${classPrefix2}__content`,
|
|
6600
|
+
`${classPrefix2}__sup`
|
|
6601
|
+
);
|
|
6602
|
+
function content() {
|
|
6603
|
+
if (dot || typeof value === "object")
|
|
6604
|
+
return null;
|
|
6605
|
+
if (typeof value === "number" && typeof max === "number") {
|
|
6606
|
+
return max < value ? `${max}+` : value;
|
|
6531
6607
|
}
|
|
6532
|
-
|
|
6533
|
-
return function(r4, e2) {
|
|
6534
|
-
return function(n2, i, a2) {
|
|
6535
|
-
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r4, n2, void 0, i) : t2(r4, n2, i, a2) : t2(r4, e2, n2, i);
|
|
6536
|
-
};
|
|
6537
|
-
};
|
|
6608
|
+
return value;
|
|
6538
6609
|
}
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
var modVal = m[k];
|
|
6562
|
-
if (modVal === true) {
|
|
6563
|
-
className += modPrefix + k;
|
|
6564
|
-
} else if (modVal) {
|
|
6565
|
-
className += modPrefix + k + modValueDelimiter + modVal;
|
|
6566
|
-
}
|
|
6567
|
-
}
|
|
6568
|
-
}
|
|
6569
|
-
}
|
|
6570
|
-
if (mix !== void 0) {
|
|
6571
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
6572
|
-
for (var i = 0, len = mix.length; i < len; i++) {
|
|
6573
|
-
var value = mix[i];
|
|
6574
|
-
if (!value || typeof value.valueOf() !== "string")
|
|
6575
|
-
continue;
|
|
6576
|
-
var mixes = value.valueOf().split(" ");
|
|
6577
|
-
for (var j = 0; j < mixes.length; j++) {
|
|
6578
|
-
var val = mixes[j];
|
|
6579
|
-
if (val !== entityName) {
|
|
6580
|
-
className += " " + val;
|
|
6581
|
-
}
|
|
6582
|
-
}
|
|
6583
|
-
}
|
|
6584
|
-
}
|
|
6585
|
-
return className;
|
|
6586
|
-
}
|
|
6587
|
-
return function cnGenerator(b2, e) {
|
|
6588
|
-
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
6589
|
-
if (typeof elemOrMods === "string") {
|
|
6590
|
-
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
6591
|
-
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
6592
|
-
}
|
|
6593
|
-
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
6594
|
-
}
|
|
6595
|
-
return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
|
|
6596
|
-
};
|
|
6597
|
-
};
|
|
6598
|
-
}
|
|
6599
|
-
var cn2 = withNaming({
|
|
6600
|
-
e: "-",
|
|
6601
|
-
m: "_"
|
|
6602
|
-
});
|
|
6603
|
-
classname_development.cn = cn2;
|
|
6604
|
-
classname_development.withNaming = withNaming;
|
|
6605
|
-
return classname_development;
|
|
6606
|
-
}
|
|
6607
|
-
(function(module) {
|
|
6608
|
-
if (process.env.NODE_ENV === "production") {
|
|
6609
|
-
module.exports = requireClassname_production_min();
|
|
6610
|
-
} else {
|
|
6611
|
-
module.exports = requireClassname_development();
|
|
6612
|
-
}
|
|
6613
|
-
})(classname);
|
|
6614
|
-
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
6615
|
-
const defaultProps$1a = {
|
|
6616
|
-
visible: 0,
|
|
6617
|
-
bottom: false,
|
|
6618
|
-
size: 20,
|
|
6619
|
-
unactiveColor: "",
|
|
6620
|
-
activeColor: "",
|
|
6621
|
-
safeAreaInsetBottom: false,
|
|
6622
|
-
className: "",
|
|
6623
|
-
style: {},
|
|
6624
|
-
onSwitch: (child, activeVisible) => {
|
|
6610
|
+
const getStyle = () => {
|
|
6611
|
+
const style2 = {};
|
|
6612
|
+
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
6613
|
+
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
6614
|
+
style2.background = color;
|
|
6615
|
+
return style2;
|
|
6616
|
+
};
|
|
6617
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
|
|
6618
|
+
typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
|
|
6619
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
|
|
6620
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
|
|
6621
|
+
] });
|
|
6622
|
+
};
|
|
6623
|
+
Badge.defaultProps = defaultProps$1a;
|
|
6624
|
+
Badge.displayName = "NutBadge";
|
|
6625
|
+
const defaultProps$19 = {
|
|
6626
|
+
...ComponentDefaults,
|
|
6627
|
+
title: "",
|
|
6628
|
+
icon: null,
|
|
6629
|
+
active: false,
|
|
6630
|
+
index: 0,
|
|
6631
|
+
handleClick: (idx) => {
|
|
6625
6632
|
}
|
|
6626
6633
|
};
|
|
6627
|
-
const
|
|
6634
|
+
const TabbarItem = (props) => {
|
|
6628
6635
|
const {
|
|
6629
|
-
children,
|
|
6630
|
-
visible,
|
|
6631
|
-
activeVisible,
|
|
6632
|
-
bottom,
|
|
6633
|
-
size,
|
|
6634
|
-
activeColor,
|
|
6635
|
-
unactiveColor,
|
|
6636
|
-
safeAreaInsetBottom,
|
|
6637
6636
|
className,
|
|
6638
6637
|
style,
|
|
6639
|
-
|
|
6638
|
+
title,
|
|
6639
|
+
icon,
|
|
6640
|
+
active,
|
|
6641
|
+
activeColor,
|
|
6642
|
+
inactiveColor,
|
|
6643
|
+
index,
|
|
6644
|
+
handleClick,
|
|
6645
|
+
...rest
|
|
6640
6646
|
} = {
|
|
6641
|
-
...defaultProps$
|
|
6647
|
+
...defaultProps$19,
|
|
6642
6648
|
...props
|
|
6643
6649
|
};
|
|
6644
|
-
const
|
|
6645
|
-
const
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
if (activeVisible !== void 0) {
|
|
6653
|
-
setSelectIndex(activeVisible);
|
|
6654
|
-
}
|
|
6655
|
-
}, [activeVisible]);
|
|
6650
|
+
const classPrefix2 = "nut-tabbar-item";
|
|
6651
|
+
const tabbarItemClass = classNames(className, classPrefix2, {
|
|
6652
|
+
[`${classPrefix2}-active`]: active
|
|
6653
|
+
});
|
|
6654
|
+
const boxPrefix = `${classPrefix2}__icon-box`;
|
|
6655
|
+
const titleClass = classNames(boxPrefix, `${boxPrefix}-nav`, {
|
|
6656
|
+
[`${boxPrefix}-large`]: !icon
|
|
6657
|
+
});
|
|
6656
6658
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6657
6659
|
"div",
|
|
6658
6660
|
{
|
|
6659
|
-
className:
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
}
|
|
6670
|
-
const childProps = {
|
|
6671
|
-
...child.props,
|
|
6672
|
-
active: idx === selectIndex,
|
|
6673
|
-
index: idx,
|
|
6674
|
-
unactiveColor,
|
|
6675
|
-
activeColor,
|
|
6676
|
-
size,
|
|
6677
|
-
handleClick: () => {
|
|
6678
|
-
handleClick(idx);
|
|
6679
|
-
onSwitch(child, idx);
|
|
6680
|
-
}
|
|
6681
|
-
};
|
|
6682
|
-
return React__default.cloneElement(child, childProps);
|
|
6683
|
-
})
|
|
6661
|
+
className: tabbarItemClass,
|
|
6662
|
+
style: {
|
|
6663
|
+
color: active ? activeColor : inactiveColor,
|
|
6664
|
+
...style
|
|
6665
|
+
},
|
|
6666
|
+
onClick: () => handleClick(index),
|
|
6667
|
+
children: icon ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
6668
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: boxPrefix, children: icon }) }),
|
|
6669
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title })
|
|
6670
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title }) })
|
|
6684
6671
|
}
|
|
6685
6672
|
);
|
|
6686
6673
|
};
|
|
6687
|
-
|
|
6688
|
-
Tabbar.displayName = "NutTabbar";
|
|
6689
|
-
const defaultProps$19 = {
|
|
6674
|
+
const defaultProps$18 = {
|
|
6690
6675
|
...ComponentDefaults,
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
icon: null,
|
|
6695
|
-
href: "",
|
|
6696
|
-
to: "",
|
|
6697
|
-
num: "",
|
|
6698
|
-
active: false,
|
|
6676
|
+
defaultValue: 0,
|
|
6677
|
+
fixed: false,
|
|
6678
|
+
inactiveColor: "",
|
|
6699
6679
|
activeColor: "",
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
handleClick: (idx) => {
|
|
6680
|
+
safeArea: false,
|
|
6681
|
+
onSwitch: (value) => {
|
|
6703
6682
|
}
|
|
6704
6683
|
};
|
|
6705
|
-
const
|
|
6684
|
+
const Tabbar = (props) => {
|
|
6706
6685
|
const {
|
|
6707
|
-
|
|
6686
|
+
children,
|
|
6687
|
+
defaultValue,
|
|
6688
|
+
value,
|
|
6689
|
+
fixed,
|
|
6690
|
+
activeColor,
|
|
6691
|
+
inactiveColor,
|
|
6692
|
+
safeArea,
|
|
6708
6693
|
className,
|
|
6709
6694
|
style,
|
|
6710
|
-
|
|
6711
|
-
icon,
|
|
6712
|
-
href,
|
|
6713
|
-
to: to2,
|
|
6714
|
-
num,
|
|
6715
|
-
active,
|
|
6716
|
-
activeColor,
|
|
6717
|
-
unactiveColor,
|
|
6718
|
-
index,
|
|
6719
|
-
handleClick
|
|
6695
|
+
onSwitch
|
|
6720
6696
|
} = {
|
|
6721
|
-
...defaultProps$
|
|
6697
|
+
...defaultProps$18,
|
|
6722
6698
|
...props
|
|
6723
6699
|
};
|
|
6724
|
-
const
|
|
6725
|
-
const
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
if (active && to2) {
|
|
6732
|
-
Taro.navigateTo({
|
|
6733
|
-
url: to2
|
|
6734
|
-
});
|
|
6735
|
-
}
|
|
6736
|
-
}, [active, href, to2]);
|
|
6700
|
+
const classPrefix2 = "nut-tabbar";
|
|
6701
|
+
const [selectIndex, setSelectIndex] = usePropsValue({
|
|
6702
|
+
value,
|
|
6703
|
+
defaultValue,
|
|
6704
|
+
finalValue: 0,
|
|
6705
|
+
onChange: onSwitch
|
|
6706
|
+
});
|
|
6737
6707
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6738
6708
|
"div",
|
|
6739
6709
|
{
|
|
6740
|
-
className:
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
},
|
|
6745
|
-
onClick: () => {
|
|
6746
|
-
handleClick(index);
|
|
6747
|
-
},
|
|
6710
|
+
className: classNames(classPrefix2, className, {
|
|
6711
|
+
[`${classPrefix2}__fixed`]: fixed
|
|
6712
|
+
}),
|
|
6713
|
+
style,
|
|
6748
6714
|
children: [
|
|
6749
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
6750
|
-
!
|
|
6751
|
-
|
|
6752
|
-
num && num >= 100 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("nums")])}`, children: "99+" })
|
|
6753
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("dot")])}` }),
|
|
6754
|
-
icon || null
|
|
6755
|
-
] }),
|
|
6756
|
-
tabTitle && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6757
|
-
"div",
|
|
6758
|
-
{
|
|
6759
|
-
className: bIcon({ "nav-word": true }, [
|
|
6760
|
-
bIcon({ "big-word": !icon })
|
|
6761
|
-
]),
|
|
6762
|
-
children: tabTitle
|
|
6715
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__wrap`, children: React__default.Children.map(children, (child, idx) => {
|
|
6716
|
+
if (!React__default.isValidElement(child)) {
|
|
6717
|
+
return null;
|
|
6763
6718
|
}
|
|
6764
|
-
|
|
6719
|
+
const childProps = {
|
|
6720
|
+
...child.props,
|
|
6721
|
+
active: idx === selectIndex,
|
|
6722
|
+
index: idx,
|
|
6723
|
+
inactiveColor,
|
|
6724
|
+
activeColor,
|
|
6725
|
+
handleClick: setSelectIndex
|
|
6726
|
+
};
|
|
6727
|
+
return React__default.cloneElement(child, childProps);
|
|
6728
|
+
}) }),
|
|
6729
|
+
(fixed || safeArea) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__safe-area` })
|
|
6765
6730
|
]
|
|
6766
6731
|
}
|
|
6767
6732
|
);
|
|
6768
6733
|
};
|
|
6769
|
-
|
|
6734
|
+
Tabbar.defaultProps = defaultProps$18;
|
|
6735
|
+
Tabbar.displayName = "NutTabbar";
|
|
6736
|
+
Tabbar.Item = TabbarItem;
|
|
6737
|
+
const defaultProps$17 = {
|
|
6770
6738
|
title: "",
|
|
6771
6739
|
value: "",
|
|
6772
6740
|
disabled: false
|
|
6773
6741
|
};
|
|
6774
6742
|
const TabPane = (props) => {
|
|
6775
6743
|
const { children, autoHeightClassName, className, disabled } = {
|
|
6776
|
-
...defaultProps$
|
|
6744
|
+
...defaultProps$17,
|
|
6777
6745
|
...props
|
|
6778
6746
|
};
|
|
6779
6747
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -6787,26 +6755,7 @@ const TabPane = (props) => {
|
|
|
6787
6755
|
);
|
|
6788
6756
|
return children ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes, children: !disabled && children }) : null;
|
|
6789
6757
|
};
|
|
6790
|
-
|
|
6791
|
-
value,
|
|
6792
|
-
defaultValue,
|
|
6793
|
-
finalValue,
|
|
6794
|
-
onChange = (value2) => {
|
|
6795
|
-
}
|
|
6796
|
-
}) {
|
|
6797
|
-
const [uncontrolled, setUncontrolled] = useState(
|
|
6798
|
-
defaultValue !== void 0 ? defaultValue : finalValue
|
|
6799
|
-
);
|
|
6800
|
-
const handleUncontrolledChange = (val) => {
|
|
6801
|
-
setUncontrolled(val);
|
|
6802
|
-
onChange == null ? void 0 : onChange(val);
|
|
6803
|
-
};
|
|
6804
|
-
if (value !== void 0) {
|
|
6805
|
-
return [value, onChange];
|
|
6806
|
-
}
|
|
6807
|
-
return [uncontrolled, handleUncontrolledChange];
|
|
6808
|
-
}
|
|
6809
|
-
const defaultProps$17 = {
|
|
6758
|
+
const defaultProps$16 = {
|
|
6810
6759
|
...ComponentDefaults,
|
|
6811
6760
|
tabStyle: {},
|
|
6812
6761
|
activeColor: "",
|
|
@@ -6815,7 +6764,7 @@ const defaultProps$17 = {
|
|
|
6815
6764
|
duration: 300,
|
|
6816
6765
|
autoHeight: false
|
|
6817
6766
|
};
|
|
6818
|
-
const classPrefix$
|
|
6767
|
+
const classPrefix$a = "nut-tabs";
|
|
6819
6768
|
const Tabs = (props) => {
|
|
6820
6769
|
const {
|
|
6821
6770
|
activeColor,
|
|
@@ -6832,7 +6781,7 @@ const Tabs = (props) => {
|
|
|
6832
6781
|
autoHeight,
|
|
6833
6782
|
...rest
|
|
6834
6783
|
} = {
|
|
6835
|
-
...defaultProps$
|
|
6784
|
+
...defaultProps$16,
|
|
6836
6785
|
...props
|
|
6837
6786
|
};
|
|
6838
6787
|
const [value, setValue] = usePropsValue({
|
|
@@ -6862,14 +6811,14 @@ const Tabs = (props) => {
|
|
|
6862
6811
|
};
|
|
6863
6812
|
const titles = useRef(getTitles());
|
|
6864
6813
|
const classes = classNames(
|
|
6865
|
-
classPrefix$
|
|
6866
|
-
`${classPrefix$
|
|
6814
|
+
classPrefix$a,
|
|
6815
|
+
`${classPrefix$a}--${direction}`,
|
|
6867
6816
|
className
|
|
6868
6817
|
);
|
|
6869
|
-
const classesTitle = classNames(`${classPrefix$
|
|
6870
|
-
[`${classPrefix$
|
|
6871
|
-
[`${classPrefix$
|
|
6872
|
-
[`${classPrefix$
|
|
6818
|
+
const classesTitle = classNames(`${classPrefix$a}__titles`, {
|
|
6819
|
+
[`${classPrefix$a}__titles--${activeType}`]: activeType,
|
|
6820
|
+
[`${classPrefix$a}__titles--scrollable`]: true,
|
|
6821
|
+
[`${classPrefix$a}__titles--${align}`]: align
|
|
6873
6822
|
});
|
|
6874
6823
|
const tabsActiveStyle = {
|
|
6875
6824
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -6915,7 +6864,7 @@ const Tabs = (props) => {
|
|
|
6915
6864
|
onClick: (e) => {
|
|
6916
6865
|
tabChange(item);
|
|
6917
6866
|
},
|
|
6918
|
-
className: classNames(`${classPrefix$
|
|
6867
|
+
className: classNames(`${classPrefix$a}__titles-item`, {
|
|
6919
6868
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
6920
6869
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
6921
6870
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -6924,16 +6873,16 @@ const Tabs = (props) => {
|
|
|
6924
6873
|
activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6925
6874
|
View,
|
|
6926
6875
|
{
|
|
6927
|
-
className: `${classPrefix$
|
|
6876
|
+
className: `${classPrefix$a}__titles-item__line`,
|
|
6928
6877
|
style: tabsActiveStyle
|
|
6929
6878
|
}
|
|
6930
6879
|
),
|
|
6931
6880
|
activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6932
6881
|
View,
|
|
6933
6882
|
{
|
|
6934
|
-
className: `${classPrefix$
|
|
6883
|
+
className: `${classPrefix$a}__titles-item__smile`,
|
|
6935
6884
|
style: tabsActiveStyle,
|
|
6936
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
6885
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$i, { color: activeColor, width: 40, height: 20 })
|
|
6937
6886
|
}
|
|
6938
6887
|
),
|
|
6939
6888
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -6943,7 +6892,7 @@ const Tabs = (props) => {
|
|
|
6943
6892
|
{
|
|
6944
6893
|
ellipsis: true
|
|
6945
6894
|
},
|
|
6946
|
-
`${classPrefix$
|
|
6895
|
+
`${classPrefix$a}__titles-item__text`
|
|
6947
6896
|
),
|
|
6948
6897
|
children: item.title
|
|
6949
6898
|
}
|
|
@@ -6955,7 +6904,7 @@ const Tabs = (props) => {
|
|
|
6955
6904
|
})
|
|
6956
6905
|
}
|
|
6957
6906
|
),
|
|
6958
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: `${classPrefix$
|
|
6907
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: `${classPrefix$a}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { className: `${classPrefix$a}__content`, style: contentStyle, children: React__default.Children.map(children, (child, idx) => {
|
|
6959
6908
|
if (!React__default.isValidElement(child)) {
|
|
6960
6909
|
return null;
|
|
6961
6910
|
}
|
|
@@ -6973,9 +6922,129 @@ const Tabs = (props) => {
|
|
|
6973
6922
|
}) }) })
|
|
6974
6923
|
] });
|
|
6975
6924
|
};
|
|
6976
|
-
Tabs.defaultProps = defaultProps$
|
|
6925
|
+
Tabs.defaultProps = defaultProps$16;
|
|
6977
6926
|
Tabs.displayName = "NutTabs";
|
|
6978
6927
|
Tabs.TabPane = TabPane;
|
|
6928
|
+
var classnameExports = {};
|
|
6929
|
+
var classname = {
|
|
6930
|
+
get exports() {
|
|
6931
|
+
return classnameExports;
|
|
6932
|
+
},
|
|
6933
|
+
set exports(v) {
|
|
6934
|
+
classnameExports = v;
|
|
6935
|
+
}
|
|
6936
|
+
};
|
|
6937
|
+
var classname_production_min = {};
|
|
6938
|
+
var hasRequiredClassname_production_min;
|
|
6939
|
+
function requireClassname_production_min() {
|
|
6940
|
+
if (hasRequiredClassname_production_min)
|
|
6941
|
+
return classname_production_min;
|
|
6942
|
+
hasRequiredClassname_production_min = 1;
|
|
6943
|
+
function r2(r3) {
|
|
6944
|
+
function t2(t3, i, a2, o) {
|
|
6945
|
+
var f = i ? e + t3 + r3.e + i : e + t3, v = f;
|
|
6946
|
+
if (a2) {
|
|
6947
|
+
var s = " " + v + r3.m;
|
|
6948
|
+
for (var u in a2)
|
|
6949
|
+
if (a2.hasOwnProperty(u)) {
|
|
6950
|
+
var p = a2[u];
|
|
6951
|
+
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
6952
|
+
}
|
|
6953
|
+
}
|
|
6954
|
+
if (void 0 !== o)
|
|
6955
|
+
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
6956
|
+
var l = o[y2];
|
|
6957
|
+
if (l && "string" == typeof l.valueOf())
|
|
6958
|
+
for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
6959
|
+
var h = g[d];
|
|
6960
|
+
h !== f && (v += " " + h);
|
|
6961
|
+
}
|
|
6962
|
+
}
|
|
6963
|
+
return v;
|
|
6964
|
+
}
|
|
6965
|
+
var e = r3.n || "", n = r3.v || r3.m;
|
|
6966
|
+
return function(r4, e2) {
|
|
6967
|
+
return function(n2, i, a2) {
|
|
6968
|
+
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r4, n2, void 0, i) : t2(r4, n2, i, a2) : t2(r4, e2, n2, i);
|
|
6969
|
+
};
|
|
6970
|
+
};
|
|
6971
|
+
}
|
|
6972
|
+
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
6973
|
+
var t = r2({ e: "-", m: "_" });
|
|
6974
|
+
classname_production_min.cn = t, classname_production_min.withNaming = r2;
|
|
6975
|
+
return classname_production_min;
|
|
6976
|
+
}
|
|
6977
|
+
var classname_development = {};
|
|
6978
|
+
var hasRequiredClassname_development;
|
|
6979
|
+
function requireClassname_development() {
|
|
6980
|
+
if (hasRequiredClassname_development)
|
|
6981
|
+
return classname_development;
|
|
6982
|
+
hasRequiredClassname_development = 1;
|
|
6983
|
+
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
6984
|
+
function withNaming(preset) {
|
|
6985
|
+
var nameSpace = preset.n || "";
|
|
6986
|
+
var modValueDelimiter = preset.v || preset.m;
|
|
6987
|
+
function stringify(b2, e, m, mix) {
|
|
6988
|
+
var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
|
|
6989
|
+
var className = entityName;
|
|
6990
|
+
if (m) {
|
|
6991
|
+
var modPrefix = " " + className + preset.m;
|
|
6992
|
+
for (var k in m) {
|
|
6993
|
+
if (m.hasOwnProperty(k)) {
|
|
6994
|
+
var modVal = m[k];
|
|
6995
|
+
if (modVal === true) {
|
|
6996
|
+
className += modPrefix + k;
|
|
6997
|
+
} else if (modVal) {
|
|
6998
|
+
className += modPrefix + k + modValueDelimiter + modVal;
|
|
6999
|
+
}
|
|
7000
|
+
}
|
|
7001
|
+
}
|
|
7002
|
+
}
|
|
7003
|
+
if (mix !== void 0) {
|
|
7004
|
+
mix = Array.isArray(mix) ? mix : [mix];
|
|
7005
|
+
for (var i = 0, len = mix.length; i < len; i++) {
|
|
7006
|
+
var value = mix[i];
|
|
7007
|
+
if (!value || typeof value.valueOf() !== "string")
|
|
7008
|
+
continue;
|
|
7009
|
+
var mixes = value.valueOf().split(" ");
|
|
7010
|
+
for (var j = 0; j < mixes.length; j++) {
|
|
7011
|
+
var val = mixes[j];
|
|
7012
|
+
if (val !== entityName) {
|
|
7013
|
+
className += " " + val;
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
}
|
|
7017
|
+
}
|
|
7018
|
+
return className;
|
|
7019
|
+
}
|
|
7020
|
+
return function cnGenerator(b2, e) {
|
|
7021
|
+
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
7022
|
+
if (typeof elemOrMods === "string") {
|
|
7023
|
+
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
7024
|
+
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
7025
|
+
}
|
|
7026
|
+
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
7027
|
+
}
|
|
7028
|
+
return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
|
|
7029
|
+
};
|
|
7030
|
+
};
|
|
7031
|
+
}
|
|
7032
|
+
var cn2 = withNaming({
|
|
7033
|
+
e: "-",
|
|
7034
|
+
m: "_"
|
|
7035
|
+
});
|
|
7036
|
+
classname_development.cn = cn2;
|
|
7037
|
+
classname_development.withNaming = withNaming;
|
|
7038
|
+
return classname_development;
|
|
7039
|
+
}
|
|
7040
|
+
(function(module) {
|
|
7041
|
+
if (process.env.NODE_ENV === "production") {
|
|
7042
|
+
module.exports = requireClassname_production_min();
|
|
7043
|
+
} else {
|
|
7044
|
+
module.exports = requireClassname_development();
|
|
7045
|
+
}
|
|
7046
|
+
})(classname);
|
|
7047
|
+
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
6979
7048
|
const defaultConfigRef = {
|
|
6980
7049
|
current: {
|
|
6981
7050
|
locale: zhCN
|
|
@@ -6988,7 +7057,7 @@ const ConfigContext = createContext(null);
|
|
|
6988
7057
|
const useConfig = () => {
|
|
6989
7058
|
return useContext(ConfigContext) ?? getDefaultConfig();
|
|
6990
7059
|
};
|
|
6991
|
-
const defaultProps$
|
|
7060
|
+
const defaultProps$15 = {
|
|
6992
7061
|
type: "custom",
|
|
6993
7062
|
existAddress: [],
|
|
6994
7063
|
defaultIcon: null,
|
|
@@ -7010,7 +7079,7 @@ const ExistRender = (props) => {
|
|
|
7010
7079
|
onClose,
|
|
7011
7080
|
onSwitchModule,
|
|
7012
7081
|
...rest
|
|
7013
|
-
} = { ...defaultProps$
|
|
7082
|
+
} = { ...defaultProps$15, ...props };
|
|
7014
7083
|
const b2 = cn("address");
|
|
7015
7084
|
const selectedExist = (item) => {
|
|
7016
7085
|
const copyExistAdd = existAddress;
|
|
@@ -7052,7 +7121,7 @@ const ExistRender = (props) => {
|
|
|
7052
7121
|
isShowCustomAddress && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("choose-other"), onClick: onSwitch, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("choose-other-btn"), children: customAndExistTitle || locale.address.chooseAnotherAddress }) })
|
|
7053
7122
|
] });
|
|
7054
7123
|
};
|
|
7055
|
-
const defaultProps$
|
|
7124
|
+
const defaultProps$14 = {
|
|
7056
7125
|
modelValue: [],
|
|
7057
7126
|
type: "custom",
|
|
7058
7127
|
province: [],
|
|
@@ -7077,7 +7146,7 @@ const CustomRender = (props) => {
|
|
|
7077
7146
|
onClose,
|
|
7078
7147
|
...rest
|
|
7079
7148
|
} = {
|
|
7080
|
-
...defaultProps$
|
|
7149
|
+
...defaultProps$14,
|
|
7081
7150
|
...props
|
|
7082
7151
|
};
|
|
7083
7152
|
const b2 = cn("address");
|
|
@@ -7241,28 +7310,28 @@ const CustomRender = (props) => {
|
|
|
7241
7310
|
nextAreaList(item);
|
|
7242
7311
|
};
|
|
7243
7312
|
useEffect(() => {
|
|
7244
|
-
const { province: province2 } = { ...defaultProps$
|
|
7313
|
+
const { province: province2 } = { ...defaultProps$14, ...props };
|
|
7245
7314
|
setRegionList({
|
|
7246
7315
|
...regionList,
|
|
7247
7316
|
province: isCustom2() ? transformData(province2) : province2
|
|
7248
7317
|
});
|
|
7249
7318
|
}, [province]);
|
|
7250
7319
|
useEffect(() => {
|
|
7251
|
-
const { city: city2 } = { ...defaultProps$
|
|
7320
|
+
const { city: city2 } = { ...defaultProps$14, ...props };
|
|
7252
7321
|
setRegionList({
|
|
7253
7322
|
...regionList,
|
|
7254
7323
|
city: isCustom2() ? transformData(city2) : city2
|
|
7255
7324
|
});
|
|
7256
7325
|
}, [city]);
|
|
7257
7326
|
useEffect(() => {
|
|
7258
|
-
const { country: country2 } = { ...defaultProps$
|
|
7327
|
+
const { country: country2 } = { ...defaultProps$14, ...props };
|
|
7259
7328
|
setRegionList({
|
|
7260
7329
|
...regionList,
|
|
7261
7330
|
country: isCustom2() ? transformData(country2) : country2
|
|
7262
7331
|
});
|
|
7263
7332
|
}, [country]);
|
|
7264
7333
|
useEffect(() => {
|
|
7265
|
-
const { town: town2 } = { ...defaultProps$
|
|
7334
|
+
const { town: town2 } = { ...defaultProps$14, ...props };
|
|
7266
7335
|
setRegionList({
|
|
7267
7336
|
...regionList,
|
|
7268
7337
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -7312,7 +7381,7 @@ const CustomRender = (props) => {
|
|
|
7312
7381
|
},
|
|
7313
7382
|
children: [
|
|
7314
7383
|
selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7315
|
-
a$
|
|
7384
|
+
a$s,
|
|
7316
7385
|
{
|
|
7317
7386
|
className: b2("region-item--icon"),
|
|
7318
7387
|
color: "#FA2C19",
|
|
@@ -7335,7 +7404,7 @@ const CustomRender = (props) => {
|
|
|
7335
7404
|
) })
|
|
7336
7405
|
] });
|
|
7337
7406
|
};
|
|
7338
|
-
const defaultProps$
|
|
7407
|
+
const defaultProps$13 = {
|
|
7339
7408
|
...ComponentDefaults,
|
|
7340
7409
|
modelValue: false,
|
|
7341
7410
|
modelSelect: [],
|
|
@@ -7386,7 +7455,7 @@ const Address = (props) => {
|
|
|
7386
7455
|
className,
|
|
7387
7456
|
...rest
|
|
7388
7457
|
} = {
|
|
7389
|
-
...defaultProps$
|
|
7458
|
+
...defaultProps$13,
|
|
7390
7459
|
...props
|
|
7391
7460
|
};
|
|
7392
7461
|
const b2 = cn("address");
|
|
@@ -7476,9 +7545,9 @@ const Address = (props) => {
|
|
|
7476
7545
|
};
|
|
7477
7546
|
const headerRender = () => {
|
|
7478
7547
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b2("header"), children: [
|
|
7479
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "arrow-back", onClick: onSwitchModule, children: privateType === "custom" && (React__default.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
7548
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "arrow-back", onClick: onSwitchModule, children: privateType === "custom" && (React__default.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$h, { color: "#cccccc" })) }),
|
|
7480
7549
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("header__title"), children: privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo }),
|
|
7481
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: () => handClose(), children: React__default.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
7550
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: () => handClose(), children: React__default.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$p, { size: 18, color: "#ccc" }) })
|
|
7482
7551
|
] });
|
|
7483
7552
|
};
|
|
7484
7553
|
useEffect(() => {
|
|
@@ -7530,8 +7599,8 @@ const Address = (props) => {
|
|
|
7530
7599
|
{
|
|
7531
7600
|
type: privateType,
|
|
7532
7601
|
existAddress,
|
|
7533
|
-
selectedIcon: React__default.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
7534
|
-
defaultIcon: React__default.isValidElement(defaultIcon) ? defaultIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$
|
|
7602
|
+
selectedIcon: React__default.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$s, { color: "#FA2C19" }),
|
|
7603
|
+
defaultIcon: React__default.isValidElement(defaultIcon) ? defaultIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$e, {}),
|
|
7535
7604
|
isShowCustomAddress,
|
|
7536
7605
|
customAndExistTitle: customAndExistTitle || locale.address.chooseAnotherAddress,
|
|
7537
7606
|
onSelected: selectedExist,
|
|
@@ -7544,7 +7613,7 @@ const Address = (props) => {
|
|
|
7544
7613
|
}
|
|
7545
7614
|
) });
|
|
7546
7615
|
};
|
|
7547
|
-
Address.defaultProps = defaultProps$
|
|
7616
|
+
Address.defaultProps = defaultProps$13;
|
|
7548
7617
|
Address.displayName = "NutAddress";
|
|
7549
7618
|
const Utils = {
|
|
7550
7619
|
/**
|
|
@@ -7677,7 +7746,7 @@ function requestAniFrame() {
|
|
|
7677
7746
|
}
|
|
7678
7747
|
}
|
|
7679
7748
|
const requestAniFrame$1 = requestAniFrame();
|
|
7680
|
-
const defaultProps$
|
|
7749
|
+
const defaultProps$12 = {
|
|
7681
7750
|
type: "one",
|
|
7682
7751
|
isAutoBackFill: false,
|
|
7683
7752
|
poppable: true,
|
|
@@ -7729,7 +7798,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
7729
7798
|
onUpdate,
|
|
7730
7799
|
onSelected,
|
|
7731
7800
|
onYearMonthChange
|
|
7732
|
-
} = { ...defaultProps$
|
|
7801
|
+
} = { ...defaultProps$12, ...props };
|
|
7733
7802
|
const weeks = locale.calendaritem.weekdays;
|
|
7734
7803
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
7735
7804
|
const [monthsData, setMonthsData] = useState([]);
|
|
@@ -8334,9 +8403,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
8334
8403
|
poppable && !isAutoBackFill ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-calendar-footer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "calendar-confirm-btn", onClick: confirm, children: confirmText || locale.confirm }) }) : ""
|
|
8335
8404
|
] }) });
|
|
8336
8405
|
});
|
|
8337
|
-
CalendarItem.defaultProps = defaultProps$
|
|
8406
|
+
CalendarItem.defaultProps = defaultProps$12;
|
|
8338
8407
|
CalendarItem.displayName = "NutCalendarItem";
|
|
8339
|
-
const defaultProps$
|
|
8408
|
+
const defaultProps$11 = {
|
|
8340
8409
|
type: "one",
|
|
8341
8410
|
isAutoBackFill: false,
|
|
8342
8411
|
poppable: true,
|
|
@@ -8392,7 +8461,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
8392
8461
|
onChoose,
|
|
8393
8462
|
onSelected,
|
|
8394
8463
|
onYearMonthChange
|
|
8395
|
-
} = { ...defaultProps$
|
|
8464
|
+
} = { ...defaultProps$11, ...props };
|
|
8396
8465
|
const calendarRef = useRef(null);
|
|
8397
8466
|
const close = () => {
|
|
8398
8467
|
onClose && onClose();
|
|
@@ -8462,9 +8531,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
8462
8531
|
}
|
|
8463
8532
|
) : renderItem() });
|
|
8464
8533
|
});
|
|
8465
|
-
Calendar.defaultProps = defaultProps$
|
|
8534
|
+
Calendar.defaultProps = defaultProps$11;
|
|
8466
8535
|
Calendar.displayName = "NutCalendar";
|
|
8467
|
-
const defaultProps$
|
|
8536
|
+
const defaultProps$10 = {
|
|
8468
8537
|
data: {
|
|
8469
8538
|
text: "",
|
|
8470
8539
|
value: "",
|
|
@@ -8481,7 +8550,7 @@ const defaultProps$11 = {
|
|
|
8481
8550
|
};
|
|
8482
8551
|
const InternalCascaderItem = (props, ref) => {
|
|
8483
8552
|
const { data, checked, checkedIcon, chooseItem, activeColor } = {
|
|
8484
|
-
...defaultProps$
|
|
8553
|
+
...defaultProps$10,
|
|
8485
8554
|
...props
|
|
8486
8555
|
};
|
|
8487
8556
|
const b2 = cn("cascader-item");
|
|
@@ -8500,7 +8569,7 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
8500
8569
|
if (isValidElement(checkedIcon)) {
|
|
8501
8570
|
return checkedIcon;
|
|
8502
8571
|
}
|
|
8503
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
8572
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(a$q, { className: `${checked ? b2("icon-check") : ""}` });
|
|
8504
8573
|
}
|
|
8505
8574
|
return null;
|
|
8506
8575
|
};
|
|
@@ -8514,13 +8583,13 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
8514
8583
|
},
|
|
8515
8584
|
children: [
|
|
8516
8585
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesTitle, children: data.text }),
|
|
8517
|
-
data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(r$
|
|
8586
|
+
data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
|
|
8518
8587
|
]
|
|
8519
8588
|
}
|
|
8520
8589
|
);
|
|
8521
8590
|
};
|
|
8522
8591
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
8523
|
-
CascaderItem.defaultProps = defaultProps$
|
|
8592
|
+
CascaderItem.defaultProps = defaultProps$10;
|
|
8524
8593
|
CascaderItem.displayName = "NutCascaderItem";
|
|
8525
8594
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
8526
8595
|
const {
|
|
@@ -8658,7 +8727,7 @@ class Tree {
|
|
|
8658
8727
|
}
|
|
8659
8728
|
}
|
|
8660
8729
|
const Tree$1 = Tree;
|
|
8661
|
-
const defaultProps
|
|
8730
|
+
const defaultProps$$ = {
|
|
8662
8731
|
className: "",
|
|
8663
8732
|
style: {},
|
|
8664
8733
|
activeColor: "",
|
|
@@ -8709,7 +8778,7 @@ const InternalCascader = (props, ref) => {
|
|
|
8709
8778
|
onClose,
|
|
8710
8779
|
onChange,
|
|
8711
8780
|
onPathChange
|
|
8712
|
-
} = { ...defaultProps
|
|
8781
|
+
} = { ...defaultProps$$, ...props };
|
|
8713
8782
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
8714
8783
|
const [optionsData, setOptionsData] = useState([]);
|
|
8715
8784
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -8983,74 +9052,76 @@ const InternalCascader = (props, ref) => {
|
|
|
8983
9052
|
) : renderItem() });
|
|
8984
9053
|
};
|
|
8985
9054
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
8986
|
-
Cascader.defaultProps = defaultProps
|
|
9055
|
+
Cascader.defaultProps = defaultProps$$;
|
|
8987
9056
|
Cascader.displayName = "NutCascader";
|
|
8988
9057
|
const CheckboxGroupContext = createContext(null);
|
|
8989
9058
|
const Context = CheckboxGroupContext;
|
|
8990
|
-
const defaultProps
|
|
8991
|
-
disabled: false,
|
|
8992
|
-
checkedValue: [],
|
|
9059
|
+
const defaultProps$_ = {
|
|
8993
9060
|
max: void 0,
|
|
8994
|
-
|
|
9061
|
+
labelPosition: "right",
|
|
8995
9062
|
direction: "vertical",
|
|
8996
9063
|
onChange: (value) => {
|
|
8997
9064
|
},
|
|
8998
9065
|
options: []
|
|
8999
9066
|
};
|
|
9067
|
+
const classPrefix$9 = "nut-checkboxgroup";
|
|
9000
9068
|
const CheckboxGroup = React__default.forwardRef(
|
|
9001
9069
|
(props, ref) => {
|
|
9002
|
-
const { children } = { ...defaultProps
|
|
9003
|
-
const b2 = cn("checkboxgroup");
|
|
9070
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
9004
9071
|
const {
|
|
9005
9072
|
className,
|
|
9006
9073
|
disabled,
|
|
9007
9074
|
onChange,
|
|
9008
|
-
|
|
9075
|
+
value,
|
|
9076
|
+
defaultValue,
|
|
9009
9077
|
max,
|
|
9010
|
-
|
|
9078
|
+
labelPosition,
|
|
9011
9079
|
direction,
|
|
9012
9080
|
options,
|
|
9013
9081
|
...rest
|
|
9014
9082
|
} = props;
|
|
9015
9083
|
useImperativeHandle(ref, () => ({
|
|
9016
|
-
|
|
9084
|
+
toggle(state) {
|
|
9017
9085
|
if (state === false) {
|
|
9018
|
-
|
|
9086
|
+
setValue([]);
|
|
9019
9087
|
} else {
|
|
9020
9088
|
const childrenLabel = [];
|
|
9021
9089
|
React__default.Children.map(children, (child) => {
|
|
9022
9090
|
const childProps = child.props;
|
|
9023
|
-
childrenLabel.push(childProps.
|
|
9091
|
+
childrenLabel.push(childProps.value);
|
|
9024
9092
|
});
|
|
9025
|
-
|
|
9093
|
+
setValue(childrenLabel);
|
|
9026
9094
|
}
|
|
9027
9095
|
},
|
|
9028
|
-
|
|
9096
|
+
reverse() {
|
|
9029
9097
|
const childrenLabel = [];
|
|
9030
9098
|
React__default.Children.map(children, (child) => {
|
|
9031
9099
|
const childProps = child.props;
|
|
9032
|
-
childrenLabel.push(childProps.
|
|
9100
|
+
childrenLabel.push(childProps.value);
|
|
9033
9101
|
});
|
|
9034
9102
|
const reverse = childrenLabel.filter(
|
|
9035
|
-
(c) => (
|
|
9103
|
+
(c) => (_value == null ? void 0 : _value.findIndex((v) => v === c)) === -1
|
|
9036
9104
|
);
|
|
9037
|
-
|
|
9105
|
+
setValue(reverse);
|
|
9038
9106
|
}
|
|
9039
9107
|
}));
|
|
9040
|
-
const [
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9108
|
+
const [_value, setValue] = usePropsValue({
|
|
9109
|
+
value: props.value,
|
|
9110
|
+
defaultValue: props.defaultValue,
|
|
9111
|
+
finalValue: [],
|
|
9112
|
+
onChange
|
|
9113
|
+
});
|
|
9044
9114
|
const renderOptions = useCallback(() => {
|
|
9045
|
-
return options == null ? void 0 : options.map(({ label, value, disabled: disabled2, onChange: onChange2, ...rest2 }) => {
|
|
9115
|
+
return options == null ? void 0 : options.map(({ label, value: value2, disabled: disabled2, onChange: onChange2, ...rest2 }) => {
|
|
9046
9116
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9047
9117
|
Checkbox,
|
|
9048
9118
|
{
|
|
9049
|
-
|
|
9050
|
-
|
|
9119
|
+
label,
|
|
9120
|
+
disabled: disabled2,
|
|
9121
|
+
value: value2,
|
|
9051
9122
|
...rest2
|
|
9052
9123
|
},
|
|
9053
|
-
|
|
9124
|
+
value2 == null ? void 0 : value2.toString()
|
|
9054
9125
|
);
|
|
9055
9126
|
});
|
|
9056
9127
|
}, [options, max]);
|
|
@@ -9058,25 +9129,26 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
9058
9129
|
Context.Provider,
|
|
9059
9130
|
{
|
|
9060
9131
|
value: {
|
|
9061
|
-
|
|
9132
|
+
labelPosition: labelPosition || "right",
|
|
9062
9133
|
disabled,
|
|
9063
9134
|
max,
|
|
9064
|
-
|
|
9065
|
-
check: (
|
|
9066
|
-
const combined = [...
|
|
9067
|
-
|
|
9068
|
-
onChange && onChange(combined);
|
|
9135
|
+
value: _value,
|
|
9136
|
+
check: (value2) => {
|
|
9137
|
+
const combined = [..._value, value2];
|
|
9138
|
+
setValue(combined);
|
|
9069
9139
|
},
|
|
9070
|
-
uncheck: (
|
|
9071
|
-
const reduced =
|
|
9072
|
-
|
|
9073
|
-
onChange && onChange(reduced);
|
|
9140
|
+
uncheck: (value2) => {
|
|
9141
|
+
const reduced = _value.filter((item) => item !== value2);
|
|
9142
|
+
setValue(reduced);
|
|
9074
9143
|
}
|
|
9075
9144
|
},
|
|
9076
9145
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9077
9146
|
"div",
|
|
9078
9147
|
{
|
|
9079
|
-
className:
|
|
9148
|
+
className: classNames(classPrefix$9, {
|
|
9149
|
+
[`nut-checkboxgroup--${props.direction}`]: props.direction,
|
|
9150
|
+
className
|
|
9151
|
+
}),
|
|
9080
9152
|
...rest,
|
|
9081
9153
|
children: (options == null ? void 0 : options.length) ? renderOptions() : children
|
|
9082
9154
|
}
|
|
@@ -9085,107 +9157,117 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
9085
9157
|
);
|
|
9086
9158
|
}
|
|
9087
9159
|
);
|
|
9088
|
-
CheckboxGroup.defaultProps = defaultProps
|
|
9160
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
9089
9161
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
9090
|
-
const defaultProps$
|
|
9162
|
+
const defaultProps$Z = {
|
|
9091
9163
|
...ComponentDefaults,
|
|
9092
|
-
checked: false,
|
|
9093
9164
|
disabled: false,
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
iconFontClassName: "nutui-iconfont",
|
|
9100
|
-
indeterminateIcon: "check-disabled",
|
|
9101
|
-
onChange: (state, label) => {
|
|
9165
|
+
labelPosition: "right",
|
|
9166
|
+
icon: null,
|
|
9167
|
+
activeIcon: null,
|
|
9168
|
+
indeterminateIcon: null,
|
|
9169
|
+
onChange: (value) => {
|
|
9102
9170
|
}
|
|
9103
9171
|
};
|
|
9172
|
+
const classPrefix$8 = "nut-checkbox";
|
|
9104
9173
|
const Checkbox = (props) => {
|
|
9105
9174
|
const { children } = {
|
|
9106
|
-
...defaultProps$
|
|
9175
|
+
...defaultProps$Z,
|
|
9107
9176
|
...props
|
|
9108
9177
|
};
|
|
9109
|
-
const b2 = cn("checkbox");
|
|
9110
9178
|
const {
|
|
9111
9179
|
icon,
|
|
9112
|
-
iconSize,
|
|
9113
9180
|
label,
|
|
9114
9181
|
className,
|
|
9115
|
-
|
|
9182
|
+
activeIcon,
|
|
9116
9183
|
checked,
|
|
9184
|
+
value,
|
|
9185
|
+
defaultChecked,
|
|
9117
9186
|
disabled,
|
|
9118
9187
|
onChange,
|
|
9119
9188
|
indeterminate,
|
|
9120
|
-
iconClassPrefix,
|
|
9121
|
-
iconFontClassName,
|
|
9122
9189
|
indeterminateIcon,
|
|
9123
9190
|
...others
|
|
9124
9191
|
} = props;
|
|
9125
|
-
let {
|
|
9192
|
+
let { labelPosition, ...rest } = others;
|
|
9126
9193
|
const ctx2 = useContext(Context);
|
|
9127
|
-
let [innerChecked,
|
|
9194
|
+
let [innerChecked, setChecked] = usePropsValue({
|
|
9195
|
+
value: props.checked,
|
|
9196
|
+
defaultValue: props.defaultChecked,
|
|
9197
|
+
finalValue: defaultChecked,
|
|
9198
|
+
onChange
|
|
9199
|
+
});
|
|
9128
9200
|
let [innerDisabled, setDisabled] = useState(disabled);
|
|
9129
|
-
const [
|
|
9201
|
+
const [innerIndeterminate, setIndeterminate] = useState(indeterminate);
|
|
9130
9202
|
useEffect(() => {
|
|
9131
|
-
!ctx2 && setInnerChecked(checked);
|
|
9132
9203
|
setDisabled(disabled);
|
|
9204
|
+
}, [disabled]);
|
|
9205
|
+
useEffect(() => {
|
|
9133
9206
|
setIndeterminate(indeterminate);
|
|
9134
|
-
}, [
|
|
9207
|
+
}, [indeterminate]);
|
|
9135
9208
|
if (ctx2) {
|
|
9136
|
-
if (ctx2.
|
|
9137
|
-
|
|
9209
|
+
if (ctx2.labelPosition !== void 0) {
|
|
9210
|
+
labelPosition = ctx2.labelPosition;
|
|
9138
9211
|
}
|
|
9139
|
-
innerDisabled = ctx2.disabled;
|
|
9140
|
-
innerChecked = ctx2.
|
|
9141
|
-
|
|
9212
|
+
innerDisabled = ctx2.disabled !== void 0 ? ctx2.disabled : innerDisabled;
|
|
9213
|
+
innerChecked = ctx2.value.includes(value);
|
|
9214
|
+
setChecked = (checked2) => {
|
|
9142
9215
|
if (ctx2.disabled)
|
|
9143
9216
|
return;
|
|
9144
9217
|
if (checked2)
|
|
9145
|
-
ctx2.check(
|
|
9218
|
+
ctx2.check(value);
|
|
9146
9219
|
if (!checked2)
|
|
9147
|
-
ctx2.uncheck(
|
|
9220
|
+
ctx2.uncheck(value);
|
|
9148
9221
|
};
|
|
9149
9222
|
}
|
|
9150
9223
|
const renderIcon = () => {
|
|
9151
9224
|
if (!innerChecked) {
|
|
9152
|
-
return React__default.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
9225
|
+
return React__default.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$t, { className: color() });
|
|
9153
9226
|
}
|
|
9154
|
-
if (
|
|
9155
|
-
return React__default.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$
|
|
9227
|
+
if (innerIndeterminate) {
|
|
9228
|
+
return React__default.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$u, { className: color() });
|
|
9156
9229
|
}
|
|
9157
|
-
return React__default.isValidElement(
|
|
9230
|
+
return React__default.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$r, { className: color() });
|
|
9158
9231
|
};
|
|
9159
9232
|
const color = () => {
|
|
9160
9233
|
if (innerDisabled) {
|
|
9161
|
-
return
|
|
9234
|
+
return `${classPrefix$8}__icon--disable`;
|
|
9162
9235
|
}
|
|
9163
9236
|
if (innerChecked) {
|
|
9164
|
-
if (
|
|
9165
|
-
return
|
|
9237
|
+
if (innerIndeterminate) {
|
|
9238
|
+
return `${classPrefix$8}__icon--indeterminate`;
|
|
9166
9239
|
}
|
|
9167
|
-
return
|
|
9240
|
+
return `${classPrefix$8}__icon`;
|
|
9168
9241
|
}
|
|
9169
|
-
return
|
|
9242
|
+
return `${classPrefix$8}__icon--unchecked`;
|
|
9170
9243
|
};
|
|
9171
9244
|
const renderLabel = () => {
|
|
9172
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9245
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9246
|
+
"span",
|
|
9247
|
+
{
|
|
9248
|
+
className: classNames(`${classPrefix$8}__label `, {
|
|
9249
|
+
[`${classPrefix$8}__label--disabled`]: innerDisabled
|
|
9250
|
+
}),
|
|
9251
|
+
children: children || label
|
|
9252
|
+
}
|
|
9253
|
+
);
|
|
9173
9254
|
};
|
|
9174
9255
|
const handleClick = () => {
|
|
9175
9256
|
if (disabled)
|
|
9176
9257
|
return;
|
|
9177
9258
|
const latestChecked = !innerChecked;
|
|
9178
9259
|
if (ctx2 && ctx2.max !== void 0) {
|
|
9179
|
-
if (latestChecked && ctx2.
|
|
9260
|
+
if (latestChecked && ctx2.value.length >= ctx2.max)
|
|
9180
9261
|
return;
|
|
9181
9262
|
}
|
|
9182
|
-
|
|
9183
|
-
setInnerChecked(latestChecked);
|
|
9263
|
+
setChecked(latestChecked);
|
|
9184
9264
|
};
|
|
9185
9265
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
9186
9266
|
"div",
|
|
9187
9267
|
{
|
|
9188
|
-
className:
|
|
9268
|
+
className: classNames(classPrefix$8, className, {
|
|
9269
|
+
[`${classPrefix$8}--reverse`]: labelPosition === "left"
|
|
9270
|
+
}),
|
|
9189
9271
|
...rest,
|
|
9190
9272
|
onClick: handleClick,
|
|
9191
9273
|
children: [
|
|
@@ -9195,7 +9277,7 @@ const Checkbox = (props) => {
|
|
|
9195
9277
|
}
|
|
9196
9278
|
);
|
|
9197
9279
|
};
|
|
9198
|
-
Checkbox.defaultProps = defaultProps$
|
|
9280
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
9199
9281
|
Checkbox.displayName = "NutCheckBox";
|
|
9200
9282
|
Checkbox.Group = CheckboxGroup;
|
|
9201
9283
|
const MIN_DISTANCE = 10;
|
|
@@ -9744,7 +9826,7 @@ const InternalPicker = (props, ref) => {
|
|
|
9744
9826
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
9745
9827
|
const Picker$1 = Picker;
|
|
9746
9828
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
9747
|
-
const defaultProps$
|
|
9829
|
+
const defaultProps$Y = {
|
|
9748
9830
|
modelValue: null,
|
|
9749
9831
|
visible: false,
|
|
9750
9832
|
title: "",
|
|
@@ -9775,7 +9857,7 @@ const DatePicker = (props) => {
|
|
|
9775
9857
|
style,
|
|
9776
9858
|
...rest
|
|
9777
9859
|
} = {
|
|
9778
|
-
...defaultProps$
|
|
9860
|
+
...defaultProps$Y,
|
|
9779
9861
|
...props
|
|
9780
9862
|
};
|
|
9781
9863
|
const { locale } = useConfig$1();
|
|
@@ -10053,10 +10135,10 @@ const DatePicker = (props) => {
|
|
|
10053
10135
|
}
|
|
10054
10136
|
);
|
|
10055
10137
|
};
|
|
10056
|
-
DatePicker.defaultProps = defaultProps$
|
|
10138
|
+
DatePicker.defaultProps = defaultProps$Y;
|
|
10057
10139
|
DatePicker.displayName = "NutDatePicker";
|
|
10058
10140
|
const FormItemContext = createContext({});
|
|
10059
|
-
const defaultProps$
|
|
10141
|
+
const defaultProps$X = {
|
|
10060
10142
|
...ComponentDefaults,
|
|
10061
10143
|
name: "",
|
|
10062
10144
|
label: "",
|
|
@@ -10105,7 +10187,7 @@ class FormItem extends React__default.Component {
|
|
|
10105
10187
|
showErrorLine,
|
|
10106
10188
|
showErrorMessage
|
|
10107
10189
|
} = {
|
|
10108
|
-
...defaultProps$
|
|
10190
|
+
...defaultProps$X,
|
|
10109
10191
|
...this.props
|
|
10110
10192
|
};
|
|
10111
10193
|
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -10166,7 +10248,7 @@ class FormItem extends React__default.Component {
|
|
|
10166
10248
|
return this.renderLayout(returnChildNode);
|
|
10167
10249
|
}
|
|
10168
10250
|
}
|
|
10169
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
10251
|
+
__publicField(FormItem, "defaultProps", defaultProps$X);
|
|
10170
10252
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
10171
10253
|
class FormStore {
|
|
10172
10254
|
constructor() {
|
|
@@ -10290,7 +10372,7 @@ const useForm = (form) => {
|
|
|
10290
10372
|
}
|
|
10291
10373
|
return [formRef.current];
|
|
10292
10374
|
};
|
|
10293
|
-
const defaultProps$
|
|
10375
|
+
const defaultProps$W = {
|
|
10294
10376
|
...ComponentDefaults,
|
|
10295
10377
|
className: "",
|
|
10296
10378
|
style: void 0,
|
|
@@ -10317,7 +10399,7 @@ const Form = (props) => {
|
|
|
10317
10399
|
starPositon,
|
|
10318
10400
|
...rest
|
|
10319
10401
|
} = {
|
|
10320
|
-
...defaultProps$
|
|
10402
|
+
...defaultProps$W,
|
|
10321
10403
|
...props
|
|
10322
10404
|
};
|
|
10323
10405
|
console.log("46 dddd");
|
|
@@ -10341,7 +10423,7 @@ const Form = (props) => {
|
|
|
10341
10423
|
}
|
|
10342
10424
|
);
|
|
10343
10425
|
};
|
|
10344
|
-
Form.defaultProps = defaultProps$
|
|
10426
|
+
Form.defaultProps = defaultProps$W;
|
|
10345
10427
|
Form.displayName = "NutForm";
|
|
10346
10428
|
Form.Item = FormItem;
|
|
10347
10429
|
function trimExtraChar(value, char, regExp) {
|
|
@@ -10368,356 +10450,196 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
10368
10450
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
10369
10451
|
return value.replace(regExp, "");
|
|
10370
10452
|
}
|
|
10371
|
-
const defaultProps$
|
|
10453
|
+
const defaultProps$V = {
|
|
10372
10454
|
...ComponentDefaults,
|
|
10373
10455
|
type: "text",
|
|
10374
10456
|
name: "",
|
|
10375
|
-
defaultValue: "",
|
|
10376
10457
|
placeholder: "",
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
labelWidth: "80",
|
|
10380
|
-
labelAlign: "left",
|
|
10381
|
-
colon: false,
|
|
10382
|
-
inputAlign: "left",
|
|
10383
|
-
center: false,
|
|
10458
|
+
confirmType: "done",
|
|
10459
|
+
align: "left",
|
|
10384
10460
|
required: false,
|
|
10385
10461
|
disabled: false,
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
maxlength: "9999",
|
|
10389
|
-
leftIcon: null,
|
|
10390
|
-
rightIcon: null,
|
|
10462
|
+
readOnly: false,
|
|
10463
|
+
maxLength: 9999,
|
|
10391
10464
|
clearable: false,
|
|
10392
10465
|
clearIcon: null,
|
|
10393
|
-
clearSize: "14",
|
|
10394
|
-
border: true,
|
|
10395
10466
|
formatTrigger: "onChange",
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
label,
|
|
10414
|
-
labelClass,
|
|
10415
|
-
labelWidth,
|
|
10416
|
-
labelAlign,
|
|
10417
|
-
colon,
|
|
10418
|
-
inputAlign,
|
|
10419
|
-
center,
|
|
10420
|
-
required,
|
|
10421
|
-
disabled,
|
|
10422
|
-
readonly,
|
|
10423
|
-
error,
|
|
10424
|
-
maxlength,
|
|
10425
|
-
leftIcon,
|
|
10426
|
-
rightIcon,
|
|
10427
|
-
clearable,
|
|
10428
|
-
clearIcon,
|
|
10429
|
-
clearSize,
|
|
10430
|
-
border,
|
|
10431
|
-
formatTrigger,
|
|
10432
|
-
rules,
|
|
10433
|
-
errorMessage,
|
|
10434
|
-
errorMessageAlign,
|
|
10435
|
-
showWordLimit,
|
|
10436
|
-
autofocus,
|
|
10437
|
-
style,
|
|
10438
|
-
className,
|
|
10439
|
-
rows,
|
|
10440
|
-
slotButton,
|
|
10441
|
-
slotInput,
|
|
10442
|
-
onChange,
|
|
10443
|
-
onBlur,
|
|
10444
|
-
onFocus,
|
|
10445
|
-
onClear,
|
|
10446
|
-
formatter,
|
|
10447
|
-
keypress,
|
|
10448
|
-
onClickInput,
|
|
10449
|
-
onClickLeftIcon,
|
|
10450
|
-
onClickRightIcon,
|
|
10451
|
-
onClick,
|
|
10452
|
-
...rest
|
|
10453
|
-
} = {
|
|
10454
|
-
...defaultProps$W,
|
|
10455
|
-
...props
|
|
10456
|
-
};
|
|
10457
|
-
const inputPlaceholder = placeholder || locale.placeholder;
|
|
10458
|
-
const [inputValue, SetInputValue] = useState("");
|
|
10459
|
-
const [active, SetActive] = useState(false);
|
|
10460
|
-
const [classes, setClasses] = useState("");
|
|
10461
|
-
const getModelValue = () => String(inputValue ?? "");
|
|
10462
|
-
const inputRef = useRef(null);
|
|
10463
|
-
useEffect(() => {
|
|
10464
|
-
setClasses(inputClass);
|
|
10465
|
-
SetInputValue(defaultValue);
|
|
10466
|
-
}, [defaultValue]);
|
|
10467
|
-
useEffect(() => {
|
|
10468
|
-
if (inputValue) {
|
|
10469
|
-
updateValue(getModelValue());
|
|
10470
|
-
resetValidation();
|
|
10471
|
-
}
|
|
10472
|
-
}, [inputValue]);
|
|
10473
|
-
useImperativeHandle(ref, () => {
|
|
10474
|
-
return inputRef.current;
|
|
10475
|
-
});
|
|
10476
|
-
const inputClass = useCallback(() => {
|
|
10477
|
-
const prefixCls2 = "nut-input";
|
|
10478
|
-
return [
|
|
10479
|
-
prefixCls2,
|
|
10480
|
-
`${center ? "center" : ""}`,
|
|
10481
|
-
`${disabled ? `${prefixCls2}-disabled` : ""}`,
|
|
10482
|
-
`${required ? `${prefixCls2}-required` : ""}`,
|
|
10483
|
-
`${error ? `${prefixCls2}-error` : ""}`,
|
|
10484
|
-
`${border ? `${prefixCls2}-border` : ""}`,
|
|
10485
|
-
`${slotButton || rightIcon ? `${prefixCls2}-right-mark` : ""}`
|
|
10486
|
-
].filter(Boolean).join(" ");
|
|
10487
|
-
}, [disabled, required, error, border, slotButton, rightIcon, center]);
|
|
10488
|
-
useEffect(() => {
|
|
10489
|
-
setClasses(inputClass);
|
|
10490
|
-
}, [disabled, required, error, border, slotButton, rightIcon, center]);
|
|
10491
|
-
const updateValue = (value, trigger = "onChange") => {
|
|
10492
|
-
var _a;
|
|
10493
|
-
let val = value;
|
|
10494
|
-
if (type === "digit" || type === "tel") {
|
|
10495
|
-
val = formatNumber(val, false, false);
|
|
10496
|
-
}
|
|
10497
|
-
if (type === "number") {
|
|
10498
|
-
val = formatNumber(val, true, true);
|
|
10499
|
-
}
|
|
10500
|
-
if (type === "tel" && !formatter) {
|
|
10501
|
-
const regTel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
|
10502
|
-
const regNumber = /[^-0-9]/g;
|
|
10503
|
-
val = !regTel.test(val) && val.length > 11 ? val.substring(0, 11) : val.replace(regNumber, "");
|
|
10504
|
-
}
|
|
10505
|
-
if (formatter && trigger === formatTrigger) {
|
|
10506
|
-
val = formatter(val);
|
|
10507
|
-
}
|
|
10508
|
-
if (((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.value) !== val) {
|
|
10509
|
-
inputRef.current.value = val;
|
|
10510
|
-
}
|
|
10511
|
-
SetInputValue(val);
|
|
10512
|
-
};
|
|
10513
|
-
const handleFocus = (event) => {
|
|
10514
|
-
const val = event.target.value;
|
|
10515
|
-
SetActive(true);
|
|
10516
|
-
onFocus && onFocus(val, event);
|
|
10517
|
-
};
|
|
10518
|
-
const handleInput = (event) => {
|
|
10519
|
-
let val = event.target.value;
|
|
10520
|
-
if (maxlength && val.length > Number(maxlength)) {
|
|
10521
|
-
val = val.slice(0, Number(maxlength));
|
|
10522
|
-
}
|
|
10523
|
-
updateValue(val, "onChange");
|
|
10524
|
-
onChange && onChange(val, event);
|
|
10525
|
-
};
|
|
10526
|
-
const handleBlur = (event) => {
|
|
10527
|
-
setTimeout(() => {
|
|
10528
|
-
SetActive(false);
|
|
10529
|
-
}, 200);
|
|
10530
|
-
let val = event.target.value;
|
|
10531
|
-
if (maxlength && val.length > Number(maxlength)) {
|
|
10532
|
-
val = val.slice(0, Number(maxlength));
|
|
10533
|
-
}
|
|
10534
|
-
updateValue(val, "onBlur");
|
|
10535
|
-
onBlur && onBlur(val, event);
|
|
10536
|
-
};
|
|
10537
|
-
const handleClickInput = (event) => {
|
|
10538
|
-
onClickInput && onClickInput(event);
|
|
10539
|
-
};
|
|
10540
|
-
const handleClickLeftIcon = (event) => {
|
|
10541
|
-
onClickLeftIcon && onClickLeftIcon(event);
|
|
10542
|
-
};
|
|
10543
|
-
const handleClickRightIcon = (event) => {
|
|
10544
|
-
onClickRightIcon && onClickRightIcon(event);
|
|
10545
|
-
};
|
|
10546
|
-
const resetValidation = () => {
|
|
10547
|
-
};
|
|
10548
|
-
const inputType = (type2) => {
|
|
10549
|
-
if (type2 === "number") {
|
|
10550
|
-
return "text";
|
|
10551
|
-
}
|
|
10552
|
-
if (type2 === "digit") {
|
|
10553
|
-
return "tel";
|
|
10554
|
-
}
|
|
10555
|
-
return type2;
|
|
10556
|
-
};
|
|
10557
|
-
const handleClear = (event) => {
|
|
10558
|
-
updateValue("");
|
|
10559
|
-
onClear && onClear("", event);
|
|
10560
|
-
};
|
|
10561
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10562
|
-
"div",
|
|
10563
|
-
{
|
|
10564
|
-
className: `${classes} ${className || ""}`,
|
|
10467
|
+
autoFocus: false
|
|
10468
|
+
};
|
|
10469
|
+
const Input = forwardRef(
|
|
10470
|
+
(props, ref) => {
|
|
10471
|
+
const { locale } = useConfig$1();
|
|
10472
|
+
const {
|
|
10473
|
+
type,
|
|
10474
|
+
name,
|
|
10475
|
+
placeholder,
|
|
10476
|
+
align,
|
|
10477
|
+
disabled,
|
|
10478
|
+
readOnly,
|
|
10479
|
+
maxLength,
|
|
10480
|
+
clearable,
|
|
10481
|
+
clearIcon,
|
|
10482
|
+
formatTrigger,
|
|
10483
|
+
autoFocus,
|
|
10565
10484
|
style,
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10485
|
+
className,
|
|
10486
|
+
onChange,
|
|
10487
|
+
onFocus,
|
|
10488
|
+
onBlur,
|
|
10489
|
+
onClear,
|
|
10490
|
+
formatter,
|
|
10491
|
+
onClick,
|
|
10492
|
+
confirmType,
|
|
10493
|
+
defaultValue,
|
|
10494
|
+
value: _value,
|
|
10495
|
+
...rest
|
|
10496
|
+
} = {
|
|
10497
|
+
...defaultProps$V,
|
|
10498
|
+
...props
|
|
10499
|
+
};
|
|
10500
|
+
const [value, setValue] = usePropsValue({
|
|
10501
|
+
value: props.value,
|
|
10502
|
+
defaultValue: props.defaultValue,
|
|
10503
|
+
finalValue: "",
|
|
10504
|
+
onChange
|
|
10505
|
+
});
|
|
10506
|
+
const inputRef = useRef(null);
|
|
10507
|
+
const [active, setActive] = useState(false);
|
|
10508
|
+
useImperativeHandle(ref, () => {
|
|
10509
|
+
return {
|
|
10510
|
+
clear: () => {
|
|
10511
|
+
setValue("");
|
|
10512
|
+
},
|
|
10513
|
+
focus: () => {
|
|
10514
|
+
var _a;
|
|
10515
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
10516
|
+
},
|
|
10517
|
+
blur: () => {
|
|
10518
|
+
var _a;
|
|
10519
|
+
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
10520
|
+
},
|
|
10521
|
+
get nativeElement() {
|
|
10522
|
+
return inputRef.current;
|
|
10523
|
+
}
|
|
10524
|
+
};
|
|
10525
|
+
});
|
|
10526
|
+
const inputClass = useCallback(() => {
|
|
10527
|
+
const classPrefix2 = "nut-input";
|
|
10528
|
+
return [classPrefix2, `${disabled ? `${classPrefix2}-disabled` : ""}`].filter(Boolean).join(" ");
|
|
10529
|
+
}, [disabled]);
|
|
10530
|
+
const [, updateState] = React__default.useState();
|
|
10531
|
+
const forceUpdate = React__default.useCallback(() => updateState({}), []);
|
|
10532
|
+
const updateValue = (value2, trigger = "onChange") => {
|
|
10533
|
+
let val = value2;
|
|
10534
|
+
if (getEnv() === ENV_TYPE.WEB) {
|
|
10535
|
+
if (type === "number") {
|
|
10536
|
+
val = formatNumber(val, false, true);
|
|
10537
|
+
}
|
|
10538
|
+
if (type === "digit") {
|
|
10539
|
+
val = formatNumber(val, true, true);
|
|
10540
|
+
}
|
|
10541
|
+
}
|
|
10542
|
+
if (formatter && trigger === formatTrigger) {
|
|
10543
|
+
val = formatter(val);
|
|
10544
|
+
}
|
|
10545
|
+
setValue(val);
|
|
10546
|
+
const eventHandler = props[trigger];
|
|
10547
|
+
if (eventHandler && typeof eventHandler === "function") {
|
|
10548
|
+
eventHandler(val);
|
|
10549
|
+
}
|
|
10550
|
+
forceUpdate();
|
|
10551
|
+
};
|
|
10552
|
+
const handleFocus = (event) => {
|
|
10553
|
+
const val = event.target.value;
|
|
10554
|
+
onFocus && onFocus(val);
|
|
10555
|
+
setActive(true);
|
|
10556
|
+
};
|
|
10557
|
+
const handleInput = (value2) => {
|
|
10558
|
+
updateValue(value2, "onChange");
|
|
10559
|
+
};
|
|
10560
|
+
const handleBlur = (event) => {
|
|
10561
|
+
const val = event.target.value;
|
|
10562
|
+
updateValue(val, "onBlur");
|
|
10563
|
+
setTimeout(() => {
|
|
10564
|
+
setActive(false);
|
|
10565
|
+
}, 50);
|
|
10566
|
+
};
|
|
10567
|
+
const inputType = (type2) => {
|
|
10568
|
+
if (getEnv() === ENV_TYPE.WEB) {
|
|
10569
|
+
if (type2 === "digit") {
|
|
10570
|
+
return "text";
|
|
10571
|
+
}
|
|
10572
|
+
if (type2 === "number") {
|
|
10573
|
+
return "tel";
|
|
10574
|
+
}
|
|
10575
|
+
} else if (type2 === "password") {
|
|
10576
|
+
return "text";
|
|
10577
|
+
}
|
|
10578
|
+
return type2;
|
|
10579
|
+
};
|
|
10580
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10581
|
+
View,
|
|
10582
|
+
{
|
|
10583
|
+
className: `${inputClass()} ${className || ""}`,
|
|
10584
|
+
style,
|
|
10585
|
+
onClick: (e) => {
|
|
10586
|
+
onClick && onClick(e);
|
|
10587
|
+
},
|
|
10588
|
+
children: [
|
|
10589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10590
|
+
Input$1,
|
|
10591
|
+
{
|
|
10592
|
+
...rest,
|
|
10593
|
+
name,
|
|
10594
|
+
className: "nut-input-native",
|
|
10595
|
+
ref: inputRef,
|
|
10596
|
+
style: { textAlign: align },
|
|
10597
|
+
type: inputType(type),
|
|
10598
|
+
password: type === "password",
|
|
10599
|
+
maxlength: maxLength,
|
|
10600
|
+
placeholder: placeholder || locale.placeholder,
|
|
10601
|
+
disabled: disabled || readOnly,
|
|
10602
|
+
value,
|
|
10603
|
+
focus: autoFocus,
|
|
10604
|
+
confirmType,
|
|
10605
|
+
onBlur: (e) => {
|
|
10606
|
+
handleBlur(e);
|
|
10607
|
+
},
|
|
10608
|
+
onFocus: (e) => {
|
|
10609
|
+
handleFocus(e);
|
|
10610
|
+
},
|
|
10611
|
+
onInput: (e) => {
|
|
10612
|
+
handleInput(e.currentTarget.value);
|
|
10694
10613
|
}
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
"/",
|
|
10700
|
-
maxlength
|
|
10701
|
-
] }) : null
|
|
10702
|
-
] }),
|
|
10703
|
-
errorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10704
|
-
"div",
|
|
10614
|
+
}
|
|
10615
|
+
),
|
|
10616
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10617
|
+
View,
|
|
10705
10618
|
{
|
|
10706
|
-
className: "nut-input-error-message",
|
|
10707
10619
|
style: {
|
|
10708
|
-
|
|
10620
|
+
display: clearable && !readOnly && active && value.length > 0 ? "flex" : "none",
|
|
10621
|
+
alignItems: "center"
|
|
10622
|
+
},
|
|
10623
|
+
onClick: (e) => {
|
|
10624
|
+
e.stopPropagation();
|
|
10625
|
+
if (!disabled) {
|
|
10626
|
+
setTimeout(() => {
|
|
10627
|
+
setValue("");
|
|
10628
|
+
onClear && onClear("");
|
|
10629
|
+
}, 50);
|
|
10630
|
+
}
|
|
10709
10631
|
},
|
|
10710
|
-
children:
|
|
10632
|
+
children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(r$d, { className: "nut-input-clear" })
|
|
10711
10633
|
}
|
|
10712
|
-
)
|
|
10713
|
-
]
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
Input.defaultProps = defaultProps$
|
|
10634
|
+
)
|
|
10635
|
+
]
|
|
10636
|
+
}
|
|
10637
|
+
);
|
|
10638
|
+
}
|
|
10639
|
+
);
|
|
10640
|
+
Input.defaultProps = defaultProps$V;
|
|
10719
10641
|
Input.displayName = "NutInput";
|
|
10720
|
-
const defaultProps$
|
|
10642
|
+
const defaultProps$U = {
|
|
10721
10643
|
...ComponentDefaults,
|
|
10722
10644
|
disabled: false,
|
|
10723
10645
|
min: 1,
|
|
@@ -10729,7 +10651,7 @@ const defaultProps$V = {
|
|
|
10729
10651
|
digits: 0,
|
|
10730
10652
|
async: false
|
|
10731
10653
|
};
|
|
10732
|
-
const classPrefix$
|
|
10654
|
+
const classPrefix$7 = `nut-inputnumber`;
|
|
10733
10655
|
const InputNumber = (props) => {
|
|
10734
10656
|
const {
|
|
10735
10657
|
children,
|
|
@@ -10754,7 +10676,7 @@ const InputNumber = (props) => {
|
|
|
10754
10676
|
onChange,
|
|
10755
10677
|
...restProps
|
|
10756
10678
|
} = {
|
|
10757
|
-
...defaultProps$
|
|
10679
|
+
...defaultProps$U,
|
|
10758
10680
|
...props
|
|
10759
10681
|
};
|
|
10760
10682
|
const inputRef = useRef("");
|
|
@@ -10772,8 +10694,8 @@ const InputNumber = (props) => {
|
|
|
10772
10694
|
}, []);
|
|
10773
10695
|
const classes = classNames(
|
|
10774
10696
|
{
|
|
10775
|
-
[`${classPrefix$
|
|
10776
|
-
[`${classPrefix$
|
|
10697
|
+
[`${classPrefix$7}`]: true,
|
|
10698
|
+
[`${classPrefix$7}--disabled`]: disabled
|
|
10777
10699
|
},
|
|
10778
10700
|
className
|
|
10779
10701
|
);
|
|
@@ -10914,7 +10836,7 @@ const InputNumber = (props) => {
|
|
|
10914
10836
|
onBlur && onBlur(e);
|
|
10915
10837
|
};
|
|
10916
10838
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style: styles, ...restProps, children: [
|
|
10917
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-minus", children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
10839
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-minus", children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$c, { className: iconMinusClasses, onClick: reduceNumber }) }),
|
|
10918
10840
|
/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: formatter ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10919
10841
|
"input",
|
|
10920
10842
|
{
|
|
@@ -10945,9 +10867,9 @@ const InputNumber = (props) => {
|
|
|
10945
10867
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$8, { className: iconAddClasses, onClick: addNumber }) })
|
|
10946
10868
|
] });
|
|
10947
10869
|
};
|
|
10948
|
-
InputNumber.defaultProps = defaultProps$
|
|
10870
|
+
InputNumber.defaultProps = defaultProps$U;
|
|
10949
10871
|
InputNumber.displayName = "NutInputNumber";
|
|
10950
|
-
const defaultProps$
|
|
10872
|
+
const defaultProps$T = {
|
|
10951
10873
|
...ComponentDefaults,
|
|
10952
10874
|
activeColor: "",
|
|
10953
10875
|
closeOnClickOverlay: true,
|
|
@@ -10966,7 +10888,7 @@ const Menu = (props) => {
|
|
|
10966
10888
|
activeColor,
|
|
10967
10889
|
...rest
|
|
10968
10890
|
} = {
|
|
10969
|
-
...defaultProps$
|
|
10891
|
+
...defaultProps$T,
|
|
10970
10892
|
...props
|
|
10971
10893
|
};
|
|
10972
10894
|
const menuRef = useRef(null);
|
|
@@ -11056,7 +10978,7 @@ const Menu = (props) => {
|
|
|
11056
10978
|
}),
|
|
11057
10979
|
children: [
|
|
11058
10980
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-menu__title-text", children: finallyTitle() }),
|
|
11059
|
-
icon || (direction === "up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
10981
|
+
icon || (direction === "up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$w, { className: "nut-menu__title-icon", size: 10 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$x, { className: "nut-menu__title-icon", size: 10 }))
|
|
11060
10982
|
]
|
|
11061
10983
|
}
|
|
11062
10984
|
)
|
|
@@ -11090,9 +11012,9 @@ const Menu = (props) => {
|
|
|
11090
11012
|
}
|
|
11091
11013
|
);
|
|
11092
11014
|
};
|
|
11093
|
-
Menu.defaultProps = defaultProps$
|
|
11015
|
+
Menu.defaultProps = defaultProps$T;
|
|
11094
11016
|
Menu.displayName = "NutMenu";
|
|
11095
|
-
const defaultProps$
|
|
11017
|
+
const defaultProps$S = {
|
|
11096
11018
|
...ComponentDefaults,
|
|
11097
11019
|
columns: 1,
|
|
11098
11020
|
direction: "down",
|
|
@@ -11122,7 +11044,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
11122
11044
|
parent,
|
|
11123
11045
|
index
|
|
11124
11046
|
} = {
|
|
11125
|
-
...defaultProps$
|
|
11047
|
+
...defaultProps$S,
|
|
11126
11048
|
...props
|
|
11127
11049
|
};
|
|
11128
11050
|
const [_showPopup, setShowPopup] = useState(show);
|
|
@@ -11250,7 +11172,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
11250
11172
|
},
|
|
11251
11173
|
children: [
|
|
11252
11174
|
item.value === _value ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: icon || /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11253
|
-
a$
|
|
11175
|
+
a$s,
|
|
11254
11176
|
{
|
|
11255
11177
|
color: activeColor,
|
|
11256
11178
|
size: 10,
|
|
@@ -11280,9 +11202,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
11280
11202
|
)
|
|
11281
11203
|
] });
|
|
11282
11204
|
});
|
|
11283
|
-
MenuItem.defaultProps = defaultProps$
|
|
11205
|
+
MenuItem.defaultProps = defaultProps$S;
|
|
11284
11206
|
MenuItem.displayName = "NutMenuItem";
|
|
11285
|
-
const defaultProps$
|
|
11207
|
+
const defaultProps$R = {
|
|
11286
11208
|
confirmText: "",
|
|
11287
11209
|
title: "",
|
|
11288
11210
|
visible: false,
|
|
@@ -11514,14 +11436,14 @@ const NumberKeyboard = (props) => {
|
|
|
11514
11436
|
}
|
|
11515
11437
|
) });
|
|
11516
11438
|
};
|
|
11517
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
11439
|
+
NumberKeyboard.defaultProps = defaultProps$R;
|
|
11518
11440
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
11519
11441
|
const radioContext = {
|
|
11520
11442
|
onChange: (val) => {
|
|
11521
11443
|
}
|
|
11522
11444
|
};
|
|
11523
11445
|
const RadioContext = React__default.createContext(radioContext);
|
|
11524
|
-
const defaultProps$
|
|
11446
|
+
const defaultProps$Q = {
|
|
11525
11447
|
value: null,
|
|
11526
11448
|
textPosition: "right",
|
|
11527
11449
|
onChange: (value) => {
|
|
@@ -11531,7 +11453,7 @@ const defaultProps$R = {
|
|
|
11531
11453
|
};
|
|
11532
11454
|
const RadioGroup = React__default.forwardRef(
|
|
11533
11455
|
(props, ref) => {
|
|
11534
|
-
const { children } = { ...defaultProps$
|
|
11456
|
+
const { children } = { ...defaultProps$Q, ...props };
|
|
11535
11457
|
cn("RadioGroup");
|
|
11536
11458
|
const {
|
|
11537
11459
|
className,
|
|
@@ -11608,9 +11530,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
11608
11530
|
);
|
|
11609
11531
|
}
|
|
11610
11532
|
);
|
|
11611
|
-
RadioGroup.defaultProps = defaultProps$
|
|
11533
|
+
RadioGroup.defaultProps = defaultProps$Q;
|
|
11612
11534
|
RadioGroup.displayName = "NutRadioGroup";
|
|
11613
|
-
const defaultProps$
|
|
11535
|
+
const defaultProps$P = {
|
|
11614
11536
|
...ComponentDefaults,
|
|
11615
11537
|
className: "",
|
|
11616
11538
|
style: {},
|
|
@@ -11627,7 +11549,7 @@ const defaultProps$Q = {
|
|
|
11627
11549
|
};
|
|
11628
11550
|
const Radio = (props) => {
|
|
11629
11551
|
const { children } = {
|
|
11630
|
-
...defaultProps$
|
|
11552
|
+
...defaultProps$P,
|
|
11631
11553
|
...props
|
|
11632
11554
|
};
|
|
11633
11555
|
const {
|
|
@@ -11686,12 +11608,12 @@ const Radio = (props) => {
|
|
|
11686
11608
|
return React__default.isValidElement(checkedIcon2) ? React__default.cloneElement(checkedIcon2, {
|
|
11687
11609
|
...checkedIcon2.props,
|
|
11688
11610
|
className: color()
|
|
11689
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
11611
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$v, { size: iconSize2, className: color() });
|
|
11690
11612
|
}
|
|
11691
11613
|
return React__default.isValidElement(icon2) ? React__default.cloneElement(icon2, {
|
|
11692
11614
|
...icon2.props,
|
|
11693
11615
|
className: color()
|
|
11694
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
11616
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$t, { size: iconSize2, className: color() });
|
|
11695
11617
|
};
|
|
11696
11618
|
const reverseState = textPosition === "left";
|
|
11697
11619
|
const renderRadioItem = () => {
|
|
@@ -11720,10 +11642,10 @@ const Radio = (props) => {
|
|
|
11720
11642
|
}
|
|
11721
11643
|
);
|
|
11722
11644
|
};
|
|
11723
|
-
Radio.defaultProps = defaultProps$
|
|
11645
|
+
Radio.defaultProps = defaultProps$P;
|
|
11724
11646
|
Radio.displayName = "NutRadio";
|
|
11725
11647
|
Radio.RadioGroup = RadioGroup;
|
|
11726
|
-
const defaultProps$
|
|
11648
|
+
const defaultProps$O = {
|
|
11727
11649
|
id: "",
|
|
11728
11650
|
style: {},
|
|
11729
11651
|
icon: null,
|
|
@@ -11778,7 +11700,7 @@ const Toast = (props) => {
|
|
|
11778
11700
|
visible,
|
|
11779
11701
|
onClose,
|
|
11780
11702
|
...rest
|
|
11781
|
-
} = { ...defaultProps$
|
|
11703
|
+
} = { ...defaultProps$O, ...props };
|
|
11782
11704
|
let timer;
|
|
11783
11705
|
const [openState, SetOpenState] = useState(false);
|
|
11784
11706
|
useEffect(() => {
|
|
@@ -11825,9 +11747,9 @@ const Toast = (props) => {
|
|
|
11825
11747
|
}
|
|
11826
11748
|
return {
|
|
11827
11749
|
success: /* @__PURE__ */ jsxRuntimeExports.jsx(a$4, { color: "#ffffff", width: iconSize, height: iconSize }),
|
|
11828
|
-
fail: /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
11750
|
+
fail: /* @__PURE__ */ jsxRuntimeExports.jsx(a$l, { color: "#ffffff", width: iconSize, height: iconSize }),
|
|
11829
11751
|
warn: /* @__PURE__ */ jsxRuntimeExports.jsx(a$3, { color: "#ffffff", width: iconSize, height: iconSize }),
|
|
11830
|
-
loading: /* @__PURE__ */ jsxRuntimeExports.jsx(r$
|
|
11752
|
+
loading: /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { color: "#ffffff", width: iconSize, height: iconSize })
|
|
11831
11753
|
}[type];
|
|
11832
11754
|
};
|
|
11833
11755
|
const classes = classNames({
|
|
@@ -11869,9 +11791,9 @@ const Toast = (props) => {
|
|
|
11869
11791
|
}
|
|
11870
11792
|
) : null });
|
|
11871
11793
|
};
|
|
11872
|
-
Toast.defaultProps = defaultProps$
|
|
11794
|
+
Toast.defaultProps = defaultProps$O;
|
|
11873
11795
|
Toast.displayName = "NutToast";
|
|
11874
|
-
const defaultProps$
|
|
11796
|
+
const defaultProps$N = {
|
|
11875
11797
|
range: false,
|
|
11876
11798
|
hiddenRange: false,
|
|
11877
11799
|
hiddenTag: false,
|
|
@@ -11907,8 +11829,8 @@ const Range = (props) => {
|
|
|
11907
11829
|
minDesc,
|
|
11908
11830
|
maxDesc,
|
|
11909
11831
|
curValueDesc
|
|
11910
|
-
} = { ...defaultProps$
|
|
11911
|
-
let { min, max, step } = { ...defaultProps$
|
|
11832
|
+
} = { ...defaultProps$N, ...props };
|
|
11833
|
+
let { min, max, step } = { ...defaultProps$N, ...props };
|
|
11912
11834
|
min = Number(min);
|
|
11913
11835
|
max = Number(max);
|
|
11914
11836
|
step = Number(step);
|
|
@@ -12264,9 +12186,9 @@ const Range = (props) => {
|
|
|
12264
12186
|
)
|
|
12265
12187
|
] });
|
|
12266
12188
|
};
|
|
12267
|
-
Range.defaultProps = defaultProps$
|
|
12189
|
+
Range.defaultProps = defaultProps$N;
|
|
12268
12190
|
Range.displayName = "NutRange";
|
|
12269
|
-
const defaultProps$
|
|
12191
|
+
const defaultProps$M = {
|
|
12270
12192
|
...ComponentDefaults,
|
|
12271
12193
|
count: 5,
|
|
12272
12194
|
min: 0,
|
|
@@ -12291,7 +12213,7 @@ const Rate = (props) => {
|
|
|
12291
12213
|
allowHalf,
|
|
12292
12214
|
onChange
|
|
12293
12215
|
} = {
|
|
12294
|
-
...defaultProps$
|
|
12216
|
+
...defaultProps$M,
|
|
12295
12217
|
...props
|
|
12296
12218
|
};
|
|
12297
12219
|
const classPrefix2 = "nut-rate";
|
|
@@ -12376,9 +12298,9 @@ const Rate = (props) => {
|
|
|
12376
12298
|
}
|
|
12377
12299
|
);
|
|
12378
12300
|
};
|
|
12379
|
-
Rate.defaultProps = defaultProps$
|
|
12301
|
+
Rate.defaultProps = defaultProps$M;
|
|
12380
12302
|
Rate.displayName = "NutRate";
|
|
12381
|
-
const defaultProps$
|
|
12303
|
+
const defaultProps$L = {
|
|
12382
12304
|
...ComponentDefaults,
|
|
12383
12305
|
placeholder: "",
|
|
12384
12306
|
shape: "square",
|
|
@@ -12426,7 +12348,7 @@ const SearchBar = (props) => {
|
|
|
12426
12348
|
onClickRightinIcon,
|
|
12427
12349
|
onClickRightoutIcon
|
|
12428
12350
|
} = {
|
|
12429
|
-
...defaultProps$
|
|
12351
|
+
...defaultProps$L,
|
|
12430
12352
|
...props
|
|
12431
12353
|
};
|
|
12432
12354
|
const alignClass = `${align}`;
|
|
@@ -12547,7 +12469,7 @@ const SearchBar = (props) => {
|
|
|
12547
12469
|
{
|
|
12548
12470
|
className: `${searchbarBem("clear")} ${rightinIcon ? "pos-right" : ""}`,
|
|
12549
12471
|
onClick: (e) => clearaVal(e),
|
|
12550
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
12472
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$p, { size: clearSize, color: "#555" })
|
|
12551
12473
|
}
|
|
12552
12474
|
);
|
|
12553
12475
|
};
|
|
@@ -12612,9 +12534,9 @@ const SearchBar = (props) => {
|
|
|
12612
12534
|
}
|
|
12613
12535
|
);
|
|
12614
12536
|
};
|
|
12615
|
-
SearchBar.defaultProps = defaultProps$
|
|
12537
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
12616
12538
|
SearchBar.displayName = "NutSearchBar";
|
|
12617
|
-
const defaultProps$
|
|
12539
|
+
const defaultProps$K = {
|
|
12618
12540
|
...ComponentDefaults,
|
|
12619
12541
|
title: "",
|
|
12620
12542
|
description: "",
|
|
@@ -12777,9 +12699,9 @@ const ShortPassword = (props) => {
|
|
|
12777
12699
|
}
|
|
12778
12700
|
) });
|
|
12779
12701
|
};
|
|
12780
|
-
ShortPassword.defaultProps = defaultProps$
|
|
12702
|
+
ShortPassword.defaultProps = defaultProps$K;
|
|
12781
12703
|
ShortPassword.displayName = "NutShortPassword";
|
|
12782
|
-
const defaultProps$
|
|
12704
|
+
const defaultProps$J = {
|
|
12783
12705
|
canvasId: "spcanvas",
|
|
12784
12706
|
type: "png",
|
|
12785
12707
|
lineWidth: 2,
|
|
@@ -12801,7 +12723,7 @@ const Signature = (props) => {
|
|
|
12801
12723
|
onClear,
|
|
12802
12724
|
...rest
|
|
12803
12725
|
} = {
|
|
12804
|
-
...defaultProps$
|
|
12726
|
+
...defaultProps$J,
|
|
12805
12727
|
...props
|
|
12806
12728
|
};
|
|
12807
12729
|
const b2 = cn("signature");
|
|
@@ -12965,9 +12887,9 @@ const Signature = (props) => {
|
|
|
12965
12887
|
)
|
|
12966
12888
|
] });
|
|
12967
12889
|
};
|
|
12968
|
-
Signature.defaultProps = defaultProps$
|
|
12890
|
+
Signature.defaultProps = defaultProps$J;
|
|
12969
12891
|
Signature.displayName = "NutSignature";
|
|
12970
|
-
const defaultProps$
|
|
12892
|
+
const defaultProps$I = {
|
|
12971
12893
|
...ComponentDefaults,
|
|
12972
12894
|
disabled: false,
|
|
12973
12895
|
activeText: "",
|
|
@@ -12984,7 +12906,7 @@ const Switch = (props) => {
|
|
|
12984
12906
|
style,
|
|
12985
12907
|
onChange
|
|
12986
12908
|
} = {
|
|
12987
|
-
...defaultProps$
|
|
12909
|
+
...defaultProps$I,
|
|
12988
12910
|
...props
|
|
12989
12911
|
};
|
|
12990
12912
|
const classPrefix2 = "nut-switch";
|
|
@@ -13006,9 +12928,9 @@ const Switch = (props) => {
|
|
|
13006
12928
|
activeText && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: value ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label open`, children: activeText }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label close`, children: inactiveText }) })
|
|
13007
12929
|
] }) });
|
|
13008
12930
|
};
|
|
13009
|
-
Switch.defaultProps = defaultProps$
|
|
12931
|
+
Switch.defaultProps = defaultProps$I;
|
|
13010
12932
|
Switch.displayName = "NutSwitch";
|
|
13011
|
-
const defaultProps$
|
|
12933
|
+
const defaultProps$H = {
|
|
13012
12934
|
defaultValue: "",
|
|
13013
12935
|
textAlign: "left",
|
|
13014
12936
|
limitshow: false,
|
|
@@ -13036,7 +12958,7 @@ const TextArea = (props) => {
|
|
|
13036
12958
|
onChange,
|
|
13037
12959
|
onBlur,
|
|
13038
12960
|
onFocus
|
|
13039
|
-
} = { ...defaultProps$
|
|
12961
|
+
} = { ...defaultProps$H, ...props };
|
|
13040
12962
|
const textareaBem = cn("textarea");
|
|
13041
12963
|
const [inputValue, SetInputValue] = useState("");
|
|
13042
12964
|
const compositingRef = useRef(false);
|
|
@@ -13131,9 +13053,9 @@ const TextArea = (props) => {
|
|
|
13131
13053
|
}
|
|
13132
13054
|
);
|
|
13133
13055
|
};
|
|
13134
|
-
TextArea.defaultProps = defaultProps$
|
|
13056
|
+
TextArea.defaultProps = defaultProps$H;
|
|
13135
13057
|
TextArea.displayName = "NutTextArea";
|
|
13136
|
-
const defaultProps$
|
|
13058
|
+
const defaultProps$G = {
|
|
13137
13059
|
...ComponentDefaults,
|
|
13138
13060
|
percent: 0,
|
|
13139
13061
|
showText: false,
|
|
@@ -13152,7 +13074,7 @@ const Progress = (props) => {
|
|
|
13152
13074
|
children,
|
|
13153
13075
|
...rest
|
|
13154
13076
|
} = {
|
|
13155
|
-
...defaultProps$
|
|
13077
|
+
...defaultProps$G,
|
|
13156
13078
|
...props
|
|
13157
13079
|
};
|
|
13158
13080
|
const classPrefix2 = "nut-progress";
|
|
@@ -13189,7 +13111,7 @@ const Progress = (props) => {
|
|
|
13189
13111
|
}
|
|
13190
13112
|
) }) }) });
|
|
13191
13113
|
};
|
|
13192
|
-
Progress.defaultProps = defaultProps$
|
|
13114
|
+
Progress.defaultProps = defaultProps$G;
|
|
13193
13115
|
Progress.displayName = "NutProgress";
|
|
13194
13116
|
class UploadOptions {
|
|
13195
13117
|
constructor() {
|
|
@@ -13334,7 +13256,7 @@ const funcInterceptor = (interceptor, {
|
|
|
13334
13256
|
done();
|
|
13335
13257
|
}
|
|
13336
13258
|
};
|
|
13337
|
-
const defaultProps$
|
|
13259
|
+
const defaultProps$F = {
|
|
13338
13260
|
...ComponentDefaults,
|
|
13339
13261
|
url: "",
|
|
13340
13262
|
maxCount: 1,
|
|
@@ -13422,7 +13344,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13422
13344
|
beforeXhrUpload,
|
|
13423
13345
|
beforeDelete,
|
|
13424
13346
|
...restProps
|
|
13425
|
-
} = { ...defaultProps$
|
|
13347
|
+
} = { ...defaultProps$F, ...props };
|
|
13426
13348
|
const [fileList, setFileList] = useState(defaultValue || []);
|
|
13427
13349
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
13428
13350
|
useEffect(() => {
|
|
@@ -13692,7 +13614,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13692
13614
|
children: [
|
|
13693
13615
|
previewType === "picture" && !children && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-uploader__preview-img", children: [
|
|
13694
13616
|
deletable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13695
|
-
a$
|
|
13617
|
+
a$l,
|
|
13696
13618
|
{
|
|
13697
13619
|
color: "rgba(0,0,0,0.6)",
|
|
13698
13620
|
className: "close",
|
|
@@ -13700,7 +13622,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13700
13622
|
}
|
|
13701
13623
|
),
|
|
13702
13624
|
item.status === "ready" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-uploader__preview__progress", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-uploader__preview__progress__msg", children: item.message }) }) : item.status !== "success" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-uploader__preview__progress", children: [
|
|
13703
|
-
item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
13625
|
+
item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$l, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { color: "#fff" })),
|
|
13704
13626
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-uploader__preview__progress__msg", children: item.message })
|
|
13705
13627
|
] }),
|
|
13706
13628
|
item.type.includes("image") ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: item.url && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -13726,7 +13648,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13726
13648
|
onClick: () => handleItemClick(item),
|
|
13727
13649
|
className: "nut-uploader__preview-img__file__name",
|
|
13728
13650
|
children: [
|
|
13729
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
13651
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(a$g, { color: "#808080" }),
|
|
13730
13652
|
" ",
|
|
13731
13653
|
item.name
|
|
13732
13654
|
]
|
|
@@ -13741,14 +13663,14 @@ const InternalUploader = (props, ref) => {
|
|
|
13741
13663
|
className: `nut-uploader__preview-img__file__name ${item.status}`,
|
|
13742
13664
|
onClick: () => handleItemClick(item),
|
|
13743
13665
|
children: [
|
|
13744
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
13666
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(a$g, {}),
|
|
13745
13667
|
" ",
|
|
13746
13668
|
item.name
|
|
13747
13669
|
]
|
|
13748
13670
|
}
|
|
13749
13671
|
),
|
|
13750
13672
|
deletable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13751
|
-
a$
|
|
13673
|
+
a$n,
|
|
13752
13674
|
{
|
|
13753
13675
|
color: "#808080",
|
|
13754
13676
|
className: "nut-uploader__preview-img__file__del",
|
|
@@ -13785,9 +13707,9 @@ const InternalUploader = (props, ref) => {
|
|
|
13785
13707
|
] });
|
|
13786
13708
|
};
|
|
13787
13709
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
13788
|
-
Uploader.defaultProps = defaultProps$
|
|
13710
|
+
Uploader.defaultProps = defaultProps$F;
|
|
13789
13711
|
Uploader.displayName = "NutUploader";
|
|
13790
|
-
const defaultProps$
|
|
13712
|
+
const defaultProps$E = {
|
|
13791
13713
|
cancelText: "",
|
|
13792
13714
|
optionTag: "name",
|
|
13793
13715
|
optionSubTag: "subname",
|
|
@@ -13821,7 +13743,7 @@ const ActionSheet = (props) => {
|
|
|
13821
13743
|
className,
|
|
13822
13744
|
style,
|
|
13823
13745
|
...rest
|
|
13824
|
-
} = { ...defaultProps$
|
|
13746
|
+
} = { ...defaultProps$E, ...props };
|
|
13825
13747
|
const b2 = cn("actionsheet");
|
|
13826
13748
|
const isHighlight = (item) => {
|
|
13827
13749
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
@@ -13866,52 +13788,8 @@ const ActionSheet = (props) => {
|
|
|
13866
13788
|
}
|
|
13867
13789
|
);
|
|
13868
13790
|
};
|
|
13869
|
-
ActionSheet.defaultProps = defaultProps$
|
|
13791
|
+
ActionSheet.defaultProps = defaultProps$E;
|
|
13870
13792
|
ActionSheet.displayName = "NutActionSheet";
|
|
13871
|
-
const defaultProps$E = {
|
|
13872
|
-
...ComponentDefaults,
|
|
13873
|
-
value: "",
|
|
13874
|
-
dot: false,
|
|
13875
|
-
max: 99,
|
|
13876
|
-
top: "0",
|
|
13877
|
-
right: "5",
|
|
13878
|
-
color: ""
|
|
13879
|
-
};
|
|
13880
|
-
const Badge = (props) => {
|
|
13881
|
-
const { className, style, value, max, children, dot, top, right, color } = {
|
|
13882
|
-
...defaultProps$E,
|
|
13883
|
-
...props
|
|
13884
|
-
};
|
|
13885
|
-
const classPrefix2 = "nut-badge";
|
|
13886
|
-
const classes = classNames(classPrefix2, className);
|
|
13887
|
-
const contentClasses = classNames(
|
|
13888
|
-
{ [`${classPrefix2}__dot`]: dot },
|
|
13889
|
-
`${classPrefix2}__content`,
|
|
13890
|
-
`${classPrefix2}__sup`
|
|
13891
|
-
);
|
|
13892
|
-
function content() {
|
|
13893
|
-
if (dot || typeof value === "object")
|
|
13894
|
-
return null;
|
|
13895
|
-
if (typeof value === "number" && typeof max === "number") {
|
|
13896
|
-
return max < value ? `${max}+` : value;
|
|
13897
|
-
}
|
|
13898
|
-
return value;
|
|
13899
|
-
}
|
|
13900
|
-
const getStyle = () => {
|
|
13901
|
-
const style2 = {};
|
|
13902
|
-
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
13903
|
-
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
13904
|
-
style2.background = color;
|
|
13905
|
-
return style2;
|
|
13906
|
-
};
|
|
13907
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
|
|
13908
|
-
typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
|
|
13909
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
|
|
13910
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
|
|
13911
|
-
] });
|
|
13912
|
-
};
|
|
13913
|
-
Badge.defaultProps = defaultProps$E;
|
|
13914
|
-
Badge.displayName = "NutBadge";
|
|
13915
13793
|
const Content = (props) => {
|
|
13916
13794
|
const { visible, title, footer, footerDirection, onClick, children } = props;
|
|
13917
13795
|
const classPrefix2 = "nut-dialog";
|
|
@@ -14224,26 +14102,30 @@ const defaultStatus = {
|
|
|
14224
14102
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
14225
14103
|
};
|
|
14226
14104
|
const defaultProps$B = {
|
|
14227
|
-
|
|
14228
|
-
|
|
14105
|
+
...ComponentDefaults,
|
|
14106
|
+
description: "",
|
|
14229
14107
|
imageSize: "",
|
|
14230
|
-
|
|
14108
|
+
status: "empty"
|
|
14231
14109
|
};
|
|
14110
|
+
const classPrefix$6 = `nut-empty`;
|
|
14232
14111
|
const Empty = (props) => {
|
|
14233
14112
|
const { locale } = useConfig$1();
|
|
14234
14113
|
defaultProps$B.description = locale.noData || defaultProps$B.description;
|
|
14235
|
-
const {
|
|
14114
|
+
const {
|
|
14115
|
+
image,
|
|
14116
|
+
imageSize,
|
|
14117
|
+
description,
|
|
14118
|
+
children,
|
|
14119
|
+
className,
|
|
14120
|
+
status,
|
|
14121
|
+
...rest
|
|
14122
|
+
} = {
|
|
14236
14123
|
...defaultProps$B,
|
|
14237
14124
|
...props
|
|
14238
14125
|
};
|
|
14239
14126
|
const [imgStyle, setImgStyle] = useState({});
|
|
14240
|
-
const
|
|
14241
|
-
|
|
14242
|
-
if (typeof image === "string") {
|
|
14243
|
-
const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
|
|
14244
|
-
const imageUrl = isHttpUrl ? image : defaultStatus[image];
|
|
14245
|
-
imageNode = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" });
|
|
14246
|
-
}
|
|
14127
|
+
const imageUrl = image || defaultStatus[status];
|
|
14128
|
+
const imageNode = typeof imageUrl === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" }) : imageUrl;
|
|
14247
14129
|
useEffect(() => {
|
|
14248
14130
|
setImgStyle(() => {
|
|
14249
14131
|
if (!imageSize) {
|
|
@@ -14261,9 +14143,9 @@ const Empty = (props) => {
|
|
|
14261
14143
|
};
|
|
14262
14144
|
});
|
|
14263
14145
|
}, [imageSize]);
|
|
14264
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${
|
|
14265
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
14266
|
-
typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
14146
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
14147
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__image`, style: imgStyle, children: imageNode }),
|
|
14148
|
+
typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__description`, children: description }) : description,
|
|
14267
14149
|
children
|
|
14268
14150
|
] }) });
|
|
14269
14151
|
};
|
|
@@ -14819,7 +14701,7 @@ const NoticeBar = (props) => {
|
|
|
14819
14701
|
]
|
|
14820
14702
|
}
|
|
14821
14703
|
) }),
|
|
14822
|
-
closeMode || rightIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "right-icon", onClick: onClickIcon, children: rightIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
14704
|
+
closeMode || rightIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "right-icon", onClick: onClickIcon, children: rightIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { size: 12, color }) }) : null
|
|
14823
14705
|
] }) : null,
|
|
14824
14706
|
showNoticeBar && scrollList.current.length > 0 && isVertical ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
14825
14707
|
"div",
|
|
@@ -14867,7 +14749,7 @@ const NoticeBar = (props) => {
|
|
|
14867
14749
|
onClick: (e) => {
|
|
14868
14750
|
handleClickIcon(e);
|
|
14869
14751
|
},
|
|
14870
|
-
children: rightIcon || (closeMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
14752
|
+
children: rightIcon || (closeMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { size: 12, color }) : null)
|
|
14871
14753
|
}
|
|
14872
14754
|
)
|
|
14873
14755
|
]
|
|
@@ -19903,27 +19785,30 @@ const AvatarContext = createContext({});
|
|
|
19903
19785
|
const defaultProps$v = {
|
|
19904
19786
|
...ComponentDefaults,
|
|
19905
19787
|
size: "",
|
|
19788
|
+
shape: "round",
|
|
19906
19789
|
icon: "",
|
|
19907
|
-
|
|
19790
|
+
fit: "cover",
|
|
19791
|
+
background: "#eee",
|
|
19908
19792
|
color: "#666",
|
|
19909
|
-
|
|
19910
|
-
|
|
19793
|
+
src: "",
|
|
19794
|
+
alt: ""
|
|
19911
19795
|
};
|
|
19796
|
+
const classPrefix$5 = `nut-avatar`;
|
|
19912
19797
|
const Avatar = (props) => {
|
|
19913
19798
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
19914
19799
|
const {
|
|
19915
19800
|
children,
|
|
19916
|
-
prefixCls: prefixCls2,
|
|
19917
19801
|
size,
|
|
19918
19802
|
shape,
|
|
19919
|
-
|
|
19803
|
+
background,
|
|
19920
19804
|
color,
|
|
19921
|
-
|
|
19805
|
+
src,
|
|
19922
19806
|
icon,
|
|
19807
|
+
fit,
|
|
19808
|
+
alt,
|
|
19923
19809
|
className,
|
|
19924
19810
|
style,
|
|
19925
|
-
|
|
19926
|
-
onActiveAvatar,
|
|
19811
|
+
onClick,
|
|
19927
19812
|
onError,
|
|
19928
19813
|
...rest
|
|
19929
19814
|
} = {
|
|
@@ -19935,24 +19820,23 @@ const Avatar = (props) => {
|
|
|
19935
19820
|
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
19936
19821
|
const avatarRef = useRef(null);
|
|
19937
19822
|
const parent = useContext(AvatarContext);
|
|
19938
|
-
const
|
|
19823
|
+
const sizeValue = ["large", "normal", "small"];
|
|
19939
19824
|
const classes = classNames({
|
|
19940
|
-
[`nut-avatar-${
|
|
19941
|
-
[`nut-avatar-${
|
|
19825
|
+
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
19826
|
+
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
19942
19827
|
});
|
|
19943
|
-
const cls = classNames(
|
|
19944
|
-
const sizeValue = ["large", "normal", "small"];
|
|
19828
|
+
const cls = classNames(classPrefix$5, classes, className);
|
|
19945
19829
|
const styles = {
|
|
19946
19830
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
19947
19831
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
19948
|
-
backgroundColor: `${
|
|
19832
|
+
backgroundColor: `${background}`,
|
|
19949
19833
|
color: `${color}`,
|
|
19950
|
-
marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.
|
|
19951
|
-
zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.
|
|
19834
|
+
marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.gap) ? `${(_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.gap}px` : "",
|
|
19835
|
+
zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.level) === "right" ? `${Math.abs(maxSum - avatarIndex)}` : "",
|
|
19952
19836
|
...style
|
|
19953
19837
|
};
|
|
19954
19838
|
const maxStyles = {
|
|
19955
|
-
backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.
|
|
19839
|
+
backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.maxBackground}`,
|
|
19956
19840
|
color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
|
|
19957
19841
|
};
|
|
19958
19842
|
useEffect(() => {
|
|
@@ -19970,23 +19854,22 @@ const Avatar = (props) => {
|
|
|
19970
19854
|
}
|
|
19971
19855
|
}
|
|
19972
19856
|
const index = (_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index;
|
|
19973
|
-
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.
|
|
19857
|
+
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
|
|
19974
19858
|
setMaxSum(children2.length);
|
|
19975
19859
|
setAvatarIndex(index);
|
|
19976
19860
|
if (index === children2.length && index !== maxCount && children2.length > maxCount) {
|
|
19977
19861
|
setShowMax(true);
|
|
19978
19862
|
}
|
|
19979
19863
|
};
|
|
19980
|
-
const errorEvent = (
|
|
19864
|
+
const errorEvent = () => {
|
|
19981
19865
|
if (props.onError) {
|
|
19982
|
-
props.onError(
|
|
19866
|
+
props.onError();
|
|
19983
19867
|
}
|
|
19984
19868
|
};
|
|
19985
19869
|
const clickAvatar = (e) => {
|
|
19986
|
-
|
|
19987
|
-
onActiveAvatar && onActiveAvatar(e);
|
|
19870
|
+
onClick && onClick(e);
|
|
19988
19871
|
};
|
|
19989
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.
|
|
19872
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.max) || avatarIndex <= ((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.max)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
19990
19873
|
"div",
|
|
19991
19874
|
{
|
|
19992
19875
|
className: cls,
|
|
@@ -19995,15 +19878,25 @@ const Avatar = (props) => {
|
|
|
19995
19878
|
onClick: clickAvatar,
|
|
19996
19879
|
ref: avatarRef,
|
|
19997
19880
|
children: [
|
|
19998
|
-
(!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.
|
|
19999
|
-
|
|
19881
|
+
(!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.max) || avatarIndex <= ((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.max)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
19882
|
+
src && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19883
|
+
Image$1,
|
|
19884
|
+
{
|
|
19885
|
+
className: "avatar-img",
|
|
19886
|
+
src,
|
|
19887
|
+
style: { objectFit: fit },
|
|
19888
|
+
alt,
|
|
19889
|
+
onError: errorEvent
|
|
19890
|
+
}
|
|
19891
|
+
),
|
|
20000
19892
|
React__default.isValidElement(icon) ? React__default.cloneElement(icon, {
|
|
20001
19893
|
...icon.props,
|
|
20002
19894
|
className: `${icon.props.className || ""} icon`
|
|
20003
19895
|
}) : null,
|
|
20004
|
-
children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children })
|
|
19896
|
+
children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children }),
|
|
19897
|
+
!src && !icon && !children && /* @__PURE__ */ jsxRuntimeExports.jsx(a$b, { className: "icon" })
|
|
20005
19898
|
] }),
|
|
20006
|
-
showMax && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.
|
|
19899
|
+
showMax && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}` })
|
|
20007
19900
|
]
|
|
20008
19901
|
}
|
|
20009
19902
|
) });
|
|
@@ -20073,7 +19966,7 @@ const Skeleton = (props) => {
|
|
|
20073
19966
|
Avatar,
|
|
20074
19967
|
{
|
|
20075
19968
|
className: avatarClass,
|
|
20076
|
-
|
|
19969
|
+
background: "rgb(239, 239, 239)",
|
|
20077
19970
|
shape: avatarShape,
|
|
20078
19971
|
style: getStyle()
|
|
20079
19972
|
}
|
|
@@ -20106,9 +19999,7 @@ function preventDefault(event, isStopPropagation) {
|
|
|
20106
19999
|
}
|
|
20107
20000
|
}
|
|
20108
20001
|
const defaultProps$t = {
|
|
20109
|
-
name: ""
|
|
20110
|
-
leftWidth: 0,
|
|
20111
|
-
rightWidth: 0
|
|
20002
|
+
name: ""
|
|
20112
20003
|
};
|
|
20113
20004
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
20114
20005
|
const swipeBem = cn("swipe");
|
|
@@ -20143,14 +20034,8 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
20143
20034
|
transform: `translate3d(${state.offset}px, 0, 0)`,
|
|
20144
20035
|
transitionDuration: state.dragging ? "0s" : ".6s"
|
|
20145
20036
|
};
|
|
20146
|
-
const leftWidth =
|
|
20147
|
-
|
|
20148
|
-
[props.leftWidth, actionWidth.left]
|
|
20149
|
-
);
|
|
20150
|
-
const rightWidth = useMemo(
|
|
20151
|
-
() => props.rightWidth ? props.rightWidth : actionWidth.right,
|
|
20152
|
-
[props.rightWidth, actionWidth.right]
|
|
20153
|
-
);
|
|
20037
|
+
const leftWidth = actionWidth.left;
|
|
20038
|
+
const rightWidth = actionWidth.right;
|
|
20154
20039
|
const onTouchStart = async (event) => {
|
|
20155
20040
|
if (leftWrapper.current) {
|
|
20156
20041
|
const leftRect = await getRectByTaro(leftWrapper.current);
|
|
@@ -20302,7 +20187,7 @@ const defaultProps$s = {
|
|
|
20302
20187
|
onClick: (event) => {
|
|
20303
20188
|
}
|
|
20304
20189
|
};
|
|
20305
|
-
const classPrefix$
|
|
20190
|
+
const classPrefix$4 = `nut-animate`;
|
|
20306
20191
|
const Animate = (props) => {
|
|
20307
20192
|
const { className, type, action, loop: loop2, onClick, children, ...rest } = {
|
|
20308
20193
|
...defaultProps$s,
|
|
@@ -20311,7 +20196,7 @@ const Animate = (props) => {
|
|
|
20311
20196
|
const [clicked, setClicked] = useState(false);
|
|
20312
20197
|
const classes = classNames({
|
|
20313
20198
|
"nut-ani-container": true,
|
|
20314
|
-
[`${classPrefix$
|
|
20199
|
+
[`${classPrefix$4}-${type}`]: action === "initial" || clicked ? type : false,
|
|
20315
20200
|
loop: loop2
|
|
20316
20201
|
});
|
|
20317
20202
|
const cls = classNames(classes, className);
|
|
@@ -20642,22 +20527,20 @@ const Audio = (props) => {
|
|
|
20642
20527
|
Audio.defaultProps = defaultProps$p;
|
|
20643
20528
|
Audio.displayName = "NutAudio";
|
|
20644
20529
|
const defaultProps$o = {
|
|
20530
|
+
...ComponentDefaults,
|
|
20645
20531
|
maxContent: "",
|
|
20646
|
-
|
|
20647
|
-
|
|
20532
|
+
max: "",
|
|
20533
|
+
maxBackground: "#eee",
|
|
20648
20534
|
maxColor: "#666",
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
span: "-8",
|
|
20652
|
-
zIndex: "left"
|
|
20535
|
+
gap: "-8",
|
|
20536
|
+
level: "left"
|
|
20653
20537
|
};
|
|
20538
|
+
const classPrefix$3 = `nut-avatar-group`;
|
|
20654
20539
|
const AvatarGroup = (props) => {
|
|
20655
|
-
useConfig();
|
|
20656
20540
|
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
20657
20541
|
const { className, style, children } = propAvatarGroup;
|
|
20658
20542
|
const avatarGroupRef = useRef(null);
|
|
20659
|
-
const
|
|
20660
|
-
const cls = classNames(b2(""), className);
|
|
20543
|
+
const cls = classNames(classPrefix$3, className);
|
|
20661
20544
|
const parentAvatar = {
|
|
20662
20545
|
propAvatarGroup,
|
|
20663
20546
|
avatarGroupRef
|
|
@@ -20667,22 +20550,24 @@ const AvatarGroup = (props) => {
|
|
|
20667
20550
|
AvatarGroup.defaultProps = defaultProps$o;
|
|
20668
20551
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
20669
20552
|
const defaultProps$n = {
|
|
20553
|
+
...ComponentDefaults,
|
|
20670
20554
|
strokeWidth: 5,
|
|
20671
20555
|
radius: 50,
|
|
20672
20556
|
strokeLinecap: "round",
|
|
20673
|
-
|
|
20674
|
-
|
|
20557
|
+
color: "#fa2c19",
|
|
20558
|
+
background: "#e5e9f2",
|
|
20675
20559
|
clockwise: true
|
|
20676
20560
|
};
|
|
20561
|
+
const classPrefix$2 = `nut-circleprogress`;
|
|
20677
20562
|
const CircleProgress = (props) => {
|
|
20678
20563
|
const {
|
|
20679
20564
|
children,
|
|
20680
|
-
|
|
20565
|
+
percent,
|
|
20681
20566
|
className,
|
|
20682
20567
|
radius,
|
|
20683
|
-
|
|
20568
|
+
background,
|
|
20684
20569
|
clockwise,
|
|
20685
|
-
|
|
20570
|
+
color,
|
|
20686
20571
|
strokeWidth,
|
|
20687
20572
|
style,
|
|
20688
20573
|
strokeLinecap,
|
|
@@ -20691,45 +20576,39 @@ const CircleProgress = (props) => {
|
|
|
20691
20576
|
...defaultProps$n,
|
|
20692
20577
|
...props
|
|
20693
20578
|
};
|
|
20694
|
-
const [oldValue, setOldValue] = useState(
|
|
20695
|
-
const
|
|
20696
|
-
const classes = classNames(className, b2(""));
|
|
20579
|
+
const [oldValue, setOldValue] = useState(percent);
|
|
20580
|
+
const classes = classNames(className, classPrefix$2);
|
|
20697
20581
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
20582
|
+
const animateIdRef = useRef(0);
|
|
20698
20583
|
const styles = {
|
|
20699
20584
|
height: `${Number(radius) * 2}px`,
|
|
20700
20585
|
width: `${Number(radius) * 2}px`,
|
|
20701
20586
|
...style
|
|
20702
20587
|
};
|
|
20703
20588
|
useEffect(() => {
|
|
20704
|
-
let rafId;
|
|
20705
20589
|
const startTime = Date.now();
|
|
20706
20590
|
const startRate = Number(oldValue);
|
|
20707
|
-
const endRate = Number(
|
|
20591
|
+
const endRate = Number(percent);
|
|
20708
20592
|
const duration = Math.abs((startRate - endRate) * 1e3 / 100);
|
|
20709
20593
|
const animate = () => {
|
|
20710
20594
|
const now = Date.now();
|
|
20711
|
-
const
|
|
20712
|
-
const rate =
|
|
20595
|
+
const progress = Math.min((now - startTime) / duration, 1);
|
|
20596
|
+
const rate = progress * (endRate - startRate) + startRate;
|
|
20713
20597
|
setOldValue(Math.min(Math.max(+rate, 0), 100));
|
|
20714
20598
|
if (endRate > startRate ? rate < endRate : rate > endRate) {
|
|
20715
|
-
|
|
20599
|
+
animateIdRef.current = window.requestAnimationFrame(animate);
|
|
20716
20600
|
}
|
|
20717
20601
|
};
|
|
20718
|
-
|
|
20719
|
-
|
|
20720
|
-
|
|
20721
|
-
rafId = window.requestAnimationFrame(animate);
|
|
20722
|
-
}, [progress]);
|
|
20723
|
-
const cancelAnimationFrame2 = function(id) {
|
|
20724
|
-
clearTimeout(id);
|
|
20725
|
-
};
|
|
20602
|
+
animateIdRef.current = window.requestAnimationFrame(animate);
|
|
20603
|
+
return () => window.cancelAnimationFrame(animateIdRef.current);
|
|
20604
|
+
}, [percent]);
|
|
20726
20605
|
const stop2 = () => {
|
|
20727
|
-
if (!isObject(
|
|
20606
|
+
if (!isObject(props.color)) {
|
|
20728
20607
|
return [];
|
|
20729
20608
|
}
|
|
20730
|
-
const
|
|
20731
|
-
const colorArr = Object.keys(
|
|
20732
|
-
(a2,
|
|
20609
|
+
const color2 = props.color;
|
|
20610
|
+
const colorArr = Object.keys(color2).sort(
|
|
20611
|
+
(a2, b2) => parseFloat(a2) - parseFloat(b2)
|
|
20733
20612
|
);
|
|
20734
20613
|
const stopArr = [];
|
|
20735
20614
|
colorArr.map((item) => {
|
|
@@ -20738,15 +20617,15 @@ const CircleProgress = (props) => {
|
|
|
20738
20617
|
value: ""
|
|
20739
20618
|
};
|
|
20740
20619
|
obj.key = item;
|
|
20741
|
-
obj.value =
|
|
20620
|
+
obj.value = color2[item];
|
|
20742
20621
|
stopArr.push(obj);
|
|
20743
20622
|
});
|
|
20744
20623
|
return stopArr;
|
|
20745
20624
|
};
|
|
20746
|
-
const transColor = (
|
|
20747
|
-
return
|
|
20625
|
+
const transColor = (color2) => {
|
|
20626
|
+
return color2 && color2.replace("#", "%23");
|
|
20748
20627
|
};
|
|
20749
|
-
const format = (
|
|
20628
|
+
const format = (progress) => Math.min(Math.max(+progress, 0), 100);
|
|
20750
20629
|
const circleStyle = () => {
|
|
20751
20630
|
const stopArr = stop2();
|
|
20752
20631
|
const stopDom = [];
|
|
@@ -20760,17 +20639,17 @@ const CircleProgress = (props) => {
|
|
|
20760
20639
|
});
|
|
20761
20640
|
}
|
|
20762
20641
|
const perimeter = 283;
|
|
20763
|
-
const
|
|
20764
|
-
const offset = perimeter * Number(format(parseFloat(
|
|
20642
|
+
const progress = +oldValue;
|
|
20643
|
+
const offset = perimeter * Number(format(parseFloat(progress.toFixed(1)))) / 100;
|
|
20765
20644
|
const isWise = props.clockwise ? 1 : 0;
|
|
20766
|
-
const
|
|
20645
|
+
const color2 = isObject(props.color) ? `url(%23${refRandomId})` : transColor(props.color);
|
|
20767
20646
|
const d = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
20768
20647
|
const pa = `%3Cdefs%3E%3ClinearGradient id='${refRandomId}' x1='100%25' y1='0%25' x2='0%25' y2='0%25'%3E${stopDom}%3C/linearGradient%3E%3C/defs%3E`;
|
|
20769
20648
|
const path = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke='${transColor(
|
|
20770
|
-
props.
|
|
20649
|
+
props.background
|
|
20771
20650
|
)}' fill='none'/%3E`;
|
|
20772
20651
|
const path1 = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${transColor(
|
|
20773
|
-
|
|
20652
|
+
color2
|
|
20774
20653
|
)}' fill='none'/%3E`;
|
|
20775
20654
|
return {
|
|
20776
20655
|
background: `url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E${pa}${path}${path1}%3C/svg%3E")`,
|
|
@@ -20780,10 +20659,7 @@ const CircleProgress = (props) => {
|
|
|
20780
20659
|
};
|
|
20781
20660
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style: styles, ...restProps, children: [
|
|
20782
20661
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: circleStyle() }),
|
|
20783
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children
|
|
20784
|
-
progress,
|
|
20785
|
-
"%"
|
|
20786
|
-
] }) })
|
|
20662
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children })
|
|
20787
20663
|
] });
|
|
20788
20664
|
};
|
|
20789
20665
|
CircleProgress.defaultProps = defaultProps$n;
|
|
@@ -21182,6 +21058,7 @@ const CountDown = React__default.forwardRef(InternalCountDown);
|
|
|
21182
21058
|
CountDown.defaultProps = defaultProps$k;
|
|
21183
21059
|
CountDown.displayName = "NutCountDown";
|
|
21184
21060
|
const defaultProps$j = {
|
|
21061
|
+
...ComponentDefaults,
|
|
21185
21062
|
content: "",
|
|
21186
21063
|
direction: "end",
|
|
21187
21064
|
rows: 1,
|
|
@@ -21190,20 +21067,22 @@ const defaultProps$j = {
|
|
|
21190
21067
|
symbol: "...",
|
|
21191
21068
|
lineHeight: "20"
|
|
21192
21069
|
};
|
|
21070
|
+
const classPrefix$1 = `nut-ellipsis`;
|
|
21193
21071
|
const Ellipsis = (props) => {
|
|
21194
21072
|
var _a, _b, _c, _d;
|
|
21195
|
-
useConfig$1();
|
|
21196
21073
|
const {
|
|
21197
21074
|
children,
|
|
21198
21075
|
content,
|
|
21199
21076
|
direction,
|
|
21200
21077
|
rows,
|
|
21078
|
+
className,
|
|
21201
21079
|
expandText,
|
|
21202
21080
|
collapseText,
|
|
21203
21081
|
symbol,
|
|
21204
21082
|
lineHeight,
|
|
21205
21083
|
onClick,
|
|
21206
|
-
onChange
|
|
21084
|
+
onChange,
|
|
21085
|
+
...rest
|
|
21207
21086
|
} = { ...defaultProps$j, ...props };
|
|
21208
21087
|
let maxHeight = 0;
|
|
21209
21088
|
const [exceeded, setExceeded] = useState(false);
|
|
@@ -21226,6 +21105,7 @@ const Ellipsis = (props) => {
|
|
|
21226
21105
|
const digitReg = /^[0-9]+$/;
|
|
21227
21106
|
const letterUpperReg = /^[A-Z]+$/;
|
|
21228
21107
|
const letterLowerReg = /^[a-z]+$/;
|
|
21108
|
+
const classes = classNames(classPrefix$1, className);
|
|
21229
21109
|
const init = () => {
|
|
21230
21110
|
setExceeded(false);
|
|
21231
21111
|
setExpanded(false);
|
|
@@ -21402,10 +21282,11 @@ const Ellipsis = (props) => {
|
|
|
21402
21282
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
21403
21283
|
"div",
|
|
21404
21284
|
{
|
|
21405
|
-
className:
|
|
21285
|
+
className: classes,
|
|
21406
21286
|
onClick: handleClick,
|
|
21407
21287
|
ref: root2,
|
|
21408
21288
|
id: `root${refRandomId}`,
|
|
21289
|
+
...rest,
|
|
21409
21290
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
21410
21291
|
!exceeded ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-ellipsis-wordbreak", children: content }) : null,
|
|
21411
21292
|
exceeded && !expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-ellipsis-wordbreak", children: [
|
|
@@ -22814,7 +22695,7 @@ const Table = (props) => {
|
|
|
22814
22695
|
children: [
|
|
22815
22696
|
item.title,
|
|
22816
22697
|
" ",
|
|
22817
|
-
item.sorter && (sorterIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$
|
|
22698
|
+
item.sorter && (sorterIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$m, { size: "12px" }))
|
|
22818
22699
|
]
|
|
22819
22700
|
},
|
|
22820
22701
|
item.key
|
|
@@ -22969,7 +22850,7 @@ const Tag = (props) => {
|
|
|
22969
22850
|
children: closeIcon
|
|
22970
22851
|
}
|
|
22971
22852
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22972
|
-
a$
|
|
22853
|
+
a$o,
|
|
22973
22854
|
{
|
|
22974
22855
|
size: 12,
|
|
22975
22856
|
onClick: (e) => {
|