notification.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. @import "./animation.scss";
  2. @import './variables.scss';
  3. $module: #{$prefix}-notification;
  4. .#{$module}-wrapper {
  5. position: fixed;
  6. }
  7. .#{$module}-list {
  8. position: fixed;
  9. box-sizing: border-box;
  10. margin: $spacing-notification_list-margin;
  11. padding: $spacing-notification_list-padding;
  12. z-index: $z-notification;
  13. pointer-events: none;
  14. &[placement='topRight'] {
  15. right: 0;
  16. top: 0;
  17. }
  18. &[placement='top'] {
  19. top: 0;
  20. left: 50%;
  21. transform: translateX(-50%);
  22. }
  23. &[placement='topLeft'] {
  24. left: 0;
  25. top: 0;
  26. }
  27. &[placement='bottom'] {
  28. bottom: 0;
  29. left: 50%;
  30. transform: translateX(-50%);
  31. }
  32. &[placement='bottomRight'] {
  33. bottom: 0;
  34. right: 0;
  35. }
  36. &[placement='bottomLeft'] {
  37. bottom: 0;
  38. left: 0;
  39. }
  40. }
  41. .#{$module} {
  42. &-notice {
  43. @include shadow-elevated;
  44. border-radius: $radius-notification_notice;
  45. padding-top: $spacing-notification_notice-paddingTop;
  46. padding-right: $spacing-notification_notice-paddingRight;
  47. padding-bottom: $spacing-notification_notice-paddingBottom;
  48. padding-left: $spacing-notification_notice-paddingLeft;
  49. margin: $spacing-notification_notice-margin;
  50. width: $width-notification_notice;
  51. min-width: $width-notification_notice_minWidth;
  52. background-color: $color-notification-bg-default;
  53. position: relative;
  54. display: flex;
  55. pointer-events: auto;
  56. &-icon {
  57. width: $width-notification_notice-icon;
  58. @include font-size-header-6;
  59. display: flex;
  60. align-items: flex-start;
  61. justify-content: flex-start;
  62. height: 100%;
  63. margin-right: $spacing-notification_notice_icon-marginRight;
  64. }
  65. &-info {
  66. color: $color-notification_info-icon;
  67. }
  68. &-warning {
  69. color: $color-notification_warning-icon;
  70. }
  71. &-error {
  72. color: $color-notification_danger-icon;
  73. }
  74. &-success {
  75. color: $color-notification_success-icon;
  76. }
  77. &-light {
  78. &.#{$module}-notice-warning {
  79. background-image: linear-gradient(0deg, $color-notification_warning_light-bg, $color-notification_warning_light-bg);
  80. background-color: $color-notification_ambient-bg;
  81. border: $width-notification_notice-border solid $color-notification_warning_light-border;
  82. }
  83. &.#{$module}-notice-success {
  84. background-image: linear-gradient(0deg, $color-notification_success_light-bg, $color-notification_success_light-bg);
  85. background-color: $color-notification_ambient-bg;
  86. border: $width-notification_notice-border solid $color-notification_success_light-border;
  87. }
  88. &.#{$module}-notice-info,
  89. &.#{$module}-notice-default {
  90. background-image: linear-gradient(0deg, $color-notification_info_light-bg, $color-notification_info_light-bg);
  91. background-color: $color-notification_ambient-bg;
  92. border: $width-notification_notice-border solid $color-notification_info_light-border;
  93. }
  94. &.#{$module}-notice-error {
  95. background-image: linear-gradient(0deg, $color-notification_danger_light-bg, $color-notification_danger_light-bg);
  96. background-color: $color-notification_ambient-bg;
  97. border: $width-notification_notice-border solid $color-notification_danger_light-border;
  98. }
  99. }
  100. &-title {
  101. @include font-size-header-6;
  102. font-weight: $font-notification_notice_title-fontWeight;
  103. color: $color-notification_title-text;
  104. margin-bottom: $spacing-notification_notice_title-marginBottom;
  105. }
  106. &-inner {
  107. display: flex;
  108. width: 100%;
  109. }
  110. &-content-wrapper {
  111. flex: 1 1 auto;
  112. margin-right: $spacing-notification_notice_content_wrapper-marginRight;
  113. }
  114. &-content {
  115. @include font-size-regular;
  116. font-weight: $font-notification_notice_content-fontWeight;
  117. color: $color-notification_content-text;
  118. // padding-top: $spacing-extra-tight;
  119. }
  120. &-icon-close {
  121. height: $width-icon-extra-large;
  122. .#{$prefix}-icon-close {
  123. color: $color-notification_closeBtn-icon;
  124. }
  125. }
  126. &-controls {
  127. display: flex;
  128. @include font-size-regular;
  129. cursor: pointer;
  130. }
  131. &-detail {
  132. text-align: center;
  133. flex-grow: 1;
  134. }
  135. &-later {
  136. text-align: center;
  137. flex-grow: 1;
  138. }
  139. @keyframes #{$module}-slideShow_top {
  140. from {
  141. opacity: $animation_opacity-notification-show;
  142. transform: translateY(-100%);
  143. }
  144. to {
  145. opacity: 1;
  146. transform: translateY(0);
  147. }
  148. }
  149. @keyframes #{$module}-slideHide_top {
  150. from {
  151. opacity: 1;
  152. transform: translateY(0);
  153. }
  154. to {
  155. opacity: $animation_opacity-notification-hide;
  156. transform: translateY(-100%);
  157. }
  158. }
  159. @keyframes #{$module}-slideShow_topLeft {
  160. from {
  161. opacity: $animation_opacity-notification-show;
  162. transform: translateX(-100%);
  163. }
  164. to {
  165. opacity: 1;
  166. transform: translateX(0);
  167. }
  168. }
  169. @keyframes #{$module}-slideHide_topLeft {
  170. from {
  171. opacity: 1;
  172. transform: translateX(0);
  173. }
  174. to {
  175. opacity: $animation_opacity-notification-hide;
  176. transform: translateX(-100%);
  177. }
  178. }
  179. @keyframes #{$module}-slideShow_topRight {
  180. from {
  181. opacity: $animation_opacity-notification-show;
  182. transform: translateX(100%);
  183. }
  184. to {
  185. opacity: 1;
  186. transform: translateX(0);
  187. }
  188. }
  189. @keyframes #{$module}-slideHide_topRight {
  190. from {
  191. opacity: 1;
  192. transform: translateX(0);
  193. }
  194. to {
  195. opacity: $animation_opacity-notification-hide;
  196. transform: translateX(100%);
  197. }
  198. }
  199. @keyframes #{$module}-slideShow_bottom {
  200. from {
  201. opacity: $animation_opacity-notification-show;
  202. transform: translateY(100%);
  203. }
  204. to {
  205. opacity: 1;
  206. transform: translateY(0);
  207. }
  208. }
  209. @keyframes #{$module}-slideHide_bottom {
  210. from {
  211. opacity: 1;
  212. transform: translateY(0);
  213. }
  214. to {
  215. opacity: $animation_opacity-notification-hide;
  216. transform: translateY(100%);
  217. }
  218. }
  219. @keyframes #{$module}-slideShow_bottomLeft {
  220. from {
  221. opacity: $animation_opacity-notification-show;
  222. transform: translateX(-100%);
  223. }
  224. to {
  225. opacity: 1;
  226. transform: translateX(0);
  227. }
  228. }
  229. @keyframes #{$module}-slideHide_bottomLeft {
  230. from {
  231. opacity: 1;
  232. transform: translateX(0);
  233. }
  234. to {
  235. opacity: $animation_opacity-notification-hide;
  236. transform: translateX(-100%);
  237. }
  238. }
  239. @keyframes #{$module}-slideShow_bottomRight {
  240. from {
  241. opacity: $animation_opacity-notification-show;
  242. transform: translateX(100%);
  243. }
  244. to {
  245. opacity: 1;
  246. transform: translateX(0);
  247. }
  248. }
  249. @keyframes #{$module}-slideHide_bottomRight {
  250. from {
  251. opacity: 1;
  252. transform: translateX(0);
  253. }
  254. to {
  255. opacity: $animation_opacity-notification-hide;
  256. transform: translateX(100%);
  257. }
  258. }
  259. &-animation-show_top{
  260. animation: #{$module}-slideShow_top $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
  261. }
  262. &-animation-hide_top{
  263. animation: #{$module}-slideHide_top $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
  264. }
  265. &-animation-show_topLeft{
  266. animation: #{$module}-slideShow_topLeft $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
  267. }
  268. &-animation-hide_topLeft{
  269. animation: #{$module}-slideHide_topLeft $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
  270. }
  271. &-animation-show_topRight{
  272. animation: #{$module}-slideShow_topRight $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
  273. }
  274. &-animation-hide_topRight{
  275. animation: #{$module}-slideHide_topRight $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
  276. }
  277. &-animation-show_bottom{
  278. animation: #{$module}-slideShow_bottom $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
  279. }
  280. &-animation-hide_bottom{
  281. animation: #{$module}-slideHide_bottom $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
  282. }
  283. &-animation-show_bottomLeft{
  284. animation: #{$module}-slideShow_bottomLeft $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
  285. }
  286. &-animation-hide_bottomLeft{
  287. animation: #{$module}-slideHide_bottomLeft $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
  288. }
  289. &-animation-show_bottomRight{
  290. animation: #{$module}-slideShow_bottomRight $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
  291. }
  292. &-animation-hide_bottomRight{
  293. animation: #{$module}-slideHide_bottomRight $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
  294. }
  295. }
  296. }
  297. @import './rtl.scss';