@nutui/nutui-react 2.6.15 → 2.6.17
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 +45 -14
- package/README.md +2 -2
- package/dist/esm/Cell/style/style.css +1 -1
- package/dist/esm/Cell.js +3 -3
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +22 -13
- package/dist/esm/InputNumber.js +26 -9
- package/dist/esm/Menu.js +9 -2
- package/dist/esm/NumberKeyboard.js +38 -27
- package/dist/esm/Uploader.js +5 -3
- package/dist/esm/formitem2.js +5 -5
- package/dist/esm/menuitem2.js +1 -1
- 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 +212 -150
- package/dist/nutui.react.umd.js +212 -150
- package/dist/packages/cell/cell.scss +20 -0
- package/dist/style.css +1 -1
- package/dist/types/packages/avatargroup/context.d.ts +0 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +7 -2
- package/dist/types/packages/cell/cell.taro.d.ts +2 -1
- package/dist/types/packages/cellgroup/context.d.ts +0 -1
- package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
- package/dist/types/packages/collapse/context.d.ts +0 -1
- package/dist/types/packages/form/context.d.ts +0 -1
- package/dist/types/packages/formitem/formitem.d.ts +5 -0
- package/dist/types/packages/formitem/formitem.taro.d.ts +1 -0
- package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
- 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 +5 -0
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +1 -0
- package/dist/types/packages/popover/types.d.ts +0 -1
- package/dist/types/packages/radiogroup/context.d.ts +1 -1
- package/dist/types/packages/row/UserContext.d.ts +0 -1
- package/dist/types/packages/sidenavbar/context.d.ts +0 -1
- package/dist/types/packages/steps/context.d.ts +0 -1
- package/dist/types/packages/swiper/context.d.ts +0 -1
- package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
- package/dist/types/packages/uploader/uploader.d.ts +1 -1
- package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
- package/dist/types/packages/virtuallist/utils.d.ts +2 -2
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -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("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.nutui = {}, global2.React, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react v2.6.
|
|
5
|
+
* @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:24 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
style: {}
|
|
549
549
|
};
|
|
550
550
|
const prefixCls$2 = "nut-button";
|
|
551
|
-
const defaultProps$
|
|
551
|
+
const defaultProps$1u = {
|
|
552
552
|
...ComponentDefaults,
|
|
553
553
|
color: "",
|
|
554
554
|
type: "default",
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
onClick,
|
|
585
585
|
...rest
|
|
586
586
|
} = {
|
|
587
|
-
...defaultProps$
|
|
587
|
+
...defaultProps$1u,
|
|
588
588
|
...props
|
|
589
589
|
};
|
|
590
590
|
const getStyle = React.useCallback(() => {
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
);
|
|
644
644
|
Button.displayName = "NutButton";
|
|
645
645
|
const CellGroupContext = React.createContext(null);
|
|
646
|
-
const defaultProps$
|
|
646
|
+
const defaultProps$1t = {
|
|
647
647
|
...ComponentDefaults,
|
|
648
648
|
title: "",
|
|
649
649
|
description: "",
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
const classPrefix$r = "nut-cell-group";
|
|
653
653
|
const CellGroup = (props) => {
|
|
654
654
|
const { children, className, title, description, divider, ...rest } = {
|
|
655
|
-
...defaultProps$
|
|
655
|
+
...defaultProps$1t,
|
|
656
656
|
...props
|
|
657
657
|
};
|
|
658
658
|
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(
|
|
@@ -664,13 +664,14 @@
|
|
|
664
664
|
));
|
|
665
665
|
};
|
|
666
666
|
CellGroup.displayName = "NutCellGroup";
|
|
667
|
-
const defaultProps$
|
|
667
|
+
const defaultProps$1s = {
|
|
668
668
|
...ComponentDefaults,
|
|
669
669
|
title: null,
|
|
670
670
|
description: null,
|
|
671
671
|
extra: null,
|
|
672
672
|
radius: "6px",
|
|
673
673
|
align: "flex-start",
|
|
674
|
+
clickable: false,
|
|
674
675
|
onClick: (event) => {
|
|
675
676
|
}
|
|
676
677
|
};
|
|
@@ -679,6 +680,7 @@
|
|
|
679
680
|
const ctx2 = React.useContext(CellGroupContext);
|
|
680
681
|
const {
|
|
681
682
|
children,
|
|
683
|
+
clickable,
|
|
682
684
|
onClick,
|
|
683
685
|
title,
|
|
684
686
|
description,
|
|
@@ -689,7 +691,7 @@
|
|
|
689
691
|
style,
|
|
690
692
|
...rest
|
|
691
693
|
} = {
|
|
692
|
-
...defaultProps$
|
|
694
|
+
...defaultProps$1s,
|
|
693
695
|
...props
|
|
694
696
|
};
|
|
695
697
|
const handleClick2 = (event) => {
|
|
@@ -706,7 +708,7 @@
|
|
|
706
708
|
return /* @__PURE__ */ React.createElement(
|
|
707
709
|
"div",
|
|
708
710
|
{
|
|
709
|
-
className: classNames(classPrefix$q, className)
|
|
711
|
+
className: `${classNames(classPrefix$q, className, clickable ? `${classPrefix$q}-clickable` : "")}`,
|
|
710
712
|
onClick: (event) => handleClick2(event),
|
|
711
713
|
style: baseStyle,
|
|
712
714
|
...rest
|
|
@@ -1880,7 +1882,7 @@
|
|
|
1880
1882
|
const pxCheck = (value) => {
|
|
1881
1883
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1882
1884
|
};
|
|
1883
|
-
const defaultProps$
|
|
1885
|
+
const defaultProps$1r = {
|
|
1884
1886
|
...ComponentDefaults,
|
|
1885
1887
|
fit: "fill",
|
|
1886
1888
|
position: "center",
|
|
@@ -1910,7 +1912,7 @@
|
|
|
1910
1912
|
onClick,
|
|
1911
1913
|
onLoad,
|
|
1912
1914
|
onError
|
|
1913
|
-
} = { ...defaultProps$
|
|
1915
|
+
} = { ...defaultProps$1r, ...props };
|
|
1914
1916
|
const [innerLoading, setInnerLoading] = React.useState(false);
|
|
1915
1917
|
const [isError, setIsError] = React.useState(false);
|
|
1916
1918
|
const [complete, setComplete] = React.useState(false);
|
|
@@ -2066,7 +2068,7 @@
|
|
|
2066
2068
|
if (null == r) return {};
|
|
2067
2069
|
var t2 = {};
|
|
2068
2070
|
for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
|
|
2069
|
-
if (e2.
|
|
2071
|
+
if (e2.includes(n2)) continue;
|
|
2070
2072
|
t2[n2] = r[n2];
|
|
2071
2073
|
}
|
|
2072
2074
|
return t2;
|
|
@@ -2772,7 +2774,7 @@
|
|
|
2772
2774
|
};
|
|
2773
2775
|
Overlay.displayName = "NutOverlay";
|
|
2774
2776
|
const DataContext$1 = React.createContext({});
|
|
2775
|
-
const defaultProps$
|
|
2777
|
+
const defaultProps$1q = {
|
|
2776
2778
|
...ComponentDefaults,
|
|
2777
2779
|
span: "24",
|
|
2778
2780
|
offset: "0",
|
|
@@ -2780,7 +2782,7 @@
|
|
|
2780
2782
|
};
|
|
2781
2783
|
const Col = (props) => {
|
|
2782
2784
|
const { className, style, span, offset, children, onClick } = {
|
|
2783
|
-
...defaultProps$
|
|
2785
|
+
...defaultProps$1q,
|
|
2784
2786
|
...props
|
|
2785
2787
|
};
|
|
2786
2788
|
const [colName, setColName] = React.useState("");
|
|
@@ -2813,7 +2815,7 @@
|
|
|
2813
2815
|
);
|
|
2814
2816
|
};
|
|
2815
2817
|
Col.displayName = "NutCol";
|
|
2816
|
-
const defaultProps$
|
|
2818
|
+
const defaultProps$1p = {
|
|
2817
2819
|
...ComponentDefaults,
|
|
2818
2820
|
contentPosition: "center",
|
|
2819
2821
|
direction: "horizontal"
|
|
@@ -2821,7 +2823,7 @@
|
|
|
2821
2823
|
const classPrefix$n = `nut-divider`;
|
|
2822
2824
|
const Divider = (props) => {
|
|
2823
2825
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2824
|
-
...defaultProps$
|
|
2826
|
+
...defaultProps$1p,
|
|
2825
2827
|
...props
|
|
2826
2828
|
};
|
|
2827
2829
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -2842,7 +2844,7 @@
|
|
|
2842
2844
|
}
|
|
2843
2845
|
};
|
|
2844
2846
|
const GridContext = React.createContext(gridContext);
|
|
2845
|
-
const defaultProps$
|
|
2847
|
+
const defaultProps$1o = {
|
|
2846
2848
|
text: "",
|
|
2847
2849
|
columns: 4,
|
|
2848
2850
|
gap: 0,
|
|
@@ -2868,7 +2870,7 @@
|
|
|
2868
2870
|
onClick,
|
|
2869
2871
|
...rest
|
|
2870
2872
|
} = {
|
|
2871
|
-
...defaultProps$
|
|
2873
|
+
...defaultProps$1o,
|
|
2872
2874
|
...props
|
|
2873
2875
|
};
|
|
2874
2876
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -2927,7 +2929,7 @@
|
|
|
2927
2929
|
);
|
|
2928
2930
|
};
|
|
2929
2931
|
GridItem.displayName = "NutGridItem";
|
|
2930
|
-
const defaultProps$
|
|
2932
|
+
const defaultProps$1n = {
|
|
2931
2933
|
columns: 4,
|
|
2932
2934
|
gap: 0,
|
|
2933
2935
|
center: true,
|
|
@@ -2948,7 +2950,7 @@
|
|
|
2948
2950
|
className,
|
|
2949
2951
|
onClick,
|
|
2950
2952
|
...rest
|
|
2951
|
-
} = { ...defaultProps$
|
|
2953
|
+
} = { ...defaultProps$1n, ...props };
|
|
2952
2954
|
const childrenDom = React.Children.toArray(children);
|
|
2953
2955
|
const classPrefix2 = "nut-grid";
|
|
2954
2956
|
const rootClass = () => {
|
|
@@ -2984,14 +2986,14 @@
|
|
|
2984
2986
|
};
|
|
2985
2987
|
Grid.displayName = "NutGrid";
|
|
2986
2988
|
Grid.Item = GridItem;
|
|
2987
|
-
const defaultProps$
|
|
2989
|
+
const defaultProps$1m = {};
|
|
2988
2990
|
const Layout = (props) => {
|
|
2989
|
-
({ ...defaultProps$
|
|
2991
|
+
({ ...defaultProps$1m, ...props });
|
|
2990
2992
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
2991
2993
|
};
|
|
2992
2994
|
Layout.displayName = "NutLayout";
|
|
2993
2995
|
const classPrefix$m = "nut-row";
|
|
2994
|
-
const defaultProps$
|
|
2996
|
+
const defaultProps$1l = {
|
|
2995
2997
|
...ComponentDefaults,
|
|
2996
2998
|
type: "",
|
|
2997
2999
|
justify: "start",
|
|
@@ -3011,7 +3013,7 @@
|
|
|
3011
3013
|
gutter,
|
|
3012
3014
|
onClick
|
|
3013
3015
|
} = {
|
|
3014
|
-
...defaultProps$
|
|
3016
|
+
...defaultProps$1l,
|
|
3015
3017
|
...props
|
|
3016
3018
|
};
|
|
3017
3019
|
const getClass = (prefix2, type22) => {
|
|
@@ -3045,12 +3047,12 @@
|
|
|
3045
3047
|
};
|
|
3046
3048
|
Row.displayName = "NutRow";
|
|
3047
3049
|
const prefixCls$1 = "nut-space";
|
|
3048
|
-
const defaultProps$
|
|
3050
|
+
const defaultProps$1k = {
|
|
3049
3051
|
direction: "horizontal"
|
|
3050
3052
|
};
|
|
3051
3053
|
const Space = (props) => {
|
|
3052
3054
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3053
|
-
...defaultProps$
|
|
3055
|
+
...defaultProps$1k,
|
|
3054
3056
|
...props
|
|
3055
3057
|
};
|
|
3056
3058
|
const cls = classNames(
|
|
@@ -3118,7 +3120,7 @@
|
|
|
3118
3120
|
stop2.current = true;
|
|
3119
3121
|
};
|
|
3120
3122
|
}
|
|
3121
|
-
const defaultProps$
|
|
3123
|
+
const defaultProps$1j = {
|
|
3122
3124
|
...ComponentDefaults,
|
|
3123
3125
|
position: "top",
|
|
3124
3126
|
threshold: 0,
|
|
@@ -3136,7 +3138,7 @@
|
|
|
3136
3138
|
threshold,
|
|
3137
3139
|
onChange,
|
|
3138
3140
|
...rest
|
|
3139
|
-
} = { ...defaultProps$
|
|
3141
|
+
} = { ...defaultProps$1j, ...props };
|
|
3140
3142
|
const stickyRef = React.useRef(null);
|
|
3141
3143
|
const rootRef = React.useRef(null);
|
|
3142
3144
|
const [isFixed, setIsFixed] = React.useState(false);
|
|
@@ -3257,7 +3259,7 @@
|
|
|
3257
3259
|
);
|
|
3258
3260
|
};
|
|
3259
3261
|
SafeArea.displayName = "NutSafeArea";
|
|
3260
|
-
const defaultProps$
|
|
3262
|
+
const defaultProps$1i = {
|
|
3261
3263
|
...ComponentDefaults,
|
|
3262
3264
|
target: "",
|
|
3263
3265
|
threshold: 200,
|
|
@@ -3276,7 +3278,7 @@
|
|
|
3276
3278
|
style,
|
|
3277
3279
|
onClick
|
|
3278
3280
|
} = {
|
|
3279
|
-
...defaultProps$
|
|
3281
|
+
...defaultProps$1i,
|
|
3280
3282
|
...props
|
|
3281
3283
|
};
|
|
3282
3284
|
const classPrefix2 = "nut-backtop";
|
|
@@ -8194,7 +8196,7 @@
|
|
|
8194
8196
|
});
|
|
8195
8197
|
const animated = host.animated;
|
|
8196
8198
|
const elevatorContext = React.createContext({});
|
|
8197
|
-
const defaultProps$
|
|
8199
|
+
const defaultProps$1h = {
|
|
8198
8200
|
...ComponentDefaults,
|
|
8199
8201
|
height: "200px",
|
|
8200
8202
|
floorKey: "title",
|
|
@@ -8220,7 +8222,7 @@
|
|
|
8220
8222
|
children,
|
|
8221
8223
|
...rest
|
|
8222
8224
|
} = {
|
|
8223
|
-
...defaultProps$
|
|
8225
|
+
...defaultProps$1h,
|
|
8224
8226
|
...props
|
|
8225
8227
|
};
|
|
8226
8228
|
const classPrefix2 = "nut-elevator";
|
|
@@ -8398,7 +8400,7 @@
|
|
|
8398
8400
|
};
|
|
8399
8401
|
Elevator.displayName = "NutElevator";
|
|
8400
8402
|
Elevator.Context = elevatorContext;
|
|
8401
|
-
const defaultProps$
|
|
8403
|
+
const defaultProps$1g = {
|
|
8402
8404
|
...ComponentDefaults,
|
|
8403
8405
|
activeText: "",
|
|
8404
8406
|
inactiveText: "",
|
|
@@ -8426,7 +8428,7 @@
|
|
|
8426
8428
|
content,
|
|
8427
8429
|
...rest
|
|
8428
8430
|
} = {
|
|
8429
|
-
...defaultProps$
|
|
8431
|
+
...defaultProps$1g,
|
|
8430
8432
|
...props
|
|
8431
8433
|
};
|
|
8432
8434
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -8479,7 +8481,7 @@
|
|
|
8479
8481
|
);
|
|
8480
8482
|
};
|
|
8481
8483
|
FixedNav.displayName = "NutFixedNav";
|
|
8482
|
-
const defaultProps$
|
|
8484
|
+
const defaultProps$1f = {
|
|
8483
8485
|
...ComponentDefaults,
|
|
8484
8486
|
left: "",
|
|
8485
8487
|
right: "",
|
|
@@ -8504,7 +8506,7 @@
|
|
|
8504
8506
|
zIndex,
|
|
8505
8507
|
onBackClick
|
|
8506
8508
|
} = {
|
|
8507
|
-
...defaultProps$
|
|
8509
|
+
...defaultProps$1f,
|
|
8508
8510
|
...props
|
|
8509
8511
|
};
|
|
8510
8512
|
const classPrefix2 = "nut-navbar";
|
|
@@ -8581,7 +8583,7 @@
|
|
|
8581
8583
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
8582
8584
|
};
|
|
8583
8585
|
NavBar.displayName = "NutNavBar";
|
|
8584
|
-
const defaultProps$
|
|
8586
|
+
const defaultProps$1e = {
|
|
8585
8587
|
...ComponentDefaults,
|
|
8586
8588
|
position: "center",
|
|
8587
8589
|
transition: "",
|
|
@@ -8634,7 +8636,7 @@
|
|
|
8634
8636
|
afterShow,
|
|
8635
8637
|
afterClose,
|
|
8636
8638
|
onClick
|
|
8637
|
-
} = { ...defaultProps$
|
|
8639
|
+
} = { ...defaultProps$1e, ...props };
|
|
8638
8640
|
const nodeRef = React.useRef(null);
|
|
8639
8641
|
let innerIndex = zIndex || _zIndex;
|
|
8640
8642
|
const [index, setIndex] = React.useState(innerIndex);
|
|
@@ -8790,7 +8792,7 @@
|
|
|
8790
8792
|
}
|
|
8791
8793
|
};
|
|
8792
8794
|
const OffsetContext = React.createContext(20);
|
|
8793
|
-
const defaultProps$
|
|
8795
|
+
const defaultProps$1d = {
|
|
8794
8796
|
...ComponentDefaults,
|
|
8795
8797
|
position: "left",
|
|
8796
8798
|
width: "80%"
|
|
@@ -8808,7 +8810,7 @@
|
|
|
8808
8810
|
indent,
|
|
8809
8811
|
...rest
|
|
8810
8812
|
} = {
|
|
8811
|
-
...defaultProps$
|
|
8813
|
+
...defaultProps$1d,
|
|
8812
8814
|
...props
|
|
8813
8815
|
};
|
|
8814
8816
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -8858,13 +8860,13 @@
|
|
|
8858
8860
|
title
|
|
8859
8861
|
);
|
|
8860
8862
|
};
|
|
8861
|
-
const defaultProps$
|
|
8863
|
+
const defaultProps$1c = {
|
|
8862
8864
|
open: true
|
|
8863
8865
|
};
|
|
8864
8866
|
const SubSideNavBar = (props) => {
|
|
8865
8867
|
const classPrefix2 = "nut-subsidenavbar";
|
|
8866
8868
|
const { title, value, children, onClick, open, ...rest } = {
|
|
8867
|
-
...defaultProps$
|
|
8869
|
+
...defaultProps$1c,
|
|
8868
8870
|
...props
|
|
8869
8871
|
};
|
|
8870
8872
|
const offset = React.useContext(OffsetContext);
|
|
@@ -8941,7 +8943,7 @@
|
|
|
8941
8943
|
);
|
|
8942
8944
|
return [stateRef.current, setState];
|
|
8943
8945
|
}
|
|
8944
|
-
const defaultProps$
|
|
8946
|
+
const defaultProps$1b = {
|
|
8945
8947
|
...ComponentDefaults,
|
|
8946
8948
|
value: "",
|
|
8947
8949
|
dot: false,
|
|
@@ -8966,7 +8968,7 @@
|
|
|
8966
8968
|
color,
|
|
8967
8969
|
fill
|
|
8968
8970
|
} = {
|
|
8969
|
-
...defaultProps$
|
|
8971
|
+
...defaultProps$1b,
|
|
8970
8972
|
...props
|
|
8971
8973
|
};
|
|
8972
8974
|
const classPrefix2 = "nut-badge";
|
|
@@ -9020,7 +9022,7 @@
|
|
|
9020
9022
|
};
|
|
9021
9023
|
Badge.displayName = "NutBadge";
|
|
9022
9024
|
const TabbarContext = React.createContext(null);
|
|
9023
|
-
const defaultProps$
|
|
9025
|
+
const defaultProps$1a = {
|
|
9024
9026
|
...ComponentDefaults,
|
|
9025
9027
|
title: "",
|
|
9026
9028
|
icon: null,
|
|
@@ -9046,7 +9048,7 @@
|
|
|
9046
9048
|
index,
|
|
9047
9049
|
...rest
|
|
9048
9050
|
} = {
|
|
9049
|
-
...defaultProps$
|
|
9051
|
+
...defaultProps$1a,
|
|
9050
9052
|
...props
|
|
9051
9053
|
};
|
|
9052
9054
|
const active = index === (ctx2 == null ? void 0 : ctx2.selectIndex);
|
|
@@ -9084,7 +9086,7 @@
|
|
|
9084
9086
|
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))
|
|
9085
9087
|
);
|
|
9086
9088
|
};
|
|
9087
|
-
const defaultProps$
|
|
9089
|
+
const defaultProps$19 = {
|
|
9088
9090
|
...ComponentDefaults,
|
|
9089
9091
|
defaultValue: 0,
|
|
9090
9092
|
fixed: false,
|
|
@@ -9107,7 +9109,7 @@
|
|
|
9107
9109
|
style,
|
|
9108
9110
|
onSwitch
|
|
9109
9111
|
} = {
|
|
9110
|
-
...defaultProps$
|
|
9112
|
+
...defaultProps$19,
|
|
9111
9113
|
...props
|
|
9112
9114
|
};
|
|
9113
9115
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -9149,14 +9151,14 @@
|
|
|
9149
9151
|
};
|
|
9150
9152
|
Tabbar.displayName = "NutTabbar";
|
|
9151
9153
|
Tabbar.Item = TabbarItem;
|
|
9152
|
-
const defaultProps$
|
|
9154
|
+
const defaultProps$18 = {
|
|
9153
9155
|
title: "",
|
|
9154
9156
|
value: "",
|
|
9155
9157
|
disabled: false
|
|
9156
9158
|
};
|
|
9157
9159
|
const TabPane = (props) => {
|
|
9158
9160
|
const { children, autoHeightClassName, className, disabled } = {
|
|
9159
|
-
...defaultProps$
|
|
9161
|
+
...defaultProps$18,
|
|
9160
9162
|
...props
|
|
9161
9163
|
};
|
|
9162
9164
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -9170,7 +9172,7 @@
|
|
|
9170
9172
|
);
|
|
9171
9173
|
return children ? /* @__PURE__ */ React.createElement("div", { className: classes }, !disabled && children) : null;
|
|
9172
9174
|
};
|
|
9173
|
-
const defaultProps$
|
|
9175
|
+
const defaultProps$17 = {
|
|
9174
9176
|
...ComponentDefaults,
|
|
9175
9177
|
tabStyle: {},
|
|
9176
9178
|
activeColor: "",
|
|
@@ -9199,7 +9201,7 @@
|
|
|
9199
9201
|
defaultValue: outerDefaultValue,
|
|
9200
9202
|
...rest
|
|
9201
9203
|
} = {
|
|
9202
|
-
...defaultProps$
|
|
9204
|
+
...defaultProps$17,
|
|
9203
9205
|
...props
|
|
9204
9206
|
};
|
|
9205
9207
|
const [value, setValue] = usePropsValue({
|
|
@@ -9507,7 +9509,7 @@
|
|
|
9507
9509
|
return pathNodes;
|
|
9508
9510
|
}
|
|
9509
9511
|
}
|
|
9510
|
-
const defaultProps$
|
|
9512
|
+
const defaultProps$16 = {
|
|
9511
9513
|
...ComponentDefaults,
|
|
9512
9514
|
activeColor: "",
|
|
9513
9515
|
activeIcon: "checklist",
|
|
@@ -9552,7 +9554,7 @@
|
|
|
9552
9554
|
onClose,
|
|
9553
9555
|
onChange,
|
|
9554
9556
|
onPathChange
|
|
9555
|
-
} = { ...defaultProps$
|
|
9557
|
+
} = { ...defaultProps$16, ...props };
|
|
9556
9558
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
9557
9559
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
9558
9560
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -9859,7 +9861,7 @@
|
|
|
9859
9861
|
};
|
|
9860
9862
|
const Cascader = React.forwardRef(InternalCascader);
|
|
9861
9863
|
Cascader.displayName = "NutCascader";
|
|
9862
|
-
const defaultProps$
|
|
9864
|
+
const defaultProps$15 = {
|
|
9863
9865
|
...ComponentDefaults,
|
|
9864
9866
|
visible: false,
|
|
9865
9867
|
type: "custom",
|
|
@@ -9886,7 +9888,7 @@
|
|
|
9886
9888
|
onPathChange,
|
|
9887
9889
|
...rest
|
|
9888
9890
|
} = {
|
|
9889
|
-
...defaultProps$
|
|
9891
|
+
...defaultProps$15,
|
|
9890
9892
|
...props
|
|
9891
9893
|
};
|
|
9892
9894
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, type === "custom" && /* @__PURE__ */ React.createElement(
|
|
@@ -9911,7 +9913,7 @@
|
|
|
9911
9913
|
}
|
|
9912
9914
|
));
|
|
9913
9915
|
};
|
|
9914
|
-
const defaultProps$
|
|
9916
|
+
const defaultProps$14 = {
|
|
9915
9917
|
type: "custom",
|
|
9916
9918
|
existList: [],
|
|
9917
9919
|
defaultIcon: null,
|
|
@@ -9930,7 +9932,7 @@
|
|
|
9930
9932
|
onSelect,
|
|
9931
9933
|
onSwitch,
|
|
9932
9934
|
...rest
|
|
9933
|
-
} = { ...defaultProps$
|
|
9935
|
+
} = { ...defaultProps$14, ...props };
|
|
9934
9936
|
const classPrefix2 = "nut-address";
|
|
9935
9937
|
const selectedExist = (item) => {
|
|
9936
9938
|
existList.forEach((list, index) => {
|
|
@@ -9959,7 +9961,7 @@
|
|
|
9959
9961
|
);
|
|
9960
9962
|
})), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
|
|
9961
9963
|
};
|
|
9962
|
-
const defaultProps$
|
|
9964
|
+
const defaultProps$13 = {
|
|
9963
9965
|
...ComponentDefaults,
|
|
9964
9966
|
defaultValue: [],
|
|
9965
9967
|
type: "custom",
|
|
@@ -10001,7 +10003,7 @@
|
|
|
10001
10003
|
onSwitch,
|
|
10002
10004
|
...rest
|
|
10003
10005
|
} = {
|
|
10004
|
-
...defaultProps$
|
|
10006
|
+
...defaultProps$13,
|
|
10005
10007
|
...props
|
|
10006
10008
|
};
|
|
10007
10009
|
const classPrefix2 = "nut-address";
|
|
@@ -10339,7 +10341,7 @@
|
|
|
10339
10341
|
const isStartAndEnd = (days) => {
|
|
10340
10342
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
10341
10343
|
};
|
|
10342
|
-
const defaultProps$
|
|
10344
|
+
const defaultProps$12 = {
|
|
10343
10345
|
...ComponentDefaults,
|
|
10344
10346
|
type: "single",
|
|
10345
10347
|
autoBackfill: false,
|
|
@@ -10400,7 +10402,7 @@
|
|
|
10400
10402
|
onUpdate,
|
|
10401
10403
|
onDayClick,
|
|
10402
10404
|
onPageChange
|
|
10403
|
-
} = { ...defaultProps$
|
|
10405
|
+
} = { ...defaultProps$12, ...props };
|
|
10404
10406
|
const weekdays = locale.calendaritem.weekdays;
|
|
10405
10407
|
const weeks = [
|
|
10406
10408
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -10939,7 +10941,7 @@
|
|
|
10939
10941
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
10940
10942
|
});
|
|
10941
10943
|
CalendarItem.displayName = "NutCalendarItem";
|
|
10942
|
-
const defaultProps$
|
|
10944
|
+
const defaultProps$11 = {
|
|
10943
10945
|
...ComponentDefaults,
|
|
10944
10946
|
type: "single",
|
|
10945
10947
|
autoBackfill: false,
|
|
@@ -11002,7 +11004,7 @@
|
|
|
11002
11004
|
onConfirm,
|
|
11003
11005
|
onDayClick,
|
|
11004
11006
|
onPageChange
|
|
11005
|
-
} = { ...defaultProps$
|
|
11007
|
+
} = { ...defaultProps$11, ...props };
|
|
11006
11008
|
const calendarRef = React.useRef(null);
|
|
11007
11009
|
const close = () => {
|
|
11008
11010
|
onClose && onClose();
|
|
@@ -11182,7 +11184,7 @@
|
|
|
11182
11184
|
)
|
|
11183
11185
|
];
|
|
11184
11186
|
};
|
|
11185
|
-
const defaultProps
|
|
11187
|
+
const defaultProps$10 = {
|
|
11186
11188
|
...ComponentDefaults,
|
|
11187
11189
|
type: "single",
|
|
11188
11190
|
firstDayOfWeek: 0
|
|
@@ -11206,7 +11208,7 @@
|
|
|
11206
11208
|
onDayClick,
|
|
11207
11209
|
onPageChange,
|
|
11208
11210
|
onChange
|
|
11209
|
-
} = { ...defaultProps
|
|
11211
|
+
} = { ...defaultProps$10, ...props };
|
|
11210
11212
|
const [month, setMonth] = React.useState(() => {
|
|
11211
11213
|
let date = new Date(Date.now());
|
|
11212
11214
|
const val = value || defaultValue;
|
|
@@ -11510,7 +11512,7 @@
|
|
|
11510
11512
|
});
|
|
11511
11513
|
CalendarCard.displayName = "NutCalendarCard";
|
|
11512
11514
|
const CheckboxGroupContext = React.createContext(null);
|
|
11513
|
-
const defaultProps
|
|
11515
|
+
const defaultProps$$ = {
|
|
11514
11516
|
max: void 0,
|
|
11515
11517
|
min: void 0,
|
|
11516
11518
|
list: false,
|
|
@@ -11540,7 +11542,7 @@
|
|
|
11540
11542
|
onChange,
|
|
11541
11543
|
onLimit,
|
|
11542
11544
|
...rest
|
|
11543
|
-
} = { ...defaultProps
|
|
11545
|
+
} = { ...defaultProps$$, ...props };
|
|
11544
11546
|
React.useImperativeHandle(ref, () => ({
|
|
11545
11547
|
toggle(state) {
|
|
11546
11548
|
if (state === false) {
|
|
@@ -11633,7 +11635,7 @@
|
|
|
11633
11635
|
}
|
|
11634
11636
|
);
|
|
11635
11637
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
11636
|
-
const defaultProps$
|
|
11638
|
+
const defaultProps$_ = {
|
|
11637
11639
|
...ComponentDefaults,
|
|
11638
11640
|
disabled: false,
|
|
11639
11641
|
shape: "round",
|
|
@@ -11647,7 +11649,7 @@
|
|
|
11647
11649
|
const classPrefix$h = "nut-checkbox";
|
|
11648
11650
|
const Checkbox = (props) => {
|
|
11649
11651
|
const { children } = {
|
|
11650
|
-
...defaultProps$
|
|
11652
|
+
...defaultProps$_,
|
|
11651
11653
|
...props
|
|
11652
11654
|
};
|
|
11653
11655
|
const {
|
|
@@ -12024,7 +12026,7 @@
|
|
|
12024
12026
|
}, []);
|
|
12025
12027
|
return [refs.current, setRefs, reset];
|
|
12026
12028
|
}
|
|
12027
|
-
const defaultProps$
|
|
12029
|
+
const defaultProps$Z = {
|
|
12028
12030
|
...ComponentDefaults,
|
|
12029
12031
|
title: "",
|
|
12030
12032
|
options: [],
|
|
@@ -12054,7 +12056,7 @@
|
|
|
12054
12056
|
afterClose,
|
|
12055
12057
|
onChange,
|
|
12056
12058
|
...rest
|
|
12057
|
-
} = { ...defaultProps$
|
|
12059
|
+
} = { ...defaultProps$Z, ...props };
|
|
12058
12060
|
const classPrefix2 = "nut-picker";
|
|
12059
12061
|
const classes = classNames(classPrefix2, className);
|
|
12060
12062
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -12295,7 +12297,7 @@
|
|
|
12295
12297
|
return str;
|
|
12296
12298
|
};
|
|
12297
12299
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
12298
|
-
const defaultProps$
|
|
12300
|
+
const defaultProps$Y = {
|
|
12299
12301
|
...ComponentDefaults,
|
|
12300
12302
|
visible: false,
|
|
12301
12303
|
title: "",
|
|
@@ -12328,7 +12330,7 @@
|
|
|
12328
12330
|
style,
|
|
12329
12331
|
...rest
|
|
12330
12332
|
} = {
|
|
12331
|
-
...defaultProps$
|
|
12333
|
+
...defaultProps$Y,
|
|
12332
12334
|
...props
|
|
12333
12335
|
};
|
|
12334
12336
|
const { locale } = useConfig();
|
|
@@ -13839,7 +13841,7 @@
|
|
|
13839
13841
|
}
|
|
13840
13842
|
return [formRef.current];
|
|
13841
13843
|
};
|
|
13842
|
-
const defaultProps$
|
|
13844
|
+
const defaultProps$X = {
|
|
13843
13845
|
...ComponentDefaults,
|
|
13844
13846
|
labelPosition: "right",
|
|
13845
13847
|
starPosition: "left",
|
|
@@ -13870,7 +13872,7 @@
|
|
|
13870
13872
|
starPosition,
|
|
13871
13873
|
form
|
|
13872
13874
|
} = {
|
|
13873
|
-
...defaultProps$
|
|
13875
|
+
...defaultProps$X,
|
|
13874
13876
|
...props
|
|
13875
13877
|
};
|
|
13876
13878
|
let formInstance;
|
|
@@ -13926,7 +13928,7 @@
|
|
|
13926
13928
|
}
|
|
13927
13929
|
).$$typeof === component.type.$$typeof;
|
|
13928
13930
|
}
|
|
13929
|
-
const defaultProps$
|
|
13931
|
+
const defaultProps$W = {
|
|
13930
13932
|
...ComponentDefaults,
|
|
13931
13933
|
required: false,
|
|
13932
13934
|
name: "",
|
|
@@ -14019,9 +14021,10 @@
|
|
|
14019
14021
|
rules: rules2,
|
|
14020
14022
|
className,
|
|
14021
14023
|
style,
|
|
14022
|
-
errorMessageAlign
|
|
14024
|
+
errorMessageAlign,
|
|
14025
|
+
align
|
|
14023
14026
|
} = {
|
|
14024
|
-
...defaultProps$
|
|
14027
|
+
...defaultProps$W,
|
|
14025
14028
|
...this.props
|
|
14026
14029
|
};
|
|
14027
14030
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -14034,6 +14037,7 @@
|
|
|
14034
14037
|
{
|
|
14035
14038
|
className: `nut-form-item ${className}`,
|
|
14036
14039
|
style,
|
|
14040
|
+
align,
|
|
14037
14041
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
14038
14042
|
},
|
|
14039
14043
|
label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -14087,7 +14091,7 @@
|
|
|
14087
14091
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
14088
14092
|
}
|
|
14089
14093
|
};
|
|
14090
|
-
_FormItem.defaultProps = defaultProps$
|
|
14094
|
+
_FormItem.defaultProps = defaultProps$W;
|
|
14091
14095
|
_FormItem.contextType = Context;
|
|
14092
14096
|
let FormItem = _FormItem;
|
|
14093
14097
|
const InnerForm = Form;
|
|
@@ -14117,7 +14121,7 @@
|
|
|
14117
14121
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
14118
14122
|
return value.replace(regExp, "");
|
|
14119
14123
|
}
|
|
14120
|
-
const defaultProps$
|
|
14124
|
+
const defaultProps$V = {
|
|
14121
14125
|
...ComponentDefaults,
|
|
14122
14126
|
type: "text",
|
|
14123
14127
|
name: "",
|
|
@@ -14163,7 +14167,7 @@
|
|
|
14163
14167
|
onCompositionEnd,
|
|
14164
14168
|
...rest
|
|
14165
14169
|
} = {
|
|
14166
|
-
...defaultProps$
|
|
14170
|
+
...defaultProps$V,
|
|
14167
14171
|
...props
|
|
14168
14172
|
};
|
|
14169
14173
|
const [value, setValue] = usePropsValue({
|
|
@@ -14308,7 +14312,7 @@
|
|
|
14308
14312
|
}
|
|
14309
14313
|
);
|
|
14310
14314
|
Input.displayName = "NutInput";
|
|
14311
|
-
const defaultProps$
|
|
14315
|
+
const defaultProps$U = {
|
|
14312
14316
|
...ComponentDefaults,
|
|
14313
14317
|
disabled: false,
|
|
14314
14318
|
readOnly: false,
|
|
@@ -14344,7 +14348,7 @@
|
|
|
14344
14348
|
onChange,
|
|
14345
14349
|
...restProps
|
|
14346
14350
|
} = {
|
|
14347
|
-
...defaultProps$
|
|
14351
|
+
...defaultProps$U,
|
|
14348
14352
|
...props
|
|
14349
14353
|
};
|
|
14350
14354
|
const classes = classNames(classPrefix$g, className, {
|
|
@@ -14435,6 +14439,17 @@
|
|
|
14435
14439
|
if (text === "-") return null;
|
|
14436
14440
|
return text;
|
|
14437
14441
|
};
|
|
14442
|
+
const clampValue = (valueStr) => {
|
|
14443
|
+
if (valueStr === null) return defaultValue;
|
|
14444
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
14445
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
14446
|
+
};
|
|
14447
|
+
const handleValueChange = (valueStr, e2) => {
|
|
14448
|
+
const val = clampValue(valueStr);
|
|
14449
|
+
if (val !== Number(shadowValue)) {
|
|
14450
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
14451
|
+
}
|
|
14452
|
+
};
|
|
14438
14453
|
const handleInputChange = (e2) => {
|
|
14439
14454
|
setInputValue(e2.target.value);
|
|
14440
14455
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -14445,26 +14460,31 @@
|
|
|
14445
14460
|
setShadowValue(defaultValue);
|
|
14446
14461
|
}
|
|
14447
14462
|
} else {
|
|
14448
|
-
setShadowValue(valueStr);
|
|
14449
|
-
}
|
|
14450
|
-
if (!async) {
|
|
14451
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
14463
|
+
setShadowValue(clampValue(valueStr));
|
|
14452
14464
|
}
|
|
14465
|
+
!async && handleValueChange(valueStr, e2);
|
|
14453
14466
|
};
|
|
14454
14467
|
const handleFocus = (e2) => {
|
|
14455
14468
|
setFocused(true);
|
|
14456
14469
|
setInputValue(
|
|
14457
14470
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
14458
14471
|
);
|
|
14459
|
-
onFocus
|
|
14472
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
14460
14473
|
};
|
|
14461
14474
|
const handleBlur = (e2) => {
|
|
14462
14475
|
setFocused(false);
|
|
14463
|
-
onBlur
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14476
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
14477
|
+
const valueStr = parseValue(e2.target.value);
|
|
14478
|
+
if (valueStr === null) {
|
|
14479
|
+
if (allowEmpty) {
|
|
14480
|
+
setShadowValue(null);
|
|
14481
|
+
} else {
|
|
14482
|
+
setShadowValue(defaultValue);
|
|
14483
|
+
}
|
|
14484
|
+
} else {
|
|
14485
|
+
setShadowValue(clampValue(valueStr));
|
|
14467
14486
|
}
|
|
14487
|
+
async && handleValueChange(valueStr, e2);
|
|
14468
14488
|
};
|
|
14469
14489
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
|
|
14470
14490
|
e$6,
|
|
@@ -14544,8 +14564,9 @@
|
|
|
14544
14564
|
};
|
|
14545
14565
|
}, [target]);
|
|
14546
14566
|
}
|
|
14547
|
-
const defaultProps$
|
|
14567
|
+
const defaultProps$T = {
|
|
14548
14568
|
...ComponentDefaults,
|
|
14569
|
+
titleIcon: null,
|
|
14549
14570
|
columns: 1,
|
|
14550
14571
|
direction: "down",
|
|
14551
14572
|
icon: null,
|
|
@@ -14575,7 +14596,7 @@
|
|
|
14575
14596
|
parent,
|
|
14576
14597
|
index
|
|
14577
14598
|
} = {
|
|
14578
|
-
...defaultProps$
|
|
14599
|
+
...defaultProps$T,
|
|
14579
14600
|
...props
|
|
14580
14601
|
};
|
|
14581
14602
|
const [showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -14744,7 +14765,7 @@
|
|
|
14744
14765
|
));
|
|
14745
14766
|
});
|
|
14746
14767
|
MenuItem.displayName = "NutMenuItem";
|
|
14747
|
-
const defaultProps$
|
|
14768
|
+
const defaultProps$S = {
|
|
14748
14769
|
...ComponentDefaults,
|
|
14749
14770
|
activeColor: "",
|
|
14750
14771
|
closeOnOverlayClick: true,
|
|
@@ -14771,7 +14792,7 @@
|
|
|
14771
14792
|
onOpen,
|
|
14772
14793
|
...rest
|
|
14773
14794
|
} = {
|
|
14774
|
-
...defaultProps$
|
|
14795
|
+
...defaultProps$S,
|
|
14775
14796
|
...props
|
|
14776
14797
|
};
|
|
14777
14798
|
const menuRef = React.useRef(null);
|
|
@@ -14836,7 +14857,15 @@
|
|
|
14836
14857
|
const menuTitle = () => {
|
|
14837
14858
|
return React.Children.map(children, (child, index) => {
|
|
14838
14859
|
if (React.isValidElement(child)) {
|
|
14839
|
-
const {
|
|
14860
|
+
const {
|
|
14861
|
+
title,
|
|
14862
|
+
titleIcon,
|
|
14863
|
+
options: options2,
|
|
14864
|
+
value,
|
|
14865
|
+
defaultValue,
|
|
14866
|
+
disabled,
|
|
14867
|
+
direction
|
|
14868
|
+
} = child.props;
|
|
14840
14869
|
const selected = options2 == null ? void 0 : options2.filter(
|
|
14841
14870
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
14842
14871
|
);
|
|
@@ -14847,6 +14876,25 @@
|
|
|
14847
14876
|
return selected[0].text;
|
|
14848
14877
|
return "";
|
|
14849
14878
|
};
|
|
14879
|
+
const finallyIcon = () => {
|
|
14880
|
+
if (titleIcon) return titleIcon;
|
|
14881
|
+
if (icon) return icon;
|
|
14882
|
+
return direction === "up" ? /* @__PURE__ */ React.createElement(
|
|
14883
|
+
l$2,
|
|
14884
|
+
{
|
|
14885
|
+
className: "nut-menu-title-icon",
|
|
14886
|
+
width: "12px",
|
|
14887
|
+
height: "12px"
|
|
14888
|
+
}
|
|
14889
|
+
) : /* @__PURE__ */ React.createElement(
|
|
14890
|
+
l$3,
|
|
14891
|
+
{
|
|
14892
|
+
className: "nut-menu-title-icon",
|
|
14893
|
+
width: "12px",
|
|
14894
|
+
height: "12px"
|
|
14895
|
+
}
|
|
14896
|
+
);
|
|
14897
|
+
};
|
|
14850
14898
|
return /* @__PURE__ */ React.createElement(
|
|
14851
14899
|
"div",
|
|
14852
14900
|
{
|
|
@@ -14863,21 +14911,7 @@
|
|
|
14863
14911
|
}
|
|
14864
14912
|
},
|
|
14865
14913
|
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
14866
|
-
|
|
14867
|
-
l$2,
|
|
14868
|
-
{
|
|
14869
|
-
className: "nut-menu-title-icon",
|
|
14870
|
-
width: "12px",
|
|
14871
|
-
height: "12px"
|
|
14872
|
-
}
|
|
14873
|
-
) : /* @__PURE__ */ React.createElement(
|
|
14874
|
-
l$3,
|
|
14875
|
-
{
|
|
14876
|
-
className: "nut-menu-title-icon",
|
|
14877
|
-
width: "12px",
|
|
14878
|
-
height: "12px"
|
|
14879
|
-
}
|
|
14880
|
-
))
|
|
14914
|
+
finallyIcon()
|
|
14881
14915
|
);
|
|
14882
14916
|
}
|
|
14883
14917
|
return null;
|
|
@@ -14906,6 +14940,16 @@
|
|
|
14906
14940
|
};
|
|
14907
14941
|
Menu.displayName = "NutMenu";
|
|
14908
14942
|
Menu.Item = MenuItem;
|
|
14943
|
+
const defaultProps$R = {
|
|
14944
|
+
...ComponentDefaults,
|
|
14945
|
+
visible: false,
|
|
14946
|
+
rightActions: "",
|
|
14947
|
+
type: "default",
|
|
14948
|
+
custom: [],
|
|
14949
|
+
random: false,
|
|
14950
|
+
onClose: () => {
|
|
14951
|
+
}
|
|
14952
|
+
};
|
|
14909
14953
|
const NumberKeyboard = (props) => {
|
|
14910
14954
|
const { locale } = useConfig();
|
|
14911
14955
|
const {
|
|
@@ -14923,7 +14967,7 @@
|
|
|
14923
14967
|
onClose,
|
|
14924
14968
|
onConfirm,
|
|
14925
14969
|
...rest
|
|
14926
|
-
} = props;
|
|
14970
|
+
} = { ...defaultProps$R, ...props };
|
|
14927
14971
|
const classPrefix2 = "nut-numberkeyboard";
|
|
14928
14972
|
const getBasicKeys = () => {
|
|
14929
14973
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -14975,17 +15019,35 @@
|
|
|
14975
15019
|
};
|
|
14976
15020
|
const onTouchEnd = (item2) => {
|
|
14977
15021
|
setActive(false);
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
15022
|
+
switch (item2.type) {
|
|
15023
|
+
case "num":
|
|
15024
|
+
case "custom":
|
|
15025
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
15026
|
+
break;
|
|
15027
|
+
case "close":
|
|
15028
|
+
onClose == null ? void 0 : onClose();
|
|
15029
|
+
break;
|
|
15030
|
+
case "delete":
|
|
15031
|
+
onDelete == null ? void 0 : onDelete();
|
|
15032
|
+
break;
|
|
15033
|
+
case "confirm":
|
|
15034
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
15035
|
+
break;
|
|
14986
15036
|
}
|
|
14987
|
-
|
|
14988
|
-
|
|
15037
|
+
};
|
|
15038
|
+
const renderContent = (item2) => {
|
|
15039
|
+
switch (item2.type) {
|
|
15040
|
+
case "num":
|
|
15041
|
+
case "custom":
|
|
15042
|
+
return /* @__PURE__ */ React.createElement("div", null, item2.id);
|
|
15043
|
+
case "delete":
|
|
15044
|
+
return /* @__PURE__ */ React.createElement(DeleteIcon, null);
|
|
15045
|
+
case "close":
|
|
15046
|
+
return /* @__PURE__ */ React.createElement(l$3, { width: 18, height: 18 });
|
|
15047
|
+
case "confirm":
|
|
15048
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done);
|
|
15049
|
+
default:
|
|
15050
|
+
return null;
|
|
14989
15051
|
}
|
|
14990
15052
|
};
|
|
14991
15053
|
return /* @__PURE__ */ React.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React.createElement(
|
|
@@ -15002,22 +15064,19 @@
|
|
|
15002
15064
|
onTouchEnd: () => onTouchEnd(item),
|
|
15003
15065
|
onTouchCancel: () => onTouchEnd(item)
|
|
15004
15066
|
},
|
|
15005
|
-
(item
|
|
15006
|
-
item.type === "delete" && /* @__PURE__ */ React.createElement(DeleteIcon, null),
|
|
15007
|
-
item.type === "close" && /* @__PURE__ */ React.createElement(l$3, { width: 18, height: 18 }),
|
|
15008
|
-
item.type === "confirm" && /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done)
|
|
15067
|
+
renderContent(item)
|
|
15009
15068
|
));
|
|
15010
15069
|
};
|
|
15011
15070
|
return /* @__PURE__ */ React.createElement(
|
|
15012
15071
|
Popup,
|
|
15013
15072
|
{
|
|
15073
|
+
...rest,
|
|
15014
15074
|
visible,
|
|
15015
15075
|
position: "bottom",
|
|
15016
15076
|
onOverlayClick: onClose,
|
|
15017
15077
|
onCloseIconClick: onClose,
|
|
15018
15078
|
zIndex: 9999,
|
|
15019
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15020
|
-
...rest
|
|
15079
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15021
15080
|
},
|
|
15022
15081
|
/* @__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), type === "default" && /* @__PURE__ */ React.createElement(
|
|
15023
15082
|
"span",
|
|
@@ -16546,7 +16605,7 @@
|
|
|
16546
16605
|
}
|
|
16547
16606
|
),
|
|
16548
16607
|
previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React.createElement(React.Fragment, null, item.url && /* @__PURE__ */ React.createElement(
|
|
16549
|
-
|
|
16608
|
+
Image$1,
|
|
16550
16609
|
{
|
|
16551
16610
|
className: "nut-uploader-preview-img-c",
|
|
16552
16611
|
style: { objectFit: "fill" },
|
|
@@ -16555,7 +16614,7 @@
|
|
|
16555
16614
|
onClick: () => handleItemClick(item, index)
|
|
16556
16615
|
}
|
|
16557
16616
|
)) : /* @__PURE__ */ React.createElement(React.Fragment, null, previewUrl ? /* @__PURE__ */ React.createElement(
|
|
16558
|
-
|
|
16617
|
+
Image$1,
|
|
16559
16618
|
{
|
|
16560
16619
|
className: "nut-uploader-preview-img-c",
|
|
16561
16620
|
src: previewUrl,
|
|
@@ -16861,15 +16920,14 @@
|
|
|
16861
16920
|
});
|
|
16862
16921
|
};
|
|
16863
16922
|
const fileChange = (event) => {
|
|
16864
|
-
if (disabled)
|
|
16865
|
-
return;
|
|
16866
|
-
}
|
|
16923
|
+
if (disabled) return;
|
|
16867
16924
|
const $el = event.target;
|
|
16868
16925
|
const { files } = $el;
|
|
16869
16926
|
if (beforeUpload) {
|
|
16870
16927
|
beforeUpload(new Array().slice.call(files)).then(
|
|
16871
16928
|
(f) => {
|
|
16872
16929
|
const _files = filterFiles(new Array().slice.call(f));
|
|
16930
|
+
if (!_files.length) $el.value = "";
|
|
16873
16931
|
readFile(_files);
|
|
16874
16932
|
}
|
|
16875
16933
|
);
|
|
@@ -21162,27 +21220,31 @@
|
|
|
21162
21220
|
defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
|
|
21163
21221
|
indicator
|
|
21164
21222
|
},
|
|
21165
|
-
(videos
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21173
|
-
)
|
|
21174
|
-
|
|
21175
|
-
images && images.length > 0 ? images.map((item, index) => {
|
|
21223
|
+
(videos ?? []).map(
|
|
21224
|
+
(item) => ({ type: "video", data: item })
|
|
21225
|
+
).concat(
|
|
21226
|
+
(images ?? []).map((item) => ({ type: "image", data: item }))
|
|
21227
|
+
).sort((a2, b) => {
|
|
21228
|
+
var _a, _b;
|
|
21229
|
+
return (((_a = a2.data) == null ? void 0 : _a.index) ?? 0) - (((_b = b.data) == null ? void 0 : _b.index) ?? 0);
|
|
21230
|
+
}).map((item, index) => {
|
|
21231
|
+
if (item.type === "video") {
|
|
21232
|
+
const { source, options: options2 } = item.data;
|
|
21176
21233
|
return /* @__PURE__ */ React.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React.createElement(
|
|
21177
|
-
|
|
21234
|
+
Video,
|
|
21178
21235
|
{
|
|
21179
|
-
|
|
21180
|
-
|
|
21236
|
+
source,
|
|
21237
|
+
options: options2,
|
|
21181
21238
|
onClick: closeOnImg
|
|
21182
21239
|
}
|
|
21183
21240
|
));
|
|
21184
|
-
}
|
|
21185
|
-
|
|
21241
|
+
}
|
|
21242
|
+
if (item.type === "image") {
|
|
21243
|
+
const { src } = item.data;
|
|
21244
|
+
return /* @__PURE__ */ React.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React.createElement(Image$1, { src, draggable: false, onClick: closeOnImg }));
|
|
21245
|
+
}
|
|
21246
|
+
return null;
|
|
21247
|
+
})
|
|
21186
21248
|
) : null
|
|
21187
21249
|
),
|
|
21188
21250
|
pagination ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)) : null,
|