@nutui/nutui-react-taro 2.6.15 → 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 +31 -14
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FormItem.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/Uploader.js +1 -1
- package/dist/esm/{formitem.taro-Dmt5-wxG.js → formitem.taro-DogVddcs.js} +2 -2
- package/dist/esm/{inputnumber.taro-WN5Drnyz.js → inputnumber.taro-D9mteLSI.js} +26 -9
- package/dist/esm/{menu.taro-BeuoJcj7.js → menu.taro-CLbOM_Z4.js} +10 -3
- 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 +6 -6
- 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 +187 -114
- package/dist/nutui.react.umd.js +187 -114
- 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/package.json +1 -1
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
|
*/
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
style: {}
|
|
213
213
|
};
|
|
214
214
|
const prefixCls$2 = "nut-button";
|
|
215
|
-
const defaultProps$
|
|
215
|
+
const defaultProps$1v = {
|
|
216
216
|
...ComponentDefaults,
|
|
217
217
|
color: "",
|
|
218
218
|
type: "default",
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
onClick,
|
|
248
248
|
...rest
|
|
249
249
|
} = {
|
|
250
|
-
...defaultProps$
|
|
250
|
+
...defaultProps$1v,
|
|
251
251
|
...props
|
|
252
252
|
};
|
|
253
253
|
const getStyle = React.useCallback(() => {
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
);
|
|
315
315
|
Button.displayName = "NutButton";
|
|
316
316
|
const CellGroupContext = React.createContext(null);
|
|
317
|
-
const defaultProps$
|
|
317
|
+
const defaultProps$1u = {
|
|
318
318
|
...ComponentDefaults,
|
|
319
319
|
title: "",
|
|
320
320
|
description: "",
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
const classPrefix$r = "nut-cell-group";
|
|
324
324
|
const CellGroup = (props) => {
|
|
325
325
|
const { children, className, title, description, divider, ...rest } = {
|
|
326
|
-
...defaultProps$
|
|
326
|
+
...defaultProps$1u,
|
|
327
327
|
...props
|
|
328
328
|
};
|
|
329
329
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
));
|
|
336
336
|
};
|
|
337
337
|
CellGroup.displayName = "NutCellGroup";
|
|
338
|
-
const defaultProps$
|
|
338
|
+
const defaultProps$1t = {
|
|
339
339
|
...ComponentDefaults,
|
|
340
340
|
title: null,
|
|
341
341
|
description: null,
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
style,
|
|
361
361
|
...rest
|
|
362
362
|
} = {
|
|
363
|
-
...defaultProps$
|
|
363
|
+
...defaultProps$1t,
|
|
364
364
|
...props
|
|
365
365
|
};
|
|
366
366
|
const handleClick = (event) => {
|
|
@@ -1535,7 +1535,7 @@
|
|
|
1535
1535
|
const pxCheck = (value) => {
|
|
1536
1536
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1537
1537
|
};
|
|
1538
|
-
const defaultProps$
|
|
1538
|
+
const defaultProps$1s = {
|
|
1539
1539
|
src: "",
|
|
1540
1540
|
error: true,
|
|
1541
1541
|
loading: true
|
|
@@ -1554,7 +1554,7 @@
|
|
|
1554
1554
|
onLoad,
|
|
1555
1555
|
onError,
|
|
1556
1556
|
...rest
|
|
1557
|
-
} = { ...defaultProps$
|
|
1557
|
+
} = { ...defaultProps$1s, ...props };
|
|
1558
1558
|
const [innerLoading, setInnerLoading] = React.useState(true);
|
|
1559
1559
|
const [isError, setIsError] = React.useState(false);
|
|
1560
1560
|
const handleLoad = (e2) => {
|
|
@@ -3573,7 +3573,7 @@
|
|
|
3573
3573
|
};
|
|
3574
3574
|
Overlay.displayName = "NutOverlay";
|
|
3575
3575
|
const DataContext$1 = React.createContext({});
|
|
3576
|
-
const defaultProps$
|
|
3576
|
+
const defaultProps$1r = {
|
|
3577
3577
|
...ComponentDefaults,
|
|
3578
3578
|
span: "24",
|
|
3579
3579
|
offset: "0",
|
|
@@ -3581,7 +3581,7 @@
|
|
|
3581
3581
|
};
|
|
3582
3582
|
const Col = (props) => {
|
|
3583
3583
|
const { className, style, span, offset, children, onClick } = {
|
|
3584
|
-
...defaultProps$
|
|
3584
|
+
...defaultProps$1r,
|
|
3585
3585
|
...props
|
|
3586
3586
|
};
|
|
3587
3587
|
const [colName, setColName] = React.useState("");
|
|
@@ -3614,7 +3614,7 @@
|
|
|
3614
3614
|
);
|
|
3615
3615
|
};
|
|
3616
3616
|
Col.displayName = "NutCol";
|
|
3617
|
-
const defaultProps$
|
|
3617
|
+
const defaultProps$1q = {
|
|
3618
3618
|
...ComponentDefaults,
|
|
3619
3619
|
contentPosition: "center",
|
|
3620
3620
|
direction: "horizontal"
|
|
@@ -3622,7 +3622,7 @@
|
|
|
3622
3622
|
const classPrefix$o = `nut-divider`;
|
|
3623
3623
|
const Divider = (props) => {
|
|
3624
3624
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3625
|
-
...defaultProps$
|
|
3625
|
+
...defaultProps$1q,
|
|
3626
3626
|
...props
|
|
3627
3627
|
};
|
|
3628
3628
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -3643,7 +3643,7 @@
|
|
|
3643
3643
|
}
|
|
3644
3644
|
};
|
|
3645
3645
|
const GridContext = React.createContext(gridContext);
|
|
3646
|
-
const defaultProps$
|
|
3646
|
+
const defaultProps$1p = {
|
|
3647
3647
|
text: "",
|
|
3648
3648
|
columns: 4,
|
|
3649
3649
|
gap: 0,
|
|
@@ -3669,7 +3669,7 @@
|
|
|
3669
3669
|
onClick,
|
|
3670
3670
|
...rest
|
|
3671
3671
|
} = {
|
|
3672
|
-
...defaultProps$
|
|
3672
|
+
...defaultProps$1p,
|
|
3673
3673
|
...props
|
|
3674
3674
|
};
|
|
3675
3675
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -3728,7 +3728,7 @@
|
|
|
3728
3728
|
);
|
|
3729
3729
|
};
|
|
3730
3730
|
GridItem.displayName = "NutGridItem";
|
|
3731
|
-
const defaultProps$
|
|
3731
|
+
const defaultProps$1o = {
|
|
3732
3732
|
columns: 4,
|
|
3733
3733
|
gap: 0,
|
|
3734
3734
|
center: true,
|
|
@@ -3749,7 +3749,7 @@
|
|
|
3749
3749
|
className,
|
|
3750
3750
|
onClick,
|
|
3751
3751
|
...rest
|
|
3752
|
-
} = { ...defaultProps$
|
|
3752
|
+
} = { ...defaultProps$1o, ...props };
|
|
3753
3753
|
const childrenDom = React.Children.toArray(children);
|
|
3754
3754
|
const classPrefix2 = "nut-grid";
|
|
3755
3755
|
const rootClass = () => {
|
|
@@ -3785,14 +3785,14 @@
|
|
|
3785
3785
|
};
|
|
3786
3786
|
Grid.displayName = "NutGrid";
|
|
3787
3787
|
Grid.Item = GridItem;
|
|
3788
|
-
const defaultProps$
|
|
3788
|
+
const defaultProps$1n = {};
|
|
3789
3789
|
const Layout = (props) => {
|
|
3790
|
-
({ ...defaultProps$
|
|
3790
|
+
({ ...defaultProps$1n, ...props });
|
|
3791
3791
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
3792
3792
|
};
|
|
3793
3793
|
Layout.displayName = "NutLayout";
|
|
3794
3794
|
const classPrefix$n = "nut-row";
|
|
3795
|
-
const defaultProps$
|
|
3795
|
+
const defaultProps$1m = {
|
|
3796
3796
|
...ComponentDefaults,
|
|
3797
3797
|
type: "",
|
|
3798
3798
|
justify: "start",
|
|
@@ -3812,7 +3812,7 @@
|
|
|
3812
3812
|
gutter,
|
|
3813
3813
|
onClick
|
|
3814
3814
|
} = {
|
|
3815
|
-
...defaultProps$
|
|
3815
|
+
...defaultProps$1m,
|
|
3816
3816
|
...props
|
|
3817
3817
|
};
|
|
3818
3818
|
const getClass = (prefix, type22) => {
|
|
@@ -3846,12 +3846,12 @@
|
|
|
3846
3846
|
};
|
|
3847
3847
|
Row.displayName = "NutRow";
|
|
3848
3848
|
const prefixCls$1 = "nut-space";
|
|
3849
|
-
const defaultProps$
|
|
3849
|
+
const defaultProps$1l = {
|
|
3850
3850
|
direction: "horizontal"
|
|
3851
3851
|
};
|
|
3852
3852
|
const Space = (props) => {
|
|
3853
3853
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3854
|
-
...defaultProps$
|
|
3854
|
+
...defaultProps$1l,
|
|
3855
3855
|
...props
|
|
3856
3856
|
};
|
|
3857
3857
|
const cls = classNames(
|
|
@@ -3943,7 +3943,7 @@
|
|
|
3943
3943
|
}
|
|
3944
3944
|
return Promise.resolve(makeRect(0, 0));
|
|
3945
3945
|
};
|
|
3946
|
-
const defaultProps$
|
|
3946
|
+
const defaultProps$1k = {
|
|
3947
3947
|
...ComponentDefaults,
|
|
3948
3948
|
position: "top",
|
|
3949
3949
|
zIndex: 900
|
|
@@ -3960,7 +3960,7 @@
|
|
|
3960
3960
|
className,
|
|
3961
3961
|
onChange,
|
|
3962
3962
|
...rest
|
|
3963
|
-
} = { ...defaultProps$
|
|
3963
|
+
} = { ...defaultProps$1k, ...props };
|
|
3964
3964
|
const stickyRef = React.useRef(null);
|
|
3965
3965
|
const rootRef = React.useRef(null);
|
|
3966
3966
|
const [rootRect, setRootRect] = React.useState({});
|
|
@@ -4076,7 +4076,7 @@
|
|
|
4076
4076
|
);
|
|
4077
4077
|
};
|
|
4078
4078
|
SafeArea.displayName = "NutSafeArea";
|
|
4079
|
-
const defaultProps$
|
|
4079
|
+
const defaultProps$1j = {
|
|
4080
4080
|
...ComponentDefaults,
|
|
4081
4081
|
threshold: 200,
|
|
4082
4082
|
zIndex: 900,
|
|
@@ -4085,7 +4085,7 @@
|
|
|
4085
4085
|
const BackTop = (props) => {
|
|
4086
4086
|
const rtl = useRtl();
|
|
4087
4087
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
4088
|
-
...defaultProps$
|
|
4088
|
+
...defaultProps$1j,
|
|
4089
4089
|
...props
|
|
4090
4090
|
};
|
|
4091
4091
|
const classPrefix2 = "nut-backtop";
|
|
@@ -4129,7 +4129,7 @@
|
|
|
4129
4129
|
};
|
|
4130
4130
|
BackTop.displayName = "NutBackTop";
|
|
4131
4131
|
const elevatorContext = React.createContext({});
|
|
4132
|
-
const defaultProps$
|
|
4132
|
+
const defaultProps$1i = {
|
|
4133
4133
|
...ComponentDefaults,
|
|
4134
4134
|
height: "200px",
|
|
4135
4135
|
floorKey: "title",
|
|
@@ -4156,7 +4156,7 @@
|
|
|
4156
4156
|
children,
|
|
4157
4157
|
...rest
|
|
4158
4158
|
} = {
|
|
4159
|
-
...defaultProps$
|
|
4159
|
+
...defaultProps$1i,
|
|
4160
4160
|
...props
|
|
4161
4161
|
};
|
|
4162
4162
|
const classPrefix2 = "nut-elevator";
|
|
@@ -4371,7 +4371,7 @@
|
|
|
4371
4371
|
};
|
|
4372
4372
|
Elevator.displayName = "NutElevator";
|
|
4373
4373
|
Elevator.Context = elevatorContext;
|
|
4374
|
-
const defaultProps$
|
|
4374
|
+
const defaultProps$1h = {
|
|
4375
4375
|
...ComponentDefaults,
|
|
4376
4376
|
activeText: "",
|
|
4377
4377
|
inactiveText: "",
|
|
@@ -4399,7 +4399,7 @@
|
|
|
4399
4399
|
content,
|
|
4400
4400
|
...rest
|
|
4401
4401
|
} = {
|
|
4402
|
-
...defaultProps$
|
|
4402
|
+
...defaultProps$1h,
|
|
4403
4403
|
...props
|
|
4404
4404
|
};
|
|
4405
4405
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -4452,7 +4452,7 @@
|
|
|
4452
4452
|
);
|
|
4453
4453
|
};
|
|
4454
4454
|
FixedNav.displayName = "NutFixedNav";
|
|
4455
|
-
const defaultProps$
|
|
4455
|
+
const defaultProps$1g = {
|
|
4456
4456
|
...ComponentDefaults,
|
|
4457
4457
|
left: "",
|
|
4458
4458
|
right: "",
|
|
@@ -4477,7 +4477,7 @@
|
|
|
4477
4477
|
zIndex,
|
|
4478
4478
|
onBackClick
|
|
4479
4479
|
} = {
|
|
4480
|
-
...defaultProps$
|
|
4480
|
+
...defaultProps$1g,
|
|
4481
4481
|
...props
|
|
4482
4482
|
};
|
|
4483
4483
|
const classPrefix2 = "nut-navbar";
|
|
@@ -4556,7 +4556,7 @@
|
|
|
4556
4556
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
4557
4557
|
};
|
|
4558
4558
|
NavBar.displayName = "NutNavBar";
|
|
4559
|
-
const defaultProps$
|
|
4559
|
+
const defaultProps$1f = {
|
|
4560
4560
|
...ComponentDefaults,
|
|
4561
4561
|
position: "center",
|
|
4562
4562
|
transition: "",
|
|
@@ -4609,7 +4609,7 @@
|
|
|
4609
4609
|
afterShow,
|
|
4610
4610
|
afterClose,
|
|
4611
4611
|
onClick
|
|
4612
|
-
} = { ...defaultProps$
|
|
4612
|
+
} = { ...defaultProps$1f, ...props };
|
|
4613
4613
|
let innerIndex = zIndex || _zIndex;
|
|
4614
4614
|
const [index, setIndex] = React.useState(innerIndex);
|
|
4615
4615
|
const [innerVisible, setInnerVisible] = React.useState(visible);
|
|
@@ -4751,7 +4751,7 @@
|
|
|
4751
4751
|
};
|
|
4752
4752
|
Popup.displayName = "NutPopup";
|
|
4753
4753
|
const OffsetContext = React.createContext(20);
|
|
4754
|
-
const defaultProps$
|
|
4754
|
+
const defaultProps$1e = {
|
|
4755
4755
|
...ComponentDefaults,
|
|
4756
4756
|
position: "left",
|
|
4757
4757
|
width: "80%"
|
|
@@ -4769,7 +4769,7 @@
|
|
|
4769
4769
|
indent,
|
|
4770
4770
|
...rest
|
|
4771
4771
|
} = {
|
|
4772
|
-
...defaultProps$
|
|
4772
|
+
...defaultProps$1e,
|
|
4773
4773
|
...props
|
|
4774
4774
|
};
|
|
4775
4775
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -4827,13 +4827,13 @@
|
|
|
4827
4827
|
title
|
|
4828
4828
|
);
|
|
4829
4829
|
};
|
|
4830
|
-
const defaultProps$
|
|
4830
|
+
const defaultProps$1d = {
|
|
4831
4831
|
open: true
|
|
4832
4832
|
};
|
|
4833
4833
|
const SubSideNavBar = (props) => {
|
|
4834
4834
|
const classPrefix2 = "nut-subsidenavbar";
|
|
4835
4835
|
const { title, value, children, onClick, open: open2, ...rest } = {
|
|
4836
|
-
...defaultProps$
|
|
4836
|
+
...defaultProps$1d,
|
|
4837
4837
|
...props
|
|
4838
4838
|
};
|
|
4839
4839
|
const [subShow, setSubShow] = React.useState(open2);
|
|
@@ -4911,7 +4911,7 @@
|
|
|
4911
4911
|
);
|
|
4912
4912
|
return [stateRef.current, setState];
|
|
4913
4913
|
}
|
|
4914
|
-
const defaultProps$
|
|
4914
|
+
const defaultProps$1c = {
|
|
4915
4915
|
...ComponentDefaults,
|
|
4916
4916
|
value: "",
|
|
4917
4917
|
dot: false,
|
|
@@ -4936,7 +4936,7 @@
|
|
|
4936
4936
|
color,
|
|
4937
4937
|
fill
|
|
4938
4938
|
} = {
|
|
4939
|
-
...defaultProps$
|
|
4939
|
+
...defaultProps$1c,
|
|
4940
4940
|
...props
|
|
4941
4941
|
};
|
|
4942
4942
|
const classPrefix2 = "nut-badge";
|
|
@@ -4990,7 +4990,7 @@
|
|
|
4990
4990
|
};
|
|
4991
4991
|
Badge.displayName = "NutBadge";
|
|
4992
4992
|
const TabbarContext = React.createContext(null);
|
|
4993
|
-
const defaultProps$
|
|
4993
|
+
const defaultProps$1b = {
|
|
4994
4994
|
...ComponentDefaults,
|
|
4995
4995
|
title: "",
|
|
4996
4996
|
icon: null,
|
|
@@ -5016,7 +5016,7 @@
|
|
|
5016
5016
|
index,
|
|
5017
5017
|
...rest
|
|
5018
5018
|
} = {
|
|
5019
|
-
...defaultProps$
|
|
5019
|
+
...defaultProps$1b,
|
|
5020
5020
|
...props
|
|
5021
5021
|
};
|
|
5022
5022
|
const active = index === (ctx == null ? void 0 : ctx.selectIndex);
|
|
@@ -5054,7 +5054,7 @@
|
|
|
5054
5054
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
5055
5055
|
);
|
|
5056
5056
|
};
|
|
5057
|
-
const defaultProps$
|
|
5057
|
+
const defaultProps$1a = {
|
|
5058
5058
|
...ComponentDefaults,
|
|
5059
5059
|
defaultValue: 0,
|
|
5060
5060
|
fixed: false,
|
|
@@ -5077,7 +5077,7 @@
|
|
|
5077
5077
|
style,
|
|
5078
5078
|
onSwitch
|
|
5079
5079
|
} = {
|
|
5080
|
-
...defaultProps$
|
|
5080
|
+
...defaultProps$1a,
|
|
5081
5081
|
...props
|
|
5082
5082
|
};
|
|
5083
5083
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -5119,14 +5119,14 @@
|
|
|
5119
5119
|
};
|
|
5120
5120
|
Tabbar.displayName = "NutTabbar";
|
|
5121
5121
|
Tabbar.Item = TabbarItem;
|
|
5122
|
-
const defaultProps$
|
|
5122
|
+
const defaultProps$19 = {
|
|
5123
5123
|
title: "",
|
|
5124
5124
|
value: "",
|
|
5125
5125
|
disabled: false
|
|
5126
5126
|
};
|
|
5127
5127
|
const TabPane = (props) => {
|
|
5128
5128
|
const { children, autoHeightClassName, className, disabled } = {
|
|
5129
|
-
...defaultProps$
|
|
5129
|
+
...defaultProps$19,
|
|
5130
5130
|
...props
|
|
5131
5131
|
};
|
|
5132
5132
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -5167,7 +5167,7 @@
|
|
|
5167
5167
|
const idRef = React.useRef(uniqueId());
|
|
5168
5168
|
return idRef.current;
|
|
5169
5169
|
}
|
|
5170
|
-
const defaultProps$
|
|
5170
|
+
const defaultProps$18 = {
|
|
5171
5171
|
...ComponentDefaults,
|
|
5172
5172
|
tabStyle: {},
|
|
5173
5173
|
activeColor: "",
|
|
@@ -5197,7 +5197,7 @@
|
|
|
5197
5197
|
defaultValue: outerDefaultValue,
|
|
5198
5198
|
...rest
|
|
5199
5199
|
} = {
|
|
5200
|
-
...defaultProps$
|
|
5200
|
+
...defaultProps$18,
|
|
5201
5201
|
...props
|
|
5202
5202
|
};
|
|
5203
5203
|
const uuid = useUuid();
|
|
@@ -5420,7 +5420,7 @@
|
|
|
5420
5420
|
};
|
|
5421
5421
|
Tabs.displayName = "NutTabs";
|
|
5422
5422
|
Tabs.TabPane = TabPane;
|
|
5423
|
-
const defaultProps$
|
|
5423
|
+
const defaultProps$17 = {
|
|
5424
5424
|
type: "custom",
|
|
5425
5425
|
existList: [],
|
|
5426
5426
|
defaultIcon: null,
|
|
@@ -5439,7 +5439,7 @@
|
|
|
5439
5439
|
onSelect,
|
|
5440
5440
|
onSwitch,
|
|
5441
5441
|
...rest
|
|
5442
|
-
} = { ...defaultProps$
|
|
5442
|
+
} = { ...defaultProps$17, ...props };
|
|
5443
5443
|
const classPrefix2 = "nut-address";
|
|
5444
5444
|
const selectedExist = (item) => {
|
|
5445
5445
|
existList.forEach((list, index) => {
|
|
@@ -5601,7 +5601,7 @@
|
|
|
5601
5601
|
return pathNodes;
|
|
5602
5602
|
}
|
|
5603
5603
|
}
|
|
5604
|
-
const defaultProps$
|
|
5604
|
+
const defaultProps$16 = {
|
|
5605
5605
|
...ComponentDefaults,
|
|
5606
5606
|
activeColor: "",
|
|
5607
5607
|
activeIcon: "checklist",
|
|
@@ -5646,7 +5646,7 @@
|
|
|
5646
5646
|
onClose,
|
|
5647
5647
|
onChange,
|
|
5648
5648
|
onPathChange
|
|
5649
|
-
} = { ...defaultProps$
|
|
5649
|
+
} = { ...defaultProps$16, ...props };
|
|
5650
5650
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
5651
5651
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
5652
5652
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -5954,7 +5954,7 @@
|
|
|
5954
5954
|
};
|
|
5955
5955
|
const Cascader = React.forwardRef(InternalCascader);
|
|
5956
5956
|
Cascader.displayName = "NutCascader";
|
|
5957
|
-
const defaultProps$
|
|
5957
|
+
const defaultProps$15 = {
|
|
5958
5958
|
...ComponentDefaults,
|
|
5959
5959
|
visible: false,
|
|
5960
5960
|
type: "custom",
|
|
@@ -5981,7 +5981,7 @@
|
|
|
5981
5981
|
onPathChange,
|
|
5982
5982
|
...rest
|
|
5983
5983
|
} = {
|
|
5984
|
-
...defaultProps$
|
|
5984
|
+
...defaultProps$15,
|
|
5985
5985
|
...props
|
|
5986
5986
|
};
|
|
5987
5987
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "custom" && /* @__PURE__ */ React.createElement(
|
|
@@ -6006,7 +6006,7 @@
|
|
|
6006
6006
|
}
|
|
6007
6007
|
));
|
|
6008
6008
|
};
|
|
6009
|
-
const defaultProps$
|
|
6009
|
+
const defaultProps$14 = {
|
|
6010
6010
|
...ComponentDefaults,
|
|
6011
6011
|
defaultValue: [],
|
|
6012
6012
|
type: "custom",
|
|
@@ -6048,7 +6048,7 @@
|
|
|
6048
6048
|
onSwitch,
|
|
6049
6049
|
...rest
|
|
6050
6050
|
} = {
|
|
6051
|
-
...defaultProps$
|
|
6051
|
+
...defaultProps$14,
|
|
6052
6052
|
...props
|
|
6053
6053
|
};
|
|
6054
6054
|
const classPrefix2 = "nut-address";
|
|
@@ -6386,7 +6386,7 @@
|
|
|
6386
6386
|
const isStartAndEnd = (days) => {
|
|
6387
6387
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
6388
6388
|
};
|
|
6389
|
-
const defaultProps$
|
|
6389
|
+
const defaultProps$13 = {
|
|
6390
6390
|
...ComponentDefaults,
|
|
6391
6391
|
type: "single",
|
|
6392
6392
|
autoBackfill: false,
|
|
@@ -6447,7 +6447,7 @@
|
|
|
6447
6447
|
onUpdate,
|
|
6448
6448
|
onDayClick,
|
|
6449
6449
|
onPageChange
|
|
6450
|
-
} = { ...defaultProps$
|
|
6450
|
+
} = { ...defaultProps$13, ...props };
|
|
6451
6451
|
const weekdays = locale.calendaritem.weekdays;
|
|
6452
6452
|
const weeks = [
|
|
6453
6453
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -6997,7 +6997,7 @@
|
|
|
6997
6997
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
6998
6998
|
});
|
|
6999
6999
|
CalendarItem.displayName = "NutCalendarItem";
|
|
7000
|
-
const defaultProps$
|
|
7000
|
+
const defaultProps$12 = {
|
|
7001
7001
|
...ComponentDefaults,
|
|
7002
7002
|
type: "single",
|
|
7003
7003
|
autoBackfill: false,
|
|
@@ -7060,7 +7060,7 @@
|
|
|
7060
7060
|
onConfirm,
|
|
7061
7061
|
onDayClick,
|
|
7062
7062
|
onPageChange
|
|
7063
|
-
} = { ...defaultProps$
|
|
7063
|
+
} = { ...defaultProps$12, ...props };
|
|
7064
7064
|
const calendarRef = React.useRef(null);
|
|
7065
7065
|
const close2 = () => {
|
|
7066
7066
|
onClose && onClose();
|
|
@@ -7209,7 +7209,7 @@
|
|
|
7209
7209
|
)
|
|
7210
7210
|
];
|
|
7211
7211
|
};
|
|
7212
|
-
const defaultProps$
|
|
7212
|
+
const defaultProps$11 = {
|
|
7213
7213
|
...ComponentDefaults,
|
|
7214
7214
|
type: "single",
|
|
7215
7215
|
firstDayOfWeek: 0
|
|
@@ -7233,7 +7233,7 @@
|
|
|
7233
7233
|
onDayClick,
|
|
7234
7234
|
onPageChange,
|
|
7235
7235
|
onChange
|
|
7236
|
-
} = { ...defaultProps$
|
|
7236
|
+
} = { ...defaultProps$11, ...props };
|
|
7237
7237
|
const [month, setMonth] = React.useState(() => {
|
|
7238
7238
|
let date2 = new Date(Date.now());
|
|
7239
7239
|
const val = value || defaultValue;
|
|
@@ -7537,7 +7537,7 @@
|
|
|
7537
7537
|
});
|
|
7538
7538
|
CalendarCard.displayName = "NutCalendarCard";
|
|
7539
7539
|
const CheckboxGroupContext = React.createContext(null);
|
|
7540
|
-
const defaultProps
|
|
7540
|
+
const defaultProps$10 = {
|
|
7541
7541
|
max: void 0,
|
|
7542
7542
|
min: void 0,
|
|
7543
7543
|
list: false,
|
|
@@ -7567,7 +7567,7 @@
|
|
|
7567
7567
|
onChange,
|
|
7568
7568
|
onLimit,
|
|
7569
7569
|
...rest
|
|
7570
|
-
} = { ...defaultProps
|
|
7570
|
+
} = { ...defaultProps$10, ...props };
|
|
7571
7571
|
React.useImperativeHandle(ref, () => ({
|
|
7572
7572
|
toggle(state) {
|
|
7573
7573
|
if (state === false) {
|
|
@@ -7660,7 +7660,7 @@
|
|
|
7660
7660
|
}
|
|
7661
7661
|
);
|
|
7662
7662
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
7663
|
-
const defaultProps
|
|
7663
|
+
const defaultProps$$ = {
|
|
7664
7664
|
...ComponentDefaults,
|
|
7665
7665
|
disabled: false,
|
|
7666
7666
|
shape: "round",
|
|
@@ -7674,7 +7674,7 @@
|
|
|
7674
7674
|
const classPrefix$i = "nut-checkbox";
|
|
7675
7675
|
const Checkbox = (props) => {
|
|
7676
7676
|
const { children } = {
|
|
7677
|
-
...defaultProps
|
|
7677
|
+
...defaultProps$$,
|
|
7678
7678
|
...props
|
|
7679
7679
|
};
|
|
7680
7680
|
const {
|
|
@@ -8055,7 +8055,7 @@
|
|
|
8055
8055
|
}, []);
|
|
8056
8056
|
return [refs.current, setRefs, reset];
|
|
8057
8057
|
}
|
|
8058
|
-
const defaultProps$
|
|
8058
|
+
const defaultProps$_ = {
|
|
8059
8059
|
...ComponentDefaults,
|
|
8060
8060
|
visible: false,
|
|
8061
8061
|
title: "",
|
|
@@ -8086,7 +8086,7 @@
|
|
|
8086
8086
|
afterClose,
|
|
8087
8087
|
onChange,
|
|
8088
8088
|
...rest
|
|
8089
|
-
} = { ...defaultProps$
|
|
8089
|
+
} = { ...defaultProps$_, ...props };
|
|
8090
8090
|
const classPrefix2 = "nut-picker";
|
|
8091
8091
|
const classes = classNames(classPrefix2, className);
|
|
8092
8092
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -8398,7 +8398,7 @@
|
|
|
8398
8398
|
return str;
|
|
8399
8399
|
};
|
|
8400
8400
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8401
|
-
const defaultProps$
|
|
8401
|
+
const defaultProps$Z = {
|
|
8402
8402
|
...ComponentDefaults,
|
|
8403
8403
|
visible: false,
|
|
8404
8404
|
title: "",
|
|
@@ -8431,7 +8431,7 @@
|
|
|
8431
8431
|
style,
|
|
8432
8432
|
...rest
|
|
8433
8433
|
} = {
|
|
8434
|
-
...defaultProps$
|
|
8434
|
+
...defaultProps$Z,
|
|
8435
8435
|
...props
|
|
8436
8436
|
};
|
|
8437
8437
|
const { locale } = useConfig$1();
|
|
@@ -9956,7 +9956,7 @@
|
|
|
9956
9956
|
}
|
|
9957
9957
|
return [formRef.current];
|
|
9958
9958
|
};
|
|
9959
|
-
const defaultProps$
|
|
9959
|
+
const defaultProps$Y = {
|
|
9960
9960
|
...ComponentDefaults,
|
|
9961
9961
|
labelPosition: "right",
|
|
9962
9962
|
starPosition: "left",
|
|
@@ -9987,7 +9987,7 @@
|
|
|
9987
9987
|
starPosition,
|
|
9988
9988
|
form
|
|
9989
9989
|
} = {
|
|
9990
|
-
...defaultProps$
|
|
9990
|
+
...defaultProps$Y,
|
|
9991
9991
|
...props
|
|
9992
9992
|
};
|
|
9993
9993
|
let formInstance;
|
|
@@ -10043,7 +10043,7 @@
|
|
|
10043
10043
|
}
|
|
10044
10044
|
).$$typeof === component.type.$$typeof;
|
|
10045
10045
|
}
|
|
10046
|
-
const defaultProps$
|
|
10046
|
+
const defaultProps$X = {
|
|
10047
10047
|
...ComponentDefaults,
|
|
10048
10048
|
required: false,
|
|
10049
10049
|
name: "",
|
|
@@ -10137,9 +10137,10 @@
|
|
|
10137
10137
|
rules: rules2,
|
|
10138
10138
|
className,
|
|
10139
10139
|
style,
|
|
10140
|
+
align,
|
|
10140
10141
|
errorMessageAlign
|
|
10141
10142
|
} = {
|
|
10142
|
-
...defaultProps$
|
|
10143
|
+
...defaultProps$X,
|
|
10143
10144
|
...this.props
|
|
10144
10145
|
};
|
|
10145
10146
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -10152,6 +10153,7 @@
|
|
|
10152
10153
|
{
|
|
10153
10154
|
className: `nut-form-item ${className}`,
|
|
10154
10155
|
style,
|
|
10156
|
+
align,
|
|
10155
10157
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
10156
10158
|
},
|
|
10157
10159
|
label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -10208,7 +10210,7 @@
|
|
|
10208
10210
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
10209
10211
|
}
|
|
10210
10212
|
};
|
|
10211
|
-
_FormItem.defaultProps = defaultProps$
|
|
10213
|
+
_FormItem.defaultProps = defaultProps$X;
|
|
10212
10214
|
_FormItem.contextType = Context;
|
|
10213
10215
|
let FormItem = _FormItem;
|
|
10214
10216
|
const InnerForm = Form;
|
|
@@ -10238,7 +10240,7 @@
|
|
|
10238
10240
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
10239
10241
|
return value.replace(regExp, "");
|
|
10240
10242
|
}
|
|
10241
|
-
const defaultProps$
|
|
10243
|
+
const defaultProps$W = {
|
|
10242
10244
|
...ComponentDefaults,
|
|
10243
10245
|
type: "text",
|
|
10244
10246
|
name: "",
|
|
@@ -10283,7 +10285,7 @@
|
|
|
10283
10285
|
value: _value,
|
|
10284
10286
|
...rest
|
|
10285
10287
|
} = {
|
|
10286
|
-
...defaultProps$
|
|
10288
|
+
...defaultProps$W,
|
|
10287
10289
|
...props
|
|
10288
10290
|
};
|
|
10289
10291
|
const [value, setValue] = usePropsValue({
|
|
@@ -10434,7 +10436,7 @@
|
|
|
10434
10436
|
}
|
|
10435
10437
|
);
|
|
10436
10438
|
Input.displayName = "NutInput";
|
|
10437
|
-
const defaultProps$
|
|
10439
|
+
const defaultProps$V = {
|
|
10438
10440
|
...ComponentDefaults,
|
|
10439
10441
|
disabled: false,
|
|
10440
10442
|
readOnly: false,
|
|
@@ -10472,7 +10474,7 @@
|
|
|
10472
10474
|
onChange,
|
|
10473
10475
|
...restProps
|
|
10474
10476
|
} = {
|
|
10475
|
-
...defaultProps$
|
|
10477
|
+
...defaultProps$V,
|
|
10476
10478
|
...props
|
|
10477
10479
|
};
|
|
10478
10480
|
const classes = classNames(classPrefix$h, className, {
|
|
@@ -10563,6 +10565,17 @@
|
|
|
10563
10565
|
if (text === "-") return null;
|
|
10564
10566
|
return text;
|
|
10565
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
|
+
};
|
|
10566
10579
|
const handleInputChange = (e2) => {
|
|
10567
10580
|
setInputValue(e2.target.value);
|
|
10568
10581
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -10573,26 +10586,31 @@
|
|
|
10573
10586
|
setShadowValue(defaultValue);
|
|
10574
10587
|
}
|
|
10575
10588
|
} else {
|
|
10576
|
-
setShadowValue(valueStr);
|
|
10577
|
-
}
|
|
10578
|
-
if (!async) {
|
|
10579
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10589
|
+
setShadowValue(clampValue(valueStr));
|
|
10580
10590
|
}
|
|
10591
|
+
!async && handleValueChange(valueStr, e2);
|
|
10581
10592
|
};
|
|
10582
10593
|
const handleFocus = (e2) => {
|
|
10583
10594
|
setFocused(true);
|
|
10584
10595
|
setInputValue(
|
|
10585
10596
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
10586
10597
|
);
|
|
10587
|
-
onFocus
|
|
10598
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
10588
10599
|
};
|
|
10589
10600
|
const handleBlur = (e2) => {
|
|
10590
10601
|
setFocused(false);
|
|
10591
|
-
onBlur
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
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));
|
|
10595
10612
|
}
|
|
10613
|
+
async && handleValueChange(valueStr, e2);
|
|
10596
10614
|
};
|
|
10597
10615
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
|
|
10598
10616
|
a$1,
|
|
@@ -10625,8 +10643,9 @@
|
|
|
10625
10643
|
)));
|
|
10626
10644
|
};
|
|
10627
10645
|
InputNumber.displayName = "NutInputNumber";
|
|
10628
|
-
const defaultProps$
|
|
10646
|
+
const defaultProps$U = {
|
|
10629
10647
|
...ComponentDefaults,
|
|
10648
|
+
titleIcon: null,
|
|
10630
10649
|
columns: 1,
|
|
10631
10650
|
direction: "down",
|
|
10632
10651
|
icon: null,
|
|
@@ -10656,7 +10675,7 @@
|
|
|
10656
10675
|
parent,
|
|
10657
10676
|
index
|
|
10658
10677
|
} = {
|
|
10659
|
-
...defaultProps$
|
|
10678
|
+
...defaultProps$U,
|
|
10660
10679
|
...props
|
|
10661
10680
|
};
|
|
10662
10681
|
const [showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -10837,7 +10856,7 @@
|
|
|
10837
10856
|
));
|
|
10838
10857
|
});
|
|
10839
10858
|
MenuItem.displayName = "NutMenuItem";
|
|
10840
|
-
const defaultProps$
|
|
10859
|
+
const defaultProps$T = {
|
|
10841
10860
|
...ComponentDefaults,
|
|
10842
10861
|
activeColor: "",
|
|
10843
10862
|
closeOnOverlayClick: true,
|
|
@@ -10864,7 +10883,7 @@
|
|
|
10864
10883
|
onOpen,
|
|
10865
10884
|
...rest
|
|
10866
10885
|
} = {
|
|
10867
|
-
...defaultProps$
|
|
10886
|
+
...defaultProps$T,
|
|
10868
10887
|
...props
|
|
10869
10888
|
};
|
|
10870
10889
|
const menuRef = React.useRef(null);
|
|
@@ -10929,7 +10948,15 @@
|
|
|
10929
10948
|
const menuTitle = () => {
|
|
10930
10949
|
return React.Children.map(children, (child, index) => {
|
|
10931
10950
|
if (React.isValidElement(child)) {
|
|
10932
|
-
const {
|
|
10951
|
+
const {
|
|
10952
|
+
title,
|
|
10953
|
+
titleIcon,
|
|
10954
|
+
options,
|
|
10955
|
+
value,
|
|
10956
|
+
defaultValue,
|
|
10957
|
+
disabled,
|
|
10958
|
+
direction
|
|
10959
|
+
} = child.props;
|
|
10933
10960
|
const selected = options == null ? void 0 : options.filter(
|
|
10934
10961
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
10935
10962
|
);
|
|
@@ -10940,6 +10967,25 @@
|
|
|
10940
10967
|
return selected[0].text;
|
|
10941
10968
|
return "";
|
|
10942
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
|
+
};
|
|
10943
10989
|
return /* @__PURE__ */ React.createElement(
|
|
10944
10990
|
"div",
|
|
10945
10991
|
{
|
|
@@ -10955,7 +11001,7 @@
|
|
|
10955
11001
|
}
|
|
10956
11002
|
},
|
|
10957
11003
|
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
10958
|
-
|
|
11004
|
+
finallyIcon()
|
|
10959
11005
|
);
|
|
10960
11006
|
}
|
|
10961
11007
|
return null;
|
|
@@ -10984,6 +11030,16 @@
|
|
|
10984
11030
|
};
|
|
10985
11031
|
Menu.displayName = "NutMenu";
|
|
10986
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
|
+
};
|
|
10987
11043
|
const NumberKeyboard = (props) => {
|
|
10988
11044
|
const { locale } = useConfig$1();
|
|
10989
11045
|
const {
|
|
@@ -11001,7 +11057,7 @@
|
|
|
11001
11057
|
onClose,
|
|
11002
11058
|
onConfirm,
|
|
11003
11059
|
...rest
|
|
11004
|
-
} = props;
|
|
11060
|
+
} = { ...defaultProps$S, ...props };
|
|
11005
11061
|
const classPrefix2 = "nut-numberkeyboard";
|
|
11006
11062
|
const getBasicKeys = () => {
|
|
11007
11063
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -11047,17 +11103,35 @@
|
|
|
11047
11103
|
};
|
|
11048
11104
|
const onTouchEnd = (item2) => {
|
|
11049
11105
|
setActive(false);
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
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;
|
|
11058
11120
|
}
|
|
11059
|
-
|
|
11060
|
-
|
|
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;
|
|
11061
11135
|
}
|
|
11062
11136
|
};
|
|
11063
11137
|
return /* @__PURE__ */ React.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React.createElement(
|
|
@@ -11074,22 +11148,19 @@
|
|
|
11074
11148
|
onTouchEnd: () => onTouchEnd(item),
|
|
11075
11149
|
onTouchCancel: () => onTouchEnd(item)
|
|
11076
11150
|
},
|
|
11077
|
-
(item
|
|
11078
|
-
item.type === "delete" && /* @__PURE__ */ React.createElement(DeleteIcon, null),
|
|
11079
|
-
item.type === "close" && /* @__PURE__ */ React.createElement(g$6, { size: 18 }),
|
|
11080
|
-
item.type === "confirm" && /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done)
|
|
11151
|
+
renderContent(item)
|
|
11081
11152
|
));
|
|
11082
11153
|
};
|
|
11083
11154
|
return /* @__PURE__ */ React.createElement(
|
|
11084
11155
|
Popup,
|
|
11085
11156
|
{
|
|
11157
|
+
...rest,
|
|
11086
11158
|
visible,
|
|
11087
11159
|
position: "bottom",
|
|
11088
11160
|
onOverlayClick: onClose,
|
|
11089
11161
|
onCloseIconClick: onClose,
|
|
11090
11162
|
zIndex: 9999,
|
|
11091
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11092
|
-
...rest
|
|
11163
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11093
11164
|
},
|
|
11094
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(
|
|
11095
11166
|
"span",
|
|
@@ -12476,10 +12547,12 @@
|
|
|
12476
12547
|
uploadTaro(uploadFile, env) {
|
|
12477
12548
|
var _a;
|
|
12478
12549
|
const options = this.options;
|
|
12550
|
+
if (options.beforeXhrUpload) {
|
|
12551
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
12552
|
+
return;
|
|
12553
|
+
}
|
|
12479
12554
|
if (env === "WEB") {
|
|
12480
12555
|
this.upload();
|
|
12481
|
-
} else if (options.beforeXhrUpload) {
|
|
12482
|
-
options.beforeXhrUpload(uploadFile, options);
|
|
12483
12556
|
} else {
|
|
12484
12557
|
const uploadTask = uploadFile({
|
|
12485
12558
|
url: options.url,
|