@nutui/nutui-react 2.0.10 → 2.0.11
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 +15 -0
- package/dist/esm/Input.js +3 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Popover.js +36 -3
- package/dist/esm/Switch.js +5 -3
- package/dist/esm/Tour/style/css.js +1 -0
- package/dist/esm/Tour/style/index.js +2 -0
- package/dist/esm/Tour/style/style.css +1 -0
- package/dist/esm/Tour.js +183 -0
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/configprovider2.js +5 -0
- package/dist/esm/nutui-react.es.js +18 -16
- package/dist/esm/tabbaritem2.js +5 -3
- package/dist/esm/types/src/locales/base.d.ts +5 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/popover.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/tour/__test__/tour.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/tour/demo.d.ts +4 -0
- package/dist/esm/types/src/packages/tour/demo.taro.d.ts +4 -0
- package/dist/esm/types/src/packages/tour/index.d.ts +3 -0
- package/dist/esm/types/src/packages/tour/index.taro.d.ts +3 -0
- package/dist/esm/types/src/packages/tour/tour.d.ts +31 -0
- package/dist/esm/types/src/packages/tour/tour.taro.d.ts +31 -0
- package/dist/esm/types/src/utils/typings.d.ts +1 -0
- package/dist/esm/types/src/utils/use-taro-rect.d.ts +1 -0
- package/dist/locales/base.d.ts +5 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +6 -1
- package/dist/locales/id-ID.js +6 -1
- package/dist/locales/tr-TR.js +6 -1
- package/dist/locales/zh-CN.js +6 -1
- package/dist/locales/zh-TW.js +6 -1
- package/dist/locales/zh-UG.js +6 -1
- package/dist/nutui.react.es.js +552 -341
- package/dist/nutui.react.umd.js +552 -341
- package/dist/packages/tour/tour.scss +78 -0
- package/dist/packages/uploader/uploader.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables.scss +33 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/locales/base.d.ts +5 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/popover/popover.d.ts +5 -0
- package/dist/types/packages/tour/index.d.ts +3 -0
- package/dist/types/packages/tour/tour.d.ts +95 -0
- package/dist/types/utils/typings.d.ts +1 -0
- package/package.json +1 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v2.0.
|
|
9
|
+
* @nutui/nutui-react v2.0.11 Wed Aug 09 2023 13:48:21 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -2438,7 +2438,7 @@ const ComponentDefaults = {
|
|
|
2438
2438
|
style: {}
|
|
2439
2439
|
};
|
|
2440
2440
|
const prefixCls$1 = "nut-button";
|
|
2441
|
-
const defaultProps$
|
|
2441
|
+
const defaultProps$1s = {
|
|
2442
2442
|
...ComponentDefaults,
|
|
2443
2443
|
color: "",
|
|
2444
2444
|
type: "default",
|
|
@@ -2472,7 +2472,7 @@ const Button = React__default.forwardRef(
|
|
|
2472
2472
|
nativeType,
|
|
2473
2473
|
...rest
|
|
2474
2474
|
} = {
|
|
2475
|
-
...defaultProps$
|
|
2475
|
+
...defaultProps$1s,
|
|
2476
2476
|
...props
|
|
2477
2477
|
};
|
|
2478
2478
|
const getStyle = useCallback(() => {
|
|
@@ -2523,29 +2523,29 @@ const Button = React__default.forwardRef(
|
|
|
2523
2523
|
}
|
|
2524
2524
|
);
|
|
2525
2525
|
Button.displayName = "NutButton";
|
|
2526
|
-
const defaultProps$
|
|
2526
|
+
const defaultProps$1r = {
|
|
2527
2527
|
...ComponentDefaults,
|
|
2528
2528
|
title: "",
|
|
2529
2529
|
description: "",
|
|
2530
2530
|
divider: true
|
|
2531
2531
|
};
|
|
2532
|
-
const classPrefix$
|
|
2532
|
+
const classPrefix$p = "nut-cell-group";
|
|
2533
2533
|
const CellGroup = (props) => {
|
|
2534
2534
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2535
|
-
...defaultProps$
|
|
2535
|
+
...defaultProps$1r,
|
|
2536
2536
|
...props
|
|
2537
2537
|
};
|
|
2538
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$
|
|
2538
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$p, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$p}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$p}__description` }, description) : null, /* @__PURE__ */ React__default.createElement(
|
|
2539
2539
|
"div",
|
|
2540
2540
|
{
|
|
2541
|
-
className: `${classPrefix$
|
|
2541
|
+
className: `${classPrefix$p}__wrap ${divider ? `${classPrefix$p}__wrap--divider` : ""}`
|
|
2542
2542
|
},
|
|
2543
2543
|
children
|
|
2544
2544
|
));
|
|
2545
2545
|
};
|
|
2546
|
-
CellGroup.defaultProps = defaultProps$
|
|
2546
|
+
CellGroup.defaultProps = defaultProps$1r;
|
|
2547
2547
|
CellGroup.displayName = "NutCellGroup";
|
|
2548
|
-
const defaultProps$
|
|
2548
|
+
const defaultProps$1q = {
|
|
2549
2549
|
...ComponentDefaults,
|
|
2550
2550
|
title: null,
|
|
2551
2551
|
description: null,
|
|
@@ -2555,7 +2555,7 @@ const defaultProps$1p = {
|
|
|
2555
2555
|
onClick: (event) => {
|
|
2556
2556
|
}
|
|
2557
2557
|
};
|
|
2558
|
-
const classPrefix$
|
|
2558
|
+
const classPrefix$o = "nut-cell";
|
|
2559
2559
|
const Cell = (props) => {
|
|
2560
2560
|
const {
|
|
2561
2561
|
children,
|
|
@@ -2569,7 +2569,7 @@ const Cell = (props) => {
|
|
|
2569
2569
|
style,
|
|
2570
2570
|
...rest
|
|
2571
2571
|
} = {
|
|
2572
|
-
...defaultProps$
|
|
2572
|
+
...defaultProps$1q,
|
|
2573
2573
|
...props
|
|
2574
2574
|
};
|
|
2575
2575
|
const handleClick2 = (event) => {
|
|
@@ -2586,22 +2586,22 @@ const Cell = (props) => {
|
|
|
2586
2586
|
return /* @__PURE__ */ React__default.createElement(
|
|
2587
2587
|
"div",
|
|
2588
2588
|
{
|
|
2589
|
-
className: classNames(classPrefix$
|
|
2589
|
+
className: classNames(classPrefix$o, className),
|
|
2590
2590
|
onClick: (event) => handleClick2(event),
|
|
2591
2591
|
style: baseStyle,
|
|
2592
2592
|
...rest
|
|
2593
2593
|
},
|
|
2594
|
-
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2594
|
+
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__left` }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React__default.createElement(
|
|
2595
2595
|
"div",
|
|
2596
2596
|
{
|
|
2597
|
-
className: `${classPrefix$
|
|
2597
|
+
className: `${classPrefix$o}__extra`,
|
|
2598
2598
|
style: styles
|
|
2599
2599
|
},
|
|
2600
2600
|
extra
|
|
2601
|
-
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2601
|
+
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__divider` }))
|
|
2602
2602
|
);
|
|
2603
2603
|
};
|
|
2604
|
-
Cell.defaultProps = defaultProps$
|
|
2604
|
+
Cell.defaultProps = defaultProps$1q;
|
|
2605
2605
|
Cell.displayName = "NutCell";
|
|
2606
2606
|
Cell.Group = CellGroup;
|
|
2607
2607
|
var INFINITY = 1 / 0;
|
|
@@ -3679,11 +3679,16 @@ const zhCN = {
|
|
|
3679
3679
|
refreshingText: "加载中...",
|
|
3680
3680
|
completeText: "刷新成功"
|
|
3681
3681
|
},
|
|
3682
|
+
tour: {
|
|
3683
|
+
prevStepText: "上一步",
|
|
3684
|
+
completeText: "完成",
|
|
3685
|
+
nextStepText: "下一步"
|
|
3686
|
+
},
|
|
3682
3687
|
watermark: {
|
|
3683
3688
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
3684
3689
|
}
|
|
3685
3690
|
};
|
|
3686
|
-
const classPrefix$
|
|
3691
|
+
const classPrefix$n = "nut-configprovider";
|
|
3687
3692
|
const defaultConfigRef = {
|
|
3688
3693
|
current: {
|
|
3689
3694
|
locale: zhCN
|
|
@@ -3724,7 +3729,7 @@ const ConfigProvider = (props) => {
|
|
|
3724
3729
|
return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, { value: mergedConfig }, /* @__PURE__ */ React__default.createElement(
|
|
3725
3730
|
"div",
|
|
3726
3731
|
{
|
|
3727
|
-
className: classNames(classPrefix$
|
|
3732
|
+
className: classNames(classPrefix$n, className),
|
|
3728
3733
|
style: {
|
|
3729
3734
|
...cssVarStyle,
|
|
3730
3735
|
...style
|
|
@@ -3737,7 +3742,7 @@ ConfigProvider.displayName = "NutConfigProvider";
|
|
|
3737
3742
|
const pxCheck = (value) => {
|
|
3738
3743
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
3739
3744
|
};
|
|
3740
|
-
const defaultProps$
|
|
3745
|
+
const defaultProps$1p = {
|
|
3741
3746
|
...ComponentDefaults,
|
|
3742
3747
|
fit: "fill",
|
|
3743
3748
|
position: "center",
|
|
@@ -3748,7 +3753,7 @@ const defaultProps$1o = {
|
|
|
3748
3753
|
loading: true,
|
|
3749
3754
|
lazy: false
|
|
3750
3755
|
};
|
|
3751
|
-
const classPrefix$
|
|
3756
|
+
const classPrefix$m = "nut-image";
|
|
3752
3757
|
const Image$1 = (props) => {
|
|
3753
3758
|
const {
|
|
3754
3759
|
className,
|
|
@@ -3766,7 +3771,7 @@ const Image$1 = (props) => {
|
|
|
3766
3771
|
onClick,
|
|
3767
3772
|
onLoad,
|
|
3768
3773
|
onError
|
|
3769
|
-
} = { ...defaultProps$
|
|
3774
|
+
} = { ...defaultProps$1p, ...props };
|
|
3770
3775
|
const [innerLoading, setInnerLoading] = useState(true);
|
|
3771
3776
|
const [isError, setIsError] = useState(false);
|
|
3772
3777
|
const imgRef = useRef(null);
|
|
@@ -3859,7 +3864,7 @@ const Image$1 = (props) => {
|
|
|
3859
3864
|
return /* @__PURE__ */ React__default.createElement(
|
|
3860
3865
|
"div",
|
|
3861
3866
|
{
|
|
3862
|
-
className: classNames(classPrefix$
|
|
3867
|
+
className: classNames(classPrefix$m, className),
|
|
3863
3868
|
style: containerStyle,
|
|
3864
3869
|
onClick: (e) => {
|
|
3865
3870
|
imageClick(e);
|
|
@@ -3893,7 +3898,7 @@ const Image$1 = (props) => {
|
|
|
3893
3898
|
renderErrorImg()
|
|
3894
3899
|
);
|
|
3895
3900
|
};
|
|
3896
|
-
Image$1.defaultProps = defaultProps$
|
|
3901
|
+
Image$1.defaultProps = defaultProps$1p;
|
|
3897
3902
|
Image$1.displayName = "NutImage";
|
|
3898
3903
|
function _extends$4() {
|
|
3899
3904
|
_extends$4 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -5718,7 +5723,7 @@ const Overlay = (props) => {
|
|
|
5718
5723
|
Overlay.defaultProps = defaultOverlayProps;
|
|
5719
5724
|
Overlay.displayName = "NutOverlay";
|
|
5720
5725
|
const DataContext$2 = createContext({});
|
|
5721
|
-
const defaultProps$
|
|
5726
|
+
const defaultProps$1o = {
|
|
5722
5727
|
...ComponentDefaults,
|
|
5723
5728
|
span: "24",
|
|
5724
5729
|
offset: "0",
|
|
@@ -5726,7 +5731,7 @@ const defaultProps$1n = {
|
|
|
5726
5731
|
};
|
|
5727
5732
|
const Col = (props) => {
|
|
5728
5733
|
const { className, style, span, offset, children, onClick } = {
|
|
5729
|
-
...defaultProps$
|
|
5734
|
+
...defaultProps$1o,
|
|
5730
5735
|
...props
|
|
5731
5736
|
};
|
|
5732
5737
|
const [colName, setColName] = useState("");
|
|
@@ -5758,39 +5763,39 @@ const Col = (props) => {
|
|
|
5758
5763
|
children
|
|
5759
5764
|
);
|
|
5760
5765
|
};
|
|
5761
|
-
Col.defaultProps = defaultProps$
|
|
5766
|
+
Col.defaultProps = defaultProps$1o;
|
|
5762
5767
|
Col.displayName = "NutCol";
|
|
5763
|
-
const defaultProps$
|
|
5768
|
+
const defaultProps$1n = {
|
|
5764
5769
|
...ComponentDefaults,
|
|
5765
5770
|
contentPosition: "center",
|
|
5766
5771
|
direction: "horizontal"
|
|
5767
5772
|
};
|
|
5768
|
-
const classPrefix$
|
|
5773
|
+
const classPrefix$l = `nut-divider`;
|
|
5769
5774
|
const Divider = (props) => {
|
|
5770
5775
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
5771
|
-
...defaultProps$
|
|
5776
|
+
...defaultProps$1n,
|
|
5772
5777
|
...props
|
|
5773
5778
|
};
|
|
5774
5779
|
const classes = direction === "horizontal" ? classNames({
|
|
5775
|
-
[`${classPrefix$
|
|
5776
|
-
[`${classPrefix$
|
|
5777
|
-
[`${classPrefix$
|
|
5778
|
-
[`${classPrefix$
|
|
5779
|
-
[`${classPrefix$
|
|
5780
|
+
[`${classPrefix$l}`]: true,
|
|
5781
|
+
[`${classPrefix$l}__center`]: children,
|
|
5782
|
+
[`${classPrefix$l}__left`]: contentPosition === "left",
|
|
5783
|
+
[`${classPrefix$l}__right`]: contentPosition === "right",
|
|
5784
|
+
[`${classPrefix$l}__hairline`]: true
|
|
5780
5785
|
}) : classNames({
|
|
5781
|
-
[`${classPrefix$
|
|
5782
|
-
[`${classPrefix$
|
|
5786
|
+
[`${classPrefix$l}`]: true,
|
|
5787
|
+
[`${classPrefix$l}__vertical`]: direction === "vertical"
|
|
5783
5788
|
});
|
|
5784
5789
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
5785
5790
|
};
|
|
5786
|
-
Divider.defaultProps = defaultProps$
|
|
5791
|
+
Divider.defaultProps = defaultProps$1n;
|
|
5787
5792
|
Divider.displayName = "NutDivider";
|
|
5788
5793
|
const gridContext = {
|
|
5789
5794
|
onClick: (item, index) => {
|
|
5790
5795
|
}
|
|
5791
5796
|
};
|
|
5792
5797
|
const GridContext = React__default.createContext(gridContext);
|
|
5793
|
-
const defaultProps$
|
|
5798
|
+
const defaultProps$1m = {
|
|
5794
5799
|
text: "",
|
|
5795
5800
|
columns: 4,
|
|
5796
5801
|
gap: 0,
|
|
@@ -5816,7 +5821,7 @@ const GridItem = (props) => {
|
|
|
5816
5821
|
onClick,
|
|
5817
5822
|
...rest
|
|
5818
5823
|
} = {
|
|
5819
|
-
...defaultProps$
|
|
5824
|
+
...defaultProps$1m,
|
|
5820
5825
|
...props
|
|
5821
5826
|
};
|
|
5822
5827
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -5874,9 +5879,9 @@ const GridItem = (props) => {
|
|
|
5874
5879
|
/* @__PURE__ */ React__default.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children), text && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
5875
5880
|
);
|
|
5876
5881
|
};
|
|
5877
|
-
GridItem.defaultProps = defaultProps$
|
|
5882
|
+
GridItem.defaultProps = defaultProps$1m;
|
|
5878
5883
|
GridItem.displayName = "NutGridItem";
|
|
5879
|
-
const defaultProps$
|
|
5884
|
+
const defaultProps$1l = {
|
|
5880
5885
|
columns: 4,
|
|
5881
5886
|
gap: 0,
|
|
5882
5887
|
center: true,
|
|
@@ -5897,7 +5902,7 @@ const Grid = (props) => {
|
|
|
5897
5902
|
className,
|
|
5898
5903
|
onClick,
|
|
5899
5904
|
...rest
|
|
5900
|
-
} = { ...defaultProps$
|
|
5905
|
+
} = { ...defaultProps$1l, ...props };
|
|
5901
5906
|
const childrenDom = React__default.Children.toArray(children);
|
|
5902
5907
|
const classPrefix2 = "nut-grid";
|
|
5903
5908
|
const rootClass = () => {
|
|
@@ -5927,18 +5932,18 @@ const Grid = (props) => {
|
|
|
5927
5932
|
});
|
|
5928
5933
|
})));
|
|
5929
5934
|
};
|
|
5930
|
-
Grid.defaultProps = defaultProps$
|
|
5935
|
+
Grid.defaultProps = defaultProps$1l;
|
|
5931
5936
|
Grid.displayName = "NutGrid";
|
|
5932
5937
|
Grid.Item = GridItem;
|
|
5933
|
-
const defaultProps$
|
|
5938
|
+
const defaultProps$1k = {};
|
|
5934
5939
|
const Layout = (props) => {
|
|
5935
|
-
({ ...defaultProps$
|
|
5940
|
+
({ ...defaultProps$1k, ...props });
|
|
5936
5941
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
|
|
5937
5942
|
};
|
|
5938
|
-
Layout.defaultProps = defaultProps$
|
|
5943
|
+
Layout.defaultProps = defaultProps$1k;
|
|
5939
5944
|
Layout.displayName = "NutLayout";
|
|
5940
|
-
const classPrefix$
|
|
5941
|
-
const defaultProps$
|
|
5945
|
+
const classPrefix$k = "nut-row";
|
|
5946
|
+
const defaultProps$1j = {
|
|
5942
5947
|
...ComponentDefaults,
|
|
5943
5948
|
type: "",
|
|
5944
5949
|
justify: "start",
|
|
@@ -5958,7 +5963,7 @@ const Row = (props) => {
|
|
|
5958
5963
|
gutter,
|
|
5959
5964
|
onClick
|
|
5960
5965
|
} = {
|
|
5961
|
-
...defaultProps$
|
|
5966
|
+
...defaultProps$1j,
|
|
5962
5967
|
...props
|
|
5963
5968
|
};
|
|
5964
5969
|
const getClass = (prefix2, type22) => {
|
|
@@ -5972,7 +5977,7 @@ const Row = (props) => {
|
|
|
5972
5977
|
${getClass("justify", justify)}
|
|
5973
5978
|
${getClass("align", align)}
|
|
5974
5979
|
${getClass("flex", wrap)}
|
|
5975
|
-
${classPrefix$
|
|
5980
|
+
${classPrefix$k}
|
|
5976
5981
|
`;
|
|
5977
5982
|
};
|
|
5978
5983
|
const parentRow = {
|
|
@@ -5990,15 +5995,15 @@ const Row = (props) => {
|
|
|
5990
5995
|
children
|
|
5991
5996
|
));
|
|
5992
5997
|
};
|
|
5993
|
-
Row.defaultProps = defaultProps$
|
|
5998
|
+
Row.defaultProps = defaultProps$1j;
|
|
5994
5999
|
Row.displayName = "NutRow";
|
|
5995
6000
|
const prefixCls = "nut-space";
|
|
5996
|
-
const defaultProps$
|
|
6001
|
+
const defaultProps$1i = {
|
|
5997
6002
|
direction: "horizontal"
|
|
5998
6003
|
};
|
|
5999
6004
|
const Space = (props) => {
|
|
6000
6005
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
6001
|
-
...defaultProps$
|
|
6006
|
+
...defaultProps$1i,
|
|
6002
6007
|
...props
|
|
6003
6008
|
};
|
|
6004
6009
|
const cls = classNames(
|
|
@@ -6013,7 +6018,7 @@ const Space = (props) => {
|
|
|
6013
6018
|
return child !== null && child !== void 0 && /* @__PURE__ */ React__default.createElement("div", { className: `${prefixCls}-item` }, child);
|
|
6014
6019
|
}));
|
|
6015
6020
|
};
|
|
6016
|
-
Space.defaultProps = defaultProps$
|
|
6021
|
+
Space.defaultProps = defaultProps$1i;
|
|
6017
6022
|
Space.displayName = "NutSpace";
|
|
6018
6023
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
6019
6024
|
const defaultRoot = canUseDom ? window : void 0;
|
|
@@ -6088,13 +6093,13 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
|
6088
6093
|
stop2.current = true;
|
|
6089
6094
|
};
|
|
6090
6095
|
}
|
|
6091
|
-
const defaultProps$
|
|
6096
|
+
const defaultProps$1h = {
|
|
6092
6097
|
...ComponentDefaults,
|
|
6093
6098
|
position: "top",
|
|
6094
6099
|
threshold: 0,
|
|
6095
6100
|
zIndex: 2e3
|
|
6096
6101
|
};
|
|
6097
|
-
const classPrefix$
|
|
6102
|
+
const classPrefix$j = "nut-sticky";
|
|
6098
6103
|
const Sticky = (props) => {
|
|
6099
6104
|
const {
|
|
6100
6105
|
position,
|
|
@@ -6106,7 +6111,7 @@ const Sticky = (props) => {
|
|
|
6106
6111
|
threshold,
|
|
6107
6112
|
onChange,
|
|
6108
6113
|
...rest
|
|
6109
|
-
} = { ...defaultProps$
|
|
6114
|
+
} = { ...defaultProps$1h, ...props };
|
|
6110
6115
|
const stickyRef = useRef(null);
|
|
6111
6116
|
const rootRef = useRef(null);
|
|
6112
6117
|
const [isFixed, setIsFixed] = useState(false);
|
|
@@ -6216,15 +6221,15 @@ const Sticky = (props) => {
|
|
|
6216
6221
|
{
|
|
6217
6222
|
ref: rootRef,
|
|
6218
6223
|
style: { ...style, ...rootStyle },
|
|
6219
|
-
className: classNames(classPrefix$
|
|
6224
|
+
className: classNames(classPrefix$j, className),
|
|
6220
6225
|
...rest
|
|
6221
6226
|
},
|
|
6222
6227
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
|
|
6223
6228
|
);
|
|
6224
6229
|
};
|
|
6225
|
-
Sticky.defaultProps = defaultProps$
|
|
6230
|
+
Sticky.defaultProps = defaultProps$1h;
|
|
6226
6231
|
Sticky.displayName = "NutSticky";
|
|
6227
|
-
const defaultProps$
|
|
6232
|
+
const defaultProps$1g = {
|
|
6228
6233
|
...ComponentDefaults,
|
|
6229
6234
|
target: "",
|
|
6230
6235
|
threshold: 200,
|
|
@@ -6242,7 +6247,7 @@ const BackTop = (props) => {
|
|
|
6242
6247
|
style,
|
|
6243
6248
|
onClick
|
|
6244
6249
|
} = {
|
|
6245
|
-
...defaultProps$
|
|
6250
|
+
...defaultProps$1g,
|
|
6246
6251
|
...props
|
|
6247
6252
|
};
|
|
6248
6253
|
const classPrefix2 = "nut-backtop";
|
|
@@ -6340,7 +6345,7 @@ const BackTop = (props) => {
|
|
|
6340
6345
|
children || /* @__PURE__ */ React__default.createElement(y$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
6341
6346
|
);
|
|
6342
6347
|
};
|
|
6343
|
-
BackTop.defaultProps = defaultProps$
|
|
6348
|
+
BackTop.defaultProps = defaultProps$1g;
|
|
6344
6349
|
BackTop.displayName = "NutBackTop";
|
|
6345
6350
|
function clamp$1(v, min, max) {
|
|
6346
6351
|
return Math.max(min, Math.min(v, max));
|
|
@@ -11458,7 +11463,7 @@ const host = createHost(primitives, {
|
|
|
11458
11463
|
});
|
|
11459
11464
|
const animated = host.animated;
|
|
11460
11465
|
const elevatorContext = createContext({});
|
|
11461
|
-
const defaultProps$
|
|
11466
|
+
const defaultProps$1f = {
|
|
11462
11467
|
...ComponentDefaults,
|
|
11463
11468
|
height: "200px",
|
|
11464
11469
|
floorKey: "title",
|
|
@@ -11484,7 +11489,7 @@ const Elevator = (props) => {
|
|
|
11484
11489
|
children,
|
|
11485
11490
|
...rest
|
|
11486
11491
|
} = {
|
|
11487
|
-
...defaultProps$
|
|
11492
|
+
...defaultProps$1f,
|
|
11488
11493
|
...props
|
|
11489
11494
|
};
|
|
11490
11495
|
const classPrefix2 = "nut-elevator";
|
|
@@ -11659,10 +11664,10 @@ const Elevator = (props) => {
|
|
|
11659
11664
|
})
|
|
11660
11665
|
))) : null);
|
|
11661
11666
|
};
|
|
11662
|
-
Elevator.defaultProps = defaultProps$
|
|
11667
|
+
Elevator.defaultProps = defaultProps$1f;
|
|
11663
11668
|
Elevator.displayName = "NutElevator";
|
|
11664
11669
|
Elevator.Context = elevatorContext;
|
|
11665
|
-
const defaultProps$
|
|
11670
|
+
const defaultProps$1e = {
|
|
11666
11671
|
...ComponentDefaults,
|
|
11667
11672
|
activeText: "",
|
|
11668
11673
|
inactiveText: "",
|
|
@@ -11690,7 +11695,7 @@ const FixedNav = (props) => {
|
|
|
11690
11695
|
content,
|
|
11691
11696
|
...rest
|
|
11692
11697
|
} = {
|
|
11693
|
-
...defaultProps$
|
|
11698
|
+
...defaultProps$1e,
|
|
11694
11699
|
...props
|
|
11695
11700
|
};
|
|
11696
11701
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -11742,9 +11747,9 @@ const FixedNav = (props) => {
|
|
|
11742
11747
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(y$7, { color: "#fff" }), /* @__PURE__ */ React__default.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
11743
11748
|
);
|
|
11744
11749
|
};
|
|
11745
|
-
FixedNav.defaultProps = defaultProps$
|
|
11750
|
+
FixedNav.defaultProps = defaultProps$1e;
|
|
11746
11751
|
FixedNav.displayName = "NutFixedNav";
|
|
11747
|
-
const defaultProps$
|
|
11752
|
+
const defaultProps$1d = {
|
|
11748
11753
|
...ComponentDefaults,
|
|
11749
11754
|
left: "",
|
|
11750
11755
|
right: "",
|
|
@@ -11767,7 +11772,7 @@ const NavBar = (props) => {
|
|
|
11767
11772
|
zIndex,
|
|
11768
11773
|
onBackClick
|
|
11769
11774
|
} = {
|
|
11770
|
-
...defaultProps$
|
|
11775
|
+
...defaultProps$1d,
|
|
11771
11776
|
...props
|
|
11772
11777
|
};
|
|
11773
11778
|
const classPrefix2 = "nut-navbar";
|
|
@@ -11804,9 +11809,9 @@ const NavBar = (props) => {
|
|
|
11804
11809
|
const cls = classNames(classPrefix2, classes, className);
|
|
11805
11810
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
11806
11811
|
};
|
|
11807
|
-
NavBar.defaultProps = defaultProps$
|
|
11812
|
+
NavBar.defaultProps = defaultProps$1d;
|
|
11808
11813
|
NavBar.displayName = "NutNavBar";
|
|
11809
|
-
const defaultProps$
|
|
11814
|
+
const defaultProps$1c = {
|
|
11810
11815
|
...ComponentDefaults,
|
|
11811
11816
|
position: "center",
|
|
11812
11817
|
transition: "",
|
|
@@ -11858,7 +11863,7 @@ const Popup = (props) => {
|
|
|
11858
11863
|
afterShow,
|
|
11859
11864
|
afterClose,
|
|
11860
11865
|
onClick
|
|
11861
|
-
} = { ...defaultProps$
|
|
11866
|
+
} = { ...defaultProps$1c, ...props };
|
|
11862
11867
|
const [index, setIndex] = useState(zIndex || _zIndex);
|
|
11863
11868
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
11864
11869
|
const [showChildren, setShowChildren] = useState(true);
|
|
@@ -11984,7 +11989,7 @@ const Popup = (props) => {
|
|
|
11984
11989
|
}, [position, transition]);
|
|
11985
11990
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(portal, renderNode()));
|
|
11986
11991
|
};
|
|
11987
|
-
Popup.defaultProps = defaultProps$
|
|
11992
|
+
Popup.defaultProps = defaultProps$1c;
|
|
11988
11993
|
Popup.displayName = "NutPopup";
|
|
11989
11994
|
const handleClick = (e) => {
|
|
11990
11995
|
e.stopPropagation();
|
|
@@ -12000,7 +12005,7 @@ const handleClick = (e) => {
|
|
|
12000
12005
|
}
|
|
12001
12006
|
};
|
|
12002
12007
|
const OffsetContext = createContext(20);
|
|
12003
|
-
const defaultProps$
|
|
12008
|
+
const defaultProps$1b = {
|
|
12004
12009
|
...ComponentDefaults,
|
|
12005
12010
|
position: "left",
|
|
12006
12011
|
width: "80%"
|
|
@@ -12017,7 +12022,7 @@ const SideNavBar = (props) => {
|
|
|
12017
12022
|
onClose,
|
|
12018
12023
|
...rest
|
|
12019
12024
|
} = {
|
|
12020
|
-
...defaultProps$
|
|
12025
|
+
...defaultProps$1b,
|
|
12021
12026
|
...props
|
|
12022
12027
|
};
|
|
12023
12028
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -12049,7 +12054,7 @@ const SideNavBar = (props) => {
|
|
|
12049
12054
|
)))
|
|
12050
12055
|
);
|
|
12051
12056
|
};
|
|
12052
|
-
SideNavBar.defaultProps = defaultProps$
|
|
12057
|
+
SideNavBar.defaultProps = defaultProps$1b;
|
|
12053
12058
|
SideNavBar.displayName = "NutSideNavBar";
|
|
12054
12059
|
const SideNavBarItem = (props) => {
|
|
12055
12060
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -12068,13 +12073,13 @@ const SideNavBarItem = (props) => {
|
|
|
12068
12073
|
title
|
|
12069
12074
|
);
|
|
12070
12075
|
};
|
|
12071
|
-
const defaultProps$
|
|
12076
|
+
const defaultProps$1a = {
|
|
12072
12077
|
open: true
|
|
12073
12078
|
};
|
|
12074
12079
|
const SubSideNavBar = (props) => {
|
|
12075
12080
|
const classPrefix2 = "nut-subsidenavbar";
|
|
12076
12081
|
const { title, value, children, onClick, open, ...rest } = {
|
|
12077
|
-
...defaultProps$
|
|
12082
|
+
...defaultProps$1a,
|
|
12078
12083
|
...props
|
|
12079
12084
|
};
|
|
12080
12085
|
const offset = useContext(OffsetContext);
|
|
@@ -12151,7 +12156,7 @@ function usePropsValue({
|
|
|
12151
12156
|
);
|
|
12152
12157
|
return [stateRef.current, setState];
|
|
12153
12158
|
}
|
|
12154
|
-
const defaultProps$
|
|
12159
|
+
const defaultProps$19 = {
|
|
12155
12160
|
...ComponentDefaults,
|
|
12156
12161
|
value: "",
|
|
12157
12162
|
dot: false,
|
|
@@ -12162,7 +12167,7 @@ const defaultProps$18 = {
|
|
|
12162
12167
|
};
|
|
12163
12168
|
const Badge = (props) => {
|
|
12164
12169
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
12165
|
-
...defaultProps$
|
|
12170
|
+
...defaultProps$19,
|
|
12166
12171
|
...props
|
|
12167
12172
|
};
|
|
12168
12173
|
const classPrefix2 = "nut-badge";
|
|
@@ -12189,9 +12194,9 @@ const Badge = (props) => {
|
|
|
12189
12194
|
};
|
|
12190
12195
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React__default.createElement("div", null, children), /* @__PURE__ */ React__default.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
12191
12196
|
};
|
|
12192
|
-
Badge.defaultProps = defaultProps$
|
|
12197
|
+
Badge.defaultProps = defaultProps$19;
|
|
12193
12198
|
Badge.displayName = "NutBadge";
|
|
12194
|
-
const defaultProps$
|
|
12199
|
+
const defaultProps$18 = {
|
|
12195
12200
|
...ComponentDefaults,
|
|
12196
12201
|
title: "",
|
|
12197
12202
|
icon: null,
|
|
@@ -12218,9 +12223,10 @@ const TabbarItem = (props) => {
|
|
|
12218
12223
|
max,
|
|
12219
12224
|
top,
|
|
12220
12225
|
right,
|
|
12221
|
-
handleClick: handleClick2
|
|
12226
|
+
handleClick: handleClick2,
|
|
12227
|
+
...rest
|
|
12222
12228
|
} = {
|
|
12223
|
-
...defaultProps$
|
|
12229
|
+
...defaultProps$18,
|
|
12224
12230
|
...props
|
|
12225
12231
|
};
|
|
12226
12232
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -12247,12 +12253,13 @@ const TabbarItem = (props) => {
|
|
|
12247
12253
|
color: active ? activeColor : inactiveColor,
|
|
12248
12254
|
...style
|
|
12249
12255
|
},
|
|
12250
|
-
onClick: () => handleClick2(index)
|
|
12256
|
+
onClick: () => handleClick2(index),
|
|
12257
|
+
...rest
|
|
12251
12258
|
},
|
|
12252
12259
|
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))
|
|
12253
12260
|
);
|
|
12254
12261
|
};
|
|
12255
|
-
const defaultProps$
|
|
12262
|
+
const defaultProps$17 = {
|
|
12256
12263
|
...ComponentDefaults,
|
|
12257
12264
|
defaultValue: 0,
|
|
12258
12265
|
fixed: false,
|
|
@@ -12275,7 +12282,7 @@ const Tabbar = (props) => {
|
|
|
12275
12282
|
style,
|
|
12276
12283
|
onSwitch
|
|
12277
12284
|
} = {
|
|
12278
|
-
...defaultProps$
|
|
12285
|
+
...defaultProps$17,
|
|
12279
12286
|
...props
|
|
12280
12287
|
};
|
|
12281
12288
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -12310,17 +12317,17 @@ const Tabbar = (props) => {
|
|
|
12310
12317
|
(fixed || safeArea) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
12311
12318
|
);
|
|
12312
12319
|
};
|
|
12313
|
-
Tabbar.defaultProps = defaultProps$
|
|
12320
|
+
Tabbar.defaultProps = defaultProps$17;
|
|
12314
12321
|
Tabbar.displayName = "NutTabbar";
|
|
12315
12322
|
Tabbar.Item = TabbarItem;
|
|
12316
|
-
const defaultProps$
|
|
12323
|
+
const defaultProps$16 = {
|
|
12317
12324
|
title: "",
|
|
12318
12325
|
value: "",
|
|
12319
12326
|
disabled: false
|
|
12320
12327
|
};
|
|
12321
12328
|
const TabPane = (props) => {
|
|
12322
12329
|
const { children, autoHeightClassName, className, disabled } = {
|
|
12323
|
-
...defaultProps$
|
|
12330
|
+
...defaultProps$16,
|
|
12324
12331
|
...props
|
|
12325
12332
|
};
|
|
12326
12333
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -12346,7 +12353,7 @@ function requestAniFrame() {
|
|
|
12346
12353
|
};
|
|
12347
12354
|
}
|
|
12348
12355
|
const requestAniFrame$1 = requestAniFrame();
|
|
12349
|
-
const defaultProps$
|
|
12356
|
+
const defaultProps$15 = {
|
|
12350
12357
|
...ComponentDefaults,
|
|
12351
12358
|
tabStyle: {},
|
|
12352
12359
|
activeColor: "",
|
|
@@ -12355,7 +12362,7 @@ const defaultProps$14 = {
|
|
|
12355
12362
|
duration: 300,
|
|
12356
12363
|
autoHeight: false
|
|
12357
12364
|
};
|
|
12358
|
-
const classPrefix$
|
|
12365
|
+
const classPrefix$i = "nut-tabs";
|
|
12359
12366
|
const Tabs = (props) => {
|
|
12360
12367
|
const {
|
|
12361
12368
|
activeColor,
|
|
@@ -12372,7 +12379,7 @@ const Tabs = (props) => {
|
|
|
12372
12379
|
autoHeight,
|
|
12373
12380
|
...rest
|
|
12374
12381
|
} = {
|
|
12375
|
-
...defaultProps$
|
|
12382
|
+
...defaultProps$15,
|
|
12376
12383
|
...props
|
|
12377
12384
|
};
|
|
12378
12385
|
const [value, setValue] = usePropsValue({
|
|
@@ -12449,14 +12456,14 @@ const Tabs = (props) => {
|
|
|
12449
12456
|
}
|
|
12450
12457
|
}, [children]);
|
|
12451
12458
|
const classes = classNames(
|
|
12452
|
-
classPrefix$
|
|
12453
|
-
`${classPrefix$
|
|
12459
|
+
classPrefix$i,
|
|
12460
|
+
`${classPrefix$i}--${direction}`,
|
|
12454
12461
|
className
|
|
12455
12462
|
);
|
|
12456
|
-
const classesTitle = classNames(`${classPrefix$
|
|
12457
|
-
[`${classPrefix$
|
|
12458
|
-
[`${classPrefix$
|
|
12459
|
-
[`${classPrefix$
|
|
12463
|
+
const classesTitle = classNames(`${classPrefix$i}__titles`, {
|
|
12464
|
+
[`${classPrefix$i}__titles--${activeType}`]: activeType,
|
|
12465
|
+
[`${classPrefix$i}__titles--scrollable`]: true,
|
|
12466
|
+
[`${classPrefix$i}__titles--${align}`]: align
|
|
12460
12467
|
});
|
|
12461
12468
|
const tabsActiveStyle = {
|
|
12462
12469
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -12486,7 +12493,7 @@ const Tabs = (props) => {
|
|
|
12486
12493
|
onClick: () => {
|
|
12487
12494
|
tabChange(item);
|
|
12488
12495
|
},
|
|
12489
|
-
className: classNames(`${classPrefix$
|
|
12496
|
+
className: classNames(`${classPrefix$i}__titles-item`, {
|
|
12490
12497
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
12491
12498
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
12492
12499
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -12497,14 +12504,14 @@ const Tabs = (props) => {
|
|
|
12497
12504
|
activeType === "line" && /* @__PURE__ */ React__default.createElement(
|
|
12498
12505
|
"div",
|
|
12499
12506
|
{
|
|
12500
|
-
className: `${classPrefix$
|
|
12507
|
+
className: `${classPrefix$i}__titles-item__line`,
|
|
12501
12508
|
style: tabsActiveStyle
|
|
12502
12509
|
}
|
|
12503
12510
|
),
|
|
12504
12511
|
activeType === "smile" && /* @__PURE__ */ React__default.createElement(
|
|
12505
12512
|
"div",
|
|
12506
12513
|
{
|
|
12507
|
-
className: `${classPrefix$
|
|
12514
|
+
className: `${classPrefix$i}__titles-item__smile`,
|
|
12508
12515
|
style: tabsActiveStyle
|
|
12509
12516
|
},
|
|
12510
12517
|
/* @__PURE__ */ React__default.createElement(x$7, { color: activeColor, width: 40, height: 20 })
|
|
@@ -12516,13 +12523,13 @@ const Tabs = (props) => {
|
|
|
12516
12523
|
{
|
|
12517
12524
|
ellipsis: true
|
|
12518
12525
|
},
|
|
12519
|
-
`${classPrefix$
|
|
12526
|
+
`${classPrefix$i}__titles-item__text`
|
|
12520
12527
|
)
|
|
12521
12528
|
},
|
|
12522
12529
|
item.title
|
|
12523
12530
|
)
|
|
12524
12531
|
);
|
|
12525
|
-
})), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
12532
|
+
})), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$i}__content__wrap` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$i}__content`, style: contentStyle }, React__default.Children.map(children, (child, idx) => {
|
|
12526
12533
|
if (!React__default.isValidElement(child)) {
|
|
12527
12534
|
return null;
|
|
12528
12535
|
}
|
|
@@ -12539,7 +12546,7 @@ const Tabs = (props) => {
|
|
|
12539
12546
|
return React__default.cloneElement(child, childProps);
|
|
12540
12547
|
}))));
|
|
12541
12548
|
};
|
|
12542
|
-
Tabs.defaultProps = defaultProps$
|
|
12549
|
+
Tabs.defaultProps = defaultProps$15;
|
|
12543
12550
|
Tabs.displayName = "NutTabs";
|
|
12544
12551
|
Tabs.TabPane = TabPane;
|
|
12545
12552
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
@@ -12678,7 +12685,7 @@ class Tree {
|
|
|
12678
12685
|
}
|
|
12679
12686
|
}
|
|
12680
12687
|
const Tree$1 = Tree;
|
|
12681
|
-
const defaultProps$
|
|
12688
|
+
const defaultProps$14 = {
|
|
12682
12689
|
...ComponentDefaults,
|
|
12683
12690
|
activeColor: "",
|
|
12684
12691
|
activeIcon: "checklist",
|
|
@@ -12721,7 +12728,7 @@ const InternalCascader = (props, ref) => {
|
|
|
12721
12728
|
onClose,
|
|
12722
12729
|
onChange,
|
|
12723
12730
|
onPathChange
|
|
12724
|
-
} = { ...defaultProps$
|
|
12731
|
+
} = { ...defaultProps$14, ...props };
|
|
12725
12732
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
12726
12733
|
const [optionsData, setOptionsData] = useState([]);
|
|
12727
12734
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -13017,9 +13024,9 @@ const InternalCascader = (props, ref) => {
|
|
|
13017
13024
|
) : renderTabs());
|
|
13018
13025
|
};
|
|
13019
13026
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
13020
|
-
Cascader.defaultProps = defaultProps$
|
|
13027
|
+
Cascader.defaultProps = defaultProps$14;
|
|
13021
13028
|
Cascader.displayName = "NutCascader";
|
|
13022
|
-
const defaultProps$
|
|
13029
|
+
const defaultProps$13 = {
|
|
13023
13030
|
...ComponentDefaults,
|
|
13024
13031
|
visible: false,
|
|
13025
13032
|
type: "custom",
|
|
@@ -13046,7 +13053,7 @@ const CustomRender = (props) => {
|
|
|
13046
13053
|
onPathChange,
|
|
13047
13054
|
...rest
|
|
13048
13055
|
} = {
|
|
13049
|
-
...defaultProps$
|
|
13056
|
+
...defaultProps$13,
|
|
13050
13057
|
...props
|
|
13051
13058
|
};
|
|
13052
13059
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
|
|
@@ -13071,7 +13078,7 @@ const CustomRender = (props) => {
|
|
|
13071
13078
|
}
|
|
13072
13079
|
));
|
|
13073
13080
|
};
|
|
13074
|
-
const defaultProps$
|
|
13081
|
+
const defaultProps$12 = {
|
|
13075
13082
|
type: "custom",
|
|
13076
13083
|
existList: [],
|
|
13077
13084
|
defaultIcon: null,
|
|
@@ -13090,7 +13097,7 @@ const ExistRender = (props) => {
|
|
|
13090
13097
|
onSelect,
|
|
13091
13098
|
onSwitch,
|
|
13092
13099
|
...rest
|
|
13093
|
-
} = { ...defaultProps$
|
|
13100
|
+
} = { ...defaultProps$12, ...props };
|
|
13094
13101
|
const classPrefix2 = "nut-address";
|
|
13095
13102
|
const selectedExist = (item) => {
|
|
13096
13103
|
existList.forEach((list, index) => {
|
|
@@ -13115,7 +13122,7 @@ const ExistRender = (props) => {
|
|
|
13115
13122
|
);
|
|
13116
13123
|
})), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
|
|
13117
13124
|
};
|
|
13118
|
-
const defaultProps$
|
|
13125
|
+
const defaultProps$11 = {
|
|
13119
13126
|
...ComponentDefaults,
|
|
13120
13127
|
defaultValue: [],
|
|
13121
13128
|
type: "custom",
|
|
@@ -13157,7 +13164,7 @@ const InternalAddress = (props, ref) => {
|
|
|
13157
13164
|
className,
|
|
13158
13165
|
...rest
|
|
13159
13166
|
} = {
|
|
13160
|
-
...defaultProps$
|
|
13167
|
+
...defaultProps$11,
|
|
13161
13168
|
...props
|
|
13162
13169
|
};
|
|
13163
13170
|
const classPrefix2 = "nut-address";
|
|
@@ -13248,7 +13255,7 @@ const InternalAddress = (props, ref) => {
|
|
|
13248
13255
|
));
|
|
13249
13256
|
};
|
|
13250
13257
|
const Address = forwardRef(InternalAddress);
|
|
13251
|
-
Address.defaultProps = defaultProps$
|
|
13258
|
+
Address.defaultProps = defaultProps$11;
|
|
13252
13259
|
Address.displayName = "NutAddress";
|
|
13253
13260
|
const Utils = {
|
|
13254
13261
|
/**
|
|
@@ -13498,7 +13505,7 @@ const isEnd = (day, days) => {
|
|
|
13498
13505
|
const isStartAndEnd = (days) => {
|
|
13499
13506
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
13500
13507
|
};
|
|
13501
|
-
const defaultProps
|
|
13508
|
+
const defaultProps$10 = {
|
|
13502
13509
|
...ComponentDefaults,
|
|
13503
13510
|
type: "single",
|
|
13504
13511
|
autoBackfill: false,
|
|
@@ -13558,7 +13565,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
13558
13565
|
onUpdate,
|
|
13559
13566
|
onDayClick,
|
|
13560
13567
|
onPageChange
|
|
13561
|
-
} = { ...defaultProps
|
|
13568
|
+
} = { ...defaultProps$10, ...props };
|
|
13562
13569
|
const weekdays = locale.calendaritem.weekdays;
|
|
13563
13570
|
const weeks = [
|
|
13564
13571
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -14092,9 +14099,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
14092
14099
|
};
|
|
14093
14100
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
14094
14101
|
});
|
|
14095
|
-
CalendarItem.defaultProps = defaultProps
|
|
14102
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
14096
14103
|
CalendarItem.displayName = "NutCalendarItem";
|
|
14097
|
-
const defaultProps
|
|
14104
|
+
const defaultProps$$ = {
|
|
14098
14105
|
...ComponentDefaults,
|
|
14099
14106
|
type: "single",
|
|
14100
14107
|
autoBackfill: false,
|
|
@@ -14157,7 +14164,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
14157
14164
|
onConfirm,
|
|
14158
14165
|
onDayClick,
|
|
14159
14166
|
onPageChange
|
|
14160
|
-
} = { ...defaultProps
|
|
14167
|
+
} = { ...defaultProps$$, ...props };
|
|
14161
14168
|
const calendarRef = useRef(null);
|
|
14162
14169
|
const close = () => {
|
|
14163
14170
|
onClose && onClose();
|
|
@@ -14231,11 +14238,11 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
14231
14238
|
renderItem()
|
|
14232
14239
|
) : renderItem());
|
|
14233
14240
|
});
|
|
14234
|
-
Calendar.defaultProps = defaultProps
|
|
14241
|
+
Calendar.defaultProps = defaultProps$$;
|
|
14235
14242
|
Calendar.displayName = "NutCalendar";
|
|
14236
14243
|
const CheckboxGroupContext = createContext(null);
|
|
14237
14244
|
const Context$1 = CheckboxGroupContext;
|
|
14238
|
-
const defaultProps$
|
|
14245
|
+
const defaultProps$_ = {
|
|
14239
14246
|
max: void 0,
|
|
14240
14247
|
labelPosition: "right",
|
|
14241
14248
|
direction: "vertical",
|
|
@@ -14243,10 +14250,10 @@ const defaultProps$Z = {
|
|
|
14243
14250
|
},
|
|
14244
14251
|
options: []
|
|
14245
14252
|
};
|
|
14246
|
-
const classPrefix$
|
|
14253
|
+
const classPrefix$h = "nut-checkboxgroup";
|
|
14247
14254
|
const CheckboxGroup = React__default.forwardRef(
|
|
14248
14255
|
(props, ref) => {
|
|
14249
|
-
const { children } = { ...defaultProps$
|
|
14256
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
14250
14257
|
const {
|
|
14251
14258
|
className,
|
|
14252
14259
|
disabled,
|
|
@@ -14325,7 +14332,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14325
14332
|
/* @__PURE__ */ React__default.createElement(
|
|
14326
14333
|
"div",
|
|
14327
14334
|
{
|
|
14328
|
-
className: classNames(classPrefix$
|
|
14335
|
+
className: classNames(classPrefix$h, className, {
|
|
14329
14336
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
14330
14337
|
}),
|
|
14331
14338
|
...rest
|
|
@@ -14335,9 +14342,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14335
14342
|
);
|
|
14336
14343
|
}
|
|
14337
14344
|
);
|
|
14338
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
14345
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
14339
14346
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
14340
|
-
const defaultProps$
|
|
14347
|
+
const defaultProps$Z = {
|
|
14341
14348
|
...ComponentDefaults,
|
|
14342
14349
|
disabled: false,
|
|
14343
14350
|
labelPosition: "right",
|
|
@@ -14347,10 +14354,10 @@ const defaultProps$Y = {
|
|
|
14347
14354
|
onChange: (value) => {
|
|
14348
14355
|
}
|
|
14349
14356
|
};
|
|
14350
|
-
const classPrefix$
|
|
14357
|
+
const classPrefix$g = "nut-checkbox";
|
|
14351
14358
|
const Checkbox = (props) => {
|
|
14352
14359
|
const { children } = {
|
|
14353
|
-
...defaultProps$
|
|
14360
|
+
...defaultProps$Z,
|
|
14354
14361
|
...props
|
|
14355
14362
|
};
|
|
14356
14363
|
const {
|
|
@@ -14409,22 +14416,22 @@ const Checkbox = (props) => {
|
|
|
14409
14416
|
};
|
|
14410
14417
|
const color = () => {
|
|
14411
14418
|
if (innerDisabled) {
|
|
14412
|
-
return `${classPrefix$
|
|
14419
|
+
return `${classPrefix$g}__icon--disable`;
|
|
14413
14420
|
}
|
|
14414
14421
|
if (innerChecked) {
|
|
14415
14422
|
if (innerIndeterminate) {
|
|
14416
|
-
return `${classPrefix$
|
|
14423
|
+
return `${classPrefix$g}__icon--indeterminate`;
|
|
14417
14424
|
}
|
|
14418
|
-
return `${classPrefix$
|
|
14425
|
+
return `${classPrefix$g}__icon`;
|
|
14419
14426
|
}
|
|
14420
|
-
return `${classPrefix$
|
|
14427
|
+
return `${classPrefix$g}__icon--unchecked`;
|
|
14421
14428
|
};
|
|
14422
14429
|
const renderLabel = () => {
|
|
14423
14430
|
return /* @__PURE__ */ React__default.createElement(
|
|
14424
14431
|
"span",
|
|
14425
14432
|
{
|
|
14426
|
-
className: classNames(`${classPrefix$
|
|
14427
|
-
[`${classPrefix$
|
|
14433
|
+
className: classNames(`${classPrefix$g}__label `, {
|
|
14434
|
+
[`${classPrefix$g}__label--disabled`]: innerDisabled
|
|
14428
14435
|
})
|
|
14429
14436
|
},
|
|
14430
14437
|
children || label
|
|
@@ -14443,8 +14450,8 @@ const Checkbox = (props) => {
|
|
|
14443
14450
|
return /* @__PURE__ */ React__default.createElement(
|
|
14444
14451
|
"div",
|
|
14445
14452
|
{
|
|
14446
|
-
className: classNames(classPrefix$
|
|
14447
|
-
[`${classPrefix$
|
|
14453
|
+
className: classNames(classPrefix$g, className, {
|
|
14454
|
+
[`${classPrefix$g}--reverse`]: labelPosition === "left"
|
|
14448
14455
|
}),
|
|
14449
14456
|
...rest,
|
|
14450
14457
|
onClick: handleClick2
|
|
@@ -14453,7 +14460,7 @@ const Checkbox = (props) => {
|
|
|
14453
14460
|
renderLabel()
|
|
14454
14461
|
);
|
|
14455
14462
|
};
|
|
14456
|
-
Checkbox.defaultProps = defaultProps$
|
|
14463
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
14457
14464
|
Checkbox.displayName = "NutCheckBox";
|
|
14458
14465
|
Checkbox.Group = CheckboxGroup;
|
|
14459
14466
|
const MIN_DISTANCE = 10;
|
|
@@ -14747,7 +14754,7 @@ function useRefs() {
|
|
|
14747
14754
|
}, []);
|
|
14748
14755
|
return [refs.current, setRefs, reset];
|
|
14749
14756
|
}
|
|
14750
|
-
const defaultProps$
|
|
14757
|
+
const defaultProps$Y = {
|
|
14751
14758
|
...ComponentDefaults,
|
|
14752
14759
|
title: "",
|
|
14753
14760
|
options: [],
|
|
@@ -14773,7 +14780,7 @@ const InternalPicker = (props, ref) => {
|
|
|
14773
14780
|
afterClose,
|
|
14774
14781
|
onChange,
|
|
14775
14782
|
...rest
|
|
14776
|
-
} = { ...defaultProps$
|
|
14783
|
+
} = { ...defaultProps$Y, ...props };
|
|
14777
14784
|
const classPrefix2 = "nut-picker";
|
|
14778
14785
|
const classes = classNames(classPrefix2, className);
|
|
14779
14786
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -15000,7 +15007,7 @@ const InternalPicker = (props, ref) => {
|
|
|
15000
15007
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
15001
15008
|
const Picker$1 = Picker;
|
|
15002
15009
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
15003
|
-
const defaultProps$
|
|
15010
|
+
const defaultProps$X = {
|
|
15004
15011
|
...ComponentDefaults,
|
|
15005
15012
|
visible: false,
|
|
15006
15013
|
title: "",
|
|
@@ -15031,7 +15038,7 @@ const DatePicker = (props) => {
|
|
|
15031
15038
|
style,
|
|
15032
15039
|
...rest
|
|
15033
15040
|
} = {
|
|
15034
|
-
...defaultProps$
|
|
15041
|
+
...defaultProps$X,
|
|
15035
15042
|
...props
|
|
15036
15043
|
};
|
|
15037
15044
|
const { locale } = useConfig();
|
|
@@ -15304,7 +15311,7 @@ const DatePicker = (props) => {
|
|
|
15304
15311
|
}
|
|
15305
15312
|
));
|
|
15306
15313
|
};
|
|
15307
|
-
DatePicker.defaultProps = defaultProps$
|
|
15314
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
15308
15315
|
DatePicker.displayName = "NutDatePicker";
|
|
15309
15316
|
const Context = createContext({});
|
|
15310
15317
|
function _extends() {
|
|
@@ -16515,7 +16522,7 @@ function isForwardRefComponent(component) {
|
|
|
16515
16522
|
}
|
|
16516
16523
|
).$$typeof === component.type.$$typeof;
|
|
16517
16524
|
}
|
|
16518
|
-
const defaultProps$
|
|
16525
|
+
const defaultProps$W = {
|
|
16519
16526
|
...ComponentDefaults,
|
|
16520
16527
|
required: false,
|
|
16521
16528
|
name: "",
|
|
@@ -16583,7 +16590,7 @@ class FormItem extends React__default.Component {
|
|
|
16583
16590
|
__publicField(this, "renderLayout", (childNode) => {
|
|
16584
16591
|
var _a2, _b;
|
|
16585
16592
|
const { label, name, required: required4, className, style, errorMessageAlign } = {
|
|
16586
|
-
...defaultProps$
|
|
16593
|
+
...defaultProps$W,
|
|
16587
16594
|
...this.props
|
|
16588
16595
|
};
|
|
16589
16596
|
const item = ((_a2 = this.context.errors) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errors) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -16633,9 +16640,9 @@ class FormItem extends React__default.Component {
|
|
|
16633
16640
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.renderLayout(returnChildNode));
|
|
16634
16641
|
}
|
|
16635
16642
|
}
|
|
16636
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
16643
|
+
__publicField(FormItem, "defaultProps", defaultProps$W);
|
|
16637
16644
|
__publicField(FormItem, "contextType", Context);
|
|
16638
|
-
const defaultProps$
|
|
16645
|
+
const defaultProps$V = {
|
|
16639
16646
|
...ComponentDefaults,
|
|
16640
16647
|
labelPosition: "right",
|
|
16641
16648
|
starPosition: "left",
|
|
@@ -16663,7 +16670,7 @@ const Form = (props) => {
|
|
|
16663
16670
|
starPosition,
|
|
16664
16671
|
form
|
|
16665
16672
|
} = {
|
|
16666
|
-
...defaultProps$
|
|
16673
|
+
...defaultProps$V,
|
|
16667
16674
|
...props
|
|
16668
16675
|
};
|
|
16669
16676
|
let formInstance;
|
|
@@ -16706,7 +16713,7 @@ const Form = (props) => {
|
|
|
16706
16713
|
/* @__PURE__ */ React__default.createElement(Cell.Group, null, /* @__PURE__ */ React__default.createElement(Context.Provider, { value: formInstance }, children), footer ? /* @__PURE__ */ React__default.createElement(Cell, null, footer) : null)
|
|
16707
16714
|
);
|
|
16708
16715
|
};
|
|
16709
|
-
Form.defaultProps = defaultProps$
|
|
16716
|
+
Form.defaultProps = defaultProps$V;
|
|
16710
16717
|
Form.displayName = "NutForm";
|
|
16711
16718
|
Form.Item = FormItem;
|
|
16712
16719
|
Form.useForm = useForm;
|
|
@@ -16734,7 +16741,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
16734
16741
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
16735
16742
|
return value.replace(regExp, "");
|
|
16736
16743
|
}
|
|
16737
|
-
const defaultProps$
|
|
16744
|
+
const defaultProps$U = {
|
|
16738
16745
|
...ComponentDefaults,
|
|
16739
16746
|
type: "text",
|
|
16740
16747
|
name: "",
|
|
@@ -16777,7 +16784,7 @@ const Input = forwardRef(
|
|
|
16777
16784
|
value: _value,
|
|
16778
16785
|
...rest
|
|
16779
16786
|
} = {
|
|
16780
|
-
...defaultProps$
|
|
16787
|
+
...defaultProps$U,
|
|
16781
16788
|
...props
|
|
16782
16789
|
};
|
|
16783
16790
|
const [value, setValue] = usePropsValue({
|
|
@@ -16839,7 +16846,9 @@ const Input = forwardRef(
|
|
|
16839
16846
|
const handleBlur = (event) => {
|
|
16840
16847
|
const val = event.target.value;
|
|
16841
16848
|
updateValue(val, "onBlur");
|
|
16842
|
-
|
|
16849
|
+
setTimeout(() => {
|
|
16850
|
+
setActive(false);
|
|
16851
|
+
}, 200);
|
|
16843
16852
|
};
|
|
16844
16853
|
const inputType = (type22) => {
|
|
16845
16854
|
if (type22 === "digit") {
|
|
@@ -16912,9 +16921,9 @@ const Input = forwardRef(
|
|
|
16912
16921
|
);
|
|
16913
16922
|
}
|
|
16914
16923
|
);
|
|
16915
|
-
Input.defaultProps = defaultProps$
|
|
16924
|
+
Input.defaultProps = defaultProps$U;
|
|
16916
16925
|
Input.displayName = "NutInput";
|
|
16917
|
-
const defaultProps$
|
|
16926
|
+
const defaultProps$T = {
|
|
16918
16927
|
...ComponentDefaults,
|
|
16919
16928
|
disabled: false,
|
|
16920
16929
|
min: 1,
|
|
@@ -16926,7 +16935,7 @@ const defaultProps$S = {
|
|
|
16926
16935
|
digits: 0,
|
|
16927
16936
|
async: false
|
|
16928
16937
|
};
|
|
16929
|
-
const classPrefix$
|
|
16938
|
+
const classPrefix$f = `nut-inputnumber`;
|
|
16930
16939
|
const InputNumber = (props) => {
|
|
16931
16940
|
const {
|
|
16932
16941
|
children,
|
|
@@ -16951,7 +16960,7 @@ const InputNumber = (props) => {
|
|
|
16951
16960
|
onChange,
|
|
16952
16961
|
...restProps
|
|
16953
16962
|
} = {
|
|
16954
|
-
...defaultProps$
|
|
16963
|
+
...defaultProps$T,
|
|
16955
16964
|
...props
|
|
16956
16965
|
};
|
|
16957
16966
|
const inputRef = useRef("");
|
|
@@ -16969,8 +16978,8 @@ const InputNumber = (props) => {
|
|
|
16969
16978
|
}, []);
|
|
16970
16979
|
const classes = classNames(
|
|
16971
16980
|
{
|
|
16972
|
-
[`${classPrefix$
|
|
16973
|
-
[`${classPrefix$
|
|
16981
|
+
[`${classPrefix$f}`]: true,
|
|
16982
|
+
[`${classPrefix$f}--disabled`]: disabled
|
|
16974
16983
|
},
|
|
16975
16984
|
className
|
|
16976
16985
|
);
|
|
@@ -17148,7 +17157,7 @@ const InputNumber = (props) => {
|
|
|
17148
17157
|
}
|
|
17149
17158
|
)), /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React__default.createElement(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) })));
|
|
17150
17159
|
};
|
|
17151
|
-
InputNumber.defaultProps = defaultProps$
|
|
17160
|
+
InputNumber.defaultProps = defaultProps$T;
|
|
17152
17161
|
InputNumber.displayName = "NutInputNumber";
|
|
17153
17162
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
17154
17163
|
const isFunction = (val) => typeof val === "function";
|
|
@@ -17190,7 +17199,7 @@ function useClickAway(onClickAway, target, eventName = "click", useCapture, isLi
|
|
|
17190
17199
|
};
|
|
17191
17200
|
}, [target]);
|
|
17192
17201
|
}
|
|
17193
|
-
const defaultProps$
|
|
17202
|
+
const defaultProps$S = {
|
|
17194
17203
|
...ComponentDefaults,
|
|
17195
17204
|
columns: 1,
|
|
17196
17205
|
direction: "down",
|
|
@@ -17219,7 +17228,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17219
17228
|
parent,
|
|
17220
17229
|
index
|
|
17221
17230
|
} = {
|
|
17222
|
-
...defaultProps$
|
|
17231
|
+
...defaultProps$S,
|
|
17223
17232
|
...props
|
|
17224
17233
|
};
|
|
17225
17234
|
const [showPopup, setShowPopup] = useState(show2);
|
|
@@ -17370,9 +17379,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17370
17379
|
)
|
|
17371
17380
|
);
|
|
17372
17381
|
});
|
|
17373
|
-
MenuItem.defaultProps = defaultProps$
|
|
17382
|
+
MenuItem.defaultProps = defaultProps$S;
|
|
17374
17383
|
MenuItem.displayName = "NutMenuItem";
|
|
17375
|
-
const defaultProps$
|
|
17384
|
+
const defaultProps$R = {
|
|
17376
17385
|
...ComponentDefaults,
|
|
17377
17386
|
activeColor: "",
|
|
17378
17387
|
closeOnOverlayClick: true,
|
|
@@ -17397,7 +17406,7 @@ const Menu = (props) => {
|
|
|
17397
17406
|
onOpen,
|
|
17398
17407
|
...rest
|
|
17399
17408
|
} = {
|
|
17400
|
-
...defaultProps$
|
|
17409
|
+
...defaultProps$R,
|
|
17401
17410
|
...props
|
|
17402
17411
|
};
|
|
17403
17412
|
const menuRef = useRef(null);
|
|
@@ -17524,10 +17533,10 @@ const Menu = (props) => {
|
|
|
17524
17533
|
), cloneChildren())
|
|
17525
17534
|
);
|
|
17526
17535
|
};
|
|
17527
|
-
Menu.defaultProps = defaultProps$
|
|
17536
|
+
Menu.defaultProps = defaultProps$R;
|
|
17528
17537
|
Menu.displayName = "NutMenu";
|
|
17529
17538
|
Menu.Item = MenuItem;
|
|
17530
|
-
const defaultProps$
|
|
17539
|
+
const defaultProps$Q = {
|
|
17531
17540
|
...ComponentDefaults,
|
|
17532
17541
|
visible: false,
|
|
17533
17542
|
type: "default",
|
|
@@ -17652,7 +17661,7 @@ const NumberKeyboard = (props) => {
|
|
|
17652
17661
|
"span",
|
|
17653
17662
|
{
|
|
17654
17663
|
className: `${classPrefix2}__header__close`,
|
|
17655
|
-
onClick:
|
|
17664
|
+
onClick: onConfirm
|
|
17656
17665
|
},
|
|
17657
17666
|
locale.done
|
|
17658
17667
|
)), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__body` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__body__keys` }, keysList == null ? void 0 : keysList.map((item) => {
|
|
@@ -17678,17 +17687,17 @@ const NumberKeyboard = (props) => {
|
|
|
17678
17687
|
))))
|
|
17679
17688
|
);
|
|
17680
17689
|
};
|
|
17681
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
17690
|
+
NumberKeyboard.defaultProps = defaultProps$Q;
|
|
17682
17691
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
17683
17692
|
const RadioContext = React__default.createContext(null);
|
|
17684
|
-
const defaultProps$
|
|
17693
|
+
const defaultProps$P = {
|
|
17685
17694
|
labelPosition: "right",
|
|
17686
17695
|
onChange: (value) => {
|
|
17687
17696
|
},
|
|
17688
17697
|
direction: "vertical",
|
|
17689
17698
|
options: []
|
|
17690
17699
|
};
|
|
17691
|
-
const classPrefix$
|
|
17700
|
+
const classPrefix$e = "nut-radiogroup";
|
|
17692
17701
|
const RadioGroup = React__default.forwardRef(
|
|
17693
17702
|
(props, ref) => {
|
|
17694
17703
|
const {
|
|
@@ -17702,7 +17711,7 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17702
17711
|
options: options2,
|
|
17703
17712
|
disabled,
|
|
17704
17713
|
...rest
|
|
17705
|
-
} = { ...defaultProps$
|
|
17714
|
+
} = { ...defaultProps$P, ...props };
|
|
17706
17715
|
const [val2State, setVal2State] = usePropsValue({
|
|
17707
17716
|
defaultValue: props.defaultValue,
|
|
17708
17717
|
value: props.value,
|
|
@@ -17744,8 +17753,8 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17744
17753
|
/* @__PURE__ */ React__default.createElement(
|
|
17745
17754
|
"div",
|
|
17746
17755
|
{
|
|
17747
|
-
className: classNames(classPrefix$
|
|
17748
|
-
[`${classPrefix$
|
|
17756
|
+
className: classNames(classPrefix$e, className, {
|
|
17757
|
+
[`${classPrefix$e}--${props.direction}`]: props.direction
|
|
17749
17758
|
}),
|
|
17750
17759
|
...rest
|
|
17751
17760
|
},
|
|
@@ -17754,9 +17763,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17754
17763
|
);
|
|
17755
17764
|
}
|
|
17756
17765
|
);
|
|
17757
|
-
RadioGroup.defaultProps = defaultProps$
|
|
17766
|
+
RadioGroup.defaultProps = defaultProps$P;
|
|
17758
17767
|
RadioGroup.displayName = "NutRadioGroup";
|
|
17759
|
-
const defaultProps$
|
|
17768
|
+
const defaultProps$O = {
|
|
17760
17769
|
...ComponentDefaults,
|
|
17761
17770
|
disabled: false,
|
|
17762
17771
|
shape: "round",
|
|
@@ -17782,7 +17791,7 @@ const Radio = (props) => {
|
|
|
17782
17791
|
onChange,
|
|
17783
17792
|
...others
|
|
17784
17793
|
} = {
|
|
17785
|
-
...defaultProps$
|
|
17794
|
+
...defaultProps$O,
|
|
17786
17795
|
...props
|
|
17787
17796
|
};
|
|
17788
17797
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -17878,10 +17887,10 @@ const Radio = (props) => {
|
|
|
17878
17887
|
renderRadioItem()
|
|
17879
17888
|
);
|
|
17880
17889
|
};
|
|
17881
|
-
Radio.defaultProps = defaultProps$
|
|
17890
|
+
Radio.defaultProps = defaultProps$O;
|
|
17882
17891
|
Radio.displayName = "NutRadio";
|
|
17883
17892
|
Radio.Group = RadioGroup;
|
|
17884
|
-
const defaultProps$
|
|
17893
|
+
const defaultProps$N = {
|
|
17885
17894
|
...ComponentDefaults,
|
|
17886
17895
|
range: false,
|
|
17887
17896
|
min: 0,
|
|
@@ -17909,7 +17918,7 @@ const Range = (props) => {
|
|
|
17909
17918
|
step,
|
|
17910
17919
|
value,
|
|
17911
17920
|
defaultValue
|
|
17912
|
-
} = { ...defaultProps$
|
|
17921
|
+
} = { ...defaultProps$N, ...props };
|
|
17913
17922
|
const classPrefix2 = "nut-range";
|
|
17914
17923
|
const [buttonIndex, setButtonIndex] = useState(0);
|
|
17915
17924
|
const [dragStatus, setDragStatus] = useState("start");
|
|
@@ -18173,9 +18182,9 @@ const Range = (props) => {
|
|
|
18173
18182
|
renderButton()
|
|
18174
18183
|
))), maxDescription !== null && /* @__PURE__ */ React__default.createElement("div", { className: "max" }, maxDescription || max));
|
|
18175
18184
|
};
|
|
18176
|
-
Range.defaultProps = defaultProps$
|
|
18185
|
+
Range.defaultProps = defaultProps$N;
|
|
18177
18186
|
Range.displayName = "NutRange";
|
|
18178
|
-
const defaultProps$
|
|
18187
|
+
const defaultProps$M = {
|
|
18179
18188
|
...ComponentDefaults,
|
|
18180
18189
|
count: 5,
|
|
18181
18190
|
min: 0,
|
|
@@ -18200,7 +18209,7 @@ const Rate = (props) => {
|
|
|
18200
18209
|
allowHalf,
|
|
18201
18210
|
onChange
|
|
18202
18211
|
} = {
|
|
18203
|
-
...defaultProps$
|
|
18212
|
+
...defaultProps$M,
|
|
18204
18213
|
...props
|
|
18205
18214
|
};
|
|
18206
18215
|
const classPrefix2 = "nut-rate";
|
|
@@ -18283,9 +18292,9 @@ const Rate = (props) => {
|
|
|
18283
18292
|
})
|
|
18284
18293
|
);
|
|
18285
18294
|
};
|
|
18286
|
-
Rate.defaultProps = defaultProps$
|
|
18295
|
+
Rate.defaultProps = defaultProps$M;
|
|
18287
18296
|
Rate.displayName = "NutRate";
|
|
18288
|
-
const defaultProps$
|
|
18297
|
+
const defaultProps$L = {
|
|
18289
18298
|
...ComponentDefaults,
|
|
18290
18299
|
placeholder: "",
|
|
18291
18300
|
shape: "square",
|
|
@@ -18324,7 +18333,7 @@ const SearchBar = (props) => {
|
|
|
18324
18333
|
onSearch,
|
|
18325
18334
|
onInputClick
|
|
18326
18335
|
} = {
|
|
18327
|
-
...defaultProps$
|
|
18336
|
+
...defaultProps$L,
|
|
18328
18337
|
...props
|
|
18329
18338
|
};
|
|
18330
18339
|
const forceFocus = () => {
|
|
@@ -18442,9 +18451,9 @@ const SearchBar = (props) => {
|
|
|
18442
18451
|
renderRight()
|
|
18443
18452
|
);
|
|
18444
18453
|
};
|
|
18445
|
-
SearchBar.defaultProps = defaultProps$
|
|
18454
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
18446
18455
|
SearchBar.displayName = "NutSearchBar";
|
|
18447
|
-
const defaultProps$
|
|
18456
|
+
const defaultProps$K = {
|
|
18448
18457
|
...ComponentDefaults,
|
|
18449
18458
|
value: "",
|
|
18450
18459
|
visible: false,
|
|
@@ -18481,7 +18490,7 @@ const ShortPassword = (props) => {
|
|
|
18481
18490
|
onCloseIconClick,
|
|
18482
18491
|
...rest
|
|
18483
18492
|
} = {
|
|
18484
|
-
...defaultProps$
|
|
18493
|
+
...defaultProps$K,
|
|
18485
18494
|
...props
|
|
18486
18495
|
};
|
|
18487
18496
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -18538,9 +18547,9 @@ const ShortPassword = (props) => {
|
|
|
18538
18547
|
), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
18539
18548
|
);
|
|
18540
18549
|
};
|
|
18541
|
-
ShortPassword.defaultProps = defaultProps$
|
|
18550
|
+
ShortPassword.defaultProps = defaultProps$K;
|
|
18542
18551
|
ShortPassword.displayName = "NutShortPassword";
|
|
18543
|
-
const defaultProps$
|
|
18552
|
+
const defaultProps$J = {
|
|
18544
18553
|
...ComponentDefaults,
|
|
18545
18554
|
type: "png",
|
|
18546
18555
|
lineWidth: 2,
|
|
@@ -18560,7 +18569,7 @@ const InternalSignature = (props, ref) => {
|
|
|
18560
18569
|
onClear,
|
|
18561
18570
|
...rest
|
|
18562
18571
|
} = {
|
|
18563
|
-
...defaultProps$
|
|
18572
|
+
...defaultProps$J,
|
|
18564
18573
|
...props
|
|
18565
18574
|
};
|
|
18566
18575
|
const classPrefix2 = `nut-signature`;
|
|
@@ -18658,9 +18667,9 @@ const InternalSignature = (props, ref) => {
|
|
|
18658
18667
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__inner`, ref: wrapRef }, isCanvasSupported() ? /* @__PURE__ */ React__default.createElement("canvas", { ref: canvasRef, height: canvasHeight, width: canvasWidth }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, unsupported || /* @__PURE__ */ React__default.createElement("p", { className: `${classPrefix2}__unsupport` }, locale.signature.unsupported))));
|
|
18659
18668
|
};
|
|
18660
18669
|
const Signature = React__default.forwardRef(InternalSignature);
|
|
18661
|
-
Signature.defaultProps = defaultProps$
|
|
18670
|
+
Signature.defaultProps = defaultProps$J;
|
|
18662
18671
|
Signature.displayName = "NutSignature";
|
|
18663
|
-
const defaultProps$
|
|
18672
|
+
const defaultProps$I = {
|
|
18664
18673
|
...ComponentDefaults,
|
|
18665
18674
|
disabled: false,
|
|
18666
18675
|
activeText: "",
|
|
@@ -18675,9 +18684,10 @@ const Switch = (props) => {
|
|
|
18675
18684
|
inactiveText,
|
|
18676
18685
|
className,
|
|
18677
18686
|
style,
|
|
18678
|
-
onChange
|
|
18687
|
+
onChange,
|
|
18688
|
+
...rest
|
|
18679
18689
|
} = {
|
|
18680
|
-
...defaultProps$
|
|
18690
|
+
...defaultProps$I,
|
|
18681
18691
|
...props
|
|
18682
18692
|
};
|
|
18683
18693
|
const classPrefix2 = "nut-switch";
|
|
@@ -18694,11 +18704,20 @@ const Switch = (props) => {
|
|
|
18694
18704
|
onChange && onChange(!value, event);
|
|
18695
18705
|
setValue(!value);
|
|
18696
18706
|
};
|
|
18697
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
18707
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
18708
|
+
"div",
|
|
18709
|
+
{
|
|
18710
|
+
className: classes(),
|
|
18711
|
+
onClick: (e) => onClick(e),
|
|
18712
|
+
style,
|
|
18713
|
+
...rest
|
|
18714
|
+
},
|
|
18715
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React__default.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, value ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText)))
|
|
18716
|
+
);
|
|
18698
18717
|
};
|
|
18699
|
-
Switch.defaultProps = defaultProps$
|
|
18718
|
+
Switch.defaultProps = defaultProps$I;
|
|
18700
18719
|
Switch.displayName = "NutSwitch";
|
|
18701
|
-
const defaultProps$
|
|
18720
|
+
const defaultProps$H = {
|
|
18702
18721
|
...ComponentDefaults,
|
|
18703
18722
|
defaultValue: "",
|
|
18704
18723
|
showCount: false,
|
|
@@ -18727,7 +18746,7 @@ const TextArea = (props) => {
|
|
|
18727
18746
|
onBlur,
|
|
18728
18747
|
onFocus,
|
|
18729
18748
|
...rest
|
|
18730
|
-
} = { ...defaultProps$
|
|
18749
|
+
} = { ...defaultProps$H, ...props };
|
|
18731
18750
|
const classPrefix2 = "nut-textarea";
|
|
18732
18751
|
const textareaRef = useRef(null);
|
|
18733
18752
|
const compositionRef = useRef(false);
|
|
@@ -18811,9 +18830,9 @@ const TextArea = (props) => {
|
|
|
18811
18830
|
showCount && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
18812
18831
|
);
|
|
18813
18832
|
};
|
|
18814
|
-
TextArea.defaultProps = defaultProps$
|
|
18833
|
+
TextArea.defaultProps = defaultProps$H;
|
|
18815
18834
|
TextArea.displayName = "NutTextArea";
|
|
18816
|
-
const defaultProps$
|
|
18835
|
+
const defaultProps$G = {
|
|
18817
18836
|
...ComponentDefaults,
|
|
18818
18837
|
percent: 0,
|
|
18819
18838
|
showText: false,
|
|
@@ -18836,7 +18855,7 @@ const Progress = (props) => {
|
|
|
18836
18855
|
delay,
|
|
18837
18856
|
...rest
|
|
18838
18857
|
} = {
|
|
18839
|
-
...defaultProps$
|
|
18858
|
+
...defaultProps$G,
|
|
18840
18859
|
...props
|
|
18841
18860
|
};
|
|
18842
18861
|
const classPrefix2 = "nut-progress";
|
|
@@ -18931,7 +18950,7 @@ const Progress = (props) => {
|
|
|
18931
18950
|
)))
|
|
18932
18951
|
);
|
|
18933
18952
|
};
|
|
18934
|
-
Progress.defaultProps = defaultProps$
|
|
18953
|
+
Progress.defaultProps = defaultProps$G;
|
|
18935
18954
|
Progress.displayName = "NutProgress";
|
|
18936
18955
|
class UploadOptions {
|
|
18937
18956
|
constructor() {
|
|
@@ -19023,7 +19042,7 @@ const funcInterceptor = (interceptor, {
|
|
|
19023
19042
|
done();
|
|
19024
19043
|
}
|
|
19025
19044
|
};
|
|
19026
|
-
const defaultProps$
|
|
19045
|
+
const defaultProps$F = {
|
|
19027
19046
|
...ComponentDefaults,
|
|
19028
19047
|
url: "",
|
|
19029
19048
|
maxCount: 1,
|
|
@@ -19106,7 +19125,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19106
19125
|
beforeXhrUpload,
|
|
19107
19126
|
beforeDelete,
|
|
19108
19127
|
...restProps
|
|
19109
|
-
} = { ...defaultProps$
|
|
19128
|
+
} = { ...defaultProps$F, ...props };
|
|
19110
19129
|
const [fileList, setFileList] = useState(defaultValue || []);
|
|
19111
19130
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
19112
19131
|
useEffect(() => {
|
|
@@ -19345,7 +19364,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19345
19364
|
multiple,
|
|
19346
19365
|
onChange: fileChange
|
|
19347
19366
|
}
|
|
19348
|
-
)))), fileList.length !== 0 && fileList.map((item, index) => {
|
|
19367
|
+
)))), fileList.length !== 0 && Array.isArray(fileList) && fileList.map((item, index) => {
|
|
19349
19368
|
return /* @__PURE__ */ React__default.createElement(
|
|
19350
19369
|
"div",
|
|
19351
19370
|
{
|
|
@@ -19450,9 +19469,9 @@ const InternalUploader = (props, ref) => {
|
|
|
19450
19469
|
));
|
|
19451
19470
|
};
|
|
19452
19471
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
19453
|
-
Uploader.defaultProps = defaultProps$
|
|
19472
|
+
Uploader.defaultProps = defaultProps$F;
|
|
19454
19473
|
Uploader.displayName = "NutUploader";
|
|
19455
|
-
const defaultProps$
|
|
19474
|
+
const defaultProps$E = {
|
|
19456
19475
|
...ComponentDefaults,
|
|
19457
19476
|
visible: false,
|
|
19458
19477
|
description: "",
|
|
@@ -19478,7 +19497,7 @@ const ActionSheet = (props) => {
|
|
|
19478
19497
|
className,
|
|
19479
19498
|
style,
|
|
19480
19499
|
...rest
|
|
19481
|
-
} = { ...defaultProps$
|
|
19500
|
+
} = { ...defaultProps$E, ...props };
|
|
19482
19501
|
const classPrefix2 = "nut-actionsheet";
|
|
19483
19502
|
const cancelActionSheet = () => {
|
|
19484
19503
|
onCancel && onCancel();
|
|
@@ -19521,7 +19540,7 @@ const ActionSheet = (props) => {
|
|
|
19521
19540
|
))
|
|
19522
19541
|
);
|
|
19523
19542
|
};
|
|
19524
|
-
ActionSheet.defaultProps = defaultProps$
|
|
19543
|
+
ActionSheet.defaultProps = defaultProps$E;
|
|
19525
19544
|
ActionSheet.displayName = "NutActionSheet";
|
|
19526
19545
|
const fullClone = {
|
|
19527
19546
|
...ReactDOM
|
|
@@ -19754,7 +19773,7 @@ const DialogWrap = (props) => {
|
|
|
19754
19773
|
};
|
|
19755
19774
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
19756
19775
|
DialogWrap.displayName = "NutDialogWrap";
|
|
19757
|
-
const defaultProps$
|
|
19776
|
+
const defaultProps$D = {
|
|
19758
19777
|
confirmText: "",
|
|
19759
19778
|
cancelText: "",
|
|
19760
19779
|
overlay: true,
|
|
@@ -19853,9 +19872,9 @@ Dialog.confirm = (props) => {
|
|
|
19853
19872
|
});
|
|
19854
19873
|
};
|
|
19855
19874
|
});
|
|
19856
|
-
Dialog.defaultProps = defaultProps$
|
|
19875
|
+
Dialog.defaultProps = defaultProps$D;
|
|
19857
19876
|
Dialog.displayName = "NutDialog";
|
|
19858
|
-
const defaultProps$
|
|
19877
|
+
const defaultProps$C = {
|
|
19859
19878
|
...ComponentDefaults,
|
|
19860
19879
|
attract: false,
|
|
19861
19880
|
direction: void 0,
|
|
@@ -19868,7 +19887,7 @@ const defaultProps$B = {
|
|
|
19868
19887
|
};
|
|
19869
19888
|
const Drag = (props) => {
|
|
19870
19889
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
19871
|
-
...defaultProps$
|
|
19890
|
+
...defaultProps$C,
|
|
19872
19891
|
...props
|
|
19873
19892
|
};
|
|
19874
19893
|
const classPrefix2 = "nut-drag";
|
|
@@ -19931,20 +19950,20 @@ const Drag = (props) => {
|
|
|
19931
19950
|
/* @__PURE__ */ React__default.createElement(animated.div, { style: currstyle, ...bind() }, children)
|
|
19932
19951
|
);
|
|
19933
19952
|
};
|
|
19934
|
-
Drag.defaultProps = defaultProps$
|
|
19953
|
+
Drag.defaultProps = defaultProps$C;
|
|
19935
19954
|
Drag.displayName = "NutDrag";
|
|
19936
19955
|
const defaultStatus = {
|
|
19937
19956
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
19938
19957
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
19939
19958
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
19940
19959
|
};
|
|
19941
|
-
const defaultProps$
|
|
19960
|
+
const defaultProps$B = {
|
|
19942
19961
|
...ComponentDefaults,
|
|
19943
19962
|
description: "",
|
|
19944
19963
|
imageSize: "",
|
|
19945
19964
|
status: "empty"
|
|
19946
19965
|
};
|
|
19947
|
-
const classPrefix$
|
|
19966
|
+
const classPrefix$d = `nut-empty`;
|
|
19948
19967
|
const Empty = (props) => {
|
|
19949
19968
|
const { locale } = useConfig();
|
|
19950
19969
|
const {
|
|
@@ -19956,7 +19975,7 @@ const Empty = (props) => {
|
|
|
19956
19975
|
status,
|
|
19957
19976
|
...rest
|
|
19958
19977
|
} = {
|
|
19959
|
-
...defaultProps$
|
|
19978
|
+
...defaultProps$B,
|
|
19960
19979
|
...props
|
|
19961
19980
|
};
|
|
19962
19981
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -19979,11 +19998,11 @@ const Empty = (props) => {
|
|
|
19979
19998
|
};
|
|
19980
19999
|
});
|
|
19981
20000
|
}, [imageSize]);
|
|
19982
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
20001
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$d} ${className}`, ...rest }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$d}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$d}__description` }, description || locale.noData) : description, children));
|
|
19983
20002
|
};
|
|
19984
|
-
Empty.defaultProps = defaultProps$
|
|
20003
|
+
Empty.defaultProps = defaultProps$B;
|
|
19985
20004
|
Empty.displayName = "NutEmpty";
|
|
19986
|
-
const defaultProps$
|
|
20005
|
+
const defaultProps$A = {
|
|
19987
20006
|
...ComponentDefaults,
|
|
19988
20007
|
hasMore: true,
|
|
19989
20008
|
threshold: 200,
|
|
@@ -19991,7 +20010,7 @@ const defaultProps$z = {
|
|
|
19991
20010
|
capture: false,
|
|
19992
20011
|
pullRefresh: false
|
|
19993
20012
|
};
|
|
19994
|
-
const classPrefix$
|
|
20013
|
+
const classPrefix$c = `nut-infiniteloading`;
|
|
19995
20014
|
const InfiniteLoading = (props) => {
|
|
19996
20015
|
const { locale } = useConfig();
|
|
19997
20016
|
const {
|
|
@@ -20010,7 +20029,7 @@ const InfiniteLoading = (props) => {
|
|
|
20010
20029
|
onScroll,
|
|
20011
20030
|
...restProps
|
|
20012
20031
|
} = {
|
|
20013
|
-
...defaultProps$
|
|
20032
|
+
...defaultProps$A,
|
|
20014
20033
|
...props
|
|
20015
20034
|
};
|
|
20016
20035
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -20022,7 +20041,7 @@ const InfiniteLoading = (props) => {
|
|
|
20022
20041
|
const refreshMaxH = useRef(0);
|
|
20023
20042
|
const y2 = useRef(0);
|
|
20024
20043
|
const distance = useRef(0);
|
|
20025
|
-
const classes = classNames(className, classPrefix$
|
|
20044
|
+
const classes = classNames(className, classPrefix$c);
|
|
20026
20045
|
useEffect(() => {
|
|
20027
20046
|
if (target && document.getElementById(target)) {
|
|
20028
20047
|
scrollEl.current = document.getElementById(target);
|
|
@@ -20148,13 +20167,13 @@ const InfiniteLoading = (props) => {
|
|
|
20148
20167
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React__default.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React__default.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
20149
20168
|
);
|
|
20150
20169
|
};
|
|
20151
|
-
InfiniteLoading.defaultProps = defaultProps$
|
|
20170
|
+
InfiniteLoading.defaultProps = defaultProps$A;
|
|
20152
20171
|
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
20153
20172
|
const loadingMap = {
|
|
20154
20173
|
circular: y$6,
|
|
20155
20174
|
spinner: k$3
|
|
20156
20175
|
};
|
|
20157
|
-
const defaultProps$
|
|
20176
|
+
const defaultProps$z = {
|
|
20158
20177
|
...ComponentDefaults,
|
|
20159
20178
|
// 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
|
|
20160
20179
|
type: "circular",
|
|
@@ -20162,7 +20181,7 @@ const defaultProps$y = {
|
|
|
20162
20181
|
};
|
|
20163
20182
|
const Loading = (props) => {
|
|
20164
20183
|
const { className, style, children, direction, icon, ...rest } = {
|
|
20165
|
-
...defaultProps$
|
|
20184
|
+
...defaultProps$z,
|
|
20166
20185
|
...props
|
|
20167
20186
|
};
|
|
20168
20187
|
const classPrefix2 = "nut-loading";
|
|
@@ -20181,9 +20200,9 @@ const Loading = (props) => {
|
|
|
20181
20200
|
children ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-text` }, children) : ""
|
|
20182
20201
|
);
|
|
20183
20202
|
};
|
|
20184
|
-
Loading.defaultProps = defaultProps$
|
|
20203
|
+
Loading.defaultProps = defaultProps$z;
|
|
20185
20204
|
Loading.displayName = "NutLoading";
|
|
20186
|
-
const defaultProps$
|
|
20205
|
+
const defaultProps$y = {
|
|
20187
20206
|
...ComponentDefaults,
|
|
20188
20207
|
direction: "horizontal",
|
|
20189
20208
|
list: [],
|
|
@@ -20221,7 +20240,7 @@ const NoticeBar = (props) => {
|
|
|
20221
20240
|
onClick,
|
|
20222
20241
|
onItemClick
|
|
20223
20242
|
} = {
|
|
20224
|
-
...defaultProps$
|
|
20243
|
+
...defaultProps$y,
|
|
20225
20244
|
...props
|
|
20226
20245
|
};
|
|
20227
20246
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -20572,9 +20591,9 @@ const NoticeBar = (props) => {
|
|
|
20572
20591
|
)
|
|
20573
20592
|
) : null);
|
|
20574
20593
|
};
|
|
20575
|
-
NoticeBar.defaultProps = defaultProps$
|
|
20594
|
+
NoticeBar.defaultProps = defaultProps$y;
|
|
20576
20595
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20577
|
-
const classPrefix$
|
|
20596
|
+
const classPrefix$b = "nut-notify";
|
|
20578
20597
|
let Notification$1 = (_a = class extends React.PureComponent {
|
|
20579
20598
|
constructor(props) {
|
|
20580
20599
|
super(props);
|
|
@@ -20625,10 +20644,10 @@ let Notification$1 = (_a = class extends React.PureComponent {
|
|
|
20625
20644
|
const { style, message, type: type4, className, position } = this.props;
|
|
20626
20645
|
const { show: show2 } = this.state;
|
|
20627
20646
|
const classes = classNames({
|
|
20628
|
-
[`${classPrefix$
|
|
20629
|
-
[`${classPrefix$
|
|
20630
|
-
[`${classPrefix$
|
|
20631
|
-
[`${classPrefix$
|
|
20647
|
+
[`${classPrefix$b}--popup-top`]: position === "top",
|
|
20648
|
+
[`${classPrefix$b}--popup-bottom`]: position === "bottom",
|
|
20649
|
+
[`${classPrefix$b}`]: true,
|
|
20650
|
+
[`${classPrefix$b}--${type4}`]: true
|
|
20632
20651
|
});
|
|
20633
20652
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
20634
20653
|
CSSTransition$1,
|
|
@@ -20737,12 +20756,13 @@ const Notify = {
|
|
|
20737
20756
|
}
|
|
20738
20757
|
}
|
|
20739
20758
|
};
|
|
20740
|
-
const defaultProps$
|
|
20759
|
+
const defaultProps$x = {
|
|
20741
20760
|
...ComponentDefaults,
|
|
20742
20761
|
list: [],
|
|
20743
20762
|
location: "bottom",
|
|
20744
20763
|
visible: false,
|
|
20745
20764
|
offset: [0, 12],
|
|
20765
|
+
arrowOffset: 0,
|
|
20746
20766
|
targetId: "",
|
|
20747
20767
|
showArrow: true,
|
|
20748
20768
|
closeOnOutsideClick: true,
|
|
@@ -20755,7 +20775,7 @@ const defaultProps$w = {
|
|
|
20755
20775
|
onClose: () => {
|
|
20756
20776
|
}
|
|
20757
20777
|
};
|
|
20758
|
-
const classPrefix$
|
|
20778
|
+
const classPrefix$a = `nut-popover`;
|
|
20759
20779
|
const Popover = (props) => {
|
|
20760
20780
|
const {
|
|
20761
20781
|
children,
|
|
@@ -20763,6 +20783,7 @@ const Popover = (props) => {
|
|
|
20763
20783
|
location,
|
|
20764
20784
|
visible,
|
|
20765
20785
|
offset,
|
|
20786
|
+
arrowOffset,
|
|
20766
20787
|
targetId,
|
|
20767
20788
|
overlay,
|
|
20768
20789
|
closeOnOutsideClick,
|
|
@@ -20776,7 +20797,7 @@ const Popover = (props) => {
|
|
|
20776
20797
|
onSelect,
|
|
20777
20798
|
...rest
|
|
20778
20799
|
} = {
|
|
20779
|
-
...defaultProps$
|
|
20800
|
+
...defaultProps$x,
|
|
20780
20801
|
...props
|
|
20781
20802
|
};
|
|
20782
20803
|
const popoverRef = useRef(null);
|
|
@@ -20842,7 +20863,7 @@ const Popover = (props) => {
|
|
|
20842
20863
|
};
|
|
20843
20864
|
const classes = classNames(
|
|
20844
20865
|
{
|
|
20845
|
-
[`${classPrefix$
|
|
20866
|
+
[`${classPrefix$a}`]: true
|
|
20846
20867
|
},
|
|
20847
20868
|
className
|
|
20848
20869
|
);
|
|
@@ -20897,6 +20918,37 @@ const Popover = (props) => {
|
|
|
20897
20918
|
}
|
|
20898
20919
|
return styles;
|
|
20899
20920
|
};
|
|
20921
|
+
const popoverArrowStyle = () => {
|
|
20922
|
+
const styles = {};
|
|
20923
|
+
const direction = location.split("-")[0];
|
|
20924
|
+
const skew = location.split("-")[1];
|
|
20925
|
+
const base = 16;
|
|
20926
|
+
if (props.arrowOffset !== 0) {
|
|
20927
|
+
if (["bottom", "top"].includes(direction)) {
|
|
20928
|
+
if (!skew) {
|
|
20929
|
+
styles.left = `calc(50% + ${arrowOffset}px)`;
|
|
20930
|
+
}
|
|
20931
|
+
if (skew === "start") {
|
|
20932
|
+
styles.left = `${base + arrowOffset}px`;
|
|
20933
|
+
}
|
|
20934
|
+
if (skew === "end") {
|
|
20935
|
+
styles.right = `${base - arrowOffset}px`;
|
|
20936
|
+
}
|
|
20937
|
+
}
|
|
20938
|
+
if (["left", "right"].includes(direction)) {
|
|
20939
|
+
if (!skew) {
|
|
20940
|
+
styles.top = `calc(50% - ${arrowOffset}px)`;
|
|
20941
|
+
}
|
|
20942
|
+
if (skew === "start") {
|
|
20943
|
+
styles.top = `${base - arrowOffset}px`;
|
|
20944
|
+
}
|
|
20945
|
+
if (skew === "end") {
|
|
20946
|
+
styles.bottom = `${base + arrowOffset}px`;
|
|
20947
|
+
}
|
|
20948
|
+
}
|
|
20949
|
+
}
|
|
20950
|
+
return styles;
|
|
20951
|
+
};
|
|
20900
20952
|
const handleSelect = (item, index) => {
|
|
20901
20953
|
if (!item.disabled) {
|
|
20902
20954
|
onSelect && onSelect(item, index);
|
|
@@ -20931,7 +20983,7 @@ const Popover = (props) => {
|
|
|
20931
20983
|
position: "default",
|
|
20932
20984
|
...rest
|
|
20933
20985
|
},
|
|
20934
|
-
/* @__PURE__ */ React__default.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React__default.createElement("div", { className: popoverArrow() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
20986
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React__default.createElement("div", { className: popoverArrow(), style: popoverArrowStyle() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
20935
20987
|
return /* @__PURE__ */ React__default.createElement(
|
|
20936
20988
|
"div",
|
|
20937
20989
|
{
|
|
@@ -20951,7 +21003,7 @@ const Popover = (props) => {
|
|
|
20951
21003
|
}))
|
|
20952
21004
|
)));
|
|
20953
21005
|
};
|
|
20954
|
-
Popover.defaultProps = defaultProps$
|
|
21006
|
+
Popover.defaultProps = defaultProps$x;
|
|
20955
21007
|
Popover.displayName = "NutPopover";
|
|
20956
21008
|
function bound(position, min, max) {
|
|
20957
21009
|
let ret = position;
|
|
@@ -20989,7 +21041,7 @@ if (canUseDom) {
|
|
|
20989
21041
|
console.log(e);
|
|
20990
21042
|
}
|
|
20991
21043
|
}
|
|
20992
|
-
const defaultProps$
|
|
21044
|
+
const defaultProps$w = {
|
|
20993
21045
|
...ComponentDefaults,
|
|
20994
21046
|
pullingText: "",
|
|
20995
21047
|
canReleaseText: "",
|
|
@@ -21006,7 +21058,7 @@ const PullToRefresh = (p) => {
|
|
|
21006
21058
|
const classPrefix2 = "nut-pulltorefresh";
|
|
21007
21059
|
const { locale } = useConfig();
|
|
21008
21060
|
const props = {
|
|
21009
|
-
...defaultProps$
|
|
21061
|
+
...defaultProps$w,
|
|
21010
21062
|
...p,
|
|
21011
21063
|
...{
|
|
21012
21064
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -21149,10 +21201,10 @@ const PullToRefresh = (p) => {
|
|
|
21149
21201
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
21150
21202
|
);
|
|
21151
21203
|
};
|
|
21152
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
21204
|
+
PullToRefresh.defaultProps = defaultProps$w;
|
|
21153
21205
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
21154
21206
|
const AvatarContext = createContext({});
|
|
21155
|
-
const defaultProps$
|
|
21207
|
+
const defaultProps$v = {
|
|
21156
21208
|
...ComponentDefaults,
|
|
21157
21209
|
maxContent: "",
|
|
21158
21210
|
max: "",
|
|
@@ -21161,21 +21213,21 @@ const defaultProps$u = {
|
|
|
21161
21213
|
gap: "-8",
|
|
21162
21214
|
level: "left"
|
|
21163
21215
|
};
|
|
21164
|
-
const classPrefix$
|
|
21216
|
+
const classPrefix$9 = `nut-avatar-group`;
|
|
21165
21217
|
const AvatarGroup = (props) => {
|
|
21166
|
-
const propAvatarGroup = { ...defaultProps$
|
|
21218
|
+
const propAvatarGroup = { ...defaultProps$v, ...props };
|
|
21167
21219
|
const { className, style, children } = propAvatarGroup;
|
|
21168
21220
|
const avatarGroupRef = useRef(null);
|
|
21169
|
-
const cls = classNames(classPrefix$
|
|
21221
|
+
const cls = classNames(classPrefix$9, className);
|
|
21170
21222
|
const parentAvatar = {
|
|
21171
21223
|
propAvatarGroup,
|
|
21172
21224
|
avatarGroupRef
|
|
21173
21225
|
};
|
|
21174
21226
|
return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React__default.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
21175
21227
|
};
|
|
21176
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
21228
|
+
AvatarGroup.defaultProps = defaultProps$v;
|
|
21177
21229
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
21178
|
-
const defaultProps$
|
|
21230
|
+
const defaultProps$u = {
|
|
21179
21231
|
...ComponentDefaults,
|
|
21180
21232
|
size: "",
|
|
21181
21233
|
shape: "round",
|
|
@@ -21186,7 +21238,7 @@ const defaultProps$t = {
|
|
|
21186
21238
|
src: "",
|
|
21187
21239
|
alt: ""
|
|
21188
21240
|
};
|
|
21189
|
-
const classPrefix$
|
|
21241
|
+
const classPrefix$8 = `nut-avatar`;
|
|
21190
21242
|
const Avatar = (props) => {
|
|
21191
21243
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
21192
21244
|
const {
|
|
@@ -21205,7 +21257,7 @@ const Avatar = (props) => {
|
|
|
21205
21257
|
onError,
|
|
21206
21258
|
...rest
|
|
21207
21259
|
} = {
|
|
21208
|
-
...defaultProps$
|
|
21260
|
+
...defaultProps$u,
|
|
21209
21261
|
...props
|
|
21210
21262
|
};
|
|
21211
21263
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -21218,7 +21270,7 @@ const Avatar = (props) => {
|
|
|
21218
21270
|
[`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
|
|
21219
21271
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
21220
21272
|
});
|
|
21221
|
-
const cls = classNames(classPrefix$
|
|
21273
|
+
const cls = classNames(classPrefix$8, classes, className);
|
|
21222
21274
|
const styles = {
|
|
21223
21275
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
21224
21276
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -21287,10 +21339,10 @@ const Avatar = (props) => {
|
|
|
21287
21339
|
showMax && /* @__PURE__ */ React__default.createElement("div", { className: "text" }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}`)
|
|
21288
21340
|
));
|
|
21289
21341
|
};
|
|
21290
|
-
Avatar.defaultProps = defaultProps$
|
|
21342
|
+
Avatar.defaultProps = defaultProps$u;
|
|
21291
21343
|
Avatar.displayName = "NutAvatar";
|
|
21292
21344
|
Avatar.Group = AvatarGroup;
|
|
21293
|
-
const defaultProps$
|
|
21345
|
+
const defaultProps$t = {
|
|
21294
21346
|
...ComponentDefaults,
|
|
21295
21347
|
rows: 1,
|
|
21296
21348
|
animated: false,
|
|
@@ -21313,7 +21365,7 @@ const Skeleton = (props) => {
|
|
|
21313
21365
|
avatarShape,
|
|
21314
21366
|
...rest
|
|
21315
21367
|
} = {
|
|
21316
|
-
...defaultProps$
|
|
21368
|
+
...defaultProps$t,
|
|
21317
21369
|
...props
|
|
21318
21370
|
};
|
|
21319
21371
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -21349,7 +21401,7 @@ const Skeleton = (props) => {
|
|
|
21349
21401
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
21350
21402
|
})))));
|
|
21351
21403
|
};
|
|
21352
|
-
Skeleton.defaultProps = defaultProps$
|
|
21404
|
+
Skeleton.defaultProps = defaultProps$t;
|
|
21353
21405
|
Skeleton.displayName = "NutSkeleton";
|
|
21354
21406
|
function preventDefault(event, isStopPropagation) {
|
|
21355
21407
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -21359,13 +21411,13 @@ function preventDefault(event, isStopPropagation) {
|
|
|
21359
21411
|
event.stopPropagation();
|
|
21360
21412
|
}
|
|
21361
21413
|
}
|
|
21362
|
-
const defaultProps$
|
|
21414
|
+
const defaultProps$s = {
|
|
21363
21415
|
name: ""
|
|
21364
21416
|
};
|
|
21365
21417
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
21366
21418
|
const classPrefix2 = "nut-swipe";
|
|
21367
21419
|
const touch = useTouch();
|
|
21368
|
-
const { children, className, style } = { ...defaultProps$
|
|
21420
|
+
const { children, className, style } = { ...defaultProps$s, ...props };
|
|
21369
21421
|
const root2 = useRef();
|
|
21370
21422
|
const opened = useRef(false);
|
|
21371
21423
|
const lockClick = useRef(false);
|
|
@@ -21533,9 +21585,9 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
21533
21585
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__wrapper`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
21534
21586
|
);
|
|
21535
21587
|
});
|
|
21536
|
-
Swipe.defaultProps = defaultProps$
|
|
21588
|
+
Swipe.defaultProps = defaultProps$s;
|
|
21537
21589
|
Swipe.displayName = "NutSwipe";
|
|
21538
|
-
const classPrefix$
|
|
21590
|
+
const classPrefix$7 = "nut-toast";
|
|
21539
21591
|
class Notification extends React.PureComponent {
|
|
21540
21592
|
constructor(props) {
|
|
21541
21593
|
super(props);
|
|
@@ -21597,7 +21649,7 @@ class Notification extends React.PureComponent {
|
|
|
21597
21649
|
iconNode = /* @__PURE__ */ React.createElement(x$8, null);
|
|
21598
21650
|
break;
|
|
21599
21651
|
}
|
|
21600
|
-
return /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$
|
|
21652
|
+
return /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$7}__icon-wrapper` }, iconNode);
|
|
21601
21653
|
}
|
|
21602
21654
|
return icon;
|
|
21603
21655
|
}
|
|
@@ -21632,22 +21684,22 @@ class Notification extends React.PureComponent {
|
|
|
21632
21684
|
{
|
|
21633
21685
|
visible: show2,
|
|
21634
21686
|
style,
|
|
21635
|
-
className: `${classPrefix$
|
|
21687
|
+
className: `${classPrefix$7}__overlay-default ${className}`,
|
|
21636
21688
|
onClick: () => {
|
|
21637
21689
|
this.clickCover();
|
|
21638
21690
|
},
|
|
21639
21691
|
closeOnOverlayClick,
|
|
21640
21692
|
lockScroll
|
|
21641
21693
|
},
|
|
21642
|
-
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
21694
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7} ${classes}`, id: `toast-${id}` }, /* @__PURE__ */ React.createElement(
|
|
21643
21695
|
"div",
|
|
21644
21696
|
{
|
|
21645
|
-
className: `${classPrefix$
|
|
21697
|
+
className: `${classPrefix$7}__inner ${classPrefix$7}-${position} ${contentClassName}`,
|
|
21646
21698
|
style: contentStyle
|
|
21647
21699
|
},
|
|
21648
21700
|
this.renderIcon(),
|
|
21649
|
-
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
21650
|
-
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$
|
|
21701
|
+
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7}-title` }, title) : null,
|
|
21702
|
+
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$7}-text` }, content)
|
|
21651
21703
|
))
|
|
21652
21704
|
));
|
|
21653
21705
|
}
|
|
@@ -21754,7 +21806,7 @@ const Toast = {
|
|
|
21754
21806
|
}
|
|
21755
21807
|
}
|
|
21756
21808
|
};
|
|
21757
|
-
const defaultProps$
|
|
21809
|
+
const defaultProps$r = {
|
|
21758
21810
|
...ComponentDefaults,
|
|
21759
21811
|
type: "shake",
|
|
21760
21812
|
action: "initial",
|
|
@@ -21762,16 +21814,16 @@ const defaultProps$q = {
|
|
|
21762
21814
|
onClick: (event) => {
|
|
21763
21815
|
}
|
|
21764
21816
|
};
|
|
21765
|
-
const classPrefix$
|
|
21817
|
+
const classPrefix$6 = `nut-animate`;
|
|
21766
21818
|
const Animate = (props) => {
|
|
21767
21819
|
const { className, type: type4, action, loop: loop2, onClick, children, ...rest } = {
|
|
21768
|
-
...defaultProps$
|
|
21820
|
+
...defaultProps$r,
|
|
21769
21821
|
...props
|
|
21770
21822
|
};
|
|
21771
21823
|
const [clicked, setClicked] = useState(false);
|
|
21772
21824
|
const classes = classNames({
|
|
21773
21825
|
"nut-ani-container": true,
|
|
21774
|
-
[`${classPrefix$
|
|
21826
|
+
[`${classPrefix$6}-${type4}`]: action === "initial" || clicked ? type4 : false,
|
|
21775
21827
|
loop: loop2
|
|
21776
21828
|
});
|
|
21777
21829
|
const cls = classNames(classes, className);
|
|
@@ -21786,9 +21838,9 @@ const Animate = (props) => {
|
|
|
21786
21838
|
};
|
|
21787
21839
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React__default.createElement("div", { className: cls, onClick: handleClick2, ...rest }, children));
|
|
21788
21840
|
};
|
|
21789
|
-
Animate.defaultProps = defaultProps$
|
|
21841
|
+
Animate.defaultProps = defaultProps$r;
|
|
21790
21842
|
Animate.displayName = "NutAnimate";
|
|
21791
|
-
const defaultProps$
|
|
21843
|
+
const defaultProps$q = {
|
|
21792
21844
|
...ComponentDefaults,
|
|
21793
21845
|
length: 0,
|
|
21794
21846
|
value: "",
|
|
@@ -21807,7 +21859,7 @@ const CountUp = (props) => {
|
|
|
21807
21859
|
style,
|
|
21808
21860
|
...reset
|
|
21809
21861
|
} = {
|
|
21810
|
-
...defaultProps$
|
|
21862
|
+
...defaultProps$q,
|
|
21811
21863
|
...props
|
|
21812
21864
|
};
|
|
21813
21865
|
const classPrefix2 = "nut-countup";
|
|
@@ -21871,9 +21923,9 @@ const CountUp = (props) => {
|
|
|
21871
21923
|
);
|
|
21872
21924
|
})));
|
|
21873
21925
|
};
|
|
21874
|
-
CountUp.defaultProps = defaultProps$
|
|
21926
|
+
CountUp.defaultProps = defaultProps$q;
|
|
21875
21927
|
CountUp.displayName = "NutCountUp";
|
|
21876
|
-
const defaultProps$
|
|
21928
|
+
const defaultProps$p = {};
|
|
21877
21929
|
class AnimatingNumbers extends Component {
|
|
21878
21930
|
constructor(props) {
|
|
21879
21931
|
super(props);
|
|
@@ -21883,11 +21935,11 @@ class AnimatingNumbers extends Component {
|
|
|
21883
21935
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
|
|
21884
21936
|
}
|
|
21885
21937
|
}
|
|
21886
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
21938
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
21887
21939
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
21888
21940
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
21889
21941
|
AnimatingNumbers.CountUp = CountUp;
|
|
21890
|
-
const defaultProps$
|
|
21942
|
+
const defaultProps$o = {
|
|
21891
21943
|
...ComponentDefaults,
|
|
21892
21944
|
src: "",
|
|
21893
21945
|
muted: false,
|
|
@@ -21930,7 +21982,7 @@ const Audio = (props) => {
|
|
|
21930
21982
|
children,
|
|
21931
21983
|
...rest
|
|
21932
21984
|
} = {
|
|
21933
|
-
...defaultProps$
|
|
21985
|
+
...defaultProps$o,
|
|
21934
21986
|
...props
|
|
21935
21987
|
};
|
|
21936
21988
|
const [playing, setPlaying] = useState(false);
|
|
@@ -22136,9 +22188,9 @@ const Audio = (props) => {
|
|
|
22136
22188
|
/* @__PURE__ */ React__default.createElement("track", { kind: "captions" })
|
|
22137
22189
|
));
|
|
22138
22190
|
};
|
|
22139
|
-
Audio.defaultProps = defaultProps$
|
|
22191
|
+
Audio.defaultProps = defaultProps$o;
|
|
22140
22192
|
Audio.displayName = "NutAudio";
|
|
22141
|
-
const defaultProps$
|
|
22193
|
+
const defaultProps$n = {
|
|
22142
22194
|
...ComponentDefaults,
|
|
22143
22195
|
strokeWidth: 5,
|
|
22144
22196
|
radius: 50,
|
|
@@ -22147,7 +22199,7 @@ const defaultProps$m = {
|
|
|
22147
22199
|
background: "#e5e9f2",
|
|
22148
22200
|
clockwise: true
|
|
22149
22201
|
};
|
|
22150
|
-
const classPrefix$
|
|
22202
|
+
const classPrefix$5 = `nut-circleprogress`;
|
|
22151
22203
|
const CircleProgress = (props) => {
|
|
22152
22204
|
var _a2;
|
|
22153
22205
|
const {
|
|
@@ -22163,10 +22215,10 @@ const CircleProgress = (props) => {
|
|
|
22163
22215
|
strokeLinecap,
|
|
22164
22216
|
...restProps
|
|
22165
22217
|
} = {
|
|
22166
|
-
...defaultProps$
|
|
22218
|
+
...defaultProps$n,
|
|
22167
22219
|
...props
|
|
22168
22220
|
};
|
|
22169
|
-
const classes = classNames(className, classPrefix$
|
|
22221
|
+
const classes = classNames(className, classPrefix$5);
|
|
22170
22222
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
22171
22223
|
const styles = {
|
|
22172
22224
|
height: `${Number(radius) * 2}px`,
|
|
@@ -22232,7 +22284,7 @@ const CircleProgress = (props) => {
|
|
|
22232
22284
|
}
|
|
22233
22285
|
)), /* @__PURE__ */ React__default.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
22234
22286
|
};
|
|
22235
|
-
CircleProgress.defaultProps = defaultProps$
|
|
22287
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
22236
22288
|
CircleProgress.displayName = "NutCircleProgress";
|
|
22237
22289
|
const collapseContext = {
|
|
22238
22290
|
isOpen: (name) => {
|
|
@@ -22244,7 +22296,7 @@ const collapseContext = {
|
|
|
22244
22296
|
rotate: 180
|
|
22245
22297
|
};
|
|
22246
22298
|
const CollapseContext = createContext(collapseContext);
|
|
22247
|
-
const defaultProps$
|
|
22299
|
+
const defaultProps$m = {
|
|
22248
22300
|
...ComponentDefaults,
|
|
22249
22301
|
title: null,
|
|
22250
22302
|
name: "",
|
|
@@ -22265,7 +22317,7 @@ const CollapseItem = (props) => {
|
|
|
22265
22317
|
className,
|
|
22266
22318
|
...rest
|
|
22267
22319
|
} = {
|
|
22268
|
-
...defaultProps$
|
|
22320
|
+
...defaultProps$m,
|
|
22269
22321
|
...props
|
|
22270
22322
|
};
|
|
22271
22323
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -22342,9 +22394,9 @@ const CollapseItem = (props) => {
|
|
|
22342
22394
|
/* @__PURE__ */ React__default.createElement("div", { ref: contentRef, className: `${classPrefix2}__content-text` }, children)
|
|
22343
22395
|
));
|
|
22344
22396
|
};
|
|
22345
|
-
CollapseItem.defaultProps = defaultProps$
|
|
22397
|
+
CollapseItem.defaultProps = defaultProps$m;
|
|
22346
22398
|
CollapseItem.displayName = "NutCollapseItem";
|
|
22347
|
-
const defaultProps$
|
|
22399
|
+
const defaultProps$l = {
|
|
22348
22400
|
...ComponentDefaults,
|
|
22349
22401
|
defaultActiveName: [],
|
|
22350
22402
|
accordion: false,
|
|
@@ -22363,7 +22415,7 @@ const Collapse = (props) => {
|
|
|
22363
22415
|
rotate,
|
|
22364
22416
|
onChange
|
|
22365
22417
|
} = {
|
|
22366
|
-
...defaultProps$
|
|
22418
|
+
...defaultProps$l,
|
|
22367
22419
|
...props
|
|
22368
22420
|
};
|
|
22369
22421
|
const classPrefix2 = "nut-collapse";
|
|
@@ -22420,10 +22472,10 @@ const Collapse = (props) => {
|
|
|
22420
22472
|
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
22421
22473
|
);
|
|
22422
22474
|
};
|
|
22423
|
-
Collapse.defaultProps = defaultProps$
|
|
22475
|
+
Collapse.defaultProps = defaultProps$l;
|
|
22424
22476
|
Collapse.displayName = "NutCollapse";
|
|
22425
22477
|
Collapse.Item = CollapseItem;
|
|
22426
|
-
const defaultProps$
|
|
22478
|
+
const defaultProps$k = {
|
|
22427
22479
|
...ComponentDefaults,
|
|
22428
22480
|
paused: false,
|
|
22429
22481
|
startTime: Date.now(),
|
|
@@ -22455,7 +22507,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
22455
22507
|
onUpdate,
|
|
22456
22508
|
children,
|
|
22457
22509
|
...rest
|
|
22458
|
-
} = { ...defaultProps$
|
|
22510
|
+
} = { ...defaultProps$k, ...props };
|
|
22459
22511
|
const classPrefix2 = "nut-countdown";
|
|
22460
22512
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
22461
22513
|
const stateRef = useRef({
|
|
@@ -22666,9 +22718,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
22666
22718
|
);
|
|
22667
22719
|
};
|
|
22668
22720
|
const CountDown = React__default.forwardRef(InternalCountDown);
|
|
22669
|
-
CountDown.defaultProps = defaultProps$
|
|
22721
|
+
CountDown.defaultProps = defaultProps$k;
|
|
22670
22722
|
CountDown.displayName = "NutCountDown";
|
|
22671
|
-
const defaultProps$
|
|
22723
|
+
const defaultProps$j = {
|
|
22672
22724
|
...ComponentDefaults,
|
|
22673
22725
|
content: "",
|
|
22674
22726
|
direction: "end",
|
|
@@ -22678,7 +22730,7 @@ const defaultProps$i = {
|
|
|
22678
22730
|
symbol: "...",
|
|
22679
22731
|
lineHeight: "20"
|
|
22680
22732
|
};
|
|
22681
|
-
const classPrefix$
|
|
22733
|
+
const classPrefix$4 = `nut-ellipsis`;
|
|
22682
22734
|
const Ellipsis = (props) => {
|
|
22683
22735
|
var _a2, _b;
|
|
22684
22736
|
const {
|
|
@@ -22694,14 +22746,14 @@ const Ellipsis = (props) => {
|
|
|
22694
22746
|
onClick,
|
|
22695
22747
|
onChange,
|
|
22696
22748
|
...rest
|
|
22697
|
-
} = { ...defaultProps$
|
|
22749
|
+
} = { ...defaultProps$j, ...props };
|
|
22698
22750
|
let container = null;
|
|
22699
22751
|
let maxHeight = 0;
|
|
22700
22752
|
const [exceeded, setExceeded] = useState(false);
|
|
22701
22753
|
const [expanded, setExpanded] = useState(false);
|
|
22702
22754
|
const ellipsis = useRef();
|
|
22703
22755
|
const root2 = useRef(null);
|
|
22704
|
-
const classes = classNames(classPrefix$
|
|
22756
|
+
const classes = classNames(classPrefix$4, className);
|
|
22705
22757
|
useLayoutEffect(() => {
|
|
22706
22758
|
if (content) {
|
|
22707
22759
|
createContainer();
|
|
@@ -22842,9 +22894,9 @@ const Ellipsis = (props) => {
|
|
|
22842
22894
|
collapseText
|
|
22843
22895
|
) : null) : null));
|
|
22844
22896
|
};
|
|
22845
|
-
Ellipsis.defaultProps = defaultProps$
|
|
22897
|
+
Ellipsis.defaultProps = defaultProps$j;
|
|
22846
22898
|
Ellipsis.displayName = "NutEllipsis";
|
|
22847
|
-
const defaultProps$
|
|
22899
|
+
const defaultProps$i = {
|
|
22848
22900
|
...ComponentDefaults,
|
|
22849
22901
|
source: {
|
|
22850
22902
|
type: {},
|
|
@@ -22860,7 +22912,7 @@ const defaultProps$h = {
|
|
|
22860
22912
|
loop: false
|
|
22861
22913
|
}
|
|
22862
22914
|
};
|
|
22863
|
-
const classPrefix$
|
|
22915
|
+
const classPrefix$3 = `nut-video`;
|
|
22864
22916
|
const Video = (props) => {
|
|
22865
22917
|
const {
|
|
22866
22918
|
children,
|
|
@@ -22872,11 +22924,11 @@ const Video = (props) => {
|
|
|
22872
22924
|
onPlayEnd,
|
|
22873
22925
|
...restProps
|
|
22874
22926
|
} = {
|
|
22875
|
-
...defaultProps$
|
|
22927
|
+
...defaultProps$i,
|
|
22876
22928
|
...props
|
|
22877
22929
|
};
|
|
22878
22930
|
const rootRef = useRef(null);
|
|
22879
|
-
const classes = classNames(className, classPrefix$
|
|
22931
|
+
const classes = classNames(className, classPrefix$3);
|
|
22880
22932
|
useEffect(() => {
|
|
22881
22933
|
init();
|
|
22882
22934
|
}, []);
|
|
@@ -22922,22 +22974,22 @@ const Video = (props) => {
|
|
|
22922
22974
|
/* @__PURE__ */ React__default.createElement("track", { kind: "captions" })
|
|
22923
22975
|
));
|
|
22924
22976
|
};
|
|
22925
|
-
Video.defaultProps = defaultProps$
|
|
22977
|
+
Video.defaultProps = defaultProps$i;
|
|
22926
22978
|
Video.displayName = "NutVideo";
|
|
22927
22979
|
const DataContext$1 = createContext({});
|
|
22928
|
-
const defaultProps$
|
|
22980
|
+
const defaultProps$h = {
|
|
22929
22981
|
total: 3,
|
|
22930
22982
|
current: 0,
|
|
22931
22983
|
direction: "horizontal"
|
|
22932
22984
|
};
|
|
22933
|
-
const classPrefix$
|
|
22985
|
+
const classPrefix$2 = `nut-indicator`;
|
|
22934
22986
|
const Indicator = (props) => {
|
|
22935
22987
|
const { total, current, children, className, direction, ...rest } = {
|
|
22936
|
-
...defaultProps$
|
|
22988
|
+
...defaultProps$h,
|
|
22937
22989
|
...props
|
|
22938
22990
|
};
|
|
22939
22991
|
const classes = classNames({
|
|
22940
|
-
[`${classPrefix$
|
|
22992
|
+
[`${classPrefix$2}__vertical`]: direction === "vertical"
|
|
22941
22993
|
});
|
|
22942
22994
|
const renderElement = () => {
|
|
22943
22995
|
const childs = [];
|
|
@@ -22947,18 +22999,18 @@ const Indicator = (props) => {
|
|
|
22947
22999
|
"div",
|
|
22948
23000
|
{
|
|
22949
23001
|
key: item,
|
|
22950
|
-
className: `${classPrefix$
|
|
23002
|
+
className: `${classPrefix$2}__dot ${classPrefix$2}__active`
|
|
22951
23003
|
}
|
|
22952
|
-
) : /* @__PURE__ */ React__default.createElement("div", { key: item, className: `${classPrefix$
|
|
23004
|
+
) : /* @__PURE__ */ React__default.createElement("div", { key: item, className: `${classPrefix$2}__dot` })
|
|
22953
23005
|
);
|
|
22954
23006
|
}
|
|
22955
23007
|
return childs;
|
|
22956
23008
|
};
|
|
22957
23009
|
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
22958
23010
|
};
|
|
22959
|
-
Indicator.defaultProps = defaultProps$
|
|
23011
|
+
Indicator.defaultProps = defaultProps$h;
|
|
22960
23012
|
Indicator.displayName = "NutIndicator";
|
|
22961
|
-
const defaultProps$
|
|
23013
|
+
const defaultProps$g = {
|
|
22962
23014
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
22963
23015
|
height: 0,
|
|
22964
23016
|
duration: 500,
|
|
@@ -22975,7 +23027,7 @@ const defaultProps$f = {
|
|
|
22975
23027
|
};
|
|
22976
23028
|
const DISTANCE = 5;
|
|
22977
23029
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
22978
|
-
const propSwiper = { ...defaultProps$
|
|
23030
|
+
const propSwiper = { ...defaultProps$g, ...props };
|
|
22979
23031
|
const {
|
|
22980
23032
|
children,
|
|
22981
23033
|
direction,
|
|
@@ -23388,14 +23440,14 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
23388
23440
|
renderIndicator()
|
|
23389
23441
|
));
|
|
23390
23442
|
});
|
|
23391
|
-
Swiper.defaultProps = defaultProps$
|
|
23443
|
+
Swiper.defaultProps = defaultProps$g;
|
|
23392
23444
|
Swiper.displayName = "NutSwiper";
|
|
23393
|
-
const defaultProps$
|
|
23445
|
+
const defaultProps$f = {
|
|
23394
23446
|
direction: "horizontal"
|
|
23395
23447
|
};
|
|
23396
23448
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
23397
23449
|
const classPrefix2 = "nut-swiper-item";
|
|
23398
|
-
const _props = { ...defaultProps$
|
|
23450
|
+
const _props = { ...defaultProps$f, ...props };
|
|
23399
23451
|
const { className, style, children, direction, size } = _props;
|
|
23400
23452
|
const parent = useContext(DataContext$1);
|
|
23401
23453
|
const classes = classNames(classPrefix2, className);
|
|
@@ -23410,11 +23462,11 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
23410
23462
|
};
|
|
23411
23463
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: { ...style, ...getStyle() } }, children);
|
|
23412
23464
|
});
|
|
23413
|
-
SwiperItem.defaultProps = defaultProps$
|
|
23465
|
+
SwiperItem.defaultProps = defaultProps$f;
|
|
23414
23466
|
SwiperItem.displayName = "NutSwiperItem";
|
|
23415
23467
|
const InnerSwiper = Swiper;
|
|
23416
23468
|
InnerSwiper.Item = SwiperItem;
|
|
23417
|
-
const defaultProps$
|
|
23469
|
+
const defaultProps$e = {
|
|
23418
23470
|
...ComponentDefaults,
|
|
23419
23471
|
images: [],
|
|
23420
23472
|
videos: [],
|
|
@@ -23616,9 +23668,9 @@ const ImagePreview = (props) => {
|
|
|
23616
23668
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
23617
23669
|
);
|
|
23618
23670
|
};
|
|
23619
|
-
ImagePreview.defaultProps = defaultProps$
|
|
23671
|
+
ImagePreview.defaultProps = defaultProps$e;
|
|
23620
23672
|
ImagePreview.displayName = "NutImagePreview";
|
|
23621
|
-
const defaultProps$
|
|
23673
|
+
const defaultProps$d = {
|
|
23622
23674
|
...ComponentDefaults,
|
|
23623
23675
|
defaultValue: 1,
|
|
23624
23676
|
mode: "multi",
|
|
@@ -23646,7 +23698,7 @@ const Pagination = (props) => {
|
|
|
23646
23698
|
className,
|
|
23647
23699
|
...rest
|
|
23648
23700
|
} = {
|
|
23649
|
-
...defaultProps$
|
|
23701
|
+
...defaultProps$d,
|
|
23650
23702
|
...props
|
|
23651
23703
|
};
|
|
23652
23704
|
const classPrefix2 = "nut-pagination";
|
|
@@ -23728,9 +23780,9 @@ const Pagination = (props) => {
|
|
|
23728
23780
|
next || locale.pagination.next
|
|
23729
23781
|
));
|
|
23730
23782
|
};
|
|
23731
|
-
Pagination.defaultProps = defaultProps$
|
|
23783
|
+
Pagination.defaultProps = defaultProps$d;
|
|
23732
23784
|
Pagination.displayName = "NutPagination";
|
|
23733
|
-
const defaultProps$
|
|
23785
|
+
const defaultProps$c = {
|
|
23734
23786
|
...ComponentDefaults,
|
|
23735
23787
|
price: 0,
|
|
23736
23788
|
symbol: "¥",
|
|
@@ -23753,7 +23805,7 @@ const Price = (props) => {
|
|
|
23753
23805
|
style,
|
|
23754
23806
|
...rest
|
|
23755
23807
|
} = {
|
|
23756
|
-
...defaultProps$
|
|
23808
|
+
...defaultProps$c,
|
|
23757
23809
|
...props
|
|
23758
23810
|
};
|
|
23759
23811
|
const classPrefix2 = "nut-price";
|
|
@@ -23833,10 +23885,10 @@ const Price = (props) => {
|
|
|
23833
23885
|
symbol && position === "after" ? renderSymbol() : null
|
|
23834
23886
|
);
|
|
23835
23887
|
};
|
|
23836
|
-
Price.defaultProps = defaultProps$
|
|
23888
|
+
Price.defaultProps = defaultProps$c;
|
|
23837
23889
|
Price.displayName = "NutPrice";
|
|
23838
23890
|
const DataContext = createContext({});
|
|
23839
|
-
const defaultProps$
|
|
23891
|
+
const defaultProps$b = {
|
|
23840
23892
|
...ComponentDefaults,
|
|
23841
23893
|
title: "",
|
|
23842
23894
|
description: "",
|
|
@@ -23845,7 +23897,7 @@ const defaultProps$a = {
|
|
|
23845
23897
|
};
|
|
23846
23898
|
const Step = (props) => {
|
|
23847
23899
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
23848
|
-
...defaultProps$
|
|
23900
|
+
...defaultProps$b,
|
|
23849
23901
|
...props
|
|
23850
23902
|
};
|
|
23851
23903
|
const parent = useContext(DataContext);
|
|
@@ -23879,16 +23931,16 @@ const Step = (props) => {
|
|
|
23879
23931
|
};
|
|
23880
23932
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React__default.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-description" }, description)));
|
|
23881
23933
|
};
|
|
23882
|
-
Step.defaultProps = defaultProps$
|
|
23934
|
+
Step.defaultProps = defaultProps$b;
|
|
23883
23935
|
Step.displayName = "NutStep";
|
|
23884
|
-
const defaultProps$
|
|
23936
|
+
const defaultProps$a = {
|
|
23885
23937
|
...ComponentDefaults,
|
|
23886
23938
|
value: 0,
|
|
23887
23939
|
direction: "horizontal",
|
|
23888
23940
|
dot: false
|
|
23889
23941
|
};
|
|
23890
23942
|
const Steps = (props) => {
|
|
23891
|
-
const propSteps = { ...defaultProps$
|
|
23943
|
+
const propSteps = { ...defaultProps$a, ...props };
|
|
23892
23944
|
const {
|
|
23893
23945
|
children,
|
|
23894
23946
|
value,
|
|
@@ -23919,9 +23971,9 @@ const Steps = (props) => {
|
|
|
23919
23971
|
children
|
|
23920
23972
|
));
|
|
23921
23973
|
};
|
|
23922
|
-
Steps.defaultProps = defaultProps$
|
|
23974
|
+
Steps.defaultProps = defaultProps$a;
|
|
23923
23975
|
Steps.displayName = "NutSteps";
|
|
23924
|
-
const defaultProps$
|
|
23976
|
+
const defaultProps$9 = {
|
|
23925
23977
|
...ComponentDefaults,
|
|
23926
23978
|
columns: [],
|
|
23927
23979
|
data: [],
|
|
@@ -23933,7 +23985,7 @@ const defaultProps$8 = {
|
|
|
23933
23985
|
};
|
|
23934
23986
|
const Table = (props) => {
|
|
23935
23987
|
const { locale } = useConfig();
|
|
23936
|
-
defaultProps$
|
|
23988
|
+
defaultProps$9.noData = locale.noData;
|
|
23937
23989
|
const {
|
|
23938
23990
|
children,
|
|
23939
23991
|
className,
|
|
@@ -23949,7 +24001,7 @@ const Table = (props) => {
|
|
|
23949
24001
|
onSort,
|
|
23950
24002
|
...rest
|
|
23951
24003
|
} = {
|
|
23952
|
-
...defaultProps$
|
|
24004
|
+
...defaultProps$9,
|
|
23953
24005
|
...props
|
|
23954
24006
|
};
|
|
23955
24007
|
const [curData, setCurData] = useState(data);
|
|
@@ -24032,9 +24084,9 @@ const Table = (props) => {
|
|
|
24032
24084
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
24033
24085
|
), (summary || curData.length === 0) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
24034
24086
|
};
|
|
24035
|
-
Table.defaultProps = defaultProps$
|
|
24087
|
+
Table.defaultProps = defaultProps$9;
|
|
24036
24088
|
Table.displayName = "NutTable";
|
|
24037
|
-
const defaultProps$
|
|
24089
|
+
const defaultProps$8 = {
|
|
24038
24090
|
...ComponentDefaults,
|
|
24039
24091
|
type: "default",
|
|
24040
24092
|
background: "",
|
|
@@ -24065,7 +24117,7 @@ const Tag = (props) => {
|
|
|
24065
24117
|
onClick,
|
|
24066
24118
|
onClose
|
|
24067
24119
|
} = {
|
|
24068
|
-
...defaultProps$
|
|
24120
|
+
...defaultProps$8,
|
|
24069
24121
|
...props
|
|
24070
24122
|
};
|
|
24071
24123
|
const [tagClass, setTagClass] = useState("");
|
|
@@ -24141,8 +24193,166 @@ const Tag = (props) => {
|
|
|
24141
24193
|
children && /* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
24142
24194
|
));
|
|
24143
24195
|
};
|
|
24144
|
-
Tag.defaultProps = defaultProps$
|
|
24196
|
+
Tag.defaultProps = defaultProps$8;
|
|
24145
24197
|
Tag.displayName = "NutTag";
|
|
24198
|
+
const defaultProps$7 = {
|
|
24199
|
+
...ComponentDefaults,
|
|
24200
|
+
visible: false,
|
|
24201
|
+
type: "step",
|
|
24202
|
+
location: "bottom",
|
|
24203
|
+
mask: true,
|
|
24204
|
+
maskWidth: "",
|
|
24205
|
+
maskHeight: "",
|
|
24206
|
+
offset: [8, 10],
|
|
24207
|
+
title: "",
|
|
24208
|
+
next: "",
|
|
24209
|
+
prev: "",
|
|
24210
|
+
complete: "",
|
|
24211
|
+
showPrev: true,
|
|
24212
|
+
closeOnOverlayClick: true
|
|
24213
|
+
};
|
|
24214
|
+
const classPrefix$1 = "nut-tour";
|
|
24215
|
+
const Tour = (props) => {
|
|
24216
|
+
const { locale } = useConfig();
|
|
24217
|
+
const {
|
|
24218
|
+
children,
|
|
24219
|
+
className,
|
|
24220
|
+
title,
|
|
24221
|
+
closeOnOverlayClick,
|
|
24222
|
+
showPrev,
|
|
24223
|
+
list,
|
|
24224
|
+
type: type4,
|
|
24225
|
+
location,
|
|
24226
|
+
visible,
|
|
24227
|
+
mask,
|
|
24228
|
+
maskWidth,
|
|
24229
|
+
maskHeight,
|
|
24230
|
+
offset,
|
|
24231
|
+
next,
|
|
24232
|
+
prev,
|
|
24233
|
+
complete,
|
|
24234
|
+
onClose,
|
|
24235
|
+
onChange,
|
|
24236
|
+
...rest
|
|
24237
|
+
} = {
|
|
24238
|
+
...defaultProps$7,
|
|
24239
|
+
...props
|
|
24240
|
+
};
|
|
24241
|
+
const [showTour, setShowTour] = useState(false);
|
|
24242
|
+
const [showPopup, setShowPopup] = useState(false);
|
|
24243
|
+
const [active, setActive] = useState(0);
|
|
24244
|
+
const [maskRect, setMaskRect] = useState({
|
|
24245
|
+
top: 0,
|
|
24246
|
+
left: 0,
|
|
24247
|
+
right: 0,
|
|
24248
|
+
bottom: 0,
|
|
24249
|
+
width: 0,
|
|
24250
|
+
height: 0
|
|
24251
|
+
});
|
|
24252
|
+
const classes = classNames(className, classPrefix$1);
|
|
24253
|
+
useEffect(() => {
|
|
24254
|
+
if (visible) {
|
|
24255
|
+
getRootPosition();
|
|
24256
|
+
}
|
|
24257
|
+
setActive(0);
|
|
24258
|
+
setShowTour(visible);
|
|
24259
|
+
setShowPopup(visible);
|
|
24260
|
+
}, [visible]);
|
|
24261
|
+
useEffect(() => {
|
|
24262
|
+
if (visible) {
|
|
24263
|
+
setShowPopup(true);
|
|
24264
|
+
getRootPosition();
|
|
24265
|
+
}
|
|
24266
|
+
}, [active]);
|
|
24267
|
+
const getRootPosition = () => {
|
|
24268
|
+
const el = document.querySelector(`#${list[active].target}`);
|
|
24269
|
+
const rect = getRect(el);
|
|
24270
|
+
setMaskRect(rect);
|
|
24271
|
+
};
|
|
24272
|
+
const maskStyle = () => {
|
|
24273
|
+
const { width, height, left, top } = maskRect;
|
|
24274
|
+
const center = [left + width / 2, top + height / 2];
|
|
24275
|
+
const w = Number(maskWidth || width);
|
|
24276
|
+
const h = Number(maskHeight || height);
|
|
24277
|
+
const styles = {
|
|
24278
|
+
width: `${w + +offset[1] * 2}px`,
|
|
24279
|
+
height: `${h + +offset[0] * 2}px`,
|
|
24280
|
+
top: `${center[1] - h / 2 - +offset[0]}px`,
|
|
24281
|
+
left: `${center[0] - w / 2 - +offset[1]}px`
|
|
24282
|
+
};
|
|
24283
|
+
return styles;
|
|
24284
|
+
};
|
|
24285
|
+
const maskClose = (e) => {
|
|
24286
|
+
setShowTour(false);
|
|
24287
|
+
setShowPopup(false);
|
|
24288
|
+
onClose && onClose(e);
|
|
24289
|
+
};
|
|
24290
|
+
const handleClickMask = (e) => {
|
|
24291
|
+
closeOnOverlayClick && maskClose(e);
|
|
24292
|
+
};
|
|
24293
|
+
const changeStep = (type22) => {
|
|
24294
|
+
if (type22 === "next") {
|
|
24295
|
+
setActive(active + 1);
|
|
24296
|
+
onChange && onChange(active + 1);
|
|
24297
|
+
} else {
|
|
24298
|
+
setActive(active - 1);
|
|
24299
|
+
onChange && onChange(active - 1);
|
|
24300
|
+
}
|
|
24301
|
+
setShowPopup(false);
|
|
24302
|
+
};
|
|
24303
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...rest }, /* @__PURE__ */ React__default.createElement(
|
|
24304
|
+
"div",
|
|
24305
|
+
{
|
|
24306
|
+
className: "nut-tour-masked",
|
|
24307
|
+
style: { display: showTour ? "block" : "none" },
|
|
24308
|
+
onClick: handleClickMask
|
|
24309
|
+
}
|
|
24310
|
+
), list.map((item, index) => {
|
|
24311
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: index, style: { height: 0 } }, index === active && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, showTour && /* @__PURE__ */ React__default.createElement(
|
|
24312
|
+
"div",
|
|
24313
|
+
{
|
|
24314
|
+
className: `${mask ? "nut-tour-mask" : "nut-tour-mask nut-tour-mask-none"}`,
|
|
24315
|
+
id: "nut-tour-popid",
|
|
24316
|
+
style: maskStyle()
|
|
24317
|
+
}
|
|
24318
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
24319
|
+
Popover,
|
|
24320
|
+
{
|
|
24321
|
+
visible: showPopup,
|
|
24322
|
+
location: item.location || location,
|
|
24323
|
+
targetId: "nut-tour-popid",
|
|
24324
|
+
closeOnOutsideClick: false,
|
|
24325
|
+
offset: item.popoverOffset || [0, 12],
|
|
24326
|
+
arrowOffset: item.arrowOffset || 0
|
|
24327
|
+
},
|
|
24328
|
+
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null),
|
|
24329
|
+
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "step" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content" }, title && /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-top" }, /* @__PURE__ */ React__default.createElement("div", { onClick: (e) => maskClose(e) }, /* @__PURE__ */ React__default.createElement(x$b, { className: "nut-tour-content-top-close" }))), /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-inner" }, item.content), /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-bottom" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-bottom-init" }, active + 1, "/", list.length), /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-bottom-operate" }, active !== 0 && showPrev && /* @__PURE__ */ React__default.createElement(
|
|
24330
|
+
"div",
|
|
24331
|
+
{
|
|
24332
|
+
className: "nut-tour-content-bottom-operate-btn",
|
|
24333
|
+
onClick: () => changeStep("prev")
|
|
24334
|
+
},
|
|
24335
|
+
prev || locale.tour.prevStepText
|
|
24336
|
+
), list.length - 1 === active && /* @__PURE__ */ React__default.createElement(
|
|
24337
|
+
"div",
|
|
24338
|
+
{
|
|
24339
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
24340
|
+
onClick: (e) => maskClose(e)
|
|
24341
|
+
},
|
|
24342
|
+
complete || locale.tour.completeText
|
|
24343
|
+
), list.length - 1 !== active && /* @__PURE__ */ React__default.createElement(
|
|
24344
|
+
"div",
|
|
24345
|
+
{
|
|
24346
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
24347
|
+
onClick: () => changeStep("next")
|
|
24348
|
+
},
|
|
24349
|
+
next || locale.tour.nextStepText
|
|
24350
|
+
)))), type4 === "tile" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content nut-tour-content-tile" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-inner" }, item.content))))
|
|
24351
|
+
)));
|
|
24352
|
+
}));
|
|
24353
|
+
};
|
|
24354
|
+
Tour.defaultProps = defaultProps$7;
|
|
24355
|
+
Tour.displayName = "NutTour";
|
|
24146
24356
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
24147
24357
|
let index = 0;
|
|
24148
24358
|
const positions = Array(length);
|
|
@@ -25050,6 +25260,7 @@ export {
|
|
|
25050
25260
|
TimeDetail,
|
|
25051
25261
|
TimeSelect,
|
|
25052
25262
|
Toast,
|
|
25263
|
+
Tour,
|
|
25053
25264
|
TrendArrow,
|
|
25054
25265
|
Uploader,
|
|
25055
25266
|
Video,
|