@kdcloudjs/kdesign 1.8.14 → 1.8.16

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.
Files changed (75) hide show
  1. package/dist/kdesign-complete.less +297 -81
  2. package/dist/kdesign.css +269 -58
  3. package/dist/kdesign.css.map +1 -1
  4. package/dist/kdesign.js +987 -543
  5. package/dist/kdesign.js.map +1 -1
  6. package/dist/kdesign.min.css +3 -3
  7. package/dist/kdesign.min.js +10 -10
  8. package/dist/kdesign.min.js.map +1 -1
  9. package/es/breadcrumb/breadcrumb.js +2 -2
  10. package/es/button/group.d.ts +1 -1
  11. package/es/button/group.js +5 -3
  12. package/es/city-picker/city-picker.js +12 -27
  13. package/es/city-picker/option.js +1 -5
  14. package/es/city-picker/style/index.css +8 -0
  15. package/es/city-picker/style/index.less +10 -0
  16. package/es/color-picker/color-picker-panel.js +332 -82
  17. package/es/color-picker/color-picker.js +128 -58
  18. package/es/color-picker/constant/colorTypes.js +4 -4
  19. package/es/color-picker/constant/defaultColor.d.ts +1 -1
  20. package/es/color-picker/constant/defaultColor.js +1 -1
  21. package/es/color-picker/interface.d.ts +33 -11
  22. package/es/color-picker/style/index.css +256 -53
  23. package/es/color-picker/style/index.less +277 -73
  24. package/es/color-picker/style/token.less +6 -2
  25. package/es/color-picker/utils/colorFormat.d.ts +5 -1
  26. package/es/color-picker/utils/colorFormat.js +10 -10
  27. package/es/color-picker/utils/convertLetters.d.ts +1 -0
  28. package/es/color-picker/utils/convertLetters.js +12 -0
  29. package/es/color-picker/utils/validateColor.js +12 -9
  30. package/es/config-provider/compDefaultProps.d.ts +8 -0
  31. package/es/config-provider/compDefaultProps.js +8 -0
  32. package/es/popper/index.d.ts +1 -1
  33. package/es/popper/index.js +4 -1
  34. package/es/popper/style/index.css +4 -4
  35. package/es/popper/style/index.less +4 -6
  36. package/es/signature/signature.d.ts +1 -0
  37. package/es/signature/signature.js +42 -8
  38. package/es/tree/tree.d.ts +1 -0
  39. package/es/tree/tree.js +3 -1
  40. package/es/tree/treeNode.d.ts +1 -0
  41. package/es/tree/treeNode.js +3 -2
  42. package/lib/breadcrumb/breadcrumb.js +2 -2
  43. package/lib/button/group.d.ts +1 -1
  44. package/lib/button/group.js +5 -3
  45. package/lib/city-picker/city-picker.js +12 -27
  46. package/lib/city-picker/option.js +1 -5
  47. package/lib/city-picker/style/index.css +8 -0
  48. package/lib/city-picker/style/index.less +10 -0
  49. package/lib/color-picker/color-picker-panel.js +329 -79
  50. package/lib/color-picker/color-picker.js +125 -55
  51. package/lib/color-picker/constant/colorTypes.js +4 -4
  52. package/lib/color-picker/constant/defaultColor.d.ts +1 -1
  53. package/lib/color-picker/constant/defaultColor.js +1 -1
  54. package/lib/color-picker/interface.d.ts +33 -11
  55. package/lib/color-picker/style/index.css +256 -53
  56. package/lib/color-picker/style/index.less +277 -73
  57. package/lib/color-picker/style/token.less +6 -2
  58. package/lib/color-picker/utils/colorFormat.d.ts +5 -1
  59. package/lib/color-picker/utils/colorFormat.js +10 -9
  60. package/lib/color-picker/utils/convertLetters.d.ts +1 -0
  61. package/lib/color-picker/utils/convertLetters.js +13 -0
  62. package/lib/color-picker/utils/validateColor.js +12 -9
  63. package/lib/config-provider/compDefaultProps.d.ts +8 -0
  64. package/lib/config-provider/compDefaultProps.js +8 -0
  65. package/lib/popper/index.d.ts +1 -1
  66. package/lib/popper/index.js +4 -1
  67. package/lib/popper/style/index.css +4 -4
  68. package/lib/popper/style/index.less +4 -6
  69. package/lib/signature/signature.d.ts +1 -0
  70. package/lib/signature/signature.js +42 -8
  71. package/lib/tree/tree.d.ts +1 -0
  72. package/lib/tree/tree.js +3 -1
  73. package/lib/tree/treeNode.d.ts +1 -0
  74. package/lib/tree/treeNode.js +3 -2
  75. package/package.json +1 -1
@@ -2612,6 +2612,7 @@
2612
2612
 
2613
2613
  @city-picker-prefix-cls: ~'@{kd-prefix}-city-picker';
2614
2614
  @tabs-prefix-cls: ~'@{kd-prefix}-tabs';
2615
+ @popper-prefix-cls: ~'@{kd-prefix}-popper';
2615
2616
 
2616
2617
  .@{city-picker-prefix-cls} {
2617
2618
  position: relative;
@@ -2764,6 +2765,15 @@
2764
2765
  outline: none;
2765
2766
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
2766
2767
 
2768
+ &.@{popper-prefix-cls}-bottom-start {
2769
+ &-in {
2770
+ animation-name: kdSlideUpIn;
2771
+ }
2772
+
2773
+ &-out {
2774
+ animation-name: kdSlideUpOut;
2775
+ }
2776
+ }
2767
2777
  // 调整tabs样式
2768
2778
  .@{tabs-prefix-cls}-tab-list {
2769
2779
  width: 100%;
@@ -3334,44 +3344,57 @@
3334
3344
  position: relative;
3335
3345
  width: @color-picker-input-sizing-width;
3336
3346
 
3347
+ &-pure {
3348
+ width: 28px;
3349
+
3350
+ .@{kd-prefix}-input-wrapper.@{color-picker-prefix-cls}-input {
3351
+ display: flex;
3352
+ align-items: center;
3353
+ justify-content: center;
3354
+ width: 100%;
3355
+
3356
+ .@{kd-prefix}-input-prefix {
3357
+ margin-right: 0;
3358
+ }
3359
+
3360
+ .@{kd-prefix}-input-suffix {
3361
+ margin-left: 0;
3362
+ }
3363
+
3364
+ .@{kd-prefix}-input {
3365
+ display: none;
3366
+ }
3367
+ }
3368
+ }
3369
+
3337
3370
  .@{color-picker-prefix-cls}-input {
3338
3371
  width: @color-picker-input-sizing-width;
3339
3372
  height: @color-picker-input-sizing-height;
3373
+ padding: 0 8px;
3340
3374
  border-bottom: 1px solid rgba(217, 217, 217, 1);
3341
3375
  font-size: @color-picker-input-font-size;
3342
3376
  }
3343
3377
 
3344
3378
  .@{color-picker-prefix-cls}-icon-container {
3345
- position: absolute;
3346
- top: 3px;
3347
- right: 6px;
3348
3379
  cursor: pointer;
3349
3380
 
3350
3381
  .@{color-picker-prefix-cls}-icon {
3351
- width: @color-picker-input-suffix-sizing-width;
3352
- height: @color-picker-input-suffix-sizing-height;
3382
+ display: flex;
3383
+ justify-content: center;
3384
+ align-items: center;
3385
+ width: @color-picker-input-prefix-sizing-width;
3386
+ height: @color-picker-input-prefix-sizing-height;
3353
3387
  border: 1px solid rgba(0, 0, 0, 0.05);
3354
3388
  border-radius: 2px;
3355
3389
  line-height: 18px;
3356
3390
  text-align: center;
3357
3391
  color: @bg;
3358
3392
 
3359
- &-underline {
3360
- margin-right: -6px;
3361
- }
3362
-
3363
- &-up {
3364
- .kdicon-arrow-down {
3365
- transform: rotate(180deg);
3366
- transition: transform @transition-duration-quickly ease-in-out;
3367
- }
3368
- }
3369
-
3370
- &-down {
3371
- .kdicon-arrow-down {
3372
- transform: rotate(0deg);
3373
- transition: transform @transition-duration-quickly ease-in-out;
3374
- }
3393
+ &-no-color-line {
3394
+ width: @color-picker-input-prefix-line-sizing-width;
3395
+ height: @color-picker-input-prefix-line-sizing-height;
3396
+ background-color: #ff2e3d;
3397
+ rotate: 45deg;
3375
3398
  }
3376
3399
  }
3377
3400
  }
@@ -3400,9 +3423,74 @@
3400
3423
  transform-origin: top left;
3401
3424
  z-index: @color-picker-panel-z-index;
3402
3425
 
3426
+ &>div {
3427
+ margin-top: 12px;
3428
+ }
3429
+
3430
+ &-clear {
3431
+ display: flex;
3432
+ align-items: center;
3433
+ font-size: 12px;
3434
+ color: #666666;
3435
+ line-height: 16px;
3436
+ font-weight: 400;
3437
+
3438
+ &-box {
3439
+ position: relative;
3440
+ width: 16px;
3441
+ height: 16px;
3442
+ margin-right: 4px;
3443
+ border: 1px solid rgba(217, 217, 217, 1);
3444
+ border-radius: 2px;
3445
+ cursor: pointer;
3446
+ background-color: #fff;
3447
+
3448
+ &::after {
3449
+ position: absolute;
3450
+ left: 7.5px;
3451
+ top: -3.5px;
3452
+ content: '';
3453
+ width: 1px;
3454
+ height: 22.6px;
3455
+ background-color: #ff2e3d;
3456
+ rotate: 45deg;
3457
+ }
3458
+
3459
+ .active {
3460
+ content: '';
3461
+ position: absolute;
3462
+ top: -3px;
3463
+ left: -3px;
3464
+ width: 20px;
3465
+ height: 20px;
3466
+ border: 1px solid rgba(217, 217, 217, 1);
3467
+ border-radius: 4px;
3468
+ }
3469
+
3470
+ &:hover {
3471
+ &::before {
3472
+ .active;
3473
+ }
3474
+ }
3475
+
3476
+ &:active {
3477
+ &::before {
3478
+ .active;
3479
+ border: 1px solid rgba(148, 148, 148, 1);
3480
+ }
3481
+ }
3482
+ }
3483
+
3484
+ &-text {
3485
+ font-size: 12px;
3486
+ color: #666666;
3487
+ line-height: 16px;
3488
+ font-weight: 400;
3489
+ }
3490
+ }
3491
+
3403
3492
  &-chrome {
3404
3493
  width: 278px !important;
3405
- margin-top: 12px;
3406
3494
  box-shadow: none !important;
3407
3495
 
3408
3496
  &>div:last-child {
@@ -3517,7 +3605,6 @@
3517
3605
  }
3518
3606
 
3519
3607
  &-switch {
3520
- margin: 12px 0 0;
3521
3608
  font-size: 12px;
3522
3609
  color: #666666;
3523
3610
  letter-spacing: 0;
@@ -3533,21 +3620,36 @@
3533
3620
  &-container {
3534
3621
  display: flex;
3535
3622
  flex-wrap: nowrap;
3536
- margin-top: 10px;
3537
3623
 
3538
- &-input {
3539
- flex: 1 1 auto;
3624
+ &-select {
3625
+ flex: 0 0 64px;
3540
3626
  display: inline-block;
3541
3627
  position: relative;
3628
+ margin-right: 8px;
3542
3629
  font-size: @color-picker-panel-select-font-size;
3543
3630
 
3631
+ .@{kd-prefix}-select {
3632
+ width: 64px;
3633
+
3634
+ .@{kd-prefix}-select,
3635
+ .@{kd-prefix}-select-selection-item {
3636
+ overflow: visible;
3637
+ text-overflow: unset;
3638
+ }
3639
+
3640
+ &-suffix {
3641
+ padding-right: 4px;
3642
+ margin-left: 0;
3643
+ }
3644
+ }
3645
+
3544
3646
  .@{kd-prefix}-select-dropdown-panel {
3545
3647
  margin: 0 !important;
3546
3648
 
3547
3649
  &.bottomLeft,
3548
3650
  &.topLeft {
3549
3651
  position: absolute;
3550
- width: 60px !important;
3652
+ width: 64px !important;
3551
3653
  min-width: unset !important;
3552
3654
  background: #FFFFFF;
3553
3655
  right: 0;
@@ -3571,10 +3673,6 @@
3571
3673
  height: @color-picker-panel-select-sizing-height;
3572
3674
  min-height: 28px;
3573
3675
  padding: 0 28px 0 0;
3574
-
3575
- .@{kd-prefix}-select-placeholder {
3576
- left: 8px;
3577
- }
3578
3676
  }
3579
3677
 
3580
3678
  .active-option {
@@ -3582,74 +3680,190 @@
3582
3680
  }
3583
3681
  }
3584
3682
 
3683
+ &-input {
3684
+ height: 28px;
3685
+ flex: 1 1 auto;
3686
+ padding: 0 8px;
3687
+ }
3688
+
3689
+ &-input-group {
3690
+ display: flex;
3691
+ align-items: center;
3692
+
3693
+ &-item {
3694
+ height: 28px;
3695
+ flex: 1;
3696
+
3697
+ &.active {
3698
+ z-index: 2;
3699
+ }
3700
+
3701
+ &:first-child {
3702
+ border-top-right-radius: 0;
3703
+ border-bottom-right-radius: 0;
3704
+ z-index: 1;
3705
+ }
3706
+
3707
+ &:nth-child(2) {
3708
+ margin-right: -1px;
3709
+ margin-left: -1px;
3710
+ border-radius: 0;
3711
+
3712
+ &:hover {
3713
+ z-index: 1;
3714
+ }
3715
+ }
3716
+
3717
+ &:last-child {
3718
+ border-top-left-radius: 0;
3719
+ border-bottom-left-radius: 0;
3720
+ }
3721
+ }
3722
+ }
3723
+
3585
3724
  &-transparent {
3586
- flex: 0 1 60px;
3725
+ flex: 0 0 54px;
3587
3726
  height: 28px;
3588
3727
  margin-left: 8px;
3728
+ padding: 0;
3589
3729
  text-align: center;
3590
3730
  font-size: @color-picker-panel-alpha-font-size;
3591
3731
  }
3592
3732
  }
3593
3733
 
3594
- &-colorDivContainer {
3595
- display: grid;
3596
- grid-template-columns: repeat(12, 1fr);
3597
- grid-column-gap: 8px;
3598
- grid-row-gap: 8px;
3599
- margin-top: 12px;
3734
+ &-historical-color-box {
3735
+ &-title {
3736
+ font-size: 12px;
3737
+ color: #666666;
3738
+ line-height: 18px;
3739
+ font-weight: 400;
3740
+ margin-bottom: 8px;
3741
+ }
3600
3742
 
3601
- &-ie11 {
3602
- display: flex;
3603
- flex-wrap: wrap;
3743
+ &-container {
3744
+ display: grid;
3745
+ grid-template-columns: repeat(12, 1fr);
3746
+ grid-column-gap: 8px;
3747
+ grid-row-gap: 8px;
3748
+
3749
+ &-ie11 {
3750
+ display: flex;
3751
+ flex-wrap: wrap;
3752
+
3753
+ li {
3754
+ margin-right: 8px;
3755
+ margin-top: 8px;
3756
+
3757
+ &:nth-child(12n) {
3758
+ margin-right: 0;
3759
+ }
3760
+
3761
+ &:nth-child(-n+12) {
3762
+ margin-top: 0;
3763
+ }
3764
+ }
3765
+ }
3604
3766
 
3605
3767
  li {
3606
- margin-right: 8px;
3607
- margin-top: 8px;
3768
+ position: relative;
3769
+ box-sizing: border-box;
3770
+ width: @color-picker-panel-historical-sizing-width;
3771
+ height: @color-picker-panel-historical-sizing-height;
3772
+ border: 1px solid rgba(0, 0, 0, 0.05);
3773
+ border-radius: 2px;
3774
+ list-style: none;
3775
+ cursor: pointer;
3608
3776
 
3609
- &:nth-child(12n) {
3610
- margin-right: 0;
3777
+ .square {
3778
+ display: none;
3779
+ position: absolute;
3780
+ box-sizing: inherit;
3781
+ top: -3px;
3782
+ left: -3px;
3783
+ width: calc(@color-picker-panel-historical-sizing-width + 4px);
3784
+ height: calc(@color-picker-panel-historical-sizing-height + 4px);
3785
+ border: 1px solid rgba(178, 178, 176, 1);
3786
+ border-radius: 4px;
3787
+
3788
+ &-click {
3789
+ display: block;
3790
+ box-shadow: 0 0 0 1px #e5e5e5 !important;
3791
+ }
3611
3792
  }
3612
3793
 
3613
- &:nth-child(-n+12) {
3614
- margin-top: 0;
3794
+ &:hover {
3795
+ .square {
3796
+ display: block;
3797
+ }
3615
3798
  }
3616
3799
  }
3617
3800
  }
3801
+ }
3618
3802
 
3619
- &-unset-color {
3620
- margin-top: 0;
3803
+ &-color-box {
3804
+ &-title {
3805
+ font-size: 12px;
3806
+ color: #666666;
3807
+ line-height: 18px;
3808
+ font-weight: 400;
3809
+ margin-bottom: 8px;
3621
3810
  }
3622
3811
 
3623
- li {
3624
- position: relative;
3625
- box-sizing: border-box;
3626
- width: @color-picker-panel-preset-sizing-width;
3627
- height: @color-picker-panel-preset-sizing-height;
3628
- border: 1px solid rgba(0, 0, 0, 0.05);
3629
- border-radius: 2px;
3630
- list-style: none;
3631
- cursor: pointer;
3812
+ &-container {
3813
+ display: grid;
3814
+ grid-template-columns: repeat(12, 1fr);
3815
+ grid-column-gap: 8px;
3816
+ grid-row-gap: 8px;
3632
3817
 
3633
- .square {
3634
- display: none;
3635
- position: absolute;
3636
- box-sizing: inherit;
3637
- top: -3px;
3638
- left: -3px;
3639
- width: calc(@color-picker-panel-preset-sizing-width + 4px);
3640
- height: calc(@color-picker-panel-preset-sizing-height + 4px);
3641
- border: 1px solid rgba(178, 178, 176, 1);
3642
- border-radius: 4px;
3818
+ &-ie11 {
3819
+ display: flex;
3820
+ flex-wrap: wrap;
3643
3821
 
3644
- &-click {
3645
- display: block;
3646
- box-shadow: 0 0 0 1px #e5e5e5 !important;
3822
+ li {
3823
+ margin-right: 8px;
3824
+ margin-top: 8px;
3825
+
3826
+ &:nth-child(12n) {
3827
+ margin-right: 0;
3828
+ }
3829
+
3830
+ &:nth-child(-n+12) {
3831
+ margin-top: 0;
3832
+ }
3647
3833
  }
3648
3834
  }
3649
3835
 
3650
- &:hover {
3836
+ li {
3837
+ position: relative;
3838
+ box-sizing: border-box;
3839
+ width: @color-picker-panel-preset-sizing-width;
3840
+ height: @color-picker-panel-preset-sizing-height;
3841
+ border: 1px solid rgba(0, 0, 0, 0.05);
3842
+ border-radius: 2px;
3843
+ list-style: none;
3844
+ cursor: pointer;
3845
+
3651
3846
  .square {
3652
- display: block;
3847
+ display: none;
3848
+ position: absolute;
3849
+ box-sizing: inherit;
3850
+ top: -3px;
3851
+ left: -3px;
3852
+ width: calc(@color-picker-panel-preset-sizing-width + 4px);
3853
+ height: calc(@color-picker-panel-preset-sizing-height + 4px);
3854
+ border: 1px solid rgba(178, 178, 176, 1);
3855
+ border-radius: 4px;
3856
+
3857
+ &-click {
3858
+ display: block;
3859
+ box-shadow: 0 0 0 1px #e5e5e5 !important;
3860
+ }
3861
+ }
3862
+
3863
+ &:hover {
3864
+ .square {
3865
+ display: block;
3866
+ }
3653
3867
  }
3654
3868
  }
3655
3869
  }
@@ -3678,13 +3892,17 @@
3678
3892
  // sizing
3679
3893
  @color-picker-input-sizing-width: var(~'@{color-picker-custom-prefix}-input-sizing-width', 230px);
3680
3894
  @color-picker-input-sizing-height: var(~'@{color-picker-custom-prefix}-input-sizing-height', 28px);
3681
- @color-picker-input-suffix-sizing-width: var(~'@{color-picker-custom-prefix}-input-suffix-sizing-width', 20px);
3682
- @color-picker-input-suffix-sizing-height: var(~'@{color-picker-custom-prefix}-input-suffix-sizing-height', 20px);
3895
+ @color-picker-input-prefix-sizing-width: var(~'@{color-picker-custom-prefix}-input-prefix-sizing-width', 16px);
3896
+ @color-picker-input-prefix-line-sizing-width: var(~'@{color-picker-custom-prefix}-input-prefix-line-sizing-width', 1px);
3897
+ @color-picker-input-prefix-line-sizing-height: var(~'@{color-picker-custom-prefix}-input-prefix-line-sizing-height', 22.6px);
3898
+ @color-picker-input-prefix-sizing-height: var(~'@{color-picker-custom-prefix}-input-prefix-sizing-height', 16px);
3683
3899
  @color-picker-panel-sizing-width: var(~'@{color-picker-custom-prefix}-panel-sizing-width', 304px);
3684
3900
  @color-picker-panel-select-sizing-width: var(~'@{color-picker-custom-prefix}-panel-select-sizing-width', 212px);
3685
3901
  @color-picker-panel-select-sizing-height: var(~'@{color-picker-custom-prefix}-panel-select-sizing-height', 28px);
3686
3902
  @color-picker-panel-preset-sizing-width: var(~'@{color-picker-custom-prefix}-panel-preset-sizing-width', 16px);
3687
3903
  @color-picker-panel-preset-sizing-height: var(~'@{color-picker-custom-prefix}-panel-preset-sizing-height', 16px);
3904
+ @color-picker-panel-historical-sizing-width: var(~'@{color-picker-custom-prefix}-panel-historical-sizing-width', 16px);
3905
+ @color-picker-panel-historical-sizing-height: var(~'@{color-picker-custom-prefix}-panel-historical-sizing-height', 16px);
3688
3906
 
3689
3907
  // z-index
3690
3908
  @color-picker-panel-z-index: var(~'@{color-picker-custom-prefix}-panel-z-index', @z-index-popper);
@@ -8883,7 +9101,7 @@ textarea {
8883
9101
  }
8884
9102
 
8885
9103
  &[data-popper-placement^='top'] .arrow {
8886
- bottom: calc(1.1 * var(--arrowSize));
9104
+ bottom: calc(1.05 * var(--arrowSize));
8887
9105
 
8888
9106
  &::before {
8889
9107
  left: calc(-1 * var(--arrowSize));
@@ -8893,7 +9111,7 @@ textarea {
8893
9111
  }
8894
9112
 
8895
9113
  &[data-popper-placement^='bottom'] .arrow {
8896
- top: calc(-0.8 * var(--arrowSize));
9114
+ top: calc(-0.85 * var(--arrowSize));
8897
9115
 
8898
9116
  &::before {
8899
9117
  left: calc(-1 * var(--arrowSize));
@@ -8903,7 +9121,7 @@ textarea {
8903
9121
  }
8904
9122
 
8905
9123
  &[data-popper-placement^='left'] .arrow {
8906
- right: calc(1.1 * var(--arrowSize));
9124
+ right: calc(1.05 * var(--arrowSize));
8907
9125
 
8908
9126
  &::before {
8909
9127
  top: calc(-1 * var(--arrowSize));
@@ -8913,7 +9131,7 @@ textarea {
8913
9131
  }
8914
9132
 
8915
9133
  &[data-popper-placement^='right'] .arrow {
8916
- left: calc(-0.8 * var(--arrowSize));
9134
+ left: calc(-0.85 * var(--arrowSize));
8917
9135
 
8918
9136
  &::before {
8919
9137
  top: calc(-1 * var(--arrowSize));
@@ -8954,8 +9172,6 @@ textarea {
8954
9172
 
8955
9173
 
8956
9174
 
8957
-
8958
-
8959
9175
  @progress-prefix-cls: ~'@{kd-prefix}-progress';
8960
9176
 
8961
9177
  .@{progress-prefix-cls} {