@nutui/nutui-react 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/InputNumber.js +26 -9
- package/dist/esm/Menu.js +9 -2
- package/dist/esm/NumberKeyboard.js +38 -27
- package/dist/esm/formitem2.js +2 -2
- 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 +184 -127
- package/dist/nutui.react.umd.js +184 -127
- package/dist/types/packages/cell/cell.d.ts +2 -2
- package/dist/types/packages/cell/cell.taro.d.ts +1 -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/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/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("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.16 Sat Aug 03 2024 09:49:59 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,7 +664,7 @@
|
|
|
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,
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
style,
|
|
690
690
|
...rest
|
|
691
691
|
} = {
|
|
692
|
-
...defaultProps$
|
|
692
|
+
...defaultProps$1s,
|
|
693
693
|
...props
|
|
694
694
|
};
|
|
695
695
|
const handleClick2 = (event) => {
|
|
@@ -1880,7 +1880,7 @@
|
|
|
1880
1880
|
const pxCheck = (value) => {
|
|
1881
1881
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1882
1882
|
};
|
|
1883
|
-
const defaultProps$
|
|
1883
|
+
const defaultProps$1r = {
|
|
1884
1884
|
...ComponentDefaults,
|
|
1885
1885
|
fit: "fill",
|
|
1886
1886
|
position: "center",
|
|
@@ -1910,7 +1910,7 @@
|
|
|
1910
1910
|
onClick,
|
|
1911
1911
|
onLoad,
|
|
1912
1912
|
onError
|
|
1913
|
-
} = { ...defaultProps$
|
|
1913
|
+
} = { ...defaultProps$1r, ...props };
|
|
1914
1914
|
const [innerLoading, setInnerLoading] = React.useState(false);
|
|
1915
1915
|
const [isError, setIsError] = React.useState(false);
|
|
1916
1916
|
const [complete, setComplete] = React.useState(false);
|
|
@@ -2772,7 +2772,7 @@
|
|
|
2772
2772
|
};
|
|
2773
2773
|
Overlay.displayName = "NutOverlay";
|
|
2774
2774
|
const DataContext$1 = React.createContext({});
|
|
2775
|
-
const defaultProps$
|
|
2775
|
+
const defaultProps$1q = {
|
|
2776
2776
|
...ComponentDefaults,
|
|
2777
2777
|
span: "24",
|
|
2778
2778
|
offset: "0",
|
|
@@ -2780,7 +2780,7 @@
|
|
|
2780
2780
|
};
|
|
2781
2781
|
const Col = (props) => {
|
|
2782
2782
|
const { className, style, span, offset, children, onClick } = {
|
|
2783
|
-
...defaultProps$
|
|
2783
|
+
...defaultProps$1q,
|
|
2784
2784
|
...props
|
|
2785
2785
|
};
|
|
2786
2786
|
const [colName, setColName] = React.useState("");
|
|
@@ -2813,7 +2813,7 @@
|
|
|
2813
2813
|
);
|
|
2814
2814
|
};
|
|
2815
2815
|
Col.displayName = "NutCol";
|
|
2816
|
-
const defaultProps$
|
|
2816
|
+
const defaultProps$1p = {
|
|
2817
2817
|
...ComponentDefaults,
|
|
2818
2818
|
contentPosition: "center",
|
|
2819
2819
|
direction: "horizontal"
|
|
@@ -2821,7 +2821,7 @@
|
|
|
2821
2821
|
const classPrefix$n = `nut-divider`;
|
|
2822
2822
|
const Divider = (props) => {
|
|
2823
2823
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2824
|
-
...defaultProps$
|
|
2824
|
+
...defaultProps$1p,
|
|
2825
2825
|
...props
|
|
2826
2826
|
};
|
|
2827
2827
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -2842,7 +2842,7 @@
|
|
|
2842
2842
|
}
|
|
2843
2843
|
};
|
|
2844
2844
|
const GridContext = React.createContext(gridContext);
|
|
2845
|
-
const defaultProps$
|
|
2845
|
+
const defaultProps$1o = {
|
|
2846
2846
|
text: "",
|
|
2847
2847
|
columns: 4,
|
|
2848
2848
|
gap: 0,
|
|
@@ -2868,7 +2868,7 @@
|
|
|
2868
2868
|
onClick,
|
|
2869
2869
|
...rest
|
|
2870
2870
|
} = {
|
|
2871
|
-
...defaultProps$
|
|
2871
|
+
...defaultProps$1o,
|
|
2872
2872
|
...props
|
|
2873
2873
|
};
|
|
2874
2874
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -2927,7 +2927,7 @@
|
|
|
2927
2927
|
);
|
|
2928
2928
|
};
|
|
2929
2929
|
GridItem.displayName = "NutGridItem";
|
|
2930
|
-
const defaultProps$
|
|
2930
|
+
const defaultProps$1n = {
|
|
2931
2931
|
columns: 4,
|
|
2932
2932
|
gap: 0,
|
|
2933
2933
|
center: true,
|
|
@@ -2948,7 +2948,7 @@
|
|
|
2948
2948
|
className,
|
|
2949
2949
|
onClick,
|
|
2950
2950
|
...rest
|
|
2951
|
-
} = { ...defaultProps$
|
|
2951
|
+
} = { ...defaultProps$1n, ...props };
|
|
2952
2952
|
const childrenDom = React.Children.toArray(children);
|
|
2953
2953
|
const classPrefix2 = "nut-grid";
|
|
2954
2954
|
const rootClass = () => {
|
|
@@ -2984,14 +2984,14 @@
|
|
|
2984
2984
|
};
|
|
2985
2985
|
Grid.displayName = "NutGrid";
|
|
2986
2986
|
Grid.Item = GridItem;
|
|
2987
|
-
const defaultProps$
|
|
2987
|
+
const defaultProps$1m = {};
|
|
2988
2988
|
const Layout = (props) => {
|
|
2989
|
-
({ ...defaultProps$
|
|
2989
|
+
({ ...defaultProps$1m, ...props });
|
|
2990
2990
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
2991
2991
|
};
|
|
2992
2992
|
Layout.displayName = "NutLayout";
|
|
2993
2993
|
const classPrefix$m = "nut-row";
|
|
2994
|
-
const defaultProps$
|
|
2994
|
+
const defaultProps$1l = {
|
|
2995
2995
|
...ComponentDefaults,
|
|
2996
2996
|
type: "",
|
|
2997
2997
|
justify: "start",
|
|
@@ -3011,7 +3011,7 @@
|
|
|
3011
3011
|
gutter,
|
|
3012
3012
|
onClick
|
|
3013
3013
|
} = {
|
|
3014
|
-
...defaultProps$
|
|
3014
|
+
...defaultProps$1l,
|
|
3015
3015
|
...props
|
|
3016
3016
|
};
|
|
3017
3017
|
const getClass = (prefix2, type22) => {
|
|
@@ -3045,12 +3045,12 @@
|
|
|
3045
3045
|
};
|
|
3046
3046
|
Row.displayName = "NutRow";
|
|
3047
3047
|
const prefixCls$1 = "nut-space";
|
|
3048
|
-
const defaultProps$
|
|
3048
|
+
const defaultProps$1k = {
|
|
3049
3049
|
direction: "horizontal"
|
|
3050
3050
|
};
|
|
3051
3051
|
const Space = (props) => {
|
|
3052
3052
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3053
|
-
...defaultProps$
|
|
3053
|
+
...defaultProps$1k,
|
|
3054
3054
|
...props
|
|
3055
3055
|
};
|
|
3056
3056
|
const cls = classNames(
|
|
@@ -3118,7 +3118,7 @@
|
|
|
3118
3118
|
stop2.current = true;
|
|
3119
3119
|
};
|
|
3120
3120
|
}
|
|
3121
|
-
const defaultProps$
|
|
3121
|
+
const defaultProps$1j = {
|
|
3122
3122
|
...ComponentDefaults,
|
|
3123
3123
|
position: "top",
|
|
3124
3124
|
threshold: 0,
|
|
@@ -3136,7 +3136,7 @@
|
|
|
3136
3136
|
threshold,
|
|
3137
3137
|
onChange,
|
|
3138
3138
|
...rest
|
|
3139
|
-
} = { ...defaultProps$
|
|
3139
|
+
} = { ...defaultProps$1j, ...props };
|
|
3140
3140
|
const stickyRef = React.useRef(null);
|
|
3141
3141
|
const rootRef = React.useRef(null);
|
|
3142
3142
|
const [isFixed, setIsFixed] = React.useState(false);
|
|
@@ -3257,7 +3257,7 @@
|
|
|
3257
3257
|
);
|
|
3258
3258
|
};
|
|
3259
3259
|
SafeArea.displayName = "NutSafeArea";
|
|
3260
|
-
const defaultProps$
|
|
3260
|
+
const defaultProps$1i = {
|
|
3261
3261
|
...ComponentDefaults,
|
|
3262
3262
|
target: "",
|
|
3263
3263
|
threshold: 200,
|
|
@@ -3276,7 +3276,7 @@
|
|
|
3276
3276
|
style,
|
|
3277
3277
|
onClick
|
|
3278
3278
|
} = {
|
|
3279
|
-
...defaultProps$
|
|
3279
|
+
...defaultProps$1i,
|
|
3280
3280
|
...props
|
|
3281
3281
|
};
|
|
3282
3282
|
const classPrefix2 = "nut-backtop";
|
|
@@ -8194,7 +8194,7 @@
|
|
|
8194
8194
|
});
|
|
8195
8195
|
const animated = host.animated;
|
|
8196
8196
|
const elevatorContext = React.createContext({});
|
|
8197
|
-
const defaultProps$
|
|
8197
|
+
const defaultProps$1h = {
|
|
8198
8198
|
...ComponentDefaults,
|
|
8199
8199
|
height: "200px",
|
|
8200
8200
|
floorKey: "title",
|
|
@@ -8220,7 +8220,7 @@
|
|
|
8220
8220
|
children,
|
|
8221
8221
|
...rest
|
|
8222
8222
|
} = {
|
|
8223
|
-
...defaultProps$
|
|
8223
|
+
...defaultProps$1h,
|
|
8224
8224
|
...props
|
|
8225
8225
|
};
|
|
8226
8226
|
const classPrefix2 = "nut-elevator";
|
|
@@ -8398,7 +8398,7 @@
|
|
|
8398
8398
|
};
|
|
8399
8399
|
Elevator.displayName = "NutElevator";
|
|
8400
8400
|
Elevator.Context = elevatorContext;
|
|
8401
|
-
const defaultProps$
|
|
8401
|
+
const defaultProps$1g = {
|
|
8402
8402
|
...ComponentDefaults,
|
|
8403
8403
|
activeText: "",
|
|
8404
8404
|
inactiveText: "",
|
|
@@ -8426,7 +8426,7 @@
|
|
|
8426
8426
|
content,
|
|
8427
8427
|
...rest
|
|
8428
8428
|
} = {
|
|
8429
|
-
...defaultProps$
|
|
8429
|
+
...defaultProps$1g,
|
|
8430
8430
|
...props
|
|
8431
8431
|
};
|
|
8432
8432
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -8479,7 +8479,7 @@
|
|
|
8479
8479
|
);
|
|
8480
8480
|
};
|
|
8481
8481
|
FixedNav.displayName = "NutFixedNav";
|
|
8482
|
-
const defaultProps$
|
|
8482
|
+
const defaultProps$1f = {
|
|
8483
8483
|
...ComponentDefaults,
|
|
8484
8484
|
left: "",
|
|
8485
8485
|
right: "",
|
|
@@ -8504,7 +8504,7 @@
|
|
|
8504
8504
|
zIndex,
|
|
8505
8505
|
onBackClick
|
|
8506
8506
|
} = {
|
|
8507
|
-
...defaultProps$
|
|
8507
|
+
...defaultProps$1f,
|
|
8508
8508
|
...props
|
|
8509
8509
|
};
|
|
8510
8510
|
const classPrefix2 = "nut-navbar";
|
|
@@ -8581,7 +8581,7 @@
|
|
|
8581
8581
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
8582
8582
|
};
|
|
8583
8583
|
NavBar.displayName = "NutNavBar";
|
|
8584
|
-
const defaultProps$
|
|
8584
|
+
const defaultProps$1e = {
|
|
8585
8585
|
...ComponentDefaults,
|
|
8586
8586
|
position: "center",
|
|
8587
8587
|
transition: "",
|
|
@@ -8634,7 +8634,7 @@
|
|
|
8634
8634
|
afterShow,
|
|
8635
8635
|
afterClose,
|
|
8636
8636
|
onClick
|
|
8637
|
-
} = { ...defaultProps$
|
|
8637
|
+
} = { ...defaultProps$1e, ...props };
|
|
8638
8638
|
const nodeRef = React.useRef(null);
|
|
8639
8639
|
let innerIndex = zIndex || _zIndex;
|
|
8640
8640
|
const [index, setIndex] = React.useState(innerIndex);
|
|
@@ -8790,7 +8790,7 @@
|
|
|
8790
8790
|
}
|
|
8791
8791
|
};
|
|
8792
8792
|
const OffsetContext = React.createContext(20);
|
|
8793
|
-
const defaultProps$
|
|
8793
|
+
const defaultProps$1d = {
|
|
8794
8794
|
...ComponentDefaults,
|
|
8795
8795
|
position: "left",
|
|
8796
8796
|
width: "80%"
|
|
@@ -8808,7 +8808,7 @@
|
|
|
8808
8808
|
indent,
|
|
8809
8809
|
...rest
|
|
8810
8810
|
} = {
|
|
8811
|
-
...defaultProps$
|
|
8811
|
+
...defaultProps$1d,
|
|
8812
8812
|
...props
|
|
8813
8813
|
};
|
|
8814
8814
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -8858,13 +8858,13 @@
|
|
|
8858
8858
|
title
|
|
8859
8859
|
);
|
|
8860
8860
|
};
|
|
8861
|
-
const defaultProps$
|
|
8861
|
+
const defaultProps$1c = {
|
|
8862
8862
|
open: true
|
|
8863
8863
|
};
|
|
8864
8864
|
const SubSideNavBar = (props) => {
|
|
8865
8865
|
const classPrefix2 = "nut-subsidenavbar";
|
|
8866
8866
|
const { title, value, children, onClick, open, ...rest } = {
|
|
8867
|
-
...defaultProps$
|
|
8867
|
+
...defaultProps$1c,
|
|
8868
8868
|
...props
|
|
8869
8869
|
};
|
|
8870
8870
|
const offset = React.useContext(OffsetContext);
|
|
@@ -8941,7 +8941,7 @@
|
|
|
8941
8941
|
);
|
|
8942
8942
|
return [stateRef.current, setState];
|
|
8943
8943
|
}
|
|
8944
|
-
const defaultProps$
|
|
8944
|
+
const defaultProps$1b = {
|
|
8945
8945
|
...ComponentDefaults,
|
|
8946
8946
|
value: "",
|
|
8947
8947
|
dot: false,
|
|
@@ -8966,7 +8966,7 @@
|
|
|
8966
8966
|
color,
|
|
8967
8967
|
fill
|
|
8968
8968
|
} = {
|
|
8969
|
-
...defaultProps$
|
|
8969
|
+
...defaultProps$1b,
|
|
8970
8970
|
...props
|
|
8971
8971
|
};
|
|
8972
8972
|
const classPrefix2 = "nut-badge";
|
|
@@ -9020,7 +9020,7 @@
|
|
|
9020
9020
|
};
|
|
9021
9021
|
Badge.displayName = "NutBadge";
|
|
9022
9022
|
const TabbarContext = React.createContext(null);
|
|
9023
|
-
const defaultProps$
|
|
9023
|
+
const defaultProps$1a = {
|
|
9024
9024
|
...ComponentDefaults,
|
|
9025
9025
|
title: "",
|
|
9026
9026
|
icon: null,
|
|
@@ -9046,7 +9046,7 @@
|
|
|
9046
9046
|
index,
|
|
9047
9047
|
...rest
|
|
9048
9048
|
} = {
|
|
9049
|
-
...defaultProps$
|
|
9049
|
+
...defaultProps$1a,
|
|
9050
9050
|
...props
|
|
9051
9051
|
};
|
|
9052
9052
|
const active = index === (ctx2 == null ? void 0 : ctx2.selectIndex);
|
|
@@ -9084,7 +9084,7 @@
|
|
|
9084
9084
|
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
9085
|
);
|
|
9086
9086
|
};
|
|
9087
|
-
const defaultProps$
|
|
9087
|
+
const defaultProps$19 = {
|
|
9088
9088
|
...ComponentDefaults,
|
|
9089
9089
|
defaultValue: 0,
|
|
9090
9090
|
fixed: false,
|
|
@@ -9107,7 +9107,7 @@
|
|
|
9107
9107
|
style,
|
|
9108
9108
|
onSwitch
|
|
9109
9109
|
} = {
|
|
9110
|
-
...defaultProps$
|
|
9110
|
+
...defaultProps$19,
|
|
9111
9111
|
...props
|
|
9112
9112
|
};
|
|
9113
9113
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -9149,14 +9149,14 @@
|
|
|
9149
9149
|
};
|
|
9150
9150
|
Tabbar.displayName = "NutTabbar";
|
|
9151
9151
|
Tabbar.Item = TabbarItem;
|
|
9152
|
-
const defaultProps$
|
|
9152
|
+
const defaultProps$18 = {
|
|
9153
9153
|
title: "",
|
|
9154
9154
|
value: "",
|
|
9155
9155
|
disabled: false
|
|
9156
9156
|
};
|
|
9157
9157
|
const TabPane = (props) => {
|
|
9158
9158
|
const { children, autoHeightClassName, className, disabled } = {
|
|
9159
|
-
...defaultProps$
|
|
9159
|
+
...defaultProps$18,
|
|
9160
9160
|
...props
|
|
9161
9161
|
};
|
|
9162
9162
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -9170,7 +9170,7 @@
|
|
|
9170
9170
|
);
|
|
9171
9171
|
return children ? /* @__PURE__ */ React.createElement("div", { className: classes }, !disabled && children) : null;
|
|
9172
9172
|
};
|
|
9173
|
-
const defaultProps$
|
|
9173
|
+
const defaultProps$17 = {
|
|
9174
9174
|
...ComponentDefaults,
|
|
9175
9175
|
tabStyle: {},
|
|
9176
9176
|
activeColor: "",
|
|
@@ -9199,7 +9199,7 @@
|
|
|
9199
9199
|
defaultValue: outerDefaultValue,
|
|
9200
9200
|
...rest
|
|
9201
9201
|
} = {
|
|
9202
|
-
...defaultProps$
|
|
9202
|
+
...defaultProps$17,
|
|
9203
9203
|
...props
|
|
9204
9204
|
};
|
|
9205
9205
|
const [value, setValue] = usePropsValue({
|
|
@@ -9507,7 +9507,7 @@
|
|
|
9507
9507
|
return pathNodes;
|
|
9508
9508
|
}
|
|
9509
9509
|
}
|
|
9510
|
-
const defaultProps$
|
|
9510
|
+
const defaultProps$16 = {
|
|
9511
9511
|
...ComponentDefaults,
|
|
9512
9512
|
activeColor: "",
|
|
9513
9513
|
activeIcon: "checklist",
|
|
@@ -9552,7 +9552,7 @@
|
|
|
9552
9552
|
onClose,
|
|
9553
9553
|
onChange,
|
|
9554
9554
|
onPathChange
|
|
9555
|
-
} = { ...defaultProps$
|
|
9555
|
+
} = { ...defaultProps$16, ...props };
|
|
9556
9556
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
9557
9557
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
9558
9558
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -9859,7 +9859,7 @@
|
|
|
9859
9859
|
};
|
|
9860
9860
|
const Cascader = React.forwardRef(InternalCascader);
|
|
9861
9861
|
Cascader.displayName = "NutCascader";
|
|
9862
|
-
const defaultProps$
|
|
9862
|
+
const defaultProps$15 = {
|
|
9863
9863
|
...ComponentDefaults,
|
|
9864
9864
|
visible: false,
|
|
9865
9865
|
type: "custom",
|
|
@@ -9886,7 +9886,7 @@
|
|
|
9886
9886
|
onPathChange,
|
|
9887
9887
|
...rest
|
|
9888
9888
|
} = {
|
|
9889
|
-
...defaultProps$
|
|
9889
|
+
...defaultProps$15,
|
|
9890
9890
|
...props
|
|
9891
9891
|
};
|
|
9892
9892
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, type === "custom" && /* @__PURE__ */ React.createElement(
|
|
@@ -9911,7 +9911,7 @@
|
|
|
9911
9911
|
}
|
|
9912
9912
|
));
|
|
9913
9913
|
};
|
|
9914
|
-
const defaultProps$
|
|
9914
|
+
const defaultProps$14 = {
|
|
9915
9915
|
type: "custom",
|
|
9916
9916
|
existList: [],
|
|
9917
9917
|
defaultIcon: null,
|
|
@@ -9930,7 +9930,7 @@
|
|
|
9930
9930
|
onSelect,
|
|
9931
9931
|
onSwitch,
|
|
9932
9932
|
...rest
|
|
9933
|
-
} = { ...defaultProps$
|
|
9933
|
+
} = { ...defaultProps$14, ...props };
|
|
9934
9934
|
const classPrefix2 = "nut-address";
|
|
9935
9935
|
const selectedExist = (item) => {
|
|
9936
9936
|
existList.forEach((list, index) => {
|
|
@@ -9959,7 +9959,7 @@
|
|
|
9959
9959
|
);
|
|
9960
9960
|
})), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
|
|
9961
9961
|
};
|
|
9962
|
-
const defaultProps$
|
|
9962
|
+
const defaultProps$13 = {
|
|
9963
9963
|
...ComponentDefaults,
|
|
9964
9964
|
defaultValue: [],
|
|
9965
9965
|
type: "custom",
|
|
@@ -10001,7 +10001,7 @@
|
|
|
10001
10001
|
onSwitch,
|
|
10002
10002
|
...rest
|
|
10003
10003
|
} = {
|
|
10004
|
-
...defaultProps$
|
|
10004
|
+
...defaultProps$13,
|
|
10005
10005
|
...props
|
|
10006
10006
|
};
|
|
10007
10007
|
const classPrefix2 = "nut-address";
|
|
@@ -10339,7 +10339,7 @@
|
|
|
10339
10339
|
const isStartAndEnd = (days) => {
|
|
10340
10340
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
10341
10341
|
};
|
|
10342
|
-
const defaultProps$
|
|
10342
|
+
const defaultProps$12 = {
|
|
10343
10343
|
...ComponentDefaults,
|
|
10344
10344
|
type: "single",
|
|
10345
10345
|
autoBackfill: false,
|
|
@@ -10400,7 +10400,7 @@
|
|
|
10400
10400
|
onUpdate,
|
|
10401
10401
|
onDayClick,
|
|
10402
10402
|
onPageChange
|
|
10403
|
-
} = { ...defaultProps$
|
|
10403
|
+
} = { ...defaultProps$12, ...props };
|
|
10404
10404
|
const weekdays = locale.calendaritem.weekdays;
|
|
10405
10405
|
const weeks = [
|
|
10406
10406
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -10939,7 +10939,7 @@
|
|
|
10939
10939
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
10940
10940
|
});
|
|
10941
10941
|
CalendarItem.displayName = "NutCalendarItem";
|
|
10942
|
-
const defaultProps$
|
|
10942
|
+
const defaultProps$11 = {
|
|
10943
10943
|
...ComponentDefaults,
|
|
10944
10944
|
type: "single",
|
|
10945
10945
|
autoBackfill: false,
|
|
@@ -11002,7 +11002,7 @@
|
|
|
11002
11002
|
onConfirm,
|
|
11003
11003
|
onDayClick,
|
|
11004
11004
|
onPageChange
|
|
11005
|
-
} = { ...defaultProps$
|
|
11005
|
+
} = { ...defaultProps$11, ...props };
|
|
11006
11006
|
const calendarRef = React.useRef(null);
|
|
11007
11007
|
const close = () => {
|
|
11008
11008
|
onClose && onClose();
|
|
@@ -11182,7 +11182,7 @@
|
|
|
11182
11182
|
)
|
|
11183
11183
|
];
|
|
11184
11184
|
};
|
|
11185
|
-
const defaultProps
|
|
11185
|
+
const defaultProps$10 = {
|
|
11186
11186
|
...ComponentDefaults,
|
|
11187
11187
|
type: "single",
|
|
11188
11188
|
firstDayOfWeek: 0
|
|
@@ -11206,7 +11206,7 @@
|
|
|
11206
11206
|
onDayClick,
|
|
11207
11207
|
onPageChange,
|
|
11208
11208
|
onChange
|
|
11209
|
-
} = { ...defaultProps
|
|
11209
|
+
} = { ...defaultProps$10, ...props };
|
|
11210
11210
|
const [month, setMonth] = React.useState(() => {
|
|
11211
11211
|
let date = new Date(Date.now());
|
|
11212
11212
|
const val = value || defaultValue;
|
|
@@ -11510,7 +11510,7 @@
|
|
|
11510
11510
|
});
|
|
11511
11511
|
CalendarCard.displayName = "NutCalendarCard";
|
|
11512
11512
|
const CheckboxGroupContext = React.createContext(null);
|
|
11513
|
-
const defaultProps
|
|
11513
|
+
const defaultProps$$ = {
|
|
11514
11514
|
max: void 0,
|
|
11515
11515
|
min: void 0,
|
|
11516
11516
|
list: false,
|
|
@@ -11540,7 +11540,7 @@
|
|
|
11540
11540
|
onChange,
|
|
11541
11541
|
onLimit,
|
|
11542
11542
|
...rest
|
|
11543
|
-
} = { ...defaultProps
|
|
11543
|
+
} = { ...defaultProps$$, ...props };
|
|
11544
11544
|
React.useImperativeHandle(ref, () => ({
|
|
11545
11545
|
toggle(state) {
|
|
11546
11546
|
if (state === false) {
|
|
@@ -11633,7 +11633,7 @@
|
|
|
11633
11633
|
}
|
|
11634
11634
|
);
|
|
11635
11635
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
11636
|
-
const defaultProps$
|
|
11636
|
+
const defaultProps$_ = {
|
|
11637
11637
|
...ComponentDefaults,
|
|
11638
11638
|
disabled: false,
|
|
11639
11639
|
shape: "round",
|
|
@@ -11647,7 +11647,7 @@
|
|
|
11647
11647
|
const classPrefix$h = "nut-checkbox";
|
|
11648
11648
|
const Checkbox = (props) => {
|
|
11649
11649
|
const { children } = {
|
|
11650
|
-
...defaultProps$
|
|
11650
|
+
...defaultProps$_,
|
|
11651
11651
|
...props
|
|
11652
11652
|
};
|
|
11653
11653
|
const {
|
|
@@ -12024,7 +12024,7 @@
|
|
|
12024
12024
|
}, []);
|
|
12025
12025
|
return [refs.current, setRefs, reset];
|
|
12026
12026
|
}
|
|
12027
|
-
const defaultProps$
|
|
12027
|
+
const defaultProps$Z = {
|
|
12028
12028
|
...ComponentDefaults,
|
|
12029
12029
|
title: "",
|
|
12030
12030
|
options: [],
|
|
@@ -12054,7 +12054,7 @@
|
|
|
12054
12054
|
afterClose,
|
|
12055
12055
|
onChange,
|
|
12056
12056
|
...rest
|
|
12057
|
-
} = { ...defaultProps$
|
|
12057
|
+
} = { ...defaultProps$Z, ...props };
|
|
12058
12058
|
const classPrefix2 = "nut-picker";
|
|
12059
12059
|
const classes = classNames(classPrefix2, className);
|
|
12060
12060
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -12295,7 +12295,7 @@
|
|
|
12295
12295
|
return str;
|
|
12296
12296
|
};
|
|
12297
12297
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
12298
|
-
const defaultProps$
|
|
12298
|
+
const defaultProps$Y = {
|
|
12299
12299
|
...ComponentDefaults,
|
|
12300
12300
|
visible: false,
|
|
12301
12301
|
title: "",
|
|
@@ -12328,7 +12328,7 @@
|
|
|
12328
12328
|
style,
|
|
12329
12329
|
...rest
|
|
12330
12330
|
} = {
|
|
12331
|
-
...defaultProps$
|
|
12331
|
+
...defaultProps$Y,
|
|
12332
12332
|
...props
|
|
12333
12333
|
};
|
|
12334
12334
|
const { locale } = useConfig();
|
|
@@ -13839,7 +13839,7 @@
|
|
|
13839
13839
|
}
|
|
13840
13840
|
return [formRef.current];
|
|
13841
13841
|
};
|
|
13842
|
-
const defaultProps$
|
|
13842
|
+
const defaultProps$X = {
|
|
13843
13843
|
...ComponentDefaults,
|
|
13844
13844
|
labelPosition: "right",
|
|
13845
13845
|
starPosition: "left",
|
|
@@ -13870,7 +13870,7 @@
|
|
|
13870
13870
|
starPosition,
|
|
13871
13871
|
form
|
|
13872
13872
|
} = {
|
|
13873
|
-
...defaultProps$
|
|
13873
|
+
...defaultProps$X,
|
|
13874
13874
|
...props
|
|
13875
13875
|
};
|
|
13876
13876
|
let formInstance;
|
|
@@ -13926,7 +13926,7 @@
|
|
|
13926
13926
|
}
|
|
13927
13927
|
).$$typeof === component.type.$$typeof;
|
|
13928
13928
|
}
|
|
13929
|
-
const defaultProps$
|
|
13929
|
+
const defaultProps$W = {
|
|
13930
13930
|
...ComponentDefaults,
|
|
13931
13931
|
required: false,
|
|
13932
13932
|
name: "",
|
|
@@ -14019,9 +14019,10 @@
|
|
|
14019
14019
|
rules: rules2,
|
|
14020
14020
|
className,
|
|
14021
14021
|
style,
|
|
14022
|
-
errorMessageAlign
|
|
14022
|
+
errorMessageAlign,
|
|
14023
|
+
align
|
|
14023
14024
|
} = {
|
|
14024
|
-
...defaultProps$
|
|
14025
|
+
...defaultProps$W,
|
|
14025
14026
|
...this.props
|
|
14026
14027
|
};
|
|
14027
14028
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -14034,6 +14035,7 @@
|
|
|
14034
14035
|
{
|
|
14035
14036
|
className: `nut-form-item ${className}`,
|
|
14036
14037
|
style,
|
|
14038
|
+
align,
|
|
14037
14039
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
14038
14040
|
},
|
|
14039
14041
|
label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -14087,7 +14089,7 @@
|
|
|
14087
14089
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
14088
14090
|
}
|
|
14089
14091
|
};
|
|
14090
|
-
_FormItem.defaultProps = defaultProps$
|
|
14092
|
+
_FormItem.defaultProps = defaultProps$W;
|
|
14091
14093
|
_FormItem.contextType = Context;
|
|
14092
14094
|
let FormItem = _FormItem;
|
|
14093
14095
|
const InnerForm = Form;
|
|
@@ -14117,7 +14119,7 @@
|
|
|
14117
14119
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
14118
14120
|
return value.replace(regExp, "");
|
|
14119
14121
|
}
|
|
14120
|
-
const defaultProps$
|
|
14122
|
+
const defaultProps$V = {
|
|
14121
14123
|
...ComponentDefaults,
|
|
14122
14124
|
type: "text",
|
|
14123
14125
|
name: "",
|
|
@@ -14163,7 +14165,7 @@
|
|
|
14163
14165
|
onCompositionEnd,
|
|
14164
14166
|
...rest
|
|
14165
14167
|
} = {
|
|
14166
|
-
...defaultProps$
|
|
14168
|
+
...defaultProps$V,
|
|
14167
14169
|
...props
|
|
14168
14170
|
};
|
|
14169
14171
|
const [value, setValue] = usePropsValue({
|
|
@@ -14308,7 +14310,7 @@
|
|
|
14308
14310
|
}
|
|
14309
14311
|
);
|
|
14310
14312
|
Input.displayName = "NutInput";
|
|
14311
|
-
const defaultProps$
|
|
14313
|
+
const defaultProps$U = {
|
|
14312
14314
|
...ComponentDefaults,
|
|
14313
14315
|
disabled: false,
|
|
14314
14316
|
readOnly: false,
|
|
@@ -14344,7 +14346,7 @@
|
|
|
14344
14346
|
onChange,
|
|
14345
14347
|
...restProps
|
|
14346
14348
|
} = {
|
|
14347
|
-
...defaultProps$
|
|
14349
|
+
...defaultProps$U,
|
|
14348
14350
|
...props
|
|
14349
14351
|
};
|
|
14350
14352
|
const classes = classNames(classPrefix$g, className, {
|
|
@@ -14435,6 +14437,17 @@
|
|
|
14435
14437
|
if (text === "-") return null;
|
|
14436
14438
|
return text;
|
|
14437
14439
|
};
|
|
14440
|
+
const clampValue = (valueStr) => {
|
|
14441
|
+
if (valueStr === null) return defaultValue;
|
|
14442
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
14443
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
14444
|
+
};
|
|
14445
|
+
const handleValueChange = (valueStr, e2) => {
|
|
14446
|
+
const val = clampValue(valueStr);
|
|
14447
|
+
if (val !== Number(shadowValue)) {
|
|
14448
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
14449
|
+
}
|
|
14450
|
+
};
|
|
14438
14451
|
const handleInputChange = (e2) => {
|
|
14439
14452
|
setInputValue(e2.target.value);
|
|
14440
14453
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -14445,26 +14458,31 @@
|
|
|
14445
14458
|
setShadowValue(defaultValue);
|
|
14446
14459
|
}
|
|
14447
14460
|
} else {
|
|
14448
|
-
setShadowValue(valueStr);
|
|
14449
|
-
}
|
|
14450
|
-
if (!async) {
|
|
14451
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
14461
|
+
setShadowValue(clampValue(valueStr));
|
|
14452
14462
|
}
|
|
14463
|
+
!async && handleValueChange(valueStr, e2);
|
|
14453
14464
|
};
|
|
14454
14465
|
const handleFocus = (e2) => {
|
|
14455
14466
|
setFocused(true);
|
|
14456
14467
|
setInputValue(
|
|
14457
14468
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
14458
14469
|
);
|
|
14459
|
-
onFocus
|
|
14470
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
14460
14471
|
};
|
|
14461
14472
|
const handleBlur = (e2) => {
|
|
14462
14473
|
setFocused(false);
|
|
14463
|
-
onBlur
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14474
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
14475
|
+
const valueStr = parseValue(e2.target.value);
|
|
14476
|
+
if (valueStr === null) {
|
|
14477
|
+
if (allowEmpty) {
|
|
14478
|
+
setShadowValue(null);
|
|
14479
|
+
} else {
|
|
14480
|
+
setShadowValue(defaultValue);
|
|
14481
|
+
}
|
|
14482
|
+
} else {
|
|
14483
|
+
setShadowValue(clampValue(valueStr));
|
|
14467
14484
|
}
|
|
14485
|
+
async && handleValueChange(valueStr, e2);
|
|
14468
14486
|
};
|
|
14469
14487
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
|
|
14470
14488
|
e$6,
|
|
@@ -14544,8 +14562,9 @@
|
|
|
14544
14562
|
};
|
|
14545
14563
|
}, [target]);
|
|
14546
14564
|
}
|
|
14547
|
-
const defaultProps$
|
|
14565
|
+
const defaultProps$T = {
|
|
14548
14566
|
...ComponentDefaults,
|
|
14567
|
+
titleIcon: null,
|
|
14549
14568
|
columns: 1,
|
|
14550
14569
|
direction: "down",
|
|
14551
14570
|
icon: null,
|
|
@@ -14575,7 +14594,7 @@
|
|
|
14575
14594
|
parent,
|
|
14576
14595
|
index
|
|
14577
14596
|
} = {
|
|
14578
|
-
...defaultProps$
|
|
14597
|
+
...defaultProps$T,
|
|
14579
14598
|
...props
|
|
14580
14599
|
};
|
|
14581
14600
|
const [showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -14744,7 +14763,7 @@
|
|
|
14744
14763
|
));
|
|
14745
14764
|
});
|
|
14746
14765
|
MenuItem.displayName = "NutMenuItem";
|
|
14747
|
-
const defaultProps$
|
|
14766
|
+
const defaultProps$S = {
|
|
14748
14767
|
...ComponentDefaults,
|
|
14749
14768
|
activeColor: "",
|
|
14750
14769
|
closeOnOverlayClick: true,
|
|
@@ -14771,7 +14790,7 @@
|
|
|
14771
14790
|
onOpen,
|
|
14772
14791
|
...rest
|
|
14773
14792
|
} = {
|
|
14774
|
-
...defaultProps$
|
|
14793
|
+
...defaultProps$S,
|
|
14775
14794
|
...props
|
|
14776
14795
|
};
|
|
14777
14796
|
const menuRef = React.useRef(null);
|
|
@@ -14836,7 +14855,15 @@
|
|
|
14836
14855
|
const menuTitle = () => {
|
|
14837
14856
|
return React.Children.map(children, (child, index) => {
|
|
14838
14857
|
if (React.isValidElement(child)) {
|
|
14839
|
-
const {
|
|
14858
|
+
const {
|
|
14859
|
+
title,
|
|
14860
|
+
titleIcon,
|
|
14861
|
+
options: options2,
|
|
14862
|
+
value,
|
|
14863
|
+
defaultValue,
|
|
14864
|
+
disabled,
|
|
14865
|
+
direction
|
|
14866
|
+
} = child.props;
|
|
14840
14867
|
const selected = options2 == null ? void 0 : options2.filter(
|
|
14841
14868
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
14842
14869
|
);
|
|
@@ -14847,6 +14874,25 @@
|
|
|
14847
14874
|
return selected[0].text;
|
|
14848
14875
|
return "";
|
|
14849
14876
|
};
|
|
14877
|
+
const finallyIcon = () => {
|
|
14878
|
+
if (titleIcon) return titleIcon;
|
|
14879
|
+
if (icon) return icon;
|
|
14880
|
+
return direction === "up" ? /* @__PURE__ */ React.createElement(
|
|
14881
|
+
l$2,
|
|
14882
|
+
{
|
|
14883
|
+
className: "nut-menu-title-icon",
|
|
14884
|
+
width: "12px",
|
|
14885
|
+
height: "12px"
|
|
14886
|
+
}
|
|
14887
|
+
) : /* @__PURE__ */ React.createElement(
|
|
14888
|
+
l$3,
|
|
14889
|
+
{
|
|
14890
|
+
className: "nut-menu-title-icon",
|
|
14891
|
+
width: "12px",
|
|
14892
|
+
height: "12px"
|
|
14893
|
+
}
|
|
14894
|
+
);
|
|
14895
|
+
};
|
|
14850
14896
|
return /* @__PURE__ */ React.createElement(
|
|
14851
14897
|
"div",
|
|
14852
14898
|
{
|
|
@@ -14863,21 +14909,7 @@
|
|
|
14863
14909
|
}
|
|
14864
14910
|
},
|
|
14865
14911
|
/* @__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
|
-
))
|
|
14912
|
+
finallyIcon()
|
|
14881
14913
|
);
|
|
14882
14914
|
}
|
|
14883
14915
|
return null;
|
|
@@ -14906,6 +14938,16 @@
|
|
|
14906
14938
|
};
|
|
14907
14939
|
Menu.displayName = "NutMenu";
|
|
14908
14940
|
Menu.Item = MenuItem;
|
|
14941
|
+
const defaultProps$R = {
|
|
14942
|
+
...ComponentDefaults,
|
|
14943
|
+
visible: false,
|
|
14944
|
+
rightActions: "",
|
|
14945
|
+
type: "default",
|
|
14946
|
+
custom: [],
|
|
14947
|
+
random: false,
|
|
14948
|
+
onClose: () => {
|
|
14949
|
+
}
|
|
14950
|
+
};
|
|
14909
14951
|
const NumberKeyboard = (props) => {
|
|
14910
14952
|
const { locale } = useConfig();
|
|
14911
14953
|
const {
|
|
@@ -14923,7 +14965,7 @@
|
|
|
14923
14965
|
onClose,
|
|
14924
14966
|
onConfirm,
|
|
14925
14967
|
...rest
|
|
14926
|
-
} = props;
|
|
14968
|
+
} = { ...defaultProps$R, ...props };
|
|
14927
14969
|
const classPrefix2 = "nut-numberkeyboard";
|
|
14928
14970
|
const getBasicKeys = () => {
|
|
14929
14971
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -14975,17 +15017,35 @@
|
|
|
14975
15017
|
};
|
|
14976
15018
|
const onTouchEnd = (item2) => {
|
|
14977
15019
|
setActive(false);
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
15020
|
+
switch (item2.type) {
|
|
15021
|
+
case "num":
|
|
15022
|
+
case "custom":
|
|
15023
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
15024
|
+
break;
|
|
15025
|
+
case "close":
|
|
15026
|
+
onClose == null ? void 0 : onClose();
|
|
15027
|
+
break;
|
|
15028
|
+
case "delete":
|
|
15029
|
+
onDelete == null ? void 0 : onDelete();
|
|
15030
|
+
break;
|
|
15031
|
+
case "confirm":
|
|
15032
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
15033
|
+
break;
|
|
14986
15034
|
}
|
|
14987
|
-
|
|
14988
|
-
|
|
15035
|
+
};
|
|
15036
|
+
const renderContent = (item2) => {
|
|
15037
|
+
switch (item2.type) {
|
|
15038
|
+
case "num":
|
|
15039
|
+
case "custom":
|
|
15040
|
+
return /* @__PURE__ */ React.createElement("div", null, item2.id);
|
|
15041
|
+
case "delete":
|
|
15042
|
+
return /* @__PURE__ */ React.createElement(DeleteIcon, null);
|
|
15043
|
+
case "close":
|
|
15044
|
+
return /* @__PURE__ */ React.createElement(l$3, { width: 18, height: 18 });
|
|
15045
|
+
case "confirm":
|
|
15046
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done);
|
|
15047
|
+
default:
|
|
15048
|
+
return null;
|
|
14989
15049
|
}
|
|
14990
15050
|
};
|
|
14991
15051
|
return /* @__PURE__ */ React.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React.createElement(
|
|
@@ -15002,22 +15062,19 @@
|
|
|
15002
15062
|
onTouchEnd: () => onTouchEnd(item),
|
|
15003
15063
|
onTouchCancel: () => onTouchEnd(item)
|
|
15004
15064
|
},
|
|
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)
|
|
15065
|
+
renderContent(item)
|
|
15009
15066
|
));
|
|
15010
15067
|
};
|
|
15011
15068
|
return /* @__PURE__ */ React.createElement(
|
|
15012
15069
|
Popup,
|
|
15013
15070
|
{
|
|
15071
|
+
...rest,
|
|
15014
15072
|
visible,
|
|
15015
15073
|
position: "bottom",
|
|
15016
15074
|
onOverlayClick: onClose,
|
|
15017
15075
|
onCloseIconClick: onClose,
|
|
15018
15076
|
zIndex: 9999,
|
|
15019
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15020
|
-
...rest
|
|
15077
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15021
15078
|
},
|
|
15022
15079
|
/* @__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
15080
|
"span",
|