@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.
- package/CHANGELOG.md +9 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +3 -3
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Animate/style/style.css +1 -1
- package/dist/esm/Audio/style/style.css +1 -1
- package/dist/esm/BackTop.js +1 -1
- package/dist/esm/Badge/style/style.css +1 -1
- package/dist/esm/Barrage/style/style.css +1 -1
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Checkbox/style/style.css +1 -1
- package/dist/esm/CheckboxGroup/style/style.css +1 -1
- package/dist/esm/Col/style/style.css +1 -1
- package/dist/esm/Collapse/style/style.css +1 -1
- package/dist/esm/CollapseItem/style/style.css +1 -1
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Divider/style/style.css +1 -1
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/FormItem/style/style.css +1 -1
- package/dist/esm/Grid/style/style.css +1 -1
- package/dist/esm/GridItem/style/style.css +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/Indicator/style/style.css +1 -1
- package/dist/esm/Input.js +4 -1
- package/dist/esm/InputNumber.js +107 -161
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NoticeBar/style/style.css +1 -1
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/Price/style/style.css +1 -1
- package/dist/esm/Radio/style/style.css +1 -1
- package/dist/esm/RadioGroup/style/style.css +1 -1
- package/dist/esm/Range/style/style.css +1 -1
- package/dist/esm/SearchBar/style/style.css +1 -1
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +1 -4
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/Skeleton/style/style.css +1 -1
- package/dist/esm/Skeleton.js +2 -4
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Steps/style/style.css +1 -1
- package/dist/esm/Swipe/style/style.css +1 -1
- package/dist/esm/Swiper/style/style.css +1 -1
- package/dist/esm/Switch/style/style.css +1 -1
- package/dist/esm/Tabbar/style/style.css +1 -1
- package/dist/esm/TabbarItem/style/style.css +1 -1
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/TextArea/style/style.css +1 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +15 -15
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +15 -17
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +135 -185
- package/dist/nutui.react.umd.js +135 -185
- package/dist/packages/animate/animate.scss +0 -27
- package/dist/packages/audio/audio.scss +0 -5
- package/dist/packages/avatarcropper/avatarcropper.scss +0 -2
- package/dist/packages/badge/badge.scss +7 -0
- package/dist/packages/barrage/barrage.scss +22 -3
- package/dist/packages/button/button.scss +0 -1
- package/dist/packages/calendar/calendar.scss +4 -4
- package/dist/packages/calendarcard/calendarcard.scss +0 -1
- package/dist/packages/cascader/cascader.scss +0 -1
- package/dist/packages/checkbox/checkbox.scss +0 -2
- package/dist/packages/checkboxgroup/checkboxgroup.scss +1 -3
- package/dist/packages/col/col.scss +2 -2
- package/dist/packages/collapseitem/collapseitem.scss +2 -3
- package/dist/packages/dialog/dialog.scss +4 -0
- package/dist/packages/divider/divider.scss +1 -1
- package/dist/packages/fixednav/fixednav.scss +0 -2
- package/dist/packages/form/form.scss +24 -26
- package/dist/packages/formitem/formitem.scss +0 -1
- package/dist/packages/grid/grid.scss +1 -1
- package/dist/packages/griditem/griditem.scss +28 -26
- package/dist/packages/imagepreview/imagepreview.scss +0 -1
- package/dist/packages/indicator/indicator.scss +2 -3
- package/dist/packages/menu/menu.scss +0 -7
- package/dist/packages/menuitem/menuitem.scss +14 -10
- package/dist/packages/navbar/navbar.scss +3 -5
- package/dist/packages/noticebar/noticebar.scss +20 -0
- package/dist/packages/numberkeyboard/numberkeyboard.scss +25 -18
- package/dist/packages/pagination/pagination.scss +0 -2
- package/dist/packages/picker/picker.scss +9 -0
- package/dist/packages/popover/popover.scss +0 -4
- package/dist/packages/popup/popup.scss +3 -19
- package/dist/packages/price/price.scss +1 -0
- package/dist/packages/radio/radio.scss +0 -1
- package/dist/packages/radiogroup/radiogroup.scss +10 -1
- package/dist/packages/range/range.scss +127 -127
- package/dist/packages/rate/rate.scss +0 -1
- package/dist/packages/searchbar/searchbar.scss +3 -2
- package/dist/packages/shortpassword/shortpassword.scss +4 -0
- package/dist/packages/skeleton/skeleton.scss +13 -3
- package/dist/packages/space/space.scss +0 -1
- package/dist/packages/step/step.scss +21 -25
- package/dist/packages/swipe/swipe.scss +0 -15
- package/dist/packages/swiper/swiper.scss +0 -1
- package/dist/packages/switch/switch.scss +11 -0
- package/dist/packages/table/table.scss +4 -5
- package/dist/packages/tabs/tabs.scss +2 -4
- package/dist/packages/tag/tag.scss +0 -1
- package/dist/packages/textarea/textarea.scss +1 -6
- package/dist/packages/timeselect/timeselect.scss +1 -6
- package/dist/packages/tour/tour.scss +1 -5
- package/dist/packages/trendarrow/trendarrow.scss +0 -1
- package/dist/packages/uploader/uploader.scss +0 -1
- package/dist/packages/virtuallist/virtuallist.scss +12 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables.scss +11 -7
- package/dist/types/packages/inputnumber/inputnumber.d.ts +28 -28
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +15 -17
- package/package.json +5 -5
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react v2.3.
|
|
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
|
-
|
|
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 =
|
|
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: {
|
|
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
|
-
|
|
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
|
|
16507
|
-
|
|
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
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
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
|
-
|
|
16535
|
-
|
|
16536
|
-
|
|
16537
|
-
|
|
16538
|
-
|
|
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
|
|
16550
|
-
|
|
16551
|
-
|
|
16552
|
-
|
|
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
|
-
|
|
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
|
|
16582
|
-
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
|
|
16586
|
-
|
|
16587
|
-
|
|
16588
|
-
|
|
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
|
-
|
|
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
|
|
16609
|
-
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
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
|
-
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
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
|
|
16569
|
+
const handleReduce = (e2) => {
|
|
16642
16570
|
if (disabled)
|
|
16643
16571
|
return;
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
onFocus && onFocus(e2);
|
|
16572
|
+
onMinus == null ? void 0 : onMinus(e2);
|
|
16573
|
+
update2(true, e2);
|
|
16647
16574
|
};
|
|
16648
|
-
const
|
|
16575
|
+
const handlePlus = (e2) => {
|
|
16649
16576
|
if (disabled)
|
|
16650
16577
|
return;
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
if (
|
|
16656
|
-
|
|
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 (
|
|
16659
|
-
|
|
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
|
-
|
|
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
|
|
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:
|
|
16670
|
-
|
|
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,
|
|
16627
|
+
)), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
16673
16628
|
"input",
|
|
16674
16629
|
{
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
max,
|
|
16630
|
+
ref: inputRef,
|
|
16631
|
+
inputMode: "decimal",
|
|
16678
16632
|
disabled,
|
|
16679
16633
|
readOnly,
|
|
16680
|
-
value:
|
|
16681
|
-
onInput:
|
|
16682
|
-
onBlur:
|
|
16683
|
-
onFocus:
|
|
16634
|
+
value: inputValue,
|
|
16635
|
+
onInput: handleInputChange,
|
|
16636
|
+
onBlur: handleBlur,
|
|
16637
|
+
onFocus: handleFocus
|
|
16684
16638
|
}
|
|
16685
|
-
) : /* @__PURE__ */ React.createElement(
|
|
16686
|
-
|
|
16639
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(
|
|
16640
|
+
l$2,
|
|
16687
16641
|
{
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
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
|
-
))
|
|
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
|
|
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
|
|
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:
|
|
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(
|
|
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
|
-
}
|
|
@@ -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
|
}
|
|
@@ -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
|
-
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
22
|
+
&.nut-col-gutter {
|
|
23
23
|
&:last-child {
|
|
24
24
|
padding-right: 0 !important;
|
|
25
25
|
padding-left: 0 !important;
|