@maggioli-design-system/mds-modal 4.7.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-95c329c0.js → index-b3e2062a.js} +22 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +4 -4
- package/dist/cjs/mds-modal.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/file.js +48 -0
- package/dist/collection/common/icon.js +15 -0
- package/dist/collection/common/unit.js +15 -3
- package/dist/collection/common/yugop/core.js +16 -0
- package/dist/collection/common/yugop/index.js +3 -0
- package/dist/collection/common/yugop/random-text.js +59 -0
- package/dist/collection/common/yugop/utils/math.js +11 -0
- package/dist/collection/common/yugop/utils/noop.js +1 -0
- package/dist/collection/common/yugop/utils/prng.js +21 -0
- package/dist/collection/common/yugop/utils/string.js +2 -0
- package/dist/collection/components/mds-modal/mds-modal.css +151 -27
- package/dist/collection/components/mds-modal/mds-modal.js +1 -1
- package/dist/collection/components/mds-modal/test/mds-modal.e2e.js +1 -21
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +1 -1
- package/dist/collection/dictionary/file-extensions.js +64 -0
- package/dist/collection/dictionary/icon.js +6 -1
- package/dist/collection/dictionary/text.js +6 -0
- package/dist/collection/dictionary/variant.js +18 -1
- package/dist/collection/fixtures/filenames.js +57 -0
- package/dist/collection/type/file-types.js +1 -0
- package/dist/collection/type/text.js +1 -0
- package/dist/collection/type/variant-file-format.js +111 -0
- package/dist/components/mds-modal.js +3 -3
- package/dist/documentation.d.ts +1 -21
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-2bd481c0.js → index-fd30d325.js} +22 -14
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +4 -4
- package/dist/esm/mds-modal.js +3 -3
- package/dist/esm-es5/index-fd30d325.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/mds-modal.js +1 -1
- package/dist/mds-modal/p-14f0bf74.system.js +2 -0
- package/dist/mds-modal/p-444a6a47.system.entry.js +1 -0
- package/dist/mds-modal/{p-969424eb.system.js → p-5cf75b06.system.js} +1 -1
- package/dist/mds-modal/p-83ebb238.entry.js +1 -0
- package/dist/mds-modal/p-aff993b4.js +2 -0
- package/dist/stats.json +85 -40
- package/dist/types/common/file.d.ts +12 -0
- package/dist/types/common/icon.d.ts +5 -0
- package/dist/types/common/unit.d.ts +2 -1
- package/dist/types/common/yugop/core.d.ts +10 -0
- package/dist/types/common/yugop/index.d.ts +1 -0
- package/dist/types/common/yugop/random-text.d.ts +31 -0
- package/dist/types/common/yugop/utils/math.d.ts +3 -0
- package/dist/types/common/yugop/utils/noop.d.ts +1 -0
- package/dist/types/common/yugop/utils/prng.d.ts +8 -0
- package/dist/types/common/yugop/utils/string.d.ts +1 -0
- package/dist/types/dictionary/file-extensions.d.ts +11 -0
- package/dist/types/dictionary/icon.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +2 -0
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/fixtures/filenames.d.ts +2 -0
- package/dist/types/type/file-types.d.ts +1 -0
- package/dist/types/type/text.d.ts +1 -0
- package/dist/types/type/variant-file-format.d.ts +11 -0
- package/dist/types/type/variant.d.ts +1 -0
- package/documentation.json +58 -13
- package/package.json +5 -4
- package/readme.md +8 -0
- package/src/common/file.ts +63 -0
- package/src/common/icon.ts +25 -0
- package/src/common/unit.ts +21 -2
- package/src/common/yugop/core.ts +47 -0
- package/src/common/yugop/index.ts +4 -0
- package/src/common/yugop/random-text.ts +95 -0
- package/src/common/yugop/utils/math.ts +21 -0
- package/src/common/yugop/utils/noop.ts +1 -0
- package/src/common/yugop/utils/prng.ts +35 -0
- package/src/common/yugop/utils/string.ts +4 -0
- package/src/components/mds-modal/css/mds-modal-animate-left.css +4 -4
- package/src/components/mds-modal/css/mds-modal-animate-right.css +4 -4
- package/src/components/mds-modal/mds-modal.css +12 -7
- package/src/components/mds-modal/mds-modal.tsx +1 -1
- package/src/components/mds-modal/test/mds-modal.e2e.ts +1 -23
- package/src/components/mds-modal/test/mds-modal.stories.tsx +9 -9
- package/src/dictionary/file-extensions.ts +81 -0
- package/src/dictionary/icon.ts +6 -0
- package/src/dictionary/text.ts +9 -0
- package/src/dictionary/variant.ts +19 -0
- package/src/fixtures/filenames.ts +60 -0
- package/src/fixtures/icons.json +10 -0
- package/src/fixtures/iconsauce.json +3 -0
- package/src/type/file-types.ts +55 -0
- package/src/type/text.ts +4 -0
- package/src/type/variant-file-format.ts +128 -0
- package/src/type/variant.ts +17 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-14f0bf74.system.js +2 -0
- package/www/build/p-444a6a47.system.entry.js +1 -0
- package/www/build/{p-969424eb.system.js → p-5cf75b06.system.js} +1 -1
- package/www/build/p-83ebb238.entry.js +1 -0
- package/www/build/p-aff993b4.js +2 -0
- package/dist/esm-es5/index-2bd481c0.js +0 -1
- package/dist/mds-modal/p-0a4de21e.system.js +0 -2
- package/dist/mds-modal/p-2f9a631d.js +0 -2
- package/dist/mds-modal/p-68c3fe7d.system.entry.js +0 -1
- package/dist/mds-modal/p-fe6df5e2.entry.js +0 -1
- package/www/build/p-0a4de21e.system.js +0 -2
- package/www/build/p-2f9a631d.js +0 -2
- package/www/build/p-68c3fe7d.system.entry.js +0 -1
- package/www/build/p-fe6df5e2.entry.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@keyframes focus-bounce {
|
|
2
2
|
0%, 75%, 100% {
|
|
3
|
-
outline-offset: var(--magma-outline-focus-offset);
|
|
3
|
+
outline-offset: var(--magma-outline-focus-offset, 6px);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
50% {
|
|
7
|
-
outline-offset: var(--magma-outline-blur-offset);
|
|
7
|
+
outline-offset: var(--magma-outline-blur-offset, 2px);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/* included for focus effect */
|
|
@@ -28,18 +28,21 @@
|
|
|
28
28
|
.animate-right-outro {
|
|
29
29
|
transform: translateX(calc(100% + 50px));
|
|
30
30
|
}
|
|
31
|
+
.static {
|
|
32
|
+
position: static;
|
|
33
|
+
}
|
|
31
34
|
.fixed {
|
|
32
35
|
position: fixed;
|
|
33
36
|
}
|
|
34
37
|
.absolute {
|
|
35
38
|
position: absolute;
|
|
36
39
|
}
|
|
37
|
-
.ml-auto {
|
|
38
|
-
margin-left: auto;
|
|
39
|
-
}
|
|
40
40
|
.flex {
|
|
41
41
|
display: flex;
|
|
42
42
|
}
|
|
43
|
+
.w-1600 {
|
|
44
|
+
width: 4rem;
|
|
45
|
+
}
|
|
43
46
|
.min-w-0 {
|
|
44
47
|
min-width: 0rem;
|
|
45
48
|
}
|
|
@@ -49,35 +52,147 @@
|
|
|
49
52
|
.max-w-xl {
|
|
50
53
|
max-width: 36rem;
|
|
51
54
|
}
|
|
55
|
+
.flex-grow {
|
|
56
|
+
flex-grow: 1;
|
|
57
|
+
}
|
|
52
58
|
.items-center {
|
|
53
59
|
align-items: center;
|
|
54
60
|
}
|
|
61
|
+
.gap-400 {
|
|
62
|
+
gap: 1rem;
|
|
63
|
+
}
|
|
55
64
|
.truncate {
|
|
56
65
|
overflow: hidden;
|
|
57
66
|
text-overflow: ellipsis;
|
|
58
67
|
white-space: nowrap;
|
|
59
68
|
}
|
|
60
|
-
.rounded-full {
|
|
61
|
-
border-radius: 9999px;
|
|
62
|
-
}
|
|
63
69
|
.border {
|
|
64
70
|
border-width: 1px;
|
|
65
71
|
}
|
|
72
|
+
.border-0 {
|
|
73
|
+
border-width: 0rem;
|
|
74
|
+
}
|
|
66
75
|
.border-b {
|
|
67
76
|
border-bottom-width: 1px;
|
|
68
77
|
}
|
|
69
78
|
.border-t {
|
|
70
79
|
border-top-width: 1px;
|
|
71
80
|
}
|
|
81
|
+
.border-solid {
|
|
82
|
+
border-style: solid;
|
|
83
|
+
}
|
|
72
84
|
.border-tone-neutral-09 {
|
|
73
85
|
--tw-border-opacity: 1;
|
|
74
86
|
border-color: rgb(var(--tone-neutral-09) / var(--tw-border-opacity));
|
|
75
87
|
}
|
|
76
|
-
.bg-
|
|
77
|
-
|
|
88
|
+
.bg-label-amaranth-10 {
|
|
89
|
+
--tw-bg-opacity: 1;
|
|
90
|
+
background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
|
|
91
|
+
}
|
|
92
|
+
.bg-label-aqua-10 {
|
|
93
|
+
--tw-bg-opacity: 1;
|
|
94
|
+
background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
|
|
95
|
+
}
|
|
96
|
+
.bg-label-blue-10 {
|
|
97
|
+
--tw-bg-opacity: 1;
|
|
98
|
+
background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
|
|
99
|
+
}
|
|
100
|
+
.bg-label-green-10 {
|
|
101
|
+
--tw-bg-opacity: 1;
|
|
102
|
+
background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
|
|
103
|
+
}
|
|
104
|
+
.bg-label-lime-10 {
|
|
105
|
+
--tw-bg-opacity: 1;
|
|
106
|
+
background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
|
|
107
|
+
}
|
|
108
|
+
.bg-label-orange-10 {
|
|
109
|
+
--tw-bg-opacity: 1;
|
|
110
|
+
background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
|
|
111
|
+
}
|
|
112
|
+
.bg-label-orchid-10 {
|
|
113
|
+
--tw-bg-opacity: 1;
|
|
114
|
+
background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
|
|
115
|
+
}
|
|
116
|
+
.bg-label-violet-10 {
|
|
117
|
+
--tw-bg-opacity: 1;
|
|
118
|
+
background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
|
|
119
|
+
}
|
|
120
|
+
.bg-label-yellow-10 {
|
|
121
|
+
--tw-bg-opacity: 1;
|
|
122
|
+
background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
|
|
123
|
+
}
|
|
124
|
+
.bg-tone-neutral-10 {
|
|
125
|
+
--tw-bg-opacity: 1;
|
|
126
|
+
background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
|
|
127
|
+
}
|
|
128
|
+
.fill-label-amaranth-04 {
|
|
129
|
+
fill: rgb(var(--label-amaranth-04));
|
|
130
|
+
}
|
|
131
|
+
.fill-label-aqua-04 {
|
|
132
|
+
fill: rgb(var(--label-aqua-04));
|
|
133
|
+
}
|
|
134
|
+
.fill-label-blue-04 {
|
|
135
|
+
fill: rgb(var(--label-blue-04));
|
|
136
|
+
}
|
|
137
|
+
.fill-label-green-04 {
|
|
138
|
+
fill: rgb(var(--label-green-04));
|
|
139
|
+
}
|
|
140
|
+
.fill-label-lime-04 {
|
|
141
|
+
fill: rgb(var(--label-lime-04));
|
|
142
|
+
}
|
|
143
|
+
.fill-label-orange-04 {
|
|
144
|
+
fill: rgb(var(--label-orange-04));
|
|
145
|
+
}
|
|
146
|
+
.fill-label-orchid-04 {
|
|
147
|
+
fill: rgb(var(--label-orchid-04));
|
|
148
|
+
}
|
|
149
|
+
.fill-label-violet-04 {
|
|
150
|
+
fill: rgb(var(--label-violet-04));
|
|
151
|
+
}
|
|
152
|
+
.fill-label-yellow-04 {
|
|
153
|
+
fill: rgb(var(--label-yellow-04));
|
|
154
|
+
}
|
|
155
|
+
.fill-tone-neutral-04 {
|
|
156
|
+
fill: rgb(var(--tone-neutral-04));
|
|
157
|
+
}
|
|
158
|
+
.p-800 {
|
|
159
|
+
padding: 2rem;
|
|
160
|
+
}
|
|
161
|
+
.text-label-amaranth-04 {
|
|
162
|
+
--tw-text-opacity: 1;
|
|
163
|
+
color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
|
|
164
|
+
}
|
|
165
|
+
.text-label-aqua-04 {
|
|
166
|
+
--tw-text-opacity: 1;
|
|
167
|
+
color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
|
|
168
|
+
}
|
|
169
|
+
.text-label-blue-04 {
|
|
170
|
+
--tw-text-opacity: 1;
|
|
171
|
+
color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
|
|
78
172
|
}
|
|
79
|
-
.text {
|
|
80
|
-
|
|
173
|
+
.text-label-green-04 {
|
|
174
|
+
--tw-text-opacity: 1;
|
|
175
|
+
color: rgb(var(--label-green-04) / var(--tw-text-opacity));
|
|
176
|
+
}
|
|
177
|
+
.text-label-lime-04 {
|
|
178
|
+
--tw-text-opacity: 1;
|
|
179
|
+
color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
|
|
180
|
+
}
|
|
181
|
+
.text-label-orange-04 {
|
|
182
|
+
--tw-text-opacity: 1;
|
|
183
|
+
color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
|
|
184
|
+
}
|
|
185
|
+
.text-label-orchid-04 {
|
|
186
|
+
--tw-text-opacity: 1;
|
|
187
|
+
color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
|
|
188
|
+
}
|
|
189
|
+
.text-label-violet-04 {
|
|
190
|
+
--tw-text-opacity: 1;
|
|
191
|
+
color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
|
|
192
|
+
}
|
|
193
|
+
.text-label-yellow-04 {
|
|
194
|
+
--tw-text-opacity: 1;
|
|
195
|
+
color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
|
|
81
196
|
}
|
|
82
197
|
.text-tone-neutral-02 {
|
|
83
198
|
--tw-text-opacity: 1;
|
|
@@ -146,25 +261,28 @@
|
|
|
146
261
|
pointer-events: auto;
|
|
147
262
|
}
|
|
148
263
|
|
|
149
|
-
.close {
|
|
264
|
+
.button-close {
|
|
150
265
|
top: 0rem;
|
|
151
|
-
height: 2.25rem;
|
|
152
|
-
width: 2.25rem;
|
|
153
266
|
border-radius: 9999px;
|
|
154
|
-
font-size: 2.25rem;
|
|
155
|
-
line-height: 2.5rem;
|
|
156
267
|
opacity: 0;
|
|
157
268
|
transition-duration: 500ms;
|
|
158
269
|
transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
|
|
159
270
|
|
|
160
|
-
|
|
161
|
-
|
|
271
|
+
--mds-button-icon-color: rgb(var(--tone-neutral));
|
|
272
|
+
--mds-button-background: transparent;
|
|
273
|
+
|
|
274
|
+
height: auto;
|
|
162
275
|
position: absolute;
|
|
163
276
|
transform: translate(0, 24px) rotate(90deg);
|
|
164
277
|
transform-origin: center;
|
|
165
278
|
transition-property: opacity, outline, outline-offset, transform;
|
|
166
279
|
}
|
|
167
280
|
|
|
281
|
+
.button-close::part(icon) {
|
|
282
|
+
height: 2.25rem;
|
|
283
|
+
width: 2.25rem;
|
|
284
|
+
}
|
|
285
|
+
|
|
168
286
|
.window {
|
|
169
287
|
height: 100%;
|
|
170
288
|
gap: 0rem;
|
|
@@ -302,8 +420,8 @@
|
|
|
302
420
|
transform: translateX(0);
|
|
303
421
|
}
|
|
304
422
|
|
|
305
|
-
:host( .to-left-opened ) .close,
|
|
306
|
-
:host( .to-left-opened.to-left-outro ) .close {
|
|
423
|
+
:host( .to-left-opened ) .button-close,
|
|
424
|
+
:host( .to-left-opened.to-left-outro ) .button-close {
|
|
307
425
|
opacity: 1;
|
|
308
426
|
|
|
309
427
|
transform: translate(-24px, 24px) rotate(0);
|
|
@@ -314,11 +432,11 @@
|
|
|
314
432
|
transform: translateX(calc(-100% - 50px));
|
|
315
433
|
}
|
|
316
434
|
|
|
317
|
-
:host( .to-left-outro ) .close {
|
|
435
|
+
:host( .to-left-outro ) .button-close {
|
|
318
436
|
transform: translate(24px, 24px) rotate(-90deg);
|
|
319
437
|
}
|
|
320
438
|
|
|
321
|
-
:host( .to-left ) .close {
|
|
439
|
+
:host( .to-left ) .button-close {
|
|
322
440
|
right: 0rem;
|
|
323
441
|
|
|
324
442
|
transform: translate(36px, 24px) rotate(90deg);
|
|
@@ -351,8 +469,8 @@
|
|
|
351
469
|
transform: translateX(0);
|
|
352
470
|
}
|
|
353
471
|
|
|
354
|
-
:host( .to-right-opened ) .close,
|
|
355
|
-
:host( .to-right-opened.to-right-outro ) .close {
|
|
472
|
+
:host( .to-right-opened ) .button-close,
|
|
473
|
+
:host( .to-right-opened.to-right-outro ) .button-close {
|
|
356
474
|
opacity: 1;
|
|
357
475
|
|
|
358
476
|
transform: translate(24px, 24px) rotate(0);
|
|
@@ -363,11 +481,11 @@
|
|
|
363
481
|
transform: translateX(calc(100% + 50px));
|
|
364
482
|
}
|
|
365
483
|
|
|
366
|
-
:host( .to-right-outro ) .close {
|
|
484
|
+
:host( .to-right-outro ) .button-close {
|
|
367
485
|
transform: translate(-24px, 24px) rotate(90deg);
|
|
368
486
|
}
|
|
369
487
|
|
|
370
|
-
:host( .to-right ) .close {
|
|
488
|
+
:host( .to-right ) .button-close {
|
|
371
489
|
left: 0rem;
|
|
372
490
|
|
|
373
491
|
transform: translate(-36px, 24px) rotate(-90deg);
|
|
@@ -416,4 +534,10 @@
|
|
|
416
534
|
transform: rotateX(-22deg) scale(0.5) translateY(-40%);
|
|
417
535
|
}
|
|
418
536
|
|
|
537
|
+
@media (max-width: 767px) {
|
|
538
|
+
.mobile\:w-1200 {
|
|
539
|
+
width: 3rem;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
419
543
|
|
|
@@ -91,7 +91,7 @@ export class MdsModal {
|
|
|
91
91
|
? h("slot", { name: "window" })
|
|
92
92
|
: h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog", part: "window" }, this.top &&
|
|
93
93
|
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
94
|
-
h("slot", { name: "bottom" })), !this.window && h("
|
|
94
|
+
h("slot", { name: "bottom" })), !this.window && h("mds-button", { icon: miBaselineClose, onClick: (e) => { this.closeModal(e); }, class: "button-close" })));
|
|
95
95
|
}
|
|
96
96
|
static get is() { return "mds-modal"; }
|
|
97
97
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,32 +11,12 @@ describe('mds-modal', () => {
|
|
|
11
11
|
expect(element).toHaveAttribute('position');
|
|
12
12
|
expect(element.getAttribute('position')).toBe('right');
|
|
13
13
|
expect(element).not.toHaveAttribute('opened');
|
|
14
|
-
expect(element.shadowRoot).toEqualHtml(`
|
|
15
|
-
<div class="window" part="window" role="dialog">
|
|
16
|
-
<slot></slot>
|
|
17
|
-
</div>
|
|
18
|
-
<i class="close focus-bounce-light svg" tabindex="0">
|
|
19
|
-
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
|
20
|
-
<path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"></path>
|
|
21
|
-
</svg>
|
|
22
|
-
</i>
|
|
23
|
-
`);
|
|
24
14
|
});
|
|
25
15
|
it('renders opened', async () => {
|
|
26
16
|
const page = await newE2EPage();
|
|
27
17
|
await page.setContent('<mds-modal opened="true"></mds-modal>');
|
|
28
18
|
const element = await page.find('mds-modal');
|
|
29
|
-
expect(element.
|
|
30
|
-
expect(element.shadowRoot).toEqualHtml(`
|
|
31
|
-
<div class="window" part="window" role="dialog">
|
|
32
|
-
<slot></slot>
|
|
33
|
-
</div>
|
|
34
|
-
<i class="close focus-bounce-light svg" tabindex="0">
|
|
35
|
-
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
-
<path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"></path>
|
|
37
|
-
</svg>
|
|
38
|
-
</i>
|
|
39
|
-
`);
|
|
19
|
+
expect(element).toHaveAttribute('opened');
|
|
40
20
|
});
|
|
41
21
|
it('can be closed', async () => {
|
|
42
22
|
const page = await newE2EPage();
|
|
@@ -20,7 +20,7 @@ const firstName = 'Mario';
|
|
|
20
20
|
const lastName = 'Rossi';
|
|
21
21
|
const fullName = `${firstName} ${lastName}`;
|
|
22
22
|
const email = `${firstName.toLowerCase()}.${lastName.toLowerCase()}@nintendo.com`;
|
|
23
|
-
const Template = args => h("mds-modal", Object.assign({}, args), h("header", { slot: "top", class: "p-
|
|
23
|
+
const Template = args => h("mds-modal", Object.assign({}, args), h("header", { slot: "top", class: "p-800 max-w-lg flex gap-400 items-center border-b border-solid border-0 border-tone-neutral-09" }, h("mds-img", { class: "w-1600", src: "/logo-gruppo-maggioli-512w.webp" }), h("div", { class: "text-tone-neutral-02" }, h("mds-text", { typography: "h5", class: "truncate min-w-0" }, "Maggioli Editore"), h("mds-text", { typography: "detail", class: "truncate min-w-0" }, "Menu di servizio"))), h("div", { class: "p-800 max-w-lg" }, h("mds-text", null, "As a multi-brand design system, our components need to be flexible enough for any one of our brands to use them for multiple use cases. To achieve this, we ensure that all of the brands are involved in the specification stage, giving us more confidence that we\u2019re future-proofing our components as more brands adopt NewsKit.")), h("footer", { slot: "bottom", class: "p-800 max-w-lg flex gap-400 text-tone-neutral-02 border-t border-solid border-0 border-tone-neutral-09" }, h("mds-author", { class: "flex-grow" }, h("mds-avatar", { slot: "avatar", class: "w-1600 mobile:w-1200", src: "/avatar-01-200x200.jpeg" }), h("mds-text", { typography: "h6" }, fullName), h("mds-text", { typography: "caption", class: "text-tone-neutral-04" }, email)), h("mds-button", { icon: "mdi/dots-vertical", variant: "light" })));
|
|
24
24
|
const CustomTemplate = args => h("mds-modal", Object.assign({}, args), h("mds-banner", { slot: "window", class: "max-w-xl mx-6", deletable: true, headline: "Action required" }, h("mds-text", { typography: "detail" }, "As a multi-brand design system, our components need to be flexible enough for any one of our brands to use them for multiple use cases. To achieve this, we ensure that all of the brands are involved in the specification stage, giving us more confidence that we\u2019re future-proofing our components as more brands adopt NewsKit."), h("mds-button", { slot: "actions", variant: "primary", tone: "quiet" }, "Cancel"), h("mds-button", { slot: "actions", variant: "primary" }, "Confirm")));
|
|
25
25
|
const AriaTemplate = () => {
|
|
26
26
|
// Click not working with reader
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const fileExtensionsDictionary = {
|
|
2
|
+
'7z': { format: 'archive', description: 'Archivio compresso' },
|
|
3
|
+
ace: { format: 'archive', description: 'Archivio compresso' },
|
|
4
|
+
ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
5
|
+
dart: { format: 'code', description: 'Dart' },
|
|
6
|
+
db: { format: 'data', description: 'File di database' },
|
|
7
|
+
default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
8
|
+
dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
9
|
+
doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
10
|
+
docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
11
|
+
docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
12
|
+
eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
13
|
+
eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
14
|
+
exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
15
|
+
flac: { format: 'audio', description: 'Audio non compresso' },
|
|
16
|
+
gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
17
|
+
htm: { format: 'markup', description: 'Pagina web' },
|
|
18
|
+
heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
19
|
+
html: { format: 'markup', description: 'Pagina web' },
|
|
20
|
+
jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
21
|
+
jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
22
|
+
jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
23
|
+
js: { format: 'code', description: 'JavaScript' },
|
|
24
|
+
json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
25
|
+
jsx: { format: 'code', description: 'JavaScript' },
|
|
26
|
+
m2v: { format: 'video', description: 'Filmato SD' },
|
|
27
|
+
mp2: { format: 'audio', description: 'Audio compresso' },
|
|
28
|
+
mp3: { format: 'audio', description: 'Audio compresso' },
|
|
29
|
+
mp4: { format: 'video', description: 'Filmato HD' },
|
|
30
|
+
mp4v: { format: 'video', description: 'Filmato HD' },
|
|
31
|
+
mpeg: { format: 'video', description: 'Filmato SD' },
|
|
32
|
+
mpg4: { format: 'video', description: 'Filmato SD' },
|
|
33
|
+
mpg: { format: 'video', description: 'Filmato SD' },
|
|
34
|
+
mpga: { format: 'audio', description: 'Audio compresso' },
|
|
35
|
+
odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
36
|
+
ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
37
|
+
odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
38
|
+
pdf: { format: 'document', description: 'Documento Adobe' },
|
|
39
|
+
php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
40
|
+
png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
41
|
+
ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
42
|
+
rar: { format: 'archive', description: 'Archivio compresso' },
|
|
43
|
+
rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
44
|
+
sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
45
|
+
shtml: { format: 'markup', description: 'Pagina web' },
|
|
46
|
+
svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
47
|
+
tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
48
|
+
tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
49
|
+
ts: { format: 'code', description: 'TypeScript' },
|
|
50
|
+
tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
51
|
+
txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
52
|
+
wav: { format: 'audio', description: 'Audio non compresso' },
|
|
53
|
+
webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
54
|
+
xar: { format: 'archive', description: 'Archivio compresso' },
|
|
55
|
+
xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
56
|
+
xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
57
|
+
zip: { format: 'archive', description: 'Archivio compresso' },
|
|
58
|
+
};
|
|
59
|
+
const genericMimeToExt = new Map([
|
|
60
|
+
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
61
|
+
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
|
62
|
+
['video', ['.mv2', '.mp4', '.mp4v', '.mpeg', '.mpg4', '.mpg']],
|
|
63
|
+
]);
|
|
64
|
+
export { fileExtensionsDictionary, genericMimeToExt, };
|
|
@@ -2,4 +2,9 @@ import jsonIconsDictionary from "../fixtures/icons.json";
|
|
|
2
2
|
import jsonMggIconsDictionary from "../fixtures/iconsauce.json";
|
|
3
3
|
const iconsDictionary = jsonIconsDictionary;
|
|
4
4
|
const mggIconsDictionary = jsonMggIconsDictionary;
|
|
5
|
-
|
|
5
|
+
const svgIconsDictionary = [
|
|
6
|
+
`${location.origin}/svg/mi/baseline/email.svg`,
|
|
7
|
+
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Im0yMzMtODAgNjUtMjgxTDgwLTU1MGwyODgtMjUgMTEyLTI2NSAxMTIgMjY1IDI4OCAyNS0yMTggMTg5IDY1IDI4MS0yNDctMTQ5TDIzMy04MFoiLz48L3N2Zz4=',
|
|
8
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6s-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8s-3.58-8-8-8z"/></svg>',
|
|
9
|
+
];
|
|
10
|
+
export { iconsDictionary, mggIconsDictionary, svgIconsDictionary, };
|
|
@@ -35,6 +35,23 @@ const themeFullVariantDictionary = [
|
|
|
35
35
|
'warning',
|
|
36
36
|
'yellow',
|
|
37
37
|
];
|
|
38
|
+
const themeFullVariantAvatarDictionary = [
|
|
39
|
+
'amaranth',
|
|
40
|
+
'aqua',
|
|
41
|
+
'blue',
|
|
42
|
+
'error',
|
|
43
|
+
'green',
|
|
44
|
+
'info',
|
|
45
|
+
'lime',
|
|
46
|
+
'orange',
|
|
47
|
+
'orchid',
|
|
48
|
+
'primary',
|
|
49
|
+
'sky',
|
|
50
|
+
'success',
|
|
51
|
+
'violet',
|
|
52
|
+
'warning',
|
|
53
|
+
'yellow',
|
|
54
|
+
];
|
|
38
55
|
const themeLabelVariantDictionary = [
|
|
39
56
|
'amaranth',
|
|
40
57
|
'aqua',
|
|
@@ -70,4 +87,4 @@ const toneMinimalVariantDictionary = [
|
|
|
70
87
|
'strong',
|
|
71
88
|
'weak',
|
|
72
89
|
];
|
|
73
|
-
export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
|
|
90
|
+
export { themeFullVariantAvatarDictionary, themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const filesList = [
|
|
2
|
+
'alarm_circuit_plastic.eps',
|
|
3
|
+
'awesome_orchestration.png',
|
|
4
|
+
'b2c_tan_sports.svg',
|
|
5
|
+
'bedfordshire_iceland_identity.txt',
|
|
6
|
+
'books_monetize_arizona.htm',
|
|
7
|
+
'brand.shtml',
|
|
8
|
+
'brunei_logistical.eml',
|
|
9
|
+
'buckinghamshire_macao.jpg',
|
|
10
|
+
'calculating.json',
|
|
11
|
+
'complexity_deposit.mpg',
|
|
12
|
+
'compressing_black_colorado.ods',
|
|
13
|
+
'connect_local_visualize.pdf',
|
|
14
|
+
'copying.default',
|
|
15
|
+
'explicit.mp2',
|
|
16
|
+
'fish.php',
|
|
17
|
+
'flexibility_auto_money.html',
|
|
18
|
+
'foreground_overriding.ai',
|
|
19
|
+
'forge_face.ts',
|
|
20
|
+
'forges.doc',
|
|
21
|
+
'frozen_haptic.7z',
|
|
22
|
+
'gorgeous_manager_savings.ppt',
|
|
23
|
+
'graphic_frozen_bedfordshire.tar',
|
|
24
|
+
'hdd_navigate_panama.xlsx',
|
|
25
|
+
'https://i2.wp.com/clipart.info/images/ccovers/1495750818Apple-PNG-Clip-Art.png',
|
|
26
|
+
'impactful_alarm_handmade.mpeg',
|
|
27
|
+
'initiatives_group.gif',
|
|
28
|
+
'intelligent_radical.jpe',
|
|
29
|
+
'interface_bedfordshire_solid.m2v',
|
|
30
|
+
'iowa_installation.jpeg',
|
|
31
|
+
'liaison_panel_central.flac',
|
|
32
|
+
'matrix_black_hat.db',
|
|
33
|
+
'metrics_lempira_account.xls',
|
|
34
|
+
'monitor.js',
|
|
35
|
+
'nebraska.mp4',
|
|
36
|
+
'needs_based_solid.odp',
|
|
37
|
+
'officer_somalia.docm',
|
|
38
|
+
'open_source.webp',
|
|
39
|
+
'open_source_gorgeous.sass',
|
|
40
|
+
'optimization_radical.mp3',
|
|
41
|
+
'ports_copy_granite.mpga',
|
|
42
|
+
'pound.rtf',
|
|
43
|
+
'protocol_designer.dmg',
|
|
44
|
+
'reduced_regional_greenland.mp4v',
|
|
45
|
+
'revolutionize.mpg4',
|
|
46
|
+
'rss_systematic_avon.exe',
|
|
47
|
+
'salad_compressing.odt',
|
|
48
|
+
'sky_marketing.ace',
|
|
49
|
+
'synergistic.wav',
|
|
50
|
+
'this_is_an_extensionless_file',
|
|
51
|
+
'tuna_table_fall.zip',
|
|
52
|
+
'unbranded.rar',
|
|
53
|
+
'upgradable_gold.docx',
|
|
54
|
+
'wisconsin_bypassing_small.xar',
|
|
55
|
+
'wooden.jsx',
|
|
56
|
+
];
|
|
57
|
+
export { filesList, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import baselineFolderZip from "@icon/mi/baseline/folder-zip.svg";
|
|
2
|
+
import baselineAttachFile from "@icon/mi/baseline/attach-file.svg";
|
|
3
|
+
import baselineAudiotrack from "@icon/mi/baseline/audiotrack.svg";
|
|
4
|
+
import baselineTerminal from "@icon/mi/baseline/terminal.svg";
|
|
5
|
+
import baselineInsertDriveFile from "@icon/mi/baseline/insert-drive-file.svg";
|
|
6
|
+
import mdiHardDisk from "@icon/mdi/harddisk.svg";
|
|
7
|
+
const fileFormatsVariant = {
|
|
8
|
+
archive: {
|
|
9
|
+
color: 'fill-label-amaranth-04 text-label-amaranth-04',
|
|
10
|
+
icon: baselineFolderZip,
|
|
11
|
+
iconBackground: 'bg-label-amaranth-10',
|
|
12
|
+
variant: 'amaranth',
|
|
13
|
+
},
|
|
14
|
+
attachment: {
|
|
15
|
+
color: 'fill-tone-neutral-04 text-tone-neutral-04',
|
|
16
|
+
icon: baselineAttachFile,
|
|
17
|
+
iconBackground: 'bg-tone-neutral-10',
|
|
18
|
+
variant: 'dark',
|
|
19
|
+
},
|
|
20
|
+
audio: {
|
|
21
|
+
color: 'fill-label-violet-04 text-label-violet-04',
|
|
22
|
+
icon: baselineAudiotrack,
|
|
23
|
+
iconBackground: 'bg-label-violet-10',
|
|
24
|
+
variant: 'violet',
|
|
25
|
+
},
|
|
26
|
+
code: {
|
|
27
|
+
color: 'fill-label-yellow-04 text-label-yellow-04',
|
|
28
|
+
icon: baselineTerminal,
|
|
29
|
+
iconBackground: 'bg-label-yellow-10',
|
|
30
|
+
variant: 'yellow',
|
|
31
|
+
},
|
|
32
|
+
data: {
|
|
33
|
+
color: 'fill-label-yellow-04 text-label-yellow-04',
|
|
34
|
+
icon: mdiHardDisk,
|
|
35
|
+
iconBackground: 'bg-label-yellow-10',
|
|
36
|
+
variant: 'yellow',
|
|
37
|
+
},
|
|
38
|
+
document: {
|
|
39
|
+
color: 'fill-label-orange-04 text-label-orange-04',
|
|
40
|
+
icon: baselineInsertDriveFile,
|
|
41
|
+
iconBackground: 'bg-label-orange-10',
|
|
42
|
+
variant: 'orange',
|
|
43
|
+
},
|
|
44
|
+
email: {
|
|
45
|
+
color: 'fill-label-blue-04 text-label-blue-04',
|
|
46
|
+
icon: 'mi/baseline/email',
|
|
47
|
+
iconBackground: 'bg-label-blue-10',
|
|
48
|
+
variant: 'blue',
|
|
49
|
+
},
|
|
50
|
+
executable: {
|
|
51
|
+
color: 'fill-label-amaranth-04 text-label-amaranth-04',
|
|
52
|
+
icon: 'mi/baseline/wysiwyg',
|
|
53
|
+
iconBackground: 'bg-label-amaranth-10',
|
|
54
|
+
variant: 'amaranth',
|
|
55
|
+
},
|
|
56
|
+
image: {
|
|
57
|
+
color: 'fill-label-green-04 text-label-green-04',
|
|
58
|
+
icon: 'mi/baseline/panorama',
|
|
59
|
+
iconBackground: 'bg-label-green-10',
|
|
60
|
+
variant: 'green',
|
|
61
|
+
},
|
|
62
|
+
imageRaster: {
|
|
63
|
+
color: 'fill-label-green-04 text-label-green-04',
|
|
64
|
+
icon: 'mi/baseline/panorama',
|
|
65
|
+
iconBackground: 'bg-label-green-10',
|
|
66
|
+
variant: 'green',
|
|
67
|
+
},
|
|
68
|
+
markup: {
|
|
69
|
+
color: 'fill-label-yellow-04 text-label-yellow-04',
|
|
70
|
+
icon: 'mi/baseline/web',
|
|
71
|
+
iconBackground: 'bg-label-yellow-10',
|
|
72
|
+
variant: 'yellow',
|
|
73
|
+
},
|
|
74
|
+
slide: {
|
|
75
|
+
color: 'fill-label-orchid-04 text-label-orchid-04',
|
|
76
|
+
icon: 'mi/baseline/tv',
|
|
77
|
+
iconBackground: 'bg-label-orchid-10',
|
|
78
|
+
variant: 'orchid',
|
|
79
|
+
},
|
|
80
|
+
spreadsheet: {
|
|
81
|
+
color: 'fill-label-lime-04 text-label-lime-04',
|
|
82
|
+
icon: 'mi/baseline/border-all',
|
|
83
|
+
iconBackground: 'bg-label-lime-10',
|
|
84
|
+
variant: 'lime',
|
|
85
|
+
},
|
|
86
|
+
text: {
|
|
87
|
+
color: 'fill-label-blue-04 text-label-blue-04',
|
|
88
|
+
icon: 'mi/baseline/description',
|
|
89
|
+
iconBackground: 'bg-label-blue-10',
|
|
90
|
+
variant: 'blue',
|
|
91
|
+
},
|
|
92
|
+
vectorImage: {
|
|
93
|
+
color: 'fill-label-aqua-04 text-label-aqua-04',
|
|
94
|
+
icon: 'mdi/vector-curve',
|
|
95
|
+
iconBackground: 'bg-label-aqua-10',
|
|
96
|
+
variant: 'aqua',
|
|
97
|
+
},
|
|
98
|
+
vector: {
|
|
99
|
+
color: 'fill-label-aqua-04 text-label-aqua-04',
|
|
100
|
+
icon: 'mdi/vector-curve',
|
|
101
|
+
iconBackground: 'bg-label-aqua-10',
|
|
102
|
+
variant: 'aqua',
|
|
103
|
+
},
|
|
104
|
+
video: {
|
|
105
|
+
color: 'fill-label-violet-04 text-label-violet-04',
|
|
106
|
+
icon: 'mi/baseline/videocam',
|
|
107
|
+
iconBackground: 'bg-label-violet-10',
|
|
108
|
+
variant: 'violet',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
export { fileFormatsVariant, };
|