dialog.css 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /* [data-component="dialog-trigger"] { } */
  2. [data-component="dialog-overlay"] {
  3. position: fixed;
  4. inset: 0;
  5. z-index: 50;
  6. background-color: transparent;
  7. /* animation: overlayHide 250ms ease 100ms forwards; */
  8. /**/
  9. /* &[data-expanded] { */
  10. /* animation: overlayShow 250ms ease; */
  11. /* } */
  12. }
  13. [data-component="dialog"] {
  14. position: fixed;
  15. inset: 0;
  16. margin-left: var(--dialog-left-margin);
  17. z-index: 50;
  18. display: flex;
  19. align-items: center;
  20. justify-content: center;
  21. [data-slot="dialog-container"] {
  22. position: relative;
  23. z-index: 50;
  24. width: min(calc(100vw - 16px), 480px);
  25. height: min(calc(100vh - 16px), 512px);
  26. display: flex;
  27. flex-direction: column;
  28. align-items: center;
  29. justify-items: start;
  30. [data-slot="dialog-content"] {
  31. display: flex;
  32. flex-direction: column;
  33. align-items: flex-start;
  34. align-self: stretch;
  35. width: 100%;
  36. max-height: 100%;
  37. min-height: 280px;
  38. /* padding: 8px; */
  39. /* padding: 8px 8px 0 8px; */
  40. border: 1px solid var(--border-base);
  41. border-radius: var(--radius-xl);
  42. background: var(--surface-raised-stronger-non-alpha);
  43. box-shadow:
  44. 0 15px 45px 0 rgba(19, 16, 16, 0.22),
  45. 0 3.35px 10.051px 0 rgba(19, 16, 16, 0.13),
  46. 0 0.998px 2.993px 0 rgba(19, 16, 16, 0.09);
  47. /* animation: contentHide 300ms ease-in forwards; */
  48. /**/
  49. /* &[data-expanded] { */
  50. /* animation: contentShow 300ms ease-out; */
  51. /* } */
  52. [data-slot="dialog-header"] {
  53. display: flex;
  54. padding: 16px;
  55. justify-content: space-between;
  56. align-items: center;
  57. flex-shrink: 0;
  58. align-self: stretch;
  59. [data-slot="dialog-title"] {
  60. color: var(--text-strong);
  61. /* text-16-medium */
  62. font-family: var(--font-family-sans);
  63. font-size: var(--font-size-large);
  64. font-style: normal;
  65. font-weight: var(--font-weight-medium);
  66. line-height: var(--line-height-x-large); /* 150% */
  67. letter-spacing: var(--letter-spacing-tight);
  68. }
  69. /* [data-slot="dialog-close-button"] {} */
  70. }
  71. [data-slot="dialog-description"] {
  72. display: flex;
  73. padding: 16px;
  74. padding-top: 0;
  75. margin-top: -8px;
  76. justify-content: space-between;
  77. align-items: center;
  78. flex-shrink: 0;
  79. align-self: stretch;
  80. color: var(--text-base);
  81. /* text-14-regular */
  82. font-family: var(--font-family-sans);
  83. font-size: 14px;
  84. font-style: normal;
  85. font-weight: var(--font-weight-regular);
  86. line-height: var(--line-height-large); /* 142.857% */
  87. letter-spacing: var(--letter-spacing-normal);
  88. }
  89. [data-slot="dialog-body"] {
  90. width: 100%;
  91. position: relative;
  92. display: flex;
  93. flex-direction: column;
  94. flex: 1;
  95. overflow-y: auto;
  96. &:focus-visible {
  97. outline: none;
  98. }
  99. }
  100. &:focus-visible {
  101. outline: none;
  102. }
  103. }
  104. &:focus-visible {
  105. outline: none;
  106. }
  107. }
  108. }
  109. @keyframes overlayShow {
  110. from {
  111. opacity: 0;
  112. }
  113. to {
  114. opacity: 1;
  115. }
  116. }
  117. @keyframes overlayHide {
  118. from {
  119. opacity: 1;
  120. }
  121. to {
  122. opacity: 0;
  123. }
  124. }
  125. @keyframes contentShow {
  126. from {
  127. opacity: 0;
  128. transform: scale(0.96);
  129. }
  130. to {
  131. opacity: 1;
  132. transform: scale(1);
  133. }
  134. }
  135. @keyframes contentHide {
  136. from {
  137. opacity: 1;
  138. transform: scale(1);
  139. }
  140. to {
  141. opacity: 0;
  142. transform: scale(0.96);
  143. }
  144. }