@rockshin/tao-ui 0.0.47 → 0.0.49
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/dist/components/affix/affix.js +20 -16
- package/dist/components/alert/alert.js +114 -99
- package/dist/components/app/app-modals.js +134 -96
- package/dist/components/app/app-notices.js +39 -23
- package/dist/components/auto-complete/auto-complete.js +21 -7
- package/dist/components/avatar/avatar.js +31 -11
- package/dist/components/badge/badge.css +1 -1
- package/dist/components/badge/badge.js +72 -257
- package/dist/components/border-beam/border-beam.js +21 -17
- package/dist/components/breadcrumb/breadcrumb.js +178 -159
- package/dist/components/button/button.js +61 -53
- package/dist/components/calendar/calendar.js +6 -4
- package/dist/components/card/card.js +24 -8
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/carousel.js +105 -68
- package/dist/components/cascader/cascader.js +54 -19
- package/dist/components/checkbox/checkbox.css +13 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +320 -229
- package/dist/components/collapse/collapse-panels.d.ts +1 -1
- package/dist/components/collapse/collapse-panels.js +122 -113
- package/dist/components/collapse/collapse.js +98 -63
- package/dist/components/color-picker/color-picker.js +539 -441
- package/dist/components/color-picker/color.js +1 -1
- package/dist/components/context-menu/context-menu.d.ts +1 -1
- package/dist/components/context-menu/context-menu.js +108 -68
- package/dist/components/date-picker/calendar/calendar-grid.js +42 -39
- package/dist/components/date-picker/calendar/month-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/month-grid.js +79 -37
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -1
- package/dist/components/date-picker/calendar/time-panel.js +94 -89
- package/dist/components/date-picker/calendar/year-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/year-grid.js +66 -35
- package/dist/components/date-picker/date-picker.css +24 -1
- package/dist/components/date-picker/date-picker.js +99 -53
- package/dist/components/date-picker/presets.d.ts +2 -1
- package/dist/components/date-picker/presets.js +27 -24
- package/dist/components/date-picker/range-picker.js +308 -153
- package/dist/components/descriptions/descriptions.js +7 -3
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.js +201 -369
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.js +183 -279
- package/dist/components/empty/empty.js +57 -78
- package/dist/components/float-button/float-button.d.ts +1 -0
- package/dist/components/float-button/float-button.js +47 -30
- package/dist/components/form/field-control.d.ts +4 -2
- package/dist/components/form/field-control.js +17 -9
- package/dist/components/form/form-context.d.ts +8 -2
- package/dist/components/form/form-context.js +2 -1
- package/dist/components/form/form-item.js +85 -63
- package/dist/components/form/form.css +3 -2
- package/dist/components/form/use-form.d.ts +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +194 -141
- package/dist/components/form-section/form-section.d.ts +1 -1
- package/dist/components/form-section/form-section.js +52 -45
- package/dist/components/image/image.js +585 -477
- package/dist/components/input/base-input.js +8 -9
- package/dist/components/input/input-shared.d.ts +5 -2
- package/dist/components/input/input-shared.js +42 -18
- package/dist/components/input/otp.js +236 -217
- package/dist/components/input/password.js +2 -1
- package/dist/components/input/search.js +8 -7
- package/dist/components/list/list-pagination.js +41 -36
- package/dist/components/list/list.js +141 -125
- package/dist/components/listy/listy.js +175 -106
- package/dist/components/masonry/masonry.js +108 -85
- package/dist/components/mentions/mentions.js +12 -3
- package/dist/components/menu/menu-render.d.ts +9 -3
- package/dist/components/menu/menu-render.js +99 -36
- package/dist/components/modal/confirm-dialog.js +10 -4
- package/dist/components/modal/confirm.js +3 -7
- package/dist/components/modal/index.js +9 -3
- package/dist/components/modal/modal.js +390 -365
- package/dist/components/pagination/pagination.js +105 -96
- package/dist/components/popconfirm/popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.js +219 -168
- package/dist/components/popover/popover.js +330 -243
- package/dist/components/progress/progress.css +2 -2
- package/dist/components/progress/progress.js +232 -458
- package/dist/components/qr-code/qr-code.js +72 -66
- package/dist/components/radio/radio.css +15 -4
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +260 -198
- package/dist/components/rate/rate.js +173 -113
- package/dist/components/scroll-area/scroll-area.js +241 -211
- package/dist/components/segmented/segmented.js +73 -41
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +24 -13
- package/dist/components/select/select-searchable-list.d.ts +2 -1
- package/dist/components/select/select-searchable-list.js +2 -3
- package/dist/components/select/select.js +49 -25
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +7 -4
- package/dist/components/skeleton/skeleton.js +56 -48
- package/dist/components/slider/slider.js +87 -212
- package/dist/components/sonner/sonner.js +109 -93
- package/dist/components/spinner/spinner.js +147 -138
- package/dist/components/splitter/splitter.js +222 -159
- package/dist/components/statistic/statistic.js +7 -6
- package/dist/components/steps/steps.js +88 -81
- package/dist/components/steps/use-display-steps.js +1 -1
- package/dist/components/switch/switch.js +89 -89
- package/dist/components/table/table-filter.js +66 -56
- package/dist/components/table/table-icons.d.ts +2 -1
- package/dist/components/table/table-icons.js +11 -9
- package/dist/components/table/table-model.js +1 -1
- package/dist/components/table/table.js +107 -83
- package/dist/components/table/use-table-data.d.ts +6 -3
- package/dist/components/table/use-table-data.js +166 -130
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.js +236 -179
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +111 -108
- package/dist/components/textarea/textarea.js +22 -17
- package/dist/components/time-picker/time-picker.js +5 -3
- package/dist/components/timeline/timeline.css +6 -1
- package/dist/components/timeline/timeline.js +21 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +123 -233
- package/dist/components/tour/tour.css +4 -0
- package/dist/components/tour/tour.js +400 -331
- package/dist/components/transfer/transfer-list.js +29 -11
- package/dist/components/transfer/transfer-parts.js +1 -1
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +29 -14
- package/dist/components/tree/tree-keyboard.d.ts +1 -1
- package/dist/components/tree/tree-keyboard.js +5 -3
- package/dist/components/tree/tree.js +74 -59
- package/dist/components/tree-select/select-engine.d.ts +3 -2
- package/dist/components/tree-select/select-engine.js +18 -16
- package/dist/components/tree-select/tree-select.js +21 -5
- package/dist/components/upload/upload.css +8 -0
- package/dist/components/upload/upload.js +160 -72
- package/dist/components/watermark/watermark.js +36 -29
- package/dist/number-input/use-number-input.js +129 -90
- package/dist/number-input/validate.js +32 -5
- package/dist/provider/merge-locale.js +12 -9
- package/dist/provider/tao-provider.d.ts +3 -1
- package/dist/provider/tao-provider.js +123 -86
- package/package.json +1 -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(86);
|
|
10
10
|
let className;
|
|
11
11
|
let classNames;
|
|
12
12
|
let components;
|
|
@@ -216,8 +216,9 @@ function ListPaginationControl(props) {
|
|
|
216
216
|
t21 = $[52];
|
|
217
217
|
}
|
|
218
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) {
|
|
219
|
+
if ($[53] !== contextLocale.messages || $[54] !== contextLocale.next || $[55] !== contextLocale.previous || $[56] !== current || $[57] !== disabled || $[58] !== itemRender || $[59] !== props.disabled || $[60] !== props.simple || $[61] !== totalPages) {
|
|
220
220
|
t22 = itemRender ?? ((page, type)=>/*#__PURE__*/ jsx("button", {
|
|
221
|
+
ref: "next" === type && props.simple && 1 === current ? _temp : void 0,
|
|
221
222
|
"data-tao-list-page-button": "",
|
|
222
223
|
type: "button",
|
|
223
224
|
"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,
|
|
@@ -232,11 +233,12 @@ function ListPaginationControl(props) {
|
|
|
232
233
|
$[57] = disabled;
|
|
233
234
|
$[58] = itemRender;
|
|
234
235
|
$[59] = props.disabled;
|
|
235
|
-
$[60] =
|
|
236
|
-
$[61] =
|
|
237
|
-
|
|
236
|
+
$[60] = props.simple;
|
|
237
|
+
$[61] = totalPages;
|
|
238
|
+
$[62] = t22;
|
|
239
|
+
} else t22 = $[62];
|
|
238
240
|
let t23;
|
|
239
|
-
if ($[
|
|
241
|
+
if ($[63] !== CustomSelect || $[64] !== contextSize || $[65] !== selectProps || $[66] !== size || $[67] !== sizeChangerRender) {
|
|
240
242
|
t23 = sizeChangerRender ?? ((info)=>CustomSelect ? /*#__PURE__*/ jsx(CustomSelect, {
|
|
241
243
|
value: info.size,
|
|
242
244
|
onChange: info.onSizeChange,
|
|
@@ -249,7 +251,7 @@ function ListPaginationControl(props) {
|
|
|
249
251
|
info.onSizeChange(Number(value));
|
|
250
252
|
selectProps.onChange?.(value, option);
|
|
251
253
|
},
|
|
252
|
-
options: info.options.map(
|
|
254
|
+
options: info.options.map(_temp2),
|
|
253
255
|
disabled: info.disabled,
|
|
254
256
|
size: "default" === size ? "medium" : size ?? contextSize,
|
|
255
257
|
"aria-label": info["aria-label"],
|
|
@@ -258,15 +260,15 @@ function ListPaginationControl(props) {
|
|
|
258
260
|
...selectProps.style
|
|
259
261
|
}
|
|
260
262
|
}));
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
} else t23 = $[
|
|
263
|
+
$[63] = CustomSelect;
|
|
264
|
+
$[64] = contextSize;
|
|
265
|
+
$[65] = selectProps;
|
|
266
|
+
$[66] = size;
|
|
267
|
+
$[67] = sizeChangerRender;
|
|
268
|
+
$[68] = t23;
|
|
269
|
+
} else t23 = $[68];
|
|
268
270
|
let t24;
|
|
269
|
-
if ($[
|
|
271
|
+
if ($[69] !== prefixCls || $[70] !== rest || $[71] !== t11 || $[72] !== t13 || $[73] !== t15 || $[74] !== t16 || $[75] !== t17 || $[76] !== t22 || $[77] !== t23 || $[78] !== t6 || $[79] !== t7 || $[80] !== t9) {
|
|
270
272
|
t24 = /*#__PURE__*/ jsx(pagination, {
|
|
271
273
|
...rest,
|
|
272
274
|
prefixCls: prefixCls,
|
|
@@ -285,39 +287,42 @@ function ListPaginationControl(props) {
|
|
|
285
287
|
itemRender: t22,
|
|
286
288
|
sizeChangerRender: t23
|
|
287
289
|
});
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
} else t24 = $[
|
|
290
|
+
$[69] = prefixCls;
|
|
291
|
+
$[70] = rest;
|
|
292
|
+
$[71] = t11;
|
|
293
|
+
$[72] = t13;
|
|
294
|
+
$[73] = t15;
|
|
295
|
+
$[74] = t16;
|
|
296
|
+
$[75] = t17;
|
|
297
|
+
$[76] = t22;
|
|
298
|
+
$[77] = t23;
|
|
299
|
+
$[78] = t6;
|
|
300
|
+
$[79] = t7;
|
|
301
|
+
$[80] = t9;
|
|
302
|
+
$[81] = t24;
|
|
303
|
+
} else t24 = $[81];
|
|
302
304
|
let t25;
|
|
303
|
-
if ($[
|
|
305
|
+
if ($[82] !== t24 || $[83] !== t4 || $[84] !== t5) {
|
|
304
306
|
t25 = /*#__PURE__*/ jsx("div", {
|
|
305
307
|
"data-tao-list-pages": "",
|
|
306
308
|
"data-tao-size": t4,
|
|
307
309
|
"data-tao-responsive": t5,
|
|
308
310
|
children: t24
|
|
309
311
|
});
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
} else t25 = $[
|
|
312
|
+
$[82] = t24;
|
|
313
|
+
$[83] = t4;
|
|
314
|
+
$[84] = t5;
|
|
315
|
+
$[85] = t25;
|
|
316
|
+
} else t25 = $[85];
|
|
315
317
|
return t25;
|
|
316
318
|
}
|
|
317
|
-
function
|
|
319
|
+
function _temp2(option_0) {
|
|
318
320
|
return {
|
|
319
321
|
...option_0,
|
|
320
322
|
value: String(option_0.value)
|
|
321
323
|
};
|
|
322
324
|
}
|
|
325
|
+
function _temp(button) {
|
|
326
|
+
if (button && !button.disabled) button.tabIndex = 0;
|
|
327
|
+
}
|
|
323
328
|
export { ListPaginationControl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { Children, Fragment, createContext, forwardRef, useContext, useImperativeHandle, useRef, useState } from "react";
|
|
3
|
+
import { Children, Fragment, createContext, forwardRef, isValidElement, useContext, useImperativeHandle, useRef, useState } from "react";
|
|
4
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import { Empty } from "../empty/empty.js";
|
|
@@ -144,7 +144,7 @@ const Meta = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
|
144
144
|
});
|
|
145
145
|
Meta.displayName = 'List.Item.Meta';
|
|
146
146
|
const ItemRoot = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
147
|
-
const $ = c(
|
|
147
|
+
const $ = c(42);
|
|
148
148
|
let actions;
|
|
149
149
|
let children;
|
|
150
150
|
let className;
|
|
@@ -183,101 +183,108 @@ const ItemRoot = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
|
183
183
|
const { itemLayout: t1, grid } = useContext(ListContext);
|
|
184
184
|
const itemLayout = void 0 === t1 ? "horizontal" : t1;
|
|
185
185
|
let t2;
|
|
186
|
-
if ($[11] !== actions
|
|
187
|
-
t2 = actions?.
|
|
186
|
+
if ($[11] !== actions) {
|
|
187
|
+
t2 = actions?.flatMap(_temp);
|
|
188
|
+
$[11] = actions;
|
|
189
|
+
$[12] = t2;
|
|
190
|
+
} else t2 = $[12];
|
|
191
|
+
const actionItems = t2;
|
|
192
|
+
let t3;
|
|
193
|
+
if ($[13] !== actionItems || $[14] !== classNames?.actions || $[15] !== styles?.actions) {
|
|
194
|
+
t3 = actionItems?.length ? /*#__PURE__*/ jsx("ul", {
|
|
188
195
|
"data-tao-list-item-actions": "",
|
|
189
196
|
className: classNames?.actions,
|
|
190
197
|
style: styles?.actions,
|
|
191
|
-
children:
|
|
198
|
+
children: actionItems
|
|
192
199
|
}) : null;
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
} else
|
|
198
|
-
const actionNodes =
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
let
|
|
202
|
-
if ($[
|
|
203
|
-
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
} else
|
|
209
|
-
const
|
|
210
|
-
let
|
|
211
|
-
if ($[
|
|
212
|
-
|
|
200
|
+
$[13] = actionItems;
|
|
201
|
+
$[14] = classNames?.actions;
|
|
202
|
+
$[15] = styles?.actions;
|
|
203
|
+
$[16] = t3;
|
|
204
|
+
} else t3 = $[16];
|
|
205
|
+
const actionNodes = t3;
|
|
206
|
+
const t4 = grid ? "" : void 0;
|
|
207
|
+
const t5 = classNames?.root;
|
|
208
|
+
let t6;
|
|
209
|
+
if ($[17] !== className || $[18] !== prefixCls || $[19] !== t5) {
|
|
210
|
+
t6 = cx(prefixCls, t5, className);
|
|
211
|
+
$[17] = className;
|
|
212
|
+
$[18] = prefixCls;
|
|
213
|
+
$[19] = t5;
|
|
214
|
+
$[20] = t6;
|
|
215
|
+
} else t6 = $[20];
|
|
216
|
+
const t7 = styles?.root;
|
|
217
|
+
let t8;
|
|
218
|
+
if ($[21] !== colStyle || $[22] !== style || $[23] !== t7) {
|
|
219
|
+
t8 = {
|
|
213
220
|
...colStyle,
|
|
214
|
-
...
|
|
221
|
+
...t7,
|
|
215
222
|
...style
|
|
216
223
|
};
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
} else
|
|
222
|
-
const
|
|
223
|
-
let
|
|
224
|
-
if ($[
|
|
225
|
-
|
|
224
|
+
$[21] = colStyle;
|
|
225
|
+
$[22] = style;
|
|
226
|
+
$[23] = t7;
|
|
227
|
+
$[24] = t8;
|
|
228
|
+
} else t8 = $[24];
|
|
229
|
+
const t9 = "vertical" === itemLayout && actionNodes;
|
|
230
|
+
let t10;
|
|
231
|
+
if ($[25] !== children || $[26] !== t9) {
|
|
232
|
+
t10 = /*#__PURE__*/ jsxs("div", {
|
|
226
233
|
"data-tao-list-item-main": "",
|
|
227
234
|
children: [
|
|
228
235
|
children,
|
|
229
|
-
|
|
236
|
+
t9
|
|
230
237
|
]
|
|
231
238
|
});
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else
|
|
236
|
-
const
|
|
237
|
-
let
|
|
238
|
-
if ($[
|
|
239
|
-
|
|
239
|
+
$[25] = children;
|
|
240
|
+
$[26] = t9;
|
|
241
|
+
$[27] = t10;
|
|
242
|
+
} else t10 = $[27];
|
|
243
|
+
const t11 = "vertical" !== itemLayout && actionNodes;
|
|
244
|
+
let t12;
|
|
245
|
+
if ($[28] !== classNames?.extra || $[29] !== extra || $[30] !== styles?.extra) {
|
|
246
|
+
t12 = null != extra && /*#__PURE__*/ jsx("div", {
|
|
240
247
|
"data-tao-list-item-extra": "",
|
|
241
248
|
className: classNames?.extra,
|
|
242
249
|
style: styles?.extra,
|
|
243
250
|
children: extra
|
|
244
251
|
});
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
} else
|
|
250
|
-
let
|
|
251
|
-
if ($[
|
|
252
|
-
|
|
252
|
+
$[28] = classNames?.extra;
|
|
253
|
+
$[29] = extra;
|
|
254
|
+
$[30] = styles?.extra;
|
|
255
|
+
$[31] = t12;
|
|
256
|
+
} else t12 = $[31];
|
|
257
|
+
let t13;
|
|
258
|
+
if ($[32] !== itemLayout || $[33] !== ref || $[34] !== rest || $[35] !== t10 || $[36] !== t11 || $[37] !== t12 || $[38] !== t4 || $[39] !== t6 || $[40] !== t8) {
|
|
259
|
+
t13 = /*#__PURE__*/ jsx("li", {
|
|
253
260
|
"data-tao-list-item-wrapper": "",
|
|
254
261
|
children: /*#__PURE__*/ jsxs("div", {
|
|
255
262
|
...rest,
|
|
256
263
|
ref: ref,
|
|
257
264
|
"data-tao-list-item": "",
|
|
258
265
|
"data-tao-layout": itemLayout,
|
|
259
|
-
"data-tao-grid":
|
|
260
|
-
className:
|
|
261
|
-
style:
|
|
266
|
+
"data-tao-grid": t4,
|
|
267
|
+
className: t6,
|
|
268
|
+
style: t8,
|
|
262
269
|
children: [
|
|
263
|
-
t9,
|
|
264
270
|
t10,
|
|
265
|
-
t11
|
|
271
|
+
t11,
|
|
272
|
+
t12
|
|
266
273
|
]
|
|
267
274
|
})
|
|
268
275
|
});
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
} else
|
|
280
|
-
return
|
|
276
|
+
$[32] = itemLayout;
|
|
277
|
+
$[33] = ref;
|
|
278
|
+
$[34] = rest;
|
|
279
|
+
$[35] = t10;
|
|
280
|
+
$[36] = t11;
|
|
281
|
+
$[37] = t12;
|
|
282
|
+
$[38] = t4;
|
|
283
|
+
$[39] = t6;
|
|
284
|
+
$[40] = t8;
|
|
285
|
+
$[41] = t13;
|
|
286
|
+
} else t13 = $[41];
|
|
287
|
+
return t13;
|
|
281
288
|
});
|
|
282
289
|
ItemRoot.displayName = 'List.Item';
|
|
283
290
|
const Item = Object.assign(ItemRoot, {
|
|
@@ -315,7 +322,7 @@ function gridVariables(grid) {
|
|
|
315
322
|
return result;
|
|
316
323
|
}
|
|
317
324
|
function ListRoot(t0, ref) {
|
|
318
|
-
const $ = c(
|
|
325
|
+
const $ = c(105);
|
|
319
326
|
let children;
|
|
320
327
|
let className;
|
|
321
328
|
let classNames;
|
|
@@ -415,6 +422,7 @@ function ListRoot(t0, ref) {
|
|
|
415
422
|
const total = paging.total ?? dataSource.length;
|
|
416
423
|
const resolvedPageSize = paging.pageSize ?? pageSize;
|
|
417
424
|
const current = Math.max(1, Math.min(paging.current ?? page, Math.ceil(total / resolvedPageSize)));
|
|
425
|
+
if (pagination && void 0 === paging.current && page !== current) setPage(current);
|
|
418
426
|
const start = (current - 1) * resolvedPageSize;
|
|
419
427
|
let t9;
|
|
420
428
|
if ($[28] !== dataSource || $[29] !== pagination || $[30] !== resolvedPageSize || $[31] !== start) {
|
|
@@ -469,9 +477,11 @@ function ListRoot(t0, ref) {
|
|
|
469
477
|
let t12;
|
|
470
478
|
if ($[43] !== children || $[44] !== data || $[45] !== renderItem || $[46] !== rowKey) {
|
|
471
479
|
t12 = data.length ? data.map((value, index)=>{
|
|
472
|
-
const
|
|
480
|
+
const rendered = renderItem?.(value, index);
|
|
481
|
+
const configuredKey = "function" == typeof rowKey ? rowKey(value) : null != rowKey ? value[rowKey] : void 0;
|
|
482
|
+
const key = configuredKey ?? value?.key ?? /*#__PURE__*/ (isValidElement(rendered) ? rendered.key : null) ?? index;
|
|
473
483
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
474
|
-
children:
|
|
484
|
+
children: rendered
|
|
475
485
|
}, key);
|
|
476
486
|
}) : children;
|
|
477
487
|
$[43] = children;
|
|
@@ -541,8 +551,8 @@ function ListRoot(t0, ref) {
|
|
|
541
551
|
const t25 = classNames?.items;
|
|
542
552
|
const t26 = styles?.items;
|
|
543
553
|
let t27;
|
|
544
|
-
if ($[66] !== classNames?.empty || $[
|
|
545
|
-
t27 = Children.
|
|
554
|
+
if ($[66] !== children || $[67] !== classNames?.empty || $[68] !== content || $[69] !== data.length || $[70] !== isLoading || $[71] !== locale?.emptyText || $[72] !== styles?.empty) {
|
|
555
|
+
t27 = data.length || Children.toArray(children).length ? content : isLoading ? /*#__PURE__*/ jsx("li", {
|
|
546
556
|
"data-tao-list-loading": ""
|
|
547
557
|
}) : /*#__PURE__*/ jsx("li", {
|
|
548
558
|
"data-tao-list-empty": "",
|
|
@@ -552,54 +562,56 @@ function ListRoot(t0, ref) {
|
|
|
552
562
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
553
563
|
})
|
|
554
564
|
});
|
|
555
|
-
$[66] =
|
|
556
|
-
$[67] =
|
|
557
|
-
$[68] =
|
|
558
|
-
$[69] =
|
|
559
|
-
$[70] =
|
|
560
|
-
$[71] =
|
|
561
|
-
|
|
565
|
+
$[66] = children;
|
|
566
|
+
$[67] = classNames?.empty;
|
|
567
|
+
$[68] = content;
|
|
568
|
+
$[69] = data.length;
|
|
569
|
+
$[70] = isLoading;
|
|
570
|
+
$[71] = locale?.emptyText;
|
|
571
|
+
$[72] = styles?.empty;
|
|
572
|
+
$[73] = t27;
|
|
573
|
+
} else t27 = $[73];
|
|
562
574
|
let t28;
|
|
563
|
-
if ($[
|
|
575
|
+
if ($[74] !== t25 || $[75] !== t26 || $[76] !== t27) {
|
|
564
576
|
t28 = /*#__PURE__*/ jsx("ul", {
|
|
565
577
|
"data-tao-list-items": "",
|
|
566
578
|
className: t25,
|
|
567
579
|
style: t26,
|
|
568
580
|
children: t27
|
|
569
581
|
});
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
} else t28 = $[
|
|
582
|
+
$[74] = t25;
|
|
583
|
+
$[75] = t26;
|
|
584
|
+
$[76] = t27;
|
|
585
|
+
$[77] = t28;
|
|
586
|
+
} else t28 = $[77];
|
|
575
587
|
let t29;
|
|
576
|
-
if ($[
|
|
588
|
+
if ($[78] !== isLoading || $[79] !== spinner || $[80] !== t28) {
|
|
577
589
|
t29 = /*#__PURE__*/ jsx(Spinner, {
|
|
578
590
|
...spinner,
|
|
579
591
|
spinning: isLoading,
|
|
580
592
|
children: t28
|
|
581
593
|
});
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
} else t29 = $[
|
|
594
|
+
$[78] = isLoading;
|
|
595
|
+
$[79] = spinner;
|
|
596
|
+
$[80] = t28;
|
|
597
|
+
$[81] = t29;
|
|
598
|
+
} else t29 = $[81];
|
|
587
599
|
let t30;
|
|
588
|
-
if ($[
|
|
600
|
+
if ($[82] !== classNames?.footer || $[83] !== footer || $[84] !== styles?.footer) {
|
|
589
601
|
t30 = null != footer && /*#__PURE__*/ jsx("div", {
|
|
590
602
|
"data-tao-list-footer": "",
|
|
591
603
|
className: classNames?.footer,
|
|
592
604
|
style: styles?.footer,
|
|
593
605
|
children: footer
|
|
594
606
|
});
|
|
595
|
-
$[
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
599
|
-
} else t30 = $[
|
|
607
|
+
$[82] = classNames?.footer;
|
|
608
|
+
$[83] = footer;
|
|
609
|
+
$[84] = styles?.footer;
|
|
610
|
+
$[85] = t30;
|
|
611
|
+
} else t30 = $[85];
|
|
600
612
|
const t31 = "top" !== paging.position && paginationNode;
|
|
601
613
|
let t32;
|
|
602
|
-
if ($[
|
|
614
|
+
if ($[86] !== extra || $[87] !== loadMore || $[88] !== ref || $[89] !== rest || $[90] !== t14 || $[91] !== t15 || $[92] !== t16 || $[93] !== t17 || $[94] !== t19 || $[95] !== t22 || $[96] !== t23 || $[97] !== t24 || $[98] !== t29 || $[99] !== t30 || $[100] !== t31) {
|
|
603
615
|
t32 = /*#__PURE__*/ jsxs("div", {
|
|
604
616
|
...rest,
|
|
605
617
|
ref: ref,
|
|
@@ -620,41 +632,45 @@ function ListRoot(t0, ref) {
|
|
|
620
632
|
t31
|
|
621
633
|
]
|
|
622
634
|
});
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
638
|
-
$[
|
|
639
|
-
} else t32 = $[
|
|
635
|
+
$[86] = extra;
|
|
636
|
+
$[87] = loadMore;
|
|
637
|
+
$[88] = ref;
|
|
638
|
+
$[89] = rest;
|
|
639
|
+
$[90] = t14;
|
|
640
|
+
$[91] = t15;
|
|
641
|
+
$[92] = t16;
|
|
642
|
+
$[93] = t17;
|
|
643
|
+
$[94] = t19;
|
|
644
|
+
$[95] = t22;
|
|
645
|
+
$[96] = t23;
|
|
646
|
+
$[97] = t24;
|
|
647
|
+
$[98] = t29;
|
|
648
|
+
$[99] = t30;
|
|
649
|
+
$[100] = t31;
|
|
650
|
+
$[101] = t32;
|
|
651
|
+
} else t32 = $[101];
|
|
640
652
|
let t33;
|
|
641
|
-
if ($[
|
|
653
|
+
if ($[102] !== t13 || $[103] !== t32) {
|
|
642
654
|
t33 = /*#__PURE__*/ jsx(ListContext.Provider, {
|
|
643
655
|
value: t13,
|
|
644
656
|
children: t32
|
|
645
657
|
});
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
} else t33 = $[
|
|
658
|
+
$[102] = t13;
|
|
659
|
+
$[103] = t32;
|
|
660
|
+
$[104] = t33;
|
|
661
|
+
} else t33 = $[104];
|
|
650
662
|
return t33;
|
|
651
663
|
}
|
|
652
664
|
const List = Object.assign(/*#__PURE__*/ forwardRef(ListRoot), {
|
|
653
665
|
Item: Item
|
|
654
666
|
});
|
|
655
667
|
function _temp(action, index) {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
668
|
+
if (null == action || "boolean" == typeof action || "" === action) return [];
|
|
669
|
+
const key = /*#__PURE__*/ isValidElement(action) ? action.key : null;
|
|
670
|
+
return [
|
|
671
|
+
/*#__PURE__*/ jsx("li", {
|
|
672
|
+
children: action
|
|
673
|
+
}, null == key ? `index:${index}` : `action:${key}`)
|
|
674
|
+
];
|
|
659
675
|
}
|
|
660
676
|
export { List };
|