@maggioli-design-system/mds-modal 4.1.0 → 4.3.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 (65) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mds-modal.cjs.entry.js +22 -24
  3. package/dist/cjs/mds-modal.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -1
  5. package/dist/collection/common/aria.js +4 -2
  6. package/dist/collection/common/keyboard-manager.js +1 -1
  7. package/dist/collection/common/unit.js +10 -0
  8. package/dist/collection/components/mds-modal/mds-modal.css +95 -97
  9. package/dist/collection/components/mds-modal/mds-modal.js +25 -26
  10. package/dist/collection/dictionary/button.js +5 -1
  11. package/dist/collection/dictionary/variant.js +9 -1
  12. package/dist/components/mds-modal.js +22 -24
  13. package/dist/documentation.d.ts +148 -0
  14. package/dist/documentation.json +142 -0
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/mds-modal.entry.js +22 -24
  17. package/dist/esm/mds-modal.js +1 -1
  18. package/dist/esm-es5/mds-modal.entry.js +1 -1
  19. package/dist/mds-modal/mds-modal.esm.js +1 -1
  20. package/dist/mds-modal/mds-modal.js +1 -1
  21. package/dist/mds-modal/p-24b3f7bd.entry.js +1 -0
  22. package/dist/mds-modal/p-b2f313ba.system.entry.js +1 -0
  23. package/{www/build/p-f856db3e.system.js → dist/mds-modal/p-e2fdb863.system.js} +1 -1
  24. package/dist/stats.json +33 -26
  25. package/dist/types/common/unit.d.ts +2 -0
  26. package/dist/types/components.d.ts +1 -1
  27. package/dist/types/dictionary/button.d.ts +2 -1
  28. package/dist/types/dictionary/variant.d.ts +2 -1
  29. package/dist/types/interface/input-value.d.ts +1 -1
  30. package/dist/types/type/button.d.ts +1 -0
  31. package/dist/types/type/variant.d.ts +1 -0
  32. package/documentation.json +149 -0
  33. package/package.json +10 -4
  34. package/readme.md +4 -4
  35. package/src/common/aria.ts +2 -2
  36. package/src/common/keyboard-manager.ts +1 -1
  37. package/src/common/unit.ts +14 -0
  38. package/src/components/mds-modal/css/components.css +49 -0
  39. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +12 -12
  40. package/src/components/mds-modal/css/mds-modal-animate-center.css +12 -12
  41. package/src/components/mds-modal/css/mds-modal-animate-left.css +16 -16
  42. package/src/components/mds-modal/css/mds-modal-animate-right.css +16 -16
  43. package/src/components/mds-modal/css/mds-modal-animate-top.css +12 -12
  44. package/src/components/mds-modal/mds-modal.css +14 -67
  45. package/src/components/mds-modal/mds-modal.tsx +16 -21
  46. package/src/components/mds-modal/readme.md +11 -4
  47. package/src/components/mds-modal/test/mds-modal.e2e.ts +3 -3
  48. package/src/components.d.ts +1 -1
  49. package/src/dictionary/button.ts +7 -1
  50. package/src/dictionary/variant.ts +10 -0
  51. package/src/fixtures/icons.json +38 -0
  52. package/src/fixtures/iconsauce.json +37 -0
  53. package/src/interface/input-value.ts +1 -1
  54. package/src/type/button.ts +4 -0
  55. package/src/type/variant.ts +9 -0
  56. package/www/build/mds-modal.esm.js +1 -1
  57. package/www/build/mds-modal.js +1 -1
  58. package/www/build/p-24b3f7bd.entry.js +1 -0
  59. package/www/build/p-b2f313ba.system.entry.js +1 -0
  60. package/{dist/mds-modal/p-f856db3e.system.js → www/build/p-e2fdb863.system.js} +1 -1
  61. package/dist/mds-modal/p-1e2f03d3.system.entry.js +0 -1
  62. package/dist/mds-modal/p-536e9f30.entry.js +0 -1
  63. package/src/components/mds-modal/test/mds-modal.spec.tsx +0 -19
  64. package/www/build/p-1e2f03d3.system.entry.js +0 -1
  65. package/www/build/p-536e9f30.entry.js +0 -1
@@ -1,4 +1,7 @@
1
+ /* stylelint-disable */
1
2
  @tailwind components;
3
+ @tailwind utilities;
4
+
2
5
 
3
6
  .focus-off,
4
7
  .focusable,
@@ -14,23 +17,29 @@
14
17
  transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
15
18
  }
16
19
 
20
+
17
21
  .focus-on,
18
22
  .focusable-light:focus-visible,
19
23
  .focusable:focus-visible {
24
+
20
25
  --magma-outline-blur-offset: var(--magma-outline-focus-offset);
21
26
  --magma-outline-blur: var(--magma-outline-focus);
22
27
  }
23
28
 
29
+
24
30
  .focus-light-on,
25
31
  .focusable-light:focus-visible {
32
+
26
33
  --magma-outline-blur: 2px solid rgb(var(--tone-neutral));
27
34
  }
28
35
 
36
+
29
37
  .svg{
30
38
 
31
39
  display: flex;
32
40
  }
33
41
 
42
+
34
43
  .svg svg{
35
44
 
36
45
  aspect-ratio: 1 / 1;
@@ -40,19 +49,6 @@
40
49
  width: 100%;
41
50
  }
42
51
 
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
52
 
57
53
  .animate-right-intro,
58
54
  .animate-right-outro {
@@ -138,14 +134,14 @@
138
134
 
139
135
  background-color: transparent;
140
136
  }
141
- .p-8{
142
-
143
- padding: 2rem;
144
- }
145
137
  .p-4{
146
138
 
147
139
  padding: 1rem;
148
140
  }
141
+ .p-8{
142
+
143
+ padding: 2rem;
144
+ }
149
145
  .text-tone-neutral-02{
150
146
 
151
147
  --tw-text-opacity: 1;
@@ -186,10 +182,7 @@
186
182
  --mds-modal-z-index: var(--magma-modal-z-index);
187
183
  pointer-events: none;
188
184
  position: fixed;
189
- top: 0px;
190
- right: 0px;
191
- bottom: 0px;
192
- left: 0px;
185
+ inset: 0px;
193
186
  display: flex;
194
187
  align-items: center;
195
188
  justify-content: center;
@@ -197,29 +190,30 @@
197
190
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
198
191
 
199
192
  background-color: rgba(var(--mds-modal-overlay-color) / 0);
193
+ fill: rgb(var(--tone-neutral));
200
194
  perspective: 600px;
201
- z-index: var(--z-index, 1000);
195
+ z-index: var(--mds-modal-z-index, 1000);
202
196
  }
203
197
 
204
- :host ( [position=top] ){
198
+ :host( [position=top] ){
205
199
 
206
200
  align-items: flex-start;
207
201
 
208
202
  justify-content: center;
209
203
  }
210
204
 
211
- :host ( [position=bottom] ){
205
+ :host( [position=bottom] ){
212
206
 
213
207
  align-items: flex-end;
214
208
 
215
209
  justify-content: center;
216
210
  }
217
211
 
218
- :host ( .animate-bottom-opened ),
219
- :host ( .animate-center-opened ),
220
- :host ( .animate-left-opened ),
221
- :host ( .animate-right-opened ),
222
- :host ( .animate-top-opened ){
212
+ :host( .to-bottom-opened ),
213
+ :host( .to-center-opened ),
214
+ :host( .to-left-opened ),
215
+ :host( .to-right-opened ),
216
+ :host( .to-top-opened ){
223
217
 
224
218
  pointer-events: auto;
225
219
 
@@ -244,8 +238,6 @@
244
238
 
245
239
  border-radius: 9999px;
246
240
 
247
- fill: rgb(var(--tone-neutral-10));
248
-
249
241
  font-size: 2.25rem;
250
242
 
251
243
  line-height: 2.5rem;
@@ -256,6 +248,7 @@
256
248
 
257
249
  transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
258
250
 
251
+ fill: inherit;
259
252
  transform: translate(0, 24px) rotate(90deg);
260
253
  transition-property: opacity, outline, outline-offset, transform;
261
254
  }
@@ -287,7 +280,7 @@
287
280
  grid-template-rows: auto 1fr auto;
288
281
  }
289
282
 
290
- :host ( .animate-bottom ){
283
+ :host( .to-bottom ){
291
284
 
292
285
  justify-content: center;
293
286
 
@@ -296,14 +289,15 @@
296
289
 
297
290
  @media (max-width: 767px){
298
291
 
299
- :host ( .animate-bottom ){
292
+
293
+ :host( .to-bottom ){
300
294
 
301
295
  padding: 1rem;
302
296
  }
303
297
  }
304
298
 
305
- :host ( .animate-bottom ) .window,
306
- :host ( .animate-bottom ) > ::slotted ( [slot=window] ){
299
+ :host( .to-bottom ) .window,
300
+ :host( .to-bottom ) > ::slotted( [slot="window"] ){
307
301
 
308
302
  opacity: 0;
309
303
 
@@ -316,27 +310,27 @@
316
310
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
317
311
  }
318
312
 
319
- :host ( .animate-bottom-intro ) .window,
320
- :host ( .animate-bottom-intro ) > ::slotted ( [slot=window] ) {
313
+ :host( .to-bottom-intro ) .window,
314
+ :host( .to-bottom-intro ) > ::slotted( [slot="window"] ) {
321
315
  transform: rotateX(-22deg) scale(0.5) translateY(40%);
322
316
  }
323
317
 
324
- :host ( .animate-bottom-opened.animate-bottom-outro ) .window,
325
- :host ( .animate-bottom-opened.animate-bottom-outro ) > ::slotted ( [slot=window] ),
326
- :host ( .animate-bottom-opened ) .window,
327
- :host ( .animate-bottom-opened ) > ::slotted ( [slot=window] ){
318
+ :host( .to-bottom-opened.to-bottom-outro ) .window,
319
+ :host( .to-bottom-opened.to-bottom-outro ) > ::slotted( [slot="window"] ),
320
+ :host( .to-bottom-opened ) .window,
321
+ :host( .to-bottom-opened ) > ::slotted( [slot="window"] ){
328
322
 
329
323
  opacity: 1;
330
324
 
331
325
  transform: rotateX(0) scale(1) translateY(0);
332
326
  }
333
327
 
334
- :host ( .animate-bottom-outro ) .window,
335
- :host ( .animate-bottom-outro ) > ::slotted ( [slot=window] ) {
328
+ :host( .to-bottom-outro ) .window,
329
+ :host( .to-bottom-outro ) > ::slotted( [slot="window"] ) {
336
330
  transform: rotateX(-22deg) scale(0.5) translateY(-40%);
337
331
  }
338
332
 
339
- :host ( .animate-center ){
333
+ :host( .to-center ){
340
334
 
341
335
  justify-content: center;
342
336
 
@@ -345,14 +339,15 @@
345
339
 
346
340
  @media (max-width: 767px){
347
341
 
348
- :host ( .animate-center ){
342
+
343
+ :host( .to-center ){
349
344
 
350
345
  padding: 1rem;
351
346
  }
352
347
  }
353
348
 
354
- :host ( .animate-center ) .window,
355
- :host ( .animate-center ) > ::slotted ( [slot=window] ){
349
+ :host( .to-center ) .window,
350
+ :host( .to-center ) > ::slotted( [slot="window"] ){
356
351
 
357
352
  opacity: 0;
358
353
 
@@ -365,33 +360,33 @@
365
360
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
366
361
  }
367
362
 
368
- :host ( .animate-center-intro ) .window,
369
- :host ( .animate-center-intro ) > ::slotted ( [slot=window] ) {
363
+ :host( .to-center-intro ) .window,
364
+ :host( .to-center-intro ) > ::slotted( [slot="window"] ) {
370
365
  transform: rotateX(-22deg) scale(0.5) translateY(40%);
371
366
  }
372
367
 
373
- :host ( .animate-center-opened.animate-center-outro ) .window,
374
- :host ( .animate-center-opened.animate-center-outro ) > ::slotted ( [slot=window] ),
375
- :host ( .animate-center-opened ) .window,
376
- :host ( .animate-center-opened ) > ::slotted ( [slot=window] ){
368
+ :host( .to-center-opened.to-center-outro ) .window,
369
+ :host( .to-center-opened.to-center-outro ) > ::slotted( [slot="window"] ),
370
+ :host( .to-center-opened ) .window,
371
+ :host( .to-center-opened ) > ::slotted( [slot="window"] ){
377
372
 
378
373
  opacity: 1;
379
374
 
380
375
  transform: rotateX(0) scale(1) translateY(0);
381
376
  }
382
377
 
383
- :host ( .animate-center-outro ) .window,
384
- :host ( .animate-center-outro ) > ::slotted ( [slot=window] ) {
378
+ :host( .to-center-outro ) .window,
379
+ :host( .to-center-outro ) > ::slotted( [slot="window"] ) {
385
380
  transform: rotateX(-22deg) scale(0.5) translateY(-40%);
386
381
  }
387
382
 
388
- :host ( .animate-left ){
383
+ :host( .to-left ){
389
384
 
390
385
  justify-content: flex-start;
391
386
  }
392
387
 
393
- :host ( .animate-left ) .window,
394
- :host ( .animate-left ) > ::slotted ( [slot=window] ){
388
+ :host( .to-left ) .window,
389
+ :host( .to-left ) > ::slotted( [slot="window"] ){
395
390
 
396
391
  opacity: 0;
397
392
 
@@ -404,52 +399,52 @@
404
399
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
405
400
  }
406
401
 
407
- :host ( .animate-left-intro ) .window,
408
- :host ( .animate-left-intro ) > ::slotted ( [slot=window] ) {
402
+ :host( .to-left-intro ) .window,
403
+ :host( .to-left-intro ) > ::slotted( [slot="window"] ) {
409
404
  transform: translateX(calc(-100% - 50px));
410
405
  }
411
406
 
412
- :host ( .animate-left-opened.animate-left-outro ) .window,
413
- :host ( .animate-left-opened.animate-left-outro ) > ::slotted ( [slot=window] ),
414
- :host ( .animate-left-opened ) .window,
415
- :host ( .animate-left-opened ) > ::slotted ( [slot=window] ){
407
+ :host( .to-left-opened.to-left-outro ) .window,
408
+ :host( .to-left-opened.to-left-outro ) > ::slotted( [slot="window"] ),
409
+ :host( .to-left-opened ) .window,
410
+ :host( .to-left-opened ) > ::slotted( [slot="window"] ){
416
411
 
417
412
  opacity: 1;
418
413
 
419
414
  transform: translateX(0);
420
415
  }
421
416
 
422
- :host ( .animate-left-opened ) .close,
423
- :host ( .animate-left-opened.animate-left-outro ) .close{
417
+ :host( .to-left-opened ) .close,
418
+ :host( .to-left-opened.to-left-outro ) .close{
424
419
 
425
420
  opacity: 1;
426
421
 
427
422
  transform: translate(-24px, 24px) rotate(0);
428
423
  }
429
424
 
430
- :host ( .animate-left-outro ) .window,
431
- :host ( .animate-left-outro ) > ::slotted ( [slot=window] ) {
425
+ :host( .to-left-outro ) .window,
426
+ :host( .to-left-outro ) > ::slotted( [slot="window"] ) {
432
427
  transform: translateX(calc(-100% - 50px));
433
428
  }
434
429
 
435
- :host ( .animate-left-outro ) .close {
430
+ :host( .to-left-outro ) .close {
436
431
  transform: translate(24px, 24px) rotate(-90deg);
437
432
  }
438
433
 
439
- :host ( .animate-left ) .close{
434
+ :host( .to-left ) .close{
440
435
 
441
436
  right: 0px;
442
437
 
443
438
  transform: translate(36px, 24px) rotate(90deg);
444
439
  }
445
440
 
446
- :host ( .animate-right ){
441
+ :host( .to-right ){
447
442
 
448
443
  justify-content: flex-end;
449
444
  }
450
445
 
451
- :host ( .animate-right ) .window,
452
- :host ( .animate-right ) > ::slotted ( [slot=window] ){
446
+ :host( .to-right ) .window,
447
+ :host( .to-right ) > ::slotted([slot="window"]){
453
448
 
454
449
  opacity: 0;
455
450
 
@@ -462,46 +457,46 @@
462
457
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
463
458
  }
464
459
 
465
- :host ( .animate-right-intro ) .window,
466
- :host ( .animate-right-intro ) > ::slotted ( [slot=window] ) {
460
+ :host( .to-right-intro ) .window,
461
+ :host( .to-right-intro ) > ::slotted( [slot="window"] ) {
467
462
  transform: translateX(calc(100% + 50px));
468
463
  }
469
464
 
470
- :host ( .animate-right-opened.animate-right-outro ) .window,
471
- :host ( .animate-right-opened.animate-right-outro ) > ::slotted ( [slot=window] ),
472
- :host ( .animate-right-opened ) .window,
473
- :host ( .animate-right-opened ) > ::slotted ( [slot=window] ){
465
+ :host( .to-right-opened.to-right-outro ) .window,
466
+ :host( .to-right-opened.to-right-outro ) > ::slotted( [slot="window"] ),
467
+ :host( .to-right-opened ) .window,
468
+ :host( .to-right-opened ) > ::slotted( [slot="window"] ){
474
469
 
475
470
  opacity: 1;
476
471
 
477
472
  transform: translateX(0);
478
473
  }
479
474
 
480
- :host ( .animate-right-opened ) .close,
481
- :host ( .animate-right-opened.animate-right-outro ) .close{
475
+ :host( .to-right-opened ) .close,
476
+ :host( .to-right-opened.to-right-outro ) .close{
482
477
 
483
478
  opacity: 1;
484
479
 
485
480
  transform: translate(24px, 24px) rotate(0);
486
481
  }
487
482
 
488
- :host ( .animate-right-outro ) .window,
489
- :host ( .animate-right-outro ) > ::slotted ( [slot=window] ) {
483
+ :host( .to-right-outro ) .window,
484
+ :host( .to-right-outro ) > ::slotted( [slot="window"] ) {
490
485
  transform: translateX(calc(100% + 50px));
491
486
  }
492
487
 
493
- :host ( .animate-right-outro ) .close {
488
+ :host( .to-right-outro ) .close {
494
489
  transform: translate(-24px, 24px) rotate(90deg);
495
490
  }
496
491
 
497
- :host ( .animate-right ) .close{
492
+ :host( .to-right ) .close{
498
493
 
499
494
  left: 0px;
500
495
 
501
496
  transform: translate(-36px, 24px) rotate(-90deg);
502
497
  }
503
498
 
504
- :host ( .animate-top ){
499
+ :host( .to-top ){
505
500
 
506
501
  justify-content: center;
507
502
 
@@ -510,14 +505,15 @@
510
505
 
511
506
  @media (max-width: 767px){
512
507
 
513
- :host ( .animate-top ){
508
+
509
+ :host( .to-top ){
514
510
 
515
511
  padding: 1rem;
516
512
  }
517
513
  }
518
514
 
519
- :host ( .animate-top ) .window,
520
- :host ( .animate-top ) > ::slotted ( [slot=window] ){
515
+ :host( .to-top ) .window,
516
+ :host( .to-top ) > ::slotted( [slot="window"] ){
521
517
 
522
518
  opacity: 0;
523
519
 
@@ -530,31 +526,33 @@
530
526
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
531
527
  }
532
528
 
533
- :host ( .animate-top-intro ) .window,
534
- :host ( .animate-top-intro ) > ::slotted ( [slot=window] ) {
529
+ :host( .to-top-intro ) .window,
530
+ :host( .to-top-intro ) > ::slotted( [slot="window"] ) {
535
531
  transform: rotateX(-22deg) scale(0.5) translateY(40%);
536
532
  }
537
533
 
538
- :host ( .animate-top-opened.animate-top-outro ) .window,
539
- :host ( .animate-top-opened.animate-top-outro ) > ::slotted ( [slot=window] ),
540
- :host ( .animate-top-opened ) .window,
541
- :host ( .animate-top-opened ) > ::slotted ( [slot=window] ){
534
+ :host( .to-top-opened.to-top-outro ) .window,
535
+ :host( .to-top-opened.to-top-outro ) > ::slotted( [slot="window"] ),
536
+ :host( .to-top-opened ) .window,
537
+ :host( .to-top-opened ) > ::slotted( [slot="window"] ){
542
538
 
543
539
  opacity: 1;
544
540
 
545
541
  transform: rotateX(0) scale(1) translateY(0);
546
542
  }
547
543
 
548
- :host ( .animate-top-outro ) .window,
549
- :host ( .animate-top-outro ) > ::slotted ( [slot=window] ) {
544
+ :host( .to-top-outro ) .window,
545
+ :host( .to-top-outro ) > ::slotted( [slot="window"] ) {
550
546
  transform: rotateX(-22deg) scale(0.5) translateY(-40%);
551
547
  }
552
548
 
553
549
  @media (max-width: 767px){
554
550
 
551
+
555
552
  .mobile\:w-12{
556
553
 
557
554
  width: 3rem;
558
555
  }
559
556
  }
560
557
 
558
+
@@ -4,21 +4,24 @@ import { Host, h } from '@stencil/core';
4
4
  import { KeyboardManager } from '@common/keyboard-manager';
5
5
  export class MdsModal {
6
6
  constructor() {
7
- this.window = null;
8
- this.top = null;
9
- this.bottom = null;
7
+ this.window = false;
8
+ this.top = false;
9
+ this.bottom = false;
10
10
  this.animationState = 'intro';
11
11
  this.km = new KeyboardManager();
12
12
  this.componentDidLoad = () => {
13
+ var _a;
13
14
  this.km.addElement(this.host, 'host');
14
- this.km.addElement(this.host.shadowRoot.querySelector('.close'), 'close');
15
+ const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
16
+ if (close)
17
+ this.km.addElement(close, 'close');
15
18
  this.km.attachEscapeBehavior(() => this.closeEvent.emit());
16
19
  this.km.attachClickBehavior('close');
17
20
  };
18
- this.animationName = (customState = null, customPosition = null) => {
19
- return `animate-${customPosition !== null ? customPosition : this.position}${customState !== null ? '-' + customState : ''}`;
21
+ this.animationName = (customState = '', customPosition = '') => {
22
+ return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
20
23
  };
21
- this.closeModal = (e = null) => {
24
+ this.closeModal = (e) => {
22
25
  var _a;
23
26
  if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
24
27
  return;
@@ -29,23 +32,20 @@ export class MdsModal {
29
32
  }
30
33
  };
31
34
  this.stateOpened = undefined;
32
- this.opened = undefined;
33
- this.position = null;
35
+ this.opened = false;
36
+ this.position = 'center';
34
37
  }
35
38
  componentWillLoad() {
39
+ var _a;
36
40
  this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
37
41
  this.top = this.host.querySelector('[slot="top"]') !== null;
38
42
  this.window = this.host.querySelector('[slot="window"]') !== null;
39
43
  this.stateOpened = this.opened;
40
- if (this.window && this.position === null) {
41
- this.position = 'center';
42
- }
43
- if (this.position === null) {
44
+ if (!this.window) {
44
45
  this.position = 'right';
45
46
  }
46
47
  if (this.window) {
47
- const modal = this.host.querySelector('[slot="window"]');
48
- modal.setAttribute('role', 'modal');
48
+ (_a = this.host.querySelector('[slot="window"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'modal');
49
49
  }
50
50
  }
51
51
  componentWillRender() {
@@ -66,7 +66,7 @@ export class MdsModal {
66
66
  }
67
67
  positionChange(_newValue, oldValue) {
68
68
  window.clearTimeout(this.animationDeelay);
69
- this.host.classList.remove(this.animationName(null, oldValue));
69
+ this.host.classList.remove(this.animationName('', oldValue));
70
70
  this.host.classList.remove(this.animationName('intro', oldValue));
71
71
  this.host.classList.remove(this.animationName('outro', oldValue));
72
72
  }
@@ -82,12 +82,10 @@ export class MdsModal {
82
82
  }
83
83
  render() {
84
84
  return (h(Host, { "aria-modal": clsx(this.opened ? 'true' : 'false'), class: clsx(this.stateOpened && this.animationName('opened')), onClick: (e) => { this.closeModal(e); } }, this.window
85
- ?
86
- h("slot", { name: "window" })
87
- :
88
- h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog" }, this.top &&
89
- h("slot", { name: "top" }), h("slot", null), this.bottom &&
90
- h("slot", { name: "bottom" })), !this.window && h("i", { innerHTML: miBaselineClose, tabindex: "0", onClick: (e) => { this.closeModal(e); }, class: "svg close focusable-light" })));
85
+ ? h("slot", { name: "window" })
86
+ : h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog", part: "window" }, this.top &&
87
+ h("slot", { name: "top" }), h("slot", null), this.bottom &&
88
+ h("slot", { name: "bottom" })), !this.window && h("i", { innerHTML: miBaselineClose, tabindex: "0", onClick: (e) => { this.closeModal(e); }, class: "svg close focusable-light" })));
91
89
  }
92
90
  static get is() { return "mds-modal"; }
93
91
  static get encapsulation() { return "shadow"; }
@@ -112,20 +110,21 @@ export class MdsModal {
112
110
  "references": {}
113
111
  },
114
112
  "required": false,
115
- "optional": true,
113
+ "optional": false,
116
114
  "docs": {
117
115
  "tags": [],
118
116
  "text": "Specifies if the modal is opened or not"
119
117
  },
120
118
  "attribute": "opened",
121
- "reflect": true
119
+ "reflect": true,
120
+ "defaultValue": "false"
122
121
  },
123
122
  "position": {
124
123
  "type": "string",
125
124
  "mutable": true,
126
125
  "complexType": {
127
126
  "original": "ModalPositionType",
128
- "resolved": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\"",
127
+ "resolved": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\" | undefined",
129
128
  "references": {
130
129
  "ModalPositionType": {
131
130
  "location": "import",
@@ -141,7 +140,7 @@ export class MdsModal {
141
140
  },
142
141
  "attribute": "position",
143
142
  "reflect": true,
144
- "defaultValue": "null"
143
+ "defaultValue": "'center'"
145
144
  }
146
145
  };
147
146
  }
@@ -13,6 +13,10 @@ const buttonToneVariantDictionary = [
13
13
  'ghost',
14
14
  'quiet',
15
15
  ];
16
+ const buttonTargetDictionary = [
17
+ 'blank',
18
+ 'self',
19
+ ];
16
20
  const buttonSizeDictionary = [
17
21
  'sm',
18
22
  'md',
@@ -23,4 +27,4 @@ const buttonIconPositionDictionary = [
23
27
  'left',
24
28
  'right',
25
29
  ];
26
- export { buttonSizeDictionary, buttonToneVariantDictionary, buttonVariantDictionary, buttonIconPositionDictionary, };
30
+ export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonVariantDictionary, };
@@ -53,6 +53,14 @@ const toneVariantDictionary = [
53
53
  'ghost',
54
54
  'quiet',
55
55
  ];
56
+ const toneActionVariantDictionary = [
57
+ 'primary',
58
+ 'secondary',
59
+ 'tertiary',
60
+ 'strong',
61
+ 'weak',
62
+ 'quiet',
63
+ ];
56
64
  const toneSimpleVariantDictionary = [
57
65
  'strong',
58
66
  'weak',
@@ -62,4 +70,4 @@ const toneMinimalVariantDictionary = [
62
70
  'strong',
63
71
  'weak',
64
72
  ];
65
- export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
73
+ export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };