sideSheet.scss 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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. color: $color-sideSheet_main-text;
  63. text-align: left;
  64. }
  65. &-inner {
  66. // position: relative;
  67. z-index: 1;
  68. overflow: auto;
  69. background-color: $color-sideSheet-bg;
  70. // background-clip: padding-box;
  71. border: 0;
  72. }
  73. &-header {
  74. display: flex;
  75. align-items: flex-start;
  76. padding: $spacing-sideSheet_header-padding;
  77. padding-bottom: $spacing-sideSheet_header-paddingBottom;
  78. }
  79. &-body {
  80. padding: $spacing-sideSheet_body-paddingY $spacing-sideSheet_body-paddingX;
  81. flex: 1;
  82. overflow: auto;
  83. }
  84. &-content {
  85. height: 100%;
  86. display: flex;
  87. flex-direction: column;
  88. box-sizing: border-box;
  89. overflow: hidden;
  90. // padding: 0 $spacing-loose;
  91. }
  92. &-mask {
  93. position: absolute;
  94. top: 0;
  95. left: 0;
  96. width: 100%;
  97. height: 100%;
  98. background-color: $color-sideSheet_mask-bg;
  99. opacity: 1;
  100. &-hidden {
  101. opacity: 0;
  102. display: none;
  103. }
  104. }
  105. &-footer {
  106. padding: $spacing-sideSheet_footer-padding;
  107. }
  108. @keyframes #{$module}-slideShow_top {
  109. from {
  110. transform: translateY(-100%);
  111. }
  112. to {
  113. transform: translateY(0);
  114. }
  115. }
  116. @keyframes #{$module}-slideHide_top {
  117. from {
  118. transform: translateY(0);
  119. }
  120. to {
  121. transform: translateY(-100%);
  122. }
  123. }
  124. @keyframes #{$module}-slideShow_bottom {
  125. from {
  126. transform: translateY(100%);
  127. }
  128. to {
  129. transform: translateY(0);
  130. }
  131. }
  132. @keyframes #{$module}-slideHide_bottom {
  133. from {
  134. transform: translateY(0);
  135. }
  136. to {
  137. transform: translateY(100%);
  138. }
  139. }
  140. @keyframes #{$module}-slideShow_left {
  141. from {
  142. transform: translateX(-100%);
  143. }
  144. to {
  145. transform: translateX(0);
  146. }
  147. }
  148. @keyframes #{$module}-slideHide_left {
  149. from {
  150. transform: translateX(0);
  151. }
  152. to {
  153. transform: translateX(-100%);
  154. }
  155. }
  156. @keyframes #{$module}-slideShow_right {
  157. from {
  158. transform: translateX(100%);
  159. }
  160. to {
  161. transform: translateX(0);
  162. }
  163. }
  164. @keyframes #{$module}-slideHide_right {
  165. from {
  166. transform: translateX(0);
  167. }
  168. to {
  169. transform: translateX(100%);
  170. }
  171. }
  172. @keyframes #{$module}-opacityShow {
  173. from {
  174. opacity: 0;
  175. }
  176. to {
  177. opacity: 1;
  178. }
  179. }
  180. @keyframes #{$module}-opacityHide {
  181. from {
  182. opacity: 1;
  183. }
  184. to {
  185. opacity: 0;
  186. }
  187. }
  188. &-animation-content_show_top{
  189. animation: #{$module}-slideShow_top $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  190. animation-fill-mode: forwards;
  191. }
  192. &-animation-content_hide_top{
  193. animation: #{$module}-slideHide_top $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  194. animation-fill-mode: forwards;
  195. }
  196. &-animation-content_show_bottom{
  197. animation: #{$module}-slideShow_bottom $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  198. animation-fill-mode: forwards;
  199. }
  200. &-animation-content_hide_bottom{
  201. animation: #{$module}-slideHide_bottom $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  202. animation-fill-mode: forwards;
  203. }
  204. &-animation-content_show_left{
  205. animation: #{$module}-slideShow_left $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  206. animation-fill-mode: forwards;
  207. }
  208. &-animation-content_hide_left{
  209. animation: #{$module}-slideHide_left $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  210. animation-fill-mode: forwards;
  211. }
  212. &-animation-content_show_right{
  213. animation: #{$module}-slideShow_right $animation_duration-sideSheet_inner-show $animation_function-sideSheet_inner-show $animation_delay-sideSheet_inner-show;
  214. animation-fill-mode: forwards;
  215. }
  216. &-animation-content_hide_right{
  217. animation: #{$module}-slideHide_right $animation_duration-sideSheet_inner-hide $animation_function-sideSheet_inner-hide $animation_delay-sideSheet_inner-hide;
  218. animation-fill-mode: forwards;
  219. }
  220. &-animation-mask_show{
  221. animation: #{$module}-opacityShow $animation_duration-sideSheet_mask-show $animation_function-sideSheet_mask-show $animation_delay-sideSheet_mask-show;
  222. animation-fill-mode: forwards;
  223. }
  224. &-animation-mask_hide{
  225. animation: #{$module}-opacityHide $animation_duration-sideSheet_mask-hide $animation_function-sideSheet_mask-hide $animation_delay-sideSheet_mask-hide;
  226. animation-fill-mode: forwards;
  227. }
  228. }
  229. .#{$module}-fixed {
  230. .#{$module}-inner {
  231. box-shadow: var(--semi-shadow-elevated);
  232. }
  233. &.#{$module}-left {
  234. left: 0;
  235. // width will inject by js
  236. .#{$module}-inner {
  237. left: 0;
  238. }
  239. }
  240. &.#{$module}-right {
  241. left: auto;
  242. // width will inject by js
  243. .#{$module}-inner {
  244. right: 0;
  245. }
  246. }
  247. &.#{$module}-top,
  248. &.#{$module}-bottom {
  249. height: auto;
  250. }
  251. &.#{$module}-bottom {
  252. top: auto;
  253. .#{$module}-inner {
  254. bottom: 0;
  255. }
  256. }
  257. }
  258. .#{$module}.#{$module}-popup {
  259. position: absolute;
  260. }
  261. .#{$module}-hidden {
  262. display: none;
  263. }
  264. @import './rtl.scss';