sideSheet.scss 7.7 KB

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