@nutui/nutui-react-taro 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 +1 -1
- 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/Form.js +1 -1
- package/dist/esm/FormItem/style/style.css +1 -1
- package/dist/esm/FormItem.js +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 +1 -1
- package/dist/esm/InputNumber.js +1 -1
- 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 -1
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/Skeleton/style/style.css +1 -1
- package/dist/esm/Skeleton.js +1 -1
- 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/{actionsheet.taro-6NiOrNyd.js → actionsheet.taro-kKhb0Vwt.js} +1 -1
- package/dist/esm/{backtop.taro-Y3vOJiXq.js → backtop.taro-Cfld7ina.js} +1 -1
- package/dist/esm/{formitem.taro-PPkTQGfW.js → formitem.taro-viaUkMmm.js} +3 -3
- package/dist/esm/{input.taro-YoPsV-op.js → input.taro-xCoGdppk.js} +4 -1
- package/dist/esm/inputnumber.taro-WPpS0Xl9.js +169 -0
- package/dist/esm/nutui-react.es.js +7 -7
- package/dist/esm/{shortpassword.taro-ECs_E1Xn.js → shortpassword.taro-JBWXzk6I.js} +1 -1
- package/dist/esm/{skeleton.taro-Pg7WtP0e.js → skeleton.taro--AtiA7MK.js} +2 -2
- 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 +137 -168
- package/dist/nutui.react.umd.js +137 -168
- 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 +15 -15
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +28 -30
- package/package.json +5 -5
- package/dist/esm/inputnumber.taro-7QptygT3.js +0 -197
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-taro v2.3.
|
|
11
|
+
* @nutui/nutui-react-taro v2.3.11 Fri Feb 23 2024 19:40:58 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -4113,7 +4113,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4113
4113
|
duration: duration > 0 ? duration : 0
|
|
4114
4114
|
});
|
|
4115
4115
|
};
|
|
4116
|
-
const styles = style ? {
|
|
4116
|
+
const styles = Object.keys(style || {}).length !== 0 ? {
|
|
4117
4117
|
zIndex,
|
|
4118
4118
|
...style
|
|
4119
4119
|
} : {
|
|
@@ -9894,9 +9894,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9894
9894
|
);
|
|
9895
9895
|
}
|
|
9896
9896
|
const errs = [];
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9897
|
+
await Promise.all(
|
|
9898
|
+
filterEntities.map(async (entity) => {
|
|
9899
|
+
await this.validateEntities(entity, errs);
|
|
9900
|
+
})
|
|
9901
|
+
);
|
|
9900
9902
|
return errs;
|
|
9901
9903
|
});
|
|
9902
9904
|
__publicField(this, "submit", async () => {
|
|
@@ -10400,7 +10402,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10400
10402
|
name,
|
|
10401
10403
|
className: "nut-input-native",
|
|
10402
10404
|
ref: inputRef,
|
|
10403
|
-
style: {
|
|
10405
|
+
style: {
|
|
10406
|
+
textAlign: `${// eslint-disable-next-line no-nested-ternary
|
|
10407
|
+
align === "right" ? "end" : align === "left" ? "start" : "center"}`
|
|
10408
|
+
},
|
|
10404
10409
|
type: inputType(type2),
|
|
10405
10410
|
password: type2 === "password",
|
|
10406
10411
|
maxlength: maxLength,
|
|
@@ -10441,11 +10446,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10441
10446
|
const defaultProps$W = {
|
|
10442
10447
|
...ComponentDefaults,
|
|
10443
10448
|
disabled: false,
|
|
10444
|
-
min: 1,
|
|
10445
|
-
max: 9999,
|
|
10446
10449
|
readOnly: false,
|
|
10447
10450
|
allowEmpty: false,
|
|
10448
|
-
|
|
10451
|
+
min: 1,
|
|
10452
|
+
max: 9999,
|
|
10449
10453
|
step: 1,
|
|
10450
10454
|
digits: 0,
|
|
10451
10455
|
async: false
|
|
@@ -10478,197 +10482,161 @@ var __publicField = (obj, key, value) => {
|
|
|
10478
10482
|
...defaultProps$W,
|
|
10479
10483
|
...props
|
|
10480
10484
|
};
|
|
10481
|
-
const
|
|
10482
|
-
|
|
10483
|
-
value,
|
|
10484
|
-
defaultValue
|
|
10485
|
+
const classes = classNames(classPrefix$h, {
|
|
10486
|
+
[`${classPrefix$h}-disabled`]: disabled
|
|
10485
10487
|
});
|
|
10488
|
+
const [focused, setFocused] = React.useState(false);
|
|
10489
|
+
const inputRef = React.useRef(null);
|
|
10486
10490
|
React.useEffect(() => {
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
setChecked(formatter(_checked));
|
|
10491
|
-
}
|
|
10492
|
-
}
|
|
10493
|
-
}, []);
|
|
10494
|
-
const classes = classNames(
|
|
10495
|
-
{
|
|
10496
|
-
[`${classPrefix$h}`]: true,
|
|
10497
|
-
[`${classPrefix$h}-disabled`]: disabled
|
|
10498
|
-
},
|
|
10499
|
-
className
|
|
10500
|
-
);
|
|
10501
|
-
const styles = {
|
|
10502
|
-
...style
|
|
10503
|
-
};
|
|
10504
|
-
const addAllow = (value2 = _checked) => {
|
|
10505
|
-
if (formatter) {
|
|
10506
|
-
const numValue = String(value2).replace(/[^0-9|.]/gi, "");
|
|
10507
|
-
return Number(numValue) < Number(max) && !disabled;
|
|
10491
|
+
var _a, _b;
|
|
10492
|
+
if (focused) {
|
|
10493
|
+
(_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
|
|
10508
10494
|
}
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
return Number(numValue) > Number(min) && !disabled;
|
|
10495
|
+
}, [focused]);
|
|
10496
|
+
const [shadowValue, setShadowValue] = usePropsValue({
|
|
10497
|
+
value: typeof value === "string" ? parseFloat(value) : value,
|
|
10498
|
+
defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
|
|
10499
|
+
onChange: (value2) => {
|
|
10515
10500
|
}
|
|
10516
|
-
return Number(value2) > Number(min) && !disabled;
|
|
10517
|
-
};
|
|
10518
|
-
const iconMinusClasses = classNames("nut-inputnumber-icon icon-minus", {
|
|
10519
|
-
"nut-inputnumber-icon-disabled": !reduceAllow()
|
|
10520
|
-
});
|
|
10521
|
-
const iconAddClasses = classNames("nut-inputnumber-icon icon-plus", {
|
|
10522
|
-
"nut-inputnumber-icon-disabled": !addAllow()
|
|
10523
10501
|
});
|
|
10524
|
-
const
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
const outputValue = fixedDecimalPlaces(value2);
|
|
10529
|
-
onChange && onChange(outputValue, e2);
|
|
10530
|
-
if (!async) {
|
|
10531
|
-
if (Number(outputValue) < Number(min)) {
|
|
10532
|
-
formatter ? setChecked(formatter(Number(min))) : setChecked(Number(min));
|
|
10533
|
-
} else if (Number(outputValue) > Number(max)) {
|
|
10534
|
-
formatter ? setChecked(formatter(Number(max))) : setChecked(Number(max));
|
|
10535
|
-
} else {
|
|
10536
|
-
formatter ? setChecked(formatter(outputValue)) : setChecked(outputValue);
|
|
10537
|
-
}
|
|
10502
|
+
const bound2 = (value2, min2, max2) => {
|
|
10503
|
+
let res = value2;
|
|
10504
|
+
if (min2 !== void 0) {
|
|
10505
|
+
res = Math.max(Number(min2), res);
|
|
10538
10506
|
}
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
onMinus && onMinus(e2);
|
|
10542
|
-
if (reduceAllow()) {
|
|
10543
|
-
if (formatter) {
|
|
10544
|
-
const numValue = String(_checked).replace(/[^0-9|.]/gi, "");
|
|
10545
|
-
const outputValue = Number(numValue) - Number(step);
|
|
10546
|
-
inputRef.current = formatter(outputValue);
|
|
10547
|
-
emitChange(outputValue, e2);
|
|
10548
|
-
} else {
|
|
10549
|
-
const outputValue = Number(_checked) - Number(step);
|
|
10550
|
-
emitChange(outputValue, e2);
|
|
10551
|
-
}
|
|
10552
|
-
} else {
|
|
10553
|
-
onOverlimit && onOverlimit(e2);
|
|
10507
|
+
if (max2 !== void 0) {
|
|
10508
|
+
res = Math.min(Number(max2), res);
|
|
10554
10509
|
}
|
|
10510
|
+
return res;
|
|
10555
10511
|
};
|
|
10556
|
-
const
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
} else {
|
|
10565
|
-
const outputValue = Number(_checked) + Number(step);
|
|
10566
|
-
emitChange(outputValue, e2);
|
|
10567
|
-
}
|
|
10568
|
-
} else {
|
|
10569
|
-
onOverlimit && onOverlimit(e2);
|
|
10512
|
+
const format2 = (value2) => {
|
|
10513
|
+
if (value2 === null)
|
|
10514
|
+
return "";
|
|
10515
|
+
if (typeof value2 === "string")
|
|
10516
|
+
value2 = parseFloat(value2);
|
|
10517
|
+
const fixedValue = bound2(value2, Number(min), Number(max));
|
|
10518
|
+
if (formatter) {
|
|
10519
|
+
return formatter(fixedValue);
|
|
10570
10520
|
}
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
const input = e2.target;
|
|
10574
|
-
onChange && onChange(input.value, e2);
|
|
10575
|
-
if (!async) {
|
|
10576
|
-
setChecked(input.value);
|
|
10521
|
+
if (digits) {
|
|
10522
|
+
return fixedValue.toFixed(digits).toString();
|
|
10577
10523
|
}
|
|
10524
|
+
return fixedValue.toString();
|
|
10578
10525
|
};
|
|
10579
|
-
const
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
if (!numReg.test(input[0]) && numValue) {
|
|
10585
|
-
setChecked(formatter(numValue));
|
|
10586
|
-
} else if (!numReg.test(input[0]) && !numValue) {
|
|
10587
|
-
setChecked(input);
|
|
10588
|
-
} else if (numReg.test(input[0])) {
|
|
10589
|
-
if (formatter(numValue) === inputRef.current) {
|
|
10590
|
-
setChecked(numValue);
|
|
10591
|
-
} else {
|
|
10592
|
-
setChecked(formatter(numValue));
|
|
10593
|
-
inputRef.current = formatter(numValue);
|
|
10594
|
-
}
|
|
10595
|
-
}
|
|
10526
|
+
const [inputValue, setInputValue] = React.useState(format2(shadowValue));
|
|
10527
|
+
React.useEffect(() => {
|
|
10528
|
+
if (!focused && !async) {
|
|
10529
|
+
setShadowValue(bound2(Number(shadowValue), Number(min), Number(max)));
|
|
10530
|
+
setInputValue(format2(shadowValue));
|
|
10596
10531
|
}
|
|
10597
|
-
};
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10532
|
+
}, [focused, shadowValue]);
|
|
10533
|
+
React.useEffect(() => {
|
|
10534
|
+
if (async) {
|
|
10535
|
+
setShadowValue(bound2(Number(value), Number(min), Number(max)));
|
|
10536
|
+
setInputValue(format2(value));
|
|
10537
|
+
}
|
|
10538
|
+
}, [value]);
|
|
10539
|
+
const calcNextValue = (current, step2, symbol) => {
|
|
10540
|
+
const dig = digits + 1;
|
|
10541
|
+
return (parseFloat(current || "0") * dig + parseFloat(step2) * dig * symbol) / dig;
|
|
10542
|
+
};
|
|
10543
|
+
const update = (negative, e2) => {
|
|
10544
|
+
if (step !== void 0) {
|
|
10545
|
+
const shouldOverBoundary = calcNextValue(
|
|
10546
|
+
shadowValue,
|
|
10547
|
+
step,
|
|
10548
|
+
negative ? -1 : 1
|
|
10549
|
+
);
|
|
10550
|
+
const nextValue = bound2(shouldOverBoundary, Number(min), Number(max));
|
|
10551
|
+
setShadowValue(nextValue);
|
|
10552
|
+
if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
|
|
10553
|
+
onOverlimit == null ? void 0 : onOverlimit(e2);
|
|
10554
|
+
} else {
|
|
10555
|
+
onChange == null ? void 0 : onChange(nextValue, e2);
|
|
10609
10556
|
}
|
|
10610
10557
|
}
|
|
10611
10558
|
};
|
|
10612
|
-
const
|
|
10559
|
+
const handleReduce = (e2) => {
|
|
10613
10560
|
if (disabled)
|
|
10614
10561
|
return;
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
onFocus && onFocus(e2);
|
|
10562
|
+
onMinus == null ? void 0 : onMinus(e2);
|
|
10563
|
+
update(true, e2);
|
|
10618
10564
|
};
|
|
10619
|
-
const
|
|
10565
|
+
const handlePlus = (e2) => {
|
|
10620
10566
|
if (disabled)
|
|
10621
10567
|
return;
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
if (
|
|
10627
|
-
|
|
10568
|
+
onPlus == null ? void 0 : onPlus(e2);
|
|
10569
|
+
update(false, e2);
|
|
10570
|
+
};
|
|
10571
|
+
const parseValue = (text) => {
|
|
10572
|
+
if (text === "")
|
|
10573
|
+
return null;
|
|
10574
|
+
if (text === "-")
|
|
10575
|
+
return null;
|
|
10576
|
+
return text;
|
|
10577
|
+
};
|
|
10578
|
+
const handleInputChange = (e2) => {
|
|
10579
|
+
setInputValue(e2.target.value);
|
|
10580
|
+
const valueStr = parseValue(e2.target.value);
|
|
10581
|
+
if (valueStr === null) {
|
|
10582
|
+
if (allowEmpty) {
|
|
10583
|
+
setShadowValue(null);
|
|
10584
|
+
} else {
|
|
10585
|
+
setShadowValue(defaultValue);
|
|
10586
|
+
}
|
|
10587
|
+
} else {
|
|
10588
|
+
setShadowValue(valueStr);
|
|
10628
10589
|
}
|
|
10629
|
-
if (
|
|
10630
|
-
|
|
10631
|
-
} else if (value2 > Number(max)) {
|
|
10632
|
-
value2 = Number(max);
|
|
10590
|
+
if (!async) {
|
|
10591
|
+
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10633
10592
|
}
|
|
10634
|
-
|
|
10593
|
+
};
|
|
10594
|
+
const handleFocus = (e2) => {
|
|
10595
|
+
setFocused(true);
|
|
10596
|
+
setInputValue(
|
|
10597
|
+
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
10598
|
+
);
|
|
10599
|
+
onFocus && onFocus(e2);
|
|
10600
|
+
};
|
|
10601
|
+
const handleBlur = (e2) => {
|
|
10602
|
+
setFocused(false);
|
|
10635
10603
|
onBlur && onBlur(e2);
|
|
10604
|
+
if (async) {
|
|
10605
|
+
const valueStr = parseValue(e2.target.value);
|
|
10606
|
+
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10607
|
+
}
|
|
10636
10608
|
};
|
|
10637
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, style
|
|
10609
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus" }, /* @__PURE__ */ React.createElement(
|
|
10638
10610
|
t,
|
|
10639
10611
|
{
|
|
10640
|
-
className:
|
|
10641
|
-
|
|
10612
|
+
className: classNames("nut-inputnumber-icon icon-minus", {
|
|
10613
|
+
[`${classPrefix$h}-icon-disabled`]: shadowValue === min || disabled
|
|
10614
|
+
}),
|
|
10615
|
+
onClick: handleReduce
|
|
10642
10616
|
}
|
|
10643
|
-
)), /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
10617
|
+
)), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
10644
10618
|
"input",
|
|
10645
10619
|
{
|
|
10646
10620
|
className: "nut-number-input",
|
|
10647
|
-
type: "
|
|
10648
|
-
|
|
10649
|
-
|
|
10621
|
+
type: "digit",
|
|
10622
|
+
ref: inputRef,
|
|
10623
|
+
inputMode: "decimal",
|
|
10650
10624
|
disabled,
|
|
10651
10625
|
readOnly,
|
|
10652
|
-
value:
|
|
10653
|
-
onInput:
|
|
10654
|
-
onBlur:
|
|
10655
|
-
onFocus:
|
|
10626
|
+
value: inputValue,
|
|
10627
|
+
onInput: handleInputChange,
|
|
10628
|
+
onBlur: handleBlur,
|
|
10629
|
+
onFocus: handleFocus
|
|
10656
10630
|
}
|
|
10657
|
-
) : /* @__PURE__ */ React.createElement(
|
|
10658
|
-
|
|
10631
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(
|
|
10632
|
+
i,
|
|
10659
10633
|
{
|
|
10660
|
-
className: "nut-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
disabled,
|
|
10665
|
-
readOnly,
|
|
10666
|
-
value: _checked,
|
|
10667
|
-
onInput: changeValue,
|
|
10668
|
-
onBlur: burValue,
|
|
10669
|
-
onFocus: focusValue
|
|
10634
|
+
className: classNames("nut-inputnumber-icon icon-plus", {
|
|
10635
|
+
[`${classPrefix$h}-icon-disabled`]: shadowValue === max || disabled
|
|
10636
|
+
}),
|
|
10637
|
+
onClick: handlePlus
|
|
10670
10638
|
}
|
|
10671
|
-
))
|
|
10639
|
+
)));
|
|
10672
10640
|
};
|
|
10673
10641
|
InputNumber.defaultProps = defaultProps$W;
|
|
10674
10642
|
InputNumber.displayName = "NutInputNumber";
|
|
@@ -12151,7 +12119,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12151
12119
|
},
|
|
12152
12120
|
/* @__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) => {
|
|
12153
12121
|
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` })));
|
|
12154
|
-
}))), /* @__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(z, { size: 11
|
|
12122
|
+
}))), /* @__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(z, { size: 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)))
|
|
12155
12123
|
);
|
|
12156
12124
|
};
|
|
12157
12125
|
const ShortPassword = React.forwardRef(InternalShortPassword);
|
|
@@ -13202,6 +13170,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13202
13170
|
return /* @__PURE__ */ React.createElement(
|
|
13203
13171
|
Popup,
|
|
13204
13172
|
{
|
|
13173
|
+
...rest,
|
|
13205
13174
|
round: true,
|
|
13206
13175
|
visible,
|
|
13207
13176
|
position: "bottom",
|
|
@@ -14980,7 +14949,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14980
14949
|
const classPrefix2 = "nut-skeleton";
|
|
14981
14950
|
const classes = classNames(classPrefix2, className);
|
|
14982
14951
|
const avatarClass = classNames({
|
|
14983
|
-
avatar: true,
|
|
14952
|
+
[`nut-avatar`]: true,
|
|
14984
14953
|
[`avatar-${avatarShape}`]: avatarShape
|
|
14985
14954
|
});
|
|
14986
14955
|
const repeatLines = (num) => {
|
|
@@ -14998,7 +14967,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14998
14967
|
height: "50px"
|
|
14999
14968
|
};
|
|
15000
14969
|
};
|
|
15001
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, visible ? /* @__PURE__ */ React.createElement(
|
|
14970
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, visible ? /* @__PURE__ */ React.createElement(React.Fragment, null, children) : /* @__PURE__ */ React.createElement("div", { className: classes, ...rest }, animated && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-animation` }), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, avatar && /* @__PURE__ */ React.createElement(
|
|
15002
14971
|
Avatar,
|
|
15003
14972
|
{
|
|
15004
14973
|
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;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
content: ' ';
|
|
8
8
|
pointer-events: none;
|
|
9
9
|
right: 16px;
|
|
10
|
-
bottom: 0;
|
|
11
10
|
left: 16px;
|
|
11
|
+
bottom: 0;
|
|
12
12
|
border-bottom: $collapse-item-border-bottom;
|
|
13
13
|
-webkit-transform: scaleY(0.5);
|
|
14
14
|
transform: scaleY(0.5);
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
content: ' ';
|
|
36
36
|
pointer-events: none;
|
|
37
37
|
right: 16px;
|
|
38
|
-
bottom: 0;
|
|
39
38
|
left: 16px;
|
|
39
|
+
bottom: 0;
|
|
40
40
|
border-bottom: $collapse-item-header-border-bottom;
|
|
41
41
|
-webkit-transform: scaleY(0.5);
|
|
42
42
|
transform: scaleY(0.5);
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
|
|
109
108
|
[dir='rtl'] .nut-collapse-item,
|
|
110
109
|
.nut-rtl .nut-collapse-item {
|
|
111
110
|
&-icon-box {
|