|
74 | 74 | <button |
75 | 75 | class="drawer-handle" |
76 | 76 | type="button" |
| 77 | + aria-label={label} |
77 | 78 | aria-expanded={open} |
78 | 79 | aria-controls="drawer-panel" |
79 | 80 | onclick={toggle} |
80 | 81 | > |
81 | | - <div class="drawer-pill"></div> |
82 | | - <div class="drawer-title-row"> |
83 | | - <span class="drawer-title">{label}</span> |
| 82 | + <div class="drawer-title-row" aria-hidden="true"> |
| 83 | + <svg class="drawer-browse-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" fill="none"> |
| 84 | + <rect x="1.5" y="1.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 85 | + <rect x="8.5" y="1.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 86 | + <rect x="1.5" y="8.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 87 | + <rect x="8.5" y="8.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 88 | + </svg> |
84 | 89 | </div> |
85 | 90 | </button> |
86 | 91 | </div> |
|
98 | 103 | <button |
99 | 104 | class="drawer-handle" |
100 | 105 | type="button" |
| 106 | + aria-label={label} |
101 | 107 | aria-expanded={open} |
102 | 108 | aria-controls="drawer-panel" |
103 | 109 | onclick={toggle} |
104 | 110 | > |
105 | | - <div class="drawer-pill"></div> |
106 | | - <div class="drawer-title-row"> |
107 | | - <span class="drawer-title">{label}</span> |
| 111 | + <div class="drawer-title-row" aria-hidden="true"> |
| 112 | + <svg class="drawer-browse-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" fill="none"> |
| 113 | + <rect x="1.5" y="1.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 114 | + <rect x="8.5" y="1.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 115 | + <rect x="1.5" y="8.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 116 | + <rect x="8.5" y="8.5" width="5" height="5" rx="0.5" stroke="currentColor" /> |
| 117 | + </svg> |
108 | 118 | </div> |
109 | 119 | </button> |
110 | 120 |
|
|
161 | 171 | right: 0; |
162 | 172 | bottom: 0; |
163 | 173 | pointer-events: none; |
164 | | - transform: translateY(calc(100% - 2rem)); |
| 174 | + transform: translateY(calc(100% - 1.5rem)); |
165 | 175 | transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1); |
166 | 176 | will-change: transform; |
167 | 177 | } |
|
174 | 184 | display: flex; |
175 | 185 | flex-direction: column; |
176 | 186 | align-items: center; |
177 | | - gap: 0.2rem; |
178 | | - width: min(18rem, calc(100vw - 1rem)); |
| 187 | + gap: 0; |
| 188 | + width: min(3.5rem, calc(100vw - 1rem)); |
179 | 189 | margin: 0 auto; |
180 | | - padding: 0.35rem 0.85rem 0.45rem; |
| 190 | + padding: 0.5rem 0.35rem 0.6rem; |
181 | 191 | border: 0; |
182 | | - border-radius: 1rem 1rem 0 0; |
| 192 | + border-radius: 0.75rem 0.75rem 0 0; |
183 | 193 | background: white; |
184 | 194 | box-shadow: |
185 | 195 | 0 -8px 30px oklch(0% 0 0 / 0.12), |
|
190 | 200 | pointer-events: auto; |
191 | 201 | } |
192 | 202 |
|
193 | | - .drawer-pill { |
194 | | - width: 2rem; |
195 | | - height: 0.22rem; |
196 | | - border-radius: 999px; |
197 | | - background: oklch(85% 0 0); |
198 | | - } |
199 | | -
|
200 | 203 | .drawer-title-row { |
201 | 204 | display: flex; |
202 | 205 | align-items: center; |
203 | 206 | justify-content: center; |
204 | | - font-size: 0.78rem; |
205 | | - font-weight: 600; |
206 | 207 | line-height: 1; |
207 | 208 | } |
208 | 209 |
|
| 210 | + .drawer-browse-icon { |
| 211 | + width: 0.95rem; |
| 212 | + height: 0.95rem; |
| 213 | + display: block; |
| 214 | + } |
| 215 | +
|
209 | 216 | .drawer-panel { |
210 | 217 | width: 100%; |
211 | 218 | max-height: min(70vh, 34rem); |
|
249 | 256 |
|
250 | 257 | @media (max-width: 640px) { |
251 | 258 | .drawer { |
252 | | - transform: translateY(calc(100% - 2.15rem)); |
| 259 | + transform: translateY(calc(100% - 1.65rem)); |
253 | 260 | } |
254 | 261 |
|
255 | 262 | .drawer-handle { |
256 | | - width: min(18rem, calc(100vw - 0.75rem)); |
257 | | - border-radius: 1rem 1rem 0 0; |
258 | | - padding-top: 0.4rem; |
| 263 | + width: min(3.5rem, calc(100vw - 0.75rem)); |
| 264 | + border-radius: 0.75rem 0.75rem 0 0; |
| 265 | + padding-top: 0.45rem; |
259 | 266 | padding-bottom: 0.5rem; |
260 | 267 | } |
261 | 268 |
|
|
0 commit comments