@rockshin/tao-ui 0.0.57 → 0.0.58
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/app/app-notices.js +10 -3
- 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 +4 -1
- package/dist/components/carousel/carousel.js +8 -2
- package/dist/components/collapse/collapse-panels.js +68 -67
- package/dist/components/date-picker/date-localization.js +12 -14
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/float-button/float-button.js +7 -5
- package/dist/components/image/image.js +135 -143
- package/dist/components/input/otp.js +6 -0
- package/dist/components/input/search.js +7 -5
- package/dist/components/list/list.js +106 -105
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/pagination/pagination.d.ts +2 -0
- package/dist/components/pagination/pagination.js +4 -0
- 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/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +60 -53
- package/dist/components/statistic/statistic.js +84 -78
- package/dist/components/steps/steps.js +1 -1
- package/dist/components/table/table.js +4 -1
- package/dist/components/upload/upload.js +2 -2
- package/dist/number-input/cursor.js +20 -8
- package/dist/number-input/format.js +12 -4
- package/dist/number-input/use-number-input.js +4 -1
- package/package.json +1 -1
|
@@ -322,7 +322,7 @@ function gridVariables(grid) {
|
|
|
322
322
|
return result;
|
|
323
323
|
}
|
|
324
324
|
function ListRoot(t0, ref) {
|
|
325
|
-
const $ = c(
|
|
325
|
+
const $ = c(106);
|
|
326
326
|
let children;
|
|
327
327
|
let className;
|
|
328
328
|
let classNames;
|
|
@@ -425,27 +425,28 @@ function ListRoot(t0, ref) {
|
|
|
425
425
|
if (pagination && void 0 === paging.current && page !== current) setPage(current);
|
|
426
426
|
const start = (current - 1) * resolvedPageSize;
|
|
427
427
|
let t9;
|
|
428
|
-
if ($[28] !== dataSource || $[29] !== pagination || $[30] !== resolvedPageSize || $[31] !== start) {
|
|
429
|
-
t9 = pagination && dataSource.length
|
|
428
|
+
if ($[28] !== dataSource || $[29] !== pagination || $[30] !== resolvedPageSize || $[31] !== start || $[32] !== total) {
|
|
429
|
+
t9 = pagination && total <= dataSource.length ? dataSource.slice(start, start + resolvedPageSize) : dataSource;
|
|
430
430
|
$[28] = dataSource;
|
|
431
431
|
$[29] = pagination;
|
|
432
432
|
$[30] = resolvedPageSize;
|
|
433
433
|
$[31] = start;
|
|
434
|
-
$[32] =
|
|
435
|
-
|
|
434
|
+
$[32] = total;
|
|
435
|
+
$[33] = t9;
|
|
436
|
+
} else t9 = $[33];
|
|
436
437
|
const data = t9;
|
|
437
438
|
let t10;
|
|
438
|
-
if ($[
|
|
439
|
+
if ($[34] !== loading) {
|
|
439
440
|
t10 = "boolean" == typeof loading ? {
|
|
440
441
|
spinning: loading
|
|
441
442
|
} : loading;
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
} else t10 = $[
|
|
443
|
+
$[34] = loading;
|
|
444
|
+
$[35] = t10;
|
|
445
|
+
} else t10 = $[35];
|
|
445
446
|
const spinner = t10;
|
|
446
447
|
const isLoading = spinner.spinning ?? "object" == typeof loading;
|
|
447
448
|
let t11;
|
|
448
|
-
if ($[
|
|
449
|
+
if ($[36] !== classNames?.pagination || $[37] !== current || $[38] !== pagination || $[39] !== paging || $[40] !== resolvedPageSize || $[41] !== styles?.pagination || $[42] !== total) {
|
|
449
450
|
t11 = pagination && !(paging.hideOnSinglePage && total <= resolvedPageSize) ? /*#__PURE__*/ jsx("div", {
|
|
450
451
|
"data-tao-list-pagination": "",
|
|
451
452
|
"data-tao-align": paging.align ?? "end",
|
|
@@ -464,18 +465,18 @@ function ListRoot(t0, ref) {
|
|
|
464
465
|
}
|
|
465
466
|
})
|
|
466
467
|
}) : null;
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
} else t11 = $[
|
|
468
|
+
$[36] = classNames?.pagination;
|
|
469
|
+
$[37] = current;
|
|
470
|
+
$[38] = pagination;
|
|
471
|
+
$[39] = paging;
|
|
472
|
+
$[40] = resolvedPageSize;
|
|
473
|
+
$[41] = styles?.pagination;
|
|
474
|
+
$[42] = total;
|
|
475
|
+
$[43] = t11;
|
|
476
|
+
} else t11 = $[43];
|
|
476
477
|
const paginationNode = t11;
|
|
477
478
|
let t12;
|
|
478
|
-
if ($[
|
|
479
|
+
if ($[44] !== children || $[45] !== data || $[46] !== renderItem || $[47] !== rowKey) {
|
|
479
480
|
t12 = data.length ? data.map((value, index)=>{
|
|
480
481
|
const rendered = renderItem?.(value, index);
|
|
481
482
|
const configuredKey = "function" == typeof rowKey ? rowKey(value) : null != rowKey ? value[rowKey] : void 0;
|
|
@@ -484,74 +485,74 @@ function ListRoot(t0, ref) {
|
|
|
484
485
|
children: rendered
|
|
485
486
|
}, key);
|
|
486
487
|
}) : children;
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
} else t12 = $[
|
|
488
|
+
$[44] = children;
|
|
489
|
+
$[45] = data;
|
|
490
|
+
$[46] = renderItem;
|
|
491
|
+
$[47] = rowKey;
|
|
492
|
+
$[48] = t12;
|
|
493
|
+
} else t12 = $[48];
|
|
493
494
|
const content = t12;
|
|
494
495
|
let t13;
|
|
495
|
-
if ($[
|
|
496
|
+
if ($[49] !== grid || $[50] !== itemLayout) {
|
|
496
497
|
t13 = {
|
|
497
498
|
grid,
|
|
498
499
|
itemLayout
|
|
499
500
|
};
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
} else t13 = $[
|
|
501
|
+
$[49] = grid;
|
|
502
|
+
$[50] = itemLayout;
|
|
503
|
+
$[51] = t13;
|
|
504
|
+
} else t13 = $[51];
|
|
504
505
|
const t14 = "default" === size ? "medium" : size ?? config.size;
|
|
505
506
|
const t15 = bordered ? "" : void 0;
|
|
506
507
|
const t16 = split ? "" : void 0;
|
|
507
508
|
const t17 = grid ? "" : void 0;
|
|
508
509
|
const t18 = classNames?.root;
|
|
509
510
|
let t19;
|
|
510
|
-
if ($[
|
|
511
|
+
if ($[52] !== className || $[53] !== prefixCls || $[54] !== rootClassName || $[55] !== t18) {
|
|
511
512
|
t19 = cx(prefixCls, t18, rootClassName, className);
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
} else t19 = $[
|
|
513
|
+
$[52] = className;
|
|
514
|
+
$[53] = prefixCls;
|
|
515
|
+
$[54] = rootClassName;
|
|
516
|
+
$[55] = t18;
|
|
517
|
+
$[56] = t19;
|
|
518
|
+
} else t19 = $[56];
|
|
518
519
|
let t20;
|
|
519
|
-
if ($[
|
|
520
|
+
if ($[57] !== grid) {
|
|
520
521
|
t20 = gridVariables(grid);
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
} else t20 = $[
|
|
522
|
+
$[57] = grid;
|
|
523
|
+
$[58] = t20;
|
|
524
|
+
} else t20 = $[58];
|
|
524
525
|
const t21 = styles?.root;
|
|
525
526
|
let t22;
|
|
526
|
-
if ($[
|
|
527
|
+
if ($[59] !== style || $[60] !== t20 || $[61] !== t21) {
|
|
527
528
|
t22 = {
|
|
528
529
|
...t20,
|
|
529
530
|
...t21,
|
|
530
531
|
...style
|
|
531
532
|
};
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
} else t22 = $[
|
|
533
|
+
$[59] = style;
|
|
534
|
+
$[60] = t20;
|
|
535
|
+
$[61] = t21;
|
|
536
|
+
$[62] = t22;
|
|
537
|
+
} else t22 = $[62];
|
|
537
538
|
const t23 = ("top" === paging.position || "both" === paging.position) && paginationNode;
|
|
538
539
|
let t24;
|
|
539
|
-
if ($[
|
|
540
|
+
if ($[63] !== classNames?.header || $[64] !== header || $[65] !== styles?.header) {
|
|
540
541
|
t24 = null != header && /*#__PURE__*/ jsx("div", {
|
|
541
542
|
"data-tao-list-header": "",
|
|
542
543
|
className: classNames?.header,
|
|
543
544
|
style: styles?.header,
|
|
544
545
|
children: header
|
|
545
546
|
});
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
} else t24 = $[
|
|
547
|
+
$[63] = classNames?.header;
|
|
548
|
+
$[64] = header;
|
|
549
|
+
$[65] = styles?.header;
|
|
550
|
+
$[66] = t24;
|
|
551
|
+
} else t24 = $[66];
|
|
551
552
|
const t25 = classNames?.items;
|
|
552
553
|
const t26 = styles?.items;
|
|
553
554
|
let t27;
|
|
554
|
-
if ($[
|
|
555
|
+
if ($[67] !== children || $[68] !== classNames?.empty || $[69] !== content || $[70] !== data.length || $[71] !== isLoading || $[72] !== locale?.emptyText || $[73] !== styles?.empty) {
|
|
555
556
|
t27 = data.length || Children.toArray(children).length ? content : isLoading ? /*#__PURE__*/ jsx("li", {
|
|
556
557
|
"data-tao-list-loading": ""
|
|
557
558
|
}) : /*#__PURE__*/ jsx("li", {
|
|
@@ -562,56 +563,56 @@ function ListRoot(t0, ref) {
|
|
|
562
563
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
563
564
|
})
|
|
564
565
|
});
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
} else t27 = $[
|
|
566
|
+
$[67] = children;
|
|
567
|
+
$[68] = classNames?.empty;
|
|
568
|
+
$[69] = content;
|
|
569
|
+
$[70] = data.length;
|
|
570
|
+
$[71] = isLoading;
|
|
571
|
+
$[72] = locale?.emptyText;
|
|
572
|
+
$[73] = styles?.empty;
|
|
573
|
+
$[74] = t27;
|
|
574
|
+
} else t27 = $[74];
|
|
574
575
|
let t28;
|
|
575
|
-
if ($[
|
|
576
|
+
if ($[75] !== t25 || $[76] !== t26 || $[77] !== t27) {
|
|
576
577
|
t28 = /*#__PURE__*/ jsx("ul", {
|
|
577
578
|
"data-tao-list-items": "",
|
|
578
579
|
className: t25,
|
|
579
580
|
style: t26,
|
|
580
581
|
children: t27
|
|
581
582
|
});
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
} else t28 = $[
|
|
583
|
+
$[75] = t25;
|
|
584
|
+
$[76] = t26;
|
|
585
|
+
$[77] = t27;
|
|
586
|
+
$[78] = t28;
|
|
587
|
+
} else t28 = $[78];
|
|
587
588
|
let t29;
|
|
588
|
-
if ($[
|
|
589
|
+
if ($[79] !== isLoading || $[80] !== spinner || $[81] !== t28) {
|
|
589
590
|
t29 = /*#__PURE__*/ jsx(Spinner, {
|
|
590
591
|
...spinner,
|
|
591
592
|
spinning: isLoading,
|
|
592
593
|
children: t28
|
|
593
594
|
});
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
} else t29 = $[
|
|
595
|
+
$[79] = isLoading;
|
|
596
|
+
$[80] = spinner;
|
|
597
|
+
$[81] = t28;
|
|
598
|
+
$[82] = t29;
|
|
599
|
+
} else t29 = $[82];
|
|
599
600
|
let t30;
|
|
600
|
-
if ($[
|
|
601
|
+
if ($[83] !== classNames?.footer || $[84] !== footer || $[85] !== styles?.footer) {
|
|
601
602
|
t30 = null != footer && /*#__PURE__*/ jsx("div", {
|
|
602
603
|
"data-tao-list-footer": "",
|
|
603
604
|
className: classNames?.footer,
|
|
604
605
|
style: styles?.footer,
|
|
605
606
|
children: footer
|
|
606
607
|
});
|
|
607
|
-
$[
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
} else t30 = $[
|
|
608
|
+
$[83] = classNames?.footer;
|
|
609
|
+
$[84] = footer;
|
|
610
|
+
$[85] = styles?.footer;
|
|
611
|
+
$[86] = t30;
|
|
612
|
+
} else t30 = $[86];
|
|
612
613
|
const t31 = "top" !== paging.position && paginationNode;
|
|
613
614
|
let t32;
|
|
614
|
-
if ($[
|
|
615
|
+
if ($[87] !== extra || $[88] !== loadMore || $[89] !== ref || $[90] !== rest || $[91] !== t14 || $[92] !== t15 || $[93] !== t16 || $[94] !== t17 || $[95] !== t19 || $[96] !== t22 || $[97] !== t23 || $[98] !== t24 || $[99] !== t29 || $[100] !== t30 || $[101] !== t31) {
|
|
615
616
|
t32 = /*#__PURE__*/ jsxs("div", {
|
|
616
617
|
...rest,
|
|
617
618
|
ref: ref,
|
|
@@ -632,33 +633,33 @@ function ListRoot(t0, ref) {
|
|
|
632
633
|
t31
|
|
633
634
|
]
|
|
634
635
|
});
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
638
|
-
$[
|
|
639
|
-
$[
|
|
640
|
-
$[
|
|
641
|
-
$[
|
|
642
|
-
$[
|
|
643
|
-
$[
|
|
644
|
-
$[
|
|
645
|
-
$[
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
$[
|
|
650
|
-
$[
|
|
651
|
-
} else t32 = $[
|
|
636
|
+
$[87] = extra;
|
|
637
|
+
$[88] = loadMore;
|
|
638
|
+
$[89] = ref;
|
|
639
|
+
$[90] = rest;
|
|
640
|
+
$[91] = t14;
|
|
641
|
+
$[92] = t15;
|
|
642
|
+
$[93] = t16;
|
|
643
|
+
$[94] = t17;
|
|
644
|
+
$[95] = t19;
|
|
645
|
+
$[96] = t22;
|
|
646
|
+
$[97] = t23;
|
|
647
|
+
$[98] = t24;
|
|
648
|
+
$[99] = t29;
|
|
649
|
+
$[100] = t30;
|
|
650
|
+
$[101] = t31;
|
|
651
|
+
$[102] = t32;
|
|
652
|
+
} else t32 = $[102];
|
|
652
653
|
let t33;
|
|
653
|
-
if ($[
|
|
654
|
+
if ($[103] !== t13 || $[104] !== t32) {
|
|
654
655
|
t33 = /*#__PURE__*/ jsx(ListContext.Provider, {
|
|
655
656
|
value: t13,
|
|
656
657
|
children: t32
|
|
657
658
|
});
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
} else t33 = $[
|
|
659
|
+
$[103] = t13;
|
|
660
|
+
$[104] = t32;
|
|
661
|
+
$[105] = t33;
|
|
662
|
+
} else t33 = $[105];
|
|
662
663
|
return t33;
|
|
663
664
|
}
|
|
664
665
|
const List = Object.assign(/*#__PURE__*/ forwardRef(ListRoot), {
|
|
@@ -286,7 +286,7 @@ function MasonryInner(props, ref) {
|
|
|
286
286
|
...slots?.item,
|
|
287
287
|
position: "absolute",
|
|
288
288
|
width,
|
|
289
|
-
height: item_1.height,
|
|
289
|
+
height: item_1.height ?? slots?.item?.height,
|
|
290
290
|
insetInlineStart: `calc((${width} + ${gap_0}) * ${column_1})`,
|
|
291
291
|
top: position_0?.top ?? 0
|
|
292
292
|
},
|
|
@@ -6,8 +6,10 @@ export type PaginationSemanticPart = 'root' | 'item' | 'total';
|
|
|
6
6
|
export interface PaginationProps {
|
|
7
7
|
current?: number;
|
|
8
8
|
defaultCurrent?: number;
|
|
9
|
+
/** A positive integer. */
|
|
9
10
|
pageSize?: number;
|
|
10
11
|
defaultPageSize?: number;
|
|
12
|
+
/** Total record count, as a non-negative safe integer. */
|
|
11
13
|
total: number;
|
|
12
14
|
onChange?: (page: number, pageSize: number) => void;
|
|
13
15
|
showSizeChanger?: boolean;
|
|
@@ -5,6 +5,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import { Select } from "../select/select.js";
|
|
7
7
|
import "./pagination.css";
|
|
8
|
+
const isValidPageSize = (size)=>Number.isSafeInteger(size) && size > 0;
|
|
8
9
|
function range(start, end) {
|
|
9
10
|
const result = [];
|
|
10
11
|
for(let i = start; i <= end; i++)result.push(i);
|
|
@@ -93,6 +94,9 @@ function Pagination(t0) {
|
|
|
93
94
|
const isPageSizeControlled = void 0 !== pageSizeProp;
|
|
94
95
|
const [internalPageSize, setInternalPageSize] = useState(defaultPageSize);
|
|
95
96
|
const pageSize = isPageSizeControlled ? pageSizeProp : internalPageSize;
|
|
97
|
+
if (!Number.isSafeInteger(total) || total < 0) throw new RangeError("Pagination total must be a non-negative safe integer");
|
|
98
|
+
if (!isValidPageSize(pageSize)) throw new RangeError("Pagination pageSize must be a positive integer");
|
|
99
|
+
if (showSizeChanger && !pageSizeOptions.every(isValidPageSize)) throw new RangeError("Pagination pageSizeOptions must contain positive integers");
|
|
96
100
|
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
97
101
|
const boundedCurrent = Math.min(Math.max(1, internalCurrent), totalPages);
|
|
98
102
|
if (!isCurrentControlled && boundedCurrent !== internalCurrent) setInternalCurrent(boundedCurrent);
|
|
@@ -20,7 +20,7 @@ const Star = /*#__PURE__*/ jsx("svg", {
|
|
|
20
20
|
})
|
|
21
21
|
});
|
|
22
22
|
const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
23
|
-
const $ = c(
|
|
23
|
+
const $ = c(69);
|
|
24
24
|
let characterRender;
|
|
25
25
|
let className;
|
|
26
26
|
let classNames;
|
|
@@ -102,37 +102,38 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
102
102
|
} else t4 = $[21];
|
|
103
103
|
const numberFormat = t4;
|
|
104
104
|
let t5;
|
|
105
|
-
if ($[22]
|
|
106
|
-
t5 = {
|
|
107
|
-
|
|
105
|
+
if ($[22] !== controlled || $[23] !== count || $[24] !== onChange) {
|
|
106
|
+
t5 = (next)=>{
|
|
107
|
+
const bounded = Math.min(count, Math.max(0, next));
|
|
108
|
+
if (!controlled) setInternalValue(bounded);
|
|
109
|
+
onChange?.(bounded);
|
|
108
110
|
};
|
|
109
|
-
$[22] =
|
|
110
|
-
|
|
111
|
+
$[22] = controlled;
|
|
112
|
+
$[23] = count;
|
|
113
|
+
$[24] = onChange;
|
|
114
|
+
$[25] = t5;
|
|
115
|
+
} else t5 = $[25];
|
|
116
|
+
const handleChange = t5;
|
|
111
117
|
let t6;
|
|
112
|
-
if ($[
|
|
118
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
113
119
|
t6 = {
|
|
114
|
-
|
|
120
|
+
display: "contents"
|
|
115
121
|
};
|
|
116
|
-
$[
|
|
117
|
-
} else t6 = $[
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const t11 = resolvedDisabled || void 0;
|
|
123
|
-
const t12 = resolvedDisabled || readOnly;
|
|
124
|
-
let t13;
|
|
125
|
-
if ($[24] !== controlled || $[25] !== count || $[26] !== onChange) {
|
|
126
|
-
t13 = (next)=>{
|
|
127
|
-
const bounded = Math.min(count, Math.max(0, next));
|
|
128
|
-
if (!controlled) setInternalValue(bounded);
|
|
129
|
-
onChange?.(bounded);
|
|
122
|
+
$[26] = t6;
|
|
123
|
+
} else t6 = $[26];
|
|
124
|
+
let t7;
|
|
125
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
|
+
t7 = {
|
|
127
|
+
role: "radiogroup"
|
|
130
128
|
};
|
|
131
|
-
$[
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
$[27] = t7;
|
|
130
|
+
} else t7 = $[27];
|
|
131
|
+
const t8 = "middle" === size ? "medium" : size ?? config.size;
|
|
132
|
+
const t9 = resolvedDisabled ? "" : void 0;
|
|
133
|
+
const t10 = readOnly ? "" : void 0;
|
|
134
|
+
const t11 = readOnly || void 0;
|
|
135
|
+
const t12 = resolvedDisabled || void 0;
|
|
136
|
+
const t13 = resolvedDisabled || readOnly;
|
|
136
137
|
const t14 = classNames?.root;
|
|
137
138
|
let t15;
|
|
138
139
|
if ($[28] !== className || $[29] !== rootClassName || $[30] !== t14) {
|
|
@@ -154,7 +155,7 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
154
155
|
$[34] = t17;
|
|
155
156
|
} else t17 = $[34];
|
|
156
157
|
let t18;
|
|
157
|
-
if ($[35] !== characterRender || $[36] !== classNames?.item || $[37] !== count || $[38] !==
|
|
158
|
+
if ($[35] !== characterRender || $[36] !== classNames?.item || $[37] !== count || $[38] !== handleChange || $[39] !== keyboard || $[40] !== numberFormat || $[41] !== rest || $[42] !== selectedValue || $[43] !== styles?.item || $[44] !== tooltips) {
|
|
158
159
|
t18 = (node, info)=>{
|
|
159
160
|
const index = info.index ?? 0;
|
|
160
161
|
const half = !!info.allowHalf && (info.value ?? 0) > index && (info.value ?? 0) < index + 1;
|
|
@@ -173,7 +174,15 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
173
174
|
children: /*#__PURE__*/ cloneElement(radio, {
|
|
174
175
|
"aria-checked": checked,
|
|
175
176
|
"aria-label": `${score} / ${numberFormat.format(count)}`,
|
|
176
|
-
onKeyDown: false
|
|
177
|
+
onKeyDown: false !== keyboard && radio.props.onKeyDown ? (event)=>{
|
|
178
|
+
if (" " !== event.key) return void radio.props.onKeyDown?.(event);
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
if (!event.repeat) {
|
|
181
|
+
const starValue = index + 1;
|
|
182
|
+
const clear = (rest.allowClear ?? true) && selectedValue === starValue;
|
|
183
|
+
handleChange(clear ? 0 : starValue);
|
|
184
|
+
}
|
|
185
|
+
} : void 0
|
|
177
186
|
})
|
|
178
187
|
});
|
|
179
188
|
const rendered = characterRender ? characterRender(child, info) : child;
|
|
@@ -188,70 +197,72 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
188
197
|
$[35] = characterRender;
|
|
189
198
|
$[36] = classNames?.item;
|
|
190
199
|
$[37] = count;
|
|
191
|
-
$[38] =
|
|
192
|
-
$[39] =
|
|
193
|
-
$[40] =
|
|
194
|
-
$[41] =
|
|
195
|
-
$[42] =
|
|
196
|
-
$[43] =
|
|
197
|
-
|
|
200
|
+
$[38] = handleChange;
|
|
201
|
+
$[39] = keyboard;
|
|
202
|
+
$[40] = numberFormat;
|
|
203
|
+
$[41] = rest;
|
|
204
|
+
$[42] = selectedValue;
|
|
205
|
+
$[43] = styles?.item;
|
|
206
|
+
$[44] = tooltips;
|
|
207
|
+
$[45] = t18;
|
|
208
|
+
} else t18 = $[45];
|
|
198
209
|
let t19;
|
|
199
|
-
if ($[
|
|
210
|
+
if ($[46] !== character || $[47] !== count || $[48] !== direction || $[49] !== handleChange || $[50] !== keyboard || $[51] !== prefixCls || $[52] !== ref || $[53] !== rest || $[54] !== selectedValue || $[55] !== t10 || $[56] !== t11 || $[57] !== t12 || $[58] !== t13 || $[59] !== t15 || $[60] !== t17 || $[61] !== t18 || $[62] !== t8 || $[63] !== t9) {
|
|
200
211
|
t19 = /*#__PURE__*/ jsx(RcRateComponent, {
|
|
201
212
|
...rest,
|
|
202
213
|
direction: direction,
|
|
203
214
|
ref: ref,
|
|
204
|
-
...
|
|
215
|
+
...t7,
|
|
205
216
|
"data-tao-rate": "",
|
|
206
|
-
"data-tao-size":
|
|
207
|
-
"data-tao-disabled":
|
|
208
|
-
"data-tao-readonly":
|
|
209
|
-
"aria-readonly":
|
|
210
|
-
"aria-disabled":
|
|
217
|
+
"data-tao-size": t8,
|
|
218
|
+
"data-tao-disabled": t9,
|
|
219
|
+
"data-tao-readonly": t10,
|
|
220
|
+
"aria-readonly": t11,
|
|
221
|
+
"aria-disabled": t12,
|
|
211
222
|
prefixCls: prefixCls,
|
|
212
|
-
disabled:
|
|
223
|
+
disabled: t13,
|
|
213
224
|
count: count,
|
|
214
225
|
keyboard: keyboard,
|
|
215
226
|
value: selectedValue,
|
|
216
|
-
onChange:
|
|
227
|
+
onChange: handleChange,
|
|
217
228
|
character: character,
|
|
218
229
|
className: t15,
|
|
219
230
|
style: t17,
|
|
220
231
|
characterRender: t18
|
|
221
232
|
});
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
} else t19 = $[
|
|
233
|
+
$[46] = character;
|
|
234
|
+
$[47] = count;
|
|
235
|
+
$[48] = direction;
|
|
236
|
+
$[49] = handleChange;
|
|
237
|
+
$[50] = keyboard;
|
|
238
|
+
$[51] = prefixCls;
|
|
239
|
+
$[52] = ref;
|
|
240
|
+
$[53] = rest;
|
|
241
|
+
$[54] = selectedValue;
|
|
242
|
+
$[55] = t10;
|
|
243
|
+
$[56] = t11;
|
|
244
|
+
$[57] = t12;
|
|
245
|
+
$[58] = t13;
|
|
246
|
+
$[59] = t15;
|
|
247
|
+
$[60] = t17;
|
|
248
|
+
$[61] = t18;
|
|
249
|
+
$[62] = t8;
|
|
250
|
+
$[63] = t9;
|
|
251
|
+
$[64] = t19;
|
|
252
|
+
} else t19 = $[64];
|
|
242
253
|
let t20;
|
|
243
|
-
if ($[
|
|
254
|
+
if ($[65] !== direction || $[66] !== directionRef || $[67] !== t19) {
|
|
244
255
|
t20 = /*#__PURE__*/ jsx("span", {
|
|
245
256
|
ref: directionRef,
|
|
246
257
|
dir: direction,
|
|
247
|
-
style:
|
|
258
|
+
style: t6,
|
|
248
259
|
children: t19
|
|
249
260
|
});
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
} else t20 = $[
|
|
261
|
+
$[65] = direction;
|
|
262
|
+
$[66] = directionRef;
|
|
263
|
+
$[67] = t19;
|
|
264
|
+
$[68] = t20;
|
|
265
|
+
} else t20 = $[68];
|
|
255
266
|
return t20;
|
|
256
267
|
});
|
|
257
268
|
Rate.displayName = 'Rate';
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
opacity: 0;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
[data-tao-scroll-area][data-tao-scroll-type="scroll"]:hover [data-tao-scrollbar] {
|
|
103
|
+
[data-tao-scroll-area][data-tao-scroll-type="scroll"]:hover [data-tao-scrollbar], [data-tao-scroll-area]:is([data-tao-scroll-type="auto"], [data-tao-scroll-type="scroll"])[data-tao-scrolling] [data-tao-scrollbar], [data-tao-scroll-area][data-tao-scroll-type] [data-tao-scrollbar]:focus-visible {
|
|
104
104
|
opacity: 1;
|
|
105
105
|
}
|
|
106
106
|
|