@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.
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 -0
  13. package/dist/src/assets/arrow-left-icon.js +15 -0
  14. package/dist/src/assets/arrow-left-icon.js.map +1 -0
  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 -92
  19. package/dist/src/modal-config.js +24 -22
  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 -25
  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 -112
  34. package/dist/src/modal-manager.js +247 -218
  35. package/dist/src/modal-manager.js.map +1 -1
  36. package/dist/src/modal-template.d.ts +41 -33
  37. package/dist/src/modal-template.js +335 -282
  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 -61
  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 -252
  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 -106
  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 -282
  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 -0
  87. package/src/assets/ia-logo-icon.ts +30 -30
  88. package/src/modal-config.ts +133 -117
  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 -28
  92. package/src/modal-manager-mode.ts +10 -10
  93. package/src/modal-manager.ts +303 -258
  94. package/src/modal-template.ts +343 -287
  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 -69
  100. package/test/modal-manager.test.ts +347 -319
  101. package/test/modal-template.test.ts +206 -124
  102. package/tsconfig.json +21 -21
  103. package/vite.config.ts +23 -23
@@ -1,287 +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
-
10
- @customElement('modal-template')
11
- export class ModalTemplate extends LitElement {
12
- /**
13
- * The ModalConfig that displayed the template
14
- *
15
- * @type {ModalConfig}
16
- * @memberof ModalTemplate
17
- */
18
- @property({ type: Object }) config: ModalConfig = new ModalConfig();
19
-
20
- /** @inheritdoc */
21
- render(): TemplateResult {
22
- return html`
23
- <div class="modal-wrapper">
24
- <div class="modal-container">
25
- <header style="background-color: ${this.config.headerColor}">
26
- ${this.config.showCloseButton ? this.closeButtonTemplate : ''}
27
- ${this.config.showHeaderLogo
28
- ? html`<div class="logo-icon">${IALogoIcon}</div>`
29
- : nothing}
30
- ${this.config.title
31
- ? html`<h1 class="title">${this.config.title}</h1>`
32
- : ''}
33
- ${this.config.subtitle
34
- ? html`<h2 class="subtitle">${this.config.subtitle}</h2>`
35
- : ''}
36
- </header>
37
- <section
38
- class="modal-body"
39
- style="background-color: ${this.config.bodyColor}"
40
- >
41
- <div class="content">
42
- <div
43
- class="processing-logo ${this.config.showProcessingIndicator
44
- ? ''
45
- : 'hidden'}"
46
- >
47
- <ia-activity-indicator
48
- .mode=${this.config.processingImageMode}
49
- ></ia-activity-indicator>
50
- </div>
51
- ${this.config.headline
52
- ? html` <h1 class="headline">${this.config.headline}</h1> `
53
- : ''}
54
- ${this.config.message
55
- ? html` <p class="message">${this.config.message}</p> `
56
- : ''}
57
-
58
- <div class="slot-container">
59
- <slot> </slot>
60
- </div>
61
- </div>
62
- </section>
63
- </div>
64
- </div>
65
- `;
66
- }
67
-
68
- /**
69
- * Dispatch the `closeButtonPressed` event to the consumer
70
- *
71
- * @private
72
- * @memberof ModalTemplate
73
- */
74
- private handleCloseButton(e: Event): void {
75
- e.preventDefault();
76
- if (
77
- e.type === 'keydown' &&
78
- (e as KeyboardEvent).key !== ' ' &&
79
- (e as KeyboardEvent).key !== 'Enter'
80
- ) {
81
- return;
82
- }
83
- const event = new Event('closeButtonPressed');
84
- this.dispatchEvent(event);
85
- }
86
-
87
- /**
88
- * The close button template
89
- *
90
- * @readonly
91
- * @private
92
- * @type {TemplateResult}
93
- * @memberof ModalTemplate
94
- */
95
- private get closeButtonTemplate(): TemplateResult {
96
- return html`
97
- <button
98
- type="button"
99
- class="close-button"
100
- @click=${this.handleCloseButton}
101
- @keydown=${this.handleCloseButton}
102
- >
103
- <ia-icon-close></ia-icon-close>
104
- </button>
105
- `;
106
- }
107
-
108
- /** @inheritdoc */
109
- static get styles(): CSSResult {
110
- const modalLogoSize = css`var(--modalLogoSize, 6.5rem)`;
111
-
112
- const processingImageSize = css`var(--processingImageSize, 7.5rem)`;
113
-
114
- const modalCornerRadius = css`var(--modalCornerRadius, 1rem)`;
115
- const modalBorder = css`var(--modalBorder, 2px solid black)`;
116
- // if the content of the modal is too big to fit on screen, this sets the bottom margin
117
- // it's not exact, but a close estimation
118
- const modalBottomMarginCss = css`var(--modalBottomMargin, 2.5rem)`;
119
- const modalTopMarginCss = css`var(--modalTopMargin, 5rem)`;
120
- const modalHeaderBottomPaddingCss = css`var(--modalHeaderBottomPadding, 0.5em)`;
121
-
122
- const modalBottomPadding = css`var(--modalBottomPadding, 2rem)`;
123
- const scrollOffset = css`var(--modalScrollOffset, 5px)`;
124
-
125
- const titleFontSize = css`var(--modalTitleFontSize, 1.8rem)`;
126
- const subtitleFontSize = css`var(--modalSubtitleFontSize, 1.4rem)`;
127
- const headlineFontSize = css`var(--modalHeadlineFontSize, 1.6rem)`;
128
- const messageFontSize = css`var(--modalMessageFontSize, 1.4rem)`;
129
-
130
- const titleLineHeight = css`var(--modalTitleLineHeight, normal)`;
131
- const subtitleLineHeight = css`var(--modalSubtitleLineHeight, normal)`;
132
- const headlineLineHeight = css`var(--modalHeadlineLineHeight, normal)`;
133
- const messageLineHeight = css`var(--modalMessageLineHeight, normal)`;
134
-
135
- return css`
136
- .processing-logo {
137
- margin: auto;
138
- width: ${processingImageSize};
139
- height: ${processingImageSize};
140
- }
141
-
142
- .processing-logo.hidden {
143
- height: 1rem;
144
- }
145
-
146
- .processing-logo.hidden ia-activity-indicator {
147
- display: none;
148
- }
149
-
150
- .modal-wrapper {
151
- outline: none;
152
- }
153
-
154
- .modal-container {
155
- border-radius: ${modalCornerRadius};
156
- width: 100%;
157
- margin-top: ${modalTopMarginCss};
158
- }
159
-
160
- header {
161
- position: relative;
162
- background-color: #36a483;
163
- color: white;
164
- border-radius: calc(${modalCornerRadius}) calc(${modalCornerRadius}) 0 0;
165
- border: ${modalBorder};
166
- border-bottom: 0;
167
- text-align: center;
168
- padding-bottom: ${modalHeaderBottomPaddingCss};
169
- }
170
-
171
- .title {
172
- margin: 0;
173
- padding: 0;
174
- font-size: ${titleFontSize};
175
- font-weight: bold;
176
- line-height: ${titleLineHeight};
177
- }
178
-
179
- .subtitle {
180
- margin: 0;
181
- padding: 0;
182
- font-weight: normal;
183
- padding-top: 0;
184
- font-size: ${subtitleFontSize};
185
- line-height: ${subtitleLineHeight};
186
- }
187
-
188
- .modal-body {
189
- background-color: #fbfbfd;
190
- border-radius: 0 0 calc(${modalCornerRadius}) calc(${modalCornerRadius});
191
- border: ${modalBorder};
192
- border-top: 0;
193
- padding: 0 1rem calc(${modalBottomPadding} - ${scrollOffset}) 1rem;
194
- color: #333;
195
- margin-bottom: 2.5rem;
196
- min-height: 5rem;
197
- }
198
-
199
- .content {
200
- overflow-y: auto;
201
- max-height: calc(100vh - (16.5rem + ${modalBottomMarginCss}));
202
- min-height: 5rem;
203
- padding: 0 0 calc(${scrollOffset}) 0;
204
- }
205
-
206
- .headline {
207
- font-size: ${headlineFontSize};
208
- font-weight: bold;
209
- text-align: center;
210
- line-height: ${headlineLineHeight};
211
- margin: 0;
212
- padding: 0;
213
- }
214
-
215
- .message {
216
- margin: 1rem 0 0 0;
217
- text-align: center;
218
- font-size: ${messageFontSize};
219
- line-height: ${messageLineHeight};
220
- }
221
-
222
- .logo-icon {
223
- border-radius: 100%;
224
- border: 3px solid #fff;
225
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
226
- 0 2px 2px 0 rgba(0, 0, 0, 0.08);
227
- width: ${modalLogoSize};
228
- height: ${modalLogoSize};
229
- margin: -2.9rem auto 0.5rem auto;
230
- background-color: black;
231
- display: flex;
232
- justify-content: center;
233
- align-items: center;
234
- }
235
-
236
- .logo-icon svg {
237
- width: calc(${modalLogoSize} * 0.65);
238
- height: calc(${modalLogoSize} * 0.65);
239
- }
240
-
241
- .logo-icon svg .fill-color {
242
- fill: white;
243
- }
244
-
245
- .logo-icon svg .stroke-color {
246
- stroke: red;
247
- }
248
-
249
- .close-button {
250
- position: absolute;
251
- right: 1.2rem;
252
- top: 1.2rem;
253
- width: 2rem;
254
- height: 2rem;
255
- border-radius: 100%;
256
- border: 0;
257
- padding: 0;
258
- cursor: pointer;
259
- background-color: white;
260
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
261
- 0 4px 4px 0 rgba(0, 0, 0, 0.08);
262
- }
263
-
264
- .sr-only {
265
- position: absolute;
266
- width: 1px;
267
- height: 1px;
268
- padding: 0;
269
- margin: -1px;
270
- overflow: hidden;
271
- clip: rect(0, 0, 0, 0);
272
- border: 0;
273
- }
274
-
275
- slot::slotted(.sr-only) {
276
- position: absolute;
277
- width: 1px;
278
- height: 1px;
279
- padding: 0;
280
- margin: -1px;
281
- overflow: hidden;
282
- clip: rect(0, 0, 0, 0);
283
- border: 0;
284
- }
285
- `;
286
- }
287
- }
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,7 +1,7 @@
1
- Copyright (c) 2020 A Beautiful Site, LLC
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
1
+ Copyright (c) 2020 A Beautiful Site, LLC
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
7
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.