@nutui/nutui-react 2.0.0-alpha.0 → 2.0.0-alpha.2
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 +35 -627
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Animate.js +6 -7
- package/dist/esm/Audio.js +18 -21
- package/dist/esm/Badge.js +15 -22
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Col.js +4 -3
- package/dist/esm/Divider.js +4 -3
- package/dist/esm/Drag.js +7 -9
- package/dist/esm/Elevator.js +38 -41
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/Menu.js +75 -73
- package/dist/esm/MenuItem.js +29 -27
- package/dist/esm/NavBar.js +17 -48
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Popup.js +23 -30
- package/dist/esm/Progress.js +20 -68
- package/dist/esm/Row.js +6 -5
- package/dist/esm/SideNavBar.js +0 -2
- package/dist/esm/Uploader.js +49 -52
- 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 +717 -832
- package/dist/nutui.react.umd.js +717 -832
- package/dist/packages/audio/audio.scss +2 -15
- package/dist/packages/badge/badge.scss +8 -17
- package/dist/packages/calendar/calendar.scss +0 -30
- package/dist/packages/elevator/elevator.scss +2 -28
- package/dist/packages/menu/menu.scss +44 -55
- package/dist/packages/menuitem/menuitem.scss +16 -26
- package/dist/packages/navbar/navbar.scss +16 -115
- package/dist/packages/popup/popup.scss +0 -16
- package/dist/packages/progress/progress.scss +19 -58
- package/dist/packages/row/row.scss +13 -31
- package/dist/packages/sidenavbar/sidenavbar.scss +0 -19
- package/dist/packages/uploader/uploader.scss +2 -28
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +23 -114
- package/dist/styles/variables.scss +31 -122
- package/dist/types/index.d.ts +43 -81
- package/package.json +1 -1
package/dist/nutui.react.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v2.0.0-alpha.
|
|
9
|
+
* @nutui/nutui-react v2.0.0-alpha.2 Wed Apr 26 2023 18:36:40 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -315,29 +315,29 @@ function sr() {
|
|
|
315
315
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
316
316
|
try {
|
|
317
317
|
Reflect.construct(o, []);
|
|
318
|
-
} catch (
|
|
319
|
-
n =
|
|
318
|
+
} catch (b) {
|
|
319
|
+
n = b;
|
|
320
320
|
}
|
|
321
321
|
Reflect.construct(e, [], o);
|
|
322
322
|
} else {
|
|
323
323
|
try {
|
|
324
324
|
o.call();
|
|
325
|
-
} catch (
|
|
326
|
-
n =
|
|
325
|
+
} catch (b) {
|
|
326
|
+
n = b;
|
|
327
327
|
}
|
|
328
328
|
e.call(o.prototype);
|
|
329
329
|
}
|
|
330
330
|
} else {
|
|
331
331
|
try {
|
|
332
332
|
throw Error();
|
|
333
|
-
} catch (
|
|
334
|
-
n =
|
|
333
|
+
} catch (b) {
|
|
334
|
+
n = b;
|
|
335
335
|
}
|
|
336
336
|
e();
|
|
337
337
|
}
|
|
338
|
-
} catch (
|
|
339
|
-
if (
|
|
340
|
-
for (var a2 =
|
|
338
|
+
} catch (b) {
|
|
339
|
+
if (b && n && typeof b.stack == "string") {
|
|
340
|
+
for (var a2 = b.stack.split(`
|
|
341
341
|
`), v = n.stack.split(`
|
|
342
342
|
`), s = a2.length - 1, f = v.length - 1; s >= 1 && f >= 0 && a2[s] !== v[f]; )
|
|
343
343
|
f--;
|
|
@@ -2274,15 +2274,15 @@ function requireReactJsxRuntime_production_min() {
|
|
|
2274
2274
|
hasRequiredReactJsxRuntime_production_min = 1;
|
|
2275
2275
|
var f = React__default, k2 = Symbol.for("react.element"), l2 = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
|
|
2276
2276
|
function q(c, a2, g) {
|
|
2277
|
-
var
|
|
2277
|
+
var b, d = {}, e = null, h = null;
|
|
2278
2278
|
void 0 !== g && (e = "" + g);
|
|
2279
2279
|
void 0 !== a2.key && (e = "" + a2.key);
|
|
2280
2280
|
void 0 !== a2.ref && (h = a2.ref);
|
|
2281
|
-
for (
|
|
2282
|
-
m.call(a2,
|
|
2281
|
+
for (b in a2)
|
|
2282
|
+
m.call(a2, b) && !p.hasOwnProperty(b) && (d[b] = a2[b]);
|
|
2283
2283
|
if (c && c.defaultProps)
|
|
2284
|
-
for (
|
|
2285
|
-
void 0 === d[
|
|
2284
|
+
for (b in a2 = c.defaultProps, a2)
|
|
2285
|
+
void 0 === d[b] && (d[b] = a2[b]);
|
|
2286
2286
|
return { $$typeof: k2, type: c, key: e, ref: h, props: d, _owner: n.current };
|
|
2287
2287
|
}
|
|
2288
2288
|
reactJsxRuntime_production_min.Fragment = l2;
|
|
@@ -3283,7 +3283,7 @@ const defaultProps$1q = {
|
|
|
3283
3283
|
onClick: (event) => {
|
|
3284
3284
|
}
|
|
3285
3285
|
};
|
|
3286
|
-
const classPrefix$
|
|
3286
|
+
const classPrefix$9 = "nut-cell";
|
|
3287
3287
|
const Cell = (props) => {
|
|
3288
3288
|
const {
|
|
3289
3289
|
children,
|
|
@@ -3312,26 +3312,26 @@ const Cell = (props) => {
|
|
|
3312
3312
|
flex: 1
|
|
3313
3313
|
};
|
|
3314
3314
|
return /* @__PURE__ */ jsx("div", {
|
|
3315
|
-
className: classNames(classPrefix$
|
|
3315
|
+
className: classNames(classPrefix$9, className),
|
|
3316
3316
|
onClick: (event) => handleClick2(event),
|
|
3317
3317
|
style: baseStyle,
|
|
3318
3318
|
...rest,
|
|
3319
3319
|
children: children || /* @__PURE__ */ jsxs(Fragment, {
|
|
3320
3320
|
children: [title || description ? /* @__PURE__ */ jsxs("div", {
|
|
3321
|
-
className: `${classPrefix$
|
|
3321
|
+
className: `${classPrefix$9}__left`,
|
|
3322
3322
|
children: [title ? /* @__PURE__ */ jsx("div", {
|
|
3323
|
-
className: `${classPrefix$
|
|
3323
|
+
className: `${classPrefix$9}__title`,
|
|
3324
3324
|
children: title
|
|
3325
3325
|
}) : null, description ? /* @__PURE__ */ jsx("div", {
|
|
3326
|
-
className: `${classPrefix$
|
|
3326
|
+
className: `${classPrefix$9}__description`,
|
|
3327
3327
|
children: description
|
|
3328
3328
|
}) : null]
|
|
3329
3329
|
}) : null, extra ? /* @__PURE__ */ jsx("div", {
|
|
3330
|
-
className: `${classPrefix$
|
|
3330
|
+
className: `${classPrefix$9}__extra`,
|
|
3331
3331
|
style: styles,
|
|
3332
3332
|
children: extra
|
|
3333
3333
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
3334
|
-
className: `${classPrefix$
|
|
3334
|
+
className: `${classPrefix$9}__divider`
|
|
3335
3335
|
})]
|
|
3336
3336
|
})
|
|
3337
3337
|
});
|
|
@@ -3343,7 +3343,7 @@ const defaultProps$1p = {
|
|
|
3343
3343
|
title: "",
|
|
3344
3344
|
description: ""
|
|
3345
3345
|
};
|
|
3346
|
-
const classPrefix$
|
|
3346
|
+
const classPrefix$8 = "nut-cell-group";
|
|
3347
3347
|
const CellGroup = (props) => {
|
|
3348
3348
|
const {
|
|
3349
3349
|
children,
|
|
@@ -3357,16 +3357,16 @@ const CellGroup = (props) => {
|
|
|
3357
3357
|
...props
|
|
3358
3358
|
};
|
|
3359
3359
|
return /* @__PURE__ */ jsxs("div", {
|
|
3360
|
-
className: classNames(classPrefix$
|
|
3360
|
+
className: classNames(classPrefix$8, className),
|
|
3361
3361
|
...rest,
|
|
3362
3362
|
children: [title ? /* @__PURE__ */ jsx("div", {
|
|
3363
|
-
className: `${classPrefix$
|
|
3363
|
+
className: `${classPrefix$8}__title`,
|
|
3364
3364
|
children: title
|
|
3365
3365
|
}) : null, description ? /* @__PURE__ */ jsx("div", {
|
|
3366
|
-
className: `${classPrefix$
|
|
3366
|
+
className: `${classPrefix$8}__description`,
|
|
3367
3367
|
children: description
|
|
3368
3368
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
3369
|
-
className: `${classPrefix$
|
|
3369
|
+
className: `${classPrefix$8}__wrap`,
|
|
3370
3370
|
children
|
|
3371
3371
|
})]
|
|
3372
3372
|
});
|
|
@@ -3846,7 +3846,7 @@ const defaultProps$1n = {
|
|
|
3846
3846
|
loading: true,
|
|
3847
3847
|
lazy: false
|
|
3848
3848
|
};
|
|
3849
|
-
const classPrefix$
|
|
3849
|
+
const classPrefix$7 = "nut-image";
|
|
3850
3850
|
const Image$1 = (props) => {
|
|
3851
3851
|
const {
|
|
3852
3852
|
className,
|
|
@@ -3975,7 +3975,7 @@ const Image$1 = (props) => {
|
|
|
3975
3975
|
return null;
|
|
3976
3976
|
}, [loading, innerLoading]);
|
|
3977
3977
|
return /* @__PURE__ */ jsxs("div", {
|
|
3978
|
-
className: classNames(classPrefix$
|
|
3978
|
+
className: classNames(classPrefix$7, className),
|
|
3979
3979
|
style: containerStyle,
|
|
3980
3980
|
onClick: (e) => {
|
|
3981
3981
|
imageClick(e);
|
|
@@ -4010,7 +4010,7 @@ const defaultOverlayProps = {
|
|
|
4010
4010
|
visible: false,
|
|
4011
4011
|
lockScroll: true
|
|
4012
4012
|
};
|
|
4013
|
-
const classPrefix$
|
|
4013
|
+
const classPrefix$6 = `nut-overlay`;
|
|
4014
4014
|
const Overlay = (props) => {
|
|
4015
4015
|
const {
|
|
4016
4016
|
children,
|
|
@@ -4053,7 +4053,7 @@ const Overlay = (props) => {
|
|
|
4053
4053
|
"overlay-fade-enter-active": visible,
|
|
4054
4054
|
"first-render": renderRef.current && !visible,
|
|
4055
4055
|
"hidden-render": !visible
|
|
4056
|
-
}, className, classPrefix$
|
|
4056
|
+
}, className, classPrefix$6);
|
|
4057
4057
|
const styles = {
|
|
4058
4058
|
zIndex,
|
|
4059
4059
|
animationDuration: `${props.duration}s`,
|
|
@@ -4160,7 +4160,7 @@ function requireReactIs_production_min() {
|
|
|
4160
4160
|
if (hasRequiredReactIs_production_min)
|
|
4161
4161
|
return reactIs_production_min;
|
|
4162
4162
|
hasRequiredReactIs_production_min = 1;
|
|
4163
|
-
var
|
|
4163
|
+
var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k2 = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x2 = b ? Symbol.for("react.responder") : 60118, y2 = b ? Symbol.for("react.scope") : 60119;
|
|
4164
4164
|
function z(a2) {
|
|
4165
4165
|
if ("object" === typeof a2 && null !== a2) {
|
|
4166
4166
|
var u = a2.$$typeof;
|
|
@@ -5829,138 +5829,17 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({},
|
|
|
5829
5829
|
onExited: propTypesExports.func
|
|
5830
5830
|
}) : {};
|
|
5831
5831
|
const CSSTransition$1 = CSSTransition;
|
|
5832
|
-
var classnameExports = {};
|
|
5833
|
-
var classname = {
|
|
5834
|
-
get exports() {
|
|
5835
|
-
return classnameExports;
|
|
5836
|
-
},
|
|
5837
|
-
set exports(v) {
|
|
5838
|
-
classnameExports = v;
|
|
5839
|
-
}
|
|
5840
|
-
};
|
|
5841
|
-
var classname_production_min = {};
|
|
5842
|
-
var hasRequiredClassname_production_min;
|
|
5843
|
-
function requireClassname_production_min() {
|
|
5844
|
-
if (hasRequiredClassname_production_min)
|
|
5845
|
-
return classname_production_min;
|
|
5846
|
-
hasRequiredClassname_production_min = 1;
|
|
5847
|
-
function r(r2) {
|
|
5848
|
-
function t2(t3, i, a2, o) {
|
|
5849
|
-
var f = i ? e + t3 + r2.e + i : e + t3, v = f;
|
|
5850
|
-
if (a2) {
|
|
5851
|
-
var s = " " + v + r2.m;
|
|
5852
|
-
for (var u in a2)
|
|
5853
|
-
if (a2.hasOwnProperty(u)) {
|
|
5854
|
-
var p = a2[u];
|
|
5855
|
-
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
5856
|
-
}
|
|
5857
|
-
}
|
|
5858
|
-
if (void 0 !== o)
|
|
5859
|
-
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
5860
|
-
var l2 = o[y2];
|
|
5861
|
-
if (l2 && "string" == typeof l2.valueOf())
|
|
5862
|
-
for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
5863
|
-
var h = g[d];
|
|
5864
|
-
h !== f && (v += " " + h);
|
|
5865
|
-
}
|
|
5866
|
-
}
|
|
5867
|
-
return v;
|
|
5868
|
-
}
|
|
5869
|
-
var e = r2.n || "", n = r2.v || r2.m;
|
|
5870
|
-
return function(r3, e2) {
|
|
5871
|
-
return function(n2, i, a2) {
|
|
5872
|
-
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r3, n2, void 0, i) : t2(r3, n2, i, a2) : t2(r3, e2, n2, i);
|
|
5873
|
-
};
|
|
5874
|
-
};
|
|
5875
|
-
}
|
|
5876
|
-
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
5877
|
-
var t = r({ e: "-", m: "_" });
|
|
5878
|
-
classname_production_min.cn = t, classname_production_min.withNaming = r;
|
|
5879
|
-
return classname_production_min;
|
|
5880
|
-
}
|
|
5881
|
-
var classname_development = {};
|
|
5882
|
-
var hasRequiredClassname_development;
|
|
5883
|
-
function requireClassname_development() {
|
|
5884
|
-
if (hasRequiredClassname_development)
|
|
5885
|
-
return classname_development;
|
|
5886
|
-
hasRequiredClassname_development = 1;
|
|
5887
|
-
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
5888
|
-
function withNaming(preset) {
|
|
5889
|
-
var nameSpace = preset.n || "";
|
|
5890
|
-
var modValueDelimiter = preset.v || preset.m;
|
|
5891
|
-
function stringify(b2, e, m, mix) {
|
|
5892
|
-
var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
|
|
5893
|
-
var className = entityName;
|
|
5894
|
-
if (m) {
|
|
5895
|
-
var modPrefix = " " + className + preset.m;
|
|
5896
|
-
for (var k2 in m) {
|
|
5897
|
-
if (m.hasOwnProperty(k2)) {
|
|
5898
|
-
var modVal = m[k2];
|
|
5899
|
-
if (modVal === true) {
|
|
5900
|
-
className += modPrefix + k2;
|
|
5901
|
-
} else if (modVal) {
|
|
5902
|
-
className += modPrefix + k2 + modValueDelimiter + modVal;
|
|
5903
|
-
}
|
|
5904
|
-
}
|
|
5905
|
-
}
|
|
5906
|
-
}
|
|
5907
|
-
if (mix !== void 0) {
|
|
5908
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
5909
|
-
for (var i = 0, len = mix.length; i < len; i++) {
|
|
5910
|
-
var value = mix[i];
|
|
5911
|
-
if (!value || typeof value.valueOf() !== "string")
|
|
5912
|
-
continue;
|
|
5913
|
-
var mixes = value.valueOf().split(" ");
|
|
5914
|
-
for (var j = 0; j < mixes.length; j++) {
|
|
5915
|
-
var val = mixes[j];
|
|
5916
|
-
if (val !== entityName) {
|
|
5917
|
-
className += " " + val;
|
|
5918
|
-
}
|
|
5919
|
-
}
|
|
5920
|
-
}
|
|
5921
|
-
}
|
|
5922
|
-
return className;
|
|
5923
|
-
}
|
|
5924
|
-
return function cnGenerator(b2, e) {
|
|
5925
|
-
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
5926
|
-
if (typeof elemOrMods === "string") {
|
|
5927
|
-
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
5928
|
-
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
5929
|
-
}
|
|
5930
|
-
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
5931
|
-
}
|
|
5932
|
-
return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
|
|
5933
|
-
};
|
|
5934
|
-
};
|
|
5935
|
-
}
|
|
5936
|
-
var cn2 = withNaming({
|
|
5937
|
-
e: "-",
|
|
5938
|
-
m: "_"
|
|
5939
|
-
});
|
|
5940
|
-
classname_development.cn = cn2;
|
|
5941
|
-
classname_development.withNaming = withNaming;
|
|
5942
|
-
return classname_development;
|
|
5943
|
-
}
|
|
5944
|
-
(function(module) {
|
|
5945
|
-
if (process.env.NODE_ENV === "production") {
|
|
5946
|
-
module.exports = requireClassname_production_min();
|
|
5947
|
-
} else {
|
|
5948
|
-
module.exports = requireClassname_development();
|
|
5949
|
-
}
|
|
5950
|
-
})(classname);
|
|
5951
|
-
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
5952
5832
|
const defaultProps$1m = {
|
|
5953
5833
|
...ComponentDefaults,
|
|
5954
5834
|
position: "center",
|
|
5955
5835
|
transition: "",
|
|
5956
5836
|
overlayStyle: {},
|
|
5957
|
-
|
|
5958
|
-
popClass: "",
|
|
5837
|
+
overlayClassName: "",
|
|
5959
5838
|
closeable: false,
|
|
5960
5839
|
closeIconPosition: "top-right",
|
|
5961
5840
|
closeIcon: "close",
|
|
5962
|
-
destroyOnClose:
|
|
5963
|
-
|
|
5841
|
+
destroyOnClose: false,
|
|
5842
|
+
portal: null,
|
|
5964
5843
|
overlay: true,
|
|
5965
5844
|
round: false,
|
|
5966
5845
|
onOpen: () => {
|
|
@@ -5969,14 +5848,8 @@ const defaultProps$1m = {
|
|
|
5969
5848
|
},
|
|
5970
5849
|
onClick: (e) => {
|
|
5971
5850
|
},
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
onClosed: (e) => {
|
|
5975
|
-
},
|
|
5976
|
-
onClickOverlay: (e) => {
|
|
5977
|
-
},
|
|
5978
|
-
onClickCloseIcon: (e) => {
|
|
5979
|
-
},
|
|
5851
|
+
onClickOverlay: (e) => true,
|
|
5852
|
+
onClickCloseIcon: (e) => true,
|
|
5980
5853
|
...defaultOverlayProps
|
|
5981
5854
|
};
|
|
5982
5855
|
let _zIndex = 1e3;
|
|
@@ -5987,7 +5860,7 @@ const Popup = (props) => {
|
|
|
5987
5860
|
overlay,
|
|
5988
5861
|
closeOnOverlayClick,
|
|
5989
5862
|
overlayStyle,
|
|
5990
|
-
|
|
5863
|
+
overlayClassName,
|
|
5991
5864
|
zIndex,
|
|
5992
5865
|
lockScroll,
|
|
5993
5866
|
duration,
|
|
@@ -5998,23 +5871,22 @@ const Popup = (props) => {
|
|
|
5998
5871
|
transition,
|
|
5999
5872
|
round,
|
|
6000
5873
|
position,
|
|
6001
|
-
popClass,
|
|
6002
5874
|
className,
|
|
6003
5875
|
destroyOnClose,
|
|
6004
|
-
|
|
5876
|
+
portal,
|
|
6005
5877
|
onOpen,
|
|
6006
5878
|
onClose,
|
|
6007
5879
|
onClickOverlay,
|
|
6008
5880
|
onClickCloseIcon,
|
|
6009
|
-
|
|
6010
|
-
|
|
5881
|
+
afterShow,
|
|
5882
|
+
afterClose,
|
|
6011
5883
|
onClick
|
|
6012
5884
|
} = props;
|
|
6013
5885
|
const [index, setIndex] = useState(zIndex || _zIndex);
|
|
6014
5886
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
6015
5887
|
const [showChildren, setShowChildren] = useState(true);
|
|
6016
5888
|
const [transitionName, setTransitionName] = useState("");
|
|
6017
|
-
const
|
|
5889
|
+
const classPrefix2 = "nut-popup";
|
|
6018
5890
|
const baseStyle = {
|
|
6019
5891
|
zIndex: index,
|
|
6020
5892
|
animationDuration: `${duration}s`
|
|
@@ -6027,15 +5899,15 @@ const Popup = (props) => {
|
|
|
6027
5899
|
...style,
|
|
6028
5900
|
...baseStyle
|
|
6029
5901
|
};
|
|
6030
|
-
const
|
|
5902
|
+
const popClassName = classNames({
|
|
6031
5903
|
round,
|
|
6032
|
-
[
|
|
6033
|
-
[`${
|
|
5904
|
+
[`${classPrefix2}`]: true,
|
|
5905
|
+
[`${classPrefix2}-${position}`]: true,
|
|
6034
5906
|
[`${className || ""}`]: true
|
|
6035
|
-
}
|
|
5907
|
+
});
|
|
6036
5908
|
const closeClasses = classNames({
|
|
6037
|
-
|
|
6038
|
-
[
|
|
5909
|
+
[`${classPrefix2}__close-icon`]: true,
|
|
5910
|
+
[`${classPrefix2}__close-icon--${closeIconPosition}`]: true
|
|
6039
5911
|
});
|
|
6040
5912
|
const open = () => {
|
|
6041
5913
|
if (!innerVisible) {
|
|
@@ -6053,29 +5925,29 @@ const Popup = (props) => {
|
|
|
6053
5925
|
if (destroyOnClose) {
|
|
6054
5926
|
setTimeout(() => {
|
|
6055
5927
|
setShowChildren(false);
|
|
6056
|
-
onClose && onClose();
|
|
6057
5928
|
}, Number(duration) * 1e3);
|
|
6058
5929
|
}
|
|
5930
|
+
onClose && onClose();
|
|
6059
5931
|
}
|
|
6060
5932
|
};
|
|
6061
5933
|
const onHandleClickOverlay = (e) => {
|
|
6062
5934
|
if (closeOnOverlayClick) {
|
|
6063
|
-
onClickOverlay && onClickOverlay(e);
|
|
6064
|
-
close();
|
|
5935
|
+
const closed = onClickOverlay && onClickOverlay(e);
|
|
5936
|
+
closed && close();
|
|
6065
5937
|
}
|
|
6066
5938
|
};
|
|
6067
5939
|
const onHandleClick = (e) => {
|
|
6068
5940
|
onClick && onClick(e);
|
|
6069
5941
|
};
|
|
6070
5942
|
const onHandleClickCloseIcon = (e) => {
|
|
6071
|
-
onClickCloseIcon && onClickCloseIcon(e);
|
|
6072
|
-
close();
|
|
5943
|
+
const closed = onClickCloseIcon && onClickCloseIcon(e);
|
|
5944
|
+
closed && close();
|
|
6073
5945
|
};
|
|
6074
5946
|
const onHandleOpened = (e) => {
|
|
6075
|
-
|
|
5947
|
+
afterShow && afterShow();
|
|
6076
5948
|
};
|
|
6077
5949
|
const onHandleClosed = (e) => {
|
|
6078
|
-
|
|
5950
|
+
afterClose && afterClose();
|
|
6079
5951
|
};
|
|
6080
5952
|
const resolveContainer = (getContainer) => {
|
|
6081
5953
|
const container = typeof getContainer === "function" ? getContainer() : getContainer;
|
|
@@ -6111,7 +5983,7 @@ const Popup = (props) => {
|
|
|
6111
5983
|
onExited: onHandleClosed,
|
|
6112
5984
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6113
5985
|
style: popStyles,
|
|
6114
|
-
className:
|
|
5986
|
+
className: popClassName,
|
|
6115
5987
|
onClick: onHandleClick,
|
|
6116
5988
|
children: [showChildren ? children : "", renderIcon()]
|
|
6117
5989
|
})
|
|
@@ -6122,7 +5994,7 @@ const Popup = (props) => {
|
|
|
6122
5994
|
children: overlay ? /* @__PURE__ */ jsxs(Fragment, {
|
|
6123
5995
|
children: [/* @__PURE__ */ jsx(Overlay, {
|
|
6124
5996
|
style: overlayStyles,
|
|
6125
|
-
className:
|
|
5997
|
+
className: overlayClassName,
|
|
6126
5998
|
visible: innerVisible,
|
|
6127
5999
|
closeOnOverlayClick,
|
|
6128
6000
|
zIndex,
|
|
@@ -6140,16 +6012,17 @@ const Popup = (props) => {
|
|
|
6140
6012
|
!visible && close();
|
|
6141
6013
|
}, [visible]);
|
|
6142
6014
|
useEffect(() => {
|
|
6143
|
-
setTransitionName(transition ||
|
|
6144
|
-
}, [position]);
|
|
6015
|
+
setTransitionName(transition || `${classPrefix2}-slide-${position}`);
|
|
6016
|
+
}, [position, transition]);
|
|
6145
6017
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
6146
|
-
children: renderToContainer(
|
|
6018
|
+
children: renderToContainer(portal, renderNode())
|
|
6147
6019
|
});
|
|
6148
6020
|
};
|
|
6149
6021
|
Popup.defaultProps = defaultProps$1m;
|
|
6150
6022
|
Popup.displayName = "NutPopup";
|
|
6151
6023
|
const DataContext$2 = createContext({});
|
|
6152
6024
|
const defaultProps$1l = {
|
|
6025
|
+
...ComponentDefaults,
|
|
6153
6026
|
span: "24",
|
|
6154
6027
|
offset: "0",
|
|
6155
6028
|
gutter: "0"
|
|
@@ -6157,7 +6030,7 @@ const defaultProps$1l = {
|
|
|
6157
6030
|
const Col = (props) => {
|
|
6158
6031
|
const {
|
|
6159
6032
|
className,
|
|
6160
|
-
style
|
|
6033
|
+
style,
|
|
6161
6034
|
span,
|
|
6162
6035
|
offset,
|
|
6163
6036
|
children,
|
|
@@ -6200,10 +6073,11 @@ const Col = (props) => {
|
|
|
6200
6073
|
Col.defaultProps = defaultProps$1l;
|
|
6201
6074
|
Col.displayName = "NutCol";
|
|
6202
6075
|
const defaultProps$1k = {
|
|
6076
|
+
...ComponentDefaults,
|
|
6203
6077
|
contentPosition: "center",
|
|
6204
6078
|
direction: "horizontal"
|
|
6205
6079
|
};
|
|
6206
|
-
const classPrefix$
|
|
6080
|
+
const classPrefix$5 = `nut-divider`;
|
|
6207
6081
|
const Divider = (props) => {
|
|
6208
6082
|
const {
|
|
6209
6083
|
children,
|
|
@@ -6217,14 +6091,14 @@ const Divider = (props) => {
|
|
|
6217
6091
|
...props
|
|
6218
6092
|
};
|
|
6219
6093
|
const classes = direction === "horizontal" ? classNames({
|
|
6220
|
-
[`${classPrefix$
|
|
6221
|
-
[`${classPrefix$
|
|
6222
|
-
[`${classPrefix$
|
|
6223
|
-
[`${classPrefix$
|
|
6224
|
-
[`${classPrefix$
|
|
6094
|
+
[`${classPrefix$5}`]: true,
|
|
6095
|
+
[`${classPrefix$5}__center`]: children,
|
|
6096
|
+
[`${classPrefix$5}__left`]: contentPosition === "left",
|
|
6097
|
+
[`${classPrefix$5}__right`]: contentPosition === "right",
|
|
6098
|
+
[`${classPrefix$5}__hairline`]: true
|
|
6225
6099
|
}) : classNames({
|
|
6226
|
-
[`${classPrefix$
|
|
6227
|
-
[`${classPrefix$
|
|
6100
|
+
[`${classPrefix$5}`]: true,
|
|
6101
|
+
[`${classPrefix$5}__vertical`]: direction === "vertical"
|
|
6228
6102
|
});
|
|
6229
6103
|
return /* @__PURE__ */ jsx("div", {
|
|
6230
6104
|
className: `${classes} ${className || ""}`,
|
|
@@ -6408,7 +6282,9 @@ const Layout = (props) => {
|
|
|
6408
6282
|
};
|
|
6409
6283
|
Layout.defaultProps = defaultProps$1h;
|
|
6410
6284
|
Layout.displayName = "NutLayout";
|
|
6285
|
+
const classPrefix$4 = "nut-row";
|
|
6411
6286
|
const defaultProps$1g = {
|
|
6287
|
+
...ComponentDefaults,
|
|
6412
6288
|
type: "",
|
|
6413
6289
|
justify: "start",
|
|
6414
6290
|
align: "flex-start",
|
|
@@ -6418,7 +6294,7 @@ const defaultProps$1g = {
|
|
|
6418
6294
|
const Row = (props) => {
|
|
6419
6295
|
const {
|
|
6420
6296
|
className,
|
|
6421
|
-
style
|
|
6297
|
+
style,
|
|
6422
6298
|
children,
|
|
6423
6299
|
type: type4,
|
|
6424
6300
|
justify,
|
|
@@ -6430,7 +6306,6 @@ const Row = (props) => {
|
|
|
6430
6306
|
...defaultProps$1g,
|
|
6431
6307
|
...props
|
|
6432
6308
|
};
|
|
6433
|
-
const prefixCls2 = "nut-row";
|
|
6434
6309
|
const getClass = (prefix2, type22) => {
|
|
6435
6310
|
const classType = type22 ? `nut-row-${prefix2}-${type22}` : "";
|
|
6436
6311
|
const className2 = prefix2 ? classType : `nut-row-${type22}`;
|
|
@@ -6442,7 +6317,7 @@ const Row = (props) => {
|
|
|
6442
6317
|
${getClass("justify", justify)}
|
|
6443
6318
|
${getClass("align", align)}
|
|
6444
6319
|
${getClass("flex", wrap)}
|
|
6445
|
-
${
|
|
6320
|
+
${classPrefix$4}
|
|
6446
6321
|
`;
|
|
6447
6322
|
};
|
|
6448
6323
|
const parentRow = {
|
|
@@ -6544,7 +6419,7 @@ const defaultProps$1f = {
|
|
|
6544
6419
|
threshold: 0,
|
|
6545
6420
|
zIndex: 2e3
|
|
6546
6421
|
};
|
|
6547
|
-
const classPrefix$
|
|
6422
|
+
const classPrefix$3 = "nut-sticky";
|
|
6548
6423
|
const Sticky = (props) => {
|
|
6549
6424
|
const {
|
|
6550
6425
|
position,
|
|
@@ -6674,7 +6549,7 @@ const Sticky = (props) => {
|
|
|
6674
6549
|
...style,
|
|
6675
6550
|
...rootStyle
|
|
6676
6551
|
},
|
|
6677
|
-
className: classNames(classPrefix$
|
|
6552
|
+
className: classNames(classPrefix$3, className),
|
|
6678
6553
|
...rest,
|
|
6679
6554
|
children: /* @__PURE__ */ jsx("div", {
|
|
6680
6555
|
className: "nut-sticky--box",
|
|
@@ -8786,17 +8661,17 @@ const is = {
|
|
|
8786
8661
|
num: (a2) => typeof a2 === "number",
|
|
8787
8662
|
und: (a2) => a2 === void 0
|
|
8788
8663
|
};
|
|
8789
|
-
function isEqual(a2,
|
|
8664
|
+
function isEqual(a2, b) {
|
|
8790
8665
|
if (is.arr(a2)) {
|
|
8791
|
-
if (!is.arr(
|
|
8666
|
+
if (!is.arr(b) || a2.length !== b.length)
|
|
8792
8667
|
return false;
|
|
8793
8668
|
for (let i = 0; i < a2.length; i++) {
|
|
8794
|
-
if (a2[i] !==
|
|
8669
|
+
if (a2[i] !== b[i])
|
|
8795
8670
|
return false;
|
|
8796
8671
|
}
|
|
8797
8672
|
return true;
|
|
8798
8673
|
}
|
|
8799
|
-
return a2 ===
|
|
8674
|
+
return a2 === b;
|
|
8800
8675
|
}
|
|
8801
8676
|
const each = (obj, fn) => obj.forEach(fn);
|
|
8802
8677
|
function eachProp(obj, fn, ctx2) {
|
|
@@ -9151,8 +9026,8 @@ function hslToRgb(h, s, l2) {
|
|
|
9151
9026
|
const p = 2 * l2 - q;
|
|
9152
9027
|
const r = hue2rgb(p, q, h + 1 / 3);
|
|
9153
9028
|
const g = hue2rgb(p, q, h);
|
|
9154
|
-
const
|
|
9155
|
-
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(
|
|
9029
|
+
const b = hue2rgb(p, q, h - 1 / 3);
|
|
9030
|
+
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
|
|
9156
9031
|
}
|
|
9157
9032
|
function parse255(str) {
|
|
9158
9033
|
const int = parseInt(str, 10);
|
|
@@ -9189,9 +9064,9 @@ function colorToRgba(input) {
|
|
|
9189
9064
|
int32Color = int32Color || 0;
|
|
9190
9065
|
let r = (int32Color & 4278190080) >>> 24;
|
|
9191
9066
|
let g = (int32Color & 16711680) >>> 16;
|
|
9192
|
-
let
|
|
9067
|
+
let b = (int32Color & 65280) >>> 8;
|
|
9193
9068
|
let a2 = (int32Color & 255) / 255;
|
|
9194
|
-
return `rgba(${r}, ${g}, ${
|
|
9069
|
+
return `rgba(${r}, ${g}, ${b}, ${a2})`;
|
|
9195
9070
|
}
|
|
9196
9071
|
const createInterpolator = (range3, output, extrapolate) => {
|
|
9197
9072
|
if (is.fun(range3)) {
|
|
@@ -11803,23 +11678,24 @@ const host = createHost(primitives, {
|
|
|
11803
11678
|
const animated = host.animated;
|
|
11804
11679
|
const elevatorContext = createContext({});
|
|
11805
11680
|
const defaultProps$1e = {
|
|
11681
|
+
...ComponentDefaults,
|
|
11806
11682
|
height: "200px",
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11683
|
+
floorKey: "title",
|
|
11684
|
+
list: [],
|
|
11685
|
+
sticky: false,
|
|
11810
11686
|
spaceHeight: 23,
|
|
11811
|
-
titleHeight: 35
|
|
11812
|
-
className: ""
|
|
11687
|
+
titleHeight: 35
|
|
11813
11688
|
};
|
|
11814
11689
|
const Elevator = (props) => {
|
|
11815
11690
|
const {
|
|
11816
11691
|
height,
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11692
|
+
floorKey,
|
|
11693
|
+
list,
|
|
11694
|
+
sticky,
|
|
11820
11695
|
spaceHeight,
|
|
11821
11696
|
titleHeight,
|
|
11822
11697
|
className,
|
|
11698
|
+
style,
|
|
11823
11699
|
onClickItem,
|
|
11824
11700
|
onClickIndex,
|
|
11825
11701
|
children,
|
|
@@ -11828,7 +11704,7 @@ const Elevator = (props) => {
|
|
|
11828
11704
|
...defaultProps$1e,
|
|
11829
11705
|
...props
|
|
11830
11706
|
};
|
|
11831
|
-
const
|
|
11707
|
+
const classPrefix2 = "nut-elevator";
|
|
11832
11708
|
const listview = useRef(null);
|
|
11833
11709
|
const initData = {
|
|
11834
11710
|
anchorIndex: 0,
|
|
@@ -11953,35 +11829,37 @@ const Elevator = (props) => {
|
|
|
11953
11829
|
}
|
|
11954
11830
|
}, [listview]);
|
|
11955
11831
|
return /* @__PURE__ */ jsxs("div", {
|
|
11956
|
-
className: `${
|
|
11832
|
+
className: `${classPrefix2} ${className}`,
|
|
11833
|
+
style,
|
|
11957
11834
|
...rest,
|
|
11958
|
-
children: [
|
|
11959
|
-
className:
|
|
11835
|
+
children: [sticky && scrollY > 0 ? /* @__PURE__ */ jsx("div", {
|
|
11836
|
+
className: `${classPrefix2}__list__fixed`,
|
|
11960
11837
|
children: /* @__PURE__ */ jsx("span", {
|
|
11961
|
-
className:
|
|
11962
|
-
children:
|
|
11838
|
+
className: `${classPrefix2}__list__fixed__title`,
|
|
11839
|
+
children: list[currentIndex][floorKey]
|
|
11963
11840
|
})
|
|
11964
11841
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
11965
|
-
className:
|
|
11842
|
+
className: `${classPrefix2}__list`,
|
|
11966
11843
|
style: {
|
|
11967
11844
|
height: Number.isNaN(+height) ? height : `${height}px`
|
|
11968
11845
|
},
|
|
11969
11846
|
children: /* @__PURE__ */ jsx("div", {
|
|
11970
|
-
className:
|
|
11847
|
+
className: `${classPrefix2}__list__inner`,
|
|
11971
11848
|
ref: listview,
|
|
11972
|
-
children:
|
|
11849
|
+
children: list.map((item, idx) => {
|
|
11973
11850
|
return /* @__PURE__ */ jsxs("div", {
|
|
11974
|
-
className:
|
|
11851
|
+
className: `${classPrefix2}__list__item`,
|
|
11975
11852
|
children: [/* @__PURE__ */ jsx("div", {
|
|
11976
|
-
className:
|
|
11977
|
-
children: item[
|
|
11853
|
+
className: `${classPrefix2}__list__item__code`,
|
|
11854
|
+
children: item[floorKey]
|
|
11978
11855
|
}), /* @__PURE__ */ jsx(Fragment, {
|
|
11979
11856
|
children: item.list.map((subitem) => {
|
|
11980
11857
|
return /* @__PURE__ */ jsx("div", {
|
|
11981
|
-
className:
|
|
11982
|
-
|
|
11858
|
+
className: classNames({
|
|
11859
|
+
[`${classPrefix2}__list__item__name`]: true,
|
|
11860
|
+
[`${classPrefix2}__list__item__name--highcolor`]: currentData.id === subitem.id && currentKey === item[floorKey]
|
|
11983
11861
|
}),
|
|
11984
|
-
onClick: () => handleClickItem(item[
|
|
11862
|
+
onClick: () => handleClickItem(item[floorKey], subitem),
|
|
11985
11863
|
children: children ? /* @__PURE__ */ jsx(Fragment, {
|
|
11986
11864
|
children: /* @__PURE__ */ jsx(elevatorContext.Provider, {
|
|
11987
11865
|
value: subitem,
|
|
@@ -11994,27 +11872,29 @@ const Elevator = (props) => {
|
|
|
11994
11872
|
}, idx);
|
|
11995
11873
|
})
|
|
11996
11874
|
})
|
|
11997
|
-
}),
|
|
11998
|
-
className:
|
|
11999
|
-
current: true
|
|
11875
|
+
}), list.length && scrollStart ? /* @__PURE__ */ jsx("div", {
|
|
11876
|
+
className: classNames({
|
|
11877
|
+
[`${classPrefix2}__code--current`]: true,
|
|
11878
|
+
[`${classPrefix2}__code--current--current`]: true
|
|
12000
11879
|
}),
|
|
12001
|
-
children:
|
|
11880
|
+
children: list[codeIndex][floorKey]
|
|
12002
11881
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
12003
|
-
className:
|
|
11882
|
+
className: `${classPrefix2}__bars`,
|
|
12004
11883
|
children: /* @__PURE__ */ jsx(animated.div, {
|
|
12005
|
-
className:
|
|
11884
|
+
className: `${classPrefix2}__bars__inner`,
|
|
12006
11885
|
...bind(),
|
|
12007
11886
|
style: {
|
|
12008
11887
|
touchAction: "pan-y"
|
|
12009
11888
|
},
|
|
12010
|
-
children:
|
|
11889
|
+
children: list.map((item, index) => {
|
|
12011
11890
|
return /* @__PURE__ */ jsx("div", {
|
|
12012
|
-
className:
|
|
12013
|
-
|
|
11891
|
+
className: classNames({
|
|
11892
|
+
[`${classPrefix2}__bars__inner__item`]: true,
|
|
11893
|
+
[`${classPrefix2}__bars__inner__item--active`]: item[floorKey] === list[currentIndex][floorKey]
|
|
12014
11894
|
}),
|
|
12015
11895
|
"data-index": index,
|
|
12016
|
-
onClick: () => handleClickIndex(item[
|
|
12017
|
-
children: item[
|
|
11896
|
+
onClick: () => handleClickIndex(item[floorKey]),
|
|
11897
|
+
children: item[floorKey]
|
|
12018
11898
|
}, index);
|
|
12019
11899
|
})
|
|
12020
11900
|
})
|
|
@@ -12120,7 +12000,7 @@ const defaultProps$1c = {
|
|
|
12120
12000
|
current: 1,
|
|
12121
12001
|
direction: "horizontal"
|
|
12122
12002
|
};
|
|
12123
|
-
const classPrefix$
|
|
12003
|
+
const classPrefix$2 = `nut-indicator`;
|
|
12124
12004
|
const Indicator = (props) => {
|
|
12125
12005
|
const {
|
|
12126
12006
|
total,
|
|
@@ -12134,17 +12014,17 @@ const Indicator = (props) => {
|
|
|
12134
12014
|
...props
|
|
12135
12015
|
};
|
|
12136
12016
|
const classes = classNames({
|
|
12137
|
-
[`${classPrefix$
|
|
12017
|
+
[`${classPrefix$2}__vertical`]: direction === "vertical"
|
|
12138
12018
|
});
|
|
12139
12019
|
const renderElement = () => {
|
|
12140
12020
|
const childs = [];
|
|
12141
12021
|
for (let item = 1; item <= total; item++) {
|
|
12142
12022
|
childs.push(item === current ? /* @__PURE__ */ jsx(Fragment, {
|
|
12143
12023
|
children: children || /* @__PURE__ */ jsx("div", {
|
|
12144
|
-
className: `${classPrefix$
|
|
12024
|
+
className: `${classPrefix$2}__dot ${classPrefix$2}__active`
|
|
12145
12025
|
}, item)
|
|
12146
12026
|
}) : /* @__PURE__ */ jsx("div", {
|
|
12147
|
-
className: `${classPrefix$
|
|
12027
|
+
className: `${classPrefix$2}__dot`
|
|
12148
12028
|
}, item));
|
|
12149
12029
|
}
|
|
12150
12030
|
return childs;
|
|
@@ -12159,21 +12039,19 @@ Indicator.defaultProps = defaultProps$1c;
|
|
|
12159
12039
|
Indicator.displayName = "NutIndicator";
|
|
12160
12040
|
const defaultProps$1b = {
|
|
12161
12041
|
...ComponentDefaults,
|
|
12162
|
-
className: "",
|
|
12163
|
-
style: {},
|
|
12164
12042
|
activeColor: "",
|
|
12165
|
-
|
|
12043
|
+
closeOnOverlayClick: true,
|
|
12166
12044
|
scrollFixed: false,
|
|
12167
12045
|
lockScroll: true,
|
|
12168
|
-
|
|
12046
|
+
icon: null
|
|
12169
12047
|
};
|
|
12170
12048
|
const Menu = (props) => {
|
|
12171
12049
|
const {
|
|
12172
12050
|
className,
|
|
12173
|
-
|
|
12051
|
+
icon,
|
|
12174
12052
|
scrollFixed,
|
|
12175
12053
|
lockScroll,
|
|
12176
|
-
|
|
12054
|
+
closeOnOverlayClick,
|
|
12177
12055
|
children,
|
|
12178
12056
|
activeColor,
|
|
12179
12057
|
...rest
|
|
@@ -12181,7 +12059,7 @@ const Menu = (props) => {
|
|
|
12181
12059
|
...defaultProps$1b,
|
|
12182
12060
|
...props
|
|
12183
12061
|
};
|
|
12184
|
-
const
|
|
12062
|
+
const menuRef = useRef(null);
|
|
12185
12063
|
const [isScrollFixed, setIsScrollFixed] = useState(false);
|
|
12186
12064
|
const getScrollTop = (el) => {
|
|
12187
12065
|
return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
|
|
@@ -12200,99 +12078,101 @@ const Menu = (props) => {
|
|
|
12200
12078
|
}
|
|
12201
12079
|
return () => window.removeEventListener("scroll", onScroll);
|
|
12202
12080
|
}, []);
|
|
12203
|
-
const [
|
|
12204
|
-
const [
|
|
12205
|
-
const
|
|
12206
|
-
|
|
12207
|
-
const temp =
|
|
12208
|
-
|
|
12081
|
+
const [showMenuItem, setShowMenuItem] = useState([]);
|
|
12082
|
+
const [menuItemTitle, setMenuItemTitle] = useState([]);
|
|
12083
|
+
const toggleMenuItem = (index) => {
|
|
12084
|
+
showMenuItem[index] = !showMenuItem[index];
|
|
12085
|
+
const temp = showMenuItem.map((i, idx) => idx === index ? i : false);
|
|
12086
|
+
setShowMenuItem([...temp]);
|
|
12209
12087
|
};
|
|
12210
|
-
const
|
|
12211
|
-
|
|
12212
|
-
|
|
12088
|
+
const hideMenuItem = (index) => {
|
|
12089
|
+
showMenuItem[index] = false;
|
|
12090
|
+
setShowMenuItem([...showMenuItem]);
|
|
12213
12091
|
};
|
|
12214
12092
|
const updateTitle = (text, index) => {
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
};
|
|
12218
|
-
const parent = () => {
|
|
12219
|
-
return parentRef;
|
|
12093
|
+
menuItemTitle[index] = text;
|
|
12094
|
+
setMenuItemTitle([...menuItemTitle]);
|
|
12220
12095
|
};
|
|
12221
12096
|
const cloneChildren = () => {
|
|
12222
12097
|
return React__default.Children.map(children, (child, index) => {
|
|
12223
12098
|
return React__default.cloneElement(child, {
|
|
12224
|
-
|
|
12225
|
-
|
|
12099
|
+
show: showMenuItem[index],
|
|
12100
|
+
index,
|
|
12226
12101
|
activeColor,
|
|
12227
12102
|
parent: {
|
|
12228
|
-
|
|
12103
|
+
closeOnOverlayClick,
|
|
12229
12104
|
lockScroll,
|
|
12230
|
-
|
|
12105
|
+
toggleMenuItem,
|
|
12231
12106
|
updateTitle,
|
|
12232
|
-
|
|
12233
|
-
|
|
12107
|
+
hideMenuItem,
|
|
12108
|
+
menuRef
|
|
12234
12109
|
}
|
|
12235
12110
|
});
|
|
12236
12111
|
});
|
|
12237
12112
|
};
|
|
12113
|
+
const menuTitle = () => {
|
|
12114
|
+
return React__default.Children.map(children, (child, index) => {
|
|
12115
|
+
if (React__default.isValidElement(child)) {
|
|
12116
|
+
const {
|
|
12117
|
+
title,
|
|
12118
|
+
options: options2,
|
|
12119
|
+
value,
|
|
12120
|
+
disabled,
|
|
12121
|
+
direction
|
|
12122
|
+
} = child.props;
|
|
12123
|
+
const selected = options2 == null ? void 0 : options2.filter((option) => option.value === value);
|
|
12124
|
+
const finallyTitle = () => {
|
|
12125
|
+
if (title)
|
|
12126
|
+
return title;
|
|
12127
|
+
if (menuItemTitle && menuItemTitle[index])
|
|
12128
|
+
return menuItemTitle[index];
|
|
12129
|
+
if (selected && selected.length && selected[0].text)
|
|
12130
|
+
return selected[0].text;
|
|
12131
|
+
return "";
|
|
12132
|
+
};
|
|
12133
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12134
|
+
className: classNames("nut-menu__item ", className, {
|
|
12135
|
+
active: showMenuItem[index],
|
|
12136
|
+
disabled
|
|
12137
|
+
}),
|
|
12138
|
+
style: {
|
|
12139
|
+
color: showMenuItem[index] ? activeColor : ""
|
|
12140
|
+
},
|
|
12141
|
+
onClick: () => {
|
|
12142
|
+
!disabled && toggleMenuItem(index);
|
|
12143
|
+
},
|
|
12144
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
12145
|
+
className: classNames("nut-menu__title ", {
|
|
12146
|
+
active: showMenuItem[index],
|
|
12147
|
+
disabled
|
|
12148
|
+
}),
|
|
12149
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
12150
|
+
className: "nut-menu__title-text",
|
|
12151
|
+
children: finallyTitle()
|
|
12152
|
+
}), icon || (direction === "up" ? /* @__PURE__ */ jsx(x$g, {
|
|
12153
|
+
className: "nut-menu__title-icon"
|
|
12154
|
+
}) : /* @__PURE__ */ jsx(y$8, {
|
|
12155
|
+
className: "nut-menu__title-icon"
|
|
12156
|
+
}))]
|
|
12157
|
+
})
|
|
12158
|
+
}, index);
|
|
12159
|
+
}
|
|
12160
|
+
return null;
|
|
12161
|
+
});
|
|
12162
|
+
};
|
|
12238
12163
|
return /* @__PURE__ */ jsx("div", {
|
|
12239
|
-
className: `nut-menu ${className} ${isScrollFixed ? "scroll-fixed" : ""}`,
|
|
12240
12164
|
...rest,
|
|
12241
|
-
|
|
12165
|
+
className: classNames(`nut-menu`, className, {
|
|
12166
|
+
"scroll-fixed": isScrollFixed
|
|
12167
|
+
}),
|
|
12168
|
+
ref: menuRef,
|
|
12242
12169
|
children: /* @__PURE__ */ jsxs("div", {
|
|
12243
12170
|
className: "nut-menu-relative",
|
|
12244
12171
|
children: [/* @__PURE__ */ jsx("div", {
|
|
12245
|
-
className:
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
const {
|
|
12250
|
-
disabled,
|
|
12251
|
-
title,
|
|
12252
|
-
value,
|
|
12253
|
-
direction,
|
|
12254
|
-
options: options2,
|
|
12255
|
-
className: className2
|
|
12256
|
-
} = child.props;
|
|
12257
|
-
const currentTitle = options2 == null ? void 0 : options2.filter((option) => option.value === value);
|
|
12258
|
-
function finallyTitle() {
|
|
12259
|
-
if (title)
|
|
12260
|
-
return title;
|
|
12261
|
-
if (itemTitle && itemTitle[index])
|
|
12262
|
-
return itemTitle[index];
|
|
12263
|
-
if (currentTitle && currentTitle[0] && currentTitle[0].text)
|
|
12264
|
-
return currentTitle[0].text;
|
|
12265
|
-
return "";
|
|
12266
|
-
}
|
|
12267
|
-
return /* @__PURE__ */ jsx("div", {
|
|
12268
|
-
className: `nut-menu__item ${classNames({
|
|
12269
|
-
active: itemShow[index],
|
|
12270
|
-
disabled
|
|
12271
|
-
})} ${className2}`,
|
|
12272
|
-
style: {
|
|
12273
|
-
color: itemShow[index] ? activeColor : ""
|
|
12274
|
-
},
|
|
12275
|
-
onClick: () => {
|
|
12276
|
-
!disabled && toggleItemShow(index);
|
|
12277
|
-
},
|
|
12278
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
12279
|
-
className: `nut-menu__title ${classNames({
|
|
12280
|
-
active: itemShow[index],
|
|
12281
|
-
disabled
|
|
12282
|
-
})}`,
|
|
12283
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
12284
|
-
className: "nut-menu__title-text",
|
|
12285
|
-
children: finallyTitle()
|
|
12286
|
-
}), titleIcon || /* @__PURE__ */ jsx(Fragment, {
|
|
12287
|
-
children: direction === "up" ? /* @__PURE__ */ jsx(x$g, {
|
|
12288
|
-
className: "nut-menu__title-icon"
|
|
12289
|
-
}) : /* @__PURE__ */ jsx(y$8, {
|
|
12290
|
-
className: "nut-menu__title-icon"
|
|
12291
|
-
})
|
|
12292
|
-
})]
|
|
12293
|
-
})
|
|
12294
|
-
}, index);
|
|
12295
|
-
})
|
|
12172
|
+
className: classNames("nut-menu__bar", {
|
|
12173
|
+
opened: showMenuItem.includes(true)
|
|
12174
|
+
}),
|
|
12175
|
+
children: menuTitle()
|
|
12296
12176
|
}), cloneChildren()]
|
|
12297
12177
|
})
|
|
12298
12178
|
});
|
|
@@ -12301,52 +12181,47 @@ Menu.defaultProps = defaultProps$1b;
|
|
|
12301
12181
|
Menu.displayName = "NutMenu";
|
|
12302
12182
|
const defaultProps$1a = {
|
|
12303
12183
|
...ComponentDefaults,
|
|
12304
|
-
className: "",
|
|
12305
|
-
style: {},
|
|
12306
12184
|
columns: 1,
|
|
12307
12185
|
direction: "down",
|
|
12308
|
-
|
|
12186
|
+
icon: null,
|
|
12187
|
+
closeOnClickAway: false,
|
|
12309
12188
|
activeTitleClass: "",
|
|
12310
12189
|
inactiveTitleClass: "",
|
|
12311
12190
|
onChange: (value) => void 0
|
|
12312
12191
|
};
|
|
12313
12192
|
const MenuItem = forwardRef((props, ref) => {
|
|
12314
|
-
const mergedProps = {
|
|
12315
|
-
...defaultProps$1a,
|
|
12316
|
-
...props
|
|
12317
|
-
};
|
|
12318
12193
|
const {
|
|
12194
|
+
className,
|
|
12319
12195
|
style,
|
|
12320
12196
|
options: options2,
|
|
12321
12197
|
value,
|
|
12322
12198
|
columns,
|
|
12323
12199
|
title,
|
|
12324
|
-
|
|
12200
|
+
icon,
|
|
12325
12201
|
direction,
|
|
12326
12202
|
onChange,
|
|
12327
12203
|
activeTitleClass,
|
|
12328
12204
|
inactiveTitleClass,
|
|
12329
|
-
|
|
12205
|
+
closeOnClickAway,
|
|
12206
|
+
children,
|
|
12207
|
+
activeColor,
|
|
12208
|
+
show,
|
|
12209
|
+
parent,
|
|
12210
|
+
index
|
|
12330
12211
|
} = {
|
|
12331
12212
|
...defaultProps$1a,
|
|
12332
12213
|
...props
|
|
12333
12214
|
};
|
|
12334
|
-
const
|
|
12335
|
-
activeColor,
|
|
12336
|
-
showPopup,
|
|
12337
|
-
parent,
|
|
12338
|
-
orderKey
|
|
12339
|
-
} = mergedProps;
|
|
12340
|
-
const [_showPopup, setShowPopup] = useState(showPopup);
|
|
12215
|
+
const [_showPopup, setShowPopup] = useState(show);
|
|
12341
12216
|
const [_value, setValue] = useState(value);
|
|
12342
12217
|
useEffect(() => {
|
|
12343
|
-
setShowPopup(
|
|
12344
|
-
}, [
|
|
12218
|
+
setShowPopup(show);
|
|
12219
|
+
}, [show]);
|
|
12345
12220
|
useEffect(() => {
|
|
12346
12221
|
getParentOffset();
|
|
12347
12222
|
}, [_showPopup]);
|
|
12348
12223
|
useImperativeHandle(ref, () => ({
|
|
12349
|
-
toggle: parent.
|
|
12224
|
+
toggle: parent.toggleMenuItem
|
|
12350
12225
|
}));
|
|
12351
12226
|
const getIconCName = (optionVal, value2) => {
|
|
12352
12227
|
return classNames({
|
|
@@ -12356,11 +12231,11 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
12356
12231
|
};
|
|
12357
12232
|
const setTitle = (text) => {
|
|
12358
12233
|
if (!title) {
|
|
12359
|
-
parent.updateTitle(text,
|
|
12234
|
+
parent.updateTitle(text, index);
|
|
12360
12235
|
}
|
|
12361
12236
|
};
|
|
12362
12237
|
const handleClick2 = (item) => {
|
|
12363
|
-
parent.
|
|
12238
|
+
parent.toggleMenuItem(index);
|
|
12364
12239
|
setTitle(item.text);
|
|
12365
12240
|
setValue(item.value);
|
|
12366
12241
|
onChange && onChange(item);
|
|
@@ -12371,7 +12246,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
12371
12246
|
});
|
|
12372
12247
|
const getParentOffset = () => {
|
|
12373
12248
|
setTimeout(() => {
|
|
12374
|
-
const p = parent.
|
|
12249
|
+
const p = parent.menuRef.current;
|
|
12375
12250
|
const rect = p.getBoundingClientRect();
|
|
12376
12251
|
setPosition({
|
|
12377
12252
|
height: rect.height,
|
|
@@ -12398,37 +12273,40 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
12398
12273
|
if (direction === "down") {
|
|
12399
12274
|
return {
|
|
12400
12275
|
height: `${position.top + position.height}px`,
|
|
12401
|
-
|
|
12402
|
-
...
|
|
12276
|
+
top: 0,
|
|
12277
|
+
...isShow()
|
|
12403
12278
|
};
|
|
12404
12279
|
}
|
|
12405
12280
|
return {
|
|
12406
12281
|
height: `${window.innerHeight - position.top}px`,
|
|
12282
|
+
bottom: `0px`,
|
|
12407
12283
|
top: "auto",
|
|
12408
|
-
...isShow()
|
|
12409
|
-
...style
|
|
12284
|
+
...isShow()
|
|
12410
12285
|
};
|
|
12411
12286
|
};
|
|
12412
12287
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
12413
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
12288
|
+
children: [closeOnClickAway ? /* @__PURE__ */ jsx("div", {
|
|
12414
12289
|
className: `placeholder-element ${classNames({
|
|
12415
12290
|
up: direction === "up"
|
|
12416
12291
|
})}`,
|
|
12417
12292
|
style: placeholderStyle(),
|
|
12418
|
-
onClick: () => parent.
|
|
12419
|
-
}), /* @__PURE__ */ jsx(Overlay, {
|
|
12293
|
+
onClick: () => parent.toggleMenuItem(index)
|
|
12294
|
+
}) : null, /* @__PURE__ */ jsx(Overlay, {
|
|
12420
12295
|
className: "nut-menu__overlay",
|
|
12421
12296
|
style: getPosition(),
|
|
12422
12297
|
lockScroll: parent.lockScroll,
|
|
12423
12298
|
visible: _showPopup,
|
|
12424
|
-
closeOnOverlayClick: parent.
|
|
12299
|
+
closeOnOverlayClick: parent.closeOnOverlayClick,
|
|
12425
12300
|
onClick: () => {
|
|
12426
|
-
parent.
|
|
12301
|
+
parent.closeOnOverlayClick && parent.toggleMenuItem(index);
|
|
12427
12302
|
}
|
|
12428
12303
|
}), /* @__PURE__ */ jsx("div", {
|
|
12429
|
-
className:
|
|
12304
|
+
className: classNames(className, {
|
|
12305
|
+
"nut-menu-item__wrap": direction === "down",
|
|
12306
|
+
"nut-menu-item__wrap-up": direction !== "down"
|
|
12307
|
+
}),
|
|
12430
12308
|
style: {
|
|
12431
|
-
|
|
12309
|
+
...style,
|
|
12432
12310
|
...isShow()
|
|
12433
12311
|
},
|
|
12434
12312
|
children: /* @__PURE__ */ jsx(CSSTransition$1, {
|
|
@@ -12437,7 +12315,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
12437
12315
|
classNames: direction === "down" ? "menu-item" : "menu-item-up",
|
|
12438
12316
|
children: /* @__PURE__ */ jsxs("div", {
|
|
12439
12317
|
className: "nut-menu-item__content",
|
|
12440
|
-
children: [options2 == null ? void 0 : options2.map((item,
|
|
12318
|
+
children: [options2 == null ? void 0 : options2.map((item, index2) => {
|
|
12441
12319
|
return /* @__PURE__ */ jsxs("div", {
|
|
12442
12320
|
className: `nut-menu-item__option ${classNames({
|
|
12443
12321
|
active: item.value === _value
|
|
@@ -12449,7 +12327,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
12449
12327
|
handleClick2(item);
|
|
12450
12328
|
},
|
|
12451
12329
|
children: [item.value === _value ? /* @__PURE__ */ jsx("i", {
|
|
12452
|
-
children:
|
|
12330
|
+
children: icon || /* @__PURE__ */ jsx(x$e, {
|
|
12453
12331
|
color: activeColor,
|
|
12454
12332
|
className: getIconCName(item.value, value)
|
|
12455
12333
|
})
|
|
@@ -12471,48 +12349,32 @@ MenuItem.defaultProps = defaultProps$1a;
|
|
|
12471
12349
|
MenuItem.displayName = "NutMenuItem";
|
|
12472
12350
|
const defaultProps$19 = {
|
|
12473
12351
|
...ComponentDefaults,
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
className: "",
|
|
12478
|
-
leftText: "",
|
|
12352
|
+
left: "",
|
|
12353
|
+
right: "",
|
|
12354
|
+
back: "",
|
|
12479
12355
|
fixed: false,
|
|
12480
12356
|
safeAreaInsetTop: false,
|
|
12481
|
-
border: false,
|
|
12482
12357
|
placeholder: false,
|
|
12483
|
-
zIndex: 10
|
|
12484
|
-
style: {}
|
|
12358
|
+
zIndex: 10
|
|
12485
12359
|
};
|
|
12486
12360
|
const NavBar = (props) => {
|
|
12487
12361
|
const {
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
leftShow,
|
|
12362
|
+
right,
|
|
12363
|
+
left,
|
|
12491
12364
|
className,
|
|
12492
12365
|
style,
|
|
12493
|
-
|
|
12366
|
+
back,
|
|
12494
12367
|
fixed,
|
|
12495
12368
|
safeAreaInsetTop,
|
|
12496
|
-
border,
|
|
12497
12369
|
placeholder,
|
|
12498
12370
|
zIndex,
|
|
12499
|
-
|
|
12500
|
-
onClickIcon,
|
|
12501
|
-
onClickBack,
|
|
12502
|
-
onClickRight
|
|
12371
|
+
onClickBack
|
|
12503
12372
|
} = {
|
|
12504
12373
|
...defaultProps$19,
|
|
12505
12374
|
...props
|
|
12506
12375
|
};
|
|
12507
|
-
const
|
|
12376
|
+
const classPrefix2 = "nut-navbar";
|
|
12508
12377
|
const children = Array.isArray(props.children) ? props.children : [props.children];
|
|
12509
|
-
const slot = children.reduce((slot2, item) => {
|
|
12510
|
-
const data = slot2;
|
|
12511
|
-
if (item && item.props) {
|
|
12512
|
-
data[item.props.slot] = item.props.children;
|
|
12513
|
-
}
|
|
12514
|
-
return data;
|
|
12515
|
-
}, {});
|
|
12516
12378
|
const styles = () => {
|
|
12517
12379
|
return {
|
|
12518
12380
|
...style,
|
|
@@ -12521,38 +12383,24 @@ const NavBar = (props) => {
|
|
|
12521
12383
|
};
|
|
12522
12384
|
const renderLeft = () => {
|
|
12523
12385
|
return /* @__PURE__ */ jsxs("div", {
|
|
12524
|
-
className: `${
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
}),
|
|
12530
|
-
className: `${b2("text")}`,
|
|
12531
|
-
children: leftText
|
|
12532
|
-
}), slot.left]
|
|
12386
|
+
className: `${classPrefix2}__left`,
|
|
12387
|
+
children: [back && /* @__PURE__ */ jsx("div", {
|
|
12388
|
+
className: `${classPrefix2}__left__back`,
|
|
12389
|
+
onClick: (e) => onClickBack(e),
|
|
12390
|
+
children: back
|
|
12391
|
+
}), left]
|
|
12533
12392
|
});
|
|
12534
12393
|
};
|
|
12535
12394
|
const renderContent = () => {
|
|
12536
|
-
return /* @__PURE__ */
|
|
12537
|
-
className: `${
|
|
12538
|
-
children
|
|
12539
|
-
className: "title",
|
|
12540
|
-
onClick: (e) => onClickTitle(e),
|
|
12541
|
-
children: title
|
|
12542
|
-
}), slot.titleIcon && /* @__PURE__ */ jsx("div", {
|
|
12543
|
-
onClick: (e) => onClickIcon(e),
|
|
12544
|
-
children: slot.titleIcon
|
|
12545
|
-
}), slot.content]
|
|
12395
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12396
|
+
className: `${classPrefix2}__title`,
|
|
12397
|
+
children
|
|
12546
12398
|
});
|
|
12547
12399
|
};
|
|
12548
12400
|
const renderRight = () => {
|
|
12549
|
-
return /* @__PURE__ */
|
|
12550
|
-
className: `${
|
|
12551
|
-
|
|
12552
|
-
children: [description && /* @__PURE__ */ jsx("div", {
|
|
12553
|
-
className: `${b2("text")}`,
|
|
12554
|
-
children: description
|
|
12555
|
-
}), slot.right]
|
|
12401
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12402
|
+
className: `${classPrefix2}__right`,
|
|
12403
|
+
children: right
|
|
12556
12404
|
});
|
|
12557
12405
|
};
|
|
12558
12406
|
const renderWrapper = () => {
|
|
@@ -12563,14 +12411,13 @@ const NavBar = (props) => {
|
|
|
12563
12411
|
});
|
|
12564
12412
|
};
|
|
12565
12413
|
const classes = classNames({
|
|
12566
|
-
[
|
|
12567
|
-
[
|
|
12568
|
-
[`nut-navbar--safe-area-inset-top`]: safeAreaInsetTop
|
|
12414
|
+
[`${classPrefix2}--fixed`]: fixed,
|
|
12415
|
+
[`${classPrefix2}--safe-area-inset-top`]: safeAreaInsetTop
|
|
12569
12416
|
});
|
|
12570
|
-
const cls = classNames(
|
|
12417
|
+
const cls = classNames(classPrefix2, classes, className);
|
|
12571
12418
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
12572
12419
|
children: fixed && placeholder ? /* @__PURE__ */ jsx("div", {
|
|
12573
|
-
className: `${
|
|
12420
|
+
className: `${classPrefix2}--placeholder`,
|
|
12574
12421
|
children: renderWrapper()
|
|
12575
12422
|
}) : renderWrapper()
|
|
12576
12423
|
});
|
|
@@ -12735,7 +12582,6 @@ const defaultProps$17 = {
|
|
|
12735
12582
|
width: "80%"
|
|
12736
12583
|
};
|
|
12737
12584
|
const SideNavBar = (props) => {
|
|
12738
|
-
useConfig();
|
|
12739
12585
|
const {
|
|
12740
12586
|
title,
|
|
12741
12587
|
visible,
|
|
@@ -12884,6 +12730,126 @@ const SubSideNavBar = (props) => {
|
|
|
12884
12730
|
})]
|
|
12885
12731
|
});
|
|
12886
12732
|
};
|
|
12733
|
+
var classnameExports = {};
|
|
12734
|
+
var classname = {
|
|
12735
|
+
get exports() {
|
|
12736
|
+
return classnameExports;
|
|
12737
|
+
},
|
|
12738
|
+
set exports(v) {
|
|
12739
|
+
classnameExports = v;
|
|
12740
|
+
}
|
|
12741
|
+
};
|
|
12742
|
+
var classname_production_min = {};
|
|
12743
|
+
var hasRequiredClassname_production_min;
|
|
12744
|
+
function requireClassname_production_min() {
|
|
12745
|
+
if (hasRequiredClassname_production_min)
|
|
12746
|
+
return classname_production_min;
|
|
12747
|
+
hasRequiredClassname_production_min = 1;
|
|
12748
|
+
function r(r2) {
|
|
12749
|
+
function t2(t3, i, a2, o) {
|
|
12750
|
+
var f = i ? e + t3 + r2.e + i : e + t3, v = f;
|
|
12751
|
+
if (a2) {
|
|
12752
|
+
var s = " " + v + r2.m;
|
|
12753
|
+
for (var u in a2)
|
|
12754
|
+
if (a2.hasOwnProperty(u)) {
|
|
12755
|
+
var p = a2[u];
|
|
12756
|
+
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
12757
|
+
}
|
|
12758
|
+
}
|
|
12759
|
+
if (void 0 !== o)
|
|
12760
|
+
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
12761
|
+
var l2 = o[y2];
|
|
12762
|
+
if (l2 && "string" == typeof l2.valueOf())
|
|
12763
|
+
for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
12764
|
+
var h = g[d];
|
|
12765
|
+
h !== f && (v += " " + h);
|
|
12766
|
+
}
|
|
12767
|
+
}
|
|
12768
|
+
return v;
|
|
12769
|
+
}
|
|
12770
|
+
var e = r2.n || "", n = r2.v || r2.m;
|
|
12771
|
+
return function(r3, e2) {
|
|
12772
|
+
return function(n2, i, a2) {
|
|
12773
|
+
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r3, n2, void 0, i) : t2(r3, n2, i, a2) : t2(r3, e2, n2, i);
|
|
12774
|
+
};
|
|
12775
|
+
};
|
|
12776
|
+
}
|
|
12777
|
+
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
12778
|
+
var t = r({ e: "-", m: "_" });
|
|
12779
|
+
classname_production_min.cn = t, classname_production_min.withNaming = r;
|
|
12780
|
+
return classname_production_min;
|
|
12781
|
+
}
|
|
12782
|
+
var classname_development = {};
|
|
12783
|
+
var hasRequiredClassname_development;
|
|
12784
|
+
function requireClassname_development() {
|
|
12785
|
+
if (hasRequiredClassname_development)
|
|
12786
|
+
return classname_development;
|
|
12787
|
+
hasRequiredClassname_development = 1;
|
|
12788
|
+
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
12789
|
+
function withNaming(preset) {
|
|
12790
|
+
var nameSpace = preset.n || "";
|
|
12791
|
+
var modValueDelimiter = preset.v || preset.m;
|
|
12792
|
+
function stringify(b, e, m, mix) {
|
|
12793
|
+
var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
|
|
12794
|
+
var className = entityName;
|
|
12795
|
+
if (m) {
|
|
12796
|
+
var modPrefix = " " + className + preset.m;
|
|
12797
|
+
for (var k2 in m) {
|
|
12798
|
+
if (m.hasOwnProperty(k2)) {
|
|
12799
|
+
var modVal = m[k2];
|
|
12800
|
+
if (modVal === true) {
|
|
12801
|
+
className += modPrefix + k2;
|
|
12802
|
+
} else if (modVal) {
|
|
12803
|
+
className += modPrefix + k2 + modValueDelimiter + modVal;
|
|
12804
|
+
}
|
|
12805
|
+
}
|
|
12806
|
+
}
|
|
12807
|
+
}
|
|
12808
|
+
if (mix !== void 0) {
|
|
12809
|
+
mix = Array.isArray(mix) ? mix : [mix];
|
|
12810
|
+
for (var i = 0, len = mix.length; i < len; i++) {
|
|
12811
|
+
var value = mix[i];
|
|
12812
|
+
if (!value || typeof value.valueOf() !== "string")
|
|
12813
|
+
continue;
|
|
12814
|
+
var mixes = value.valueOf().split(" ");
|
|
12815
|
+
for (var j = 0; j < mixes.length; j++) {
|
|
12816
|
+
var val = mixes[j];
|
|
12817
|
+
if (val !== entityName) {
|
|
12818
|
+
className += " " + val;
|
|
12819
|
+
}
|
|
12820
|
+
}
|
|
12821
|
+
}
|
|
12822
|
+
}
|
|
12823
|
+
return className;
|
|
12824
|
+
}
|
|
12825
|
+
return function cnGenerator(b, e) {
|
|
12826
|
+
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
12827
|
+
if (typeof elemOrMods === "string") {
|
|
12828
|
+
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
12829
|
+
return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
|
|
12830
|
+
}
|
|
12831
|
+
return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
12832
|
+
}
|
|
12833
|
+
return stringify(b, e, elemOrMods, elemModsOrBlockMix);
|
|
12834
|
+
};
|
|
12835
|
+
};
|
|
12836
|
+
}
|
|
12837
|
+
var cn2 = withNaming({
|
|
12838
|
+
e: "-",
|
|
12839
|
+
m: "_"
|
|
12840
|
+
});
|
|
12841
|
+
classname_development.cn = cn2;
|
|
12842
|
+
classname_development.withNaming = withNaming;
|
|
12843
|
+
return classname_development;
|
|
12844
|
+
}
|
|
12845
|
+
(function(module) {
|
|
12846
|
+
if (process.env.NODE_ENV === "production") {
|
|
12847
|
+
module.exports = requireClassname_production_min();
|
|
12848
|
+
} else {
|
|
12849
|
+
module.exports = requireClassname_development();
|
|
12850
|
+
}
|
|
12851
|
+
})(classname);
|
|
12852
|
+
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
12887
12853
|
const defaultProps$15 = {
|
|
12888
12854
|
visible: 0,
|
|
12889
12855
|
bottom: false,
|
|
@@ -12913,7 +12879,7 @@ const Tabbar = (props) => {
|
|
|
12913
12879
|
...defaultProps$15,
|
|
12914
12880
|
...props
|
|
12915
12881
|
};
|
|
12916
|
-
const
|
|
12882
|
+
const b = cn("tabbar");
|
|
12917
12883
|
const [selectIndex, setSelectIndex] = useState(activeVisible || visible);
|
|
12918
12884
|
const handleClick2 = (idx) => {
|
|
12919
12885
|
if (!("activeVisible" in props)) {
|
|
@@ -12926,7 +12892,7 @@ const Tabbar = (props) => {
|
|
|
12926
12892
|
}
|
|
12927
12893
|
}, [activeVisible]);
|
|
12928
12894
|
return /* @__PURE__ */ jsx("div", {
|
|
12929
|
-
className: [`${
|
|
12895
|
+
className: [`${b()}`, bottom ? `${b("bottom")}` : "", safeAreaInsetBottom ? `${b("bottom")} ${b("safebottom")}` : "", className].join(" "),
|
|
12930
12896
|
style,
|
|
12931
12897
|
children: React__default.Children.map(children, (child, idx) => {
|
|
12932
12898
|
if (!React__default.isValidElement(child)) {
|
|
@@ -12983,7 +12949,7 @@ const TabbarItem = (props) => {
|
|
|
12983
12949
|
...defaultProps$14,
|
|
12984
12950
|
...props
|
|
12985
12951
|
};
|
|
12986
|
-
const
|
|
12952
|
+
const b = cn("tabbar-item");
|
|
12987
12953
|
const bIcon = cn("tabbar-item__icon-box");
|
|
12988
12954
|
useEffect(() => {
|
|
12989
12955
|
if (active && href) {
|
|
@@ -12991,7 +12957,7 @@ const TabbarItem = (props) => {
|
|
|
12991
12957
|
}
|
|
12992
12958
|
}, [active, href]);
|
|
12993
12959
|
return /* @__PURE__ */ jsxs("div", {
|
|
12994
|
-
className: `${
|
|
12960
|
+
className: `${b({
|
|
12995
12961
|
active
|
|
12996
12962
|
})} ${className}`,
|
|
12997
12963
|
style: {
|
|
@@ -13042,10 +13008,10 @@ const TabPane = (props) => {
|
|
|
13042
13008
|
...defaultProps$13,
|
|
13043
13009
|
...props
|
|
13044
13010
|
};
|
|
13045
|
-
const
|
|
13011
|
+
const b = cn("tabpane");
|
|
13046
13012
|
const classes = classNames({
|
|
13047
13013
|
active: !disabled && paneKey === activeKey
|
|
13048
|
-
},
|
|
13014
|
+
}, b(""), autoHeightClassName, className);
|
|
13049
13015
|
return /* @__PURE__ */ jsx("div", {
|
|
13050
13016
|
className: classes,
|
|
13051
13017
|
children: !disabled && children
|
|
@@ -13130,13 +13096,13 @@ const Tabs = (props) => {
|
|
|
13130
13096
|
});
|
|
13131
13097
|
setCurrentItem(titles.current[currentIndex]);
|
|
13132
13098
|
}, [children]);
|
|
13133
|
-
const
|
|
13134
|
-
const classes = classNames(direction,
|
|
13099
|
+
const b = cn("tabs");
|
|
13100
|
+
const classes = classNames(direction, b(""), className);
|
|
13135
13101
|
const classesTitle = classNames({
|
|
13136
13102
|
[type4]: type4,
|
|
13137
13103
|
scrollable: titleScroll,
|
|
13138
13104
|
[size]: size
|
|
13139
|
-
}, `${
|
|
13105
|
+
}, `${b("")}__titles`);
|
|
13140
13106
|
const titleStyle = {
|
|
13141
13107
|
marginLeft: pxCheck(titleGutter),
|
|
13142
13108
|
marginRight: pxCheck(titleGutter)
|
|
@@ -13175,12 +13141,12 @@ const Tabs = (props) => {
|
|
|
13175
13141
|
active: !item.disabled && String(item.paneKey) === String(value),
|
|
13176
13142
|
disabled: item.disabled,
|
|
13177
13143
|
"nut-tabs__titles-item-left-align": leftAlign
|
|
13178
|
-
}, `${
|
|
13144
|
+
}, `${b("")}__titles-item`),
|
|
13179
13145
|
children: [type4 === "line" && /* @__PURE__ */ jsx("div", {
|
|
13180
|
-
className: `${
|
|
13146
|
+
className: `${b("")}__titles-item__line`,
|
|
13181
13147
|
style: tabsActiveStyle
|
|
13182
13148
|
}), type4 === "smile" && /* @__PURE__ */ jsx("div", {
|
|
13183
|
-
className: `${
|
|
13149
|
+
className: `${b("")}__titles-item__smile`,
|
|
13184
13150
|
style: tabsActiveStyle,
|
|
13185
13151
|
children: /* @__PURE__ */ jsx(x$7, {
|
|
13186
13152
|
color
|
|
@@ -13188,15 +13154,15 @@ const Tabs = (props) => {
|
|
|
13188
13154
|
}), /* @__PURE__ */ jsx("div", {
|
|
13189
13155
|
className: classNames({
|
|
13190
13156
|
ellipsis: ellipsis && !titleScroll && direction === "horizontal"
|
|
13191
|
-
}, `${
|
|
13157
|
+
}, `${b("")}__titles-item__text`),
|
|
13192
13158
|
children: item.title
|
|
13193
13159
|
})]
|
|
13194
13160
|
}, item.paneKey);
|
|
13195
13161
|
})
|
|
13196
13162
|
}), /* @__PURE__ */ jsx("div", {
|
|
13197
|
-
className: `${
|
|
13163
|
+
className: `${b("")}__content__wrap`,
|
|
13198
13164
|
children: /* @__PURE__ */ jsx("div", {
|
|
13199
|
-
className: `${
|
|
13165
|
+
className: `${b("")}__content`,
|
|
13200
13166
|
style: contentStyle,
|
|
13201
13167
|
children: React__default.Children.map(children, (child, idx) => {
|
|
13202
13168
|
var _a2;
|
|
@@ -13446,14 +13412,14 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
13446
13412
|
const monthsPanel = useRef(null);
|
|
13447
13413
|
const viewArea = useRef(null);
|
|
13448
13414
|
let viewHeight = 0;
|
|
13449
|
-
const
|
|
13415
|
+
const b = cn("calendar");
|
|
13450
13416
|
const classes = classNames({
|
|
13451
|
-
[`${
|
|
13452
|
-
[`${
|
|
13453
|
-
},
|
|
13417
|
+
[`${b("")}-tile`]: !poppable,
|
|
13418
|
+
[`${b("")}-nofooter`]: !!isAutoBackFill
|
|
13419
|
+
}, b(""));
|
|
13454
13420
|
const headerClasses = classNames({
|
|
13455
|
-
[`${
|
|
13456
|
-
[`${
|
|
13421
|
+
[`${b("")}-header`]: true,
|
|
13422
|
+
[`${b("")}-header-tile`]: !poppable
|
|
13457
13423
|
});
|
|
13458
13424
|
const monthitemclasses = classNames({
|
|
13459
13425
|
"calendar-month-item": true,
|
|
@@ -14165,13 +14131,13 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
14165
14131
|
...defaultProps$$,
|
|
14166
14132
|
...props
|
|
14167
14133
|
};
|
|
14168
|
-
const
|
|
14134
|
+
const b = cn("cascader-item");
|
|
14169
14135
|
const classes = classNames({
|
|
14170
14136
|
active: checked,
|
|
14171
14137
|
disabled: data.disabled
|
|
14172
|
-
},
|
|
14138
|
+
}, b(""));
|
|
14173
14139
|
const classesTitle = classNames({
|
|
14174
|
-
[`${
|
|
14140
|
+
[`${b("")}__title`]: true
|
|
14175
14141
|
});
|
|
14176
14142
|
const renderIcon = () => {
|
|
14177
14143
|
if (checked) {
|
|
@@ -14179,7 +14145,7 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
14179
14145
|
return checkedIcon;
|
|
14180
14146
|
}
|
|
14181
14147
|
return /* @__PURE__ */ jsx(x$c, {
|
|
14182
|
-
className: `${checked ?
|
|
14148
|
+
className: `${checked ? b("icon-check") : ""}`
|
|
14183
14149
|
});
|
|
14184
14150
|
}
|
|
14185
14151
|
return null;
|
|
@@ -14269,7 +14235,7 @@ const convertListToOptions = (list, options2) => {
|
|
|
14269
14235
|
if (sortKey) {
|
|
14270
14236
|
Object.keys(map).forEach((i) => {
|
|
14271
14237
|
if (map[i].length > 1) {
|
|
14272
|
-
map[i].sort((a2,
|
|
14238
|
+
map[i].sort((a2, b) => a2[sortKey] - b[sortKey]);
|
|
14273
14239
|
}
|
|
14274
14240
|
});
|
|
14275
14241
|
}
|
|
@@ -14421,10 +14387,10 @@ const InternalCascader = (props, ref) => {
|
|
|
14421
14387
|
},
|
|
14422
14388
|
lazyLoadMap: /* @__PURE__ */ new Map()
|
|
14423
14389
|
});
|
|
14424
|
-
const
|
|
14425
|
-
const classes = classNames(
|
|
14390
|
+
const b = cn("cascader");
|
|
14391
|
+
const classes = classNames(b(""));
|
|
14426
14392
|
const classesPane = classNames({
|
|
14427
|
-
[`${
|
|
14393
|
+
[`${b("")}-pane`]: true
|
|
14428
14394
|
});
|
|
14429
14395
|
useEffect(() => {
|
|
14430
14396
|
initData();
|
|
@@ -14592,7 +14558,7 @@ const InternalCascader = (props, ref) => {
|
|
|
14592
14558
|
className: `${classes} ${className}`,
|
|
14593
14559
|
style,
|
|
14594
14560
|
children: [poppable && /* @__PURE__ */ jsx("div", {
|
|
14595
|
-
className:
|
|
14561
|
+
className: b("title"),
|
|
14596
14562
|
children: title
|
|
14597
14563
|
}), /* @__PURE__ */ jsx(Tabs, {
|
|
14598
14564
|
value: tabvalue,
|
|
@@ -14641,7 +14607,7 @@ const InternalCascader = (props, ref) => {
|
|
|
14641
14607
|
};
|
|
14642
14608
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
14643
14609
|
children: poppable ? /* @__PURE__ */ jsx(Popup, {
|
|
14644
|
-
|
|
14610
|
+
className: "cascadar-popup",
|
|
14645
14611
|
visible,
|
|
14646
14612
|
position: "bottom",
|
|
14647
14613
|
round: true,
|
|
@@ -14675,7 +14641,7 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
14675
14641
|
...defaultProps$Z,
|
|
14676
14642
|
...props
|
|
14677
14643
|
};
|
|
14678
|
-
const
|
|
14644
|
+
const b = cn("checkboxgroup");
|
|
14679
14645
|
const {
|
|
14680
14646
|
className,
|
|
14681
14647
|
disabled,
|
|
@@ -14750,7 +14716,7 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
14750
14716
|
}
|
|
14751
14717
|
},
|
|
14752
14718
|
children: /* @__PURE__ */ jsx("div", {
|
|
14753
|
-
className: `${
|
|
14719
|
+
className: `${b()} nut-checkboxgroup--${props.direction} ${className || ""}`,
|
|
14754
14720
|
...rest,
|
|
14755
14721
|
children: (options2 == null ? void 0 : options2.length) ? renderOptions() : children
|
|
14756
14722
|
})
|
|
@@ -14778,7 +14744,7 @@ const Checkbox = (props) => {
|
|
|
14778
14744
|
...defaultProps$Y,
|
|
14779
14745
|
...props
|
|
14780
14746
|
};
|
|
14781
|
-
const
|
|
14747
|
+
const b = cn("checkbox");
|
|
14782
14748
|
const {
|
|
14783
14749
|
icon,
|
|
14784
14750
|
iconSize,
|
|
@@ -14863,7 +14829,7 @@ const Checkbox = (props) => {
|
|
|
14863
14829
|
};
|
|
14864
14830
|
const renderLabel = () => {
|
|
14865
14831
|
return /* @__PURE__ */ jsx("span", {
|
|
14866
|
-
className: `${
|
|
14832
|
+
className: `${b("label", {
|
|
14867
14833
|
disabled: innerDisabled
|
|
14868
14834
|
})} `,
|
|
14869
14835
|
children: children || label
|
|
@@ -14881,7 +14847,7 @@ const Checkbox = (props) => {
|
|
|
14881
14847
|
setChecked(latestChecked);
|
|
14882
14848
|
};
|
|
14883
14849
|
return /* @__PURE__ */ jsxs("div", {
|
|
14884
|
-
className: `${
|
|
14850
|
+
className: `${b({
|
|
14885
14851
|
reverse: textPosition === "left"
|
|
14886
14852
|
})} ${className || ""}`,
|
|
14887
14853
|
...rest,
|
|
@@ -15199,7 +15165,7 @@ const InternalPicker = (props, ref) => {
|
|
|
15199
15165
|
const pickerRef = useRef(null);
|
|
15200
15166
|
const [refs, setRefs] = useRefs();
|
|
15201
15167
|
const [columnsList, setColumnsList] = useState([]);
|
|
15202
|
-
const
|
|
15168
|
+
const b = cn("picker");
|
|
15203
15169
|
const isConfirmEvent = useRef(false);
|
|
15204
15170
|
useEffect(() => {
|
|
15205
15171
|
if (defaultValueData && defaultValueData.length !== 0 && defaultValueData.toString() !== chooseValueData.toString()) {
|
|
@@ -15341,16 +15307,16 @@ const InternalPicker = (props, ref) => {
|
|
|
15341
15307
|
};
|
|
15342
15308
|
const renderToolbar = () => {
|
|
15343
15309
|
return /* @__PURE__ */ jsxs("div", {
|
|
15344
|
-
className:
|
|
15310
|
+
className: b("control"),
|
|
15345
15311
|
children: [/* @__PURE__ */ jsx("span", {
|
|
15346
|
-
className:
|
|
15312
|
+
className: b("cancel-btn"),
|
|
15347
15313
|
onClick: () => closeActionSheet(),
|
|
15348
15314
|
children: locale.cancel
|
|
15349
15315
|
}), /* @__PURE__ */ jsx("div", {
|
|
15350
|
-
className:
|
|
15316
|
+
className: b("title"),
|
|
15351
15317
|
children: title || ""
|
|
15352
15318
|
}), /* @__PURE__ */ jsx("span", {
|
|
15353
|
-
className:
|
|
15319
|
+
className: b("confirm-btn"),
|
|
15354
15320
|
onClick: confirm2,
|
|
15355
15321
|
children: locale.confirm
|
|
15356
15322
|
})]
|
|
@@ -15363,11 +15329,11 @@ const InternalPicker = (props, ref) => {
|
|
|
15363
15329
|
closeActionSheet();
|
|
15364
15330
|
},
|
|
15365
15331
|
children: /* @__PURE__ */ jsxs("div", {
|
|
15366
|
-
className: `${
|
|
15332
|
+
className: `${b()} ${className || ""}`,
|
|
15367
15333
|
style,
|
|
15368
15334
|
...rest,
|
|
15369
15335
|
children: [renderToolbar(), /* @__PURE__ */ jsx("div", {
|
|
15370
|
-
className:
|
|
15336
|
+
className: b("panel"),
|
|
15371
15337
|
ref: pickerRef,
|
|
15372
15338
|
children: columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
15373
15339
|
return /* @__PURE__ */ jsx(PickerSlot$1, {
|
|
@@ -16018,7 +15984,7 @@ var getUrlRegex = function() {
|
|
|
16018
15984
|
return urlReg;
|
|
16019
15985
|
}
|
|
16020
15986
|
var word = "[a-fA-F\\d:]";
|
|
16021
|
-
var
|
|
15987
|
+
var b = function b2(options2) {
|
|
16022
15988
|
return options2 && options2.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
16023
15989
|
};
|
|
16024
15990
|
var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
@@ -16028,13 +15994,13 @@ var getUrlRegex = function() {
|
|
|
16028
15994
|
var v4exact = new RegExp("^" + v4 + "$");
|
|
16029
15995
|
var v6exact = new RegExp("^" + v6 + "$");
|
|
16030
15996
|
var ip = function ip2(options2) {
|
|
16031
|
-
return options2 && options2.exact ? v46Exact : new RegExp("(?:" +
|
|
15997
|
+
return options2 && options2.exact ? v46Exact : new RegExp("(?:" + b(options2) + v4 + b(options2) + ")|(?:" + b(options2) + v6 + b(options2) + ")", "g");
|
|
16032
15998
|
};
|
|
16033
15999
|
ip.v4 = function(options2) {
|
|
16034
|
-
return options2 && options2.exact ? v4exact : new RegExp("" +
|
|
16000
|
+
return options2 && options2.exact ? v4exact : new RegExp("" + b(options2) + v4 + b(options2), "g");
|
|
16035
16001
|
};
|
|
16036
16002
|
ip.v6 = function(options2) {
|
|
16037
|
-
return options2 && options2.exact ? v6exact : new RegExp("" +
|
|
16003
|
+
return options2 && options2.exact ? v6exact : new RegExp("" + b(options2) + v6 + b(options2), "g");
|
|
16038
16004
|
};
|
|
16039
16005
|
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
16040
16006
|
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
@@ -17446,7 +17412,7 @@ const defaultProps$T = {
|
|
|
17446
17412
|
digits: 0,
|
|
17447
17413
|
async: false
|
|
17448
17414
|
};
|
|
17449
|
-
const classPrefix = `nut-inputnumber`;
|
|
17415
|
+
const classPrefix$1 = `nut-inputnumber`;
|
|
17450
17416
|
const InputNumber = (props) => {
|
|
17451
17417
|
const {
|
|
17452
17418
|
children,
|
|
@@ -17488,8 +17454,8 @@ const InputNumber = (props) => {
|
|
|
17488
17454
|
}
|
|
17489
17455
|
}, []);
|
|
17490
17456
|
const classes = classNames({
|
|
17491
|
-
[`${classPrefix}`]: true,
|
|
17492
|
-
[`${classPrefix}--disabled`]: disabled
|
|
17457
|
+
[`${classPrefix$1}`]: true,
|
|
17458
|
+
[`${classPrefix$1}--disabled`]: disabled
|
|
17493
17459
|
}, className);
|
|
17494
17460
|
const styles = {
|
|
17495
17461
|
...style
|
|
@@ -17706,7 +17672,7 @@ const NumberKeyboard = (props) => {
|
|
|
17706
17672
|
onDelete,
|
|
17707
17673
|
onClose
|
|
17708
17674
|
} = props;
|
|
17709
|
-
const
|
|
17675
|
+
const b = cn("numberkeyboard");
|
|
17710
17676
|
const [show, setShow] = useState(visible);
|
|
17711
17677
|
const [clickKeyIndex, setClickKeyIndex] = useState(void 0);
|
|
17712
17678
|
const [keysList, setKeysList] = useState([]);
|
|
@@ -17826,7 +17792,7 @@ const NumberKeyboard = (props) => {
|
|
|
17826
17792
|
children: /* @__PURE__ */ jsx(Popup, {
|
|
17827
17793
|
visible: show,
|
|
17828
17794
|
position: "bottom",
|
|
17829
|
-
popClass,
|
|
17795
|
+
className: popClass,
|
|
17830
17796
|
onClickOverlay: onClose,
|
|
17831
17797
|
overlay,
|
|
17832
17798
|
onClickCloseIcon: onClose,
|
|
@@ -17834,24 +17800,24 @@ const NumberKeyboard = (props) => {
|
|
|
17834
17800
|
backgroundColor: "rgba(0, 0, 0, 0)"
|
|
17835
17801
|
},
|
|
17836
17802
|
children: /* @__PURE__ */ jsxs("div", {
|
|
17837
|
-
className: `${
|
|
17803
|
+
className: `${b()} ${className}`,
|
|
17838
17804
|
style: {
|
|
17839
17805
|
...style
|
|
17840
17806
|
},
|
|
17841
17807
|
children: [title ? /* @__PURE__ */ jsxs("div", {
|
|
17842
|
-
className:
|
|
17808
|
+
className: b("header"),
|
|
17843
17809
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
17844
|
-
className:
|
|
17810
|
+
className: b("header__tit"),
|
|
17845
17811
|
children: title
|
|
17846
17812
|
}), type4 === "default" ? /* @__PURE__ */ jsx("span", {
|
|
17847
|
-
className:
|
|
17813
|
+
className: b("header__close"),
|
|
17848
17814
|
onClick: onClose,
|
|
17849
17815
|
children: locale.done
|
|
17850
17816
|
}) : null]
|
|
17851
17817
|
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
17852
|
-
className:
|
|
17818
|
+
className: b("body"),
|
|
17853
17819
|
children: [/* @__PURE__ */ jsx("div", {
|
|
17854
|
-
className:
|
|
17820
|
+
className: b("body__keys"),
|
|
17855
17821
|
children: keysList == null ? void 0 : keysList.map((item, index) => {
|
|
17856
17822
|
return /* @__PURE__ */ jsx("div", {
|
|
17857
17823
|
className: classNames({
|
|
@@ -17881,7 +17847,7 @@ const NumberKeyboard = (props) => {
|
|
|
17881
17847
|
}, index);
|
|
17882
17848
|
})
|
|
17883
17849
|
}), type4 === "rightColumn" ? /* @__PURE__ */ jsxs("div", {
|
|
17884
|
-
className:
|
|
17850
|
+
className: b("sidebar"),
|
|
17885
17851
|
children: [/* @__PURE__ */ jsx("div", {
|
|
17886
17852
|
className: "key-board-wrapper",
|
|
17887
17853
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -18510,7 +18476,7 @@ const Range = (props) => {
|
|
|
18510
18476
|
useEffect(() => {
|
|
18511
18477
|
if (marks) {
|
|
18512
18478
|
const marksKeys = Object.keys(marks);
|
|
18513
|
-
const list = marksKeys.map(parseFloat).sort((a2,
|
|
18479
|
+
const list = marksKeys.map(parseFloat).sort((a2, b) => a2 - b).filter((point) => point >= min && point <= max);
|
|
18514
18480
|
SetMarksList(list);
|
|
18515
18481
|
}
|
|
18516
18482
|
}, [marks]);
|
|
@@ -19201,7 +19167,7 @@ const ShortPassword = (props) => {
|
|
|
19201
19167
|
autoFocus,
|
|
19202
19168
|
...reset
|
|
19203
19169
|
} = props;
|
|
19204
|
-
const
|
|
19170
|
+
const b = cn("shortpassword");
|
|
19205
19171
|
const textInput = useRef(null);
|
|
19206
19172
|
const range3 = (val) => {
|
|
19207
19173
|
return Math.min(Math.max(4, val), 6);
|
|
@@ -19277,22 +19243,22 @@ const ShortPassword = (props) => {
|
|
|
19277
19243
|
onClickOverlay: onClose,
|
|
19278
19244
|
onClickCloseIcon: onClose,
|
|
19279
19245
|
children: /* @__PURE__ */ jsxs("div", {
|
|
19280
|
-
className: `${
|
|
19246
|
+
className: `${b()} ${className}`,
|
|
19281
19247
|
style: {
|
|
19282
19248
|
...style
|
|
19283
19249
|
},
|
|
19284
19250
|
...reset,
|
|
19285
19251
|
children: [/* @__PURE__ */ jsx("div", {
|
|
19286
|
-
className:
|
|
19252
|
+
className: b("title"),
|
|
19287
19253
|
children: title || locale.shortpassword.title
|
|
19288
19254
|
}), /* @__PURE__ */ jsx("div", {
|
|
19289
|
-
className:
|
|
19255
|
+
className: b("subtitle"),
|
|
19290
19256
|
children: description || locale.shortpassword.description
|
|
19291
19257
|
}), /* @__PURE__ */ jsxs("div", {
|
|
19292
|
-
className:
|
|
19258
|
+
className: b("input"),
|
|
19293
19259
|
children: [/* @__PURE__ */ jsx("input", {
|
|
19294
19260
|
ref: textInput,
|
|
19295
|
-
className:
|
|
19261
|
+
className: b("input-real"),
|
|
19296
19262
|
type: "number",
|
|
19297
19263
|
style: systemStyle(),
|
|
19298
19264
|
maxLength: 6,
|
|
@@ -19300,40 +19266,40 @@ const ShortPassword = (props) => {
|
|
|
19300
19266
|
autoFocus,
|
|
19301
19267
|
onChange: (e) => changeValue(e)
|
|
19302
19268
|
}), /* @__PURE__ */ jsx("div", {
|
|
19303
|
-
className:
|
|
19269
|
+
className: b("input-site")
|
|
19304
19270
|
}), /* @__PURE__ */ jsx("div", {
|
|
19305
|
-
className:
|
|
19271
|
+
className: b("input-fake"),
|
|
19306
19272
|
onClick: () => focus(),
|
|
19307
19273
|
children: [...new Array(comLen).keys()].map((item, index) => {
|
|
19308
19274
|
return /* @__PURE__ */ jsx("div", {
|
|
19309
|
-
className:
|
|
19275
|
+
className: b("input-fake__li"),
|
|
19310
19276
|
children: String(inputValue).length > index ? /* @__PURE__ */ jsx("div", {
|
|
19311
|
-
className:
|
|
19277
|
+
className: b("input-fake__li__icon")
|
|
19312
19278
|
}) : null
|
|
19313
19279
|
}, index);
|
|
19314
19280
|
})
|
|
19315
19281
|
})]
|
|
19316
19282
|
}), /* @__PURE__ */ jsxs("div", {
|
|
19317
|
-
className:
|
|
19283
|
+
className: b("message"),
|
|
19318
19284
|
children: [/* @__PURE__ */ jsx("div", {
|
|
19319
|
-
className:
|
|
19285
|
+
className: b("message__error"),
|
|
19320
19286
|
children: errorMsg2
|
|
19321
19287
|
}), tips || locale.shortpassword.tips ? /* @__PURE__ */ jsxs("div", {
|
|
19322
|
-
className:
|
|
19288
|
+
className: b("message__forget"),
|
|
19323
19289
|
children: [renderIcon(iconSize), /* @__PURE__ */ jsx("div", {
|
|
19324
|
-
className:
|
|
19290
|
+
className: b("message__forget-tips"),
|
|
19325
19291
|
onClick: onTips,
|
|
19326
19292
|
children: tips || locale.shortpassword.tips
|
|
19327
19293
|
})]
|
|
19328
19294
|
}) : null]
|
|
19329
19295
|
}), !noButton ? /* @__PURE__ */ jsxs("div", {
|
|
19330
|
-
className:
|
|
19296
|
+
className: b("footer"),
|
|
19331
19297
|
children: [/* @__PURE__ */ jsx("div", {
|
|
19332
|
-
className:
|
|
19298
|
+
className: b("footer__cancel"),
|
|
19333
19299
|
onClick: onCancel,
|
|
19334
19300
|
children: locale.cancel
|
|
19335
19301
|
}), /* @__PURE__ */ jsx("div", {
|
|
19336
|
-
className:
|
|
19302
|
+
className: b("footer__sure"),
|
|
19337
19303
|
onClick: () => sure(),
|
|
19338
19304
|
children: locale.confirm
|
|
19339
19305
|
})]
|
|
@@ -19489,134 +19455,64 @@ TextArea.defaultProps = defaultProps$L;
|
|
|
19489
19455
|
TextArea.displayName = "NutTextArea";
|
|
19490
19456
|
const defaultProps$K = {
|
|
19491
19457
|
...ComponentDefaults,
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
percentage: 0,
|
|
19496
|
-
fillColor: "#f3f3f3",
|
|
19497
|
-
strokeColor: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
|
|
19498
|
-
strokeWidth: "",
|
|
19499
|
-
textColor: "",
|
|
19500
|
-
textWidth: "",
|
|
19501
|
-
showText: true,
|
|
19502
|
-
textInside: false,
|
|
19503
|
-
textBackground: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
|
|
19504
|
-
textType: "text",
|
|
19505
|
-
status: false,
|
|
19506
|
-
icon: null,
|
|
19507
|
-
children: void 0
|
|
19458
|
+
percent: 0,
|
|
19459
|
+
showText: false,
|
|
19460
|
+
animated: false
|
|
19508
19461
|
};
|
|
19509
19462
|
const Progress = (props) => {
|
|
19510
19463
|
const {
|
|
19511
19464
|
className,
|
|
19512
19465
|
style,
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
strokeColor,
|
|
19466
|
+
percent,
|
|
19467
|
+
background,
|
|
19468
|
+
color,
|
|
19517
19469
|
strokeWidth,
|
|
19518
|
-
size,
|
|
19519
|
-
textColor,
|
|
19520
|
-
textWidth,
|
|
19521
19470
|
showText,
|
|
19522
|
-
|
|
19523
|
-
textBackground,
|
|
19524
|
-
textType,
|
|
19525
|
-
status,
|
|
19526
|
-
icon,
|
|
19471
|
+
animated: animated2,
|
|
19527
19472
|
children,
|
|
19528
19473
|
...rest
|
|
19529
19474
|
} = {
|
|
19530
19475
|
...defaultProps$K,
|
|
19531
19476
|
...props
|
|
19532
19477
|
};
|
|
19533
|
-
const
|
|
19534
|
-
const classes = classNames(b2(""));
|
|
19535
|
-
const classesOuter = classNames({
|
|
19536
|
-
[`${b2("")}-outer`]: true,
|
|
19537
|
-
[`${b2("")}-${size || "base"}`]: true
|
|
19538
|
-
});
|
|
19478
|
+
const classPrefix2 = "nut-progress";
|
|
19539
19479
|
const classesInner = classNames({
|
|
19540
|
-
[`${
|
|
19541
|
-
[`${
|
|
19542
|
-
});
|
|
19543
|
-
const classesText = classNames({
|
|
19544
|
-
[`${b2("")}-text`]: true
|
|
19545
|
-
});
|
|
19546
|
-
const classesInsideText = classNames({
|
|
19547
|
-
[`${b2("")}-text`]: true,
|
|
19548
|
-
[`${b2("")}-insidetext`]: true
|
|
19549
|
-
});
|
|
19550
|
-
const classesTextInner = classNames({
|
|
19551
|
-
[`${b2("")}-text__inner`]: true
|
|
19480
|
+
[`${classPrefix2}-inner`]: true,
|
|
19481
|
+
[`${classPrefix2}-active`]: animated2
|
|
19552
19482
|
});
|
|
19553
19483
|
const stylesOuter = {
|
|
19554
19484
|
height: `${strokeWidth}px`,
|
|
19555
|
-
|
|
19556
|
-
background: `${fillColor}`
|
|
19485
|
+
background
|
|
19557
19486
|
};
|
|
19558
19487
|
const stylesInner = {
|
|
19559
|
-
width: `${
|
|
19560
|
-
|
|
19561
|
-
background: `${strokeColor}`
|
|
19488
|
+
width: `${percent}%`,
|
|
19489
|
+
background: color
|
|
19562
19490
|
};
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
left: `${percentage}%`,
|
|
19566
|
-
background: textBackground || strokeColor
|
|
19567
|
-
};
|
|
19568
|
-
const stylesInsideIcon = {
|
|
19569
|
-
width: `${textWidth}px`,
|
|
19570
|
-
left: `${percentage}%`
|
|
19571
|
-
};
|
|
19572
|
-
const stylesText = {
|
|
19573
|
-
width: `${textWidth}px`
|
|
19574
|
-
};
|
|
19575
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
19576
|
-
className: `${classes} ${className}`,
|
|
19491
|
+
return /* @__PURE__ */ jsx("div", {
|
|
19492
|
+
className: classNames(classPrefix2, className),
|
|
19577
19493
|
style,
|
|
19578
19494
|
...rest,
|
|
19579
|
-
children:
|
|
19580
|
-
className:
|
|
19495
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
19496
|
+
className: `${classPrefix2}-outer`,
|
|
19581
19497
|
style: stylesOuter,
|
|
19582
19498
|
children: /* @__PURE__ */ jsx("div", {
|
|
19583
19499
|
className: classesInner,
|
|
19584
19500
|
style: stylesInner,
|
|
19585
|
-
children: showText &&
|
|
19586
|
-
|
|
19587
|
-
|
|
19588
|
-
|
|
19589
|
-
|
|
19590
|
-
|
|
19591
|
-
className:
|
|
19592
|
-
style:
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
|
|
19596
|
-
color: textColor
|
|
19597
|
-
},
|
|
19598
|
-
children: [percentage, isShowPercentage ? "%" : ""]
|
|
19599
|
-
})
|
|
19501
|
+
children: showText && /* @__PURE__ */ jsx("div", {
|
|
19502
|
+
className: `${classPrefix2}-text`,
|
|
19503
|
+
style: {
|
|
19504
|
+
left: `${percent}%`
|
|
19505
|
+
},
|
|
19506
|
+
children: children || /* @__PURE__ */ jsxs("div", {
|
|
19507
|
+
className: `${classPrefix2}-text__inner`,
|
|
19508
|
+
style: {
|
|
19509
|
+
background: color
|
|
19510
|
+
},
|
|
19511
|
+
children: [percent, "%"]
|
|
19600
19512
|
})
|
|
19601
19513
|
})
|
|
19602
19514
|
})
|
|
19603
|
-
})
|
|
19604
|
-
className: classesText,
|
|
19605
|
-
style: stylesText,
|
|
19606
|
-
children: [textType === "text" && /* @__PURE__ */ jsxs("span", {
|
|
19607
|
-
className: classesTextInner,
|
|
19608
|
-
style: {
|
|
19609
|
-
color: textColor
|
|
19610
|
-
},
|
|
19611
|
-
children: [percentage, isShowPercentage ? "%" : ""]
|
|
19612
|
-
}), textType === "icon" && /* @__PURE__ */ jsx(Fragment, {
|
|
19613
|
-
children: icon || /* @__PURE__ */ jsx(x$d, {
|
|
19614
|
-
width: 16,
|
|
19615
|
-
height: 16,
|
|
19616
|
-
color: "#439422"
|
|
19617
|
-
})
|
|
19618
|
-
})]
|
|
19619
|
-
})]
|
|
19515
|
+
})
|
|
19620
19516
|
});
|
|
19621
19517
|
};
|
|
19622
19518
|
Progress.defaultProps = defaultProps$K;
|
|
@@ -19719,29 +19615,26 @@ const funcInterceptor = (interceptor, {
|
|
|
19719
19615
|
const defaultProps$J = {
|
|
19720
19616
|
...ComponentDefaults,
|
|
19721
19617
|
url: "",
|
|
19722
|
-
|
|
19723
|
-
|
|
19724
|
-
|
|
19725
|
-
uploadIconTip: "",
|
|
19726
|
-
listType: "picture",
|
|
19618
|
+
maxCount: 1,
|
|
19619
|
+
previewType: "picture",
|
|
19620
|
+
imageFit: "cover",
|
|
19727
19621
|
name: "file",
|
|
19728
19622
|
accept: "*",
|
|
19729
19623
|
disabled: false,
|
|
19730
19624
|
autoUpload: true,
|
|
19731
19625
|
multiple: false,
|
|
19732
|
-
|
|
19626
|
+
maxFileSize: Number.MAX_VALUE,
|
|
19733
19627
|
data: {},
|
|
19734
19628
|
headers: {},
|
|
19735
19629
|
method: "post",
|
|
19736
|
-
defaultImg: "",
|
|
19737
19630
|
xhrState: 200,
|
|
19738
19631
|
timeout: 1e3 * 30,
|
|
19739
19632
|
withCredentials: false,
|
|
19740
19633
|
clearInput: true,
|
|
19741
|
-
|
|
19742
|
-
|
|
19634
|
+
preview: true,
|
|
19635
|
+
deletable: true,
|
|
19743
19636
|
capture: false,
|
|
19744
|
-
|
|
19637
|
+
beforeDelete: (file, files) => {
|
|
19745
19638
|
return true;
|
|
19746
19639
|
}
|
|
19747
19640
|
};
|
|
@@ -19765,32 +19658,33 @@ const InternalUploader = (props, ref) => {
|
|
|
19765
19658
|
const {
|
|
19766
19659
|
children,
|
|
19767
19660
|
uploadIcon,
|
|
19768
|
-
|
|
19769
|
-
uploadIconTip,
|
|
19661
|
+
uploadLabel,
|
|
19770
19662
|
name,
|
|
19771
19663
|
accept,
|
|
19772
|
-
|
|
19773
|
-
|
|
19664
|
+
defaultValue,
|
|
19665
|
+
value,
|
|
19666
|
+
previewType,
|
|
19667
|
+
imageFit,
|
|
19774
19668
|
disabled,
|
|
19775
19669
|
multiple,
|
|
19776
19670
|
url: url2,
|
|
19777
|
-
|
|
19671
|
+
previewUrl,
|
|
19778
19672
|
headers,
|
|
19779
19673
|
timeout: timeout2,
|
|
19780
19674
|
method: method4,
|
|
19781
19675
|
xhrState,
|
|
19782
19676
|
withCredentials,
|
|
19783
19677
|
data,
|
|
19784
|
-
|
|
19785
|
-
|
|
19786
|
-
|
|
19678
|
+
preview,
|
|
19679
|
+
deletable,
|
|
19680
|
+
maxCount,
|
|
19787
19681
|
capture,
|
|
19788
|
-
|
|
19682
|
+
maxFileSize,
|
|
19789
19683
|
className,
|
|
19790
19684
|
autoUpload,
|
|
19791
19685
|
clearInput,
|
|
19792
19686
|
onStart,
|
|
19793
|
-
|
|
19687
|
+
onDelete,
|
|
19794
19688
|
onChange,
|
|
19795
19689
|
onFileItemClick,
|
|
19796
19690
|
onProgress,
|
|
@@ -19798,23 +19692,22 @@ const InternalUploader = (props, ref) => {
|
|
|
19798
19692
|
onUpdate,
|
|
19799
19693
|
onFailure,
|
|
19800
19694
|
onOversize,
|
|
19801
|
-
|
|
19802
|
-
|
|
19803
|
-
|
|
19695
|
+
beforeUpload,
|
|
19696
|
+
beforeXhrUpload,
|
|
19697
|
+
beforeDelete,
|
|
19804
19698
|
...restProps
|
|
19805
19699
|
} = {
|
|
19806
19700
|
...defaultProps$J,
|
|
19807
19701
|
...props
|
|
19808
19702
|
};
|
|
19809
|
-
const [fileList, setFileList] = useState([]);
|
|
19703
|
+
const [fileList, setFileList] = useState(defaultValue || []);
|
|
19810
19704
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
19811
19705
|
useEffect(() => {
|
|
19812
|
-
if (
|
|
19813
|
-
setFileList(
|
|
19706
|
+
if (value) {
|
|
19707
|
+
setFileList(value);
|
|
19814
19708
|
}
|
|
19815
|
-
}, [
|
|
19816
|
-
const
|
|
19817
|
-
const classes = classNames(className, b2(""));
|
|
19709
|
+
}, [value]);
|
|
19710
|
+
const classes = classNames(className, "nut-uploader");
|
|
19818
19711
|
useImperativeHandle(ref, () => ({
|
|
19819
19712
|
submit: () => {
|
|
19820
19713
|
Promise.all(uploadQueue).then((res) => {
|
|
@@ -19841,8 +19734,8 @@ const InternalUploader = (props, ref) => {
|
|
|
19841
19734
|
const executeUpload = (fileItem, index) => {
|
|
19842
19735
|
const uploadOption = new UploadOptions();
|
|
19843
19736
|
uploadOption.url = url2;
|
|
19844
|
-
for (const [key,
|
|
19845
|
-
fileItem.formData.append(key,
|
|
19737
|
+
for (const [key, value2] of Object.entries(data)) {
|
|
19738
|
+
fileItem.formData.append(key, value2);
|
|
19846
19739
|
}
|
|
19847
19740
|
uploadOption.formData = fileItem.formData;
|
|
19848
19741
|
uploadOption.timeout = timeout2 * 1;
|
|
@@ -19850,7 +19743,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19850
19743
|
uploadOption.xhrState = xhrState;
|
|
19851
19744
|
uploadOption.headers = headers;
|
|
19852
19745
|
uploadOption.withCredentials = withCredentials;
|
|
19853
|
-
uploadOption.beforeXhrUpload =
|
|
19746
|
+
uploadOption.beforeXhrUpload = beforeXhrUpload;
|
|
19854
19747
|
try {
|
|
19855
19748
|
uploadOption.sourceFile = fileItem.formData.get(name);
|
|
19856
19749
|
} catch (error) {
|
|
@@ -19948,7 +19841,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19948
19841
|
fileItem.message = locale.uploader.waitingUpload;
|
|
19949
19842
|
}
|
|
19950
19843
|
executeUpload(fileItem, index);
|
|
19951
|
-
if (
|
|
19844
|
+
if (preview && file.type.includes("image")) {
|
|
19952
19845
|
const reader = new FileReader();
|
|
19953
19846
|
reader.onload = (event) => {
|
|
19954
19847
|
fileItem.url = event.target.result;
|
|
@@ -19963,10 +19856,10 @@ const InternalUploader = (props, ref) => {
|
|
|
19963
19856
|
});
|
|
19964
19857
|
};
|
|
19965
19858
|
const filterFiles = (files) => {
|
|
19966
|
-
const
|
|
19859
|
+
const maximum = props.maxCount * 1;
|
|
19967
19860
|
const oversizes = new Array();
|
|
19968
19861
|
const filterFile = files.filter((file) => {
|
|
19969
|
-
if (file.size >
|
|
19862
|
+
if (file.size > maxFileSize) {
|
|
19970
19863
|
oversizes.push(file);
|
|
19971
19864
|
return false;
|
|
19972
19865
|
}
|
|
@@ -19975,23 +19868,23 @@ const InternalUploader = (props, ref) => {
|
|
|
19975
19868
|
if (oversizes.length) {
|
|
19976
19869
|
onOversize && onOversize(files);
|
|
19977
19870
|
}
|
|
19978
|
-
if (filterFile.length >
|
|
19979
|
-
filterFile.splice(
|
|
19871
|
+
if (filterFile.length > maximum) {
|
|
19872
|
+
filterFile.splice(maximum, filterFile.length - maximum);
|
|
19980
19873
|
}
|
|
19981
19874
|
if (fileList.length !== 0) {
|
|
19982
|
-
const index =
|
|
19875
|
+
const index = maximum - fileList.length;
|
|
19983
19876
|
filterFile.splice(index, filterFile.length - index);
|
|
19984
19877
|
}
|
|
19985
19878
|
return filterFile;
|
|
19986
19879
|
};
|
|
19987
19880
|
const deleted = (file, index) => {
|
|
19988
19881
|
fileList.splice(index, 1);
|
|
19989
|
-
|
|
19882
|
+
onDelete && onDelete(file, fileList);
|
|
19990
19883
|
setFileList([...fileList]);
|
|
19991
19884
|
};
|
|
19992
|
-
const
|
|
19885
|
+
const onDeleteItem = (file, index) => {
|
|
19993
19886
|
clearUploadQueue(index);
|
|
19994
|
-
funcInterceptor(
|
|
19887
|
+
funcInterceptor(beforeDelete, {
|
|
19995
19888
|
args: [file, fileList],
|
|
19996
19889
|
done: () => deleted(file, index)
|
|
19997
19890
|
});
|
|
@@ -20004,8 +19897,8 @@ const InternalUploader = (props, ref) => {
|
|
|
20004
19897
|
const {
|
|
20005
19898
|
files
|
|
20006
19899
|
} = $el;
|
|
20007
|
-
if (
|
|
20008
|
-
|
|
19900
|
+
if (beforeUpload) {
|
|
19901
|
+
beforeUpload(new Array().slice.call(files)).then((f) => {
|
|
20009
19902
|
const _files = filterFiles(new Array().slice.call(f));
|
|
20010
19903
|
readFile(_files);
|
|
20011
19904
|
});
|
|
@@ -20030,7 +19923,7 @@ const InternalUploader = (props, ref) => {
|
|
|
20030
19923
|
children: [children && /* @__PURE__ */ jsx("div", {
|
|
20031
19924
|
className: "nut-uploader__slot",
|
|
20032
19925
|
children: /* @__PURE__ */ jsxs(Fragment, {
|
|
20033
|
-
children: [children,
|
|
19926
|
+
children: [children, maxCount > fileList.length && /* @__PURE__ */ jsx(Fragment, {
|
|
20034
19927
|
children: capture ? /* @__PURE__ */ jsx("input", {
|
|
20035
19928
|
className: "nut-uploader__input",
|
|
20036
19929
|
type: "file",
|
|
@@ -20053,13 +19946,13 @@ const InternalUploader = (props, ref) => {
|
|
|
20053
19946
|
})
|
|
20054
19947
|
}), fileList.length !== 0 && fileList.map((item, index) => {
|
|
20055
19948
|
return /* @__PURE__ */ jsxs("div", {
|
|
20056
|
-
className: `nut-uploader__preview ${
|
|
20057
|
-
children: [
|
|
19949
|
+
className: `nut-uploader__preview ${previewType}`,
|
|
19950
|
+
children: [previewType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
|
|
20058
19951
|
className: "nut-uploader__preview-img",
|
|
20059
|
-
children: [
|
|
19952
|
+
children: [deletable && /* @__PURE__ */ jsx(x$8, {
|
|
20060
19953
|
color: "rgba(0,0,0,0.6)",
|
|
20061
19954
|
className: "close",
|
|
20062
|
-
onClick: () =>
|
|
19955
|
+
onClick: () => onDeleteItem(item, index)
|
|
20063
19956
|
}), item.status === "ready" ? /* @__PURE__ */ jsx("div", {
|
|
20064
19957
|
className: "nut-uploader__preview__progress",
|
|
20065
19958
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -20071,6 +19964,7 @@ const InternalUploader = (props, ref) => {
|
|
|
20071
19964
|
children: [item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsx(x$8, {
|
|
20072
19965
|
color: "#fff"
|
|
20073
19966
|
}) : item.loadingIcon || /* @__PURE__ */ jsx(k$2, {
|
|
19967
|
+
className: "nut-icon-loading",
|
|
20074
19968
|
color: "#fff"
|
|
20075
19969
|
})), /* @__PURE__ */ jsx("div", {
|
|
20076
19970
|
className: "nut-uploader__preview__progress__msg",
|
|
@@ -20079,14 +19973,17 @@ const InternalUploader = (props, ref) => {
|
|
|
20079
19973
|
}), item.type.includes("image") ? /* @__PURE__ */ jsx(Fragment, {
|
|
20080
19974
|
children: item.url && /* @__PURE__ */ jsx("img", {
|
|
20081
19975
|
className: "nut-uploader__preview-img__c",
|
|
19976
|
+
style: {
|
|
19977
|
+
objectFit: imageFit
|
|
19978
|
+
},
|
|
20082
19979
|
src: item.url,
|
|
20083
19980
|
alt: "",
|
|
20084
19981
|
onClick: () => handleItemClick(item)
|
|
20085
19982
|
})
|
|
20086
19983
|
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
20087
|
-
children:
|
|
19984
|
+
children: previewUrl ? /* @__PURE__ */ jsx("img", {
|
|
20088
19985
|
className: "nut-uploader__preview-img__c",
|
|
20089
|
-
src:
|
|
19986
|
+
src: previewUrl,
|
|
20090
19987
|
alt: "",
|
|
20091
19988
|
onClick: () => handleItemClick(item)
|
|
20092
19989
|
}) : /* @__PURE__ */ jsx("div", {
|
|
@@ -20103,35 +20000,34 @@ const InternalUploader = (props, ref) => {
|
|
|
20103
20000
|
className: "tips",
|
|
20104
20001
|
children: item.name
|
|
20105
20002
|
}) : null]
|
|
20106
|
-
}),
|
|
20003
|
+
}), previewType === "list" && /* @__PURE__ */ jsxs("div", {
|
|
20107
20004
|
className: "nut-uploader__preview-list",
|
|
20108
20005
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
20109
20006
|
className: `nut-uploader__preview-img__file__name ${item.status}`,
|
|
20110
20007
|
onClick: () => handleItemClick(item),
|
|
20111
20008
|
children: [/* @__PURE__ */ jsx(x$6, {}), " ", item.name]
|
|
20112
|
-
}),
|
|
20009
|
+
}), deletable && /* @__PURE__ */ jsx(y$6, {
|
|
20113
20010
|
color: "#808080",
|
|
20114
20011
|
className: "nut-uploader__preview-img__file__del",
|
|
20115
|
-
onClick: () =>
|
|
20012
|
+
onClick: () => onDeleteItem(item, index)
|
|
20116
20013
|
}), item.status === "uploading" && /* @__PURE__ */ jsx(Progress, {
|
|
20117
|
-
|
|
20118
|
-
|
|
20119
|
-
strokeColor: "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
|
|
20014
|
+
percent: item.percentage,
|
|
20015
|
+
color: "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
|
|
20120
20016
|
showText: false
|
|
20121
20017
|
})]
|
|
20122
20018
|
})]
|
|
20123
20019
|
}, item.uid);
|
|
20124
|
-
}),
|
|
20125
|
-
className: `nut-uploader__upload ${
|
|
20020
|
+
}), maxCount > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
|
|
20021
|
+
className: `nut-uploader__upload ${previewType} ${disabled ? "nut-uploader__upload-disabled" : ""}`,
|
|
20126
20022
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
20127
20023
|
className: "nut-uploader__icon",
|
|
20128
20024
|
children: [uploadIcon || /* @__PURE__ */ jsx(x$3, {
|
|
20129
|
-
width:
|
|
20130
|
-
height:
|
|
20025
|
+
width: "20px",
|
|
20026
|
+
height: "20px",
|
|
20131
20027
|
color: "#808080"
|
|
20132
20028
|
}), /* @__PURE__ */ jsx("span", {
|
|
20133
20029
|
className: "nut-uploader__icon-tip",
|
|
20134
|
-
children:
|
|
20030
|
+
children: uploadLabel
|
|
20135
20031
|
})]
|
|
20136
20032
|
}), capture ? /* @__PURE__ */ jsx("input", {
|
|
20137
20033
|
className: "nut-uploader__input",
|
|
@@ -20195,7 +20091,7 @@ const ActionSheet = (props) => {
|
|
|
20195
20091
|
...defaultProps$I,
|
|
20196
20092
|
...props
|
|
20197
20093
|
};
|
|
20198
|
-
const
|
|
20094
|
+
const b = cn("actionsheet");
|
|
20199
20095
|
const isHighlight = (item) => {
|
|
20200
20096
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
|
|
20201
20097
|
};
|
|
@@ -20215,20 +20111,20 @@ const ActionSheet = (props) => {
|
|
|
20215
20111
|
onCancel && onCancel();
|
|
20216
20112
|
},
|
|
20217
20113
|
children: /* @__PURE__ */ jsxs("div", {
|
|
20218
|
-
className: `${
|
|
20114
|
+
className: `${b()} ${className}`,
|
|
20219
20115
|
style,
|
|
20220
20116
|
...rest,
|
|
20221
20117
|
children: [title && /* @__PURE__ */ jsx("div", {
|
|
20222
|
-
className:
|
|
20118
|
+
className: b("title"),
|
|
20223
20119
|
children: title
|
|
20224
20120
|
}), description && /* @__PURE__ */ jsx("div", {
|
|
20225
|
-
className: `${
|
|
20121
|
+
className: `${b("item")} description`,
|
|
20226
20122
|
children: description
|
|
20227
20123
|
}), menuItems.length ? /* @__PURE__ */ jsx("div", {
|
|
20228
|
-
className:
|
|
20124
|
+
className: b("menu"),
|
|
20229
20125
|
children: menuItems.map((item, index) => {
|
|
20230
20126
|
return /* @__PURE__ */ jsxs("div", {
|
|
20231
|
-
className: `${
|
|
20127
|
+
className: `${b("item")} ${item.disable ? b("item-disabled") : ""}`,
|
|
20232
20128
|
style: {
|
|
20233
20129
|
color: isHighlight(item)
|
|
20234
20130
|
},
|
|
@@ -20240,7 +20136,7 @@ const ActionSheet = (props) => {
|
|
|
20240
20136
|
}, index);
|
|
20241
20137
|
})
|
|
20242
20138
|
}) : children, cancelText && /* @__PURE__ */ jsx("div", {
|
|
20243
|
-
className:
|
|
20139
|
+
className: b("cancel"),
|
|
20244
20140
|
onClick: () => cancelActionSheet(),
|
|
20245
20141
|
children: cancelText
|
|
20246
20142
|
})]
|
|
@@ -20694,6 +20590,7 @@ Dialog.confirm = (props) => {
|
|
|
20694
20590
|
Dialog.defaultProps = defaultProps$G;
|
|
20695
20591
|
Dialog.displayName = "NutDialog";
|
|
20696
20592
|
const defaultProps$F = {
|
|
20593
|
+
...ComponentDefaults,
|
|
20697
20594
|
attract: false,
|
|
20698
20595
|
direction: void 0,
|
|
20699
20596
|
boundary: {
|
|
@@ -20701,8 +20598,7 @@ const defaultProps$F = {
|
|
|
20701
20598
|
left: 0,
|
|
20702
20599
|
right: 0,
|
|
20703
20600
|
bottom: 0
|
|
20704
|
-
}
|
|
20705
|
-
className: ""
|
|
20601
|
+
}
|
|
20706
20602
|
};
|
|
20707
20603
|
const Drag = (props) => {
|
|
20708
20604
|
const {
|
|
@@ -20717,7 +20613,7 @@ const Drag = (props) => {
|
|
|
20717
20613
|
...defaultProps$F,
|
|
20718
20614
|
...props
|
|
20719
20615
|
};
|
|
20720
|
-
const
|
|
20616
|
+
const classPrefix2 = "nut-drag";
|
|
20721
20617
|
const [boundaryState, setBoundaryState] = useState(boundary);
|
|
20722
20618
|
const myDrag = useRef(null);
|
|
20723
20619
|
const [currstyle, api] = useSpring(() => ({
|
|
@@ -20790,7 +20686,7 @@ const Drag = (props) => {
|
|
|
20790
20686
|
}, [myDrag]);
|
|
20791
20687
|
return /* @__PURE__ */ jsx("div", {
|
|
20792
20688
|
style,
|
|
20793
|
-
className: `${
|
|
20689
|
+
className: `${classPrefix2} ${className}`,
|
|
20794
20690
|
...reset,
|
|
20795
20691
|
ref: myDrag,
|
|
20796
20692
|
children: /* @__PURE__ */ jsx(animated.div, {
|
|
@@ -20851,8 +20747,8 @@ const Infiniteloading = (props) => {
|
|
|
20851
20747
|
const refreshMaxH = useRef(0);
|
|
20852
20748
|
const y2 = useRef(0);
|
|
20853
20749
|
const distance = useRef(0);
|
|
20854
|
-
const
|
|
20855
|
-
const classes = classNames(className,
|
|
20750
|
+
const b = cn("infiniteloading");
|
|
20751
|
+
const classes = classNames(className, b());
|
|
20856
20752
|
useEffect(() => {
|
|
20857
20753
|
const parentElement = getParentElement(scroller.current);
|
|
20858
20754
|
scrollEl.current = useWindow ? window : parentElement;
|
|
@@ -21659,12 +21555,12 @@ const Switch = (props) => {
|
|
|
21659
21555
|
...props
|
|
21660
21556
|
};
|
|
21661
21557
|
const [value, setValue] = useState(false);
|
|
21662
|
-
const
|
|
21558
|
+
const b = cn("switch");
|
|
21663
21559
|
useEffect(() => {
|
|
21664
21560
|
setValue(checked);
|
|
21665
21561
|
}, [checked]);
|
|
21666
21562
|
const classes = () => {
|
|
21667
|
-
return `${
|
|
21563
|
+
return `${b()} ${value ? "switch-open" : "switch-close"} ${disable ? `${b()}-disable` : ""} ${`${b()}-base`} ${className}`;
|
|
21668
21564
|
};
|
|
21669
21565
|
const styles = () => {
|
|
21670
21566
|
const myStyle = {
|
|
@@ -21691,10 +21587,10 @@ const Switch = (props) => {
|
|
|
21691
21587
|
className: "close-line"
|
|
21692
21588
|
}), activeText && /* @__PURE__ */ jsx(Fragment, {
|
|
21693
21589
|
children: value ? /* @__PURE__ */ jsx("div", {
|
|
21694
|
-
className: `${
|
|
21590
|
+
className: `${b("label")} open`,
|
|
21695
21591
|
children: activeText
|
|
21696
21592
|
}) : /* @__PURE__ */ jsx("div", {
|
|
21697
|
-
className: `${
|
|
21593
|
+
className: `${b("label")} close`,
|
|
21698
21594
|
children: inactiveText
|
|
21699
21595
|
})
|
|
21700
21596
|
})]
|
|
@@ -21704,12 +21600,14 @@ const Switch = (props) => {
|
|
|
21704
21600
|
Switch.defaultProps = defaultProps$B;
|
|
21705
21601
|
Switch.displayName = "NutSwitch";
|
|
21706
21602
|
const defaultProps$A = {
|
|
21603
|
+
...ComponentDefaults,
|
|
21707
21604
|
type: "shake",
|
|
21708
21605
|
action: "initial",
|
|
21709
21606
|
loop: false,
|
|
21710
21607
|
onClick: (event) => {
|
|
21711
21608
|
}
|
|
21712
21609
|
};
|
|
21610
|
+
const classPrefix = `nut-animate`;
|
|
21713
21611
|
const Animate = (props) => {
|
|
21714
21612
|
const {
|
|
21715
21613
|
className,
|
|
@@ -21724,10 +21622,9 @@ const Animate = (props) => {
|
|
|
21724
21622
|
...props
|
|
21725
21623
|
};
|
|
21726
21624
|
const [clicked, setClicked] = useState(false);
|
|
21727
|
-
const b2 = cn("animate");
|
|
21728
21625
|
const classes = classNames({
|
|
21729
21626
|
"nut-ani-container": true,
|
|
21730
|
-
[`${
|
|
21627
|
+
[`${classPrefix}-${type4}`]: action === "initial" || clicked ? type4 : false,
|
|
21731
21628
|
loop: loop2
|
|
21732
21629
|
});
|
|
21733
21630
|
const cls = classNames(classes, className);
|
|
@@ -21773,7 +21670,7 @@ const CountUp = (props) => {
|
|
|
21773
21670
|
...defaultProps$z,
|
|
21774
21671
|
...props
|
|
21775
21672
|
};
|
|
21776
|
-
const
|
|
21673
|
+
const b = cn("countup");
|
|
21777
21674
|
const countupRef = useRef(null);
|
|
21778
21675
|
const timerRef = useRef(0);
|
|
21779
21676
|
const numbers = Array.from({
|
|
@@ -21813,17 +21710,17 @@ const CountUp = (props) => {
|
|
|
21813
21710
|
};
|
|
21814
21711
|
}, [numerArr]);
|
|
21815
21712
|
return /* @__PURE__ */ jsx("div", {
|
|
21816
|
-
className: `${
|
|
21713
|
+
className: `${b()} ${className}`,
|
|
21817
21714
|
ref: countupRef,
|
|
21818
21715
|
children: /* @__PURE__ */ jsx("ul", {
|
|
21819
|
-
className:
|
|
21716
|
+
className: b("list"),
|
|
21820
21717
|
children: numerArr.map((item, idx) => {
|
|
21821
21718
|
return /* @__PURE__ */ jsx("li", {
|
|
21822
|
-
className: `${
|
|
21719
|
+
className: `${b("listitem", {
|
|
21823
21720
|
number: !Number.isNaN(Number(item))
|
|
21824
21721
|
})}`,
|
|
21825
21722
|
children: !Number.isNaN(Number(item)) ? /* @__PURE__ */ jsx("span", {
|
|
21826
|
-
className:
|
|
21723
|
+
className: b("number"),
|
|
21827
21724
|
style: numberEaseStyle,
|
|
21828
21725
|
children: [...numbers, ...numbers].map((number4, subidx) => {
|
|
21829
21726
|
return /* @__PURE__ */ jsx("span", {
|
|
@@ -21831,7 +21728,7 @@ const CountUp = (props) => {
|
|
|
21831
21728
|
}, subidx);
|
|
21832
21729
|
})
|
|
21833
21730
|
}) : /* @__PURE__ */ jsx("span", {
|
|
21834
|
-
className:
|
|
21731
|
+
className: b("separator"),
|
|
21835
21732
|
children: item
|
|
21836
21733
|
})
|
|
21837
21734
|
}, idx);
|
|
@@ -21859,15 +21756,13 @@ __publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
|
21859
21756
|
AnimatingNumbers.CountUp = CountUp;
|
|
21860
21757
|
const defaultProps$x = {
|
|
21861
21758
|
...ComponentDefaults,
|
|
21862
|
-
|
|
21863
|
-
url: "",
|
|
21864
|
-
style: {},
|
|
21759
|
+
src: "",
|
|
21865
21760
|
muted: false,
|
|
21866
21761
|
autoplay: false,
|
|
21867
21762
|
loop: false,
|
|
21868
21763
|
preload: "auto",
|
|
21869
21764
|
type: "progress",
|
|
21870
|
-
|
|
21765
|
+
onBack: (e) => {
|
|
21871
21766
|
},
|
|
21872
21767
|
// type 为 progress时生效
|
|
21873
21768
|
onForward: (e) => {
|
|
@@ -21875,7 +21770,7 @@ const defaultProps$x = {
|
|
|
21875
21770
|
// type 为 progress时生效
|
|
21876
21771
|
onPause: (e) => {
|
|
21877
21772
|
},
|
|
21878
|
-
|
|
21773
|
+
onEnd: (e) => {
|
|
21879
21774
|
},
|
|
21880
21775
|
onMute: (e) => {
|
|
21881
21776
|
},
|
|
@@ -21888,17 +21783,17 @@ const Audio = (props) => {
|
|
|
21888
21783
|
} = useConfig();
|
|
21889
21784
|
const {
|
|
21890
21785
|
className,
|
|
21891
|
-
|
|
21786
|
+
src,
|
|
21892
21787
|
style,
|
|
21893
21788
|
muted,
|
|
21894
21789
|
autoplay,
|
|
21895
21790
|
loop: loop2,
|
|
21896
21791
|
preload,
|
|
21897
21792
|
type: type4,
|
|
21898
|
-
|
|
21793
|
+
onBack,
|
|
21899
21794
|
onForward,
|
|
21900
21795
|
onPause,
|
|
21901
|
-
|
|
21796
|
+
onEnd,
|
|
21902
21797
|
onMute,
|
|
21903
21798
|
onCanPlay,
|
|
21904
21799
|
children,
|
|
@@ -21922,13 +21817,13 @@ const Audio = (props) => {
|
|
|
21922
21817
|
playing: props.autoplay,
|
|
21923
21818
|
handPlaying: false
|
|
21924
21819
|
});
|
|
21925
|
-
const
|
|
21820
|
+
const classPrefix2 = "nut-audio";
|
|
21926
21821
|
const warn = console.warn;
|
|
21927
21822
|
const handleEnded = (e) => {
|
|
21928
21823
|
if (props.loop) {
|
|
21929
21824
|
warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
|
|
21930
21825
|
} else {
|
|
21931
|
-
props.
|
|
21826
|
+
props.onEnd && props.onEnd(e);
|
|
21932
21827
|
}
|
|
21933
21828
|
};
|
|
21934
21829
|
function watch() {
|
|
@@ -21953,15 +21848,13 @@ const Audio = (props) => {
|
|
|
21953
21848
|
}
|
|
21954
21849
|
};
|
|
21955
21850
|
const renderIcon = () => {
|
|
21956
|
-
return /* @__PURE__ */ jsx(
|
|
21851
|
+
return /* @__PURE__ */ jsx("div", {
|
|
21852
|
+
className: `${classPrefix2}__icon`,
|
|
21957
21853
|
children: /* @__PURE__ */ jsx("div", {
|
|
21958
|
-
className:
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
children: /* @__PURE__ */ jsx(k, {
|
|
21963
|
-
className: playing ? "nut-icon-loading" : ""
|
|
21964
|
-
})
|
|
21854
|
+
className: classNames(`${classPrefix2}__icon-box`, playing ? `${classPrefix2}__icon-play` : `${classPrefix2}__icon-stop`),
|
|
21855
|
+
onClick: handleStatusChange,
|
|
21856
|
+
children: /* @__PURE__ */ jsx(k, {
|
|
21857
|
+
className: playing ? "nut-icon-loading" : ""
|
|
21965
21858
|
})
|
|
21966
21859
|
})
|
|
21967
21860
|
});
|
|
@@ -21970,7 +21863,7 @@ const Audio = (props) => {
|
|
|
21970
21863
|
if (statusRef.current.currentTime > 0 && AudioRef.current) {
|
|
21971
21864
|
statusRef.current.currentTime--;
|
|
21972
21865
|
AudioRef.current.currentTime = statusRef.current.currentTime;
|
|
21973
|
-
props.
|
|
21866
|
+
props.onBack && props.onBack(AudioRef.current);
|
|
21974
21867
|
}
|
|
21975
21868
|
};
|
|
21976
21869
|
const handleForward = () => {
|
|
@@ -22007,12 +21900,12 @@ const Audio = (props) => {
|
|
|
22007
21900
|
const renderProgerss = () => {
|
|
22008
21901
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
22009
21902
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
22010
|
-
className:
|
|
21903
|
+
className: `${classPrefix2}__progress`,
|
|
22011
21904
|
children: [/* @__PURE__ */ jsx("div", {
|
|
22012
21905
|
className: "time",
|
|
22013
21906
|
children: currentDuration
|
|
22014
21907
|
}), /* @__PURE__ */ jsx("div", {
|
|
22015
|
-
className:
|
|
21908
|
+
className: `${classPrefix2}__progress-bar-wrapper`,
|
|
22016
21909
|
children: /* @__PURE__ */ jsx(Range, {
|
|
22017
21910
|
modelValue: percent,
|
|
22018
21911
|
hiddenTag: true,
|
|
@@ -22054,7 +21947,7 @@ const Audio = (props) => {
|
|
|
22054
21947
|
};
|
|
22055
21948
|
const renderNone = () => {
|
|
22056
21949
|
return /* @__PURE__ */ jsx("div", {
|
|
22057
|
-
className:
|
|
21950
|
+
className: `${classPrefix2}__none-container`,
|
|
22058
21951
|
onClick: handleStatusChange,
|
|
22059
21952
|
children
|
|
22060
21953
|
});
|
|
@@ -22090,14 +21983,14 @@ const Audio = (props) => {
|
|
|
22090
21983
|
statusRef.current.currentTime = time;
|
|
22091
21984
|
};
|
|
22092
21985
|
return /* @__PURE__ */ jsxs("div", {
|
|
22093
|
-
className:
|
|
21986
|
+
className: classNames(classPrefix2, className),
|
|
22094
21987
|
style,
|
|
22095
21988
|
...rest,
|
|
22096
21989
|
children: [renderAudio(), /* @__PURE__ */ jsx("audio", {
|
|
22097
21990
|
className: "audioMain",
|
|
22098
21991
|
controls: type4 === "controls",
|
|
22099
21992
|
ref: AudioRef,
|
|
22100
|
-
src
|
|
21993
|
+
src,
|
|
22101
21994
|
muted,
|
|
22102
21995
|
preload,
|
|
22103
21996
|
loop: loop2,
|
|
@@ -22151,12 +22044,12 @@ const Avatar = (props) => {
|
|
|
22151
22044
|
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
22152
22045
|
const avatarRef = useRef(null);
|
|
22153
22046
|
const parent = useContext(AvatarContext);
|
|
22154
|
-
const
|
|
22047
|
+
const b = cn("avatar");
|
|
22155
22048
|
const classes = classNames({
|
|
22156
22049
|
[`nut-avatar-${size || ((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || "normal"}`]: true,
|
|
22157
22050
|
[`nut-avatar-${shape || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || "round"}`]: true
|
|
22158
22051
|
});
|
|
22159
|
-
const cls = classNames(
|
|
22052
|
+
const cls = classNames(b(""), classes, className);
|
|
22160
22053
|
const sizeValue = ["large", "normal", "small"];
|
|
22161
22054
|
const styles = {
|
|
22162
22055
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -22253,8 +22146,8 @@ const AvatarGroup = (props) => {
|
|
|
22253
22146
|
children
|
|
22254
22147
|
} = propAvatarGroup;
|
|
22255
22148
|
const avatarGroupRef = useRef(null);
|
|
22256
|
-
const
|
|
22257
|
-
const cls = classNames(
|
|
22149
|
+
const b = cn("avatar-group");
|
|
22150
|
+
const cls = classNames(b(""), className);
|
|
22258
22151
|
const parentAvatar = {
|
|
22259
22152
|
propAvatarGroup,
|
|
22260
22153
|
avatarGroupRef
|
|
@@ -22273,41 +22166,36 @@ AvatarGroup.defaultProps = defaultProps$v;
|
|
|
22273
22166
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
22274
22167
|
const defaultProps$u = {
|
|
22275
22168
|
...ComponentDefaults,
|
|
22276
|
-
className: "",
|
|
22277
22169
|
value: "",
|
|
22278
22170
|
dot: false,
|
|
22279
|
-
max:
|
|
22171
|
+
max: 99,
|
|
22280
22172
|
top: "0",
|
|
22281
|
-
right: "
|
|
22282
|
-
|
|
22283
|
-
color: "",
|
|
22284
|
-
icon: null
|
|
22173
|
+
right: "5",
|
|
22174
|
+
color: ""
|
|
22285
22175
|
};
|
|
22286
|
-
const b = cn("badge");
|
|
22287
22176
|
const Badge = (props) => {
|
|
22288
22177
|
const {
|
|
22289
22178
|
className,
|
|
22290
22179
|
style,
|
|
22180
|
+
value,
|
|
22181
|
+
max,
|
|
22291
22182
|
children,
|
|
22292
22183
|
dot,
|
|
22293
22184
|
top,
|
|
22294
22185
|
right,
|
|
22295
|
-
|
|
22296
|
-
color,
|
|
22297
|
-
icon
|
|
22186
|
+
color
|
|
22298
22187
|
} = {
|
|
22299
22188
|
...defaultProps$u,
|
|
22300
22189
|
...props
|
|
22301
22190
|
};
|
|
22191
|
+
const classPrefix2 = "nut-badge";
|
|
22192
|
+
const classes = classNames(classPrefix2, className);
|
|
22193
|
+
const contentClasses = classNames({
|
|
22194
|
+
[`${classPrefix2}__dot`]: dot
|
|
22195
|
+
}, `${classPrefix2}__content`, `${classPrefix2}__sup`);
|
|
22302
22196
|
function content() {
|
|
22303
|
-
if (dot)
|
|
22304
|
-
return
|
|
22305
|
-
const {
|
|
22306
|
-
value
|
|
22307
|
-
} = props;
|
|
22308
|
-
const {
|
|
22309
|
-
max
|
|
22310
|
-
} = props;
|
|
22197
|
+
if (dot || typeof value === "object")
|
|
22198
|
+
return null;
|
|
22311
22199
|
if (typeof value === "number" && typeof max === "number") {
|
|
22312
22200
|
return max < value ? `${max}+` : value;
|
|
22313
22201
|
}
|
|
@@ -22317,22 +22205,19 @@ const Badge = (props) => {
|
|
|
22317
22205
|
const style2 = {};
|
|
22318
22206
|
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
22319
22207
|
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
22320
|
-
style2.zIndex = zIndex;
|
|
22321
22208
|
style2.background = color;
|
|
22322
22209
|
return style2;
|
|
22323
22210
|
};
|
|
22324
22211
|
return /* @__PURE__ */ jsxs("div", {
|
|
22325
|
-
className:
|
|
22212
|
+
className: classes,
|
|
22326
22213
|
style,
|
|
22327
|
-
children: [
|
|
22328
|
-
className:
|
|
22329
|
-
children:
|
|
22214
|
+
children: [typeof value === "object" && value && /* @__PURE__ */ jsx("div", {
|
|
22215
|
+
className: `${classPrefix2}__icon`,
|
|
22216
|
+
children: value
|
|
22330
22217
|
}), /* @__PURE__ */ jsx("div", {
|
|
22331
22218
|
children
|
|
22332
22219
|
}), /* @__PURE__ */ jsx("div", {
|
|
22333
|
-
className:
|
|
22334
|
-
"is-dot": dot
|
|
22335
|
-
}, b("content"), "sup"),
|
|
22220
|
+
className: contentClasses,
|
|
22336
22221
|
style: getStyle(),
|
|
22337
22222
|
children: content()
|
|
22338
22223
|
})]
|
|
@@ -22366,8 +22251,8 @@ const CircleProgress = (props) => {
|
|
|
22366
22251
|
...defaultProps$t,
|
|
22367
22252
|
...props
|
|
22368
22253
|
};
|
|
22369
|
-
const
|
|
22370
|
-
const classes = classNames(className,
|
|
22254
|
+
const b = cn("circleprogress");
|
|
22255
|
+
const classes = classNames(className, b(""));
|
|
22371
22256
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
22372
22257
|
const styles = {
|
|
22373
22258
|
height: `${Number(radius) * 2}px`,
|
|
@@ -22397,7 +22282,7 @@ const CircleProgress = (props) => {
|
|
|
22397
22282
|
return;
|
|
22398
22283
|
}
|
|
22399
22284
|
const color = circleColor;
|
|
22400
|
-
const colorArr = Object.keys(color).sort((a2,
|
|
22285
|
+
const colorArr = Object.keys(color).sort((a2, b2) => parseFloat(a2) - parseFloat(b2));
|
|
22401
22286
|
const stopArr = [];
|
|
22402
22287
|
colorArr.map((item) => {
|
|
22403
22288
|
const obj = {
|
|
@@ -22667,7 +22552,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
22667
22552
|
...defaultProps$q,
|
|
22668
22553
|
...props
|
|
22669
22554
|
};
|
|
22670
|
-
const
|
|
22555
|
+
const b = cn("countdown");
|
|
22671
22556
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
22672
22557
|
const stateRef = useRef({
|
|
22673
22558
|
pauseTime: 0,
|
|
@@ -22861,13 +22746,13 @@ const InternalCountDown = (props, ref) => {
|
|
|
22861
22746
|
return formatRemainTime(stateRef.current.restTime);
|
|
22862
22747
|
})();
|
|
22863
22748
|
return /* @__PURE__ */ jsx("div", {
|
|
22864
|
-
className: `${
|
|
22749
|
+
className: `${b()} ${className || ""}`,
|
|
22865
22750
|
style: {
|
|
22866
22751
|
...style
|
|
22867
22752
|
},
|
|
22868
22753
|
...rest,
|
|
22869
22754
|
children: children || /* @__PURE__ */ jsx("div", {
|
|
22870
|
-
className:
|
|
22755
|
+
className: b("block"),
|
|
22871
22756
|
dangerouslySetInnerHTML: {
|
|
22872
22757
|
__html: `${renderTime}`
|
|
22873
22758
|
}
|
|
@@ -23077,7 +22962,7 @@ const Empty = (props) => {
|
|
|
23077
22962
|
...props
|
|
23078
22963
|
};
|
|
23079
22964
|
const [imgStyle, setImgStyle] = useState({});
|
|
23080
|
-
const
|
|
22965
|
+
const b = cn("empty");
|
|
23081
22966
|
let imageNode = image;
|
|
23082
22967
|
if (typeof image === "string") {
|
|
23083
22968
|
const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
|
|
@@ -23106,15 +22991,15 @@ const Empty = (props) => {
|
|
|
23106
22991
|
});
|
|
23107
22992
|
}, [imageSize]);
|
|
23108
22993
|
return /* @__PURE__ */ jsx("div", {
|
|
23109
|
-
className: `${
|
|
22994
|
+
className: `${b()} ${className}`,
|
|
23110
22995
|
...rest,
|
|
23111
22996
|
children: /* @__PURE__ */ jsxs(Fragment, {
|
|
23112
22997
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23113
|
-
className:
|
|
22998
|
+
className: b("image"),
|
|
23114
22999
|
style: imgStyle,
|
|
23115
23000
|
children: imageNode
|
|
23116
23001
|
}), typeof description === "string" ? /* @__PURE__ */ jsx("div", {
|
|
23117
|
-
className:
|
|
23002
|
+
className: b("description"),
|
|
23118
23003
|
children: description || locale.noData
|
|
23119
23004
|
}) : {
|
|
23120
23005
|
description
|
|
@@ -23157,8 +23042,8 @@ const Video = (props) => {
|
|
|
23157
23042
|
...props
|
|
23158
23043
|
};
|
|
23159
23044
|
const rootRef = useRef(null);
|
|
23160
|
-
const
|
|
23161
|
-
const classes = classNames(className,
|
|
23045
|
+
const b = cn("video");
|
|
23046
|
+
const classes = classNames(className, b(""));
|
|
23162
23047
|
useEffect(() => {
|
|
23163
23048
|
init();
|
|
23164
23049
|
}, []);
|
|
@@ -23476,11 +23361,11 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
23476
23361
|
touch.stateDirection = getDirection2(touch.offsetX, touch.offsetY);
|
|
23477
23362
|
}
|
|
23478
23363
|
};
|
|
23479
|
-
const
|
|
23480
|
-
const classes = classNames(
|
|
23364
|
+
const b = cn("swiper");
|
|
23365
|
+
const classes = classNames(b(""));
|
|
23481
23366
|
const contentClass = classNames({
|
|
23482
|
-
[`${
|
|
23483
|
-
[`${
|
|
23367
|
+
[`${b("inner")}`]: true,
|
|
23368
|
+
[`${b("vertical")}`]: isVertical
|
|
23484
23369
|
});
|
|
23485
23370
|
const getStyle = (moveOffset = offset) => {
|
|
23486
23371
|
const target = innerRef.current;
|
|
@@ -23639,15 +23524,15 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
23639
23524
|
ref: innerRef,
|
|
23640
23525
|
children: React__default.Children.map(childs, (child, index) => {
|
|
23641
23526
|
return /* @__PURE__ */ jsx("div", {
|
|
23642
|
-
className:
|
|
23527
|
+
className: b("item-wrapper"),
|
|
23643
23528
|
style: itemStyle(index),
|
|
23644
23529
|
children: child
|
|
23645
23530
|
}, index);
|
|
23646
23531
|
})
|
|
23647
23532
|
}), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ jsx("div", {
|
|
23648
23533
|
className: classNames({
|
|
23649
|
-
[`${
|
|
23650
|
-
[`${
|
|
23534
|
+
[`${b("pagination")}`]: true,
|
|
23535
|
+
[`${b("pagination-vertical")}`]: isVertical
|
|
23651
23536
|
}),
|
|
23652
23537
|
children: React__default.Children.map(childs, (item, index) => {
|
|
23653
23538
|
return /* @__PURE__ */ jsx("i", {
|
|
@@ -23685,8 +23570,8 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
23685
23570
|
size
|
|
23686
23571
|
} = _props;
|
|
23687
23572
|
const parent = useContext(DataContext$1);
|
|
23688
|
-
const
|
|
23689
|
-
const classes = classNames(
|
|
23573
|
+
const b = cn("swiper-item");
|
|
23574
|
+
const classes = classNames(b(""), className);
|
|
23690
23575
|
const getStyle = () => {
|
|
23691
23576
|
const style2 = {};
|
|
23692
23577
|
const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
|
|
@@ -23851,7 +23736,7 @@ const ImagePreview = (props) => {
|
|
|
23851
23736
|
};
|
|
23852
23737
|
return /* @__PURE__ */ jsxs(Popup, {
|
|
23853
23738
|
visible: showPop,
|
|
23854
|
-
|
|
23739
|
+
className: "custom-pop",
|
|
23855
23740
|
style: {
|
|
23856
23741
|
width: "100%"
|
|
23857
23742
|
},
|
|
@@ -24260,7 +24145,7 @@ const NoticeBar = (props) => {
|
|
|
24260
24145
|
});
|
|
24261
24146
|
}
|
|
24262
24147
|
};
|
|
24263
|
-
const
|
|
24148
|
+
const b = cn("noticebar");
|
|
24264
24149
|
const noticebarClass = classNames({
|
|
24265
24150
|
"nut-noticebar-page": true,
|
|
24266
24151
|
withicon: closeMode,
|
|
@@ -24273,7 +24158,7 @@ const NoticeBar = (props) => {
|
|
|
24273
24158
|
};
|
|
24274
24159
|
}, []);
|
|
24275
24160
|
return /* @__PURE__ */ jsxs("div", {
|
|
24276
|
-
className: `${
|
|
24161
|
+
className: `${b()} ${className || ""}`,
|
|
24277
24162
|
style,
|
|
24278
24163
|
children: [showNoticeBar && direction === "across" ? /* @__PURE__ */ jsxs("div", {
|
|
24279
24164
|
className: noticebarClass,
|
|
@@ -24563,7 +24448,7 @@ const Price = (props) => {
|
|
|
24563
24448
|
...defaultProps$h,
|
|
24564
24449
|
...props
|
|
24565
24450
|
};
|
|
24566
|
-
const
|
|
24451
|
+
const b = cn("price");
|
|
24567
24452
|
const showSymbol = () => {
|
|
24568
24453
|
return {
|
|
24569
24454
|
__html: needSymbol ? symbol : ""
|
|
@@ -24603,21 +24488,21 @@ const Price = (props) => {
|
|
|
24603
24488
|
};
|
|
24604
24489
|
const renderSymbol = () => {
|
|
24605
24490
|
return /* @__PURE__ */ jsx("div", {
|
|
24606
|
-
className: `${
|
|
24491
|
+
className: `${b("symbol")} ${b(`symbol-${size}`)}`,
|
|
24607
24492
|
dangerouslySetInnerHTML: showSymbol()
|
|
24608
24493
|
});
|
|
24609
24494
|
};
|
|
24610
24495
|
return /* @__PURE__ */ jsxs("div", {
|
|
24611
|
-
className: `${
|
|
24496
|
+
className: `${b()} ${className}`,
|
|
24612
24497
|
...rest,
|
|
24613
24498
|
children: [needSymbol && position === "before" ? renderSymbol() : null, /* @__PURE__ */ jsx("div", {
|
|
24614
|
-
className: `${
|
|
24499
|
+
className: `${b("integer")} ${b(`integer-${size}`)}`,
|
|
24615
24500
|
children: formatThousands(price)
|
|
24616
24501
|
}), decimalDigits !== 0 ? /* @__PURE__ */ jsx("div", {
|
|
24617
|
-
className: `${
|
|
24502
|
+
className: `${b("decimal")} ${b(`decimal-${size}`)}`,
|
|
24618
24503
|
children: "."
|
|
24619
24504
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
24620
|
-
className: `${
|
|
24505
|
+
className: `${b("decimal")} ${b(`decimal-${size}`)}`,
|
|
24621
24506
|
children: formatDecimal(price)
|
|
24622
24507
|
}), needSymbol && position === "after" ? renderSymbol() : null]
|
|
24623
24508
|
});
|
|
@@ -24655,8 +24540,8 @@ const Skeleton = (props) => {
|
|
|
24655
24540
|
...defaultProps$g,
|
|
24656
24541
|
...props
|
|
24657
24542
|
};
|
|
24658
|
-
const
|
|
24659
|
-
const classes = classNames(className,
|
|
24543
|
+
const b = cn("skeleton");
|
|
24544
|
+
const classes = classNames(className, b());
|
|
24660
24545
|
const blockClass = classNames({
|
|
24661
24546
|
blockClass: true,
|
|
24662
24547
|
"blockClass--round": round
|
|
@@ -24758,10 +24643,10 @@ const Step = (props) => {
|
|
|
24758
24643
|
((_a2 = parent.propSteps) == null ? void 0 : _a2.onClickStep) && ((_b = parent.propSteps) == null ? void 0 : _b.onClickStep(activeIndex));
|
|
24759
24644
|
((_c = parent.propSteps) == null ? void 0 : _c.clickStep) && ((_d = parent.propSteps) == null ? void 0 : _d.clickStep(activeIndex));
|
|
24760
24645
|
};
|
|
24761
|
-
const
|
|
24646
|
+
const b = cn("step");
|
|
24762
24647
|
const classes = classNames({
|
|
24763
|
-
[`${
|
|
24764
|
-
}, className,
|
|
24648
|
+
[`${b("")}-${getCurrentStatus()}`]: true
|
|
24649
|
+
}, className, b(""));
|
|
24765
24650
|
const renderIconClass = () => {
|
|
24766
24651
|
if (!dot && icon) {
|
|
24767
24652
|
return "nut-step-icon is-icon";
|
|
@@ -24826,11 +24711,11 @@ const Steps = (props) => {
|
|
|
24826
24711
|
const parentSteps = {
|
|
24827
24712
|
propSteps
|
|
24828
24713
|
};
|
|
24829
|
-
const
|
|
24714
|
+
const b = cn("steps");
|
|
24830
24715
|
const classes = classNames({
|
|
24831
|
-
[`${
|
|
24832
|
-
[`${
|
|
24833
|
-
}, className,
|
|
24716
|
+
[`${b("")}-${direction}`]: true,
|
|
24717
|
+
[`${b("")}-dot`]: !!props.progressDot
|
|
24718
|
+
}, className, b(""));
|
|
24834
24719
|
return /* @__PURE__ */ jsx(DataContext.Provider, {
|
|
24835
24720
|
value: parentSteps,
|
|
24836
24721
|
children: React__default.createElement("div", {
|
|
@@ -24882,9 +24767,9 @@ const Table = (props) => {
|
|
|
24882
24767
|
setCurData(data);
|
|
24883
24768
|
}
|
|
24884
24769
|
}, [data]);
|
|
24885
|
-
const
|
|
24770
|
+
const b = cn("table");
|
|
24886
24771
|
const classes = classNames({});
|
|
24887
|
-
const cls = classNames(
|
|
24772
|
+
const cls = classNames(b(), classes, className);
|
|
24888
24773
|
const handleSorterClick = (item) => {
|
|
24889
24774
|
if (item.sorter) {
|
|
24890
24775
|
onSorter && onSorter(item, curData);
|
|
@@ -25126,7 +25011,7 @@ const TrendArrow = (props) => {
|
|
|
25126
25011
|
...defaultProps$b,
|
|
25127
25012
|
...props
|
|
25128
25013
|
};
|
|
25129
|
-
const
|
|
25014
|
+
const b = cn("trendarrow");
|
|
25130
25015
|
const handleClick2 = () => {
|
|
25131
25016
|
};
|
|
25132
25017
|
const rateTrend = useRef(rate > 0);
|
|
@@ -25165,13 +25050,13 @@ const TrendArrow = (props) => {
|
|
|
25165
25050
|
const renderContent = (arrowLeft2) => {
|
|
25166
25051
|
const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
|
|
25167
25052
|
return /* @__PURE__ */ jsx("span", {
|
|
25168
|
-
className: `${
|
|
25053
|
+
className: `${b(classNameSuffix)} ${b("rate")}`,
|
|
25169
25054
|
style: calcStyle,
|
|
25170
25055
|
children: calcRate
|
|
25171
25056
|
});
|
|
25172
25057
|
};
|
|
25173
25058
|
return /* @__PURE__ */ jsxs("div", {
|
|
25174
|
-
className: `${
|
|
25059
|
+
className: `${b()} ${className}`,
|
|
25175
25060
|
...rest,
|
|
25176
25061
|
onClick: handleClick2,
|
|
25177
25062
|
children: [!arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ jsx(Fragment, {
|
|
@@ -25514,10 +25399,10 @@ const WaterMark = (props) => {
|
|
|
25514
25399
|
...props
|
|
25515
25400
|
};
|
|
25516
25401
|
const [base64Url, setBase64Url] = useState("");
|
|
25517
|
-
const
|
|
25402
|
+
const b = cn("watermark");
|
|
25518
25403
|
const classes = classNames({
|
|
25519
|
-
[`${
|
|
25520
|
-
[`${
|
|
25404
|
+
[`${b("")}`]: true,
|
|
25405
|
+
[`${b("")}-full-page`]: fullPage
|
|
25521
25406
|
});
|
|
25522
25407
|
const cls = classNames(classes, className);
|
|
25523
25408
|
useEffect(() => {
|
|
@@ -25602,7 +25487,7 @@ const ExistRender = (props) => {
|
|
|
25602
25487
|
...defaultProps$8,
|
|
25603
25488
|
...props
|
|
25604
25489
|
};
|
|
25605
|
-
const
|
|
25490
|
+
const b = cn("address");
|
|
25606
25491
|
const selectedExist = (item) => {
|
|
25607
25492
|
const copyExistAdd = existAddress;
|
|
25608
25493
|
let prevExistAdd = {
|
|
@@ -25630,18 +25515,18 @@ const ExistRender = (props) => {
|
|
|
25630
25515
|
useEffect(() => {
|
|
25631
25516
|
}, [existAddress]);
|
|
25632
25517
|
return /* @__PURE__ */ jsxs("div", {
|
|
25633
|
-
className:
|
|
25518
|
+
className: b("exist"),
|
|
25634
25519
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25635
|
-
className:
|
|
25520
|
+
className: b("exist-group"),
|
|
25636
25521
|
children: /* @__PURE__ */ jsx("ul", {
|
|
25637
|
-
className:
|
|
25522
|
+
className: b("exist-ul"),
|
|
25638
25523
|
children: existAddress.map((item, index) => {
|
|
25639
25524
|
return /* @__PURE__ */ jsx("li", {
|
|
25640
|
-
className:
|
|
25525
|
+
className: b("exist-item"),
|
|
25641
25526
|
children: /* @__PURE__ */ jsxs("div", {
|
|
25642
25527
|
onClick: () => selectedExist(item),
|
|
25643
25528
|
children: [item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ jsxs("div", {
|
|
25644
|
-
className:
|
|
25529
|
+
className: b("exist-item-info"),
|
|
25645
25530
|
children: [item.name && item.phone && /* @__PURE__ */ jsxs("div", {
|
|
25646
25531
|
className: "exist-item-info-top",
|
|
25647
25532
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -25663,10 +25548,10 @@ const ExistRender = (props) => {
|
|
|
25663
25548
|
})
|
|
25664
25549
|
})
|
|
25665
25550
|
}), isShowCustomAddress && /* @__PURE__ */ jsx("div", {
|
|
25666
|
-
className:
|
|
25551
|
+
className: b("choose-other"),
|
|
25667
25552
|
onClick: onSwitch,
|
|
25668
25553
|
children: /* @__PURE__ */ jsx("div", {
|
|
25669
|
-
className:
|
|
25554
|
+
className: b("choose-other-btn"),
|
|
25670
25555
|
children: customAndExistTitle || locale.address.chooseAnotherAddress
|
|
25671
25556
|
})
|
|
25672
25557
|
})]
|
|
@@ -25702,7 +25587,7 @@ const CustomRender = (props) => {
|
|
|
25702
25587
|
...defaultProps$7,
|
|
25703
25588
|
...props
|
|
25704
25589
|
};
|
|
25705
|
-
const
|
|
25590
|
+
const b = cn("address");
|
|
25706
25591
|
const [privateType] = useState(type4);
|
|
25707
25592
|
const [tabIndex, setTabIndex] = useState(0);
|
|
25708
25593
|
const [tabName] = useState(["province", "city", "country", "town"]);
|
|
@@ -25725,8 +25610,8 @@ const CustomRender = (props) => {
|
|
|
25725
25610
|
}
|
|
25726
25611
|
});
|
|
25727
25612
|
const newData = [];
|
|
25728
|
-
data = data.sort((a2,
|
|
25729
|
-
return a2.title.localeCompare(
|
|
25613
|
+
data = data.sort((a2, b2) => {
|
|
25614
|
+
return a2.title.localeCompare(b2.title);
|
|
25730
25615
|
});
|
|
25731
25616
|
data.forEach((item) => {
|
|
25732
25617
|
const index = newData.findIndex((value) => value.title === item.title);
|
|
@@ -25921,12 +25806,12 @@ const CustomRender = (props) => {
|
|
|
25921
25806
|
initCustomSelected();
|
|
25922
25807
|
}, [modelValue]);
|
|
25923
25808
|
return /* @__PURE__ */ jsxs("div", {
|
|
25924
|
-
className:
|
|
25809
|
+
className: b("custom"),
|
|
25925
25810
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25926
|
-
className:
|
|
25811
|
+
className: b("region-tab"),
|
|
25927
25812
|
children: [selectedRegion && Object.keys(selectedRegion).map((key, index) => {
|
|
25928
25813
|
return /* @__PURE__ */ jsx("div", {
|
|
25929
|
-
className: `${
|
|
25814
|
+
className: `${b("tab-item")} ${index === tabIndex ? "active" : ""}`,
|
|
25930
25815
|
ref: mapRef[key],
|
|
25931
25816
|
onClick: () => changeRegionTab(selectedRegion[key], index, key),
|
|
25932
25817
|
children: index <= tabIndex && /* @__PURE__ */ jsx("div", {
|
|
@@ -25934,25 +25819,25 @@ const CustomRender = (props) => {
|
|
|
25934
25819
|
})
|
|
25935
25820
|
}, index);
|
|
25936
25821
|
}), /* @__PURE__ */ jsx("div", {
|
|
25937
|
-
className:
|
|
25822
|
+
className: b("tab-line"),
|
|
25938
25823
|
ref: regionLine,
|
|
25939
25824
|
style: {
|
|
25940
25825
|
left: `${lineDistance}px`
|
|
25941
25826
|
}
|
|
25942
25827
|
})]
|
|
25943
25828
|
}), privateType === "custom" && /* @__PURE__ */ jsx("div", {
|
|
25944
|
-
className:
|
|
25829
|
+
className: b("region-con"),
|
|
25945
25830
|
children: /* @__PURE__ */ jsx("ul", {
|
|
25946
|
-
className:
|
|
25831
|
+
className: b("region-group"),
|
|
25947
25832
|
children: regionList[tabName[tabIndex]].map((item, index) => {
|
|
25948
25833
|
return /* @__PURE__ */ jsx("li", {
|
|
25949
|
-
className:
|
|
25834
|
+
className: b("region-item"),
|
|
25950
25835
|
children: /* @__PURE__ */ jsxs("div", {
|
|
25951
25836
|
onClick: () => {
|
|
25952
25837
|
nextAreaList(item);
|
|
25953
25838
|
},
|
|
25954
25839
|
children: [selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ jsx(x$e, {
|
|
25955
|
-
className:
|
|
25840
|
+
className: b("region-item--icon"),
|
|
25956
25841
|
color: "var(--nutui-brand-color)",
|
|
25957
25842
|
width: 13,
|
|
25958
25843
|
height: 13
|
|
@@ -25962,10 +25847,10 @@ const CustomRender = (props) => {
|
|
|
25962
25847
|
})
|
|
25963
25848
|
})
|
|
25964
25849
|
}), privateType === "custom2" && /* @__PURE__ */ jsx("div", {
|
|
25965
|
-
className:
|
|
25850
|
+
className: b("elevator-group"),
|
|
25966
25851
|
children: /* @__PURE__ */ jsx(Elevator, {
|
|
25967
25852
|
height,
|
|
25968
|
-
|
|
25853
|
+
list: regionList[tabName[tabIndex]],
|
|
25969
25854
|
onClickItem: handleElevatorItem
|
|
25970
25855
|
})
|
|
25971
25856
|
})]
|
|
@@ -26027,7 +25912,7 @@ const Address = (props) => {
|
|
|
26027
25912
|
...defaultProps$6,
|
|
26028
25913
|
...props
|
|
26029
25914
|
};
|
|
26030
|
-
const
|
|
25915
|
+
const b = cn("address");
|
|
26031
25916
|
const [privateType, setPrivateType] = useState(type4);
|
|
26032
25917
|
const [tabName] = useState(["province", "city", "country", "town"]);
|
|
26033
25918
|
const [showPopup, setShowPopup] = useState(modelValue);
|
|
@@ -26121,7 +26006,7 @@ const Address = (props) => {
|
|
|
26121
26006
|
};
|
|
26122
26007
|
const headerRender = () => {
|
|
26123
26008
|
return /* @__PURE__ */ jsxs("div", {
|
|
26124
|
-
className:
|
|
26009
|
+
className: b("header"),
|
|
26125
26010
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26126
26011
|
className: "arrow-back",
|
|
26127
26012
|
onClick: onSwitchModule,
|
|
@@ -26129,7 +26014,7 @@ const Address = (props) => {
|
|
|
26129
26014
|
color: "#cccccc"
|
|
26130
26015
|
}))
|
|
26131
26016
|
}), /* @__PURE__ */ jsx("div", {
|
|
26132
|
-
className:
|
|
26017
|
+
className: b("header__title"),
|
|
26133
26018
|
children: privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo
|
|
26134
26019
|
}), /* @__PURE__ */ jsx("div", {
|
|
26135
26020
|
onClick: () => handClose(),
|
|
@@ -26158,7 +26043,7 @@ const Address = (props) => {
|
|
|
26158
26043
|
closeFun();
|
|
26159
26044
|
},
|
|
26160
26045
|
children: /* @__PURE__ */ jsxs("div", {
|
|
26161
|
-
className: `${
|
|
26046
|
+
className: `${b()} ${className || ""}`,
|
|
26162
26047
|
style: {
|
|
26163
26048
|
...style
|
|
26164
26049
|
},
|
|
@@ -26223,8 +26108,8 @@ const InternalBarrage = (props, ref) => {
|
|
|
26223
26108
|
const barrageCWidth = useRef(0);
|
|
26224
26109
|
const timer = useRef(0);
|
|
26225
26110
|
const index = useRef(0);
|
|
26226
|
-
const
|
|
26227
|
-
const classes = classNames(className,
|
|
26111
|
+
const b = cn("barrage");
|
|
26112
|
+
const classes = classNames(className, b(""));
|
|
26228
26113
|
useImperativeHandle(ref, () => ({
|
|
26229
26114
|
add: (word) => {
|
|
26230
26115
|
const _index = index.current % barrageList.length;
|
|
@@ -26310,32 +26195,32 @@ const Card = (props) => {
|
|
|
26310
26195
|
...defaultProps$4,
|
|
26311
26196
|
...props
|
|
26312
26197
|
};
|
|
26313
|
-
const
|
|
26198
|
+
const b = cn("card");
|
|
26314
26199
|
return /* @__PURE__ */ jsxs("div", {
|
|
26315
|
-
className: classNames(
|
|
26200
|
+
className: classNames(b(), className),
|
|
26316
26201
|
style,
|
|
26317
26202
|
...rest,
|
|
26318
26203
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26319
|
-
className:
|
|
26204
|
+
className: b("left"),
|
|
26320
26205
|
children: /* @__PURE__ */ jsx("img", {
|
|
26321
26206
|
src: imgUrl,
|
|
26322
26207
|
alt: ""
|
|
26323
26208
|
})
|
|
26324
26209
|
}), /* @__PURE__ */ jsxs("div", {
|
|
26325
|
-
className:
|
|
26210
|
+
className: b("right"),
|
|
26326
26211
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26327
|
-
className:
|
|
26212
|
+
className: b("right__title"),
|
|
26328
26213
|
children: title
|
|
26329
26214
|
}), prolistTpl, /* @__PURE__ */ jsxs("div", {
|
|
26330
|
-
className:
|
|
26215
|
+
className: b("right__price"),
|
|
26331
26216
|
children: [/* @__PURE__ */ jsx(Price, {
|
|
26332
26217
|
price
|
|
26333
26218
|
}), originTpl || /* @__PURE__ */ jsx(Price, {
|
|
26334
|
-
className:
|
|
26219
|
+
className: b("right__price__origin"),
|
|
26335
26220
|
price: vipPrice
|
|
26336
26221
|
})]
|
|
26337
26222
|
}), /* @__PURE__ */ jsx("div", {
|
|
26338
|
-
className:
|
|
26223
|
+
className: b("right__other"),
|
|
26339
26224
|
children: shopTagTpl || /* @__PURE__ */ jsxs(Fragment, {
|
|
26340
26225
|
children: [/* @__PURE__ */ jsx(Tag, {
|
|
26341
26226
|
type: "danger",
|
|
@@ -26346,9 +26231,9 @@ const Card = (props) => {
|
|
|
26346
26231
|
})]
|
|
26347
26232
|
})
|
|
26348
26233
|
}), /* @__PURE__ */ jsxs("div", {
|
|
26349
|
-
className:
|
|
26234
|
+
className: b("right__shop"),
|
|
26350
26235
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26351
|
-
className:
|
|
26236
|
+
className: b("right__shop__name"),
|
|
26352
26237
|
children: shopName
|
|
26353
26238
|
}), footerTpl]
|
|
26354
26239
|
})]
|
|
@@ -26383,7 +26268,7 @@ const Signature = (props) => {
|
|
|
26383
26268
|
...defaultProps$3,
|
|
26384
26269
|
...props
|
|
26385
26270
|
};
|
|
26386
|
-
const
|
|
26271
|
+
const b = cn("signature");
|
|
26387
26272
|
const canvasRef = useRef(null);
|
|
26388
26273
|
const wrapRef = useRef(null);
|
|
26389
26274
|
const [canvasHeight, setCanvasHeight] = useState(0);
|
|
@@ -26473,26 +26358,26 @@ const Signature = (props) => {
|
|
|
26473
26358
|
onConfirm && onConfirm(canvas, dataurl);
|
|
26474
26359
|
};
|
|
26475
26360
|
return /* @__PURE__ */ jsxs("div", {
|
|
26476
|
-
className: `${
|
|
26361
|
+
className: `${b()} ${className}`,
|
|
26477
26362
|
...rest,
|
|
26478
26363
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26479
|
-
className: `${
|
|
26364
|
+
className: `${b("inner")}`,
|
|
26480
26365
|
ref: wrapRef,
|
|
26481
26366
|
children: isCanvasSupported() ? /* @__PURE__ */ jsx("canvas", {
|
|
26482
26367
|
ref: canvasRef,
|
|
26483
26368
|
height: canvasHeight,
|
|
26484
26369
|
width: canvasWidth
|
|
26485
26370
|
}) : /* @__PURE__ */ jsx("p", {
|
|
26486
|
-
className: `${
|
|
26371
|
+
className: `${b("unsopport")}`,
|
|
26487
26372
|
children: locale.signature.unSupportTpl || unSupportTpl
|
|
26488
26373
|
})
|
|
26489
26374
|
}), /* @__PURE__ */ jsx(Button, {
|
|
26490
|
-
className: `${
|
|
26375
|
+
className: `${b("btn")}`,
|
|
26491
26376
|
type: "default",
|
|
26492
26377
|
onClick: () => handleClearBtn(),
|
|
26493
26378
|
children: locale.signature.reSign
|
|
26494
26379
|
}), /* @__PURE__ */ jsx(Button, {
|
|
26495
|
-
className: `${
|
|
26380
|
+
className: `${b("btn")}`,
|
|
26496
26381
|
type: "primary",
|
|
26497
26382
|
onClick: () => handleConfirmBtn(),
|
|
26498
26383
|
children: locale.confirm
|
|
@@ -26521,7 +26406,7 @@ const TimeDetail = (props) => {
|
|
|
26521
26406
|
...defaultProps$2,
|
|
26522
26407
|
...props
|
|
26523
26408
|
};
|
|
26524
|
-
const
|
|
26409
|
+
const b = cn("timedetail");
|
|
26525
26410
|
const [renderData, setRenderData] = useState([]);
|
|
26526
26411
|
useEffect(() => {
|
|
26527
26412
|
const currentData = times.find((timesItem) => String(timesItem.key) === String(currentKey));
|
|
@@ -26540,7 +26425,7 @@ const TimeDetail = (props) => {
|
|
|
26540
26425
|
return initClass;
|
|
26541
26426
|
};
|
|
26542
26427
|
return /* @__PURE__ */ jsx("div", {
|
|
26543
|
-
className: `${
|
|
26428
|
+
className: `${b()} ${className || ""}`,
|
|
26544
26429
|
children: renderData.map((item, index) => /* @__PURE__ */ jsx("span", {
|
|
26545
26430
|
className: getDetailClass(item),
|
|
26546
26431
|
onClick: () => handleTime(item),
|
|
@@ -26567,9 +26452,9 @@ const TimePannel = (props) => {
|
|
|
26567
26452
|
...defaultProps$1,
|
|
26568
26453
|
...props
|
|
26569
26454
|
};
|
|
26570
|
-
const
|
|
26455
|
+
const b = cn("timepannel");
|
|
26571
26456
|
return /* @__PURE__ */ jsx("div", {
|
|
26572
|
-
className: `${
|
|
26457
|
+
className: `${b()} ${className || ""}`,
|
|
26573
26458
|
onClick: () => change(curKey),
|
|
26574
26459
|
children: date4
|
|
26575
26460
|
});
|
|
@@ -26620,7 +26505,7 @@ const TimeSelect = (props) => {
|
|
|
26620
26505
|
width: "100%",
|
|
26621
26506
|
height
|
|
26622
26507
|
};
|
|
26623
|
-
const
|
|
26508
|
+
const b = cn("timeselect");
|
|
26624
26509
|
const closeFun = () => {
|
|
26625
26510
|
if (onSelect) {
|
|
26626
26511
|
onSelect(activeTime);
|
|
@@ -26699,7 +26584,7 @@ const TimeSelect = (props) => {
|
|
|
26699
26584
|
closeFun();
|
|
26700
26585
|
},
|
|
26701
26586
|
children: /* @__PURE__ */ jsxs("div", {
|
|
26702
|
-
className: `${
|
|
26587
|
+
className: `${b()} ${className || ""}`,
|
|
26703
26588
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26704
26589
|
className: "nut-timeselect__title",
|
|
26705
26590
|
children: title
|