|
1 | | -passive-modal, |
2 | | -confirm-modal, |
3 | | -form-modal, |
4 | | -raw-modal { |
| 1 | +modal-component { |
| 2 | + display: flex; |
| 3 | + flex-direction: column; |
| 4 | + justify-content: center; |
| 5 | + align-items: center; |
5 | 6 | position: fixed; |
6 | 7 | top: 0; |
7 | 8 | left: 0; |
8 | 9 | width: 100vw; |
9 | 10 | height: 100vh; |
10 | | - display: flex; |
11 | | - justify-content: center; |
12 | | - align-items: center; |
13 | | - z-index: 5000; |
14 | 11 |
|
15 | 12 | .backdrop { |
16 | 13 | position: absolute; |
17 | 14 | top: 0; |
18 | 15 | left: 0; |
19 | 16 | width: 100%; |
20 | 17 | height: 100%; |
21 | | - background-color: rgba(255, 255, 255, 0.6); |
22 | | - backdrop-filter: blur(4px); |
23 | | - z-index: 1; |
| 18 | + background-color: hsl(var(--grey-700-hsl) / 0.6); |
| 19 | + backdrop-filter: blur(8px); |
24 | 20 | } |
25 | 21 |
|
26 | 22 | .modal { |
27 | | - display: inline-block; |
28 | | - background-color: var(--white); |
29 | | - border-radius: 0.5rem; |
30 | | - width: 100%; |
31 | | - max-width: calc(100% - 2rem); |
32 | | - z-index: 2; |
33 | 23 | position: relative; |
34 | | - overflow: hidden; |
35 | | - box-shadow: var(--shadow-grey-lg); |
36 | 24 | border: 1px solid var(--grey-300); |
| 25 | + box-shadow: var(--shadow-grey-lg); |
| 26 | + background-color: var(--white); |
| 27 | + border-radius: 1rem; |
| 28 | + max-width: calc(100vw - 2rem); |
| 29 | + max-height: calc(100vh - 2rem); |
| 30 | + overflow-y: auto; |
| 31 | + } |
37 | 32 |
|
38 | | - &[size="small"] { |
39 | | - width: 350px; |
40 | | - } |
41 | | - &[size="medium"] { |
42 | | - width: 450px; |
43 | | - } |
44 | | - &[size="large"] { |
45 | | - width: 768px; |
46 | | - } |
47 | | - |
48 | | - .close { |
49 | | - position: absolute; |
50 | | - top: 0; |
51 | | - right: 0; |
52 | | - width: 36px; |
53 | | - height: 36px; |
54 | | - display: inline-flex; |
55 | | - justify-content: center; |
56 | | - align-items: center; |
57 | | - cursor: pointer; |
58 | | - color: var(--grey-400); |
59 | | - outline-offset: 0; |
60 | | - |
61 | | - &:focus-visible { |
62 | | - outline: var(--focus-ring); |
63 | | - outline-offset: var(--focus-ring-offset); |
64 | | - transition: outline-offset 80ms var(--ease-in-out); |
65 | | - } |
66 | | - |
67 | | - &:hover { |
| 33 | + &.static-content { |
| 34 | + .modal { |
| 35 | + h2 { |
| 36 | + font-size: var(--font-lg); |
| 37 | + font-weight: var(--font-medium); |
68 | 38 | color: var(--grey-800); |
69 | | - |
70 | | - &::before { |
71 | | - opacity: 0.05; |
72 | | - } |
| 39 | + line-height: 1.375; |
| 40 | + margin-bottom: 1rem; |
| 41 | + display: block; |
73 | 42 | } |
74 | 43 |
|
75 | | - &:active { |
76 | | - color: var(--grey-800); |
77 | | - outline-offset: 0; |
78 | | - |
79 | | - &::before { |
80 | | - opacity: 0.1; |
81 | | - } |
82 | | - } |
83 | | - |
84 | | - &::before { |
85 | | - content: ""; |
86 | | - display: inline-block; |
87 | | - position: absolute; |
88 | | - top: 0; |
89 | | - left: 0; |
90 | | - width: 100%; |
91 | | - height: 100%; |
92 | | - background-color: var(--grey-500); |
93 | | - border-radius: 50%; |
94 | | - opacity: 0; |
95 | | - transition: all 80ms var(--ease-in-out); |
96 | | - } |
97 | | - |
98 | | - svg { |
99 | | - width: 18px; |
100 | | - height: 18px; |
101 | | - } |
102 | | - } |
103 | | - |
104 | | - h1 { |
105 | | - display: block; |
106 | | - font-weight: var(--font-medium); |
107 | | - font-size: var(--font-md); |
108 | | - color: var(--grey-800); |
109 | | - padding: 1rem 1rem 0.5rem; |
110 | | - line-height: 1.375; |
111 | | - } |
112 | | - |
113 | | - p { |
114 | | - display: block; |
115 | | - color: var(--grey-700); |
116 | | - font-size: var(--font-sm); |
117 | | - line-height: 1.618; |
118 | | - padding: 0 1rem 1rem; |
119 | | - } |
120 | | - |
121 | | - .actions { |
122 | | - display: flex; |
123 | | - justify-content: flex-end; |
124 | | - align-items: center; |
125 | | - width: 100%; |
126 | | - padding: 1rem; |
127 | | - background-color: var(--grey-50); |
128 | | - border-top: 1px solid var(--grey-300); |
129 | | - |
130 | | - button { |
131 | | - display: inline-flex; |
132 | | - justify-content: center; |
133 | | - align-items: center; |
134 | | - flex-flow: row nowrap; |
135 | | - position: relative; |
136 | | - background-color: var(--primary-700); |
137 | | - border: 1px solid var(--primary-800); |
138 | | - transition: transform 80ms var(--ease-in-out), box-shadow 80ms var(--ease-in-out); |
139 | | - padding: 0 1rem; |
140 | | - min-height: 36px; |
141 | | - box-shadow: none; |
142 | | - text-transform: uppercase; |
| 44 | + p { |
| 45 | + color: var(--grey-700); |
143 | 46 | font-size: var(--font-sm); |
144 | | - font-weight: var(--font-medium); |
145 | | - user-select: none; |
146 | | - text-overflow: ellipsis; |
147 | | - cursor: pointer; |
148 | | - border-radius: 0.25rem; |
149 | | - outline-offset: 0; |
150 | | - |
151 | | - &:focus-visible { |
152 | | - outline: var(--focus-ring); |
153 | | - outline-offset: var(--focus-ring-offset); |
154 | | - transition: outline-offset 80ms var(--ease-in-out); |
155 | | - } |
156 | | - |
157 | | - &:active, |
158 | | - &.is-active { |
159 | | - outline-offset: 0; |
160 | | - box-shadow: none !important; |
161 | | - transform: translateY(1px); |
162 | | - } |
163 | | - |
164 | | - &.confirm { |
165 | | - border-color: var(--success-800); |
166 | | - background-color: var(--success-700); |
167 | | - color: var(--white); |
168 | | - box-shadow: var(--bevel); |
169 | | - |
170 | | - &:hover, |
171 | | - &:focus-visible { |
172 | | - background-color: var(--success-600); |
173 | | - } |
174 | | - |
175 | | - &:active, |
176 | | - &.is-active { |
177 | | - background-color: var(--success-700); |
178 | | - } |
179 | | - |
180 | | - &.danger { |
181 | | - border-color: var(--danger-800); |
182 | | - background-color: var(--danger-700); |
183 | | - color: var(--white); |
184 | | - box-shadow: var(--bevel); |
185 | | - |
186 | | - &:hover, |
187 | | - &:focus-visible { |
188 | | - background-color: var(--danger-600); |
189 | | - } |
190 | | - |
191 | | - &:active, |
192 | | - &.is-active { |
193 | | - background-color: var(--danger-800); |
194 | | - } |
195 | | - } |
196 | | - } |
197 | | - |
198 | | - &.cancel { |
199 | | - border-color: var(--grey-300); |
200 | | - background-color: var(--white); |
201 | | - color: var(--black); |
202 | | - box-shadow: var(--bevel); |
203 | | - margin-right: 1rem; |
204 | | - |
205 | | - &:hover, |
206 | | - &:focus-visible { |
207 | | - background-color: var(--grey-50); |
208 | | - } |
209 | | - |
210 | | - &:active, |
211 | | - &.is-active { |
212 | | - background-color: var(--grey-100); |
213 | | - } |
214 | | - } |
| 47 | + line-height: 1.618; |
| 48 | + display: block; |
215 | 49 | } |
216 | 50 | } |
217 | 51 | } |
|
0 commit comments