@rockshin/tao-ui 0.0.45 → 0.0.46
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/README.md +3 -1
- package/component-manifest.json +32 -3
- package/dist/components/alert/alert.js +20 -17
- package/dist/components/avatar/avatar.js +2 -1
- package/dist/components/breadcrumb/breadcrumb.js +81 -77
- package/dist/components/calendar/calendar.d.ts +0 -1
- package/dist/components/calendar/calendar.js +41 -30
- package/dist/components/color-picker/color-picker.js +273 -269
- package/dist/components/date-picker/calendar/calendar-grid.js +10 -4
- package/dist/components/date-picker/calendar/use-calendar.d.ts +2 -2
- package/dist/components/date-picker/calendar/use-calendar.js +2 -3
- package/dist/components/date-picker/date-localization.d.ts +3 -0
- package/dist/components/date-picker/date-localization.js +76 -0
- package/dist/components/date-picker/date-picker.js +35 -27
- package/dist/components/date-picker/range-picker.js +28 -20
- package/dist/components/dropdown/dropdown.js +21 -20
- package/dist/components/float-button/float-button.js +3 -2
- package/dist/components/form/form.js +88 -103
- package/dist/components/image/image.js +202 -137
- package/dist/components/list/list-pagination.js +148 -147
- package/dist/components/modal/confirm-dialog.js +4 -2
- package/dist/components/modal/modal.js +385 -383
- package/dist/components/pagination/pagination.js +115 -110
- package/dist/components/popconfirm/popconfirm.js +109 -107
- package/dist/components/qr-code/qr-code.js +22 -21
- package/dist/components/scroll-area/scroll-area.js +41 -38
- package/dist/components/select/mobile-select.d.ts +1 -1
- package/dist/components/select/mobile-select.js +2 -1
- package/dist/components/sonner/sonner.js +10 -10
- package/dist/components/spinner/spinner.js +1 -1
- package/dist/components/splitter/splitter.js +24 -21
- package/dist/components/statistic/statistic.d.ts +2 -0
- package/dist/components/statistic/statistic.js +203 -187
- package/dist/components/table/table-filter.js +61 -52
- package/dist/components/table/table-icons.js +3 -1
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.js +5 -4
- package/dist/components/tag/tag.js +22 -19
- package/dist/components/time-picker/time-picker.d.ts +0 -1
- package/dist/components/time-picker/time-picker.js +139 -96
- package/dist/components/transfer/transfer-list.js +224 -488
- package/dist/components/transfer/transfer-parts.js +2 -2
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +13 -16
- package/dist/components/upload/upload.js +30 -26
- package/dist/docs/component-docs.d.ts +13 -2
- package/dist/docs/components/headless-input-number.doc.d.ts +5 -0
- package/dist/docs/components/headless-input-number.doc.js +7 -0
- package/dist/docs/components/input-number.doc.d.ts +5 -0
- package/dist/docs/components/input-number.doc.js +7 -0
- package/dist/docs/components/statistic.doc.d.ts +5 -0
- package/dist/docs/components/statistic.doc.js +7 -0
- package/dist/docs/components/tao-provider.doc.d.ts +8 -2
- package/dist/docs/components/tao-provider.doc.js +10 -2
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/entries/provider.d.ts +1 -0
- package/dist/entries/provider.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/locales/ar-EG.d.ts +3 -0
- package/dist/locales/ar-EG.js +199 -0
- package/dist/locales/create-locale.d.ts +41 -0
- package/dist/locales/create-locale.js +88 -0
- package/dist/locales/de-DE.d.ts +3 -0
- package/dist/locales/de-DE.js +195 -0
- package/dist/locales/en-US.d.ts +2 -0
- package/dist/locales/en-US.js +194 -0
- package/dist/locales/es-ES.d.ts +3 -0
- package/dist/locales/es-ES.js +195 -0
- package/dist/locales/fr-FR.d.ts +3 -0
- package/dist/locales/fr-FR.js +195 -0
- package/dist/locales/hi-IN.d.ts +3 -0
- package/dist/locales/hi-IN.js +194 -0
- package/dist/locales/id-ID.d.ts +3 -0
- package/dist/locales/id-ID.js +194 -0
- package/dist/locales/index.d.ts +18 -0
- package/dist/locales/index.js +17 -0
- package/dist/locales/it-IT.d.ts +3 -0
- package/dist/locales/it-IT.js +195 -0
- package/dist/locales/ja-JP.d.ts +3 -0
- package/dist/locales/ja-JP.js +194 -0
- package/dist/locales/ko-KR.d.ts +3 -0
- package/dist/locales/ko-KR.js +194 -0
- package/dist/locales/pt-BR.d.ts +3 -0
- package/dist/locales/pt-BR.js +195 -0
- package/dist/locales/ru-RU.d.ts +3 -0
- package/dist/locales/ru-RU.js +197 -0
- package/dist/locales/th-TH.d.ts +3 -0
- package/dist/locales/th-TH.js +194 -0
- package/dist/locales/tr-TR.d.ts +3 -0
- package/dist/locales/tr-TR.js +194 -0
- package/dist/locales/types.d.ts +176 -0
- package/dist/locales/types.js +0 -0
- package/dist/locales/vi-VN.d.ts +3 -0
- package/dist/locales/vi-VN.js +194 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +194 -0
- package/dist/locales/zh-TW.d.ts +3 -0
- package/dist/locales/zh-TW.js +194 -0
- package/dist/number-input/format.d.ts +4 -3
- package/dist/number-input/format.js +9 -7
- package/dist/number-input/locale.d.ts +19 -0
- package/dist/number-input/locale.js +44 -0
- package/dist/number-input/number-input.js +1 -0
- package/dist/number-input/use-number-input.d.ts +2 -0
- package/dist/number-input/use-number-input.js +180 -176
- package/dist/provider/locale.d.ts +3 -65
- package/dist/provider/locale.js +2 -146
- package/dist/provider/merge-locale.d.ts +8 -0
- package/dist/provider/merge-locale.js +53 -0
- package/dist/provider/tao-provider.d.ts +6 -2
- package/dist/provider/tao-provider.js +2 -4
- package/llms.txt +1 -1
- package/package.json +5 -1
|
@@ -6,7 +6,7 @@ import { cx } from "../../utils/semantic.js";
|
|
|
6
6
|
import { Select } from "../select/select.js";
|
|
7
7
|
import "./list-pagination.css";
|
|
8
8
|
function ListPaginationControl(props) {
|
|
9
|
-
const $ = c(
|
|
9
|
+
const $ = c(85);
|
|
10
10
|
let className;
|
|
11
11
|
let classNames;
|
|
12
12
|
let components;
|
|
@@ -98,7 +98,6 @@ function ListPaginationControl(props) {
|
|
|
98
98
|
$[22] = t2;
|
|
99
99
|
} else t2 = $[22];
|
|
100
100
|
const semanticStyles = t2;
|
|
101
|
-
const chinese = contextLocale.locale?.startsWith("zh");
|
|
102
101
|
const CustomSelect = components?.sizeChanger ?? selectComponentClass;
|
|
103
102
|
let t3;
|
|
104
103
|
if ($[23] !== showSizeChanger) {
|
|
@@ -112,131 +111,133 @@ function ListPaginationControl(props) {
|
|
|
112
111
|
const t4 = "default" === size ? "medium" : size ?? contextSize;
|
|
113
112
|
const t5 = responsive ? "" : void 0;
|
|
114
113
|
const t6 = props.disabled ?? disabled;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
page_size: t11,
|
|
114
|
+
let t7;
|
|
115
|
+
if ($[25] !== contextLocale.messages.itemsPerPage || $[26] !== contextLocale.messages.jumpTo || $[27] !== contextLocale.messages.jumpToConfirm || $[28] !== contextLocale.messages.nextPage || $[29] !== contextLocale.messages.nextPages || $[30] !== contextLocale.messages.pageSize || $[31] !== contextLocale.messages.pageUnit || $[32] !== contextLocale.messages.previousPage || $[33] !== contextLocale.messages.previousPages || $[34] !== locale) {
|
|
116
|
+
t7 = {
|
|
117
|
+
items_per_page: contextLocale.messages.itemsPerPage,
|
|
118
|
+
jump_to: contextLocale.messages.jumpTo,
|
|
119
|
+
jump_to_confirm: contextLocale.messages.jumpToConfirm,
|
|
120
|
+
page: contextLocale.messages.pageUnit,
|
|
121
|
+
prev_page: contextLocale.messages.previousPage,
|
|
122
|
+
next_page: contextLocale.messages.nextPage,
|
|
123
|
+
page_size: contextLocale.messages.pageSize,
|
|
124
|
+
prev_5: contextLocale.messages.previousPages,
|
|
125
|
+
next_5: contextLocale.messages.nextPages,
|
|
126
|
+
prev_3: contextLocale.messages.previousPages,
|
|
127
|
+
next_3: contextLocale.messages.nextPages,
|
|
130
128
|
...locale
|
|
131
129
|
};
|
|
132
|
-
$[25] = contextLocale.
|
|
133
|
-
$[26] = contextLocale.
|
|
134
|
-
$[27] =
|
|
135
|
-
$[28] =
|
|
136
|
-
$[29] =
|
|
137
|
-
$[30] =
|
|
138
|
-
$[31] =
|
|
139
|
-
$[32] =
|
|
140
|
-
$[33] =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
$[36] =
|
|
149
|
-
$[37] =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
130
|
+
$[25] = contextLocale.messages.itemsPerPage;
|
|
131
|
+
$[26] = contextLocale.messages.jumpTo;
|
|
132
|
+
$[27] = contextLocale.messages.jumpToConfirm;
|
|
133
|
+
$[28] = contextLocale.messages.nextPage;
|
|
134
|
+
$[29] = contextLocale.messages.nextPages;
|
|
135
|
+
$[30] = contextLocale.messages.pageSize;
|
|
136
|
+
$[31] = contextLocale.messages.pageUnit;
|
|
137
|
+
$[32] = contextLocale.messages.previousPage;
|
|
138
|
+
$[33] = contextLocale.messages.previousPages;
|
|
139
|
+
$[34] = locale;
|
|
140
|
+
$[35] = t7;
|
|
141
|
+
} else t7 = $[35];
|
|
142
|
+
const t8 = classes?.root;
|
|
143
|
+
let t9;
|
|
144
|
+
if ($[36] !== className || $[37] !== rootClassName || $[38] !== t8) {
|
|
145
|
+
t9 = cx(t8, rootClassName, className);
|
|
146
|
+
$[36] = className;
|
|
147
|
+
$[37] = rootClassName;
|
|
148
|
+
$[38] = t8;
|
|
149
|
+
$[39] = t9;
|
|
150
|
+
} else t9 = $[39];
|
|
151
|
+
const t10 = semanticStyles?.root;
|
|
152
|
+
let t11;
|
|
153
|
+
if ($[40] !== style || $[41] !== t10) {
|
|
154
|
+
t11 = {
|
|
155
|
+
...t10,
|
|
156
156
|
...style
|
|
157
157
|
};
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
} else
|
|
162
|
-
const
|
|
163
|
-
let
|
|
164
|
-
if ($[
|
|
165
|
-
|
|
166
|
-
item:
|
|
158
|
+
$[40] = style;
|
|
159
|
+
$[41] = t10;
|
|
160
|
+
$[42] = t11;
|
|
161
|
+
} else t11 = $[42];
|
|
162
|
+
const t12 = classes?.item;
|
|
163
|
+
let t13;
|
|
164
|
+
if ($[43] !== t12) {
|
|
165
|
+
t13 = {
|
|
166
|
+
item: t12
|
|
167
167
|
};
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
} else
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
if ($[
|
|
174
|
-
|
|
175
|
-
item:
|
|
168
|
+
$[43] = t12;
|
|
169
|
+
$[44] = t13;
|
|
170
|
+
} else t13 = $[44];
|
|
171
|
+
const t14 = semanticStyles?.item;
|
|
172
|
+
let t15;
|
|
173
|
+
if ($[45] !== t14) {
|
|
174
|
+
t15 = {
|
|
175
|
+
item: t14
|
|
176
176
|
};
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
} else
|
|
177
|
+
$[45] = t14;
|
|
178
|
+
$[46] = t15;
|
|
179
|
+
} else t15 = $[46];
|
|
180
|
+
let t16;
|
|
181
|
+
if ($[47] !== pageSizeOptions) {
|
|
182
|
+
t16 = pageSizeOptions?.map(Number);
|
|
183
|
+
$[47] = pageSizeOptions;
|
|
184
|
+
$[48] = t16;
|
|
185
|
+
} else t16 = $[48];
|
|
186
|
+
const t17 = "object" == typeof showSizeChanger ? true : showSizeChanger;
|
|
187
|
+
let t18;
|
|
188
|
+
let t19;
|
|
189
|
+
let t20;
|
|
180
190
|
let t21;
|
|
181
|
-
if ($[
|
|
182
|
-
|
|
183
|
-
$[45] = pageSizeOptions;
|
|
184
|
-
$[46] = t21;
|
|
185
|
-
} else t21 = $[46];
|
|
186
|
-
const t22 = "object" == typeof showSizeChanger ? true : showSizeChanger;
|
|
187
|
-
let t23;
|
|
188
|
-
let t24;
|
|
189
|
-
let t25;
|
|
190
|
-
let t26;
|
|
191
|
-
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
-
t23 = /*#__PURE__*/ jsx("span", {
|
|
191
|
+
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
+
t18 = /*#__PURE__*/ jsx("span", {
|
|
193
193
|
"aria-hidden": "true",
|
|
194
194
|
children: "‹"
|
|
195
195
|
});
|
|
196
|
-
|
|
196
|
+
t19 = /*#__PURE__*/ jsx("span", {
|
|
197
197
|
"aria-hidden": "true",
|
|
198
198
|
children: "›"
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
t20 = /*#__PURE__*/ jsx("span", {
|
|
201
201
|
"aria-hidden": "true",
|
|
202
202
|
children: "…"
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
t21 = /*#__PURE__*/ jsx("span", {
|
|
205
205
|
"aria-hidden": "true",
|
|
206
206
|
children: "…"
|
|
207
207
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
208
|
+
$[49] = t18;
|
|
209
|
+
$[50] = t19;
|
|
210
|
+
$[51] = t20;
|
|
211
|
+
$[52] = t21;
|
|
212
212
|
} else {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
t18 = $[49];
|
|
214
|
+
t19 = $[50];
|
|
215
|
+
t20 = $[51];
|
|
216
|
+
t21 = $[52];
|
|
217
217
|
}
|
|
218
|
-
let
|
|
219
|
-
if ($[
|
|
220
|
-
|
|
218
|
+
let t22;
|
|
219
|
+
if ($[53] !== contextLocale.messages || $[54] !== contextLocale.next || $[55] !== contextLocale.previous || $[56] !== current || $[57] !== disabled || $[58] !== itemRender || $[59] !== props.disabled || $[60] !== totalPages) {
|
|
220
|
+
t22 = itemRender ?? ((page, type)=>/*#__PURE__*/ jsx("button", {
|
|
221
221
|
"data-tao-list-page-button": "",
|
|
222
222
|
type: "button",
|
|
223
|
-
"aria-label": "page" === type ?
|
|
223
|
+
"aria-label": "page" === type ? contextLocale.messages.page(page) : "prev" === type ? contextLocale.previous : "next" === type ? contextLocale.next : "jump-prev" === type ? contextLocale.messages.previousPages : contextLocale.messages.nextPages,
|
|
224
224
|
"aria-current": "page" === type && page === current ? "page" : void 0,
|
|
225
225
|
disabled: !!(props.disabled ?? disabled) || page < 1 || page > totalPages,
|
|
226
226
|
children: "page" === type ? page : "prev" === type ? "\u2039" : "next" === type ? "\u203A" : "\u2026"
|
|
227
227
|
}));
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
228
|
+
$[53] = contextLocale.messages;
|
|
229
|
+
$[54] = contextLocale.next;
|
|
230
|
+
$[55] = contextLocale.previous;
|
|
231
|
+
$[56] = current;
|
|
232
|
+
$[57] = disabled;
|
|
233
|
+
$[58] = itemRender;
|
|
234
|
+
$[59] = props.disabled;
|
|
235
|
+
$[60] = totalPages;
|
|
236
|
+
$[61] = t22;
|
|
237
|
+
} else t22 = $[61];
|
|
238
|
+
let t23;
|
|
239
|
+
if ($[62] !== CustomSelect || $[63] !== contextSize || $[64] !== selectProps || $[65] !== size || $[66] !== sizeChangerRender) {
|
|
240
|
+
t23 = sizeChangerRender ?? ((info)=>CustomSelect ? /*#__PURE__*/ jsx(CustomSelect, {
|
|
240
241
|
value: info.size,
|
|
241
242
|
onChange: info.onSizeChange,
|
|
242
243
|
disabled: info.disabled,
|
|
@@ -257,61 +258,61 @@ function ListPaginationControl(props) {
|
|
|
257
258
|
...selectProps.style
|
|
258
259
|
}
|
|
259
260
|
}));
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
} else
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
261
|
+
$[62] = CustomSelect;
|
|
262
|
+
$[63] = contextSize;
|
|
263
|
+
$[64] = selectProps;
|
|
264
|
+
$[65] = size;
|
|
265
|
+
$[66] = sizeChangerRender;
|
|
266
|
+
$[67] = t23;
|
|
267
|
+
} else t23 = $[67];
|
|
268
|
+
let t24;
|
|
269
|
+
if ($[68] !== prefixCls || $[69] !== rest || $[70] !== t11 || $[71] !== t13 || $[72] !== t15 || $[73] !== t16 || $[74] !== t17 || $[75] !== t22 || $[76] !== t23 || $[77] !== t6 || $[78] !== t7 || $[79] !== t9) {
|
|
270
|
+
t24 = /*#__PURE__*/ jsx(pagination, {
|
|
270
271
|
...rest,
|
|
271
272
|
prefixCls: prefixCls,
|
|
272
273
|
disabled: t6,
|
|
273
|
-
locale:
|
|
274
|
-
className:
|
|
275
|
-
style:
|
|
276
|
-
classNames:
|
|
277
|
-
styles:
|
|
278
|
-
pageSizeOptions:
|
|
279
|
-
showSizeChanger:
|
|
280
|
-
prevIcon:
|
|
281
|
-
nextIcon:
|
|
282
|
-
jumpPrevIcon:
|
|
283
|
-
jumpNextIcon:
|
|
284
|
-
itemRender:
|
|
285
|
-
sizeChangerRender:
|
|
274
|
+
locale: t7,
|
|
275
|
+
className: t9,
|
|
276
|
+
style: t11,
|
|
277
|
+
classNames: t13,
|
|
278
|
+
styles: t15,
|
|
279
|
+
pageSizeOptions: t16,
|
|
280
|
+
showSizeChanger: t17,
|
|
281
|
+
prevIcon: t18,
|
|
282
|
+
nextIcon: t19,
|
|
283
|
+
jumpPrevIcon: t20,
|
|
284
|
+
jumpNextIcon: t21,
|
|
285
|
+
itemRender: t22,
|
|
286
|
+
sizeChangerRender: t23
|
|
286
287
|
});
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
} else
|
|
301
|
-
let
|
|
302
|
-
if ($[
|
|
303
|
-
|
|
288
|
+
$[68] = prefixCls;
|
|
289
|
+
$[69] = rest;
|
|
290
|
+
$[70] = t11;
|
|
291
|
+
$[71] = t13;
|
|
292
|
+
$[72] = t15;
|
|
293
|
+
$[73] = t16;
|
|
294
|
+
$[74] = t17;
|
|
295
|
+
$[75] = t22;
|
|
296
|
+
$[76] = t23;
|
|
297
|
+
$[77] = t6;
|
|
298
|
+
$[78] = t7;
|
|
299
|
+
$[79] = t9;
|
|
300
|
+
$[80] = t24;
|
|
301
|
+
} else t24 = $[80];
|
|
302
|
+
let t25;
|
|
303
|
+
if ($[81] !== t24 || $[82] !== t4 || $[83] !== t5) {
|
|
304
|
+
t25 = /*#__PURE__*/ jsx("div", {
|
|
304
305
|
"data-tao-list-pages": "",
|
|
305
306
|
"data-tao-size": t4,
|
|
306
307
|
"data-tao-responsive": t5,
|
|
307
|
-
children:
|
|
308
|
+
children: t24
|
|
308
309
|
});
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
} else
|
|
314
|
-
return
|
|
310
|
+
$[81] = t24;
|
|
311
|
+
$[82] = t4;
|
|
312
|
+
$[83] = t5;
|
|
313
|
+
$[84] = t25;
|
|
314
|
+
} else t25 = $[84];
|
|
315
|
+
return t25;
|
|
315
316
|
}
|
|
316
317
|
function _temp(option_0) {
|
|
317
318
|
return {
|
|
@@ -5,10 +5,12 @@ import { cx } from "../../utils/semantic.js";
|
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
6
|
import { StatusIcon } from "../status-icon/status-icon.js";
|
|
7
7
|
import { Modal } from "./modal.js";
|
|
8
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
8
9
|
function isPromise(v) {
|
|
9
10
|
return !!v && 'function' == typeof v.then;
|
|
10
11
|
}
|
|
11
12
|
function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered = true, width = 416, maskClosable = false, closable = false, keyboard = true, className, classNames, styles }) {
|
|
13
|
+
const { locale } = useTaoConfig();
|
|
12
14
|
const [loading, setLoading] = useState(false);
|
|
13
15
|
const [cancelLoading, setCancelLoading] = useState(false);
|
|
14
16
|
const cancelPending = useRef(false);
|
|
@@ -69,7 +71,7 @@ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, co
|
|
|
69
71
|
loading: cancelLoading,
|
|
70
72
|
onClick: handleCancel,
|
|
71
73
|
...cancelButtonProps,
|
|
72
|
-
children: cancelText ??
|
|
74
|
+
children: cancelText ?? locale.cancel
|
|
73
75
|
}),
|
|
74
76
|
/*#__PURE__*/ jsx(Button, {
|
|
75
77
|
variant: "primary",
|
|
@@ -77,7 +79,7 @@ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, co
|
|
|
77
79
|
onClick: handleOk,
|
|
78
80
|
...okButtonProps,
|
|
79
81
|
disabled: cancelLoading || okButtonProps?.disabled,
|
|
80
|
-
children: okText ??
|
|
82
|
+
children: okText ?? locale.ok
|
|
81
83
|
})
|
|
82
84
|
]
|
|
83
85
|
}),
|