sideSheet.scss 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. @import './animation.scss';
  2. @import './variables.scss';
  3. $module: #{$prefix}-sidesheet;
  4. .#{$module} {
  5. @include font-size-regular;
  6. position: fixed;
  7. margin: $spacing-sideSheet-margin;
  8. top: 0;
  9. left: 0;
  10. height: 100%;
  11. &-inner:focus,
  12. &-content:focus {
  13. outline: none;
  14. }
  15. &-inner-wrap {
  16. position: absolute;
  17. }
  18. &-left,
  19. &-right {
  20. top: 0;
  21. width: 0%;
  22. height: 100%;
  23. .#{$module}-inner-wrap {
  24. height: 100%;
  25. }
  26. &.#{$module} {
  27. width: 100%;
  28. }
  29. }
  30. &-right {
  31. right: 0;
  32. .#{$module}-inner-wrap {
  33. right: 0;
  34. }
  35. }
  36. &-top,
  37. &-bottom {
  38. left: 0;
  39. width: 100%;
  40. height: 0%;
  41. .#{$module}-inner-wrap {
  42. width: 100%;
  43. }
  44. &.#{$module} {
  45. height: 100%;
  46. }
  47. }
  48. &-top {
  49. top: 0;
  50. }
  51. &-bottom {
  52. bottom: 0;
  53. .#{$module}-inner-wrap {
  54. bottom: 0;
  55. }
  56. }
  57. &-title {
  58. flex: 1 0 auto;
  59. margin: $spacing-sideSheet_title-margin;
  60. @include font-size-header-5;
  61. font-weight: $font-sideSheet_title-fontWeight;
  62. font-size: $font-sideSheet_title-fontSize;
  63. color: $color-sideSheet_main-text;
  64. text-align: left;
  65. }
  66. &-inner {
  67. // position: relative;
  68. z-index: 1;
  69. overflow: auto;
  70. background-color: $color-sideSheet-bg;
  71. // background-clip: padding-box;
  72. border: 0;
  73. }
  74. &-header {
  75. display: flex;
  76. align-items: flex-start;
  77. padding: $spacing-sideSheet_header-padding;
  78. padding-bottom: $spacing-sideSheet_header-paddingBottom;
  79. }
  80. &-body {
  81. padding: $spacing-sideSheet_body-paddingY $spacing-sideSheet_body-paddingX;
  82. flex: 1;
  83. overflow: auto;
  84. }
  85. &-content {
  86. height: 100%;
  87. display: flex;
  88. flex-direction: column;
  89. box-sizing: border-box;
  90. overflow: hidden;
  91. // padding: 0 $spacing-loose;
  92. }
  93. &-mask {
  94. position: absolute;
  95. top: 0;
  96. left: 0;
  97. width: 100%;
  98. height: 100%;
  99. background-color: $color-sideSheet_mask-bg;
  100. opacity: 1;
  101. &-hidden {
  102. opacity: 0;
  103. display: none;
  104. }
  105. }
  106. &-footer {
  107. padding: $spacing-sideSheet_footer-padding;
  108. }
  109. @keyframes #{$module}-slideShow_top {
  110. from {
  111. transform: translateY(-100%);
  112. }
  113. to {
  114. transform: translateY(0);
  115. }
  116. }
  117. @keyframes #{$module}-slideHide_top {
  118. from {
  119. transform: translateY(0);
  120. }
  121. to {
  122. transform: translateY(-100%);
  123. }
  124. }
  125. @keyframes #{$module}-slideShow_bottom {
  126. from {
  127. transform: translateY(100%);
  128. }
  129. to {
  130. transform: translateY(0);
  131. }
  132. }
  133. @keyframes #{$module}-slideHide_bottom {
  134. from {
  135. transform: translateY(0);
  136. }
  137. to {
  138. transform: translateY(100%);
  139. }
  140. }
  141. @keyframes #{$module}-slideShow_left {
  142. from {
  143. transform: translateX(-100%);
  144. }
  145. to {
  146. transform: translateX(0);
  147. }
  148. }
  149. @keyframes #{$module}-slideHide_left {
  150. from {
  151. transform: translateX(0);
  152. }
  153. to {
  154. transform: translateX(-100%);
  155. }
  156. }
  157. @keyframes #{$module}-slideShow_right {
  158. from {
  159. transform: translateX(100%);
  160. }
  161. to {
  162. transform: translateX(0);
  163. }
  164. }
  165. @keyframes #{$module}-slideHide_right {
  166. from {
  167. transform: translateX(0);
  168. }
  169. to {
  170. transform: translateX(100%);
  171. }
  172. }
  173. @keyframes #{$module}-opacityShow {
  174. from {
  175. opacity: 0;
  176. }
  177. to {
  178. opacity: 1;
  179. }
  180. }
  181. @keyframes #{$module}-opacityHide {
  182. from {
  183. opacity: 1;
  184. }
  185. to {
  186. opacity: 0;
  187. }
  188. }
  189. &-animation-content_show_top{
  190. animation: #{$module}-slideShow_top $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  191. animation-fill-mode: forwards;
  192. }
  193. &-animation-content_hide_top{
  194. animation: #{$module}-slideHide_top $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  195. animation-fill-mode: forwards;
  196. }
  197. &-animation-content_show_bottom{
  198. animation: #{$module}-slideShow_bottom $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  199. animation-fill-mode: forwards;
  200. }
  201. &-animation-content_hide_bottom{
  202. animation: #{$module}-slideHide_bottom $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  203. animation-fill-mode: forwards;
  204. }
  205. &-animation-content_show_left{
  206. animation: #{$module}-slideShow_left $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  207. animation-fill-mode: forwards;
  208. }
  209. &-animation-content_hide_left{
  210. animation: #{$module}-slideHide_left $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  211. animation-fill-mode: forwards;
  212. }
  213. &-animation-content_show_right{
  214. animation: #{$module}-slideShow_right $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  215. animation-fill-mode: forwards;
  216. }
  217. &-animation-content_hide_right{
  218. animation: #{$module}-slideHide_right $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  219. animation-fill-mode: forwards;
  220. }
  221. &-animation-mask_show{
  222. animation: #{$module}-opacityShow $animation_duration-sideSheet_mask-show $animation_function-sideSheet_mask-show $animation_delay-sideSheet_mask-show;
  223. animation-fill-mode: forwards;
  224. }
  225. &-animation-mask_hide{
  226. animation: #{$module}-opacityHide $animation_duration-sideSheet_mask-hide $animation_function-sideSheet_mask-hide $animation_delay-sideSheet_mask-hide;
  227. animation-fill-mode: forwards;
  228. }
  229. }
  230. .#{$module}-fixed {
  231. .#{$module}-inner {
  232. box-shadow: var(--semi-shadow-elevated);
  233. }
  234. &.#{$module}-left {
  235. left: 0;
  236. // width will inject by js
  237. .#{$module}-inner {
  238. left: 0;
  239. }
  240. }
  241. &.#{$module}-right {
  242. left: auto;
  243. // width will inject by js
  244. .#{$module}-inner {
  245. right: 0;
  246. }
  247. }
  248. &.#{$module}-top,
  249. &.#{$module}-bottom {
  250. height: auto;
  251. }
  252. &.#{$module}-bottom {
  253. top: auto;
  254. .#{$module}-inner {
  255. bottom: 0;
  256. }
  257. }
  258. }
  259. .#{$module}.#{$module}-popup {
  260. position: absolute;
  261. }
  262. .#{$module}-hidden {
  263. display: none;
  264. }
  265. @import './rtl.scss';