@nutui/nutui-react 2.0.10 → 2.0.11-beta.0
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.umd.js
CHANGED
|
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
return value;
|
|
10
10
|
};
|
|
11
11
|
/*!
|
|
12
|
-
* @nutui/nutui-react v2.0.
|
|
12
|
+
* @nutui/nutui-react v2.0.11 Wed Aug 09 2023 13:48:21 GMT+0800 (China Standard Time)
|
|
13
13
|
* (c) 2023 @jdf2e.
|
|
14
14
|
* Released under the MIT License.
|
|
15
15
|
*/
|
|
@@ -2456,7 +2456,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2456
2456
|
style: {}
|
|
2457
2457
|
};
|
|
2458
2458
|
const prefixCls$1 = "nut-button";
|
|
2459
|
-
const defaultProps$
|
|
2459
|
+
const defaultProps$1s = {
|
|
2460
2460
|
...ComponentDefaults,
|
|
2461
2461
|
color: "",
|
|
2462
2462
|
type: "default",
|
|
@@ -2490,7 +2490,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2490
2490
|
nativeType,
|
|
2491
2491
|
...rest
|
|
2492
2492
|
} = {
|
|
2493
|
-
...defaultProps$
|
|
2493
|
+
...defaultProps$1s,
|
|
2494
2494
|
...props
|
|
2495
2495
|
};
|
|
2496
2496
|
const getStyle = React.useCallback(() => {
|
|
@@ -2541,29 +2541,29 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2541
2541
|
}
|
|
2542
2542
|
);
|
|
2543
2543
|
Button.displayName = "NutButton";
|
|
2544
|
-
const defaultProps$
|
|
2544
|
+
const defaultProps$1r = {
|
|
2545
2545
|
...ComponentDefaults,
|
|
2546
2546
|
title: "",
|
|
2547
2547
|
description: "",
|
|
2548
2548
|
divider: true
|
|
2549
2549
|
};
|
|
2550
|
-
const classPrefix$
|
|
2550
|
+
const classPrefix$p = "nut-cell-group";
|
|
2551
2551
|
const CellGroup = (props) => {
|
|
2552
2552
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2553
|
-
...defaultProps$
|
|
2553
|
+
...defaultProps$1r,
|
|
2554
2554
|
...props
|
|
2555
2555
|
};
|
|
2556
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$
|
|
2556
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$p, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$p}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$p}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2557
2557
|
"div",
|
|
2558
2558
|
{
|
|
2559
|
-
className: `${classPrefix$
|
|
2559
|
+
className: `${classPrefix$p}__wrap ${divider ? `${classPrefix$p}__wrap--divider` : ""}`
|
|
2560
2560
|
},
|
|
2561
2561
|
children
|
|
2562
2562
|
));
|
|
2563
2563
|
};
|
|
2564
|
-
CellGroup.defaultProps = defaultProps$
|
|
2564
|
+
CellGroup.defaultProps = defaultProps$1r;
|
|
2565
2565
|
CellGroup.displayName = "NutCellGroup";
|
|
2566
|
-
const defaultProps$
|
|
2566
|
+
const defaultProps$1q = {
|
|
2567
2567
|
...ComponentDefaults,
|
|
2568
2568
|
title: null,
|
|
2569
2569
|
description: null,
|
|
@@ -2573,7 +2573,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2573
2573
|
onClick: (event) => {
|
|
2574
2574
|
}
|
|
2575
2575
|
};
|
|
2576
|
-
const classPrefix$
|
|
2576
|
+
const classPrefix$o = "nut-cell";
|
|
2577
2577
|
const Cell = (props) => {
|
|
2578
2578
|
const {
|
|
2579
2579
|
children,
|
|
@@ -2587,7 +2587,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2587
2587
|
style,
|
|
2588
2588
|
...rest
|
|
2589
2589
|
} = {
|
|
2590
|
-
...defaultProps$
|
|
2590
|
+
...defaultProps$1q,
|
|
2591
2591
|
...props
|
|
2592
2592
|
};
|
|
2593
2593
|
const handleClick2 = (event) => {
|
|
@@ -2604,22 +2604,22 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2604
2604
|
return /* @__PURE__ */ React.createElement(
|
|
2605
2605
|
"div",
|
|
2606
2606
|
{
|
|
2607
|
-
className: classNames(classPrefix$
|
|
2607
|
+
className: classNames(classPrefix$o, className),
|
|
2608
2608
|
onClick: (event) => handleClick2(event),
|
|
2609
2609
|
style: baseStyle,
|
|
2610
2610
|
...rest
|
|
2611
2611
|
},
|
|
2612
|
-
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2612
|
+
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
2613
2613
|
"div",
|
|
2614
2614
|
{
|
|
2615
|
-
className: `${classPrefix$
|
|
2615
|
+
className: `${classPrefix$o}__extra`,
|
|
2616
2616
|
style: styles
|
|
2617
2617
|
},
|
|
2618
2618
|
extra
|
|
2619
|
-
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2619
|
+
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__divider` }))
|
|
2620
2620
|
);
|
|
2621
2621
|
};
|
|
2622
|
-
Cell.defaultProps = defaultProps$
|
|
2622
|
+
Cell.defaultProps = defaultProps$1q;
|
|
2623
2623
|
Cell.displayName = "NutCell";
|
|
2624
2624
|
Cell.Group = CellGroup;
|
|
2625
2625
|
var INFINITY = 1 / 0;
|
|
@@ -3697,11 +3697,16 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3697
3697
|
refreshingText: "加载中...",
|
|
3698
3698
|
completeText: "刷新成功"
|
|
3699
3699
|
},
|
|
3700
|
+
tour: {
|
|
3701
|
+
prevStepText: "上一步",
|
|
3702
|
+
completeText: "完成",
|
|
3703
|
+
nextStepText: "下一步"
|
|
3704
|
+
},
|
|
3700
3705
|
watermark: {
|
|
3701
3706
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
3702
3707
|
}
|
|
3703
3708
|
};
|
|
3704
|
-
const classPrefix$
|
|
3709
|
+
const classPrefix$n = "nut-configprovider";
|
|
3705
3710
|
const defaultConfigRef = {
|
|
3706
3711
|
current: {
|
|
3707
3712
|
locale: zhCN
|
|
@@ -3742,7 +3747,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3742
3747
|
return /* @__PURE__ */ React.createElement(ConfigContext.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
|
|
3743
3748
|
"div",
|
|
3744
3749
|
{
|
|
3745
|
-
className: classNames(classPrefix$
|
|
3750
|
+
className: classNames(classPrefix$n, className),
|
|
3746
3751
|
style: {
|
|
3747
3752
|
...cssVarStyle,
|
|
3748
3753
|
...style
|
|
@@ -3755,7 +3760,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3755
3760
|
const pxCheck = (value) => {
|
|
3756
3761
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
3757
3762
|
};
|
|
3758
|
-
const defaultProps$
|
|
3763
|
+
const defaultProps$1p = {
|
|
3759
3764
|
...ComponentDefaults,
|
|
3760
3765
|
fit: "fill",
|
|
3761
3766
|
position: "center",
|
|
@@ -3766,7 +3771,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3766
3771
|
loading: true,
|
|
3767
3772
|
lazy: false
|
|
3768
3773
|
};
|
|
3769
|
-
const classPrefix$
|
|
3774
|
+
const classPrefix$m = "nut-image";
|
|
3770
3775
|
const Image$1 = (props) => {
|
|
3771
3776
|
const {
|
|
3772
3777
|
className,
|
|
@@ -3784,7 +3789,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3784
3789
|
onClick,
|
|
3785
3790
|
onLoad,
|
|
3786
3791
|
onError
|
|
3787
|
-
} = { ...defaultProps$
|
|
3792
|
+
} = { ...defaultProps$1p, ...props };
|
|
3788
3793
|
const [innerLoading, setInnerLoading] = React.useState(true);
|
|
3789
3794
|
const [isError, setIsError] = React.useState(false);
|
|
3790
3795
|
const imgRef = React.useRef(null);
|
|
@@ -3877,7 +3882,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3877
3882
|
return /* @__PURE__ */ React.createElement(
|
|
3878
3883
|
"div",
|
|
3879
3884
|
{
|
|
3880
|
-
className: classNames(classPrefix$
|
|
3885
|
+
className: classNames(classPrefix$m, className),
|
|
3881
3886
|
style: containerStyle,
|
|
3882
3887
|
onClick: (e) => {
|
|
3883
3888
|
imageClick(e);
|
|
@@ -3911,7 +3916,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3911
3916
|
renderErrorImg()
|
|
3912
3917
|
);
|
|
3913
3918
|
};
|
|
3914
|
-
Image$1.defaultProps = defaultProps$
|
|
3919
|
+
Image$1.defaultProps = defaultProps$1p;
|
|
3915
3920
|
Image$1.displayName = "NutImage";
|
|
3916
3921
|
function _extends$4() {
|
|
3917
3922
|
_extends$4 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -5736,7 +5741,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5736
5741
|
Overlay.defaultProps = defaultOverlayProps;
|
|
5737
5742
|
Overlay.displayName = "NutOverlay";
|
|
5738
5743
|
const DataContext$2 = React.createContext({});
|
|
5739
|
-
const defaultProps$
|
|
5744
|
+
const defaultProps$1o = {
|
|
5740
5745
|
...ComponentDefaults,
|
|
5741
5746
|
span: "24",
|
|
5742
5747
|
offset: "0",
|
|
@@ -5744,7 +5749,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5744
5749
|
};
|
|
5745
5750
|
const Col = (props) => {
|
|
5746
5751
|
const { className, style, span, offset, children, onClick } = {
|
|
5747
|
-
...defaultProps$
|
|
5752
|
+
...defaultProps$1o,
|
|
5748
5753
|
...props
|
|
5749
5754
|
};
|
|
5750
5755
|
const [colName, setColName] = React.useState("");
|
|
@@ -5776,39 +5781,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5776
5781
|
children
|
|
5777
5782
|
);
|
|
5778
5783
|
};
|
|
5779
|
-
Col.defaultProps = defaultProps$
|
|
5784
|
+
Col.defaultProps = defaultProps$1o;
|
|
5780
5785
|
Col.displayName = "NutCol";
|
|
5781
|
-
const defaultProps$
|
|
5786
|
+
const defaultProps$1n = {
|
|
5782
5787
|
...ComponentDefaults,
|
|
5783
5788
|
contentPosition: "center",
|
|
5784
5789
|
direction: "horizontal"
|
|
5785
5790
|
};
|
|
5786
|
-
const classPrefix$
|
|
5791
|
+
const classPrefix$l = `nut-divider`;
|
|
5787
5792
|
const Divider = (props) => {
|
|
5788
5793
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
5789
|
-
...defaultProps$
|
|
5794
|
+
...defaultProps$1n,
|
|
5790
5795
|
...props
|
|
5791
5796
|
};
|
|
5792
5797
|
const classes = direction === "horizontal" ? classNames({
|
|
5793
|
-
[`${classPrefix$
|
|
5794
|
-
[`${classPrefix$
|
|
5795
|
-
[`${classPrefix$
|
|
5796
|
-
[`${classPrefix$
|
|
5797
|
-
[`${classPrefix$
|
|
5798
|
+
[`${classPrefix$l}`]: true,
|
|
5799
|
+
[`${classPrefix$l}__center`]: children,
|
|
5800
|
+
[`${classPrefix$l}__left`]: contentPosition === "left",
|
|
5801
|
+
[`${classPrefix$l}__right`]: contentPosition === "right",
|
|
5802
|
+
[`${classPrefix$l}__hairline`]: true
|
|
5798
5803
|
}) : classNames({
|
|
5799
|
-
[`${classPrefix$
|
|
5800
|
-
[`${classPrefix$
|
|
5804
|
+
[`${classPrefix$l}`]: true,
|
|
5805
|
+
[`${classPrefix$l}__vertical`]: direction === "vertical"
|
|
5801
5806
|
});
|
|
5802
5807
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
5803
5808
|
};
|
|
5804
|
-
Divider.defaultProps = defaultProps$
|
|
5809
|
+
Divider.defaultProps = defaultProps$1n;
|
|
5805
5810
|
Divider.displayName = "NutDivider";
|
|
5806
5811
|
const gridContext = {
|
|
5807
5812
|
onClick: (item, index) => {
|
|
5808
5813
|
}
|
|
5809
5814
|
};
|
|
5810
5815
|
const GridContext = React.createContext(gridContext);
|
|
5811
|
-
const defaultProps$
|
|
5816
|
+
const defaultProps$1m = {
|
|
5812
5817
|
text: "",
|
|
5813
5818
|
columns: 4,
|
|
5814
5819
|
gap: 0,
|
|
@@ -5834,7 +5839,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5834
5839
|
onClick,
|
|
5835
5840
|
...rest
|
|
5836
5841
|
} = {
|
|
5837
|
-
...defaultProps$
|
|
5842
|
+
...defaultProps$1m,
|
|
5838
5843
|
...props
|
|
5839
5844
|
};
|
|
5840
5845
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -5892,9 +5897,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5892
5897
|
/* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
5893
5898
|
);
|
|
5894
5899
|
};
|
|
5895
|
-
GridItem.defaultProps = defaultProps$
|
|
5900
|
+
GridItem.defaultProps = defaultProps$1m;
|
|
5896
5901
|
GridItem.displayName = "NutGridItem";
|
|
5897
|
-
const defaultProps$
|
|
5902
|
+
const defaultProps$1l = {
|
|
5898
5903
|
columns: 4,
|
|
5899
5904
|
gap: 0,
|
|
5900
5905
|
center: true,
|
|
@@ -5915,7 +5920,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5915
5920
|
className,
|
|
5916
5921
|
onClick,
|
|
5917
5922
|
...rest
|
|
5918
|
-
} = { ...defaultProps$
|
|
5923
|
+
} = { ...defaultProps$1l, ...props };
|
|
5919
5924
|
const childrenDom = React.Children.toArray(children);
|
|
5920
5925
|
const classPrefix2 = "nut-grid";
|
|
5921
5926
|
const rootClass = () => {
|
|
@@ -5945,18 +5950,18 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5945
5950
|
});
|
|
5946
5951
|
})));
|
|
5947
5952
|
};
|
|
5948
|
-
Grid.defaultProps = defaultProps$
|
|
5953
|
+
Grid.defaultProps = defaultProps$1l;
|
|
5949
5954
|
Grid.displayName = "NutGrid";
|
|
5950
5955
|
Grid.Item = GridItem;
|
|
5951
|
-
const defaultProps$
|
|
5956
|
+
const defaultProps$1k = {};
|
|
5952
5957
|
const Layout = (props) => {
|
|
5953
|
-
({ ...defaultProps$
|
|
5958
|
+
({ ...defaultProps$1k, ...props });
|
|
5954
5959
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
5955
5960
|
};
|
|
5956
|
-
Layout.defaultProps = defaultProps$
|
|
5961
|
+
Layout.defaultProps = defaultProps$1k;
|
|
5957
5962
|
Layout.displayName = "NutLayout";
|
|
5958
|
-
const classPrefix$
|
|
5959
|
-
const defaultProps$
|
|
5963
|
+
const classPrefix$k = "nut-row";
|
|
5964
|
+
const defaultProps$1j = {
|
|
5960
5965
|
...ComponentDefaults,
|
|
5961
5966
|
type: "",
|
|
5962
5967
|
justify: "start",
|
|
@@ -5976,7 +5981,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5976
5981
|
gutter,
|
|
5977
5982
|
onClick
|
|
5978
5983
|
} = {
|
|
5979
|
-
...defaultProps$
|
|
5984
|
+
...defaultProps$1j,
|
|
5980
5985
|
...props
|
|
5981
5986
|
};
|
|
5982
5987
|
const getClass = (prefix2, type22) => {
|
|
@@ -5990,7 +5995,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5990
5995
|
${getClass("justify", justify)}
|
|
5991
5996
|
${getClass("align", align)}
|
|
5992
5997
|
${getClass("flex", wrap)}
|
|
5993
|
-
${classPrefix$
|
|
5998
|
+
${classPrefix$k}
|
|
5994
5999
|
`;
|
|
5995
6000
|
};
|
|
5996
6001
|
const parentRow = {
|
|
@@ -6008,15 +6013,15 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6008
6013
|
children
|
|
6009
6014
|
));
|
|
6010
6015
|
};
|
|
6011
|
-
Row.defaultProps = defaultProps$
|
|
6016
|
+
Row.defaultProps = defaultProps$1j;
|
|
6012
6017
|
Row.displayName = "NutRow";
|
|
6013
6018
|
const prefixCls = "nut-space";
|
|
6014
|
-
const defaultProps$
|
|
6019
|
+
const defaultProps$1i = {
|
|
6015
6020
|
direction: "horizontal"
|
|
6016
6021
|
};
|
|
6017
6022
|
const Space = (props) => {
|
|
6018
6023
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
6019
|
-
...defaultProps$
|
|
6024
|
+
...defaultProps$1i,
|
|
6020
6025
|
...props
|
|
6021
6026
|
};
|
|
6022
6027
|
const cls = classNames(
|
|
@@ -6031,7 +6036,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6031
6036
|
return child !== null && child !== void 0 && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-item` }, child);
|
|
6032
6037
|
}));
|
|
6033
6038
|
};
|
|
6034
|
-
Space.defaultProps = defaultProps$
|
|
6039
|
+
Space.defaultProps = defaultProps$1i;
|
|
6035
6040
|
Space.displayName = "NutSpace";
|
|
6036
6041
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
6037
6042
|
const defaultRoot = canUseDom ? window : void 0;
|
|
@@ -6106,13 +6111,13 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6106
6111
|
stop2.current = true;
|
|
6107
6112
|
};
|
|
6108
6113
|
}
|
|
6109
|
-
const defaultProps$
|
|
6114
|
+
const defaultProps$1h = {
|
|
6110
6115
|
...ComponentDefaults,
|
|
6111
6116
|
position: "top",
|
|
6112
6117
|
threshold: 0,
|
|
6113
6118
|
zIndex: 2e3
|
|
6114
6119
|
};
|
|
6115
|
-
const classPrefix$
|
|
6120
|
+
const classPrefix$j = "nut-sticky";
|
|
6116
6121
|
const Sticky = (props) => {
|
|
6117
6122
|
const {
|
|
6118
6123
|
position,
|
|
@@ -6124,7 +6129,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6124
6129
|
threshold,
|
|
6125
6130
|
onChange,
|
|
6126
6131
|
...rest
|
|
6127
|
-
} = { ...defaultProps$
|
|
6132
|
+
} = { ...defaultProps$1h, ...props };
|
|
6128
6133
|
const stickyRef = React.useRef(null);
|
|
6129
6134
|
const rootRef = React.useRef(null);
|
|
6130
6135
|
const [isFixed, setIsFixed] = React.useState(false);
|
|
@@ -6234,15 +6239,15 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6234
6239
|
{
|
|
6235
6240
|
ref: rootRef,
|
|
6236
6241
|
style: { ...style, ...rootStyle },
|
|
6237
|
-
className: classNames(classPrefix$
|
|
6242
|
+
className: classNames(classPrefix$j, className),
|
|
6238
6243
|
...rest
|
|
6239
6244
|
},
|
|
6240
6245
|
/* @__PURE__ */ React.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
|
|
6241
6246
|
);
|
|
6242
6247
|
};
|
|
6243
|
-
Sticky.defaultProps = defaultProps$
|
|
6248
|
+
Sticky.defaultProps = defaultProps$1h;
|
|
6244
6249
|
Sticky.displayName = "NutSticky";
|
|
6245
|
-
const defaultProps$
|
|
6250
|
+
const defaultProps$1g = {
|
|
6246
6251
|
...ComponentDefaults,
|
|
6247
6252
|
target: "",
|
|
6248
6253
|
threshold: 200,
|
|
@@ -6260,7 +6265,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6260
6265
|
style,
|
|
6261
6266
|
onClick
|
|
6262
6267
|
} = {
|
|
6263
|
-
...defaultProps$
|
|
6268
|
+
...defaultProps$1g,
|
|
6264
6269
|
...props
|
|
6265
6270
|
};
|
|
6266
6271
|
const classPrefix2 = "nut-backtop";
|
|
@@ -6358,7 +6363,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
6358
6363
|
children || /* @__PURE__ */ React.createElement(y$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
6359
6364
|
);
|
|
6360
6365
|
};
|
|
6361
|
-
BackTop.defaultProps = defaultProps$
|
|
6366
|
+
BackTop.defaultProps = defaultProps$1g;
|
|
6362
6367
|
BackTop.displayName = "NutBackTop";
|
|
6363
6368
|
function clamp$1(v, min, max) {
|
|
6364
6369
|
return Math.max(min, Math.min(v, max));
|
|
@@ -11476,7 +11481,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11476
11481
|
});
|
|
11477
11482
|
const animated = host.animated;
|
|
11478
11483
|
const elevatorContext = React.createContext({});
|
|
11479
|
-
const defaultProps$
|
|
11484
|
+
const defaultProps$1f = {
|
|
11480
11485
|
...ComponentDefaults,
|
|
11481
11486
|
height: "200px",
|
|
11482
11487
|
floorKey: "title",
|
|
@@ -11502,7 +11507,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11502
11507
|
children,
|
|
11503
11508
|
...rest
|
|
11504
11509
|
} = {
|
|
11505
|
-
...defaultProps$
|
|
11510
|
+
...defaultProps$1f,
|
|
11506
11511
|
...props
|
|
11507
11512
|
};
|
|
11508
11513
|
const classPrefix2 = "nut-elevator";
|
|
@@ -11677,10 +11682,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11677
11682
|
})
|
|
11678
11683
|
))) : null);
|
|
11679
11684
|
};
|
|
11680
|
-
Elevator.defaultProps = defaultProps$
|
|
11685
|
+
Elevator.defaultProps = defaultProps$1f;
|
|
11681
11686
|
Elevator.displayName = "NutElevator";
|
|
11682
11687
|
Elevator.Context = elevatorContext;
|
|
11683
|
-
const defaultProps$
|
|
11688
|
+
const defaultProps$1e = {
|
|
11684
11689
|
...ComponentDefaults,
|
|
11685
11690
|
activeText: "",
|
|
11686
11691
|
inactiveText: "",
|
|
@@ -11708,7 +11713,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11708
11713
|
content,
|
|
11709
11714
|
...rest
|
|
11710
11715
|
} = {
|
|
11711
|
-
...defaultProps$
|
|
11716
|
+
...defaultProps$1e,
|
|
11712
11717
|
...props
|
|
11713
11718
|
};
|
|
11714
11719
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -11760,9 +11765,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11760
11765
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(y$7, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
11761
11766
|
);
|
|
11762
11767
|
};
|
|
11763
|
-
FixedNav.defaultProps = defaultProps$
|
|
11768
|
+
FixedNav.defaultProps = defaultProps$1e;
|
|
11764
11769
|
FixedNav.displayName = "NutFixedNav";
|
|
11765
|
-
const defaultProps$
|
|
11770
|
+
const defaultProps$1d = {
|
|
11766
11771
|
...ComponentDefaults,
|
|
11767
11772
|
left: "",
|
|
11768
11773
|
right: "",
|
|
@@ -11785,7 +11790,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11785
11790
|
zIndex,
|
|
11786
11791
|
onBackClick
|
|
11787
11792
|
} = {
|
|
11788
|
-
...defaultProps$
|
|
11793
|
+
...defaultProps$1d,
|
|
11789
11794
|
...props
|
|
11790
11795
|
};
|
|
11791
11796
|
const classPrefix2 = "nut-navbar";
|
|
@@ -11822,9 +11827,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11822
11827
|
const cls = classNames(classPrefix2, classes, className);
|
|
11823
11828
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
11824
11829
|
};
|
|
11825
|
-
NavBar.defaultProps = defaultProps$
|
|
11830
|
+
NavBar.defaultProps = defaultProps$1d;
|
|
11826
11831
|
NavBar.displayName = "NutNavBar";
|
|
11827
|
-
const defaultProps$
|
|
11832
|
+
const defaultProps$1c = {
|
|
11828
11833
|
...ComponentDefaults,
|
|
11829
11834
|
position: "center",
|
|
11830
11835
|
transition: "",
|
|
@@ -11876,7 +11881,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11876
11881
|
afterShow,
|
|
11877
11882
|
afterClose,
|
|
11878
11883
|
onClick
|
|
11879
|
-
} = { ...defaultProps$
|
|
11884
|
+
} = { ...defaultProps$1c, ...props };
|
|
11880
11885
|
const [index, setIndex] = React.useState(zIndex || _zIndex);
|
|
11881
11886
|
const [innerVisible, setInnerVisible] = React.useState(visible);
|
|
11882
11887
|
const [showChildren, setShowChildren] = React.useState(true);
|
|
@@ -12002,7 +12007,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12002
12007
|
}, [position, transition]);
|
|
12003
12008
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
|
|
12004
12009
|
};
|
|
12005
|
-
Popup.defaultProps = defaultProps$
|
|
12010
|
+
Popup.defaultProps = defaultProps$1c;
|
|
12006
12011
|
Popup.displayName = "NutPopup";
|
|
12007
12012
|
const handleClick = (e) => {
|
|
12008
12013
|
e.stopPropagation();
|
|
@@ -12018,7 +12023,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12018
12023
|
}
|
|
12019
12024
|
};
|
|
12020
12025
|
const OffsetContext = React.createContext(20);
|
|
12021
|
-
const defaultProps$
|
|
12026
|
+
const defaultProps$1b = {
|
|
12022
12027
|
...ComponentDefaults,
|
|
12023
12028
|
position: "left",
|
|
12024
12029
|
width: "80%"
|
|
@@ -12035,7 +12040,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12035
12040
|
onClose,
|
|
12036
12041
|
...rest
|
|
12037
12042
|
} = {
|
|
12038
|
-
...defaultProps$
|
|
12043
|
+
...defaultProps$1b,
|
|
12039
12044
|
...props
|
|
12040
12045
|
};
|
|
12041
12046
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -12067,7 +12072,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12067
12072
|
)))
|
|
12068
12073
|
);
|
|
12069
12074
|
};
|
|
12070
|
-
SideNavBar.defaultProps = defaultProps$
|
|
12075
|
+
SideNavBar.defaultProps = defaultProps$1b;
|
|
12071
12076
|
SideNavBar.displayName = "NutSideNavBar";
|
|
12072
12077
|
const SideNavBarItem = (props) => {
|
|
12073
12078
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -12086,13 +12091,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12086
12091
|
title
|
|
12087
12092
|
);
|
|
12088
12093
|
};
|
|
12089
|
-
const defaultProps$
|
|
12094
|
+
const defaultProps$1a = {
|
|
12090
12095
|
open: true
|
|
12091
12096
|
};
|
|
12092
12097
|
const SubSideNavBar = (props) => {
|
|
12093
12098
|
const classPrefix2 = "nut-subsidenavbar";
|
|
12094
12099
|
const { title, value, children, onClick, open, ...rest } = {
|
|
12095
|
-
...defaultProps$
|
|
12100
|
+
...defaultProps$1a,
|
|
12096
12101
|
...props
|
|
12097
12102
|
};
|
|
12098
12103
|
const offset = React.useContext(OffsetContext);
|
|
@@ -12169,7 +12174,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12169
12174
|
);
|
|
12170
12175
|
return [stateRef.current, setState];
|
|
12171
12176
|
}
|
|
12172
|
-
const defaultProps$
|
|
12177
|
+
const defaultProps$19 = {
|
|
12173
12178
|
...ComponentDefaults,
|
|
12174
12179
|
value: "",
|
|
12175
12180
|
dot: false,
|
|
@@ -12180,7 +12185,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12180
12185
|
};
|
|
12181
12186
|
const Badge = (props) => {
|
|
12182
12187
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
12183
|
-
...defaultProps$
|
|
12188
|
+
...defaultProps$19,
|
|
12184
12189
|
...props
|
|
12185
12190
|
};
|
|
12186
12191
|
const classPrefix2 = "nut-badge";
|
|
@@ -12207,9 +12212,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12207
12212
|
};
|
|
12208
12213
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React.createElement("div", null, children), /* @__PURE__ */ React.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
12209
12214
|
};
|
|
12210
|
-
Badge.defaultProps = defaultProps$
|
|
12215
|
+
Badge.defaultProps = defaultProps$19;
|
|
12211
12216
|
Badge.displayName = "NutBadge";
|
|
12212
|
-
const defaultProps$
|
|
12217
|
+
const defaultProps$18 = {
|
|
12213
12218
|
...ComponentDefaults,
|
|
12214
12219
|
title: "",
|
|
12215
12220
|
icon: null,
|
|
@@ -12236,9 +12241,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12236
12241
|
max,
|
|
12237
12242
|
top,
|
|
12238
12243
|
right,
|
|
12239
|
-
handleClick: handleClick2
|
|
12244
|
+
handleClick: handleClick2,
|
|
12245
|
+
...rest
|
|
12240
12246
|
} = {
|
|
12241
|
-
...defaultProps$
|
|
12247
|
+
...defaultProps$18,
|
|
12242
12248
|
...props
|
|
12243
12249
|
};
|
|
12244
12250
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -12265,12 +12271,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12265
12271
|
color: active ? activeColor : inactiveColor,
|
|
12266
12272
|
...style
|
|
12267
12273
|
},
|
|
12268
|
-
onClick: () => handleClick2(index)
|
|
12274
|
+
onClick: () => handleClick2(index),
|
|
12275
|
+
...rest
|
|
12269
12276
|
},
|
|
12270
12277
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
12271
12278
|
);
|
|
12272
12279
|
};
|
|
12273
|
-
const defaultProps$
|
|
12280
|
+
const defaultProps$17 = {
|
|
12274
12281
|
...ComponentDefaults,
|
|
12275
12282
|
defaultValue: 0,
|
|
12276
12283
|
fixed: false,
|
|
@@ -12293,7 +12300,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12293
12300
|
style,
|
|
12294
12301
|
onSwitch
|
|
12295
12302
|
} = {
|
|
12296
|
-
...defaultProps$
|
|
12303
|
+
...defaultProps$17,
|
|
12297
12304
|
...props
|
|
12298
12305
|
};
|
|
12299
12306
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -12328,17 +12335,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12328
12335
|
(fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
12329
12336
|
);
|
|
12330
12337
|
};
|
|
12331
|
-
Tabbar.defaultProps = defaultProps$
|
|
12338
|
+
Tabbar.defaultProps = defaultProps$17;
|
|
12332
12339
|
Tabbar.displayName = "NutTabbar";
|
|
12333
12340
|
Tabbar.Item = TabbarItem;
|
|
12334
|
-
const defaultProps$
|
|
12341
|
+
const defaultProps$16 = {
|
|
12335
12342
|
title: "",
|
|
12336
12343
|
value: "",
|
|
12337
12344
|
disabled: false
|
|
12338
12345
|
};
|
|
12339
12346
|
const TabPane = (props) => {
|
|
12340
12347
|
const { children, autoHeightClassName, className, disabled } = {
|
|
12341
|
-
...defaultProps$
|
|
12348
|
+
...defaultProps$16,
|
|
12342
12349
|
...props
|
|
12343
12350
|
};
|
|
12344
12351
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -12364,7 +12371,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12364
12371
|
};
|
|
12365
12372
|
}
|
|
12366
12373
|
const requestAniFrame$1 = requestAniFrame();
|
|
12367
|
-
const defaultProps$
|
|
12374
|
+
const defaultProps$15 = {
|
|
12368
12375
|
...ComponentDefaults,
|
|
12369
12376
|
tabStyle: {},
|
|
12370
12377
|
activeColor: "",
|
|
@@ -12373,7 +12380,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12373
12380
|
duration: 300,
|
|
12374
12381
|
autoHeight: false
|
|
12375
12382
|
};
|
|
12376
|
-
const classPrefix$
|
|
12383
|
+
const classPrefix$i = "nut-tabs";
|
|
12377
12384
|
const Tabs = (props) => {
|
|
12378
12385
|
const {
|
|
12379
12386
|
activeColor,
|
|
@@ -12390,7 +12397,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12390
12397
|
autoHeight,
|
|
12391
12398
|
...rest
|
|
12392
12399
|
} = {
|
|
12393
|
-
...defaultProps$
|
|
12400
|
+
...defaultProps$15,
|
|
12394
12401
|
...props
|
|
12395
12402
|
};
|
|
12396
12403
|
const [value, setValue] = usePropsValue({
|
|
@@ -12467,14 +12474,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12467
12474
|
}
|
|
12468
12475
|
}, [children]);
|
|
12469
12476
|
const classes = classNames(
|
|
12470
|
-
classPrefix$
|
|
12471
|
-
`${classPrefix$
|
|
12477
|
+
classPrefix$i,
|
|
12478
|
+
`${classPrefix$i}--${direction}`,
|
|
12472
12479
|
className
|
|
12473
12480
|
);
|
|
12474
|
-
const classesTitle = classNames(`${classPrefix$
|
|
12475
|
-
[`${classPrefix$
|
|
12476
|
-
[`${classPrefix$
|
|
12477
|
-
[`${classPrefix$
|
|
12481
|
+
const classesTitle = classNames(`${classPrefix$i}__titles`, {
|
|
12482
|
+
[`${classPrefix$i}__titles--${activeType}`]: activeType,
|
|
12483
|
+
[`${classPrefix$i}__titles--scrollable`]: true,
|
|
12484
|
+
[`${classPrefix$i}__titles--${align}`]: align
|
|
12478
12485
|
});
|
|
12479
12486
|
const tabsActiveStyle = {
|
|
12480
12487
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -12504,7 +12511,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12504
12511
|
onClick: () => {
|
|
12505
12512
|
tabChange(item);
|
|
12506
12513
|
},
|
|
12507
|
-
className: classNames(`${classPrefix$
|
|
12514
|
+
className: classNames(`${classPrefix$i}__titles-item`, {
|
|
12508
12515
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
12509
12516
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
12510
12517
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -12515,14 +12522,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12515
12522
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
12516
12523
|
"div",
|
|
12517
12524
|
{
|
|
12518
|
-
className: `${classPrefix$
|
|
12525
|
+
className: `${classPrefix$i}__titles-item__line`,
|
|
12519
12526
|
style: tabsActiveStyle
|
|
12520
12527
|
}
|
|
12521
12528
|
),
|
|
12522
12529
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
12523
12530
|
"div",
|
|
12524
12531
|
{
|
|
12525
|
-
className: `${classPrefix$
|
|
12532
|
+
className: `${classPrefix$i}__titles-item__smile`,
|
|
12526
12533
|
style: tabsActiveStyle
|
|
12527
12534
|
},
|
|
12528
12535
|
/* @__PURE__ */ React.createElement(x$7, { color: activeColor, width: 40, height: 20 })
|
|
@@ -12534,13 +12541,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12534
12541
|
{
|
|
12535
12542
|
ellipsis: true
|
|
12536
12543
|
},
|
|
12537
|
-
`${classPrefix$
|
|
12544
|
+
`${classPrefix$i}__titles-item__text`
|
|
12538
12545
|
)
|
|
12539
12546
|
},
|
|
12540
12547
|
item.title
|
|
12541
12548
|
)
|
|
12542
12549
|
);
|
|
12543
|
-
})), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
12550
|
+
})), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
|
|
12544
12551
|
if (!React.isValidElement(child)) {
|
|
12545
12552
|
return null;
|
|
12546
12553
|
}
|
|
@@ -12557,7 +12564,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12557
12564
|
return React.cloneElement(child, childProps);
|
|
12558
12565
|
}))));
|
|
12559
12566
|
};
|
|
12560
|
-
Tabs.defaultProps = defaultProps$
|
|
12567
|
+
Tabs.defaultProps = defaultProps$15;
|
|
12561
12568
|
Tabs.displayName = "NutTabs";
|
|
12562
12569
|
Tabs.TabPane = TabPane;
|
|
12563
12570
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
@@ -12696,7 +12703,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12696
12703
|
}
|
|
12697
12704
|
}
|
|
12698
12705
|
const Tree$1 = Tree;
|
|
12699
|
-
const defaultProps$
|
|
12706
|
+
const defaultProps$14 = {
|
|
12700
12707
|
...ComponentDefaults,
|
|
12701
12708
|
activeColor: "",
|
|
12702
12709
|
activeIcon: "checklist",
|
|
@@ -12739,7 +12746,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12739
12746
|
onClose,
|
|
12740
12747
|
onChange,
|
|
12741
12748
|
onPathChange
|
|
12742
|
-
} = { ...defaultProps$
|
|
12749
|
+
} = { ...defaultProps$14, ...props };
|
|
12743
12750
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
12744
12751
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
12745
12752
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -13035,9 +13042,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13035
13042
|
) : renderTabs());
|
|
13036
13043
|
};
|
|
13037
13044
|
const Cascader = React.forwardRef(InternalCascader);
|
|
13038
|
-
Cascader.defaultProps = defaultProps$
|
|
13045
|
+
Cascader.defaultProps = defaultProps$14;
|
|
13039
13046
|
Cascader.displayName = "NutCascader";
|
|
13040
|
-
const defaultProps$
|
|
13047
|
+
const defaultProps$13 = {
|
|
13041
13048
|
...ComponentDefaults,
|
|
13042
13049
|
visible: false,
|
|
13043
13050
|
type: "custom",
|
|
@@ -13064,7 +13071,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13064
13071
|
onPathChange,
|
|
13065
13072
|
...rest
|
|
13066
13073
|
} = {
|
|
13067
|
-
...defaultProps$
|
|
13074
|
+
...defaultProps$13,
|
|
13068
13075
|
...props
|
|
13069
13076
|
};
|
|
13070
13077
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "custom" && /* @__PURE__ */ React.createElement(
|
|
@@ -13089,7 +13096,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13089
13096
|
}
|
|
13090
13097
|
));
|
|
13091
13098
|
};
|
|
13092
|
-
const defaultProps$
|
|
13099
|
+
const defaultProps$12 = {
|
|
13093
13100
|
type: "custom",
|
|
13094
13101
|
existList: [],
|
|
13095
13102
|
defaultIcon: null,
|
|
@@ -13108,7 +13115,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13108
13115
|
onSelect,
|
|
13109
13116
|
onSwitch,
|
|
13110
13117
|
...rest
|
|
13111
|
-
} = { ...defaultProps$
|
|
13118
|
+
} = { ...defaultProps$12, ...props };
|
|
13112
13119
|
const classPrefix2 = "nut-address";
|
|
13113
13120
|
const selectedExist = (item) => {
|
|
13114
13121
|
existList.forEach((list, index) => {
|
|
@@ -13133,7 +13140,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13133
13140
|
);
|
|
13134
13141
|
})), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
|
|
13135
13142
|
};
|
|
13136
|
-
const defaultProps$
|
|
13143
|
+
const defaultProps$11 = {
|
|
13137
13144
|
...ComponentDefaults,
|
|
13138
13145
|
defaultValue: [],
|
|
13139
13146
|
type: "custom",
|
|
@@ -13175,7 +13182,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13175
13182
|
className,
|
|
13176
13183
|
...rest
|
|
13177
13184
|
} = {
|
|
13178
|
-
...defaultProps$
|
|
13185
|
+
...defaultProps$11,
|
|
13179
13186
|
...props
|
|
13180
13187
|
};
|
|
13181
13188
|
const classPrefix2 = "nut-address";
|
|
@@ -13266,7 +13273,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13266
13273
|
));
|
|
13267
13274
|
};
|
|
13268
13275
|
const Address = React.forwardRef(InternalAddress);
|
|
13269
|
-
Address.defaultProps = defaultProps$
|
|
13276
|
+
Address.defaultProps = defaultProps$11;
|
|
13270
13277
|
Address.displayName = "NutAddress";
|
|
13271
13278
|
const Utils = {
|
|
13272
13279
|
/**
|
|
@@ -13516,7 +13523,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13516
13523
|
const isStartAndEnd = (days) => {
|
|
13517
13524
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
13518
13525
|
};
|
|
13519
|
-
const defaultProps
|
|
13526
|
+
const defaultProps$10 = {
|
|
13520
13527
|
...ComponentDefaults,
|
|
13521
13528
|
type: "single",
|
|
13522
13529
|
autoBackfill: false,
|
|
@@ -13576,7 +13583,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13576
13583
|
onUpdate,
|
|
13577
13584
|
onDayClick,
|
|
13578
13585
|
onPageChange
|
|
13579
|
-
} = { ...defaultProps
|
|
13586
|
+
} = { ...defaultProps$10, ...props };
|
|
13580
13587
|
const weekdays = locale.calendaritem.weekdays;
|
|
13581
13588
|
const weeks = [
|
|
13582
13589
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -14110,9 +14117,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14110
14117
|
};
|
|
14111
14118
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
14112
14119
|
});
|
|
14113
|
-
CalendarItem.defaultProps = defaultProps
|
|
14120
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
14114
14121
|
CalendarItem.displayName = "NutCalendarItem";
|
|
14115
|
-
const defaultProps
|
|
14122
|
+
const defaultProps$$ = {
|
|
14116
14123
|
...ComponentDefaults,
|
|
14117
14124
|
type: "single",
|
|
14118
14125
|
autoBackfill: false,
|
|
@@ -14175,7 +14182,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14175
14182
|
onConfirm,
|
|
14176
14183
|
onDayClick,
|
|
14177
14184
|
onPageChange
|
|
14178
|
-
} = { ...defaultProps
|
|
14185
|
+
} = { ...defaultProps$$, ...props };
|
|
14179
14186
|
const calendarRef = React.useRef(null);
|
|
14180
14187
|
const close = () => {
|
|
14181
14188
|
onClose && onClose();
|
|
@@ -14249,11 +14256,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14249
14256
|
renderItem()
|
|
14250
14257
|
) : renderItem());
|
|
14251
14258
|
});
|
|
14252
|
-
Calendar.defaultProps = defaultProps
|
|
14259
|
+
Calendar.defaultProps = defaultProps$$;
|
|
14253
14260
|
Calendar.displayName = "NutCalendar";
|
|
14254
14261
|
const CheckboxGroupContext = React.createContext(null);
|
|
14255
14262
|
const Context$1 = CheckboxGroupContext;
|
|
14256
|
-
const defaultProps$
|
|
14263
|
+
const defaultProps$_ = {
|
|
14257
14264
|
max: void 0,
|
|
14258
14265
|
labelPosition: "right",
|
|
14259
14266
|
direction: "vertical",
|
|
@@ -14261,10 +14268,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14261
14268
|
},
|
|
14262
14269
|
options: []
|
|
14263
14270
|
};
|
|
14264
|
-
const classPrefix$
|
|
14271
|
+
const classPrefix$h = "nut-checkboxgroup";
|
|
14265
14272
|
const CheckboxGroup = React.forwardRef(
|
|
14266
14273
|
(props, ref) => {
|
|
14267
|
-
const { children } = { ...defaultProps$
|
|
14274
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
14268
14275
|
const {
|
|
14269
14276
|
className,
|
|
14270
14277
|
disabled,
|
|
@@ -14343,7 +14350,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14343
14350
|
/* @__PURE__ */ React.createElement(
|
|
14344
14351
|
"div",
|
|
14345
14352
|
{
|
|
14346
|
-
className: classNames(classPrefix$
|
|
14353
|
+
className: classNames(classPrefix$h, className, {
|
|
14347
14354
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
14348
14355
|
}),
|
|
14349
14356
|
...rest
|
|
@@ -14353,9 +14360,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14353
14360
|
);
|
|
14354
14361
|
}
|
|
14355
14362
|
);
|
|
14356
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
14363
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
14357
14364
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
14358
|
-
const defaultProps$
|
|
14365
|
+
const defaultProps$Z = {
|
|
14359
14366
|
...ComponentDefaults,
|
|
14360
14367
|
disabled: false,
|
|
14361
14368
|
labelPosition: "right",
|
|
@@ -14365,10 +14372,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14365
14372
|
onChange: (value) => {
|
|
14366
14373
|
}
|
|
14367
14374
|
};
|
|
14368
|
-
const classPrefix$
|
|
14375
|
+
const classPrefix$g = "nut-checkbox";
|
|
14369
14376
|
const Checkbox = (props) => {
|
|
14370
14377
|
const { children } = {
|
|
14371
|
-
...defaultProps$
|
|
14378
|
+
...defaultProps$Z,
|
|
14372
14379
|
...props
|
|
14373
14380
|
};
|
|
14374
14381
|
const {
|
|
@@ -14427,22 +14434,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14427
14434
|
};
|
|
14428
14435
|
const color = () => {
|
|
14429
14436
|
if (innerDisabled) {
|
|
14430
|
-
return `${classPrefix$
|
|
14437
|
+
return `${classPrefix$g}__icon--disable`;
|
|
14431
14438
|
}
|
|
14432
14439
|
if (innerChecked) {
|
|
14433
14440
|
if (innerIndeterminate) {
|
|
14434
|
-
return `${classPrefix$
|
|
14441
|
+
return `${classPrefix$g}__icon--indeterminate`;
|
|
14435
14442
|
}
|
|
14436
|
-
return `${classPrefix$
|
|
14443
|
+
return `${classPrefix$g}__icon`;
|
|
14437
14444
|
}
|
|
14438
|
-
return `${classPrefix$
|
|
14445
|
+
return `${classPrefix$g}__icon--unchecked`;
|
|
14439
14446
|
};
|
|
14440
14447
|
const renderLabel = () => {
|
|
14441
14448
|
return /* @__PURE__ */ React.createElement(
|
|
14442
14449
|
"span",
|
|
14443
14450
|
{
|
|
14444
|
-
className: classNames(`${classPrefix$
|
|
14445
|
-
[`${classPrefix$
|
|
14451
|
+
className: classNames(`${classPrefix$g}__label `, {
|
|
14452
|
+
[`${classPrefix$g}__label--disabled`]: innerDisabled
|
|
14446
14453
|
})
|
|
14447
14454
|
},
|
|
14448
14455
|
children || label
|
|
@@ -14461,8 +14468,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14461
14468
|
return /* @__PURE__ */ React.createElement(
|
|
14462
14469
|
"div",
|
|
14463
14470
|
{
|
|
14464
|
-
className: classNames(classPrefix$
|
|
14465
|
-
[`${classPrefix$
|
|
14471
|
+
className: classNames(classPrefix$g, className, {
|
|
14472
|
+
[`${classPrefix$g}--reverse`]: labelPosition === "left"
|
|
14466
14473
|
}),
|
|
14467
14474
|
...rest,
|
|
14468
14475
|
onClick: handleClick2
|
|
@@ -14471,7 +14478,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14471
14478
|
renderLabel()
|
|
14472
14479
|
);
|
|
14473
14480
|
};
|
|
14474
|
-
Checkbox.defaultProps = defaultProps$
|
|
14481
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
14475
14482
|
Checkbox.displayName = "NutCheckBox";
|
|
14476
14483
|
Checkbox.Group = CheckboxGroup;
|
|
14477
14484
|
const MIN_DISTANCE = 10;
|
|
@@ -14765,7 +14772,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14765
14772
|
}, []);
|
|
14766
14773
|
return [refs.current, setRefs, reset];
|
|
14767
14774
|
}
|
|
14768
|
-
const defaultProps$
|
|
14775
|
+
const defaultProps$Y = {
|
|
14769
14776
|
...ComponentDefaults,
|
|
14770
14777
|
title: "",
|
|
14771
14778
|
options: [],
|
|
@@ -14791,7 +14798,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14791
14798
|
afterClose,
|
|
14792
14799
|
onChange,
|
|
14793
14800
|
...rest
|
|
14794
|
-
} = { ...defaultProps$
|
|
14801
|
+
} = { ...defaultProps$Y, ...props };
|
|
14795
14802
|
const classPrefix2 = "nut-picker";
|
|
14796
14803
|
const classes = classNames(classPrefix2, className);
|
|
14797
14804
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -15018,7 +15025,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15018
15025
|
const Picker = React.forwardRef(InternalPicker);
|
|
15019
15026
|
const Picker$1 = Picker;
|
|
15020
15027
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
15021
|
-
const defaultProps$
|
|
15028
|
+
const defaultProps$X = {
|
|
15022
15029
|
...ComponentDefaults,
|
|
15023
15030
|
visible: false,
|
|
15024
15031
|
title: "",
|
|
@@ -15049,7 +15056,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15049
15056
|
style,
|
|
15050
15057
|
...rest
|
|
15051
15058
|
} = {
|
|
15052
|
-
...defaultProps$
|
|
15059
|
+
...defaultProps$X,
|
|
15053
15060
|
...props
|
|
15054
15061
|
};
|
|
15055
15062
|
const { locale } = useConfig();
|
|
@@ -15322,7 +15329,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15322
15329
|
}
|
|
15323
15330
|
));
|
|
15324
15331
|
};
|
|
15325
|
-
DatePicker.defaultProps = defaultProps$
|
|
15332
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
15326
15333
|
DatePicker.displayName = "NutDatePicker";
|
|
15327
15334
|
const Context = React.createContext({});
|
|
15328
15335
|
function _extends() {
|
|
@@ -16533,7 +16540,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16533
16540
|
}
|
|
16534
16541
|
).$$typeof === component.type.$$typeof;
|
|
16535
16542
|
}
|
|
16536
|
-
const defaultProps$
|
|
16543
|
+
const defaultProps$W = {
|
|
16537
16544
|
...ComponentDefaults,
|
|
16538
16545
|
required: false,
|
|
16539
16546
|
name: "",
|
|
@@ -16601,7 +16608,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16601
16608
|
__publicField(this, "renderLayout", (childNode) => {
|
|
16602
16609
|
var _a2, _b;
|
|
16603
16610
|
const { label, name, required: required2, className, style, errorMessageAlign } = {
|
|
16604
|
-
...defaultProps$
|
|
16611
|
+
...defaultProps$W,
|
|
16605
16612
|
...this.props
|
|
16606
16613
|
};
|
|
16607
16614
|
const item = ((_a2 = this.context.errors) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errors) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -16651,9 +16658,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16651
16658
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.renderLayout(returnChildNode));
|
|
16652
16659
|
}
|
|
16653
16660
|
}
|
|
16654
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
16661
|
+
__publicField(FormItem, "defaultProps", defaultProps$W);
|
|
16655
16662
|
__publicField(FormItem, "contextType", Context);
|
|
16656
|
-
const defaultProps$
|
|
16663
|
+
const defaultProps$V = {
|
|
16657
16664
|
...ComponentDefaults,
|
|
16658
16665
|
labelPosition: "right",
|
|
16659
16666
|
starPosition: "left",
|
|
@@ -16681,7 +16688,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16681
16688
|
starPosition,
|
|
16682
16689
|
form
|
|
16683
16690
|
} = {
|
|
16684
|
-
...defaultProps$
|
|
16691
|
+
...defaultProps$V,
|
|
16685
16692
|
...props
|
|
16686
16693
|
};
|
|
16687
16694
|
let formInstance;
|
|
@@ -16724,7 +16731,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16724
16731
|
/* @__PURE__ */ React.createElement(Cell.Group, null, /* @__PURE__ */ React.createElement(Context.Provider, { value: formInstance }, children), footer ? /* @__PURE__ */ React.createElement(Cell, null, footer) : null)
|
|
16725
16732
|
);
|
|
16726
16733
|
};
|
|
16727
|
-
Form.defaultProps = defaultProps$
|
|
16734
|
+
Form.defaultProps = defaultProps$V;
|
|
16728
16735
|
Form.displayName = "NutForm";
|
|
16729
16736
|
Form.Item = FormItem;
|
|
16730
16737
|
Form.useForm = useForm;
|
|
@@ -16752,7 +16759,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16752
16759
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
16753
16760
|
return value.replace(regExp, "");
|
|
16754
16761
|
}
|
|
16755
|
-
const defaultProps$
|
|
16762
|
+
const defaultProps$U = {
|
|
16756
16763
|
...ComponentDefaults,
|
|
16757
16764
|
type: "text",
|
|
16758
16765
|
name: "",
|
|
@@ -16795,7 +16802,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16795
16802
|
value: _value,
|
|
16796
16803
|
...rest
|
|
16797
16804
|
} = {
|
|
16798
|
-
...defaultProps$
|
|
16805
|
+
...defaultProps$U,
|
|
16799
16806
|
...props
|
|
16800
16807
|
};
|
|
16801
16808
|
const [value, setValue] = usePropsValue({
|
|
@@ -16857,7 +16864,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16857
16864
|
const handleBlur = (event) => {
|
|
16858
16865
|
const val = event.target.value;
|
|
16859
16866
|
updateValue(val, "onBlur");
|
|
16860
|
-
|
|
16867
|
+
setTimeout(() => {
|
|
16868
|
+
setActive(false);
|
|
16869
|
+
}, 200);
|
|
16861
16870
|
};
|
|
16862
16871
|
const inputType = (type22) => {
|
|
16863
16872
|
if (type22 === "digit") {
|
|
@@ -16930,9 +16939,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16930
16939
|
);
|
|
16931
16940
|
}
|
|
16932
16941
|
);
|
|
16933
|
-
Input.defaultProps = defaultProps$
|
|
16942
|
+
Input.defaultProps = defaultProps$U;
|
|
16934
16943
|
Input.displayName = "NutInput";
|
|
16935
|
-
const defaultProps$
|
|
16944
|
+
const defaultProps$T = {
|
|
16936
16945
|
...ComponentDefaults,
|
|
16937
16946
|
disabled: false,
|
|
16938
16947
|
min: 1,
|
|
@@ -16944,7 +16953,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16944
16953
|
digits: 0,
|
|
16945
16954
|
async: false
|
|
16946
16955
|
};
|
|
16947
|
-
const classPrefix$
|
|
16956
|
+
const classPrefix$f = `nut-inputnumber`;
|
|
16948
16957
|
const InputNumber = (props) => {
|
|
16949
16958
|
const {
|
|
16950
16959
|
children,
|
|
@@ -16969,7 +16978,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16969
16978
|
onChange,
|
|
16970
16979
|
...restProps
|
|
16971
16980
|
} = {
|
|
16972
|
-
...defaultProps$
|
|
16981
|
+
...defaultProps$T,
|
|
16973
16982
|
...props
|
|
16974
16983
|
};
|
|
16975
16984
|
const inputRef = React.useRef("");
|
|
@@ -16987,8 +16996,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16987
16996
|
}, []);
|
|
16988
16997
|
const classes = classNames(
|
|
16989
16998
|
{
|
|
16990
|
-
[`${classPrefix$
|
|
16991
|
-
[`${classPrefix$
|
|
16999
|
+
[`${classPrefix$f}`]: true,
|
|
17000
|
+
[`${classPrefix$f}--disabled`]: disabled
|
|
16992
17001
|
},
|
|
16993
17002
|
className
|
|
16994
17003
|
);
|
|
@@ -17166,7 +17175,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17166
17175
|
}
|
|
17167
17176
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) })));
|
|
17168
17177
|
};
|
|
17169
|
-
InputNumber.defaultProps = defaultProps$
|
|
17178
|
+
InputNumber.defaultProps = defaultProps$T;
|
|
17170
17179
|
InputNumber.displayName = "NutInputNumber";
|
|
17171
17180
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
17172
17181
|
const isFunction = (val) => typeof val === "function";
|
|
@@ -17208,7 +17217,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17208
17217
|
};
|
|
17209
17218
|
}, [target]);
|
|
17210
17219
|
}
|
|
17211
|
-
const defaultProps$
|
|
17220
|
+
const defaultProps$S = {
|
|
17212
17221
|
...ComponentDefaults,
|
|
17213
17222
|
columns: 1,
|
|
17214
17223
|
direction: "down",
|
|
@@ -17237,7 +17246,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17237
17246
|
parent,
|
|
17238
17247
|
index
|
|
17239
17248
|
} = {
|
|
17240
|
-
...defaultProps$
|
|
17249
|
+
...defaultProps$S,
|
|
17241
17250
|
...props
|
|
17242
17251
|
};
|
|
17243
17252
|
const [showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -17388,9 +17397,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17388
17397
|
)
|
|
17389
17398
|
);
|
|
17390
17399
|
});
|
|
17391
|
-
MenuItem.defaultProps = defaultProps$
|
|
17400
|
+
MenuItem.defaultProps = defaultProps$S;
|
|
17392
17401
|
MenuItem.displayName = "NutMenuItem";
|
|
17393
|
-
const defaultProps$
|
|
17402
|
+
const defaultProps$R = {
|
|
17394
17403
|
...ComponentDefaults,
|
|
17395
17404
|
activeColor: "",
|
|
17396
17405
|
closeOnOverlayClick: true,
|
|
@@ -17415,7 +17424,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17415
17424
|
onOpen,
|
|
17416
17425
|
...rest
|
|
17417
17426
|
} = {
|
|
17418
|
-
...defaultProps$
|
|
17427
|
+
...defaultProps$R,
|
|
17419
17428
|
...props
|
|
17420
17429
|
};
|
|
17421
17430
|
const menuRef = React.useRef(null);
|
|
@@ -17542,10 +17551,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17542
17551
|
), cloneChildren())
|
|
17543
17552
|
);
|
|
17544
17553
|
};
|
|
17545
|
-
Menu.defaultProps = defaultProps$
|
|
17554
|
+
Menu.defaultProps = defaultProps$R;
|
|
17546
17555
|
Menu.displayName = "NutMenu";
|
|
17547
17556
|
Menu.Item = MenuItem;
|
|
17548
|
-
const defaultProps$
|
|
17557
|
+
const defaultProps$Q = {
|
|
17549
17558
|
...ComponentDefaults,
|
|
17550
17559
|
visible: false,
|
|
17551
17560
|
type: "default",
|
|
@@ -17670,7 +17679,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17670
17679
|
"span",
|
|
17671
17680
|
{
|
|
17672
17681
|
className: `${classPrefix2}__header__close`,
|
|
17673
|
-
onClick:
|
|
17682
|
+
onClick: onConfirm
|
|
17674
17683
|
},
|
|
17675
17684
|
locale.done
|
|
17676
17685
|
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__body` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__body__keys` }, keysList == null ? void 0 : keysList.map((item) => {
|
|
@@ -17696,17 +17705,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17696
17705
|
))))
|
|
17697
17706
|
);
|
|
17698
17707
|
};
|
|
17699
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
17708
|
+
NumberKeyboard.defaultProps = defaultProps$Q;
|
|
17700
17709
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
17701
17710
|
const RadioContext = React.createContext(null);
|
|
17702
|
-
const defaultProps$
|
|
17711
|
+
const defaultProps$P = {
|
|
17703
17712
|
labelPosition: "right",
|
|
17704
17713
|
onChange: (value) => {
|
|
17705
17714
|
},
|
|
17706
17715
|
direction: "vertical",
|
|
17707
17716
|
options: []
|
|
17708
17717
|
};
|
|
17709
|
-
const classPrefix$
|
|
17718
|
+
const classPrefix$e = "nut-radiogroup";
|
|
17710
17719
|
const RadioGroup = React.forwardRef(
|
|
17711
17720
|
(props, ref) => {
|
|
17712
17721
|
const {
|
|
@@ -17720,7 +17729,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17720
17729
|
options: options2,
|
|
17721
17730
|
disabled,
|
|
17722
17731
|
...rest
|
|
17723
|
-
} = { ...defaultProps$
|
|
17732
|
+
} = { ...defaultProps$P, ...props };
|
|
17724
17733
|
const [val2State, setVal2State] = usePropsValue({
|
|
17725
17734
|
defaultValue: props.defaultValue,
|
|
17726
17735
|
value: props.value,
|
|
@@ -17762,8 +17771,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17762
17771
|
/* @__PURE__ */ React.createElement(
|
|
17763
17772
|
"div",
|
|
17764
17773
|
{
|
|
17765
|
-
className: classNames(classPrefix$
|
|
17766
|
-
[`${classPrefix$
|
|
17774
|
+
className: classNames(classPrefix$e, className, {
|
|
17775
|
+
[`${classPrefix$e}--${props.direction}`]: props.direction
|
|
17767
17776
|
}),
|
|
17768
17777
|
...rest
|
|
17769
17778
|
},
|
|
@@ -17772,9 +17781,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17772
17781
|
);
|
|
17773
17782
|
}
|
|
17774
17783
|
);
|
|
17775
|
-
RadioGroup.defaultProps = defaultProps$
|
|
17784
|
+
RadioGroup.defaultProps = defaultProps$P;
|
|
17776
17785
|
RadioGroup.displayName = "NutRadioGroup";
|
|
17777
|
-
const defaultProps$
|
|
17786
|
+
const defaultProps$O = {
|
|
17778
17787
|
...ComponentDefaults,
|
|
17779
17788
|
disabled: false,
|
|
17780
17789
|
shape: "round",
|
|
@@ -17800,7 +17809,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17800
17809
|
onChange,
|
|
17801
17810
|
...others
|
|
17802
17811
|
} = {
|
|
17803
|
-
...defaultProps$
|
|
17812
|
+
...defaultProps$O,
|
|
17804
17813
|
...props
|
|
17805
17814
|
};
|
|
17806
17815
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -17896,10 +17905,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17896
17905
|
renderRadioItem()
|
|
17897
17906
|
);
|
|
17898
17907
|
};
|
|
17899
|
-
Radio.defaultProps = defaultProps$
|
|
17908
|
+
Radio.defaultProps = defaultProps$O;
|
|
17900
17909
|
Radio.displayName = "NutRadio";
|
|
17901
17910
|
Radio.Group = RadioGroup;
|
|
17902
|
-
const defaultProps$
|
|
17911
|
+
const defaultProps$N = {
|
|
17903
17912
|
...ComponentDefaults,
|
|
17904
17913
|
range: false,
|
|
17905
17914
|
min: 0,
|
|
@@ -17927,7 +17936,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17927
17936
|
step,
|
|
17928
17937
|
value,
|
|
17929
17938
|
defaultValue
|
|
17930
|
-
} = { ...defaultProps$
|
|
17939
|
+
} = { ...defaultProps$N, ...props };
|
|
17931
17940
|
const classPrefix2 = "nut-range";
|
|
17932
17941
|
const [buttonIndex, setButtonIndex] = React.useState(0);
|
|
17933
17942
|
const [dragStatus, setDragStatus] = React.useState("start");
|
|
@@ -18191,9 +18200,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18191
18200
|
renderButton()
|
|
18192
18201
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
18193
18202
|
};
|
|
18194
|
-
Range.defaultProps = defaultProps$
|
|
18203
|
+
Range.defaultProps = defaultProps$N;
|
|
18195
18204
|
Range.displayName = "NutRange";
|
|
18196
|
-
const defaultProps$
|
|
18205
|
+
const defaultProps$M = {
|
|
18197
18206
|
...ComponentDefaults,
|
|
18198
18207
|
count: 5,
|
|
18199
18208
|
min: 0,
|
|
@@ -18218,7 +18227,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18218
18227
|
allowHalf,
|
|
18219
18228
|
onChange
|
|
18220
18229
|
} = {
|
|
18221
|
-
...defaultProps$
|
|
18230
|
+
...defaultProps$M,
|
|
18222
18231
|
...props
|
|
18223
18232
|
};
|
|
18224
18233
|
const classPrefix2 = "nut-rate";
|
|
@@ -18301,9 +18310,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18301
18310
|
})
|
|
18302
18311
|
);
|
|
18303
18312
|
};
|
|
18304
|
-
Rate.defaultProps = defaultProps$
|
|
18313
|
+
Rate.defaultProps = defaultProps$M;
|
|
18305
18314
|
Rate.displayName = "NutRate";
|
|
18306
|
-
const defaultProps$
|
|
18315
|
+
const defaultProps$L = {
|
|
18307
18316
|
...ComponentDefaults,
|
|
18308
18317
|
placeholder: "",
|
|
18309
18318
|
shape: "square",
|
|
@@ -18342,7 +18351,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18342
18351
|
onSearch,
|
|
18343
18352
|
onInputClick
|
|
18344
18353
|
} = {
|
|
18345
|
-
...defaultProps$
|
|
18354
|
+
...defaultProps$L,
|
|
18346
18355
|
...props
|
|
18347
18356
|
};
|
|
18348
18357
|
const forceFocus = () => {
|
|
@@ -18460,9 +18469,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18460
18469
|
renderRight()
|
|
18461
18470
|
);
|
|
18462
18471
|
};
|
|
18463
|
-
SearchBar.defaultProps = defaultProps$
|
|
18472
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
18464
18473
|
SearchBar.displayName = "NutSearchBar";
|
|
18465
|
-
const defaultProps$
|
|
18474
|
+
const defaultProps$K = {
|
|
18466
18475
|
...ComponentDefaults,
|
|
18467
18476
|
value: "",
|
|
18468
18477
|
visible: false,
|
|
@@ -18499,7 +18508,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18499
18508
|
onCloseIconClick,
|
|
18500
18509
|
...rest
|
|
18501
18510
|
} = {
|
|
18502
|
-
...defaultProps$
|
|
18511
|
+
...defaultProps$K,
|
|
18503
18512
|
...props
|
|
18504
18513
|
};
|
|
18505
18514
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -18556,9 +18565,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18556
18565
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
18557
18566
|
);
|
|
18558
18567
|
};
|
|
18559
|
-
ShortPassword.defaultProps = defaultProps$
|
|
18568
|
+
ShortPassword.defaultProps = defaultProps$K;
|
|
18560
18569
|
ShortPassword.displayName = "NutShortPassword";
|
|
18561
|
-
const defaultProps$
|
|
18570
|
+
const defaultProps$J = {
|
|
18562
18571
|
...ComponentDefaults,
|
|
18563
18572
|
type: "png",
|
|
18564
18573
|
lineWidth: 2,
|
|
@@ -18578,7 +18587,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18578
18587
|
onClear,
|
|
18579
18588
|
...rest
|
|
18580
18589
|
} = {
|
|
18581
|
-
...defaultProps$
|
|
18590
|
+
...defaultProps$J,
|
|
18582
18591
|
...props
|
|
18583
18592
|
};
|
|
18584
18593
|
const classPrefix2 = `nut-signature`;
|
|
@@ -18676,9 +18685,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18676
18685
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__inner`, ref: wrapRef }, isCanvasSupported() ? /* @__PURE__ */ React.createElement("canvas", { ref: canvasRef, height: canvasHeight, width: canvasWidth }) : /* @__PURE__ */ React.createElement(React.Fragment, null, unsupported || /* @__PURE__ */ React.createElement("p", { className: `${classPrefix2}__unsupport` }, locale.signature.unsupported))));
|
|
18677
18686
|
};
|
|
18678
18687
|
const Signature = React.forwardRef(InternalSignature);
|
|
18679
|
-
Signature.defaultProps = defaultProps$
|
|
18688
|
+
Signature.defaultProps = defaultProps$J;
|
|
18680
18689
|
Signature.displayName = "NutSignature";
|
|
18681
|
-
const defaultProps$
|
|
18690
|
+
const defaultProps$I = {
|
|
18682
18691
|
...ComponentDefaults,
|
|
18683
18692
|
disabled: false,
|
|
18684
18693
|
activeText: "",
|
|
@@ -18693,9 +18702,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18693
18702
|
inactiveText,
|
|
18694
18703
|
className,
|
|
18695
18704
|
style,
|
|
18696
|
-
onChange
|
|
18705
|
+
onChange,
|
|
18706
|
+
...rest
|
|
18697
18707
|
} = {
|
|
18698
|
-
...defaultProps$
|
|
18708
|
+
...defaultProps$I,
|
|
18699
18709
|
...props
|
|
18700
18710
|
};
|
|
18701
18711
|
const classPrefix2 = "nut-switch";
|
|
@@ -18712,11 +18722,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18712
18722
|
onChange && onChange(!value, event);
|
|
18713
18723
|
setValue(!value);
|
|
18714
18724
|
};
|
|
18715
|
-
return /* @__PURE__ */ React.createElement(
|
|
18725
|
+
return /* @__PURE__ */ React.createElement(
|
|
18726
|
+
"div",
|
|
18727
|
+
{
|
|
18728
|
+
className: classes(),
|
|
18729
|
+
onClick: (e) => onClick(e),
|
|
18730
|
+
style,
|
|
18731
|
+
...rest
|
|
18732
|
+
},
|
|
18733
|
+
/* @__PURE__ */ React.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React.createElement(React.Fragment, null, value ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText)))
|
|
18734
|
+
);
|
|
18716
18735
|
};
|
|
18717
|
-
Switch.defaultProps = defaultProps$
|
|
18736
|
+
Switch.defaultProps = defaultProps$I;
|
|
18718
18737
|
Switch.displayName = "NutSwitch";
|
|
18719
|
-
const defaultProps$
|
|
18738
|
+
const defaultProps$H = {
|
|
18720
18739
|
...ComponentDefaults,
|
|
18721
18740
|
defaultValue: "",
|
|
18722
18741
|
showCount: false,
|
|
@@ -18745,7 +18764,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18745
18764
|
onBlur,
|
|
18746
18765
|
onFocus,
|
|
18747
18766
|
...rest
|
|
18748
|
-
} = { ...defaultProps$
|
|
18767
|
+
} = { ...defaultProps$H, ...props };
|
|
18749
18768
|
const classPrefix2 = "nut-textarea";
|
|
18750
18769
|
const textareaRef = React.useRef(null);
|
|
18751
18770
|
const compositionRef = React.useRef(false);
|
|
@@ -18829,9 +18848,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18829
18848
|
showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
18830
18849
|
);
|
|
18831
18850
|
};
|
|
18832
|
-
TextArea.defaultProps = defaultProps$
|
|
18851
|
+
TextArea.defaultProps = defaultProps$H;
|
|
18833
18852
|
TextArea.displayName = "NutTextArea";
|
|
18834
|
-
const defaultProps$
|
|
18853
|
+
const defaultProps$G = {
|
|
18835
18854
|
...ComponentDefaults,
|
|
18836
18855
|
percent: 0,
|
|
18837
18856
|
showText: false,
|
|
@@ -18854,7 +18873,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18854
18873
|
delay,
|
|
18855
18874
|
...rest
|
|
18856
18875
|
} = {
|
|
18857
|
-
...defaultProps$
|
|
18876
|
+
...defaultProps$G,
|
|
18858
18877
|
...props
|
|
18859
18878
|
};
|
|
18860
18879
|
const classPrefix2 = "nut-progress";
|
|
@@ -18949,7 +18968,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18949
18968
|
)))
|
|
18950
18969
|
);
|
|
18951
18970
|
};
|
|
18952
|
-
Progress.defaultProps = defaultProps$
|
|
18971
|
+
Progress.defaultProps = defaultProps$G;
|
|
18953
18972
|
Progress.displayName = "NutProgress";
|
|
18954
18973
|
class UploadOptions {
|
|
18955
18974
|
constructor() {
|
|
@@ -19041,7 +19060,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19041
19060
|
done();
|
|
19042
19061
|
}
|
|
19043
19062
|
};
|
|
19044
|
-
const defaultProps$
|
|
19063
|
+
const defaultProps$F = {
|
|
19045
19064
|
...ComponentDefaults,
|
|
19046
19065
|
url: "",
|
|
19047
19066
|
maxCount: 1,
|
|
@@ -19124,7 +19143,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19124
19143
|
beforeXhrUpload,
|
|
19125
19144
|
beforeDelete,
|
|
19126
19145
|
...restProps
|
|
19127
|
-
} = { ...defaultProps$
|
|
19146
|
+
} = { ...defaultProps$F, ...props };
|
|
19128
19147
|
const [fileList, setFileList] = React.useState(defaultValue || []);
|
|
19129
19148
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
19130
19149
|
React.useEffect(() => {
|
|
@@ -19363,7 +19382,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19363
19382
|
multiple,
|
|
19364
19383
|
onChange: fileChange
|
|
19365
19384
|
}
|
|
19366
|
-
)))), fileList.length !== 0 && fileList.map((item, index) => {
|
|
19385
|
+
)))), fileList.length !== 0 && Array.isArray(fileList) && fileList.map((item, index) => {
|
|
19367
19386
|
return /* @__PURE__ */ React.createElement(
|
|
19368
19387
|
"div",
|
|
19369
19388
|
{
|
|
@@ -19468,9 +19487,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19468
19487
|
));
|
|
19469
19488
|
};
|
|
19470
19489
|
const Uploader = React.forwardRef(InternalUploader);
|
|
19471
|
-
Uploader.defaultProps = defaultProps$
|
|
19490
|
+
Uploader.defaultProps = defaultProps$F;
|
|
19472
19491
|
Uploader.displayName = "NutUploader";
|
|
19473
|
-
const defaultProps$
|
|
19492
|
+
const defaultProps$E = {
|
|
19474
19493
|
...ComponentDefaults,
|
|
19475
19494
|
visible: false,
|
|
19476
19495
|
description: "",
|
|
@@ -19496,7 +19515,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19496
19515
|
className,
|
|
19497
19516
|
style,
|
|
19498
19517
|
...rest
|
|
19499
|
-
} = { ...defaultProps$
|
|
19518
|
+
} = { ...defaultProps$E, ...props };
|
|
19500
19519
|
const classPrefix2 = "nut-actionsheet";
|
|
19501
19520
|
const cancelActionSheet = () => {
|
|
19502
19521
|
onCancel && onCancel();
|
|
@@ -19539,7 +19558,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19539
19558
|
))
|
|
19540
19559
|
);
|
|
19541
19560
|
};
|
|
19542
|
-
ActionSheet.defaultProps = defaultProps$
|
|
19561
|
+
ActionSheet.defaultProps = defaultProps$E;
|
|
19543
19562
|
ActionSheet.displayName = "NutActionSheet";
|
|
19544
19563
|
const fullClone = {
|
|
19545
19564
|
...ReactDOM__namespace
|
|
@@ -19772,7 +19791,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19772
19791
|
};
|
|
19773
19792
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
19774
19793
|
DialogWrap.displayName = "NutDialogWrap";
|
|
19775
|
-
const defaultProps$
|
|
19794
|
+
const defaultProps$D = {
|
|
19776
19795
|
confirmText: "",
|
|
19777
19796
|
cancelText: "",
|
|
19778
19797
|
overlay: true,
|
|
@@ -19871,9 +19890,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19871
19890
|
});
|
|
19872
19891
|
};
|
|
19873
19892
|
});
|
|
19874
|
-
Dialog.defaultProps = defaultProps$
|
|
19893
|
+
Dialog.defaultProps = defaultProps$D;
|
|
19875
19894
|
Dialog.displayName = "NutDialog";
|
|
19876
|
-
const defaultProps$
|
|
19895
|
+
const defaultProps$C = {
|
|
19877
19896
|
...ComponentDefaults,
|
|
19878
19897
|
attract: false,
|
|
19879
19898
|
direction: void 0,
|
|
@@ -19886,7 +19905,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19886
19905
|
};
|
|
19887
19906
|
const Drag = (props) => {
|
|
19888
19907
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
19889
|
-
...defaultProps$
|
|
19908
|
+
...defaultProps$C,
|
|
19890
19909
|
...props
|
|
19891
19910
|
};
|
|
19892
19911
|
const classPrefix2 = "nut-drag";
|
|
@@ -19949,20 +19968,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19949
19968
|
/* @__PURE__ */ React.createElement(animated.div, { style: currstyle, ...bind() }, children)
|
|
19950
19969
|
);
|
|
19951
19970
|
};
|
|
19952
|
-
Drag.defaultProps = defaultProps$
|
|
19971
|
+
Drag.defaultProps = defaultProps$C;
|
|
19953
19972
|
Drag.displayName = "NutDrag";
|
|
19954
19973
|
const defaultStatus = {
|
|
19955
19974
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
19956
19975
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
19957
19976
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
19958
19977
|
};
|
|
19959
|
-
const defaultProps$
|
|
19978
|
+
const defaultProps$B = {
|
|
19960
19979
|
...ComponentDefaults,
|
|
19961
19980
|
description: "",
|
|
19962
19981
|
imageSize: "",
|
|
19963
19982
|
status: "empty"
|
|
19964
19983
|
};
|
|
19965
|
-
const classPrefix$
|
|
19984
|
+
const classPrefix$d = `nut-empty`;
|
|
19966
19985
|
const Empty = (props) => {
|
|
19967
19986
|
const { locale } = useConfig();
|
|
19968
19987
|
const {
|
|
@@ -19974,7 +19993,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19974
19993
|
status,
|
|
19975
19994
|
...rest
|
|
19976
19995
|
} = {
|
|
19977
|
-
...defaultProps$
|
|
19996
|
+
...defaultProps$B,
|
|
19978
19997
|
...props
|
|
19979
19998
|
};
|
|
19980
19999
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -19997,11 +20016,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19997
20016
|
};
|
|
19998
20017
|
});
|
|
19999
20018
|
}, [imageSize]);
|
|
20000
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
20019
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__description` }, description || locale.noData) : description, children));
|
|
20001
20020
|
};
|
|
20002
|
-
Empty.defaultProps = defaultProps$
|
|
20021
|
+
Empty.defaultProps = defaultProps$B;
|
|
20003
20022
|
Empty.displayName = "NutEmpty";
|
|
20004
|
-
const defaultProps$
|
|
20023
|
+
const defaultProps$A = {
|
|
20005
20024
|
...ComponentDefaults,
|
|
20006
20025
|
hasMore: true,
|
|
20007
20026
|
threshold: 200,
|
|
@@ -20009,7 +20028,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20009
20028
|
capture: false,
|
|
20010
20029
|
pullRefresh: false
|
|
20011
20030
|
};
|
|
20012
|
-
const classPrefix$
|
|
20031
|
+
const classPrefix$c = `nut-infiniteloading`;
|
|
20013
20032
|
const InfiniteLoading = (props) => {
|
|
20014
20033
|
const { locale } = useConfig();
|
|
20015
20034
|
const {
|
|
@@ -20028,7 +20047,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20028
20047
|
onScroll,
|
|
20029
20048
|
...restProps
|
|
20030
20049
|
} = {
|
|
20031
|
-
...defaultProps$
|
|
20050
|
+
...defaultProps$A,
|
|
20032
20051
|
...props
|
|
20033
20052
|
};
|
|
20034
20053
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -20040,7 +20059,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20040
20059
|
const refreshMaxH = React.useRef(0);
|
|
20041
20060
|
const y2 = React.useRef(0);
|
|
20042
20061
|
const distance = React.useRef(0);
|
|
20043
|
-
const classes = classNames(className, classPrefix$
|
|
20062
|
+
const classes = classNames(className, classPrefix$c);
|
|
20044
20063
|
React.useEffect(() => {
|
|
20045
20064
|
if (target && document.getElementById(target)) {
|
|
20046
20065
|
scrollEl.current = document.getElementById(target);
|
|
@@ -20166,13 +20185,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20166
20185
|
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
20167
20186
|
);
|
|
20168
20187
|
};
|
|
20169
|
-
InfiniteLoading.defaultProps = defaultProps$
|
|
20188
|
+
InfiniteLoading.defaultProps = defaultProps$A;
|
|
20170
20189
|
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
20171
20190
|
const loadingMap = {
|
|
20172
20191
|
circular: y$6,
|
|
20173
20192
|
spinner: k$3
|
|
20174
20193
|
};
|
|
20175
|
-
const defaultProps$
|
|
20194
|
+
const defaultProps$z = {
|
|
20176
20195
|
...ComponentDefaults,
|
|
20177
20196
|
// 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
|
|
20178
20197
|
type: "circular",
|
|
@@ -20180,7 +20199,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20180
20199
|
};
|
|
20181
20200
|
const Loading = (props) => {
|
|
20182
20201
|
const { className, style, children, direction, icon, ...rest } = {
|
|
20183
|
-
...defaultProps$
|
|
20202
|
+
...defaultProps$z,
|
|
20184
20203
|
...props
|
|
20185
20204
|
};
|
|
20186
20205
|
const classPrefix2 = "nut-loading";
|
|
@@ -20199,9 +20218,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20199
20218
|
children ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-text` }, children) : ""
|
|
20200
20219
|
);
|
|
20201
20220
|
};
|
|
20202
|
-
Loading.defaultProps = defaultProps$
|
|
20221
|
+
Loading.defaultProps = defaultProps$z;
|
|
20203
20222
|
Loading.displayName = "NutLoading";
|
|
20204
|
-
const defaultProps$
|
|
20223
|
+
const defaultProps$y = {
|
|
20205
20224
|
...ComponentDefaults,
|
|
20206
20225
|
direction: "horizontal",
|
|
20207
20226
|
list: [],
|
|
@@ -20239,7 +20258,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20239
20258
|
onClick,
|
|
20240
20259
|
onItemClick
|
|
20241
20260
|
} = {
|
|
20242
|
-
...defaultProps$
|
|
20261
|
+
...defaultProps$y,
|
|
20243
20262
|
...props
|
|
20244
20263
|
};
|
|
20245
20264
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -20590,9 +20609,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20590
20609
|
)
|
|
20591
20610
|
) : null);
|
|
20592
20611
|
};
|
|
20593
|
-
NoticeBar.defaultProps = defaultProps$
|
|
20612
|
+
NoticeBar.defaultProps = defaultProps$y;
|
|
20594
20613
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20595
|
-
const classPrefix$
|
|
20614
|
+
const classPrefix$b = "nut-notify";
|
|
20596
20615
|
let Notification$1 = (_a = class extends React__namespace.PureComponent {
|
|
20597
20616
|
constructor(props) {
|
|
20598
20617
|
super(props);
|
|
@@ -20643,10 +20662,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20643
20662
|
const { style, message, type: type2, className, position } = this.props;
|
|
20644
20663
|
const { show: show2 } = this.state;
|
|
20645
20664
|
const classes = classNames({
|
|
20646
|
-
[`${classPrefix$
|
|
20647
|
-
[`${classPrefix$
|
|
20648
|
-
[`${classPrefix$
|
|
20649
|
-
[`${classPrefix$
|
|
20665
|
+
[`${classPrefix$b}--popup-top`]: position === "top",
|
|
20666
|
+
[`${classPrefix$b}--popup-bottom`]: position === "bottom",
|
|
20667
|
+
[`${classPrefix$b}`]: true,
|
|
20668
|
+
[`${classPrefix$b}--${type2}`]: true
|
|
20650
20669
|
});
|
|
20651
20670
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
|
|
20652
20671
|
CSSTransition$1,
|
|
@@ -20755,12 +20774,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20755
20774
|
}
|
|
20756
20775
|
}
|
|
20757
20776
|
};
|
|
20758
|
-
const defaultProps$
|
|
20777
|
+
const defaultProps$x = {
|
|
20759
20778
|
...ComponentDefaults,
|
|
20760
20779
|
list: [],
|
|
20761
20780
|
location: "bottom",
|
|
20762
20781
|
visible: false,
|
|
20763
20782
|
offset: [0, 12],
|
|
20783
|
+
arrowOffset: 0,
|
|
20764
20784
|
targetId: "",
|
|
20765
20785
|
showArrow: true,
|
|
20766
20786
|
closeOnOutsideClick: true,
|
|
@@ -20773,7 +20793,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20773
20793
|
onClose: () => {
|
|
20774
20794
|
}
|
|
20775
20795
|
};
|
|
20776
|
-
const classPrefix$
|
|
20796
|
+
const classPrefix$a = `nut-popover`;
|
|
20777
20797
|
const Popover = (props) => {
|
|
20778
20798
|
const {
|
|
20779
20799
|
children,
|
|
@@ -20781,6 +20801,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20781
20801
|
location,
|
|
20782
20802
|
visible,
|
|
20783
20803
|
offset,
|
|
20804
|
+
arrowOffset,
|
|
20784
20805
|
targetId,
|
|
20785
20806
|
overlay,
|
|
20786
20807
|
closeOnOutsideClick,
|
|
@@ -20794,7 +20815,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20794
20815
|
onSelect,
|
|
20795
20816
|
...rest
|
|
20796
20817
|
} = {
|
|
20797
|
-
...defaultProps$
|
|
20818
|
+
...defaultProps$x,
|
|
20798
20819
|
...props
|
|
20799
20820
|
};
|
|
20800
20821
|
const popoverRef = React.useRef(null);
|
|
@@ -20860,7 +20881,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20860
20881
|
};
|
|
20861
20882
|
const classes = classNames(
|
|
20862
20883
|
{
|
|
20863
|
-
[`${classPrefix$
|
|
20884
|
+
[`${classPrefix$a}`]: true
|
|
20864
20885
|
},
|
|
20865
20886
|
className
|
|
20866
20887
|
);
|
|
@@ -20915,6 +20936,37 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20915
20936
|
}
|
|
20916
20937
|
return styles;
|
|
20917
20938
|
};
|
|
20939
|
+
const popoverArrowStyle = () => {
|
|
20940
|
+
const styles = {};
|
|
20941
|
+
const direction = location.split("-")[0];
|
|
20942
|
+
const skew = location.split("-")[1];
|
|
20943
|
+
const base = 16;
|
|
20944
|
+
if (props.arrowOffset !== 0) {
|
|
20945
|
+
if (["bottom", "top"].includes(direction)) {
|
|
20946
|
+
if (!skew) {
|
|
20947
|
+
styles.left = `calc(50% + ${arrowOffset}px)`;
|
|
20948
|
+
}
|
|
20949
|
+
if (skew === "start") {
|
|
20950
|
+
styles.left = `${base + arrowOffset}px`;
|
|
20951
|
+
}
|
|
20952
|
+
if (skew === "end") {
|
|
20953
|
+
styles.right = `${base - arrowOffset}px`;
|
|
20954
|
+
}
|
|
20955
|
+
}
|
|
20956
|
+
if (["left", "right"].includes(direction)) {
|
|
20957
|
+
if (!skew) {
|
|
20958
|
+
styles.top = `calc(50% - ${arrowOffset}px)`;
|
|
20959
|
+
}
|
|
20960
|
+
if (skew === "start") {
|
|
20961
|
+
styles.top = `${base - arrowOffset}px`;
|
|
20962
|
+
}
|
|
20963
|
+
if (skew === "end") {
|
|
20964
|
+
styles.bottom = `${base + arrowOffset}px`;
|
|
20965
|
+
}
|
|
20966
|
+
}
|
|
20967
|
+
}
|
|
20968
|
+
return styles;
|
|
20969
|
+
};
|
|
20918
20970
|
const handleSelect = (item, index) => {
|
|
20919
20971
|
if (!item.disabled) {
|
|
20920
20972
|
onSelect && onSelect(item, index);
|
|
@@ -20949,7 +21001,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20949
21001
|
position: "default",
|
|
20950
21002
|
...rest
|
|
20951
21003
|
},
|
|
20952
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React.createElement("div", { className: popoverArrow() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
21004
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React.createElement("div", { className: popoverArrow(), style: popoverArrowStyle() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
20953
21005
|
return /* @__PURE__ */ React.createElement(
|
|
20954
21006
|
"div",
|
|
20955
21007
|
{
|
|
@@ -20969,7 +21021,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20969
21021
|
}))
|
|
20970
21022
|
)));
|
|
20971
21023
|
};
|
|
20972
|
-
Popover.defaultProps = defaultProps$
|
|
21024
|
+
Popover.defaultProps = defaultProps$x;
|
|
20973
21025
|
Popover.displayName = "NutPopover";
|
|
20974
21026
|
function bound(position, min, max) {
|
|
20975
21027
|
let ret = position;
|
|
@@ -21007,7 +21059,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21007
21059
|
console.log(e);
|
|
21008
21060
|
}
|
|
21009
21061
|
}
|
|
21010
|
-
const defaultProps$
|
|
21062
|
+
const defaultProps$w = {
|
|
21011
21063
|
...ComponentDefaults,
|
|
21012
21064
|
pullingText: "",
|
|
21013
21065
|
canReleaseText: "",
|
|
@@ -21024,7 +21076,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21024
21076
|
const classPrefix2 = "nut-pulltorefresh";
|
|
21025
21077
|
const { locale } = useConfig();
|
|
21026
21078
|
const props = {
|
|
21027
|
-
...defaultProps$
|
|
21079
|
+
...defaultProps$w,
|
|
21028
21080
|
...p,
|
|
21029
21081
|
...{
|
|
21030
21082
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -21167,10 +21219,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21167
21219
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
21168
21220
|
);
|
|
21169
21221
|
};
|
|
21170
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
21222
|
+
PullToRefresh.defaultProps = defaultProps$w;
|
|
21171
21223
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
21172
21224
|
const AvatarContext = React.createContext({});
|
|
21173
|
-
const defaultProps$
|
|
21225
|
+
const defaultProps$v = {
|
|
21174
21226
|
...ComponentDefaults,
|
|
21175
21227
|
maxContent: "",
|
|
21176
21228
|
max: "",
|
|
@@ -21179,21 +21231,21 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21179
21231
|
gap: "-8",
|
|
21180
21232
|
level: "left"
|
|
21181
21233
|
};
|
|
21182
|
-
const classPrefix$
|
|
21234
|
+
const classPrefix$9 = `nut-avatar-group`;
|
|
21183
21235
|
const AvatarGroup = (props) => {
|
|
21184
|
-
const propAvatarGroup = { ...defaultProps$
|
|
21236
|
+
const propAvatarGroup = { ...defaultProps$v, ...props };
|
|
21185
21237
|
const { className, style, children } = propAvatarGroup;
|
|
21186
21238
|
const avatarGroupRef = React.useRef(null);
|
|
21187
|
-
const cls = classNames(classPrefix$
|
|
21239
|
+
const cls = classNames(classPrefix$9, className);
|
|
21188
21240
|
const parentAvatar = {
|
|
21189
21241
|
propAvatarGroup,
|
|
21190
21242
|
avatarGroupRef
|
|
21191
21243
|
};
|
|
21192
21244
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
21193
21245
|
};
|
|
21194
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
21246
|
+
AvatarGroup.defaultProps = defaultProps$v;
|
|
21195
21247
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
21196
|
-
const defaultProps$
|
|
21248
|
+
const defaultProps$u = {
|
|
21197
21249
|
...ComponentDefaults,
|
|
21198
21250
|
size: "",
|
|
21199
21251
|
shape: "round",
|
|
@@ -21204,7 +21256,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21204
21256
|
src: "",
|
|
21205
21257
|
alt: ""
|
|
21206
21258
|
};
|
|
21207
|
-
const classPrefix$
|
|
21259
|
+
const classPrefix$8 = `nut-avatar`;
|
|
21208
21260
|
const Avatar = (props) => {
|
|
21209
21261
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
21210
21262
|
const {
|
|
@@ -21223,7 +21275,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21223
21275
|
onError,
|
|
21224
21276
|
...rest
|
|
21225
21277
|
} = {
|
|
21226
|
-
...defaultProps$
|
|
21278
|
+
...defaultProps$u,
|
|
21227
21279
|
...props
|
|
21228
21280
|
};
|
|
21229
21281
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -21236,7 +21288,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21236
21288
|
[`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
|
|
21237
21289
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
21238
21290
|
});
|
|
21239
|
-
const cls = classNames(classPrefix$
|
|
21291
|
+
const cls = classNames(classPrefix$8, classes, className);
|
|
21240
21292
|
const styles = {
|
|
21241
21293
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
21242
21294
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -21305,10 +21357,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21305
21357
|
showMax && /* @__PURE__ */ React.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)}`)
|
|
21306
21358
|
));
|
|
21307
21359
|
};
|
|
21308
|
-
Avatar.defaultProps = defaultProps$
|
|
21360
|
+
Avatar.defaultProps = defaultProps$u;
|
|
21309
21361
|
Avatar.displayName = "NutAvatar";
|
|
21310
21362
|
Avatar.Group = AvatarGroup;
|
|
21311
|
-
const defaultProps$
|
|
21363
|
+
const defaultProps$t = {
|
|
21312
21364
|
...ComponentDefaults,
|
|
21313
21365
|
rows: 1,
|
|
21314
21366
|
animated: false,
|
|
@@ -21331,7 +21383,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21331
21383
|
avatarShape,
|
|
21332
21384
|
...rest
|
|
21333
21385
|
} = {
|
|
21334
|
-
...defaultProps$
|
|
21386
|
+
...defaultProps$t,
|
|
21335
21387
|
...props
|
|
21336
21388
|
};
|
|
21337
21389
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -21367,7 +21419,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21367
21419
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
21368
21420
|
})))));
|
|
21369
21421
|
};
|
|
21370
|
-
Skeleton.defaultProps = defaultProps$
|
|
21422
|
+
Skeleton.defaultProps = defaultProps$t;
|
|
21371
21423
|
Skeleton.displayName = "NutSkeleton";
|
|
21372
21424
|
function preventDefault(event, isStopPropagation) {
|
|
21373
21425
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -21377,13 +21429,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21377
21429
|
event.stopPropagation();
|
|
21378
21430
|
}
|
|
21379
21431
|
}
|
|
21380
|
-
const defaultProps$
|
|
21432
|
+
const defaultProps$s = {
|
|
21381
21433
|
name: ""
|
|
21382
21434
|
};
|
|
21383
21435
|
const Swipe = React.forwardRef((props, instanceRef) => {
|
|
21384
21436
|
const classPrefix2 = "nut-swipe";
|
|
21385
21437
|
const touch = useTouch();
|
|
21386
|
-
const { children, className, style } = { ...defaultProps$
|
|
21438
|
+
const { children, className, style } = { ...defaultProps$s, ...props };
|
|
21387
21439
|
const root2 = React.useRef();
|
|
21388
21440
|
const opened = React.useRef(false);
|
|
21389
21441
|
const lockClick = React.useRef(false);
|
|
@@ -21551,9 +21603,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21551
21603
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__wrapper`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
21552
21604
|
);
|
|
21553
21605
|
});
|
|
21554
|
-
Swipe.defaultProps = defaultProps$
|
|
21606
|
+
Swipe.defaultProps = defaultProps$s;
|
|
21555
21607
|
Swipe.displayName = "NutSwipe";
|
|
21556
|
-
const classPrefix$
|
|
21608
|
+
const classPrefix$7 = "nut-toast";
|
|
21557
21609
|
class Notification extends React__namespace.PureComponent {
|
|
21558
21610
|
constructor(props) {
|
|
21559
21611
|
super(props);
|
|
@@ -21615,7 +21667,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21615
21667
|
iconNode = /* @__PURE__ */ React__namespace.createElement(x$8, null);
|
|
21616
21668
|
break;
|
|
21617
21669
|
}
|
|
21618
|
-
return /* @__PURE__ */ React__namespace.createElement("p", { className: `${classPrefix$
|
|
21670
|
+
return /* @__PURE__ */ React__namespace.createElement("p", { className: `${classPrefix$7}__icon-wrapper` }, iconNode);
|
|
21619
21671
|
}
|
|
21620
21672
|
return icon;
|
|
21621
21673
|
}
|
|
@@ -21650,22 +21702,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21650
21702
|
{
|
|
21651
21703
|
visible: show2,
|
|
21652
21704
|
style,
|
|
21653
|
-
className: `${classPrefix$
|
|
21705
|
+
className: `${classPrefix$7}__overlay-default ${className}`,
|
|
21654
21706
|
onClick: () => {
|
|
21655
21707
|
this.clickCover();
|
|
21656
21708
|
},
|
|
21657
21709
|
closeOnOverlayClick,
|
|
21658
21710
|
lockScroll
|
|
21659
21711
|
},
|
|
21660
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$
|
|
21712
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$7} ${classes}`, id: `toast-${id}` }, /* @__PURE__ */ React__namespace.createElement(
|
|
21661
21713
|
"div",
|
|
21662
21714
|
{
|
|
21663
|
-
className: `${classPrefix$
|
|
21715
|
+
className: `${classPrefix$7}__inner ${classPrefix$7}-${position} ${contentClassName}`,
|
|
21664
21716
|
style: contentStyle
|
|
21665
21717
|
},
|
|
21666
21718
|
this.renderIcon(),
|
|
21667
|
-
title ? /* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$
|
|
21668
|
-
/* @__PURE__ */ React__namespace.createElement("span", { className: `${classPrefix$
|
|
21719
|
+
title ? /* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$7}-title` }, title) : null,
|
|
21720
|
+
/* @__PURE__ */ React__namespace.createElement("span", { className: `${classPrefix$7}-text` }, content)
|
|
21669
21721
|
))
|
|
21670
21722
|
));
|
|
21671
21723
|
}
|
|
@@ -21772,7 +21824,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21772
21824
|
}
|
|
21773
21825
|
}
|
|
21774
21826
|
};
|
|
21775
|
-
const defaultProps$
|
|
21827
|
+
const defaultProps$r = {
|
|
21776
21828
|
...ComponentDefaults,
|
|
21777
21829
|
type: "shake",
|
|
21778
21830
|
action: "initial",
|
|
@@ -21780,16 +21832,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21780
21832
|
onClick: (event) => {
|
|
21781
21833
|
}
|
|
21782
21834
|
};
|
|
21783
|
-
const classPrefix$
|
|
21835
|
+
const classPrefix$6 = `nut-animate`;
|
|
21784
21836
|
const Animate = (props) => {
|
|
21785
21837
|
const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
|
|
21786
|
-
...defaultProps$
|
|
21838
|
+
...defaultProps$r,
|
|
21787
21839
|
...props
|
|
21788
21840
|
};
|
|
21789
21841
|
const [clicked, setClicked] = React.useState(false);
|
|
21790
21842
|
const classes = classNames({
|
|
21791
21843
|
"nut-ani-container": true,
|
|
21792
|
-
[`${classPrefix$
|
|
21844
|
+
[`${classPrefix$6}-${type2}`]: action === "initial" || clicked ? type2 : false,
|
|
21793
21845
|
loop: loop2
|
|
21794
21846
|
});
|
|
21795
21847
|
const cls = classNames(classes, className);
|
|
@@ -21804,9 +21856,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21804
21856
|
};
|
|
21805
21857
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick2, ...rest }, children));
|
|
21806
21858
|
};
|
|
21807
|
-
Animate.defaultProps = defaultProps$
|
|
21859
|
+
Animate.defaultProps = defaultProps$r;
|
|
21808
21860
|
Animate.displayName = "NutAnimate";
|
|
21809
|
-
const defaultProps$
|
|
21861
|
+
const defaultProps$q = {
|
|
21810
21862
|
...ComponentDefaults,
|
|
21811
21863
|
length: 0,
|
|
21812
21864
|
value: "",
|
|
@@ -21825,7 +21877,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21825
21877
|
style,
|
|
21826
21878
|
...reset
|
|
21827
21879
|
} = {
|
|
21828
|
-
...defaultProps$
|
|
21880
|
+
...defaultProps$q,
|
|
21829
21881
|
...props
|
|
21830
21882
|
};
|
|
21831
21883
|
const classPrefix2 = "nut-countup";
|
|
@@ -21889,9 +21941,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21889
21941
|
);
|
|
21890
21942
|
})));
|
|
21891
21943
|
};
|
|
21892
|
-
CountUp.defaultProps = defaultProps$
|
|
21944
|
+
CountUp.defaultProps = defaultProps$q;
|
|
21893
21945
|
CountUp.displayName = "NutCountUp";
|
|
21894
|
-
const defaultProps$
|
|
21946
|
+
const defaultProps$p = {};
|
|
21895
21947
|
class AnimatingNumbers extends React.Component {
|
|
21896
21948
|
constructor(props) {
|
|
21897
21949
|
super(props);
|
|
@@ -21901,11 +21953,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21901
21953
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
21902
21954
|
}
|
|
21903
21955
|
}
|
|
21904
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
21956
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
21905
21957
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
21906
21958
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
21907
21959
|
AnimatingNumbers.CountUp = CountUp;
|
|
21908
|
-
const defaultProps$
|
|
21960
|
+
const defaultProps$o = {
|
|
21909
21961
|
...ComponentDefaults,
|
|
21910
21962
|
src: "",
|
|
21911
21963
|
muted: false,
|
|
@@ -21948,7 +22000,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21948
22000
|
children,
|
|
21949
22001
|
...rest
|
|
21950
22002
|
} = {
|
|
21951
|
-
...defaultProps$
|
|
22003
|
+
...defaultProps$o,
|
|
21952
22004
|
...props
|
|
21953
22005
|
};
|
|
21954
22006
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -22154,9 +22206,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22154
22206
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
22155
22207
|
));
|
|
22156
22208
|
};
|
|
22157
|
-
Audio.defaultProps = defaultProps$
|
|
22209
|
+
Audio.defaultProps = defaultProps$o;
|
|
22158
22210
|
Audio.displayName = "NutAudio";
|
|
22159
|
-
const defaultProps$
|
|
22211
|
+
const defaultProps$n = {
|
|
22160
22212
|
...ComponentDefaults,
|
|
22161
22213
|
strokeWidth: 5,
|
|
22162
22214
|
radius: 50,
|
|
@@ -22165,7 +22217,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22165
22217
|
background: "#e5e9f2",
|
|
22166
22218
|
clockwise: true
|
|
22167
22219
|
};
|
|
22168
|
-
const classPrefix$
|
|
22220
|
+
const classPrefix$5 = `nut-circleprogress`;
|
|
22169
22221
|
const CircleProgress = (props) => {
|
|
22170
22222
|
var _a2;
|
|
22171
22223
|
const {
|
|
@@ -22181,10 +22233,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22181
22233
|
strokeLinecap,
|
|
22182
22234
|
...restProps
|
|
22183
22235
|
} = {
|
|
22184
|
-
...defaultProps$
|
|
22236
|
+
...defaultProps$n,
|
|
22185
22237
|
...props
|
|
22186
22238
|
};
|
|
22187
|
-
const classes = classNames(className, classPrefix$
|
|
22239
|
+
const classes = classNames(className, classPrefix$5);
|
|
22188
22240
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
22189
22241
|
const styles = {
|
|
22190
22242
|
height: `${Number(radius) * 2}px`,
|
|
@@ -22250,7 +22302,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22250
22302
|
}
|
|
22251
22303
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
22252
22304
|
};
|
|
22253
|
-
CircleProgress.defaultProps = defaultProps$
|
|
22305
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
22254
22306
|
CircleProgress.displayName = "NutCircleProgress";
|
|
22255
22307
|
const collapseContext = {
|
|
22256
22308
|
isOpen: (name) => {
|
|
@@ -22262,7 +22314,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22262
22314
|
rotate: 180
|
|
22263
22315
|
};
|
|
22264
22316
|
const CollapseContext = React.createContext(collapseContext);
|
|
22265
|
-
const defaultProps$
|
|
22317
|
+
const defaultProps$m = {
|
|
22266
22318
|
...ComponentDefaults,
|
|
22267
22319
|
title: null,
|
|
22268
22320
|
name: "",
|
|
@@ -22283,7 +22335,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22283
22335
|
className,
|
|
22284
22336
|
...rest
|
|
22285
22337
|
} = {
|
|
22286
|
-
...defaultProps$
|
|
22338
|
+
...defaultProps$m,
|
|
22287
22339
|
...props
|
|
22288
22340
|
};
|
|
22289
22341
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -22360,9 +22412,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22360
22412
|
/* @__PURE__ */ React.createElement("div", { ref: contentRef, className: `${classPrefix2}__content-text` }, children)
|
|
22361
22413
|
));
|
|
22362
22414
|
};
|
|
22363
|
-
CollapseItem.defaultProps = defaultProps$
|
|
22415
|
+
CollapseItem.defaultProps = defaultProps$m;
|
|
22364
22416
|
CollapseItem.displayName = "NutCollapseItem";
|
|
22365
|
-
const defaultProps$
|
|
22417
|
+
const defaultProps$l = {
|
|
22366
22418
|
...ComponentDefaults,
|
|
22367
22419
|
defaultActiveName: [],
|
|
22368
22420
|
accordion: false,
|
|
@@ -22381,7 +22433,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22381
22433
|
rotate,
|
|
22382
22434
|
onChange
|
|
22383
22435
|
} = {
|
|
22384
|
-
...defaultProps$
|
|
22436
|
+
...defaultProps$l,
|
|
22385
22437
|
...props
|
|
22386
22438
|
};
|
|
22387
22439
|
const classPrefix2 = "nut-collapse";
|
|
@@ -22438,10 +22490,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22438
22490
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
22439
22491
|
);
|
|
22440
22492
|
};
|
|
22441
|
-
Collapse.defaultProps = defaultProps$
|
|
22493
|
+
Collapse.defaultProps = defaultProps$l;
|
|
22442
22494
|
Collapse.displayName = "NutCollapse";
|
|
22443
22495
|
Collapse.Item = CollapseItem;
|
|
22444
|
-
const defaultProps$
|
|
22496
|
+
const defaultProps$k = {
|
|
22445
22497
|
...ComponentDefaults,
|
|
22446
22498
|
paused: false,
|
|
22447
22499
|
startTime: Date.now(),
|
|
@@ -22473,7 +22525,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22473
22525
|
onUpdate,
|
|
22474
22526
|
children,
|
|
22475
22527
|
...rest
|
|
22476
|
-
} = { ...defaultProps$
|
|
22528
|
+
} = { ...defaultProps$k, ...props };
|
|
22477
22529
|
const classPrefix2 = "nut-countdown";
|
|
22478
22530
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
22479
22531
|
const stateRef = React.useRef({
|
|
@@ -22684,9 +22736,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22684
22736
|
);
|
|
22685
22737
|
};
|
|
22686
22738
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
22687
|
-
CountDown.defaultProps = defaultProps$
|
|
22739
|
+
CountDown.defaultProps = defaultProps$k;
|
|
22688
22740
|
CountDown.displayName = "NutCountDown";
|
|
22689
|
-
const defaultProps$
|
|
22741
|
+
const defaultProps$j = {
|
|
22690
22742
|
...ComponentDefaults,
|
|
22691
22743
|
content: "",
|
|
22692
22744
|
direction: "end",
|
|
@@ -22696,7 +22748,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22696
22748
|
symbol: "...",
|
|
22697
22749
|
lineHeight: "20"
|
|
22698
22750
|
};
|
|
22699
|
-
const classPrefix$
|
|
22751
|
+
const classPrefix$4 = `nut-ellipsis`;
|
|
22700
22752
|
const Ellipsis = (props) => {
|
|
22701
22753
|
var _a2, _b;
|
|
22702
22754
|
const {
|
|
@@ -22712,14 +22764,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22712
22764
|
onClick,
|
|
22713
22765
|
onChange,
|
|
22714
22766
|
...rest
|
|
22715
|
-
} = { ...defaultProps$
|
|
22767
|
+
} = { ...defaultProps$j, ...props };
|
|
22716
22768
|
let container = null;
|
|
22717
22769
|
let maxHeight = 0;
|
|
22718
22770
|
const [exceeded, setExceeded] = React.useState(false);
|
|
22719
22771
|
const [expanded, setExpanded] = React.useState(false);
|
|
22720
22772
|
const ellipsis = React.useRef();
|
|
22721
22773
|
const root2 = React.useRef(null);
|
|
22722
|
-
const classes = classNames(classPrefix$
|
|
22774
|
+
const classes = classNames(classPrefix$4, className);
|
|
22723
22775
|
React.useLayoutEffect(() => {
|
|
22724
22776
|
if (content) {
|
|
22725
22777
|
createContainer();
|
|
@@ -22860,9 +22912,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22860
22912
|
collapseText
|
|
22861
22913
|
) : null) : null));
|
|
22862
22914
|
};
|
|
22863
|
-
Ellipsis.defaultProps = defaultProps$
|
|
22915
|
+
Ellipsis.defaultProps = defaultProps$j;
|
|
22864
22916
|
Ellipsis.displayName = "NutEllipsis";
|
|
22865
|
-
const defaultProps$
|
|
22917
|
+
const defaultProps$i = {
|
|
22866
22918
|
...ComponentDefaults,
|
|
22867
22919
|
source: {
|
|
22868
22920
|
type: {},
|
|
@@ -22878,7 +22930,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22878
22930
|
loop: false
|
|
22879
22931
|
}
|
|
22880
22932
|
};
|
|
22881
|
-
const classPrefix$
|
|
22933
|
+
const classPrefix$3 = `nut-video`;
|
|
22882
22934
|
const Video = (props) => {
|
|
22883
22935
|
const {
|
|
22884
22936
|
children,
|
|
@@ -22890,11 +22942,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22890
22942
|
onPlayEnd,
|
|
22891
22943
|
...restProps
|
|
22892
22944
|
} = {
|
|
22893
|
-
...defaultProps$
|
|
22945
|
+
...defaultProps$i,
|
|
22894
22946
|
...props
|
|
22895
22947
|
};
|
|
22896
22948
|
const rootRef = React.useRef(null);
|
|
22897
|
-
const classes = classNames(className, classPrefix$
|
|
22949
|
+
const classes = classNames(className, classPrefix$3);
|
|
22898
22950
|
React.useEffect(() => {
|
|
22899
22951
|
init();
|
|
22900
22952
|
}, []);
|
|
@@ -22940,22 +22992,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22940
22992
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
22941
22993
|
));
|
|
22942
22994
|
};
|
|
22943
|
-
Video.defaultProps = defaultProps$
|
|
22995
|
+
Video.defaultProps = defaultProps$i;
|
|
22944
22996
|
Video.displayName = "NutVideo";
|
|
22945
22997
|
const DataContext$1 = React.createContext({});
|
|
22946
|
-
const defaultProps$
|
|
22998
|
+
const defaultProps$h = {
|
|
22947
22999
|
total: 3,
|
|
22948
23000
|
current: 0,
|
|
22949
23001
|
direction: "horizontal"
|
|
22950
23002
|
};
|
|
22951
|
-
const classPrefix$
|
|
23003
|
+
const classPrefix$2 = `nut-indicator`;
|
|
22952
23004
|
const Indicator = (props) => {
|
|
22953
23005
|
const { total, current, children, className, direction, ...rest } = {
|
|
22954
|
-
...defaultProps$
|
|
23006
|
+
...defaultProps$h,
|
|
22955
23007
|
...props
|
|
22956
23008
|
};
|
|
22957
23009
|
const classes = classNames({
|
|
22958
|
-
[`${classPrefix$
|
|
23010
|
+
[`${classPrefix$2}__vertical`]: direction === "vertical"
|
|
22959
23011
|
});
|
|
22960
23012
|
const renderElement = () => {
|
|
22961
23013
|
const childs = [];
|
|
@@ -22965,18 +23017,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22965
23017
|
"div",
|
|
22966
23018
|
{
|
|
22967
23019
|
key: item,
|
|
22968
|
-
className: `${classPrefix$
|
|
23020
|
+
className: `${classPrefix$2}__dot ${classPrefix$2}__active`
|
|
22969
23021
|
}
|
|
22970
|
-
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$
|
|
23022
|
+
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$2}__dot` })
|
|
22971
23023
|
);
|
|
22972
23024
|
}
|
|
22973
23025
|
return childs;
|
|
22974
23026
|
};
|
|
22975
23027
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
22976
23028
|
};
|
|
22977
|
-
Indicator.defaultProps = defaultProps$
|
|
23029
|
+
Indicator.defaultProps = defaultProps$h;
|
|
22978
23030
|
Indicator.displayName = "NutIndicator";
|
|
22979
|
-
const defaultProps$
|
|
23031
|
+
const defaultProps$g = {
|
|
22980
23032
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
22981
23033
|
height: 0,
|
|
22982
23034
|
duration: 500,
|
|
@@ -22993,7 +23045,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22993
23045
|
};
|
|
22994
23046
|
const DISTANCE = 5;
|
|
22995
23047
|
const Swiper = React.forwardRef((props, ref) => {
|
|
22996
|
-
const propSwiper = { ...defaultProps$
|
|
23048
|
+
const propSwiper = { ...defaultProps$g, ...props };
|
|
22997
23049
|
const {
|
|
22998
23050
|
children,
|
|
22999
23051
|
direction,
|
|
@@ -23406,14 +23458,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23406
23458
|
renderIndicator()
|
|
23407
23459
|
));
|
|
23408
23460
|
});
|
|
23409
|
-
Swiper.defaultProps = defaultProps$
|
|
23461
|
+
Swiper.defaultProps = defaultProps$g;
|
|
23410
23462
|
Swiper.displayName = "NutSwiper";
|
|
23411
|
-
const defaultProps$
|
|
23463
|
+
const defaultProps$f = {
|
|
23412
23464
|
direction: "horizontal"
|
|
23413
23465
|
};
|
|
23414
23466
|
const SwiperItem = React.forwardRef((props, ref) => {
|
|
23415
23467
|
const classPrefix2 = "nut-swiper-item";
|
|
23416
|
-
const _props = { ...defaultProps$
|
|
23468
|
+
const _props = { ...defaultProps$f, ...props };
|
|
23417
23469
|
const { className, style, children, direction, size } = _props;
|
|
23418
23470
|
const parent = React.useContext(DataContext$1);
|
|
23419
23471
|
const classes = classNames(classPrefix2, className);
|
|
@@ -23428,11 +23480,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23428
23480
|
};
|
|
23429
23481
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style: { ...style, ...getStyle() } }, children);
|
|
23430
23482
|
});
|
|
23431
|
-
SwiperItem.defaultProps = defaultProps$
|
|
23483
|
+
SwiperItem.defaultProps = defaultProps$f;
|
|
23432
23484
|
SwiperItem.displayName = "NutSwiperItem";
|
|
23433
23485
|
const InnerSwiper = Swiper;
|
|
23434
23486
|
InnerSwiper.Item = SwiperItem;
|
|
23435
|
-
const defaultProps$
|
|
23487
|
+
const defaultProps$e = {
|
|
23436
23488
|
...ComponentDefaults,
|
|
23437
23489
|
images: [],
|
|
23438
23490
|
videos: [],
|
|
@@ -23634,9 +23686,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23634
23686
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
23635
23687
|
);
|
|
23636
23688
|
};
|
|
23637
|
-
ImagePreview.defaultProps = defaultProps$
|
|
23689
|
+
ImagePreview.defaultProps = defaultProps$e;
|
|
23638
23690
|
ImagePreview.displayName = "NutImagePreview";
|
|
23639
|
-
const defaultProps$
|
|
23691
|
+
const defaultProps$d = {
|
|
23640
23692
|
...ComponentDefaults,
|
|
23641
23693
|
defaultValue: 1,
|
|
23642
23694
|
mode: "multi",
|
|
@@ -23664,7 +23716,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23664
23716
|
className,
|
|
23665
23717
|
...rest
|
|
23666
23718
|
} = {
|
|
23667
|
-
...defaultProps$
|
|
23719
|
+
...defaultProps$d,
|
|
23668
23720
|
...props
|
|
23669
23721
|
};
|
|
23670
23722
|
const classPrefix2 = "nut-pagination";
|
|
@@ -23746,9 +23798,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23746
23798
|
next || locale.pagination.next
|
|
23747
23799
|
));
|
|
23748
23800
|
};
|
|
23749
|
-
Pagination.defaultProps = defaultProps$
|
|
23801
|
+
Pagination.defaultProps = defaultProps$d;
|
|
23750
23802
|
Pagination.displayName = "NutPagination";
|
|
23751
|
-
const defaultProps$
|
|
23803
|
+
const defaultProps$c = {
|
|
23752
23804
|
...ComponentDefaults,
|
|
23753
23805
|
price: 0,
|
|
23754
23806
|
symbol: "¥",
|
|
@@ -23771,7 +23823,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23771
23823
|
style,
|
|
23772
23824
|
...rest
|
|
23773
23825
|
} = {
|
|
23774
|
-
...defaultProps$
|
|
23826
|
+
...defaultProps$c,
|
|
23775
23827
|
...props
|
|
23776
23828
|
};
|
|
23777
23829
|
const classPrefix2 = "nut-price";
|
|
@@ -23851,10 +23903,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23851
23903
|
symbol && position === "after" ? renderSymbol() : null
|
|
23852
23904
|
);
|
|
23853
23905
|
};
|
|
23854
|
-
Price.defaultProps = defaultProps$
|
|
23906
|
+
Price.defaultProps = defaultProps$c;
|
|
23855
23907
|
Price.displayName = "NutPrice";
|
|
23856
23908
|
const DataContext = React.createContext({});
|
|
23857
|
-
const defaultProps$
|
|
23909
|
+
const defaultProps$b = {
|
|
23858
23910
|
...ComponentDefaults,
|
|
23859
23911
|
title: "",
|
|
23860
23912
|
description: "",
|
|
@@ -23863,7 +23915,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23863
23915
|
};
|
|
23864
23916
|
const Step = (props) => {
|
|
23865
23917
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
23866
|
-
...defaultProps$
|
|
23918
|
+
...defaultProps$b,
|
|
23867
23919
|
...props
|
|
23868
23920
|
};
|
|
23869
23921
|
const parent = React.useContext(DataContext);
|
|
@@ -23897,16 +23949,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23897
23949
|
};
|
|
23898
23950
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
|
|
23899
23951
|
};
|
|
23900
|
-
Step.defaultProps = defaultProps$
|
|
23952
|
+
Step.defaultProps = defaultProps$b;
|
|
23901
23953
|
Step.displayName = "NutStep";
|
|
23902
|
-
const defaultProps$
|
|
23954
|
+
const defaultProps$a = {
|
|
23903
23955
|
...ComponentDefaults,
|
|
23904
23956
|
value: 0,
|
|
23905
23957
|
direction: "horizontal",
|
|
23906
23958
|
dot: false
|
|
23907
23959
|
};
|
|
23908
23960
|
const Steps = (props) => {
|
|
23909
|
-
const propSteps = { ...defaultProps$
|
|
23961
|
+
const propSteps = { ...defaultProps$a, ...props };
|
|
23910
23962
|
const {
|
|
23911
23963
|
children,
|
|
23912
23964
|
value,
|
|
@@ -23937,9 +23989,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23937
23989
|
children
|
|
23938
23990
|
));
|
|
23939
23991
|
};
|
|
23940
|
-
Steps.defaultProps = defaultProps$
|
|
23992
|
+
Steps.defaultProps = defaultProps$a;
|
|
23941
23993
|
Steps.displayName = "NutSteps";
|
|
23942
|
-
const defaultProps$
|
|
23994
|
+
const defaultProps$9 = {
|
|
23943
23995
|
...ComponentDefaults,
|
|
23944
23996
|
columns: [],
|
|
23945
23997
|
data: [],
|
|
@@ -23951,7 +24003,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23951
24003
|
};
|
|
23952
24004
|
const Table = (props) => {
|
|
23953
24005
|
const { locale } = useConfig();
|
|
23954
|
-
defaultProps$
|
|
24006
|
+
defaultProps$9.noData = locale.noData;
|
|
23955
24007
|
const {
|
|
23956
24008
|
children,
|
|
23957
24009
|
className,
|
|
@@ -23967,7 +24019,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23967
24019
|
onSort,
|
|
23968
24020
|
...rest
|
|
23969
24021
|
} = {
|
|
23970
|
-
...defaultProps$
|
|
24022
|
+
...defaultProps$9,
|
|
23971
24023
|
...props
|
|
23972
24024
|
};
|
|
23973
24025
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -24050,9 +24102,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24050
24102
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
24051
24103
|
), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
24052
24104
|
};
|
|
24053
|
-
Table.defaultProps = defaultProps$
|
|
24105
|
+
Table.defaultProps = defaultProps$9;
|
|
24054
24106
|
Table.displayName = "NutTable";
|
|
24055
|
-
const defaultProps$
|
|
24107
|
+
const defaultProps$8 = {
|
|
24056
24108
|
...ComponentDefaults,
|
|
24057
24109
|
type: "default",
|
|
24058
24110
|
background: "",
|
|
@@ -24083,7 +24135,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24083
24135
|
onClick,
|
|
24084
24136
|
onClose
|
|
24085
24137
|
} = {
|
|
24086
|
-
...defaultProps$
|
|
24138
|
+
...defaultProps$8,
|
|
24087
24139
|
...props
|
|
24088
24140
|
};
|
|
24089
24141
|
const [tagClass, setTagClass] = React.useState("");
|
|
@@ -24159,8 +24211,166 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24159
24211
|
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
24160
24212
|
));
|
|
24161
24213
|
};
|
|
24162
|
-
Tag.defaultProps = defaultProps$
|
|
24214
|
+
Tag.defaultProps = defaultProps$8;
|
|
24163
24215
|
Tag.displayName = "NutTag";
|
|
24216
|
+
const defaultProps$7 = {
|
|
24217
|
+
...ComponentDefaults,
|
|
24218
|
+
visible: false,
|
|
24219
|
+
type: "step",
|
|
24220
|
+
location: "bottom",
|
|
24221
|
+
mask: true,
|
|
24222
|
+
maskWidth: "",
|
|
24223
|
+
maskHeight: "",
|
|
24224
|
+
offset: [8, 10],
|
|
24225
|
+
title: "",
|
|
24226
|
+
next: "",
|
|
24227
|
+
prev: "",
|
|
24228
|
+
complete: "",
|
|
24229
|
+
showPrev: true,
|
|
24230
|
+
closeOnOverlayClick: true
|
|
24231
|
+
};
|
|
24232
|
+
const classPrefix$1 = "nut-tour";
|
|
24233
|
+
const Tour = (props) => {
|
|
24234
|
+
const { locale } = useConfig();
|
|
24235
|
+
const {
|
|
24236
|
+
children,
|
|
24237
|
+
className,
|
|
24238
|
+
title,
|
|
24239
|
+
closeOnOverlayClick,
|
|
24240
|
+
showPrev,
|
|
24241
|
+
list,
|
|
24242
|
+
type: type2,
|
|
24243
|
+
location,
|
|
24244
|
+
visible,
|
|
24245
|
+
mask,
|
|
24246
|
+
maskWidth,
|
|
24247
|
+
maskHeight,
|
|
24248
|
+
offset,
|
|
24249
|
+
next,
|
|
24250
|
+
prev,
|
|
24251
|
+
complete,
|
|
24252
|
+
onClose,
|
|
24253
|
+
onChange,
|
|
24254
|
+
...rest
|
|
24255
|
+
} = {
|
|
24256
|
+
...defaultProps$7,
|
|
24257
|
+
...props
|
|
24258
|
+
};
|
|
24259
|
+
const [showTour, setShowTour] = React.useState(false);
|
|
24260
|
+
const [showPopup, setShowPopup] = React.useState(false);
|
|
24261
|
+
const [active, setActive] = React.useState(0);
|
|
24262
|
+
const [maskRect, setMaskRect] = React.useState({
|
|
24263
|
+
top: 0,
|
|
24264
|
+
left: 0,
|
|
24265
|
+
right: 0,
|
|
24266
|
+
bottom: 0,
|
|
24267
|
+
width: 0,
|
|
24268
|
+
height: 0
|
|
24269
|
+
});
|
|
24270
|
+
const classes = classNames(className, classPrefix$1);
|
|
24271
|
+
React.useEffect(() => {
|
|
24272
|
+
if (visible) {
|
|
24273
|
+
getRootPosition();
|
|
24274
|
+
}
|
|
24275
|
+
setActive(0);
|
|
24276
|
+
setShowTour(visible);
|
|
24277
|
+
setShowPopup(visible);
|
|
24278
|
+
}, [visible]);
|
|
24279
|
+
React.useEffect(() => {
|
|
24280
|
+
if (visible) {
|
|
24281
|
+
setShowPopup(true);
|
|
24282
|
+
getRootPosition();
|
|
24283
|
+
}
|
|
24284
|
+
}, [active]);
|
|
24285
|
+
const getRootPosition = () => {
|
|
24286
|
+
const el = document.querySelector(`#${list[active].target}`);
|
|
24287
|
+
const rect = getRect(el);
|
|
24288
|
+
setMaskRect(rect);
|
|
24289
|
+
};
|
|
24290
|
+
const maskStyle = () => {
|
|
24291
|
+
const { width, height, left, top } = maskRect;
|
|
24292
|
+
const center = [left + width / 2, top + height / 2];
|
|
24293
|
+
const w = Number(maskWidth || width);
|
|
24294
|
+
const h = Number(maskHeight || height);
|
|
24295
|
+
const styles = {
|
|
24296
|
+
width: `${w + +offset[1] * 2}px`,
|
|
24297
|
+
height: `${h + +offset[0] * 2}px`,
|
|
24298
|
+
top: `${center[1] - h / 2 - +offset[0]}px`,
|
|
24299
|
+
left: `${center[0] - w / 2 - +offset[1]}px`
|
|
24300
|
+
};
|
|
24301
|
+
return styles;
|
|
24302
|
+
};
|
|
24303
|
+
const maskClose = (e) => {
|
|
24304
|
+
setShowTour(false);
|
|
24305
|
+
setShowPopup(false);
|
|
24306
|
+
onClose && onClose(e);
|
|
24307
|
+
};
|
|
24308
|
+
const handleClickMask = (e) => {
|
|
24309
|
+
closeOnOverlayClick && maskClose(e);
|
|
24310
|
+
};
|
|
24311
|
+
const changeStep = (type22) => {
|
|
24312
|
+
if (type22 === "next") {
|
|
24313
|
+
setActive(active + 1);
|
|
24314
|
+
onChange && onChange(active + 1);
|
|
24315
|
+
} else {
|
|
24316
|
+
setActive(active - 1);
|
|
24317
|
+
onChange && onChange(active - 1);
|
|
24318
|
+
}
|
|
24319
|
+
setShowPopup(false);
|
|
24320
|
+
};
|
|
24321
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ...rest }, /* @__PURE__ */ React.createElement(
|
|
24322
|
+
"div",
|
|
24323
|
+
{
|
|
24324
|
+
className: "nut-tour-masked",
|
|
24325
|
+
style: { display: showTour ? "block" : "none" },
|
|
24326
|
+
onClick: handleClickMask
|
|
24327
|
+
}
|
|
24328
|
+
), list.map((item, index) => {
|
|
24329
|
+
return /* @__PURE__ */ React.createElement("div", { key: index, style: { height: 0 } }, index === active && /* @__PURE__ */ React.createElement(React.Fragment, null, showTour && /* @__PURE__ */ React.createElement(
|
|
24330
|
+
"div",
|
|
24331
|
+
{
|
|
24332
|
+
className: `${mask ? "nut-tour-mask" : "nut-tour-mask nut-tour-mask-none"}`,
|
|
24333
|
+
id: "nut-tour-popid",
|
|
24334
|
+
style: maskStyle()
|
|
24335
|
+
}
|
|
24336
|
+
), /* @__PURE__ */ React.createElement(
|
|
24337
|
+
Popover,
|
|
24338
|
+
{
|
|
24339
|
+
visible: showPopup,
|
|
24340
|
+
location: item.location || location,
|
|
24341
|
+
targetId: "nut-tour-popid",
|
|
24342
|
+
closeOnOutsideClick: false,
|
|
24343
|
+
offset: item.popoverOffset || [0, 12],
|
|
24344
|
+
arrowOffset: item.arrowOffset || 0
|
|
24345
|
+
},
|
|
24346
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null),
|
|
24347
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, children || /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "step" && /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content" }, title && /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-top" }, /* @__PURE__ */ React.createElement("div", { onClick: (e) => maskClose(e) }, /* @__PURE__ */ React.createElement(x$b, { className: "nut-tour-content-top-close" }))), /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-inner" }, item.content), /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-bottom" }, /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-bottom-init" }, active + 1, "/", list.length), /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-bottom-operate" }, active !== 0 && showPrev && /* @__PURE__ */ React.createElement(
|
|
24348
|
+
"div",
|
|
24349
|
+
{
|
|
24350
|
+
className: "nut-tour-content-bottom-operate-btn",
|
|
24351
|
+
onClick: () => changeStep("prev")
|
|
24352
|
+
},
|
|
24353
|
+
prev || locale.tour.prevStepText
|
|
24354
|
+
), list.length - 1 === active && /* @__PURE__ */ React.createElement(
|
|
24355
|
+
"div",
|
|
24356
|
+
{
|
|
24357
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
24358
|
+
onClick: (e) => maskClose(e)
|
|
24359
|
+
},
|
|
24360
|
+
complete || locale.tour.completeText
|
|
24361
|
+
), list.length - 1 !== active && /* @__PURE__ */ React.createElement(
|
|
24362
|
+
"div",
|
|
24363
|
+
{
|
|
24364
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
24365
|
+
onClick: () => changeStep("next")
|
|
24366
|
+
},
|
|
24367
|
+
next || locale.tour.nextStepText
|
|
24368
|
+
)))), type2 === "tile" && /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content nut-tour-content-tile" }, /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-inner" }, item.content))))
|
|
24369
|
+
)));
|
|
24370
|
+
}));
|
|
24371
|
+
};
|
|
24372
|
+
Tour.defaultProps = defaultProps$7;
|
|
24373
|
+
Tour.displayName = "NutTour";
|
|
24164
24374
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
24165
24375
|
let index = 0;
|
|
24166
24376
|
const positions = Array(length);
|
|
@@ -25067,6 +25277,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
25067
25277
|
exports2.TimeDetail = TimeDetail;
|
|
25068
25278
|
exports2.TimeSelect = TimeSelect;
|
|
25069
25279
|
exports2.Toast = Toast;
|
|
25280
|
+
exports2.Tour = Tour;
|
|
25070
25281
|
exports2.TrendArrow = TrendArrow;
|
|
25071
25282
|
exports2.Uploader = Uploader;
|
|
25072
25283
|
exports2.Video = Video;
|