@internetarchive/modal-manager 2.0.3 → 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.
Files changed (103) hide show
  1. package/.editorconfig +29 -29
  2. package/.eslintrc.js +14 -14
  3. package/.github/workflows/ci.yml +30 -30
  4. package/.github/workflows/gh-pages-main.yml +42 -42
  5. package/.github/workflows/pr-preview.yml +40 -40
  6. package/LICENSE +661 -661
  7. package/README.md +139 -139
  8. package/custom-elements.json +170 -170
  9. package/dist/index.d.ts +7 -7
  10. package/dist/index.js +5 -5
  11. package/dist/index.js.map +1 -1
  12. package/dist/src/assets/arrow-left-icon.d.ts +2 -2
  13. package/dist/src/assets/arrow-left-icon.js +14 -14
  14. package/dist/src/assets/arrow-left-icon.js.map +1 -1
  15. package/dist/src/assets/ia-logo-icon.d.ts +2 -2
  16. package/dist/src/assets/ia-logo-icon.js +29 -29
  17. package/dist/src/assets/ia-logo-icon.js.map +1 -1
  18. package/dist/src/modal-config.d.ts +104 -104
  19. package/dist/src/modal-config.js +24 -24
  20. package/dist/src/modal-config.js.map +1 -1
  21. package/dist/src/modal-manager-host-bridge-interface.d.ts +12 -12
  22. package/dist/src/modal-manager-host-bridge-interface.js +1 -1
  23. package/dist/src/modal-manager-host-bridge-interface.js.map +1 -1
  24. package/dist/src/modal-manager-host-bridge.d.ts +34 -34
  25. package/dist/src/modal-manager-host-bridge.js +62 -62
  26. package/dist/src/modal-manager-host-bridge.js.map +1 -1
  27. package/dist/src/modal-manager-interface.d.ts +27 -27
  28. package/dist/src/modal-manager-interface.js +1 -1
  29. package/dist/src/modal-manager-interface.js.map +1 -1
  30. package/dist/src/modal-manager-mode.d.ts +10 -10
  31. package/dist/src/modal-manager-mode.js +11 -11
  32. package/dist/src/modal-manager-mode.js.map +1 -1
  33. package/dist/src/modal-manager.d.ts +137 -127
  34. package/dist/src/modal-manager.js +247 -234
  35. package/dist/src/modal-manager.js.map +1 -1
  36. package/dist/src/modal-template.d.ts +41 -41
  37. package/dist/src/modal-template.js +335 -335
  38. package/dist/src/modal-template.js.map +1 -1
  39. package/dist/src/shoelace/active-elements.d.ts +15 -15
  40. package/dist/src/shoelace/active-elements.js +27 -27
  41. package/dist/src/shoelace/active-elements.js.map +1 -1
  42. package/dist/src/shoelace/modal.d.ts +24 -24
  43. package/dist/src/shoelace/modal.js +131 -131
  44. package/dist/src/shoelace/modal.js.map +1 -1
  45. package/dist/src/shoelace/tabbable.d.ts +9 -9
  46. package/dist/src/shoelace/tabbable.js +169 -169
  47. package/dist/src/shoelace/tabbable.js.map +1 -1
  48. package/dist/test/modal-config.test.d.ts +1 -1
  49. package/dist/test/modal-config.test.js +69 -69
  50. package/dist/test/modal-config.test.js.map +1 -1
  51. package/dist/test/modal-manager.test.d.ts +1 -1
  52. package/dist/test/modal-manager.test.js +274 -274
  53. package/dist/test/modal-manager.test.js.map +1 -1
  54. package/dist/test/modal-template.test.d.ts +1 -1
  55. package/dist/test/modal-template.test.js +178 -178
  56. package/dist/test/modal-template.test.js.map +1 -1
  57. package/dist/vite.config.d.ts +2 -2
  58. package/dist/vite.config.js +22 -22
  59. package/dist/vite.config.js.map +1 -1
  60. package/docs/assets/css/main.css +2678 -2678
  61. package/docs/classes/_src_modal_config_.modalconfig.html +429 -429
  62. package/docs/classes/_src_modal_manager_.modalmanager.html +7702 -7702
  63. package/docs/classes/_src_modal_manager_host_bridge_.modalmanagerhostbridge.html +409 -409
  64. package/docs/classes/_src_modal_template_.modaltemplate.html +7096 -7096
  65. package/docs/enums/_src_modal_manager_mode_.modalmanagermode.html +196 -196
  66. package/docs/globals.html +150 -150
  67. package/docs/index.html +252 -252
  68. package/docs/interfaces/_src_modal_manager_host_bridge_interface_.modalmanagerhostbridgeinterface.html +210 -210
  69. package/docs/interfaces/_src_modal_manager_interface_.modalmanagerinterface.html +7095 -7095
  70. package/docs/modules/_index_.html +208 -208
  71. package/docs/modules/_src_modal_config_.html +146 -146
  72. package/docs/modules/_src_modal_manager_.html +146 -146
  73. package/docs/modules/_src_modal_manager_host_bridge_.html +146 -146
  74. package/docs/modules/_src_modal_manager_host_bridge_interface_.html +146 -146
  75. package/docs/modules/_src_modal_manager_interface_.html +146 -146
  76. package/docs/modules/_src_modal_manager_mode_.html +146 -146
  77. package/docs/modules/_src_modal_template_.html +146 -146
  78. package/docs/modules/_test_modal_config_test_.html +106 -106
  79. package/docs/modules/_test_modal_manager_test_.html +106 -106
  80. package/docs/modules/_test_modal_template_test_.html +106 -106
  81. package/index.html +300 -300
  82. package/index.ts +7 -7
  83. package/karma.conf.js +24 -24
  84. package/package.json +85 -85
  85. package/renovate.json +7 -7
  86. package/src/assets/arrow-left-icon.ts +15 -15
  87. package/src/assets/ia-logo-icon.ts +30 -30
  88. package/src/modal-config.ts +133 -133
  89. package/src/modal-manager-host-bridge-interface.ts +13 -13
  90. package/src/modal-manager-host-bridge.ts +82 -82
  91. package/src/modal-manager-interface.ts +30 -30
  92. package/src/modal-manager-mode.ts +10 -10
  93. package/src/modal-manager.ts +303 -283
  94. package/src/modal-template.ts +343 -343
  95. package/src/shoelace/LICENSE.md +6 -6
  96. package/src/shoelace/active-elements.ts +33 -33
  97. package/src/shoelace/modal.ts +166 -166
  98. package/src/shoelace/tabbable.ts +223 -223
  99. package/test/modal-config.test.ts +77 -77
  100. package/test/modal-manager.test.ts +347 -347
  101. package/test/modal-template.test.ts +206 -206
  102. package/tsconfig.json +21 -21
  103. package/vite.config.ts +23 -23
@@ -1,336 +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
- 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 };
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 };
336
336
  //# sourceMappingURL=modal-template.js.map