index-pure.less 4.7 KB

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