transfer.scss 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. @use 'mixins/mixins' as *;
  2. @use 'mixins/utils' as *;
  3. @use 'mixins/var' as *;
  4. @use 'common/var' as *;
  5. @include b(transfer) {
  6. @include set-component-css-var('transfer', $transfer);
  7. }
  8. @include b(transfer) {
  9. font-size: getCssVar('font-size', 'base');
  10. @include e(buttons) {
  11. display: inline-block;
  12. vertical-align: middle;
  13. padding: 0 30px;
  14. }
  15. @include e(button) {
  16. vertical-align: top;
  17. &:nth-child(2) {
  18. margin: 0 0 0 10px;
  19. }
  20. i,
  21. span {
  22. font-size: 14px;
  23. }
  24. & .#{$namespace}-icon + span {
  25. margin-left: 0;
  26. }
  27. }
  28. }
  29. @include b(transfer-panel) {
  30. overflow: hidden;
  31. background: getCssVar('bg-color', 'overlay');
  32. display: inline-block;
  33. text-align: left;
  34. vertical-align: middle;
  35. width: getCssVar('transfer-panel-width');
  36. max-height: 100%;
  37. box-sizing: border-box;
  38. position: relative;
  39. @include e(body) {
  40. height: getCssVar('transfer-panel-body-height');
  41. border-left: 1px solid getCssVar('transfer-border-color');
  42. border-right: 1px solid getCssVar('transfer-border-color');
  43. border-bottom: 1px solid getCssVar('transfer-border-color');
  44. border-bottom-left-radius: getCssVar('transfer-border-radius');
  45. border-bottom-right-radius: getCssVar('transfer-border-radius');
  46. overflow: hidden;
  47. @include when('with-footer') {
  48. border-bottom: none;
  49. border-bottom-left-radius: 0;
  50. border-bottom-right-radius: 0;
  51. }
  52. }
  53. @include e(list) {
  54. margin: 0;
  55. padding: 6px 0;
  56. list-style: none;
  57. height: getCssVar('transfer-panel-body-height');
  58. overflow: auto;
  59. box-sizing: border-box;
  60. @include when(filterable) {
  61. height: calc(100% - getCssVar('transfer-filter-height') - 30px);
  62. padding-top: 0;
  63. }
  64. }
  65. @include e(item) {
  66. height: getCssVar('transfer-item-height');
  67. line-height: getCssVar('transfer-item-height');
  68. padding-left: 15px;
  69. display: block !important;
  70. & + .#{$namespace}-transfer-panel__item {
  71. margin-left: 0;
  72. }
  73. &.#{$namespace}-checkbox {
  74. color: getCssVar('text-color', 'regular');
  75. }
  76. &:hover {
  77. color: getCssVar('color-primary');
  78. }
  79. &.#{$namespace}-checkbox .#{$namespace}-checkbox__label {
  80. width: 100%;
  81. @include utils-ellipsis;
  82. display: block;
  83. box-sizing: border-box;
  84. padding-left: 22px;
  85. line-height: getCssVar('transfer-item-height');
  86. }
  87. .#{$namespace}-checkbox__input {
  88. position: absolute;
  89. top: 8px;
  90. }
  91. }
  92. @include e(filter) {
  93. text-align: center;
  94. padding: 15px;
  95. box-sizing: border-box;
  96. .#{$namespace}-input__inner {
  97. height: getCssVar('transfer-filter-height');
  98. width: 100%;
  99. font-size: 12px;
  100. display: inline-block;
  101. box-sizing: border-box;
  102. border-radius: calc(#{getCssVar('transfer-filter-height')} / 2);
  103. }
  104. .#{$namespace}-icon-circle-close {
  105. cursor: pointer;
  106. }
  107. }
  108. .#{$namespace}-transfer-panel__header {
  109. display: flex;
  110. align-items: center;
  111. height: getCssVar('transfer-panel-header-height');
  112. background: getCssVar('transfer-panel-header-bg-color');
  113. margin: 0;
  114. padding-left: 15px;
  115. border: 1px solid getCssVar('transfer-border-color');
  116. border-top-left-radius: getCssVar('transfer-border-radius');
  117. border-top-right-radius: getCssVar('transfer-border-radius');
  118. box-sizing: border-box;
  119. color: getCssVar('color-black');
  120. .#{$namespace}-checkbox {
  121. position: relative;
  122. display: flex;
  123. width: 100%;
  124. align-items: center;
  125. .#{$namespace}-checkbox__label {
  126. font-size: 16px;
  127. color: getCssVar('text-color', 'primary');
  128. font-weight: normal;
  129. span {
  130. position: absolute;
  131. right: 15px;
  132. top: 50%;
  133. transform: translate3d(0, -50%, 0);
  134. color: getCssVar('text-color', 'secondary');
  135. font-size: 12px;
  136. font-weight: normal;
  137. }
  138. }
  139. }
  140. }
  141. .#{$namespace}-transfer-panel__footer {
  142. height: getCssVar('transfer-panel-footer-height');
  143. background: getCssVar('bg-color', 'overlay');
  144. margin: 0;
  145. padding: 0;
  146. border: 1px solid getCssVar('transfer-border-color');
  147. border-bottom-left-radius: getCssVar('transfer-border-radius');
  148. border-bottom-right-radius: getCssVar('transfer-border-radius');
  149. @include utils-vertical-center;
  150. .#{$namespace}-checkbox {
  151. padding-left: 20px;
  152. color: getCssVar('text-color', 'regular');
  153. }
  154. }
  155. .#{$namespace}-transfer-panel__empty {
  156. margin: 0;
  157. height: getCssVar('transfer-item-height');
  158. line-height: getCssVar('transfer-item-height');
  159. padding: 6px 15px 0;
  160. color: getCssVar('text-color', 'secondary');
  161. text-align: center;
  162. }
  163. .#{$namespace}-checkbox__label {
  164. padding-left: 8px;
  165. }
  166. .#{$namespace}-checkbox__inner {
  167. height: 14px;
  168. width: 14px;
  169. border-radius: 3px;
  170. &::after {
  171. height: 6px;
  172. width: 3px;
  173. left: 4px;
  174. }
  175. }
  176. }