@kdcloudjs/kdesign 1.7.18 → 1.7.20

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 (88) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/kdesign-complete.less +362 -244
  3. package/dist/kdesign.css +270 -239
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +716 -788
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +2 -2
  8. package/dist/kdesign.min.js +6 -6
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/button/style/token.less +1 -0
  11. package/es/carousel/style/index.css +4 -0
  12. package/es/carousel/style/index.less +31 -5
  13. package/es/cascader/cascader.js +4 -2
  14. package/es/checkbox/checkbox.js +5 -5
  15. package/es/checkbox/style/index.css +2 -0
  16. package/es/checkbox/style/index.less +2 -0
  17. package/es/checkbox/style/token.less +1 -1
  18. package/es/city-picker/city-picker.d.ts +3 -23
  19. package/es/city-picker/city-picker.js +351 -124
  20. package/es/city-picker/interface.d.ts +57 -0
  21. package/es/city-picker/interface.js +3 -0
  22. package/es/city-picker/option.d.ts +4 -0
  23. package/es/city-picker/option.js +42 -0
  24. package/es/city-picker/style/index.css +264 -239
  25. package/es/city-picker/style/index.less +262 -218
  26. package/es/city-picker/style/mixin.less +26 -3
  27. package/es/city-picker/style/token.less +42 -14
  28. package/es/collapse/collapse.d.ts +1 -1
  29. package/es/config-provider/compDefaultProps.d.ts +13 -0
  30. package/es/config-provider/compDefaultProps.js +13 -0
  31. package/es/dropdown/dropdown.d.ts +1 -0
  32. package/es/dropdown/dropdown.js +7 -2
  33. package/es/input/style/token.less +2 -8
  34. package/es/upload/upload.js +87 -63
  35. package/lib/button/style/token.less +1 -0
  36. package/lib/carousel/style/index.css +4 -0
  37. package/lib/carousel/style/index.less +31 -5
  38. package/lib/cascader/cascader.js +4 -2
  39. package/lib/checkbox/checkbox.js +4 -4
  40. package/lib/checkbox/style/index.css +2 -0
  41. package/lib/checkbox/style/index.less +2 -0
  42. package/lib/checkbox/style/token.less +1 -1
  43. package/lib/city-picker/city-picker.d.ts +3 -23
  44. package/lib/city-picker/city-picker.js +350 -123
  45. package/lib/city-picker/interface.d.ts +57 -0
  46. package/lib/city-picker/interface.js +11 -0
  47. package/lib/city-picker/option.d.ts +4 -0
  48. package/lib/city-picker/option.js +55 -0
  49. package/lib/city-picker/style/index.css +264 -239
  50. package/lib/city-picker/style/index.less +262 -218
  51. package/lib/city-picker/style/mixin.less +26 -3
  52. package/lib/city-picker/style/token.less +42 -14
  53. package/lib/collapse/collapse.d.ts +1 -1
  54. package/lib/config-provider/compDefaultProps.d.ts +13 -0
  55. package/lib/config-provider/compDefaultProps.js +13 -0
  56. package/lib/dropdown/dropdown.d.ts +1 -0
  57. package/lib/dropdown/dropdown.js +7 -2
  58. package/lib/input/style/token.less +2 -8
  59. package/lib/upload/upload.js +86 -62
  60. package/package.json +1 -1
  61. package/es/city-picker/city-group.d.ts +0 -8
  62. package/es/city-picker/city-group.js +0 -38
  63. package/es/city-picker/city-list.d.ts +0 -12
  64. package/es/city-picker/city-list.js +0 -55
  65. package/es/city-picker/city-panel-item.d.ts +0 -13
  66. package/es/city-picker/city-panel-item.js +0 -22
  67. package/es/city-picker/city-panel.d.ts +0 -17
  68. package/es/city-picker/city-panel.js +0 -153
  69. package/es/city-picker/city-search-panel.d.ts +0 -9
  70. package/es/city-picker/city-search-panel.js +0 -44
  71. package/es/city-picker/no-data.d.ts +0 -3
  72. package/es/city-picker/no-data.js +0 -18
  73. package/es/city-picker/utils/grouping.d.ts +0 -7
  74. package/es/city-picker/utils/grouping.js +0 -24
  75. package/lib/city-picker/city-group.d.ts +0 -8
  76. package/lib/city-picker/city-group.js +0 -51
  77. package/lib/city-picker/city-list.d.ts +0 -12
  78. package/lib/city-picker/city-list.js +0 -68
  79. package/lib/city-picker/city-panel-item.d.ts +0 -13
  80. package/lib/city-picker/city-panel-item.js +0 -35
  81. package/lib/city-picker/city-panel.d.ts +0 -17
  82. package/lib/city-picker/city-panel.js +0 -166
  83. package/lib/city-picker/city-search-panel.d.ts +0 -9
  84. package/lib/city-picker/city-search-panel.js +0 -57
  85. package/lib/city-picker/no-data.d.ts +0 -3
  86. package/lib/city-picker/no-data.js +0 -31
  87. package/lib/city-picker/utils/grouping.d.ts +0 -7
  88. package/lib/city-picker/utils/grouping.js +0 -30
@@ -1408,6 +1408,7 @@
1408
1408
  @btn-middle-height: var(~'@{button-custom-prefix}-sizing-height-middle', 28px); // 中号 高度 高度配置
1409
1409
  @btn-middle-min-width: var(~'@{button-custom-prefix}-sizing-min-width-middle', 60px); // 中号 最小宽度
1410
1410
  @btn-large-height: var(~'@{button-custom-prefix}-sizing-height-large', 32px); // 大号 高度
1411
+ @btn-middle-max-width: var(~'@{button-custom-prefix}-sizing-max-width-middle'); // 中号 最大宽度
1411
1412
  @btn-large-min-width: var(~'@{button-custom-prefix}-sizing-min-width-large', 80px); // 大号 最小宽度
1412
1413
  @btn-group-dropdown-item-height: var(~'@{button-custom-prefix}--group-dropdown-item-height', 30px);
1413
1414
  @btn-group-dropdown-min-width: var(~'@{button-custom-prefix}-group-dropdown-min-width', 80px);
@@ -1573,6 +1574,7 @@
1573
1574
 
1574
1575
 
1575
1576
  @carousel-prefix-cls: ~'@{kd-prefix}-carousel';
1577
+
1576
1578
  .@{carousel-prefix-cls} {
1577
1579
  &-root {
1578
1580
  position: relative;
@@ -1599,18 +1601,23 @@
1599
1601
 
1600
1602
  &-slide {
1601
1603
  width: 100%;
1604
+
1602
1605
  .@{carousel-prefix-cls}-list-item {
1603
1606
  opacity: 1;
1604
1607
  border-radius: @carousel-boder-radius;
1608
+
1605
1609
  &-animation {
1606
1610
  transition: opacity 0.3s ease;
1607
1611
  }
1612
+
1608
1613
  &-none-animation {
1609
1614
  transition: none;
1610
1615
  }
1616
+
1611
1617
  &-not-hidden {
1612
1618
  opacity: 1;
1613
1619
  }
1620
+
1614
1621
  &-hidden {
1615
1622
  opacity: 0;
1616
1623
  }
@@ -1619,30 +1626,40 @@
1619
1626
 
1620
1627
  &-fade {
1621
1628
  flex: 1;
1629
+
1622
1630
  .@{carousel-prefix-cls}-list-item {
1623
1631
  opacity: 1;
1632
+
1624
1633
  &-animation {
1625
1634
  transition: opacity 0.3s ease;
1626
1635
  }
1636
+
1627
1637
  &-none-animation {
1628
1638
  transition: none;
1629
1639
  }
1640
+
1630
1641
  &-not-hidden {
1631
1642
  opacity: 1;
1643
+ z-index: 1;
1632
1644
  }
1645
+
1633
1646
  &-hidden {
1634
1647
  opacity: 0;
1648
+ z-index: 0;
1635
1649
  }
1636
1650
  }
1637
1651
  }
1638
1652
 
1639
1653
  &-display {
1640
1654
  width: 100%;
1655
+
1641
1656
  .@{carousel-prefix-cls}-list-item {
1642
1657
  display: block;
1658
+
1643
1659
  &-not-hidden {
1644
1660
  display: block;
1645
1661
  }
1662
+
1646
1663
  &-hidden {
1647
1664
  display: none;
1648
1665
  }
@@ -1654,25 +1671,29 @@
1654
1671
  position: absolute;
1655
1672
  list-style: none;
1656
1673
  padding: 0;
1674
+ z-index: 1;
1657
1675
 
1658
1676
  &-left {
1659
1677
  .vertical;
1660
1678
  left: @carousel-dots-margin-left;
1661
1679
  }
1680
+
1662
1681
  &-right {
1663
1682
  .vertical;
1664
1683
  right: @carousel-dots-margin-right;
1665
1684
  }
1685
+
1666
1686
  &-bottom {
1667
1687
  .horizontal;
1668
1688
  bottom: @carousel-dots-margin-bottom;
1669
1689
  }
1690
+
1670
1691
  &-top {
1671
1692
  .horizontal;
1672
1693
  top: @carousel-dots-margin-top;
1673
1694
  }
1674
1695
 
1675
- &-dot > button {
1696
+ &-dot>button {
1676
1697
  display: block;
1677
1698
  border-radius: @carousel-dots-boder-radius;
1678
1699
  box-sizing: border-box;
@@ -1695,9 +1716,11 @@
1695
1716
  width: 100%;
1696
1717
  cursor: pointer;
1697
1718
  outline: none;
1719
+
1698
1720
  &-active {
1699
1721
  opacity: 1;
1700
- & > button {
1722
+
1723
+ &>button {
1701
1724
  background-color: @carousel-dots-color-background-active;
1702
1725
  opacity: 1;
1703
1726
  }
@@ -1711,6 +1734,7 @@
1711
1734
  left: unset;
1712
1735
  right: 16px;
1713
1736
  transform: translateY(-50%);
1737
+ z-index: 1;
1714
1738
 
1715
1739
  &-left {
1716
1740
  left: 16px;
@@ -1721,7 +1745,7 @@
1721
1745
  cursor: pointer;
1722
1746
  }
1723
1747
 
1724
- > *:first-child {
1748
+ >*:first-child {
1725
1749
  display: flex;
1726
1750
  align-items: center;
1727
1751
  justify-content: center;
@@ -1745,12 +1769,14 @@
1745
1769
  }
1746
1770
  }
1747
1771
  }
1772
+
1748
1773
  .vertical {
1749
1774
  display: flex;
1750
1775
  flex-direction: column;
1751
1776
  top: 50%;
1752
1777
  transform: translateY(-50%);
1753
- & > li {
1778
+
1779
+ &>li {
1754
1780
  margin: @carousel-dots-marigin 0;
1755
1781
  width: @carousel-dots-height;
1756
1782
  height: @carousel-dots-width;
@@ -1762,7 +1788,8 @@
1762
1788
  flex-direction: row;
1763
1789
  left: 50%;
1764
1790
  transform: translateX(-50%);
1765
- & > li {
1791
+
1792
+ &>li {
1766
1793
  margin: 0 @carousel-dots-marigin;
1767
1794
  height: @carousel-dots-height;
1768
1795
  width: @carousel-dots-width;
@@ -2172,6 +2199,8 @@
2172
2199
  width: 100%;
2173
2200
  cursor: inherit;
2174
2201
  opacity: 0;
2202
+ inset: 0;
2203
+ z-index: 1;
2175
2204
  }
2176
2205
  &-children {
2177
2206
  display: inline-flex;
@@ -2406,7 +2435,7 @@
2406
2435
 
2407
2436
  @checkbox-prefix: '--@{kd-prefix}-c-checkbox';
2408
2437
 
2409
- // colors
2438
+ // color
2410
2439
  @checkbox-color-theme: var(~'@{checkbox-prefix}-color-theme', @color-theme);
2411
2440
  @checkbox-font-color: var(~'@{checkbox-prefix}-color-text-primary', #212121);
2412
2441
  @checkbox-border-color: var(~'@{checkbox-prefix}-color-border', #d9d9d9);
@@ -2455,321 +2484,416 @@
2455
2484
 
2456
2485
 
2457
2486
  @city-picker-prefix-cls: ~'@{kd-prefix}-city-picker';
2487
+ @tabs-prefix-cls: ~'@{kd-prefix}-tabs';
2458
2488
 
2459
- .@{city-picker-prefix-cls}-container {
2489
+ .@{city-picker-prefix-cls} {
2490
+ position: relative;
2491
+ box-sizing: border-box;
2492
+ background-color: transparent;
2493
+ cursor: pointer;
2494
+ vertical-align: middle;
2460
2495
  display: flex;
2461
2496
  flex-direction: column;
2462
- position: relative;
2463
- border-bottom: 1px solid #999;
2464
2497
 
2465
- .@{city-picker-prefix-cls}-content {
2466
- position: relative;
2467
- display: flex;
2468
- align-items: center;
2469
- justify-content: space-between;
2470
- font-size: 14px;
2471
- color: #999999;
2472
- letter-spacing: 0;
2473
- line-height: 21px;
2498
+ &-selector:hover {
2499
+ .@{city-picker-prefix-cls}-icon-active {
2500
+ color: #3761ca;
2501
+ }
2474
2502
  }
2475
2503
 
2476
- .@{city-picker-prefix-cls}-title {
2477
- margin-bottom: 9px;
2478
- font-size: 12px;
2504
+ &-description {
2479
2505
  color: #666666;
2480
- letter-spacing: 0;
2481
- line-height: 18px;
2506
+ font-size: 12px;
2482
2507
  }
2483
2508
 
2484
- .@{city-picker-prefix-cls}-info {
2485
- margin-right: 20px;
2509
+ &-visible {
2510
+ .@{city-picker-prefix-cls}-icon-active {
2511
+ color: #3761ca;
2512
+ }
2513
+
2514
+ & div.@{city-picker-prefix-cls}-show-search .@{city-picker-prefix-cls}-selection-item {
2515
+ color: @city-picker-placeholder-color;
2516
+ }
2486
2517
  }
2487
2518
 
2488
- .@{city-picker-prefix-cls}-input {
2489
- border: 0;
2490
- outline: none;
2491
- flex-grow: 1;
2492
- width: 50%;
2493
- color: #212121;
2519
+ &-icon {
2520
+ &-arrow {
2521
+ display: inline-flex;
2522
+ align-items: center;
2523
+ vertical-align: middle;
2524
+ &-up {
2525
+ transform: rotate(180deg);
2526
+ transition: transform calc(@transition-duration - 0.1s) @ease;
2527
+ }
2528
+
2529
+ &-down {
2530
+ transform: rotate(0deg);
2531
+ transition: transform calc(@transition-duration - 0.1s) @ease;
2532
+ }
2533
+ }
2534
+
2535
+ &-clear {
2536
+ opacity: 0;
2537
+ z-index: 1;
2538
+ position: absolute;
2539
+ background: #fff;
2540
+ transition: opacity 0.15s ease;
2541
+ &:hover {
2542
+ color: @city-picker-g-color-border-hover;
2543
+ }
2544
+ }
2494
2545
  }
2495
2546
 
2496
- .@{city-picker-prefix-cls}-arrow {
2497
- font-size: 16px;
2547
+ &-placeholder {
2498
2548
  position: absolute;
2499
- right: 0;
2500
- bottom: 0;
2501
- transition: transform .2s ease;
2502
- &.arrow-up {
2503
- transform: rotate(180deg);
2504
- }
2549
+ color: @city-picker-placeholder-color;
2550
+ overflow: hidden;
2551
+ white-space: nowrap;
2552
+ text-overflow: ellipsis;
2553
+ right: 24px;
2554
+ left: 0;
2505
2555
  }
2506
- }
2507
2556
 
2508
- .@{city-picker-prefix-cls}-panel {
2509
- &.hidden {
2510
- opacity: 0;
2511
- visibility: hidden;
2512
- transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
2557
+ &-borderless {
2558
+ border: none;
2513
2559
  }
2514
- }
2515
2560
 
2516
- .@{city-picker-prefix-cls}-panel-container {
2517
- width: @city-picker-panel-sizing-width;
2518
- height: @city-picker-panel-sizing-height;
2519
- font-size: @city-picker-panel-font-size;
2520
- line-height: 18px;
2521
- letter-spacing: 0;
2561
+ &-underline {
2562
+ border-bottom: 1px solid @city-picker-g-color-border;
2563
+ &:hover:not(.@{city-picker-prefix-cls}-disabled) {
2564
+ border-bottom: 1px solid @city-picker-g-color-border-hover;
2565
+ }
2566
+ }
2567
+
2568
+ &-bordered {
2569
+ border: 1px solid @city-picker-border-g-color-border;
2570
+ padding-left: @city-picker-bordered !important;
2571
+ border-radius: @city-picker-border-radius-border;
2572
+ &:hover:not(.@{city-picker-prefix-cls}-disabled) {
2573
+ border: 1px solid @city-picker-g-color-border-hover;
2574
+ }
2575
+
2576
+ .@{city-picker-prefix-cls}-suffix {
2577
+ padding-right: 8px;
2578
+ }
2579
+
2580
+ .@{city-picker-prefix-cls}-placeholder {
2581
+ padding-left: @city-picker-bordered;
2582
+ }
2583
+ }
2522
2584
 
2523
- .@{city-picker-prefix-cls}-header {
2585
+ &-wrapper {
2586
+ transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
2587
+ padding: @city-picker-wrapper-padding;
2588
+ max-width: 100%;
2589
+ color: #212121;
2524
2590
  display: flex;
2591
+ flex-wrap: wrap;
2525
2592
  align-items: center;
2526
- text-align: center;
2593
+ cursor: pointer;
2594
+ box-sizing: border-box;
2595
+ overflow-y: auto;
2596
+ overflow-x: hidden;
2597
+ position: relative;
2527
2598
 
2528
- .@{city-picker-prefix-cls}-tab-item {
2529
- position: relative;
2530
- cursor: pointer;
2531
- padding: 3px 0;
2599
+ &:hover .@{city-picker-prefix-cls}-icon-clear {
2600
+ opacity: 1;
2601
+ }
2532
2602
 
2533
- &.active {
2534
- color: @city-picker-theme-color;
2535
- z-index: 1;
2603
+ .@{city-picker-prefix-cls}-icon-clear {
2604
+ color: @city-picker-clear-color;
2605
+ &:hover {
2606
+ color: @city-picker-clear-color-hover;
2607
+ }
2608
+ }
2609
+ }
2536
2610
 
2537
- &::before {
2538
- z-index: -1;
2539
- background: #fff;
2611
+ &-show-search {
2612
+ cursor: text;
2613
+ }
2614
+
2615
+ &-dropdown {
2616
+ display: block;
2617
+ left: 0;
2618
+ z-index: @city-picker-z-index;
2619
+ box-sizing: border-box;
2620
+ margin: 0;
2621
+ overflow: auto;
2622
+ font-size: @city-picker-list-font-size;
2623
+ font-variant: initial;
2624
+ background-color: @city-picker-dropdown-bg;
2625
+ border-radius: @city-picker-g-radius-border;
2626
+ outline: none;
2627
+ box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
2628
+
2629
+ // 调整tabs样式
2630
+ .@{tabs-prefix-cls}-tab-list {
2631
+ width: 100%;
2632
+
2633
+ & > span {
2634
+ width: 50%;
2635
+ }
2636
+
2637
+ .@{kd-prefix}-tab-pane {
2638
+ text-align: center;
2639
+
2640
+ &-type-line {
2641
+ padding: 0 12px;
2642
+ font-size: 12px;
2540
2643
  }
2541
2644
  }
2542
2645
  }
2543
2646
 
2544
- .@{city-picker-prefix-cls}-header-domestic {
2545
- width: 94px;
2546
- &::before {
2547
- position: absolute;
2548
- content: '';
2549
- top: 0;
2550
- left: 0;
2551
- right: 0;
2552
- bottom: 0;
2553
- z-index: -2;
2554
- background: @city-picker-background-color;
2555
- border-radius: 2px 4px 0 0;
2556
- transform: scaleY(1.25) perspective(18px) rotateX(10deg);
2557
- transform-origin: bottom left;
2558
- box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.2);
2559
- }
2647
+ .@{tabs-prefix-cls}-noContainer {
2648
+ height: unset;
2560
2649
  }
2561
2650
 
2562
- .@{city-picker-prefix-cls}-header-internation {
2563
- width: 108px;
2564
- margin-left: -13px;
2565
- &::before {
2566
- position: absolute;
2567
- content: '';
2568
- top: 0;
2569
- left: 0;
2570
- right: 0;
2571
- bottom: 0;
2572
- z-index: -2;
2573
- background: @city-picker-background-color;
2574
- border-radius: 4px 4px 0 0;
2575
- transform: scaleY(1.25) perspective(18px) rotateX(10deg);
2576
- transform-origin: bottom;
2577
- box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.2);
2578
- }
2651
+ .@{tabs-prefix-cls}-right-arrows {
2652
+ display: none;
2579
2653
  }
2580
- }
2581
- }
2582
2654
 
2583
- .@{city-picker-prefix-cls}-panel-item {
2584
- margin: 4px 6px;
2585
- padding: 3px 6px;
2586
- color: #212121;
2587
- width: 72px;
2588
- cursor: pointer;
2655
+ &-empty {
2656
+ height: 48px;
2657
+ display: flex;
2658
+ align-items: center;
2659
+ justify-content: center;
2660
+ color: #b2b2b2;
2661
+ font-size: 14px;
2662
+ }
2589
2663
 
2590
- &:hover {
2591
- background: @city-picker-background-hover-color;
2592
- border-radius: 2px;
2664
+ &-common {
2665
+ height: 32px;
2666
+ line-height: 32px;
2667
+ padding: 0 12px;
2668
+ background: #fafafa;
2669
+ color: @city-picker-font-color;
2670
+ }
2671
+
2672
+ &-loading {
2673
+ height: 48px;
2674
+ display: flex;
2675
+ align-items: center;
2676
+ justify-content: center;
2677
+ }
2593
2678
  }
2594
- }
2595
2679
 
2596
- .@{city-picker-prefix-cls}-content-container {
2597
- height: 349px;
2598
- padding: 0 20px 12px 20px;
2599
- background: #fff;
2600
- box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.2);
2601
- border-radius: 0 @city-picker-panel-radius-border @city-picker-panel-radius-border @city-picker-panel-radius-border;
2602
- }
2680
+ &-list {
2681
+ padding: 8px 0;
2682
+ max-height: 320px;
2683
+ overflow-y: auto;
2603
2684
 
2604
- .@{city-picker-prefix-cls}-group-container {
2605
- display: flex;
2606
- align-items: center;
2607
- justify-content: space-around;
2608
- }
2685
+ // 下拉列表选项
2686
+ &-item {
2687
+ .item();
2688
+ display: flex;
2689
+ cursor: pointer;
2609
2690
 
2610
- .@{city-picker-prefix-cls}-group-item {
2611
- flex-grow: 1;
2612
- flex-shrink: 1;
2613
- padding: 10px 0;
2614
- max-height: 39px;
2615
- box-sizing: border-box;
2616
- border-bottom: 2px solid #F5F5F5;
2617
- cursor: pointer;
2618
- text-align: center;
2691
+ &-content {
2692
+ .over();
2693
+ }
2619
2694
 
2620
- &:hover {
2621
- color: @city-picker-theme-color;
2622
- }
2695
+ &-info {
2696
+ color: @city-picker-placeholder-color;
2697
+ white-space: nowrap;
2698
+ }
2699
+
2700
+ &:hover {
2701
+ background-color: @city-picker-item-active-bg;
2702
+ }
2703
+
2704
+ &-selected:not(&-disabled) {
2705
+ background-color: @city-picker-item-selected-bg;
2706
+ }
2623
2707
 
2624
- &.active {
2625
- color: @city-picker-theme-color;
2626
- border-bottom: 2px solid @city-picker-theme-color;
2708
+ &-disabled {
2709
+ color: @city-picker-g-item-text-color-disabled;
2710
+ cursor: not-allowed;
2711
+ background-color: @city-picker-disabled-option-bg;
2712
+ }
2713
+ }
2627
2714
  }
2628
2715
 
2629
- &.last {
2630
- flex-shrink: 1;
2716
+ &-highlight {
2717
+ color: #5582f3;
2631
2718
  }
2632
- }
2633
2719
 
2634
- .@{city-picker-prefix-cls}-city-table {
2635
- display: flex;
2636
- flex-wrap: wrap;
2637
- margin-top: 10px;
2638
- max-height: ~'calc(100% - 39px - 10px)';
2639
- overflow: scroll;
2720
+ // 选择器框大小
2721
+ &-size-small {
2722
+ .select-input-size(@city-picker-small-height, @city-picker-small-height, @city-picker-small-line-height, @city-picker-small-font-size);
2723
+ }
2640
2724
 
2641
- .@{city-picker-prefix-cls}-city-table-group {
2642
- display: flex;
2725
+ &-size-middle {
2726
+ .select-input-size(@city-picker-middle-height, @city-picker-middle-height, @city-picker-middle-line-height, @city-picker-middle-font-size);
2727
+ }
2643
2728
 
2644
- .@{city-picker-prefix-cls}-city-table-key {
2645
- display: flex;
2646
- align-items: center;
2647
- justify-content: center;
2648
- width: 32px;
2649
- height: 32px;
2650
- color: #999;
2651
- margin-right: 32px;
2652
- flex-shrink: 0;
2653
- flex-grow: 0;
2654
- }
2729
+ &-size-large {
2730
+ .select-input-size(@city-picker-large-height, @city-picker-large-height, @city-picker-large-line-height, @city-picker-large-font-size);
2655
2731
  }
2656
2732
 
2657
- .@{city-picker-prefix-cls}-city-table-item-container {
2733
+ &-suffix {
2734
+ right: 0;
2735
+ position: absolute;
2658
2736
  display: flex;
2737
+ flex: 0;
2659
2738
  flex-wrap: wrap;
2739
+ align-items: center;
2740
+ justify-content: center;
2741
+ margin-left: 8px;
2742
+ cursor: pointer;
2660
2743
  }
2661
2744
 
2662
- .@{city-picker-prefix-cls}-city-table-cell {
2663
- margin: 4px 6px;
2664
- padding: 3px 6px;
2665
- color: @city-picker-panel-item-color;
2666
- cursor: pointer;
2667
- width: 60px;
2668
- overflow: hidden;
2669
- white-space: nowrap;
2670
- -o-text-overflow: ellipsis;
2671
- text-overflow: ellipsis;
2745
+ &-focused {
2746
+ .focusColor();
2672
2747
 
2673
- &:hover {
2674
- background: @city-picker-background-hover-color;
2675
- border-radius: 2px;
2748
+ .@{city-picker-prefix-cls}-content-item {
2749
+ color: @city-picker-placeholder-color;
2676
2750
  }
2677
2751
  }
2678
- }
2679
2752
 
2680
- .@{city-picker-prefix-cls}-search-panel {
2681
- display: flex;
2682
- flex-direction: column;
2683
- width: 256px;
2684
- height: 320px;
2685
- padding: 8px 0;
2686
- font-size: 12px;
2687
- color: #212121;
2688
- letter-spacing: 0;
2689
- line-height: 18px;
2690
- overflow: scroll;
2691
- box-shadow: 0 4px 10px 0 rgba(0,0,0,0.20);
2692
- border-radius: 2px;
2693
- background: #fff;
2753
+ &-disabled {
2754
+ background-color: @city-picker-color-background-disabled;
2755
+ color: @city-picker-color-text-disabled;
2756
+ padding-right: 0;
2757
+ border-color: #e5e5e5;
2758
+ &:hover {
2759
+ cursor: not-allowed;
2760
+ }
2694
2761
 
2695
- .@{city-picker-prefix-cls}-search-panel-item {
2696
- display: flex;
2697
- justify-content: space-between;
2698
- align-items: center;
2699
- padding: 7px 8px;
2700
- cursor: pointer;
2762
+ .@{city-picker-prefix-cls}-suffix {
2763
+ color: @city-picker-arrow-icon-color-text-disabled;
2764
+ }
2701
2765
 
2702
- &:hover {
2703
- background: @city-picker-background-hover-color;
2766
+ &.@{city-picker-prefix-cls}-bordered {
2767
+ padding-right: @city-picker-bordered;
2704
2768
  }
2769
+ }
2705
2770
 
2706
- .@{city-picker-prefix-cls}-search-panel-item-left {
2707
- overflow: hidden;
2708
- white-space: nowrap;
2709
- -o-text-overflow: ellipsis;
2710
- text-overflow: ellipsis;
2711
- flex-grow: 0;
2712
- flex-shrink: 0;
2713
- max-width: 168px;
2771
+ &-content {
2772
+ display: flex;
2773
+ width: 100%;
2774
+ font-size: 14px;
2775
+
2776
+ &-search {
2777
+ flex: 1;
2778
+ position: relative;
2779
+ &-input {
2780
+ outline: 0;
2781
+ border-radius: 0;
2782
+ border: none;
2783
+ background: transparent;
2784
+ height: 100%;
2785
+ width: 100%;
2786
+ cursor: pointer;
2787
+ }
2788
+ }
2789
+ &-item {
2790
+ display: inline-block;
2791
+ position: absolute;
2792
+ left: 0;
2793
+ right: 0;
2794
+ .over();
2714
2795
  }
2715
2796
 
2716
- .@{city-picker-prefix-cls}-search-panel-item-right {
2717
- flex-grow: 0;
2718
- flex-shrink: 0;
2719
- max-width: 112px;
2720
- overflow: hidden;
2721
- white-space: nowrap;
2722
- -o-text-overflow: ellipsis;
2723
- text-overflow: ellipsis;
2797
+ &-info {
2798
+ flex: 1;
2724
2799
  text-align: right;
2725
- color: #999999;
2800
+ color: @city-picker-placeholder-color;
2801
+ .over();
2726
2802
  }
2727
2803
  }
2728
- }
2729
2804
 
2730
- .@{city-picker-prefix-cls}-search-keyword {
2731
- color: @city-picker-theme-color;
2805
+ &.topLeft.hidden,
2806
+ &.bottomLeft.hidden,
2807
+ &.topRight.hidden,
2808
+ &.bottomRight.hidden {
2809
+ opacity: 0;
2810
+ visibility: hidden;
2811
+ transition: all calc(@transition-duration - 0.1s) @ease;
2812
+ }
2732
2813
  }
2733
2814
 
2734
- .@{city-picker-prefix-cls}-no-data {
2735
- width: 100%;
2736
- height: 100%;
2737
- display: flex;
2738
- align-items: center;
2739
- justify-content: center;
2740
- }
2741
2815
 
2742
2816
 
2743
- // code component mixin here
2744
- .test() {
2745
- display: inline;
2817
+ .item() {
2818
+ position: relative;
2819
+ display: block;
2820
+ font-weight: normal;
2821
+ font-size: @city-picker-list-font-size;
2822
+ min-height: @city-picker-dropdown-height;
2823
+ padding: 5px 12px;
2824
+ color: @city-picker-font-color;
2825
+ line-height: @city-picker-dropdown-line-height;
2746
2826
  }
2747
2827
 
2828
+ .focusColor() {
2829
+ border-color: @city-picker-g-color-border-foucs !important;
2830
+ }
2748
2831
 
2832
+ .select-input-size(@height, @maxHeight, @lineHeight, @fontSize) {
2833
+ min-height: @height;
2834
+ max-height: calc(@maxHeight * 3 - 10px);
2835
+ font-size: @fontSize;
2836
+ }
2837
+
2838
+ .over() {
2839
+ overflow: hidden;
2840
+ white-space: nowrap;
2841
+ text-overflow: ellipsis;
2842
+ }
2749
2843
 
2750
- @city-picker-prefix: '--@{kd-prefix}-c-city-picker';
2751
2844
 
2752
2845
 
2846
+ @city-picker-custom-prefix: ~'--@{kd-prefix}-c-city-picker';
2753
2847
 
2754
2848
  // color
2755
- @city-picker-theme-color: var(~'@{city-picker-prefix}-color', @color-theme);
2756
- @city-picker-panel-item-color: var(~'@{city-picker-prefix}-panel-item-color', @color-text-primary);
2757
- @city-picker-background-color: var(~'@{city-picker-prefix}-color-background', @color-background-contain);
2758
- @city-picker-background-hover-color: var(~'@{city-picker-prefix}-color-background-hover', @color-hover);
2759
-
2849
+ @city-picker-dropdown-bg: var(~'@{city-picker-custom-prefix}-dropdown-color-background', @color-background);
2850
+ @city-picker-disabled-option-bg: var(~'@{city-picker-custom-prefix}-item-color-background-disabled', #fff);
2851
+ @city-picker-item-active-bg: var(~'@{city-picker-custom-prefix}-color-background', #f5f5f5);
2852
+ @city-picker-item-selected-bg: var(~'@{city-picker-custom-prefix}-color-background-selected', #f2f6ff);
2853
+ @city-picker-g-color-border: var(~'@{city-picker-custom-prefix}-color-border', @color-input);
2854
+ @city-picker-g-color-border-foucs: var(~'@{city-picker-custom-prefix}-color-border-foucs', @color-theme);
2855
+ @city-picker-g-color-border-hover: var(~'@{city-picker-custom-prefix}-color-border-hover', @color-theme);
2856
+ @city-picker-border-g-color-border: var(~'@{city-picker-custom-prefix}-border-color-border', @color-border-strong);
2857
+ @city-picker-placeholder-color: var(~'@{city-picker-custom-prefix}-placeholder-color-text', #b2b2b2);
2858
+ @city-picker-font-color: var(~'@{city-picker-custom-prefix}-footer-color-text', @color-text-primary);
2859
+ @city-picker-g-item-text-color-disabled: var(~'@{city-picker-custom-prefix}-item-color-text-disabled', @color-disabled);
2860
+ @city-picker-color-background-disabled: var(~'@{city-picker-custom-prefix}-color-background-disabled', #fff);
2861
+ @city-picker-color-text-disabled: var(~'@{city-picker-custom-prefix}-color-text-disabled', @color-disabled);
2862
+ @city-picker-arrow-icon-color-text-disabled: var(
2863
+ ~'@{city-picker-custom-prefix}-arrow-icon-color-text-disabled',
2864
+ #b2b2b2
2865
+ );
2866
+ @city-picker-clear-color: var(~'@{city-picker-custom-prefix}-icon-clear-color-text', #d9d9d9);
2867
+ @city-picker-clear-color-hover: var(~'@{city-picker-custom-prefix}-icon-clear-color-text-hover', #999);
2760
2868
 
2761
2869
  // font
2762
- @city-picker-panel-font-size: var(~'@{city-picker-prefix}-panel-font-size', 12px);
2870
+ @city-picker-list-font-size: var(~'@{city-picker-custom-prefix}-dropdown-font-size', 12px); // 下拉列表文字大小
2871
+ @city-picker-large-font-size: var(~'@{city-picker-custom-prefix}-font-size-large', 16px); // 大号字体
2872
+ @city-picker-middle-font-size: var(~'@{city-picker-custom-prefix}-font-size-middle', 14px); // 中号高度
2873
+ @city-picker-small-font-size: var(~'@{city-picker-custom-prefix}-font-size-small', 12px); // 小号高度
2763
2874
 
2764
- // radius
2765
- @city-picker-panel-radius-border: var(~'@{city-picker-prefix}-panel-radius-border', @radius-border);
2875
+ // line-height
2876
+ @city-picker-dropdown-line-height: var(~'@{city-picker-custom-prefix}-dropdown-line-height', 22px);
2877
+ @city-picker-large-line-height: var(~'@{city-picker-custom-prefix}-line-height-large', 28px);
2878
+ @city-picker-middle-line-height: var(~'@{city-picker-custom-prefix}-line-height-middle', 22px);
2879
+ @city-picker-small-line-height: var(~'@{city-picker-custom-prefix}-line-height-small', 14px);
2766
2880
 
2767
2881
  // sizing
2768
- @city-picker-panel-sizing-width: var(~'@{city-picker-prefix}-panel-sizing-width', 460px);
2769
- @city-picker-panel-sizing-height: var(~'@{city-picker-prefix}-panel-sizing-height', 373px);
2882
+ @city-picker-dropdown-height: var(~'@{city-picker-custom-prefix}-item-sizing-height', 22px);
2883
+ @city-picker-large-height: var(~'@{city-picker-custom-prefix}-sizing-height-large', 36px); // 大号高度 lh:28px
2884
+ @city-picker-middle-height: var(~'@{city-picker-custom-prefix}-sizing-height-middle', 30px); // 中号高度lh:22px
2885
+ @city-picker-small-height: var(~'@{city-picker-custom-prefix}-sizing-height-small', 24px); // 小号高度lh:12px
2770
2886
 
2887
+ // spacing
2888
+ @city-picker-bordered: var(~'@{city-picker-custom-prefix}-bordered-spacing-padding-left', 8px);
2889
+ @city-picker-wrapper-padding: var(~'@{city-picker-custom-prefix}-wrapper-spacing-padding', 1px 24px 1px 0);
2771
2890
 
2891
+ // radius
2892
+ @city-picker-g-radius-border: var(~'@{city-picker-custom-prefix}-radius-border', @radius-border);
2893
+ @city-picker-border-radius-border: var(~'@{city-picker-custom-prefix}-bordered-radius-border', 2px);
2772
2894
 
2895
+ // z-index
2896
+ @city-picker-z-index: var(~'@{city-picker-custom-prefix}-z-index', @z-index-popper);
2773
2897
 
2774
2898
 
2775
2899
 
@@ -6004,16 +6128,10 @@ textarea {
6004
6128
  @input-clear-color: var(~'@{input-prefix}-clear-color', #d9d9d9);
6005
6129
  @input-clear-color-hover: var(~'@{input-prefix}-clear-color-hover', #999);
6006
6130
  @input-background-color-inner: var(~'@{input-prefix}-color-background', @color-white);
6007
- @input-background-color-disabled-inner: var(
6008
- ~'@{input-prefix}-color-background-disabled',
6009
- @color-background-contain-disabled
6010
- );
6131
+ @input-background-color-disabled-inner: var(~'@{input-prefix}-color-background-disabled', @color-background-contain-disabled);
6011
6132
  @input-border-color-focused: var(~'@{input-prefix}-color-border-focused', @color-theme);
6012
6133
  @input-border-color-disabled-inner: var(~'@{input-prefix}-color-border-disabled', @color-border-strong);
6013
- @input-underline-border-color-disabled-inner: var(
6014
- ~'@{input-prefix}-underline-color-border-disabled',
6015
- @color-border-weak
6016
- );
6134
+ @input-underline-border-color-disabled-inner: var(~'@{input-prefix}-underline-color-border-disabled', @color-border-weak);
6017
6135
  @input-color-disabled-inner: var(~'@{input-prefix}-color-disabled', @color-disabled);
6018
6136
  @input-affix-color: var(~'@{input-prefix}-affix-color-text', #666);
6019
6137
  @input-error-color: var(~'@{input-prefix}-color-error', @color-error);