@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.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v2.6.
|
|
2
|
+
* @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:49:59 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -530,7 +530,7 @@ const ComponentDefaults = {
|
|
|
530
530
|
style: {}
|
|
531
531
|
};
|
|
532
532
|
const prefixCls$2 = "nut-button";
|
|
533
|
-
const defaultProps$
|
|
533
|
+
const defaultProps$1u = {
|
|
534
534
|
...ComponentDefaults,
|
|
535
535
|
color: "",
|
|
536
536
|
type: "default",
|
|
@@ -566,7 +566,7 @@ const Button = React__default.forwardRef(
|
|
|
566
566
|
onClick,
|
|
567
567
|
...rest
|
|
568
568
|
} = {
|
|
569
|
-
...defaultProps$
|
|
569
|
+
...defaultProps$1u,
|
|
570
570
|
...props
|
|
571
571
|
};
|
|
572
572
|
const getStyle = useCallback(() => {
|
|
@@ -625,7 +625,7 @@ const Button = React__default.forwardRef(
|
|
|
625
625
|
);
|
|
626
626
|
Button.displayName = "NutButton";
|
|
627
627
|
const CellGroupContext = createContext(null);
|
|
628
|
-
const defaultProps$
|
|
628
|
+
const defaultProps$1t = {
|
|
629
629
|
...ComponentDefaults,
|
|
630
630
|
title: "",
|
|
631
631
|
description: "",
|
|
@@ -634,7 +634,7 @@ const defaultProps$1s = {
|
|
|
634
634
|
const classPrefix$r = "nut-cell-group";
|
|
635
635
|
const CellGroup = (props) => {
|
|
636
636
|
const { children, className, title, description, divider, ...rest } = {
|
|
637
|
-
...defaultProps$
|
|
637
|
+
...defaultProps$1t,
|
|
638
638
|
...props
|
|
639
639
|
};
|
|
640
640
|
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(
|
|
@@ -646,7 +646,7 @@ const CellGroup = (props) => {
|
|
|
646
646
|
));
|
|
647
647
|
};
|
|
648
648
|
CellGroup.displayName = "NutCellGroup";
|
|
649
|
-
const defaultProps$
|
|
649
|
+
const defaultProps$1s = {
|
|
650
650
|
...ComponentDefaults,
|
|
651
651
|
title: null,
|
|
652
652
|
description: null,
|
|
@@ -671,7 +671,7 @@ const Cell = (props) => {
|
|
|
671
671
|
style,
|
|
672
672
|
...rest
|
|
673
673
|
} = {
|
|
674
|
-
...defaultProps$
|
|
674
|
+
...defaultProps$1s,
|
|
675
675
|
...props
|
|
676
676
|
};
|
|
677
677
|
const handleClick2 = (event) => {
|
|
@@ -1862,7 +1862,7 @@ ConfigProvider.displayName = "NutConfigProvider";
|
|
|
1862
1862
|
const pxCheck = (value) => {
|
|
1863
1863
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1864
1864
|
};
|
|
1865
|
-
const defaultProps$
|
|
1865
|
+
const defaultProps$1r = {
|
|
1866
1866
|
...ComponentDefaults,
|
|
1867
1867
|
fit: "fill",
|
|
1868
1868
|
position: "center",
|
|
@@ -1892,7 +1892,7 @@ const Image$1 = (props) => {
|
|
|
1892
1892
|
onClick,
|
|
1893
1893
|
onLoad,
|
|
1894
1894
|
onError
|
|
1895
|
-
} = { ...defaultProps$
|
|
1895
|
+
} = { ...defaultProps$1r, ...props };
|
|
1896
1896
|
const [innerLoading, setInnerLoading] = useState(false);
|
|
1897
1897
|
const [isError, setIsError] = useState(false);
|
|
1898
1898
|
const [complete, setComplete] = useState(false);
|
|
@@ -2754,7 +2754,7 @@ const Overlay = (props) => {
|
|
|
2754
2754
|
};
|
|
2755
2755
|
Overlay.displayName = "NutOverlay";
|
|
2756
2756
|
const DataContext$1 = createContext({});
|
|
2757
|
-
const defaultProps$
|
|
2757
|
+
const defaultProps$1q = {
|
|
2758
2758
|
...ComponentDefaults,
|
|
2759
2759
|
span: "24",
|
|
2760
2760
|
offset: "0",
|
|
@@ -2762,7 +2762,7 @@ const defaultProps$1p = {
|
|
|
2762
2762
|
};
|
|
2763
2763
|
const Col = (props) => {
|
|
2764
2764
|
const { className, style, span, offset, children, onClick } = {
|
|
2765
|
-
...defaultProps$
|
|
2765
|
+
...defaultProps$1q,
|
|
2766
2766
|
...props
|
|
2767
2767
|
};
|
|
2768
2768
|
const [colName, setColName] = useState("");
|
|
@@ -2795,7 +2795,7 @@ const Col = (props) => {
|
|
|
2795
2795
|
);
|
|
2796
2796
|
};
|
|
2797
2797
|
Col.displayName = "NutCol";
|
|
2798
|
-
const defaultProps$
|
|
2798
|
+
const defaultProps$1p = {
|
|
2799
2799
|
...ComponentDefaults,
|
|
2800
2800
|
contentPosition: "center",
|
|
2801
2801
|
direction: "horizontal"
|
|
@@ -2803,7 +2803,7 @@ const defaultProps$1o = {
|
|
|
2803
2803
|
const classPrefix$n = `nut-divider`;
|
|
2804
2804
|
const Divider = (props) => {
|
|
2805
2805
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2806
|
-
...defaultProps$
|
|
2806
|
+
...defaultProps$1p,
|
|
2807
2807
|
...props
|
|
2808
2808
|
};
|
|
2809
2809
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -2824,7 +2824,7 @@ const gridContext = {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
};
|
|
2826
2826
|
const GridContext = React__default.createContext(gridContext);
|
|
2827
|
-
const defaultProps$
|
|
2827
|
+
const defaultProps$1o = {
|
|
2828
2828
|
text: "",
|
|
2829
2829
|
columns: 4,
|
|
2830
2830
|
gap: 0,
|
|
@@ -2850,7 +2850,7 @@ const GridItem = (props) => {
|
|
|
2850
2850
|
onClick,
|
|
2851
2851
|
...rest
|
|
2852
2852
|
} = {
|
|
2853
|
-
...defaultProps$
|
|
2853
|
+
...defaultProps$1o,
|
|
2854
2854
|
...props
|
|
2855
2855
|
};
|
|
2856
2856
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -2909,7 +2909,7 @@ const GridItem = (props) => {
|
|
|
2909
2909
|
);
|
|
2910
2910
|
};
|
|
2911
2911
|
GridItem.displayName = "NutGridItem";
|
|
2912
|
-
const defaultProps$
|
|
2912
|
+
const defaultProps$1n = {
|
|
2913
2913
|
columns: 4,
|
|
2914
2914
|
gap: 0,
|
|
2915
2915
|
center: true,
|
|
@@ -2930,7 +2930,7 @@ const Grid = (props) => {
|
|
|
2930
2930
|
className,
|
|
2931
2931
|
onClick,
|
|
2932
2932
|
...rest
|
|
2933
|
-
} = { ...defaultProps$
|
|
2933
|
+
} = { ...defaultProps$1n, ...props };
|
|
2934
2934
|
const childrenDom = React__default.Children.toArray(children);
|
|
2935
2935
|
const classPrefix2 = "nut-grid";
|
|
2936
2936
|
const rootClass = () => {
|
|
@@ -2966,14 +2966,14 @@ const Grid = (props) => {
|
|
|
2966
2966
|
};
|
|
2967
2967
|
Grid.displayName = "NutGrid";
|
|
2968
2968
|
Grid.Item = GridItem;
|
|
2969
|
-
const defaultProps$
|
|
2969
|
+
const defaultProps$1m = {};
|
|
2970
2970
|
const Layout = (props) => {
|
|
2971
|
-
({ ...defaultProps$
|
|
2971
|
+
({ ...defaultProps$1m, ...props });
|
|
2972
2972
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
|
|
2973
2973
|
};
|
|
2974
2974
|
Layout.displayName = "NutLayout";
|
|
2975
2975
|
const classPrefix$m = "nut-row";
|
|
2976
|
-
const defaultProps$
|
|
2976
|
+
const defaultProps$1l = {
|
|
2977
2977
|
...ComponentDefaults,
|
|
2978
2978
|
type: "",
|
|
2979
2979
|
justify: "start",
|
|
@@ -2993,7 +2993,7 @@ const Row = (props) => {
|
|
|
2993
2993
|
gutter,
|
|
2994
2994
|
onClick
|
|
2995
2995
|
} = {
|
|
2996
|
-
...defaultProps$
|
|
2996
|
+
...defaultProps$1l,
|
|
2997
2997
|
...props
|
|
2998
2998
|
};
|
|
2999
2999
|
const getClass = (prefix2, type22) => {
|
|
@@ -3027,12 +3027,12 @@ const Row = (props) => {
|
|
|
3027
3027
|
};
|
|
3028
3028
|
Row.displayName = "NutRow";
|
|
3029
3029
|
const prefixCls$1 = "nut-space";
|
|
3030
|
-
const defaultProps$
|
|
3030
|
+
const defaultProps$1k = {
|
|
3031
3031
|
direction: "horizontal"
|
|
3032
3032
|
};
|
|
3033
3033
|
const Space = (props) => {
|
|
3034
3034
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3035
|
-
...defaultProps$
|
|
3035
|
+
...defaultProps$1k,
|
|
3036
3036
|
...props
|
|
3037
3037
|
};
|
|
3038
3038
|
const cls = classNames(
|
|
@@ -3100,7 +3100,7 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
|
3100
3100
|
stop2.current = true;
|
|
3101
3101
|
};
|
|
3102
3102
|
}
|
|
3103
|
-
const defaultProps$
|
|
3103
|
+
const defaultProps$1j = {
|
|
3104
3104
|
...ComponentDefaults,
|
|
3105
3105
|
position: "top",
|
|
3106
3106
|
threshold: 0,
|
|
@@ -3118,7 +3118,7 @@ const Sticky = (props) => {
|
|
|
3118
3118
|
threshold,
|
|
3119
3119
|
onChange,
|
|
3120
3120
|
...rest
|
|
3121
|
-
} = { ...defaultProps$
|
|
3121
|
+
} = { ...defaultProps$1j, ...props };
|
|
3122
3122
|
const stickyRef = useRef(null);
|
|
3123
3123
|
const rootRef = useRef(null);
|
|
3124
3124
|
const [isFixed, setIsFixed] = useState(false);
|
|
@@ -3239,7 +3239,7 @@ const SafeArea = (props) => {
|
|
|
3239
3239
|
);
|
|
3240
3240
|
};
|
|
3241
3241
|
SafeArea.displayName = "NutSafeArea";
|
|
3242
|
-
const defaultProps$
|
|
3242
|
+
const defaultProps$1i = {
|
|
3243
3243
|
...ComponentDefaults,
|
|
3244
3244
|
target: "",
|
|
3245
3245
|
threshold: 200,
|
|
@@ -3258,7 +3258,7 @@ const BackTop = (props) => {
|
|
|
3258
3258
|
style,
|
|
3259
3259
|
onClick
|
|
3260
3260
|
} = {
|
|
3261
|
-
...defaultProps$
|
|
3261
|
+
...defaultProps$1i,
|
|
3262
3262
|
...props
|
|
3263
3263
|
};
|
|
3264
3264
|
const classPrefix2 = "nut-backtop";
|
|
@@ -8176,7 +8176,7 @@ const host = createHost(primitives, {
|
|
|
8176
8176
|
});
|
|
8177
8177
|
const animated = host.animated;
|
|
8178
8178
|
const elevatorContext = createContext({});
|
|
8179
|
-
const defaultProps$
|
|
8179
|
+
const defaultProps$1h = {
|
|
8180
8180
|
...ComponentDefaults,
|
|
8181
8181
|
height: "200px",
|
|
8182
8182
|
floorKey: "title",
|
|
@@ -8202,7 +8202,7 @@ const Elevator = (props) => {
|
|
|
8202
8202
|
children,
|
|
8203
8203
|
...rest
|
|
8204
8204
|
} = {
|
|
8205
|
-
...defaultProps$
|
|
8205
|
+
...defaultProps$1h,
|
|
8206
8206
|
...props
|
|
8207
8207
|
};
|
|
8208
8208
|
const classPrefix2 = "nut-elevator";
|
|
@@ -8380,7 +8380,7 @@ const Elevator = (props) => {
|
|
|
8380
8380
|
};
|
|
8381
8381
|
Elevator.displayName = "NutElevator";
|
|
8382
8382
|
Elevator.Context = elevatorContext;
|
|
8383
|
-
const defaultProps$
|
|
8383
|
+
const defaultProps$1g = {
|
|
8384
8384
|
...ComponentDefaults,
|
|
8385
8385
|
activeText: "",
|
|
8386
8386
|
inactiveText: "",
|
|
@@ -8408,7 +8408,7 @@ const FixedNav = (props) => {
|
|
|
8408
8408
|
content,
|
|
8409
8409
|
...rest
|
|
8410
8410
|
} = {
|
|
8411
|
-
...defaultProps$
|
|
8411
|
+
...defaultProps$1g,
|
|
8412
8412
|
...props
|
|
8413
8413
|
};
|
|
8414
8414
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -8461,7 +8461,7 @@ const FixedNav = (props) => {
|
|
|
8461
8461
|
);
|
|
8462
8462
|
};
|
|
8463
8463
|
FixedNav.displayName = "NutFixedNav";
|
|
8464
|
-
const defaultProps$
|
|
8464
|
+
const defaultProps$1f = {
|
|
8465
8465
|
...ComponentDefaults,
|
|
8466
8466
|
left: "",
|
|
8467
8467
|
right: "",
|
|
@@ -8486,7 +8486,7 @@ const NavBar = (props) => {
|
|
|
8486
8486
|
zIndex,
|
|
8487
8487
|
onBackClick
|
|
8488
8488
|
} = {
|
|
8489
|
-
...defaultProps$
|
|
8489
|
+
...defaultProps$1f,
|
|
8490
8490
|
...props
|
|
8491
8491
|
};
|
|
8492
8492
|
const classPrefix2 = "nut-navbar";
|
|
@@ -8563,7 +8563,7 @@ const NavBar = (props) => {
|
|
|
8563
8563
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
8564
8564
|
};
|
|
8565
8565
|
NavBar.displayName = "NutNavBar";
|
|
8566
|
-
const defaultProps$
|
|
8566
|
+
const defaultProps$1e = {
|
|
8567
8567
|
...ComponentDefaults,
|
|
8568
8568
|
position: "center",
|
|
8569
8569
|
transition: "",
|
|
@@ -8616,7 +8616,7 @@ const Popup = (props) => {
|
|
|
8616
8616
|
afterShow,
|
|
8617
8617
|
afterClose,
|
|
8618
8618
|
onClick
|
|
8619
|
-
} = { ...defaultProps$
|
|
8619
|
+
} = { ...defaultProps$1e, ...props };
|
|
8620
8620
|
const nodeRef = React__default.useRef(null);
|
|
8621
8621
|
let innerIndex = zIndex || _zIndex;
|
|
8622
8622
|
const [index, setIndex] = useState(innerIndex);
|
|
@@ -8772,7 +8772,7 @@ const handleClick = (e2) => {
|
|
|
8772
8772
|
}
|
|
8773
8773
|
};
|
|
8774
8774
|
const OffsetContext = createContext(20);
|
|
8775
|
-
const defaultProps$
|
|
8775
|
+
const defaultProps$1d = {
|
|
8776
8776
|
...ComponentDefaults,
|
|
8777
8777
|
position: "left",
|
|
8778
8778
|
width: "80%"
|
|
@@ -8790,7 +8790,7 @@ const SideNavBar = (props) => {
|
|
|
8790
8790
|
indent,
|
|
8791
8791
|
...rest
|
|
8792
8792
|
} = {
|
|
8793
|
-
...defaultProps$
|
|
8793
|
+
...defaultProps$1d,
|
|
8794
8794
|
...props
|
|
8795
8795
|
};
|
|
8796
8796
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -8840,13 +8840,13 @@ const SideNavBarItem = (props) => {
|
|
|
8840
8840
|
title
|
|
8841
8841
|
);
|
|
8842
8842
|
};
|
|
8843
|
-
const defaultProps$
|
|
8843
|
+
const defaultProps$1c = {
|
|
8844
8844
|
open: true
|
|
8845
8845
|
};
|
|
8846
8846
|
const SubSideNavBar = (props) => {
|
|
8847
8847
|
const classPrefix2 = "nut-subsidenavbar";
|
|
8848
8848
|
const { title, value, children, onClick, open, ...rest } = {
|
|
8849
|
-
...defaultProps$
|
|
8849
|
+
...defaultProps$1c,
|
|
8850
8850
|
...props
|
|
8851
8851
|
};
|
|
8852
8852
|
const offset = useContext(OffsetContext);
|
|
@@ -8923,7 +8923,7 @@ function usePropsValue({
|
|
|
8923
8923
|
);
|
|
8924
8924
|
return [stateRef.current, setState];
|
|
8925
8925
|
}
|
|
8926
|
-
const defaultProps$
|
|
8926
|
+
const defaultProps$1b = {
|
|
8927
8927
|
...ComponentDefaults,
|
|
8928
8928
|
value: "",
|
|
8929
8929
|
dot: false,
|
|
@@ -8948,7 +8948,7 @@ const Badge = (props) => {
|
|
|
8948
8948
|
color,
|
|
8949
8949
|
fill
|
|
8950
8950
|
} = {
|
|
8951
|
-
...defaultProps$
|
|
8951
|
+
...defaultProps$1b,
|
|
8952
8952
|
...props
|
|
8953
8953
|
};
|
|
8954
8954
|
const classPrefix2 = "nut-badge";
|
|
@@ -9002,7 +9002,7 @@ const Badge = (props) => {
|
|
|
9002
9002
|
};
|
|
9003
9003
|
Badge.displayName = "NutBadge";
|
|
9004
9004
|
const TabbarContext = React__default.createContext(null);
|
|
9005
|
-
const defaultProps$
|
|
9005
|
+
const defaultProps$1a = {
|
|
9006
9006
|
...ComponentDefaults,
|
|
9007
9007
|
title: "",
|
|
9008
9008
|
icon: null,
|
|
@@ -9028,7 +9028,7 @@ const TabbarItem = (props) => {
|
|
|
9028
9028
|
index,
|
|
9029
9029
|
...rest
|
|
9030
9030
|
} = {
|
|
9031
|
-
...defaultProps$
|
|
9031
|
+
...defaultProps$1a,
|
|
9032
9032
|
...props
|
|
9033
9033
|
};
|
|
9034
9034
|
const active = index === (ctx2 == null ? void 0 : ctx2.selectIndex);
|
|
@@ -9066,7 +9066,7 @@ const TabbarItem = (props) => {
|
|
|
9066
9066
|
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))
|
|
9067
9067
|
);
|
|
9068
9068
|
};
|
|
9069
|
-
const defaultProps$
|
|
9069
|
+
const defaultProps$19 = {
|
|
9070
9070
|
...ComponentDefaults,
|
|
9071
9071
|
defaultValue: 0,
|
|
9072
9072
|
fixed: false,
|
|
@@ -9089,7 +9089,7 @@ const Tabbar = (props) => {
|
|
|
9089
9089
|
style,
|
|
9090
9090
|
onSwitch
|
|
9091
9091
|
} = {
|
|
9092
|
-
...defaultProps$
|
|
9092
|
+
...defaultProps$19,
|
|
9093
9093
|
...props
|
|
9094
9094
|
};
|
|
9095
9095
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -9131,14 +9131,14 @@ const Tabbar = (props) => {
|
|
|
9131
9131
|
};
|
|
9132
9132
|
Tabbar.displayName = "NutTabbar";
|
|
9133
9133
|
Tabbar.Item = TabbarItem;
|
|
9134
|
-
const defaultProps$
|
|
9134
|
+
const defaultProps$18 = {
|
|
9135
9135
|
title: "",
|
|
9136
9136
|
value: "",
|
|
9137
9137
|
disabled: false
|
|
9138
9138
|
};
|
|
9139
9139
|
const TabPane = (props) => {
|
|
9140
9140
|
const { children, autoHeightClassName, className, disabled } = {
|
|
9141
|
-
...defaultProps$
|
|
9141
|
+
...defaultProps$18,
|
|
9142
9142
|
...props
|
|
9143
9143
|
};
|
|
9144
9144
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -9152,7 +9152,7 @@ const TabPane = (props) => {
|
|
|
9152
9152
|
);
|
|
9153
9153
|
return children ? /* @__PURE__ */ React__default.createElement("div", { className: classes }, !disabled && children) : null;
|
|
9154
9154
|
};
|
|
9155
|
-
const defaultProps$
|
|
9155
|
+
const defaultProps$17 = {
|
|
9156
9156
|
...ComponentDefaults,
|
|
9157
9157
|
tabStyle: {},
|
|
9158
9158
|
activeColor: "",
|
|
@@ -9181,7 +9181,7 @@ const Tabs = (props) => {
|
|
|
9181
9181
|
defaultValue: outerDefaultValue,
|
|
9182
9182
|
...rest
|
|
9183
9183
|
} = {
|
|
9184
|
-
...defaultProps$
|
|
9184
|
+
...defaultProps$17,
|
|
9185
9185
|
...props
|
|
9186
9186
|
};
|
|
9187
9187
|
const [value, setValue] = usePropsValue({
|
|
@@ -9489,7 +9489,7 @@ class Tree {
|
|
|
9489
9489
|
return pathNodes;
|
|
9490
9490
|
}
|
|
9491
9491
|
}
|
|
9492
|
-
const defaultProps$
|
|
9492
|
+
const defaultProps$16 = {
|
|
9493
9493
|
...ComponentDefaults,
|
|
9494
9494
|
activeColor: "",
|
|
9495
9495
|
activeIcon: "checklist",
|
|
@@ -9534,7 +9534,7 @@ const InternalCascader = (props, ref) => {
|
|
|
9534
9534
|
onClose,
|
|
9535
9535
|
onChange,
|
|
9536
9536
|
onPathChange
|
|
9537
|
-
} = { ...defaultProps$
|
|
9537
|
+
} = { ...defaultProps$16, ...props };
|
|
9538
9538
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
9539
9539
|
const [optionsData, setOptionsData] = useState([]);
|
|
9540
9540
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -9841,7 +9841,7 @@ const InternalCascader = (props, ref) => {
|
|
|
9841
9841
|
};
|
|
9842
9842
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
9843
9843
|
Cascader.displayName = "NutCascader";
|
|
9844
|
-
const defaultProps$
|
|
9844
|
+
const defaultProps$15 = {
|
|
9845
9845
|
...ComponentDefaults,
|
|
9846
9846
|
visible: false,
|
|
9847
9847
|
type: "custom",
|
|
@@ -9868,7 +9868,7 @@ const CustomRender = (props) => {
|
|
|
9868
9868
|
onPathChange,
|
|
9869
9869
|
...rest
|
|
9870
9870
|
} = {
|
|
9871
|
-
...defaultProps$
|
|
9871
|
+
...defaultProps$15,
|
|
9872
9872
|
...props
|
|
9873
9873
|
};
|
|
9874
9874
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
|
|
@@ -9893,7 +9893,7 @@ const CustomRender = (props) => {
|
|
|
9893
9893
|
}
|
|
9894
9894
|
));
|
|
9895
9895
|
};
|
|
9896
|
-
const defaultProps$
|
|
9896
|
+
const defaultProps$14 = {
|
|
9897
9897
|
type: "custom",
|
|
9898
9898
|
existList: [],
|
|
9899
9899
|
defaultIcon: null,
|
|
@@ -9912,7 +9912,7 @@ const ExistRender = (props) => {
|
|
|
9912
9912
|
onSelect,
|
|
9913
9913
|
onSwitch,
|
|
9914
9914
|
...rest
|
|
9915
|
-
} = { ...defaultProps$
|
|
9915
|
+
} = { ...defaultProps$14, ...props };
|
|
9916
9916
|
const classPrefix2 = "nut-address";
|
|
9917
9917
|
const selectedExist = (item) => {
|
|
9918
9918
|
existList.forEach((list, index) => {
|
|
@@ -9941,7 +9941,7 @@ const ExistRender = (props) => {
|
|
|
9941
9941
|
);
|
|
9942
9942
|
})), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
|
|
9943
9943
|
};
|
|
9944
|
-
const defaultProps$
|
|
9944
|
+
const defaultProps$13 = {
|
|
9945
9945
|
...ComponentDefaults,
|
|
9946
9946
|
defaultValue: [],
|
|
9947
9947
|
type: "custom",
|
|
@@ -9983,7 +9983,7 @@ const InternalAddress = (props, ref) => {
|
|
|
9983
9983
|
onSwitch,
|
|
9984
9984
|
...rest
|
|
9985
9985
|
} = {
|
|
9986
|
-
...defaultProps$
|
|
9986
|
+
...defaultProps$13,
|
|
9987
9987
|
...props
|
|
9988
9988
|
};
|
|
9989
9989
|
const classPrefix2 = "nut-address";
|
|
@@ -10321,7 +10321,7 @@ const isEnd = (day, days) => {
|
|
|
10321
10321
|
const isStartAndEnd = (days) => {
|
|
10322
10322
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
10323
10323
|
};
|
|
10324
|
-
const defaultProps$
|
|
10324
|
+
const defaultProps$12 = {
|
|
10325
10325
|
...ComponentDefaults,
|
|
10326
10326
|
type: "single",
|
|
10327
10327
|
autoBackfill: false,
|
|
@@ -10382,7 +10382,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10382
10382
|
onUpdate,
|
|
10383
10383
|
onDayClick,
|
|
10384
10384
|
onPageChange
|
|
10385
|
-
} = { ...defaultProps$
|
|
10385
|
+
} = { ...defaultProps$12, ...props };
|
|
10386
10386
|
const weekdays = locale.calendaritem.weekdays;
|
|
10387
10387
|
const weeks = [
|
|
10388
10388
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -10921,7 +10921,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10921
10921
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
10922
10922
|
});
|
|
10923
10923
|
CalendarItem.displayName = "NutCalendarItem";
|
|
10924
|
-
const defaultProps$
|
|
10924
|
+
const defaultProps$11 = {
|
|
10925
10925
|
...ComponentDefaults,
|
|
10926
10926
|
type: "single",
|
|
10927
10927
|
autoBackfill: false,
|
|
@@ -10984,7 +10984,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
10984
10984
|
onConfirm,
|
|
10985
10985
|
onDayClick,
|
|
10986
10986
|
onPageChange
|
|
10987
|
-
} = { ...defaultProps$
|
|
10987
|
+
} = { ...defaultProps$11, ...props };
|
|
10988
10988
|
const calendarRef = useRef(null);
|
|
10989
10989
|
const close = () => {
|
|
10990
10990
|
onClose && onClose();
|
|
@@ -11164,7 +11164,7 @@ const getCurrentWeekDays = (day, firstDayOfWeek) => {
|
|
|
11164
11164
|
)
|
|
11165
11165
|
];
|
|
11166
11166
|
};
|
|
11167
|
-
const defaultProps
|
|
11167
|
+
const defaultProps$10 = {
|
|
11168
11168
|
...ComponentDefaults,
|
|
11169
11169
|
type: "single",
|
|
11170
11170
|
firstDayOfWeek: 0
|
|
@@ -11188,7 +11188,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
11188
11188
|
onDayClick,
|
|
11189
11189
|
onPageChange,
|
|
11190
11190
|
onChange
|
|
11191
|
-
} = { ...defaultProps
|
|
11191
|
+
} = { ...defaultProps$10, ...props };
|
|
11192
11192
|
const [month, setMonth] = useState(() => {
|
|
11193
11193
|
let date4 = new Date(Date.now());
|
|
11194
11194
|
const val = value || defaultValue;
|
|
@@ -11492,7 +11492,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
11492
11492
|
});
|
|
11493
11493
|
CalendarCard.displayName = "NutCalendarCard";
|
|
11494
11494
|
const CheckboxGroupContext = createContext(null);
|
|
11495
|
-
const defaultProps
|
|
11495
|
+
const defaultProps$$ = {
|
|
11496
11496
|
max: void 0,
|
|
11497
11497
|
min: void 0,
|
|
11498
11498
|
list: false,
|
|
@@ -11522,7 +11522,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
11522
11522
|
onChange,
|
|
11523
11523
|
onLimit,
|
|
11524
11524
|
...rest
|
|
11525
|
-
} = { ...defaultProps
|
|
11525
|
+
} = { ...defaultProps$$, ...props };
|
|
11526
11526
|
useImperativeHandle(ref, () => ({
|
|
11527
11527
|
toggle(state) {
|
|
11528
11528
|
if (state === false) {
|
|
@@ -11615,7 +11615,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
11615
11615
|
}
|
|
11616
11616
|
);
|
|
11617
11617
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
11618
|
-
const defaultProps$
|
|
11618
|
+
const defaultProps$_ = {
|
|
11619
11619
|
...ComponentDefaults,
|
|
11620
11620
|
disabled: false,
|
|
11621
11621
|
shape: "round",
|
|
@@ -11629,7 +11629,7 @@ const defaultProps$Z = {
|
|
|
11629
11629
|
const classPrefix$h = "nut-checkbox";
|
|
11630
11630
|
const Checkbox = (props) => {
|
|
11631
11631
|
const { children } = {
|
|
11632
|
-
...defaultProps$
|
|
11632
|
+
...defaultProps$_,
|
|
11633
11633
|
...props
|
|
11634
11634
|
};
|
|
11635
11635
|
const {
|
|
@@ -12006,7 +12006,7 @@ function useRefs() {
|
|
|
12006
12006
|
}, []);
|
|
12007
12007
|
return [refs.current, setRefs, reset];
|
|
12008
12008
|
}
|
|
12009
|
-
const defaultProps$
|
|
12009
|
+
const defaultProps$Z = {
|
|
12010
12010
|
...ComponentDefaults,
|
|
12011
12011
|
title: "",
|
|
12012
12012
|
options: [],
|
|
@@ -12036,7 +12036,7 @@ const InternalPicker = (props, ref) => {
|
|
|
12036
12036
|
afterClose,
|
|
12037
12037
|
onChange,
|
|
12038
12038
|
...rest
|
|
12039
|
-
} = { ...defaultProps$
|
|
12039
|
+
} = { ...defaultProps$Z, ...props };
|
|
12040
12040
|
const classPrefix2 = "nut-picker";
|
|
12041
12041
|
const classes = classNames(classPrefix2, className);
|
|
12042
12042
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -12277,7 +12277,7 @@ const padZero = (num, targetLength = 2) => {
|
|
|
12277
12277
|
return str;
|
|
12278
12278
|
};
|
|
12279
12279
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
12280
|
-
const defaultProps$
|
|
12280
|
+
const defaultProps$Y = {
|
|
12281
12281
|
...ComponentDefaults,
|
|
12282
12282
|
visible: false,
|
|
12283
12283
|
title: "",
|
|
@@ -12310,7 +12310,7 @@ const DatePicker = (props) => {
|
|
|
12310
12310
|
style,
|
|
12311
12311
|
...rest
|
|
12312
12312
|
} = {
|
|
12313
|
-
...defaultProps$
|
|
12313
|
+
...defaultProps$Y,
|
|
12314
12314
|
...props
|
|
12315
12315
|
};
|
|
12316
12316
|
const { locale } = useConfig();
|
|
@@ -13821,7 +13821,7 @@ const useForm = (form) => {
|
|
|
13821
13821
|
}
|
|
13822
13822
|
return [formRef.current];
|
|
13823
13823
|
};
|
|
13824
|
-
const defaultProps$
|
|
13824
|
+
const defaultProps$X = {
|
|
13825
13825
|
...ComponentDefaults,
|
|
13826
13826
|
labelPosition: "right",
|
|
13827
13827
|
starPosition: "left",
|
|
@@ -13852,7 +13852,7 @@ const Form = React__default.forwardRef(
|
|
|
13852
13852
|
starPosition,
|
|
13853
13853
|
form
|
|
13854
13854
|
} = {
|
|
13855
|
-
...defaultProps$
|
|
13855
|
+
...defaultProps$X,
|
|
13856
13856
|
...props
|
|
13857
13857
|
};
|
|
13858
13858
|
let formInstance;
|
|
@@ -13908,7 +13908,7 @@ function isForwardRefComponent(component) {
|
|
|
13908
13908
|
}
|
|
13909
13909
|
).$$typeof === component.type.$$typeof;
|
|
13910
13910
|
}
|
|
13911
|
-
const defaultProps$
|
|
13911
|
+
const defaultProps$W = {
|
|
13912
13912
|
...ComponentDefaults,
|
|
13913
13913
|
required: false,
|
|
13914
13914
|
name: "",
|
|
@@ -14001,9 +14001,10 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
14001
14001
|
rules: rules2,
|
|
14002
14002
|
className,
|
|
14003
14003
|
style,
|
|
14004
|
-
errorMessageAlign
|
|
14004
|
+
errorMessageAlign,
|
|
14005
|
+
align
|
|
14005
14006
|
} = {
|
|
14006
|
-
...defaultProps$
|
|
14007
|
+
...defaultProps$W,
|
|
14007
14008
|
...this.props
|
|
14008
14009
|
};
|
|
14009
14010
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -14016,6 +14017,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
14016
14017
|
{
|
|
14017
14018
|
className: `nut-form-item ${className}`,
|
|
14018
14019
|
style,
|
|
14020
|
+
align,
|
|
14019
14021
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
14020
14022
|
},
|
|
14021
14023
|
label ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -14069,7 +14071,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
14069
14071
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
14070
14072
|
}
|
|
14071
14073
|
};
|
|
14072
|
-
_FormItem.defaultProps = defaultProps$
|
|
14074
|
+
_FormItem.defaultProps = defaultProps$W;
|
|
14073
14075
|
_FormItem.contextType = Context;
|
|
14074
14076
|
let FormItem = _FormItem;
|
|
14075
14077
|
const InnerForm = Form;
|
|
@@ -14099,7 +14101,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
14099
14101
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
14100
14102
|
return value.replace(regExp, "");
|
|
14101
14103
|
}
|
|
14102
|
-
const defaultProps$
|
|
14104
|
+
const defaultProps$V = {
|
|
14103
14105
|
...ComponentDefaults,
|
|
14104
14106
|
type: "text",
|
|
14105
14107
|
name: "",
|
|
@@ -14145,7 +14147,7 @@ const Input = forwardRef(
|
|
|
14145
14147
|
onCompositionEnd,
|
|
14146
14148
|
...rest
|
|
14147
14149
|
} = {
|
|
14148
|
-
...defaultProps$
|
|
14150
|
+
...defaultProps$V,
|
|
14149
14151
|
...props
|
|
14150
14152
|
};
|
|
14151
14153
|
const [value, setValue] = usePropsValue({
|
|
@@ -14290,7 +14292,7 @@ const Input = forwardRef(
|
|
|
14290
14292
|
}
|
|
14291
14293
|
);
|
|
14292
14294
|
Input.displayName = "NutInput";
|
|
14293
|
-
const defaultProps$
|
|
14295
|
+
const defaultProps$U = {
|
|
14294
14296
|
...ComponentDefaults,
|
|
14295
14297
|
disabled: false,
|
|
14296
14298
|
readOnly: false,
|
|
@@ -14326,7 +14328,7 @@ const InputNumber = (props) => {
|
|
|
14326
14328
|
onChange,
|
|
14327
14329
|
...restProps
|
|
14328
14330
|
} = {
|
|
14329
|
-
...defaultProps$
|
|
14331
|
+
...defaultProps$U,
|
|
14330
14332
|
...props
|
|
14331
14333
|
};
|
|
14332
14334
|
const classes = classNames(classPrefix$g, className, {
|
|
@@ -14417,6 +14419,17 @@ const InputNumber = (props) => {
|
|
|
14417
14419
|
if (text === "-") return null;
|
|
14418
14420
|
return text;
|
|
14419
14421
|
};
|
|
14422
|
+
const clampValue = (valueStr) => {
|
|
14423
|
+
if (valueStr === null) return defaultValue;
|
|
14424
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
14425
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
14426
|
+
};
|
|
14427
|
+
const handleValueChange = (valueStr, e2) => {
|
|
14428
|
+
const val = clampValue(valueStr);
|
|
14429
|
+
if (val !== Number(shadowValue)) {
|
|
14430
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
14431
|
+
}
|
|
14432
|
+
};
|
|
14420
14433
|
const handleInputChange = (e2) => {
|
|
14421
14434
|
setInputValue(e2.target.value);
|
|
14422
14435
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -14427,26 +14440,31 @@ const InputNumber = (props) => {
|
|
|
14427
14440
|
setShadowValue(defaultValue);
|
|
14428
14441
|
}
|
|
14429
14442
|
} else {
|
|
14430
|
-
setShadowValue(valueStr);
|
|
14431
|
-
}
|
|
14432
|
-
if (!async) {
|
|
14433
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
14443
|
+
setShadowValue(clampValue(valueStr));
|
|
14434
14444
|
}
|
|
14445
|
+
!async && handleValueChange(valueStr, e2);
|
|
14435
14446
|
};
|
|
14436
14447
|
const handleFocus = (e2) => {
|
|
14437
14448
|
setFocused(true);
|
|
14438
14449
|
setInputValue(
|
|
14439
14450
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
14440
14451
|
);
|
|
14441
|
-
onFocus
|
|
14452
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
14442
14453
|
};
|
|
14443
14454
|
const handleBlur = (e2) => {
|
|
14444
14455
|
setFocused(false);
|
|
14445
|
-
onBlur
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14456
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
14457
|
+
const valueStr = parseValue(e2.target.value);
|
|
14458
|
+
if (valueStr === null) {
|
|
14459
|
+
if (allowEmpty) {
|
|
14460
|
+
setShadowValue(null);
|
|
14461
|
+
} else {
|
|
14462
|
+
setShadowValue(defaultValue);
|
|
14463
|
+
}
|
|
14464
|
+
} else {
|
|
14465
|
+
setShadowValue(clampValue(valueStr));
|
|
14449
14466
|
}
|
|
14467
|
+
async && handleValueChange(valueStr, e2);
|
|
14450
14468
|
};
|
|
14451
14469
|
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(
|
|
14452
14470
|
e$6,
|
|
@@ -14526,8 +14544,9 @@ function useClickAway(onClickAway, target, eventName = "click", useCapture, isLi
|
|
|
14526
14544
|
};
|
|
14527
14545
|
}, [target]);
|
|
14528
14546
|
}
|
|
14529
|
-
const defaultProps$
|
|
14547
|
+
const defaultProps$T = {
|
|
14530
14548
|
...ComponentDefaults,
|
|
14549
|
+
titleIcon: null,
|
|
14531
14550
|
columns: 1,
|
|
14532
14551
|
direction: "down",
|
|
14533
14552
|
icon: null,
|
|
@@ -14557,7 +14576,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
14557
14576
|
parent,
|
|
14558
14577
|
index
|
|
14559
14578
|
} = {
|
|
14560
|
-
...defaultProps$
|
|
14579
|
+
...defaultProps$T,
|
|
14561
14580
|
...props
|
|
14562
14581
|
};
|
|
14563
14582
|
const [showPopup, setShowPopup] = useState(show2);
|
|
@@ -14726,7 +14745,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
14726
14745
|
));
|
|
14727
14746
|
});
|
|
14728
14747
|
MenuItem.displayName = "NutMenuItem";
|
|
14729
|
-
const defaultProps$
|
|
14748
|
+
const defaultProps$S = {
|
|
14730
14749
|
...ComponentDefaults,
|
|
14731
14750
|
activeColor: "",
|
|
14732
14751
|
closeOnOverlayClick: true,
|
|
@@ -14753,7 +14772,7 @@ const Menu = (props) => {
|
|
|
14753
14772
|
onOpen,
|
|
14754
14773
|
...rest
|
|
14755
14774
|
} = {
|
|
14756
|
-
...defaultProps$
|
|
14775
|
+
...defaultProps$S,
|
|
14757
14776
|
...props
|
|
14758
14777
|
};
|
|
14759
14778
|
const menuRef = useRef(null);
|
|
@@ -14818,7 +14837,15 @@ const Menu = (props) => {
|
|
|
14818
14837
|
const menuTitle = () => {
|
|
14819
14838
|
return React__default.Children.map(children, (child, index) => {
|
|
14820
14839
|
if (React__default.isValidElement(child)) {
|
|
14821
|
-
const {
|
|
14840
|
+
const {
|
|
14841
|
+
title,
|
|
14842
|
+
titleIcon,
|
|
14843
|
+
options: options2,
|
|
14844
|
+
value,
|
|
14845
|
+
defaultValue,
|
|
14846
|
+
disabled,
|
|
14847
|
+
direction
|
|
14848
|
+
} = child.props;
|
|
14822
14849
|
const selected = options2 == null ? void 0 : options2.filter(
|
|
14823
14850
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
14824
14851
|
);
|
|
@@ -14829,6 +14856,25 @@ const Menu = (props) => {
|
|
|
14829
14856
|
return selected[0].text;
|
|
14830
14857
|
return "";
|
|
14831
14858
|
};
|
|
14859
|
+
const finallyIcon = () => {
|
|
14860
|
+
if (titleIcon) return titleIcon;
|
|
14861
|
+
if (icon) return icon;
|
|
14862
|
+
return direction === "up" ? /* @__PURE__ */ React__default.createElement(
|
|
14863
|
+
l$2,
|
|
14864
|
+
{
|
|
14865
|
+
className: "nut-menu-title-icon",
|
|
14866
|
+
width: "12px",
|
|
14867
|
+
height: "12px"
|
|
14868
|
+
}
|
|
14869
|
+
) : /* @__PURE__ */ React__default.createElement(
|
|
14870
|
+
l$3,
|
|
14871
|
+
{
|
|
14872
|
+
className: "nut-menu-title-icon",
|
|
14873
|
+
width: "12px",
|
|
14874
|
+
height: "12px"
|
|
14875
|
+
}
|
|
14876
|
+
);
|
|
14877
|
+
};
|
|
14832
14878
|
return /* @__PURE__ */ React__default.createElement(
|
|
14833
14879
|
"div",
|
|
14834
14880
|
{
|
|
@@ -14845,21 +14891,7 @@ const Menu = (props) => {
|
|
|
14845
14891
|
}
|
|
14846
14892
|
},
|
|
14847
14893
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
14848
|
-
|
|
14849
|
-
l$2,
|
|
14850
|
-
{
|
|
14851
|
-
className: "nut-menu-title-icon",
|
|
14852
|
-
width: "12px",
|
|
14853
|
-
height: "12px"
|
|
14854
|
-
}
|
|
14855
|
-
) : /* @__PURE__ */ React__default.createElement(
|
|
14856
|
-
l$3,
|
|
14857
|
-
{
|
|
14858
|
-
className: "nut-menu-title-icon",
|
|
14859
|
-
width: "12px",
|
|
14860
|
-
height: "12px"
|
|
14861
|
-
}
|
|
14862
|
-
))
|
|
14894
|
+
finallyIcon()
|
|
14863
14895
|
);
|
|
14864
14896
|
}
|
|
14865
14897
|
return null;
|
|
@@ -14888,6 +14920,16 @@ const Menu = (props) => {
|
|
|
14888
14920
|
};
|
|
14889
14921
|
Menu.displayName = "NutMenu";
|
|
14890
14922
|
Menu.Item = MenuItem;
|
|
14923
|
+
const defaultProps$R = {
|
|
14924
|
+
...ComponentDefaults,
|
|
14925
|
+
visible: false,
|
|
14926
|
+
rightActions: "",
|
|
14927
|
+
type: "default",
|
|
14928
|
+
custom: [],
|
|
14929
|
+
random: false,
|
|
14930
|
+
onClose: () => {
|
|
14931
|
+
}
|
|
14932
|
+
};
|
|
14891
14933
|
const NumberKeyboard = (props) => {
|
|
14892
14934
|
const { locale } = useConfig();
|
|
14893
14935
|
const {
|
|
@@ -14905,7 +14947,7 @@ const NumberKeyboard = (props) => {
|
|
|
14905
14947
|
onClose,
|
|
14906
14948
|
onConfirm,
|
|
14907
14949
|
...rest
|
|
14908
|
-
} = props;
|
|
14950
|
+
} = { ...defaultProps$R, ...props };
|
|
14909
14951
|
const classPrefix2 = "nut-numberkeyboard";
|
|
14910
14952
|
const getBasicKeys = () => {
|
|
14911
14953
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -14957,17 +14999,35 @@ const NumberKeyboard = (props) => {
|
|
|
14957
14999
|
};
|
|
14958
15000
|
const onTouchEnd = (item2) => {
|
|
14959
15001
|
setActive(false);
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
15002
|
+
switch (item2.type) {
|
|
15003
|
+
case "num":
|
|
15004
|
+
case "custom":
|
|
15005
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
15006
|
+
break;
|
|
15007
|
+
case "close":
|
|
15008
|
+
onClose == null ? void 0 : onClose();
|
|
15009
|
+
break;
|
|
15010
|
+
case "delete":
|
|
15011
|
+
onDelete == null ? void 0 : onDelete();
|
|
15012
|
+
break;
|
|
15013
|
+
case "confirm":
|
|
15014
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
15015
|
+
break;
|
|
14968
15016
|
}
|
|
14969
|
-
|
|
14970
|
-
|
|
15017
|
+
};
|
|
15018
|
+
const renderContent = (item2) => {
|
|
15019
|
+
switch (item2.type) {
|
|
15020
|
+
case "num":
|
|
15021
|
+
case "custom":
|
|
15022
|
+
return /* @__PURE__ */ React__default.createElement("div", null, item2.id);
|
|
15023
|
+
case "delete":
|
|
15024
|
+
return /* @__PURE__ */ React__default.createElement(DeleteIcon, null);
|
|
15025
|
+
case "close":
|
|
15026
|
+
return /* @__PURE__ */ React__default.createElement(l$3, { width: 18, height: 18 });
|
|
15027
|
+
case "confirm":
|
|
15028
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done);
|
|
15029
|
+
default:
|
|
15030
|
+
return null;
|
|
14971
15031
|
}
|
|
14972
15032
|
};
|
|
14973
15033
|
return /* @__PURE__ */ React__default.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React__default.createElement(
|
|
@@ -14984,22 +15044,19 @@ const NumberKeyboard = (props) => {
|
|
|
14984
15044
|
onTouchEnd: () => onTouchEnd(item),
|
|
14985
15045
|
onTouchCancel: () => onTouchEnd(item)
|
|
14986
15046
|
},
|
|
14987
|
-
(item
|
|
14988
|
-
item.type === "delete" && /* @__PURE__ */ React__default.createElement(DeleteIcon, null),
|
|
14989
|
-
item.type === "close" && /* @__PURE__ */ React__default.createElement(l$3, { width: 18, height: 18 }),
|
|
14990
|
-
item.type === "confirm" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done)
|
|
15047
|
+
renderContent(item)
|
|
14991
15048
|
));
|
|
14992
15049
|
};
|
|
14993
15050
|
return /* @__PURE__ */ React__default.createElement(
|
|
14994
15051
|
Popup,
|
|
14995
15052
|
{
|
|
15053
|
+
...rest,
|
|
14996
15054
|
visible,
|
|
14997
15055
|
position: "bottom",
|
|
14998
15056
|
onOverlayClick: onClose,
|
|
14999
15057
|
onCloseIconClick: onClose,
|
|
15000
15058
|
zIndex: 9999,
|
|
15001
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15002
|
-
...rest
|
|
15059
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15003
15060
|
},
|
|
15004
15061
|
/* @__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(
|
|
15005
15062
|
"span",
|