@rockshin/tao-ui 0.0.57 → 0.0.59
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 +38 -4
- package/dist/components/app/app-modals.js +11 -6
- package/dist/components/app/app-notices.js +112 -47
- package/dist/components/auto-complete/auto-complete.js +9 -2
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +5 -1
- package/dist/components/calendar/calendar.js +24 -17
- package/dist/components/carousel/carousel.js +35 -16
- package/dist/components/cascader/cascader.js +17 -12
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/checkbox.js +65 -58
- package/dist/components/collapse/collapse-panels.js +68 -67
- package/dist/components/color-picker/color-picker.js +383 -360
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
- package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
- package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/month-grid.js +61 -45
- package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
- package/dist/components/date-picker/calendar/time-panel.js +89 -88
- package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/year-grid.js +60 -44
- package/dist/components/date-picker/date-localization.js +12 -14
- package/dist/components/date-picker/date-picker.css +9 -0
- package/dist/components/date-picker/date-picker.js +22 -13
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +127 -70
- package/dist/components/date-picker/types.js +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.js +4 -3
- package/dist/components/dropdown/dropdown.js +11 -9
- package/dist/components/float-button/float-button.js +11 -9
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +160 -120
- package/dist/components/form-field/form-field-view.d.ts +2 -1
- package/dist/components/form-field/form-field-view.js +173 -108
- package/dist/components/image/image.js +135 -143
- package/dist/components/input/input-shared.js +3 -2
- package/dist/components/input/otp.js +120 -110
- package/dist/components/input/password.js +55 -61
- package/dist/components/input/search.js +13 -7
- package/dist/components/list/list.js +106 -105
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/mentions/mentions.js +1 -0
- package/dist/components/menu/menu-render.js +1 -0
- package/dist/components/modal/confirm-dialog.js +11 -4
- package/dist/components/modal/modal.js +320 -315
- package/dist/components/pagination/pagination.d.ts +3 -0
- package/dist/components/pagination/pagination.js +5 -0
- package/dist/components/popover/popover.js +325 -289
- package/dist/components/qr-code/qr-code.js +157 -150
- package/dist/components/radio/radio.d.ts +3 -1
- package/dist/components/radio/radio.js +73 -64
- package/dist/components/rate/rate.js +83 -72
- package/dist/components/scroll-area/scroll-area.css +1 -1
- package/dist/components/scroll-area/scroll-area.js +294 -222
- package/dist/components/select/mobile-select.js +6 -3
- package/dist/components/select/select-model.js +2 -2
- package/dist/components/select/select.js +78 -39
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +91 -84
- package/dist/components/slider/slider.d.ts +2 -2
- package/dist/components/slider/slider.js +13 -2
- package/dist/components/sonner/sonner.js +2 -2
- package/dist/components/splitter/splitter.css +1 -0
- package/dist/components/splitter/splitter.js +152 -126
- package/dist/components/statistic/statistic.js +84 -78
- package/dist/components/steps/steps.js +1 -1
- package/dist/components/switch/switch.js +45 -39
- package/dist/components/table/table.js +5 -1
- package/dist/components/table/use-table-data.js +2 -2
- package/dist/components/time-picker/time-picker.js +31 -1
- package/dist/components/tooltip/tooltip.js +237 -99
- package/dist/components/tree/tree.js +31 -3
- package/dist/components/tree-select/tree-select.js +1 -1
- package/dist/components/upload/upload.js +69 -42
- package/dist/locales/ar-EG.js +2 -0
- package/dist/locales/de-DE.js +2 -0
- package/dist/locales/en-US.js +2 -0
- package/dist/locales/es-ES.js +2 -0
- package/dist/locales/fr-FR.js +2 -0
- package/dist/locales/hi-IN.js +2 -0
- package/dist/locales/id-ID.js +2 -0
- package/dist/locales/it-IT.js +2 -0
- package/dist/locales/ja-JP.js +2 -0
- package/dist/locales/ko-KR.js +2 -0
- package/dist/locales/pt-BR.js +2 -0
- package/dist/locales/ru-RU.js +2 -0
- package/dist/locales/th-TH.js +2 -0
- package/dist/locales/tr-TR.js +2 -0
- package/dist/locales/types.d.ts +2 -0
- package/dist/locales/vi-VN.js +2 -0
- package/dist/locales/zh-CN.js +2 -0
- package/dist/locales/zh-TW.js +2 -0
- package/dist/number-input/cursor.js +20 -8
- package/dist/number-input/format.js +13 -5
- package/dist/number-input/use-number-input.js +166 -318
- package/dist/number-input/validate.d.ts +1 -0
- package/dist/number-input/validate.js +1 -1
- package/dist/provider/tao-provider.d.ts +2 -2
- package/dist/provider/tao-provider.js +49 -49
- package/dist/utils/composed-parent.d.ts +1 -0
- package/dist/utils/composed-parent.js +7 -0
- package/dist/utils/portal.d.ts +5 -0
- package/dist/utils/portal.js +7 -1
- package/dist/utils/refs.d.ts +3 -1
- package/dist/utils/refs.js +25 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { Children, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { useCommittedRef } from "../../utils/refs.js";
|
|
4
5
|
import { cx } from "../../utils/semantic.js";
|
|
5
6
|
import "./splitter.css";
|
|
6
7
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
@@ -87,7 +88,7 @@ function Panel(_props) {
|
|
|
87
88
|
return null;
|
|
88
89
|
}
|
|
89
90
|
function Splitter(t0) {
|
|
90
|
-
const $ = c(
|
|
91
|
+
const $ = c(82);
|
|
91
92
|
const { orientation: t1, onResize, onResizeEnd, onResizeStart, className, classNames, styles, children } = t0;
|
|
92
93
|
const orientation = void 0 === t1 ? "horizontal" : t1;
|
|
93
94
|
const { locale } = useTaoConfig();
|
|
@@ -96,9 +97,7 @@ function Splitter(t0) {
|
|
|
96
97
|
if ($[0] !== children) {
|
|
97
98
|
const nextPanels = [];
|
|
98
99
|
const nextPanelChildren = [];
|
|
99
|
-
const childArray =
|
|
100
|
-
children
|
|
101
|
-
];
|
|
100
|
+
const childArray = Children.toArray(children);
|
|
102
101
|
for (const child of childArray)if (child && "object" == typeof child && "type" in child) {
|
|
103
102
|
const panelChild = child;
|
|
104
103
|
if (panelChild.type === Panel && panelChild.props) {
|
|
@@ -242,8 +241,21 @@ function Splitter(t0) {
|
|
|
242
241
|
} else t12 = $[22];
|
|
243
242
|
const resizePanels = t12;
|
|
244
243
|
let t13;
|
|
245
|
-
if ($[23] !==
|
|
246
|
-
t13 =
|
|
244
|
+
if ($[23] !== onResize || $[24] !== onResizeEnd || $[25] !== resizePanels) {
|
|
245
|
+
t13 = {
|
|
246
|
+
resizePanels,
|
|
247
|
+
onResize,
|
|
248
|
+
onResizeEnd
|
|
249
|
+
};
|
|
250
|
+
$[23] = onResize;
|
|
251
|
+
$[24] = onResizeEnd;
|
|
252
|
+
$[25] = resizePanels;
|
|
253
|
+
$[26] = t13;
|
|
254
|
+
} else t13 = $[26];
|
|
255
|
+
const dragSettings = useCommittedRef(t13);
|
|
256
|
+
let t14;
|
|
257
|
+
if ($[27] !== dragSettings || $[28] !== isHorizontal || $[29] !== onResizeStart || $[30] !== sizes) {
|
|
258
|
+
t14 = (index_0, e)=>{
|
|
247
259
|
if (0 !== e.button) return;
|
|
248
260
|
e.preventDefault();
|
|
249
261
|
activeDrag.current?.cleanup();
|
|
@@ -258,10 +270,12 @@ function Splitter(t0) {
|
|
|
258
270
|
const handleMove = (ev)=>{
|
|
259
271
|
if (ev.pointerId !== pointerId) return;
|
|
260
272
|
const delta_0 = ((isHorizontal ? ev.clientX : ev.clientY) - pos) * sign;
|
|
261
|
-
const next_1 = resizePanels(index_0, delta_0, startSizes_0);
|
|
273
|
+
const next_1 = dragSettings.current.resizePanels(index_0, delta_0, startSizes_0);
|
|
262
274
|
currentSizes = next_1;
|
|
263
275
|
setSizes(next_1);
|
|
264
|
-
onResize?.(
|
|
276
|
+
dragSettings.current.onResize?.([
|
|
277
|
+
...next_1
|
|
278
|
+
]);
|
|
265
279
|
};
|
|
266
280
|
const cleanup = ()=>{
|
|
267
281
|
ownerDocument.removeEventListener("pointermove", handleMove);
|
|
@@ -272,7 +286,9 @@ function Splitter(t0) {
|
|
|
272
286
|
const handleEnd = (ev_0)=>{
|
|
273
287
|
if (ev_0.pointerId !== pointerId) return;
|
|
274
288
|
cleanup();
|
|
275
|
-
onResizeEnd?.(
|
|
289
|
+
dragSettings.current.onResizeEnd?.([
|
|
290
|
+
...currentSizes
|
|
291
|
+
]);
|
|
276
292
|
};
|
|
277
293
|
activeDrag.current = {
|
|
278
294
|
index: index_0,
|
|
@@ -281,20 +297,20 @@ function Splitter(t0) {
|
|
|
281
297
|
ownerDocument.addEventListener("pointermove", handleMove);
|
|
282
298
|
ownerDocument.addEventListener("pointerup", handleEnd);
|
|
283
299
|
ownerDocument.addEventListener("pointercancel", handleEnd);
|
|
284
|
-
onResizeStart?.(
|
|
300
|
+
onResizeStart?.([
|
|
301
|
+
...sizes
|
|
302
|
+
]);
|
|
285
303
|
};
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
if ($[30] !== isHorizontal || $[31] !== onResize || $[32] !== onResizeEnd || $[33] !== onResizeStart || $[34] !== resizePanels || $[35] !== sizes) {
|
|
297
|
-
t14 = (index_1, event)=>{
|
|
304
|
+
$[27] = dragSettings;
|
|
305
|
+
$[28] = isHorizontal;
|
|
306
|
+
$[29] = onResizeStart;
|
|
307
|
+
$[30] = sizes;
|
|
308
|
+
$[31] = t14;
|
|
309
|
+
} else t14 = $[31];
|
|
310
|
+
const handleDragStart = t14;
|
|
311
|
+
let t15;
|
|
312
|
+
if ($[32] !== isHorizontal || $[33] !== onResize || $[34] !== onResizeEnd || $[35] !== onResizeStart || $[36] !== resizePanels || $[37] !== sizes) {
|
|
313
|
+
t15 = (index_1, event)=>{
|
|
298
314
|
if (event.defaultPrevented || event.target !== event.currentTarget) return;
|
|
299
315
|
const rtl = "rtl" === getComputedStyle(event.currentTarget).direction;
|
|
300
316
|
const growKey = isHorizontal ? rtl ? "ArrowLeft" : "ArrowRight" : "ArrowDown";
|
|
@@ -304,23 +320,29 @@ function Splitter(t0) {
|
|
|
304
320
|
const delta_1 = event.key === growKey ? 10 : -10;
|
|
305
321
|
const next_2 = resizePanels(index_1, delta_1, sizes);
|
|
306
322
|
if (next_2[index_1] === sizes[index_1] && next_2[index_1 + 1] === sizes[index_1 + 1]) return;
|
|
307
|
-
onResizeStart?.(
|
|
323
|
+
onResizeStart?.([
|
|
324
|
+
...sizes
|
|
325
|
+
]);
|
|
308
326
|
setSizes(next_2);
|
|
309
|
-
onResize?.(
|
|
310
|
-
|
|
327
|
+
onResize?.([
|
|
328
|
+
...next_2
|
|
329
|
+
]);
|
|
330
|
+
onResizeEnd?.([
|
|
331
|
+
...next_2
|
|
332
|
+
]);
|
|
311
333
|
};
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
} else
|
|
320
|
-
const handleDraggerKeyDown =
|
|
321
|
-
let
|
|
322
|
-
if ($[
|
|
323
|
-
|
|
334
|
+
$[32] = isHorizontal;
|
|
335
|
+
$[33] = onResize;
|
|
336
|
+
$[34] = onResizeEnd;
|
|
337
|
+
$[35] = onResizeStart;
|
|
338
|
+
$[36] = resizePanels;
|
|
339
|
+
$[37] = sizes;
|
|
340
|
+
$[38] = t15;
|
|
341
|
+
} else t15 = $[38];
|
|
342
|
+
const handleDraggerKeyDown = t15;
|
|
343
|
+
let t16;
|
|
344
|
+
if ($[39] !== containerSize || $[40] !== panelCount || $[41] !== panels || $[42] !== sizes) {
|
|
345
|
+
t16 = (index_2, direction)=>{
|
|
324
346
|
const draggerSpace_0 = (panelCount - 1) * 1;
|
|
325
347
|
const available_1 = containerSize - draggerSpace_0;
|
|
326
348
|
const targetIdx = "start" === direction ? index_2 : index_2 + 1;
|
|
@@ -351,28 +373,32 @@ function Splitter(t0) {
|
|
|
351
373
|
}
|
|
352
374
|
return next_3;
|
|
353
375
|
};
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
} else
|
|
360
|
-
const getCollapseSizes =
|
|
361
|
-
let
|
|
362
|
-
if ($[
|
|
363
|
-
|
|
376
|
+
$[39] = containerSize;
|
|
377
|
+
$[40] = panelCount;
|
|
378
|
+
$[41] = panels;
|
|
379
|
+
$[42] = sizes;
|
|
380
|
+
$[43] = t16;
|
|
381
|
+
} else t16 = $[43];
|
|
382
|
+
const getCollapseSizes = t16;
|
|
383
|
+
let t17;
|
|
384
|
+
if ($[44] !== onResize || $[45] !== onResizeEnd) {
|
|
385
|
+
t17 = (next_4)=>{
|
|
364
386
|
setSizes(next_4);
|
|
365
|
-
onResize?.(
|
|
366
|
-
|
|
387
|
+
onResize?.([
|
|
388
|
+
...next_4
|
|
389
|
+
]);
|
|
390
|
+
onResizeEnd?.([
|
|
391
|
+
...next_4
|
|
392
|
+
]);
|
|
367
393
|
};
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
} else
|
|
372
|
-
const handleCollapse =
|
|
373
|
-
let
|
|
374
|
-
if ($[
|
|
375
|
-
|
|
394
|
+
$[44] = onResize;
|
|
395
|
+
$[45] = onResizeEnd;
|
|
396
|
+
$[46] = t17;
|
|
397
|
+
} else t17 = $[46];
|
|
398
|
+
const handleCollapse = t17;
|
|
399
|
+
let t18;
|
|
400
|
+
if ($[47] !== panels) {
|
|
401
|
+
t18 = function(index_3) {
|
|
376
402
|
const leftPanel = panels[index_3];
|
|
377
403
|
const rightPanel = panels[index_3 + 1];
|
|
378
404
|
let startCollapsible = false;
|
|
@@ -390,48 +416,48 @@ function Splitter(t0) {
|
|
|
390
416
|
end: endCollapsible
|
|
391
417
|
};
|
|
392
418
|
};
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
} else
|
|
396
|
-
const getDraggerCollapse =
|
|
419
|
+
$[47] = panels;
|
|
420
|
+
$[48] = t18;
|
|
421
|
+
} else t18 = $[48];
|
|
422
|
+
const getDraggerCollapse = t18;
|
|
397
423
|
if (sizes.length !== panelCount) {
|
|
398
|
-
const
|
|
399
|
-
let
|
|
400
|
-
if ($[
|
|
401
|
-
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
} else
|
|
406
|
-
const
|
|
407
|
-
let
|
|
408
|
-
if ($[
|
|
409
|
-
|
|
424
|
+
const t19 = classNames?.root;
|
|
425
|
+
let t20;
|
|
426
|
+
if ($[49] !== className || $[50] !== t19) {
|
|
427
|
+
t20 = cx(t19, className);
|
|
428
|
+
$[49] = className;
|
|
429
|
+
$[50] = t19;
|
|
430
|
+
$[51] = t20;
|
|
431
|
+
} else t20 = $[51];
|
|
432
|
+
const t21 = styles?.root;
|
|
433
|
+
let t22;
|
|
434
|
+
if ($[52] !== orientation || $[53] !== t20 || $[54] !== t21) {
|
|
435
|
+
t22 = /*#__PURE__*/ jsx("div", {
|
|
410
436
|
ref: containerRef,
|
|
411
437
|
"data-tao-splitter": "",
|
|
412
438
|
"data-tao-orientation": orientation,
|
|
413
|
-
className:
|
|
414
|
-
style:
|
|
439
|
+
className: t20,
|
|
440
|
+
style: t21
|
|
415
441
|
});
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
} else
|
|
421
|
-
return
|
|
442
|
+
$[52] = orientation;
|
|
443
|
+
$[53] = t20;
|
|
444
|
+
$[54] = t21;
|
|
445
|
+
$[55] = t22;
|
|
446
|
+
} else t22 = $[55];
|
|
447
|
+
return t22;
|
|
422
448
|
}
|
|
423
|
-
const
|
|
424
|
-
let
|
|
425
|
-
if ($[
|
|
426
|
-
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
} else
|
|
431
|
-
const
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
449
|
+
const t19 = classNames?.root;
|
|
450
|
+
let t20;
|
|
451
|
+
if ($[56] !== className || $[57] !== t19) {
|
|
452
|
+
t20 = cx(t19, className);
|
|
453
|
+
$[56] = className;
|
|
454
|
+
$[57] = t19;
|
|
455
|
+
$[58] = t20;
|
|
456
|
+
} else t20 = $[58];
|
|
457
|
+
const t21 = styles?.root;
|
|
458
|
+
let t22;
|
|
459
|
+
if ($[59] !== classNames?.dragger || $[60] !== classNames?.panel || $[61] !== containerSize || $[62] !== getCollapseSizes || $[63] !== getDraggerCollapse || $[64] !== handleCollapse || $[65] !== handleDragStart || $[66] !== handleDraggerKeyDown || $[67] !== isHorizontal || $[68] !== locale || $[69] !== orientation || $[70] !== panelChildren || $[71] !== panelCount || $[72] !== panels || $[73] !== sizes || $[74] !== styles?.dragger || $[75] !== styles?.panel) {
|
|
460
|
+
t22 = panels.map((panel, i_0)=>{
|
|
435
461
|
const sizeStyle = isHorizontal ? {
|
|
436
462
|
width: sizes[i_0],
|
|
437
463
|
flexShrink: 0,
|
|
@@ -529,42 +555,42 @@ function Splitter(t0) {
|
|
|
529
555
|
]
|
|
530
556
|
}, i_0);
|
|
531
557
|
});
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
} else
|
|
551
|
-
let
|
|
552
|
-
if ($[
|
|
553
|
-
|
|
558
|
+
$[59] = classNames?.dragger;
|
|
559
|
+
$[60] = classNames?.panel;
|
|
560
|
+
$[61] = containerSize;
|
|
561
|
+
$[62] = getCollapseSizes;
|
|
562
|
+
$[63] = getDraggerCollapse;
|
|
563
|
+
$[64] = handleCollapse;
|
|
564
|
+
$[65] = handleDragStart;
|
|
565
|
+
$[66] = handleDraggerKeyDown;
|
|
566
|
+
$[67] = isHorizontal;
|
|
567
|
+
$[68] = locale;
|
|
568
|
+
$[69] = orientation;
|
|
569
|
+
$[70] = panelChildren;
|
|
570
|
+
$[71] = panelCount;
|
|
571
|
+
$[72] = panels;
|
|
572
|
+
$[73] = sizes;
|
|
573
|
+
$[74] = styles?.dragger;
|
|
574
|
+
$[75] = styles?.panel;
|
|
575
|
+
$[76] = t22;
|
|
576
|
+
} else t22 = $[76];
|
|
577
|
+
let t23;
|
|
578
|
+
if ($[77] !== orientation || $[78] !== t20 || $[79] !== t21 || $[80] !== t22) {
|
|
579
|
+
t23 = /*#__PURE__*/ jsx("div", {
|
|
554
580
|
ref: containerRef,
|
|
555
581
|
"data-tao-splitter": "",
|
|
556
582
|
"data-tao-orientation": orientation,
|
|
557
|
-
className:
|
|
558
|
-
style:
|
|
559
|
-
children:
|
|
583
|
+
className: t20,
|
|
584
|
+
style: t21,
|
|
585
|
+
children: t22
|
|
560
586
|
});
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
-
$[
|
|
566
|
-
} else
|
|
567
|
-
return
|
|
587
|
+
$[77] = orientation;
|
|
588
|
+
$[78] = t20;
|
|
589
|
+
$[79] = t21;
|
|
590
|
+
$[80] = t22;
|
|
591
|
+
$[81] = t23;
|
|
592
|
+
} else t23 = $[81];
|
|
593
|
+
return t23;
|
|
568
594
|
}
|
|
569
595
|
function _temp2(event_2) {
|
|
570
596
|
return event_2.stopPropagation();
|
|
@@ -13,7 +13,7 @@ const plainNumber = new Intl.NumberFormat('en-US', {
|
|
|
13
13
|
function formattedNumber(value, precision, options) {
|
|
14
14
|
const text = 'number' == typeof value && String(value).includes('e') ? plainNumber.format(value) : String(value);
|
|
15
15
|
const match = /^(-?)(\d*)(?:\.(\d+))?$/.exec(text);
|
|
16
|
-
if (!match || '-' === text) return text;
|
|
16
|
+
if (!match || '' === text || '-' === text) return text;
|
|
17
17
|
const integer = localizeDigits(groupInteger(match[2] || '0', options), options);
|
|
18
18
|
const fraction = void 0 === precision ? match[3] ?? '' : (match[3] ?? '').padEnd(precision, '0').slice(0, Math.max(0, precision));
|
|
19
19
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -37,7 +37,7 @@ function formattedNumber(value, precision, options) {
|
|
|
37
37
|
}
|
|
38
38
|
const hasContent = (node)=>null != node && 'boolean' != typeof node;
|
|
39
39
|
const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
40
|
-
const $ = c(
|
|
40
|
+
const $ = c(87);
|
|
41
41
|
let className;
|
|
42
42
|
let classNames;
|
|
43
43
|
let decimalSeparator;
|
|
@@ -158,51 +158,57 @@ const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
158
158
|
const t5 = classes?.value;
|
|
159
159
|
const t6 = slots?.value;
|
|
160
160
|
let t7;
|
|
161
|
-
if ($[34] !== formatter || $[35] !==
|
|
162
|
-
t7 = "function" == typeof formatter ? formatter(value
|
|
161
|
+
if ($[34] !== formatter || $[35] !== locale || $[36] !== numberFormat || $[37] !== precision || $[38] !== value) {
|
|
162
|
+
t7 = "function" == typeof formatter ? formatter(value, {
|
|
163
|
+
locale,
|
|
164
|
+
precision,
|
|
165
|
+
decimalSeparator: numberFormat.decimalSeparator,
|
|
166
|
+
groupSeparator: numberFormat.thousandsSeparator
|
|
167
|
+
}) : false === formatter ? value : formattedNumber(value, precision, numberFormat);
|
|
163
168
|
$[34] = formatter;
|
|
164
|
-
$[35] =
|
|
165
|
-
$[36] =
|
|
166
|
-
$[37] =
|
|
167
|
-
$[38] =
|
|
168
|
-
|
|
169
|
+
$[35] = locale;
|
|
170
|
+
$[36] = numberFormat;
|
|
171
|
+
$[37] = precision;
|
|
172
|
+
$[38] = value;
|
|
173
|
+
$[39] = t7;
|
|
174
|
+
} else t7 = $[39];
|
|
169
175
|
let t8;
|
|
170
|
-
if ($[
|
|
176
|
+
if ($[40] !== t5 || $[41] !== t6 || $[42] !== t7) {
|
|
171
177
|
t8 = /*#__PURE__*/ jsx("span", {
|
|
172
178
|
"data-tao-statistic-value": "",
|
|
173
179
|
className: t5,
|
|
174
180
|
style: t6,
|
|
175
181
|
children: t7
|
|
176
182
|
});
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else t8 = $[
|
|
183
|
+
$[40] = t5;
|
|
184
|
+
$[41] = t6;
|
|
185
|
+
$[42] = t7;
|
|
186
|
+
$[43] = t8;
|
|
187
|
+
} else t8 = $[43];
|
|
182
188
|
const formatted = t8;
|
|
183
189
|
const t9 = classes?.root;
|
|
184
190
|
let t10;
|
|
185
|
-
if ($[
|
|
191
|
+
if ($[44] !== className || $[45] !== prefixCls || $[46] !== rootClassName || $[47] !== t9) {
|
|
186
192
|
t10 = cx(prefixCls, t9, className, rootClassName);
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
} else t10 = $[
|
|
193
|
+
$[44] = className;
|
|
194
|
+
$[45] = prefixCls;
|
|
195
|
+
$[46] = rootClassName;
|
|
196
|
+
$[47] = t9;
|
|
197
|
+
$[48] = t10;
|
|
198
|
+
} else t10 = $[48];
|
|
193
199
|
const t11 = slots?.root;
|
|
194
200
|
let t12;
|
|
195
|
-
if ($[
|
|
201
|
+
if ($[49] !== style || $[50] !== t11) {
|
|
196
202
|
t12 = {
|
|
197
203
|
...t11,
|
|
198
204
|
...style
|
|
199
205
|
};
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
} else t12 = $[
|
|
206
|
+
$[49] = style;
|
|
207
|
+
$[50] = t11;
|
|
208
|
+
$[51] = t12;
|
|
209
|
+
} else t12 = $[51];
|
|
204
210
|
let t13;
|
|
205
|
-
if ($[
|
|
211
|
+
if ($[52] !== classes?.header || $[53] !== classes?.title || $[54] !== slots?.header || $[55] !== slots?.title || $[56] !== title) {
|
|
206
212
|
t13 = hasContent(title) && /*#__PURE__*/ jsx("div", {
|
|
207
213
|
"data-tao-statistic-header": "",
|
|
208
214
|
className: classes?.header,
|
|
@@ -214,60 +220,60 @@ const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
214
220
|
children: title
|
|
215
221
|
})
|
|
216
222
|
});
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
} else t13 = $[
|
|
223
|
+
$[52] = classes?.header;
|
|
224
|
+
$[53] = classes?.title;
|
|
225
|
+
$[54] = slots?.header;
|
|
226
|
+
$[55] = slots?.title;
|
|
227
|
+
$[56] = title;
|
|
228
|
+
$[57] = t13;
|
|
229
|
+
} else t13 = $[57];
|
|
224
230
|
const t14 = classes?.content;
|
|
225
231
|
const t15 = slots?.content;
|
|
226
232
|
let t16;
|
|
227
|
-
if ($[
|
|
233
|
+
if ($[58] !== t15 || $[59] !== valueStyle) {
|
|
228
234
|
t16 = {
|
|
229
235
|
...valueStyle,
|
|
230
236
|
...t15
|
|
231
237
|
};
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else t16 = $[
|
|
238
|
+
$[58] = t15;
|
|
239
|
+
$[59] = valueStyle;
|
|
240
|
+
$[60] = t16;
|
|
241
|
+
} else t16 = $[60];
|
|
236
242
|
let t17;
|
|
237
|
-
if ($[
|
|
243
|
+
if ($[61] !== classes?.prefix || $[62] !== prefix || $[63] !== slots?.prefix) {
|
|
238
244
|
t17 = hasContent(prefix) && /*#__PURE__*/ jsx("span", {
|
|
239
245
|
"data-tao-statistic-prefix": "",
|
|
240
246
|
className: classes?.prefix,
|
|
241
247
|
style: slots?.prefix,
|
|
242
248
|
children: prefix
|
|
243
249
|
});
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
} else t17 = $[
|
|
250
|
+
$[61] = classes?.prefix;
|
|
251
|
+
$[62] = prefix;
|
|
252
|
+
$[63] = slots?.prefix;
|
|
253
|
+
$[64] = t17;
|
|
254
|
+
} else t17 = $[64];
|
|
249
255
|
let t18;
|
|
250
|
-
if ($[
|
|
256
|
+
if ($[65] !== formatted || $[66] !== valueRender) {
|
|
251
257
|
t18 = valueRender ? valueRender(formatted) : formatted;
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
} else t18 = $[
|
|
258
|
+
$[65] = formatted;
|
|
259
|
+
$[66] = valueRender;
|
|
260
|
+
$[67] = t18;
|
|
261
|
+
} else t18 = $[67];
|
|
256
262
|
let t19;
|
|
257
|
-
if ($[
|
|
263
|
+
if ($[68] !== classes?.suffix || $[69] !== slots?.suffix || $[70] !== suffix) {
|
|
258
264
|
t19 = hasContent(suffix) && /*#__PURE__*/ jsx("span", {
|
|
259
265
|
"data-tao-statistic-suffix": "",
|
|
260
266
|
className: classes?.suffix,
|
|
261
267
|
style: slots?.suffix,
|
|
262
268
|
children: suffix
|
|
263
269
|
});
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else t19 = $[
|
|
270
|
+
$[68] = classes?.suffix;
|
|
271
|
+
$[69] = slots?.suffix;
|
|
272
|
+
$[70] = suffix;
|
|
273
|
+
$[71] = t19;
|
|
274
|
+
} else t19 = $[71];
|
|
269
275
|
let t20;
|
|
270
|
-
if ($[
|
|
276
|
+
if ($[72] !== t14 || $[73] !== t16 || $[74] !== t17 || $[75] !== t18 || $[76] !== t19) {
|
|
271
277
|
t20 = /*#__PURE__*/ jsxs("div", {
|
|
272
278
|
"data-tao-statistic-content": "",
|
|
273
279
|
className: t14,
|
|
@@ -278,27 +284,27 @@ const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
278
284
|
t19
|
|
279
285
|
]
|
|
280
286
|
});
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
} else t20 = $[
|
|
287
|
+
$[72] = t14;
|
|
288
|
+
$[73] = t16;
|
|
289
|
+
$[74] = t17;
|
|
290
|
+
$[75] = t18;
|
|
291
|
+
$[76] = t19;
|
|
292
|
+
$[77] = t20;
|
|
293
|
+
} else t20 = $[77];
|
|
288
294
|
let t21;
|
|
289
|
-
if ($[
|
|
295
|
+
if ($[78] !== loading || $[79] !== t20) {
|
|
290
296
|
t21 = /*#__PURE__*/ jsx(Skeleton, {
|
|
291
297
|
loading: loading,
|
|
292
298
|
paragraph: false,
|
|
293
299
|
active: true,
|
|
294
300
|
children: t20
|
|
295
301
|
});
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
} else t21 = $[
|
|
302
|
+
$[78] = loading;
|
|
303
|
+
$[79] = t20;
|
|
304
|
+
$[80] = t21;
|
|
305
|
+
} else t21 = $[80];
|
|
300
306
|
let t22;
|
|
301
|
-
if ($[
|
|
307
|
+
if ($[81] !== rest || $[82] !== t10 || $[83] !== t12 || $[84] !== t13 || $[85] !== t21) {
|
|
302
308
|
t22 = /*#__PURE__*/ jsxs("div", {
|
|
303
309
|
...rest,
|
|
304
310
|
ref: node,
|
|
@@ -310,13 +316,13 @@ const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
310
316
|
t21
|
|
311
317
|
]
|
|
312
318
|
});
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
} else t22 = $[
|
|
319
|
+
$[81] = rest;
|
|
320
|
+
$[82] = t10;
|
|
321
|
+
$[83] = t12;
|
|
322
|
+
$[84] = t13;
|
|
323
|
+
$[85] = t21;
|
|
324
|
+
$[86] = t22;
|
|
325
|
+
} else t22 = $[86];
|
|
320
326
|
return t22;
|
|
321
327
|
});
|
|
322
328
|
StatisticRoot.displayName = 'Statistic';
|
|
@@ -148,7 +148,7 @@ function Steps(t0) {
|
|
|
148
148
|
const isPanel = "panel" === mergedType;
|
|
149
149
|
const mergedOrientation = isPanel ? "horizontal" : "vertical" === orientation || responsive && true === screens.xs ? "vertical" : "horizontal";
|
|
150
150
|
const mergedTitlePlacement = isDot || "vertical" === mergedOrientation ? "vertical" === mergedOrientation ? "horizontal" : "vertical" : "navigation" === mergedType ? "horizontal" : titlePlacement ?? "horizontal";
|
|
151
|
-
const mergedPercent = isInline ? void 0 : percent;
|
|
151
|
+
const mergedPercent = isInline || void 0 === percent ? void 0 : Math.min(100, Math.max(0, percent || 0));
|
|
152
152
|
const { canApplyMaxCount, displaySteps, displayCurrent } = useDisplaySteps(mergedItems, current, initial, maxCount);
|
|
153
153
|
let t10;
|
|
154
154
|
if ($[4] !== displayCurrent || $[5] !== displaySteps || $[6] !== status) {
|