@nutui/nutui-react 2.0.0-alpha.3 → 2.0.0-alpha.4

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.
@@ -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.3 Fri Apr 28 2023 15:57:49 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.0-alpha.4 Fri May 05 2023 16:12:43 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -3303,7 +3303,7 @@ Check the top-level render call using <` + t + ">.");
3303
3303
  onClick: (event) => {
3304
3304
  }
3305
3305
  };
3306
- const classPrefix$9 = "nut-cell";
3306
+ const classPrefix$a = "nut-cell";
3307
3307
  const Cell = (props) => {
3308
3308
  const {
3309
3309
  children,
@@ -3334,24 +3334,24 @@ Check the top-level render call using <` + t + ">.");
3334
3334
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3335
3335
  "div",
3336
3336
  {
3337
- className: classNames(classPrefix$9, className),
3337
+ className: classNames(classPrefix$a, className),
3338
3338
  onClick: (event) => handleClick2(event),
3339
3339
  style: baseStyle,
3340
3340
  ...rest,
3341
3341
  children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
3342
- title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$9}__left`, children: [
3343
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__title`, children: title }) : null,
3344
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__description`, children: description }) : null
3342
+ title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$a}__left`, children: [
3343
+ title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__title`, children: title }) : null,
3344
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__description`, children: description }) : null
3345
3345
  ] }) : null,
3346
3346
  extra ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3347
3347
  "div",
3348
3348
  {
3349
- className: `${classPrefix$9}__extra`,
3349
+ className: `${classPrefix$a}__extra`,
3350
3350
  style: styles,
3351
3351
  children: extra
3352
3352
  }
3353
3353
  ) : null,
3354
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__divider` })
3354
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__divider` })
3355
3355
  ] })
3356
3356
  }
3357
3357
  );
@@ -3363,16 +3363,16 @@ Check the top-level render call using <` + t + ">.");
3363
3363
  title: "",
3364
3364
  description: ""
3365
3365
  };
3366
- const classPrefix$8 = "nut-cell-group";
3366
+ const classPrefix$9 = "nut-cell-group";
3367
3367
  const CellGroup = (props) => {
3368
3368
  const { children, className, style, title, description, ...rest } = {
3369
3369
  ...defaultProps$1p,
3370
3370
  ...props
3371
3371
  };
3372
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$8, className), ...rest, children: [
3373
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__title`, children: title }) : null,
3374
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__description`, children: description }) : null,
3375
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__wrap`, children })
3372
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$9, className), ...rest, children: [
3373
+ title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__title`, children: title }) : null,
3374
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__description`, children: description }) : null,
3375
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__wrap`, children })
3376
3376
  ] });
3377
3377
  };
3378
3378
  CellGroup.defaultProps = defaultProps$1p;
@@ -3847,7 +3847,7 @@ Check the top-level render call using <` + t + ">.");
3847
3847
  loading: true,
3848
3848
  lazy: false
3849
3849
  };
3850
- const classPrefix$7 = "nut-image";
3850
+ const classPrefix$8 = "nut-image";
3851
3851
  const Image$1 = (props) => {
3852
3852
  const {
3853
3853
  className,
@@ -3963,7 +3963,7 @@ Check the top-level render call using <` + t + ">.");
3963
3963
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
3964
3964
  "div",
3965
3965
  {
3966
- className: classNames(classPrefix$7, className),
3966
+ className: classNames(classPrefix$8, className),
3967
3967
  style: containerStyle,
3968
3968
  onClick: (e) => {
3969
3969
  imageClick(e);
@@ -4131,21 +4131,21 @@ Check the top-level render call using <` + t + ">.");
4131
4131
  contentPosition: "center",
4132
4132
  direction: "horizontal"
4133
4133
  };
4134
- const classPrefix$6 = `nut-divider`;
4134
+ const classPrefix$7 = `nut-divider`;
4135
4135
  const Divider = (props) => {
4136
4136
  const { children, contentPosition, style, className, direction, ...rest } = {
4137
4137
  ...defaultProps$1l,
4138
4138
  ...props
4139
4139
  };
4140
4140
  const classes = direction === "horizontal" ? classNames({
4141
- [`${classPrefix$6}`]: true,
4142
- [`${classPrefix$6}__center`]: children,
4143
- [`${classPrefix$6}__left`]: contentPosition === "left",
4144
- [`${classPrefix$6}__right`]: contentPosition === "right",
4145
- [`${classPrefix$6}__hairline`]: true
4141
+ [`${classPrefix$7}`]: true,
4142
+ [`${classPrefix$7}__center`]: children,
4143
+ [`${classPrefix$7}__left`]: contentPosition === "left",
4144
+ [`${classPrefix$7}__right`]: contentPosition === "right",
4145
+ [`${classPrefix$7}__hairline`]: true
4146
4146
  }) : classNames({
4147
- [`${classPrefix$6}`]: true,
4148
- [`${classPrefix$6}__vertical`]: direction === "vertical"
4147
+ [`${classPrefix$7}`]: true,
4148
+ [`${classPrefix$7}__vertical`]: direction === "vertical"
4149
4149
  });
4150
4150
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
4151
4151
  };
@@ -4306,7 +4306,7 @@ Check the top-level render call using <` + t + ">.");
4306
4306
  };
4307
4307
  Layout.defaultProps = defaultProps$1i;
4308
4308
  Layout.displayName = "NutLayout";
4309
- const classPrefix$5 = "nut-row";
4309
+ const classPrefix$6 = "nut-row";
4310
4310
  const defaultProps$1h = {
4311
4311
  ...ComponentDefaults,
4312
4312
  type: "",
@@ -4341,7 +4341,7 @@ Check the top-level render call using <` + t + ">.");
4341
4341
  ${getClass("justify", justify)}
4342
4342
  ${getClass("align", align)}
4343
4343
  ${getClass("flex", wrap)}
4344
- ${classPrefix$5}
4344
+ ${classPrefix$6}
4345
4345
  `;
4346
4346
  };
4347
4347
  const parentRow = {
@@ -4440,7 +4440,7 @@ Check the top-level render call using <` + t + ">.");
4440
4440
  threshold: 0,
4441
4441
  zIndex: 2e3
4442
4442
  };
4443
- const classPrefix$4 = "nut-sticky";
4443
+ const classPrefix$5 = "nut-sticky";
4444
4444
  const Sticky = (props) => {
4445
4445
  const {
4446
4446
  position,
@@ -4562,7 +4562,7 @@ Check the top-level render call using <` + t + ">.");
4562
4562
  {
4563
4563
  ref: rootRef,
4564
4564
  style: { ...style, ...rootStyle },
4565
- className: classNames(classPrefix$4, className),
4565
+ className: classNames(classPrefix$5, className),
4566
4566
  ...rest,
4567
4567
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle, children })
4568
4568
  }
@@ -12239,280 +12239,189 @@ Please add \`${key}Action\` when creating your handler.`);
12239
12239
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-subsidenavbar__content", children })
12240
12240
  ] });
12241
12241
  };
12242
- var classnameExports = {};
12243
- var classname = {
12244
- get exports() {
12245
- return classnameExports;
12246
- },
12247
- set exports(v) {
12248
- classnameExports = v;
12249
- }
12250
- };
12251
- var classname_production_min = {};
12252
- var hasRequiredClassname_production_min;
12253
- function requireClassname_production_min() {
12254
- if (hasRequiredClassname_production_min)
12255
- return classname_production_min;
12256
- hasRequiredClassname_production_min = 1;
12257
- function r(r2) {
12258
- function t2(t3, i, a2, o) {
12259
- var f = i ? e + t3 + r2.e + i : e + t3, v = f;
12260
- if (a2) {
12261
- var s = " " + v + r2.m;
12262
- for (var u in a2)
12263
- if (a2.hasOwnProperty(u)) {
12264
- var p = a2[u];
12265
- true === p ? v += s + u : p && (v += s + u + n + p);
12266
- }
12267
- }
12268
- if (void 0 !== o)
12269
- for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
12270
- var l2 = o[y2];
12271
- if (l2 && "string" == typeof l2.valueOf())
12272
- for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
12273
- var h = g[d];
12274
- h !== f && (v += " " + h);
12275
- }
12276
- }
12277
- return v;
12278
- }
12279
- var e = r2.n || "", n = r2.v || r2.m;
12280
- return function(r3, e2) {
12281
- return function(n2, i, a2) {
12282
- 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);
12283
- };
12284
- };
12242
+ function usePropsValue({
12243
+ value,
12244
+ defaultValue,
12245
+ finalValue,
12246
+ onChange = (value2) => {
12285
12247
  }
12286
- Object.defineProperty(classname_production_min, "__esModule", { value: true });
12287
- var t = r({ e: "-", m: "_" });
12288
- classname_production_min.cn = t, classname_production_min.withNaming = r;
12289
- return classname_production_min;
12290
- }
12291
- var classname_development = {};
12292
- var hasRequiredClassname_development;
12293
- function requireClassname_development() {
12294
- if (hasRequiredClassname_development)
12295
- return classname_development;
12296
- hasRequiredClassname_development = 1;
12297
- Object.defineProperty(classname_development, "__esModule", { value: true });
12298
- function withNaming(preset) {
12299
- var nameSpace = preset.n || "";
12300
- var modValueDelimiter = preset.v || preset.m;
12301
- function stringify(b, e, m, mix) {
12302
- var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
12303
- var className = entityName;
12304
- if (m) {
12305
- var modPrefix = " " + className + preset.m;
12306
- for (var k2 in m) {
12307
- if (m.hasOwnProperty(k2)) {
12308
- var modVal = m[k2];
12309
- if (modVal === true) {
12310
- className += modPrefix + k2;
12311
- } else if (modVal) {
12312
- className += modPrefix + k2 + modValueDelimiter + modVal;
12313
- }
12314
- }
12315
- }
12316
- }
12317
- if (mix !== void 0) {
12318
- mix = Array.isArray(mix) ? mix : [mix];
12319
- for (var i = 0, len = mix.length; i < len; i++) {
12320
- var value = mix[i];
12321
- if (!value || typeof value.valueOf() !== "string")
12322
- continue;
12323
- var mixes = value.valueOf().split(" ");
12324
- for (var j = 0; j < mixes.length; j++) {
12325
- var val = mixes[j];
12326
- if (val !== entityName) {
12327
- className += " " + val;
12328
- }
12329
- }
12330
- }
12331
- }
12332
- return className;
12333
- }
12334
- return function cnGenerator(b, e) {
12335
- return function(elemOrMods, elemModsOrBlockMix, elemMix) {
12336
- if (typeof elemOrMods === "string") {
12337
- if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
12338
- return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
12339
- }
12340
- return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
12341
- }
12342
- return stringify(b, e, elemOrMods, elemModsOrBlockMix);
12343
- };
12344
- };
12248
+ }) {
12249
+ const [uncontrolled, setUncontrolled] = React.useState(
12250
+ defaultValue !== void 0 ? defaultValue : finalValue
12251
+ );
12252
+ const handleUncontrolledChange = (val) => {
12253
+ setUncontrolled(val);
12254
+ onChange == null ? void 0 : onChange(val);
12255
+ };
12256
+ if (value !== void 0) {
12257
+ return [value, onChange];
12345
12258
  }
12346
- var cn2 = withNaming({
12347
- e: "-",
12348
- m: "_"
12349
- });
12350
- classname_development.cn = cn2;
12351
- classname_development.withNaming = withNaming;
12352
- return classname_development;
12259
+ return [uncontrolled, handleUncontrolledChange];
12353
12260
  }
12354
- (function(module2) {
12355
- if (process.env.NODE_ENV === "production") {
12356
- module2.exports = requireClassname_production_min();
12357
- } else {
12358
- module2.exports = requireClassname_development();
12359
- }
12360
- })(classname);
12361
- const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
12362
12261
  const defaultProps$18 = {
12363
- visible: 0,
12364
- bottom: false,
12365
- size: 20,
12366
- unactiveColor: "",
12367
- activeColor: "",
12368
- safeAreaInsetBottom: false,
12369
- className: "",
12370
- style: {},
12371
- onSwitch: (child, activeVisible) => {
12372
- }
12262
+ ...ComponentDefaults,
12263
+ value: "",
12264
+ dot: false,
12265
+ max: 99,
12266
+ top: "0",
12267
+ right: "5",
12268
+ color: ""
12373
12269
  };
12374
- const Tabbar = (props) => {
12375
- const {
12376
- children,
12377
- visible,
12378
- activeVisible,
12379
- bottom,
12380
- size,
12381
- activeColor,
12382
- unactiveColor,
12383
- safeAreaInsetBottom,
12384
- className,
12385
- style,
12386
- onSwitch
12387
- } = {
12270
+ const Badge = (props) => {
12271
+ const { className, style, value, max, children, dot, top, right, color } = {
12388
12272
  ...defaultProps$18,
12389
12273
  ...props
12390
12274
  };
12391
- const b = cn("tabbar");
12392
- const [selectIndex, setSelectIndex] = React.useState(activeVisible || visible);
12393
- const handleClick2 = (idx) => {
12394
- if (!("activeVisible" in props)) {
12395
- setSelectIndex(idx);
12275
+ const classPrefix2 = "nut-badge";
12276
+ const classes = classNames(classPrefix2, className);
12277
+ const contentClasses = classNames(
12278
+ { [`${classPrefix2}__dot`]: dot },
12279
+ `${classPrefix2}__content`,
12280
+ `${classPrefix2}__sup`
12281
+ );
12282
+ function content() {
12283
+ if (dot || typeof value === "object")
12284
+ return null;
12285
+ if (typeof value === "number" && typeof max === "number") {
12286
+ return max < value ? `${max}+` : value;
12396
12287
  }
12288
+ return value;
12289
+ }
12290
+ const getStyle = () => {
12291
+ const style2 = {};
12292
+ style2.top = `${Number(top) || parseFloat(top) || 0}px`;
12293
+ style2.right = `${Number(right) || parseFloat(right) || 0}px`;
12294
+ style2.background = color;
12295
+ return style2;
12397
12296
  };
12398
- React.useEffect(() => {
12399
- if (activeVisible !== void 0) {
12400
- setSelectIndex(activeVisible);
12401
- }
12402
- }, [activeVisible]);
12403
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12404
- "div",
12405
- {
12406
- className: [
12407
- `${b()}`,
12408
- bottom ? `${b("bottom")}` : "",
12409
- safeAreaInsetBottom ? `${b("bottom")} ${b("safebottom")}` : "",
12410
- className
12411
- ].join(" "),
12412
- style,
12413
- children: React.Children.map(children, (child, idx) => {
12414
- if (!React.isValidElement(child)) {
12415
- return null;
12416
- }
12417
- const childProps = {
12418
- ...child.props,
12419
- active: idx === selectIndex,
12420
- index: idx,
12421
- unactiveColor,
12422
- activeColor,
12423
- size,
12424
- handleClick: () => {
12425
- handleClick2(idx);
12426
- onSwitch(child, idx);
12427
- }
12428
- };
12429
- return React.cloneElement(child, childProps);
12430
- })
12431
- }
12432
- );
12297
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
12298
+ typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
12299
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
12300
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
12301
+ ] });
12433
12302
  };
12434
- Tabbar.defaultProps = defaultProps$18;
12435
- Tabbar.displayName = "NutTabbar";
12303
+ Badge.defaultProps = defaultProps$18;
12304
+ Badge.displayName = "NutBadge";
12436
12305
  const defaultProps$17 = {
12437
12306
  ...ComponentDefaults,
12438
- dot: false,
12439
- className: "",
12440
- tabTitle: "",
12307
+ title: "",
12441
12308
  icon: null,
12442
- href: "",
12443
- num: "",
12444
12309
  active: false,
12445
- activeColor: "",
12446
- unactiveColor: "",
12447
12310
  index: 0,
12448
12311
  handleClick: (idx) => {
12449
12312
  }
12450
12313
  };
12451
12314
  const TabbarItem = (props) => {
12452
12315
  const {
12453
- dot,
12454
12316
  className,
12455
12317
  style,
12456
- tabTitle,
12318
+ title,
12457
12319
  icon,
12458
- href,
12459
- num,
12460
12320
  active,
12461
12321
  activeColor,
12462
- unactiveColor,
12322
+ inactiveColor,
12463
12323
  index,
12464
- handleClick: handleClick2
12324
+ handleClick: handleClick2,
12325
+ ...rest
12465
12326
  } = {
12466
12327
  ...defaultProps$17,
12467
12328
  ...props
12468
12329
  };
12469
- const b = cn("tabbar-item");
12470
- const bIcon = cn("tabbar-item__icon-box");
12471
- React.useEffect(() => {
12472
- if (active && href) {
12473
- window.location.href = href;
12474
- }
12475
- }, [active, href]);
12476
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
12330
+ const classPrefix2 = "nut-tabbar-item";
12331
+ const tabbarItemClass = classNames(className, classPrefix2, {
12332
+ [`${classPrefix2}-active`]: active
12333
+ });
12334
+ const boxPrefix = `${classPrefix2}__icon-box`;
12335
+ const titleClass = classNames(boxPrefix, `${boxPrefix}-nav`, {
12336
+ [`${boxPrefix}-large`]: !icon
12337
+ });
12338
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12477
12339
  "div",
12478
12340
  {
12479
- className: `${b({ active })} ${className}`,
12341
+ className: tabbarItemClass,
12480
12342
  style: {
12481
- ...style,
12482
- color: active ? activeColor : unactiveColor
12483
- },
12484
- onClick: () => {
12485
- handleClick2(index);
12343
+ color: active ? activeColor : inactiveColor,
12344
+ ...style
12486
12345
  },
12346
+ onClick: () => handleClick2(index),
12347
+ children: icon ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
12348
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: boxPrefix, children: icon }) }),
12349
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title })
12350
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title }) })
12351
+ }
12352
+ );
12353
+ };
12354
+ const defaultProps$16 = {
12355
+ ...ComponentDefaults,
12356
+ defaultValue: 0,
12357
+ fixed: false,
12358
+ inactiveColor: "",
12359
+ activeColor: "",
12360
+ safeArea: false,
12361
+ onSwitch: (value) => {
12362
+ }
12363
+ };
12364
+ const Tabbar = (props) => {
12365
+ const {
12366
+ children,
12367
+ defaultValue,
12368
+ value,
12369
+ fixed,
12370
+ activeColor,
12371
+ inactiveColor,
12372
+ safeArea,
12373
+ className,
12374
+ style,
12375
+ onSwitch
12376
+ } = {
12377
+ ...defaultProps$16,
12378
+ ...props
12379
+ };
12380
+ const classPrefix2 = "nut-tabbar";
12381
+ const [selectIndex, setSelectIndex] = usePropsValue({
12382
+ value,
12383
+ defaultValue,
12384
+ finalValue: 0,
12385
+ onChange: onSwitch
12386
+ });
12387
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
12388
+ "div",
12389
+ {
12390
+ className: classNames(classPrefix2, className, {
12391
+ [`${classPrefix2}__fixed`]: fixed
12392
+ }),
12393
+ style,
12487
12394
  children: [
12488
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${bIcon()}`, children: [
12489
- !dot ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
12490
- num && num <= 99 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("num")])}`, children: num }),
12491
- num && num >= 100 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("nums")])}`, children: "99+" })
12492
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("dot")])}` }),
12493
- icon || null
12494
- ] }),
12495
- tabTitle && /* @__PURE__ */ jsxRuntimeExports.jsx(
12496
- "div",
12497
- {
12498
- className: bIcon({ "nav-word": true }, [
12499
- bIcon({ "big-word": !icon })
12500
- ]),
12501
- children: tabTitle
12395
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__wrap`, children: React.Children.map(children, (child, idx) => {
12396
+ if (!React.isValidElement(child)) {
12397
+ return null;
12502
12398
  }
12503
- )
12399
+ const childProps = {
12400
+ ...child.props,
12401
+ active: idx === selectIndex,
12402
+ index: idx,
12403
+ inactiveColor,
12404
+ activeColor,
12405
+ handleClick: setSelectIndex
12406
+ };
12407
+ return React.cloneElement(child, childProps);
12408
+ }) }),
12409
+ (fixed || safeArea) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__safe-area` })
12504
12410
  ]
12505
12411
  }
12506
12412
  );
12507
12413
  };
12508
- const defaultProps$16 = {
12414
+ Tabbar.defaultProps = defaultProps$16;
12415
+ Tabbar.displayName = "NutTabbar";
12416
+ Tabbar.Item = TabbarItem;
12417
+ const defaultProps$15 = {
12509
12418
  title: "",
12510
12419
  value: "",
12511
12420
  disabled: false
12512
12421
  };
12513
12422
  const TabPane = (props) => {
12514
12423
  const { children, autoHeightClassName, className, disabled } = {
12515
- ...defaultProps$16,
12424
+ ...defaultProps$15,
12516
12425
  ...props
12517
12426
  };
12518
12427
  const classPrefix2 = "nut-tabpane";
@@ -12539,26 +12448,7 @@ Please add \`${key}Action\` when creating your handler.`);
12539
12448
  }
12540
12449
  }
12541
12450
  const requestAniFrame$1 = requestAniFrame();
12542
- function usePropsValue({
12543
- value,
12544
- defaultValue,
12545
- finalValue,
12546
- onChange = (value2) => {
12547
- }
12548
- }) {
12549
- const [uncontrolled, setUncontrolled] = React.useState(
12550
- defaultValue !== void 0 ? defaultValue : finalValue
12551
- );
12552
- const handleUncontrolledChange = (val) => {
12553
- setUncontrolled(val);
12554
- onChange == null ? void 0 : onChange(val);
12555
- };
12556
- if (value !== void 0) {
12557
- return [value, onChange];
12558
- }
12559
- return [uncontrolled, handleUncontrolledChange];
12560
- }
12561
- const defaultProps$15 = {
12451
+ const defaultProps$14 = {
12562
12452
  ...ComponentDefaults,
12563
12453
  tabStyle: {},
12564
12454
  activeColor: "",
@@ -12567,7 +12457,7 @@ Please add \`${key}Action\` when creating your handler.`);
12567
12457
  duration: 300,
12568
12458
  autoHeight: false
12569
12459
  };
12570
- const classPrefix$3 = "nut-tabs";
12460
+ const classPrefix$4 = "nut-tabs";
12571
12461
  const Tabs = (props) => {
12572
12462
  const {
12573
12463
  activeColor,
@@ -12584,7 +12474,7 @@ Please add \`${key}Action\` when creating your handler.`);
12584
12474
  autoHeight,
12585
12475
  ...rest
12586
12476
  } = {
12587
- ...defaultProps$15,
12477
+ ...defaultProps$14,
12588
12478
  ...props
12589
12479
  };
12590
12480
  const [value, setValue] = usePropsValue({
@@ -12646,14 +12536,14 @@ Please add \`${key}Action\` when creating your handler.`);
12646
12536
  };
12647
12537
  const titles = React.useRef(getTitles());
12648
12538
  const classes = classNames(
12649
- classPrefix$3,
12650
- `${classPrefix$3}--${direction}`,
12539
+ classPrefix$4,
12540
+ `${classPrefix$4}--${direction}`,
12651
12541
  className
12652
12542
  );
12653
- const classesTitle = classNames(`${classPrefix$3}__titles`, {
12654
- [`${classPrefix$3}__titles--${activeType}`]: activeType,
12655
- [`${classPrefix$3}__titles--scrollable`]: true,
12656
- [`${classPrefix$3}__titles--${align}`]: align
12543
+ const classesTitle = classNames(`${classPrefix$4}__titles`, {
12544
+ [`${classPrefix$4}__titles--${activeType}`]: activeType,
12545
+ [`${classPrefix$4}__titles--scrollable`]: true,
12546
+ [`${classPrefix$4}__titles--${align}`]: align
12657
12547
  });
12658
12548
  const tabsActiveStyle = {
12659
12549
  color: activeType === "smile" ? activeColor : "",
@@ -12682,7 +12572,7 @@ Please add \`${key}Action\` when creating your handler.`);
12682
12572
  onClick: (e) => {
12683
12573
  tabChange(item);
12684
12574
  },
12685
- className: classNames(`${classPrefix$3}__titles-item`, {
12575
+ className: classNames(`${classPrefix$4}__titles-item`, {
12686
12576
  [`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
12687
12577
  [`nut-tabs__titles-item--disabled`]: item.disabled,
12688
12578
  [`nut-tabs__titles-item--${align}`]: align
@@ -12692,14 +12582,14 @@ Please add \`${key}Action\` when creating your handler.`);
12692
12582
  activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
12693
12583
  "div",
12694
12584
  {
12695
- className: `${classPrefix$3}__titles-item__line`,
12585
+ className: `${classPrefix$4}__titles-item__line`,
12696
12586
  style: tabsActiveStyle
12697
12587
  }
12698
12588
  ),
12699
12589
  activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
12700
12590
  "div",
12701
12591
  {
12702
- className: `${classPrefix$3}__titles-item__smile`,
12592
+ className: `${classPrefix$4}__titles-item__smile`,
12703
12593
  style: tabsActiveStyle,
12704
12594
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(x$7, { color: activeColor, width: 40, height: 20 })
12705
12595
  }
@@ -12711,7 +12601,7 @@ Please add \`${key}Action\` when creating your handler.`);
12711
12601
  {
12712
12602
  ellipsis: true
12713
12603
  },
12714
- `${classPrefix$3}__titles-item__text`
12604
+ `${classPrefix$4}__titles-item__text`
12715
12605
  ),
12716
12606
  children: item.title
12717
12607
  }
@@ -12721,28 +12611,148 @@ Please add \`${key}Action\` when creating your handler.`);
12721
12611
  item.value
12722
12612
  );
12723
12613
  }) }),
12724
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$3}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$3}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
12614
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$4}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$4}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
12725
12615
  if (!React.isValidElement(child)) {
12726
12616
  return null;
12727
12617
  }
12728
- let childProps = {
12729
- ...child.props,
12730
- active: value === child.props.value
12618
+ let childProps = {
12619
+ ...child.props,
12620
+ active: value === child.props.value
12621
+ };
12622
+ if (String(value) !== String(child.props.value || idx) && autoHeight) {
12623
+ childProps = {
12624
+ ...childProps,
12625
+ autoHeightClassName: "inactive"
12626
+ };
12627
+ }
12628
+ return React.cloneElement(child, childProps);
12629
+ }) }) })
12630
+ ] });
12631
+ };
12632
+ Tabs.defaultProps = defaultProps$14;
12633
+ Tabs.displayName = "NutTabs";
12634
+ Tabs.TabPane = TabPane;
12635
+ var classnameExports = {};
12636
+ var classname = {
12637
+ get exports() {
12638
+ return classnameExports;
12639
+ },
12640
+ set exports(v) {
12641
+ classnameExports = v;
12642
+ }
12643
+ };
12644
+ var classname_production_min = {};
12645
+ var hasRequiredClassname_production_min;
12646
+ function requireClassname_production_min() {
12647
+ if (hasRequiredClassname_production_min)
12648
+ return classname_production_min;
12649
+ hasRequiredClassname_production_min = 1;
12650
+ function r(r2) {
12651
+ function t2(t3, i, a2, o) {
12652
+ var f = i ? e + t3 + r2.e + i : e + t3, v = f;
12653
+ if (a2) {
12654
+ var s = " " + v + r2.m;
12655
+ for (var u in a2)
12656
+ if (a2.hasOwnProperty(u)) {
12657
+ var p = a2[u];
12658
+ true === p ? v += s + u : p && (v += s + u + n + p);
12659
+ }
12660
+ }
12661
+ if (void 0 !== o)
12662
+ for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
12663
+ var l2 = o[y2];
12664
+ if (l2 && "string" == typeof l2.valueOf())
12665
+ for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
12666
+ var h = g[d];
12667
+ h !== f && (v += " " + h);
12668
+ }
12669
+ }
12670
+ return v;
12671
+ }
12672
+ var e = r2.n || "", n = r2.v || r2.m;
12673
+ return function(r3, e2) {
12674
+ return function(n2, i, a2) {
12675
+ 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);
12731
12676
  };
12732
- if (String(value) !== String(child.props.value || idx) && autoHeight) {
12733
- childProps = {
12734
- ...childProps,
12735
- autoHeightClassName: "inactive"
12736
- };
12677
+ };
12678
+ }
12679
+ Object.defineProperty(classname_production_min, "__esModule", { value: true });
12680
+ var t = r({ e: "-", m: "_" });
12681
+ classname_production_min.cn = t, classname_production_min.withNaming = r;
12682
+ return classname_production_min;
12683
+ }
12684
+ var classname_development = {};
12685
+ var hasRequiredClassname_development;
12686
+ function requireClassname_development() {
12687
+ if (hasRequiredClassname_development)
12688
+ return classname_development;
12689
+ hasRequiredClassname_development = 1;
12690
+ Object.defineProperty(classname_development, "__esModule", { value: true });
12691
+ function withNaming(preset) {
12692
+ var nameSpace = preset.n || "";
12693
+ var modValueDelimiter = preset.v || preset.m;
12694
+ function stringify(b, e, m, mix) {
12695
+ var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
12696
+ var className = entityName;
12697
+ if (m) {
12698
+ var modPrefix = " " + className + preset.m;
12699
+ for (var k2 in m) {
12700
+ if (m.hasOwnProperty(k2)) {
12701
+ var modVal = m[k2];
12702
+ if (modVal === true) {
12703
+ className += modPrefix + k2;
12704
+ } else if (modVal) {
12705
+ className += modPrefix + k2 + modValueDelimiter + modVal;
12706
+ }
12707
+ }
12708
+ }
12737
12709
  }
12738
- return React.cloneElement(child, childProps);
12739
- }) }) })
12740
- ] });
12741
- };
12742
- Tabs.defaultProps = defaultProps$15;
12743
- Tabs.displayName = "NutTabs";
12744
- Tabs.TabPane = TabPane;
12745
- const defaultProps$14 = {
12710
+ if (mix !== void 0) {
12711
+ mix = Array.isArray(mix) ? mix : [mix];
12712
+ for (var i = 0, len = mix.length; i < len; i++) {
12713
+ var value = mix[i];
12714
+ if (!value || typeof value.valueOf() !== "string")
12715
+ continue;
12716
+ var mixes = value.valueOf().split(" ");
12717
+ for (var j = 0; j < mixes.length; j++) {
12718
+ var val = mixes[j];
12719
+ if (val !== entityName) {
12720
+ className += " " + val;
12721
+ }
12722
+ }
12723
+ }
12724
+ }
12725
+ return className;
12726
+ }
12727
+ return function cnGenerator(b, e) {
12728
+ return function(elemOrMods, elemModsOrBlockMix, elemMix) {
12729
+ if (typeof elemOrMods === "string") {
12730
+ if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
12731
+ return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
12732
+ }
12733
+ return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
12734
+ }
12735
+ return stringify(b, e, elemOrMods, elemModsOrBlockMix);
12736
+ };
12737
+ };
12738
+ }
12739
+ var cn2 = withNaming({
12740
+ e: "-",
12741
+ m: "_"
12742
+ });
12743
+ classname_development.cn = cn2;
12744
+ classname_development.withNaming = withNaming;
12745
+ return classname_development;
12746
+ }
12747
+ (function(module2) {
12748
+ if (process.env.NODE_ENV === "production") {
12749
+ module2.exports = requireClassname_production_min();
12750
+ } else {
12751
+ module2.exports = requireClassname_development();
12752
+ }
12753
+ })(classname);
12754
+ const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
12755
+ const defaultProps$13 = {
12746
12756
  type: "custom",
12747
12757
  existAddress: [],
12748
12758
  defaultIcon: null,
@@ -12764,7 +12774,7 @@ Please add \`${key}Action\` when creating your handler.`);
12764
12774
  onClose,
12765
12775
  onSwitchModule,
12766
12776
  ...rest
12767
- } = { ...defaultProps$14, ...props };
12777
+ } = { ...defaultProps$13, ...props };
12768
12778
  const b = cn("address");
12769
12779
  const selectedExist = (item) => {
12770
12780
  const copyExistAdd = existAddress;
@@ -12806,7 +12816,7 @@ Please add \`${key}Action\` when creating your handler.`);
12806
12816
  isShowCustomAddress && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("choose-other"), onClick: onSwitch, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("choose-other-btn"), children: customAndExistTitle || locale.address.chooseAnotherAddress }) })
12807
12817
  ] });
12808
12818
  };
12809
- const defaultProps$13 = {
12819
+ const defaultProps$12 = {
12810
12820
  modelValue: [],
12811
12821
  type: "custom",
12812
12822
  province: [],
@@ -12831,7 +12841,7 @@ Please add \`${key}Action\` when creating your handler.`);
12831
12841
  onClose,
12832
12842
  ...rest
12833
12843
  } = {
12834
- ...defaultProps$13,
12844
+ ...defaultProps$12,
12835
12845
  ...props
12836
12846
  };
12837
12847
  const b = cn("address");
@@ -13000,28 +13010,28 @@ Please add \`${key}Action\` when creating your handler.`);
13000
13010
  nextAreaList(item);
13001
13011
  };
13002
13012
  React.useEffect(() => {
13003
- const { province: province2 } = { ...defaultProps$13, ...props };
13013
+ const { province: province2 } = { ...defaultProps$12, ...props };
13004
13014
  setRegionList({
13005
13015
  ...regionList,
13006
13016
  province: isCustom2() ? transformData(province2) : province2
13007
13017
  });
13008
13018
  }, [province]);
13009
13019
  React.useEffect(() => {
13010
- const { city: city2 } = { ...defaultProps$13, ...props };
13020
+ const { city: city2 } = { ...defaultProps$12, ...props };
13011
13021
  setRegionList({
13012
13022
  ...regionList,
13013
13023
  city: isCustom2() ? transformData(city2) : city2
13014
13024
  });
13015
13025
  }, [city]);
13016
13026
  React.useEffect(() => {
13017
- const { country: country2 } = { ...defaultProps$13, ...props };
13027
+ const { country: country2 } = { ...defaultProps$12, ...props };
13018
13028
  setRegionList({
13019
13029
  ...regionList,
13020
13030
  country: isCustom2() ? transformData(country2) : country2
13021
13031
  });
13022
13032
  }, [country]);
13023
13033
  React.useEffect(() => {
13024
- const { town: town2 } = { ...defaultProps$13, ...props };
13034
+ const { town: town2 } = { ...defaultProps$12, ...props };
13025
13035
  setRegionList({
13026
13036
  ...regionList,
13027
13037
  town: isCustom2() ? transformData(town2) : town2
@@ -13096,7 +13106,7 @@ Please add \`${key}Action\` when creating your handler.`);
13096
13106
  ) })
13097
13107
  ] });
13098
13108
  };
13099
- const defaultProps$12 = {
13109
+ const defaultProps$11 = {
13100
13110
  ...ComponentDefaults,
13101
13111
  modelValue: false,
13102
13112
  modelSelect: [],
@@ -13147,7 +13157,7 @@ Please add \`${key}Action\` when creating your handler.`);
13147
13157
  className,
13148
13158
  ...rest
13149
13159
  } = {
13150
- ...defaultProps$12,
13160
+ ...defaultProps$11,
13151
13161
  ...props
13152
13162
  };
13153
13163
  const b = cn("address");
@@ -13305,7 +13315,7 @@ Please add \`${key}Action\` when creating your handler.`);
13305
13315
  }
13306
13316
  ) });
13307
13317
  };
13308
- Address.defaultProps = defaultProps$12;
13318
+ Address.defaultProps = defaultProps$11;
13309
13319
  Address.displayName = "NutAddress";
13310
13320
  const Utils = {
13311
13321
  /**
@@ -13425,7 +13435,7 @@ Please add \`${key}Action\` when creating your handler.`);
13425
13435
  return false;
13426
13436
  }
13427
13437
  };
13428
- const defaultProps$11 = {
13438
+ const defaultProps$10 = {
13429
13439
  type: "one",
13430
13440
  isAutoBackFill: false,
13431
13441
  poppable: true,
@@ -13477,7 +13487,7 @@ Please add \`${key}Action\` when creating your handler.`);
13477
13487
  onUpdate,
13478
13488
  onSelected,
13479
13489
  onYearMonthChange
13480
- } = { ...defaultProps$11, ...props };
13490
+ } = { ...defaultProps$10, ...props };
13481
13491
  const weeks = locale.calendaritem.weekdays;
13482
13492
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
13483
13493
  const [monthsData, setMonthsData] = React.useState([]);
@@ -14073,9 +14083,9 @@ Please add \`${key}Action\` when creating your handler.`);
14073
14083
  poppable && !isAutoBackFill ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-calendar-footer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "calendar-confirm-btn", onClick: confirm2, children: confirmText || locale.confirm }) }) : ""
14074
14084
  ] }) });
14075
14085
  });
14076
- CalendarItem.defaultProps = defaultProps$11;
14086
+ CalendarItem.defaultProps = defaultProps$10;
14077
14087
  CalendarItem.displayName = "NutCalendarItem";
14078
- const defaultProps$10 = {
14088
+ const defaultProps$$ = {
14079
14089
  type: "one",
14080
14090
  isAutoBackFill: false,
14081
14091
  poppable: true,
@@ -14130,7 +14140,7 @@ Please add \`${key}Action\` when creating your handler.`);
14130
14140
  onChoose,
14131
14141
  onSelected,
14132
14142
  onYearMonthChange
14133
- } = { ...defaultProps$10, ...props };
14143
+ } = { ...defaultProps$$, ...props };
14134
14144
  const calendarRef = React.useRef(null);
14135
14145
  const close = () => {
14136
14146
  onClose && onClose();
@@ -14200,9 +14210,9 @@ Please add \`${key}Action\` when creating your handler.`);
14200
14210
  }
14201
14211
  ) : renderItem() });
14202
14212
  });
14203
- Calendar.defaultProps = defaultProps$10;
14213
+ Calendar.defaultProps = defaultProps$$;
14204
14214
  Calendar.displayName = "NutCalendar";
14205
- const defaultProps$$ = {
14215
+ const defaultProps$_ = {
14206
14216
  data: {
14207
14217
  text: "",
14208
14218
  value: "",
@@ -14219,7 +14229,7 @@ Please add \`${key}Action\` when creating your handler.`);
14219
14229
  };
14220
14230
  const InternalCascaderItem = (props, ref) => {
14221
14231
  const { data, checked, checkedIcon, chooseItem, activeColor } = {
14222
- ...defaultProps$$,
14232
+ ...defaultProps$_,
14223
14233
  ...props
14224
14234
  };
14225
14235
  const b = cn("cascader-item");
@@ -14258,7 +14268,7 @@ Please add \`${key}Action\` when creating your handler.`);
14258
14268
  );
14259
14269
  };
14260
14270
  const CascaderItem = React.forwardRef(InternalCascaderItem);
14261
- CascaderItem.defaultProps = defaultProps$$;
14271
+ CascaderItem.defaultProps = defaultProps$_;
14262
14272
  CascaderItem.displayName = "NutCascaderItem";
14263
14273
  const formatTree = (tree, parent, config2) => tree.map((node) => {
14264
14274
  const {
@@ -14396,7 +14406,7 @@ Please add \`${key}Action\` when creating your handler.`);
14396
14406
  }
14397
14407
  }
14398
14408
  const Tree$1 = Tree;
14399
- const defaultProps$_ = {
14409
+ const defaultProps$Z = {
14400
14410
  className: "",
14401
14411
  style: {},
14402
14412
  activeColor: "",
@@ -14447,7 +14457,7 @@ Please add \`${key}Action\` when creating your handler.`);
14447
14457
  onClose,
14448
14458
  onChange,
14449
14459
  onPathChange
14450
- } = { ...defaultProps$_, ...props };
14460
+ } = { ...defaultProps$Z, ...props };
14451
14461
  const [tabvalue, setTabvalue] = React.useState("c1");
14452
14462
  const [optionsData, setOptionsData] = React.useState([]);
14453
14463
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -14722,11 +14732,11 @@ Please add \`${key}Action\` when creating your handler.`);
14722
14732
  ) : renderItem() });
14723
14733
  };
14724
14734
  const Cascader = React.forwardRef(InternalCascader);
14725
- Cascader.defaultProps = defaultProps$_;
14735
+ Cascader.defaultProps = defaultProps$Z;
14726
14736
  Cascader.displayName = "NutCascader";
14727
14737
  const CheckboxGroupContext = React.createContext(null);
14728
14738
  const Context = CheckboxGroupContext;
14729
- const defaultProps$Z = {
14739
+ const defaultProps$Y = {
14730
14740
  disabled: false,
14731
14741
  max: void 0,
14732
14742
  textPosition: "right",
@@ -14737,7 +14747,7 @@ Please add \`${key}Action\` when creating your handler.`);
14737
14747
  };
14738
14748
  const CheckboxGroup = React.forwardRef(
14739
14749
  (props, ref) => {
14740
- const { children } = { ...defaultProps$Z, ...props };
14750
+ const { children } = { ...defaultProps$Y, ...props };
14741
14751
  const b = cn("checkboxgroup");
14742
14752
  const {
14743
14753
  className,
@@ -14826,9 +14836,9 @@ Please add \`${key}Action\` when creating your handler.`);
14826
14836
  );
14827
14837
  }
14828
14838
  );
14829
- CheckboxGroup.defaultProps = defaultProps$Z;
14839
+ CheckboxGroup.defaultProps = defaultProps$Y;
14830
14840
  CheckboxGroup.displayName = "NutCheckboxGroup";
14831
- const defaultProps$Y = {
14841
+ const defaultProps$X = {
14832
14842
  ...ComponentDefaults,
14833
14843
  disabled: false,
14834
14844
  textPosition: "right",
@@ -14843,7 +14853,7 @@ Please add \`${key}Action\` when creating your handler.`);
14843
14853
  };
14844
14854
  const Checkbox = (props) => {
14845
14855
  const { children } = {
14846
- ...defaultProps$Y,
14856
+ ...defaultProps$X,
14847
14857
  ...props
14848
14858
  };
14849
14859
  const b = cn("checkbox");
@@ -14941,7 +14951,7 @@ Please add \`${key}Action\` when creating your handler.`);
14941
14951
  }
14942
14952
  );
14943
14953
  };
14944
- Checkbox.defaultProps = defaultProps$Y;
14954
+ Checkbox.defaultProps = defaultProps$X;
14945
14955
  Checkbox.displayName = "NutCheckBox";
14946
14956
  Checkbox.Group = CheckboxGroup;
14947
14957
  const MIN_DISTANCE = 10;
@@ -15448,7 +15458,7 @@ Please add \`${key}Action\` when creating your handler.`);
15448
15458
  const Picker = React.forwardRef(InternalPicker);
15449
15459
  const Picker$1 = Picker;
15450
15460
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
15451
- const defaultProps$X = {
15461
+ const defaultProps$W = {
15452
15462
  modelValue: null,
15453
15463
  visible: false,
15454
15464
  title: "",
@@ -15479,7 +15489,7 @@ Please add \`${key}Action\` when creating your handler.`);
15479
15489
  style,
15480
15490
  ...rest
15481
15491
  } = {
15482
- ...defaultProps$X,
15492
+ ...defaultProps$W,
15483
15493
  ...props
15484
15494
  };
15485
15495
  const { locale } = useConfig();
@@ -15756,7 +15766,7 @@ Please add \`${key}Action\` when creating your handler.`);
15756
15766
  }
15757
15767
  );
15758
15768
  };
15759
- DatePicker.defaultProps = defaultProps$X;
15769
+ DatePicker.defaultProps = defaultProps$W;
15760
15770
  DatePicker.displayName = "NutDatePicker";
15761
15771
  const FormItemContext = React.createContext({});
15762
15772
  function _extends() {
@@ -16947,7 +16957,7 @@ Please add \`${key}Action\` when creating your handler.`);
16947
16957
  }
16948
16958
  return [formRef.current];
16949
16959
  };
16950
- const defaultProps$W = {
16960
+ const defaultProps$V = {
16951
16961
  ...ComponentDefaults,
16952
16962
  name: "",
16953
16963
  label: "",
@@ -17009,7 +17019,7 @@ Please add \`${key}Action\` when creating your handler.`);
17009
17019
  showErrorLine,
17010
17020
  showErrorMessage
17011
17021
  } = {
17012
- ...defaultProps$W,
17022
+ ...defaultProps$V,
17013
17023
  ...this.props
17014
17024
  };
17015
17025
  const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
@@ -17076,9 +17086,9 @@ Please add \`${key}Action\` when creating your handler.`);
17076
17086
  return this.renderLayout(returnChildNode);
17077
17087
  }
17078
17088
  }
17079
- __publicField(FormItem, "defaultProps", defaultProps$W);
17089
+ __publicField(FormItem, "defaultProps", defaultProps$V);
17080
17090
  __publicField(FormItem, "contextType", FormItemContext);
17081
- const defaultProps$V = {
17091
+ const defaultProps$U = {
17082
17092
  ...ComponentDefaults,
17083
17093
  className: "",
17084
17094
  style: void 0,
@@ -17106,7 +17116,7 @@ Please add \`${key}Action\` when creating your handler.`);
17106
17116
  form,
17107
17117
  ...rest
17108
17118
  } = {
17109
- ...defaultProps$V,
17119
+ ...defaultProps$U,
17110
17120
  ...props
17111
17121
  };
17112
17122
  let formInstance = {};
@@ -17130,392 +17140,225 @@ Please add \`${key}Action\` when creating your handler.`);
17130
17140
  e.preventDefault();
17131
17141
  submit();
17132
17142
  },
17133
- onReset: (e) => {
17134
- e.preventDefault();
17135
- resetFields();
17136
- },
17137
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(CellGroup, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormItemContext.Provider, { value: formInstance, children }) })
17138
- }
17139
- );
17140
- };
17141
- Form.defaultProps = defaultProps$V;
17142
- Form.displayName = "NutForm";
17143
- Form.Item = FormItem;
17144
- Form.useForm = useForm;
17145
- function trimExtraChar(value, char, regExp) {
17146
- const index = value.indexOf(char);
17147
- if (index === -1) {
17148
- return value;
17149
- }
17150
- if (char === "-" && index !== 0) {
17151
- return value.slice(0, index);
17152
- }
17153
- return value.slice(0, index + 1) + value.slice(index).replace(regExp, "");
17154
- }
17155
- function formatNumber(value, allowDot = true, allowMinus = true) {
17156
- if (allowDot) {
17157
- value = trimExtraChar(value, ".", /\./g);
17158
- } else {
17159
- value = value.split(".")[0];
17160
- }
17161
- if (allowMinus) {
17162
- value = trimExtraChar(value, "-", /-/g);
17163
- } else {
17164
- value = value.replace(/-/, "");
17165
- }
17166
- const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
17167
- return value.replace(regExp, "");
17168
- }
17169
- const defaultProps$U = {
17170
- ...ComponentDefaults,
17171
- type: "text",
17172
- name: "",
17173
- defaultValue: "",
17174
- placeholder: "",
17175
- label: "",
17176
- labelClass: "",
17177
- labelWidth: "80",
17178
- labelAlign: "left",
17179
- colon: false,
17180
- inputAlign: "left",
17181
- center: false,
17182
- required: false,
17183
- disabled: false,
17184
- readonly: false,
17185
- error: false,
17186
- maxlength: "9999",
17187
- leftIcon: null,
17188
- rightIcon: null,
17189
- clearable: false,
17190
- clearIcon: null,
17191
- clearSize: "14",
17192
- border: true,
17193
- formatTrigger: "onChange",
17194
- rules: [],
17195
- rows: null,
17196
- errorMessage: "",
17197
- errorMessageAlign: "",
17198
- showWordLimit: false,
17199
- autofocus: false,
17200
- slotButton: null,
17201
- slotInput: null
17202
- };
17203
- const Input = React.forwardRef((props, ref) => {
17204
- const { locale } = useConfig();
17205
- const {
17206
- children,
17207
- type: type2,
17208
- name,
17209
- defaultValue,
17210
- placeholder,
17211
- label,
17212
- labelClass,
17213
- labelWidth,
17214
- labelAlign,
17215
- colon,
17216
- inputAlign,
17217
- center,
17218
- required: required2,
17219
- disabled,
17220
- readonly,
17221
- error,
17222
- maxlength,
17223
- leftIcon,
17224
- rightIcon,
17225
- clearable,
17226
- clearIcon,
17227
- clearSize,
17228
- border,
17229
- formatTrigger,
17230
- rules: rules2,
17231
- errorMessage,
17232
- errorMessageAlign,
17233
- showWordLimit,
17234
- autofocus,
17235
- style,
17236
- className,
17237
- rows,
17238
- slotButton,
17239
- slotInput,
17240
- onChange,
17241
- onBlur,
17242
- onFocus,
17243
- onClear,
17244
- formatter,
17245
- keypress,
17246
- onClickInput,
17247
- onClickLeftIcon,
17248
- onClickRightIcon,
17249
- onClick,
17250
- ...rest
17251
- } = {
17252
- ...defaultProps$U,
17253
- ...props
17254
- };
17255
- const inputPlaceholder = placeholder || locale.placeholder;
17256
- const [inputValue, SetInputValue] = React.useState("");
17257
- const [active, SetActive] = React.useState(false);
17258
- const [classes, setClasses] = React.useState("");
17259
- const getModelValue = () => String(inputValue ?? "");
17260
- const inputRef = React.useRef(null);
17261
- React.useEffect(() => {
17262
- setClasses(inputClass);
17263
- SetInputValue(defaultValue);
17264
- }, [defaultValue]);
17265
- React.useEffect(() => {
17266
- if (inputValue) {
17267
- updateValue(getModelValue());
17268
- resetValidation();
17269
- }
17270
- }, [inputValue]);
17271
- React.useImperativeHandle(ref, () => {
17272
- return inputRef.current;
17273
- });
17274
- const inputClass = React.useCallback(() => {
17275
- const prefixCls2 = "nut-input";
17276
- return [
17277
- prefixCls2,
17278
- `${center ? "center" : ""}`,
17279
- `${disabled ? `${prefixCls2}-disabled` : ""}`,
17280
- `${required2 ? `${prefixCls2}-required` : ""}`,
17281
- `${error ? `${prefixCls2}-error` : ""}`,
17282
- `${border ? `${prefixCls2}-border` : ""}`,
17283
- `${slotButton || rightIcon ? `${prefixCls2}-right-mark` : ""}`
17284
- ].filter(Boolean).join(" ");
17285
- }, [disabled, required2, error, border, slotButton, rightIcon, center]);
17286
- React.useEffect(() => {
17287
- setClasses(inputClass);
17288
- }, [disabled, required2, error, border, slotButton, rightIcon, center]);
17289
- const updateValue = (value, trigger = "onChange", event) => {
17290
- var _a2;
17291
- let val = value;
17292
- if (type2 === "digit" || type2 === "tel") {
17293
- val = formatNumber(val, false, false);
17294
- }
17295
- if (type2 === "number") {
17296
- val = formatNumber(val, true, true);
17297
- }
17298
- if (type2 === "tel" && !formatter) {
17299
- const regTel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
17300
- const regNumber = /[^-0-9]/g;
17301
- val = !regTel.test(val) && val.length > 11 ? val.substring(0, 11) : val.replace(regNumber, "");
17302
- }
17303
- if (formatter && trigger === formatTrigger) {
17304
- val = formatter(val);
17305
- }
17306
- if (((_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value) !== val) {
17307
- inputRef.current.value = val;
17308
- }
17309
- SetInputValue(val);
17310
- };
17311
- const handleFocus = (event) => {
17312
- const val = event.target.value;
17313
- SetActive(true);
17314
- onFocus && onFocus(val, event);
17315
- };
17316
- const handleInput = (event) => {
17317
- let val = event.target.value;
17318
- if (maxlength && val.length > Number(maxlength)) {
17319
- val = val.slice(0, Number(maxlength));
17320
- }
17321
- updateValue(val, "onChange");
17322
- onChange && onChange(val, event);
17323
- };
17324
- const handleBlur = (event) => {
17325
- setTimeout(() => {
17326
- SetActive(false);
17327
- }, 200);
17328
- let val = event.target.value;
17329
- if (maxlength && val.length > Number(maxlength)) {
17330
- val = val.slice(0, Number(maxlength));
17331
- }
17332
- updateValue(val, "onBlur");
17333
- onBlur && onBlur(val, event);
17334
- };
17335
- const handleClickInput = (event) => {
17336
- onClickInput && onClickInput(event);
17337
- };
17338
- const handleClickLeftIcon = (event) => {
17339
- onClickLeftIcon && onClickLeftIcon(event);
17340
- };
17341
- const handleClickRightIcon = (event) => {
17342
- onClickRightIcon && onClickRightIcon(event);
17343
- };
17344
- const resetValidation = () => {
17345
- };
17346
- const inputType = (type22) => {
17347
- if (type22 === "number") {
17348
- return "text";
17349
- }
17350
- if (type22 === "digit") {
17351
- return "tel";
17143
+ onReset: (e) => {
17144
+ e.preventDefault();
17145
+ resetFields();
17146
+ },
17147
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(CellGroup, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormItemContext.Provider, { value: formInstance, children }) })
17352
17148
  }
17353
- return type22;
17354
- };
17355
- const handleClear = (event) => {
17356
- updateValue("");
17357
- onClear && onClear("", event);
17358
- };
17359
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
17360
- "div",
17361
- {
17362
- className: `${classes} ${className || ""}`,
17149
+ );
17150
+ };
17151
+ Form.defaultProps = defaultProps$U;
17152
+ Form.displayName = "NutForm";
17153
+ Form.Item = FormItem;
17154
+ Form.useForm = useForm;
17155
+ function trimExtraChar(value, char, regExp) {
17156
+ const index = value.indexOf(char);
17157
+ if (index === -1) {
17158
+ return value;
17159
+ }
17160
+ if (char === "-" && index !== 0) {
17161
+ return value.slice(0, index);
17162
+ }
17163
+ return value.slice(0, index + 1) + value.slice(index).replace(regExp, "");
17164
+ }
17165
+ function formatNumber(value, allowDot = true, allowMinus = true) {
17166
+ if (allowDot) {
17167
+ value = trimExtraChar(value, ".", /\./g);
17168
+ } else {
17169
+ value = value.split(".")[0];
17170
+ }
17171
+ if (allowMinus) {
17172
+ value = trimExtraChar(value, "-", /-/g);
17173
+ } else {
17174
+ value = value.replace(/-/, "");
17175
+ }
17176
+ const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
17177
+ return value.replace(regExp, "");
17178
+ }
17179
+ const defaultProps$T = {
17180
+ ...ComponentDefaults,
17181
+ type: "text",
17182
+ name: "",
17183
+ placeholder: "",
17184
+ confirmType: "done",
17185
+ align: "left",
17186
+ required: false,
17187
+ disabled: false,
17188
+ readOnly: false,
17189
+ maxLength: 9999,
17190
+ clearable: false,
17191
+ clearIcon: null,
17192
+ formatTrigger: "onChange",
17193
+ autoFocus: false
17194
+ };
17195
+ const Input = React.forwardRef(
17196
+ (props, ref) => {
17197
+ const { locale } = useConfig();
17198
+ const {
17199
+ type: type2,
17200
+ name,
17201
+ placeholder,
17202
+ align,
17203
+ disabled,
17204
+ readOnly,
17205
+ maxLength,
17206
+ clearable,
17207
+ clearIcon,
17208
+ formatTrigger,
17209
+ autoFocus,
17363
17210
  style,
17364
- ...rest,
17365
- onClick: (e) => {
17366
- onClick && onClick(e);
17367
- },
17368
- children: slotInput ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
17369
- label ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17370
- "div",
17371
- {
17372
- className: `nut-input-label ${labelClass}`,
17373
- style: { width: `${labelWidth}px`, textAlign: labelAlign },
17374
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label-string", children: [
17375
- label,
17376
- colon ? ":" : ""
17377
- ] })
17378
- }
17379
- ) : null,
17380
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-value", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17381
- "div",
17382
- {
17383
- className: "nut-input-inner",
17384
- onClick: (e) => {
17385
- handleClickInput(e);
17386
- },
17387
- children: slotInput
17388
- }
17389
- ) })
17390
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
17391
- React.isValidElement(leftIcon) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17392
- "div",
17393
- {
17394
- className: "nut-input-left-icon",
17395
- onClick: (e) => {
17396
- handleClickLeftIcon(e);
17397
- },
17398
- children: leftIcon
17399
- }
17400
- ) : null,
17401
- label ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17402
- "div",
17403
- {
17404
- className: `nut-input-label ${labelClass}`,
17405
- style: { width: `${labelWidth}px`, textAlign: labelAlign },
17406
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label-string", children: [
17407
- label,
17408
- colon ? ":" : ""
17409
- ] })
17410
- }
17411
- ) : null,
17412
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-value", children: [
17413
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-main-con", children: [
17414
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
17415
- "div",
17416
- {
17417
- className: "nut-input-inner",
17418
- onClick: (e) => {
17419
- handleClickInput(e);
17420
- },
17421
- children: [
17422
- type2 === "textarea" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17423
- "textarea",
17424
- {
17425
- name,
17426
- className: "input-text",
17427
- ref: inputRef,
17428
- style: {
17429
- textAlign: inputAlign,
17430
- height: `${Number(rows) * 24}px`
17431
- },
17432
- maxLength: maxlength,
17433
- placeholder: inputPlaceholder,
17434
- disabled,
17435
- readOnly: readonly,
17436
- value: inputValue,
17437
- autoFocus: autofocus,
17438
- onBlur: (e) => {
17439
- handleBlur(e);
17440
- },
17441
- onFocus: (e) => {
17442
- handleFocus(e);
17443
- },
17444
- onInput: (e) => {
17445
- handleInput(e);
17446
- }
17447
- }
17448
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
17449
- "input",
17450
- {
17451
- name,
17452
- className: "input-text",
17453
- ref: inputRef,
17454
- style: { textAlign: inputAlign },
17455
- type: inputType(type2),
17456
- maxLength: maxlength,
17457
- placeholder: inputPlaceholder,
17458
- disabled,
17459
- readOnly: readonly,
17460
- value: inputValue,
17461
- autoFocus: autofocus,
17462
- onBlur: (e) => {
17463
- handleBlur(e);
17464
- },
17465
- onFocus: (e) => {
17466
- handleFocus(e);
17467
- },
17468
- onInput: (e) => {
17469
- handleInput(e);
17470
- }
17471
- }
17472
- ),
17473
- clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17474
- "span",
17475
- {
17476
- className: "nut-input-clear-wrap",
17477
- onClick: (e) => handleClear(e),
17478
- children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$4, { className: "nut-input-clear" })
17479
- }
17480
- ) : null
17481
- ]
17482
- }
17483
- ),
17484
- React.isValidElement(rightIcon) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17485
- "div",
17486
- {
17487
- className: "nut-input-right-icon",
17488
- onClick: (e) => {
17489
- handleClickRightIcon(e);
17490
- },
17491
- children: rightIcon
17211
+ className,
17212
+ onChange,
17213
+ onFocus,
17214
+ onClear,
17215
+ formatter,
17216
+ onClick,
17217
+ confirmType,
17218
+ defaultValue,
17219
+ value: _value,
17220
+ ...rest
17221
+ } = {
17222
+ ...defaultProps$T,
17223
+ ...props
17224
+ };
17225
+ const [value, setValue] = usePropsValue({
17226
+ value: props.value,
17227
+ defaultValue: props.defaultValue,
17228
+ finalValue: "",
17229
+ onChange
17230
+ });
17231
+ const inputRef = React.useRef(null);
17232
+ const composingRef = React.useRef(false);
17233
+ const [active, setActive] = React.useState(false);
17234
+ React.useImperativeHandle(ref, () => {
17235
+ return {
17236
+ clear: () => {
17237
+ setValue("");
17238
+ },
17239
+ focus: () => {
17240
+ var _a2;
17241
+ (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
17242
+ },
17243
+ blur: () => {
17244
+ var _a2;
17245
+ (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
17246
+ },
17247
+ get nativeElement() {
17248
+ return inputRef.current;
17249
+ }
17250
+ };
17251
+ });
17252
+ const inputClass = React.useCallback(() => {
17253
+ const classPrefix2 = "nut-input";
17254
+ return [classPrefix2, `${disabled ? `${classPrefix2}-disabled` : ""}`].filter(Boolean).join(" ");
17255
+ }, [disabled]);
17256
+ const updateValue = (value2, trigger = "onChange") => {
17257
+ let val = value2;
17258
+ if (type2 === "number") {
17259
+ val = formatNumber(val, false, true);
17260
+ }
17261
+ if (type2 === "digit") {
17262
+ val = formatNumber(val, true, true);
17263
+ }
17264
+ if (formatter && trigger === formatTrigger) {
17265
+ val = formatter(val);
17266
+ }
17267
+ setValue(val);
17268
+ const eventHandler = props[trigger];
17269
+ if (eventHandler && typeof eventHandler === "function") {
17270
+ eventHandler(val);
17271
+ }
17272
+ };
17273
+ const handleFocus = (event) => {
17274
+ const val = event.target.value;
17275
+ onFocus && onFocus(val);
17276
+ setActive(true);
17277
+ };
17278
+ const handleInput = (value2) => {
17279
+ updateValue(value2, "onChange");
17280
+ };
17281
+ const handleBlur = (event) => {
17282
+ const val = event.target.value;
17283
+ updateValue(val, "onBlur");
17284
+ setActive(false);
17285
+ };
17286
+ const inputType = (type22) => {
17287
+ if (type22 === "digit") {
17288
+ return "text";
17289
+ }
17290
+ if (type22 === "number") {
17291
+ return "tel";
17292
+ }
17293
+ return type22;
17294
+ };
17295
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
17296
+ "div",
17297
+ {
17298
+ className: `${inputClass()} ${className || ""}`,
17299
+ style,
17300
+ onClick: (e) => {
17301
+ onClick && onClick(e);
17302
+ },
17303
+ children: [
17304
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
17305
+ "input",
17306
+ {
17307
+ ...rest,
17308
+ name,
17309
+ className: "nut-input-native",
17310
+ ref: inputRef,
17311
+ style: { textAlign: align },
17312
+ type: inputType(type2),
17313
+ maxLength,
17314
+ placeholder: placeholder || locale.placeholder,
17315
+ disabled,
17316
+ readOnly,
17317
+ value,
17318
+ autoFocus,
17319
+ enterKeyHint: confirmType,
17320
+ onBlur: (e) => {
17321
+ handleBlur(e);
17322
+ },
17323
+ onFocus: (e) => {
17324
+ handleFocus(e);
17325
+ },
17326
+ onChange: (e) => {
17327
+ handleInput(e.currentTarget.value);
17328
+ },
17329
+ onCompositionStart: (e) => {
17330
+ var _a2;
17331
+ composingRef.current = true;
17332
+ (_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e);
17333
+ },
17334
+ onCompositionEnd: (e) => {
17335
+ var _a2;
17336
+ composingRef.current = false;
17337
+ (_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e);
17492
17338
  }
17493
- ) : null,
17494
- slotButton ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-button", children: slotButton }) : null,
17495
- showWordLimit && maxlength ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-word-limit", children: [
17496
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "nut-input-word-num", children: inputValue ? inputValue.length : 0 }),
17497
- "/",
17498
- maxlength
17499
- ] }) : null
17500
- ] }),
17501
- errorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17502
- "div",
17339
+ }
17340
+ ),
17341
+ clearable && !readOnly && active && value.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17342
+ "span",
17503
17343
  {
17504
- className: "nut-input-error-message",
17505
- style: {
17506
- textAlign: errorMessageAlign
17344
+ style: { display: "flex", alignItems: "center" },
17345
+ onClick: () => {
17346
+ if (!disabled) {
17347
+ setValue("");
17348
+ onClear && onClear("");
17349
+ }
17507
17350
  },
17508
- children: errorMessage
17351
+ children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$4, { className: "nut-input-clear" })
17509
17352
  }
17510
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {})
17511
- ] })
17512
- ] })
17513
- }
17514
- );
17515
- });
17516
- Input.defaultProps = defaultProps$U;
17353
+ ) : null
17354
+ ]
17355
+ }
17356
+ );
17357
+ }
17358
+ );
17359
+ Input.defaultProps = defaultProps$T;
17517
17360
  Input.displayName = "NutInput";
17518
- const defaultProps$T = {
17361
+ const defaultProps$S = {
17519
17362
  ...ComponentDefaults,
17520
17363
  disabled: false,
17521
17364
  min: 1,
@@ -17527,7 +17370,7 @@ Please add \`${key}Action\` when creating your handler.`);
17527
17370
  digits: 0,
17528
17371
  async: false
17529
17372
  };
17530
- const classPrefix$2 = `nut-inputnumber`;
17373
+ const classPrefix$3 = `nut-inputnumber`;
17531
17374
  const InputNumber = (props) => {
17532
17375
  const {
17533
17376
  children,
@@ -17552,7 +17395,7 @@ Please add \`${key}Action\` when creating your handler.`);
17552
17395
  onChange,
17553
17396
  ...restProps
17554
17397
  } = {
17555
- ...defaultProps$T,
17398
+ ...defaultProps$S,
17556
17399
  ...props
17557
17400
  };
17558
17401
  const inputRef = React.useRef("");
@@ -17570,8 +17413,8 @@ Please add \`${key}Action\` when creating your handler.`);
17570
17413
  }, []);
17571
17414
  const classes = classNames(
17572
17415
  {
17573
- [`${classPrefix$2}`]: true,
17574
- [`${classPrefix$2}--disabled`]: disabled
17416
+ [`${classPrefix$3}`]: true,
17417
+ [`${classPrefix$3}--disabled`]: disabled
17575
17418
  },
17576
17419
  className
17577
17420
  );
@@ -17753,9 +17596,9 @@ Please add \`${key}Action\` when creating your handler.`);
17753
17596
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(y$3, { className: iconAddClasses, onClick: (e) => addNumber(e) }) })
17754
17597
  ] });
17755
17598
  };
17756
- InputNumber.defaultProps = defaultProps$T;
17599
+ InputNumber.defaultProps = defaultProps$S;
17757
17600
  InputNumber.displayName = "NutInputNumber";
17758
- const defaultProps$S = {
17601
+ const defaultProps$R = {
17759
17602
  ...ComponentDefaults,
17760
17603
  activeColor: "",
17761
17604
  closeOnOverlayClick: true,
@@ -17774,7 +17617,7 @@ Please add \`${key}Action\` when creating your handler.`);
17774
17617
  activeColor,
17775
17618
  ...rest
17776
17619
  } = {
17777
- ...defaultProps$S,
17620
+ ...defaultProps$R,
17778
17621
  ...props
17779
17622
  };
17780
17623
  const menuRef = React.useRef(null);
@@ -17898,9 +17741,9 @@ Please add \`${key}Action\` when creating your handler.`);
17898
17741
  }
17899
17742
  );
17900
17743
  };
17901
- Menu.defaultProps = defaultProps$S;
17744
+ Menu.defaultProps = defaultProps$R;
17902
17745
  Menu.displayName = "NutMenu";
17903
- const defaultProps$R = {
17746
+ const defaultProps$Q = {
17904
17747
  ...ComponentDefaults,
17905
17748
  columns: 1,
17906
17749
  direction: "down",
@@ -17930,7 +17773,7 @@ Please add \`${key}Action\` when creating your handler.`);
17930
17773
  parent,
17931
17774
  index
17932
17775
  } = {
17933
- ...defaultProps$R,
17776
+ ...defaultProps$Q,
17934
17777
  ...props
17935
17778
  };
17936
17779
  const [_showPopup, setShowPopup] = React.useState(show);
@@ -18084,9 +17927,9 @@ Please add \`${key}Action\` when creating your handler.`);
18084
17927
  )
18085
17928
  ] });
18086
17929
  });
18087
- MenuItem.defaultProps = defaultProps$R;
17930
+ MenuItem.defaultProps = defaultProps$Q;
18088
17931
  MenuItem.displayName = "NutMenuItem";
18089
- const defaultProps$Q = {
17932
+ const defaultProps$P = {
18090
17933
  confirmText: "",
18091
17934
  title: "",
18092
17935
  visible: false,
@@ -18318,14 +18161,14 @@ Please add \`${key}Action\` when creating your handler.`);
18318
18161
  }
18319
18162
  ) });
18320
18163
  };
18321
- NumberKeyboard.defaultProps = defaultProps$Q;
18164
+ NumberKeyboard.defaultProps = defaultProps$P;
18322
18165
  NumberKeyboard.displayName = "NutNumberKeyboard";
18323
18166
  const radioContext = {
18324
18167
  onChange: (val) => {
18325
18168
  }
18326
18169
  };
18327
18170
  const RadioContext = React.createContext(radioContext);
18328
- const defaultProps$P = {
18171
+ const defaultProps$O = {
18329
18172
  value: null,
18330
18173
  textPosition: "right",
18331
18174
  onChange: (value) => {
@@ -18335,7 +18178,7 @@ Please add \`${key}Action\` when creating your handler.`);
18335
18178
  };
18336
18179
  const RadioGroup = React.forwardRef(
18337
18180
  (props, ref) => {
18338
- const { children } = { ...defaultProps$P, ...props };
18181
+ const { children } = { ...defaultProps$O, ...props };
18339
18182
  cn("RadioGroup");
18340
18183
  const {
18341
18184
  className,
@@ -18412,9 +18255,9 @@ Please add \`${key}Action\` when creating your handler.`);
18412
18255
  );
18413
18256
  }
18414
18257
  );
18415
- RadioGroup.defaultProps = defaultProps$P;
18258
+ RadioGroup.defaultProps = defaultProps$O;
18416
18259
  RadioGroup.displayName = "NutRadioGroup";
18417
- const defaultProps$O = {
18260
+ const defaultProps$N = {
18418
18261
  ...ComponentDefaults,
18419
18262
  className: "",
18420
18263
  style: {},
@@ -18431,7 +18274,7 @@ Please add \`${key}Action\` when creating your handler.`);
18431
18274
  };
18432
18275
  const Radio = (props) => {
18433
18276
  const { children } = {
18434
- ...defaultProps$O,
18277
+ ...defaultProps$N,
18435
18278
  ...props
18436
18279
  };
18437
18280
  const {
@@ -18531,7 +18374,7 @@ Please add \`${key}Action\` when creating your handler.`);
18531
18374
  }
18532
18375
  );
18533
18376
  };
18534
- Radio.defaultProps = defaultProps$O;
18377
+ Radio.defaultProps = defaultProps$N;
18535
18378
  Radio.displayName = "NutRadio";
18536
18379
  Radio.RadioGroup = RadioGroup;
18537
18380
  const fullClone = {
@@ -18797,7 +18640,7 @@ Please add \`${key}Action\` when creating your handler.`);
18797
18640
  }
18798
18641
  }
18799
18642
  };
18800
- const defaultProps$N = {
18643
+ const defaultProps$M = {
18801
18644
  range: false,
18802
18645
  hiddenRange: false,
18803
18646
  hiddenTag: false,
@@ -18833,8 +18676,8 @@ Please add \`${key}Action\` when creating your handler.`);
18833
18676
  minDesc,
18834
18677
  maxDesc,
18835
18678
  curValueDesc
18836
- } = { ...defaultProps$N, ...props };
18837
- let { min, max, step } = { ...defaultProps$N, ...props };
18679
+ } = { ...defaultProps$M, ...props };
18680
+ let { min, max, step } = { ...defaultProps$M, ...props };
18838
18681
  min = Number(min);
18839
18682
  max = Number(max);
18840
18683
  step = Number(step);
@@ -19173,9 +19016,9 @@ Please add \`${key}Action\` when creating your handler.`);
19173
19016
  !hiddenRange ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max", children: maxDesc || +max }) : null
19174
19017
  ] });
19175
19018
  };
19176
- Range.defaultProps = defaultProps$N;
19019
+ Range.defaultProps = defaultProps$M;
19177
19020
  Range.displayName = "NutRange";
19178
- const defaultProps$M = {
19021
+ const defaultProps$L = {
19179
19022
  ...ComponentDefaults,
19180
19023
  count: 5,
19181
19024
  min: 0,
@@ -19200,7 +19043,7 @@ Please add \`${key}Action\` when creating your handler.`);
19200
19043
  allowHalf,
19201
19044
  onChange
19202
19045
  } = {
19203
- ...defaultProps$M,
19046
+ ...defaultProps$L,
19204
19047
  ...props
19205
19048
  };
19206
19049
  const classPrefix2 = "nut-rate";
@@ -19285,9 +19128,9 @@ Please add \`${key}Action\` when creating your handler.`);
19285
19128
  }
19286
19129
  );
19287
19130
  };
19288
- Rate.defaultProps = defaultProps$M;
19131
+ Rate.defaultProps = defaultProps$L;
19289
19132
  Rate.displayName = "NutRate";
19290
- const defaultProps$L = {
19133
+ const defaultProps$K = {
19291
19134
  ...ComponentDefaults,
19292
19135
  placeholder: "",
19293
19136
  shape: "square",
@@ -19335,7 +19178,7 @@ Please add \`${key}Action\` when creating your handler.`);
19335
19178
  onClickRightinIcon,
19336
19179
  onClickRightoutIcon
19337
19180
  } = {
19338
- ...defaultProps$L,
19181
+ ...defaultProps$K,
19339
19182
  ...props
19340
19183
  };
19341
19184
  const alignClass = `${align}`;
@@ -19518,9 +19361,9 @@ Please add \`${key}Action\` when creating your handler.`);
19518
19361
  }
19519
19362
  );
19520
19363
  };
19521
- SearchBar.defaultProps = defaultProps$L;
19364
+ SearchBar.defaultProps = defaultProps$K;
19522
19365
  SearchBar.displayName = "NutSearchBar";
19523
- const defaultProps$K = {
19366
+ const defaultProps$J = {
19524
19367
  ...ComponentDefaults,
19525
19368
  title: "",
19526
19369
  description: "",
@@ -19684,9 +19527,9 @@ Please add \`${key}Action\` when creating your handler.`);
19684
19527
  }
19685
19528
  ) });
19686
19529
  };
19687
- ShortPassword.defaultProps = defaultProps$K;
19530
+ ShortPassword.defaultProps = defaultProps$J;
19688
19531
  ShortPassword.displayName = "NutShortPassword";
19689
- const defaultProps$J = {
19532
+ const defaultProps$I = {
19690
19533
  type: "png",
19691
19534
  lineWidth: 2,
19692
19535
  strokeStyle: "#000",
@@ -19707,7 +19550,7 @@ Please add \`${key}Action\` when creating your handler.`);
19707
19550
  onClear,
19708
19551
  ...rest
19709
19552
  } = {
19710
- ...defaultProps$J,
19553
+ ...defaultProps$I,
19711
19554
  ...props
19712
19555
  };
19713
19556
  const b = cn("signature");
@@ -19821,9 +19664,9 @@ Please add \`${key}Action\` when creating your handler.`);
19821
19664
  )
19822
19665
  ] });
19823
19666
  };
19824
- Signature.defaultProps = defaultProps$J;
19667
+ Signature.defaultProps = defaultProps$I;
19825
19668
  Signature.displayName = "NutSignature";
19826
- const defaultProps$I = {
19669
+ const defaultProps$H = {
19827
19670
  ...ComponentDefaults,
19828
19671
  disabled: false,
19829
19672
  activeText: "",
@@ -19840,7 +19683,7 @@ Please add \`${key}Action\` when creating your handler.`);
19840
19683
  style,
19841
19684
  onChange
19842
19685
  } = {
19843
- ...defaultProps$I,
19686
+ ...defaultProps$H,
19844
19687
  ...props
19845
19688
  };
19846
19689
  const classPrefix2 = "nut-switch";
@@ -19862,9 +19705,9 @@ Please add \`${key}Action\` when creating your handler.`);
19862
19705
  activeText && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: value ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label open`, children: activeText }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label close`, children: inactiveText }) })
19863
19706
  ] }) });
19864
19707
  };
19865
- Switch.defaultProps = defaultProps$I;
19708
+ Switch.defaultProps = defaultProps$H;
19866
19709
  Switch.displayName = "NutSwitch";
19867
- const defaultProps$H = {
19710
+ const defaultProps$G = {
19868
19711
  defaultValue: "",
19869
19712
  textAlign: "left",
19870
19713
  limitshow: false,
@@ -19892,7 +19735,7 @@ Please add \`${key}Action\` when creating your handler.`);
19892
19735
  onChange,
19893
19736
  onBlur,
19894
19737
  onFocus
19895
- } = { ...defaultProps$H, ...props };
19738
+ } = { ...defaultProps$G, ...props };
19896
19739
  const textareaBem = cn("textarea");
19897
19740
  const [inputValue, SetInputValue] = React.useState("");
19898
19741
  const textareaRef = React.useRef(null);
@@ -20007,9 +19850,9 @@ Please add \`${key}Action\` when creating your handler.`);
20007
19850
  }
20008
19851
  );
20009
19852
  };
20010
- TextArea.defaultProps = defaultProps$H;
19853
+ TextArea.defaultProps = defaultProps$G;
20011
19854
  TextArea.displayName = "NutTextArea";
20012
- const defaultProps$G = {
19855
+ const defaultProps$F = {
20013
19856
  ...ComponentDefaults,
20014
19857
  percent: 0,
20015
19858
  showText: false,
@@ -20028,7 +19871,7 @@ Please add \`${key}Action\` when creating your handler.`);
20028
19871
  children,
20029
19872
  ...rest
20030
19873
  } = {
20031
- ...defaultProps$G,
19874
+ ...defaultProps$F,
20032
19875
  ...props
20033
19876
  };
20034
19877
  const classPrefix2 = "nut-progress";
@@ -20065,7 +19908,7 @@ Please add \`${key}Action\` when creating your handler.`);
20065
19908
  }
20066
19909
  ) }) }) });
20067
19910
  };
20068
- Progress.defaultProps = defaultProps$G;
19911
+ Progress.defaultProps = defaultProps$F;
20069
19912
  Progress.displayName = "NutProgress";
20070
19913
  class UploadOptions {
20071
19914
  constructor() {
@@ -20162,7 +20005,7 @@ Please add \`${key}Action\` when creating your handler.`);
20162
20005
  done();
20163
20006
  }
20164
20007
  };
20165
- const defaultProps$F = {
20008
+ const defaultProps$E = {
20166
20009
  ...ComponentDefaults,
20167
20010
  url: "",
20168
20011
  maxCount: 1,
@@ -20244,7 +20087,7 @@ Please add \`${key}Action\` when creating your handler.`);
20244
20087
  beforeXhrUpload,
20245
20088
  beforeDelete,
20246
20089
  ...restProps
20247
- } = { ...defaultProps$F, ...props };
20090
+ } = { ...defaultProps$E, ...props };
20248
20091
  const [fileList, setFileList] = React.useState(defaultValue || []);
20249
20092
  const [uploadQueue, setUploadQueue] = React.useState([]);
20250
20093
  React.useEffect(() => {
@@ -20615,9 +20458,9 @@ Please add \`${key}Action\` when creating your handler.`);
20615
20458
  ] });
20616
20459
  };
20617
20460
  const Uploader = React.forwardRef(InternalUploader);
20618
- Uploader.defaultProps = defaultProps$F;
20461
+ Uploader.defaultProps = defaultProps$E;
20619
20462
  Uploader.displayName = "NutUploader";
20620
- const defaultProps$E = {
20463
+ const defaultProps$D = {
20621
20464
  cancelText: "",
20622
20465
  optionTag: "name",
20623
20466
  optionSubTag: "subname",
@@ -20651,7 +20494,7 @@ Please add \`${key}Action\` when creating your handler.`);
20651
20494
  className,
20652
20495
  style,
20653
20496
  ...rest
20654
- } = { ...defaultProps$E, ...props };
20497
+ } = { ...defaultProps$D, ...props };
20655
20498
  const b = cn("actionsheet");
20656
20499
  const isHighlight = (item) => {
20657
20500
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
@@ -20696,52 +20539,8 @@ Please add \`${key}Action\` when creating your handler.`);
20696
20539
  }
20697
20540
  );
20698
20541
  };
20699
- ActionSheet.defaultProps = defaultProps$E;
20542
+ ActionSheet.defaultProps = defaultProps$D;
20700
20543
  ActionSheet.displayName = "NutActionSheet";
20701
- const defaultProps$D = {
20702
- ...ComponentDefaults,
20703
- value: "",
20704
- dot: false,
20705
- max: 99,
20706
- top: "0",
20707
- right: "5",
20708
- color: ""
20709
- };
20710
- const Badge = (props) => {
20711
- const { className, style, value, max, children, dot, top, right, color } = {
20712
- ...defaultProps$D,
20713
- ...props
20714
- };
20715
- const classPrefix2 = "nut-badge";
20716
- const classes = classNames(classPrefix2, className);
20717
- const contentClasses = classNames(
20718
- { [`${classPrefix2}__dot`]: dot },
20719
- `${classPrefix2}__content`,
20720
- `${classPrefix2}__sup`
20721
- );
20722
- function content() {
20723
- if (dot || typeof value === "object")
20724
- return null;
20725
- if (typeof value === "number" && typeof max === "number") {
20726
- return max < value ? `${max}+` : value;
20727
- }
20728
- return value;
20729
- }
20730
- const getStyle = () => {
20731
- const style2 = {};
20732
- style2.top = `${Number(top) || parseFloat(top) || 0}px`;
20733
- style2.right = `${Number(right) || parseFloat(right) || 0}px`;
20734
- style2.background = color;
20735
- return style2;
20736
- };
20737
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
20738
- typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
20739
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
20740
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
20741
- ] });
20742
- };
20743
- Badge.defaultProps = defaultProps$D;
20744
- Badge.displayName = "NutBadge";
20745
20544
  function ConfirmDialog(props) {
20746
20545
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { ...props, children: props.content });
20747
20546
  }
@@ -22749,7 +22548,7 @@ Please add \`${key}Action\` when creating your handler.`);
22749
22548
  onClick: (event) => {
22750
22549
  }
22751
22550
  };
22752
- const classPrefix$1 = `nut-animate`;
22551
+ const classPrefix$2 = `nut-animate`;
22753
22552
  const Animate = (props) => {
22754
22553
  const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
22755
22554
  ...defaultProps$s,
@@ -22758,7 +22557,7 @@ Please add \`${key}Action\` when creating your handler.`);
22758
22557
  const [clicked, setClicked] = React.useState(false);
22759
22558
  const classes = classNames({
22760
22559
  "nut-ani-container": true,
22761
- [`${classPrefix$1}-${type2}`]: action === "initial" || clicked ? type2 : false,
22560
+ [`${classPrefix$2}-${type2}`]: action === "initial" || clicked ? type2 : false,
22762
22561
  loop: loop2
22763
22562
  });
22764
22563
  const cls = classNames(classes, className);
@@ -23155,24 +22954,26 @@ Please add \`${key}Action\` when creating your handler.`);
23155
22954
  AvatarGroup.defaultProps = defaultProps$o;
23156
22955
  AvatarGroup.displayName = "NutAvatarGroup";
23157
22956
  const defaultProps$n = {
22957
+ ...ComponentDefaults,
23158
22958
  strokeWidth: 5,
23159
22959
  radius: 50,
23160
22960
  strokeLinecap: "round",
23161
- circleColor: "",
23162
- pathColor: "",
22961
+ color: "#fa2c19",
22962
+ background: "#e5e9f2",
23163
22963
  clockwise: true
23164
22964
  };
22965
+ const classPrefix$1 = `nut-circleprogress`;
23165
22966
  const CircleProgress = (props) => {
23166
22967
  var _a2;
23167
22968
  const {
23168
22969
  children,
23169
- progress,
22970
+ percent,
23170
22971
  className,
23171
22972
  radius,
23172
- pathColor,
23173
22973
  clockwise,
23174
- circleColor,
23175
22974
  strokeWidth,
22975
+ color,
22976
+ background,
23176
22977
  style,
23177
22978
  strokeLinecap,
23178
22979
  ...restProps
@@ -23180,8 +22981,7 @@ Please add \`${key}Action\` when creating your handler.`);
23180
22981
  ...defaultProps$n,
23181
22982
  ...props
23182
22983
  };
23183
- const b = cn("circleprogress");
23184
- const classes = classNames(className, b(""));
22984
+ const classes = classNames(className, classPrefix$1);
23185
22985
  const refRandomId = Math.random().toString(36).slice(-8);
23186
22986
  const styles = {
23187
22987
  height: `${Number(radius) * 2}px`,
@@ -23189,13 +22989,13 @@ Please add \`${key}Action\` when creating your handler.`);
23189
22989
  ...style
23190
22990
  };
23191
22991
  const pathStyle = {
23192
- stroke: pathColor
22992
+ stroke: background
23193
22993
  };
23194
22994
  const hoverStyle = () => {
23195
22995
  const perimeter = 283;
23196
- const offset = perimeter * Number(progress) / 100;
22996
+ const offset = perimeter * Number(percent) / 100;
23197
22997
  return {
23198
- stroke: isObject(circleColor) ? `url(#${refRandomId})` : circleColor,
22998
+ stroke: isObject(color) ? `url(#${refRandomId})` : color,
23199
22999
  strokeDasharray: `${offset}px ${perimeter}px`
23200
23000
  };
23201
23001
  };
@@ -23203,16 +23003,13 @@ Please add \`${key}Action\` when creating your handler.`);
23203
23003
  const isWise = clockwise ? 1 : 0;
23204
23004
  return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
23205
23005
  };
23206
- const hoverColor = () => {
23207
- return isObject(circleColor) ? `url(#${refRandomId})` : circleColor;
23208
- };
23209
23006
  const stop2 = () => {
23210
- if (!isObject(circleColor)) {
23007
+ if (!isObject(props.color)) {
23211
23008
  return;
23212
23009
  }
23213
- const color = circleColor;
23214
- const colorArr = Object.keys(color).sort(
23215
- (a2, b2) => parseFloat(a2) - parseFloat(b2)
23010
+ const color2 = props.color;
23011
+ const colorArr = Object.keys(color2).sort(
23012
+ (a2, b) => parseFloat(a2) - parseFloat(b)
23216
23013
  );
23217
23014
  const stopArr = [];
23218
23015
  colorArr.map((item) => {
@@ -23221,7 +23018,7 @@ Please add \`${key}Action\` when creating your handler.`);
23221
23018
  value: ""
23222
23019
  };
23223
23020
  obj.key = item;
23224
- obj.value = color[item];
23021
+ obj.value = color2[item];
23225
23022
  stopArr.push(obj);
23226
23023
  });
23227
23024
  return stopArr;
@@ -23235,8 +23032,8 @@ Please add \`${key}Action\` when creating your handler.`);
23235
23032
  "path",
23236
23033
  {
23237
23034
  className: "nut-circleprogress-path",
23238
- style: pathStyle,
23239
23035
  d: path(),
23036
+ style: pathStyle,
23240
23037
  fill: "none",
23241
23038
  strokeWidth
23242
23039
  }
@@ -23248,17 +23045,13 @@ Please add \`${key}Action\` when creating your handler.`);
23248
23045
  style: hoverStyle(),
23249
23046
  d: path(),
23250
23047
  fill: "none",
23251
- stroke: hoverColor(),
23252
23048
  strokeLinecap,
23253
23049
  transform: "rotate(90,50,50)",
23254
23050
  strokeWidth
23255
23051
  }
23256
23052
  )
23257
23053
  ] }),
23258
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
23259
- progress,
23260
- "%"
23261
- ] }) })
23054
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children })
23262
23055
  ] });
23263
23056
  };
23264
23057
  CircleProgress.defaultProps = defaultProps$n;