@nutui/nutui-react 2.3.10 → 2.3.11

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 (129) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +3 -3
  4. package/dist/esm/Address/style/style.css +1 -1
  5. package/dist/esm/Animate/style/style.css +1 -1
  6. package/dist/esm/Audio/style/style.css +1 -1
  7. package/dist/esm/BackTop.js +1 -1
  8. package/dist/esm/Badge/style/style.css +1 -1
  9. package/dist/esm/Barrage/style/style.css +1 -1
  10. package/dist/esm/Calendar/style/style.css +1 -1
  11. package/dist/esm/Card/style/style.css +1 -1
  12. package/dist/esm/Cascader/style/style.css +1 -1
  13. package/dist/esm/Checkbox/style/style.css +1 -1
  14. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  15. package/dist/esm/Col/style/style.css +1 -1
  16. package/dist/esm/Collapse/style/style.css +1 -1
  17. package/dist/esm/CollapseItem/style/style.css +1 -1
  18. package/dist/esm/DatePicker/style/style.css +1 -1
  19. package/dist/esm/Dialog/style/style.css +1 -1
  20. package/dist/esm/Divider/style/style.css +1 -1
  21. package/dist/esm/Form/style/style.css +1 -1
  22. package/dist/esm/FormItem/style/style.css +1 -1
  23. package/dist/esm/Grid/style/style.css +1 -1
  24. package/dist/esm/GridItem/style/style.css +1 -1
  25. package/dist/esm/ImagePreview/style/style.css +1 -1
  26. package/dist/esm/Indicator/style/style.css +1 -1
  27. package/dist/esm/Input.js +4 -1
  28. package/dist/esm/InputNumber.js +107 -161
  29. package/dist/esm/Menu/style/style.css +1 -1
  30. package/dist/esm/MenuItem/style/style.css +1 -1
  31. package/dist/esm/NavBar/style/style.css +1 -1
  32. package/dist/esm/NoticeBar/style/style.css +1 -1
  33. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  34. package/dist/esm/Picker/style/style.css +1 -1
  35. package/dist/esm/Popover/style/style.css +1 -1
  36. package/dist/esm/Popup/style/style.css +1 -1
  37. package/dist/esm/Price/style/style.css +1 -1
  38. package/dist/esm/Radio/style/style.css +1 -1
  39. package/dist/esm/RadioGroup/style/style.css +1 -1
  40. package/dist/esm/Range/style/style.css +1 -1
  41. package/dist/esm/SearchBar/style/style.css +1 -1
  42. package/dist/esm/ShortPassword/style/style.css +1 -1
  43. package/dist/esm/ShortPassword.js +1 -4
  44. package/dist/esm/SideNavBar/style/style.css +1 -1
  45. package/dist/esm/Skeleton/style/style.css +1 -1
  46. package/dist/esm/Skeleton.js +2 -4
  47. package/dist/esm/Step/style/style.css +1 -1
  48. package/dist/esm/Steps/style/style.css +1 -1
  49. package/dist/esm/Swipe/style/style.css +1 -1
  50. package/dist/esm/Swiper/style/style.css +1 -1
  51. package/dist/esm/Switch/style/style.css +1 -1
  52. package/dist/esm/Tabbar/style/style.css +1 -1
  53. package/dist/esm/TabbarItem/style/style.css +1 -1
  54. package/dist/esm/Table/style/style.css +1 -1
  55. package/dist/esm/Tabs/style/style.css +1 -1
  56. package/dist/esm/TextArea/style/style.css +1 -1
  57. package/dist/esm/TimeSelect/style/style.css +1 -1
  58. package/dist/esm/Tour/style/style.css +1 -1
  59. package/dist/esm/VirtualList/style/style.css +1 -1
  60. package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +15 -15
  61. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +15 -17
  62. package/dist/locales/base.js +1 -1
  63. package/dist/locales/en-US.js +1 -1
  64. package/dist/locales/id-ID.js +1 -1
  65. package/dist/locales/tr-TR.js +1 -1
  66. package/dist/locales/zh-CN.js +1 -1
  67. package/dist/locales/zh-TW.js +1 -1
  68. package/dist/locales/zh-UG.js +1 -1
  69. package/dist/nutui.react.es.js +135 -185
  70. package/dist/nutui.react.umd.js +135 -185
  71. package/dist/packages/animate/animate.scss +0 -27
  72. package/dist/packages/audio/audio.scss +0 -5
  73. package/dist/packages/avatarcropper/avatarcropper.scss +0 -2
  74. package/dist/packages/badge/badge.scss +7 -0
  75. package/dist/packages/barrage/barrage.scss +22 -3
  76. package/dist/packages/button/button.scss +0 -1
  77. package/dist/packages/calendar/calendar.scss +4 -4
  78. package/dist/packages/calendarcard/calendarcard.scss +0 -1
  79. package/dist/packages/cascader/cascader.scss +0 -1
  80. package/dist/packages/checkbox/checkbox.scss +0 -2
  81. package/dist/packages/checkboxgroup/checkboxgroup.scss +1 -3
  82. package/dist/packages/col/col.scss +2 -2
  83. package/dist/packages/collapseitem/collapseitem.scss +2 -3
  84. package/dist/packages/dialog/dialog.scss +4 -0
  85. package/dist/packages/divider/divider.scss +1 -1
  86. package/dist/packages/fixednav/fixednav.scss +0 -2
  87. package/dist/packages/form/form.scss +24 -26
  88. package/dist/packages/formitem/formitem.scss +0 -1
  89. package/dist/packages/grid/grid.scss +1 -1
  90. package/dist/packages/griditem/griditem.scss +28 -26
  91. package/dist/packages/imagepreview/imagepreview.scss +0 -1
  92. package/dist/packages/indicator/indicator.scss +2 -3
  93. package/dist/packages/menu/menu.scss +0 -7
  94. package/dist/packages/menuitem/menuitem.scss +14 -10
  95. package/dist/packages/navbar/navbar.scss +3 -5
  96. package/dist/packages/noticebar/noticebar.scss +20 -0
  97. package/dist/packages/numberkeyboard/numberkeyboard.scss +25 -18
  98. package/dist/packages/pagination/pagination.scss +0 -2
  99. package/dist/packages/picker/picker.scss +9 -0
  100. package/dist/packages/popover/popover.scss +0 -4
  101. package/dist/packages/popup/popup.scss +3 -19
  102. package/dist/packages/price/price.scss +1 -0
  103. package/dist/packages/radio/radio.scss +0 -1
  104. package/dist/packages/radiogroup/radiogroup.scss +10 -1
  105. package/dist/packages/range/range.scss +127 -127
  106. package/dist/packages/rate/rate.scss +0 -1
  107. package/dist/packages/searchbar/searchbar.scss +3 -2
  108. package/dist/packages/shortpassword/shortpassword.scss +4 -0
  109. package/dist/packages/skeleton/skeleton.scss +13 -3
  110. package/dist/packages/space/space.scss +0 -1
  111. package/dist/packages/step/step.scss +21 -25
  112. package/dist/packages/swipe/swipe.scss +0 -15
  113. package/dist/packages/swiper/swiper.scss +0 -1
  114. package/dist/packages/switch/switch.scss +11 -0
  115. package/dist/packages/table/table.scss +4 -5
  116. package/dist/packages/tabs/tabs.scss +2 -4
  117. package/dist/packages/tag/tag.scss +0 -1
  118. package/dist/packages/textarea/textarea.scss +1 -6
  119. package/dist/packages/timeselect/timeselect.scss +1 -6
  120. package/dist/packages/tour/tour.scss +1 -5
  121. package/dist/packages/trendarrow/trendarrow.scss +0 -1
  122. package/dist/packages/uploader/uploader.scss +0 -1
  123. package/dist/packages/virtuallist/virtuallist.scss +12 -12
  124. package/dist/style.css +1 -1
  125. package/dist/style.mjs +1 -1
  126. package/dist/styles/variables.scss +11 -7
  127. package/dist/types/packages/inputnumber/inputnumber.d.ts +28 -28
  128. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +15 -17
  129. package/package.json +5 -5
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react v2.3.10 Tue Feb 06 2024 16:12:46 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react v2.3.11 Fri Feb 23 2024 19:38:03 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -4448,19 +4448,6 @@ Check the top-level render call using <` + t2 + ">.");
4448
4448
  }
4449
4449
  return getAllScrollableParents(element.parentElement, scrollableParents);
4450
4450
  }
4451
- let passiveSupported = false;
4452
- if (canUseDom) {
4453
- try {
4454
- const opts = Object.defineProperty({}, "passive", {
4455
- get() {
4456
- passiveSupported = true;
4457
- }
4458
- });
4459
- window.addEventListener("test-passive-supported", null, opts);
4460
- } catch (e2) {
4461
- console.log(e2);
4462
- }
4463
- }
4464
4451
  let totalLockCount = 0;
4465
4452
  const BODY_LOCK_CLASS = "nut-overflow-hidden";
4466
4453
  function getScrollableElement(el) {
@@ -4509,7 +4496,7 @@ Check the top-level render call using <` + t2 + ">.");
4509
4496
  document.addEventListener(
4510
4497
  "touchmove",
4511
4498
  onTouchMove,
4512
- passiveSupported ? { passive: false } : false
4499
+ false
4513
4500
  );
4514
4501
  if (!totalLockCount) {
4515
4502
  document.body.classList.add(BODY_LOCK_CLASS);
@@ -5218,7 +5205,7 @@ Check the top-level render call using <` + t2 + ">.");
5218
5205
  startTime = otime;
5219
5206
  duration > 0 ? scrollAnimation() : scroll();
5220
5207
  };
5221
- const styles = style ? {
5208
+ const styles = Object.keys(style || {}).length !== 0 ? {
5222
5209
  zIndex,
5223
5210
  ...style
5224
5211
  } : {
@@ -14112,7 +14099,7 @@ Please add \`${key}Action\` when creating your handler.`);
14112
14099
  }));
14113
14100
  React.useEffect(() => {
14114
14101
  var _a2, _b, _c;
14115
- const options22 = passiveSupported ? { passive: false } : false;
14102
+ const options22 = false;
14116
14103
  (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", touchStart, options22);
14117
14104
  (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
14118
14105
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
@@ -16415,7 +16402,10 @@ Please add \`${key}Action\` when creating your handler.`);
16415
16402
  name,
16416
16403
  className: "nut-input-native",
16417
16404
  ref: inputRef,
16418
- style: { textAlign: align },
16405
+ style: {
16406
+ textAlign: `${// eslint-disable-next-line no-nested-ternary
16407
+ align === "right" ? "end" : align === "left" ? "start" : "center"}`
16408
+ },
16419
16409
  type: inputType(type2),
16420
16410
  maxLength,
16421
16411
  placeholder: placeholder || locale.placeholder,
@@ -16466,11 +16456,10 @@ Please add \`${key}Action\` when creating your handler.`);
16466
16456
  const defaultProps$U = {
16467
16457
  ...ComponentDefaults,
16468
16458
  disabled: false,
16469
- min: 1,
16470
- max: 9999,
16471
16459
  readOnly: false,
16472
16460
  allowEmpty: false,
16473
- defaultValue: 0,
16461
+ min: 1,
16462
+ max: 9999,
16474
16463
  step: 1,
16475
16464
  digits: 0,
16476
16465
  async: false
@@ -16503,199 +16492,159 @@ Please add \`${key}Action\` when creating your handler.`);
16503
16492
  ...defaultProps$U,
16504
16493
  ...props
16505
16494
  };
16506
- const inputRef = React.useRef("");
16507
- const [_checked, setChecked] = usePropsValue({
16508
- value,
16509
- defaultValue
16495
+ const classes = classNames(classPrefix$g, {
16496
+ [`${classPrefix$g}-disabled`]: disabled
16510
16497
  });
16498
+ const [focused, setFocused] = React.useState(false);
16499
+ const inputRef = React.useRef(null);
16511
16500
  React.useEffect(() => {
16512
- if (formatter) {
16513
- if (_checked || _checked === 0) {
16514
- inputRef.current = formatter(_checked);
16515
- setChecked(formatter(_checked));
16516
- }
16517
- }
16518
- }, []);
16519
- const classes = classNames(
16520
- {
16521
- [`${classPrefix$g}`]: true,
16522
- [`${classPrefix$g}-disabled`]: disabled
16523
- },
16524
- className
16525
- );
16526
- const styles = {
16527
- ...style
16528
- };
16529
- const addAllow = (value2 = _checked) => {
16530
- if (formatter) {
16531
- const numValue = String(value2).replace(/[^0-9|.]/gi, "");
16532
- return Number(numValue) < Number(max) && !disabled;
16501
+ var _a2, _b;
16502
+ if (focused) {
16503
+ (_b = (_a2 = inputRef.current) == null ? void 0 : _a2.select) == null ? void 0 : _b.call(_a2);
16533
16504
  }
16534
- return Number(value2) < Number(max) && !disabled;
16535
- };
16536
- const reduceAllow = (value2 = _checked) => {
16537
- if (formatter) {
16538
- const numValue = String(value2).replace(/[^0-9|.]/gi, "");
16539
- return Number(numValue) > Number(min) && !disabled;
16505
+ }, [focused]);
16506
+ const [shadowValue, setShadowValue] = usePropsValue({
16507
+ value: typeof value === "string" ? parseFloat(value) : value,
16508
+ defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
16509
+ onChange: (value2) => {
16540
16510
  }
16541
- return Number(value2) > Number(min) && !disabled;
16542
- };
16543
- const iconMinusClasses = classNames("nut-inputnumber-icon icon-minus", {
16544
- "nut-inputnumber-icon-disabled": !reduceAllow()
16545
- });
16546
- const iconAddClasses = classNames("nut-inputnumber-icon icon-plus", {
16547
- "nut-inputnumber-icon-disabled": !addAllow()
16548
16511
  });
16549
- const fixedDecimalPlaces = (v) => {
16550
- return Number(v).toFixed(Number(digits));
16551
- };
16552
- const emitChange = (value2, e2) => {
16553
- const outputValue = fixedDecimalPlaces(value2);
16554
- onChange && onChange(outputValue, e2);
16555
- if (!async) {
16556
- if (Number(outputValue) < Number(min)) {
16557
- formatter ? setChecked(formatter(Number(min))) : setChecked(Number(min));
16558
- } else if (Number(outputValue) > Number(max)) {
16559
- formatter ? setChecked(formatter(Number(max))) : setChecked(Number(max));
16560
- } else {
16561
- formatter ? setChecked(formatter(outputValue)) : setChecked(outputValue);
16562
- }
16512
+ const bound2 = (value2, min2, max2) => {
16513
+ let res = value2;
16514
+ if (min2 !== void 0) {
16515
+ res = Math.max(Number(min2), res);
16563
16516
  }
16564
- };
16565
- const reduceNumber = (e2) => {
16566
- onMinus && onMinus(e2);
16567
- if (reduceAllow()) {
16568
- if (formatter) {
16569
- const numValue = String(_checked).replace(/[^0-9|.]/gi, "");
16570
- const outputValue = Number(numValue) - Number(step);
16571
- inputRef.current = formatter(outputValue);
16572
- emitChange(outputValue, e2);
16573
- } else {
16574
- const outputValue = Number(_checked) - Number(step);
16575
- emitChange(outputValue, e2);
16576
- }
16577
- } else {
16578
- onOverlimit && onOverlimit(e2);
16517
+ if (max2 !== void 0) {
16518
+ res = Math.min(Number(max2), res);
16579
16519
  }
16520
+ return res;
16580
16521
  };
16581
- const addNumber = (e2) => {
16582
- onPlus && onPlus(e2);
16583
- if (addAllow()) {
16584
- if (formatter) {
16585
- const numValue = String(_checked).replace(/[^0-9|.]/gi, "");
16586
- const outputValue = Number(numValue) + Number(step);
16587
- inputRef.current = formatter(outputValue);
16588
- emitChange(outputValue, e2);
16589
- } else {
16590
- const outputValue = Number(_checked) + Number(step);
16591
- emitChange(outputValue, e2);
16592
- }
16593
- } else {
16594
- onOverlimit && onOverlimit(e2);
16522
+ const format2 = (value2) => {
16523
+ if (value2 === null)
16524
+ return "";
16525
+ if (typeof value2 === "string")
16526
+ value2 = parseFloat(value2);
16527
+ const fixedValue = bound2(value2, Number(min), Number(max));
16528
+ if (formatter) {
16529
+ return formatter(fixedValue);
16595
16530
  }
16596
- };
16597
- const changeValue = (e2) => {
16598
- const input = e2.target;
16599
- onChange && onChange(input.valueAsNumber, e2);
16600
- if (!async) {
16601
- if (Number.isNaN(input.valueAsNumber)) {
16602
- setChecked("");
16603
- } else {
16604
- setChecked(input.valueAsNumber);
16605
- }
16531
+ if (digits) {
16532
+ return fixedValue.toFixed(digits).toString();
16606
16533
  }
16534
+ return fixedValue.toString();
16607
16535
  };
16608
- const changeFormatValue = (e2) => {
16609
- const input = e2.target.value;
16610
- const numReg = /^[0-9]*$/;
16611
- const numValue = input.replace(/[^0-9|.]/gi, "");
16612
- if (formatter) {
16613
- if (!numReg.test(input[0]) && numValue) {
16614
- setChecked(formatter(numValue));
16615
- } else if (!numReg.test(input[0]) && !numValue) {
16616
- setChecked(input);
16617
- } else if (numReg.test(input[0])) {
16618
- if (formatter(numValue) === inputRef.current) {
16619
- setChecked(numValue);
16620
- } else {
16621
- setChecked(formatter(numValue));
16622
- inputRef.current = formatter(numValue);
16623
- }
16624
- }
16536
+ const [inputValue, setInputValue] = React.useState(format2(shadowValue));
16537
+ React.useEffect(() => {
16538
+ if (!focused && !async) {
16539
+ setShadowValue(bound2(Number(shadowValue), Number(min), Number(max)));
16540
+ setInputValue(format2(shadowValue));
16625
16541
  }
16626
- };
16627
- const burFormatValue = (e2) => {
16628
- const input = e2.target.value;
16629
- const numReg = /^[0-9]*$/;
16630
- const numValue = input.replace(/[^0-9|.]/gi, "");
16631
- if (formatter) {
16632
- if (formatter(numValue) === input) {
16633
- emitChange(numValue, e2);
16634
- return;
16635
- }
16636
- if (!numReg.test(input) || !input) {
16637
- setChecked(formatter(""));
16542
+ }, [focused, shadowValue]);
16543
+ React.useEffect(() => {
16544
+ if (async) {
16545
+ setShadowValue(bound2(Number(value), Number(min), Number(max)));
16546
+ setInputValue(format2(value));
16547
+ }
16548
+ }, [value]);
16549
+ const calcNextValue = (current, step2, symbol) => {
16550
+ const dig = digits + 1;
16551
+ return (parseFloat(current || "0") * dig + parseFloat(step2) * dig * symbol) / dig;
16552
+ };
16553
+ const update2 = (negative, e2) => {
16554
+ if (step !== void 0) {
16555
+ const shouldOverBoundary = calcNextValue(
16556
+ shadowValue,
16557
+ step,
16558
+ negative ? -1 : 1
16559
+ );
16560
+ const nextValue = bound2(shouldOverBoundary, Number(min), Number(max));
16561
+ setShadowValue(nextValue);
16562
+ if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
16563
+ onOverlimit == null ? void 0 : onOverlimit(e2);
16564
+ } else {
16565
+ onChange == null ? void 0 : onChange(nextValue, e2);
16638
16566
  }
16639
16567
  }
16640
16568
  };
16641
- const focusValue = (e2) => {
16569
+ const handleReduce = (e2) => {
16642
16570
  if (disabled)
16643
16571
  return;
16644
- if (readOnly)
16645
- return;
16646
- onFocus && onFocus(e2);
16572
+ onMinus == null ? void 0 : onMinus(e2);
16573
+ update2(true, e2);
16647
16574
  };
16648
- const burValue = (e2) => {
16575
+ const handlePlus = (e2) => {
16649
16576
  if (disabled)
16650
16577
  return;
16651
- if (readOnly)
16652
- return;
16653
- const input = e2.target;
16654
- let value2 = input.valueAsNumber;
16655
- if (Number.isNaN(value2) && !allowEmpty) {
16656
- value2 = Number(defaultValue);
16578
+ onPlus == null ? void 0 : onPlus(e2);
16579
+ update2(false, e2);
16580
+ };
16581
+ const parseValue = (text) => {
16582
+ if (text === "")
16583
+ return null;
16584
+ if (text === "-")
16585
+ return null;
16586
+ return text;
16587
+ };
16588
+ const handleInputChange = (e2) => {
16589
+ setInputValue(e2.target.value);
16590
+ const valueStr = parseValue(e2.target.value);
16591
+ if (valueStr === null) {
16592
+ if (allowEmpty) {
16593
+ setShadowValue(null);
16594
+ } else {
16595
+ setShadowValue(defaultValue);
16596
+ }
16597
+ } else {
16598
+ setShadowValue(valueStr);
16657
16599
  }
16658
- if (value2 < Number(min)) {
16659
- value2 = Number(min);
16660
- } else if (value2 > Number(max)) {
16661
- value2 = Number(max);
16600
+ if (!async) {
16601
+ onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
16662
16602
  }
16663
- emitChange(value2, e2);
16603
+ };
16604
+ const handleFocus = (e2) => {
16605
+ setFocused(true);
16606
+ setInputValue(
16607
+ shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
16608
+ );
16609
+ onFocus && onFocus(e2);
16610
+ };
16611
+ const handleBlur = (e2) => {
16612
+ setFocused(false);
16664
16613
  onBlur && onBlur(e2);
16614
+ if (async) {
16615
+ const valueStr = parseValue(e2.target.value);
16616
+ onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
16617
+ }
16665
16618
  };
16666
- return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus" }, /* @__PURE__ */ React.createElement(
16619
+ return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus" }, /* @__PURE__ */ React.createElement(
16667
16620
  o,
16668
16621
  {
16669
- className: iconMinusClasses,
16670
- onClick: (e2) => reduceNumber(e2)
16622
+ className: classNames("nut-inputnumber-icon icon-minus", {
16623
+ [`${classPrefix$g}-icon-disabled`]: shadowValue === min || disabled
16624
+ }),
16625
+ onClick: handleReduce
16671
16626
  }
16672
- )), /* @__PURE__ */ React.createElement(React.Fragment, null, formatter ? /* @__PURE__ */ React.createElement(
16627
+ )), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
16673
16628
  "input",
16674
16629
  {
16675
- type: "text",
16676
- min,
16677
- max,
16630
+ ref: inputRef,
16631
+ inputMode: "decimal",
16678
16632
  disabled,
16679
16633
  readOnly,
16680
- value: _checked,
16681
- onInput: changeFormatValue,
16682
- onBlur: burFormatValue,
16683
- onFocus: focusValue
16634
+ value: inputValue,
16635
+ onInput: handleInputChange,
16636
+ onBlur: handleBlur,
16637
+ onFocus: handleFocus
16684
16638
  }
16685
- ) : /* @__PURE__ */ React.createElement(
16686
- "input",
16639
+ )), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(
16640
+ l$2,
16687
16641
  {
16688
- type: "number",
16689
- min,
16690
- max,
16691
- disabled,
16692
- readOnly,
16693
- value: _checked,
16694
- onInput: changeValue,
16695
- onBlur: burValue,
16696
- onFocus: focusValue
16642
+ className: classNames("nut-inputnumber-icon icon-plus", {
16643
+ [`${classPrefix$g}-icon-disabled`]: shadowValue === max || disabled
16644
+ }),
16645
+ onClick: handlePlus
16697
16646
  }
16698
- )), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(l$2, { className: iconAddClasses, onClick: (e2) => addNumber(e2) })));
16647
+ )));
16699
16648
  };
16700
16649
  InputNumber.defaultProps = defaultProps$U;
16701
16650
  InputNumber.displayName = "NutInputNumber";
@@ -18247,7 +18196,7 @@ Please add \`${key}Action\` when creating your handler.`);
18247
18196
  },
18248
18197
  /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-title` }, title || locale.shortpassword.title), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-description` }, description || locale.shortpassword.description), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-input`, onClick: onFocus }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-input-site` }), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-input-fake` }, [...new Array(comLen).keys()].map((item, index) => {
18249
18198
  return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-input-fake-li`, key: index }, inputValue.length > index && /* @__PURE__ */ React.createElement(React.Fragment, null, plain ? inputValue[index] : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-input-fake-li-icon` })));
18250
- }))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message-error` }, error), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message-forget`, onClick: onTips }, tips || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(s, { width: 11, height: 11, style: { marginRight: "3px" } }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-cancel`, onClick: onCancel }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-sure`, onClick: sure }, locale.confirm)))
18199
+ }))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message-error` }, error), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message-forget`, onClick: onTips }, tips || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(s, { width: 11, height: 11 }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-cancel`, onClick: onCancel }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-sure`, onClick: sure }, locale.confirm)))
18251
18200
  );
18252
18201
  };
18253
18202
  const ShortPassword = React.forwardRef(InternalShortPassword);
@@ -19226,6 +19175,7 @@ Please add \`${key}Action\` when creating your handler.`);
19226
19175
  return /* @__PURE__ */ React.createElement(
19227
19176
  Popup,
19228
19177
  {
19178
+ ...rest,
19229
19179
  round: true,
19230
19180
  visible,
19231
19181
  position: "bottom",
@@ -19236,7 +19186,7 @@ Please add \`${key}Action\` when creating your handler.`);
19236
19186
  onCancel && onCancel();
19237
19187
  }
19238
19188
  },
19239
- /* @__PURE__ */ React.createElement("div", { className: `${className}`, style, ...rest }, options2.length ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-list` }, options2.map((item, index) => {
19189
+ /* @__PURE__ */ React.createElement("div", { className: `${className}`, style }, options2.length ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-list` }, options2.map((item, index) => {
19240
19190
  return /* @__PURE__ */ React.createElement(
19241
19191
  "div",
19242
19192
  {
@@ -20969,7 +20919,7 @@ Please add \`${key}Action\` when creating your handler.`);
20969
20919
  axis: "y",
20970
20920
  target: elementRef,
20971
20921
  enabled: !props.disabled,
20972
- eventOptions: passiveSupported ? { passive: false } : false
20922
+ eventOptions: false
20973
20923
  }
20974
20924
  );
20975
20925
  const renderIcons = (status2) => {
@@ -21186,7 +21136,7 @@ Please add \`${key}Action\` when creating your handler.`);
21186
21136
  const classPrefix2 = "nut-skeleton";
21187
21137
  const classes = classNames(classPrefix2, className);
21188
21138
  const avatarClass = classNames({
21189
- avatar: true,
21139
+ [`nut-avatar`]: true,
21190
21140
  [`avatar-${avatarShape}`]: avatarShape
21191
21141
  });
21192
21142
  const repeatLines = (num) => {
@@ -21204,7 +21154,7 @@ Please add \`${key}Action\` when creating your handler.`);
21204
21154
  height: "50px"
21205
21155
  };
21206
21156
  };
21207
- return /* @__PURE__ */ React.createElement(React.Fragment, null, visible ? /* @__PURE__ */ React.createElement("div", null, children) : /* @__PURE__ */ React.createElement("div", { className: classes, ...rest }, animated2 && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-animation` }), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, avatar && /* @__PURE__ */ React.createElement(
21157
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, visible ? /* @__PURE__ */ React.createElement(React.Fragment, null, children) : /* @__PURE__ */ React.createElement("div", { className: classes, ...rest }, animated2 && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-animation` }), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, avatar && /* @__PURE__ */ React.createElement(
21208
21158
  Avatar,
21209
21159
  {
21210
21160
  className: avatarClass,
@@ -304,30 +304,3 @@
304
304
  animation-iteration-count: infinite;
305
305
  }
306
306
  }
307
-
308
- [dir='rtl'] .nut-animate,
309
- .nut-rtl .nut-animate {
310
- .nut-animate-twinkle {
311
- &::after,
312
- &::before {
313
- border-radius: calc(60 / 2) * 1px;
314
- right: auto;
315
- left: 50%;
316
- margin-right: 0;
317
- margin-left: calc(-60 / 2) * 1px;
318
- }
319
- }
320
-
321
- .nut-animate-flicker {
322
- &::after {
323
- left: auto;
324
- right: 0;
325
- background-image: linear-gradient(
326
- -106deg,
327
- rgba(232, 224, 255, 0) 24%,
328
- #e8e0ff 91%
329
- );
330
- transform: skewX(20deg);
331
- }
332
- }
333
- }
@@ -13,11 +13,6 @@
13
13
  background: $white;
14
14
  border-radius: 50%;
15
15
  box-shadow: 0 0 8px $color-text-disabled;
16
-
17
- .nut-icon-am-rotate {
18
- transform: rotate((360));
19
- animation-timing-function: ease-in-out;
20
- }
21
16
  }
22
17
 
23
18
  .nut-audio-icon-stop {
@@ -119,7 +119,6 @@
119
119
  left: auto;
120
120
  right: 0;
121
121
  }
122
-
123
122
  &-popup {
124
123
  left: auto;
125
124
  right: 0;
@@ -138,7 +137,6 @@
138
137
  &-highlight {
139
138
  left: auto;
140
139
  right: 0;
141
-
142
140
  .highlight {
143
141
  left: auto;
144
142
  right: 50%;
@@ -65,4 +65,11 @@
65
65
  right: auto;
66
66
  left: -15%;
67
67
  }
68
+
69
+ &-content {
70
+ transform: var(
71
+ --nutui-badge-content-transform,
72
+ translateY(-50%) translateX(-100%)
73
+ );
74
+ }
68
75
  }
@@ -59,15 +59,34 @@
59
59
  .nut-rtl .nut-barrage {
60
60
  left: auto;
61
61
  right: 0;
62
-
63
62
  .barrage-item {
64
- right: auto;
65
- left: 0;
66
63
  transform: translateX(-100%);
67
64
  background: linear-gradient(
68
65
  to left,
69
66
  var(--nutui-black-3),
70
67
  var(--nutui-black-1)
71
68
  );
69
+
70
+ &.move {
71
+ animation-name: moving-rtl;
72
+ }
73
+ }
74
+ @keyframes moving-rtl {
75
+ from {
76
+ transform: translateX(var(--move-distance));
77
+ }
78
+ to {
79
+ transform: translateX(100%);
80
+ }
81
+ }
82
+
83
+ @-webkit-keyframes moving-rtl {
84
+ from {
85
+ transform: translateX(var(--move-distance));
86
+ }
87
+
88
+ to {
89
+ transform: translateX(100%);
90
+ }
72
91
  }
73
92
  }
@@ -338,7 +338,6 @@
338
338
  margin-left: $button-text-icon-margin;
339
339
  }
340
340
  }
341
-
342
341
  &::before {
343
342
  left: auto;
344
343
  right: 50%;
@@ -223,6 +223,10 @@
223
223
  }
224
224
  }
225
225
 
226
+ .nut-calendar-popup .nut-popup-title-right {
227
+ top: 7px !important;
228
+ }
229
+
226
230
  [dir='rtl'] .nut-calendar,
227
231
  .nut-rtl .nut-calendar {
228
232
  &-day {
@@ -245,7 +249,3 @@
245
249
  }
246
250
  }
247
251
  }
248
-
249
- .nut-calendar-popup .nut-popup-title-right {
250
- top: 7px !important;
251
- }
@@ -126,7 +126,6 @@
126
126
  }
127
127
  }
128
128
  }
129
-
130
129
  &-day {
131
130
  &.start {
132
131
  border-top-left-radius: 0;
@@ -68,7 +68,6 @@
68
68
  visibility: hidden;
69
69
  }
70
70
  }
71
-
72
71
  [dir='rtl'] .nut-cascader,
73
72
  .nut-rtl .nut-cascader {
74
73
  .nut-icon-checklist {
@@ -140,13 +140,11 @@
140
140
  left: 0;
141
141
  border-right: 10px solid transparent;
142
142
  border-left: 10px solid $color-primary;
143
-
144
143
  &-checked {
145
144
  left: auto;
146
145
  right: 50%;
147
146
  transform: translate(3px, -3px);
148
147
  }
149
-
150
148
  .nut-icon {
151
149
  &:before {
152
150
  margin-left: 0;
@@ -1,7 +1,5 @@
1
1
  .nut-checkboxgroup {
2
2
  .nut-checkbox {
3
- margin-bottom: 5px;
4
-
5
3
  &-button {
6
4
  background-color: $color-background;
7
5
  }
@@ -9,6 +7,7 @@
9
7
 
10
8
  &-vertical {
11
9
  .nut-checkbox {
10
+ margin-bottom: 5px;
12
11
  &.nut-checkbox-reverse {
13
12
  width: 100%;
14
13
  justify-content: space-between;
@@ -33,7 +32,6 @@
33
32
  }
34
33
  }
35
34
  }
36
-
37
35
  [dir='rtl'] .nut-checkboxgroup,
38
36
  .nut-rtl .nut-checkboxgroup {
39
37
  .nut-checkbox {
@@ -4,7 +4,7 @@
4
4
  word-break: break-all;
5
5
  margin-bottom: $col-default-margin-bottom;
6
6
 
7
- &-gutter {
7
+ &.nut-col-gutter {
8
8
  &:last-child {
9
9
  padding-right: 0 !important;
10
10
  }
@@ -19,7 +19,7 @@
19
19
  .nut-rtl .nut-col {
20
20
  float: right;
21
21
 
22
- &-gutter {
22
+ &.nut-col-gutter {
23
23
  &:last-child {
24
24
  padding-right: 0 !important;
25
25
  padding-left: 0 !important;