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