rsuite 5.55.0 → 5.56.0
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/AutoComplete/styles/index.css +3 -3
- package/CHANGELOG.md +29 -0
- package/Calendar/styles/index.css +3 -0
- package/Calendar/styles/index.less +3 -1
- package/Cascader/styles/index.css +3 -3
- package/CheckPicker/styles/index.css +142 -40
- package/CheckPicker/styles/index.less +1 -1
- package/CheckTree/styles/index.css +143 -41
- package/CheckTreePicker/styles/index.css +143 -41
- package/CheckTreePicker/styles/index.less +2 -2
- package/Checkbox/styles/index.css +159 -36
- package/Checkbox/styles/index.less +32 -13
- package/DatePicker/styles/index.css +10 -5
- package/DatePicker/styles/index.less +5 -2
- package/DateRangePicker/styles/index.css +22 -14
- package/DateRangePicker/styles/index.less +5 -1
- package/InputPicker/styles/index.css +3 -3
- package/Message/styles/index.css +1 -1
- package/MultiCascader/styles/index.css +141 -39
- package/Nav/styles/index.css +1 -2
- package/Nav/styles/index.less +1 -2
- package/Pagination/styles/index.css +3 -3
- package/Radio/styles/index.css +133 -19
- package/Radio/styles/index.less +28 -12
- package/RadioGroup/styles/index.css +1 -1
- package/RadioGroup/styles/index.less +1 -1
- package/SelectPicker/styles/index.css +3 -3
- package/Tabs/styles/index.css +1 -2
- package/TagGroup/styles/index.css +1 -1
- package/TagGroup/styles/index.less +1 -1
- package/TagInput/styles/index.css +141 -39
- package/TagPicker/styles/index.css +141 -39
- package/cjs/Checkbox/Checkbox.d.ts +67 -25
- package/cjs/Checkbox/Checkbox.js +36 -26
- package/cjs/DatePicker/DatePicker.js +1 -1
- package/cjs/DateRangePicker/DateRangePicker.js +1 -1
- package/cjs/InputPicker/InputPicker.js +2 -2
- package/cjs/InputPicker/InputPickerContext.d.ts +1 -1
- package/cjs/MultiCascader/TreeView.js +2 -1
- package/cjs/Radio/Radio.d.ts +42 -16
- package/cjs/Radio/Radio.js +42 -37
- package/cjs/RadioGroup/RadioGroup.d.ts +1 -1
- package/cjs/RadioGroup/RadioGroup.js +3 -3
- package/cjs/TagPicker/index.js +1 -1
- package/cjs/internals/Picker/ListCheckItem.d.ts +2 -11
- package/cjs/internals/Picker/ListCheckItem.js +8 -6
- package/dist/rsuite-no-reset-rtl.css +279 -77
- package/dist/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
- package/dist/rsuite-no-reset.css +279 -77
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +279 -77
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +279 -77
- package/dist/rsuite.js +9 -9
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Checkbox/Checkbox.d.ts +67 -25
- package/esm/Checkbox/Checkbox.js +38 -28
- package/esm/DatePicker/DatePicker.js +1 -1
- package/esm/DateRangePicker/DateRangePicker.js +1 -1
- package/esm/InputPicker/InputPicker.js +2 -2
- package/esm/InputPicker/InputPickerContext.d.ts +1 -1
- package/esm/MultiCascader/TreeView.js +2 -1
- package/esm/Radio/Radio.d.ts +42 -16
- package/esm/Radio/Radio.js +43 -38
- package/esm/RadioGroup/RadioGroup.d.ts +1 -1
- package/esm/RadioGroup/RadioGroup.js +5 -5
- package/esm/TagPicker/index.js +1 -1
- package/esm/internals/Picker/ListCheckItem.d.ts +2 -11
- package/esm/internals/Picker/ListCheckItem.js +8 -6
- package/internals/Picker/styles/index.less +1 -1
- package/package.json +1 -1
- package/styles/variables.less +1 -1
|
@@ -406,17 +406,16 @@
|
|
|
406
406
|
position: relative;
|
|
407
407
|
}
|
|
408
408
|
/* rtl:begin:ignore */
|
|
409
|
-
.rs-checkbox-
|
|
410
|
-
.rs-checkbox-
|
|
411
|
-
.rs-checkbox-
|
|
412
|
-
.rs-checkbox-wrapper .rs-checkbox-inner::after {
|
|
409
|
+
.rs-checkbox-control::before,
|
|
410
|
+
.rs-checkbox-control .rs-checkbox-inner::before,
|
|
411
|
+
.rs-checkbox-control .rs-checkbox-inner::after {
|
|
413
412
|
content: '';
|
|
414
413
|
position: absolute;
|
|
415
414
|
left: 0;
|
|
416
415
|
top: 0;
|
|
417
416
|
display: block;
|
|
418
417
|
}
|
|
419
|
-
.rs-checkbox-
|
|
418
|
+
.rs-checkbox-control .rs-checkbox-inner::after {
|
|
420
419
|
opacity: 0;
|
|
421
420
|
-webkit-transform: rotate(45deg) scale(0);
|
|
422
421
|
transform: rotate(45deg) scale(0);
|
|
@@ -425,12 +424,12 @@
|
|
|
425
424
|
transition: opacity 0.2s ease-in, transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
426
425
|
transition: opacity 0.2s ease-in, transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46), -webkit-transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
427
426
|
}
|
|
428
|
-
.rs-theme-high-contrast .rs-checkbox-
|
|
427
|
+
.rs-theme-high-contrast .rs-checkbox-control .rs-checkbox-inner::after {
|
|
429
428
|
-webkit-transition: none;
|
|
430
429
|
transition: none;
|
|
431
430
|
}
|
|
432
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
433
|
-
.rs-checkbox-indeterminate .rs-checkbox-
|
|
431
|
+
.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::after,
|
|
432
|
+
.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::after {
|
|
434
433
|
border: solid #fff;
|
|
435
434
|
border: solid var(--rs-checkbox-icon);
|
|
436
435
|
width: 6px;
|
|
@@ -439,12 +438,12 @@
|
|
|
439
438
|
margin-left: 5px;
|
|
440
439
|
opacity: 1;
|
|
441
440
|
}
|
|
442
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
441
|
+
.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::after {
|
|
443
442
|
border-width: 0 2px 2px 0;
|
|
444
443
|
-webkit-transform: rotate(45deg) scale(1);
|
|
445
444
|
transform: rotate(45deg) scale(1);
|
|
446
445
|
}
|
|
447
|
-
.rs-checkbox-indeterminate .rs-checkbox-
|
|
446
|
+
.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::after {
|
|
448
447
|
border-width: 0 0 2px;
|
|
449
448
|
-webkit-transform: rotate(0deg) scale(1);
|
|
450
449
|
transform: rotate(0deg) scale(1);
|
|
@@ -454,7 +453,7 @@
|
|
|
454
453
|
}
|
|
455
454
|
/* rtl:end:ignore */
|
|
456
455
|
/* stylelint-disable-next-line */
|
|
457
|
-
.rs-checkbox-
|
|
456
|
+
.rs-checkbox-control {
|
|
458
457
|
position: absolute;
|
|
459
458
|
width: 16px;
|
|
460
459
|
height: 16px;
|
|
@@ -462,18 +461,22 @@
|
|
|
462
461
|
left: 10px;
|
|
463
462
|
top: 10px;
|
|
464
463
|
}
|
|
465
|
-
.rs-checkbox-
|
|
466
|
-
|
|
467
|
-
height: 0;
|
|
464
|
+
.rs-checkbox-control [type='checkbox'] {
|
|
465
|
+
position: absolute;
|
|
468
466
|
opacity: 0;
|
|
467
|
+
z-index: 1;
|
|
468
|
+
top: -10px;
|
|
469
|
+
right: -10px;
|
|
470
|
+
bottom: -10px;
|
|
471
|
+
left: -10px;
|
|
469
472
|
}
|
|
470
|
-
.rs-checkbox-
|
|
471
|
-
.rs-checkbox-
|
|
472
|
-
.rs-checkbox-
|
|
473
|
+
.rs-checkbox-control::before,
|
|
474
|
+
.rs-checkbox-control .rs-checkbox-inner::before,
|
|
475
|
+
.rs-checkbox-control .rs-checkbox-inner::after {
|
|
473
476
|
width: 16px;
|
|
474
477
|
height: 16px;
|
|
475
478
|
}
|
|
476
|
-
.rs-checkbox-
|
|
479
|
+
.rs-checkbox-control::before {
|
|
477
480
|
border: 1px solid #3498ff;
|
|
478
481
|
border: 1px solid var(--rs-checkbox-checked-bg);
|
|
479
482
|
background-color: transparent;
|
|
@@ -487,23 +490,17 @@
|
|
|
487
490
|
transition: transform 0.2s linear, opacity 0.2s linear;
|
|
488
491
|
transition: transform 0.2s linear, opacity 0.2s linear, -webkit-transform 0.2s linear;
|
|
489
492
|
}
|
|
490
|
-
.rs-theme-high-contrast .rs-checkbox-
|
|
493
|
+
.rs-theme-high-contrast .rs-checkbox-control::before {
|
|
491
494
|
-webkit-transition: none;
|
|
492
495
|
transition: none;
|
|
493
496
|
}
|
|
494
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
497
|
+
.rs-checkbox-checked .rs-checkbox-control::before {
|
|
495
498
|
-webkit-transform: scale(1.5);
|
|
496
499
|
transform: scale(1.5);
|
|
497
500
|
opacity: 0;
|
|
498
501
|
visibility: visible;
|
|
499
502
|
}
|
|
500
|
-
.rs-checkbox-
|
|
501
|
-
top: -10px;
|
|
502
|
-
right: -10px;
|
|
503
|
-
bottom: -10px;
|
|
504
|
-
left: -10px;
|
|
505
|
-
}
|
|
506
|
-
.rs-checkbox-wrapper .rs-checkbox-inner::before {
|
|
503
|
+
.rs-checkbox-control .rs-checkbox-inner::before {
|
|
507
504
|
border: 1px solid #d9d9d9;
|
|
508
505
|
border: 1px solid var(--rs-checkbox-border);
|
|
509
506
|
background-color: transparent;
|
|
@@ -513,35 +510,140 @@
|
|
|
513
510
|
transition: background 0.2s linear, border 0.2s linear, box-shadow 0.2s linear;
|
|
514
511
|
transition: background 0.2s linear, border 0.2s linear, box-shadow 0.2s linear, -webkit-box-shadow 0.2s linear;
|
|
515
512
|
}
|
|
516
|
-
.rs-theme-high-contrast .rs-checkbox-
|
|
513
|
+
.rs-theme-high-contrast .rs-checkbox-control .rs-checkbox-inner::before {
|
|
517
514
|
-webkit-transition: none;
|
|
518
515
|
transition: none;
|
|
519
516
|
}
|
|
520
|
-
label:hover .rs-checkbox-
|
|
517
|
+
label:hover .rs-checkbox-control .rs-checkbox-inner::before {
|
|
521
518
|
border-color: #3498ff;
|
|
522
519
|
border-color: var(--rs-checkbox-checked-bg);
|
|
523
520
|
}
|
|
524
|
-
.rs-checkbox-disabled:not(.rs-checkbox-checked):not(.rs-checkbox-indeterminate) .rs-checkbox-
|
|
521
|
+
.rs-checkbox-disabled:not(.rs-checkbox-checked):not(.rs-checkbox-indeterminate) .rs-checkbox-control .rs-checkbox-inner::before {
|
|
525
522
|
border-color: #f7f7fa;
|
|
526
523
|
border-color: var(--rs-checkbox-disabled-bg);
|
|
527
524
|
background-color: #f7f7fa;
|
|
528
525
|
background-color: var(--rs-checkbox-disabled-bg);
|
|
529
526
|
}
|
|
530
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
531
|
-
.rs-checkbox-indeterminate .rs-checkbox-
|
|
527
|
+
.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::before,
|
|
528
|
+
.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::before {
|
|
532
529
|
border-color: #3498ff;
|
|
533
530
|
border-color: var(--rs-checkbox-checked-bg);
|
|
534
531
|
background-color: #3498ff;
|
|
535
532
|
background-color: var(--rs-checkbox-checked-bg);
|
|
536
533
|
}
|
|
537
|
-
.rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-
|
|
538
|
-
.rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-
|
|
534
|
+
.rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::before,
|
|
535
|
+
.rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::before {
|
|
539
536
|
opacity: 0.3;
|
|
540
537
|
}
|
|
541
|
-
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-
|
|
542
|
-
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-
|
|
538
|
+
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::before,
|
|
539
|
+
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::before {
|
|
543
540
|
opacity: 0.5;
|
|
544
541
|
}
|
|
542
|
+
.rs-checkbox-red .rs-checkbox-control::before {
|
|
543
|
+
border-color: #f44336;
|
|
544
|
+
border-color: var(--rs-red-500);
|
|
545
|
+
}
|
|
546
|
+
.rs-checkbox-red label:hover .rs-checkbox-inner::before {
|
|
547
|
+
border-color: #f44336;
|
|
548
|
+
border-color: var(--rs-red-500);
|
|
549
|
+
}
|
|
550
|
+
.rs-checkbox-red.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
551
|
+
.rs-checkbox-red.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
552
|
+
border-color: #f44336;
|
|
553
|
+
border-color: var(--rs-red-500);
|
|
554
|
+
background-color: #f44336;
|
|
555
|
+
background-color: var(--rs-red-500);
|
|
556
|
+
}
|
|
557
|
+
.rs-checkbox-orange .rs-checkbox-control::before {
|
|
558
|
+
border-color: #fa8900;
|
|
559
|
+
border-color: var(--rs-orange-500);
|
|
560
|
+
}
|
|
561
|
+
.rs-checkbox-orange label:hover .rs-checkbox-inner::before {
|
|
562
|
+
border-color: #fa8900;
|
|
563
|
+
border-color: var(--rs-orange-500);
|
|
564
|
+
}
|
|
565
|
+
.rs-checkbox-orange.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
566
|
+
.rs-checkbox-orange.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
567
|
+
border-color: #fa8900;
|
|
568
|
+
border-color: var(--rs-orange-500);
|
|
569
|
+
background-color: #fa8900;
|
|
570
|
+
background-color: var(--rs-orange-500);
|
|
571
|
+
}
|
|
572
|
+
.rs-checkbox-yellow .rs-checkbox-control::before {
|
|
573
|
+
border-color: #ffb300;
|
|
574
|
+
border-color: var(--rs-yellow-500);
|
|
575
|
+
}
|
|
576
|
+
.rs-checkbox-yellow label:hover .rs-checkbox-inner::before {
|
|
577
|
+
border-color: #ffb300;
|
|
578
|
+
border-color: var(--rs-yellow-500);
|
|
579
|
+
}
|
|
580
|
+
.rs-checkbox-yellow.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
581
|
+
.rs-checkbox-yellow.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
582
|
+
border-color: #ffb300;
|
|
583
|
+
border-color: var(--rs-yellow-500);
|
|
584
|
+
background-color: #ffb300;
|
|
585
|
+
background-color: var(--rs-yellow-500);
|
|
586
|
+
}
|
|
587
|
+
.rs-checkbox-green .rs-checkbox-control::before {
|
|
588
|
+
border-color: #4caf50;
|
|
589
|
+
border-color: var(--rs-green-500);
|
|
590
|
+
}
|
|
591
|
+
.rs-checkbox-green label:hover .rs-checkbox-inner::before {
|
|
592
|
+
border-color: #4caf50;
|
|
593
|
+
border-color: var(--rs-green-500);
|
|
594
|
+
}
|
|
595
|
+
.rs-checkbox-green.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
596
|
+
.rs-checkbox-green.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
597
|
+
border-color: #4caf50;
|
|
598
|
+
border-color: var(--rs-green-500);
|
|
599
|
+
background-color: #4caf50;
|
|
600
|
+
background-color: var(--rs-green-500);
|
|
601
|
+
}
|
|
602
|
+
.rs-checkbox-cyan .rs-checkbox-control::before {
|
|
603
|
+
border-color: #00bcd4;
|
|
604
|
+
border-color: var(--rs-cyan-500);
|
|
605
|
+
}
|
|
606
|
+
.rs-checkbox-cyan label:hover .rs-checkbox-inner::before {
|
|
607
|
+
border-color: #00bcd4;
|
|
608
|
+
border-color: var(--rs-cyan-500);
|
|
609
|
+
}
|
|
610
|
+
.rs-checkbox-cyan.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
611
|
+
.rs-checkbox-cyan.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
612
|
+
border-color: #00bcd4;
|
|
613
|
+
border-color: var(--rs-cyan-500);
|
|
614
|
+
background-color: #00bcd4;
|
|
615
|
+
background-color: var(--rs-cyan-500);
|
|
616
|
+
}
|
|
617
|
+
.rs-checkbox-blue .rs-checkbox-control::before {
|
|
618
|
+
border-color: #2196f3;
|
|
619
|
+
border-color: var(--rs-blue-500);
|
|
620
|
+
}
|
|
621
|
+
.rs-checkbox-blue label:hover .rs-checkbox-inner::before {
|
|
622
|
+
border-color: #2196f3;
|
|
623
|
+
border-color: var(--rs-blue-500);
|
|
624
|
+
}
|
|
625
|
+
.rs-checkbox-blue.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
626
|
+
.rs-checkbox-blue.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
627
|
+
border-color: #2196f3;
|
|
628
|
+
border-color: var(--rs-blue-500);
|
|
629
|
+
background-color: #2196f3;
|
|
630
|
+
background-color: var(--rs-blue-500);
|
|
631
|
+
}
|
|
632
|
+
.rs-checkbox-violet .rs-checkbox-control::before {
|
|
633
|
+
border-color: #673ab7;
|
|
634
|
+
border-color: var(--rs-violet-500);
|
|
635
|
+
}
|
|
636
|
+
.rs-checkbox-violet label:hover .rs-checkbox-inner::before {
|
|
637
|
+
border-color: #673ab7;
|
|
638
|
+
border-color: var(--rs-violet-500);
|
|
639
|
+
}
|
|
640
|
+
.rs-checkbox-violet.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
641
|
+
.rs-checkbox-violet.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
642
|
+
border-color: #673ab7;
|
|
643
|
+
border-color: var(--rs-violet-500);
|
|
644
|
+
background-color: #673ab7;
|
|
645
|
+
background-color: var(--rs-violet-500);
|
|
646
|
+
}
|
|
545
647
|
.rs-picker-subtle .picker-subtle-toggle {
|
|
546
648
|
position: relative;
|
|
547
649
|
z-index: 5;
|
|
@@ -3478,11 +3580,11 @@ textarea.rs-input-group-inside.rs-input-group-xs > .rs-input-group-btn {
|
|
|
3478
3580
|
.rs-picker-check-menu-group-children .rs-check-item .rs-checkbox-checker > label {
|
|
3479
3581
|
padding-left: 52px;
|
|
3480
3582
|
}
|
|
3481
|
-
.rs-check-item .rs-checkbox-checker .rs-checkbox-
|
|
3583
|
+
.rs-check-item .rs-checkbox-checker .rs-checkbox-control {
|
|
3482
3584
|
left: 12px;
|
|
3483
3585
|
}
|
|
3484
|
-
.grouped .rs-check-item .rs-checkbox-checker .rs-checkbox-
|
|
3485
|
-
.rs-picker-check-menu-group-children .rs-check-item .rs-checkbox-checker .rs-checkbox-
|
|
3586
|
+
.grouped .rs-check-item .rs-checkbox-checker .rs-checkbox-control,
|
|
3587
|
+
.rs-picker-check-menu-group-children .rs-check-item .rs-checkbox-checker .rs-checkbox-control {
|
|
3486
3588
|
left: 26px;
|
|
3487
3589
|
}
|
|
3488
3590
|
.rs-picker-input {
|
|
@@ -406,17 +406,16 @@
|
|
|
406
406
|
position: relative;
|
|
407
407
|
}
|
|
408
408
|
/* rtl:begin:ignore */
|
|
409
|
-
.rs-checkbox-
|
|
410
|
-
.rs-checkbox-
|
|
411
|
-
.rs-checkbox-
|
|
412
|
-
.rs-checkbox-wrapper .rs-checkbox-inner::after {
|
|
409
|
+
.rs-checkbox-control::before,
|
|
410
|
+
.rs-checkbox-control .rs-checkbox-inner::before,
|
|
411
|
+
.rs-checkbox-control .rs-checkbox-inner::after {
|
|
413
412
|
content: '';
|
|
414
413
|
position: absolute;
|
|
415
414
|
left: 0;
|
|
416
415
|
top: 0;
|
|
417
416
|
display: block;
|
|
418
417
|
}
|
|
419
|
-
.rs-checkbox-
|
|
418
|
+
.rs-checkbox-control .rs-checkbox-inner::after {
|
|
420
419
|
opacity: 0;
|
|
421
420
|
-webkit-transform: rotate(45deg) scale(0);
|
|
422
421
|
transform: rotate(45deg) scale(0);
|
|
@@ -425,12 +424,12 @@
|
|
|
425
424
|
transition: opacity 0.2s ease-in, transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
426
425
|
transition: opacity 0.2s ease-in, transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46), -webkit-transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
427
426
|
}
|
|
428
|
-
.rs-theme-high-contrast .rs-checkbox-
|
|
427
|
+
.rs-theme-high-contrast .rs-checkbox-control .rs-checkbox-inner::after {
|
|
429
428
|
-webkit-transition: none;
|
|
430
429
|
transition: none;
|
|
431
430
|
}
|
|
432
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
433
|
-
.rs-checkbox-indeterminate .rs-checkbox-
|
|
431
|
+
.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::after,
|
|
432
|
+
.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::after {
|
|
434
433
|
border: solid #fff;
|
|
435
434
|
border: solid var(--rs-checkbox-icon);
|
|
436
435
|
width: 6px;
|
|
@@ -439,12 +438,12 @@
|
|
|
439
438
|
margin-left: 5px;
|
|
440
439
|
opacity: 1;
|
|
441
440
|
}
|
|
442
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
441
|
+
.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::after {
|
|
443
442
|
border-width: 0 2px 2px 0;
|
|
444
443
|
-webkit-transform: rotate(45deg) scale(1);
|
|
445
444
|
transform: rotate(45deg) scale(1);
|
|
446
445
|
}
|
|
447
|
-
.rs-checkbox-indeterminate .rs-checkbox-
|
|
446
|
+
.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::after {
|
|
448
447
|
border-width: 0 0 2px;
|
|
449
448
|
-webkit-transform: rotate(0deg) scale(1);
|
|
450
449
|
transform: rotate(0deg) scale(1);
|
|
@@ -454,7 +453,7 @@
|
|
|
454
453
|
}
|
|
455
454
|
/* rtl:end:ignore */
|
|
456
455
|
/* stylelint-disable-next-line */
|
|
457
|
-
.rs-checkbox-
|
|
456
|
+
.rs-checkbox-control {
|
|
458
457
|
position: absolute;
|
|
459
458
|
width: 16px;
|
|
460
459
|
height: 16px;
|
|
@@ -462,18 +461,22 @@
|
|
|
462
461
|
left: 10px;
|
|
463
462
|
top: 10px;
|
|
464
463
|
}
|
|
465
|
-
.rs-checkbox-
|
|
466
|
-
|
|
467
|
-
height: 0;
|
|
464
|
+
.rs-checkbox-control [type='checkbox'] {
|
|
465
|
+
position: absolute;
|
|
468
466
|
opacity: 0;
|
|
467
|
+
z-index: 1;
|
|
468
|
+
top: -10px;
|
|
469
|
+
right: -10px;
|
|
470
|
+
bottom: -10px;
|
|
471
|
+
left: -10px;
|
|
469
472
|
}
|
|
470
|
-
.rs-checkbox-
|
|
471
|
-
.rs-checkbox-
|
|
472
|
-
.rs-checkbox-
|
|
473
|
+
.rs-checkbox-control::before,
|
|
474
|
+
.rs-checkbox-control .rs-checkbox-inner::before,
|
|
475
|
+
.rs-checkbox-control .rs-checkbox-inner::after {
|
|
473
476
|
width: 16px;
|
|
474
477
|
height: 16px;
|
|
475
478
|
}
|
|
476
|
-
.rs-checkbox-
|
|
479
|
+
.rs-checkbox-control::before {
|
|
477
480
|
border: 1px solid #3498ff;
|
|
478
481
|
border: 1px solid var(--rs-checkbox-checked-bg);
|
|
479
482
|
background-color: transparent;
|
|
@@ -487,23 +490,17 @@
|
|
|
487
490
|
transition: transform 0.2s linear, opacity 0.2s linear;
|
|
488
491
|
transition: transform 0.2s linear, opacity 0.2s linear, -webkit-transform 0.2s linear;
|
|
489
492
|
}
|
|
490
|
-
.rs-theme-high-contrast .rs-checkbox-
|
|
493
|
+
.rs-theme-high-contrast .rs-checkbox-control::before {
|
|
491
494
|
-webkit-transition: none;
|
|
492
495
|
transition: none;
|
|
493
496
|
}
|
|
494
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
497
|
+
.rs-checkbox-checked .rs-checkbox-control::before {
|
|
495
498
|
-webkit-transform: scale(1.5);
|
|
496
499
|
transform: scale(1.5);
|
|
497
500
|
opacity: 0;
|
|
498
501
|
visibility: visible;
|
|
499
502
|
}
|
|
500
|
-
.rs-checkbox-
|
|
501
|
-
top: -10px;
|
|
502
|
-
right: -10px;
|
|
503
|
-
bottom: -10px;
|
|
504
|
-
left: -10px;
|
|
505
|
-
}
|
|
506
|
-
.rs-checkbox-wrapper .rs-checkbox-inner::before {
|
|
503
|
+
.rs-checkbox-control .rs-checkbox-inner::before {
|
|
507
504
|
border: 1px solid #d9d9d9;
|
|
508
505
|
border: 1px solid var(--rs-checkbox-border);
|
|
509
506
|
background-color: transparent;
|
|
@@ -513,35 +510,140 @@
|
|
|
513
510
|
transition: background 0.2s linear, border 0.2s linear, box-shadow 0.2s linear;
|
|
514
511
|
transition: background 0.2s linear, border 0.2s linear, box-shadow 0.2s linear, -webkit-box-shadow 0.2s linear;
|
|
515
512
|
}
|
|
516
|
-
.rs-theme-high-contrast .rs-checkbox-
|
|
513
|
+
.rs-theme-high-contrast .rs-checkbox-control .rs-checkbox-inner::before {
|
|
517
514
|
-webkit-transition: none;
|
|
518
515
|
transition: none;
|
|
519
516
|
}
|
|
520
|
-
label:hover .rs-checkbox-
|
|
517
|
+
label:hover .rs-checkbox-control .rs-checkbox-inner::before {
|
|
521
518
|
border-color: #3498ff;
|
|
522
519
|
border-color: var(--rs-checkbox-checked-bg);
|
|
523
520
|
}
|
|
524
|
-
.rs-checkbox-disabled:not(.rs-checkbox-checked):not(.rs-checkbox-indeterminate) .rs-checkbox-
|
|
521
|
+
.rs-checkbox-disabled:not(.rs-checkbox-checked):not(.rs-checkbox-indeterminate) .rs-checkbox-control .rs-checkbox-inner::before {
|
|
525
522
|
border-color: #f7f7fa;
|
|
526
523
|
border-color: var(--rs-checkbox-disabled-bg);
|
|
527
524
|
background-color: #f7f7fa;
|
|
528
525
|
background-color: var(--rs-checkbox-disabled-bg);
|
|
529
526
|
}
|
|
530
|
-
.rs-checkbox-checked .rs-checkbox-
|
|
531
|
-
.rs-checkbox-indeterminate .rs-checkbox-
|
|
527
|
+
.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::before,
|
|
528
|
+
.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::before {
|
|
532
529
|
border-color: #3498ff;
|
|
533
530
|
border-color: var(--rs-checkbox-checked-bg);
|
|
534
531
|
background-color: #3498ff;
|
|
535
532
|
background-color: var(--rs-checkbox-checked-bg);
|
|
536
533
|
}
|
|
537
|
-
.rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-
|
|
538
|
-
.rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-
|
|
534
|
+
.rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::before,
|
|
535
|
+
.rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::before {
|
|
539
536
|
opacity: 0.3;
|
|
540
537
|
}
|
|
541
|
-
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-
|
|
542
|
-
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-
|
|
538
|
+
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-checked .rs-checkbox-control .rs-checkbox-inner::before,
|
|
539
|
+
.rs-theme-high-contrast .rs-checkbox-disabled.rs-checkbox-indeterminate .rs-checkbox-control .rs-checkbox-inner::before {
|
|
543
540
|
opacity: 0.5;
|
|
544
541
|
}
|
|
542
|
+
.rs-checkbox-red .rs-checkbox-control::before {
|
|
543
|
+
border-color: #f44336;
|
|
544
|
+
border-color: var(--rs-red-500);
|
|
545
|
+
}
|
|
546
|
+
.rs-checkbox-red label:hover .rs-checkbox-inner::before {
|
|
547
|
+
border-color: #f44336;
|
|
548
|
+
border-color: var(--rs-red-500);
|
|
549
|
+
}
|
|
550
|
+
.rs-checkbox-red.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
551
|
+
.rs-checkbox-red.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
552
|
+
border-color: #f44336;
|
|
553
|
+
border-color: var(--rs-red-500);
|
|
554
|
+
background-color: #f44336;
|
|
555
|
+
background-color: var(--rs-red-500);
|
|
556
|
+
}
|
|
557
|
+
.rs-checkbox-orange .rs-checkbox-control::before {
|
|
558
|
+
border-color: #fa8900;
|
|
559
|
+
border-color: var(--rs-orange-500);
|
|
560
|
+
}
|
|
561
|
+
.rs-checkbox-orange label:hover .rs-checkbox-inner::before {
|
|
562
|
+
border-color: #fa8900;
|
|
563
|
+
border-color: var(--rs-orange-500);
|
|
564
|
+
}
|
|
565
|
+
.rs-checkbox-orange.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
566
|
+
.rs-checkbox-orange.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
567
|
+
border-color: #fa8900;
|
|
568
|
+
border-color: var(--rs-orange-500);
|
|
569
|
+
background-color: #fa8900;
|
|
570
|
+
background-color: var(--rs-orange-500);
|
|
571
|
+
}
|
|
572
|
+
.rs-checkbox-yellow .rs-checkbox-control::before {
|
|
573
|
+
border-color: #ffb300;
|
|
574
|
+
border-color: var(--rs-yellow-500);
|
|
575
|
+
}
|
|
576
|
+
.rs-checkbox-yellow label:hover .rs-checkbox-inner::before {
|
|
577
|
+
border-color: #ffb300;
|
|
578
|
+
border-color: var(--rs-yellow-500);
|
|
579
|
+
}
|
|
580
|
+
.rs-checkbox-yellow.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
581
|
+
.rs-checkbox-yellow.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
582
|
+
border-color: #ffb300;
|
|
583
|
+
border-color: var(--rs-yellow-500);
|
|
584
|
+
background-color: #ffb300;
|
|
585
|
+
background-color: var(--rs-yellow-500);
|
|
586
|
+
}
|
|
587
|
+
.rs-checkbox-green .rs-checkbox-control::before {
|
|
588
|
+
border-color: #4caf50;
|
|
589
|
+
border-color: var(--rs-green-500);
|
|
590
|
+
}
|
|
591
|
+
.rs-checkbox-green label:hover .rs-checkbox-inner::before {
|
|
592
|
+
border-color: #4caf50;
|
|
593
|
+
border-color: var(--rs-green-500);
|
|
594
|
+
}
|
|
595
|
+
.rs-checkbox-green.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
596
|
+
.rs-checkbox-green.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
597
|
+
border-color: #4caf50;
|
|
598
|
+
border-color: var(--rs-green-500);
|
|
599
|
+
background-color: #4caf50;
|
|
600
|
+
background-color: var(--rs-green-500);
|
|
601
|
+
}
|
|
602
|
+
.rs-checkbox-cyan .rs-checkbox-control::before {
|
|
603
|
+
border-color: #00bcd4;
|
|
604
|
+
border-color: var(--rs-cyan-500);
|
|
605
|
+
}
|
|
606
|
+
.rs-checkbox-cyan label:hover .rs-checkbox-inner::before {
|
|
607
|
+
border-color: #00bcd4;
|
|
608
|
+
border-color: var(--rs-cyan-500);
|
|
609
|
+
}
|
|
610
|
+
.rs-checkbox-cyan.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
611
|
+
.rs-checkbox-cyan.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
612
|
+
border-color: #00bcd4;
|
|
613
|
+
border-color: var(--rs-cyan-500);
|
|
614
|
+
background-color: #00bcd4;
|
|
615
|
+
background-color: var(--rs-cyan-500);
|
|
616
|
+
}
|
|
617
|
+
.rs-checkbox-blue .rs-checkbox-control::before {
|
|
618
|
+
border-color: #2196f3;
|
|
619
|
+
border-color: var(--rs-blue-500);
|
|
620
|
+
}
|
|
621
|
+
.rs-checkbox-blue label:hover .rs-checkbox-inner::before {
|
|
622
|
+
border-color: #2196f3;
|
|
623
|
+
border-color: var(--rs-blue-500);
|
|
624
|
+
}
|
|
625
|
+
.rs-checkbox-blue.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
626
|
+
.rs-checkbox-blue.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
627
|
+
border-color: #2196f3;
|
|
628
|
+
border-color: var(--rs-blue-500);
|
|
629
|
+
background-color: #2196f3;
|
|
630
|
+
background-color: var(--rs-blue-500);
|
|
631
|
+
}
|
|
632
|
+
.rs-checkbox-violet .rs-checkbox-control::before {
|
|
633
|
+
border-color: #673ab7;
|
|
634
|
+
border-color: var(--rs-violet-500);
|
|
635
|
+
}
|
|
636
|
+
.rs-checkbox-violet label:hover .rs-checkbox-inner::before {
|
|
637
|
+
border-color: #673ab7;
|
|
638
|
+
border-color: var(--rs-violet-500);
|
|
639
|
+
}
|
|
640
|
+
.rs-checkbox-violet.rs-checkbox-checked .rs-checkbox-inner::before,
|
|
641
|
+
.rs-checkbox-violet.rs-checkbox-indeterminate .rs-checkbox-inner::before {
|
|
642
|
+
border-color: #673ab7;
|
|
643
|
+
border-color: var(--rs-violet-500);
|
|
644
|
+
background-color: #673ab7;
|
|
645
|
+
background-color: var(--rs-violet-500);
|
|
646
|
+
}
|
|
545
647
|
.rs-picker-subtle .picker-subtle-toggle {
|
|
546
648
|
position: relative;
|
|
547
649
|
z-index: 5;
|
|
@@ -3478,11 +3580,11 @@ textarea.rs-input-group-inside.rs-input-group-xs > .rs-input-group-btn {
|
|
|
3478
3580
|
.rs-picker-check-menu-group-children .rs-check-item .rs-checkbox-checker > label {
|
|
3479
3581
|
padding-left: 52px;
|
|
3480
3582
|
}
|
|
3481
|
-
.rs-check-item .rs-checkbox-checker .rs-checkbox-
|
|
3583
|
+
.rs-check-item .rs-checkbox-checker .rs-checkbox-control {
|
|
3482
3584
|
left: 12px;
|
|
3483
3585
|
}
|
|
3484
|
-
.grouped .rs-check-item .rs-checkbox-checker .rs-checkbox-
|
|
3485
|
-
.rs-picker-check-menu-group-children .rs-check-item .rs-checkbox-checker .rs-checkbox-
|
|
3586
|
+
.grouped .rs-check-item .rs-checkbox-checker .rs-checkbox-control,
|
|
3587
|
+
.rs-picker-check-menu-group-children .rs-check-item .rs-checkbox-checker .rs-checkbox-control {
|
|
3486
3588
|
left: 26px;
|
|
3487
3589
|
}
|
|
3488
3590
|
.rs-picker-input {
|
|
@@ -1,43 +1,85 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WithAsProps, RsRefForwardingComponent } from '../@types/common';
|
|
2
|
+
import { WithAsProps, RsRefForwardingComponent, TypeAttributes } from '../@types/common';
|
|
3
3
|
export declare type ValueType = string | number;
|
|
4
|
-
export interface CheckboxProps<V = ValueType> extends WithAsProps {
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export interface CheckboxProps<V = ValueType> extends WithAsProps, Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
5
|
+
/**
|
|
6
|
+
* The color of the checkbox when checked or indeterminate
|
|
7
|
+
*
|
|
8
|
+
* @version 5.56.0
|
|
9
|
+
*/
|
|
10
|
+
color?: TypeAttributes.Color;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to show checkbox
|
|
13
|
+
*
|
|
14
|
+
* @private Used in MultiCascader
|
|
15
|
+
*/
|
|
16
|
+
checkable?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* A checkbox can appear disabled and be unable to change states
|
|
19
|
+
*/
|
|
10
20
|
disabled?: boolean;
|
|
11
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Make the control readonly
|
|
23
|
+
*/
|
|
12
24
|
readOnly?: boolean;
|
|
13
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Render the control as plain text
|
|
27
|
+
*/
|
|
14
28
|
plaintext?: boolean;
|
|
15
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Whether or not checkbox is checked.
|
|
31
|
+
*/
|
|
16
32
|
checked?: boolean;
|
|
17
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The initial value of checked.
|
|
35
|
+
*/
|
|
18
36
|
defaultChecked?: boolean;
|
|
19
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not checkbox is indeterminate.
|
|
39
|
+
*/
|
|
20
40
|
indeterminate?: boolean;
|
|
21
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Attributes applied to the input element.
|
|
43
|
+
*/
|
|
22
44
|
inputProps?: React.HTMLAttributes<HTMLInputElement>;
|
|
23
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Pass a ref to the input element.
|
|
47
|
+
*/
|
|
24
48
|
inputRef?: React.Ref<any>;
|
|
25
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Inline layout
|
|
51
|
+
*
|
|
52
|
+
* @private Used in CheckboxGroup
|
|
53
|
+
*/
|
|
54
|
+
inline?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The HTML input value.
|
|
57
|
+
*/
|
|
26
58
|
value?: V;
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
checkable?: boolean;
|
|
31
|
-
/** Used for the name of the form */
|
|
59
|
+
/**
|
|
60
|
+
* Used for the name of the form
|
|
61
|
+
*/
|
|
32
62
|
name?: string;
|
|
33
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Whether the label is clickable
|
|
65
|
+
*
|
|
66
|
+
* @private Used in MultiCascader
|
|
67
|
+
*/
|
|
68
|
+
labelClickable?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Called when the user attempts to change the checked state.
|
|
71
|
+
*/
|
|
34
72
|
onChange?: (value: V | undefined, checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Called when the checkbox or label is clicked.
|
|
75
|
+
*/
|
|
36
76
|
onClick?: (event: React.SyntheticEvent) => void;
|
|
37
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Called when the checkbox is clicked.
|
|
79
|
+
*
|
|
80
|
+
* @private Used in MultiCascader
|
|
81
|
+
*/
|
|
38
82
|
onCheckboxClick?: (event: React.SyntheticEvent) => void;
|
|
39
|
-
/** Called when the user presses down a key. */
|
|
40
|
-
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
41
83
|
}
|
|
42
84
|
/**
|
|
43
85
|
* The Checkbox component is used for selecting multiple options from a set.
|