@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.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v2.6.
|
|
2
|
+
* @nutui/nutui-react-taro v2.6.16 Sat Aug 03 2024 09:52:17 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -196,7 +196,7 @@ const ComponentDefaults = {
|
|
|
196
196
|
style: {}
|
|
197
197
|
};
|
|
198
198
|
const prefixCls$2 = "nut-button";
|
|
199
|
-
const defaultProps$
|
|
199
|
+
const defaultProps$1v = {
|
|
200
200
|
...ComponentDefaults,
|
|
201
201
|
color: "",
|
|
202
202
|
type: "default",
|
|
@@ -231,7 +231,7 @@ const Button = React__default.forwardRef(
|
|
|
231
231
|
onClick,
|
|
232
232
|
...rest
|
|
233
233
|
} = {
|
|
234
|
-
...defaultProps$
|
|
234
|
+
...defaultProps$1v,
|
|
235
235
|
...props
|
|
236
236
|
};
|
|
237
237
|
const getStyle = useCallback(() => {
|
|
@@ -298,7 +298,7 @@ const Button = React__default.forwardRef(
|
|
|
298
298
|
);
|
|
299
299
|
Button.displayName = "NutButton";
|
|
300
300
|
const CellGroupContext = createContext(null);
|
|
301
|
-
const defaultProps$
|
|
301
|
+
const defaultProps$1u = {
|
|
302
302
|
...ComponentDefaults,
|
|
303
303
|
title: "",
|
|
304
304
|
description: "",
|
|
@@ -307,7 +307,7 @@ const defaultProps$1t = {
|
|
|
307
307
|
const classPrefix$r = "nut-cell-group";
|
|
308
308
|
const CellGroup = (props) => {
|
|
309
309
|
const { children, className, title, description, divider, ...rest } = {
|
|
310
|
-
...defaultProps$
|
|
310
|
+
...defaultProps$1u,
|
|
311
311
|
...props
|
|
312
312
|
};
|
|
313
313
|
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React__default.createElement(
|
|
@@ -319,7 +319,7 @@ const CellGroup = (props) => {
|
|
|
319
319
|
));
|
|
320
320
|
};
|
|
321
321
|
CellGroup.displayName = "NutCellGroup";
|
|
322
|
-
const defaultProps$
|
|
322
|
+
const defaultProps$1t = {
|
|
323
323
|
...ComponentDefaults,
|
|
324
324
|
title: null,
|
|
325
325
|
description: null,
|
|
@@ -344,7 +344,7 @@ const Cell = (props) => {
|
|
|
344
344
|
style,
|
|
345
345
|
...rest
|
|
346
346
|
} = {
|
|
347
|
-
...defaultProps$
|
|
347
|
+
...defaultProps$1t,
|
|
348
348
|
...props
|
|
349
349
|
};
|
|
350
350
|
const handleClick = (event) => {
|
|
@@ -1519,7 +1519,7 @@ ConfigProvider.displayName = "NutConfigProvider";
|
|
|
1519
1519
|
const pxCheck = (value) => {
|
|
1520
1520
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1521
1521
|
};
|
|
1522
|
-
const defaultProps$
|
|
1522
|
+
const defaultProps$1s = {
|
|
1523
1523
|
src: "",
|
|
1524
1524
|
error: true,
|
|
1525
1525
|
loading: true
|
|
@@ -1538,7 +1538,7 @@ const Image$1 = (props) => {
|
|
|
1538
1538
|
onLoad,
|
|
1539
1539
|
onError,
|
|
1540
1540
|
...rest
|
|
1541
|
-
} = { ...defaultProps$
|
|
1541
|
+
} = { ...defaultProps$1s, ...props };
|
|
1542
1542
|
const [innerLoading, setInnerLoading] = useState(true);
|
|
1543
1543
|
const [isError, setIsError] = useState(false);
|
|
1544
1544
|
const handleLoad = (e2) => {
|
|
@@ -3557,7 +3557,7 @@ const Overlay = (props) => {
|
|
|
3557
3557
|
};
|
|
3558
3558
|
Overlay.displayName = "NutOverlay";
|
|
3559
3559
|
const DataContext$1 = createContext({});
|
|
3560
|
-
const defaultProps$
|
|
3560
|
+
const defaultProps$1r = {
|
|
3561
3561
|
...ComponentDefaults,
|
|
3562
3562
|
span: "24",
|
|
3563
3563
|
offset: "0",
|
|
@@ -3565,7 +3565,7 @@ const defaultProps$1q = {
|
|
|
3565
3565
|
};
|
|
3566
3566
|
const Col = (props) => {
|
|
3567
3567
|
const { className, style, span, offset, children, onClick } = {
|
|
3568
|
-
...defaultProps$
|
|
3568
|
+
...defaultProps$1r,
|
|
3569
3569
|
...props
|
|
3570
3570
|
};
|
|
3571
3571
|
const [colName, setColName] = useState("");
|
|
@@ -3598,7 +3598,7 @@ const Col = (props) => {
|
|
|
3598
3598
|
);
|
|
3599
3599
|
};
|
|
3600
3600
|
Col.displayName = "NutCol";
|
|
3601
|
-
const defaultProps$
|
|
3601
|
+
const defaultProps$1q = {
|
|
3602
3602
|
...ComponentDefaults,
|
|
3603
3603
|
contentPosition: "center",
|
|
3604
3604
|
direction: "horizontal"
|
|
@@ -3606,7 +3606,7 @@ const defaultProps$1p = {
|
|
|
3606
3606
|
const classPrefix$o = `nut-divider`;
|
|
3607
3607
|
const Divider = (props) => {
|
|
3608
3608
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3609
|
-
...defaultProps$
|
|
3609
|
+
...defaultProps$1q,
|
|
3610
3610
|
...props
|
|
3611
3611
|
};
|
|
3612
3612
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -3627,7 +3627,7 @@ const gridContext = {
|
|
|
3627
3627
|
}
|
|
3628
3628
|
};
|
|
3629
3629
|
const GridContext = React__default.createContext(gridContext);
|
|
3630
|
-
const defaultProps$
|
|
3630
|
+
const defaultProps$1p = {
|
|
3631
3631
|
text: "",
|
|
3632
3632
|
columns: 4,
|
|
3633
3633
|
gap: 0,
|
|
@@ -3653,7 +3653,7 @@ const GridItem = (props) => {
|
|
|
3653
3653
|
onClick,
|
|
3654
3654
|
...rest
|
|
3655
3655
|
} = {
|
|
3656
|
-
...defaultProps$
|
|
3656
|
+
...defaultProps$1p,
|
|
3657
3657
|
...props
|
|
3658
3658
|
};
|
|
3659
3659
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -3712,7 +3712,7 @@ const GridItem = (props) => {
|
|
|
3712
3712
|
);
|
|
3713
3713
|
};
|
|
3714
3714
|
GridItem.displayName = "NutGridItem";
|
|
3715
|
-
const defaultProps$
|
|
3715
|
+
const defaultProps$1o = {
|
|
3716
3716
|
columns: 4,
|
|
3717
3717
|
gap: 0,
|
|
3718
3718
|
center: true,
|
|
@@ -3733,7 +3733,7 @@ const Grid = (props) => {
|
|
|
3733
3733
|
className,
|
|
3734
3734
|
onClick,
|
|
3735
3735
|
...rest
|
|
3736
|
-
} = { ...defaultProps$
|
|
3736
|
+
} = { ...defaultProps$1o, ...props };
|
|
3737
3737
|
const childrenDom = React__default.Children.toArray(children);
|
|
3738
3738
|
const classPrefix2 = "nut-grid";
|
|
3739
3739
|
const rootClass = () => {
|
|
@@ -3769,14 +3769,14 @@ const Grid = (props) => {
|
|
|
3769
3769
|
};
|
|
3770
3770
|
Grid.displayName = "NutGrid";
|
|
3771
3771
|
Grid.Item = GridItem;
|
|
3772
|
-
const defaultProps$
|
|
3772
|
+
const defaultProps$1n = {};
|
|
3773
3773
|
const Layout = (props) => {
|
|
3774
|
-
({ ...defaultProps$
|
|
3774
|
+
({ ...defaultProps$1n, ...props });
|
|
3775
3775
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
|
|
3776
3776
|
};
|
|
3777
3777
|
Layout.displayName = "NutLayout";
|
|
3778
3778
|
const classPrefix$n = "nut-row";
|
|
3779
|
-
const defaultProps$
|
|
3779
|
+
const defaultProps$1m = {
|
|
3780
3780
|
...ComponentDefaults,
|
|
3781
3781
|
type: "",
|
|
3782
3782
|
justify: "start",
|
|
@@ -3796,7 +3796,7 @@ const Row = (props) => {
|
|
|
3796
3796
|
gutter,
|
|
3797
3797
|
onClick
|
|
3798
3798
|
} = {
|
|
3799
|
-
...defaultProps$
|
|
3799
|
+
...defaultProps$1m,
|
|
3800
3800
|
...props
|
|
3801
3801
|
};
|
|
3802
3802
|
const getClass = (prefix, type22) => {
|
|
@@ -3830,12 +3830,12 @@ const Row = (props) => {
|
|
|
3830
3830
|
};
|
|
3831
3831
|
Row.displayName = "NutRow";
|
|
3832
3832
|
const prefixCls$1 = "nut-space";
|
|
3833
|
-
const defaultProps$
|
|
3833
|
+
const defaultProps$1l = {
|
|
3834
3834
|
direction: "horizontal"
|
|
3835
3835
|
};
|
|
3836
3836
|
const Space = (props) => {
|
|
3837
3837
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3838
|
-
...defaultProps$
|
|
3838
|
+
...defaultProps$1l,
|
|
3839
3839
|
...props
|
|
3840
3840
|
};
|
|
3841
3841
|
const cls = classNames(
|
|
@@ -3927,7 +3927,7 @@ const getRectByTaro = async (element) => {
|
|
|
3927
3927
|
}
|
|
3928
3928
|
return Promise.resolve(makeRect(0, 0));
|
|
3929
3929
|
};
|
|
3930
|
-
const defaultProps$
|
|
3930
|
+
const defaultProps$1k = {
|
|
3931
3931
|
...ComponentDefaults,
|
|
3932
3932
|
position: "top",
|
|
3933
3933
|
zIndex: 900
|
|
@@ -3944,7 +3944,7 @@ const Sticky = (props) => {
|
|
|
3944
3944
|
className,
|
|
3945
3945
|
onChange,
|
|
3946
3946
|
...rest
|
|
3947
|
-
} = { ...defaultProps$
|
|
3947
|
+
} = { ...defaultProps$1k, ...props };
|
|
3948
3948
|
const stickyRef = useRef(null);
|
|
3949
3949
|
const rootRef = useRef(null);
|
|
3950
3950
|
const [rootRect, setRootRect] = useState({});
|
|
@@ -4060,7 +4060,7 @@ const SafeArea = (props) => {
|
|
|
4060
4060
|
);
|
|
4061
4061
|
};
|
|
4062
4062
|
SafeArea.displayName = "NutSafeArea";
|
|
4063
|
-
const defaultProps$
|
|
4063
|
+
const defaultProps$1j = {
|
|
4064
4064
|
...ComponentDefaults,
|
|
4065
4065
|
threshold: 200,
|
|
4066
4066
|
zIndex: 900,
|
|
@@ -4069,7 +4069,7 @@ const defaultProps$1i = {
|
|
|
4069
4069
|
const BackTop = (props) => {
|
|
4070
4070
|
const rtl = useRtl();
|
|
4071
4071
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
4072
|
-
...defaultProps$
|
|
4072
|
+
...defaultProps$1j,
|
|
4073
4073
|
...props
|
|
4074
4074
|
};
|
|
4075
4075
|
const classPrefix2 = "nut-backtop";
|
|
@@ -4113,7 +4113,7 @@ const BackTop = (props) => {
|
|
|
4113
4113
|
};
|
|
4114
4114
|
BackTop.displayName = "NutBackTop";
|
|
4115
4115
|
const elevatorContext = createContext({});
|
|
4116
|
-
const defaultProps$
|
|
4116
|
+
const defaultProps$1i = {
|
|
4117
4117
|
...ComponentDefaults,
|
|
4118
4118
|
height: "200px",
|
|
4119
4119
|
floorKey: "title",
|
|
@@ -4140,7 +4140,7 @@ const Elevator = (props) => {
|
|
|
4140
4140
|
children,
|
|
4141
4141
|
...rest
|
|
4142
4142
|
} = {
|
|
4143
|
-
...defaultProps$
|
|
4143
|
+
...defaultProps$1i,
|
|
4144
4144
|
...props
|
|
4145
4145
|
};
|
|
4146
4146
|
const classPrefix2 = "nut-elevator";
|
|
@@ -4355,7 +4355,7 @@ const Elevator = (props) => {
|
|
|
4355
4355
|
};
|
|
4356
4356
|
Elevator.displayName = "NutElevator";
|
|
4357
4357
|
Elevator.Context = elevatorContext;
|
|
4358
|
-
const defaultProps$
|
|
4358
|
+
const defaultProps$1h = {
|
|
4359
4359
|
...ComponentDefaults,
|
|
4360
4360
|
activeText: "",
|
|
4361
4361
|
inactiveText: "",
|
|
@@ -4383,7 +4383,7 @@ const FixedNav = (props) => {
|
|
|
4383
4383
|
content,
|
|
4384
4384
|
...rest
|
|
4385
4385
|
} = {
|
|
4386
|
-
...defaultProps$
|
|
4386
|
+
...defaultProps$1h,
|
|
4387
4387
|
...props
|
|
4388
4388
|
};
|
|
4389
4389
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -4436,7 +4436,7 @@ const FixedNav = (props) => {
|
|
|
4436
4436
|
);
|
|
4437
4437
|
};
|
|
4438
4438
|
FixedNav.displayName = "NutFixedNav";
|
|
4439
|
-
const defaultProps$
|
|
4439
|
+
const defaultProps$1g = {
|
|
4440
4440
|
...ComponentDefaults,
|
|
4441
4441
|
left: "",
|
|
4442
4442
|
right: "",
|
|
@@ -4461,7 +4461,7 @@ const NavBar = (props) => {
|
|
|
4461
4461
|
zIndex,
|
|
4462
4462
|
onBackClick
|
|
4463
4463
|
} = {
|
|
4464
|
-
...defaultProps$
|
|
4464
|
+
...defaultProps$1g,
|
|
4465
4465
|
...props
|
|
4466
4466
|
};
|
|
4467
4467
|
const classPrefix2 = "nut-navbar";
|
|
@@ -4540,7 +4540,7 @@ const NavBar = (props) => {
|
|
|
4540
4540
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement(View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
4541
4541
|
};
|
|
4542
4542
|
NavBar.displayName = "NutNavBar";
|
|
4543
|
-
const defaultProps$
|
|
4543
|
+
const defaultProps$1f = {
|
|
4544
4544
|
...ComponentDefaults,
|
|
4545
4545
|
position: "center",
|
|
4546
4546
|
transition: "",
|
|
@@ -4593,7 +4593,7 @@ const Popup = (props) => {
|
|
|
4593
4593
|
afterShow,
|
|
4594
4594
|
afterClose,
|
|
4595
4595
|
onClick
|
|
4596
|
-
} = { ...defaultProps$
|
|
4596
|
+
} = { ...defaultProps$1f, ...props };
|
|
4597
4597
|
let innerIndex = zIndex || _zIndex;
|
|
4598
4598
|
const [index, setIndex] = useState(innerIndex);
|
|
4599
4599
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
@@ -4735,7 +4735,7 @@ const Popup = (props) => {
|
|
|
4735
4735
|
};
|
|
4736
4736
|
Popup.displayName = "NutPopup";
|
|
4737
4737
|
const OffsetContext = createContext(20);
|
|
4738
|
-
const defaultProps$
|
|
4738
|
+
const defaultProps$1e = {
|
|
4739
4739
|
...ComponentDefaults,
|
|
4740
4740
|
position: "left",
|
|
4741
4741
|
width: "80%"
|
|
@@ -4753,7 +4753,7 @@ const SideNavBar = (props) => {
|
|
|
4753
4753
|
indent,
|
|
4754
4754
|
...rest
|
|
4755
4755
|
} = {
|
|
4756
|
-
...defaultProps$
|
|
4756
|
+
...defaultProps$1e,
|
|
4757
4757
|
...props
|
|
4758
4758
|
};
|
|
4759
4759
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -4811,13 +4811,13 @@ const SideNavBarItem = (props) => {
|
|
|
4811
4811
|
title
|
|
4812
4812
|
);
|
|
4813
4813
|
};
|
|
4814
|
-
const defaultProps$
|
|
4814
|
+
const defaultProps$1d = {
|
|
4815
4815
|
open: true
|
|
4816
4816
|
};
|
|
4817
4817
|
const SubSideNavBar = (props) => {
|
|
4818
4818
|
const classPrefix2 = "nut-subsidenavbar";
|
|
4819
4819
|
const { title, value, children, onClick, open: open2, ...rest } = {
|
|
4820
|
-
...defaultProps$
|
|
4820
|
+
...defaultProps$1d,
|
|
4821
4821
|
...props
|
|
4822
4822
|
};
|
|
4823
4823
|
const [subShow, setSubShow] = useState(open2);
|
|
@@ -4895,7 +4895,7 @@ function usePropsValue({
|
|
|
4895
4895
|
);
|
|
4896
4896
|
return [stateRef.current, setState];
|
|
4897
4897
|
}
|
|
4898
|
-
const defaultProps$
|
|
4898
|
+
const defaultProps$1c = {
|
|
4899
4899
|
...ComponentDefaults,
|
|
4900
4900
|
value: "",
|
|
4901
4901
|
dot: false,
|
|
@@ -4920,7 +4920,7 @@ const Badge = (props) => {
|
|
|
4920
4920
|
color,
|
|
4921
4921
|
fill
|
|
4922
4922
|
} = {
|
|
4923
|
-
...defaultProps$
|
|
4923
|
+
...defaultProps$1c,
|
|
4924
4924
|
...props
|
|
4925
4925
|
};
|
|
4926
4926
|
const classPrefix2 = "nut-badge";
|
|
@@ -4974,7 +4974,7 @@ const Badge = (props) => {
|
|
|
4974
4974
|
};
|
|
4975
4975
|
Badge.displayName = "NutBadge";
|
|
4976
4976
|
const TabbarContext = React__default.createContext(null);
|
|
4977
|
-
const defaultProps$
|
|
4977
|
+
const defaultProps$1b = {
|
|
4978
4978
|
...ComponentDefaults,
|
|
4979
4979
|
title: "",
|
|
4980
4980
|
icon: null,
|
|
@@ -5000,7 +5000,7 @@ const TabbarItem = (props) => {
|
|
|
5000
5000
|
index,
|
|
5001
5001
|
...rest
|
|
5002
5002
|
} = {
|
|
5003
|
-
...defaultProps$
|
|
5003
|
+
...defaultProps$1b,
|
|
5004
5004
|
...props
|
|
5005
5005
|
};
|
|
5006
5006
|
const active = index === (ctx == null ? void 0 : ctx.selectIndex);
|
|
@@ -5038,7 +5038,7 @@ const TabbarItem = (props) => {
|
|
|
5038
5038
|
icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title))
|
|
5039
5039
|
);
|
|
5040
5040
|
};
|
|
5041
|
-
const defaultProps$
|
|
5041
|
+
const defaultProps$1a = {
|
|
5042
5042
|
...ComponentDefaults,
|
|
5043
5043
|
defaultValue: 0,
|
|
5044
5044
|
fixed: false,
|
|
@@ -5061,7 +5061,7 @@ const Tabbar = (props) => {
|
|
|
5061
5061
|
style,
|
|
5062
5062
|
onSwitch
|
|
5063
5063
|
} = {
|
|
5064
|
-
...defaultProps$
|
|
5064
|
+
...defaultProps$1a,
|
|
5065
5065
|
...props
|
|
5066
5066
|
};
|
|
5067
5067
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -5103,14 +5103,14 @@ const Tabbar = (props) => {
|
|
|
5103
5103
|
};
|
|
5104
5104
|
Tabbar.displayName = "NutTabbar";
|
|
5105
5105
|
Tabbar.Item = TabbarItem;
|
|
5106
|
-
const defaultProps$
|
|
5106
|
+
const defaultProps$19 = {
|
|
5107
5107
|
title: "",
|
|
5108
5108
|
value: "",
|
|
5109
5109
|
disabled: false
|
|
5110
5110
|
};
|
|
5111
5111
|
const TabPane = (props) => {
|
|
5112
5112
|
const { children, autoHeightClassName, className, disabled } = {
|
|
5113
|
-
...defaultProps$
|
|
5113
|
+
...defaultProps$19,
|
|
5114
5114
|
...props
|
|
5115
5115
|
};
|
|
5116
5116
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -5151,7 +5151,7 @@ function useUuid() {
|
|
|
5151
5151
|
const idRef = useRef(uniqueId());
|
|
5152
5152
|
return idRef.current;
|
|
5153
5153
|
}
|
|
5154
|
-
const defaultProps$
|
|
5154
|
+
const defaultProps$18 = {
|
|
5155
5155
|
...ComponentDefaults,
|
|
5156
5156
|
tabStyle: {},
|
|
5157
5157
|
activeColor: "",
|
|
@@ -5181,7 +5181,7 @@ const Tabs = (props) => {
|
|
|
5181
5181
|
defaultValue: outerDefaultValue,
|
|
5182
5182
|
...rest
|
|
5183
5183
|
} = {
|
|
5184
|
-
...defaultProps$
|
|
5184
|
+
...defaultProps$18,
|
|
5185
5185
|
...props
|
|
5186
5186
|
};
|
|
5187
5187
|
const uuid = useUuid();
|
|
@@ -5404,7 +5404,7 @@ const Tabs = (props) => {
|
|
|
5404
5404
|
};
|
|
5405
5405
|
Tabs.displayName = "NutTabs";
|
|
5406
5406
|
Tabs.TabPane = TabPane;
|
|
5407
|
-
const defaultProps$
|
|
5407
|
+
const defaultProps$17 = {
|
|
5408
5408
|
type: "custom",
|
|
5409
5409
|
existList: [],
|
|
5410
5410
|
defaultIcon: null,
|
|
@@ -5423,7 +5423,7 @@ const ExistRender = (props) => {
|
|
|
5423
5423
|
onSelect,
|
|
5424
5424
|
onSwitch,
|
|
5425
5425
|
...rest
|
|
5426
|
-
} = { ...defaultProps$
|
|
5426
|
+
} = { ...defaultProps$17, ...props };
|
|
5427
5427
|
const classPrefix2 = "nut-address";
|
|
5428
5428
|
const selectedExist = (item) => {
|
|
5429
5429
|
existList.forEach((list, index) => {
|
|
@@ -5585,7 +5585,7 @@ class Tree {
|
|
|
5585
5585
|
return pathNodes;
|
|
5586
5586
|
}
|
|
5587
5587
|
}
|
|
5588
|
-
const defaultProps$
|
|
5588
|
+
const defaultProps$16 = {
|
|
5589
5589
|
...ComponentDefaults,
|
|
5590
5590
|
activeColor: "",
|
|
5591
5591
|
activeIcon: "checklist",
|
|
@@ -5630,7 +5630,7 @@ const InternalCascader = (props, ref) => {
|
|
|
5630
5630
|
onClose,
|
|
5631
5631
|
onChange,
|
|
5632
5632
|
onPathChange
|
|
5633
|
-
} = { ...defaultProps$
|
|
5633
|
+
} = { ...defaultProps$16, ...props };
|
|
5634
5634
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
5635
5635
|
const [optionsData, setOptionsData] = useState([]);
|
|
5636
5636
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -5938,7 +5938,7 @@ const InternalCascader = (props, ref) => {
|
|
|
5938
5938
|
};
|
|
5939
5939
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
5940
5940
|
Cascader.displayName = "NutCascader";
|
|
5941
|
-
const defaultProps$
|
|
5941
|
+
const defaultProps$15 = {
|
|
5942
5942
|
...ComponentDefaults,
|
|
5943
5943
|
visible: false,
|
|
5944
5944
|
type: "custom",
|
|
@@ -5965,7 +5965,7 @@ const CustomRender = (props) => {
|
|
|
5965
5965
|
onPathChange,
|
|
5966
5966
|
...rest
|
|
5967
5967
|
} = {
|
|
5968
|
-
...defaultProps$
|
|
5968
|
+
...defaultProps$15,
|
|
5969
5969
|
...props
|
|
5970
5970
|
};
|
|
5971
5971
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
|
|
@@ -5990,7 +5990,7 @@ const CustomRender = (props) => {
|
|
|
5990
5990
|
}
|
|
5991
5991
|
));
|
|
5992
5992
|
};
|
|
5993
|
-
const defaultProps$
|
|
5993
|
+
const defaultProps$14 = {
|
|
5994
5994
|
...ComponentDefaults,
|
|
5995
5995
|
defaultValue: [],
|
|
5996
5996
|
type: "custom",
|
|
@@ -6032,7 +6032,7 @@ const InternalAddress = (props, ref) => {
|
|
|
6032
6032
|
onSwitch,
|
|
6033
6033
|
...rest
|
|
6034
6034
|
} = {
|
|
6035
|
-
...defaultProps$
|
|
6035
|
+
...defaultProps$14,
|
|
6036
6036
|
...props
|
|
6037
6037
|
};
|
|
6038
6038
|
const classPrefix2 = "nut-address";
|
|
@@ -6370,7 +6370,7 @@ const isEnd = (day, days) => {
|
|
|
6370
6370
|
const isStartAndEnd = (days) => {
|
|
6371
6371
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
6372
6372
|
};
|
|
6373
|
-
const defaultProps$
|
|
6373
|
+
const defaultProps$13 = {
|
|
6374
6374
|
...ComponentDefaults,
|
|
6375
6375
|
type: "single",
|
|
6376
6376
|
autoBackfill: false,
|
|
@@ -6431,7 +6431,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
6431
6431
|
onUpdate,
|
|
6432
6432
|
onDayClick,
|
|
6433
6433
|
onPageChange
|
|
6434
|
-
} = { ...defaultProps$
|
|
6434
|
+
} = { ...defaultProps$13, ...props };
|
|
6435
6435
|
const weekdays = locale.calendaritem.weekdays;
|
|
6436
6436
|
const weeks = [
|
|
6437
6437
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -6981,7 +6981,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
6981
6981
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
6982
6982
|
});
|
|
6983
6983
|
CalendarItem.displayName = "NutCalendarItem";
|
|
6984
|
-
const defaultProps$
|
|
6984
|
+
const defaultProps$12 = {
|
|
6985
6985
|
...ComponentDefaults,
|
|
6986
6986
|
type: "single",
|
|
6987
6987
|
autoBackfill: false,
|
|
@@ -7044,7 +7044,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
7044
7044
|
onConfirm,
|
|
7045
7045
|
onDayClick,
|
|
7046
7046
|
onPageChange
|
|
7047
|
-
} = { ...defaultProps$
|
|
7047
|
+
} = { ...defaultProps$12, ...props };
|
|
7048
7048
|
const calendarRef = useRef(null);
|
|
7049
7049
|
const close2 = () => {
|
|
7050
7050
|
onClose && onClose();
|
|
@@ -7193,7 +7193,7 @@ const getCurrentWeekDays = (day, firstDayOfWeek) => {
|
|
|
7193
7193
|
)
|
|
7194
7194
|
];
|
|
7195
7195
|
};
|
|
7196
|
-
const defaultProps$
|
|
7196
|
+
const defaultProps$11 = {
|
|
7197
7197
|
...ComponentDefaults,
|
|
7198
7198
|
type: "single",
|
|
7199
7199
|
firstDayOfWeek: 0
|
|
@@ -7217,7 +7217,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
7217
7217
|
onDayClick,
|
|
7218
7218
|
onPageChange,
|
|
7219
7219
|
onChange
|
|
7220
|
-
} = { ...defaultProps$
|
|
7220
|
+
} = { ...defaultProps$11, ...props };
|
|
7221
7221
|
const [month, setMonth] = useState(() => {
|
|
7222
7222
|
let date4 = new Date(Date.now());
|
|
7223
7223
|
const val = value || defaultValue;
|
|
@@ -7521,7 +7521,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
7521
7521
|
});
|
|
7522
7522
|
CalendarCard.displayName = "NutCalendarCard";
|
|
7523
7523
|
const CheckboxGroupContext = createContext(null);
|
|
7524
|
-
const defaultProps
|
|
7524
|
+
const defaultProps$10 = {
|
|
7525
7525
|
max: void 0,
|
|
7526
7526
|
min: void 0,
|
|
7527
7527
|
list: false,
|
|
@@ -7551,7 +7551,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
7551
7551
|
onChange,
|
|
7552
7552
|
onLimit,
|
|
7553
7553
|
...rest
|
|
7554
|
-
} = { ...defaultProps
|
|
7554
|
+
} = { ...defaultProps$10, ...props };
|
|
7555
7555
|
useImperativeHandle(ref, () => ({
|
|
7556
7556
|
toggle(state) {
|
|
7557
7557
|
if (state === false) {
|
|
@@ -7644,7 +7644,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
7644
7644
|
}
|
|
7645
7645
|
);
|
|
7646
7646
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
7647
|
-
const defaultProps
|
|
7647
|
+
const defaultProps$$ = {
|
|
7648
7648
|
...ComponentDefaults,
|
|
7649
7649
|
disabled: false,
|
|
7650
7650
|
shape: "round",
|
|
@@ -7658,7 +7658,7 @@ const defaultProps$_ = {
|
|
|
7658
7658
|
const classPrefix$i = "nut-checkbox";
|
|
7659
7659
|
const Checkbox = (props) => {
|
|
7660
7660
|
const { children } = {
|
|
7661
|
-
...defaultProps
|
|
7661
|
+
...defaultProps$$,
|
|
7662
7662
|
...props
|
|
7663
7663
|
};
|
|
7664
7664
|
const {
|
|
@@ -8039,7 +8039,7 @@ function useRefs() {
|
|
|
8039
8039
|
}, []);
|
|
8040
8040
|
return [refs.current, setRefs, reset];
|
|
8041
8041
|
}
|
|
8042
|
-
const defaultProps$
|
|
8042
|
+
const defaultProps$_ = {
|
|
8043
8043
|
...ComponentDefaults,
|
|
8044
8044
|
visible: false,
|
|
8045
8045
|
title: "",
|
|
@@ -8070,7 +8070,7 @@ const InternalPicker = (props, ref) => {
|
|
|
8070
8070
|
afterClose,
|
|
8071
8071
|
onChange,
|
|
8072
8072
|
...rest
|
|
8073
|
-
} = { ...defaultProps$
|
|
8073
|
+
} = { ...defaultProps$_, ...props };
|
|
8074
8074
|
const classPrefix2 = "nut-picker";
|
|
8075
8075
|
const classes = classNames(classPrefix2, className);
|
|
8076
8076
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -8382,7 +8382,7 @@ const padZero = (num, targetLength = 2) => {
|
|
|
8382
8382
|
return str;
|
|
8383
8383
|
};
|
|
8384
8384
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8385
|
-
const defaultProps$
|
|
8385
|
+
const defaultProps$Z = {
|
|
8386
8386
|
...ComponentDefaults,
|
|
8387
8387
|
visible: false,
|
|
8388
8388
|
title: "",
|
|
@@ -8415,7 +8415,7 @@ const DatePicker = (props) => {
|
|
|
8415
8415
|
style,
|
|
8416
8416
|
...rest
|
|
8417
8417
|
} = {
|
|
8418
|
-
...defaultProps$
|
|
8418
|
+
...defaultProps$Z,
|
|
8419
8419
|
...props
|
|
8420
8420
|
};
|
|
8421
8421
|
const { locale } = useConfig$1();
|
|
@@ -9940,7 +9940,7 @@ const useForm = (form) => {
|
|
|
9940
9940
|
}
|
|
9941
9941
|
return [formRef.current];
|
|
9942
9942
|
};
|
|
9943
|
-
const defaultProps$
|
|
9943
|
+
const defaultProps$Y = {
|
|
9944
9944
|
...ComponentDefaults,
|
|
9945
9945
|
labelPosition: "right",
|
|
9946
9946
|
starPosition: "left",
|
|
@@ -9971,7 +9971,7 @@ const Form = React__default.forwardRef(
|
|
|
9971
9971
|
starPosition,
|
|
9972
9972
|
form
|
|
9973
9973
|
} = {
|
|
9974
|
-
...defaultProps$
|
|
9974
|
+
...defaultProps$Y,
|
|
9975
9975
|
...props
|
|
9976
9976
|
};
|
|
9977
9977
|
let formInstance;
|
|
@@ -10027,7 +10027,7 @@ function isForwardRefComponent(component) {
|
|
|
10027
10027
|
}
|
|
10028
10028
|
).$$typeof === component.type.$$typeof;
|
|
10029
10029
|
}
|
|
10030
|
-
const defaultProps$
|
|
10030
|
+
const defaultProps$X = {
|
|
10031
10031
|
...ComponentDefaults,
|
|
10032
10032
|
required: false,
|
|
10033
10033
|
name: "",
|
|
@@ -10121,9 +10121,10 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10121
10121
|
rules: rules2,
|
|
10122
10122
|
className,
|
|
10123
10123
|
style,
|
|
10124
|
+
align,
|
|
10124
10125
|
errorMessageAlign
|
|
10125
10126
|
} = {
|
|
10126
|
-
...defaultProps$
|
|
10127
|
+
...defaultProps$X,
|
|
10127
10128
|
...this.props
|
|
10128
10129
|
};
|
|
10129
10130
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -10136,6 +10137,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10136
10137
|
{
|
|
10137
10138
|
className: `nut-form-item ${className}`,
|
|
10138
10139
|
style,
|
|
10140
|
+
align,
|
|
10139
10141
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
10140
10142
|
},
|
|
10141
10143
|
label ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -10192,7 +10194,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10192
10194
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
10193
10195
|
}
|
|
10194
10196
|
};
|
|
10195
|
-
_FormItem.defaultProps = defaultProps$
|
|
10197
|
+
_FormItem.defaultProps = defaultProps$X;
|
|
10196
10198
|
_FormItem.contextType = Context;
|
|
10197
10199
|
let FormItem = _FormItem;
|
|
10198
10200
|
const InnerForm = Form;
|
|
@@ -10222,7 +10224,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
10222
10224
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
10223
10225
|
return value.replace(regExp, "");
|
|
10224
10226
|
}
|
|
10225
|
-
const defaultProps$
|
|
10227
|
+
const defaultProps$W = {
|
|
10226
10228
|
...ComponentDefaults,
|
|
10227
10229
|
type: "text",
|
|
10228
10230
|
name: "",
|
|
@@ -10267,7 +10269,7 @@ const Input = forwardRef(
|
|
|
10267
10269
|
value: _value,
|
|
10268
10270
|
...rest
|
|
10269
10271
|
} = {
|
|
10270
|
-
...defaultProps$
|
|
10272
|
+
...defaultProps$W,
|
|
10271
10273
|
...props
|
|
10272
10274
|
};
|
|
10273
10275
|
const [value, setValue] = usePropsValue({
|
|
@@ -10418,7 +10420,7 @@ const Input = forwardRef(
|
|
|
10418
10420
|
}
|
|
10419
10421
|
);
|
|
10420
10422
|
Input.displayName = "NutInput";
|
|
10421
|
-
const defaultProps$
|
|
10423
|
+
const defaultProps$V = {
|
|
10422
10424
|
...ComponentDefaults,
|
|
10423
10425
|
disabled: false,
|
|
10424
10426
|
readOnly: false,
|
|
@@ -10456,7 +10458,7 @@ const InputNumber = (props) => {
|
|
|
10456
10458
|
onChange,
|
|
10457
10459
|
...restProps
|
|
10458
10460
|
} = {
|
|
10459
|
-
...defaultProps$
|
|
10461
|
+
...defaultProps$V,
|
|
10460
10462
|
...props
|
|
10461
10463
|
};
|
|
10462
10464
|
const classes = classNames(classPrefix$h, className, {
|
|
@@ -10547,6 +10549,17 @@ const InputNumber = (props) => {
|
|
|
10547
10549
|
if (text === "-") return null;
|
|
10548
10550
|
return text;
|
|
10549
10551
|
};
|
|
10552
|
+
const clampValue = (valueStr) => {
|
|
10553
|
+
if (valueStr === null) return defaultValue;
|
|
10554
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
10555
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
10556
|
+
};
|
|
10557
|
+
const handleValueChange = (valueStr, e2) => {
|
|
10558
|
+
const val = clampValue(valueStr);
|
|
10559
|
+
if (val !== Number(shadowValue)) {
|
|
10560
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
10561
|
+
}
|
|
10562
|
+
};
|
|
10550
10563
|
const handleInputChange = (e2) => {
|
|
10551
10564
|
setInputValue(e2.target.value);
|
|
10552
10565
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -10557,26 +10570,31 @@ const InputNumber = (props) => {
|
|
|
10557
10570
|
setShadowValue(defaultValue);
|
|
10558
10571
|
}
|
|
10559
10572
|
} else {
|
|
10560
|
-
setShadowValue(valueStr);
|
|
10561
|
-
}
|
|
10562
|
-
if (!async) {
|
|
10563
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10573
|
+
setShadowValue(clampValue(valueStr));
|
|
10564
10574
|
}
|
|
10575
|
+
!async && handleValueChange(valueStr, e2);
|
|
10565
10576
|
};
|
|
10566
10577
|
const handleFocus = (e2) => {
|
|
10567
10578
|
setFocused(true);
|
|
10568
10579
|
setInputValue(
|
|
10569
10580
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
10570
10581
|
);
|
|
10571
|
-
onFocus
|
|
10582
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
10572
10583
|
};
|
|
10573
10584
|
const handleBlur = (e2) => {
|
|
10574
10585
|
setFocused(false);
|
|
10575
|
-
onBlur
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10586
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
10587
|
+
const valueStr = parseValue(e2.target.value);
|
|
10588
|
+
if (valueStr === null) {
|
|
10589
|
+
if (allowEmpty) {
|
|
10590
|
+
setShadowValue(null);
|
|
10591
|
+
} else {
|
|
10592
|
+
setShadowValue(defaultValue);
|
|
10593
|
+
}
|
|
10594
|
+
} else {
|
|
10595
|
+
setShadowValue(clampValue(valueStr));
|
|
10579
10596
|
}
|
|
10597
|
+
async && handleValueChange(valueStr, e2);
|
|
10580
10598
|
};
|
|
10581
10599
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React__default.createElement(
|
|
10582
10600
|
a$1,
|
|
@@ -10609,8 +10627,9 @@ const InputNumber = (props) => {
|
|
|
10609
10627
|
)));
|
|
10610
10628
|
};
|
|
10611
10629
|
InputNumber.displayName = "NutInputNumber";
|
|
10612
|
-
const defaultProps$
|
|
10630
|
+
const defaultProps$U = {
|
|
10613
10631
|
...ComponentDefaults,
|
|
10632
|
+
titleIcon: null,
|
|
10614
10633
|
columns: 1,
|
|
10615
10634
|
direction: "down",
|
|
10616
10635
|
icon: null,
|
|
@@ -10640,7 +10659,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10640
10659
|
parent,
|
|
10641
10660
|
index
|
|
10642
10661
|
} = {
|
|
10643
|
-
...defaultProps$
|
|
10662
|
+
...defaultProps$U,
|
|
10644
10663
|
...props
|
|
10645
10664
|
};
|
|
10646
10665
|
const [showPopup, setShowPopup] = useState(show2);
|
|
@@ -10821,7 +10840,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10821
10840
|
));
|
|
10822
10841
|
});
|
|
10823
10842
|
MenuItem.displayName = "NutMenuItem";
|
|
10824
|
-
const defaultProps$
|
|
10843
|
+
const defaultProps$T = {
|
|
10825
10844
|
...ComponentDefaults,
|
|
10826
10845
|
activeColor: "",
|
|
10827
10846
|
closeOnOverlayClick: true,
|
|
@@ -10848,7 +10867,7 @@ const Menu = (props) => {
|
|
|
10848
10867
|
onOpen,
|
|
10849
10868
|
...rest
|
|
10850
10869
|
} = {
|
|
10851
|
-
...defaultProps$
|
|
10870
|
+
...defaultProps$T,
|
|
10852
10871
|
...props
|
|
10853
10872
|
};
|
|
10854
10873
|
const menuRef = useRef(null);
|
|
@@ -10913,7 +10932,15 @@ const Menu = (props) => {
|
|
|
10913
10932
|
const menuTitle = () => {
|
|
10914
10933
|
return React__default.Children.map(children, (child, index) => {
|
|
10915
10934
|
if (React__default.isValidElement(child)) {
|
|
10916
|
-
const {
|
|
10935
|
+
const {
|
|
10936
|
+
title,
|
|
10937
|
+
titleIcon,
|
|
10938
|
+
options,
|
|
10939
|
+
value,
|
|
10940
|
+
defaultValue,
|
|
10941
|
+
disabled,
|
|
10942
|
+
direction
|
|
10943
|
+
} = child.props;
|
|
10917
10944
|
const selected = options == null ? void 0 : options.filter(
|
|
10918
10945
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
10919
10946
|
);
|
|
@@ -10924,6 +10951,25 @@ const Menu = (props) => {
|
|
|
10924
10951
|
return selected[0].text;
|
|
10925
10952
|
return "";
|
|
10926
10953
|
};
|
|
10954
|
+
const finallyIcon = () => {
|
|
10955
|
+
if (titleIcon) return titleIcon;
|
|
10956
|
+
if (icon) return icon;
|
|
10957
|
+
return direction === "up" ? /* @__PURE__ */ React__default.createElement(
|
|
10958
|
+
a$2,
|
|
10959
|
+
{
|
|
10960
|
+
className: "nut-menu-title-icon",
|
|
10961
|
+
width: "12px",
|
|
10962
|
+
height: "12px"
|
|
10963
|
+
}
|
|
10964
|
+
) : /* @__PURE__ */ React__default.createElement(
|
|
10965
|
+
g$6,
|
|
10966
|
+
{
|
|
10967
|
+
className: "nut-menu-title-icon",
|
|
10968
|
+
width: "12px",
|
|
10969
|
+
height: "12px"
|
|
10970
|
+
}
|
|
10971
|
+
);
|
|
10972
|
+
};
|
|
10927
10973
|
return /* @__PURE__ */ React__default.createElement(
|
|
10928
10974
|
"div",
|
|
10929
10975
|
{
|
|
@@ -10939,7 +10985,7 @@ const Menu = (props) => {
|
|
|
10939
10985
|
}
|
|
10940
10986
|
},
|
|
10941
10987
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
10942
|
-
|
|
10988
|
+
finallyIcon()
|
|
10943
10989
|
);
|
|
10944
10990
|
}
|
|
10945
10991
|
return null;
|
|
@@ -10968,6 +11014,16 @@ const Menu = (props) => {
|
|
|
10968
11014
|
};
|
|
10969
11015
|
Menu.displayName = "NutMenu";
|
|
10970
11016
|
Menu.Item = MenuItem;
|
|
11017
|
+
const defaultProps$S = {
|
|
11018
|
+
...ComponentDefaults,
|
|
11019
|
+
visible: false,
|
|
11020
|
+
rightActions: "",
|
|
11021
|
+
type: "default",
|
|
11022
|
+
custom: [],
|
|
11023
|
+
random: false,
|
|
11024
|
+
onClose: () => {
|
|
11025
|
+
}
|
|
11026
|
+
};
|
|
10971
11027
|
const NumberKeyboard = (props) => {
|
|
10972
11028
|
const { locale } = useConfig$1();
|
|
10973
11029
|
const {
|
|
@@ -10985,7 +11041,7 @@ const NumberKeyboard = (props) => {
|
|
|
10985
11041
|
onClose,
|
|
10986
11042
|
onConfirm,
|
|
10987
11043
|
...rest
|
|
10988
|
-
} = props;
|
|
11044
|
+
} = { ...defaultProps$S, ...props };
|
|
10989
11045
|
const classPrefix2 = "nut-numberkeyboard";
|
|
10990
11046
|
const getBasicKeys = () => {
|
|
10991
11047
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -11031,17 +11087,35 @@ const NumberKeyboard = (props) => {
|
|
|
11031
11087
|
};
|
|
11032
11088
|
const onTouchEnd = (item2) => {
|
|
11033
11089
|
setActive(false);
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11090
|
+
switch (item2.type) {
|
|
11091
|
+
case "num":
|
|
11092
|
+
case "custom":
|
|
11093
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
11094
|
+
break;
|
|
11095
|
+
case "close":
|
|
11096
|
+
onClose == null ? void 0 : onClose();
|
|
11097
|
+
break;
|
|
11098
|
+
case "delete":
|
|
11099
|
+
onDelete == null ? void 0 : onDelete();
|
|
11100
|
+
break;
|
|
11101
|
+
case "confirm":
|
|
11102
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
11103
|
+
break;
|
|
11042
11104
|
}
|
|
11043
|
-
|
|
11044
|
-
|
|
11105
|
+
};
|
|
11106
|
+
const renderContent = (item2) => {
|
|
11107
|
+
switch (item2.type) {
|
|
11108
|
+
case "num":
|
|
11109
|
+
case "custom":
|
|
11110
|
+
return /* @__PURE__ */ React__default.createElement("div", null, item2.id);
|
|
11111
|
+
case "delete":
|
|
11112
|
+
return /* @__PURE__ */ React__default.createElement(DeleteIcon, null);
|
|
11113
|
+
case "close":
|
|
11114
|
+
return /* @__PURE__ */ React__default.createElement(g$6, { size: 18 });
|
|
11115
|
+
case "confirm":
|
|
11116
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done);
|
|
11117
|
+
default:
|
|
11118
|
+
return null;
|
|
11045
11119
|
}
|
|
11046
11120
|
};
|
|
11047
11121
|
return /* @__PURE__ */ React__default.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React__default.createElement(
|
|
@@ -11058,22 +11132,19 @@ const NumberKeyboard = (props) => {
|
|
|
11058
11132
|
onTouchEnd: () => onTouchEnd(item),
|
|
11059
11133
|
onTouchCancel: () => onTouchEnd(item)
|
|
11060
11134
|
},
|
|
11061
|
-
(item
|
|
11062
|
-
item.type === "delete" && /* @__PURE__ */ React__default.createElement(DeleteIcon, null),
|
|
11063
|
-
item.type === "close" && /* @__PURE__ */ React__default.createElement(g$6, { size: 18 }),
|
|
11064
|
-
item.type === "confirm" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done)
|
|
11135
|
+
renderContent(item)
|
|
11065
11136
|
));
|
|
11066
11137
|
};
|
|
11067
11138
|
return /* @__PURE__ */ React__default.createElement(
|
|
11068
11139
|
Popup,
|
|
11069
11140
|
{
|
|
11141
|
+
...rest,
|
|
11070
11142
|
visible,
|
|
11071
11143
|
position: "bottom",
|
|
11072
11144
|
onOverlayClick: onClose,
|
|
11073
11145
|
onCloseIconClick: onClose,
|
|
11074
11146
|
zIndex: 9999,
|
|
11075
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11076
|
-
...rest
|
|
11147
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11077
11148
|
},
|
|
11078
11149
|
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header-title` }, title), type4 === "default" && /* @__PURE__ */ React__default.createElement(
|
|
11079
11150
|
"span",
|
|
@@ -12460,10 +12531,12 @@ class UploaderTaro extends Upload {
|
|
|
12460
12531
|
uploadTaro(uploadFile2, env) {
|
|
12461
12532
|
var _a;
|
|
12462
12533
|
const options = this.options;
|
|
12534
|
+
if (options.beforeXhrUpload) {
|
|
12535
|
+
options.beforeXhrUpload(uploadFile2, options);
|
|
12536
|
+
return;
|
|
12537
|
+
}
|
|
12463
12538
|
if (env === "WEB") {
|
|
12464
12539
|
this.upload();
|
|
12465
|
-
} else if (options.beforeXhrUpload) {
|
|
12466
|
-
options.beforeXhrUpload(uploadFile2, options);
|
|
12467
12540
|
} else {
|
|
12468
12541
|
const uploadTask = uploadFile2({
|
|
12469
12542
|
url: options.url,
|