sideSheet.scss 7.5 KB

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