index.less 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @import '../../checkbox/style/mixin';
  4. @import './customize';
  5. @import './status';
  6. @transfer-prefix-cls: ~'@{ant-prefix}-transfer';
  7. @transfer-header-vertical-padding: ceil(
  8. ((@transfer-header-height - 1px - @font-size-base * @line-height-base) / 2)
  9. );
  10. .@{transfer-prefix-cls} {
  11. .reset-component();
  12. position: relative;
  13. display: flex;
  14. align-items: stretch;
  15. &-disabled {
  16. .@{transfer-prefix-cls}-list {
  17. background: @transfer-disabled-bg;
  18. }
  19. }
  20. &-list {
  21. display: flex;
  22. flex-direction: column;
  23. width: 180px;
  24. height: @transfer-list-height;
  25. border: @border-width-base @border-style-base @border-color-base;
  26. border-radius: @border-radius-base;
  27. &-with-pagination {
  28. width: 250px;
  29. height: auto;
  30. }
  31. &-search {
  32. .anticon-search {
  33. color: @disabled-color;
  34. }
  35. }
  36. &-header {
  37. display: flex;
  38. flex: none;
  39. align-items: center;
  40. height: @transfer-header-height;
  41. // border-top is on the transfer dom. We should minus 1px for this
  42. padding: (@transfer-header-vertical-padding - 1px) @control-padding-horizontal
  43. @transfer-header-vertical-padding;
  44. color: @text-color;
  45. background: @component-background;
  46. border-bottom: @border-width-base @border-style-base @border-color-split;
  47. border-radius: @border-radius-base @border-radius-base 0 0;
  48. > *:not(:last-child) {
  49. margin-right: 4px;
  50. }
  51. > * {
  52. flex: none;
  53. }
  54. &-title {
  55. flex: auto;
  56. overflow: hidden;
  57. white-space: nowrap;
  58. text-align: right;
  59. text-overflow: ellipsis;
  60. }
  61. &-dropdown {
  62. font-size: 10px;
  63. transform: translateY(10%);
  64. cursor: pointer;
  65. &[disabled] {
  66. cursor: not-allowed;
  67. }
  68. }
  69. }
  70. &-body {
  71. display: flex;
  72. flex: auto;
  73. flex-direction: column;
  74. overflow: hidden;
  75. font-size: @font-size-base;
  76. &-search-wrapper {
  77. position: relative;
  78. flex: none;
  79. padding: @padding-sm;
  80. }
  81. }
  82. &-content {
  83. flex: auto;
  84. margin: 0;
  85. padding: 0;
  86. overflow: auto;
  87. list-style: none;
  88. &-item {
  89. display: flex;
  90. align-items: center;
  91. min-height: @transfer-item-height;
  92. padding: @transfer-item-padding-vertical @control-padding-horizontal;
  93. line-height: @transfer-item-height - 2 * @transfer-item-padding-vertical;
  94. transition: all 0.3s;
  95. > *:not(:last-child) {
  96. margin-right: 8px;
  97. }
  98. > * {
  99. flex: none;
  100. }
  101. &-text {
  102. flex: auto;
  103. overflow: hidden;
  104. white-space: nowrap;
  105. text-overflow: ellipsis;
  106. }
  107. &-remove {
  108. position: relative;
  109. color: @border-color-base;
  110. cursor: pointer;
  111. transition: all 0.3s;
  112. &:hover {
  113. color: @link-hover-color;
  114. }
  115. &::after {
  116. position: absolute;
  117. top: -@transfer-item-padding-vertical;
  118. right: -50%;
  119. bottom: -@transfer-item-padding-vertical;
  120. left: -50%;
  121. content: '';
  122. }
  123. }
  124. }
  125. &-item:not(&-item-disabled) {
  126. &:hover {
  127. background-color: @transfer-item-hover-bg;
  128. cursor: pointer;
  129. }
  130. &.@{transfer-prefix-cls}-list-content-item-checked:hover {
  131. background-color: @transfer-item-selected-hover-bg;
  132. }
  133. }
  134. // Do not change hover style when `oneWay` mode
  135. &-show-remove &-item:not(&-item-disabled):hover {
  136. background: transparent;
  137. cursor: default;
  138. }
  139. &-item-checked {
  140. background-color: @item-active-bg;
  141. }
  142. &-item-disabled {
  143. color: @btn-disable-color;
  144. cursor: not-allowed;
  145. }
  146. }
  147. &-pagination {
  148. padding: @padding-xs 0;
  149. text-align: right;
  150. border-top: @border-width-base @border-style-base @border-color-split;
  151. }
  152. &-body-not-found {
  153. flex: none;
  154. width: 100%;
  155. margin: auto 0;
  156. color: @disabled-color;
  157. text-align: center;
  158. }
  159. &-footer {
  160. border-top: @border-width-base @border-style-base @border-color-split;
  161. }
  162. }
  163. &-operation {
  164. display: flex;
  165. flex: none;
  166. flex-direction: column;
  167. align-self: center;
  168. margin: 0 8px;
  169. vertical-align: middle;
  170. .@{ant-prefix}-btn {
  171. display: block;
  172. &:first-child {
  173. margin-bottom: 4px;
  174. }
  175. .@{iconfont-css-prefix} {
  176. font-size: 12px;
  177. }
  178. }
  179. }
  180. .@{ant-prefix}-empty-image {
  181. max-height: (@transfer-header-height / 2) - 22;
  182. }
  183. }
  184. @import './rtl';