@nutui/nutui-react-taro 2.6.15-beta.0 → 2.6.16
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 +931 -909
- package/README.md +21 -28
- package/dist/esm/Audio.js +1 -1
- package/dist/esm/Checkbox.js +1 -1
- package/dist/esm/CheckboxGroup.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/InputNumber.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/PullToRefresh.js +1 -1
- package/dist/esm/Radio.js +1 -1
- package/dist/esm/RadioGroup.js +1 -1
- package/dist/esm/Swipe.js +1 -1
- package/dist/esm/Swiper.js +1 -2
- package/dist/esm/SwiperItem.js +1 -1
- package/dist/esm/Table.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{audio.taro-DzSc40G9.js → audio.taro-CD-vP_u0.js} +7 -8
- package/dist/esm/{checkbox.taro-Dc054oRo.js → checkbox.taro-CgqJyhrh.js} +4 -5
- package/dist/esm/{datepicker.taro-DTyJrlhD.js → datepicker.taro-BxaZ3Fjv.js} +3 -4
- package/dist/esm/{formitem.taro-Dmt5-wxG.js → formitem.taro-DogVddcs.js} +2 -2
- package/dist/esm/{imagepreview.taro-DtgQJEQ_.js → imagepreview.taro-CF-CCJ1Q.js} +1 -1
- package/dist/esm/{inputnumber.taro-WN5Drnyz.js → inputnumber.taro-D9mteLSI.js} +26 -9
- package/dist/esm/{menu.taro-CrPdDbYM.js → menu.taro-CLbOM_Z4.js} +12 -5
- package/dist/esm/{menuitem.taro-DMV3j4DK.js → menuitem.taro-CNaseNcY.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-BA0iCeGP.js → numberkeyboard.taro-Cz6rKxk3.js} +38 -27
- package/dist/esm/nutui-react.es.js +15 -15
- package/dist/esm/{pulltorefresh.taro-CZReoWwU.js → pulltorefresh.taro-BScP6uPx.js} +0 -1
- package/dist/esm/{radio.taro-BNSceequ.js → radio.taro-CzOHqD3O.js} +0 -2
- package/dist/esm/{swipe.taro-yUhne9XU.js → swipe.taro-Bsk2fnEl.js} +0 -1
- package/dist/esm/{swiperitem.taro-DeiNSrJV.js → swiperitem.taro-BleF1EOs.js} +0 -5
- package/dist/esm/{table.taro-D2M3D2Vj.js → table.taro-B6WCKTkO.js} +6 -5
- package/dist/esm/{uploader.taro-DfO2HWvy.js → uploader.taro-DagHZaNI.js} +4 -2
- 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 +207 -151
- package/dist/nutui.react.umd.js +207 -151
- package/dist/types/packages/cell/cell.d.ts +1 -1
- package/dist/types/packages/cell/cell.taro.d.ts +2 -2
- package/dist/types/packages/formitem/formitem.d.ts +1 -0
- package/dist/types/packages/formitem/formitem.taro.d.ts +5 -0
- package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
- package/dist/types/packages/menuitem/menuitem.d.ts +1 -0
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +5 -0
- package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
- package/dist/types/packages/swiperitem/swiperitem.d.ts +0 -1
- package/package.json +2 -2
- package/dist/types/packages/griditem/types.d.ts +0 -13
package/dist/nutui.react.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, Taro, components, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react-taro v2.6.
|
|
5
|
+
* @nutui/nutui-react-taro v2.6.16 Sat Aug 03 2024 09:52:17 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -143,7 +143,6 @@
|
|
|
143
143
|
const g$6 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowDown", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgMjg5LjgzYTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM0IDYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDAgNjAuMzYgMGwzODQtMzg0YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM2LTYwLjM0TDUxMiA2NDMuNjd6Ii8+PC9zdmc+" });
|
|
144
144
|
g$6.defaultProps = k;
|
|
145
145
|
const g$5 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowLeft", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik03MTIuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjMzLTYwLjM0bC0zODQgMzg0YTQyLjY3IDQyLjY3IDAgMCAwIDAgNjAuMzZsMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMCA2MC4zMy02MC4zNkwzNTkgNTEyeiIvPjwvc3ZnPg==" });
|
|
146
|
-
g$5.defaultProps = k;
|
|
147
146
|
const a$2 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowUp", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgNzM0LjE3YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM0LTYwLjM0bDM4NC0zODRhNDIuNjcgNDIuNjcgMCAwIDEgNjAuMzYgMGwzODQgMzg0YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM2IDYwLjM0TDUxMiAzODAuMzN6Ii8+PC9zdmc+" });
|
|
148
147
|
a$2.defaultProps = k;
|
|
149
148
|
const g$4 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "CheckChecked", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik01MDYuNjUgMi44MkMyMjguMDEgMi44Mi4wMyAyMzAuOC4wMyA1MDkuNDRzMjI3Ljk4IDUwNi42MiA1MDYuNjIgNTA2LjYyIDUwNi42Mi0yMjcuOTggNTA2LjYzLTUwNi42MlM3ODguMTEgMi44MiA1MDYuNjUgMi44Mm0wIDc4OC4wOGMtMTU0LjggMC0yODEuNDYtMTI2LjY2LTI4MS40NS0yODEuNDZzMTI2LjY2LTI4MS40NiAyODEuNDUtMjgxLjQ2IDI4MS40NiAxMjYuNjYgMjgxLjQ2IDI4MS40NlM2NjEuNDUgNzkwLjkgNTA2LjY1IDc5MC45Ii8+PHBhdGggZmlsbD0iIzMzMyIgZD0iTTM4MCA1MDkuNDRhMTI2LjY2IDEyNi42NiAwIDEgMCAyNTMuMzEgMCAxMjYuNjYgMTI2LjY2IDAgMSAwLTI1My4zMSAwIi8+PC9zdmc+" });
|
|
@@ -7558,15 +7557,15 @@
|
|
|
7558
7557
|
className,
|
|
7559
7558
|
disabled,
|
|
7560
7559
|
list,
|
|
7561
|
-
onChange,
|
|
7562
7560
|
value,
|
|
7563
7561
|
defaultValue,
|
|
7564
7562
|
max,
|
|
7565
7563
|
min,
|
|
7566
|
-
onLimit,
|
|
7567
7564
|
labelPosition,
|
|
7568
7565
|
direction,
|
|
7569
7566
|
options,
|
|
7567
|
+
onChange,
|
|
7568
|
+
onLimit,
|
|
7570
7569
|
...rest
|
|
7571
7570
|
} = { ...defaultProps$10, ...props };
|
|
7572
7571
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -7595,8 +7594,8 @@
|
|
|
7595
7594
|
}
|
|
7596
7595
|
}));
|
|
7597
7596
|
const [_value, setValue] = usePropsValue({
|
|
7598
|
-
value
|
|
7599
|
-
defaultValue
|
|
7597
|
+
value,
|
|
7598
|
+
defaultValue,
|
|
7600
7599
|
finalValue: [],
|
|
7601
7600
|
onChange
|
|
7602
7601
|
});
|
|
@@ -7648,7 +7647,7 @@
|
|
|
7648
7647
|
className: classNames(
|
|
7649
7648
|
classPrefix$j,
|
|
7650
7649
|
{
|
|
7651
|
-
[`nut-checkboxgroup-${
|
|
7650
|
+
[`nut-checkboxgroup-${direction}`]: direction,
|
|
7652
7651
|
[`nut-checkboxgroup-list`]: list
|
|
7653
7652
|
},
|
|
7654
7653
|
className
|
|
@@ -7660,7 +7659,6 @@
|
|
|
7660
7659
|
);
|
|
7661
7660
|
}
|
|
7662
7661
|
);
|
|
7663
|
-
CheckboxGroup.defaultProps = defaultProps$10;
|
|
7664
7662
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
7665
7663
|
const defaultProps$$ = {
|
|
7666
7664
|
...ComponentDefaults,
|
|
@@ -8557,7 +8555,7 @@
|
|
|
8557
8555
|
if (!isEqual) {
|
|
8558
8556
|
setSelectedDate(formatValue(newDate));
|
|
8559
8557
|
}
|
|
8560
|
-
|
|
8558
|
+
onChange == null ? void 0 : onChange(
|
|
8561
8559
|
selectedOptions,
|
|
8562
8560
|
[
|
|
8563
8561
|
String(newDate.getFullYear()),
|
|
@@ -8654,8 +8652,8 @@
|
|
|
8654
8652
|
}
|
|
8655
8653
|
pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
|
|
8656
8654
|
setPickerValue([...pickerValue]);
|
|
8657
|
-
if (
|
|
8658
|
-
return
|
|
8655
|
+
if (filter == null ? void 0 : filter(type22, arr)) {
|
|
8656
|
+
return filter == null ? void 0 : filter(type22, arr);
|
|
8659
8657
|
}
|
|
8660
8658
|
return arr;
|
|
8661
8659
|
};
|
|
@@ -8722,7 +8720,6 @@
|
|
|
8722
8720
|
)
|
|
8723
8721
|
);
|
|
8724
8722
|
};
|
|
8725
|
-
DatePicker.defaultProps = defaultProps$Z;
|
|
8726
8723
|
DatePicker.displayName = "NutDatePicker";
|
|
8727
8724
|
const Context = React.createContext({});
|
|
8728
8725
|
function _extends() {
|
|
@@ -10140,6 +10137,7 @@
|
|
|
10140
10137
|
rules: rules2,
|
|
10141
10138
|
className,
|
|
10142
10139
|
style,
|
|
10140
|
+
align,
|
|
10143
10141
|
errorMessageAlign
|
|
10144
10142
|
} = {
|
|
10145
10143
|
...defaultProps$X,
|
|
@@ -10155,6 +10153,7 @@
|
|
|
10155
10153
|
{
|
|
10156
10154
|
className: `nut-form-item ${className}`,
|
|
10157
10155
|
style,
|
|
10156
|
+
align,
|
|
10158
10157
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
10159
10158
|
},
|
|
10160
10159
|
label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -10566,6 +10565,17 @@
|
|
|
10566
10565
|
if (text === "-") return null;
|
|
10567
10566
|
return text;
|
|
10568
10567
|
};
|
|
10568
|
+
const clampValue = (valueStr) => {
|
|
10569
|
+
if (valueStr === null) return defaultValue;
|
|
10570
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
10571
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
10572
|
+
};
|
|
10573
|
+
const handleValueChange = (valueStr, e2) => {
|
|
10574
|
+
const val = clampValue(valueStr);
|
|
10575
|
+
if (val !== Number(shadowValue)) {
|
|
10576
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
10577
|
+
}
|
|
10578
|
+
};
|
|
10569
10579
|
const handleInputChange = (e2) => {
|
|
10570
10580
|
setInputValue(e2.target.value);
|
|
10571
10581
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -10576,26 +10586,31 @@
|
|
|
10576
10586
|
setShadowValue(defaultValue);
|
|
10577
10587
|
}
|
|
10578
10588
|
} else {
|
|
10579
|
-
setShadowValue(valueStr);
|
|
10580
|
-
}
|
|
10581
|
-
if (!async) {
|
|
10582
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10589
|
+
setShadowValue(clampValue(valueStr));
|
|
10583
10590
|
}
|
|
10591
|
+
!async && handleValueChange(valueStr, e2);
|
|
10584
10592
|
};
|
|
10585
10593
|
const handleFocus = (e2) => {
|
|
10586
10594
|
setFocused(true);
|
|
10587
10595
|
setInputValue(
|
|
10588
10596
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
10589
10597
|
);
|
|
10590
|
-
onFocus
|
|
10598
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
10591
10599
|
};
|
|
10592
10600
|
const handleBlur = (e2) => {
|
|
10593
10601
|
setFocused(false);
|
|
10594
|
-
onBlur
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10602
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
10603
|
+
const valueStr = parseValue(e2.target.value);
|
|
10604
|
+
if (valueStr === null) {
|
|
10605
|
+
if (allowEmpty) {
|
|
10606
|
+
setShadowValue(null);
|
|
10607
|
+
} else {
|
|
10608
|
+
setShadowValue(defaultValue);
|
|
10609
|
+
}
|
|
10610
|
+
} else {
|
|
10611
|
+
setShadowValue(clampValue(valueStr));
|
|
10598
10612
|
}
|
|
10613
|
+
async && handleValueChange(valueStr, e2);
|
|
10599
10614
|
};
|
|
10600
10615
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
|
|
10601
10616
|
a$1,
|
|
@@ -10630,6 +10645,7 @@
|
|
|
10630
10645
|
InputNumber.displayName = "NutInputNumber";
|
|
10631
10646
|
const defaultProps$U = {
|
|
10632
10647
|
...ComponentDefaults,
|
|
10648
|
+
titleIcon: null,
|
|
10633
10649
|
columns: 1,
|
|
10634
10650
|
direction: "down",
|
|
10635
10651
|
icon: null,
|
|
@@ -10932,7 +10948,15 @@
|
|
|
10932
10948
|
const menuTitle = () => {
|
|
10933
10949
|
return React.Children.map(children, (child, index) => {
|
|
10934
10950
|
if (React.isValidElement(child)) {
|
|
10935
|
-
const {
|
|
10951
|
+
const {
|
|
10952
|
+
title,
|
|
10953
|
+
titleIcon,
|
|
10954
|
+
options,
|
|
10955
|
+
value,
|
|
10956
|
+
defaultValue,
|
|
10957
|
+
disabled,
|
|
10958
|
+
direction
|
|
10959
|
+
} = child.props;
|
|
10936
10960
|
const selected = options == null ? void 0 : options.filter(
|
|
10937
10961
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
10938
10962
|
);
|
|
@@ -10943,17 +10967,32 @@
|
|
|
10943
10967
|
return selected[0].text;
|
|
10944
10968
|
return "";
|
|
10945
10969
|
};
|
|
10970
|
+
const finallyIcon = () => {
|
|
10971
|
+
if (titleIcon) return titleIcon;
|
|
10972
|
+
if (icon) return icon;
|
|
10973
|
+
return direction === "up" ? /* @__PURE__ */ React.createElement(
|
|
10974
|
+
a$2,
|
|
10975
|
+
{
|
|
10976
|
+
className: "nut-menu-title-icon",
|
|
10977
|
+
width: "12px",
|
|
10978
|
+
height: "12px"
|
|
10979
|
+
}
|
|
10980
|
+
) : /* @__PURE__ */ React.createElement(
|
|
10981
|
+
g$6,
|
|
10982
|
+
{
|
|
10983
|
+
className: "nut-menu-title-icon",
|
|
10984
|
+
width: "12px",
|
|
10985
|
+
height: "12px"
|
|
10986
|
+
}
|
|
10987
|
+
);
|
|
10988
|
+
};
|
|
10946
10989
|
return /* @__PURE__ */ React.createElement(
|
|
10947
10990
|
"div",
|
|
10948
10991
|
{
|
|
10949
|
-
className: classNames(
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
disabled
|
|
10954
|
-
},
|
|
10955
|
-
className
|
|
10956
|
-
),
|
|
10992
|
+
className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
|
|
10993
|
+
active: showMenuItem[index],
|
|
10994
|
+
disabled
|
|
10995
|
+
}),
|
|
10957
10996
|
style: { color: showMenuItem[index] ? activeColor : "" },
|
|
10958
10997
|
key: index,
|
|
10959
10998
|
onClick: () => {
|
|
@@ -10962,7 +11001,7 @@
|
|
|
10962
11001
|
}
|
|
10963
11002
|
},
|
|
10964
11003
|
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
10965
|
-
|
|
11004
|
+
finallyIcon()
|
|
10966
11005
|
);
|
|
10967
11006
|
}
|
|
10968
11007
|
return null;
|
|
@@ -10991,6 +11030,16 @@
|
|
|
10991
11030
|
};
|
|
10992
11031
|
Menu.displayName = "NutMenu";
|
|
10993
11032
|
Menu.Item = MenuItem;
|
|
11033
|
+
const defaultProps$S = {
|
|
11034
|
+
...ComponentDefaults,
|
|
11035
|
+
visible: false,
|
|
11036
|
+
rightActions: "",
|
|
11037
|
+
type: "default",
|
|
11038
|
+
custom: [],
|
|
11039
|
+
random: false,
|
|
11040
|
+
onClose: () => {
|
|
11041
|
+
}
|
|
11042
|
+
};
|
|
10994
11043
|
const NumberKeyboard = (props) => {
|
|
10995
11044
|
const { locale } = useConfig$1();
|
|
10996
11045
|
const {
|
|
@@ -11008,7 +11057,7 @@
|
|
|
11008
11057
|
onClose,
|
|
11009
11058
|
onConfirm,
|
|
11010
11059
|
...rest
|
|
11011
|
-
} = props;
|
|
11060
|
+
} = { ...defaultProps$S, ...props };
|
|
11012
11061
|
const classPrefix2 = "nut-numberkeyboard";
|
|
11013
11062
|
const getBasicKeys = () => {
|
|
11014
11063
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -11054,17 +11103,35 @@
|
|
|
11054
11103
|
};
|
|
11055
11104
|
const onTouchEnd = (item2) => {
|
|
11056
11105
|
setActive(false);
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11106
|
+
switch (item2.type) {
|
|
11107
|
+
case "num":
|
|
11108
|
+
case "custom":
|
|
11109
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
11110
|
+
break;
|
|
11111
|
+
case "close":
|
|
11112
|
+
onClose == null ? void 0 : onClose();
|
|
11113
|
+
break;
|
|
11114
|
+
case "delete":
|
|
11115
|
+
onDelete == null ? void 0 : onDelete();
|
|
11116
|
+
break;
|
|
11117
|
+
case "confirm":
|
|
11118
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
11119
|
+
break;
|
|
11065
11120
|
}
|
|
11066
|
-
|
|
11067
|
-
|
|
11121
|
+
};
|
|
11122
|
+
const renderContent = (item2) => {
|
|
11123
|
+
switch (item2.type) {
|
|
11124
|
+
case "num":
|
|
11125
|
+
case "custom":
|
|
11126
|
+
return /* @__PURE__ */ React.createElement("div", null, item2.id);
|
|
11127
|
+
case "delete":
|
|
11128
|
+
return /* @__PURE__ */ React.createElement(DeleteIcon, null);
|
|
11129
|
+
case "close":
|
|
11130
|
+
return /* @__PURE__ */ React.createElement(g$6, { size: 18 });
|
|
11131
|
+
case "confirm":
|
|
11132
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done);
|
|
11133
|
+
default:
|
|
11134
|
+
return null;
|
|
11068
11135
|
}
|
|
11069
11136
|
};
|
|
11070
11137
|
return /* @__PURE__ */ React.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React.createElement(
|
|
@@ -11081,22 +11148,19 @@
|
|
|
11081
11148
|
onTouchEnd: () => onTouchEnd(item),
|
|
11082
11149
|
onTouchCancel: () => onTouchEnd(item)
|
|
11083
11150
|
},
|
|
11084
|
-
(item
|
|
11085
|
-
item.type === "delete" && /* @__PURE__ */ React.createElement(DeleteIcon, null),
|
|
11086
|
-
item.type === "close" && /* @__PURE__ */ React.createElement(g$6, { size: 18 }),
|
|
11087
|
-
item.type === "confirm" && /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done)
|
|
11151
|
+
renderContent(item)
|
|
11088
11152
|
));
|
|
11089
11153
|
};
|
|
11090
11154
|
return /* @__PURE__ */ React.createElement(
|
|
11091
11155
|
Popup,
|
|
11092
11156
|
{
|
|
11157
|
+
...rest,
|
|
11093
11158
|
visible,
|
|
11094
11159
|
position: "bottom",
|
|
11095
11160
|
onOverlayClick: onClose,
|
|
11096
11161
|
onCloseIconClick: onClose,
|
|
11097
11162
|
zIndex: 9999,
|
|
11098
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11099
|
-
...rest
|
|
11163
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11100
11164
|
},
|
|
11101
11165
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header-title` }, title), type2 === "default" && /* @__PURE__ */ React.createElement(
|
|
11102
11166
|
"span",
|
|
@@ -11130,7 +11194,7 @@
|
|
|
11130
11194
|
};
|
|
11131
11195
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
11132
11196
|
const RadioContext = React.createContext(null);
|
|
11133
|
-
const defaultProps$
|
|
11197
|
+
const defaultProps$R = {
|
|
11134
11198
|
labelPosition: "right",
|
|
11135
11199
|
onChange: (value) => {
|
|
11136
11200
|
},
|
|
@@ -11152,7 +11216,7 @@
|
|
|
11152
11216
|
options,
|
|
11153
11217
|
disabled,
|
|
11154
11218
|
...rest
|
|
11155
|
-
} = { ...defaultProps$
|
|
11219
|
+
} = { ...defaultProps$R, ...props };
|
|
11156
11220
|
const [val2State, setVal2State] = usePropsValue({
|
|
11157
11221
|
defaultValue: props.defaultValue,
|
|
11158
11222
|
value: props.value,
|
|
@@ -11209,9 +11273,8 @@
|
|
|
11209
11273
|
);
|
|
11210
11274
|
}
|
|
11211
11275
|
);
|
|
11212
|
-
RadioGroup.defaultProps = defaultProps$S;
|
|
11213
11276
|
RadioGroup.displayName = "NutRadioGroup";
|
|
11214
|
-
const defaultProps$
|
|
11277
|
+
const defaultProps$Q = {
|
|
11215
11278
|
...ComponentDefaults,
|
|
11216
11279
|
disabled: false,
|
|
11217
11280
|
shape: "round",
|
|
@@ -11237,7 +11300,7 @@
|
|
|
11237
11300
|
onChange,
|
|
11238
11301
|
...others
|
|
11239
11302
|
} = {
|
|
11240
|
-
...defaultProps$
|
|
11303
|
+
...defaultProps$Q,
|
|
11241
11304
|
...props
|
|
11242
11305
|
};
|
|
11243
11306
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -11337,10 +11400,9 @@
|
|
|
11337
11400
|
renderRadioItem()
|
|
11338
11401
|
);
|
|
11339
11402
|
};
|
|
11340
|
-
Radio.defaultProps = defaultProps$R;
|
|
11341
11403
|
Radio.displayName = "NutRadio";
|
|
11342
11404
|
Radio.Group = RadioGroup;
|
|
11343
|
-
const defaultProps$
|
|
11405
|
+
const defaultProps$P = {
|
|
11344
11406
|
...ComponentDefaults,
|
|
11345
11407
|
range: false,
|
|
11346
11408
|
min: 0,
|
|
@@ -11369,7 +11431,7 @@
|
|
|
11369
11431
|
step,
|
|
11370
11432
|
value,
|
|
11371
11433
|
defaultValue
|
|
11372
|
-
} = { ...defaultProps$
|
|
11434
|
+
} = { ...defaultProps$P, ...props };
|
|
11373
11435
|
const classPrefix2 = "nut-range";
|
|
11374
11436
|
const [buttonIndex, setButtonIndex] = React.useState(0);
|
|
11375
11437
|
const [dragStatus, setDragStatus] = React.useState("start");
|
|
@@ -11651,7 +11713,7 @@
|
|
|
11651
11713
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
11652
11714
|
};
|
|
11653
11715
|
Range.displayName = "NutRange";
|
|
11654
|
-
const defaultProps$
|
|
11716
|
+
const defaultProps$O = {
|
|
11655
11717
|
...ComponentDefaults,
|
|
11656
11718
|
count: 5,
|
|
11657
11719
|
min: 0,
|
|
@@ -11679,7 +11741,7 @@
|
|
|
11679
11741
|
onChange,
|
|
11680
11742
|
onTouchEnd
|
|
11681
11743
|
} = {
|
|
11682
|
-
...defaultProps$
|
|
11744
|
+
...defaultProps$O,
|
|
11683
11745
|
...props
|
|
11684
11746
|
};
|
|
11685
11747
|
const classPrefix2 = "nut-rate";
|
|
@@ -11836,7 +11898,7 @@
|
|
|
11836
11898
|
);
|
|
11837
11899
|
};
|
|
11838
11900
|
Rate.displayName = "NutRate";
|
|
11839
|
-
const defaultProps$
|
|
11901
|
+
const defaultProps$N = {
|
|
11840
11902
|
...ComponentDefaults,
|
|
11841
11903
|
placeholder: "",
|
|
11842
11904
|
shape: "square",
|
|
@@ -11878,7 +11940,7 @@
|
|
|
11878
11940
|
onSearch,
|
|
11879
11941
|
onInputClick
|
|
11880
11942
|
} = {
|
|
11881
|
-
...defaultProps$
|
|
11943
|
+
...defaultProps$N,
|
|
11882
11944
|
...props
|
|
11883
11945
|
};
|
|
11884
11946
|
const [value, setValue] = React.useState(() => outerValue);
|
|
@@ -11995,7 +12057,7 @@
|
|
|
11995
12057
|
);
|
|
11996
12058
|
};
|
|
11997
12059
|
SearchBar.displayName = "NutSearchBar";
|
|
11998
|
-
const defaultProps$
|
|
12060
|
+
const defaultProps$M = {
|
|
11999
12061
|
...ComponentDefaults,
|
|
12000
12062
|
value: "",
|
|
12001
12063
|
visible: false,
|
|
@@ -12032,7 +12094,7 @@
|
|
|
12032
12094
|
onCloseIconClick,
|
|
12033
12095
|
...rest
|
|
12034
12096
|
} = {
|
|
12035
|
-
...defaultProps$
|
|
12097
|
+
...defaultProps$M,
|
|
12036
12098
|
...props
|
|
12037
12099
|
};
|
|
12038
12100
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -12092,7 +12154,7 @@
|
|
|
12092
12154
|
);
|
|
12093
12155
|
};
|
|
12094
12156
|
const ShortPassword = React.forwardRef(InternalShortPassword);
|
|
12095
|
-
const defaultProps$
|
|
12157
|
+
const defaultProps$L = {
|
|
12096
12158
|
...ComponentDefaults,
|
|
12097
12159
|
canvasId: "spcanvas",
|
|
12098
12160
|
type: "png",
|
|
@@ -12111,7 +12173,7 @@
|
|
|
12111
12173
|
onClear,
|
|
12112
12174
|
...rest
|
|
12113
12175
|
} = {
|
|
12114
|
-
...defaultProps$
|
|
12176
|
+
...defaultProps$L,
|
|
12115
12177
|
...props
|
|
12116
12178
|
};
|
|
12117
12179
|
const classPrefix2 = `nut-signature`;
|
|
@@ -12268,7 +12330,7 @@
|
|
|
12268
12330
|
InternalSignature
|
|
12269
12331
|
);
|
|
12270
12332
|
Signature.displayName = "NutSignature";
|
|
12271
|
-
const defaultProps$
|
|
12333
|
+
const defaultProps$K = {
|
|
12272
12334
|
...ComponentDefaults,
|
|
12273
12335
|
disabled: false,
|
|
12274
12336
|
activeText: "",
|
|
@@ -12286,7 +12348,7 @@
|
|
|
12286
12348
|
onChange,
|
|
12287
12349
|
...rest
|
|
12288
12350
|
} = {
|
|
12289
|
-
...defaultProps$
|
|
12351
|
+
...defaultProps$K,
|
|
12290
12352
|
...props
|
|
12291
12353
|
};
|
|
12292
12354
|
const classPrefix2 = "nut-switch";
|
|
@@ -12314,7 +12376,7 @@
|
|
|
12314
12376
|
);
|
|
12315
12377
|
};
|
|
12316
12378
|
Switch.displayName = "NutSwitch";
|
|
12317
|
-
const defaultProps$
|
|
12379
|
+
const defaultProps$J = {
|
|
12318
12380
|
...ComponentDefaults,
|
|
12319
12381
|
defaultValue: "",
|
|
12320
12382
|
showCount: false,
|
|
@@ -12342,7 +12404,7 @@
|
|
|
12342
12404
|
onBlur,
|
|
12343
12405
|
onFocus,
|
|
12344
12406
|
...rest
|
|
12345
|
-
} = { ...defaultProps$
|
|
12407
|
+
} = { ...defaultProps$J, ...props };
|
|
12346
12408
|
const classPrefix2 = "nut-textarea";
|
|
12347
12409
|
const compositionRef = React.useRef(false);
|
|
12348
12410
|
const format2 = (value2) => {
|
|
@@ -12485,10 +12547,12 @@
|
|
|
12485
12547
|
uploadTaro(uploadFile, env) {
|
|
12486
12548
|
var _a;
|
|
12487
12549
|
const options = this.options;
|
|
12550
|
+
if (options.beforeXhrUpload) {
|
|
12551
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
12552
|
+
return;
|
|
12553
|
+
}
|
|
12488
12554
|
if (env === "WEB") {
|
|
12489
12555
|
this.upload();
|
|
12490
|
-
} else if (options.beforeXhrUpload) {
|
|
12491
|
-
options.beforeXhrUpload(uploadFile, options);
|
|
12492
12556
|
} else {
|
|
12493
12557
|
const uploadTask = uploadFile({
|
|
12494
12558
|
url: options.url,
|
|
@@ -12572,7 +12636,7 @@
|
|
|
12572
12636
|
this.formData = {};
|
|
12573
12637
|
}
|
|
12574
12638
|
}
|
|
12575
|
-
const defaultProps$
|
|
12639
|
+
const defaultProps$I = {
|
|
12576
12640
|
...ComponentDefaults,
|
|
12577
12641
|
percent: 0,
|
|
12578
12642
|
showText: false,
|
|
@@ -12596,7 +12660,7 @@
|
|
|
12596
12660
|
delay,
|
|
12597
12661
|
...rest
|
|
12598
12662
|
} = {
|
|
12599
|
-
...defaultProps$
|
|
12663
|
+
...defaultProps$I,
|
|
12600
12664
|
...props
|
|
12601
12665
|
};
|
|
12602
12666
|
const classPrefix2 = "nut-progress";
|
|
@@ -12805,7 +12869,7 @@
|
|
|
12805
12869
|
);
|
|
12806
12870
|
}));
|
|
12807
12871
|
};
|
|
12808
|
-
const defaultProps$
|
|
12872
|
+
const defaultProps$H = {
|
|
12809
12873
|
...ComponentDefaults,
|
|
12810
12874
|
url: "",
|
|
12811
12875
|
maxCount: 1,
|
|
@@ -12880,7 +12944,7 @@
|
|
|
12880
12944
|
beforeXhrUpload,
|
|
12881
12945
|
beforeDelete,
|
|
12882
12946
|
...restProps
|
|
12883
|
-
} = { ...defaultProps$
|
|
12947
|
+
} = { ...defaultProps$H, ...props };
|
|
12884
12948
|
const [fileList, setFileList] = usePropsValue({
|
|
12885
12949
|
value,
|
|
12886
12950
|
defaultValue,
|
|
@@ -13171,7 +13235,7 @@
|
|
|
13171
13235
|
};
|
|
13172
13236
|
const Uploader = React.forwardRef(InternalUploader);
|
|
13173
13237
|
Uploader.displayName = "NutUploader";
|
|
13174
|
-
const defaultProps$
|
|
13238
|
+
const defaultProps$G = {
|
|
13175
13239
|
...ComponentDefaults,
|
|
13176
13240
|
visible: false,
|
|
13177
13241
|
description: "",
|
|
@@ -13197,7 +13261,7 @@
|
|
|
13197
13261
|
className,
|
|
13198
13262
|
style,
|
|
13199
13263
|
...rest
|
|
13200
|
-
} = { ...defaultProps$
|
|
13264
|
+
} = { ...defaultProps$G, ...props };
|
|
13201
13265
|
const classPrefix2 = "nut-actionsheet";
|
|
13202
13266
|
const cancelActionSheet = () => {
|
|
13203
13267
|
onCancel && onCancel();
|
|
@@ -13335,7 +13399,7 @@
|
|
|
13335
13399
|
const params = stateRef.current;
|
|
13336
13400
|
return { params, setParams };
|
|
13337
13401
|
}
|
|
13338
|
-
const defaultProps$
|
|
13402
|
+
const defaultProps$F = {
|
|
13339
13403
|
title: "",
|
|
13340
13404
|
content: "",
|
|
13341
13405
|
header: "",
|
|
@@ -13389,7 +13453,7 @@
|
|
|
13389
13453
|
beforeClose
|
|
13390
13454
|
},
|
|
13391
13455
|
setParams
|
|
13392
|
-
} = useParams({ ...defaultProps$
|
|
13456
|
+
} = useParams({ ...defaultProps$F, ...props });
|
|
13393
13457
|
useCustomEvent(
|
|
13394
13458
|
id,
|
|
13395
13459
|
({ status, options }) => {
|
|
@@ -13514,11 +13578,11 @@
|
|
|
13514
13578
|
const path = useCustomEventsPath(selector);
|
|
13515
13579
|
customEvents.trigger(path, { status: false });
|
|
13516
13580
|
}
|
|
13517
|
-
BaseDialog.defaultProps = defaultProps$
|
|
13581
|
+
BaseDialog.defaultProps = defaultProps$F;
|
|
13518
13582
|
BaseDialog.displayName = "NutDialog";
|
|
13519
13583
|
BaseDialog.open = open$1;
|
|
13520
13584
|
BaseDialog.close = close$1;
|
|
13521
|
-
const defaultProps$
|
|
13585
|
+
const defaultProps$E = {
|
|
13522
13586
|
...ComponentDefaults,
|
|
13523
13587
|
attract: false,
|
|
13524
13588
|
direction: void 0,
|
|
@@ -13543,7 +13607,7 @@
|
|
|
13543
13607
|
style,
|
|
13544
13608
|
...reset
|
|
13545
13609
|
} = {
|
|
13546
|
-
...defaultProps$
|
|
13610
|
+
...defaultProps$E,
|
|
13547
13611
|
...props
|
|
13548
13612
|
};
|
|
13549
13613
|
const classPrefix2 = "nut-drag";
|
|
@@ -13656,7 +13720,7 @@
|
|
|
13656
13720
|
error: "https://storage.360buyimg.com/imgtools/f3278d0ebb-0ce360c0-c0ac-11ee-8375-193101bb1a46.png",
|
|
13657
13721
|
network: "https://storage.360buyimg.com/imgtools/43c30f7e29-0d483d10-c0ac-11ee-bec4-eb4d2a09a51d.png"
|
|
13658
13722
|
};
|
|
13659
|
-
const defaultProps$
|
|
13723
|
+
const defaultProps$D = {
|
|
13660
13724
|
...ComponentDefaults,
|
|
13661
13725
|
title: "",
|
|
13662
13726
|
description: "",
|
|
@@ -13680,7 +13744,7 @@
|
|
|
13680
13744
|
actions,
|
|
13681
13745
|
...rest
|
|
13682
13746
|
} = {
|
|
13683
|
-
...defaultProps$
|
|
13747
|
+
...defaultProps$D,
|
|
13684
13748
|
...props
|
|
13685
13749
|
};
|
|
13686
13750
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -13725,7 +13789,7 @@
|
|
|
13725
13789
|
})), children);
|
|
13726
13790
|
};
|
|
13727
13791
|
Empty.displayName = "NutEmpty";
|
|
13728
|
-
const defaultProps$
|
|
13792
|
+
const defaultProps$C = {
|
|
13729
13793
|
...ComponentDefaults,
|
|
13730
13794
|
type: "default",
|
|
13731
13795
|
hasMore: true,
|
|
@@ -13752,7 +13816,7 @@
|
|
|
13752
13816
|
onScroll,
|
|
13753
13817
|
...rest
|
|
13754
13818
|
} = {
|
|
13755
|
-
...defaultProps$
|
|
13819
|
+
...defaultProps$C,
|
|
13756
13820
|
...props
|
|
13757
13821
|
};
|
|
13758
13822
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -13866,7 +13930,7 @@
|
|
|
13866
13930
|
circular: D$5,
|
|
13867
13931
|
spinner: I
|
|
13868
13932
|
};
|
|
13869
|
-
const defaultProps$
|
|
13933
|
+
const defaultProps$B = {
|
|
13870
13934
|
...ComponentDefaults,
|
|
13871
13935
|
// 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
|
|
13872
13936
|
type: "circular",
|
|
@@ -13874,7 +13938,7 @@
|
|
|
13874
13938
|
};
|
|
13875
13939
|
const Loading = (props) => {
|
|
13876
13940
|
const { className, style, children, direction, icon, ...rest } = {
|
|
13877
|
-
...defaultProps$
|
|
13941
|
+
...defaultProps$B,
|
|
13878
13942
|
...props
|
|
13879
13943
|
};
|
|
13880
13944
|
const classPrefix2 = "nut-loading";
|
|
@@ -13894,7 +13958,7 @@
|
|
|
13894
13958
|
);
|
|
13895
13959
|
};
|
|
13896
13960
|
Loading.displayName = "NutLoading";
|
|
13897
|
-
const defaultProps$
|
|
13961
|
+
const defaultProps$A = {
|
|
13898
13962
|
...ComponentDefaults,
|
|
13899
13963
|
align: "left",
|
|
13900
13964
|
direction: "horizontal",
|
|
@@ -13937,7 +14001,7 @@
|
|
|
13937
14001
|
onClick,
|
|
13938
14002
|
onItemClick
|
|
13939
14003
|
} = {
|
|
13940
|
-
...defaultProps$
|
|
14004
|
+
...defaultProps$A,
|
|
13941
14005
|
...props
|
|
13942
14006
|
};
|
|
13943
14007
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -14311,7 +14375,7 @@
|
|
|
14311
14375
|
) : null);
|
|
14312
14376
|
};
|
|
14313
14377
|
NoticeBar.displayName = "NutNoticeBar";
|
|
14314
|
-
const defaultProps$
|
|
14378
|
+
const defaultProps$z = {
|
|
14315
14379
|
...ComponentDefaults,
|
|
14316
14380
|
id: "",
|
|
14317
14381
|
duration: 3e3,
|
|
@@ -14337,7 +14401,7 @@
|
|
|
14337
14401
|
duration,
|
|
14338
14402
|
onClose,
|
|
14339
14403
|
onClick
|
|
14340
|
-
} = { ...defaultProps$
|
|
14404
|
+
} = { ...defaultProps$z, ...props };
|
|
14341
14405
|
useCustomEvent(id, (status) => {
|
|
14342
14406
|
status ? show2() : hide2();
|
|
14343
14407
|
});
|
|
@@ -14408,11 +14472,11 @@
|
|
|
14408
14472
|
const path = useCustomEventsPath(selector);
|
|
14409
14473
|
customEvents.trigger(path, false);
|
|
14410
14474
|
}
|
|
14411
|
-
Notify.defaultProps = defaultProps$
|
|
14475
|
+
Notify.defaultProps = defaultProps$z;
|
|
14412
14476
|
Notify.displayName = "NutNotify";
|
|
14413
14477
|
Notify.open = open;
|
|
14414
14478
|
Notify.close = close;
|
|
14415
|
-
const defaultProps$
|
|
14479
|
+
const defaultProps$y = {
|
|
14416
14480
|
...ComponentDefaults,
|
|
14417
14481
|
list: [],
|
|
14418
14482
|
theme: "light",
|
|
@@ -14457,7 +14521,7 @@
|
|
|
14457
14521
|
onSelect,
|
|
14458
14522
|
...rest
|
|
14459
14523
|
} = {
|
|
14460
|
-
...defaultProps$
|
|
14524
|
+
...defaultProps$y,
|
|
14461
14525
|
...props
|
|
14462
14526
|
};
|
|
14463
14527
|
const popoverRef = React.useRef(null);
|
|
@@ -14715,7 +14779,7 @@
|
|
|
14715
14779
|
return position;
|
|
14716
14780
|
}
|
|
14717
14781
|
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
14718
|
-
const defaultProps$
|
|
14782
|
+
const defaultProps$x = {
|
|
14719
14783
|
...ComponentDefaults,
|
|
14720
14784
|
type: "default",
|
|
14721
14785
|
pullingText: "",
|
|
@@ -14735,7 +14799,7 @@
|
|
|
14735
14799
|
const { locale } = useConfig$1();
|
|
14736
14800
|
const touch = useTouch();
|
|
14737
14801
|
const props = {
|
|
14738
|
-
...defaultProps$
|
|
14802
|
+
...defaultProps$x,
|
|
14739
14803
|
...p,
|
|
14740
14804
|
...{
|
|
14741
14805
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -14853,10 +14917,9 @@
|
|
|
14853
14917
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
14854
14918
|
);
|
|
14855
14919
|
};
|
|
14856
|
-
PullToRefresh.defaultProps = defaultProps$y;
|
|
14857
14920
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
14858
14921
|
const AvatarContext = React.createContext({});
|
|
14859
|
-
const defaultProps$
|
|
14922
|
+
const defaultProps$w = {
|
|
14860
14923
|
...ComponentDefaults,
|
|
14861
14924
|
maxContent: "",
|
|
14862
14925
|
max: "",
|
|
@@ -14867,7 +14930,7 @@
|
|
|
14867
14930
|
};
|
|
14868
14931
|
const classPrefix$b = `nut-avatar-group`;
|
|
14869
14932
|
const AvatarGroup = (props) => {
|
|
14870
|
-
const propAvatarGroup = { ...defaultProps$
|
|
14933
|
+
const propAvatarGroup = { ...defaultProps$w, ...props };
|
|
14871
14934
|
const { className, style, children } = propAvatarGroup;
|
|
14872
14935
|
const avatarGroupRef = React.useRef(null);
|
|
14873
14936
|
const cls = classNames(classPrefix$b, className);
|
|
@@ -14878,7 +14941,7 @@
|
|
|
14878
14941
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
14879
14942
|
};
|
|
14880
14943
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
14881
|
-
const defaultProps$
|
|
14944
|
+
const defaultProps$v = {
|
|
14882
14945
|
...ComponentDefaults,
|
|
14883
14946
|
size: "",
|
|
14884
14947
|
shape: "round",
|
|
@@ -14908,7 +14971,7 @@
|
|
|
14908
14971
|
onError,
|
|
14909
14972
|
...rest
|
|
14910
14973
|
} = {
|
|
14911
|
-
...defaultProps$
|
|
14974
|
+
...defaultProps$v,
|
|
14912
14975
|
...props
|
|
14913
14976
|
};
|
|
14914
14977
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -14998,7 +15061,7 @@
|
|
|
14998
15061
|
};
|
|
14999
15062
|
Avatar.displayName = "NutAvatar";
|
|
15000
15063
|
Avatar.Group = AvatarGroup;
|
|
15001
|
-
const defaultProps$
|
|
15064
|
+
const defaultProps$u = {
|
|
15002
15065
|
...ComponentDefaults,
|
|
15003
15066
|
rows: 1,
|
|
15004
15067
|
animated: false,
|
|
@@ -15021,7 +15084,7 @@
|
|
|
15021
15084
|
avatarShape,
|
|
15022
15085
|
...rest
|
|
15023
15086
|
} = {
|
|
15024
|
-
...defaultProps$
|
|
15087
|
+
...defaultProps$u,
|
|
15025
15088
|
...props
|
|
15026
15089
|
};
|
|
15027
15090
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -15067,7 +15130,7 @@
|
|
|
15067
15130
|
event.stopPropagation();
|
|
15068
15131
|
}
|
|
15069
15132
|
}
|
|
15070
|
-
const defaultProps$
|
|
15133
|
+
const defaultProps$t = {
|
|
15071
15134
|
...ComponentDefaults,
|
|
15072
15135
|
name: ""
|
|
15073
15136
|
};
|
|
@@ -15087,7 +15150,7 @@
|
|
|
15087
15150
|
};
|
|
15088
15151
|
Taro.nextTick(() => getWidth());
|
|
15089
15152
|
});
|
|
15090
|
-
const { children, className, style } = { ...defaultProps$
|
|
15153
|
+
const { children, className, style } = { ...defaultProps$t, ...props };
|
|
15091
15154
|
const root2 = React.useRef();
|
|
15092
15155
|
const opened = React.useRef(false);
|
|
15093
15156
|
const lockClick = React.useRef(false);
|
|
@@ -15247,9 +15310,8 @@
|
|
|
15247
15310
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
|
|
15248
15311
|
);
|
|
15249
15312
|
});
|
|
15250
|
-
Swipe.defaultProps = defaultProps$u;
|
|
15251
15313
|
Swipe.displayName = "NutSwipe";
|
|
15252
|
-
const defaultProps$
|
|
15314
|
+
const defaultProps$s = {
|
|
15253
15315
|
...ComponentDefaults,
|
|
15254
15316
|
id: "",
|
|
15255
15317
|
icon: null,
|
|
@@ -15298,7 +15360,7 @@
|
|
|
15298
15360
|
wordBreak
|
|
15299
15361
|
},
|
|
15300
15362
|
setParams
|
|
15301
|
-
} = useParams({ ...defaultProps$
|
|
15363
|
+
} = useParams({ ...defaultProps$s, ...props });
|
|
15302
15364
|
const timer = React.useRef(-1);
|
|
15303
15365
|
const [innerVisible, setInnerVisible] = usePropsValue({
|
|
15304
15366
|
value: visible,
|
|
@@ -15406,11 +15468,11 @@
|
|
|
15406
15468
|
const path = useCustomEventsPath(selector);
|
|
15407
15469
|
customEvents.trigger(path, { status: false });
|
|
15408
15470
|
}
|
|
15409
|
-
Toast.defaultProps = defaultProps$
|
|
15471
|
+
Toast.defaultProps = defaultProps$s;
|
|
15410
15472
|
Toast.displayName = "NutToast";
|
|
15411
15473
|
Toast.show = show;
|
|
15412
15474
|
Toast.hide = hide;
|
|
15413
|
-
const defaultProps$
|
|
15475
|
+
const defaultProps$r = {
|
|
15414
15476
|
...ComponentDefaults,
|
|
15415
15477
|
type: "shake",
|
|
15416
15478
|
action: "initial",
|
|
@@ -15421,7 +15483,7 @@
|
|
|
15421
15483
|
const classPrefix$8 = `nut-animate`;
|
|
15422
15484
|
const Animate = (props) => {
|
|
15423
15485
|
const { className, type: type2, action, loop, onClick, children, ...rest } = {
|
|
15424
|
-
...defaultProps$
|
|
15486
|
+
...defaultProps$r,
|
|
15425
15487
|
...props
|
|
15426
15488
|
};
|
|
15427
15489
|
const [clicked, setClicked] = React.useState(false);
|
|
@@ -15443,7 +15505,7 @@
|
|
|
15443
15505
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
|
|
15444
15506
|
};
|
|
15445
15507
|
Animate.displayName = "NutAnimate";
|
|
15446
|
-
const defaultProps$
|
|
15508
|
+
const defaultProps$q = {
|
|
15447
15509
|
...ComponentDefaults,
|
|
15448
15510
|
length: 0,
|
|
15449
15511
|
value: "",
|
|
@@ -15462,7 +15524,7 @@
|
|
|
15462
15524
|
style,
|
|
15463
15525
|
...reset
|
|
15464
15526
|
} = {
|
|
15465
|
-
...defaultProps$
|
|
15527
|
+
...defaultProps$q,
|
|
15466
15528
|
...props
|
|
15467
15529
|
};
|
|
15468
15530
|
const classPrefix2 = "nut-countup";
|
|
@@ -15536,9 +15598,9 @@
|
|
|
15536
15598
|
);
|
|
15537
15599
|
})));
|
|
15538
15600
|
};
|
|
15539
|
-
CountUp.defaultProps = defaultProps$
|
|
15601
|
+
CountUp.defaultProps = defaultProps$q;
|
|
15540
15602
|
CountUp.displayName = "NutCountUp";
|
|
15541
|
-
const defaultProps$
|
|
15603
|
+
const defaultProps$p = {};
|
|
15542
15604
|
const _AnimatingNumbers = class _AnimatingNumbers extends React.Component {
|
|
15543
15605
|
constructor(props) {
|
|
15544
15606
|
super(props);
|
|
@@ -15548,12 +15610,12 @@
|
|
|
15548
15610
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
15549
15611
|
}
|
|
15550
15612
|
};
|
|
15551
|
-
_AnimatingNumbers.defaultProps = defaultProps$
|
|
15613
|
+
_AnimatingNumbers.defaultProps = defaultProps$p;
|
|
15552
15614
|
_AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
15553
15615
|
_AnimatingNumbers.CountUp = CountUp;
|
|
15554
15616
|
let AnimatingNumbers = _AnimatingNumbers;
|
|
15555
15617
|
AnimatingNumbers.CountUp = CountUp;
|
|
15556
|
-
const defaultProps$
|
|
15618
|
+
const defaultProps$o = {
|
|
15557
15619
|
...ComponentDefaults,
|
|
15558
15620
|
className: "",
|
|
15559
15621
|
url: "",
|
|
@@ -15597,7 +15659,7 @@
|
|
|
15597
15659
|
iconFontClassName,
|
|
15598
15660
|
...rest
|
|
15599
15661
|
} = {
|
|
15600
|
-
...defaultProps$
|
|
15662
|
+
...defaultProps$o,
|
|
15601
15663
|
...props
|
|
15602
15664
|
};
|
|
15603
15665
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -15616,19 +15678,19 @@
|
|
|
15616
15678
|
audioCtx.autoplay = autoplay || false;
|
|
15617
15679
|
audioCtx.loop = loop || false;
|
|
15618
15680
|
audioCtx.onPause(() => {
|
|
15619
|
-
|
|
15681
|
+
onPause == null ? void 0 : onPause(audioCtx);
|
|
15620
15682
|
});
|
|
15621
15683
|
audioCtx.onEnded(() => {
|
|
15622
|
-
if (
|
|
15684
|
+
if (loop) {
|
|
15623
15685
|
console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
|
|
15624
15686
|
} else {
|
|
15625
|
-
|
|
15687
|
+
onPlayEnd == null ? void 0 : onPlayEnd(audioCtx);
|
|
15626
15688
|
}
|
|
15627
15689
|
});
|
|
15628
15690
|
audioCtx.onPlay(() => {
|
|
15629
15691
|
const { duration } = audioCtx;
|
|
15630
15692
|
setTotalSeconds(Math.floor(duration));
|
|
15631
|
-
|
|
15693
|
+
onPlay == null ? void 0 : onPlay(audioCtx);
|
|
15632
15694
|
});
|
|
15633
15695
|
audioCtx.onCanplay(() => {
|
|
15634
15696
|
const intervalID = setInterval(function() {
|
|
@@ -15638,7 +15700,7 @@
|
|
|
15638
15700
|
}
|
|
15639
15701
|
}, 500);
|
|
15640
15702
|
setIsCanPlay(true);
|
|
15641
|
-
|
|
15703
|
+
onCanPlay == null ? void 0 : onCanPlay(audioCtx);
|
|
15642
15704
|
});
|
|
15643
15705
|
audioCtx.onTimeUpdate(() => {
|
|
15644
15706
|
const time = parseInt(`${audioCtx.currentTime}`);
|
|
@@ -15670,14 +15732,14 @@
|
|
|
15670
15732
|
statusRef.current.currentTime = Math.max(currentTime - 1, 0);
|
|
15671
15733
|
setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
|
|
15672
15734
|
audioCtx.seek(statusRef.current.currentTime);
|
|
15673
|
-
|
|
15735
|
+
onFastBack == null ? void 0 : onFastBack(audioCtx);
|
|
15674
15736
|
};
|
|
15675
15737
|
const handleForward = () => {
|
|
15676
15738
|
const currentTime = Math.floor(audioCtx.currentTime);
|
|
15677
15739
|
statusRef.current.currentTime = Math.min(currentTime + 1, audioCtx.duration);
|
|
15678
15740
|
setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
|
|
15679
15741
|
audioCtx.seek(statusRef.current.currentTime);
|
|
15680
|
-
|
|
15742
|
+
onForward == null ? void 0 : onForward(audioCtx);
|
|
15681
15743
|
};
|
|
15682
15744
|
const handleStatusChange = () => {
|
|
15683
15745
|
setPlaying(!playing);
|
|
@@ -15761,9 +15823,8 @@
|
|
|
15761
15823
|
};
|
|
15762
15824
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, renderAudio());
|
|
15763
15825
|
};
|
|
15764
|
-
Audio.defaultProps = defaultProps$p;
|
|
15765
15826
|
Audio.displayName = "NutAudio";
|
|
15766
|
-
const defaultProps$
|
|
15827
|
+
const defaultProps$n = {
|
|
15767
15828
|
...ComponentDefaults,
|
|
15768
15829
|
strokeWidth: 5,
|
|
15769
15830
|
radius: 50,
|
|
@@ -15787,7 +15848,7 @@
|
|
|
15787
15848
|
strokeLinecap,
|
|
15788
15849
|
...restProps
|
|
15789
15850
|
} = {
|
|
15790
|
-
...defaultProps$
|
|
15851
|
+
...defaultProps$n,
|
|
15791
15852
|
...props
|
|
15792
15853
|
};
|
|
15793
15854
|
const oldValue = React.useRef(percent);
|
|
@@ -15887,7 +15948,7 @@
|
|
|
15887
15948
|
rotate: 180
|
|
15888
15949
|
};
|
|
15889
15950
|
const CollapseContext = React.createContext(collapseContext);
|
|
15890
|
-
const defaultProps$
|
|
15951
|
+
const defaultProps$m = {
|
|
15891
15952
|
...ComponentDefaults,
|
|
15892
15953
|
title: null,
|
|
15893
15954
|
name: "",
|
|
@@ -15908,7 +15969,7 @@
|
|
|
15908
15969
|
className,
|
|
15909
15970
|
...rest
|
|
15910
15971
|
} = {
|
|
15911
|
-
...defaultProps$
|
|
15972
|
+
...defaultProps$m,
|
|
15912
15973
|
...props
|
|
15913
15974
|
};
|
|
15914
15975
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -16021,7 +16082,7 @@
|
|
|
16021
16082
|
));
|
|
16022
16083
|
};
|
|
16023
16084
|
CollapseItem.displayName = "NutCollapseItem";
|
|
16024
|
-
const defaultProps$
|
|
16085
|
+
const defaultProps$l = {
|
|
16025
16086
|
...ComponentDefaults,
|
|
16026
16087
|
defaultActiveName: [],
|
|
16027
16088
|
accordion: false,
|
|
@@ -16040,7 +16101,7 @@
|
|
|
16040
16101
|
rotate,
|
|
16041
16102
|
onChange
|
|
16042
16103
|
} = {
|
|
16043
|
-
...defaultProps$
|
|
16104
|
+
...defaultProps$l,
|
|
16044
16105
|
...props
|
|
16045
16106
|
};
|
|
16046
16107
|
const classPrefix2 = "nut-collapse";
|
|
@@ -16099,7 +16160,7 @@
|
|
|
16099
16160
|
};
|
|
16100
16161
|
Collapse.displayName = "NutCollapse";
|
|
16101
16162
|
Collapse.Item = CollapseItem;
|
|
16102
|
-
const defaultProps$
|
|
16163
|
+
const defaultProps$k = {
|
|
16103
16164
|
...ComponentDefaults,
|
|
16104
16165
|
paused: false,
|
|
16105
16166
|
startTime: Date.now(),
|
|
@@ -16131,7 +16192,7 @@
|
|
|
16131
16192
|
onUpdate,
|
|
16132
16193
|
children,
|
|
16133
16194
|
...rest
|
|
16134
|
-
} = { ...defaultProps$
|
|
16195
|
+
} = { ...defaultProps$k, ...props };
|
|
16135
16196
|
const classPrefix2 = "nut-countdown";
|
|
16136
16197
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
16137
16198
|
const stateRef = React.useRef({
|
|
@@ -16336,7 +16397,7 @@
|
|
|
16336
16397
|
InternalCountDown
|
|
16337
16398
|
);
|
|
16338
16399
|
CountDown.displayName = "NutCountDown";
|
|
16339
|
-
const defaultProps$
|
|
16400
|
+
const defaultProps$j = {
|
|
16340
16401
|
...ComponentDefaults,
|
|
16341
16402
|
content: "",
|
|
16342
16403
|
direction: "end",
|
|
@@ -16364,7 +16425,7 @@
|
|
|
16364
16425
|
onClick,
|
|
16365
16426
|
onChange,
|
|
16366
16427
|
...rest
|
|
16367
|
-
} = { ...defaultProps$
|
|
16428
|
+
} = { ...defaultProps$j, ...props };
|
|
16368
16429
|
const maxHeight = React.useRef(0);
|
|
16369
16430
|
const [exceeded, setExceeded] = React.useState(false);
|
|
16370
16431
|
const [expanded, setExpanded] = React.useState(false);
|
|
@@ -16656,7 +16717,7 @@
|
|
|
16656
16717
|
));
|
|
16657
16718
|
};
|
|
16658
16719
|
Ellipsis.displayName = "NutEllipsis";
|
|
16659
|
-
const defaultProps$
|
|
16720
|
+
const defaultProps$i = {
|
|
16660
16721
|
total: 3,
|
|
16661
16722
|
current: 0,
|
|
16662
16723
|
direction: "horizontal"
|
|
@@ -16664,7 +16725,7 @@
|
|
|
16664
16725
|
const classPrefix$5 = `nut-indicator`;
|
|
16665
16726
|
const Indicator = (props) => {
|
|
16666
16727
|
const { total, current, children, className, direction, ...rest } = {
|
|
16667
|
-
...defaultProps$
|
|
16728
|
+
...defaultProps$i,
|
|
16668
16729
|
...props
|
|
16669
16730
|
};
|
|
16670
16731
|
const classes = classNames({
|
|
@@ -16688,7 +16749,7 @@
|
|
|
16688
16749
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$5, classes, className), ...rest }, renderElement());
|
|
16689
16750
|
};
|
|
16690
16751
|
Indicator.displayName = "NutIndicator";
|
|
16691
|
-
const defaultProps$
|
|
16752
|
+
const defaultProps$h = {
|
|
16692
16753
|
direction: "horizontal",
|
|
16693
16754
|
indicator: false,
|
|
16694
16755
|
autoPlay: false,
|
|
@@ -16713,7 +16774,7 @@
|
|
|
16713
16774
|
style,
|
|
16714
16775
|
...rest
|
|
16715
16776
|
} = {
|
|
16716
|
-
...defaultProps$
|
|
16777
|
+
...defaultProps$h,
|
|
16717
16778
|
...props
|
|
16718
16779
|
};
|
|
16719
16780
|
const [current, setCurrent] = React.useState(defaultValue);
|
|
@@ -16824,17 +16885,11 @@
|
|
|
16824
16885
|
renderIndicator()
|
|
16825
16886
|
);
|
|
16826
16887
|
});
|
|
16827
|
-
Swiper.defaultProps = defaultProps$i;
|
|
16828
16888
|
Swiper.displayName = "NutSwiper";
|
|
16829
|
-
const defaultProps$h = {
|
|
16830
|
-
itemId: "",
|
|
16831
|
-
skipHiddenItemLayout: false
|
|
16832
|
-
};
|
|
16833
16889
|
const SwiperItem = (props) => {
|
|
16834
16890
|
const { children, ...rest } = props;
|
|
16835
16891
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
16836
16892
|
};
|
|
16837
|
-
SwiperItem.defaultProps = defaultProps$h;
|
|
16838
16893
|
SwiperItem.displayName = "NutSwiperItem";
|
|
16839
16894
|
const InnerSwiper = Swiper;
|
|
16840
16895
|
InnerSwiper.Item = SwiperItem;
|
|
@@ -17566,10 +17621,6 @@
|
|
|
17566
17621
|
});
|
|
17567
17622
|
};
|
|
17568
17623
|
const renderBodyTds = (item, rowIndex) => {
|
|
17569
|
-
const { rowRender } = item;
|
|
17570
|
-
if (rowRender && typeof rowRender === "function") {
|
|
17571
|
-
return rowRender(item, rowIndex);
|
|
17572
|
-
}
|
|
17573
17624
|
return sortDataItem().map(([value, render]) => {
|
|
17574
17625
|
return /* @__PURE__ */ React.createElement(
|
|
17575
17626
|
"div",
|
|
@@ -17588,7 +17639,12 @@
|
|
|
17588
17639
|
};
|
|
17589
17640
|
const renderBodyTrs = () => {
|
|
17590
17641
|
return innerValue.map((item, index) => {
|
|
17591
|
-
|
|
17642
|
+
const inner = renderBodyTds(item, index);
|
|
17643
|
+
const { rowRender } = item;
|
|
17644
|
+
if (rowRender && typeof rowRender === "function") {
|
|
17645
|
+
return rowRender(item, index, { inner });
|
|
17646
|
+
}
|
|
17647
|
+
return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, inner);
|
|
17592
17648
|
});
|
|
17593
17649
|
};
|
|
17594
17650
|
return /* @__PURE__ */ React.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React.createElement(
|