@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.
Files changed (46) hide show
  1. package/CHANGELOG.md +35 -627
  2. package/dist/esm/Address.js +1 -1
  3. package/dist/esm/Animate.js +6 -7
  4. package/dist/esm/Audio.js +18 -21
  5. package/dist/esm/Badge.js +15 -22
  6. package/dist/esm/Cascader.js +1 -1
  7. package/dist/esm/Col.js +4 -3
  8. package/dist/esm/Divider.js +4 -3
  9. package/dist/esm/Drag.js +7 -9
  10. package/dist/esm/Elevator.js +38 -41
  11. package/dist/esm/ImagePreview.js +1 -1
  12. package/dist/esm/Menu.js +75 -73
  13. package/dist/esm/MenuItem.js +29 -27
  14. package/dist/esm/NavBar.js +17 -48
  15. package/dist/esm/NumberKeyboard.js +1 -1
  16. package/dist/esm/Popup.js +23 -30
  17. package/dist/esm/Progress.js +20 -68
  18. package/dist/esm/Row.js +6 -5
  19. package/dist/esm/SideNavBar.js +0 -2
  20. package/dist/esm/Uploader.js +49 -52
  21. package/dist/locales/base.js +1 -1
  22. package/dist/locales/en-US.js +1 -1
  23. package/dist/locales/id-ID.js +1 -1
  24. package/dist/locales/zh-CN.js +1 -1
  25. package/dist/locales/zh-TW.js +1 -1
  26. package/dist/locales/zh-UG.js +1 -1
  27. package/dist/nutui.react.mjs +717 -832
  28. package/dist/nutui.react.umd.js +717 -832
  29. package/dist/packages/audio/audio.scss +2 -15
  30. package/dist/packages/badge/badge.scss +8 -17
  31. package/dist/packages/calendar/calendar.scss +0 -30
  32. package/dist/packages/elevator/elevator.scss +2 -28
  33. package/dist/packages/menu/menu.scss +44 -55
  34. package/dist/packages/menuitem/menuitem.scss +16 -26
  35. package/dist/packages/navbar/navbar.scss +16 -115
  36. package/dist/packages/popup/popup.scss +0 -16
  37. package/dist/packages/progress/progress.scss +19 -58
  38. package/dist/packages/row/row.scss +13 -31
  39. package/dist/packages/sidenavbar/sidenavbar.scss +0 -19
  40. package/dist/packages/uploader/uploader.scss +2 -28
  41. package/dist/style.css +1 -1
  42. package/dist/style.mjs +1 -1
  43. package/dist/styles/variables-jmapp.scss +23 -114
  44. package/dist/styles/variables.scss +31 -122
  45. package/dist/types/index.d.ts +43 -81
  46. package/package.json +1 -1
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
9
9
  return value;
10
10
  };
11
11
  /*!
12
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:29:36 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.0-alpha.2 Wed Apr 26 2023 18:36:40 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -333,29 +333,29 @@ var __publicField = (obj, key, value) => {
333
333
  }), typeof Reflect == "object" && Reflect.construct) {
334
334
  try {
335
335
  Reflect.construct(o, []);
336
- } catch (b2) {
337
- n = b2;
336
+ } catch (b) {
337
+ n = b;
338
338
  }
339
339
  Reflect.construct(e, [], o);
340
340
  } else {
341
341
  try {
342
342
  o.call();
343
- } catch (b2) {
344
- n = b2;
343
+ } catch (b) {
344
+ n = b;
345
345
  }
346
346
  e.call(o.prototype);
347
347
  }
348
348
  } else {
349
349
  try {
350
350
  throw Error();
351
- } catch (b2) {
352
- n = b2;
351
+ } catch (b) {
352
+ n = b;
353
353
  }
354
354
  e();
355
355
  }
356
- } catch (b2) {
357
- if (b2 && n && typeof b2.stack == "string") {
358
- for (var a2 = b2.stack.split(`
356
+ } catch (b) {
357
+ if (b && n && typeof b.stack == "string") {
358
+ for (var a2 = b.stack.split(`
359
359
  `), v = n.stack.split(`
360
360
  `), s = a2.length - 1, f = v.length - 1; s >= 1 && f >= 0 && a2[s] !== v[f]; )
361
361
  f--;
@@ -2292,15 +2292,15 @@ Check the top-level render call using <` + t + ">.");
2292
2292
  hasRequiredReactJsxRuntime_production_min = 1;
2293
2293
  var f = React, 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 };
2294
2294
  function q(c, a2, g) {
2295
- var b2, d = {}, e = null, h = null;
2295
+ var b, d = {}, e = null, h = null;
2296
2296
  void 0 !== g && (e = "" + g);
2297
2297
  void 0 !== a2.key && (e = "" + a2.key);
2298
2298
  void 0 !== a2.ref && (h = a2.ref);
2299
- for (b2 in a2)
2300
- m.call(a2, b2) && !p.hasOwnProperty(b2) && (d[b2] = a2[b2]);
2299
+ for (b in a2)
2300
+ m.call(a2, b) && !p.hasOwnProperty(b) && (d[b] = a2[b]);
2301
2301
  if (c && c.defaultProps)
2302
- for (b2 in a2 = c.defaultProps, a2)
2303
- void 0 === d[b2] && (d[b2] = a2[b2]);
2302
+ for (b in a2 = c.defaultProps, a2)
2303
+ void 0 === d[b] && (d[b] = a2[b]);
2304
2304
  return { $$typeof: k2, type: c, key: e, ref: h, props: d, _owner: n.current };
2305
2305
  }
2306
2306
  reactJsxRuntime_production_min.Fragment = l2;
@@ -3301,7 +3301,7 @@ Check the top-level render call using <` + t + ">.");
3301
3301
  onClick: (event) => {
3302
3302
  }
3303
3303
  };
3304
- const classPrefix$7 = "nut-cell";
3304
+ const classPrefix$9 = "nut-cell";
3305
3305
  const Cell = (props) => {
3306
3306
  const {
3307
3307
  children,
@@ -3330,26 +3330,26 @@ Check the top-level render call using <` + t + ">.");
3330
3330
  flex: 1
3331
3331
  };
3332
3332
  return /* @__PURE__ */ jsx("div", {
3333
- className: classNames(classPrefix$7, className),
3333
+ className: classNames(classPrefix$9, className),
3334
3334
  onClick: (event) => handleClick2(event),
3335
3335
  style: baseStyle,
3336
3336
  ...rest,
3337
3337
  children: children || /* @__PURE__ */ jsxs(Fragment, {
3338
3338
  children: [title || description ? /* @__PURE__ */ jsxs("div", {
3339
- className: `${classPrefix$7}__left`,
3339
+ className: `${classPrefix$9}__left`,
3340
3340
  children: [title ? /* @__PURE__ */ jsx("div", {
3341
- className: `${classPrefix$7}__title`,
3341
+ className: `${classPrefix$9}__title`,
3342
3342
  children: title
3343
3343
  }) : null, description ? /* @__PURE__ */ jsx("div", {
3344
- className: `${classPrefix$7}__description`,
3344
+ className: `${classPrefix$9}__description`,
3345
3345
  children: description
3346
3346
  }) : null]
3347
3347
  }) : null, extra ? /* @__PURE__ */ jsx("div", {
3348
- className: `${classPrefix$7}__extra`,
3348
+ className: `${classPrefix$9}__extra`,
3349
3349
  style: styles,
3350
3350
  children: extra
3351
3351
  }) : null, /* @__PURE__ */ jsx("div", {
3352
- className: `${classPrefix$7}__divider`
3352
+ className: `${classPrefix$9}__divider`
3353
3353
  })]
3354
3354
  })
3355
3355
  });
@@ -3361,7 +3361,7 @@ Check the top-level render call using <` + t + ">.");
3361
3361
  title: "",
3362
3362
  description: ""
3363
3363
  };
3364
- const classPrefix$6 = "nut-cell-group";
3364
+ const classPrefix$8 = "nut-cell-group";
3365
3365
  const CellGroup = (props) => {
3366
3366
  const {
3367
3367
  children,
@@ -3375,16 +3375,16 @@ Check the top-level render call using <` + t + ">.");
3375
3375
  ...props
3376
3376
  };
3377
3377
  return /* @__PURE__ */ jsxs("div", {
3378
- className: classNames(classPrefix$6, className),
3378
+ className: classNames(classPrefix$8, className),
3379
3379
  ...rest,
3380
3380
  children: [title ? /* @__PURE__ */ jsx("div", {
3381
- className: `${classPrefix$6}__title`,
3381
+ className: `${classPrefix$8}__title`,
3382
3382
  children: title
3383
3383
  }) : null, description ? /* @__PURE__ */ jsx("div", {
3384
- className: `${classPrefix$6}__description`,
3384
+ className: `${classPrefix$8}__description`,
3385
3385
  children: description
3386
3386
  }) : null, /* @__PURE__ */ jsx("div", {
3387
- className: `${classPrefix$6}__wrap`,
3387
+ className: `${classPrefix$8}__wrap`,
3388
3388
  children
3389
3389
  })]
3390
3390
  });
@@ -3864,7 +3864,7 @@ Check the top-level render call using <` + t + ">.");
3864
3864
  loading: true,
3865
3865
  lazy: false
3866
3866
  };
3867
- const classPrefix$5 = "nut-image";
3867
+ const classPrefix$7 = "nut-image";
3868
3868
  const Image$1 = (props) => {
3869
3869
  const {
3870
3870
  className,
@@ -3993,7 +3993,7 @@ Check the top-level render call using <` + t + ">.");
3993
3993
  return null;
3994
3994
  }, [loading, innerLoading]);
3995
3995
  return /* @__PURE__ */ jsxs("div", {
3996
- className: classNames(classPrefix$5, className),
3996
+ className: classNames(classPrefix$7, className),
3997
3997
  style: containerStyle,
3998
3998
  onClick: (e) => {
3999
3999
  imageClick(e);
@@ -4028,7 +4028,7 @@ Check the top-level render call using <` + t + ">.");
4028
4028
  visible: false,
4029
4029
  lockScroll: true
4030
4030
  };
4031
- const classPrefix$4 = `nut-overlay`;
4031
+ const classPrefix$6 = `nut-overlay`;
4032
4032
  const Overlay = (props) => {
4033
4033
  const {
4034
4034
  children,
@@ -4071,7 +4071,7 @@ Check the top-level render call using <` + t + ">.");
4071
4071
  "overlay-fade-enter-active": visible,
4072
4072
  "first-render": renderRef.current && !visible,
4073
4073
  "hidden-render": !visible
4074
- }, className, classPrefix$4);
4074
+ }, className, classPrefix$6);
4075
4075
  const styles = {
4076
4076
  zIndex,
4077
4077
  animationDuration: `${props.duration}s`,
@@ -4178,7 +4178,7 @@ Check the top-level render call using <` + t + ">.");
4178
4178
  if (hasRequiredReactIs_production_min)
4179
4179
  return reactIs_production_min;
4180
4180
  hasRequiredReactIs_production_min = 1;
4181
- var b2 = "function" === typeof Symbol && Symbol.for, c = b2 ? Symbol.for("react.element") : 60103, d = b2 ? Symbol.for("react.portal") : 60106, e = b2 ? Symbol.for("react.fragment") : 60107, f = b2 ? Symbol.for("react.strict_mode") : 60108, g = b2 ? Symbol.for("react.profiler") : 60114, h = b2 ? Symbol.for("react.provider") : 60109, k2 = b2 ? Symbol.for("react.context") : 60110, l2 = b2 ? Symbol.for("react.async_mode") : 60111, m = b2 ? Symbol.for("react.concurrent_mode") : 60111, n = b2 ? Symbol.for("react.forward_ref") : 60112, p = b2 ? Symbol.for("react.suspense") : 60113, q = b2 ? Symbol.for("react.suspense_list") : 60120, r = b2 ? Symbol.for("react.memo") : 60115, t = b2 ? Symbol.for("react.lazy") : 60116, v = b2 ? Symbol.for("react.block") : 60121, w = b2 ? Symbol.for("react.fundamental") : 60117, x2 = b2 ? Symbol.for("react.responder") : 60118, y2 = b2 ? Symbol.for("react.scope") : 60119;
4181
+ 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;
4182
4182
  function z(a2) {
4183
4183
  if ("object" === typeof a2 && null !== a2) {
4184
4184
  var u = a2.$$typeof;
@@ -5847,138 +5847,17 @@ Check the top-level render call using <` + t + ">.");
5847
5847
  onExited: propTypesExports.func
5848
5848
  }) : {};
5849
5849
  const CSSTransition$1 = CSSTransition;
5850
- var classnameExports = {};
5851
- var classname = {
5852
- get exports() {
5853
- return classnameExports;
5854
- },
5855
- set exports(v) {
5856
- classnameExports = v;
5857
- }
5858
- };
5859
- var classname_production_min = {};
5860
- var hasRequiredClassname_production_min;
5861
- function requireClassname_production_min() {
5862
- if (hasRequiredClassname_production_min)
5863
- return classname_production_min;
5864
- hasRequiredClassname_production_min = 1;
5865
- function r(r2) {
5866
- function t2(t3, i, a2, o) {
5867
- var f = i ? e + t3 + r2.e + i : e + t3, v = f;
5868
- if (a2) {
5869
- var s = " " + v + r2.m;
5870
- for (var u in a2)
5871
- if (a2.hasOwnProperty(u)) {
5872
- var p = a2[u];
5873
- true === p ? v += s + u : p && (v += s + u + n + p);
5874
- }
5875
- }
5876
- if (void 0 !== o)
5877
- for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
5878
- var l2 = o[y2];
5879
- if (l2 && "string" == typeof l2.valueOf())
5880
- for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
5881
- var h = g[d];
5882
- h !== f && (v += " " + h);
5883
- }
5884
- }
5885
- return v;
5886
- }
5887
- var e = r2.n || "", n = r2.v || r2.m;
5888
- return function(r3, e2) {
5889
- return function(n2, i, a2) {
5890
- 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);
5891
- };
5892
- };
5893
- }
5894
- Object.defineProperty(classname_production_min, "__esModule", { value: true });
5895
- var t = r({ e: "-", m: "_" });
5896
- classname_production_min.cn = t, classname_production_min.withNaming = r;
5897
- return classname_production_min;
5898
- }
5899
- var classname_development = {};
5900
- var hasRequiredClassname_development;
5901
- function requireClassname_development() {
5902
- if (hasRequiredClassname_development)
5903
- return classname_development;
5904
- hasRequiredClassname_development = 1;
5905
- Object.defineProperty(classname_development, "__esModule", { value: true });
5906
- function withNaming(preset) {
5907
- var nameSpace = preset.n || "";
5908
- var modValueDelimiter = preset.v || preset.m;
5909
- function stringify(b2, e, m, mix) {
5910
- var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
5911
- var className = entityName;
5912
- if (m) {
5913
- var modPrefix = " " + className + preset.m;
5914
- for (var k2 in m) {
5915
- if (m.hasOwnProperty(k2)) {
5916
- var modVal = m[k2];
5917
- if (modVal === true) {
5918
- className += modPrefix + k2;
5919
- } else if (modVal) {
5920
- className += modPrefix + k2 + modValueDelimiter + modVal;
5921
- }
5922
- }
5923
- }
5924
- }
5925
- if (mix !== void 0) {
5926
- mix = Array.isArray(mix) ? mix : [mix];
5927
- for (var i = 0, len = mix.length; i < len; i++) {
5928
- var value = mix[i];
5929
- if (!value || typeof value.valueOf() !== "string")
5930
- continue;
5931
- var mixes = value.valueOf().split(" ");
5932
- for (var j = 0; j < mixes.length; j++) {
5933
- var val = mixes[j];
5934
- if (val !== entityName) {
5935
- className += " " + val;
5936
- }
5937
- }
5938
- }
5939
- }
5940
- return className;
5941
- }
5942
- return function cnGenerator(b2, e) {
5943
- return function(elemOrMods, elemModsOrBlockMix, elemMix) {
5944
- if (typeof elemOrMods === "string") {
5945
- if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
5946
- return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
5947
- }
5948
- return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
5949
- }
5950
- return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
5951
- };
5952
- };
5953
- }
5954
- var cn2 = withNaming({
5955
- e: "-",
5956
- m: "_"
5957
- });
5958
- classname_development.cn = cn2;
5959
- classname_development.withNaming = withNaming;
5960
- return classname_development;
5961
- }
5962
- (function(module2) {
5963
- if (process.env.NODE_ENV === "production") {
5964
- module2.exports = requireClassname_production_min();
5965
- } else {
5966
- module2.exports = requireClassname_development();
5967
- }
5968
- })(classname);
5969
- const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
5970
5850
  const defaultProps$1m = {
5971
5851
  ...ComponentDefaults,
5972
5852
  position: "center",
5973
5853
  transition: "",
5974
5854
  overlayStyle: {},
5975
- overlayClass: "",
5976
- popClass: "",
5855
+ overlayClassName: "",
5977
5856
  closeable: false,
5978
5857
  closeIconPosition: "top-right",
5979
5858
  closeIcon: "close",
5980
- destroyOnClose: true,
5981
- teleport: null,
5859
+ destroyOnClose: false,
5860
+ portal: null,
5982
5861
  overlay: true,
5983
5862
  round: false,
5984
5863
  onOpen: () => {
@@ -5987,14 +5866,8 @@ Check the top-level render call using <` + t + ">.");
5987
5866
  },
5988
5867
  onClick: (e) => {
5989
5868
  },
5990
- onOpened: (e) => {
5991
- },
5992
- onClosed: (e) => {
5993
- },
5994
- onClickOverlay: (e) => {
5995
- },
5996
- onClickCloseIcon: (e) => {
5997
- },
5869
+ onClickOverlay: (e) => true,
5870
+ onClickCloseIcon: (e) => true,
5998
5871
  ...defaultOverlayProps
5999
5872
  };
6000
5873
  let _zIndex = 1e3;
@@ -6005,7 +5878,7 @@ Check the top-level render call using <` + t + ">.");
6005
5878
  overlay,
6006
5879
  closeOnOverlayClick,
6007
5880
  overlayStyle,
6008
- overlayClass,
5881
+ overlayClassName,
6009
5882
  zIndex,
6010
5883
  lockScroll,
6011
5884
  duration,
@@ -6016,23 +5889,22 @@ Check the top-level render call using <` + t + ">.");
6016
5889
  transition,
6017
5890
  round,
6018
5891
  position,
6019
- popClass,
6020
5892
  className,
6021
5893
  destroyOnClose,
6022
- teleport,
5894
+ portal,
6023
5895
  onOpen,
6024
5896
  onClose,
6025
5897
  onClickOverlay,
6026
5898
  onClickCloseIcon,
6027
- onOpened,
6028
- onClosed,
5899
+ afterShow,
5900
+ afterClose,
6029
5901
  onClick
6030
5902
  } = props;
6031
5903
  const [index, setIndex] = React.useState(zIndex || _zIndex);
6032
5904
  const [innerVisible, setInnerVisible] = React.useState(visible);
6033
5905
  const [showChildren, setShowChildren] = React.useState(true);
6034
5906
  const [transitionName, setTransitionName] = React.useState("");
6035
- const b2 = cn("popup");
5907
+ const classPrefix2 = "nut-popup";
6036
5908
  const baseStyle = {
6037
5909
  zIndex: index,
6038
5910
  animationDuration: `${duration}s`
@@ -6045,15 +5917,15 @@ Check the top-level render call using <` + t + ">.");
6045
5917
  ...style,
6046
5918
  ...baseStyle
6047
5919
  };
6048
- const classes = classNames({
5920
+ const popClassName = classNames({
6049
5921
  round,
6050
- [`nut-popup-${position}`]: true,
6051
- [`${popClass}`]: true,
5922
+ [`${classPrefix2}`]: true,
5923
+ [`${classPrefix2}-${position}`]: true,
6052
5924
  [`${className || ""}`]: true
6053
- }, b2(""));
5925
+ });
6054
5926
  const closeClasses = classNames({
6055
- "nut-popup__close-icon": true,
6056
- [`nut-popup__close-icon--${closeIconPosition}`]: true
5927
+ [`${classPrefix2}__close-icon`]: true,
5928
+ [`${classPrefix2}__close-icon--${closeIconPosition}`]: true
6057
5929
  });
6058
5930
  const open = () => {
6059
5931
  if (!innerVisible) {
@@ -6071,29 +5943,29 @@ Check the top-level render call using <` + t + ">.");
6071
5943
  if (destroyOnClose) {
6072
5944
  setTimeout(() => {
6073
5945
  setShowChildren(false);
6074
- onClose && onClose();
6075
5946
  }, Number(duration) * 1e3);
6076
5947
  }
5948
+ onClose && onClose();
6077
5949
  }
6078
5950
  };
6079
5951
  const onHandleClickOverlay = (e) => {
6080
5952
  if (closeOnOverlayClick) {
6081
- onClickOverlay && onClickOverlay(e);
6082
- close();
5953
+ const closed = onClickOverlay && onClickOverlay(e);
5954
+ closed && close();
6083
5955
  }
6084
5956
  };
6085
5957
  const onHandleClick = (e) => {
6086
5958
  onClick && onClick(e);
6087
5959
  };
6088
5960
  const onHandleClickCloseIcon = (e) => {
6089
- onClickCloseIcon && onClickCloseIcon(e);
6090
- close();
5961
+ const closed = onClickCloseIcon && onClickCloseIcon(e);
5962
+ closed && close();
6091
5963
  };
6092
5964
  const onHandleOpened = (e) => {
6093
- onOpened && onOpened(e);
5965
+ afterShow && afterShow();
6094
5966
  };
6095
5967
  const onHandleClosed = (e) => {
6096
- onClosed && onClosed(e);
5968
+ afterClose && afterClose();
6097
5969
  };
6098
5970
  const resolveContainer = (getContainer) => {
6099
5971
  const container = typeof getContainer === "function" ? getContainer() : getContainer;
@@ -6129,7 +6001,7 @@ Check the top-level render call using <` + t + ">.");
6129
6001
  onExited: onHandleClosed,
6130
6002
  children: /* @__PURE__ */ jsxs("div", {
6131
6003
  style: popStyles,
6132
- className: classes,
6004
+ className: popClassName,
6133
6005
  onClick: onHandleClick,
6134
6006
  children: [showChildren ? children : "", renderIcon()]
6135
6007
  })
@@ -6140,7 +6012,7 @@ Check the top-level render call using <` + t + ">.");
6140
6012
  children: overlay ? /* @__PURE__ */ jsxs(Fragment, {
6141
6013
  children: [/* @__PURE__ */ jsx(Overlay, {
6142
6014
  style: overlayStyles,
6143
- className: overlayClass,
6015
+ className: overlayClassName,
6144
6016
  visible: innerVisible,
6145
6017
  closeOnOverlayClick,
6146
6018
  zIndex,
@@ -6158,16 +6030,17 @@ Check the top-level render call using <` + t + ">.");
6158
6030
  !visible && close();
6159
6031
  }, [visible]);
6160
6032
  React.useEffect(() => {
6161
- setTransitionName(transition || `nut-popup-slide-${position}`);
6162
- }, [position]);
6033
+ setTransitionName(transition || `${classPrefix2}-slide-${position}`);
6034
+ }, [position, transition]);
6163
6035
  return /* @__PURE__ */ jsx(Fragment, {
6164
- children: renderToContainer(teleport, renderNode())
6036
+ children: renderToContainer(portal, renderNode())
6165
6037
  });
6166
6038
  };
6167
6039
  Popup.defaultProps = defaultProps$1m;
6168
6040
  Popup.displayName = "NutPopup";
6169
6041
  const DataContext$2 = React.createContext({});
6170
6042
  const defaultProps$1l = {
6043
+ ...ComponentDefaults,
6171
6044
  span: "24",
6172
6045
  offset: "0",
6173
6046
  gutter: "0"
@@ -6175,7 +6048,7 @@ Check the top-level render call using <` + t + ">.");
6175
6048
  const Col = (props) => {
6176
6049
  const {
6177
6050
  className,
6178
- style = {},
6051
+ style,
6179
6052
  span,
6180
6053
  offset,
6181
6054
  children,
@@ -6218,10 +6091,11 @@ Check the top-level render call using <` + t + ">.");
6218
6091
  Col.defaultProps = defaultProps$1l;
6219
6092
  Col.displayName = "NutCol";
6220
6093
  const defaultProps$1k = {
6094
+ ...ComponentDefaults,
6221
6095
  contentPosition: "center",
6222
6096
  direction: "horizontal"
6223
6097
  };
6224
- const classPrefix$3 = `nut-divider`;
6098
+ const classPrefix$5 = `nut-divider`;
6225
6099
  const Divider = (props) => {
6226
6100
  const {
6227
6101
  children,
@@ -6235,14 +6109,14 @@ Check the top-level render call using <` + t + ">.");
6235
6109
  ...props
6236
6110
  };
6237
6111
  const classes = direction === "horizontal" ? classNames({
6238
- [`${classPrefix$3}`]: true,
6239
- [`${classPrefix$3}__center`]: children,
6240
- [`${classPrefix$3}__left`]: contentPosition === "left",
6241
- [`${classPrefix$3}__right`]: contentPosition === "right",
6242
- [`${classPrefix$3}__hairline`]: true
6112
+ [`${classPrefix$5}`]: true,
6113
+ [`${classPrefix$5}__center`]: children,
6114
+ [`${classPrefix$5}__left`]: contentPosition === "left",
6115
+ [`${classPrefix$5}__right`]: contentPosition === "right",
6116
+ [`${classPrefix$5}__hairline`]: true
6243
6117
  }) : classNames({
6244
- [`${classPrefix$3}`]: true,
6245
- [`${classPrefix$3}__vertical`]: direction === "vertical"
6118
+ [`${classPrefix$5}`]: true,
6119
+ [`${classPrefix$5}__vertical`]: direction === "vertical"
6246
6120
  });
6247
6121
  return /* @__PURE__ */ jsx("div", {
6248
6122
  className: `${classes} ${className || ""}`,
@@ -6426,7 +6300,9 @@ Check the top-level render call using <` + t + ">.");
6426
6300
  };
6427
6301
  Layout.defaultProps = defaultProps$1h;
6428
6302
  Layout.displayName = "NutLayout";
6303
+ const classPrefix$4 = "nut-row";
6429
6304
  const defaultProps$1g = {
6305
+ ...ComponentDefaults,
6430
6306
  type: "",
6431
6307
  justify: "start",
6432
6308
  align: "flex-start",
@@ -6436,7 +6312,7 @@ Check the top-level render call using <` + t + ">.");
6436
6312
  const Row = (props) => {
6437
6313
  const {
6438
6314
  className,
6439
- style = {},
6315
+ style,
6440
6316
  children,
6441
6317
  type: type2,
6442
6318
  justify,
@@ -6448,7 +6324,6 @@ Check the top-level render call using <` + t + ">.");
6448
6324
  ...defaultProps$1g,
6449
6325
  ...props
6450
6326
  };
6451
- const prefixCls2 = "nut-row";
6452
6327
  const getClass = (prefix2, type22) => {
6453
6328
  const classType = type22 ? `nut-row-${prefix2}-${type22}` : "";
6454
6329
  const className2 = prefix2 ? classType : `nut-row-${type22}`;
@@ -6460,7 +6335,7 @@ Check the top-level render call using <` + t + ">.");
6460
6335
  ${getClass("justify", justify)}
6461
6336
  ${getClass("align", align)}
6462
6337
  ${getClass("flex", wrap)}
6463
- ${prefixCls2}
6338
+ ${classPrefix$4}
6464
6339
  `;
6465
6340
  };
6466
6341
  const parentRow = {
@@ -6562,7 +6437,7 @@ Check the top-level render call using <` + t + ">.");
6562
6437
  threshold: 0,
6563
6438
  zIndex: 2e3
6564
6439
  };
6565
- const classPrefix$2 = "nut-sticky";
6440
+ const classPrefix$3 = "nut-sticky";
6566
6441
  const Sticky = (props) => {
6567
6442
  const {
6568
6443
  position,
@@ -6692,7 +6567,7 @@ Check the top-level render call using <` + t + ">.");
6692
6567
  ...style,
6693
6568
  ...rootStyle
6694
6569
  },
6695
- className: classNames(classPrefix$2, className),
6570
+ className: classNames(classPrefix$3, className),
6696
6571
  ...rest,
6697
6572
  children: /* @__PURE__ */ jsx("div", {
6698
6573
  className: "nut-sticky--box",
@@ -8804,17 +8679,17 @@ Please add \`${key}Action\` when creating your handler.`);
8804
8679
  num: (a2) => typeof a2 === "number",
8805
8680
  und: (a2) => a2 === void 0
8806
8681
  };
8807
- function isEqual(a2, b2) {
8682
+ function isEqual(a2, b) {
8808
8683
  if (is.arr(a2)) {
8809
- if (!is.arr(b2) || a2.length !== b2.length)
8684
+ if (!is.arr(b) || a2.length !== b.length)
8810
8685
  return false;
8811
8686
  for (let i = 0; i < a2.length; i++) {
8812
- if (a2[i] !== b2[i])
8687
+ if (a2[i] !== b[i])
8813
8688
  return false;
8814
8689
  }
8815
8690
  return true;
8816
8691
  }
8817
- return a2 === b2;
8692
+ return a2 === b;
8818
8693
  }
8819
8694
  const each = (obj, fn) => obj.forEach(fn);
8820
8695
  function eachProp(obj, fn, ctx2) {
@@ -9169,8 +9044,8 @@ Please add \`${key}Action\` when creating your handler.`);
9169
9044
  const p = 2 * l2 - q;
9170
9045
  const r = hue2rgb(p, q, h + 1 / 3);
9171
9046
  const g = hue2rgb(p, q, h);
9172
- const b2 = hue2rgb(p, q, h - 1 / 3);
9173
- return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
9047
+ const b = hue2rgb(p, q, h - 1 / 3);
9048
+ return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
9174
9049
  }
9175
9050
  function parse255(str) {
9176
9051
  const int = parseInt(str, 10);
@@ -9207,9 +9082,9 @@ Please add \`${key}Action\` when creating your handler.`);
9207
9082
  int32Color = int32Color || 0;
9208
9083
  let r = (int32Color & 4278190080) >>> 24;
9209
9084
  let g = (int32Color & 16711680) >>> 16;
9210
- let b2 = (int32Color & 65280) >>> 8;
9085
+ let b = (int32Color & 65280) >>> 8;
9211
9086
  let a2 = (int32Color & 255) / 255;
9212
- return `rgba(${r}, ${g}, ${b2}, ${a2})`;
9087
+ return `rgba(${r}, ${g}, ${b}, ${a2})`;
9213
9088
  }
9214
9089
  const createInterpolator = (range2, output, extrapolate) => {
9215
9090
  if (is.fun(range2)) {
@@ -11821,23 +11696,24 @@ Please add \`${key}Action\` when creating your handler.`);
11821
11696
  const animated = host.animated;
11822
11697
  const elevatorContext = React.createContext({});
11823
11698
  const defaultProps$1e = {
11699
+ ...ComponentDefaults,
11824
11700
  height: "200px",
11825
- acceptKey: "title",
11826
- indexList: [],
11827
- isSticky: false,
11701
+ floorKey: "title",
11702
+ list: [],
11703
+ sticky: false,
11828
11704
  spaceHeight: 23,
11829
- titleHeight: 35,
11830
- className: ""
11705
+ titleHeight: 35
11831
11706
  };
11832
11707
  const Elevator = (props) => {
11833
11708
  const {
11834
11709
  height,
11835
- acceptKey,
11836
- indexList,
11837
- isSticky,
11710
+ floorKey,
11711
+ list,
11712
+ sticky,
11838
11713
  spaceHeight,
11839
11714
  titleHeight,
11840
11715
  className,
11716
+ style,
11841
11717
  onClickItem,
11842
11718
  onClickIndex,
11843
11719
  children,
@@ -11846,7 +11722,7 @@ Please add \`${key}Action\` when creating your handler.`);
11846
11722
  ...defaultProps$1e,
11847
11723
  ...props
11848
11724
  };
11849
- const b2 = cn("elevator");
11725
+ const classPrefix2 = "nut-elevator";
11850
11726
  const listview = React.useRef(null);
11851
11727
  const initData = {
11852
11728
  anchorIndex: 0,
@@ -11971,35 +11847,37 @@ Please add \`${key}Action\` when creating your handler.`);
11971
11847
  }
11972
11848
  }, [listview]);
11973
11849
  return /* @__PURE__ */ jsxs("div", {
11974
- className: `${b2()} ${className}`,
11850
+ className: `${classPrefix2} ${className}`,
11851
+ style,
11975
11852
  ...rest,
11976
- children: [isSticky && scrollY > 0 ? /* @__PURE__ */ jsx("div", {
11977
- className: b2("list__fixed"),
11853
+ children: [sticky && scrollY > 0 ? /* @__PURE__ */ jsx("div", {
11854
+ className: `${classPrefix2}__list__fixed`,
11978
11855
  children: /* @__PURE__ */ jsx("span", {
11979
- className: "fixed-title",
11980
- children: indexList[currentIndex][acceptKey]
11856
+ className: `${classPrefix2}__list__fixed__title`,
11857
+ children: list[currentIndex][floorKey]
11981
11858
  })
11982
11859
  }) : null, /* @__PURE__ */ jsx("div", {
11983
- className: b2("list"),
11860
+ className: `${classPrefix2}__list`,
11984
11861
  style: {
11985
11862
  height: Number.isNaN(+height) ? height : `${height}px`
11986
11863
  },
11987
11864
  children: /* @__PURE__ */ jsx("div", {
11988
- className: b2("list__inner"),
11865
+ className: `${classPrefix2}__list__inner`,
11989
11866
  ref: listview,
11990
- children: indexList.map((item, idx) => {
11867
+ children: list.map((item, idx) => {
11991
11868
  return /* @__PURE__ */ jsxs("div", {
11992
- className: b2("list__item"),
11869
+ className: `${classPrefix2}__list__item`,
11993
11870
  children: [/* @__PURE__ */ jsx("div", {
11994
- className: b2("list__item__code"),
11995
- children: item[acceptKey]
11871
+ className: `${classPrefix2}__list__item__code`,
11872
+ children: item[floorKey]
11996
11873
  }), /* @__PURE__ */ jsx(Fragment, {
11997
11874
  children: item.list.map((subitem) => {
11998
11875
  return /* @__PURE__ */ jsx("div", {
11999
- className: b2("list__item__name", {
12000
- highcolor: currentData.id === subitem.id && currentKey === item[acceptKey]
11876
+ className: classNames({
11877
+ [`${classPrefix2}__list__item__name`]: true,
11878
+ [`${classPrefix2}__list__item__name--highcolor`]: currentData.id === subitem.id && currentKey === item[floorKey]
12001
11879
  }),
12002
- onClick: () => handleClickItem(item[acceptKey], subitem),
11880
+ onClick: () => handleClickItem(item[floorKey], subitem),
12003
11881
  children: children ? /* @__PURE__ */ jsx(Fragment, {
12004
11882
  children: /* @__PURE__ */ jsx(elevatorContext.Provider, {
12005
11883
  value: subitem,
@@ -12012,27 +11890,29 @@ Please add \`${key}Action\` when creating your handler.`);
12012
11890
  }, idx);
12013
11891
  })
12014
11892
  })
12015
- }), indexList.length && scrollStart ? /* @__PURE__ */ jsx("div", {
12016
- className: b2("code--current", {
12017
- current: true
11893
+ }), list.length && scrollStart ? /* @__PURE__ */ jsx("div", {
11894
+ className: classNames({
11895
+ [`${classPrefix2}__code--current`]: true,
11896
+ [`${classPrefix2}__code--current--current`]: true
12018
11897
  }),
12019
- children: indexList[codeIndex][acceptKey]
11898
+ children: list[codeIndex][floorKey]
12020
11899
  }) : null, /* @__PURE__ */ jsx("div", {
12021
- className: b2("bars"),
11900
+ className: `${classPrefix2}__bars`,
12022
11901
  children: /* @__PURE__ */ jsx(animated.div, {
12023
- className: b2("bars__inner"),
11902
+ className: `${classPrefix2}__bars__inner`,
12024
11903
  ...bind(),
12025
11904
  style: {
12026
11905
  touchAction: "pan-y"
12027
11906
  },
12028
- children: indexList.map((item, index) => {
11907
+ children: list.map((item, index) => {
12029
11908
  return /* @__PURE__ */ jsx("div", {
12030
- className: b2("bars__inner__item", {
12031
- active: item[acceptKey] === indexList[currentIndex][acceptKey]
11909
+ className: classNames({
11910
+ [`${classPrefix2}__bars__inner__item`]: true,
11911
+ [`${classPrefix2}__bars__inner__item--active`]: item[floorKey] === list[currentIndex][floorKey]
12032
11912
  }),
12033
11913
  "data-index": index,
12034
- onClick: () => handleClickIndex(item[acceptKey]),
12035
- children: item[acceptKey]
11914
+ onClick: () => handleClickIndex(item[floorKey]),
11915
+ children: item[floorKey]
12036
11916
  }, index);
12037
11917
  })
12038
11918
  })
@@ -12138,7 +12018,7 @@ Please add \`${key}Action\` when creating your handler.`);
12138
12018
  current: 1,
12139
12019
  direction: "horizontal"
12140
12020
  };
12141
- const classPrefix$1 = `nut-indicator`;
12021
+ const classPrefix$2 = `nut-indicator`;
12142
12022
  const Indicator = (props) => {
12143
12023
  const {
12144
12024
  total,
@@ -12152,17 +12032,17 @@ Please add \`${key}Action\` when creating your handler.`);
12152
12032
  ...props
12153
12033
  };
12154
12034
  const classes = classNames({
12155
- [`${classPrefix$1}__vertical`]: direction === "vertical"
12035
+ [`${classPrefix$2}__vertical`]: direction === "vertical"
12156
12036
  });
12157
12037
  const renderElement = () => {
12158
12038
  const childs = [];
12159
12039
  for (let item = 1; item <= total; item++) {
12160
12040
  childs.push(item === current ? /* @__PURE__ */ jsx(Fragment, {
12161
12041
  children: children || /* @__PURE__ */ jsx("div", {
12162
- className: `${classPrefix$1}__dot ${classPrefix$1}__active`
12042
+ className: `${classPrefix$2}__dot ${classPrefix$2}__active`
12163
12043
  }, item)
12164
12044
  }) : /* @__PURE__ */ jsx("div", {
12165
- className: `${classPrefix$1}__dot`
12045
+ className: `${classPrefix$2}__dot`
12166
12046
  }, item));
12167
12047
  }
12168
12048
  return childs;
@@ -12177,21 +12057,19 @@ Please add \`${key}Action\` when creating your handler.`);
12177
12057
  Indicator.displayName = "NutIndicator";
12178
12058
  const defaultProps$1b = {
12179
12059
  ...ComponentDefaults,
12180
- className: "",
12181
- style: {},
12182
12060
  activeColor: "",
12183
- closeOnClickOverlay: true,
12061
+ closeOnOverlayClick: true,
12184
12062
  scrollFixed: false,
12185
12063
  lockScroll: true,
12186
- titleIcon: null
12064
+ icon: null
12187
12065
  };
12188
12066
  const Menu = (props) => {
12189
12067
  const {
12190
12068
  className,
12191
- titleIcon,
12069
+ icon,
12192
12070
  scrollFixed,
12193
12071
  lockScroll,
12194
- closeOnClickOverlay,
12072
+ closeOnOverlayClick,
12195
12073
  children,
12196
12074
  activeColor,
12197
12075
  ...rest
@@ -12199,7 +12077,7 @@ Please add \`${key}Action\` when creating your handler.`);
12199
12077
  ...defaultProps$1b,
12200
12078
  ...props
12201
12079
  };
12202
- const parentRef = React.useRef(null);
12080
+ const menuRef = React.useRef(null);
12203
12081
  const [isScrollFixed, setIsScrollFixed] = React.useState(false);
12204
12082
  const getScrollTop = (el) => {
12205
12083
  return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
@@ -12218,99 +12096,101 @@ Please add \`${key}Action\` when creating your handler.`);
12218
12096
  }
12219
12097
  return () => window.removeEventListener("scroll", onScroll);
12220
12098
  }, []);
12221
- const [itemShow, setItemShow] = React.useState([]);
12222
- const [itemTitle, setItemTitle] = React.useState([]);
12223
- const toggleItemShow = (index) => {
12224
- itemShow[index] = !itemShow[index];
12225
- const temp = itemShow.map((i, idx) => idx === index ? i : false);
12226
- setItemShow([...temp]);
12099
+ const [showMenuItem, setShowMenuItem] = React.useState([]);
12100
+ const [menuItemTitle, setMenuItemTitle] = React.useState([]);
12101
+ const toggleMenuItem = (index) => {
12102
+ showMenuItem[index] = !showMenuItem[index];
12103
+ const temp = showMenuItem.map((i, idx) => idx === index ? i : false);
12104
+ setShowMenuItem([...temp]);
12227
12105
  };
12228
- const hideItemShow = (index) => {
12229
- itemShow[index] = false;
12230
- setItemShow([...itemShow]);
12106
+ const hideMenuItem = (index) => {
12107
+ showMenuItem[index] = false;
12108
+ setShowMenuItem([...showMenuItem]);
12231
12109
  };
12232
12110
  const updateTitle = (text, index) => {
12233
- itemTitle[index] = text;
12234
- setItemTitle([...itemTitle]);
12235
- };
12236
- const parent = () => {
12237
- return parentRef;
12111
+ menuItemTitle[index] = text;
12112
+ setMenuItemTitle([...menuItemTitle]);
12238
12113
  };
12239
12114
  const cloneChildren = () => {
12240
12115
  return React.Children.map(children, (child, index) => {
12241
12116
  return React.cloneElement(child, {
12242
- showPopup: itemShow[index],
12243
- orderKey: index,
12117
+ show: showMenuItem[index],
12118
+ index,
12244
12119
  activeColor,
12245
12120
  parent: {
12246
- closeOnClickOverlay,
12121
+ closeOnOverlayClick,
12247
12122
  lockScroll,
12248
- toggleItemShow,
12123
+ toggleMenuItem,
12249
12124
  updateTitle,
12250
- hideItemShow,
12251
- parent
12125
+ hideMenuItem,
12126
+ menuRef
12252
12127
  }
12253
12128
  });
12254
12129
  });
12255
12130
  };
12131
+ const menuTitle = () => {
12132
+ return React.Children.map(children, (child, index) => {
12133
+ if (React.isValidElement(child)) {
12134
+ const {
12135
+ title,
12136
+ options: options2,
12137
+ value,
12138
+ disabled,
12139
+ direction
12140
+ } = child.props;
12141
+ const selected = options2 == null ? void 0 : options2.filter((option) => option.value === value);
12142
+ const finallyTitle = () => {
12143
+ if (title)
12144
+ return title;
12145
+ if (menuItemTitle && menuItemTitle[index])
12146
+ return menuItemTitle[index];
12147
+ if (selected && selected.length && selected[0].text)
12148
+ return selected[0].text;
12149
+ return "";
12150
+ };
12151
+ return /* @__PURE__ */ jsx("div", {
12152
+ className: classNames("nut-menu__item ", className, {
12153
+ active: showMenuItem[index],
12154
+ disabled
12155
+ }),
12156
+ style: {
12157
+ color: showMenuItem[index] ? activeColor : ""
12158
+ },
12159
+ onClick: () => {
12160
+ !disabled && toggleMenuItem(index);
12161
+ },
12162
+ children: /* @__PURE__ */ jsxs("div", {
12163
+ className: classNames("nut-menu__title ", {
12164
+ active: showMenuItem[index],
12165
+ disabled
12166
+ }),
12167
+ children: [/* @__PURE__ */ jsx("div", {
12168
+ className: "nut-menu__title-text",
12169
+ children: finallyTitle()
12170
+ }), icon || (direction === "up" ? /* @__PURE__ */ jsx(x$g, {
12171
+ className: "nut-menu__title-icon"
12172
+ }) : /* @__PURE__ */ jsx(y$8, {
12173
+ className: "nut-menu__title-icon"
12174
+ }))]
12175
+ })
12176
+ }, index);
12177
+ }
12178
+ return null;
12179
+ });
12180
+ };
12256
12181
  return /* @__PURE__ */ jsx("div", {
12257
- className: `nut-menu ${className} ${isScrollFixed ? "scroll-fixed" : ""}`,
12258
12182
  ...rest,
12259
- ref: parentRef,
12183
+ className: classNames(`nut-menu`, className, {
12184
+ "scroll-fixed": isScrollFixed
12185
+ }),
12186
+ ref: menuRef,
12260
12187
  children: /* @__PURE__ */ jsxs("div", {
12261
12188
  className: "nut-menu-relative",
12262
12189
  children: [/* @__PURE__ */ jsx("div", {
12263
- className: `nut-menu__bar ${itemShow.includes(true) ? "opened" : ""} ${className}`,
12264
- children: React.Children.toArray(children).map((child, index) => {
12265
- if (!child)
12266
- return null;
12267
- const {
12268
- disabled,
12269
- title,
12270
- value,
12271
- direction,
12272
- options: options2,
12273
- className: className2
12274
- } = child.props;
12275
- const currentTitle = options2 == null ? void 0 : options2.filter((option) => option.value === value);
12276
- function finallyTitle() {
12277
- if (title)
12278
- return title;
12279
- if (itemTitle && itemTitle[index])
12280
- return itemTitle[index];
12281
- if (currentTitle && currentTitle[0] && currentTitle[0].text)
12282
- return currentTitle[0].text;
12283
- return "";
12284
- }
12285
- return /* @__PURE__ */ jsx("div", {
12286
- className: `nut-menu__item ${classNames({
12287
- active: itemShow[index],
12288
- disabled
12289
- })} ${className2}`,
12290
- style: {
12291
- color: itemShow[index] ? activeColor : ""
12292
- },
12293
- onClick: () => {
12294
- !disabled && toggleItemShow(index);
12295
- },
12296
- children: /* @__PURE__ */ jsxs("div", {
12297
- className: `nut-menu__title ${classNames({
12298
- active: itemShow[index],
12299
- disabled
12300
- })}`,
12301
- children: [/* @__PURE__ */ jsx("div", {
12302
- className: "nut-menu__title-text",
12303
- children: finallyTitle()
12304
- }), titleIcon || /* @__PURE__ */ jsx(Fragment, {
12305
- children: direction === "up" ? /* @__PURE__ */ jsx(x$g, {
12306
- className: "nut-menu__title-icon"
12307
- }) : /* @__PURE__ */ jsx(y$8, {
12308
- className: "nut-menu__title-icon"
12309
- })
12310
- })]
12311
- })
12312
- }, index);
12313
- })
12190
+ className: classNames("nut-menu__bar", {
12191
+ opened: showMenuItem.includes(true)
12192
+ }),
12193
+ children: menuTitle()
12314
12194
  }), cloneChildren()]
12315
12195
  })
12316
12196
  });
@@ -12319,52 +12199,47 @@ Please add \`${key}Action\` when creating your handler.`);
12319
12199
  Menu.displayName = "NutMenu";
12320
12200
  const defaultProps$1a = {
12321
12201
  ...ComponentDefaults,
12322
- className: "",
12323
- style: {},
12324
12202
  columns: 1,
12325
12203
  direction: "down",
12326
- optionsIcon: null,
12204
+ icon: null,
12205
+ closeOnClickAway: false,
12327
12206
  activeTitleClass: "",
12328
12207
  inactiveTitleClass: "",
12329
12208
  onChange: (value) => void 0
12330
12209
  };
12331
12210
  const MenuItem = React.forwardRef((props, ref) => {
12332
- const mergedProps = {
12333
- ...defaultProps$1a,
12334
- ...props
12335
- };
12336
12211
  const {
12212
+ className,
12337
12213
  style,
12338
12214
  options: options2,
12339
12215
  value,
12340
12216
  columns,
12341
12217
  title,
12342
- optionsIcon,
12218
+ icon,
12343
12219
  direction,
12344
12220
  onChange,
12345
12221
  activeTitleClass,
12346
12222
  inactiveTitleClass,
12347
- children
12223
+ closeOnClickAway,
12224
+ children,
12225
+ activeColor,
12226
+ show,
12227
+ parent,
12228
+ index
12348
12229
  } = {
12349
12230
  ...defaultProps$1a,
12350
12231
  ...props
12351
12232
  };
12352
- const {
12353
- activeColor,
12354
- showPopup,
12355
- parent,
12356
- orderKey
12357
- } = mergedProps;
12358
- const [_showPopup, setShowPopup] = React.useState(showPopup);
12233
+ const [_showPopup, setShowPopup] = React.useState(show);
12359
12234
  const [_value, setValue] = React.useState(value);
12360
12235
  React.useEffect(() => {
12361
- setShowPopup(showPopup);
12362
- }, [showPopup]);
12236
+ setShowPopup(show);
12237
+ }, [show]);
12363
12238
  React.useEffect(() => {
12364
12239
  getParentOffset();
12365
12240
  }, [_showPopup]);
12366
12241
  React.useImperativeHandle(ref, () => ({
12367
- toggle: parent.toggleItemShow
12242
+ toggle: parent.toggleMenuItem
12368
12243
  }));
12369
12244
  const getIconCName = (optionVal, value2) => {
12370
12245
  return classNames({
@@ -12374,11 +12249,11 @@ Please add \`${key}Action\` when creating your handler.`);
12374
12249
  };
12375
12250
  const setTitle = (text) => {
12376
12251
  if (!title) {
12377
- parent.updateTitle(text, orderKey);
12252
+ parent.updateTitle(text, index);
12378
12253
  }
12379
12254
  };
12380
12255
  const handleClick2 = (item) => {
12381
- parent.toggleItemShow(orderKey);
12256
+ parent.toggleMenuItem(index);
12382
12257
  setTitle(item.text);
12383
12258
  setValue(item.value);
12384
12259
  onChange && onChange(item);
@@ -12389,7 +12264,7 @@ Please add \`${key}Action\` when creating your handler.`);
12389
12264
  });
12390
12265
  const getParentOffset = () => {
12391
12266
  setTimeout(() => {
12392
- const p = parent.parent().current;
12267
+ const p = parent.menuRef.current;
12393
12268
  const rect = p.getBoundingClientRect();
12394
12269
  setPosition({
12395
12270
  height: rect.height,
@@ -12416,37 +12291,40 @@ Please add \`${key}Action\` when creating your handler.`);
12416
12291
  if (direction === "down") {
12417
12292
  return {
12418
12293
  height: `${position.top + position.height}px`,
12419
- ...isShow(),
12420
- ...style
12294
+ top: 0,
12295
+ ...isShow()
12421
12296
  };
12422
12297
  }
12423
12298
  return {
12424
12299
  height: `${window.innerHeight - position.top}px`,
12300
+ bottom: `0px`,
12425
12301
  top: "auto",
12426
- ...isShow(),
12427
- ...style
12302
+ ...isShow()
12428
12303
  };
12429
12304
  };
12430
12305
  return /* @__PURE__ */ jsxs(Fragment, {
12431
- children: [/* @__PURE__ */ jsx("div", {
12306
+ children: [closeOnClickAway ? /* @__PURE__ */ jsx("div", {
12432
12307
  className: `placeholder-element ${classNames({
12433
12308
  up: direction === "up"
12434
12309
  })}`,
12435
12310
  style: placeholderStyle(),
12436
- onClick: () => parent.toggleItemShow(orderKey)
12437
- }), /* @__PURE__ */ jsx(Overlay, {
12311
+ onClick: () => parent.toggleMenuItem(index)
12312
+ }) : null, /* @__PURE__ */ jsx(Overlay, {
12438
12313
  className: "nut-menu__overlay",
12439
12314
  style: getPosition(),
12440
12315
  lockScroll: parent.lockScroll,
12441
12316
  visible: _showPopup,
12442
- closeOnOverlayClick: parent.closeOnClickOverlay,
12317
+ closeOnOverlayClick: parent.closeOnOverlayClick,
12443
12318
  onClick: () => {
12444
- parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
12319
+ parent.closeOnOverlayClick && parent.toggleMenuItem(index);
12445
12320
  }
12446
12321
  }), /* @__PURE__ */ jsx("div", {
12447
- className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
12322
+ className: classNames(className, {
12323
+ "nut-menu-item__wrap": direction === "down",
12324
+ "nut-menu-item__wrap-up": direction !== "down"
12325
+ }),
12448
12326
  style: {
12449
- // ...getPosition(),
12327
+ ...style,
12450
12328
  ...isShow()
12451
12329
  },
12452
12330
  children: /* @__PURE__ */ jsx(CSSTransition$1, {
@@ -12455,7 +12333,7 @@ Please add \`${key}Action\` when creating your handler.`);
12455
12333
  classNames: direction === "down" ? "menu-item" : "menu-item-up",
12456
12334
  children: /* @__PURE__ */ jsxs("div", {
12457
12335
  className: "nut-menu-item__content",
12458
- children: [options2 == null ? void 0 : options2.map((item, index) => {
12336
+ children: [options2 == null ? void 0 : options2.map((item, index2) => {
12459
12337
  return /* @__PURE__ */ jsxs("div", {
12460
12338
  className: `nut-menu-item__option ${classNames({
12461
12339
  active: item.value === _value
@@ -12467,7 +12345,7 @@ Please add \`${key}Action\` when creating your handler.`);
12467
12345
  handleClick2(item);
12468
12346
  },
12469
12347
  children: [item.value === _value ? /* @__PURE__ */ jsx("i", {
12470
- children: optionsIcon || /* @__PURE__ */ jsx(x$e, {
12348
+ children: icon || /* @__PURE__ */ jsx(x$e, {
12471
12349
  color: activeColor,
12472
12350
  className: getIconCName(item.value, value)
12473
12351
  })
@@ -12489,48 +12367,32 @@ Please add \`${key}Action\` when creating your handler.`);
12489
12367
  MenuItem.displayName = "NutMenuItem";
12490
12368
  const defaultProps$19 = {
12491
12369
  ...ComponentDefaults,
12492
- title: "",
12493
- description: "",
12494
- leftShow: true,
12495
- className: "",
12496
- leftText: "",
12370
+ left: "",
12371
+ right: "",
12372
+ back: "",
12497
12373
  fixed: false,
12498
12374
  safeAreaInsetTop: false,
12499
- border: false,
12500
12375
  placeholder: false,
12501
- zIndex: 10,
12502
- style: {}
12376
+ zIndex: 10
12503
12377
  };
12504
12378
  const NavBar = (props) => {
12505
12379
  const {
12506
- description,
12507
- title,
12508
- leftShow,
12380
+ right,
12381
+ left,
12509
12382
  className,
12510
12383
  style,
12511
- leftText,
12384
+ back,
12512
12385
  fixed,
12513
12386
  safeAreaInsetTop,
12514
- border,
12515
12387
  placeholder,
12516
12388
  zIndex,
12517
- onClickTitle,
12518
- onClickIcon,
12519
- onClickBack,
12520
- onClickRight
12389
+ onClickBack
12521
12390
  } = {
12522
12391
  ...defaultProps$19,
12523
12392
  ...props
12524
12393
  };
12525
- const b2 = cn("navbar");
12394
+ const classPrefix2 = "nut-navbar";
12526
12395
  const children = Array.isArray(props.children) ? props.children : [props.children];
12527
- const slot = children.reduce((slot2, item) => {
12528
- const data = slot2;
12529
- if (item && item.props) {
12530
- data[item.props.slot] = item.props.children;
12531
- }
12532
- return data;
12533
- }, {});
12534
12396
  const styles = () => {
12535
12397
  return {
12536
12398
  ...style,
@@ -12539,38 +12401,24 @@ Please add \`${key}Action\` when creating your handler.`);
12539
12401
  };
12540
12402
  const renderLeft = () => {
12541
12403
  return /* @__PURE__ */ jsxs("div", {
12542
- className: `${b2("left")}`,
12543
- onClick: (e) => onClickBack(e),
12544
- children: [leftShow && /* @__PURE__ */ jsx(y$5, {
12545
- name: "left",
12546
- color: "#979797"
12547
- }), leftText && /* @__PURE__ */ jsx("div", {
12548
- className: `${b2("text")}`,
12549
- children: leftText
12550
- }), slot.left]
12404
+ className: `${classPrefix2}__left`,
12405
+ children: [back && /* @__PURE__ */ jsx("div", {
12406
+ className: `${classPrefix2}__left__back`,
12407
+ onClick: (e) => onClickBack(e),
12408
+ children: back
12409
+ }), left]
12551
12410
  });
12552
12411
  };
12553
12412
  const renderContent = () => {
12554
- return /* @__PURE__ */ jsxs("div", {
12555
- className: `${b2("title")}`,
12556
- children: [title && /* @__PURE__ */ jsx("div", {
12557
- className: "title",
12558
- onClick: (e) => onClickTitle(e),
12559
- children: title
12560
- }), slot.titleIcon && /* @__PURE__ */ jsx("div", {
12561
- onClick: (e) => onClickIcon(e),
12562
- children: slot.titleIcon
12563
- }), slot.content]
12413
+ return /* @__PURE__ */ jsx("div", {
12414
+ className: `${classPrefix2}__title`,
12415
+ children
12564
12416
  });
12565
12417
  };
12566
12418
  const renderRight = () => {
12567
- return /* @__PURE__ */ jsxs("div", {
12568
- className: `${b2("right")}`,
12569
- onClick: (e) => onClickRight(e),
12570
- children: [description && /* @__PURE__ */ jsx("div", {
12571
- className: `${b2("text")}`,
12572
- children: description
12573
- }), slot.right]
12419
+ return /* @__PURE__ */ jsx("div", {
12420
+ className: `${classPrefix2}__right`,
12421
+ children: right
12574
12422
  });
12575
12423
  };
12576
12424
  const renderWrapper = () => {
@@ -12581,14 +12429,13 @@ Please add \`${key}Action\` when creating your handler.`);
12581
12429
  });
12582
12430
  };
12583
12431
  const classes = classNames({
12584
- [`nut-navbar--border`]: border,
12585
- [`nut-navbar--fixed`]: fixed,
12586
- [`nut-navbar--safe-area-inset-top`]: safeAreaInsetTop
12432
+ [`${classPrefix2}--fixed`]: fixed,
12433
+ [`${classPrefix2}--safe-area-inset-top`]: safeAreaInsetTop
12587
12434
  });
12588
- const cls = classNames(b2(""), classes, className);
12435
+ const cls = classNames(classPrefix2, classes, className);
12589
12436
  return /* @__PURE__ */ jsx(Fragment, {
12590
12437
  children: fixed && placeholder ? /* @__PURE__ */ jsx("div", {
12591
- className: `${b2("")}--placeholder`,
12438
+ className: `${classPrefix2}--placeholder`,
12592
12439
  children: renderWrapper()
12593
12440
  }) : renderWrapper()
12594
12441
  });
@@ -12753,7 +12600,6 @@ Please add \`${key}Action\` when creating your handler.`);
12753
12600
  width: "80%"
12754
12601
  };
12755
12602
  const SideNavBar = (props) => {
12756
- useConfig();
12757
12603
  const {
12758
12604
  title,
12759
12605
  visible,
@@ -12902,6 +12748,126 @@ Please add \`${key}Action\` when creating your handler.`);
12902
12748
  })]
12903
12749
  });
12904
12750
  };
12751
+ var classnameExports = {};
12752
+ var classname = {
12753
+ get exports() {
12754
+ return classnameExports;
12755
+ },
12756
+ set exports(v) {
12757
+ classnameExports = v;
12758
+ }
12759
+ };
12760
+ var classname_production_min = {};
12761
+ var hasRequiredClassname_production_min;
12762
+ function requireClassname_production_min() {
12763
+ if (hasRequiredClassname_production_min)
12764
+ return classname_production_min;
12765
+ hasRequiredClassname_production_min = 1;
12766
+ function r(r2) {
12767
+ function t2(t3, i, a2, o) {
12768
+ var f = i ? e + t3 + r2.e + i : e + t3, v = f;
12769
+ if (a2) {
12770
+ var s = " " + v + r2.m;
12771
+ for (var u in a2)
12772
+ if (a2.hasOwnProperty(u)) {
12773
+ var p = a2[u];
12774
+ true === p ? v += s + u : p && (v += s + u + n + p);
12775
+ }
12776
+ }
12777
+ if (void 0 !== o)
12778
+ for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
12779
+ var l2 = o[y2];
12780
+ if (l2 && "string" == typeof l2.valueOf())
12781
+ for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
12782
+ var h = g[d];
12783
+ h !== f && (v += " " + h);
12784
+ }
12785
+ }
12786
+ return v;
12787
+ }
12788
+ var e = r2.n || "", n = r2.v || r2.m;
12789
+ return function(r3, e2) {
12790
+ return function(n2, i, a2) {
12791
+ 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);
12792
+ };
12793
+ };
12794
+ }
12795
+ Object.defineProperty(classname_production_min, "__esModule", { value: true });
12796
+ var t = r({ e: "-", m: "_" });
12797
+ classname_production_min.cn = t, classname_production_min.withNaming = r;
12798
+ return classname_production_min;
12799
+ }
12800
+ var classname_development = {};
12801
+ var hasRequiredClassname_development;
12802
+ function requireClassname_development() {
12803
+ if (hasRequiredClassname_development)
12804
+ return classname_development;
12805
+ hasRequiredClassname_development = 1;
12806
+ Object.defineProperty(classname_development, "__esModule", { value: true });
12807
+ function withNaming(preset) {
12808
+ var nameSpace = preset.n || "";
12809
+ var modValueDelimiter = preset.v || preset.m;
12810
+ function stringify(b, e, m, mix) {
12811
+ var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
12812
+ var className = entityName;
12813
+ if (m) {
12814
+ var modPrefix = " " + className + preset.m;
12815
+ for (var k2 in m) {
12816
+ if (m.hasOwnProperty(k2)) {
12817
+ var modVal = m[k2];
12818
+ if (modVal === true) {
12819
+ className += modPrefix + k2;
12820
+ } else if (modVal) {
12821
+ className += modPrefix + k2 + modValueDelimiter + modVal;
12822
+ }
12823
+ }
12824
+ }
12825
+ }
12826
+ if (mix !== void 0) {
12827
+ mix = Array.isArray(mix) ? mix : [mix];
12828
+ for (var i = 0, len = mix.length; i < len; i++) {
12829
+ var value = mix[i];
12830
+ if (!value || typeof value.valueOf() !== "string")
12831
+ continue;
12832
+ var mixes = value.valueOf().split(" ");
12833
+ for (var j = 0; j < mixes.length; j++) {
12834
+ var val = mixes[j];
12835
+ if (val !== entityName) {
12836
+ className += " " + val;
12837
+ }
12838
+ }
12839
+ }
12840
+ }
12841
+ return className;
12842
+ }
12843
+ return function cnGenerator(b, e) {
12844
+ return function(elemOrMods, elemModsOrBlockMix, elemMix) {
12845
+ if (typeof elemOrMods === "string") {
12846
+ if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
12847
+ return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
12848
+ }
12849
+ return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
12850
+ }
12851
+ return stringify(b, e, elemOrMods, elemModsOrBlockMix);
12852
+ };
12853
+ };
12854
+ }
12855
+ var cn2 = withNaming({
12856
+ e: "-",
12857
+ m: "_"
12858
+ });
12859
+ classname_development.cn = cn2;
12860
+ classname_development.withNaming = withNaming;
12861
+ return classname_development;
12862
+ }
12863
+ (function(module2) {
12864
+ if (process.env.NODE_ENV === "production") {
12865
+ module2.exports = requireClassname_production_min();
12866
+ } else {
12867
+ module2.exports = requireClassname_development();
12868
+ }
12869
+ })(classname);
12870
+ const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
12905
12871
  const defaultProps$15 = {
12906
12872
  visible: 0,
12907
12873
  bottom: false,
@@ -12931,7 +12897,7 @@ Please add \`${key}Action\` when creating your handler.`);
12931
12897
  ...defaultProps$15,
12932
12898
  ...props
12933
12899
  };
12934
- const b2 = cn("tabbar");
12900
+ const b = cn("tabbar");
12935
12901
  const [selectIndex, setSelectIndex] = React.useState(activeVisible || visible);
12936
12902
  const handleClick2 = (idx) => {
12937
12903
  if (!("activeVisible" in props)) {
@@ -12944,7 +12910,7 @@ Please add \`${key}Action\` when creating your handler.`);
12944
12910
  }
12945
12911
  }, [activeVisible]);
12946
12912
  return /* @__PURE__ */ jsx("div", {
12947
- className: [`${b2()}`, bottom ? `${b2("bottom")}` : "", safeAreaInsetBottom ? `${b2("bottom")} ${b2("safebottom")}` : "", className].join(" "),
12913
+ className: [`${b()}`, bottom ? `${b("bottom")}` : "", safeAreaInsetBottom ? `${b("bottom")} ${b("safebottom")}` : "", className].join(" "),
12948
12914
  style,
12949
12915
  children: React.Children.map(children, (child, idx) => {
12950
12916
  if (!React.isValidElement(child)) {
@@ -13001,7 +12967,7 @@ Please add \`${key}Action\` when creating your handler.`);
13001
12967
  ...defaultProps$14,
13002
12968
  ...props
13003
12969
  };
13004
- const b2 = cn("tabbar-item");
12970
+ const b = cn("tabbar-item");
13005
12971
  const bIcon = cn("tabbar-item__icon-box");
13006
12972
  React.useEffect(() => {
13007
12973
  if (active && href) {
@@ -13009,7 +12975,7 @@ Please add \`${key}Action\` when creating your handler.`);
13009
12975
  }
13010
12976
  }, [active, href]);
13011
12977
  return /* @__PURE__ */ jsxs("div", {
13012
- className: `${b2({
12978
+ className: `${b({
13013
12979
  active
13014
12980
  })} ${className}`,
13015
12981
  style: {
@@ -13060,10 +13026,10 @@ Please add \`${key}Action\` when creating your handler.`);
13060
13026
  ...defaultProps$13,
13061
13027
  ...props
13062
13028
  };
13063
- const b2 = cn("tabpane");
13029
+ const b = cn("tabpane");
13064
13030
  const classes = classNames({
13065
13031
  active: !disabled && paneKey === activeKey
13066
- }, b2(""), autoHeightClassName, className);
13032
+ }, b(""), autoHeightClassName, className);
13067
13033
  return /* @__PURE__ */ jsx("div", {
13068
13034
  className: classes,
13069
13035
  children: !disabled && children
@@ -13148,13 +13114,13 @@ Please add \`${key}Action\` when creating your handler.`);
13148
13114
  });
13149
13115
  setCurrentItem(titles.current[currentIndex]);
13150
13116
  }, [children]);
13151
- const b2 = cn("tabs");
13152
- const classes = classNames(direction, b2(""), className);
13117
+ const b = cn("tabs");
13118
+ const classes = classNames(direction, b(""), className);
13153
13119
  const classesTitle = classNames({
13154
13120
  [type2]: type2,
13155
13121
  scrollable: titleScroll,
13156
13122
  [size]: size
13157
- }, `${b2("")}__titles`);
13123
+ }, `${b("")}__titles`);
13158
13124
  const titleStyle = {
13159
13125
  marginLeft: pxCheck(titleGutter),
13160
13126
  marginRight: pxCheck(titleGutter)
@@ -13193,12 +13159,12 @@ Please add \`${key}Action\` when creating your handler.`);
13193
13159
  active: !item.disabled && String(item.paneKey) === String(value),
13194
13160
  disabled: item.disabled,
13195
13161
  "nut-tabs__titles-item-left-align": leftAlign
13196
- }, `${b2("")}__titles-item`),
13162
+ }, `${b("")}__titles-item`),
13197
13163
  children: [type2 === "line" && /* @__PURE__ */ jsx("div", {
13198
- className: `${b2("")}__titles-item__line`,
13164
+ className: `${b("")}__titles-item__line`,
13199
13165
  style: tabsActiveStyle
13200
13166
  }), type2 === "smile" && /* @__PURE__ */ jsx("div", {
13201
- className: `${b2("")}__titles-item__smile`,
13167
+ className: `${b("")}__titles-item__smile`,
13202
13168
  style: tabsActiveStyle,
13203
13169
  children: /* @__PURE__ */ jsx(x$7, {
13204
13170
  color
@@ -13206,15 +13172,15 @@ Please add \`${key}Action\` when creating your handler.`);
13206
13172
  }), /* @__PURE__ */ jsx("div", {
13207
13173
  className: classNames({
13208
13174
  ellipsis: ellipsis && !titleScroll && direction === "horizontal"
13209
- }, `${b2("")}__titles-item__text`),
13175
+ }, `${b("")}__titles-item__text`),
13210
13176
  children: item.title
13211
13177
  })]
13212
13178
  }, item.paneKey);
13213
13179
  })
13214
13180
  }), /* @__PURE__ */ jsx("div", {
13215
- className: `${b2("")}__content__wrap`,
13181
+ className: `${b("")}__content__wrap`,
13216
13182
  children: /* @__PURE__ */ jsx("div", {
13217
- className: `${b2("")}__content`,
13183
+ className: `${b("")}__content`,
13218
13184
  style: contentStyle,
13219
13185
  children: React.Children.map(children, (child, idx) => {
13220
13186
  var _a2;
@@ -13464,14 +13430,14 @@ Please add \`${key}Action\` when creating your handler.`);
13464
13430
  const monthsPanel = React.useRef(null);
13465
13431
  const viewArea = React.useRef(null);
13466
13432
  let viewHeight = 0;
13467
- const b2 = cn("calendar");
13433
+ const b = cn("calendar");
13468
13434
  const classes = classNames({
13469
- [`${b2("")}-tile`]: !poppable,
13470
- [`${b2("")}-nofooter`]: !!isAutoBackFill
13471
- }, b2(""));
13435
+ [`${b("")}-tile`]: !poppable,
13436
+ [`${b("")}-nofooter`]: !!isAutoBackFill
13437
+ }, b(""));
13472
13438
  const headerClasses = classNames({
13473
- [`${b2("")}-header`]: true,
13474
- [`${b2("")}-header-tile`]: !poppable
13439
+ [`${b("")}-header`]: true,
13440
+ [`${b("")}-header-tile`]: !poppable
13475
13441
  });
13476
13442
  const monthitemclasses = classNames({
13477
13443
  "calendar-month-item": true,
@@ -14183,13 +14149,13 @@ Please add \`${key}Action\` when creating your handler.`);
14183
14149
  ...defaultProps$$,
14184
14150
  ...props
14185
14151
  };
14186
- const b2 = cn("cascader-item");
14152
+ const b = cn("cascader-item");
14187
14153
  const classes = classNames({
14188
14154
  active: checked,
14189
14155
  disabled: data.disabled
14190
- }, b2(""));
14156
+ }, b(""));
14191
14157
  const classesTitle = classNames({
14192
- [`${b2("")}__title`]: true
14158
+ [`${b("")}__title`]: true
14193
14159
  });
14194
14160
  const renderIcon = () => {
14195
14161
  if (checked) {
@@ -14197,7 +14163,7 @@ Please add \`${key}Action\` when creating your handler.`);
14197
14163
  return checkedIcon;
14198
14164
  }
14199
14165
  return /* @__PURE__ */ jsx(x$c, {
14200
- className: `${checked ? b2("icon-check") : ""}`
14166
+ className: `${checked ? b("icon-check") : ""}`
14201
14167
  });
14202
14168
  }
14203
14169
  return null;
@@ -14287,7 +14253,7 @@ Please add \`${key}Action\` when creating your handler.`);
14287
14253
  if (sortKey) {
14288
14254
  Object.keys(map).forEach((i) => {
14289
14255
  if (map[i].length > 1) {
14290
- map[i].sort((a2, b2) => a2[sortKey] - b2[sortKey]);
14256
+ map[i].sort((a2, b) => a2[sortKey] - b[sortKey]);
14291
14257
  }
14292
14258
  });
14293
14259
  }
@@ -14439,10 +14405,10 @@ Please add \`${key}Action\` when creating your handler.`);
14439
14405
  },
14440
14406
  lazyLoadMap: /* @__PURE__ */ new Map()
14441
14407
  });
14442
- const b2 = cn("cascader");
14443
- const classes = classNames(b2(""));
14408
+ const b = cn("cascader");
14409
+ const classes = classNames(b(""));
14444
14410
  const classesPane = classNames({
14445
- [`${b2("")}-pane`]: true
14411
+ [`${b("")}-pane`]: true
14446
14412
  });
14447
14413
  React.useEffect(() => {
14448
14414
  initData();
@@ -14610,7 +14576,7 @@ Please add \`${key}Action\` when creating your handler.`);
14610
14576
  className: `${classes} ${className}`,
14611
14577
  style,
14612
14578
  children: [poppable && /* @__PURE__ */ jsx("div", {
14613
- className: b2("title"),
14579
+ className: b("title"),
14614
14580
  children: title
14615
14581
  }), /* @__PURE__ */ jsx(Tabs, {
14616
14582
  value: tabvalue,
@@ -14659,7 +14625,7 @@ Please add \`${key}Action\` when creating your handler.`);
14659
14625
  };
14660
14626
  return /* @__PURE__ */ jsx(Fragment, {
14661
14627
  children: poppable ? /* @__PURE__ */ jsx(Popup, {
14662
- popClass: "cascadar-popup",
14628
+ className: "cascadar-popup",
14663
14629
  visible,
14664
14630
  position: "bottom",
14665
14631
  round: true,
@@ -14693,7 +14659,7 @@ Please add \`${key}Action\` when creating your handler.`);
14693
14659
  ...defaultProps$Z,
14694
14660
  ...props
14695
14661
  };
14696
- const b2 = cn("checkboxgroup");
14662
+ const b = cn("checkboxgroup");
14697
14663
  const {
14698
14664
  className,
14699
14665
  disabled,
@@ -14768,7 +14734,7 @@ Please add \`${key}Action\` when creating your handler.`);
14768
14734
  }
14769
14735
  },
14770
14736
  children: /* @__PURE__ */ jsx("div", {
14771
- className: `${b2()} nut-checkboxgroup--${props.direction} ${className || ""}`,
14737
+ className: `${b()} nut-checkboxgroup--${props.direction} ${className || ""}`,
14772
14738
  ...rest,
14773
14739
  children: (options2 == null ? void 0 : options2.length) ? renderOptions() : children
14774
14740
  })
@@ -14796,7 +14762,7 @@ Please add \`${key}Action\` when creating your handler.`);
14796
14762
  ...defaultProps$Y,
14797
14763
  ...props
14798
14764
  };
14799
- const b2 = cn("checkbox");
14765
+ const b = cn("checkbox");
14800
14766
  const {
14801
14767
  icon,
14802
14768
  iconSize,
@@ -14881,7 +14847,7 @@ Please add \`${key}Action\` when creating your handler.`);
14881
14847
  };
14882
14848
  const renderLabel = () => {
14883
14849
  return /* @__PURE__ */ jsx("span", {
14884
- className: `${b2("label", {
14850
+ className: `${b("label", {
14885
14851
  disabled: innerDisabled
14886
14852
  })} `,
14887
14853
  children: children || label
@@ -14899,7 +14865,7 @@ Please add \`${key}Action\` when creating your handler.`);
14899
14865
  setChecked(latestChecked);
14900
14866
  };
14901
14867
  return /* @__PURE__ */ jsxs("div", {
14902
- className: `${b2({
14868
+ className: `${b({
14903
14869
  reverse: textPosition === "left"
14904
14870
  })} ${className || ""}`,
14905
14871
  ...rest,
@@ -15217,7 +15183,7 @@ Please add \`${key}Action\` when creating your handler.`);
15217
15183
  const pickerRef = React.useRef(null);
15218
15184
  const [refs, setRefs] = useRefs();
15219
15185
  const [columnsList, setColumnsList] = React.useState([]);
15220
- const b2 = cn("picker");
15186
+ const b = cn("picker");
15221
15187
  const isConfirmEvent = React.useRef(false);
15222
15188
  React.useEffect(() => {
15223
15189
  if (defaultValueData && defaultValueData.length !== 0 && defaultValueData.toString() !== chooseValueData.toString()) {
@@ -15359,16 +15325,16 @@ Please add \`${key}Action\` when creating your handler.`);
15359
15325
  };
15360
15326
  const renderToolbar = () => {
15361
15327
  return /* @__PURE__ */ jsxs("div", {
15362
- className: b2("control"),
15328
+ className: b("control"),
15363
15329
  children: [/* @__PURE__ */ jsx("span", {
15364
- className: b2("cancel-btn"),
15330
+ className: b("cancel-btn"),
15365
15331
  onClick: () => closeActionSheet(),
15366
15332
  children: locale.cancel
15367
15333
  }), /* @__PURE__ */ jsx("div", {
15368
- className: b2("title"),
15334
+ className: b("title"),
15369
15335
  children: title || ""
15370
15336
  }), /* @__PURE__ */ jsx("span", {
15371
- className: b2("confirm-btn"),
15337
+ className: b("confirm-btn"),
15372
15338
  onClick: confirm2,
15373
15339
  children: locale.confirm
15374
15340
  })]
@@ -15381,11 +15347,11 @@ Please add \`${key}Action\` when creating your handler.`);
15381
15347
  closeActionSheet();
15382
15348
  },
15383
15349
  children: /* @__PURE__ */ jsxs("div", {
15384
- className: `${b2()} ${className || ""}`,
15350
+ className: `${b()} ${className || ""}`,
15385
15351
  style,
15386
15352
  ...rest,
15387
15353
  children: [renderToolbar(), /* @__PURE__ */ jsx("div", {
15388
- className: b2("panel"),
15354
+ className: b("panel"),
15389
15355
  ref: pickerRef,
15390
15356
  children: columnsList == null ? void 0 : columnsList.map((item, index) => {
15391
15357
  return /* @__PURE__ */ jsx(PickerSlot$1, {
@@ -16036,7 +16002,7 @@ Please add \`${key}Action\` when creating your handler.`);
16036
16002
  return urlReg;
16037
16003
  }
16038
16004
  var word = "[a-fA-F\\d:]";
16039
- var b2 = function b3(options2) {
16005
+ var b = function b2(options2) {
16040
16006
  return options2 && options2.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
16041
16007
  };
16042
16008
  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}";
@@ -16046,13 +16012,13 @@ Please add \`${key}Action\` when creating your handler.`);
16046
16012
  var v4exact = new RegExp("^" + v4 + "$");
16047
16013
  var v6exact = new RegExp("^" + v6 + "$");
16048
16014
  var ip = function ip2(options2) {
16049
- return options2 && options2.exact ? v46Exact : new RegExp("(?:" + b2(options2) + v4 + b2(options2) + ")|(?:" + b2(options2) + v6 + b2(options2) + ")", "g");
16015
+ return options2 && options2.exact ? v46Exact : new RegExp("(?:" + b(options2) + v4 + b(options2) + ")|(?:" + b(options2) + v6 + b(options2) + ")", "g");
16050
16016
  };
16051
16017
  ip.v4 = function(options2) {
16052
- return options2 && options2.exact ? v4exact : new RegExp("" + b2(options2) + v4 + b2(options2), "g");
16018
+ return options2 && options2.exact ? v4exact : new RegExp("" + b(options2) + v4 + b(options2), "g");
16053
16019
  };
16054
16020
  ip.v6 = function(options2) {
16055
- return options2 && options2.exact ? v6exact : new RegExp("" + b2(options2) + v6 + b2(options2), "g");
16021
+ return options2 && options2.exact ? v6exact : new RegExp("" + b(options2) + v6 + b(options2), "g");
16056
16022
  };
16057
16023
  var protocol = "(?:(?:[a-z]+:)?//)";
16058
16024
  var auth = "(?:\\S+(?::\\S*)?@)?";
@@ -17464,7 +17430,7 @@ Please add \`${key}Action\` when creating your handler.`);
17464
17430
  digits: 0,
17465
17431
  async: false
17466
17432
  };
17467
- const classPrefix = `nut-inputnumber`;
17433
+ const classPrefix$1 = `nut-inputnumber`;
17468
17434
  const InputNumber = (props) => {
17469
17435
  const {
17470
17436
  children,
@@ -17506,8 +17472,8 @@ Please add \`${key}Action\` when creating your handler.`);
17506
17472
  }
17507
17473
  }, []);
17508
17474
  const classes = classNames({
17509
- [`${classPrefix}`]: true,
17510
- [`${classPrefix}--disabled`]: disabled
17475
+ [`${classPrefix$1}`]: true,
17476
+ [`${classPrefix$1}--disabled`]: disabled
17511
17477
  }, className);
17512
17478
  const styles = {
17513
17479
  ...style
@@ -17724,7 +17690,7 @@ Please add \`${key}Action\` when creating your handler.`);
17724
17690
  onDelete,
17725
17691
  onClose
17726
17692
  } = props;
17727
- const b2 = cn("numberkeyboard");
17693
+ const b = cn("numberkeyboard");
17728
17694
  const [show, setShow] = React.useState(visible);
17729
17695
  const [clickKeyIndex, setClickKeyIndex] = React.useState(void 0);
17730
17696
  const [keysList, setKeysList] = React.useState([]);
@@ -17844,7 +17810,7 @@ Please add \`${key}Action\` when creating your handler.`);
17844
17810
  children: /* @__PURE__ */ jsx(Popup, {
17845
17811
  visible: show,
17846
17812
  position: "bottom",
17847
- popClass,
17813
+ className: popClass,
17848
17814
  onClickOverlay: onClose,
17849
17815
  overlay,
17850
17816
  onClickCloseIcon: onClose,
@@ -17852,24 +17818,24 @@ Please add \`${key}Action\` when creating your handler.`);
17852
17818
  backgroundColor: "rgba(0, 0, 0, 0)"
17853
17819
  },
17854
17820
  children: /* @__PURE__ */ jsxs("div", {
17855
- className: `${b2()} ${className}`,
17821
+ className: `${b()} ${className}`,
17856
17822
  style: {
17857
17823
  ...style
17858
17824
  },
17859
17825
  children: [title ? /* @__PURE__ */ jsxs("div", {
17860
- className: b2("header"),
17826
+ className: b("header"),
17861
17827
  children: [/* @__PURE__ */ jsx("h3", {
17862
- className: b2("header__tit"),
17828
+ className: b("header__tit"),
17863
17829
  children: title
17864
17830
  }), type2 === "default" ? /* @__PURE__ */ jsx("span", {
17865
- className: b2("header__close"),
17831
+ className: b("header__close"),
17866
17832
  onClick: onClose,
17867
17833
  children: locale.done
17868
17834
  }) : null]
17869
17835
  }) : null, /* @__PURE__ */ jsxs("div", {
17870
- className: b2("body"),
17836
+ className: b("body"),
17871
17837
  children: [/* @__PURE__ */ jsx("div", {
17872
- className: b2("body__keys"),
17838
+ className: b("body__keys"),
17873
17839
  children: keysList == null ? void 0 : keysList.map((item, index) => {
17874
17840
  return /* @__PURE__ */ jsx("div", {
17875
17841
  className: classNames({
@@ -17899,7 +17865,7 @@ Please add \`${key}Action\` when creating your handler.`);
17899
17865
  }, index);
17900
17866
  })
17901
17867
  }), type2 === "rightColumn" ? /* @__PURE__ */ jsxs("div", {
17902
- className: b2("sidebar"),
17868
+ className: b("sidebar"),
17903
17869
  children: [/* @__PURE__ */ jsx("div", {
17904
17870
  className: "key-board-wrapper",
17905
17871
  children: /* @__PURE__ */ jsx("div", {
@@ -18528,7 +18494,7 @@ Please add \`${key}Action\` when creating your handler.`);
18528
18494
  React.useEffect(() => {
18529
18495
  if (marks) {
18530
18496
  const marksKeys = Object.keys(marks);
18531
- const list = marksKeys.map(parseFloat).sort((a2, b2) => a2 - b2).filter((point) => point >= min && point <= max);
18497
+ const list = marksKeys.map(parseFloat).sort((a2, b) => a2 - b).filter((point) => point >= min && point <= max);
18532
18498
  SetMarksList(list);
18533
18499
  }
18534
18500
  }, [marks]);
@@ -19219,7 +19185,7 @@ Please add \`${key}Action\` when creating your handler.`);
19219
19185
  autoFocus,
19220
19186
  ...reset
19221
19187
  } = props;
19222
- const b2 = cn("shortpassword");
19188
+ const b = cn("shortpassword");
19223
19189
  const textInput = React.useRef(null);
19224
19190
  const range2 = (val) => {
19225
19191
  return Math.min(Math.max(4, val), 6);
@@ -19295,22 +19261,22 @@ Please add \`${key}Action\` when creating your handler.`);
19295
19261
  onClickOverlay: onClose,
19296
19262
  onClickCloseIcon: onClose,
19297
19263
  children: /* @__PURE__ */ jsxs("div", {
19298
- className: `${b2()} ${className}`,
19264
+ className: `${b()} ${className}`,
19299
19265
  style: {
19300
19266
  ...style
19301
19267
  },
19302
19268
  ...reset,
19303
19269
  children: [/* @__PURE__ */ jsx("div", {
19304
- className: b2("title"),
19270
+ className: b("title"),
19305
19271
  children: title || locale.shortpassword.title
19306
19272
  }), /* @__PURE__ */ jsx("div", {
19307
- className: b2("subtitle"),
19273
+ className: b("subtitle"),
19308
19274
  children: description || locale.shortpassword.description
19309
19275
  }), /* @__PURE__ */ jsxs("div", {
19310
- className: b2("input"),
19276
+ className: b("input"),
19311
19277
  children: [/* @__PURE__ */ jsx("input", {
19312
19278
  ref: textInput,
19313
- className: b2("input-real"),
19279
+ className: b("input-real"),
19314
19280
  type: "number",
19315
19281
  style: systemStyle(),
19316
19282
  maxLength: 6,
@@ -19318,40 +19284,40 @@ Please add \`${key}Action\` when creating your handler.`);
19318
19284
  autoFocus,
19319
19285
  onChange: (e) => changeValue(e)
19320
19286
  }), /* @__PURE__ */ jsx("div", {
19321
- className: b2("input-site")
19287
+ className: b("input-site")
19322
19288
  }), /* @__PURE__ */ jsx("div", {
19323
- className: b2("input-fake"),
19289
+ className: b("input-fake"),
19324
19290
  onClick: () => focus(),
19325
19291
  children: [...new Array(comLen).keys()].map((item, index) => {
19326
19292
  return /* @__PURE__ */ jsx("div", {
19327
- className: b2("input-fake__li"),
19293
+ className: b("input-fake__li"),
19328
19294
  children: String(inputValue).length > index ? /* @__PURE__ */ jsx("div", {
19329
- className: b2("input-fake__li__icon")
19295
+ className: b("input-fake__li__icon")
19330
19296
  }) : null
19331
19297
  }, index);
19332
19298
  })
19333
19299
  })]
19334
19300
  }), /* @__PURE__ */ jsxs("div", {
19335
- className: b2("message"),
19301
+ className: b("message"),
19336
19302
  children: [/* @__PURE__ */ jsx("div", {
19337
- className: b2("message__error"),
19303
+ className: b("message__error"),
19338
19304
  children: errorMsg2
19339
19305
  }), tips || locale.shortpassword.tips ? /* @__PURE__ */ jsxs("div", {
19340
- className: b2("message__forget"),
19306
+ className: b("message__forget"),
19341
19307
  children: [renderIcon(iconSize), /* @__PURE__ */ jsx("div", {
19342
- className: b2("message__forget-tips"),
19308
+ className: b("message__forget-tips"),
19343
19309
  onClick: onTips,
19344
19310
  children: tips || locale.shortpassword.tips
19345
19311
  })]
19346
19312
  }) : null]
19347
19313
  }), !noButton ? /* @__PURE__ */ jsxs("div", {
19348
- className: b2("footer"),
19314
+ className: b("footer"),
19349
19315
  children: [/* @__PURE__ */ jsx("div", {
19350
- className: b2("footer__cancel"),
19316
+ className: b("footer__cancel"),
19351
19317
  onClick: onCancel,
19352
19318
  children: locale.cancel
19353
19319
  }), /* @__PURE__ */ jsx("div", {
19354
- className: b2("footer__sure"),
19320
+ className: b("footer__sure"),
19355
19321
  onClick: () => sure(),
19356
19322
  children: locale.confirm
19357
19323
  })]
@@ -19507,134 +19473,64 @@ Please add \`${key}Action\` when creating your handler.`);
19507
19473
  TextArea.displayName = "NutTextArea";
19508
19474
  const defaultProps$K = {
19509
19475
  ...ComponentDefaults,
19510
- className: "",
19511
- style: {},
19512
- isShowPercentage: true,
19513
- percentage: 0,
19514
- fillColor: "#f3f3f3",
19515
- strokeColor: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
19516
- strokeWidth: "",
19517
- textColor: "",
19518
- textWidth: "",
19519
- showText: true,
19520
- textInside: false,
19521
- textBackground: "linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)",
19522
- textType: "text",
19523
- status: false,
19524
- icon: null,
19525
- children: void 0
19476
+ percent: 0,
19477
+ showText: false,
19478
+ animated: false
19526
19479
  };
19527
19480
  const Progress = (props) => {
19528
19481
  const {
19529
19482
  className,
19530
19483
  style,
19531
- isShowPercentage,
19532
- percentage,
19533
- fillColor,
19534
- strokeColor,
19484
+ percent,
19485
+ background,
19486
+ color,
19535
19487
  strokeWidth,
19536
- size,
19537
- textColor,
19538
- textWidth,
19539
19488
  showText,
19540
- textInside,
19541
- textBackground,
19542
- textType,
19543
- status,
19544
- icon,
19489
+ animated: animated2,
19545
19490
  children,
19546
19491
  ...rest
19547
19492
  } = {
19548
19493
  ...defaultProps$K,
19549
19494
  ...props
19550
19495
  };
19551
- const b2 = cn("progress");
19552
- const classes = classNames(b2(""));
19553
- const classesOuter = classNames({
19554
- [`${b2("")}-outer`]: true,
19555
- [`${b2("")}-${size || "base"}`]: true
19556
- });
19496
+ const classPrefix2 = "nut-progress";
19557
19497
  const classesInner = classNames({
19558
- [`${b2("")}-inner`]: true,
19559
- [`${b2("")}-active`]: status
19560
- });
19561
- const classesText = classNames({
19562
- [`${b2("")}-text`]: true
19563
- });
19564
- const classesInsideText = classNames({
19565
- [`${b2("")}-text`]: true,
19566
- [`${b2("")}-insidetext`]: true
19567
- });
19568
- const classesTextInner = classNames({
19569
- [`${b2("")}-text__inner`]: true
19498
+ [`${classPrefix2}-inner`]: true,
19499
+ [`${classPrefix2}-active`]: animated2
19570
19500
  });
19571
19501
  const stylesOuter = {
19572
19502
  height: `${strokeWidth}px`,
19573
- // eslint-disable-next-line no-nested-ternary
19574
- background: `${fillColor}`
19503
+ background
19575
19504
  };
19576
19505
  const stylesInner = {
19577
- width: `${percentage}%`,
19578
- // eslint-disable-next-line no-nested-ternary
19579
- background: `${strokeColor}`
19506
+ width: `${percent}%`,
19507
+ background: color
19580
19508
  };
19581
- const stylesInsideText = {
19582
- width: `${textWidth}px`,
19583
- left: `${percentage}%`,
19584
- background: textBackground || strokeColor
19585
- };
19586
- const stylesInsideIcon = {
19587
- width: `${textWidth}px`,
19588
- left: `${percentage}%`
19589
- };
19590
- const stylesText = {
19591
- width: `${textWidth}px`
19592
- };
19593
- return /* @__PURE__ */ jsxs("div", {
19594
- className: `${classes} ${className}`,
19509
+ return /* @__PURE__ */ jsx("div", {
19510
+ className: classNames(classPrefix2, className),
19595
19511
  style,
19596
19512
  ...rest,
19597
- children: [/* @__PURE__ */ jsx("div", {
19598
- className: classesOuter,
19513
+ children: /* @__PURE__ */ jsx("div", {
19514
+ className: `${classPrefix2}-outer`,
19599
19515
  style: stylesOuter,
19600
19516
  children: /* @__PURE__ */ jsx("div", {
19601
19517
  className: classesInner,
19602
19518
  style: stylesInner,
19603
- children: showText && textInside && /* @__PURE__ */ jsx(Fragment, {
19604
- children: children ? /* @__PURE__ */ jsx("div", {
19605
- className: classesInsideText,
19606
- style: stylesInsideIcon,
19607
- children
19608
- }) : /* @__PURE__ */ jsx("div", {
19609
- className: classesInsideText,
19610
- style: stylesInsideText,
19611
- children: /* @__PURE__ */ jsxs("span", {
19612
- className: classesTextInner,
19613
- style: {
19614
- color: textColor
19615
- },
19616
- children: [percentage, isShowPercentage ? "%" : ""]
19617
- })
19519
+ children: showText && /* @__PURE__ */ jsx("div", {
19520
+ className: `${classPrefix2}-text`,
19521
+ style: {
19522
+ left: `${percent}%`
19523
+ },
19524
+ children: children || /* @__PURE__ */ jsxs("div", {
19525
+ className: `${classPrefix2}-text__inner`,
19526
+ style: {
19527
+ background: color
19528
+ },
19529
+ children: [percent, "%"]
19618
19530
  })
19619
19531
  })
19620
19532
  })
19621
- }), showText && !textInside && /* @__PURE__ */ jsxs("div", {
19622
- className: classesText,
19623
- style: stylesText,
19624
- children: [textType === "text" && /* @__PURE__ */ jsxs("span", {
19625
- className: classesTextInner,
19626
- style: {
19627
- color: textColor
19628
- },
19629
- children: [percentage, isShowPercentage ? "%" : ""]
19630
- }), textType === "icon" && /* @__PURE__ */ jsx(Fragment, {
19631
- children: icon || /* @__PURE__ */ jsx(x$d, {
19632
- width: 16,
19633
- height: 16,
19634
- color: "#439422"
19635
- })
19636
- })]
19637
- })]
19533
+ })
19638
19534
  });
19639
19535
  };
19640
19536
  Progress.defaultProps = defaultProps$K;
@@ -19737,29 +19633,26 @@ Please add \`${key}Action\` when creating your handler.`);
19737
19633
  const defaultProps$J = {
19738
19634
  ...ComponentDefaults,
19739
19635
  url: "",
19740
- maximum: 1,
19741
- uploadIcon: null,
19742
- uploadIconSize: "",
19743
- uploadIconTip: "",
19744
- listType: "picture",
19636
+ maxCount: 1,
19637
+ previewType: "picture",
19638
+ imageFit: "cover",
19745
19639
  name: "file",
19746
19640
  accept: "*",
19747
19641
  disabled: false,
19748
19642
  autoUpload: true,
19749
19643
  multiple: false,
19750
- maximize: Number.MAX_VALUE,
19644
+ maxFileSize: Number.MAX_VALUE,
19751
19645
  data: {},
19752
19646
  headers: {},
19753
19647
  method: "post",
19754
- defaultImg: "",
19755
19648
  xhrState: 200,
19756
19649
  timeout: 1e3 * 30,
19757
19650
  withCredentials: false,
19758
19651
  clearInput: true,
19759
- isPreview: true,
19760
- isDeletable: true,
19652
+ preview: true,
19653
+ deletable: true,
19761
19654
  capture: false,
19762
- onBeforeDelete: (file, files) => {
19655
+ beforeDelete: (file, files) => {
19763
19656
  return true;
19764
19657
  }
19765
19658
  };
@@ -19783,32 +19676,33 @@ Please add \`${key}Action\` when creating your handler.`);
19783
19676
  const {
19784
19677
  children,
19785
19678
  uploadIcon,
19786
- uploadIconSize,
19787
- uploadIconTip,
19679
+ uploadLabel,
19788
19680
  name,
19789
19681
  accept,
19790
- defaultFileList,
19791
- listType,
19682
+ defaultValue,
19683
+ value,
19684
+ previewType,
19685
+ imageFit,
19792
19686
  disabled,
19793
19687
  multiple,
19794
19688
  url,
19795
- defaultImg,
19689
+ previewUrl,
19796
19690
  headers,
19797
19691
  timeout,
19798
19692
  method: method2,
19799
19693
  xhrState,
19800
19694
  withCredentials,
19801
19695
  data,
19802
- isPreview,
19803
- isDeletable,
19804
- maximum,
19696
+ preview,
19697
+ deletable,
19698
+ maxCount,
19805
19699
  capture,
19806
- maximize,
19700
+ maxFileSize,
19807
19701
  className,
19808
19702
  autoUpload,
19809
19703
  clearInput,
19810
19704
  onStart,
19811
- onRemove,
19705
+ onDelete,
19812
19706
  onChange,
19813
19707
  onFileItemClick,
19814
19708
  onProgress,
@@ -19816,23 +19710,22 @@ Please add \`${key}Action\` when creating your handler.`);
19816
19710
  onUpdate,
19817
19711
  onFailure,
19818
19712
  onOversize,
19819
- onBeforeUpload,
19820
- onBeforeXhrUpload,
19821
- onBeforeDelete,
19713
+ beforeUpload,
19714
+ beforeXhrUpload,
19715
+ beforeDelete,
19822
19716
  ...restProps
19823
19717
  } = {
19824
19718
  ...defaultProps$J,
19825
19719
  ...props
19826
19720
  };
19827
- const [fileList, setFileList] = React.useState([]);
19721
+ const [fileList, setFileList] = React.useState(defaultValue || []);
19828
19722
  const [uploadQueue, setUploadQueue] = React.useState([]);
19829
19723
  React.useEffect(() => {
19830
- if (defaultFileList) {
19831
- setFileList(defaultFileList);
19724
+ if (value) {
19725
+ setFileList(value);
19832
19726
  }
19833
- }, [defaultFileList]);
19834
- const b2 = cn("uploader");
19835
- const classes = classNames(className, b2(""));
19727
+ }, [value]);
19728
+ const classes = classNames(className, "nut-uploader");
19836
19729
  React.useImperativeHandle(ref, () => ({
19837
19730
  submit: () => {
19838
19731
  Promise.all(uploadQueue).then((res) => {
@@ -19859,8 +19752,8 @@ Please add \`${key}Action\` when creating your handler.`);
19859
19752
  const executeUpload = (fileItem, index) => {
19860
19753
  const uploadOption = new UploadOptions();
19861
19754
  uploadOption.url = url;
19862
- for (const [key, value] of Object.entries(data)) {
19863
- fileItem.formData.append(key, value);
19755
+ for (const [key, value2] of Object.entries(data)) {
19756
+ fileItem.formData.append(key, value2);
19864
19757
  }
19865
19758
  uploadOption.formData = fileItem.formData;
19866
19759
  uploadOption.timeout = timeout * 1;
@@ -19868,7 +19761,7 @@ Please add \`${key}Action\` when creating your handler.`);
19868
19761
  uploadOption.xhrState = xhrState;
19869
19762
  uploadOption.headers = headers;
19870
19763
  uploadOption.withCredentials = withCredentials;
19871
- uploadOption.beforeXhrUpload = onBeforeXhrUpload;
19764
+ uploadOption.beforeXhrUpload = beforeXhrUpload;
19872
19765
  try {
19873
19766
  uploadOption.sourceFile = fileItem.formData.get(name);
19874
19767
  } catch (error) {
@@ -19966,7 +19859,7 @@ Please add \`${key}Action\` when creating your handler.`);
19966
19859
  fileItem.message = locale.uploader.waitingUpload;
19967
19860
  }
19968
19861
  executeUpload(fileItem, index);
19969
- if (isPreview && file.type.includes("image")) {
19862
+ if (preview && file.type.includes("image")) {
19970
19863
  const reader = new FileReader();
19971
19864
  reader.onload = (event) => {
19972
19865
  fileItem.url = event.target.result;
@@ -19981,10 +19874,10 @@ Please add \`${key}Action\` when creating your handler.`);
19981
19874
  });
19982
19875
  };
19983
19876
  const filterFiles = (files) => {
19984
- const maximum2 = props.maximum * 1;
19877
+ const maximum = props.maxCount * 1;
19985
19878
  const oversizes = new Array();
19986
19879
  const filterFile = files.filter((file) => {
19987
- if (file.size > maximize) {
19880
+ if (file.size > maxFileSize) {
19988
19881
  oversizes.push(file);
19989
19882
  return false;
19990
19883
  }
@@ -19993,23 +19886,23 @@ Please add \`${key}Action\` when creating your handler.`);
19993
19886
  if (oversizes.length) {
19994
19887
  onOversize && onOversize(files);
19995
19888
  }
19996
- if (filterFile.length > maximum2) {
19997
- filterFile.splice(maximum2, filterFile.length - maximum2);
19889
+ if (filterFile.length > maximum) {
19890
+ filterFile.splice(maximum, filterFile.length - maximum);
19998
19891
  }
19999
19892
  if (fileList.length !== 0) {
20000
- const index = maximum2 - fileList.length;
19893
+ const index = maximum - fileList.length;
20001
19894
  filterFile.splice(index, filterFile.length - index);
20002
19895
  }
20003
19896
  return filterFile;
20004
19897
  };
20005
19898
  const deleted = (file, index) => {
20006
19899
  fileList.splice(index, 1);
20007
- onRemove && onRemove(file, fileList);
19900
+ onDelete && onDelete(file, fileList);
20008
19901
  setFileList([...fileList]);
20009
19902
  };
20010
- const onDelete = (file, index) => {
19903
+ const onDeleteItem = (file, index) => {
20011
19904
  clearUploadQueue(index);
20012
- funcInterceptor(onBeforeDelete, {
19905
+ funcInterceptor(beforeDelete, {
20013
19906
  args: [file, fileList],
20014
19907
  done: () => deleted(file, index)
20015
19908
  });
@@ -20022,8 +19915,8 @@ Please add \`${key}Action\` when creating your handler.`);
20022
19915
  const {
20023
19916
  files
20024
19917
  } = $el;
20025
- if (onBeforeUpload) {
20026
- onBeforeUpload(new Array().slice.call(files)).then((f) => {
19918
+ if (beforeUpload) {
19919
+ beforeUpload(new Array().slice.call(files)).then((f) => {
20027
19920
  const _files = filterFiles(new Array().slice.call(f));
20028
19921
  readFile(_files);
20029
19922
  });
@@ -20048,7 +19941,7 @@ Please add \`${key}Action\` when creating your handler.`);
20048
19941
  children: [children && /* @__PURE__ */ jsx("div", {
20049
19942
  className: "nut-uploader__slot",
20050
19943
  children: /* @__PURE__ */ jsxs(Fragment, {
20051
- children: [children, maximum > fileList.length && /* @__PURE__ */ jsx(Fragment, {
19944
+ children: [children, maxCount > fileList.length && /* @__PURE__ */ jsx(Fragment, {
20052
19945
  children: capture ? /* @__PURE__ */ jsx("input", {
20053
19946
  className: "nut-uploader__input",
20054
19947
  type: "file",
@@ -20071,13 +19964,13 @@ Please add \`${key}Action\` when creating your handler.`);
20071
19964
  })
20072
19965
  }), fileList.length !== 0 && fileList.map((item, index) => {
20073
19966
  return /* @__PURE__ */ jsxs("div", {
20074
- className: `nut-uploader__preview ${listType}`,
20075
- children: [listType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
19967
+ className: `nut-uploader__preview ${previewType}`,
19968
+ children: [previewType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
20076
19969
  className: "nut-uploader__preview-img",
20077
- children: [isDeletable && /* @__PURE__ */ jsx(x$8, {
19970
+ children: [deletable && /* @__PURE__ */ jsx(x$8, {
20078
19971
  color: "rgba(0,0,0,0.6)",
20079
19972
  className: "close",
20080
- onClick: () => onDelete(item, index)
19973
+ onClick: () => onDeleteItem(item, index)
20081
19974
  }), item.status === "ready" ? /* @__PURE__ */ jsx("div", {
20082
19975
  className: "nut-uploader__preview__progress",
20083
19976
  children: /* @__PURE__ */ jsx("div", {
@@ -20089,6 +19982,7 @@ Please add \`${key}Action\` when creating your handler.`);
20089
19982
  children: [item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsx(x$8, {
20090
19983
  color: "#fff"
20091
19984
  }) : item.loadingIcon || /* @__PURE__ */ jsx(k$2, {
19985
+ className: "nut-icon-loading",
20092
19986
  color: "#fff"
20093
19987
  })), /* @__PURE__ */ jsx("div", {
20094
19988
  className: "nut-uploader__preview__progress__msg",
@@ -20097,14 +19991,17 @@ Please add \`${key}Action\` when creating your handler.`);
20097
19991
  }), item.type.includes("image") ? /* @__PURE__ */ jsx(Fragment, {
20098
19992
  children: item.url && /* @__PURE__ */ jsx("img", {
20099
19993
  className: "nut-uploader__preview-img__c",
19994
+ style: {
19995
+ objectFit: imageFit
19996
+ },
20100
19997
  src: item.url,
20101
19998
  alt: "",
20102
19999
  onClick: () => handleItemClick(item)
20103
20000
  })
20104
20001
  }) : /* @__PURE__ */ jsx(Fragment, {
20105
- children: defaultImg ? /* @__PURE__ */ jsx("img", {
20002
+ children: previewUrl ? /* @__PURE__ */ jsx("img", {
20106
20003
  className: "nut-uploader__preview-img__c",
20107
- src: defaultImg,
20004
+ src: previewUrl,
20108
20005
  alt: "",
20109
20006
  onClick: () => handleItemClick(item)
20110
20007
  }) : /* @__PURE__ */ jsx("div", {
@@ -20121,35 +20018,34 @@ Please add \`${key}Action\` when creating your handler.`);
20121
20018
  className: "tips",
20122
20019
  children: item.name
20123
20020
  }) : null]
20124
- }), listType === "list" && /* @__PURE__ */ jsxs("div", {
20021
+ }), previewType === "list" && /* @__PURE__ */ jsxs("div", {
20125
20022
  className: "nut-uploader__preview-list",
20126
20023
  children: [/* @__PURE__ */ jsxs("div", {
20127
20024
  className: `nut-uploader__preview-img__file__name ${item.status}`,
20128
20025
  onClick: () => handleItemClick(item),
20129
20026
  children: [/* @__PURE__ */ jsx(x$6, {}), " ", item.name]
20130
- }), isDeletable && /* @__PURE__ */ jsx(y$6, {
20027
+ }), deletable && /* @__PURE__ */ jsx(y$6, {
20131
20028
  color: "#808080",
20132
20029
  className: "nut-uploader__preview-img__file__del",
20133
- onClick: () => onDelete(item, index)
20030
+ onClick: () => onDeleteItem(item, index)
20134
20031
  }), item.status === "uploading" && /* @__PURE__ */ jsx(Progress, {
20135
- size: "small",
20136
- percentage: item.percentage,
20137
- strokeColor: "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
20032
+ percent: item.percentage,
20033
+ color: "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)",
20138
20034
  showText: false
20139
20035
  })]
20140
20036
  })]
20141
20037
  }, item.uid);
20142
- }), maximum > fileList.length && listType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
20143
- className: `nut-uploader__upload ${listType} ${disabled ? "nut-uploader__upload-disabled" : ""}`,
20038
+ }), maxCount > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
20039
+ className: `nut-uploader__upload ${previewType} ${disabled ? "nut-uploader__upload-disabled" : ""}`,
20144
20040
  children: [/* @__PURE__ */ jsxs("div", {
20145
20041
  className: "nut-uploader__icon",
20146
20042
  children: [uploadIcon || /* @__PURE__ */ jsx(x$3, {
20147
- width: uploadIconSize,
20148
- height: uploadIconSize,
20043
+ width: "20px",
20044
+ height: "20px",
20149
20045
  color: "#808080"
20150
20046
  }), /* @__PURE__ */ jsx("span", {
20151
20047
  className: "nut-uploader__icon-tip",
20152
- children: uploadIconTip
20048
+ children: uploadLabel
20153
20049
  })]
20154
20050
  }), capture ? /* @__PURE__ */ jsx("input", {
20155
20051
  className: "nut-uploader__input",
@@ -20213,7 +20109,7 @@ Please add \`${key}Action\` when creating your handler.`);
20213
20109
  ...defaultProps$I,
20214
20110
  ...props
20215
20111
  };
20216
- const b2 = cn("actionsheet");
20112
+ const b = cn("actionsheet");
20217
20113
  const isHighlight = (item) => {
20218
20114
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
20219
20115
  };
@@ -20233,20 +20129,20 @@ Please add \`${key}Action\` when creating your handler.`);
20233
20129
  onCancel && onCancel();
20234
20130
  },
20235
20131
  children: /* @__PURE__ */ jsxs("div", {
20236
- className: `${b2()} ${className}`,
20132
+ className: `${b()} ${className}`,
20237
20133
  style,
20238
20134
  ...rest,
20239
20135
  children: [title && /* @__PURE__ */ jsx("div", {
20240
- className: b2("title"),
20136
+ className: b("title"),
20241
20137
  children: title
20242
20138
  }), description && /* @__PURE__ */ jsx("div", {
20243
- className: `${b2("item")} description`,
20139
+ className: `${b("item")} description`,
20244
20140
  children: description
20245
20141
  }), menuItems.length ? /* @__PURE__ */ jsx("div", {
20246
- className: b2("menu"),
20142
+ className: b("menu"),
20247
20143
  children: menuItems.map((item, index) => {
20248
20144
  return /* @__PURE__ */ jsxs("div", {
20249
- className: `${b2("item")} ${item.disable ? b2("item-disabled") : ""}`,
20145
+ className: `${b("item")} ${item.disable ? b("item-disabled") : ""}`,
20250
20146
  style: {
20251
20147
  color: isHighlight(item)
20252
20148
  },
@@ -20258,7 +20154,7 @@ Please add \`${key}Action\` when creating your handler.`);
20258
20154
  }, index);
20259
20155
  })
20260
20156
  }) : children, cancelText && /* @__PURE__ */ jsx("div", {
20261
- className: b2("cancel"),
20157
+ className: b("cancel"),
20262
20158
  onClick: () => cancelActionSheet(),
20263
20159
  children: cancelText
20264
20160
  })]
@@ -20712,6 +20608,7 @@ Please add \`${key}Action\` when creating your handler.`);
20712
20608
  Dialog.defaultProps = defaultProps$G;
20713
20609
  Dialog.displayName = "NutDialog";
20714
20610
  const defaultProps$F = {
20611
+ ...ComponentDefaults,
20715
20612
  attract: false,
20716
20613
  direction: void 0,
20717
20614
  boundary: {
@@ -20719,8 +20616,7 @@ Please add \`${key}Action\` when creating your handler.`);
20719
20616
  left: 0,
20720
20617
  right: 0,
20721
20618
  bottom: 0
20722
- },
20723
- className: ""
20619
+ }
20724
20620
  };
20725
20621
  const Drag = (props) => {
20726
20622
  const {
@@ -20735,7 +20631,7 @@ Please add \`${key}Action\` when creating your handler.`);
20735
20631
  ...defaultProps$F,
20736
20632
  ...props
20737
20633
  };
20738
- const b2 = cn("drag");
20634
+ const classPrefix2 = "nut-drag";
20739
20635
  const [boundaryState, setBoundaryState] = React.useState(boundary);
20740
20636
  const myDrag = React.useRef(null);
20741
20637
  const [currstyle, api] = useSpring(() => ({
@@ -20808,7 +20704,7 @@ Please add \`${key}Action\` when creating your handler.`);
20808
20704
  }, [myDrag]);
20809
20705
  return /* @__PURE__ */ jsx("div", {
20810
20706
  style,
20811
- className: `${b2()} ${className}`,
20707
+ className: `${classPrefix2} ${className}`,
20812
20708
  ...reset,
20813
20709
  ref: myDrag,
20814
20710
  children: /* @__PURE__ */ jsx(animated.div, {
@@ -20869,8 +20765,8 @@ Please add \`${key}Action\` when creating your handler.`);
20869
20765
  const refreshMaxH = React.useRef(0);
20870
20766
  const y2 = React.useRef(0);
20871
20767
  const distance = React.useRef(0);
20872
- const b2 = cn("infiniteloading");
20873
- const classes = classNames(className, b2());
20768
+ const b = cn("infiniteloading");
20769
+ const classes = classNames(className, b());
20874
20770
  React.useEffect(() => {
20875
20771
  const parentElement = getParentElement(scroller.current);
20876
20772
  scrollEl.current = useWindow ? window : parentElement;
@@ -21677,12 +21573,12 @@ Please add \`${key}Action\` when creating your handler.`);
21677
21573
  ...props
21678
21574
  };
21679
21575
  const [value, setValue] = React.useState(false);
21680
- const b2 = cn("switch");
21576
+ const b = cn("switch");
21681
21577
  React.useEffect(() => {
21682
21578
  setValue(checked);
21683
21579
  }, [checked]);
21684
21580
  const classes = () => {
21685
- return `${b2()} ${value ? "switch-open" : "switch-close"} ${disable ? `${b2()}-disable` : ""} ${`${b2()}-base`} ${className}`;
21581
+ return `${b()} ${value ? "switch-open" : "switch-close"} ${disable ? `${b()}-disable` : ""} ${`${b()}-base`} ${className}`;
21686
21582
  };
21687
21583
  const styles = () => {
21688
21584
  const myStyle = {
@@ -21709,10 +21605,10 @@ Please add \`${key}Action\` when creating your handler.`);
21709
21605
  className: "close-line"
21710
21606
  }), activeText && /* @__PURE__ */ jsx(Fragment, {
21711
21607
  children: value ? /* @__PURE__ */ jsx("div", {
21712
- className: `${b2("label")} open`,
21608
+ className: `${b("label")} open`,
21713
21609
  children: activeText
21714
21610
  }) : /* @__PURE__ */ jsx("div", {
21715
- className: `${b2("label")} close`,
21611
+ className: `${b("label")} close`,
21716
21612
  children: inactiveText
21717
21613
  })
21718
21614
  })]
@@ -21722,12 +21618,14 @@ Please add \`${key}Action\` when creating your handler.`);
21722
21618
  Switch.defaultProps = defaultProps$B;
21723
21619
  Switch.displayName = "NutSwitch";
21724
21620
  const defaultProps$A = {
21621
+ ...ComponentDefaults,
21725
21622
  type: "shake",
21726
21623
  action: "initial",
21727
21624
  loop: false,
21728
21625
  onClick: (event) => {
21729
21626
  }
21730
21627
  };
21628
+ const classPrefix = `nut-animate`;
21731
21629
  const Animate = (props) => {
21732
21630
  const {
21733
21631
  className,
@@ -21742,10 +21640,9 @@ Please add \`${key}Action\` when creating your handler.`);
21742
21640
  ...props
21743
21641
  };
21744
21642
  const [clicked, setClicked] = React.useState(false);
21745
- const b2 = cn("animate");
21746
21643
  const classes = classNames({
21747
21644
  "nut-ani-container": true,
21748
- [`${b2("")}-${type2}`]: action === "initial" || clicked ? type2 : false,
21645
+ [`${classPrefix}-${type2}`]: action === "initial" || clicked ? type2 : false,
21749
21646
  loop: loop2
21750
21647
  });
21751
21648
  const cls = classNames(classes, className);
@@ -21791,7 +21688,7 @@ Please add \`${key}Action\` when creating your handler.`);
21791
21688
  ...defaultProps$z,
21792
21689
  ...props
21793
21690
  };
21794
- const b2 = cn("countup");
21691
+ const b = cn("countup");
21795
21692
  const countupRef = React.useRef(null);
21796
21693
  const timerRef = React.useRef(0);
21797
21694
  const numbers = Array.from({
@@ -21831,17 +21728,17 @@ Please add \`${key}Action\` when creating your handler.`);
21831
21728
  };
21832
21729
  }, [numerArr]);
21833
21730
  return /* @__PURE__ */ jsx("div", {
21834
- className: `${b2()} ${className}`,
21731
+ className: `${b()} ${className}`,
21835
21732
  ref: countupRef,
21836
21733
  children: /* @__PURE__ */ jsx("ul", {
21837
- className: b2("list"),
21734
+ className: b("list"),
21838
21735
  children: numerArr.map((item, idx) => {
21839
21736
  return /* @__PURE__ */ jsx("li", {
21840
- className: `${b2("listitem", {
21737
+ className: `${b("listitem", {
21841
21738
  number: !Number.isNaN(Number(item))
21842
21739
  })}`,
21843
21740
  children: !Number.isNaN(Number(item)) ? /* @__PURE__ */ jsx("span", {
21844
- className: b2("number"),
21741
+ className: b("number"),
21845
21742
  style: numberEaseStyle,
21846
21743
  children: [...numbers, ...numbers].map((number2, subidx) => {
21847
21744
  return /* @__PURE__ */ jsx("span", {
@@ -21849,7 +21746,7 @@ Please add \`${key}Action\` when creating your handler.`);
21849
21746
  }, subidx);
21850
21747
  })
21851
21748
  }) : /* @__PURE__ */ jsx("span", {
21852
- className: b2("separator"),
21749
+ className: b("separator"),
21853
21750
  children: item
21854
21751
  })
21855
21752
  }, idx);
@@ -21877,15 +21774,13 @@ Please add \`${key}Action\` when creating your handler.`);
21877
21774
  AnimatingNumbers.CountUp = CountUp;
21878
21775
  const defaultProps$x = {
21879
21776
  ...ComponentDefaults,
21880
- className: "",
21881
- url: "",
21882
- style: {},
21777
+ src: "",
21883
21778
  muted: false,
21884
21779
  autoplay: false,
21885
21780
  loop: false,
21886
21781
  preload: "auto",
21887
21782
  type: "progress",
21888
- onFastBack: (e) => {
21783
+ onBack: (e) => {
21889
21784
  },
21890
21785
  // type 为 progress时生效
21891
21786
  onForward: (e) => {
@@ -21893,7 +21788,7 @@ Please add \`${key}Action\` when creating your handler.`);
21893
21788
  // type 为 progress时生效
21894
21789
  onPause: (e) => {
21895
21790
  },
21896
- onPlayEnd: (e) => {
21791
+ onEnd: (e) => {
21897
21792
  },
21898
21793
  onMute: (e) => {
21899
21794
  },
@@ -21906,17 +21801,17 @@ Please add \`${key}Action\` when creating your handler.`);
21906
21801
  } = useConfig();
21907
21802
  const {
21908
21803
  className,
21909
- url,
21804
+ src,
21910
21805
  style,
21911
21806
  muted,
21912
21807
  autoplay,
21913
21808
  loop: loop2,
21914
21809
  preload,
21915
21810
  type: type2,
21916
- onFastBack,
21811
+ onBack,
21917
21812
  onForward,
21918
21813
  onPause,
21919
- onPlayEnd,
21814
+ onEnd,
21920
21815
  onMute,
21921
21816
  onCanPlay,
21922
21817
  children,
@@ -21940,13 +21835,13 @@ Please add \`${key}Action\` when creating your handler.`);
21940
21835
  playing: props.autoplay,
21941
21836
  handPlaying: false
21942
21837
  });
21943
- const b2 = cn("audio");
21838
+ const classPrefix2 = "nut-audio";
21944
21839
  const warn = console.warn;
21945
21840
  const handleEnded = (e) => {
21946
21841
  if (props.loop) {
21947
21842
  warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
21948
21843
  } else {
21949
- props.onPlayEnd && props.onPlayEnd(e);
21844
+ props.onEnd && props.onEnd(e);
21950
21845
  }
21951
21846
  };
21952
21847
  function watch() {
@@ -21971,15 +21866,13 @@ Please add \`${key}Action\` when creating your handler.`);
21971
21866
  }
21972
21867
  };
21973
21868
  const renderIcon = () => {
21974
- return /* @__PURE__ */ jsx(Fragment, {
21869
+ return /* @__PURE__ */ jsx("div", {
21870
+ className: `${classPrefix2}__icon`,
21975
21871
  children: /* @__PURE__ */ jsx("div", {
21976
- className: b2("icon"),
21977
- children: /* @__PURE__ */ jsx("div", {
21978
- className: `${b2("icon-box")} ${playing ? b2("icon-play") : b2("icon-stop")}`,
21979
- onClick: handleStatusChange,
21980
- children: /* @__PURE__ */ jsx(k, {
21981
- className: playing ? "nut-icon-loading" : ""
21982
- })
21872
+ className: classNames(`${classPrefix2}__icon-box`, playing ? `${classPrefix2}__icon-play` : `${classPrefix2}__icon-stop`),
21873
+ onClick: handleStatusChange,
21874
+ children: /* @__PURE__ */ jsx(k, {
21875
+ className: playing ? "nut-icon-loading" : ""
21983
21876
  })
21984
21877
  })
21985
21878
  });
@@ -21988,7 +21881,7 @@ Please add \`${key}Action\` when creating your handler.`);
21988
21881
  if (statusRef.current.currentTime > 0 && AudioRef.current) {
21989
21882
  statusRef.current.currentTime--;
21990
21883
  AudioRef.current.currentTime = statusRef.current.currentTime;
21991
- props.onFastBack && props.onFastBack(AudioRef.current);
21884
+ props.onBack && props.onBack(AudioRef.current);
21992
21885
  }
21993
21886
  };
21994
21887
  const handleForward = () => {
@@ -22025,12 +21918,12 @@ Please add \`${key}Action\` when creating your handler.`);
22025
21918
  const renderProgerss = () => {
22026
21919
  return /* @__PURE__ */ jsxs(Fragment, {
22027
21920
  children: [/* @__PURE__ */ jsxs("div", {
22028
- className: b2("progress"),
21921
+ className: `${classPrefix2}__progress`,
22029
21922
  children: [/* @__PURE__ */ jsx("div", {
22030
21923
  className: "time",
22031
21924
  children: currentDuration
22032
21925
  }), /* @__PURE__ */ jsx("div", {
22033
- className: b2("progress-bar-wrapper"),
21926
+ className: `${classPrefix2}__progress-bar-wrapper`,
22034
21927
  children: /* @__PURE__ */ jsx(Range, {
22035
21928
  modelValue: percent,
22036
21929
  hiddenTag: true,
@@ -22072,7 +21965,7 @@ Please add \`${key}Action\` when creating your handler.`);
22072
21965
  };
22073
21966
  const renderNone = () => {
22074
21967
  return /* @__PURE__ */ jsx("div", {
22075
- className: b2("none-container"),
21968
+ className: `${classPrefix2}__none-container`,
22076
21969
  onClick: handleStatusChange,
22077
21970
  children
22078
21971
  });
@@ -22108,14 +22001,14 @@ Please add \`${key}Action\` when creating your handler.`);
22108
22001
  statusRef.current.currentTime = time;
22109
22002
  };
22110
22003
  return /* @__PURE__ */ jsxs("div", {
22111
- className: `${b2()} ${className}`,
22004
+ className: classNames(classPrefix2, className),
22112
22005
  style,
22113
22006
  ...rest,
22114
22007
  children: [renderAudio(), /* @__PURE__ */ jsx("audio", {
22115
22008
  className: "audioMain",
22116
22009
  controls: type2 === "controls",
22117
22010
  ref: AudioRef,
22118
- src: url,
22011
+ src,
22119
22012
  muted,
22120
22013
  preload,
22121
22014
  loop: loop2,
@@ -22169,12 +22062,12 @@ Please add \`${key}Action\` when creating your handler.`);
22169
22062
  const [avatarIndex, setAvatarIndex] = React.useState(1);
22170
22063
  const avatarRef = React.useRef(null);
22171
22064
  const parent = React.useContext(AvatarContext);
22172
- const b2 = cn("avatar");
22065
+ const b = cn("avatar");
22173
22066
  const classes = classNames({
22174
22067
  [`nut-avatar-${size || ((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || "normal"}`]: true,
22175
22068
  [`nut-avatar-${shape || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || "round"}`]: true
22176
22069
  });
22177
- const cls = classNames(b2(""), classes, className);
22070
+ const cls = classNames(b(""), classes, className);
22178
22071
  const sizeValue = ["large", "normal", "small"];
22179
22072
  const styles = {
22180
22073
  width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
@@ -22271,8 +22164,8 @@ Please add \`${key}Action\` when creating your handler.`);
22271
22164
  children
22272
22165
  } = propAvatarGroup;
22273
22166
  const avatarGroupRef = React.useRef(null);
22274
- const b2 = cn("avatar-group");
22275
- const cls = classNames(b2(""), className);
22167
+ const b = cn("avatar-group");
22168
+ const cls = classNames(b(""), className);
22276
22169
  const parentAvatar = {
22277
22170
  propAvatarGroup,
22278
22171
  avatarGroupRef
@@ -22291,41 +22184,36 @@ Please add \`${key}Action\` when creating your handler.`);
22291
22184
  AvatarGroup.displayName = "NutAvatarGroup";
22292
22185
  const defaultProps$u = {
22293
22186
  ...ComponentDefaults,
22294
- className: "",
22295
22187
  value: "",
22296
22188
  dot: false,
22297
- max: 1e4,
22189
+ max: 99,
22298
22190
  top: "0",
22299
- right: "0",
22300
- zIndex: "0",
22301
- color: "",
22302
- icon: null
22191
+ right: "5",
22192
+ color: ""
22303
22193
  };
22304
- const b = cn("badge");
22305
22194
  const Badge = (props) => {
22306
22195
  const {
22307
22196
  className,
22308
22197
  style,
22198
+ value,
22199
+ max,
22309
22200
  children,
22310
22201
  dot,
22311
22202
  top,
22312
22203
  right,
22313
- zIndex,
22314
- color,
22315
- icon
22204
+ color
22316
22205
  } = {
22317
22206
  ...defaultProps$u,
22318
22207
  ...props
22319
22208
  };
22209
+ const classPrefix2 = "nut-badge";
22210
+ const classes = classNames(classPrefix2, className);
22211
+ const contentClasses = classNames({
22212
+ [`${classPrefix2}__dot`]: dot
22213
+ }, `${classPrefix2}__content`, `${classPrefix2}__sup`);
22320
22214
  function content() {
22321
- if (dot)
22322
- return void 0;
22323
- const {
22324
- value
22325
- } = props;
22326
- const {
22327
- max
22328
- } = props;
22215
+ if (dot || typeof value === "object")
22216
+ return null;
22329
22217
  if (typeof value === "number" && typeof max === "number") {
22330
22218
  return max < value ? `${max}+` : value;
22331
22219
  }
@@ -22335,22 +22223,19 @@ Please add \`${key}Action\` when creating your handler.`);
22335
22223
  const style2 = {};
22336
22224
  style2.top = `${Number(top) || parseFloat(top) || 0}px`;
22337
22225
  style2.right = `${Number(right) || parseFloat(right) || 0}px`;
22338
- style2.zIndex = zIndex;
22339
22226
  style2.background = color;
22340
22227
  return style2;
22341
22228
  };
22342
22229
  return /* @__PURE__ */ jsxs("div", {
22343
- className: classNames(b(), className),
22230
+ className: classes,
22344
22231
  style,
22345
- children: [icon && /* @__PURE__ */ jsx("div", {
22346
- className: "slot-icon",
22347
- children: icon
22232
+ children: [typeof value === "object" && value && /* @__PURE__ */ jsx("div", {
22233
+ className: `${classPrefix2}__icon`,
22234
+ children: value
22348
22235
  }), /* @__PURE__ */ jsx("div", {
22349
22236
  children
22350
22237
  }), /* @__PURE__ */ jsx("div", {
22351
- className: classNames({
22352
- "is-dot": dot
22353
- }, b("content"), "sup"),
22238
+ className: contentClasses,
22354
22239
  style: getStyle(),
22355
22240
  children: content()
22356
22241
  })]
@@ -22384,8 +22269,8 @@ Please add \`${key}Action\` when creating your handler.`);
22384
22269
  ...defaultProps$t,
22385
22270
  ...props
22386
22271
  };
22387
- const b2 = cn("circleprogress");
22388
- const classes = classNames(className, b2(""));
22272
+ const b = cn("circleprogress");
22273
+ const classes = classNames(className, b(""));
22389
22274
  const refRandomId = Math.random().toString(36).slice(-8);
22390
22275
  const styles = {
22391
22276
  height: `${Number(radius) * 2}px`,
@@ -22415,7 +22300,7 @@ Please add \`${key}Action\` when creating your handler.`);
22415
22300
  return;
22416
22301
  }
22417
22302
  const color = circleColor;
22418
- const colorArr = Object.keys(color).sort((a2, b22) => parseFloat(a2) - parseFloat(b22));
22303
+ const colorArr = Object.keys(color).sort((a2, b2) => parseFloat(a2) - parseFloat(b2));
22419
22304
  const stopArr = [];
22420
22305
  colorArr.map((item) => {
22421
22306
  const obj = {
@@ -22685,7 +22570,7 @@ Please add \`${key}Action\` when creating your handler.`);
22685
22570
  ...defaultProps$q,
22686
22571
  ...props
22687
22572
  };
22688
- const b2 = cn("countdown");
22573
+ const b = cn("countdown");
22689
22574
  const [restTimeStamp, setRestTime] = React.useState(0);
22690
22575
  const stateRef = React.useRef({
22691
22576
  pauseTime: 0,
@@ -22879,13 +22764,13 @@ Please add \`${key}Action\` when creating your handler.`);
22879
22764
  return formatRemainTime(stateRef.current.restTime);
22880
22765
  })();
22881
22766
  return /* @__PURE__ */ jsx("div", {
22882
- className: `${b2()} ${className || ""}`,
22767
+ className: `${b()} ${className || ""}`,
22883
22768
  style: {
22884
22769
  ...style
22885
22770
  },
22886
22771
  ...rest,
22887
22772
  children: children || /* @__PURE__ */ jsx("div", {
22888
- className: b2("block"),
22773
+ className: b("block"),
22889
22774
  dangerouslySetInnerHTML: {
22890
22775
  __html: `${renderTime}`
22891
22776
  }
@@ -23095,7 +22980,7 @@ Please add \`${key}Action\` when creating your handler.`);
23095
22980
  ...props
23096
22981
  };
23097
22982
  const [imgStyle, setImgStyle] = React.useState({});
23098
- const b2 = cn("empty");
22983
+ const b = cn("empty");
23099
22984
  let imageNode = image;
23100
22985
  if (typeof image === "string") {
23101
22986
  const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
@@ -23124,15 +23009,15 @@ Please add \`${key}Action\` when creating your handler.`);
23124
23009
  });
23125
23010
  }, [imageSize]);
23126
23011
  return /* @__PURE__ */ jsx("div", {
23127
- className: `${b2()} ${className}`,
23012
+ className: `${b()} ${className}`,
23128
23013
  ...rest,
23129
23014
  children: /* @__PURE__ */ jsxs(Fragment, {
23130
23015
  children: [/* @__PURE__ */ jsx("div", {
23131
- className: b2("image"),
23016
+ className: b("image"),
23132
23017
  style: imgStyle,
23133
23018
  children: imageNode
23134
23019
  }), typeof description === "string" ? /* @__PURE__ */ jsx("div", {
23135
- className: b2("description"),
23020
+ className: b("description"),
23136
23021
  children: description || locale.noData
23137
23022
  }) : {
23138
23023
  description
@@ -23175,8 +23060,8 @@ Please add \`${key}Action\` when creating your handler.`);
23175
23060
  ...props
23176
23061
  };
23177
23062
  const rootRef = React.useRef(null);
23178
- const b2 = cn("video");
23179
- const classes = classNames(className, b2(""));
23063
+ const b = cn("video");
23064
+ const classes = classNames(className, b(""));
23180
23065
  React.useEffect(() => {
23181
23066
  init();
23182
23067
  }, []);
@@ -23494,11 +23379,11 @@ Please add \`${key}Action\` when creating your handler.`);
23494
23379
  touch.stateDirection = getDirection2(touch.offsetX, touch.offsetY);
23495
23380
  }
23496
23381
  };
23497
- const b2 = cn("swiper");
23498
- const classes = classNames(b2(""));
23382
+ const b = cn("swiper");
23383
+ const classes = classNames(b(""));
23499
23384
  const contentClass = classNames({
23500
- [`${b2("inner")}`]: true,
23501
- [`${b2("vertical")}`]: isVertical
23385
+ [`${b("inner")}`]: true,
23386
+ [`${b("vertical")}`]: isVertical
23502
23387
  });
23503
23388
  const getStyle = (moveOffset = offset) => {
23504
23389
  const target = innerRef.current;
@@ -23657,15 +23542,15 @@ Please add \`${key}Action\` when creating your handler.`);
23657
23542
  ref: innerRef,
23658
23543
  children: React.Children.map(childs, (child, index) => {
23659
23544
  return /* @__PURE__ */ jsx("div", {
23660
- className: b2("item-wrapper"),
23545
+ className: b("item-wrapper"),
23661
23546
  style: itemStyle(index),
23662
23547
  children: child
23663
23548
  }, index);
23664
23549
  })
23665
23550
  }), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ jsx("div", {
23666
23551
  className: classNames({
23667
- [`${b2("pagination")}`]: true,
23668
- [`${b2("pagination-vertical")}`]: isVertical
23552
+ [`${b("pagination")}`]: true,
23553
+ [`${b("pagination-vertical")}`]: isVertical
23669
23554
  }),
23670
23555
  children: React.Children.map(childs, (item, index) => {
23671
23556
  return /* @__PURE__ */ jsx("i", {
@@ -23703,8 +23588,8 @@ Please add \`${key}Action\` when creating your handler.`);
23703
23588
  size
23704
23589
  } = _props;
23705
23590
  const parent = React.useContext(DataContext$1);
23706
- const b2 = cn("swiper-item");
23707
- const classes = classNames(b2(""), className);
23591
+ const b = cn("swiper-item");
23592
+ const classes = classNames(b(""), className);
23708
23593
  const getStyle = () => {
23709
23594
  const style2 = {};
23710
23595
  const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
@@ -23869,7 +23754,7 @@ Please add \`${key}Action\` when creating your handler.`);
23869
23754
  };
23870
23755
  return /* @__PURE__ */ jsxs(Popup, {
23871
23756
  visible: showPop,
23872
- popClass: "custom-pop",
23757
+ className: "custom-pop",
23873
23758
  style: {
23874
23759
  width: "100%"
23875
23760
  },
@@ -24278,7 +24163,7 @@ Please add \`${key}Action\` when creating your handler.`);
24278
24163
  });
24279
24164
  }
24280
24165
  };
24281
- const b2 = cn("noticebar");
24166
+ const b = cn("noticebar");
24282
24167
  const noticebarClass = classNames({
24283
24168
  "nut-noticebar-page": true,
24284
24169
  withicon: closeMode,
@@ -24291,7 +24176,7 @@ Please add \`${key}Action\` when creating your handler.`);
24291
24176
  };
24292
24177
  }, []);
24293
24178
  return /* @__PURE__ */ jsxs("div", {
24294
- className: `${b2()} ${className || ""}`,
24179
+ className: `${b()} ${className || ""}`,
24295
24180
  style,
24296
24181
  children: [showNoticeBar && direction === "across" ? /* @__PURE__ */ jsxs("div", {
24297
24182
  className: noticebarClass,
@@ -24581,7 +24466,7 @@ Please add \`${key}Action\` when creating your handler.`);
24581
24466
  ...defaultProps$h,
24582
24467
  ...props
24583
24468
  };
24584
- const b2 = cn("price");
24469
+ const b = cn("price");
24585
24470
  const showSymbol = () => {
24586
24471
  return {
24587
24472
  __html: needSymbol ? symbol : ""
@@ -24621,21 +24506,21 @@ Please add \`${key}Action\` when creating your handler.`);
24621
24506
  };
24622
24507
  const renderSymbol = () => {
24623
24508
  return /* @__PURE__ */ jsx("div", {
24624
- className: `${b2("symbol")} ${b2(`symbol-${size}`)}`,
24509
+ className: `${b("symbol")} ${b(`symbol-${size}`)}`,
24625
24510
  dangerouslySetInnerHTML: showSymbol()
24626
24511
  });
24627
24512
  };
24628
24513
  return /* @__PURE__ */ jsxs("div", {
24629
- className: `${b2()} ${className}`,
24514
+ className: `${b()} ${className}`,
24630
24515
  ...rest,
24631
24516
  children: [needSymbol && position === "before" ? renderSymbol() : null, /* @__PURE__ */ jsx("div", {
24632
- className: `${b2("integer")} ${b2(`integer-${size}`)}`,
24517
+ className: `${b("integer")} ${b(`integer-${size}`)}`,
24633
24518
  children: formatThousands(price)
24634
24519
  }), decimalDigits !== 0 ? /* @__PURE__ */ jsx("div", {
24635
- className: `${b2("decimal")} ${b2(`decimal-${size}`)}`,
24520
+ className: `${b("decimal")} ${b(`decimal-${size}`)}`,
24636
24521
  children: "."
24637
24522
  }) : null, /* @__PURE__ */ jsx("div", {
24638
- className: `${b2("decimal")} ${b2(`decimal-${size}`)}`,
24523
+ className: `${b("decimal")} ${b(`decimal-${size}`)}`,
24639
24524
  children: formatDecimal(price)
24640
24525
  }), needSymbol && position === "after" ? renderSymbol() : null]
24641
24526
  });
@@ -24673,8 +24558,8 @@ Please add \`${key}Action\` when creating your handler.`);
24673
24558
  ...defaultProps$g,
24674
24559
  ...props
24675
24560
  };
24676
- const b2 = cn("skeleton");
24677
- const classes = classNames(className, b2());
24561
+ const b = cn("skeleton");
24562
+ const classes = classNames(className, b());
24678
24563
  const blockClass = classNames({
24679
24564
  blockClass: true,
24680
24565
  "blockClass--round": round
@@ -24776,10 +24661,10 @@ Please add \`${key}Action\` when creating your handler.`);
24776
24661
  ((_a2 = parent.propSteps) == null ? void 0 : _a2.onClickStep) && ((_b = parent.propSteps) == null ? void 0 : _b.onClickStep(activeIndex));
24777
24662
  ((_c = parent.propSteps) == null ? void 0 : _c.clickStep) && ((_d = parent.propSteps) == null ? void 0 : _d.clickStep(activeIndex));
24778
24663
  };
24779
- const b2 = cn("step");
24664
+ const b = cn("step");
24780
24665
  const classes = classNames({
24781
- [`${b2("")}-${getCurrentStatus()}`]: true
24782
- }, className, b2(""));
24666
+ [`${b("")}-${getCurrentStatus()}`]: true
24667
+ }, className, b(""));
24783
24668
  const renderIconClass = () => {
24784
24669
  if (!dot && icon) {
24785
24670
  return "nut-step-icon is-icon";
@@ -24844,11 +24729,11 @@ Please add \`${key}Action\` when creating your handler.`);
24844
24729
  const parentSteps = {
24845
24730
  propSteps
24846
24731
  };
24847
- const b2 = cn("steps");
24732
+ const b = cn("steps");
24848
24733
  const classes = classNames({
24849
- [`${b2("")}-${direction}`]: true,
24850
- [`${b2("")}-dot`]: !!props.progressDot
24851
- }, className, b2(""));
24734
+ [`${b("")}-${direction}`]: true,
24735
+ [`${b("")}-dot`]: !!props.progressDot
24736
+ }, className, b(""));
24852
24737
  return /* @__PURE__ */ jsx(DataContext.Provider, {
24853
24738
  value: parentSteps,
24854
24739
  children: React.createElement("div", {
@@ -24900,9 +24785,9 @@ Please add \`${key}Action\` when creating your handler.`);
24900
24785
  setCurData(data);
24901
24786
  }
24902
24787
  }, [data]);
24903
- const b2 = cn("table");
24788
+ const b = cn("table");
24904
24789
  const classes = classNames({});
24905
- const cls = classNames(b2(), classes, className);
24790
+ const cls = classNames(b(), classes, className);
24906
24791
  const handleSorterClick = (item) => {
24907
24792
  if (item.sorter) {
24908
24793
  onSorter && onSorter(item, curData);
@@ -25144,7 +25029,7 @@ Please add \`${key}Action\` when creating your handler.`);
25144
25029
  ...defaultProps$b,
25145
25030
  ...props
25146
25031
  };
25147
- const b2 = cn("trendarrow");
25032
+ const b = cn("trendarrow");
25148
25033
  const handleClick2 = () => {
25149
25034
  };
25150
25035
  const rateTrend = React.useRef(rate > 0);
@@ -25183,13 +25068,13 @@ Please add \`${key}Action\` when creating your handler.`);
25183
25068
  const renderContent = (arrowLeft2) => {
25184
25069
  const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
25185
25070
  return /* @__PURE__ */ jsx("span", {
25186
- className: `${b2(classNameSuffix)} ${b2("rate")}`,
25071
+ className: `${b(classNameSuffix)} ${b("rate")}`,
25187
25072
  style: calcStyle,
25188
25073
  children: calcRate
25189
25074
  });
25190
25075
  };
25191
25076
  return /* @__PURE__ */ jsxs("div", {
25192
- className: `${b2()} ${className}`,
25077
+ className: `${b()} ${className}`,
25193
25078
  ...rest,
25194
25079
  onClick: handleClick2,
25195
25080
  children: [!arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ jsx(Fragment, {
@@ -25532,10 +25417,10 @@ Please add \`${key}Action\` when creating your handler.`);
25532
25417
  ...props
25533
25418
  };
25534
25419
  const [base64Url, setBase64Url] = React.useState("");
25535
- const b2 = cn("watermark");
25420
+ const b = cn("watermark");
25536
25421
  const classes = classNames({
25537
- [`${b2("")}`]: true,
25538
- [`${b2("")}-full-page`]: fullPage
25422
+ [`${b("")}`]: true,
25423
+ [`${b("")}-full-page`]: fullPage
25539
25424
  });
25540
25425
  const cls = classNames(classes, className);
25541
25426
  React.useEffect(() => {
@@ -25620,7 +25505,7 @@ Please add \`${key}Action\` when creating your handler.`);
25620
25505
  ...defaultProps$8,
25621
25506
  ...props
25622
25507
  };
25623
- const b2 = cn("address");
25508
+ const b = cn("address");
25624
25509
  const selectedExist = (item) => {
25625
25510
  const copyExistAdd = existAddress;
25626
25511
  let prevExistAdd = {
@@ -25648,18 +25533,18 @@ Please add \`${key}Action\` when creating your handler.`);
25648
25533
  React.useEffect(() => {
25649
25534
  }, [existAddress]);
25650
25535
  return /* @__PURE__ */ jsxs("div", {
25651
- className: b2("exist"),
25536
+ className: b("exist"),
25652
25537
  children: [/* @__PURE__ */ jsx("div", {
25653
- className: b2("exist-group"),
25538
+ className: b("exist-group"),
25654
25539
  children: /* @__PURE__ */ jsx("ul", {
25655
- className: b2("exist-ul"),
25540
+ className: b("exist-ul"),
25656
25541
  children: existAddress.map((item, index) => {
25657
25542
  return /* @__PURE__ */ jsx("li", {
25658
- className: b2("exist-item"),
25543
+ className: b("exist-item"),
25659
25544
  children: /* @__PURE__ */ jsxs("div", {
25660
25545
  onClick: () => selectedExist(item),
25661
25546
  children: [item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ jsxs("div", {
25662
- className: b2("exist-item-info"),
25547
+ className: b("exist-item-info"),
25663
25548
  children: [item.name && item.phone && /* @__PURE__ */ jsxs("div", {
25664
25549
  className: "exist-item-info-top",
25665
25550
  children: [/* @__PURE__ */ jsx("div", {
@@ -25681,10 +25566,10 @@ Please add \`${key}Action\` when creating your handler.`);
25681
25566
  })
25682
25567
  })
25683
25568
  }), isShowCustomAddress && /* @__PURE__ */ jsx("div", {
25684
- className: b2("choose-other"),
25569
+ className: b("choose-other"),
25685
25570
  onClick: onSwitch,
25686
25571
  children: /* @__PURE__ */ jsx("div", {
25687
- className: b2("choose-other-btn"),
25572
+ className: b("choose-other-btn"),
25688
25573
  children: customAndExistTitle || locale.address.chooseAnotherAddress
25689
25574
  })
25690
25575
  })]
@@ -25720,7 +25605,7 @@ Please add \`${key}Action\` when creating your handler.`);
25720
25605
  ...defaultProps$7,
25721
25606
  ...props
25722
25607
  };
25723
- const b2 = cn("address");
25608
+ const b = cn("address");
25724
25609
  const [privateType] = React.useState(type2);
25725
25610
  const [tabIndex, setTabIndex] = React.useState(0);
25726
25611
  const [tabName] = React.useState(["province", "city", "country", "town"]);
@@ -25743,8 +25628,8 @@ Please add \`${key}Action\` when creating your handler.`);
25743
25628
  }
25744
25629
  });
25745
25630
  const newData = [];
25746
- data = data.sort((a2, b22) => {
25747
- return a2.title.localeCompare(b22.title);
25631
+ data = data.sort((a2, b2) => {
25632
+ return a2.title.localeCompare(b2.title);
25748
25633
  });
25749
25634
  data.forEach((item) => {
25750
25635
  const index = newData.findIndex((value) => value.title === item.title);
@@ -25939,12 +25824,12 @@ Please add \`${key}Action\` when creating your handler.`);
25939
25824
  initCustomSelected();
25940
25825
  }, [modelValue]);
25941
25826
  return /* @__PURE__ */ jsxs("div", {
25942
- className: b2("custom"),
25827
+ className: b("custom"),
25943
25828
  children: [/* @__PURE__ */ jsxs("div", {
25944
- className: b2("region-tab"),
25829
+ className: b("region-tab"),
25945
25830
  children: [selectedRegion && Object.keys(selectedRegion).map((key, index) => {
25946
25831
  return /* @__PURE__ */ jsx("div", {
25947
- className: `${b2("tab-item")} ${index === tabIndex ? "active" : ""}`,
25832
+ className: `${b("tab-item")} ${index === tabIndex ? "active" : ""}`,
25948
25833
  ref: mapRef[key],
25949
25834
  onClick: () => changeRegionTab(selectedRegion[key], index, key),
25950
25835
  children: index <= tabIndex && /* @__PURE__ */ jsx("div", {
@@ -25952,25 +25837,25 @@ Please add \`${key}Action\` when creating your handler.`);
25952
25837
  })
25953
25838
  }, index);
25954
25839
  }), /* @__PURE__ */ jsx("div", {
25955
- className: b2("tab-line"),
25840
+ className: b("tab-line"),
25956
25841
  ref: regionLine,
25957
25842
  style: {
25958
25843
  left: `${lineDistance}px`
25959
25844
  }
25960
25845
  })]
25961
25846
  }), privateType === "custom" && /* @__PURE__ */ jsx("div", {
25962
- className: b2("region-con"),
25847
+ className: b("region-con"),
25963
25848
  children: /* @__PURE__ */ jsx("ul", {
25964
- className: b2("region-group"),
25849
+ className: b("region-group"),
25965
25850
  children: regionList[tabName[tabIndex]].map((item, index) => {
25966
25851
  return /* @__PURE__ */ jsx("li", {
25967
- className: b2("region-item"),
25852
+ className: b("region-item"),
25968
25853
  children: /* @__PURE__ */ jsxs("div", {
25969
25854
  onClick: () => {
25970
25855
  nextAreaList(item);
25971
25856
  },
25972
25857
  children: [selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ jsx(x$e, {
25973
- className: b2("region-item--icon"),
25858
+ className: b("region-item--icon"),
25974
25859
  color: "var(--nutui-brand-color)",
25975
25860
  width: 13,
25976
25861
  height: 13
@@ -25980,10 +25865,10 @@ Please add \`${key}Action\` when creating your handler.`);
25980
25865
  })
25981
25866
  })
25982
25867
  }), privateType === "custom2" && /* @__PURE__ */ jsx("div", {
25983
- className: b2("elevator-group"),
25868
+ className: b("elevator-group"),
25984
25869
  children: /* @__PURE__ */ jsx(Elevator, {
25985
25870
  height,
25986
- indexList: regionList[tabName[tabIndex]],
25871
+ list: regionList[tabName[tabIndex]],
25987
25872
  onClickItem: handleElevatorItem
25988
25873
  })
25989
25874
  })]
@@ -26045,7 +25930,7 @@ Please add \`${key}Action\` when creating your handler.`);
26045
25930
  ...defaultProps$6,
26046
25931
  ...props
26047
25932
  };
26048
- const b2 = cn("address");
25933
+ const b = cn("address");
26049
25934
  const [privateType, setPrivateType] = React.useState(type2);
26050
25935
  const [tabName] = React.useState(["province", "city", "country", "town"]);
26051
25936
  const [showPopup, setShowPopup] = React.useState(modelValue);
@@ -26139,7 +26024,7 @@ Please add \`${key}Action\` when creating your handler.`);
26139
26024
  };
26140
26025
  const headerRender = () => {
26141
26026
  return /* @__PURE__ */ jsxs("div", {
26142
- className: b2("header"),
26027
+ className: b("header"),
26143
26028
  children: [/* @__PURE__ */ jsx("div", {
26144
26029
  className: "arrow-back",
26145
26030
  onClick: onSwitchModule,
@@ -26147,7 +26032,7 @@ Please add \`${key}Action\` when creating your handler.`);
26147
26032
  color: "#cccccc"
26148
26033
  }))
26149
26034
  }), /* @__PURE__ */ jsx("div", {
26150
- className: b2("header__title"),
26035
+ className: b("header__title"),
26151
26036
  children: privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo
26152
26037
  }), /* @__PURE__ */ jsx("div", {
26153
26038
  onClick: () => handClose(),
@@ -26176,7 +26061,7 @@ Please add \`${key}Action\` when creating your handler.`);
26176
26061
  closeFun();
26177
26062
  },
26178
26063
  children: /* @__PURE__ */ jsxs("div", {
26179
- className: `${b2()} ${className || ""}`,
26064
+ className: `${b()} ${className || ""}`,
26180
26065
  style: {
26181
26066
  ...style
26182
26067
  },
@@ -26241,8 +26126,8 @@ Please add \`${key}Action\` when creating your handler.`);
26241
26126
  const barrageCWidth = React.useRef(0);
26242
26127
  const timer = React.useRef(0);
26243
26128
  const index = React.useRef(0);
26244
- const b2 = cn("barrage");
26245
- const classes = classNames(className, b2(""));
26129
+ const b = cn("barrage");
26130
+ const classes = classNames(className, b(""));
26246
26131
  React.useImperativeHandle(ref, () => ({
26247
26132
  add: (word) => {
26248
26133
  const _index = index.current % barrageList.length;
@@ -26328,32 +26213,32 @@ Please add \`${key}Action\` when creating your handler.`);
26328
26213
  ...defaultProps$4,
26329
26214
  ...props
26330
26215
  };
26331
- const b2 = cn("card");
26216
+ const b = cn("card");
26332
26217
  return /* @__PURE__ */ jsxs("div", {
26333
- className: classNames(b2(), className),
26218
+ className: classNames(b(), className),
26334
26219
  style,
26335
26220
  ...rest,
26336
26221
  children: [/* @__PURE__ */ jsx("div", {
26337
- className: b2("left"),
26222
+ className: b("left"),
26338
26223
  children: /* @__PURE__ */ jsx("img", {
26339
26224
  src: imgUrl,
26340
26225
  alt: ""
26341
26226
  })
26342
26227
  }), /* @__PURE__ */ jsxs("div", {
26343
- className: b2("right"),
26228
+ className: b("right"),
26344
26229
  children: [/* @__PURE__ */ jsx("div", {
26345
- className: b2("right__title"),
26230
+ className: b("right__title"),
26346
26231
  children: title
26347
26232
  }), prolistTpl, /* @__PURE__ */ jsxs("div", {
26348
- className: b2("right__price"),
26233
+ className: b("right__price"),
26349
26234
  children: [/* @__PURE__ */ jsx(Price, {
26350
26235
  price
26351
26236
  }), originTpl || /* @__PURE__ */ jsx(Price, {
26352
- className: b2("right__price__origin"),
26237
+ className: b("right__price__origin"),
26353
26238
  price: vipPrice
26354
26239
  })]
26355
26240
  }), /* @__PURE__ */ jsx("div", {
26356
- className: b2("right__other"),
26241
+ className: b("right__other"),
26357
26242
  children: shopTagTpl || /* @__PURE__ */ jsxs(Fragment, {
26358
26243
  children: [/* @__PURE__ */ jsx(Tag, {
26359
26244
  type: "danger",
@@ -26364,9 +26249,9 @@ Please add \`${key}Action\` when creating your handler.`);
26364
26249
  })]
26365
26250
  })
26366
26251
  }), /* @__PURE__ */ jsxs("div", {
26367
- className: b2("right__shop"),
26252
+ className: b("right__shop"),
26368
26253
  children: [/* @__PURE__ */ jsx("div", {
26369
- className: b2("right__shop__name"),
26254
+ className: b("right__shop__name"),
26370
26255
  children: shopName
26371
26256
  }), footerTpl]
26372
26257
  })]
@@ -26401,7 +26286,7 @@ Please add \`${key}Action\` when creating your handler.`);
26401
26286
  ...defaultProps$3,
26402
26287
  ...props
26403
26288
  };
26404
- const b2 = cn("signature");
26289
+ const b = cn("signature");
26405
26290
  const canvasRef = React.useRef(null);
26406
26291
  const wrapRef = React.useRef(null);
26407
26292
  const [canvasHeight, setCanvasHeight] = React.useState(0);
@@ -26491,26 +26376,26 @@ Please add \`${key}Action\` when creating your handler.`);
26491
26376
  onConfirm && onConfirm(canvas, dataurl);
26492
26377
  };
26493
26378
  return /* @__PURE__ */ jsxs("div", {
26494
- className: `${b2()} ${className}`,
26379
+ className: `${b()} ${className}`,
26495
26380
  ...rest,
26496
26381
  children: [/* @__PURE__ */ jsx("div", {
26497
- className: `${b2("inner")}`,
26382
+ className: `${b("inner")}`,
26498
26383
  ref: wrapRef,
26499
26384
  children: isCanvasSupported() ? /* @__PURE__ */ jsx("canvas", {
26500
26385
  ref: canvasRef,
26501
26386
  height: canvasHeight,
26502
26387
  width: canvasWidth
26503
26388
  }) : /* @__PURE__ */ jsx("p", {
26504
- className: `${b2("unsopport")}`,
26389
+ className: `${b("unsopport")}`,
26505
26390
  children: locale.signature.unSupportTpl || unSupportTpl
26506
26391
  })
26507
26392
  }), /* @__PURE__ */ jsx(Button, {
26508
- className: `${b2("btn")}`,
26393
+ className: `${b("btn")}`,
26509
26394
  type: "default",
26510
26395
  onClick: () => handleClearBtn(),
26511
26396
  children: locale.signature.reSign
26512
26397
  }), /* @__PURE__ */ jsx(Button, {
26513
- className: `${b2("btn")}`,
26398
+ className: `${b("btn")}`,
26514
26399
  type: "primary",
26515
26400
  onClick: () => handleConfirmBtn(),
26516
26401
  children: locale.confirm
@@ -26539,7 +26424,7 @@ Please add \`${key}Action\` when creating your handler.`);
26539
26424
  ...defaultProps$2,
26540
26425
  ...props
26541
26426
  };
26542
- const b2 = cn("timedetail");
26427
+ const b = cn("timedetail");
26543
26428
  const [renderData, setRenderData] = React.useState([]);
26544
26429
  React.useEffect(() => {
26545
26430
  const currentData = times.find((timesItem) => String(timesItem.key) === String(currentKey));
@@ -26558,7 +26443,7 @@ Please add \`${key}Action\` when creating your handler.`);
26558
26443
  return initClass;
26559
26444
  };
26560
26445
  return /* @__PURE__ */ jsx("div", {
26561
- className: `${b2()} ${className || ""}`,
26446
+ className: `${b()} ${className || ""}`,
26562
26447
  children: renderData.map((item, index) => /* @__PURE__ */ jsx("span", {
26563
26448
  className: getDetailClass(item),
26564
26449
  onClick: () => handleTime(item),
@@ -26585,9 +26470,9 @@ Please add \`${key}Action\` when creating your handler.`);
26585
26470
  ...defaultProps$1,
26586
26471
  ...props
26587
26472
  };
26588
- const b2 = cn("timepannel");
26473
+ const b = cn("timepannel");
26589
26474
  return /* @__PURE__ */ jsx("div", {
26590
- className: `${b2()} ${className || ""}`,
26475
+ className: `${b()} ${className || ""}`,
26591
26476
  onClick: () => change(curKey),
26592
26477
  children: date2
26593
26478
  });
@@ -26638,7 +26523,7 @@ Please add \`${key}Action\` when creating your handler.`);
26638
26523
  width: "100%",
26639
26524
  height
26640
26525
  };
26641
- const b2 = cn("timeselect");
26526
+ const b = cn("timeselect");
26642
26527
  const closeFun = () => {
26643
26528
  if (onSelect) {
26644
26529
  onSelect(activeTime);
@@ -26717,7 +26602,7 @@ Please add \`${key}Action\` when creating your handler.`);
26717
26602
  closeFun();
26718
26603
  },
26719
26604
  children: /* @__PURE__ */ jsxs("div", {
26720
- className: `${b2()} ${className || ""}`,
26605
+ className: `${b()} ${className || ""}`,
26721
26606
  children: [/* @__PURE__ */ jsx("div", {
26722
26607
  className: "nut-timeselect__title",
26723
26608
  children: title