@internetarchive/modal-manager 2.0.4-alpha-webdev7960.0 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/index.js.map +1 -1
  2. package/dist/src/assets/arrow-left-icon.js +12 -12
  3. package/dist/src/assets/arrow-left-icon.js.map +1 -1
  4. package/dist/src/assets/ia-logo-icon.js +27 -27
  5. package/dist/src/assets/ia-logo-icon.js.map +1 -1
  6. package/dist/src/modal-config.js.map +1 -1
  7. package/dist/src/modal-manager-host-bridge-interface.js.map +1 -1
  8. package/dist/src/modal-manager-host-bridge.js.map +1 -1
  9. package/dist/src/modal-manager-interface.js.map +1 -1
  10. package/dist/src/modal-manager-mode.js.map +1 -1
  11. package/dist/src/modal-manager.d.ts +1 -1
  12. package/dist/src/modal-manager.js +4 -2
  13. package/dist/src/modal-manager.js.map +1 -1
  14. package/dist/src/modal-template.js +220 -220
  15. package/dist/src/modal-template.js.map +1 -1
  16. package/dist/src/shoelace/active-elements.js.map +1 -1
  17. package/dist/src/shoelace/modal.js.map +1 -1
  18. package/dist/src/shoelace/tabbable.js.map +1 -1
  19. package/dist/test/modal-config.test.js.map +1 -1
  20. package/dist/test/modal-manager.test.js +41 -6
  21. package/dist/test/modal-manager.test.js.map +1 -1
  22. package/dist/test/modal-template.test.js +22 -22
  23. package/dist/test/modal-template.test.js.map +1 -1
  24. package/dist/vite.config.js.map +1 -1
  25. package/index.ts +7 -7
  26. package/package.json +1 -1
  27. package/src/assets/arrow-left-icon.ts +15 -15
  28. package/src/assets/ia-logo-icon.ts +30 -30
  29. package/src/modal-config.ts +133 -133
  30. package/src/modal-manager-host-bridge-interface.ts +13 -13
  31. package/src/modal-manager-host-bridge.ts +82 -82
  32. package/src/modal-manager-interface.ts +30 -30
  33. package/src/modal-manager-mode.ts +10 -10
  34. package/src/modal-manager.ts +5 -3
  35. package/src/modal-template.ts +343 -343
  36. package/src/shoelace/active-elements.ts +33 -33
  37. package/src/shoelace/modal.ts +166 -166
  38. package/src/shoelace/tabbable.ts +223 -223
  39. package/test/modal-config.test.ts +77 -77
  40. package/test/modal-manager.test.ts +52 -6
  41. package/test/modal-template.test.ts +206 -206
  42. package/vite.config.ts +23 -23
@@ -1,343 +1,343 @@
1
- import { LitElement, html, css, CSSResult, TemplateResult, nothing } from 'lit';
2
- import { property, customElement } from 'lit/decorators.js';
3
-
4
- import '@internetarchive/ia-activity-indicator';
5
- import '@internetarchive/icon-close';
6
-
7
- import { ModalConfig } from './modal-config';
8
- import IALogoIcon from './assets/ia-logo-icon';
9
- import arrowLeftIcon from './assets/arrow-left-icon';
10
-
11
- @customElement('modal-template')
12
- export class ModalTemplate extends LitElement {
13
- /**
14
- * The ModalConfig that displayed the template
15
- *
16
- * @type {ModalConfig}
17
- * @memberof ModalTemplate
18
- */
19
- @property({ type: Object }) config: ModalConfig = new ModalConfig();
20
-
21
- /** @inheritdoc */
22
- render(): TemplateResult {
23
- return html`
24
- <div class="modal-wrapper">
25
- <div class="modal-container">
26
- <header style="background-color: ${this.config.headerColor}">
27
- ${this.config.showLeftNavButton
28
- ? this.leftNavButtonTemplate
29
- : nothing}
30
- ${this.config.showCloseButton ? this.closeButtonTemplate : ''}
31
- ${this.config.showHeaderLogo
32
- ? html`<div class="logo-icon">${IALogoIcon}</div>`
33
- : nothing}
34
- ${this.config.title
35
- ? html`<h1 class="title">${this.config.title}</h1>`
36
- : ''}
37
- ${this.config.subtitle
38
- ? html`<h2 class="subtitle">${this.config.subtitle}</h2>`
39
- : ''}
40
- </header>
41
- <section
42
- class="modal-body"
43
- style="background-color: ${this.config.bodyColor}"
44
- >
45
- <div class="content">
46
- <div
47
- class="processing-logo ${this.config.showProcessingIndicator
48
- ? ''
49
- : 'hidden'}"
50
- >
51
- <ia-activity-indicator
52
- .mode=${this.config.processingImageMode}
53
- ></ia-activity-indicator>
54
- </div>
55
- ${this.config.headline
56
- ? html` <h1 class="headline">${this.config.headline}</h1> `
57
- : ''}
58
- ${this.config.message
59
- ? html` <p class="message">${this.config.message}</p> `
60
- : ''}
61
-
62
- <div class="slot-container">
63
- <slot> </slot>
64
- </div>
65
- </div>
66
- </section>
67
- </div>
68
- </div>
69
- `;
70
- }
71
-
72
- /**
73
- * Dispatch the `closeButtonPressed` event to the consumer
74
- *
75
- * @private
76
- * @memberof ModalTemplate
77
- */
78
- private handleCloseButton(e: Event): void {
79
- e.preventDefault();
80
- if (
81
- e.type === 'keydown' &&
82
- (e as KeyboardEvent).key !== ' ' &&
83
- (e as KeyboardEvent).key !== 'Enter'
84
- ) {
85
- return;
86
- }
87
- const event = new Event('closeButtonPressed');
88
- this.dispatchEvent(event);
89
- }
90
-
91
- /**
92
- * Dispatch the `leftNavButtonPressed` event to the consumer
93
- *
94
- * @private
95
- * @memberof ModalTemplate
96
- */
97
- private handleLeftNavButtonPressed(e: Event): void {
98
- e.preventDefault();
99
- if (
100
- e.type === 'keydown' &&
101
- (e as KeyboardEvent).key !== ' ' &&
102
- (e as KeyboardEvent).key !== 'Enter'
103
- ) {
104
- return;
105
- }
106
- const event = new Event('leftNavButtonPressed');
107
- this.dispatchEvent(event);
108
- }
109
-
110
- /**
111
- * The close button template
112
- *
113
- * @readonly
114
- * @private
115
- * @type {TemplateResult}
116
- * @memberof ModalTemplate
117
- */
118
- private get closeButtonTemplate(): TemplateResult {
119
- return html`
120
- <button
121
- type="button"
122
- class="close-button"
123
- @click=${this.handleCloseButton}
124
- @keydown=${this.handleCloseButton}
125
- >
126
- <ia-icon-close></ia-icon-close>
127
- </button>
128
- `;
129
- }
130
-
131
- private get leftNavButtonTemplate(): TemplateResult {
132
- return html`<button
133
- type="button"
134
- class="back-button"
135
- @click=${this.handleLeftNavButtonPressed}
136
- @keydown=${this.handleLeftNavButtonPressed}
137
- >
138
- ${arrowLeftIcon} ${this.config.leftNavButtonText ?? ''}
139
- </button> `;
140
- }
141
-
142
- /** @inheritdoc */
143
- static get styles(): CSSResult {
144
- const modalLogoSize = css`var(--modalLogoSize, 6.5rem)`;
145
-
146
- const processingImageSize = css`var(--processingImageSize, 7.5rem)`;
147
-
148
- const modalCornerRadius = css`var(--modalCornerRadius, 1rem)`;
149
- const modalBorder = css`var(--modalBorder, 2px solid black)`;
150
- // if the content of the modal is too big to fit on screen, this sets the bottom margin
151
- // it's not exact, but a close estimation
152
- const modalBottomMarginCss = css`var(--modalBottomMargin, 2.5rem)`;
153
- const modalTopMarginCss = css`var(--modalTopMargin, 5rem)`;
154
- const modalHeaderBottomPaddingCss = css`var(--modalHeaderBottomPadding, 0.5em)`;
155
-
156
- const modalBottomPadding = css`var(--modalBottomPadding, 2rem)`;
157
- const scrollOffset = css`var(--modalScrollOffset, 5px)`;
158
-
159
- const titleFontSize = css`var(--modalTitleFontSize, 1.8rem)`;
160
- const subtitleFontSize = css`var(--modalSubtitleFontSize, 1.4rem)`;
161
- const headlineFontSize = css`var(--modalHeadlineFontSize, 1.6rem)`;
162
- const messageFontSize = css`var(--modalMessageFontSize, 1.4rem)`;
163
-
164
- const titleLineHeight = css`var(--modalTitleLineHeight, normal)`;
165
- const subtitleLineHeight = css`var(--modalSubtitleLineHeight, normal)`;
166
- const headlineLineHeight = css`var(--modalHeadlineLineHeight, normal)`;
167
- const messageLineHeight = css`var(--modalMessageLineHeight, normal)`;
168
-
169
- return css`
170
- .processing-logo {
171
- margin: auto;
172
- width: ${processingImageSize};
173
- height: ${processingImageSize};
174
- }
175
-
176
- .processing-logo.hidden {
177
- height: 1rem;
178
- }
179
-
180
- .processing-logo.hidden ia-activity-indicator {
181
- display: none;
182
- }
183
-
184
- .modal-wrapper {
185
- outline: none;
186
- }
187
-
188
- .modal-container {
189
- border-radius: ${modalCornerRadius};
190
- width: 100%;
191
- margin-top: ${modalTopMarginCss};
192
- }
193
-
194
- header {
195
- position: relative;
196
- background-color: #36a483;
197
- color: white;
198
- border-radius: calc(${modalCornerRadius}) calc(${modalCornerRadius}) 0 0;
199
- border: ${modalBorder};
200
- border-bottom: 0;
201
- text-align: center;
202
- padding-bottom: ${modalHeaderBottomPaddingCss};
203
- }
204
-
205
- .title {
206
- margin: 0;
207
- padding: 0;
208
- font-size: ${titleFontSize};
209
- font-weight: bold;
210
- line-height: ${titleLineHeight};
211
- }
212
-
213
- .subtitle {
214
- margin: 0;
215
- padding: 0;
216
- font-weight: normal;
217
- padding-top: 0;
218
- font-size: ${subtitleFontSize};
219
- line-height: ${subtitleLineHeight};
220
- }
221
-
222
- .modal-body {
223
- background-color: #fbfbfd;
224
- border-radius: 0 0 calc(${modalCornerRadius}) calc(${modalCornerRadius});
225
- border: ${modalBorder};
226
- border-top: 0;
227
- padding: 0 1rem calc(${modalBottomPadding} - ${scrollOffset}) 1rem;
228
- color: #333;
229
- margin-bottom: 2.5rem;
230
- min-height: 5rem;
231
- }
232
-
233
- .content {
234
- overflow-y: auto;
235
- max-height: calc(100vh - (16.5rem + ${modalBottomMarginCss}));
236
- min-height: 5rem;
237
- padding: 0 0 calc(${scrollOffset}) 0;
238
- }
239
-
240
- .headline {
241
- font-size: ${headlineFontSize};
242
- font-weight: bold;
243
- text-align: center;
244
- line-height: ${headlineLineHeight};
245
- margin: 0;
246
- padding: 0;
247
- }
248
-
249
- .message {
250
- margin: 1rem 0 0 0;
251
- text-align: center;
252
- font-size: ${messageFontSize};
253
- line-height: ${messageLineHeight};
254
- }
255
-
256
- .logo-icon {
257
- border-radius: 100%;
258
- border: 3px solid #fff;
259
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
260
- 0 2px 2px 0 rgba(0, 0, 0, 0.08);
261
- width: ${modalLogoSize};
262
- height: ${modalLogoSize};
263
- margin: -2.9rem auto 0.5rem auto;
264
- background-color: black;
265
- display: flex;
266
- justify-content: center;
267
- align-items: center;
268
- }
269
-
270
- .logo-icon svg {
271
- width: calc(${modalLogoSize} * 0.65);
272
- height: calc(${modalLogoSize} * 0.65);
273
- }
274
-
275
- .logo-icon svg .fill-color {
276
- fill: white;
277
- }
278
-
279
- .logo-icon svg .stroke-color {
280
- stroke: red;
281
- }
282
-
283
- .close-button {
284
- position: absolute;
285
- right: 1.2rem;
286
- top: 1.2rem;
287
- width: 2rem;
288
- height: 2rem;
289
- border-radius: 100%;
290
- border: 0;
291
- padding: 0;
292
- cursor: pointer;
293
- background-color: white;
294
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
295
- 0 4px 4px 0 rgba(0, 0, 0, 0.08);
296
- }
297
-
298
- .back-button {
299
- position: absolute;
300
- left: 1.2rem;
301
- top: 1.2rem;
302
- height: 2rem;
303
- background-color: transparent;
304
- outline: none;
305
- border: none;
306
- padding: 0;
307
- cursor: pointer;
308
- color: white;
309
- font-family: inherit;
310
- display: flex;
311
- flex-direction: row;
312
- align-items: center;
313
- gap: 0.5rem;
314
- }
315
-
316
- .back-button svg {
317
- height: 1.5rem;
318
- }
319
-
320
- .sr-only {
321
- position: absolute;
322
- width: 1px;
323
- height: 1px;
324
- padding: 0;
325
- margin: -1px;
326
- overflow: hidden;
327
- clip: rect(0, 0, 0, 0);
328
- border: 0;
329
- }
330
-
331
- slot::slotted(.sr-only) {
332
- position: absolute;
333
- width: 1px;
334
- height: 1px;
335
- padding: 0;
336
- margin: -1px;
337
- overflow: hidden;
338
- clip: rect(0, 0, 0, 0);
339
- border: 0;
340
- }
341
- `;
342
- }
343
- }
1
+ import { LitElement, html, css, CSSResult, TemplateResult, nothing } from 'lit';
2
+ import { property, customElement } from 'lit/decorators.js';
3
+
4
+ import '@internetarchive/ia-activity-indicator';
5
+ import '@internetarchive/icon-close';
6
+
7
+ import { ModalConfig } from './modal-config';
8
+ import IALogoIcon from './assets/ia-logo-icon';
9
+ import arrowLeftIcon from './assets/arrow-left-icon';
10
+
11
+ @customElement('modal-template')
12
+ export class ModalTemplate extends LitElement {
13
+ /**
14
+ * The ModalConfig that displayed the template
15
+ *
16
+ * @type {ModalConfig}
17
+ * @memberof ModalTemplate
18
+ */
19
+ @property({ type: Object }) config: ModalConfig = new ModalConfig();
20
+
21
+ /** @inheritdoc */
22
+ render(): TemplateResult {
23
+ return html`
24
+ <div class="modal-wrapper">
25
+ <div class="modal-container">
26
+ <header style="background-color: ${this.config.headerColor}">
27
+ ${this.config.showLeftNavButton
28
+ ? this.leftNavButtonTemplate
29
+ : nothing}
30
+ ${this.config.showCloseButton ? this.closeButtonTemplate : ''}
31
+ ${this.config.showHeaderLogo
32
+ ? html`<div class="logo-icon">${IALogoIcon}</div>`
33
+ : nothing}
34
+ ${this.config.title
35
+ ? html`<h1 class="title">${this.config.title}</h1>`
36
+ : ''}
37
+ ${this.config.subtitle
38
+ ? html`<h2 class="subtitle">${this.config.subtitle}</h2>`
39
+ : ''}
40
+ </header>
41
+ <section
42
+ class="modal-body"
43
+ style="background-color: ${this.config.bodyColor}"
44
+ >
45
+ <div class="content">
46
+ <div
47
+ class="processing-logo ${this.config.showProcessingIndicator
48
+ ? ''
49
+ : 'hidden'}"
50
+ >
51
+ <ia-activity-indicator
52
+ .mode=${this.config.processingImageMode}
53
+ ></ia-activity-indicator>
54
+ </div>
55
+ ${this.config.headline
56
+ ? html` <h1 class="headline">${this.config.headline}</h1> `
57
+ : ''}
58
+ ${this.config.message
59
+ ? html` <p class="message">${this.config.message}</p> `
60
+ : ''}
61
+
62
+ <div class="slot-container">
63
+ <slot> </slot>
64
+ </div>
65
+ </div>
66
+ </section>
67
+ </div>
68
+ </div>
69
+ `;
70
+ }
71
+
72
+ /**
73
+ * Dispatch the `closeButtonPressed` event to the consumer
74
+ *
75
+ * @private
76
+ * @memberof ModalTemplate
77
+ */
78
+ private handleCloseButton(e: Event): void {
79
+ e.preventDefault();
80
+ if (
81
+ e.type === 'keydown' &&
82
+ (e as KeyboardEvent).key !== ' ' &&
83
+ (e as KeyboardEvent).key !== 'Enter'
84
+ ) {
85
+ return;
86
+ }
87
+ const event = new Event('closeButtonPressed');
88
+ this.dispatchEvent(event);
89
+ }
90
+
91
+ /**
92
+ * Dispatch the `leftNavButtonPressed` event to the consumer
93
+ *
94
+ * @private
95
+ * @memberof ModalTemplate
96
+ */
97
+ private handleLeftNavButtonPressed(e: Event): void {
98
+ e.preventDefault();
99
+ if (
100
+ e.type === 'keydown' &&
101
+ (e as KeyboardEvent).key !== ' ' &&
102
+ (e as KeyboardEvent).key !== 'Enter'
103
+ ) {
104
+ return;
105
+ }
106
+ const event = new Event('leftNavButtonPressed');
107
+ this.dispatchEvent(event);
108
+ }
109
+
110
+ /**
111
+ * The close button template
112
+ *
113
+ * @readonly
114
+ * @private
115
+ * @type {TemplateResult}
116
+ * @memberof ModalTemplate
117
+ */
118
+ private get closeButtonTemplate(): TemplateResult {
119
+ return html`
120
+ <button
121
+ type="button"
122
+ class="close-button"
123
+ @click=${this.handleCloseButton}
124
+ @keydown=${this.handleCloseButton}
125
+ >
126
+ <ia-icon-close></ia-icon-close>
127
+ </button>
128
+ `;
129
+ }
130
+
131
+ private get leftNavButtonTemplate(): TemplateResult {
132
+ return html`<button
133
+ type="button"
134
+ class="back-button"
135
+ @click=${this.handleLeftNavButtonPressed}
136
+ @keydown=${this.handleLeftNavButtonPressed}
137
+ >
138
+ ${arrowLeftIcon} ${this.config.leftNavButtonText ?? ''}
139
+ </button> `;
140
+ }
141
+
142
+ /** @inheritdoc */
143
+ static get styles(): CSSResult {
144
+ const modalLogoSize = css`var(--modalLogoSize, 6.5rem)`;
145
+
146
+ const processingImageSize = css`var(--processingImageSize, 7.5rem)`;
147
+
148
+ const modalCornerRadius = css`var(--modalCornerRadius, 1rem)`;
149
+ const modalBorder = css`var(--modalBorder, 2px solid black)`;
150
+ // if the content of the modal is too big to fit on screen, this sets the bottom margin
151
+ // it's not exact, but a close estimation
152
+ const modalBottomMarginCss = css`var(--modalBottomMargin, 2.5rem)`;
153
+ const modalTopMarginCss = css`var(--modalTopMargin, 5rem)`;
154
+ const modalHeaderBottomPaddingCss = css`var(--modalHeaderBottomPadding, 0.5em)`;
155
+
156
+ const modalBottomPadding = css`var(--modalBottomPadding, 2rem)`;
157
+ const scrollOffset = css`var(--modalScrollOffset, 5px)`;
158
+
159
+ const titleFontSize = css`var(--modalTitleFontSize, 1.8rem)`;
160
+ const subtitleFontSize = css`var(--modalSubtitleFontSize, 1.4rem)`;
161
+ const headlineFontSize = css`var(--modalHeadlineFontSize, 1.6rem)`;
162
+ const messageFontSize = css`var(--modalMessageFontSize, 1.4rem)`;
163
+
164
+ const titleLineHeight = css`var(--modalTitleLineHeight, normal)`;
165
+ const subtitleLineHeight = css`var(--modalSubtitleLineHeight, normal)`;
166
+ const headlineLineHeight = css`var(--modalHeadlineLineHeight, normal)`;
167
+ const messageLineHeight = css`var(--modalMessageLineHeight, normal)`;
168
+
169
+ return css`
170
+ .processing-logo {
171
+ margin: auto;
172
+ width: ${processingImageSize};
173
+ height: ${processingImageSize};
174
+ }
175
+
176
+ .processing-logo.hidden {
177
+ height: 1rem;
178
+ }
179
+
180
+ .processing-logo.hidden ia-activity-indicator {
181
+ display: none;
182
+ }
183
+
184
+ .modal-wrapper {
185
+ outline: none;
186
+ }
187
+
188
+ .modal-container {
189
+ border-radius: ${modalCornerRadius};
190
+ width: 100%;
191
+ margin-top: ${modalTopMarginCss};
192
+ }
193
+
194
+ header {
195
+ position: relative;
196
+ background-color: #36a483;
197
+ color: white;
198
+ border-radius: calc(${modalCornerRadius}) calc(${modalCornerRadius}) 0 0;
199
+ border: ${modalBorder};
200
+ border-bottom: 0;
201
+ text-align: center;
202
+ padding-bottom: ${modalHeaderBottomPaddingCss};
203
+ }
204
+
205
+ .title {
206
+ margin: 0;
207
+ padding: 0;
208
+ font-size: ${titleFontSize};
209
+ font-weight: bold;
210
+ line-height: ${titleLineHeight};
211
+ }
212
+
213
+ .subtitle {
214
+ margin: 0;
215
+ padding: 0;
216
+ font-weight: normal;
217
+ padding-top: 0;
218
+ font-size: ${subtitleFontSize};
219
+ line-height: ${subtitleLineHeight};
220
+ }
221
+
222
+ .modal-body {
223
+ background-color: #fbfbfd;
224
+ border-radius: 0 0 calc(${modalCornerRadius}) calc(${modalCornerRadius});
225
+ border: ${modalBorder};
226
+ border-top: 0;
227
+ padding: 0 1rem calc(${modalBottomPadding} - ${scrollOffset}) 1rem;
228
+ color: #333;
229
+ margin-bottom: 2.5rem;
230
+ min-height: 5rem;
231
+ }
232
+
233
+ .content {
234
+ overflow-y: auto;
235
+ max-height: calc(100vh - (16.5rem + ${modalBottomMarginCss}));
236
+ min-height: 5rem;
237
+ padding: 0 0 calc(${scrollOffset}) 0;
238
+ }
239
+
240
+ .headline {
241
+ font-size: ${headlineFontSize};
242
+ font-weight: bold;
243
+ text-align: center;
244
+ line-height: ${headlineLineHeight};
245
+ margin: 0;
246
+ padding: 0;
247
+ }
248
+
249
+ .message {
250
+ margin: 1rem 0 0 0;
251
+ text-align: center;
252
+ font-size: ${messageFontSize};
253
+ line-height: ${messageLineHeight};
254
+ }
255
+
256
+ .logo-icon {
257
+ border-radius: 100%;
258
+ border: 3px solid #fff;
259
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
260
+ 0 2px 2px 0 rgba(0, 0, 0, 0.08);
261
+ width: ${modalLogoSize};
262
+ height: ${modalLogoSize};
263
+ margin: -2.9rem auto 0.5rem auto;
264
+ background-color: black;
265
+ display: flex;
266
+ justify-content: center;
267
+ align-items: center;
268
+ }
269
+
270
+ .logo-icon svg {
271
+ width: calc(${modalLogoSize} * 0.65);
272
+ height: calc(${modalLogoSize} * 0.65);
273
+ }
274
+
275
+ .logo-icon svg .fill-color {
276
+ fill: white;
277
+ }
278
+
279
+ .logo-icon svg .stroke-color {
280
+ stroke: red;
281
+ }
282
+
283
+ .close-button {
284
+ position: absolute;
285
+ right: 1.2rem;
286
+ top: 1.2rem;
287
+ width: 2rem;
288
+ height: 2rem;
289
+ border-radius: 100%;
290
+ border: 0;
291
+ padding: 0;
292
+ cursor: pointer;
293
+ background-color: white;
294
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
295
+ 0 4px 4px 0 rgba(0, 0, 0, 0.08);
296
+ }
297
+
298
+ .back-button {
299
+ position: absolute;
300
+ left: 1.2rem;
301
+ top: 1.2rem;
302
+ height: 2rem;
303
+ background-color: transparent;
304
+ outline: none;
305
+ border: none;
306
+ padding: 0;
307
+ cursor: pointer;
308
+ color: white;
309
+ font-family: inherit;
310
+ display: flex;
311
+ flex-direction: row;
312
+ align-items: center;
313
+ gap: 0.5rem;
314
+ }
315
+
316
+ .back-button svg {
317
+ height: 1.5rem;
318
+ }
319
+
320
+ .sr-only {
321
+ position: absolute;
322
+ width: 1px;
323
+ height: 1px;
324
+ padding: 0;
325
+ margin: -1px;
326
+ overflow: hidden;
327
+ clip: rect(0, 0, 0, 0);
328
+ border: 0;
329
+ }
330
+
331
+ slot::slotted(.sr-only) {
332
+ position: absolute;
333
+ width: 1px;
334
+ height: 1px;
335
+ padding: 0;
336
+ margin: -1px;
337
+ overflow: hidden;
338
+ clip: rect(0, 0, 0, 0);
339
+ border: 0;
340
+ }
341
+ `;
342
+ }
343
+ }