sideSheet.scss 7.8 KB

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