1
0

scrollList.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. //@import '../theme/variables.scss';
  2. // @import '../theme/_font.scss';
  3. @import "./variables.scss";
  4. $module: #{$prefix}-scrolllist;
  5. .#{$module} {
  6. width: 100%;
  7. height: 100%;
  8. background: $color-scrollList-bg;
  9. box-shadow: $shadow-scrollList;
  10. border-radius: $radius-scrollList;
  11. @include font-size-regular;
  12. user-select: none;
  13. display: flex;
  14. flex-direction: column;
  15. &-header {
  16. text-align: center;
  17. padding: $spacing-scrollList_header-paddingY $spacing-scrollList_header-paddingX;
  18. &-title {
  19. padding: $spacing-scrollList_header_title-paddingY $spacing-scrollList_header_title-paddingX;
  20. font-weight: $font-scrollList_header_title-fontWeight;
  21. color: $color-scrollList_header-title;
  22. @include font-size-regular;
  23. }
  24. }
  25. &-body {
  26. display: flex;
  27. height: $height-scrollList;
  28. padding: $spacing-scrollList_body-paddingY $spacing-scrollList_body-paddingX;
  29. overflow: hidden;
  30. .#{$module}-item-wheel .#{$module}-list-outer-nocycle,
  31. .#{$module}-item {
  32. & > ul {
  33. &:before {
  34. content: "";
  35. display: block;
  36. width: 100%;
  37. height: ($height-scrollList - $height-scrollList_item) / 2;
  38. }
  39. }
  40. }
  41. .#{$module}-item {
  42. position: relative;
  43. flex: 1;
  44. overflow-x: hidden;
  45. overflow-y: auto;
  46. &:not(:last-child) {
  47. border-right: $width-scrollList_item-border solid $color-scrollList-border;
  48. }
  49. }
  50. .#{$module}-item,
  51. .#{$module}-item-wheel .#{$module}-list-outer {
  52. & > ul {
  53. box-sizing: border-box;
  54. width: 100%;
  55. margin: $spacing-scrollList_item_ul-margin;
  56. padding: $spacing-scrollList_item_ul-padding;
  57. padding-bottom: $spacing-scrollList_item_ul-paddingBottom;
  58. list-style: none;
  59. & > li {
  60. list-style: none;
  61. height: $height-scrollList_item;
  62. box-sizing: border-box;
  63. color: $color-scrollList_item-text;
  64. text-align: center;
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. // padding: 8px 18px;
  69. cursor: pointer;
  70. background-color: $color-scrollList_item-bg;
  71. &.#{$module}-item-sel {
  72. background: $color-scrollList_selected_item-bg;
  73. color: $color-scrollList_selected_item-text;
  74. > svg {
  75. color: $color-scrollList_selected_item-icon;
  76. width: $width-scrollList_item_sel_svg;
  77. height: $width-scrollList_item_sel_svg;
  78. margin-right: $spacing-scrollList_item_sel_svg-marginRight;
  79. }
  80. }
  81. &:not(.disabled):not(.#{$module}-item-disabled):not(.#{$module}-item-sel):not(.#{$module}-item-selected) {
  82. cursor: pointer;
  83. &:hover {
  84. background-color: $color-scrollList_item-text-hover;
  85. }
  86. &:active {
  87. background-color: $color-scrollList_item-bg-active;
  88. }
  89. }
  90. &.#{$module}-item-disabled {
  91. color: $color-scrollList_disabled_item-text;
  92. cursor: not-allowed;
  93. }
  94. }
  95. }
  96. }
  97. .#{$module}-item-wheel {
  98. position: relative;
  99. flex: 1;
  100. overflow: hidden;
  101. &:not(:last-child) {
  102. border-right: $border-thickness-control solid $color-scrollList-border;
  103. }
  104. .#{$module}-item-selected {
  105. font-weight: $font-scrollList_item_wheel_item_selected-fontWeight;
  106. }
  107. .#{$module}-list-outer {
  108. overflow-x: hidden;
  109. overflow-y: auto;
  110. height: 100%;
  111. width: 100%;
  112. padding-right: $spacing-scrollList_item_wheel_list_outer-paddingRight;
  113. }
  114. .#{$module}-shade {
  115. width: 100%;
  116. height: 50%;
  117. pointer-events: none;
  118. position: absolute;
  119. &-pre {
  120. top: 0;
  121. margin-top: $spacing-scrollList_item_wheel_list_shade_pre-marginTop;
  122. background: $color-scrollList-bg;
  123. opacity: .5;
  124. }
  125. &-post {
  126. top: 50%;
  127. margin-top: $spacing-scrollList_item_wheel_list_shade_post-marginTop;
  128. background: $color-scrollList-bg;
  129. opacity: .5;
  130. }
  131. }
  132. .#{$module}-selector {
  133. pointer-events: none;
  134. position: absolute;
  135. top: 50%;
  136. border-top: $width-scrollList_item_wheel_selector-border solid $color-scrollList-border;
  137. border-bottom: $width-scrollList_item_wheel_selector-border solid $color-scrollList-border;
  138. height: $height-scrollList_item;
  139. width: 100%;
  140. transform: translateY(-50%);
  141. }
  142. }
  143. }
  144. .#{$module}-footer {
  145. border-top: $width-scrollList_footer-border solid $color-scrollList_footer-border;
  146. padding: $spacing-scrollList_footer-padding;
  147. }
  148. .#{$module}-line {
  149. background: $color-scrollList-border;
  150. height: $height-scrollList_line;
  151. }
  152. }
  153. @import "./rtl.scss";