@nutui/nutui-react 1.4.6 → 1.4.7-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 +26 -0
- package/dist/esm/Button.js +6 -3
- package/dist/esm/CheckboxGroup.js +1 -1
- package/dist/esm/Elevator.js +1 -0
- package/dist/esm/Ellipsis.js +1 -4
- package/dist/esm/Form.js +11 -11
- package/dist/esm/FormItem.js +2 -2
- package/dist/esm/Notify.js +0 -1
- package/dist/esm/NumberKeyboard.js +3 -0
- package/dist/esm/Popup.js +4 -2
- package/dist/esm/Progress.js +6 -72
- package/dist/esm/Radio.js +2 -2
- package/dist/esm/RadioGroup.js +1 -1
- package/dist/esm/SearchBar.js +3 -1
- package/dist/esm/Swipe.js +7 -2
- package/dist/esm/Swiper.js +7 -2
- package/dist/esm/Tabbar.js +1 -1
- package/dist/esm/TabbarItem.js +7 -5
- package/dist/esm/Tag.js +5 -3
- package/dist/esm/{formitem-9d18eb24.js → formitem-bab4c481.js} +18 -4
- package/dist/esm/{radio-cf953c7a.js → radio-e3ac1cef.js} +4 -4
- package/dist/esm/types/src/packages/button/button.d.ts +1 -0
- package/dist/esm/types/src/packages/elevator/elevator.d.ts +3 -1
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +1 -0
- package/dist/esm/types/src/packages/notify/notify.d.ts +0 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.d.ts +1 -0
- package/dist/esm/types/src/packages/popup/popup.d.ts +1 -0
- package/dist/esm/types/src/packages/progress/progress.d.ts +0 -1
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +1 -0
- package/dist/esm/types/src/packages/swipe/swipe.d.ts +4 -1
- package/dist/esm/types/src/packages/tabbar/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/tabbaritem/tabbaritem.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/tag.d.ts +1 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +296 -336
- package/dist/nutui.react.umd.js +296 -336
- package/dist/packages/address/address.scss +23 -2
- package/dist/packages/button/button.scss +23 -1
- package/dist/packages/calendar/calendar.scss +3 -3
- package/dist/packages/elevator/elevator.scss +1 -1
- package/dist/packages/numberkeyboard/numberkeyboard.scss +10 -2
- package/dist/packages/popup/popup.scss +4 -4
- package/dist/packages/progress/progress.scss +26 -3
- package/dist/packages/radio/radio.scss +1 -1
- package/dist/packages/radiogroup/radiogroup.scss +15 -2
- package/dist/packages/searchbar/searchbar.scss +35 -7
- package/dist/packages/shortpassword/shortpassword.scss +12 -1
- package/dist/packages/swiper/swiper.scss +1 -1
- package/dist/packages/switch/switch.scss +15 -2
- package/dist/packages/tabbar/tabbar.scss +17 -3
- package/dist/packages/tabbaritem/tabbaritem.scss +26 -17
- package/dist/packages/tag/tag.scss +3 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/theme-dark.scss +1 -0
- package/dist/styles/theme-default.scss +1 -0
- package/dist/styles/variables.scss +100 -19
- package/dist/types/index.d.ts +15 -4
- package/package.json +8 -7
- package/dist/esm/types/src/packages/icon/icon.taro.d.ts +0 -18
- package/dist/styles/temp.scss +0 -2340
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.4.
|
|
2
|
+
* @nutui/nutui-react v1.4.7-beta.0 Wed Feb 15 2023 16:13:15 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -46,7 +46,7 @@ classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
|
46
46
|
classname.exports = classname_production_min;
|
|
47
47
|
}
|
|
48
48
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
49
|
-
const defaultProps$
|
|
49
|
+
const defaultProps$1s = {
|
|
50
50
|
name: "",
|
|
51
51
|
size: "",
|
|
52
52
|
classPrefix: "nut-icon",
|
|
@@ -57,7 +57,7 @@ const defaultProps$1t = {
|
|
|
57
57
|
},
|
|
58
58
|
className: ""
|
|
59
59
|
};
|
|
60
|
-
function pxCheck$
|
|
60
|
+
function pxCheck$2(value) {
|
|
61
61
|
if (value === "") {
|
|
62
62
|
return value;
|
|
63
63
|
}
|
|
@@ -66,7 +66,7 @@ function pxCheck$3(value) {
|
|
|
66
66
|
}
|
|
67
67
|
return `${value}px`;
|
|
68
68
|
}
|
|
69
|
-
function Icon
|
|
69
|
+
function Icon(props) {
|
|
70
70
|
const {
|
|
71
71
|
name,
|
|
72
72
|
size,
|
|
@@ -80,7 +80,7 @@ function Icon$1(props) {
|
|
|
80
80
|
onClick,
|
|
81
81
|
...rest
|
|
82
82
|
} = {
|
|
83
|
-
...defaultProps$
|
|
83
|
+
...defaultProps$1s,
|
|
84
84
|
...props
|
|
85
85
|
};
|
|
86
86
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -97,7 +97,7 @@ function Icon$1(props) {
|
|
|
97
97
|
return {};
|
|
98
98
|
};
|
|
99
99
|
const styles = {};
|
|
100
|
-
const checkedSize = pxCheck$
|
|
100
|
+
const checkedSize = pxCheck$2(size);
|
|
101
101
|
if (checkedSize) {
|
|
102
102
|
styles.width = styles.height = styles.fontSize = checkedSize;
|
|
103
103
|
}
|
|
@@ -117,13 +117,13 @@ function Icon$1(props) {
|
|
|
117
117
|
children
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
Icon
|
|
121
|
-
Icon
|
|
120
|
+
Icon.defaultProps = defaultProps$1s;
|
|
121
|
+
Icon.displayName = "NutIcon";
|
|
122
122
|
const ComponentDefaults = {
|
|
123
123
|
iconClassPrefix: "nut-icon",
|
|
124
124
|
iconFontClassName: "nutui-iconfont"
|
|
125
125
|
};
|
|
126
|
-
const defaultProps$
|
|
126
|
+
const defaultProps$1r = {
|
|
127
127
|
...ComponentDefaults,
|
|
128
128
|
className: "",
|
|
129
129
|
color: "",
|
|
@@ -135,6 +135,7 @@ const defaultProps$1s = {
|
|
|
135
135
|
size: "normal",
|
|
136
136
|
block: false,
|
|
137
137
|
icon: "",
|
|
138
|
+
iconSize: "16",
|
|
138
139
|
style: {},
|
|
139
140
|
children: void 0,
|
|
140
141
|
onClick: (e2) => {
|
|
@@ -151,6 +152,7 @@ const Button = (props) => {
|
|
|
151
152
|
size,
|
|
152
153
|
block,
|
|
153
154
|
icon,
|
|
155
|
+
iconSize,
|
|
154
156
|
children,
|
|
155
157
|
onClick,
|
|
156
158
|
className,
|
|
@@ -159,7 +161,7 @@ const Button = (props) => {
|
|
|
159
161
|
iconFontClassName,
|
|
160
162
|
...rest
|
|
161
163
|
} = {
|
|
162
|
-
...defaultProps$
|
|
164
|
+
...defaultProps$1r,
|
|
163
165
|
...props
|
|
164
166
|
};
|
|
165
167
|
const getStyle = useCallback(() => {
|
|
@@ -208,6 +210,7 @@ const Button = (props) => {
|
|
|
208
210
|
size,
|
|
209
211
|
block,
|
|
210
212
|
icon,
|
|
213
|
+
iconSize,
|
|
211
214
|
children,
|
|
212
215
|
onClick,
|
|
213
216
|
classes,
|
|
@@ -225,21 +228,22 @@ const Button = (props) => {
|
|
|
225
228
|
onClick: (e2) => handleClick2(e2)
|
|
226
229
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
227
230
|
className: "nut-button__warp"
|
|
228
|
-
}, loading && /* @__PURE__ */ React__default.createElement(Icon
|
|
231
|
+
}, loading && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
229
232
|
classPrefix: iconClassPrefix,
|
|
230
233
|
fontClassName: iconFontClassName,
|
|
231
234
|
name: "loading"
|
|
232
|
-
}), !loading && icon ? /* @__PURE__ */ React__default.createElement(Icon
|
|
235
|
+
}), !loading && icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
233
236
|
classPrefix: iconClassPrefix,
|
|
234
237
|
fontClassName: iconFontClassName,
|
|
235
|
-
name: icon
|
|
238
|
+
name: icon,
|
|
239
|
+
size: iconSize
|
|
236
240
|
}) : "", children && /* @__PURE__ */ React__default.createElement("div", {
|
|
237
241
|
className: icon || loading ? "text" : ""
|
|
238
242
|
}, children)));
|
|
239
243
|
};
|
|
240
|
-
Button.defaultProps = defaultProps$
|
|
244
|
+
Button.defaultProps = defaultProps$1r;
|
|
241
245
|
Button.displayName = "NutButton";
|
|
242
|
-
const defaultProps$
|
|
246
|
+
const defaultProps$1q = {
|
|
243
247
|
...ComponentDefaults,
|
|
244
248
|
title: null,
|
|
245
249
|
subTitle: null,
|
|
@@ -281,7 +285,7 @@ const Cell = (props) => {
|
|
|
281
285
|
iconFontClassName,
|
|
282
286
|
...rest
|
|
283
287
|
} = {
|
|
284
|
-
...defaultProps$
|
|
288
|
+
...defaultProps$1q,
|
|
285
289
|
...props
|
|
286
290
|
};
|
|
287
291
|
const b = cn("cell");
|
|
@@ -308,7 +312,7 @@ const Cell = (props) => {
|
|
|
308
312
|
...rest
|
|
309
313
|
}, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
|
|
310
314
|
className: b("icon")
|
|
311
|
-
}, iconSlot || (icon ? /* @__PURE__ */ React__default.createElement(Icon
|
|
315
|
+
}, iconSlot || (icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
312
316
|
classPrefix: iconClassPrefix,
|
|
313
317
|
fontClassName: iconFontClassName,
|
|
314
318
|
name: icon,
|
|
@@ -324,16 +328,16 @@ const Cell = (props) => {
|
|
|
324
328
|
alone: !title && !subTitle
|
|
325
329
|
}),
|
|
326
330
|
style: styles
|
|
327
|
-
}, desc) : null, !linkSlot && isLink ? /* @__PURE__ */ React__default.createElement(Icon
|
|
331
|
+
}, desc) : null, !linkSlot && isLink ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
328
332
|
classPrefix: iconClassPrefix,
|
|
329
333
|
fontClassName: iconFontClassName,
|
|
330
334
|
name: "right",
|
|
331
335
|
className: b("link")
|
|
332
336
|
}) : linkSlot));
|
|
333
337
|
};
|
|
334
|
-
Cell.defaultProps = defaultProps$
|
|
338
|
+
Cell.defaultProps = defaultProps$1q;
|
|
335
339
|
Cell.displayName = "NutCell";
|
|
336
|
-
const defaultProps$
|
|
340
|
+
const defaultProps$1p = {
|
|
337
341
|
title: "",
|
|
338
342
|
desc: "",
|
|
339
343
|
className: "",
|
|
@@ -342,7 +346,7 @@ const defaultProps$1q = {
|
|
|
342
346
|
};
|
|
343
347
|
const CellGroup = (props) => {
|
|
344
348
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
345
|
-
...defaultProps$
|
|
349
|
+
...defaultProps$1p,
|
|
346
350
|
...props
|
|
347
351
|
};
|
|
348
352
|
const b = cn("cell-group");
|
|
@@ -356,7 +360,7 @@ const CellGroup = (props) => {
|
|
|
356
360
|
className: b("wrap")
|
|
357
361
|
}, children));
|
|
358
362
|
};
|
|
359
|
-
CellGroup.defaultProps = defaultProps$
|
|
363
|
+
CellGroup.defaultProps = defaultProps$1p;
|
|
360
364
|
CellGroup.displayName = "NutCellGroup";
|
|
361
365
|
var INFINITY = 1 / 0;
|
|
362
366
|
var symbolTag = "[object Symbol]";
|
|
@@ -768,7 +772,7 @@ const zhCN = {
|
|
|
768
772
|
errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
|
|
769
773
|
}
|
|
770
774
|
};
|
|
771
|
-
const defaultProps$
|
|
775
|
+
const defaultProps$1o = {
|
|
772
776
|
locale: zhCN
|
|
773
777
|
};
|
|
774
778
|
const defaultConfigRef = {
|
|
@@ -792,7 +796,7 @@ function convertThemeVarsToCSSVars(themeVars) {
|
|
|
792
796
|
return cssVars;
|
|
793
797
|
}
|
|
794
798
|
const ConfigProvider = (props) => {
|
|
795
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
799
|
+
const { children, ...config2 } = { ...defaultProps$1o, ...props };
|
|
796
800
|
const parentConfig = useConfig();
|
|
797
801
|
const theme = config2.theme || {};
|
|
798
802
|
const style = useMemo(
|
|
@@ -808,9 +812,9 @@ const ConfigProvider = (props) => {
|
|
|
808
812
|
style
|
|
809
813
|
}, children));
|
|
810
814
|
};
|
|
811
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
815
|
+
ConfigProvider.defaultProps = defaultProps$1o;
|
|
812
816
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
813
|
-
const defaultProps$
|
|
817
|
+
const defaultProps$1n = {
|
|
814
818
|
fit: "fill",
|
|
815
819
|
position: "center",
|
|
816
820
|
alt: "",
|
|
@@ -845,7 +849,7 @@ const Image$1 = (props) => {
|
|
|
845
849
|
onClick,
|
|
846
850
|
onLoad,
|
|
847
851
|
onError
|
|
848
|
-
} = { ...defaultProps$
|
|
852
|
+
} = { ...defaultProps$1n, ...props };
|
|
849
853
|
const [loading, setLoading] = useState(true);
|
|
850
854
|
const [isError, setIsError] = useState(false);
|
|
851
855
|
const [_src, setSrc] = useState("");
|
|
@@ -946,16 +950,16 @@ const Image$1 = (props) => {
|
|
|
946
950
|
}), loading && showLoading ? /* @__PURE__ */ React__default.createElement("div", {
|
|
947
951
|
className: "nut-img-loading",
|
|
948
952
|
style: loadingBg
|
|
949
|
-
}, !loadingImg && (slotLoding || children || /* @__PURE__ */ React__default.createElement(Icon
|
|
953
|
+
}, !loadingImg && (slotLoding || children || /* @__PURE__ */ React__default.createElement(Icon, {
|
|
950
954
|
name: "image"
|
|
951
955
|
}))) : null, isError && showError && !loading ? /* @__PURE__ */ React__default.createElement("div", {
|
|
952
956
|
className: "nut-img-error",
|
|
953
957
|
style: errorBg
|
|
954
|
-
}, !errorImg && (slotError || children || /* @__PURE__ */ React__default.createElement(Icon
|
|
958
|
+
}, !errorImg && (slotError || children || /* @__PURE__ */ React__default.createElement(Icon, {
|
|
955
959
|
name: "image-error"
|
|
956
960
|
}))) : null);
|
|
957
961
|
};
|
|
958
|
-
Image$1.defaultProps = defaultProps$
|
|
962
|
+
Image$1.defaultProps = defaultProps$1n;
|
|
959
963
|
Image$1.displayName = "NutImage";
|
|
960
964
|
var classnames = { exports: {} };
|
|
961
965
|
/*!
|
|
@@ -1548,7 +1552,7 @@ CSSTransition.defaultProps = {
|
|
|
1548
1552
|
};
|
|
1549
1553
|
CSSTransition.propTypes = {};
|
|
1550
1554
|
var CSSTransition$1 = CSSTransition;
|
|
1551
|
-
const defaultProps$
|
|
1555
|
+
const defaultProps$1m = {
|
|
1552
1556
|
...ComponentDefaults,
|
|
1553
1557
|
position: "center",
|
|
1554
1558
|
transition: "",
|
|
@@ -1557,6 +1561,7 @@ const defaultProps$1n = {
|
|
|
1557
1561
|
closeable: false,
|
|
1558
1562
|
closeIconPosition: "top-right",
|
|
1559
1563
|
closeIcon: "close",
|
|
1564
|
+
closeIconSize: "12px",
|
|
1560
1565
|
destroyOnClose: true,
|
|
1561
1566
|
teleport: null,
|
|
1562
1567
|
overlay: true,
|
|
@@ -1608,7 +1613,8 @@ const Popup = (props) => {
|
|
|
1608
1613
|
onClosed,
|
|
1609
1614
|
onClick,
|
|
1610
1615
|
iconClassPrefix,
|
|
1611
|
-
iconFontClassName
|
|
1616
|
+
iconFontClassName,
|
|
1617
|
+
closeIconSize
|
|
1612
1618
|
} = props;
|
|
1613
1619
|
const [index, setIndex] = useState(zIndex || _zIndex);
|
|
1614
1620
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
@@ -1706,11 +1712,11 @@ const Popup = (props) => {
|
|
|
1706
1712
|
}, showChildren ? children : "", closeable ? /* @__PURE__ */ React__default.createElement("div", {
|
|
1707
1713
|
className: closeClasses,
|
|
1708
1714
|
onClick: onHandleClickCloseIcon
|
|
1709
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
1715
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
1710
1716
|
classPrefix: iconClassPrefix,
|
|
1711
1717
|
fontClassName: iconFontClassName,
|
|
1712
1718
|
name: closeIcon,
|
|
1713
|
-
size:
|
|
1719
|
+
size: closeIconSize
|
|
1714
1720
|
})) : ""));
|
|
1715
1721
|
};
|
|
1716
1722
|
const renderNode = () => {
|
|
@@ -1734,10 +1740,10 @@ const Popup = (props) => {
|
|
|
1734
1740
|
}, [position]);
|
|
1735
1741
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1736
1742
|
};
|
|
1737
|
-
Popup.defaultProps = defaultProps$
|
|
1743
|
+
Popup.defaultProps = defaultProps$1m;
|
|
1738
1744
|
Popup.displayName = "NutPopup";
|
|
1739
1745
|
const DataContext$2 = createContext({});
|
|
1740
|
-
const defaultProps$
|
|
1746
|
+
const defaultProps$1l = {
|
|
1741
1747
|
span: "24",
|
|
1742
1748
|
offset: "0",
|
|
1743
1749
|
gutter: "0"
|
|
@@ -1750,7 +1756,7 @@ const Col = (props) => {
|
|
|
1750
1756
|
offset,
|
|
1751
1757
|
children,
|
|
1752
1758
|
onClick
|
|
1753
|
-
} = { ...defaultProps$
|
|
1759
|
+
} = { ...defaultProps$1l, ...props };
|
|
1754
1760
|
const [colName, setColName] = useState("");
|
|
1755
1761
|
const [colStyle, setColStyle] = useState({});
|
|
1756
1762
|
const { gutter } = useContext(DataContext$2);
|
|
@@ -1776,9 +1782,9 @@ const Col = (props) => {
|
|
|
1776
1782
|
}
|
|
1777
1783
|
}, children);
|
|
1778
1784
|
};
|
|
1779
|
-
Col.defaultProps = defaultProps$
|
|
1785
|
+
Col.defaultProps = defaultProps$1l;
|
|
1780
1786
|
Col.displayName = "NutCol";
|
|
1781
|
-
const defaultProps$
|
|
1787
|
+
const defaultProps$1k = {
|
|
1782
1788
|
contentPosition: "center",
|
|
1783
1789
|
dashed: false,
|
|
1784
1790
|
hairline: true,
|
|
@@ -1795,7 +1801,7 @@ const Divider = (props) => {
|
|
|
1795
1801
|
direction,
|
|
1796
1802
|
...rest
|
|
1797
1803
|
} = {
|
|
1798
|
-
...defaultProps$
|
|
1804
|
+
...defaultProps$1k,
|
|
1799
1805
|
...props
|
|
1800
1806
|
};
|
|
1801
1807
|
const dividerBem = cn("divider");
|
|
@@ -1816,14 +1822,14 @@ const Divider = (props) => {
|
|
|
1816
1822
|
...rest
|
|
1817
1823
|
}, children);
|
|
1818
1824
|
};
|
|
1819
|
-
Divider.defaultProps = defaultProps$
|
|
1825
|
+
Divider.defaultProps = defaultProps$1k;
|
|
1820
1826
|
Divider.displayName = "NutDivider";
|
|
1821
1827
|
const gridContext = {
|
|
1822
1828
|
onClick: (item, index) => {
|
|
1823
1829
|
}
|
|
1824
1830
|
};
|
|
1825
1831
|
var GridContext = React__default.createContext(gridContext);
|
|
1826
|
-
const defaultProps$
|
|
1832
|
+
const defaultProps$1j = {
|
|
1827
1833
|
columnNum: 4,
|
|
1828
1834
|
border: true,
|
|
1829
1835
|
gutter: 0,
|
|
@@ -1851,7 +1857,7 @@ const Grid = (props) => {
|
|
|
1851
1857
|
className,
|
|
1852
1858
|
onClick,
|
|
1853
1859
|
...rest
|
|
1854
|
-
} = { ...defaultProps$
|
|
1860
|
+
} = { ...defaultProps$1j, ...props };
|
|
1855
1861
|
const childrenDom = React__default.Children.toArray(children);
|
|
1856
1862
|
const pxCheck2 = (value) => {
|
|
1857
1863
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1892,9 +1898,9 @@ const Grid = (props) => {
|
|
|
1892
1898
|
});
|
|
1893
1899
|
})));
|
|
1894
1900
|
};
|
|
1895
|
-
Grid.defaultProps = defaultProps$
|
|
1901
|
+
Grid.defaultProps = defaultProps$1j;
|
|
1896
1902
|
Grid.displayName = "NutGrid";
|
|
1897
|
-
const defaultProps$
|
|
1903
|
+
const defaultProps$1i = {
|
|
1898
1904
|
...ComponentDefaults,
|
|
1899
1905
|
text: "",
|
|
1900
1906
|
fontSize: "",
|
|
@@ -1937,7 +1943,7 @@ const GridItem = (props) => {
|
|
|
1937
1943
|
onClick,
|
|
1938
1944
|
...rest
|
|
1939
1945
|
} = {
|
|
1940
|
-
...defaultProps$
|
|
1946
|
+
...defaultProps$1i,
|
|
1941
1947
|
...props
|
|
1942
1948
|
};
|
|
1943
1949
|
const b = cn("grid-item");
|
|
@@ -1997,7 +2003,7 @@ const GridItem = (props) => {
|
|
|
1997
2003
|
onClick: handleClick2
|
|
1998
2004
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
1999
2005
|
className: contentClass()
|
|
2000
|
-
}, icon && isIconName() ? /* @__PURE__ */ React__default.createElement(Icon
|
|
2006
|
+
}, icon && isIconName() ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
2001
2007
|
classPrefix: iconClassPrefix,
|
|
2002
2008
|
fontClassName: iconFontClassName,
|
|
2003
2009
|
name: icon,
|
|
@@ -2008,18 +2014,18 @@ const GridItem = (props) => {
|
|
|
2008
2014
|
style: { fontSize, color }
|
|
2009
2015
|
}, text), children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
|
|
2010
2016
|
};
|
|
2011
|
-
GridItem.defaultProps = defaultProps$
|
|
2017
|
+
GridItem.defaultProps = defaultProps$1i;
|
|
2012
2018
|
GridItem.displayName = "NutGridItem";
|
|
2013
|
-
const defaultProps$
|
|
2019
|
+
const defaultProps$1h = {};
|
|
2014
2020
|
const Layout = (props) => {
|
|
2015
|
-
({ ...defaultProps$
|
|
2021
|
+
({ ...defaultProps$1h, ...props });
|
|
2016
2022
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2017
2023
|
className: "nut-layout"
|
|
2018
2024
|
}, "Layout");
|
|
2019
2025
|
};
|
|
2020
|
-
Layout.defaultProps = defaultProps$
|
|
2026
|
+
Layout.defaultProps = defaultProps$1h;
|
|
2021
2027
|
Layout.displayName = "NutLayout";
|
|
2022
|
-
const defaultProps$
|
|
2028
|
+
const defaultProps$1g = {
|
|
2023
2029
|
type: "",
|
|
2024
2030
|
justify: "start",
|
|
2025
2031
|
align: "flex-start",
|
|
@@ -2038,7 +2044,7 @@ const Row = (props) => {
|
|
|
2038
2044
|
gutter,
|
|
2039
2045
|
onClick
|
|
2040
2046
|
} = {
|
|
2041
|
-
...defaultProps$
|
|
2047
|
+
...defaultProps$1g,
|
|
2042
2048
|
...props
|
|
2043
2049
|
};
|
|
2044
2050
|
const prefixCls = "nut-row";
|
|
@@ -2073,7 +2079,7 @@ const Row = (props) => {
|
|
|
2073
2079
|
children
|
|
2074
2080
|
));
|
|
2075
2081
|
};
|
|
2076
|
-
Row.defaultProps = defaultProps$
|
|
2082
|
+
Row.defaultProps = defaultProps$1g;
|
|
2077
2083
|
Row.displayName = "NutRow";
|
|
2078
2084
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
2079
2085
|
const defaultRoot = canUseDom ? window : void 0;
|
|
@@ -2148,7 +2154,7 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
|
2148
2154
|
stop2.current = true;
|
|
2149
2155
|
};
|
|
2150
2156
|
}
|
|
2151
|
-
const defaultProps$
|
|
2157
|
+
const defaultProps$1f = {
|
|
2152
2158
|
position: "top",
|
|
2153
2159
|
top: 0,
|
|
2154
2160
|
bottom: 0,
|
|
@@ -2292,7 +2298,7 @@ const Sticky = (props) => {
|
|
|
2292
2298
|
style: stickyStyle
|
|
2293
2299
|
}, children));
|
|
2294
2300
|
};
|
|
2295
|
-
Sticky.defaultProps = defaultProps$
|
|
2301
|
+
Sticky.defaultProps = defaultProps$1f;
|
|
2296
2302
|
Sticky.displayName = "NutSticky";
|
|
2297
2303
|
function clamp$1(v, min, max) {
|
|
2298
2304
|
return Math.max(min, Math.min(v, max));
|
|
@@ -2336,7 +2342,24 @@ function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
|
|
|
2336
2342
|
const [[X0, X1], [Y0, Y1]] = bounds;
|
|
2337
2343
|
return [rubberbandIfOutOfBounds$1(Vx, X0, X1, Rx), rubberbandIfOutOfBounds$1(Vy, Y0, Y1, Ry)];
|
|
2338
2344
|
}
|
|
2345
|
+
function _toPrimitive(input, hint) {
|
|
2346
|
+
if (typeof input !== "object" || input === null)
|
|
2347
|
+
return input;
|
|
2348
|
+
var prim = input[Symbol.toPrimitive];
|
|
2349
|
+
if (prim !== void 0) {
|
|
2350
|
+
var res = prim.call(input, hint || "default");
|
|
2351
|
+
if (typeof res !== "object")
|
|
2352
|
+
return res;
|
|
2353
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2354
|
+
}
|
|
2355
|
+
return (hint === "string" ? String : Number)(input);
|
|
2356
|
+
}
|
|
2357
|
+
function _toPropertyKey(arg) {
|
|
2358
|
+
var key = _toPrimitive(arg, "string");
|
|
2359
|
+
return typeof key === "symbol" ? key : String(key);
|
|
2360
|
+
}
|
|
2339
2361
|
function _defineProperty(obj, key, value) {
|
|
2362
|
+
key = _toPropertyKey(key);
|
|
2340
2363
|
if (key in obj) {
|
|
2341
2364
|
Object.defineProperty(obj, key, {
|
|
2342
2365
|
value,
|
|
@@ -2878,12 +2901,11 @@ const coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfig
|
|
|
2878
2901
|
return [[left, right], [top, bottom]];
|
|
2879
2902
|
}
|
|
2880
2903
|
});
|
|
2881
|
-
const DISPLACEMENT = 10;
|
|
2882
2904
|
const KEYS_DELTA_MAP = {
|
|
2883
|
-
ArrowRight: (factor = 1) => [
|
|
2884
|
-
ArrowLeft: (factor = 1) => [-
|
|
2885
|
-
ArrowUp: (factor = 1) => [0, -
|
|
2886
|
-
ArrowDown: (factor = 1) => [0,
|
|
2905
|
+
ArrowRight: (displacement, factor = 1) => [displacement * factor, 0],
|
|
2906
|
+
ArrowLeft: (displacement, factor = 1) => [-1 * displacement * factor, 0],
|
|
2907
|
+
ArrowUp: (displacement, factor = 1) => [0, -1 * displacement * factor],
|
|
2908
|
+
ArrowDown: (displacement, factor = 1) => [0, displacement * factor]
|
|
2887
2909
|
};
|
|
2888
2910
|
class DragEngine extends CoordinatesEngine {
|
|
2889
2911
|
constructor(...args) {
|
|
@@ -3107,7 +3129,7 @@ class DragEngine extends CoordinatesEngine {
|
|
|
3107
3129
|
const state = this.state;
|
|
3108
3130
|
const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;
|
|
3109
3131
|
this.start(event);
|
|
3110
|
-
state._delta = deltaFn(factor);
|
|
3132
|
+
state._delta = deltaFn(this.config.keyboardDisplacement, factor);
|
|
3111
3133
|
state._keyboardActive = true;
|
|
3112
3134
|
V.addTo(state._movement, state._delta);
|
|
3113
3135
|
this.compute(event);
|
|
@@ -3179,6 +3201,7 @@ const DEFAULT_DRAG_DELAY = 180;
|
|
|
3179
3201
|
const DEFAULT_SWIPE_VELOCITY = 0.5;
|
|
3180
3202
|
const DEFAULT_SWIPE_DISTANCE = 50;
|
|
3181
3203
|
const DEFAULT_SWIPE_DURATION = 250;
|
|
3204
|
+
const DEFAULT_KEYBOARD_DISPLACEMENT = 10;
|
|
3182
3205
|
const DEFAULT_DRAG_AXIS_THRESHOLD = {
|
|
3183
3206
|
mouse: 0,
|
|
3184
3207
|
touch: 0,
|
|
@@ -3257,6 +3280,9 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
|
|
|
3257
3280
|
if (!value)
|
|
3258
3281
|
return DEFAULT_DRAG_AXIS_THRESHOLD;
|
|
3259
3282
|
return _objectSpread2(_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
|
|
3283
|
+
},
|
|
3284
|
+
keyboardDisplacement(value = DEFAULT_KEYBOARD_DISPLACEMENT) {
|
|
3285
|
+
return value;
|
|
3260
3286
|
}
|
|
3261
3287
|
});
|
|
3262
3288
|
function clampStateInternalMovementToBounds(state) {
|
|
@@ -3988,16 +4014,10 @@ class Controller$1 {
|
|
|
3988
4014
|
}
|
|
3989
4015
|
const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
|
|
3990
4016
|
for (const eventKey in this.nativeHandlers) {
|
|
3991
|
-
nativeBindFunction(
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
event,
|
|
3996
|
-
args
|
|
3997
|
-
})),
|
|
3998
|
-
void 0,
|
|
3999
|
-
true
|
|
4000
|
-
);
|
|
4017
|
+
nativeBindFunction(eventKey, "", (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
|
|
4018
|
+
event,
|
|
4019
|
+
args
|
|
4020
|
+
})), void 0, true);
|
|
4001
4021
|
}
|
|
4002
4022
|
}
|
|
4003
4023
|
for (const handlerProp in props) {
|
|
@@ -7318,7 +7338,7 @@ const host = createHost(primitives, {
|
|
|
7318
7338
|
});
|
|
7319
7339
|
const animated = host.animated;
|
|
7320
7340
|
const elevatorContext = createContext({});
|
|
7321
|
-
const defaultProps$
|
|
7341
|
+
const defaultProps$1e = {
|
|
7322
7342
|
height: "200px",
|
|
7323
7343
|
acceptKey: "title",
|
|
7324
7344
|
indexList: [],
|
|
@@ -7341,7 +7361,7 @@ const Elevator = (props) => {
|
|
|
7341
7361
|
children,
|
|
7342
7362
|
...rest
|
|
7343
7363
|
} = {
|
|
7344
|
-
...defaultProps$
|
|
7364
|
+
...defaultProps$1e,
|
|
7345
7365
|
...props
|
|
7346
7366
|
};
|
|
7347
7367
|
const b = cn("elevator");
|
|
@@ -7528,9 +7548,10 @@ const Elevator = (props) => {
|
|
|
7528
7548
|
}, item[acceptKey]);
|
|
7529
7549
|
}))));
|
|
7530
7550
|
};
|
|
7531
|
-
Elevator.defaultProps = defaultProps$
|
|
7551
|
+
Elevator.defaultProps = defaultProps$1e;
|
|
7532
7552
|
Elevator.displayName = "NutElevator";
|
|
7533
|
-
|
|
7553
|
+
Elevator.Context = elevatorContext;
|
|
7554
|
+
const defaultProps$1d = {
|
|
7534
7555
|
...ComponentDefaults,
|
|
7535
7556
|
fixednavClass: "nut-fixednav",
|
|
7536
7557
|
activeText: "",
|
|
@@ -7560,7 +7581,7 @@ const FixedNav = (props) => {
|
|
|
7560
7581
|
iconFontClassName,
|
|
7561
7582
|
...rest
|
|
7562
7583
|
} = {
|
|
7563
|
-
...defaultProps$
|
|
7584
|
+
...defaultProps$1d,
|
|
7564
7585
|
...props
|
|
7565
7586
|
};
|
|
7566
7587
|
const b = cn("fixednav");
|
|
@@ -7606,7 +7627,7 @@ const FixedNav = (props) => {
|
|
|
7606
7627
|
}))), /* @__PURE__ */ React__default.createElement("div", {
|
|
7607
7628
|
className: "nut-fixednav__btn",
|
|
7608
7629
|
onClick: () => onUpdateValue()
|
|
7609
|
-
}, slotBtn || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Icon
|
|
7630
|
+
}, slotBtn || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
7610
7631
|
classPrefix: iconClassPrefix,
|
|
7611
7632
|
fontClassName: iconFontClassName,
|
|
7612
7633
|
name: "left",
|
|
@@ -7615,9 +7636,9 @@ const FixedNav = (props) => {
|
|
|
7615
7636
|
className: "text"
|
|
7616
7637
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
7617
7638
|
};
|
|
7618
|
-
FixedNav.defaultProps = defaultProps$
|
|
7639
|
+
FixedNav.defaultProps = defaultProps$1d;
|
|
7619
7640
|
FixedNav.displayName = "NutFixedNav";
|
|
7620
|
-
const defaultProps$
|
|
7641
|
+
const defaultProps$1c = {
|
|
7621
7642
|
size: 3,
|
|
7622
7643
|
current: 1,
|
|
7623
7644
|
block: false,
|
|
@@ -7637,7 +7658,7 @@ const Indicator = (props) => {
|
|
|
7637
7658
|
vertical,
|
|
7638
7659
|
...rest
|
|
7639
7660
|
} = {
|
|
7640
|
-
...defaultProps$
|
|
7661
|
+
...defaultProps$1c,
|
|
7641
7662
|
...props
|
|
7642
7663
|
};
|
|
7643
7664
|
const b = cn("indicator");
|
|
@@ -7671,9 +7692,9 @@ const Indicator = (props) => {
|
|
|
7671
7692
|
...rest
|
|
7672
7693
|
}, renderEles());
|
|
7673
7694
|
};
|
|
7674
|
-
Indicator.defaultProps = defaultProps$
|
|
7695
|
+
Indicator.defaultProps = defaultProps$1c;
|
|
7675
7696
|
Indicator.displayName = "NutIndicator";
|
|
7676
|
-
const defaultProps$
|
|
7697
|
+
const defaultProps$1b = {
|
|
7677
7698
|
...ComponentDefaults,
|
|
7678
7699
|
className: "",
|
|
7679
7700
|
style: {},
|
|
@@ -7696,7 +7717,7 @@ const Menu = (props) => {
|
|
|
7696
7717
|
iconFontClassName,
|
|
7697
7718
|
...rest
|
|
7698
7719
|
} = {
|
|
7699
|
-
...defaultProps$
|
|
7720
|
+
...defaultProps$1b,
|
|
7700
7721
|
...props
|
|
7701
7722
|
};
|
|
7702
7723
|
const parentRef = useRef(null);
|
|
@@ -7792,7 +7813,7 @@ const Menu = (props) => {
|
|
|
7792
7813
|
})}`
|
|
7793
7814
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
7794
7815
|
className: "nut-menu__title-text"
|
|
7795
|
-
}, finallyTitle()), /* @__PURE__ */ React__default.createElement(Icon
|
|
7816
|
+
}, finallyTitle()), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
7796
7817
|
classPrefix: iconClassPrefix,
|
|
7797
7818
|
fontClassName: iconFontClassName,
|
|
7798
7819
|
className: "nut-menu__title-icon",
|
|
@@ -7801,9 +7822,9 @@ const Menu = (props) => {
|
|
|
7801
7822
|
})));
|
|
7802
7823
|
})), cloneChildren()));
|
|
7803
7824
|
};
|
|
7804
|
-
Menu.defaultProps = defaultProps$
|
|
7825
|
+
Menu.defaultProps = defaultProps$1b;
|
|
7805
7826
|
Menu.displayName = "NutMenu";
|
|
7806
|
-
const defaultProps$
|
|
7827
|
+
const defaultProps$1a = {
|
|
7807
7828
|
...ComponentDefaults,
|
|
7808
7829
|
className: "",
|
|
7809
7830
|
style: {},
|
|
@@ -7818,7 +7839,7 @@ const defaultProps$1b = {
|
|
|
7818
7839
|
};
|
|
7819
7840
|
const MenuItem = forwardRef((props, ref) => {
|
|
7820
7841
|
useConfig();
|
|
7821
|
-
const mergedProps = { ...defaultProps$
|
|
7842
|
+
const mergedProps = { ...defaultProps$1a, ...props };
|
|
7822
7843
|
const {
|
|
7823
7844
|
style,
|
|
7824
7845
|
options: options2,
|
|
@@ -7834,7 +7855,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
7834
7855
|
iconClassPrefix,
|
|
7835
7856
|
iconFontClassName
|
|
7836
7857
|
} = {
|
|
7837
|
-
...defaultProps$
|
|
7858
|
+
...defaultProps$1a,
|
|
7838
7859
|
...props
|
|
7839
7860
|
};
|
|
7840
7861
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -7941,7 +7962,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
7941
7962
|
onClick: () => {
|
|
7942
7963
|
handleClick2(item);
|
|
7943
7964
|
}
|
|
7944
|
-
}, item.value === _value ? /* @__PURE__ */ React__default.createElement(Icon
|
|
7965
|
+
}, item.value === _value ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
7945
7966
|
classPrefix: iconClassPrefix,
|
|
7946
7967
|
fontClassName: iconFontClassName,
|
|
7947
7968
|
className: getIconCName(item.value, value),
|
|
@@ -7955,9 +7976,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
7955
7976
|
}, item.text));
|
|
7956
7977
|
}), children))));
|
|
7957
7978
|
});
|
|
7958
|
-
MenuItem.defaultProps = defaultProps$
|
|
7979
|
+
MenuItem.defaultProps = defaultProps$1a;
|
|
7959
7980
|
MenuItem.displayName = "NutMenuItem";
|
|
7960
|
-
const defaultProps$
|
|
7981
|
+
const defaultProps$19 = {
|
|
7961
7982
|
...ComponentDefaults,
|
|
7962
7983
|
title: "",
|
|
7963
7984
|
desc: "",
|
|
@@ -7993,7 +8014,7 @@ const NavBar = (props) => {
|
|
|
7993
8014
|
iconClassPrefix,
|
|
7994
8015
|
iconFontClassName
|
|
7995
8016
|
} = {
|
|
7996
|
-
...defaultProps$
|
|
8017
|
+
...defaultProps$19,
|
|
7997
8018
|
...props
|
|
7998
8019
|
};
|
|
7999
8020
|
const b = cn("navbar");
|
|
@@ -8015,7 +8036,7 @@ const NavBar = (props) => {
|
|
|
8015
8036
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
8016
8037
|
className: `${b("left")}`,
|
|
8017
8038
|
onClick: (e2) => onClickBack(e2)
|
|
8018
|
-
}, leftShow && /* @__PURE__ */ React__default.createElement(Icon
|
|
8039
|
+
}, leftShow && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
8019
8040
|
classPrefix: iconClassPrefix,
|
|
8020
8041
|
fontClassName: iconFontClassName,
|
|
8021
8042
|
name: "left",
|
|
@@ -8032,7 +8053,7 @@ const NavBar = (props) => {
|
|
|
8032
8053
|
onClick: (e2) => onClickTitle(e2)
|
|
8033
8054
|
}, title), titIcon && /* @__PURE__ */ React__default.createElement("div", {
|
|
8034
8055
|
onClick: (e2) => onClickIcon(e2)
|
|
8035
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
8056
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
8036
8057
|
classPrefix: iconClassPrefix,
|
|
8037
8058
|
fontClassName: iconFontClassName,
|
|
8038
8059
|
name: titIcon
|
|
@@ -8062,9 +8083,9 @@ const NavBar = (props) => {
|
|
|
8062
8083
|
className: `${b("")}--placeholder`
|
|
8063
8084
|
}, renderWrapper()) : renderWrapper());
|
|
8064
8085
|
};
|
|
8065
|
-
NavBar.defaultProps = defaultProps$
|
|
8086
|
+
NavBar.defaultProps = defaultProps$19;
|
|
8066
8087
|
NavBar.displayName = "NutNavBar";
|
|
8067
|
-
const defaultProps$
|
|
8088
|
+
const defaultProps$18 = {
|
|
8068
8089
|
defaultValue: 1,
|
|
8069
8090
|
mode: "multi",
|
|
8070
8091
|
prevText: "",
|
|
@@ -8081,7 +8102,7 @@ const defaultProps$19 = {
|
|
|
8081
8102
|
};
|
|
8082
8103
|
const Pagination = (props) => {
|
|
8083
8104
|
const { locale } = useConfig();
|
|
8084
|
-
({ ...defaultProps$
|
|
8105
|
+
({ ...defaultProps$18, ...props });
|
|
8085
8106
|
const {
|
|
8086
8107
|
modelValue,
|
|
8087
8108
|
mode,
|
|
@@ -8198,7 +8219,7 @@ const Pagination = (props) => {
|
|
|
8198
8219
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
8199
8220
|
}, nextText || locale.pagination.next));
|
|
8200
8221
|
};
|
|
8201
|
-
Pagination.defaultProps = defaultProps$
|
|
8222
|
+
Pagination.defaultProps = defaultProps$18;
|
|
8202
8223
|
Pagination.displayName = "NutPagination";
|
|
8203
8224
|
const handleClick = (e2) => {
|
|
8204
8225
|
e2.stopPropagation();
|
|
@@ -8214,7 +8235,7 @@ const handleClick = (e2) => {
|
|
|
8214
8235
|
}
|
|
8215
8236
|
};
|
|
8216
8237
|
const OffsetContext = createContext(20);
|
|
8217
|
-
const defaultProps$
|
|
8238
|
+
const defaultProps$17 = {
|
|
8218
8239
|
showhead: false,
|
|
8219
8240
|
position: "left",
|
|
8220
8241
|
width: "80%"
|
|
@@ -8232,7 +8253,7 @@ const SideNavBar = (props) => {
|
|
|
8232
8253
|
onClose,
|
|
8233
8254
|
...rest
|
|
8234
8255
|
} = {
|
|
8235
|
-
...defaultProps$
|
|
8256
|
+
...defaultProps$17,
|
|
8236
8257
|
...props
|
|
8237
8258
|
};
|
|
8238
8259
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -8260,7 +8281,7 @@ const SideNavBar = (props) => {
|
|
|
8260
8281
|
className: "nut-sidenavbar__content"
|
|
8261
8282
|
}, children))))));
|
|
8262
8283
|
};
|
|
8263
|
-
SideNavBar.defaultProps = defaultProps$
|
|
8284
|
+
SideNavBar.defaultProps = defaultProps$17;
|
|
8264
8285
|
SideNavBar.displayName = "NutSideNavBar";
|
|
8265
8286
|
const SideNavBarItem = (props) => {
|
|
8266
8287
|
const { title, ikey, children, onClick, ...rest } = props;
|
|
@@ -8274,12 +8295,12 @@ const SideNavBarItem = (props) => {
|
|
|
8274
8295
|
...rest
|
|
8275
8296
|
}, title);
|
|
8276
8297
|
};
|
|
8277
|
-
const defaultProps$
|
|
8298
|
+
const defaultProps$16 = {
|
|
8278
8299
|
open: true
|
|
8279
8300
|
};
|
|
8280
8301
|
const SubSideNavBar = (props) => {
|
|
8281
8302
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
8282
|
-
...defaultProps$
|
|
8303
|
+
...defaultProps$16,
|
|
8283
8304
|
...props
|
|
8284
8305
|
};
|
|
8285
8306
|
const offset = useContext(OffsetContext);
|
|
@@ -8338,7 +8359,7 @@ const SubSideNavBar = (props) => {
|
|
|
8338
8359
|
className: "nut-subsidenavbar__content"
|
|
8339
8360
|
}, children));
|
|
8340
8361
|
};
|
|
8341
|
-
const defaultProps$
|
|
8362
|
+
const defaultProps$15 = {
|
|
8342
8363
|
visible: 0,
|
|
8343
8364
|
bottom: false,
|
|
8344
8365
|
size: 20,
|
|
@@ -8366,7 +8387,7 @@ const Tabbar = (props) => {
|
|
|
8366
8387
|
tabSwitch,
|
|
8367
8388
|
onSwitch
|
|
8368
8389
|
} = {
|
|
8369
|
-
...defaultProps$
|
|
8390
|
+
...defaultProps$15,
|
|
8370
8391
|
...props
|
|
8371
8392
|
};
|
|
8372
8393
|
const b = cn("tabbar");
|
|
@@ -8378,7 +8399,7 @@ const Tabbar = (props) => {
|
|
|
8378
8399
|
className: [
|
|
8379
8400
|
`${b()}`,
|
|
8380
8401
|
bottom ? `${b("bottom")}` : "",
|
|
8381
|
-
safeAreaInsetBottom ? `${b("safebottom")}` : "",
|
|
8402
|
+
safeAreaInsetBottom ? `${b("bottom")} ${b("safebottom")}` : "",
|
|
8382
8403
|
className
|
|
8383
8404
|
].join(" "),
|
|
8384
8405
|
style
|
|
@@ -8402,12 +8423,13 @@ const Tabbar = (props) => {
|
|
|
8402
8423
|
return React__default.cloneElement(child, childProps);
|
|
8403
8424
|
}));
|
|
8404
8425
|
};
|
|
8405
|
-
Tabbar.defaultProps = defaultProps$
|
|
8426
|
+
Tabbar.defaultProps = defaultProps$15;
|
|
8406
8427
|
Tabbar.displayName = "NutTabbar";
|
|
8407
|
-
const defaultProps$
|
|
8428
|
+
const defaultProps$14 = {
|
|
8408
8429
|
...ComponentDefaults,
|
|
8409
8430
|
dot: false,
|
|
8410
8431
|
size: "",
|
|
8432
|
+
iconSize: "",
|
|
8411
8433
|
className: "",
|
|
8412
8434
|
tabTitle: "",
|
|
8413
8435
|
icon: "",
|
|
@@ -8424,6 +8446,7 @@ const TabbarItem = (props) => {
|
|
|
8424
8446
|
const {
|
|
8425
8447
|
dot,
|
|
8426
8448
|
size,
|
|
8449
|
+
iconSize,
|
|
8427
8450
|
className,
|
|
8428
8451
|
style,
|
|
8429
8452
|
tabTitle,
|
|
@@ -8438,7 +8461,7 @@ const TabbarItem = (props) => {
|
|
|
8438
8461
|
iconClassPrefix,
|
|
8439
8462
|
iconFontClassName
|
|
8440
8463
|
} = {
|
|
8441
|
-
...defaultProps$
|
|
8464
|
+
...defaultProps$14,
|
|
8442
8465
|
...props
|
|
8443
8466
|
};
|
|
8444
8467
|
const b = cn("tabbar-item");
|
|
@@ -8464,19 +8487,19 @@ const TabbarItem = (props) => {
|
|
|
8464
8487
|
}, num), num && num >= 100 && /* @__PURE__ */ React__default.createElement("div", {
|
|
8465
8488
|
className: `${bIcon("tips", [bIcon("nums")])}`
|
|
8466
8489
|
}, "99+")) : /* @__PURE__ */ React__default.createElement("div", {
|
|
8467
|
-
className: `${bIcon("dot")}`
|
|
8468
|
-
}), icon && /* @__PURE__ */ React__default.createElement(
|
|
8490
|
+
className: `${bIcon("tips", [bIcon("dot")])}`
|
|
8491
|
+
}), icon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
8469
8492
|
classPrefix: iconClassPrefix,
|
|
8470
8493
|
fontClassName: iconFontClassName,
|
|
8471
|
-
size,
|
|
8494
|
+
size: iconSize || size,
|
|
8472
8495
|
name: icon
|
|
8473
|
-
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
8496
|
+
})), tabTitle && /* @__PURE__ */ React__default.createElement("div", {
|
|
8474
8497
|
className: bIcon({ "nav-word": true }, [
|
|
8475
8498
|
bIcon({ "big-word": !icon })
|
|
8476
8499
|
])
|
|
8477
|
-
}, tabTitle))
|
|
8500
|
+
}, tabTitle));
|
|
8478
8501
|
};
|
|
8479
|
-
const defaultProps$
|
|
8502
|
+
const defaultProps$13 = {
|
|
8480
8503
|
title: "",
|
|
8481
8504
|
paneKey: "",
|
|
8482
8505
|
activeKey: "",
|
|
@@ -8484,7 +8507,7 @@ const defaultProps$14 = {
|
|
|
8484
8507
|
};
|
|
8485
8508
|
const TabPane = (props) => {
|
|
8486
8509
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
8487
|
-
...defaultProps$
|
|
8510
|
+
...defaultProps$13,
|
|
8488
8511
|
...props
|
|
8489
8512
|
};
|
|
8490
8513
|
const b = cn("tabpane");
|
|
@@ -8508,7 +8531,7 @@ class Title {
|
|
|
8508
8531
|
this.index = 0;
|
|
8509
8532
|
}
|
|
8510
8533
|
}
|
|
8511
|
-
const defaultProps$
|
|
8534
|
+
const defaultProps$12 = {
|
|
8512
8535
|
...ComponentDefaults,
|
|
8513
8536
|
tabStyle: {},
|
|
8514
8537
|
value: 0,
|
|
@@ -8523,7 +8546,7 @@ const defaultProps$13 = {
|
|
|
8523
8546
|
size: "normal",
|
|
8524
8547
|
autoHeight: false
|
|
8525
8548
|
};
|
|
8526
|
-
const pxCheck$
|
|
8549
|
+
const pxCheck$1 = (value) => {
|
|
8527
8550
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
8528
8551
|
};
|
|
8529
8552
|
const Tabs = (props) => {
|
|
@@ -8549,7 +8572,7 @@ const Tabs = (props) => {
|
|
|
8549
8572
|
iconFontClassName,
|
|
8550
8573
|
...rest
|
|
8551
8574
|
} = {
|
|
8552
|
-
...defaultProps$
|
|
8575
|
+
...defaultProps$12,
|
|
8553
8576
|
...props
|
|
8554
8577
|
};
|
|
8555
8578
|
const [currentItem, setCurrentItem] = useState({ index: 0 });
|
|
@@ -8587,8 +8610,8 @@ const Tabs = (props) => {
|
|
|
8587
8610
|
`${b("")}__titles`
|
|
8588
8611
|
);
|
|
8589
8612
|
const titleStyle = {
|
|
8590
|
-
marginLeft: pxCheck$
|
|
8591
|
-
marginRight: pxCheck$
|
|
8613
|
+
marginLeft: pxCheck$1(titleGutter),
|
|
8614
|
+
marginRight: pxCheck$1(titleGutter)
|
|
8592
8615
|
};
|
|
8593
8616
|
const tabsActiveStyle = {
|
|
8594
8617
|
color: type4 === "smile" ? color : "",
|
|
@@ -8631,7 +8654,7 @@ const Tabs = (props) => {
|
|
|
8631
8654
|
}), type4 === "smile" && /* @__PURE__ */ React__default.createElement("div", {
|
|
8632
8655
|
className: `${b("")}__titles-item__smile`,
|
|
8633
8656
|
style: tabsActiveStyle
|
|
8634
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
8657
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
8635
8658
|
classPrefix: iconClassPrefix,
|
|
8636
8659
|
fontClassName: iconFontClassName,
|
|
8637
8660
|
color,
|
|
@@ -8667,7 +8690,7 @@ const Tabs = (props) => {
|
|
|
8667
8690
|
return React__default.cloneElement(child, childProps);
|
|
8668
8691
|
}))));
|
|
8669
8692
|
};
|
|
8670
|
-
Tabs.defaultProps = defaultProps$
|
|
8693
|
+
Tabs.defaultProps = defaultProps$12;
|
|
8671
8694
|
Tabs.displayName = "NutTabs";
|
|
8672
8695
|
const Utils = {
|
|
8673
8696
|
isLeapYear(y) {
|
|
@@ -8761,7 +8784,7 @@ function requestAniFrame() {
|
|
|
8761
8784
|
};
|
|
8762
8785
|
}
|
|
8763
8786
|
var requestAniFrame$1 = requestAniFrame();
|
|
8764
|
-
const defaultProps$
|
|
8787
|
+
const defaultProps$11 = {
|
|
8765
8788
|
type: "one",
|
|
8766
8789
|
isAutoBackFill: false,
|
|
8767
8790
|
poppable: true,
|
|
@@ -8810,7 +8833,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
8810
8833
|
onChoose,
|
|
8811
8834
|
onUpdate,
|
|
8812
8835
|
onSelected
|
|
8813
|
-
} = { ...defaultProps$
|
|
8836
|
+
} = { ...defaultProps$11, ...props };
|
|
8814
8837
|
const weeks = locale.calendaritem.weekdays;
|
|
8815
8838
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
8816
8839
|
const [monthsData, setMonthsData] = useState([]);
|
|
@@ -9397,9 +9420,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
9397
9420
|
onClick: confirm2
|
|
9398
9421
|
}, confirmText || locale.confirm)) : ""));
|
|
9399
9422
|
});
|
|
9400
|
-
CalendarItem.defaultProps = defaultProps$
|
|
9423
|
+
CalendarItem.defaultProps = defaultProps$11;
|
|
9401
9424
|
CalendarItem.displayName = "NutCalendarItem";
|
|
9402
|
-
const defaultProps$
|
|
9425
|
+
const defaultProps$10 = {
|
|
9403
9426
|
type: "one",
|
|
9404
9427
|
isAutoBackFill: false,
|
|
9405
9428
|
poppable: true,
|
|
@@ -9451,7 +9474,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
9451
9474
|
onClose,
|
|
9452
9475
|
onChoose,
|
|
9453
9476
|
onSelected
|
|
9454
|
-
} = { ...defaultProps$
|
|
9477
|
+
} = { ...defaultProps$10, ...props };
|
|
9455
9478
|
const calendarRef = useRef(null);
|
|
9456
9479
|
const close = () => {
|
|
9457
9480
|
onClose && onClose();
|
|
@@ -9510,9 +9533,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
9510
9533
|
style: { height: "85vh" }
|
|
9511
9534
|
}, renderItem()) : renderItem());
|
|
9512
9535
|
});
|
|
9513
|
-
Calendar.defaultProps = defaultProps$
|
|
9536
|
+
Calendar.defaultProps = defaultProps$10;
|
|
9514
9537
|
Calendar.displayName = "NutCalendar";
|
|
9515
|
-
const defaultProps
|
|
9538
|
+
const defaultProps$$ = {
|
|
9516
9539
|
data: {
|
|
9517
9540
|
text: "",
|
|
9518
9541
|
value: "",
|
|
@@ -9528,7 +9551,7 @@ const defaultProps$10 = {
|
|
|
9528
9551
|
};
|
|
9529
9552
|
const InternalCascaderItem = (props) => {
|
|
9530
9553
|
const { data, checked, chooseItem, activeColor } = {
|
|
9531
|
-
...defaultProps
|
|
9554
|
+
...defaultProps$$,
|
|
9532
9555
|
...props
|
|
9533
9556
|
};
|
|
9534
9557
|
const b = cn("cascader-item");
|
|
@@ -9555,17 +9578,17 @@ const InternalCascaderItem = (props) => {
|
|
|
9555
9578
|
}
|
|
9556
9579
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
9557
9580
|
className: classesTitle
|
|
9558
|
-
}, data.text), data.loading ? /* @__PURE__ */ React__default.createElement(Icon
|
|
9581
|
+
}, data.text), data.loading ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
9559
9582
|
color: "#969799",
|
|
9560
9583
|
className: "nut-cascader-item__icon-loading",
|
|
9561
9584
|
name: "loading"
|
|
9562
|
-
}) : /* @__PURE__ */ React__default.createElement(Icon
|
|
9585
|
+
}) : /* @__PURE__ */ React__default.createElement(Icon, {
|
|
9563
9586
|
className: `${checked ? b("icon-check") : ""}`,
|
|
9564
9587
|
name: "checklist"
|
|
9565
9588
|
}));
|
|
9566
9589
|
};
|
|
9567
9590
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
9568
|
-
CascaderItem.defaultProps = defaultProps
|
|
9591
|
+
CascaderItem.defaultProps = defaultProps$$;
|
|
9569
9592
|
CascaderItem.displayName = "NutCascaderItem";
|
|
9570
9593
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
9571
9594
|
const {
|
|
@@ -9699,7 +9722,7 @@ class Tree {
|
|
|
9699
9722
|
return pathNodes;
|
|
9700
9723
|
}
|
|
9701
9724
|
}
|
|
9702
|
-
const defaultProps
|
|
9725
|
+
const defaultProps$_ = {
|
|
9703
9726
|
className: "",
|
|
9704
9727
|
style: {},
|
|
9705
9728
|
activeColor: "#fa2c19",
|
|
@@ -9749,7 +9772,7 @@ const InternalCascader = (props) => {
|
|
|
9749
9772
|
onClose,
|
|
9750
9773
|
onChange,
|
|
9751
9774
|
onPathChange
|
|
9752
|
-
} = { ...defaultProps
|
|
9775
|
+
} = { ...defaultProps$_, ...props };
|
|
9753
9776
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
9754
9777
|
const [optiosData, setOptiosData] = useState([]);
|
|
9755
9778
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -10009,9 +10032,9 @@ const InternalCascader = (props) => {
|
|
|
10009
10032
|
}, renderItem()) : renderItem());
|
|
10010
10033
|
};
|
|
10011
10034
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
10012
|
-
Cascader.defaultProps = defaultProps
|
|
10035
|
+
Cascader.defaultProps = defaultProps$_;
|
|
10013
10036
|
Cascader.displayName = "NutCascader";
|
|
10014
|
-
const defaultProps$
|
|
10037
|
+
const defaultProps$Z = {
|
|
10015
10038
|
disabled: false,
|
|
10016
10039
|
checkedValue: [],
|
|
10017
10040
|
max: void 0,
|
|
@@ -10021,7 +10044,7 @@ const defaultProps$_ = {
|
|
|
10021
10044
|
};
|
|
10022
10045
|
const CheckboxGroup = React__default.forwardRef(
|
|
10023
10046
|
(props, ref) => {
|
|
10024
|
-
const { children } = { ...defaultProps$
|
|
10047
|
+
const { children } = { ...defaultProps$Z, ...props };
|
|
10025
10048
|
const b = cn("checkboxgroup");
|
|
10026
10049
|
const {
|
|
10027
10050
|
className,
|
|
@@ -10121,16 +10144,16 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
10121
10144
|
checked: childChecked
|
|
10122
10145
|
});
|
|
10123
10146
|
});
|
|
10124
|
-
}, [innerValue, options2]);
|
|
10147
|
+
}, [innerValue, options2, innerDisabled]);
|
|
10125
10148
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
10126
10149
|
className: `${b()} ${className || ""}`,
|
|
10127
10150
|
...rest
|
|
10128
10151
|
}, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren());
|
|
10129
10152
|
}
|
|
10130
10153
|
);
|
|
10131
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
10154
|
+
CheckboxGroup.defaultProps = defaultProps$Z;
|
|
10132
10155
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
10133
|
-
const defaultProps$
|
|
10156
|
+
const defaultProps$Y = {
|
|
10134
10157
|
...ComponentDefaults,
|
|
10135
10158
|
checked: false,
|
|
10136
10159
|
disabled: false,
|
|
@@ -10146,7 +10169,7 @@ const defaultProps$Z = {
|
|
|
10146
10169
|
};
|
|
10147
10170
|
const Checkbox = (props) => {
|
|
10148
10171
|
const { children } = {
|
|
10149
|
-
...defaultProps$
|
|
10172
|
+
...defaultProps$Y,
|
|
10150
10173
|
...props
|
|
10151
10174
|
};
|
|
10152
10175
|
const b = cn("checkbox");
|
|
@@ -10188,7 +10211,7 @@ const Checkbox = (props) => {
|
|
|
10188
10211
|
return iconActiveName;
|
|
10189
10212
|
};
|
|
10190
10213
|
const renderIcon = () => {
|
|
10191
|
-
return /* @__PURE__ */ React__default.createElement(Icon
|
|
10214
|
+
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
10192
10215
|
classPrefix: iconClassPrefix,
|
|
10193
10216
|
fontClassName: iconFontClassName,
|
|
10194
10217
|
name: getIconName(),
|
|
@@ -10228,7 +10251,7 @@ const Checkbox = (props) => {
|
|
|
10228
10251
|
onClick: handleClick2
|
|
10229
10252
|
}, renderIcon(), renderLabel());
|
|
10230
10253
|
};
|
|
10231
|
-
Checkbox.defaultProps = defaultProps$
|
|
10254
|
+
Checkbox.defaultProps = defaultProps$Y;
|
|
10232
10255
|
Checkbox.displayName = "NutCheckBox";
|
|
10233
10256
|
Checkbox.Group = CheckboxGroup;
|
|
10234
10257
|
const MIN_DISTANCE = 10;
|
|
@@ -10717,7 +10740,7 @@ const InternalPicker = (props, ref) => {
|
|
|
10717
10740
|
};
|
|
10718
10741
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
10719
10742
|
const currentYear = new Date().getFullYear();
|
|
10720
|
-
const defaultProps$
|
|
10743
|
+
const defaultProps$X = {
|
|
10721
10744
|
modelValue: null,
|
|
10722
10745
|
visible: false,
|
|
10723
10746
|
title: "",
|
|
@@ -10748,7 +10771,7 @@ const DatePicker = (props) => {
|
|
|
10748
10771
|
style,
|
|
10749
10772
|
...rest
|
|
10750
10773
|
} = {
|
|
10751
|
-
...defaultProps$
|
|
10774
|
+
...defaultProps$X,
|
|
10752
10775
|
...props
|
|
10753
10776
|
};
|
|
10754
10777
|
const { locale } = useConfig();
|
|
@@ -11014,7 +11037,7 @@ const DatePicker = (props) => {
|
|
|
11014
11037
|
ref: pickerRef
|
|
11015
11038
|
}));
|
|
11016
11039
|
};
|
|
11017
|
-
DatePicker.defaultProps = defaultProps$
|
|
11040
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
11018
11041
|
DatePicker.displayName = "NutDatePicker";
|
|
11019
11042
|
const FormItemContext = createContext({});
|
|
11020
11043
|
function _extends() {
|
|
@@ -12086,14 +12109,6 @@ class FormStore {
|
|
|
12086
12109
|
...this.store,
|
|
12087
12110
|
...newStore
|
|
12088
12111
|
};
|
|
12089
|
-
this.fieldEntities.forEach((enetity) => {
|
|
12090
|
-
const { name } = enetity.props;
|
|
12091
|
-
Object.keys(newStore).forEach((key) => {
|
|
12092
|
-
if (key === name) {
|
|
12093
|
-
enetity.onStoreChange();
|
|
12094
|
-
}
|
|
12095
|
-
});
|
|
12096
|
-
});
|
|
12097
12112
|
};
|
|
12098
12113
|
this.validate = () => {
|
|
12099
12114
|
const err = [];
|
|
@@ -12117,7 +12132,6 @@ class FormStore {
|
|
|
12117
12132
|
err.push(...errors);
|
|
12118
12133
|
this.errList.push(...errors);
|
|
12119
12134
|
}
|
|
12120
|
-
entity.onStoreChange();
|
|
12121
12135
|
});
|
|
12122
12136
|
});
|
|
12123
12137
|
return err;
|
|
@@ -12171,7 +12185,7 @@ const useForm = (form) => {
|
|
|
12171
12185
|
}
|
|
12172
12186
|
return [formRef.current];
|
|
12173
12187
|
};
|
|
12174
|
-
const defaultProps$
|
|
12188
|
+
const defaultProps$W = {
|
|
12175
12189
|
...ComponentDefaults,
|
|
12176
12190
|
name: "",
|
|
12177
12191
|
label: "",
|
|
@@ -12181,15 +12195,21 @@ const defaultProps$X = {
|
|
|
12181
12195
|
labelWidth: 90,
|
|
12182
12196
|
errorMessageAlign: "left",
|
|
12183
12197
|
showErrorLine: true,
|
|
12184
|
-
showErrorMessage: true
|
|
12198
|
+
showErrorMessage: true,
|
|
12199
|
+
initialValue: ""
|
|
12185
12200
|
};
|
|
12186
12201
|
class FormItem extends React__default.Component {
|
|
12187
12202
|
constructor() {
|
|
12188
12203
|
super(...arguments);
|
|
12189
12204
|
this.getControlled = (children) => {
|
|
12205
|
+
var _a;
|
|
12190
12206
|
const { getFieldValue, setFieldsValue } = this.context;
|
|
12191
12207
|
const { name } = this.props;
|
|
12192
12208
|
const type4 = children.type.NAME;
|
|
12209
|
+
const defaultvalue = this.props.initialValue || ((_a = children.props) == null ? void 0 : _a.defaultValue);
|
|
12210
|
+
if (defaultvalue) {
|
|
12211
|
+
setFieldsValue({ [name]: defaultvalue });
|
|
12212
|
+
}
|
|
12193
12213
|
return {
|
|
12194
12214
|
value: getFieldValue(name),
|
|
12195
12215
|
onChange: (event) => {
|
|
@@ -12208,7 +12228,6 @@ class FormItem extends React__default.Component {
|
|
|
12208
12228
|
};
|
|
12209
12229
|
};
|
|
12210
12230
|
this.onStoreChange = () => {
|
|
12211
|
-
this.forceUpdate();
|
|
12212
12231
|
};
|
|
12213
12232
|
this.renderLayout = (childNode) => {
|
|
12214
12233
|
var _a, _b;
|
|
@@ -12222,7 +12241,7 @@ class FormItem extends React__default.Component {
|
|
|
12222
12241
|
showErrorLine,
|
|
12223
12242
|
showErrorMessage
|
|
12224
12243
|
} = {
|
|
12225
|
-
...defaultProps$
|
|
12244
|
+
...defaultProps$W,
|
|
12226
12245
|
...this.props
|
|
12227
12246
|
};
|
|
12228
12247
|
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -12262,18 +12281,24 @@ class FormItem extends React__default.Component {
|
|
|
12262
12281
|
}
|
|
12263
12282
|
}
|
|
12264
12283
|
render() {
|
|
12265
|
-
const { children } = this.props;
|
|
12284
|
+
const { children, initialValue } = this.props;
|
|
12266
12285
|
const c = Array.isArray(children) ? children[0] : children;
|
|
12286
|
+
let restCNode = c;
|
|
12287
|
+
if (initialValue) {
|
|
12288
|
+
restCNode = React__default.cloneElement(c, {
|
|
12289
|
+
defaultValue: initialValue
|
|
12290
|
+
});
|
|
12291
|
+
}
|
|
12267
12292
|
const returnChildNode = React__default.cloneElement(
|
|
12268
|
-
|
|
12293
|
+
restCNode,
|
|
12269
12294
|
this.getControlled(c)
|
|
12270
12295
|
);
|
|
12271
12296
|
return this.renderLayout(returnChildNode);
|
|
12272
12297
|
}
|
|
12273
12298
|
}
|
|
12274
|
-
FormItem.defaultProps = defaultProps$
|
|
12299
|
+
FormItem.defaultProps = defaultProps$W;
|
|
12275
12300
|
FormItem.contextType = FormItemContext;
|
|
12276
|
-
const defaultProps$
|
|
12301
|
+
const defaultProps$V = {
|
|
12277
12302
|
...ComponentDefaults,
|
|
12278
12303
|
className: "",
|
|
12279
12304
|
style: void 0,
|
|
@@ -12300,7 +12325,7 @@ const Form = (props) => {
|
|
|
12300
12325
|
starPositon,
|
|
12301
12326
|
...rest
|
|
12302
12327
|
} = {
|
|
12303
|
-
...defaultProps$
|
|
12328
|
+
...defaultProps$V,
|
|
12304
12329
|
...props
|
|
12305
12330
|
};
|
|
12306
12331
|
const [formInstance] = useForm();
|
|
@@ -12321,7 +12346,7 @@ const Form = (props) => {
|
|
|
12321
12346
|
value: formInstance
|
|
12322
12347
|
}, children)));
|
|
12323
12348
|
};
|
|
12324
|
-
Form.defaultProps = defaultProps$
|
|
12349
|
+
Form.defaultProps = defaultProps$V;
|
|
12325
12350
|
Form.displayName = "NutForm";
|
|
12326
12351
|
Form.Item = FormItem;
|
|
12327
12352
|
function trimExtraChar(value, char, regExp) {
|
|
@@ -12348,7 +12373,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
12348
12373
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
12349
12374
|
return value.replace(regExp, "");
|
|
12350
12375
|
}
|
|
12351
|
-
const defaultProps$
|
|
12376
|
+
const defaultProps$U = {
|
|
12352
12377
|
...ComponentDefaults,
|
|
12353
12378
|
type: "text",
|
|
12354
12379
|
name: "",
|
|
@@ -12437,7 +12462,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
12437
12462
|
iconFontClassName,
|
|
12438
12463
|
...rest
|
|
12439
12464
|
} = {
|
|
12440
|
-
...defaultProps$
|
|
12465
|
+
...defaultProps$U,
|
|
12441
12466
|
...props
|
|
12442
12467
|
};
|
|
12443
12468
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -12568,7 +12593,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
12568
12593
|
onClick: (e2) => {
|
|
12569
12594
|
handleClickLeftIcon(e2);
|
|
12570
12595
|
}
|
|
12571
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
12596
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12572
12597
|
classPrefix: iconClassPrefix,
|
|
12573
12598
|
fontClassName: iconFontClassName,
|
|
12574
12599
|
name: leftIcon,
|
|
@@ -12631,7 +12656,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
12631
12656
|
onInput: (e2) => {
|
|
12632
12657
|
handleInput(e2);
|
|
12633
12658
|
}
|
|
12634
|
-
}), clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ React__default.createElement(Icon
|
|
12659
|
+
}), clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12635
12660
|
classPrefix: iconClassPrefix,
|
|
12636
12661
|
fontClassName: iconFontClassName,
|
|
12637
12662
|
className: "nut-input-clear",
|
|
@@ -12645,7 +12670,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
12645
12670
|
onClick: (e2) => {
|
|
12646
12671
|
handleClickRightIcon(e2);
|
|
12647
12672
|
}
|
|
12648
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
12673
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12649
12674
|
classPrefix: iconClassPrefix,
|
|
12650
12675
|
fontClassName: iconFontClassName,
|
|
12651
12676
|
name: rightIcon,
|
|
@@ -12663,9 +12688,9 @@ const Input = forwardRef((props, ref) => {
|
|
|
12663
12688
|
}
|
|
12664
12689
|
}, errorMessage) : null)));
|
|
12665
12690
|
});
|
|
12666
|
-
Input.defaultProps = defaultProps$
|
|
12691
|
+
Input.defaultProps = defaultProps$U;
|
|
12667
12692
|
Input.displayName = "NutInput";
|
|
12668
|
-
const defaultProps$
|
|
12693
|
+
const defaultProps$T = {
|
|
12669
12694
|
...ComponentDefaults,
|
|
12670
12695
|
disabled: false,
|
|
12671
12696
|
buttonSize: "",
|
|
@@ -12678,7 +12703,7 @@ const defaultProps$U = {
|
|
|
12678
12703
|
decimalPlaces: 0,
|
|
12679
12704
|
isAsync: false
|
|
12680
12705
|
};
|
|
12681
|
-
function pxCheck
|
|
12706
|
+
function pxCheck(value) {
|
|
12682
12707
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
12683
12708
|
}
|
|
12684
12709
|
const InputNumber = (props) => {
|
|
@@ -12712,7 +12737,7 @@ const InputNumber = (props) => {
|
|
|
12712
12737
|
iconFontClassName,
|
|
12713
12738
|
...restProps
|
|
12714
12739
|
} = {
|
|
12715
|
-
...defaultProps$
|
|
12740
|
+
...defaultProps$T,
|
|
12716
12741
|
...props
|
|
12717
12742
|
};
|
|
12718
12743
|
const [inputValue, setInputValue] = useState(modelValue);
|
|
@@ -12728,7 +12753,7 @@ const InputNumber = (props) => {
|
|
|
12728
12753
|
b("")
|
|
12729
12754
|
);
|
|
12730
12755
|
const styles = {
|
|
12731
|
-
height: pxCheck
|
|
12756
|
+
height: pxCheck(buttonSize),
|
|
12732
12757
|
...style
|
|
12733
12758
|
};
|
|
12734
12759
|
const addAllow = (value = inputValue) => {
|
|
@@ -12830,7 +12855,7 @@ const InputNumber = (props) => {
|
|
|
12830
12855
|
className: classes,
|
|
12831
12856
|
style: styles,
|
|
12832
12857
|
...restProps
|
|
12833
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
12858
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12834
12859
|
classPrefix: iconClassPrefix,
|
|
12835
12860
|
fontClassName: iconFontClassName,
|
|
12836
12861
|
className: iconMinusClasses,
|
|
@@ -12841,14 +12866,14 @@ const InputNumber = (props) => {
|
|
|
12841
12866
|
type: "number",
|
|
12842
12867
|
min,
|
|
12843
12868
|
max,
|
|
12844
|
-
style: { width: pxCheck
|
|
12869
|
+
style: { width: pxCheck(inputWidth) },
|
|
12845
12870
|
disabled,
|
|
12846
12871
|
readOnly: readonly,
|
|
12847
12872
|
value: inputValue,
|
|
12848
12873
|
onInput: changeValue,
|
|
12849
12874
|
onBlur: burValue,
|
|
12850
12875
|
onFocus: focusValue
|
|
12851
|
-
}), /* @__PURE__ */ React__default.createElement(Icon
|
|
12876
|
+
}), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12852
12877
|
classPrefix: iconClassPrefix,
|
|
12853
12878
|
fontClassName: iconFontClassName,
|
|
12854
12879
|
className: iconAddClasses,
|
|
@@ -12857,12 +12882,13 @@ const InputNumber = (props) => {
|
|
|
12857
12882
|
onClick: addNumber
|
|
12858
12883
|
}));
|
|
12859
12884
|
};
|
|
12860
|
-
InputNumber.defaultProps = defaultProps$
|
|
12885
|
+
InputNumber.defaultProps = defaultProps$T;
|
|
12861
12886
|
InputNumber.displayName = "NutInputNumber";
|
|
12862
|
-
const defaultProps$
|
|
12887
|
+
const defaultProps$S = {
|
|
12863
12888
|
confirmText: "",
|
|
12864
12889
|
title: "",
|
|
12865
12890
|
visible: false,
|
|
12891
|
+
overlay: true,
|
|
12866
12892
|
type: "default",
|
|
12867
12893
|
customKey: [],
|
|
12868
12894
|
className: "",
|
|
@@ -12877,6 +12903,7 @@ const NumberKeyboard = (props) => {
|
|
|
12877
12903
|
title,
|
|
12878
12904
|
confirmText,
|
|
12879
12905
|
visible,
|
|
12906
|
+
overlay,
|
|
12880
12907
|
type: type4,
|
|
12881
12908
|
customKey,
|
|
12882
12909
|
randomKeys,
|
|
@@ -12991,6 +13018,7 @@ const NumberKeyboard = (props) => {
|
|
|
12991
13018
|
position: "bottom",
|
|
12992
13019
|
popClass,
|
|
12993
13020
|
onClickOverlay: onClose,
|
|
13021
|
+
overlay,
|
|
12994
13022
|
onClickCloseIcon: onClose,
|
|
12995
13023
|
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
12996
13024
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -13057,14 +13085,14 @@ const NumberKeyboard = (props) => {
|
|
|
13057
13085
|
})
|
|
13058
13086
|
}, confirmText || locale.done))) : null))));
|
|
13059
13087
|
};
|
|
13060
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
13088
|
+
NumberKeyboard.defaultProps = defaultProps$S;
|
|
13061
13089
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
13062
13090
|
const radioContext = {
|
|
13063
13091
|
onChange: (val) => {
|
|
13064
13092
|
}
|
|
13065
13093
|
};
|
|
13066
13094
|
var RadioContext = React__default.createContext(radioContext);
|
|
13067
|
-
const defaultProps$
|
|
13095
|
+
const defaultProps$R = {
|
|
13068
13096
|
value: null,
|
|
13069
13097
|
textPosition: "right",
|
|
13070
13098
|
onChange: (value) => {
|
|
@@ -13074,7 +13102,7 @@ const defaultProps$S = {
|
|
|
13074
13102
|
};
|
|
13075
13103
|
const RadioGroup = React__default.forwardRef(
|
|
13076
13104
|
(props, ref) => {
|
|
13077
|
-
const { children } = { ...defaultProps$
|
|
13105
|
+
const { children } = { ...defaultProps$R, ...props };
|
|
13078
13106
|
cn("RadioGroup");
|
|
13079
13107
|
const {
|
|
13080
13108
|
className,
|
|
@@ -13139,9 +13167,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
13139
13167
|
}, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren()));
|
|
13140
13168
|
}
|
|
13141
13169
|
);
|
|
13142
|
-
RadioGroup.defaultProps = defaultProps$
|
|
13170
|
+
RadioGroup.defaultProps = defaultProps$R;
|
|
13143
13171
|
RadioGroup.displayName = "NutRadioGroup";
|
|
13144
|
-
const defaultProps$
|
|
13172
|
+
const defaultProps$Q = {
|
|
13145
13173
|
...ComponentDefaults,
|
|
13146
13174
|
className: "",
|
|
13147
13175
|
style: {},
|
|
@@ -13158,7 +13186,7 @@ const defaultProps$R = {
|
|
|
13158
13186
|
};
|
|
13159
13187
|
const Radio = (props) => {
|
|
13160
13188
|
const { children } = {
|
|
13161
|
-
...defaultProps$
|
|
13189
|
+
...defaultProps$Q,
|
|
13162
13190
|
...props
|
|
13163
13191
|
};
|
|
13164
13192
|
const {
|
|
@@ -13193,7 +13221,7 @@ const Radio = (props) => {
|
|
|
13193
13221
|
};
|
|
13194
13222
|
const renderButton = () => {
|
|
13195
13223
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13196
|
-
className: `${componentName}__button ${checkedStatement && `${componentName}__button--active`} ${disabledStatement ? `${componentName}__button--disabled` : ""}`
|
|
13224
|
+
className: `${componentName}__button ${!disabledStatement && checkedStatement && `${componentName}__button--active`} ${disabledStatement ? `${componentName}__button--disabled` : ""}`
|
|
13197
13225
|
}, children);
|
|
13198
13226
|
};
|
|
13199
13227
|
const color = () => {
|
|
@@ -13207,14 +13235,15 @@ const Radio = (props) => {
|
|
|
13207
13235
|
};
|
|
13208
13236
|
const renderIcon = () => {
|
|
13209
13237
|
const { iconName: iconName2, iconSize: iconSize2, iconActiveName: iconActiveName2 } = props;
|
|
13210
|
-
return /* @__PURE__ */ React__default.createElement(Icon
|
|
13238
|
+
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13211
13239
|
classPrefix: iconClassPrefix,
|
|
13212
13240
|
fontClassName: iconFontClassName,
|
|
13213
|
-
name: checkedStatement ? iconActiveName2 : iconName2,
|
|
13241
|
+
name: !disabledStatement && checkedStatement ? iconActiveName2 : iconName2,
|
|
13214
13242
|
size: iconSize2,
|
|
13215
13243
|
className: color()
|
|
13216
13244
|
});
|
|
13217
13245
|
};
|
|
13246
|
+
const reverseState = textPosition === "left";
|
|
13218
13247
|
const renderRadioItem = () => {
|
|
13219
13248
|
if (shape === "button") {
|
|
13220
13249
|
return renderButton();
|
|
@@ -13231,14 +13260,13 @@ const Radio = (props) => {
|
|
|
13231
13260
|
onChange && onChange(e2);
|
|
13232
13261
|
context && context.onChange(valueStatement);
|
|
13233
13262
|
};
|
|
13234
|
-
const reverseState = textPosition === "left";
|
|
13235
13263
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13236
|
-
className: `nut-radio ${className}`,
|
|
13264
|
+
className: `nut-radio ${className} ${reverseState ? `${componentName}--reverse` : ""}`,
|
|
13237
13265
|
onClick: handleClick2,
|
|
13238
13266
|
...rest
|
|
13239
13267
|
}, renderRadioItem());
|
|
13240
13268
|
};
|
|
13241
|
-
Radio.defaultProps = defaultProps$
|
|
13269
|
+
Radio.defaultProps = defaultProps$Q;
|
|
13242
13270
|
Radio.displayName = "NutRadio";
|
|
13243
13271
|
Radio.RadioGroup = RadioGroup;
|
|
13244
13272
|
const fullClone = {
|
|
@@ -13378,7 +13406,7 @@ class Notification$1 extends React.PureComponent {
|
|
|
13378
13406
|
}
|
|
13379
13407
|
}, icon ? /* @__PURE__ */ React.createElement("p", {
|
|
13380
13408
|
className: toastBem("icon-wrapper")
|
|
13381
|
-
}, /* @__PURE__ */ React.createElement(Icon
|
|
13409
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
13382
13410
|
name: icon || "",
|
|
13383
13411
|
color: "#ffffff",
|
|
13384
13412
|
size: iconSize
|
|
@@ -13495,7 +13523,7 @@ var Toast = {
|
|
|
13495
13523
|
}
|
|
13496
13524
|
}
|
|
13497
13525
|
};
|
|
13498
|
-
const defaultProps$
|
|
13526
|
+
const defaultProps$P = {
|
|
13499
13527
|
range: false,
|
|
13500
13528
|
hiddenRange: false,
|
|
13501
13529
|
hiddenTag: false,
|
|
@@ -13531,8 +13559,8 @@ const Range = (props) => {
|
|
|
13531
13559
|
minDesc,
|
|
13532
13560
|
maxDesc,
|
|
13533
13561
|
curValueDesc
|
|
13534
|
-
} = { ...defaultProps$
|
|
13535
|
-
let { min, max, step } = { ...defaultProps$
|
|
13562
|
+
} = { ...defaultProps$P, ...props };
|
|
13563
|
+
let { min, max, step } = { ...defaultProps$P, ...props };
|
|
13536
13564
|
min = Number(min);
|
|
13537
13565
|
max = Number(max);
|
|
13538
13566
|
step = Number(step);
|
|
@@ -13869,9 +13897,9 @@ const Range = (props) => {
|
|
|
13869
13897
|
className: "max"
|
|
13870
13898
|
}, maxDesc || +max) : null);
|
|
13871
13899
|
};
|
|
13872
|
-
Range.defaultProps = defaultProps$
|
|
13900
|
+
Range.defaultProps = defaultProps$P;
|
|
13873
13901
|
Range.displayName = "NutRange";
|
|
13874
|
-
const defaultProps$
|
|
13902
|
+
const defaultProps$O = {
|
|
13875
13903
|
...ComponentDefaults,
|
|
13876
13904
|
count: 5,
|
|
13877
13905
|
modelValue: 0,
|
|
@@ -13906,7 +13934,7 @@ const Rate = (props) => {
|
|
|
13906
13934
|
iconClassPrefix,
|
|
13907
13935
|
iconFontClassName
|
|
13908
13936
|
} = {
|
|
13909
|
-
...defaultProps$
|
|
13937
|
+
...defaultProps$O,
|
|
13910
13938
|
...props
|
|
13911
13939
|
};
|
|
13912
13940
|
const b = cn("rate");
|
|
@@ -13953,21 +13981,21 @@ const Rate = (props) => {
|
|
|
13953
13981
|
key: n,
|
|
13954
13982
|
onClick: (event) => onClick(event, n),
|
|
13955
13983
|
style: { marginRight: pxCheck2(spacing) }
|
|
13956
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
13984
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13957
13985
|
classPrefix: iconClassPrefix,
|
|
13958
13986
|
fontClassName: iconFontClassName,
|
|
13959
13987
|
size: iconSize,
|
|
13960
13988
|
className: `${bi("icon")} ${disabled || n > score ? bi("icon--disabled") : ""}`,
|
|
13961
13989
|
name: n <= score ? checkedIcon : uncheckedIcon,
|
|
13962
13990
|
color: n <= score ? activeColor : voidColor
|
|
13963
|
-
}), allowHalf && score > n - 1 && /* @__PURE__ */ React__default.createElement(Icon
|
|
13991
|
+
}), allowHalf && score > n - 1 && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13964
13992
|
classPrefix: iconClassPrefix,
|
|
13965
13993
|
fontClassName: iconFontClassName,
|
|
13966
13994
|
className: `${bi("icon")} ${bi("icon--half")}`,
|
|
13967
13995
|
color: n <= score ? activeColor : voidColor,
|
|
13968
13996
|
size: iconSize,
|
|
13969
13997
|
name: checkedIcon
|
|
13970
|
-
}), allowHalf && score < n - 1 && /* @__PURE__ */ React__default.createElement(Icon
|
|
13998
|
+
}), allowHalf && score < n - 1 && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13971
13999
|
classPrefix: iconClassPrefix,
|
|
13972
14000
|
fontClassName: iconFontClassName,
|
|
13973
14001
|
className: `${bi("icon")} ${bi("icon--disabled")} ${bi(
|
|
@@ -13979,20 +14007,21 @@ const Rate = (props) => {
|
|
|
13979
14007
|
}));
|
|
13980
14008
|
}));
|
|
13981
14009
|
};
|
|
13982
|
-
Rate.defaultProps = defaultProps$
|
|
14010
|
+
Rate.defaultProps = defaultProps$O;
|
|
13983
14011
|
Rate.displayName = "NutRate";
|
|
13984
|
-
const defaultProps$
|
|
14012
|
+
const defaultProps$N = {
|
|
13985
14013
|
...ComponentDefaults,
|
|
13986
14014
|
placeholder: "",
|
|
13987
14015
|
shape: "square",
|
|
13988
14016
|
disabled: false,
|
|
13989
14017
|
maxLength: 9999,
|
|
13990
14018
|
clearable: true,
|
|
14019
|
+
clearIconSize: "12px",
|
|
13991
14020
|
align: "left",
|
|
13992
14021
|
readonly: true,
|
|
13993
14022
|
autoFocus: false,
|
|
13994
14023
|
label: "",
|
|
13995
|
-
leftinIcon: /* @__PURE__ */ React__default.createElement(Icon
|
|
14024
|
+
leftinIcon: /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13996
14025
|
name: "search",
|
|
13997
14026
|
size: "12"
|
|
13998
14027
|
})
|
|
@@ -14009,6 +14038,7 @@ const SearchBar = (props) => {
|
|
|
14009
14038
|
disabled,
|
|
14010
14039
|
maxLength,
|
|
14011
14040
|
clearable,
|
|
14041
|
+
clearIconSize,
|
|
14012
14042
|
align,
|
|
14013
14043
|
readOnly,
|
|
14014
14044
|
autoFocus,
|
|
@@ -14032,7 +14062,7 @@ const SearchBar = (props) => {
|
|
|
14032
14062
|
iconClassPrefix,
|
|
14033
14063
|
iconFontClassName
|
|
14034
14064
|
} = {
|
|
14035
|
-
...defaultProps$
|
|
14065
|
+
...defaultProps$N,
|
|
14036
14066
|
...props
|
|
14037
14067
|
};
|
|
14038
14068
|
const alignClass = `${align}`;
|
|
@@ -14130,11 +14160,11 @@ const SearchBar = (props) => {
|
|
|
14130
14160
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
14131
14161
|
className: `${searchbarBem("clear")} ${rightinIcon ? "pos-right" : ""}`,
|
|
14132
14162
|
onClick: (e2) => clearaVal(e2)
|
|
14133
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
14163
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14134
14164
|
classPrefix: iconClassPrefix,
|
|
14135
14165
|
fontClassName: iconFontClassName,
|
|
14136
14166
|
name: "circle-close",
|
|
14137
|
-
size:
|
|
14167
|
+
size: clearIconSize,
|
|
14138
14168
|
color: "#555"
|
|
14139
14169
|
}));
|
|
14140
14170
|
};
|
|
@@ -14182,9 +14212,9 @@ const SearchBar = (props) => {
|
|
|
14182
14212
|
style: { background: props.inputBackground }
|
|
14183
14213
|
}, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
14184
14214
|
};
|
|
14185
|
-
SearchBar.defaultProps = defaultProps$
|
|
14215
|
+
SearchBar.defaultProps = defaultProps$N;
|
|
14186
14216
|
SearchBar.displayName = "NutSearchBar";
|
|
14187
|
-
const defaultProps$
|
|
14217
|
+
const defaultProps$M = {
|
|
14188
14218
|
...ComponentDefaults,
|
|
14189
14219
|
title: "",
|
|
14190
14220
|
desc: "",
|
|
@@ -14334,7 +14364,7 @@ const ShortPassword = (props) => {
|
|
|
14334
14364
|
className: b("message__error")
|
|
14335
14365
|
}, errorMsg2), tips || locale.shortpassword.tips ? /* @__PURE__ */ React__default.createElement("div", {
|
|
14336
14366
|
className: b("message__forget")
|
|
14337
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
14367
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14338
14368
|
classPrefix: iconClassPrefix,
|
|
14339
14369
|
fontClassName: iconFontClassName,
|
|
14340
14370
|
className: "icon",
|
|
@@ -14352,9 +14382,9 @@ const ShortPassword = (props) => {
|
|
|
14352
14382
|
onClick: () => sure()
|
|
14353
14383
|
}, locale.confirm)) : null)));
|
|
14354
14384
|
};
|
|
14355
|
-
ShortPassword.defaultProps = defaultProps$
|
|
14385
|
+
ShortPassword.defaultProps = defaultProps$M;
|
|
14356
14386
|
ShortPassword.displayName = "NutShortPassword";
|
|
14357
|
-
const defaultProps$
|
|
14387
|
+
const defaultProps$L = {
|
|
14358
14388
|
defaultValue: "",
|
|
14359
14389
|
textAlign: "left",
|
|
14360
14390
|
limitshow: false,
|
|
@@ -14382,7 +14412,7 @@ const TextArea = (props) => {
|
|
|
14382
14412
|
onChange,
|
|
14383
14413
|
onBlur,
|
|
14384
14414
|
onFocus
|
|
14385
|
-
} = { ...defaultProps$
|
|
14415
|
+
} = { ...defaultProps$L, ...props };
|
|
14386
14416
|
const textareaBem = cn("textarea");
|
|
14387
14417
|
const [inputValue, SetInputValue] = useState("");
|
|
14388
14418
|
const textareaRef = useRef(null);
|
|
@@ -14479,81 +14509,8 @@ const TextArea = (props) => {
|
|
|
14479
14509
|
className: textareaBem("limit")
|
|
14480
14510
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
14481
14511
|
};
|
|
14482
|
-
TextArea.defaultProps = defaultProps$
|
|
14512
|
+
TextArea.defaultProps = defaultProps$L;
|
|
14483
14513
|
TextArea.displayName = "NutTextArea";
|
|
14484
|
-
const defaultProps$L = {
|
|
14485
|
-
name: "",
|
|
14486
|
-
size: "",
|
|
14487
|
-
classPrefix: "nut-icon",
|
|
14488
|
-
fontClassName: "nutui-iconfont",
|
|
14489
|
-
color: "",
|
|
14490
|
-
tag: "i",
|
|
14491
|
-
onClick: (e2) => {
|
|
14492
|
-
},
|
|
14493
|
-
className: ""
|
|
14494
|
-
};
|
|
14495
|
-
function pxCheck(value) {
|
|
14496
|
-
if (value === "") {
|
|
14497
|
-
return value;
|
|
14498
|
-
}
|
|
14499
|
-
if (Number.isNaN(Number(value))) {
|
|
14500
|
-
return String(value);
|
|
14501
|
-
}
|
|
14502
|
-
return `${value}px`;
|
|
14503
|
-
}
|
|
14504
|
-
function Icon(props) {
|
|
14505
|
-
const {
|
|
14506
|
-
name,
|
|
14507
|
-
size,
|
|
14508
|
-
classPrefix,
|
|
14509
|
-
color,
|
|
14510
|
-
tag,
|
|
14511
|
-
children,
|
|
14512
|
-
className,
|
|
14513
|
-
fontClassName,
|
|
14514
|
-
style,
|
|
14515
|
-
onClick,
|
|
14516
|
-
...rest
|
|
14517
|
-
} = {
|
|
14518
|
-
...defaultProps$L,
|
|
14519
|
-
...props
|
|
14520
|
-
};
|
|
14521
|
-
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
14522
|
-
const type4 = isImage ? "img" : tag;
|
|
14523
|
-
const b = cn("icon");
|
|
14524
|
-
const handleClick2 = (e2) => {
|
|
14525
|
-
if (onClick) {
|
|
14526
|
-
onClick(e2);
|
|
14527
|
-
}
|
|
14528
|
-
};
|
|
14529
|
-
const hasSrc = () => {
|
|
14530
|
-
if (isImage)
|
|
14531
|
-
return { src: name };
|
|
14532
|
-
return {};
|
|
14533
|
-
};
|
|
14534
|
-
const styles = {};
|
|
14535
|
-
const checkedSize = pxCheck(size);
|
|
14536
|
-
if (checkedSize) {
|
|
14537
|
-
styles.width = styles.height = styles.fontSize = checkedSize;
|
|
14538
|
-
}
|
|
14539
|
-
return React__default.createElement(
|
|
14540
|
-
type4,
|
|
14541
|
-
{
|
|
14542
|
-
className: isImage ? `${b("img")} ${className || ""} ` : `${fontClassName} ${b(null)} ${classPrefix}-${name} ${className || ""}`,
|
|
14543
|
-
style: {
|
|
14544
|
-
color,
|
|
14545
|
-
...styles,
|
|
14546
|
-
...style
|
|
14547
|
-
},
|
|
14548
|
-
...rest,
|
|
14549
|
-
onClick: handleClick2,
|
|
14550
|
-
...hasSrc()
|
|
14551
|
-
},
|
|
14552
|
-
children
|
|
14553
|
-
);
|
|
14554
|
-
}
|
|
14555
|
-
Icon.defaultProps = defaultProps$L;
|
|
14556
|
-
Icon.displayName = "NutIcon";
|
|
14557
14514
|
const defaultProps$K = {
|
|
14558
14515
|
...ComponentDefaults,
|
|
14559
14516
|
className: "",
|
|
@@ -14573,7 +14530,6 @@ const defaultProps$K = {
|
|
|
14573
14530
|
iconName: "checked",
|
|
14574
14531
|
iconColor: "#439422",
|
|
14575
14532
|
iconSize: "16px",
|
|
14576
|
-
rounded: true,
|
|
14577
14533
|
children: void 0
|
|
14578
14534
|
};
|
|
14579
14535
|
const Progress = (props) => {
|
|
@@ -14596,7 +14552,6 @@ const Progress = (props) => {
|
|
|
14596
14552
|
iconName,
|
|
14597
14553
|
iconColor,
|
|
14598
14554
|
iconSize,
|
|
14599
|
-
rounded,
|
|
14600
14555
|
children,
|
|
14601
14556
|
iconClassPrefix,
|
|
14602
14557
|
iconFontClassName,
|
|
@@ -14627,12 +14582,10 @@ const Progress = (props) => {
|
|
|
14627
14582
|
});
|
|
14628
14583
|
const stylesOuter = {
|
|
14629
14584
|
height: `${strokeWidth}px`,
|
|
14630
|
-
borderRadius: `${rounded ? rounded === true ? "12px" : rounded : 0}`,
|
|
14631
14585
|
background: `${fillColor}`
|
|
14632
14586
|
};
|
|
14633
14587
|
const stylesInner = {
|
|
14634
14588
|
width: `${percentage}%`,
|
|
14635
|
-
borderRadius: `${rounded ? rounded === true ? "12px" : rounded : 0}`,
|
|
14636
14589
|
background: `${strokeColor}`
|
|
14637
14590
|
};
|
|
14638
14591
|
const stylesInsideText = {
|
|
@@ -14665,13 +14618,13 @@ const Progress = (props) => {
|
|
|
14665
14618
|
style: stylesInsideText
|
|
14666
14619
|
}, /* @__PURE__ */ React__default.createElement("span", {
|
|
14667
14620
|
className: classesTextInner,
|
|
14668
|
-
style: { color: textColor
|
|
14621
|
+
style: { color: textColor }
|
|
14669
14622
|
}, percentage, isShowPercentage ? "%" : ""))))), showText && !textInside && /* @__PURE__ */ React__default.createElement("div", {
|
|
14670
14623
|
className: classesText,
|
|
14671
14624
|
style: stylesText
|
|
14672
14625
|
}, textType === "text" && /* @__PURE__ */ React__default.createElement("span", {
|
|
14673
14626
|
className: classesTextInner,
|
|
14674
|
-
style: { color: textColor
|
|
14627
|
+
style: { color: textColor }
|
|
14675
14628
|
}, percentage, isShowPercentage ? "%" : ""), textType === "icon" && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14676
14629
|
classPrefix: iconClassPrefix,
|
|
14677
14630
|
fontClassName: iconFontClassName,
|
|
@@ -15093,14 +15046,14 @@ const InternalUploader = (props, ref) => {
|
|
|
15093
15046
|
className: "nut-uploader__preview__progress__msg"
|
|
15094
15047
|
}, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", {
|
|
15095
15048
|
className: "nut-uploader__preview__progress"
|
|
15096
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
15049
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15097
15050
|
classPrefix: iconClassPrefix,
|
|
15098
15051
|
fontClassName: iconFontClassName,
|
|
15099
15052
|
color: "#fff",
|
|
15100
15053
|
name: `${item.status === "error" ? "failure" : "loading"}`
|
|
15101
15054
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
15102
15055
|
className: "nut-uploader__preview__progress__msg"
|
|
15103
|
-
}, item.message)), isDeletable && /* @__PURE__ */ React__default.createElement(Icon
|
|
15056
|
+
}, item.message)), isDeletable && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15104
15057
|
classPrefix: iconClassPrefix,
|
|
15105
15058
|
fontClassName: iconFontClassName,
|
|
15106
15059
|
color: "rgba(0,0,0,0.6)",
|
|
@@ -15122,7 +15075,7 @@ const InternalUploader = (props, ref) => {
|
|
|
15122
15075
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15123
15076
|
onClick: () => handleItemClick(item),
|
|
15124
15077
|
className: "nut-uploader__preview-img__file__name"
|
|
15125
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
15078
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15126
15079
|
classPrefix: iconClassPrefix,
|
|
15127
15080
|
fontClassName: iconFontClassName,
|
|
15128
15081
|
color: "#808080",
|
|
@@ -15134,11 +15087,11 @@ const InternalUploader = (props, ref) => {
|
|
|
15134
15087
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15135
15088
|
className: `nut-uploader__preview-img__file__name ${item.status}`,
|
|
15136
15089
|
onClick: () => handleItemClick(item)
|
|
15137
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
15090
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15138
15091
|
classPrefix: iconClassPrefix,
|
|
15139
15092
|
fontClassName: iconFontClassName,
|
|
15140
15093
|
name: "link"
|
|
15141
|
-
}), "\xA0", item.name), isDeletable && /* @__PURE__ */ React__default.createElement(Icon
|
|
15094
|
+
}), "\xA0", item.name), isDeletable && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15142
15095
|
classPrefix: iconClassPrefix,
|
|
15143
15096
|
fontClassName: iconFontClassName,
|
|
15144
15097
|
color: "#808080",
|
|
@@ -15153,7 +15106,7 @@ const InternalUploader = (props, ref) => {
|
|
|
15153
15106
|
})));
|
|
15154
15107
|
}), maximum > fileList.length && listType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
|
|
15155
15108
|
className: `nut-uploader__upload ${listType}`
|
|
15156
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
15109
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15157
15110
|
classPrefix: iconClassPrefix,
|
|
15158
15111
|
fontClassName: iconFontClassName,
|
|
15159
15112
|
size: uploadIconSize,
|
|
@@ -15373,7 +15326,7 @@ const BackTop = (props) => {
|
|
|
15373
15326
|
onClick: (e2) => {
|
|
15374
15327
|
goTop(e2);
|
|
15375
15328
|
}
|
|
15376
|
-
}, children || /* @__PURE__ */ React__default.createElement(Icon
|
|
15329
|
+
}, children || /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15377
15330
|
classPrefix: iconClassPrefix,
|
|
15378
15331
|
fontClassName: iconFontClassName,
|
|
15379
15332
|
size: "19px",
|
|
@@ -15923,7 +15876,7 @@ const Infiniteloading = (props) => {
|
|
|
15923
15876
|
style: getStyle()
|
|
15924
15877
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15925
15878
|
className: "top-box"
|
|
15926
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
15879
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15927
15880
|
classPrefix: iconClassPrefix,
|
|
15928
15881
|
fontClassName: iconFontClassName,
|
|
15929
15882
|
className: "top-img",
|
|
@@ -15936,7 +15889,7 @@ const Infiniteloading = (props) => {
|
|
|
15936
15889
|
className: "nut-infinite-bottom"
|
|
15937
15890
|
}, isInfiniting ? /* @__PURE__ */ React__default.createElement("div", {
|
|
15938
15891
|
className: "bottom-box"
|
|
15939
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
15892
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15940
15893
|
classPrefix: iconClassPrefix,
|
|
15941
15894
|
fontClassName: iconFontClassName,
|
|
15942
15895
|
className: "bottom-img",
|
|
@@ -16068,7 +16021,6 @@ const options = {
|
|
|
16068
16021
|
type: "danger",
|
|
16069
16022
|
className: "",
|
|
16070
16023
|
position: "top",
|
|
16071
|
-
isWrapTeleport: true,
|
|
16072
16024
|
onClosed: () => {
|
|
16073
16025
|
},
|
|
16074
16026
|
onClick: () => {
|
|
@@ -16361,6 +16313,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
16361
16313
|
if (!props.disabled) {
|
|
16362
16314
|
startOffset.current = state.offset;
|
|
16363
16315
|
touch.start(event);
|
|
16316
|
+
props.onTouchStart && props.onTouchStart(event);
|
|
16364
16317
|
}
|
|
16365
16318
|
};
|
|
16366
16319
|
const onTouchMove = (event) => {
|
|
@@ -16368,6 +16321,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
16368
16321
|
return;
|
|
16369
16322
|
}
|
|
16370
16323
|
touch.move(event);
|
|
16324
|
+
props.onTouchMove && props.onTouchMove(event);
|
|
16371
16325
|
if (touch.isHorizontal()) {
|
|
16372
16326
|
lockClick.current = true;
|
|
16373
16327
|
const newState = { ...state, dragging: true };
|
|
@@ -16383,13 +16337,14 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
16383
16337
|
setState(newState);
|
|
16384
16338
|
}
|
|
16385
16339
|
};
|
|
16386
|
-
const onTouchEnd = () => {
|
|
16340
|
+
const onTouchEnd = (event) => {
|
|
16387
16341
|
if (state.dragging) {
|
|
16388
16342
|
setState((v) => ({ ...v, dragging: false }));
|
|
16389
16343
|
toggle(state.offset > 0 ? "left" : "right");
|
|
16390
16344
|
setTimeout(() => {
|
|
16391
16345
|
lockClick.current = false;
|
|
16392
16346
|
}, 0);
|
|
16347
|
+
props.onTouchEnd && props.onTouchEnd(event);
|
|
16393
16348
|
}
|
|
16394
16349
|
};
|
|
16395
16350
|
const toggle = (side) => {
|
|
@@ -16491,7 +16446,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
16491
16446
|
className: `${swipeBem()} ${className}`,
|
|
16492
16447
|
onTouchStart: (e2) => onTouchStart(e2),
|
|
16493
16448
|
onTouchMove: (e2) => onTouchMove(e2),
|
|
16494
|
-
onTouchEnd,
|
|
16449
|
+
onTouchEnd: (e2) => onTouchEnd(e2),
|
|
16495
16450
|
style
|
|
16496
16451
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
16497
16452
|
className: `${swipeBem("wrapper")}`,
|
|
@@ -16809,12 +16764,12 @@ const Audio = (props) => {
|
|
|
16809
16764
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
16810
16765
|
className: `${b("icon-box")} ${playing ? b("icon-play") : b("icon-stop")}`,
|
|
16811
16766
|
onClick: handleStatusChange
|
|
16812
|
-
}, playing ? /* @__PURE__ */ React__default.createElement(Icon
|
|
16767
|
+
}, playing ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
16813
16768
|
classPrefix: iconClassPrefix,
|
|
16814
16769
|
fontClassName: iconFontClassName,
|
|
16815
16770
|
name: "service",
|
|
16816
16771
|
className: "nut-icon-loading"
|
|
16817
|
-
}) : /* @__PURE__ */ React__default.createElement(Icon
|
|
16772
|
+
}) : /* @__PURE__ */ React__default.createElement(Icon, {
|
|
16818
16773
|
classPrefix: iconClassPrefix,
|
|
16819
16774
|
fontClassName: iconFontClassName,
|
|
16820
16775
|
name: "service"
|
|
@@ -17058,7 +17013,7 @@ const Avatar = (props) => {
|
|
|
17058
17013
|
src: url2,
|
|
17059
17014
|
alt,
|
|
17060
17015
|
onError: errorEvent
|
|
17061
|
-
}), icon && /* @__PURE__ */ React__default.createElement(Icon
|
|
17016
|
+
}), icon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
17062
17017
|
classPrefix: iconClassPrefix,
|
|
17063
17018
|
fontClassName: iconFontClassName,
|
|
17064
17019
|
className: "icon",
|
|
@@ -17154,7 +17109,7 @@ const Badge = (props) => {
|
|
|
17154
17109
|
style
|
|
17155
17110
|
}, icons !== "" && /* @__PURE__ */ React__default.createElement("div", {
|
|
17156
17111
|
className: "slot-icons"
|
|
17157
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
17112
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
17158
17113
|
classPrefix: iconClassPrefix,
|
|
17159
17114
|
fontClassName: iconFontClassName,
|
|
17160
17115
|
className: "_icon",
|
|
@@ -17455,7 +17410,7 @@ const CollapseItem = (props) => {
|
|
|
17455
17410
|
className: colBem("title")
|
|
17456
17411
|
}, titleIcon && titleIconPosition === "left" && /* @__PURE__ */ React__default.createElement("b", {
|
|
17457
17412
|
className: colBem("title-icon-left")
|
|
17458
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
17413
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
17459
17414
|
classPrefix: iconClassPrefix,
|
|
17460
17415
|
fontClassName: iconFontClassName,
|
|
17461
17416
|
name: titleIcon,
|
|
@@ -17463,7 +17418,7 @@ const CollapseItem = (props) => {
|
|
|
17463
17418
|
color: disabled ? "#C2C2C2" : titleIconColor
|
|
17464
17419
|
})), title, titleIcon && titleIconPosition === "right" && /* @__PURE__ */ React__default.createElement("b", {
|
|
17465
17420
|
className: colBem("title-icon-right")
|
|
17466
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
17421
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
17467
17422
|
classPrefix: iconClassPrefix,
|
|
17468
17423
|
fontClassName: iconFontClassName,
|
|
17469
17424
|
name: titleIcon,
|
|
@@ -17476,7 +17431,7 @@ const CollapseItem = (props) => {
|
|
|
17476
17431
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
17477
17432
|
className: colBem("icon"),
|
|
17478
17433
|
style: iconStyle
|
|
17479
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
17434
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
17480
17435
|
classPrefix: iconClassPrefix,
|
|
17481
17436
|
fontClassName: iconFontClassName,
|
|
17482
17437
|
name: icon,
|
|
@@ -17752,9 +17707,6 @@ const Ellipsis = (props) => {
|
|
|
17752
17707
|
}, []);
|
|
17753
17708
|
useEffect(() => {
|
|
17754
17709
|
if (content) {
|
|
17755
|
-
if (container) {
|
|
17756
|
-
document.body.appendChild(container);
|
|
17757
|
-
}
|
|
17758
17710
|
createContainer();
|
|
17759
17711
|
}
|
|
17760
17712
|
}, [content]);
|
|
@@ -17787,6 +17739,7 @@ const Ellipsis = (props) => {
|
|
|
17787
17739
|
container.innerText = content;
|
|
17788
17740
|
document.body.appendChild(container);
|
|
17789
17741
|
calcEllipse();
|
|
17742
|
+
document.body.removeChild(container);
|
|
17790
17743
|
};
|
|
17791
17744
|
const calcEllipse = () => {
|
|
17792
17745
|
if (container.offsetHeight <= maxHeight) {
|
|
@@ -17797,7 +17750,6 @@ const Ellipsis = (props) => {
|
|
|
17797
17750
|
const middle = Math.floor((0 + end) / 2);
|
|
17798
17751
|
const ellipsised = direction === "middle" ? tailorMiddle([0, middle], [middle, end]) : tailor(0, end);
|
|
17799
17752
|
ellipsis.current = ellipsised;
|
|
17800
|
-
document.body.removeChild(container);
|
|
17801
17753
|
}
|
|
17802
17754
|
};
|
|
17803
17755
|
const tailor = (left, right) => {
|
|
@@ -18069,6 +18021,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
18069
18021
|
isStopPropagation,
|
|
18070
18022
|
autoPlay,
|
|
18071
18023
|
isCenter,
|
|
18024
|
+
paginationBgColor,
|
|
18072
18025
|
...rest
|
|
18073
18026
|
} = propSwiper;
|
|
18074
18027
|
const container = useRef(null);
|
|
@@ -18193,6 +18146,9 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
18193
18146
|
});
|
|
18194
18147
|
});
|
|
18195
18148
|
};
|
|
18149
|
+
const resize = () => {
|
|
18150
|
+
init(active);
|
|
18151
|
+
};
|
|
18196
18152
|
const move = ({
|
|
18197
18153
|
pace = 0,
|
|
18198
18154
|
offset: offset2 = 0,
|
|
@@ -18429,7 +18385,8 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
18429
18385
|
React__default.useImperativeHandle(ref, () => ({
|
|
18430
18386
|
to: to2,
|
|
18431
18387
|
next,
|
|
18432
|
-
prev
|
|
18388
|
+
prev,
|
|
18389
|
+
resize
|
|
18433
18390
|
}));
|
|
18434
18391
|
return /* @__PURE__ */ React__default.createElement(DataContext$1.Provider, {
|
|
18435
18392
|
value: parent
|
|
@@ -19082,7 +19039,7 @@ const NoticeBar = (props) => {
|
|
|
19082
19039
|
}, iconShow() ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19083
19040
|
className: "left-icon",
|
|
19084
19041
|
style: { backgroundImage: `url(${iconBg() || ""})` }
|
|
19085
|
-
}, !iconBg() ? /* @__PURE__ */ React__default.createElement(Icon
|
|
19042
|
+
}, !iconBg() ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19086
19043
|
classPrefix: iconClassPrefix,
|
|
19087
19044
|
fontClassName: iconFontClassName,
|
|
19088
19045
|
name: "notice",
|
|
@@ -19099,7 +19056,7 @@ const NoticeBar = (props) => {
|
|
|
19099
19056
|
}, children, text)), closeMode || rightIcon ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19100
19057
|
className: "right-icon",
|
|
19101
19058
|
onClick: onClickIcon
|
|
19102
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
19059
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19103
19060
|
classPrefix: iconClassPrefix,
|
|
19104
19061
|
fontClassName: iconFontClassName,
|
|
19105
19062
|
name: rightIcon || "close",
|
|
@@ -19112,7 +19069,7 @@ const NoticeBar = (props) => {
|
|
|
19112
19069
|
}, iconShow() ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19113
19070
|
className: "left-icon",
|
|
19114
19071
|
style: { backgroundImage: `url(${iconBg() || ""})` }
|
|
19115
|
-
}, !iconBg() ? /* @__PURE__ */ React__default.createElement(Icon
|
|
19072
|
+
}, !iconBg() ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19116
19073
|
classPrefix: iconClassPrefix,
|
|
19117
19074
|
fontClassName: iconFontClassName,
|
|
19118
19075
|
name: "notice",
|
|
@@ -19147,7 +19104,7 @@ const NoticeBar = (props) => {
|
|
|
19147
19104
|
onClick: (e2) => {
|
|
19148
19105
|
handleClickIcon(e2);
|
|
19149
19106
|
}
|
|
19150
|
-
}, rightIcon || (closeMode ? /* @__PURE__ */ React__default.createElement(Icon
|
|
19107
|
+
}, rightIcon || (closeMode ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19151
19108
|
classPrefix: iconClassPrefix,
|
|
19152
19109
|
fontClassName: iconFontClassName,
|
|
19153
19110
|
name: rightIcon || "close",
|
|
@@ -19308,7 +19265,7 @@ const Popover = (props) => {
|
|
|
19308
19265
|
onClick: () => {
|
|
19309
19266
|
handleChoose(item, i);
|
|
19310
19267
|
}
|
|
19311
|
-
}, item.icon ? /* @__PURE__ */ React__default.createElement(Icon
|
|
19268
|
+
}, item.icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19312
19269
|
classPrefix: iconClassPrefix,
|
|
19313
19270
|
fontClassName: iconFontClassName,
|
|
19314
19271
|
className: "popover-menu-item-img",
|
|
@@ -19557,7 +19514,7 @@ const Step = (props) => {
|
|
|
19557
19514
|
className: "nut-step-line"
|
|
19558
19515
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
19559
19516
|
className: renderIconClass()
|
|
19560
|
-
}, icon ? /* @__PURE__ */ React__default.createElement(Icon
|
|
19517
|
+
}, icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19561
19518
|
classPrefix: iconClassPrefix,
|
|
19562
19519
|
fontClassName: iconFontClassName,
|
|
19563
19520
|
className: "nut-step-icon-inner",
|
|
@@ -19688,7 +19645,7 @@ const Table = (props) => {
|
|
|
19688
19645
|
),
|
|
19689
19646
|
key: item.key,
|
|
19690
19647
|
onClick: () => handleSorterClick(item)
|
|
19691
|
-
}, item.title, item.sorter && /* @__PURE__ */ React__default.createElement(Icon
|
|
19648
|
+
}, item.title, item.sorter && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19692
19649
|
classPrefix: iconClassPrefix,
|
|
19693
19650
|
fontClassName: iconFontClassName,
|
|
19694
19651
|
name: "down-arrow",
|
|
@@ -19757,6 +19714,7 @@ const defaultProps$c = {
|
|
|
19757
19714
|
round: false,
|
|
19758
19715
|
mark: false,
|
|
19759
19716
|
closeable: false,
|
|
19717
|
+
iconSize: "12px",
|
|
19760
19718
|
prefixCls: "nut-tag",
|
|
19761
19719
|
onClose: (e2) => {
|
|
19762
19720
|
},
|
|
@@ -19775,6 +19733,7 @@ const Tag = (props) => {
|
|
|
19775
19733
|
children,
|
|
19776
19734
|
mark,
|
|
19777
19735
|
closeable,
|
|
19736
|
+
iconSize,
|
|
19778
19737
|
textColor,
|
|
19779
19738
|
onClick,
|
|
19780
19739
|
onClose,
|
|
@@ -19796,6 +19755,7 @@ const Tag = (props) => {
|
|
|
19796
19755
|
round,
|
|
19797
19756
|
mark,
|
|
19798
19757
|
closeable,
|
|
19758
|
+
iconSize,
|
|
19799
19759
|
prefixCls,
|
|
19800
19760
|
onClick,
|
|
19801
19761
|
onClose
|
|
@@ -19838,12 +19798,12 @@ const Tag = (props) => {
|
|
|
19838
19798
|
onClick: (e2) => handleClick2(e2)
|
|
19839
19799
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
19840
19800
|
className: "nut-tag-text"
|
|
19841
|
-
}, children), /* @__PURE__ */ React__default.createElement(Icon
|
|
19801
|
+
}, children), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19842
19802
|
classPrefix: iconClassPrefix,
|
|
19843
19803
|
fontClassName: iconFontClassName,
|
|
19844
19804
|
className: "_icon",
|
|
19845
19805
|
name: "close",
|
|
19846
|
-
size:
|
|
19806
|
+
size: iconSize,
|
|
19847
19807
|
onClick: (e2) => {
|
|
19848
19808
|
setIsTagShow(false);
|
|
19849
19809
|
if (props.onClose) {
|
|
@@ -19941,7 +19901,7 @@ const TrendArrow = (props) => {
|
|
|
19941
19901
|
className: `${b()} ${className}`,
|
|
19942
19902
|
...rest,
|
|
19943
19903
|
onClick: handleClick2
|
|
19944
|
-
}, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default.createElement(Icon
|
|
19904
|
+
}, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
19945
19905
|
size: calcIconProps.size,
|
|
19946
19906
|
name: calcIconProps.name,
|
|
19947
19907
|
color: calcIconProps.color
|
|
@@ -20397,7 +20357,7 @@ const ExistRender = (props) => {
|
|
|
20397
20357
|
key: index
|
|
20398
20358
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
20399
20359
|
onClick: () => selectedExist(item)
|
|
20400
|
-
}, /* @__PURE__ */ React__default.createElement(Icon
|
|
20360
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
20401
20361
|
className: b("exist-item-icon"),
|
|
20402
20362
|
name: item.selectedAddress ? selectedIcon : defaultIcon,
|
|
20403
20363
|
color: item.selectedAddress ? "#FA2C19" : "",
|
|
@@ -20681,7 +20641,7 @@ const CustomRender = (props) => {
|
|
|
20681
20641
|
onClick: () => {
|
|
20682
20642
|
nextAreaList(item);
|
|
20683
20643
|
}
|
|
20684
|
-
}, selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React__default.createElement(Icon
|
|
20644
|
+
}, selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
20685
20645
|
className: b("region-item--icon"),
|
|
20686
20646
|
name: "Check",
|
|
20687
20647
|
color: "#FA2C19",
|
|
@@ -20843,7 +20803,7 @@ const Address = (props) => {
|
|
|
20843
20803
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
20844
20804
|
className: "arrow-back",
|
|
20845
20805
|
onClick: onSwitchModule
|
|
20846
|
-
}, privateType === "custom" && backBtnIcon && /* @__PURE__ */ React__default.createElement(Icon
|
|
20806
|
+
}, privateType === "custom" && backBtnIcon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
20847
20807
|
classPrefix: iconClassPrefix,
|
|
20848
20808
|
fontClassName: iconFontClassName,
|
|
20849
20809
|
name: backBtnIcon,
|
|
@@ -20852,7 +20812,7 @@ const Address = (props) => {
|
|
|
20852
20812
|
className: b("header__title")
|
|
20853
20813
|
}, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React__default.createElement("div", {
|
|
20854
20814
|
onClick: () => handClose()
|
|
20855
|
-
}, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon
|
|
20815
|
+
}, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
20856
20816
|
classPrefix: iconClassPrefix,
|
|
20857
20817
|
fontClassName: iconFontClassName,
|
|
20858
20818
|
name: closeBtnIcon,
|
|
@@ -21400,4 +21360,4 @@ const TimeSelect = (props) => {
|
|
|
21400
21360
|
};
|
|
21401
21361
|
TimeSelect.defaultProps = defaultProps;
|
|
21402
21362
|
TimeSelect.displayName = "NutTimeSelect";
|
|
21403
|
-
export { ActionSheet, Address, Animate, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Ellipsis, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon
|
|
21363
|
+
export { ActionSheet, Address, Animate, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Ellipsis, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon, Image$1 as Image, ImagePreview, Indicator, Infiniteloading, Input, InputNumber, Layout, Menu, MenuItem, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, PullToRefresh, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, TrendArrow, Uploader, Video, VirtualList, WaterMark };
|