transfer.scss 4.9 KB

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