@maggioli-design-system/mds-modal 3.4.0 → 3.6.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 (39) hide show
  1. package/dist/cjs/mds-modal.cjs.entry.js +63 -35
  2. package/dist/collection/common/keyboard-manager.js +40 -0
  3. package/dist/collection/components/mds-modal/mds-modal.css +173 -30
  4. package/dist/collection/components/mds-modal/mds-modal.js +22 -34
  5. package/dist/collection/dictionary/icon.js +3 -1
  6. package/dist/collection/dictionary/typography.js +5 -1
  7. package/dist/components/mds-modal.js +63 -35
  8. package/dist/esm/mds-modal.entry.js +63 -35
  9. package/dist/esm-es5/mds-modal.entry.js +1 -1
  10. package/dist/mds-modal/mds-modal.esm.js +1 -1
  11. package/dist/mds-modal/p-2a5d50d2.entry.js +1 -0
  12. package/dist/mds-modal/p-64ab5c19.system.entry.js +1 -0
  13. package/dist/mds-modal/p-f856db3e.system.js +1 -1
  14. package/dist/stats.json +56 -21
  15. package/dist/types/common/keyboard-manager.d.ts +11 -0
  16. package/dist/types/dictionary/icon.d.ts +2 -1
  17. package/dist/types/dictionary/typography.d.ts +2 -1
  18. package/dist/types/types/typography.d.ts +1 -0
  19. package/package.json +2 -2
  20. package/readme.md +12 -0
  21. package/src/common/keyboard-manager.ts +46 -0
  22. package/src/components/mds-modal/mds-modal.css +13 -10
  23. package/src/components/mds-modal/mds-modal.tsx +22 -40
  24. package/src/components/mds-modal/readme.md +12 -0
  25. package/src/components/mds-modal/test/mds-modal.e2e.ts +2 -2
  26. package/src/dictionary/icon.ts +4 -0
  27. package/src/dictionary/typography.ts +9 -3
  28. package/src/fixtures/icons.json +174 -0
  29. package/src/fixtures/iconsauce.json +175 -0
  30. package/src/tailwind/components.css +1 -0
  31. package/src/types/typography.ts +4 -0
  32. package/www/build/mds-modal.esm.js +1 -1
  33. package/www/build/p-2a5d50d2.entry.js +1 -0
  34. package/www/build/p-64ab5c19.system.entry.js +1 -0
  35. package/www/build/p-f856db3e.system.js +1 -1
  36. package/dist/mds-modal/p-96e1c297.entry.js +0 -1
  37. package/dist/mds-modal/p-bd8bddd0.system.entry.js +0 -1
  38. package/www/build/p-96e1c297.entry.js +0 -1
  39. package/www/build/p-bd8bddd0.system.entry.js +0 -1
@@ -1,115 +1,186 @@
1
1
  @tailwind components;
2
+
3
+ .focus-off,
4
+ .focusable,
5
+ .focusable-light,
6
+ .focusable-light-off{
7
+
8
+ transition-duration: 200ms;
9
+
10
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
11
+
12
+ outline-offset: var(--magma-outline-blur-offset);
13
+ outline: var(--magma-outline-blur);
14
+ transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
15
+ }
16
+
17
+ .focus-on,
18
+ .focusable-light:focus-visible,
19
+ .focusable:focus-visible {
20
+ --magma-outline-blur-offset: var(--magma-outline-focus-offset);
21
+ --magma-outline-blur: var(--magma-outline-focus);
22
+ }
23
+
24
+ .focus-light-on,
25
+ .focusable-light:focus-visible {
26
+ --magma-outline-blur: 2px solid rgb(var(--tone-neutral));
27
+ }
28
+
29
+ .svg{
30
+
31
+ display: flex;
32
+ }
33
+
34
+ .svg svg{
35
+
36
+ aspect-ratio: 1 / 1;
37
+
38
+ height: 100%;
39
+
40
+ width: 100%;
41
+ }
42
+
43
+ .animate-left,
44
+ .animate-right{
45
+
46
+ opacity: 0;
47
+
48
+ transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
49
+
50
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
51
+
52
+ transition-duration: 500ms;
53
+
54
+ transition-timing-function: cubic-bezier(1, 0, 0, 1);
55
+ }
56
+
57
+ .animate-right-intro,
58
+ .animate-right-outro {
59
+ transform: translateX(calc(100% + 50px));
60
+ }
2
61
  .fixed{
62
+
3
63
  position: fixed;
4
64
  }
5
65
  .absolute{
66
+
6
67
  position: absolute;
7
68
  }
8
69
  .mx-6{
70
+
9
71
  margin-left: 1.5rem;
72
+
10
73
  margin-right: 1.5rem;
11
74
  }
12
75
  .ml-auto{
76
+
13
77
  margin-left: auto;
14
78
  }
15
79
  .flex{
80
+
16
81
  display: flex;
17
82
  }
18
83
  .w-16{
84
+
19
85
  width: 4rem;
20
86
  }
21
87
  .min-w-0{
88
+
22
89
  min-width: 0px;
23
90
  }
24
91
  .max-w-lg{
92
+
25
93
  max-width: 32rem;
26
94
  }
27
95
  .max-w-xl{
96
+
28
97
  max-width: 36rem;
29
98
  }
30
99
  .items-center{
100
+
31
101
  align-items: center;
32
102
  }
33
103
  .gap-4{
104
+
34
105
  gap: 1rem;
35
106
  }
36
107
  .truncate{
108
+
37
109
  overflow: hidden;
110
+
38
111
  text-overflow: ellipsis;
112
+
39
113
  white-space: nowrap;
40
114
  }
41
115
  .rounded-full{
116
+
42
117
  border-radius: 9999px;
43
118
  }
44
119
  .border{
120
+
45
121
  border-width: 1px;
46
122
  }
47
123
  .border-b{
124
+
48
125
  border-bottom-width: 1px;
49
126
  }
50
127
  .border-t{
128
+
51
129
  border-top-width: 1px;
52
130
  }
53
131
  .border-tone-neutral-09{
132
+
54
133
  --tw-border-opacity: 1;
134
+
55
135
  border-color: rgba(var(--tone-neutral-09), var(--tw-border-opacity));
56
136
  }
57
137
  .bg-transparent{
138
+
58
139
  background-color: transparent;
59
140
  }
60
141
  .p-8{
142
+
61
143
  padding: 2rem;
62
144
  }
63
145
  .p-4{
146
+
64
147
  padding: 1rem;
65
148
  }
66
149
  .text-tone-neutral-02{
150
+
67
151
  --tw-text-opacity: 1;
152
+
68
153
  color: rgba(var(--tone-neutral-02), var(--tw-text-opacity));
69
154
  }
70
155
  .text-tone-neutral-04{
156
+
71
157
  --tw-text-opacity: 1;
158
+
72
159
  color: rgba(var(--tone-neutral-04), var(--tw-text-opacity));
73
160
  }
74
161
  .shadow{
162
+
75
163
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
164
+
76
165
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
166
+
77
167
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
78
168
  }
79
- .svg{
80
- display: flex;
81
- }
82
- .svg svg{
83
- aspect-ratio: 1 / 1;
84
- height: 100%;
85
- width: 100%;
86
- }
87
- .animate-left,
88
- .animate-right{
89
- opacity: 0;
90
- transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
91
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
92
- transition-duration: 500ms;
93
- transition-timing-function: cubic-bezier(1, 0, 0, 1);
94
- }
95
- .animate-right-intro,
96
- .animate-right-outro {
97
- transform: translateX(calc(100% + 50px));
98
- }
99
-
100
169
 
101
- /*
102
- * @prop --mds-modal-overlay-color: Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.
103
- * @prop --mds-modal-overlay-opacity: Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.
104
- * @prop --mds-modal-window-background: Set the background color of the window when the component is opened
105
- * @prop --mds-modal-window-shadow: Set the box-shadow of the window when the component is opened
106
- * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened
170
+ /**
171
+ * @prop --mds-modal-overlay-color: Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.
172
+ * @prop --mds-modal-overlay-opacity: Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.
173
+ * @prop --mds-modal-window-background: Set the background color of the window
174
+ * @prop --mds-modal-window-overflow: Set the overflow of the window
175
+ * @prop --mds-modal-window-shadow: Set the box shadow of the window
176
+ * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened
107
177
  */
108
178
 
109
179
  :host {
110
180
  --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);
111
181
  --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);
112
182
  --mds-modal-window-background: rgb(var(--tone-neutral));
183
+ --mds-modal-window-overflow: auto;
113
184
  --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
114
185
  --mds-modal-z-index: var(--magma-modal-z-index);
115
186
  pointer-events: none;
@@ -130,12 +201,16 @@
130
201
  }
131
202
 
132
203
  :host ( [position=top] ){
204
+
133
205
  align-items: flex-start;
206
+
134
207
  justify-content: center;
135
208
  }
136
209
 
137
210
  :host ( [position=bottom] ){
211
+
138
212
  align-items: flex-end;
213
+
139
214
  justify-content: center;
140
215
  }
141
216
 
@@ -144,41 +219,59 @@
144
219
  :host ( .animate-left-opened ),
145
220
  :host ( .animate-right-opened ),
146
221
  :host ( .animate-top-opened ){
222
+
147
223
  pointer-events: auto;
224
+
148
225
  transition-duration: 500ms;
149
226
 
150
227
  background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));
151
228
  }
152
229
 
153
230
  .close{
231
+
154
232
  position: absolute;
233
+
155
234
  top: 0px;
235
+
156
236
  height: 2.25rem;
237
+
157
238
  width: 2.25rem;
239
+
158
240
  transform-origin: center;
241
+
159
242
  cursor: pointer;
243
+
244
+ border-radius: 9999px;
245
+
160
246
  fill: rgb(var(--tone-neutral-10));
247
+
161
248
  font-size: 2.25rem;
249
+
162
250
  line-height: 2.5rem;
251
+
163
252
  opacity: 0;
164
- transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
165
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
253
+
166
254
  transition-duration: 500ms;
255
+
167
256
  transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
168
257
 
258
+ transition-property: opacity, outline, outline-offset, transform;
169
259
  transform: translate(0, 24px) rotate(90deg);
170
260
  }
171
261
 
172
262
  .window{
263
+
173
264
  display: grid;
265
+
174
266
  height: 100%;
267
+
175
268
  gap: 0px;
176
- overflow: auto;
177
269
 
178
270
  background-color: var(--mds-modal-window-background);
179
271
  box-shadow: var(--mds-modal-window-shadow);
180
272
  grid-template-rows: 1fr;
181
273
  max-width: calc(100vw - 80px);
274
+ overflow: var(--mds-modal-window-overflow);
182
275
  }
183
276
 
184
277
  .window--top {
@@ -194,22 +287,31 @@
194
287
  }
195
288
 
196
289
  :host ( .animate-bottom ){
290
+
197
291
  justify-content: center;
292
+
198
293
  padding: 2rem;
199
294
  }
200
295
 
201
296
  @media (max-width: 767px){
297
+
202
298
  :host ( .animate-bottom ){
299
+
203
300
  padding: 1rem;
204
301
  }
205
302
  }
206
303
 
207
304
  :host ( .animate-bottom ) .window,
208
305
  :host ( .animate-bottom ) > ::slotted ( [slot=window] ){
306
+
209
307
  opacity: 0;
308
+
210
309
  transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
310
+
211
311
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
312
+
212
313
  transition-duration: 500ms;
314
+
213
315
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
214
316
  }
215
317
 
@@ -222,6 +324,7 @@
222
324
  :host ( .animate-bottom-opened.animate-bottom-outro ) > ::slotted ( [slot=window] ),
223
325
  :host ( .animate-bottom-opened ) .window,
224
326
  :host ( .animate-bottom-opened ) > ::slotted ( [slot=window] ){
327
+
225
328
  opacity: 1;
226
329
 
227
330
  transform: rotateX(0) scale(1) translateY(0);
@@ -233,22 +336,31 @@
233
336
  }
234
337
 
235
338
  :host ( .animate-center ){
339
+
236
340
  justify-content: center;
341
+
237
342
  padding: 2rem;
238
343
  }
239
344
 
240
345
  @media (max-width: 767px){
346
+
241
347
  :host ( .animate-center ){
348
+
242
349
  padding: 1rem;
243
350
  }
244
351
  }
245
352
 
246
353
  :host ( .animate-center ) .window,
247
354
  :host ( .animate-center ) > ::slotted ( [slot=window] ){
355
+
248
356
  opacity: 0;
357
+
249
358
  transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
359
+
250
360
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
361
+
251
362
  transition-duration: 500ms;
363
+
252
364
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
253
365
  }
254
366
 
@@ -261,6 +373,7 @@
261
373
  :host ( .animate-center-opened.animate-center-outro ) > ::slotted ( [slot=window] ),
262
374
  :host ( .animate-center-opened ) .window,
263
375
  :host ( .animate-center-opened ) > ::slotted ( [slot=window] ){
376
+
264
377
  opacity: 1;
265
378
 
266
379
  transform: rotateX(0) scale(1) translateY(0);
@@ -272,15 +385,21 @@
272
385
  }
273
386
 
274
387
  :host ( .animate-left ){
388
+
275
389
  justify-content: flex-start;
276
390
  }
277
391
 
278
392
  :host ( .animate-left ) .window,
279
393
  :host ( .animate-left ) > ::slotted ( [slot=window] ){
394
+
280
395
  opacity: 0;
396
+
281
397
  transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
398
+
282
399
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
400
+
283
401
  transition-duration: 500ms;
402
+
284
403
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
285
404
  }
286
405
 
@@ -293,6 +412,7 @@
293
412
  :host ( .animate-left-opened.animate-left-outro ) > ::slotted ( [slot=window] ),
294
413
  :host ( .animate-left-opened ) .window,
295
414
  :host ( .animate-left-opened ) > ::slotted ( [slot=window] ){
415
+
296
416
  opacity: 1;
297
417
 
298
418
  transform: translateX(0);
@@ -300,6 +420,7 @@
300
420
 
301
421
  :host ( .animate-left-opened ) .close,
302
422
  :host ( .animate-left-opened.animate-left-outro ) .close{
423
+
303
424
  opacity: 1;
304
425
 
305
426
  transform: translate(-24px, 24px) rotate(0);
@@ -315,21 +436,28 @@
315
436
  }
316
437
 
317
438
  :host ( .animate-left ) .close{
439
+
318
440
  right: 0px;
319
441
 
320
442
  transform: translate(36px, 24px) rotate(90deg);
321
443
  }
322
444
 
323
445
  :host ( .animate-right ){
446
+
324
447
  justify-content: flex-end;
325
448
  }
326
449
 
327
450
  :host ( .animate-right ) .window,
328
451
  :host ( .animate-right ) > ::slotted ( [slot=window] ){
452
+
329
453
  opacity: 0;
454
+
330
455
  transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
456
+
331
457
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
458
+
332
459
  transition-duration: 500ms;
460
+
333
461
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
334
462
  }
335
463
 
@@ -342,6 +470,7 @@
342
470
  :host ( .animate-right-opened.animate-right-outro ) > ::slotted ( [slot=window] ),
343
471
  :host ( .animate-right-opened ) .window,
344
472
  :host ( .animate-right-opened ) > ::slotted ( [slot=window] ){
473
+
345
474
  opacity: 1;
346
475
 
347
476
  transform: translateX(0);
@@ -349,6 +478,7 @@
349
478
 
350
479
  :host ( .animate-right-opened ) .close,
351
480
  :host ( .animate-right-opened.animate-right-outro ) .close{
481
+
352
482
  opacity: 1;
353
483
 
354
484
  transform: translate(24px, 24px) rotate(0);
@@ -364,28 +494,38 @@
364
494
  }
365
495
 
366
496
  :host ( .animate-right ) .close{
497
+
367
498
  left: 0px;
368
499
 
369
500
  transform: translate(-36px, 24px) rotate(-90deg);
370
501
  }
371
502
 
372
503
  :host ( .animate-top ){
504
+
373
505
  justify-content: center;
506
+
374
507
  padding: 2rem;
375
508
  }
376
509
 
377
510
  @media (max-width: 767px){
511
+
378
512
  :host ( .animate-top ){
513
+
379
514
  padding: 1rem;
380
515
  }
381
516
  }
382
517
 
383
518
  :host ( .animate-top ) .window,
384
519
  :host ( .animate-top ) > ::slotted ( [slot=window] ){
520
+
385
521
  opacity: 0;
522
+
386
523
  transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
524
+
387
525
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
526
+
388
527
  transition-duration: 500ms;
528
+
389
529
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
390
530
  }
391
531
 
@@ -398,6 +538,7 @@
398
538
  :host ( .animate-top-opened.animate-top-outro ) > ::slotted ( [slot=window] ),
399
539
  :host ( .animate-top-opened ) .window,
400
540
  :host ( .animate-top-opened ) > ::slotted ( [slot=window] ){
541
+
401
542
  opacity: 1;
402
543
 
403
544
  transform: rotateX(0) scale(1) translateY(0);
@@ -409,7 +550,9 @@
409
550
  }
410
551
 
411
552
  @media (max-width: 767px){
553
+
412
554
  .mobile\:w-12{
555
+
413
556
  width: 3rem;
414
557
  }
415
558
  }
@@ -1,20 +1,23 @@
1
1
  import { Host, h } from '@stencil/core';
2
2
  import clsx from 'clsx';
3
3
  import miBaselineClose from '@icon/mi/baseline/close.svg';
4
+ import { KeyboardManager } from '@common/keyboard-manager';
4
5
  export class MdsModal {
5
6
  constructor() {
6
7
  this.window = null;
7
8
  this.top = null;
8
9
  this.bottom = null;
9
10
  this.animationState = 'intro';
11
+ this.km = new KeyboardManager();
12
+ this.componentDidLoad = () => {
13
+ this.km.addElement(this.host, 'host');
14
+ this.km.addElement(this.host.shadowRoot.querySelector('.close'), 'close');
15
+ this.km.attachEscapeBehavior(() => this.close.emit());
16
+ this.km.attachClickBehavior('close');
17
+ };
10
18
  this.animationName = (customState = null, customPosition = null) => {
11
19
  return `animate-${customPosition !== null ? customPosition : this.position}${customState !== null ? '-' + customState : ''}`;
12
20
  };
13
- this.checkKeyboardEscape = (event) => {
14
- if (event.code === 'Escape') {
15
- this.close.emit();
16
- }
17
- };
18
21
  this.closeModal = (e = null) => {
19
22
  var _a;
20
23
  if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
@@ -30,9 +33,9 @@ export class MdsModal {
30
33
  this.position = null;
31
34
  }
32
35
  componentWillLoad() {
33
- this.bottom = this.hostElement.querySelector('[slot="bottom"]') !== null;
34
- this.top = this.hostElement.querySelector('[slot="top"]') !== null;
35
- this.window = this.hostElement.querySelector('[slot="window"]') !== null;
36
+ this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
37
+ this.top = this.host.querySelector('[slot="top"]') !== null;
38
+ this.window = this.host.querySelector('[slot="window"]') !== null;
36
39
  this.stateOpened = this.opened;
37
40
  if (this.window && this.position === null) {
38
41
  this.position = 'center';
@@ -41,50 +44,35 @@ export class MdsModal {
41
44
  this.position = 'right';
42
45
  }
43
46
  if (this.window) {
44
- const modal = this.hostElement.querySelector('[slot="window"]');
47
+ const modal = this.host.querySelector('[slot="window"]');
45
48
  modal.setAttribute('role', 'modal');
46
49
  }
47
50
  }
48
51
  componentWillRender() {
49
52
  this.animationState = this.opened ? 'intro' : 'outro';
50
- this.hostElement.classList.add(this.animationName());
53
+ this.host.classList.add(this.animationName());
51
54
  }
52
55
  componentDidRender() {
53
56
  this.animationDeelay = window.setTimeout(() => {
54
57
  this.animationState = this.animationState === 'intro' ? 'outro' : 'intro';
55
- this.hostElement.classList.remove(this.animationName(this.animationState === 'intro' ? 'outro' : 'intro'));
56
- this.hostElement.classList.add(this.animationName(this.animationState));
58
+ this.host.classList.remove(this.animationName(this.animationState === 'intro' ? 'outro' : 'intro'));
59
+ this.host.classList.add(this.animationName(this.animationState));
57
60
  window.clearTimeout(this.animationDeelay);
58
61
  }, 500);
59
- if (this.opened) {
60
- this.addKeyboardEscapeListener();
61
- return;
62
- }
63
- this.removeKeyboardEscapeListener();
64
62
  }
65
63
  disconnectedCallback() {
66
- this.removeKeyboardEscapeListener();
64
+ this.km.detachEscapeBehavior();
65
+ this.km.detachClickBehavior('close');
67
66
  }
68
67
  positionChange(_newValue, oldValue) {
69
68
  window.clearTimeout(this.animationDeelay);
70
- this.hostElement.classList.remove(this.animationName(null, oldValue));
71
- this.hostElement.classList.remove(this.animationName('intro', oldValue));
72
- this.hostElement.classList.remove(this.animationName('outro', oldValue));
73
- }
74
- addKeyboardEscapeListener() {
75
- window.addEventListener('keydown', this.checkKeyboardEscape.bind(this));
76
- }
77
- removeKeyboardEscapeListener() {
78
- window.removeEventListener('keydown', this.checkKeyboardEscape.bind(this));
69
+ this.host.classList.remove(this.animationName(null, oldValue));
70
+ this.host.classList.remove(this.animationName('intro', oldValue));
71
+ this.host.classList.remove(this.animationName('outro', oldValue));
79
72
  }
80
73
  openedChange(newValue) {
81
74
  this.stateOpened = newValue;
82
75
  window.clearTimeout(this.animationDeelay);
83
- if (newValue) {
84
- this.addKeyboardEscapeListener();
85
- return;
86
- }
87
- this.removeKeyboardEscapeListener();
88
76
  }
89
77
  onCloseListener() {
90
78
  this.opened = false;
@@ -96,7 +84,7 @@ export class MdsModal {
96
84
  :
97
85
  h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog" }, this.top &&
98
86
  h("slot", { name: "top" }), h("slot", null), this.bottom &&
99
- h("slot", { name: "bottom" })), !this.window && h("i", { innerHTML: miBaselineClose, class: "svg close" })));
87
+ h("slot", { name: "bottom" })), !this.window && h("i", { innerHTML: miBaselineClose, tabindex: "0", onClick: (e) => { this.closeModal(e); }, class: "svg close focusable-light" })));
100
88
  }
101
89
  static get is() { return "mds-modal"; }
102
90
  static get encapsulation() { return "shadow"; }
@@ -177,7 +165,7 @@ export class MdsModal {
177
165
  }
178
166
  }];
179
167
  }
180
- static get elementRef() { return "hostElement"; }
168
+ static get elementRef() { return "host"; }
181
169
  static get watchers() {
182
170
  return [{
183
171
  "propName": "position",
@@ -1,3 +1,5 @@
1
1
  import jsonIconsDictionary from '../fixtures/icons.json';
2
+ import jsonMggIconsDictionary from '../fixtures/iconsauce.json';
2
3
  const iconsDictionary = jsonIconsDictionary;
3
- export { iconsDictionary, };
4
+ const mggIconsDictionary = jsonMggIconsDictionary;
5
+ export { iconsDictionary, mggIconsDictionary, };
@@ -21,6 +21,10 @@ const typographyVariationsDictionary = [
21
21
  'read',
22
22
  'code',
23
23
  ];
24
+ const typographyReadingVariationsDictionary = [
25
+ 'info',
26
+ 'read',
27
+ ];
24
28
  const typographyMonoDictionary = [
25
29
  'snippet',
26
30
  'hack',
@@ -56,4 +60,4 @@ const typographyTooltipDictionary = [
56
60
  'detail',
57
61
  'tip',
58
62
  ];
59
- export { typographyDictionary, typographyVariationsDictionary, typographyMonoDictionary, typographyTitleDictionary, typographyInfoDictionary, typographyReadDictionary, typographySmallerDictionary, typographyTooltipDictionary, };
63
+ export { typographyDictionary, typographyInfoDictionary, typographyReadingVariationsDictionary, typographyMonoDictionary, typographyReadDictionary, typographySmallerDictionary, typographyTitleDictionary, typographyTooltipDictionary, typographyVariationsDictionary, };