@nutui/nutui-react 2.6.19 → 2.6.20
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 +17 -9
- package/dist/esm/AvatarCropper.js +15 -7
- package/dist/esm/CountDown.js +0 -2
- package/dist/esm/Empty.js +0 -2
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/cascader2.js +3 -1
- package/dist/esm/configprovider.taro.js +23 -0
- package/dist/esm/configprovider2.js +1 -134
- package/dist/esm/griditem2.js +0 -2
- package/dist/esm/zh-CN.js +141 -0
- package/dist/locales/base.d.ts +7 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +5 -1
- package/dist/locales/id-ID.js +5 -1
- package/dist/locales/tr-TR.js +5 -1
- package/dist/locales/zh-CN.js +5 -1
- package/dist/locales/zh-TW.js +5 -1
- package/dist/locales/zh-UG.js +5 -1
- package/dist/nutui.react.es.js +72 -51
- package/dist/nutui.react.umd.js +72 -51
- package/dist/types/index.d.ts +196 -196
- package/dist/types/locales/base.d.ts +7 -0
- package/dist/types/packages/nutui.react.build.d.ts +197 -0
- package/dist/types/packages/searchbar/searchbar.d.ts +14 -14
- package/dist/types/packages/searchbar/searchbar.taro.d.ts +0 -14
- package/dist/types/packages/uploader/uploader.taro.d.ts +0 -3
- package/package.json +2 -2
package/dist/nutui.react.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.nutui = {}, global2.React, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react v2.6.19 Fri Sep
|
|
5
|
+
* @nutui/nutui-react v2.6.19 Fri Sep 20 2024 13:46:38 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -1740,6 +1740,8 @@
|
|
|
1740
1740
|
noData: "暂无数据",
|
|
1741
1741
|
placeholder: "请输入内容",
|
|
1742
1742
|
select: "请选择",
|
|
1743
|
+
edit: "编辑",
|
|
1744
|
+
reset: "重置",
|
|
1743
1745
|
video: {
|
|
1744
1746
|
errorTip: "视频加载失败",
|
|
1745
1747
|
clickRetry: "点击重试"
|
|
@@ -1777,6 +1779,7 @@
|
|
|
1777
1779
|
tips: "忘记密码"
|
|
1778
1780
|
},
|
|
1779
1781
|
uploader: {
|
|
1782
|
+
list: "上传文件",
|
|
1780
1783
|
ready: "准备完成",
|
|
1781
1784
|
readyUpload: "准备上传",
|
|
1782
1785
|
waitingUpload: "等待上传",
|
|
@@ -1843,6 +1846,7 @@
|
|
|
1843
1846
|
mute: "静音",
|
|
1844
1847
|
tips: "onPlayEnd事件在loop=false时才会触发"
|
|
1845
1848
|
},
|
|
1849
|
+
avatarCropper: { rotate: "旋转", selectImage: "选择图片" },
|
|
1846
1850
|
datepicker: {
|
|
1847
1851
|
year: "年",
|
|
1848
1852
|
month: "月",
|
|
@@ -1880,20 +1884,20 @@
|
|
|
1880
1884
|
}
|
|
1881
1885
|
const requestAniFrame$1 = requestAniFrame();
|
|
1882
1886
|
const classPrefix$p = "nut-configprovider";
|
|
1883
|
-
const defaultConfigRef = {
|
|
1887
|
+
const defaultConfigRef$1 = {
|
|
1884
1888
|
current: {
|
|
1885
1889
|
locale: zhCN
|
|
1886
1890
|
}
|
|
1887
1891
|
};
|
|
1888
1892
|
const setDefaultConfig = (config2) => {
|
|
1889
|
-
defaultConfigRef.current = config2;
|
|
1893
|
+
defaultConfigRef$1.current = config2;
|
|
1890
1894
|
};
|
|
1891
|
-
const getDefaultConfig = () => {
|
|
1892
|
-
return defaultConfigRef.current;
|
|
1895
|
+
const getDefaultConfig$1 = () => {
|
|
1896
|
+
return defaultConfigRef$1.current;
|
|
1893
1897
|
};
|
|
1894
|
-
const ConfigContext = React.createContext(null);
|
|
1895
|
-
const useConfig = () => {
|
|
1896
|
-
return React.useContext(ConfigContext) ?? getDefaultConfig();
|
|
1898
|
+
const ConfigContext$1 = React.createContext(null);
|
|
1899
|
+
const useConfig$1 = () => {
|
|
1900
|
+
return React.useContext(ConfigContext$1) ?? getDefaultConfig$1();
|
|
1897
1901
|
};
|
|
1898
1902
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
1899
1903
|
const cssVars = {};
|
|
@@ -1903,7 +1907,7 @@
|
|
|
1903
1907
|
return cssVars;
|
|
1904
1908
|
}
|
|
1905
1909
|
const useRtl = () => {
|
|
1906
|
-
const { direction } = useConfig();
|
|
1910
|
+
const { direction } = useConfig$1();
|
|
1907
1911
|
if (direction) {
|
|
1908
1912
|
return direction === "rtl";
|
|
1909
1913
|
}
|
|
@@ -1914,7 +1918,7 @@
|
|
|
1914
1918
|
const mergedConfig = useMemo(
|
|
1915
1919
|
() => {
|
|
1916
1920
|
return {
|
|
1917
|
-
...getDefaultConfig(),
|
|
1921
|
+
...getDefaultConfig$1(),
|
|
1918
1922
|
...config2,
|
|
1919
1923
|
direction
|
|
1920
1924
|
};
|
|
@@ -1928,7 +1932,7 @@
|
|
|
1928
1932
|
const cssVarStyle = React.useMemo(() => {
|
|
1929
1933
|
return convertThemeVarsToCSSVars(mergedConfig.theme || {});
|
|
1930
1934
|
}, [mergedConfig.theme]);
|
|
1931
|
-
return /* @__PURE__ */ React.createElement(ConfigContext.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
|
|
1935
|
+
return /* @__PURE__ */ React.createElement(ConfigContext$1.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
|
|
1932
1936
|
"div",
|
|
1933
1937
|
{
|
|
1934
1938
|
className: classNames(classPrefix$p, className),
|
|
@@ -2918,7 +2922,6 @@
|
|
|
2918
2922
|
direction: "vertical"
|
|
2919
2923
|
};
|
|
2920
2924
|
const GridItem = (props) => {
|
|
2921
|
-
useConfig();
|
|
2922
2925
|
const {
|
|
2923
2926
|
children,
|
|
2924
2927
|
style,
|
|
@@ -8476,7 +8479,7 @@
|
|
|
8476
8479
|
}
|
|
8477
8480
|
};
|
|
8478
8481
|
const FixedNav = (props) => {
|
|
8479
|
-
const { locale } = useConfig();
|
|
8482
|
+
const { locale } = useConfig$1();
|
|
8480
8483
|
const {
|
|
8481
8484
|
className,
|
|
8482
8485
|
overlay,
|
|
@@ -9574,6 +9577,19 @@
|
|
|
9574
9577
|
return pathNodes;
|
|
9575
9578
|
}
|
|
9576
9579
|
}
|
|
9580
|
+
const defaultConfigRef = {
|
|
9581
|
+
current: {
|
|
9582
|
+
locale: zhCN,
|
|
9583
|
+
direction: "ltr"
|
|
9584
|
+
}
|
|
9585
|
+
};
|
|
9586
|
+
const getDefaultConfig = () => {
|
|
9587
|
+
return defaultConfigRef.current;
|
|
9588
|
+
};
|
|
9589
|
+
const ConfigContext = React.createContext(null);
|
|
9590
|
+
const useConfig = () => {
|
|
9591
|
+
return React.useContext(ConfigContext) ?? getDefaultConfig();
|
|
9592
|
+
};
|
|
9577
9593
|
const defaultProps$16 = {
|
|
9578
9594
|
...ComponentDefaults,
|
|
9579
9595
|
activeColor: "",
|
|
@@ -9596,6 +9612,7 @@
|
|
|
9596
9612
|
}
|
|
9597
9613
|
};
|
|
9598
9614
|
const InternalCascader = (props, ref) => {
|
|
9615
|
+
const { locale } = useConfig();
|
|
9599
9616
|
const {
|
|
9600
9617
|
className,
|
|
9601
9618
|
style,
|
|
@@ -9895,7 +9912,7 @@
|
|
|
9895
9912
|
className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
|
|
9896
9913
|
key: pane.paneKey
|
|
9897
9914
|
},
|
|
9898
|
-
/* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-text" }, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) &&
|
|
9915
|
+
/* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-text" }, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && `${locale.select}`, !(!state.initLoading && state.panes.length) && "Loading..."),
|
|
9899
9916
|
/* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-line" })
|
|
9900
9917
|
);
|
|
9901
9918
|
});
|
|
@@ -9989,7 +10006,7 @@
|
|
|
9989
10006
|
custom: false
|
|
9990
10007
|
};
|
|
9991
10008
|
const ExistRender = (props) => {
|
|
9992
|
-
const { locale } = useConfig();
|
|
10009
|
+
const { locale } = useConfig$1();
|
|
9993
10010
|
const {
|
|
9994
10011
|
children,
|
|
9995
10012
|
type,
|
|
@@ -10045,7 +10062,7 @@
|
|
|
10045
10062
|
backIcon: null
|
|
10046
10063
|
};
|
|
10047
10064
|
const InternalAddress = (props, ref) => {
|
|
10048
|
-
const { locale } = useConfig();
|
|
10065
|
+
const { locale } = useConfig$1();
|
|
10049
10066
|
const {
|
|
10050
10067
|
style,
|
|
10051
10068
|
className,
|
|
@@ -10440,7 +10457,7 @@
|
|
|
10440
10457
|
}
|
|
10441
10458
|
};
|
|
10442
10459
|
const CalendarItem = React.forwardRef((props, ref) => {
|
|
10443
|
-
const { locale } = useConfig();
|
|
10460
|
+
const { locale } = useConfig$1();
|
|
10444
10461
|
const {
|
|
10445
10462
|
style,
|
|
10446
10463
|
className,
|
|
@@ -11042,7 +11059,7 @@
|
|
|
11042
11059
|
}
|
|
11043
11060
|
};
|
|
11044
11061
|
const Calendar = React.forwardRef((props, ref) => {
|
|
11045
|
-
const { locale } = useConfig();
|
|
11062
|
+
const { locale } = useConfig$1();
|
|
11046
11063
|
const {
|
|
11047
11064
|
style,
|
|
11048
11065
|
className,
|
|
@@ -11259,7 +11276,7 @@
|
|
|
11259
11276
|
};
|
|
11260
11277
|
const prefixCls = "nut-calendarcard";
|
|
11261
11278
|
const CalendarCard = React.forwardRef((props, ref) => {
|
|
11262
|
-
const { locale } = useConfig();
|
|
11279
|
+
const { locale } = useConfig$1();
|
|
11263
11280
|
const {
|
|
11264
11281
|
style,
|
|
11265
11282
|
className,
|
|
@@ -12105,7 +12122,7 @@
|
|
|
12105
12122
|
duration: 1e3
|
|
12106
12123
|
};
|
|
12107
12124
|
const InternalPicker = (props, ref) => {
|
|
12108
|
-
const { locale } = useConfig();
|
|
12125
|
+
const { locale } = useConfig$1();
|
|
12109
12126
|
const {
|
|
12110
12127
|
children,
|
|
12111
12128
|
visible,
|
|
@@ -12401,7 +12418,7 @@
|
|
|
12401
12418
|
...defaultProps$Y,
|
|
12402
12419
|
...props
|
|
12403
12420
|
};
|
|
12404
|
-
const { locale } = useConfig();
|
|
12421
|
+
const { locale } = useConfig$1();
|
|
12405
12422
|
const lang = locale.datepicker;
|
|
12406
12423
|
const zhCNType = {
|
|
12407
12424
|
day: lang.day,
|
|
@@ -14208,7 +14225,7 @@
|
|
|
14208
14225
|
const Input = React.forwardRef(
|
|
14209
14226
|
(props, ref) => {
|
|
14210
14227
|
const rtl = useRtl();
|
|
14211
|
-
const { locale } = useConfig();
|
|
14228
|
+
const { locale } = useConfig$1();
|
|
14212
14229
|
const {
|
|
14213
14230
|
type,
|
|
14214
14231
|
name,
|
|
@@ -15021,7 +15038,7 @@
|
|
|
15021
15038
|
}
|
|
15022
15039
|
};
|
|
15023
15040
|
const NumberKeyboard = (props) => {
|
|
15024
|
-
const { locale } = useConfig();
|
|
15041
|
+
const { locale } = useConfig$1();
|
|
15025
15042
|
const {
|
|
15026
15043
|
title,
|
|
15027
15044
|
rightActions,
|
|
@@ -15909,7 +15926,7 @@
|
|
|
15909
15926
|
};
|
|
15910
15927
|
const SearchBar = (props) => {
|
|
15911
15928
|
const classPrefix2 = "nut-searchbar";
|
|
15912
|
-
const { locale } = useConfig();
|
|
15929
|
+
const { locale } = useConfig$1();
|
|
15913
15930
|
const searchRef = React.useRef(null);
|
|
15914
15931
|
const {
|
|
15915
15932
|
value: outerValue,
|
|
@@ -16062,7 +16079,7 @@
|
|
|
16062
16079
|
autoFocus: false
|
|
16063
16080
|
};
|
|
16064
16081
|
const InternalShortPassword = (props, ref) => {
|
|
16065
|
-
const { locale } = useConfig();
|
|
16082
|
+
const { locale } = useConfig$1();
|
|
16066
16083
|
const {
|
|
16067
16084
|
title,
|
|
16068
16085
|
description,
|
|
@@ -16160,7 +16177,7 @@
|
|
|
16160
16177
|
unsupported: ""
|
|
16161
16178
|
};
|
|
16162
16179
|
const InternalSignature = (props, ref) => {
|
|
16163
|
-
const { locale } = useConfig();
|
|
16180
|
+
const { locale } = useConfig$1();
|
|
16164
16181
|
const {
|
|
16165
16182
|
type,
|
|
16166
16183
|
lineWidth,
|
|
@@ -16341,7 +16358,7 @@
|
|
|
16341
16358
|
autoSize: false
|
|
16342
16359
|
};
|
|
16343
16360
|
const TextArea = (props) => {
|
|
16344
|
-
const { locale } = useConfig();
|
|
16361
|
+
const { locale } = useConfig$1();
|
|
16345
16362
|
const {
|
|
16346
16363
|
className,
|
|
16347
16364
|
value,
|
|
@@ -16729,7 +16746,7 @@
|
|
|
16729
16746
|
class FileItem {
|
|
16730
16747
|
constructor() {
|
|
16731
16748
|
this.status = "ready";
|
|
16732
|
-
this.message = "
|
|
16749
|
+
this.message = "";
|
|
16733
16750
|
this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
16734
16751
|
this.percentage = 0;
|
|
16735
16752
|
this.formData = {};
|
|
@@ -16763,7 +16780,7 @@
|
|
|
16763
16780
|
}
|
|
16764
16781
|
};
|
|
16765
16782
|
const InternalUploader = (props, ref) => {
|
|
16766
|
-
const { locale } = useConfig();
|
|
16783
|
+
const { locale } = useConfig$1();
|
|
16767
16784
|
const fileListRef = React.useRef([]);
|
|
16768
16785
|
const {
|
|
16769
16786
|
children,
|
|
@@ -17012,7 +17029,7 @@
|
|
|
17012
17029
|
const handleItemClick = (file, index) => {
|
|
17013
17030
|
onFileItemClick == null ? void 0 : onFileItemClick(file, index);
|
|
17014
17031
|
};
|
|
17015
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React.createElement(Button, { size: "small", type: "primary" },
|
|
17032
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React.createElement(Button, { size: "small", type: "primary" }, locale.uploader.list), Number(maxCount) > fileList.length && /* @__PURE__ */ React.createElement(
|
|
17016
17033
|
"input",
|
|
17017
17034
|
{
|
|
17018
17035
|
className: "nut-uploader-input",
|
|
@@ -17401,7 +17418,7 @@
|
|
|
17401
17418
|
beforeClose: () => true
|
|
17402
17419
|
};
|
|
17403
17420
|
const BaseDialog = (props, ref) => {
|
|
17404
|
-
const { locale } = useConfig();
|
|
17421
|
+
const { locale } = useConfig$1();
|
|
17405
17422
|
const {
|
|
17406
17423
|
visible,
|
|
17407
17424
|
footer,
|
|
@@ -17630,7 +17647,6 @@
|
|
|
17630
17647
|
};
|
|
17631
17648
|
const classPrefix$e = `nut-empty`;
|
|
17632
17649
|
const Empty = (props) => {
|
|
17633
|
-
useConfig();
|
|
17634
17650
|
const {
|
|
17635
17651
|
image,
|
|
17636
17652
|
imageSize,
|
|
@@ -17699,7 +17715,7 @@
|
|
|
17699
17715
|
};
|
|
17700
17716
|
const classPrefix$d = `nut-infiniteloading`;
|
|
17701
17717
|
const InfiniteLoading = (props) => {
|
|
17702
|
-
const { locale } = useConfig();
|
|
17718
|
+
const { locale } = useConfig$1();
|
|
17703
17719
|
const {
|
|
17704
17720
|
children,
|
|
17705
17721
|
type,
|
|
@@ -18398,7 +18414,6 @@
|
|
|
18398
18414
|
...ComponentDefaults,
|
|
18399
18415
|
id: "",
|
|
18400
18416
|
duration: 3e3,
|
|
18401
|
-
// 时长
|
|
18402
18417
|
type: "danger",
|
|
18403
18418
|
position: "top",
|
|
18404
18419
|
onClose: () => {
|
|
@@ -18770,7 +18785,7 @@
|
|
|
18770
18785
|
};
|
|
18771
18786
|
const PullToRefresh = (p2) => {
|
|
18772
18787
|
const classPrefix2 = "nut-pulltorefresh";
|
|
18773
|
-
const { locale } = useConfig();
|
|
18788
|
+
const { locale } = useConfig$1();
|
|
18774
18789
|
const props = {
|
|
18775
18790
|
...defaultProps$x,
|
|
18776
18791
|
...p2,
|
|
@@ -19659,7 +19674,7 @@
|
|
|
19659
19674
|
}
|
|
19660
19675
|
};
|
|
19661
19676
|
const Audio = (props) => {
|
|
19662
|
-
const { locale } = useConfig();
|
|
19677
|
+
const { locale } = useConfig$1();
|
|
19663
19678
|
const {
|
|
19664
19679
|
className,
|
|
19665
19680
|
src,
|
|
@@ -20178,7 +20193,6 @@
|
|
|
20178
20193
|
destroy: false
|
|
20179
20194
|
};
|
|
20180
20195
|
const InternalCountDown = (props, ref) => {
|
|
20181
|
-
useConfig();
|
|
20182
20196
|
const {
|
|
20183
20197
|
paused,
|
|
20184
20198
|
startTime,
|
|
@@ -21349,7 +21363,7 @@
|
|
|
21349
21363
|
ellipse: false
|
|
21350
21364
|
};
|
|
21351
21365
|
const Pagination = (props) => {
|
|
21352
|
-
const { locale } = useConfig();
|
|
21366
|
+
const { locale } = useConfig$1();
|
|
21353
21367
|
const {
|
|
21354
21368
|
value,
|
|
21355
21369
|
mode,
|
|
@@ -21696,7 +21710,7 @@
|
|
|
21696
21710
|
showHeader: true
|
|
21697
21711
|
};
|
|
21698
21712
|
const Table = (props) => {
|
|
21699
|
-
const { locale } = useConfig();
|
|
21713
|
+
const { locale } = useConfig$1();
|
|
21700
21714
|
const rtl = useRtl();
|
|
21701
21715
|
defaultProps$a.noData = locale.noData;
|
|
21702
21716
|
const {
|
|
@@ -21966,7 +21980,7 @@
|
|
|
21966
21980
|
};
|
|
21967
21981
|
const classPrefix$2 = "nut-tour";
|
|
21968
21982
|
const Tour = (props) => {
|
|
21969
|
-
const { locale } = useConfig();
|
|
21983
|
+
const { locale } = useConfig$1();
|
|
21970
21984
|
const {
|
|
21971
21985
|
children,
|
|
21972
21986
|
className,
|
|
@@ -22621,7 +22635,7 @@
|
|
|
22621
22635
|
}
|
|
22622
22636
|
};
|
|
22623
22637
|
const TimeSelect = (props) => {
|
|
22624
|
-
const { locale } = useConfig();
|
|
22638
|
+
const { locale } = useConfig$1();
|
|
22625
22639
|
const {
|
|
22626
22640
|
visible,
|
|
22627
22641
|
className,
|
|
@@ -22846,7 +22860,7 @@
|
|
|
22846
22860
|
fontSize: 14
|
|
22847
22861
|
};
|
|
22848
22862
|
const WaterMark = (props) => {
|
|
22849
|
-
const { locale } = useConfig();
|
|
22863
|
+
const { locale } = useConfig$1();
|
|
22850
22864
|
const {
|
|
22851
22865
|
content,
|
|
22852
22866
|
fullPage,
|
|
@@ -22945,22 +22959,29 @@
|
|
|
22945
22959
|
maxZoom: 3,
|
|
22946
22960
|
space: 10,
|
|
22947
22961
|
toolbar: [
|
|
22948
|
-
/* @__PURE__ */ React.createElement(Button, { type: "danger", key: "cancel" }, "
|
|
22949
|
-
/* @__PURE__ */ React.createElement(Button, { key: "reset" }, "
|
|
22950
|
-
/* @__PURE__ */ React.createElement(Button, { key: "rotate" }, "
|
|
22951
|
-
/* @__PURE__ */ React.createElement(Button, { type: "success", key: "confirm" }, "
|
|
22962
|
+
/* @__PURE__ */ React.createElement(Button, { type: "danger", key: "cancel" }, "Cancel"),
|
|
22963
|
+
/* @__PURE__ */ React.createElement(Button, { key: "reset" }, "Reset"),
|
|
22964
|
+
/* @__PURE__ */ React.createElement(Button, { key: "rotate" }, "Rotate"),
|
|
22965
|
+
/* @__PURE__ */ React.createElement(Button, { type: "success", key: "confirm" }, "Confirm")
|
|
22952
22966
|
],
|
|
22953
22967
|
toolbarPosition: "bottom",
|
|
22954
|
-
editText: "
|
|
22968
|
+
editText: "Edit",
|
|
22955
22969
|
shape: "square"
|
|
22956
22970
|
};
|
|
22957
22971
|
const classPrefix = `nut-avatar-cropper`;
|
|
22958
22972
|
const AvatarCropper = (props) => {
|
|
22973
|
+
const { locale } = useConfig();
|
|
22974
|
+
defaultProps.toolbar = [
|
|
22975
|
+
/* @__PURE__ */ React.createElement(Button, { type: "danger", key: "cancel" }, locale.cancel),
|
|
22976
|
+
/* @__PURE__ */ React.createElement(Button, { key: "reset" }, locale.reset),
|
|
22977
|
+
/* @__PURE__ */ React.createElement(Button, { key: "rotate" }, locale.avatarCropper.rotate),
|
|
22978
|
+
/* @__PURE__ */ React.createElement(Button, { type: "success", key: "confirm" }, locale.confirm)
|
|
22979
|
+
];
|
|
22959
22980
|
const {
|
|
22960
22981
|
children,
|
|
22961
|
-
toolbar,
|
|
22962
22982
|
maxZoom,
|
|
22963
22983
|
space,
|
|
22984
|
+
toolbar,
|
|
22964
22985
|
toolbarPosition,
|
|
22965
22986
|
editText,
|
|
22966
22987
|
shape,
|
|
@@ -23294,7 +23315,7 @@
|
|
|
23294
23315
|
accept: "image/*",
|
|
23295
23316
|
className: `${classPrefix}-input`,
|
|
23296
23317
|
onChange: (e) => inputImageChange(e),
|
|
23297
|
-
"aria-label":
|
|
23318
|
+
"aria-label": locale.avatarCropper.selectImage
|
|
23298
23319
|
}
|
|
23299
23320
|
), /* @__PURE__ */ React.createElement("div", { className: "nut-avatar-cropper-edit-text" }, editText)), CropperPopup());
|
|
23300
23321
|
};
|
|
@@ -23397,9 +23418,9 @@
|
|
|
23397
23418
|
exports2.Video = Video;
|
|
23398
23419
|
exports2.VirtualList = VirtualList;
|
|
23399
23420
|
exports2.WaterMark = WaterMark;
|
|
23400
|
-
exports2.getDefaultConfig = getDefaultConfig;
|
|
23421
|
+
exports2.getDefaultConfig = getDefaultConfig$1;
|
|
23401
23422
|
exports2.setDefaultConfig = setDefaultConfig;
|
|
23402
|
-
exports2.useConfig = useConfig;
|
|
23423
|
+
exports2.useConfig = useConfig$1;
|
|
23403
23424
|
exports2.useRtl = useRtl;
|
|
23404
23425
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
23405
23426
|
});
|