@nutui/nutui-react 2.0.17 → 2.0.18-beta.1

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 (79) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/esm/Avatar/style/index.js +2 -1
  3. package/dist/esm/Avatar/style/style.css +1 -1
  4. package/dist/esm/BackTop.js +1 -1
  5. package/dist/esm/Badge/style/style.css +1 -1
  6. package/dist/esm/Button.js +5 -84
  7. package/dist/esm/Dialog/style/style.css +1 -1
  8. package/dist/esm/Dialog.js +1 -1
  9. package/dist/esm/FixedNav/style/style.css +1 -1
  10. package/dist/esm/Form.js +8 -1235
  11. package/dist/esm/ImagePreview/style/index.js +2 -1
  12. package/dist/esm/ImagePreview/style/style.css +1 -1
  13. package/dist/esm/Indicator.js +3 -54
  14. package/dist/esm/Menu/style/style.css +1 -1
  15. package/dist/esm/Menu.js +16 -9
  16. package/dist/esm/MenuItem/style/style.css +1 -1
  17. package/dist/esm/MenuItem.js +3 -0
  18. package/dist/esm/Skeleton/style/style.css +1 -1
  19. package/dist/esm/Sticky.js +1 -1
  20. package/dist/esm/Swiper/style/index.js +2 -1
  21. package/dist/esm/Swiper/style/style.css +1 -1
  22. package/dist/esm/Swiper.js +5 -5
  23. package/dist/esm/Tabbar/style/style.css +1 -1
  24. package/dist/esm/TabbarItem/style/style.css +1 -1
  25. package/dist/esm/Toast/style/style.css +1 -1
  26. package/dist/esm/Tour/style/index.js +1 -1
  27. package/dist/esm/Tour/style/style.css +1 -1
  28. package/dist/esm/Uploader/style/style.css +1 -1
  29. package/dist/esm/Uploader.js +12 -8
  30. package/dist/esm/badge2.js +2 -2
  31. package/dist/esm/button2.js +87 -0
  32. package/dist/esm/date.js +4 -6
  33. package/dist/esm/formitem2.js +1288 -51
  34. package/dist/esm/indicator2.js +57 -0
  35. package/dist/esm/menuitem2.js +32 -9
  36. package/dist/esm/popup2.js +1 -1
  37. package/dist/esm/types/src/packages/badge/badge.d.ts +2 -2
  38. package/dist/esm/types/src/packages/badge/badge.taro.d.ts +2 -2
  39. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  40. package/dist/esm/types/src/packages/form/types.d.ts +4 -4
  41. package/dist/esm/types/src/packages/form/useform.d.ts +2 -1
  42. package/dist/esm/types/src/packages/form/useform.taro.d.ts +2 -1
  43. package/dist/esm/types/src/packages/menu/menu.d.ts +3 -2
  44. package/dist/esm/types/src/packages/menu/menu.taro.d.ts +3 -2
  45. package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +1 -0
  46. package/dist/esm/types/src/packages/menuitem/menuitem.taro.d.ts +1 -0
  47. package/dist/esm/types/src/packages/notify/notify.taro.d.ts +1 -1
  48. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +1 -1
  49. package/dist/esm/types/src/utils/date.d.ts +1 -1
  50. package/dist/locales/base.js +1 -1
  51. package/dist/locales/en-US.js +1 -1
  52. package/dist/locales/id-ID.js +1 -1
  53. package/dist/locales/tr-TR.js +1 -1
  54. package/dist/locales/zh-CN.js +1 -1
  55. package/dist/locales/zh-TW.js +1 -1
  56. package/dist/locales/zh-UG.js +1 -1
  57. package/dist/nutui.react.es.js +81 -46
  58. package/dist/nutui.react.umd.js +81 -46
  59. package/dist/packages/badge/badge.scss +1 -0
  60. package/dist/packages/dialog/dialog.scss +7 -1
  61. package/dist/packages/fixednav/fixednav.scss +1 -8
  62. package/dist/packages/menuitem/menuitem.scss +2 -2
  63. package/dist/packages/toast/toast.scss +2 -1
  64. package/dist/packages/tour/tour.scss +1 -0
  65. package/dist/packages/uploader/uploader.scss +12 -12
  66. package/dist/style.css +1 -1
  67. package/dist/style.mjs +1 -1
  68. package/dist/styles/variables-jmapp.scss +9 -3
  69. package/dist/styles/variables.scss +10 -3
  70. package/dist/types/packages/badge/badge.d.ts +6 -6
  71. package/dist/types/packages/configprovider/types.d.ts +1 -1
  72. package/dist/types/packages/form/types.d.ts +4 -4
  73. package/dist/types/packages/form/useform.d.ts +2 -1
  74. package/dist/types/packages/formitem/formitem.d.ts +1 -1
  75. package/dist/types/packages/menu/menu.d.ts +11 -2
  76. package/dist/types/packages/menuitem/menuitem.d.ts +6 -1
  77. package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
  78. package/dist/types/utils/date.d.ts +1 -1
  79. 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.17 Wed Sep 13 2023 17:08:08 GMT+0800 (中国标准时间)
12
+ * @nutui/nutui-react v2.0.18 Wed Sep 20 2023 14:59:05 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -6129,7 +6129,7 @@ Check the top-level render call using <` + t + ">.");
6129
6129
  ...ComponentDefaults,
6130
6130
  position: "top",
6131
6131
  threshold: 0,
6132
- zIndex: 2e3
6132
+ zIndex: 900
6133
6133
  };
6134
6134
  const classPrefix$j = "nut-sticky";
6135
6135
  const Sticky = (props) => {
@@ -6265,7 +6265,7 @@ Check the top-level render call using <` + t + ">.");
6265
6265
  ...ComponentDefaults,
6266
6266
  target: "",
6267
6267
  threshold: 200,
6268
- zIndex: 10,
6268
+ zIndex: 900,
6269
6269
  duration: 1e3
6270
6270
  };
6271
6271
  const BackTop = (props) => {
@@ -11864,7 +11864,7 @@ Please add \`${key}Action\` when creating your handler.`);
11864
11864
  onCloseIconClick: (e) => true,
11865
11865
  ...defaultOverlayProps
11866
11866
  };
11867
- let _zIndex = 1e3;
11867
+ let _zIndex = 1100;
11868
11868
  const Popup = (props) => {
11869
11869
  const {
11870
11870
  children,
@@ -12232,8 +12232,8 @@ Please add \`${key}Action\` when creating your handler.`);
12232
12232
  }
12233
12233
  const getStyle = () => {
12234
12234
  const style2 = {};
12235
- style2.top = `${Number(top) || parseFloat(top) || 0}px`;
12236
- style2.right = `${Number(right) || parseFloat(right) || 0}px`;
12235
+ style2.top = `${Number(top) || parseFloat(String(top)) || 0}px`;
12236
+ style2.right = `${Number(right) || parseFloat(String(right)) || 0}px`;
12237
12237
  style2.background = color;
12238
12238
  return style2;
12239
12239
  };
@@ -13311,7 +13311,7 @@ Please add \`${key}Action\` when creating your handler.`);
13311
13311
  * @return {Boolse} true|false
13312
13312
  */
13313
13313
  isLeapYear(y2) {
13314
- return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0;
13314
+ return y2 % 4 === 0 && y2 % 100 !== 0 || y2 % 400 === 0;
13315
13315
  },
13316
13316
  /**
13317
13317
  * 返回星期数
@@ -13414,9 +13414,9 @@ Please add \`${key}Action\` when creating your handler.`);
13414
13414
  * 时间是否相等
13415
13415
  * @return {Boolean}
13416
13416
  */
13417
- isEqual(date1 = "", date2) {
13418
- const startTime = new Date(date1.replace("-", "/")).getTime();
13419
- const endTime = new Date(date2.replace("-", "/")).getTime();
13417
+ isEqual(date1, date2) {
13418
+ const startTime = new Date((date1 || "").replace(/-/g, "/")).getTime();
13419
+ const endTime = new Date(date2.replace(/-/g, "/")).getTime();
13420
13420
  if (startTime === endTime) {
13421
13421
  return true;
13422
13422
  }
@@ -16413,6 +16413,7 @@ Please add \`${key}Action\` when creating your handler.`);
16413
16413
  Schema.warning = warning;
16414
16414
  Schema.messages = messages;
16415
16415
  Schema.validators = validators;
16416
+ const SECRET = "NUT_FORM_INTERNAL";
16416
16417
  class FormStore {
16417
16418
  constructor() {
16418
16419
  // 初始化数据
@@ -16448,12 +16449,12 @@ Please add \`${key}Action\` when creating your handler.`);
16448
16449
  /**
16449
16450
  * 获取全部字段
16450
16451
  */
16451
- __publicField(this, "getFieldsValue", (name) => {
16452
- if (typeof name === "boolean") {
16452
+ __publicField(this, "getFieldsValue", (nameList) => {
16453
+ if (typeof nameList === "boolean") {
16453
16454
  return JSON.parse(JSON.stringify(this.store));
16454
16455
  }
16455
16456
  const fieldsValue = {};
16456
- name.forEach((field) => {
16457
+ nameList.forEach((field) => {
16457
16458
  fieldsValue[field] = this.getFieldValue(field);
16458
16459
  });
16459
16460
  return fieldsValue;
@@ -16573,20 +16574,27 @@ Please add \`${key}Action\` when creating your handler.`);
16573
16574
  __publicField(this, "dispatch", ({ name }) => {
16574
16575
  this.validateFields([name]);
16575
16576
  });
16577
+ __publicField(this, "getInternal", (key) => {
16578
+ if (key === SECRET) {
16579
+ return {
16580
+ registerField: this.registerField,
16581
+ setCallback: this.setCallback,
16582
+ setInitialValues: this.setInitialValues,
16583
+ dispatch: this.dispatch,
16584
+ store: this.store,
16585
+ fieldEntities: this.fieldEntities
16586
+ };
16587
+ }
16588
+ });
16576
16589
  __publicField(this, "getForm", () => {
16577
16590
  return {
16578
- dispatch: this.dispatch,
16579
- setInitialValues: this.setInitialValues,
16580
- setCallback: this.setCallback,
16581
- registerField: this.registerField,
16582
16591
  getFieldValue: this.getFieldValue,
16583
16592
  getFieldsValue: this.getFieldsValue,
16584
16593
  setFieldsValue: this.setFieldsValue,
16585
16594
  resetFields: this.resetFields,
16586
16595
  submit: this.submit,
16587
- store: this.store,
16588
16596
  errors: this.errors,
16589
- fieldEntities: this.fieldEntities
16597
+ getInternal: this.getInternal
16590
16598
  };
16591
16599
  });
16592
16600
  this.callbacks = {
@@ -16651,7 +16659,8 @@ Please add \`${key}Action\` when creating your handler.`);
16651
16659
  }
16652
16660
  React.useImperativeHandle(ref, () => formInstance);
16653
16661
  formInstance.starPosition = starPosition;
16654
- const { setCallback, submit, resetFields, setInitialValues } = formInstance;
16662
+ const { submit, resetFields } = formInstance;
16663
+ const { setCallback, setInitialValues } = formInstance.getInternal(SECRET);
16655
16664
  setCallback({
16656
16665
  onFinish,
16657
16666
  onFinishFailed
@@ -16713,7 +16722,8 @@ Please add \`${key}Action\` when creating your handler.`);
16713
16722
  // children添加value属性和onChange事件
16714
16723
  __publicField(this, "getControlled", (children) => {
16715
16724
  var _a2;
16716
- const { setFieldsValue, getFieldValue, dispatch } = this.context;
16725
+ const { setFieldsValue, getFieldValue } = this.context;
16726
+ const { dispatch } = this.context.getInternal(SECRET);
16717
16727
  const { name = "" } = this.props;
16718
16728
  if ((_a2 = children == null ? void 0 : children.props) == null ? void 0 : _a2.defaultValue) {
16719
16729
  console.warn("通过 initialValue 设置初始值");
@@ -16822,7 +16832,8 @@ Please add \`${key}Action\` when creating your handler.`);
16822
16832
  };
16823
16833
  }
16824
16834
  componentDidMount() {
16825
- this.cancelRegister = this.context.registerField(this);
16835
+ const { registerField } = this.context.getInternal(SECRET);
16836
+ this.cancelRegister = registerField(this);
16826
16837
  }
16827
16838
  componentWillUnmount() {
16828
16839
  if (this.cancelRegister) {
@@ -17331,6 +17342,7 @@ Please add \`${key}Action\` when creating your handler.`);
17331
17342
  columns: 1,
17332
17343
  direction: "down",
17333
17344
  icon: null,
17345
+ closeOnClickAway: true,
17334
17346
  activeTitleClass: "",
17335
17347
  inactiveTitleClass: "",
17336
17348
  onChange: (value) => void 0
@@ -17341,6 +17353,7 @@ Please add \`${key}Action\` when creating your handler.`);
17341
17353
  style,
17342
17354
  options: options2,
17343
17355
  value,
17356
+ defaultValue,
17344
17357
  columns,
17345
17358
  title,
17346
17359
  icon,
@@ -17359,7 +17372,15 @@ Please add \`${key}Action\` when creating your handler.`);
17359
17372
  ...props
17360
17373
  };
17361
17374
  const [showPopup, setShowPopup] = React.useState(show2);
17362
- const [innerValue, setValue] = React.useState(value);
17375
+ const [innerValue, setValue] = usePropsValue({
17376
+ defaultValue,
17377
+ value,
17378
+ finalValue: void 0,
17379
+ onChange: (v) => {
17380
+ const [option] = options2.filter((o) => o.value === v);
17381
+ onChange == null ? void 0 : onChange(option);
17382
+ }
17383
+ });
17363
17384
  React.useEffect(() => {
17364
17385
  setShowPopup(show2);
17365
17386
  }, [show2]);
@@ -17367,7 +17388,9 @@ Please add \`${key}Action\` when creating your handler.`);
17367
17388
  getParentOffset();
17368
17389
  }, [showPopup]);
17369
17390
  React.useImperativeHandle(ref, () => ({
17370
- toggle: parent.toggleMenuItem
17391
+ toggle: (s) => {
17392
+ s ? parent.toggleMenuItem(index) : parent.hideMenuItem(index);
17393
+ }
17371
17394
  }));
17372
17395
  const getIconCName = (optionVal, value2) => {
17373
17396
  return classNames({
@@ -17384,7 +17407,6 @@ Please add \`${key}Action\` when creating your handler.`);
17384
17407
  parent.toggleMenuItem(index);
17385
17408
  setTitle(item.text);
17386
17409
  setValue(item.value);
17387
- onChange && onChange(item);
17388
17410
  };
17389
17411
  const isShow = () => {
17390
17412
  if (showPopup)
@@ -17395,6 +17417,9 @@ Please add \`${key}Action\` when creating your handler.`);
17395
17417
  top: 0,
17396
17418
  height: 0
17397
17419
  });
17420
+ const scrollParent = React.useMemo(() => {
17421
+ return getScrollParent(parent.menuRef, window);
17422
+ }, [parent.menuRef]);
17398
17423
  const getParentOffset = () => {
17399
17424
  setTimeout(() => {
17400
17425
  const p = parent.menuRef.current;
@@ -17405,6 +17430,12 @@ Please add \`${key}Action\` when creating your handler.`);
17405
17430
  });
17406
17431
  });
17407
17432
  };
17433
+ React.useEffect(() => {
17434
+ scrollParent == null ? void 0 : scrollParent.addEventListener("scroll", getParentOffset, false);
17435
+ return () => {
17436
+ scrollParent == null ? void 0 : scrollParent.removeEventListener("scroll", getParentOffset, false);
17437
+ };
17438
+ }, []);
17408
17439
  const getPosition = () => {
17409
17440
  return direction === "down" ? {
17410
17441
  top: `${position.top + position.height}px`,
@@ -17436,7 +17467,7 @@ Please add \`${key}Action\` when creating your handler.`);
17436
17467
  className: "nut-menu-item-container",
17437
17468
  ref: micRef
17438
17469
  },
17439
- /* @__PURE__ */ React.createElement(
17470
+ parent.overlay ? /* @__PURE__ */ React.createElement(
17440
17471
  Overlay,
17441
17472
  {
17442
17473
  className: "nut-menu__overlay",
@@ -17448,7 +17479,7 @@ Please add \`${key}Action\` when creating your handler.`);
17448
17479
  parent.closeOnOverlayClick && parent.toggleMenuItem(index);
17449
17480
  }
17450
17481
  }
17451
- ),
17482
+ ) : null,
17452
17483
  /* @__PURE__ */ React.createElement(
17453
17484
  "div",
17454
17485
  {
@@ -17514,10 +17545,11 @@ Please add \`${key}Action\` when creating your handler.`);
17514
17545
  closeOnOverlayClick: true,
17515
17546
  scrollFixed: false,
17516
17547
  lockScroll: true,
17548
+ overlay: true,
17517
17549
  icon: null,
17518
- onOpen: () => {
17550
+ onOpen: (index) => {
17519
17551
  },
17520
- onClose: () => {
17552
+ onClose: (index) => {
17521
17553
  }
17522
17554
  };
17523
17555
  const Menu = (props) => {
@@ -17526,6 +17558,7 @@ Please add \`${key}Action\` when creating your handler.`);
17526
17558
  icon,
17527
17559
  scrollFixed,
17528
17560
  lockScroll,
17561
+ overlay,
17529
17562
  closeOnOverlayClick,
17530
17563
  children,
17531
17564
  activeColor,
@@ -17558,9 +17591,9 @@ Please add \`${key}Action\` when creating your handler.`);
17558
17591
  const toggleMenuItem = (index) => {
17559
17592
  showMenuItem[index] = !showMenuItem[index];
17560
17593
  if (showMenuItem[index]) {
17561
- onOpen && onOpen();
17594
+ onOpen && onOpen(index);
17562
17595
  } else {
17563
- onClose && onClose();
17596
+ onClose && onClose(index);
17564
17597
  }
17565
17598
  const temp = showMenuItem.map(
17566
17599
  (i, idx) => idx === index ? i : false
@@ -17570,7 +17603,7 @@ Please add \`${key}Action\` when creating your handler.`);
17570
17603
  const hideMenuItem = (index) => {
17571
17604
  showMenuItem[index] = false;
17572
17605
  setShowMenuItem([...showMenuItem]);
17573
- onClose && onClose();
17606
+ onClose && onClose(index);
17574
17607
  };
17575
17608
  const updateTitle = (text, index) => {
17576
17609
  menuItemTitle[index] = text;
@@ -17585,6 +17618,7 @@ Please add \`${key}Action\` when creating your handler.`);
17585
17618
  activeColor,
17586
17619
  parent: {
17587
17620
  closeOnOverlayClick,
17621
+ overlay,
17588
17622
  lockScroll,
17589
17623
  toggleMenuItem,
17590
17624
  updateTitle,
@@ -17597,9 +17631,9 @@ Please add \`${key}Action\` when creating your handler.`);
17597
17631
  const menuTitle = () => {
17598
17632
  return React.Children.map(children, (child, index) => {
17599
17633
  if (React.isValidElement(child)) {
17600
- const { title, options: options2, value, disabled, direction } = child.props;
17634
+ const { title, options: options2, value, defaultValue, disabled, direction } = child.props;
17601
17635
  const selected = options2 == null ? void 0 : options2.filter(
17602
- (option) => option.value === value
17636
+ (option) => option.value === (value !== void 0 ? value : defaultValue)
17603
17637
  );
17604
17638
  const finallyTitle = () => {
17605
17639
  if (title)
@@ -17621,6 +17655,8 @@ Please add \`${key}Action\` when creating your handler.`);
17621
17655
  key: index,
17622
17656
  onClick: (e) => {
17623
17657
  e.stopPropagation();
17658
+ if ((!options2 || !options2.length) && !child.props.children)
17659
+ return;
17624
17660
  !disabled && toggleMenuItem(index);
17625
17661
  }
17626
17662
  },
@@ -19474,7 +19510,7 @@ Please add \`${key}Action\` when creating your handler.`);
19474
19510
  const handleItemClick = (file) => {
19475
19511
  onFileItemClick && onFileItemClick(file);
19476
19512
  };
19477
- return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React.createElement(React.Fragment, null, children, maxCount > fileList.length && /* @__PURE__ */ React.createElement(React.Fragment, null, capture ? /* @__PURE__ */ React.createElement(
19513
+ return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React.createElement(React.Fragment, null, children || /* @__PURE__ */ React.createElement(Button, { size: "small", type: "primary" }, "上传文件"), maxCount > fileList.length && /* @__PURE__ */ React.createElement(React.Fragment, null, capture ? /* @__PURE__ */ React.createElement(
19478
19514
  "input",
19479
19515
  {
19480
19516
  className: "nut-uploader__input",
@@ -19504,14 +19540,15 @@ Please add \`${key}Action\` when creating your handler.`);
19504
19540
  className: `nut-uploader__preview ${previewType}`,
19505
19541
  key: item.uid
19506
19542
  },
19507
- previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview-img" }, deletable && /* @__PURE__ */ React.createElement(
19543
+ previewType === "picture" && deletable && /* @__PURE__ */ React.createElement(
19508
19544
  x$9,
19509
19545
  {
19510
19546
  color: "rgba(0,0,0,0.6)",
19511
19547
  className: "close",
19512
19548
  onClick: () => onDeleteItem(item, index)
19513
19549
  }
19514
- ), item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React.createElement(x$9, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ React.createElement(
19550
+ ),
19551
+ previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React.createElement(x$9, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ React.createElement(
19515
19552
  k$3,
19516
19553
  {
19517
19554
  className: "nut-icon-loading",
@@ -19541,8 +19578,7 @@ Please add \`${key}Action\` when creating your handler.`);
19541
19578
  className: "nut-uploader__preview-img__file__name"
19542
19579
  },
19543
19580
  /* @__PURE__ */ React.createElement(x$6, { color: "#808080" }),
19544
- " ",
19545
- item.name
19581
+ /* @__PURE__ */ React.createElement("span", null, " ", item.name)
19546
19582
  ))), item.status === "success" ? /* @__PURE__ */ React.createElement("div", { className: "tips" }, item.name) : null),
19547
19583
  previewType === "list" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview-list" }, /* @__PURE__ */ React.createElement(
19548
19584
  "div",
@@ -19551,8 +19587,7 @@ Please add \`${key}Action\` when creating your handler.`);
19551
19587
  onClick: () => handleItemClick(item)
19552
19588
  },
19553
19589
  /* @__PURE__ */ React.createElement(x$6, null),
19554
- " ",
19555
- item.name
19590
+ /* @__PURE__ */ React.createElement("span", null, " ", item.name)
19556
19591
  ), deletable && /* @__PURE__ */ React.createElement(
19557
19592
  y$8,
19558
19593
  {
@@ -19894,7 +19929,7 @@ Please add \`${key}Action\` when creating your handler.`);
19894
19929
  Overlay,
19895
19930
  {
19896
19931
  style: overlayStyle,
19897
- className: overlayClassName,
19932
+ className: classNames("nut-dialog-overlay", overlayClassName),
19898
19933
  visible,
19899
19934
  closeOnOverlayClick,
19900
19935
  lockScroll,
@@ -23428,10 +23463,6 @@ Please add \`${key}Action\` when creating your handler.`);
23428
23463
  target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
23429
23464
  };
23430
23465
  const onTouchStart = (e) => {
23431
- if (props.preventDefault)
23432
- e.preventDefault();
23433
- if (props.stopPropagation)
23434
- e.stopPropagation();
23435
23466
  if (!props.touchable)
23436
23467
  return;
23437
23468
  touchStart(e);
@@ -23440,6 +23471,10 @@ Please add \`${key}Action\` when creating your handler.`);
23440
23471
  resetPosition();
23441
23472
  };
23442
23473
  const onTouchMove = (e) => {
23474
+ if (props.preventDefault)
23475
+ e.preventDefault();
23476
+ if (props.stopPropagation)
23477
+ e.stopPropagation();
23443
23478
  if (props.touchable && swiperRef.current.moving) {
23444
23479
  handleTouchMove(e);
23445
23480
  if (touch.stateDirection === props.direction) {
@@ -26,6 +26,7 @@
26
26
  line-height: 16px;
27
27
  border: $badge-border;
28
28
  border-radius: $badge-border-radius;
29
+ min-width: $badge-min-width;
29
30
  }
30
31
 
31
32
  &__content {
@@ -9,12 +9,18 @@
9
9
  padding: $dialog-padding;
10
10
  box-sizing: border-box;
11
11
 
12
+ &-overlay {
13
+ --nutui-overlay-zIndex: 1200;
14
+ }
15
+
12
16
  &__outer {
13
17
  position: fixed;
14
18
  max-height: 100%;
15
19
  overflow-y: auto;
16
20
  background-color: $white;
17
- transition: transform 0.2s, -webkit-transform 0.2s;
21
+ transition:
22
+ transform 0.2s,
23
+ -webkit-transform 0.2s;
18
24
  -webkit-overflow-scrolling: touch;
19
25
  top: 50%;
20
26
  left: 50%;
@@ -1,11 +1,4 @@
1
- .nut-theme-dark {
2
- .nut-fixednav {
3
- &__list {
4
- // background-color: $dark2;
5
- // color: $white;
6
- }
7
- }
8
- }
1
+
9
2
  .nut-fixednav {
10
3
  position: fixed;
11
4
  z-index: $fixednav-index;
@@ -38,7 +38,7 @@
38
38
  .nut-menu-item__wrap-up {
39
39
  position: absolute;
40
40
  width: 100%;
41
- z-index: 2052;
41
+ z-index: $menu-item-z-index;
42
42
  overflow: hidden;
43
43
  }
44
44
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  .overlay-fade-enter-active.nut-menu__overlay {
50
50
  top: auto;
51
- z-index: 2052;
51
+ z-index: $menu-item-z-index;
52
52
  }
53
53
 
54
54
  .nut-menu__pop.nut-popup {
@@ -15,9 +15,10 @@
15
15
  height: 100%;
16
16
  text-align: center;
17
17
  pointer-events: none;
18
- z-index: 9999;
18
+ z-index: 1300;
19
19
  &__overlay-default {
20
20
  --nutui-overlay-bg-color: rgba(0, 0, 0, 0);
21
+ --nutui-overlay-zIndex: 1300;
21
22
  }
22
23
  &-small {
23
24
  .nut-toast__inner {
@@ -1,3 +1,4 @@
1
+
1
2
  .nut-tour {
2
3
  &-mask {
3
4
  position: fixed;
@@ -68,6 +68,7 @@
68
68
  position: relative;
69
69
  margin-right: $uploader-preview-margin-right;
70
70
  margin-bottom: $uploader-preview-margin-bottom;
71
+ border-radius: $uploader-picture-border-radius;
71
72
  box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
72
73
 
73
74
  &__progress {
@@ -103,23 +104,20 @@
103
104
  &-list {
104
105
  width: 100%;
105
106
  height: 32px;
107
+ box-sizing: border-box;
106
108
  display: flex;
107
- flex-direction: column;
108
- position: relative;
109
+ align-items: center;
110
+ justify-content: space-between;
111
+ padding: 0 10px;
109
112
  background-color: $gray5;
110
113
 
111
114
  .nut-uploader__preview-img__file__name {
115
+ display: flex;
112
116
  -webkit-line-clamp: 1;
113
117
  padding: 2px;
114
118
  height: 24px;
115
119
  }
116
120
 
117
- .nut-uploader__preview-img__file__del {
118
- position: absolute;
119
- right: 4px;
120
- top: 6px;
121
- }
122
-
123
121
  .nut-progress {
124
122
  position: absolute;
125
123
  left: 0;
@@ -137,6 +135,7 @@
137
135
  right: $uploader-preview-close-right;
138
136
  top: $uploader-preview-close-top;
139
137
  transform: translate(50%, -50%);
138
+ z-index: 1;
140
139
  }
141
140
 
142
141
  &-img {
@@ -144,6 +143,7 @@
144
143
  width: $uploader-picture-width;
145
144
  height: $uploader-picture-height;
146
145
  border-radius: $uploader-picture-border-radius;
146
+ overflow: hidden;
147
147
 
148
148
  i {
149
149
  color: $gray1;
@@ -171,7 +171,7 @@
171
171
  width: 100%;
172
172
  height: 100%;
173
173
  position: initial;
174
- border-radius: 6px;
174
+ border-radius: $uploader-picture-border-radius;
175
175
  }
176
176
 
177
177
  &__file {
@@ -184,7 +184,7 @@
184
184
 
185
185
  &__name {
186
186
  display: flex;
187
- width: 100%;
187
+ width: 90%;
188
188
  font-size: 12px;
189
189
  color: $text-color;
190
190
 
@@ -198,8 +198,8 @@
198
198
 
199
199
  .nut-icon-link {
200
200
  &::before {
201
- margin-left: -25%;
202
- margin-top: -25%;
201
+ margin-left: -45%;
202
+ margin-top: -45%;
203
203
  transform: none;
204
204
  }
205
205
  }