@maggioli-design-system/mds-modal 1.0.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-ced1b9b6.js +1236 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/mds-modal.cjs.entry.js +124 -0
- package/dist/cjs/mds-modal.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/mds-modal/mds-modal.css +215 -0
- package/dist/collection/components/mds-modal/mds-modal.js +153 -0
- package/dist/collection/components/mds-modal/meta/dictionary.js +6 -0
- package/dist/collection/components/mds-modal/meta/types.js +1 -0
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +68 -0
- package/dist/collection/dictionary/autocomplete.js +59 -0
- package/dist/collection/dictionary/button.js +26 -0
- package/dist/collection/dictionary/color.js +19 -0
- package/dist/collection/dictionary/icon.js +3 -0
- package/dist/collection/dictionary/input-text-type.js +13 -0
- package/dist/collection/dictionary/loading.js +5 -0
- package/dist/collection/dictionary/typography.js +37 -0
- package/dist/collection/dictionary/variant.js +64 -0
- package/dist/collection/fixtures/cities.js +110 -0
- package/dist/collection/interface/input-value.js +1 -0
- package/dist/collection/types/autocomplete.js +1 -0
- package/dist/collection/types/button.js +1 -0
- package/dist/collection/types/form-rel.js +1 -0
- package/dist/collection/types/input-text-type.js +1 -0
- package/dist/collection/types/input-value-type.js +1 -0
- package/dist/collection/types/loading.js +1 -0
- package/dist/collection/types/typography.js +1 -0
- package/dist/collection/types/variant.js +1 -0
- package/dist/custom-elements/index.d.ts +45 -0
- package/dist/custom-elements/index.js +136 -0
- package/dist/esm/index-7d5b7d79.js +1208 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/mds-modal.entry.js +120 -0
- package/dist/esm/mds-modal.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm-es5/index-7d5b7d79.js +1 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/mds-modal.entry.js +1 -0
- package/dist/esm-es5/mds-modal.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mds-modal/index.esm.js +0 -0
- package/dist/mds-modal/mds-modal.esm.js +1 -0
- package/dist/mds-modal/mds-modal.js +130 -0
- package/dist/mds-modal/p-0fa95990.system.js +1 -0
- package/dist/mds-modal/p-50ea2036.system.js +1 -0
- package/dist/mds-modal/p-818ca69a.js +1 -0
- package/dist/mds-modal/p-c8003e96.system.js +1 -0
- package/dist/mds-modal/p-d10799a8.entry.js +1 -0
- package/dist/mds-modal/p-fda9967b.system.entry.js +1 -0
- package/dist/stats.json +510 -0
- package/dist/types/components/mds-modal/meta/dictionary.d.ts +2 -0
- package/dist/types/components/mds-modal/meta/types.d.ts +2 -0
- package/dist/types/components.d.ts +58 -0
- package/dist/types/dictionary/autocomplete.d.ts +2 -0
- package/dist/types/dictionary/button.d.ts +5 -0
- package/dist/types/dictionary/color.d.ts +3 -0
- package/dist/types/dictionary/icon.d.ts +2 -0
- package/dist/types/dictionary/input-text-type.d.ts +2 -0
- package/dist/types/dictionary/loading.d.ts +2 -0
- package/dist/types/dictionary/typography.d.ts +5 -0
- package/dist/types/dictionary/variant.d.ts +9 -0
- package/dist/types/fixtures/cities.d.ts +2 -0
- package/dist/types/interface/input-value.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +1563 -0
- package/dist/types/types/autocomplete.d.ts +2 -0
- package/dist/types/types/button.d.ts +4 -0
- package/dist/types/types/form-rel.d.ts +1 -0
- package/dist/types/types/input-text-type.d.ts +1 -0
- package/dist/types/types/input-value-type.d.ts +1 -0
- package/dist/types/types/loading.d.ts +1 -0
- package/dist/types/types/typography.d.ts +4 -0
- package/dist/types/types/variant.d.ts +10 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +49 -0
- package/readme.md +43 -0
- package/src/components/mds-modal/css/mds-modal-animate-center.css +28 -0
- package/src/components/mds-modal/css/mds-modal-animate-left.css +42 -0
- package/src/components/mds-modal/css/mds-modal-animate-right.css +42 -0
- package/src/components/mds-modal/mds-modal.css +127 -0
- package/src/components/mds-modal/mds-modal.tsx +114 -0
- package/src/components/mds-modal/meta/dictionary.ts +9 -0
- package/src/components/mds-modal/meta/types.ts +8 -0
- package/src/components/mds-modal/readme.md +25 -0
- package/src/components/mds-modal/test/mds-modal.e2e.ts +69 -0
- package/src/components/mds-modal/test/mds-modal.spec.tsx +19 -0
- package/src/components/mds-modal/test/mds-modal.stories.js +68 -0
- package/src/components.d.ts +58 -0
- package/src/dictionary/autocomplete.ts +62 -0
- package/src/dictionary/button.ts +35 -0
- package/src/dictionary/color.ts +24 -0
- package/src/dictionary/icon.ts +5 -0
- package/src/dictionary/input-text-type.ts +17 -0
- package/src/dictionary/loading.ts +9 -0
- package/src/dictionary/typography.ts +46 -0
- package/src/dictionary/variant.ts +81 -0
- package/src/fixtures/cities.ts +116 -0
- package/src/interface/input-value.ts +5 -0
- package/src/types/autocomplete.ts +69 -0
- package/src/types/button.ts +24 -0
- package/src/types/form-rel.ts +11 -0
- package/src/types/input-text-type.ts +11 -0
- package/src/types/input-value-type.ts +5 -0
- package/src/types/loading.ts +3 -0
- package/src/types/typography.ts +35 -0
- package/src/types/variant.ts +72 -0
- package/www/build/index.esm.js +0 -0
- package/www/build/mds-modal.esm.js +1 -0
- package/www/build/mds-modal.js +130 -0
- package/www/build/p-0fa95990.system.js +1 -0
- package/www/build/p-50ea2036.system.js +1 -0
- package/www/build/p-818ca69a.js +1 -0
- package/www/build/p-c8003e96.system.js +1 -0
- package/www/build/p-d10799a8.entry.js +1 -0
- package/www/build/p-fda9967b.system.entry.js +1 -0
- package/www/host.config.json +15 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const autoCompleteDictionary = [
|
|
2
|
+
'additional-name',
|
|
3
|
+
'address',
|
|
4
|
+
'address-level1',
|
|
5
|
+
'address-level2',
|
|
6
|
+
'address-level3',
|
|
7
|
+
'address-level4',
|
|
8
|
+
'address-line1',
|
|
9
|
+
'address-line2',
|
|
10
|
+
'address-line3',
|
|
11
|
+
'bday',
|
|
12
|
+
'bday-day',
|
|
13
|
+
'bday-month',
|
|
14
|
+
'bday-year',
|
|
15
|
+
'cc-additional-name',
|
|
16
|
+
'cc-csc',
|
|
17
|
+
'cc-exp',
|
|
18
|
+
'cc-exp-month',
|
|
19
|
+
'cc-exp-year',
|
|
20
|
+
'cc-family-name',
|
|
21
|
+
'cc-family-name',
|
|
22
|
+
'cc-given-name',
|
|
23
|
+
'cc-name',
|
|
24
|
+
'cc-number',
|
|
25
|
+
'cc-type',
|
|
26
|
+
'country',
|
|
27
|
+
'country-name',
|
|
28
|
+
'current-password',
|
|
29
|
+
'email',
|
|
30
|
+
'family-name',
|
|
31
|
+
'given-name',
|
|
32
|
+
'honorific-prefix',
|
|
33
|
+
'honorific-suffix',
|
|
34
|
+
'impp',
|
|
35
|
+
'language',
|
|
36
|
+
'name',
|
|
37
|
+
'new-password',
|
|
38
|
+
'nickname',
|
|
39
|
+
'off',
|
|
40
|
+
'on',
|
|
41
|
+
'one-time-code',
|
|
42
|
+
'organization',
|
|
43
|
+
'organization-title',
|
|
44
|
+
'photo',
|
|
45
|
+
'postal-code',
|
|
46
|
+
'sex',
|
|
47
|
+
'street-address',
|
|
48
|
+
'tel',
|
|
49
|
+
'tel-area-code',
|
|
50
|
+
'tel-country-code',
|
|
51
|
+
'tel-extension',
|
|
52
|
+
'tel-local',
|
|
53
|
+
'tel-national',
|
|
54
|
+
'transaction-amount',
|
|
55
|
+
'transaction-currency',
|
|
56
|
+
'url',
|
|
57
|
+
'username',
|
|
58
|
+
];
|
|
59
|
+
export { autoCompleteDictionary, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const buttonVariantDictionary = [
|
|
2
|
+
'dark',
|
|
3
|
+
'error',
|
|
4
|
+
'info',
|
|
5
|
+
'light',
|
|
6
|
+
'primary',
|
|
7
|
+
'success',
|
|
8
|
+
'warning',
|
|
9
|
+
];
|
|
10
|
+
const buttonToneVariantDictionary = [
|
|
11
|
+
'strong',
|
|
12
|
+
'weak',
|
|
13
|
+
'ghost',
|
|
14
|
+
'quiet',
|
|
15
|
+
];
|
|
16
|
+
const buttonSizeDictionary = [
|
|
17
|
+
'sm',
|
|
18
|
+
'md',
|
|
19
|
+
'lg',
|
|
20
|
+
'xl',
|
|
21
|
+
];
|
|
22
|
+
const buttonIconPositionDictionary = [
|
|
23
|
+
'left',
|
|
24
|
+
'right',
|
|
25
|
+
];
|
|
26
|
+
export { buttonSizeDictionary, buttonToneVariantDictionary, buttonVariantDictionary, buttonIconPositionDictionary, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const colorLabelDictionary = [
|
|
2
|
+
'amaranth',
|
|
3
|
+
'aqua',
|
|
4
|
+
'blue',
|
|
5
|
+
'green',
|
|
6
|
+
'lime',
|
|
7
|
+
'orange',
|
|
8
|
+
'orchid',
|
|
9
|
+
'sky',
|
|
10
|
+
'violet',
|
|
11
|
+
'yellow',
|
|
12
|
+
];
|
|
13
|
+
const colorStatusDictionary = [
|
|
14
|
+
'error',
|
|
15
|
+
'info',
|
|
16
|
+
'success',
|
|
17
|
+
'warning',
|
|
18
|
+
];
|
|
19
|
+
export { colorLabelDictionary, colorStatusDictionary, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const typographyDictionary = [
|
|
2
|
+
'action',
|
|
3
|
+
'caption',
|
|
4
|
+
'code',
|
|
5
|
+
'detail',
|
|
6
|
+
'h1',
|
|
7
|
+
'h2',
|
|
8
|
+
'h3',
|
|
9
|
+
'h4',
|
|
10
|
+
'h5',
|
|
11
|
+
'h6',
|
|
12
|
+
'hack',
|
|
13
|
+
'label',
|
|
14
|
+
'option',
|
|
15
|
+
'paragraph',
|
|
16
|
+
];
|
|
17
|
+
const typographyMonoDictionary = [
|
|
18
|
+
'code',
|
|
19
|
+
'hack',
|
|
20
|
+
];
|
|
21
|
+
const typographyPrimaryDictionary = [
|
|
22
|
+
'action',
|
|
23
|
+
'h1',
|
|
24
|
+
'h2',
|
|
25
|
+
'h3',
|
|
26
|
+
'h4',
|
|
27
|
+
'h5',
|
|
28
|
+
'h6',
|
|
29
|
+
];
|
|
30
|
+
const typographySecondaryDictionary = [
|
|
31
|
+
'caption',
|
|
32
|
+
'detail',
|
|
33
|
+
'label',
|
|
34
|
+
'option',
|
|
35
|
+
'paragraph',
|
|
36
|
+
];
|
|
37
|
+
export { typographyDictionary, typographyMonoDictionary, typographyPrimaryDictionary, typographySecondaryDictionary, };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const themeVariantDictionary = [
|
|
2
|
+
'dark',
|
|
3
|
+
'error',
|
|
4
|
+
'info',
|
|
5
|
+
'light',
|
|
6
|
+
'success',
|
|
7
|
+
'warning',
|
|
8
|
+
];
|
|
9
|
+
const themeLuminanceVariantDictionary = [
|
|
10
|
+
'dark',
|
|
11
|
+
'light',
|
|
12
|
+
];
|
|
13
|
+
const themeStatusVariantDictionary = [
|
|
14
|
+
'error',
|
|
15
|
+
'info',
|
|
16
|
+
'success',
|
|
17
|
+
'warning',
|
|
18
|
+
];
|
|
19
|
+
const themeFullVariantDictionary = [
|
|
20
|
+
'amaranth',
|
|
21
|
+
'aqua',
|
|
22
|
+
'blue',
|
|
23
|
+
'dark',
|
|
24
|
+
'error',
|
|
25
|
+
'green',
|
|
26
|
+
'info',
|
|
27
|
+
'light',
|
|
28
|
+
'lime',
|
|
29
|
+
'orange',
|
|
30
|
+
'orchid',
|
|
31
|
+
'sky',
|
|
32
|
+
'success',
|
|
33
|
+
'violet',
|
|
34
|
+
'warning',
|
|
35
|
+
'yellow',
|
|
36
|
+
];
|
|
37
|
+
const themeLabelVariantDictionary = [
|
|
38
|
+
'amaranth',
|
|
39
|
+
'aqua',
|
|
40
|
+
'blue',
|
|
41
|
+
'green',
|
|
42
|
+
'lime',
|
|
43
|
+
'orange',
|
|
44
|
+
'orchid',
|
|
45
|
+
'sky',
|
|
46
|
+
'violet',
|
|
47
|
+
'yellow',
|
|
48
|
+
];
|
|
49
|
+
const toneVariantDictionary = [
|
|
50
|
+
'strong',
|
|
51
|
+
'weak',
|
|
52
|
+
'ghost',
|
|
53
|
+
'quiet',
|
|
54
|
+
];
|
|
55
|
+
const toneSimpleVariantDictionary = [
|
|
56
|
+
'strong',
|
|
57
|
+
'weak',
|
|
58
|
+
'quiet',
|
|
59
|
+
];
|
|
60
|
+
const toneMinimalVariantDictionary = [
|
|
61
|
+
'strong',
|
|
62
|
+
'weak',
|
|
63
|
+
];
|
|
64
|
+
export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const citiesDictionary = [
|
|
2
|
+
'Agrigento',
|
|
3
|
+
'Alessandria',
|
|
4
|
+
'Ancona',
|
|
5
|
+
'Aosta',
|
|
6
|
+
'Arezzo',
|
|
7
|
+
'Ascoli Piceno',
|
|
8
|
+
'Asti',
|
|
9
|
+
'Avellino',
|
|
10
|
+
'Bari',
|
|
11
|
+
'Barletta-Andria-Trani',
|
|
12
|
+
'Belluno',
|
|
13
|
+
'Benevento',
|
|
14
|
+
'Bergamo',
|
|
15
|
+
'Biella',
|
|
16
|
+
'Bologna',
|
|
17
|
+
'Bolzano',
|
|
18
|
+
'Brescia',
|
|
19
|
+
'Brindisi',
|
|
20
|
+
'Cagliari',
|
|
21
|
+
'Caltanissetta',
|
|
22
|
+
'Campobasso',
|
|
23
|
+
'Caserta',
|
|
24
|
+
'Catania',
|
|
25
|
+
'Catanzaro',
|
|
26
|
+
'Chieti',
|
|
27
|
+
'Como',
|
|
28
|
+
'Cosenza',
|
|
29
|
+
'Cremona',
|
|
30
|
+
'Crotone',
|
|
31
|
+
'Cuneo',
|
|
32
|
+
'Enna',
|
|
33
|
+
'Fermo',
|
|
34
|
+
'Ferrara',
|
|
35
|
+
'Firenze',
|
|
36
|
+
'Foggia',
|
|
37
|
+
'Forlì-Cesena',
|
|
38
|
+
'Frosinone',
|
|
39
|
+
'Genova',
|
|
40
|
+
'Gorizia',
|
|
41
|
+
'Grosseto',
|
|
42
|
+
'Imperia',
|
|
43
|
+
'Isernia',
|
|
44
|
+
'La Spezia',
|
|
45
|
+
'L\'Aquila',
|
|
46
|
+
'Latina',
|
|
47
|
+
'Lecce',
|
|
48
|
+
'Lecco',
|
|
49
|
+
'Livorno',
|
|
50
|
+
'Lodi',
|
|
51
|
+
'Lucca',
|
|
52
|
+
'Macerata',
|
|
53
|
+
'Mantova',
|
|
54
|
+
'Massa-Carrara',
|
|
55
|
+
'Matera',
|
|
56
|
+
'Messina',
|
|
57
|
+
'Milano',
|
|
58
|
+
'Modena',
|
|
59
|
+
'Monza e della Brianza',
|
|
60
|
+
'Napoli',
|
|
61
|
+
'Novara',
|
|
62
|
+
'Nuoro',
|
|
63
|
+
'Oristano',
|
|
64
|
+
'Padova',
|
|
65
|
+
'Palermo',
|
|
66
|
+
'Parma',
|
|
67
|
+
'Pavia',
|
|
68
|
+
'Perugia',
|
|
69
|
+
'Pesaro e Urbino',
|
|
70
|
+
'Pescara',
|
|
71
|
+
'Piacenza',
|
|
72
|
+
'Pisa',
|
|
73
|
+
'Pistoia',
|
|
74
|
+
'Pordenone',
|
|
75
|
+
'Potenza',
|
|
76
|
+
'Prato',
|
|
77
|
+
'Ragusa',
|
|
78
|
+
'Ravenna',
|
|
79
|
+
'Reggio Calabria',
|
|
80
|
+
'Reggio Emilia',
|
|
81
|
+
'Rieti',
|
|
82
|
+
'Rimini',
|
|
83
|
+
'Roma',
|
|
84
|
+
'Rovigo',
|
|
85
|
+
'Salerno',
|
|
86
|
+
'Sassari',
|
|
87
|
+
'Savona',
|
|
88
|
+
'Siena',
|
|
89
|
+
'Siracusa',
|
|
90
|
+
'Sondrio',
|
|
91
|
+
'Sud Sardegna',
|
|
92
|
+
'Taranto',
|
|
93
|
+
'Teramo',
|
|
94
|
+
'Terni',
|
|
95
|
+
'Torino',
|
|
96
|
+
'Trapani',
|
|
97
|
+
'Trento',
|
|
98
|
+
'Treviso',
|
|
99
|
+
'Trieste',
|
|
100
|
+
'Udine',
|
|
101
|
+
'Varese',
|
|
102
|
+
'Venezia',
|
|
103
|
+
'Verbano-Cusio-Ossola',
|
|
104
|
+
'Vercelli',
|
|
105
|
+
'Verona',
|
|
106
|
+
'Vibo Valentia',
|
|
107
|
+
'Vicenza',
|
|
108
|
+
'Viterbo',
|
|
109
|
+
];
|
|
110
|
+
export { citiesDictionary, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* MdsModal custom elements bundle */
|
|
2
|
+
|
|
3
|
+
import type { Components, JSX } from "../types/components";
|
|
4
|
+
|
|
5
|
+
interface MdsModal extends Components.MdsModal, HTMLElement {}
|
|
6
|
+
export const MdsModal: {
|
|
7
|
+
prototype: MdsModal;
|
|
8
|
+
new (): MdsModal;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Utility to define all custom elements within this package using the tag name provided in the component's source.
|
|
13
|
+
* When defining each custom element, it will also check it's safe to define by:
|
|
14
|
+
*
|
|
15
|
+
* 1. Ensuring the "customElements" registry is available in the global context (window).
|
|
16
|
+
* 2. The component tag name is not already defined.
|
|
17
|
+
*
|
|
18
|
+
* Use the standard [customElements.define()](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)
|
|
19
|
+
* method instead to define custom elements individually, or to provide a different tag name.
|
|
20
|
+
*/
|
|
21
|
+
export declare const defineCustomElements: (opts?: any) => void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Used to manually set the base path where assets can be found.
|
|
25
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
26
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
27
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
28
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
29
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
30
|
+
* bunding, and where your assets can be loaded from. Additionally custom bundling
|
|
31
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
32
|
+
*/
|
|
33
|
+
export declare const setAssetPath: (path: string) => void;
|
|
34
|
+
|
|
35
|
+
export interface SetPlatformOptions {
|
|
36
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
37
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
38
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
39
|
+
ce?: (eventName: string, opts?: any) => CustomEvent;
|
|
40
|
+
}
|
|
41
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
42
|
+
|
|
43
|
+
export type { Components, JSX };
|
|
44
|
+
|
|
45
|
+
export * from '../types/components';
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
+
|
|
4
|
+
function toVal(mix) {
|
|
5
|
+
var k, y, str='';
|
|
6
|
+
|
|
7
|
+
if (typeof mix === 'string' || typeof mix === 'number') {
|
|
8
|
+
str += mix;
|
|
9
|
+
} else if (typeof mix === 'object') {
|
|
10
|
+
if (Array.isArray(mix)) {
|
|
11
|
+
for (k=0; k < mix.length; k++) {
|
|
12
|
+
if (mix[k]) {
|
|
13
|
+
if (y = toVal(mix[k])) {
|
|
14
|
+
str && (str += ' ');
|
|
15
|
+
str += y;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
for (k in mix) {
|
|
21
|
+
if (mix[k]) {
|
|
22
|
+
str && (str += ' ');
|
|
23
|
+
str += k;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return str;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function clsx () {
|
|
33
|
+
var i=0, tmp, x, str='';
|
|
34
|
+
while (i < arguments.length) {
|
|
35
|
+
if (tmp = arguments[i++]) {
|
|
36
|
+
if (x = toVal(tmp)) {
|
|
37
|
+
str && (str += ' ');
|
|
38
|
+
str += x;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return str;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const mdsModalCss = ".animate-left,.animate-right{opacity:0;-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{pointer-events:none;position:fixed;top:0px;right:0px;bottom:0px;left:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--adjust-tone-01), var(--tw-bg-opacity));--tw-bg-opacity:0;-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-webkit-perspective:600px;perspective:600px}:host(.animate-center-opened),:host(.animate-left-opened),:host(.animate-right-opened){pointer-events:auto;--tw-bg-opacity:0.5;-webkit-transition-duration:500ms;transition-duration:500ms}.close{position:absolute;top:0px;height:2.25rem;width:2.25rem;-webkit-transform-origin:center;transform-origin:center;cursor:pointer;font-size:2.25rem;line-height:2.5rem;--tw-text-opacity:1;color:rgba(var(--adjust-tone-10), var(--tw-text-opacity));opacity:0;-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);text-shadow:0px 0px 1px rgb(0 0 0 / 20%), 0px 0px 1px rgb(1 0 5 / 10%);-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg)}.window{display:grid;height:100%;gap:0px;overflow:auto;background-color:var(--window-background, rgb(var(--adjust-tone)));-webkit-box-shadow:var(--window-shadow, 0 25px 50px -12px rgba(0, 0, 0, 0.25));box-shadow:var(--window-shadow, 0 25px 50px -12px rgba(0, 0, 0, 0.25));grid-template-rows:1fr;max-width:calc(100vw - 80px)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.animate-center){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-center){padding:1rem}}:host(.animate-center) .window,:host(.animate-center)>::slotted([slot=window]){opacity:0;-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.animate-center-intro) .window,:host(.animate-center-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-center-opened.animate-center-outro) .window,:host(.animate-center-opened.animate-center-outro)>::slotted([slot=window]),:host(.animate-center-opened) .window,:host(.animate-center-opened)>::slotted([slot=window]){-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0);opacity:1}:host(.animate-center-outro) .window,:host(.animate-center-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.animate-right){-ms-flex-pack:end;justify-content:flex-end}:host(.animate-right) .window,:host(.animate-right)>::slotted([slot=window]){opacity:0;-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.animate-right-intro) .window,:host(.animate-right-intro)>::slotted([slot=window]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.animate-right-opened.animate-right-outro) .window,:host(.animate-right-opened.animate-right-outro)>::slotted([slot=window]),:host(.animate-right-opened) .window,:host(.animate-right-opened)>::slotted([slot=window]){-webkit-transform:translateX(0);transform:translateX(0);opacity:1}:host(.animate-right-opened) .close,:host(.animate-right-opened.animate-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.animate-right-outro) .window,:host(.animate-right-outro)>::slotted([slot=window]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.animate-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.animate-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.animate-left){-ms-flex-pack:start;justify-content:flex-start}:host(.animate-left) .window,:host(.animate-left)>::slotted([slot=window]){opacity:0;-webkit-transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.animate-left-intro) .window,:host(.animate-left-intro)>::slotted([slot=window]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.animate-left-opened.animate-left-outro) .window,:host(.animate-left-opened.animate-left-outro)>::slotted([slot=window]),:host(.animate-left-opened) .window,:host(.animate-left-opened)>::slotted([slot=window]){-webkit-transform:translateX(0);transform:translateX(0);opacity:1}:host(.animate-left-opened) .close,:host(.animate-left-opened.animate-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.animate-left-outro) .window,:host(.animate-left-outro)>::slotted([slot=window]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.animate-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.animate-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}";
|
|
46
|
+
|
|
47
|
+
let MdsModal$1 = class extends HTMLElement {
|
|
48
|
+
constructor() {
|
|
49
|
+
super();
|
|
50
|
+
this.__registerHost();
|
|
51
|
+
this.__attachShadow();
|
|
52
|
+
this.close = createEvent(this, "close", 7);
|
|
53
|
+
this.window = null;
|
|
54
|
+
this.top = null;
|
|
55
|
+
this.bottom = null;
|
|
56
|
+
this.animationState = 'intro';
|
|
57
|
+
/**
|
|
58
|
+
* Specifies the animation position of the modal window
|
|
59
|
+
*/
|
|
60
|
+
this.position = null;
|
|
61
|
+
this.animationName = (customState = null, customPosition = null) => {
|
|
62
|
+
return `animate-${customPosition !== null ? customPosition : this.position}${customState !== null ? '-' + customState : ''}`;
|
|
63
|
+
};
|
|
64
|
+
this.closeModal = (e = null) => {
|
|
65
|
+
this.opened = e.target !== e.currentTarget;
|
|
66
|
+
if (!this.opened) {
|
|
67
|
+
this.close.emit();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
componentWillLoad() {
|
|
72
|
+
this.bottom = this.hostElement.querySelector('[slot="bottom"]') !== null;
|
|
73
|
+
this.top = this.hostElement.querySelector('[slot="top"]') !== null;
|
|
74
|
+
this.window = this.hostElement.querySelector('[slot="window"]') !== null;
|
|
75
|
+
if (this.window && this.position === null) {
|
|
76
|
+
this.position = 'center';
|
|
77
|
+
}
|
|
78
|
+
if (this.position === null) {
|
|
79
|
+
this.position = 'right';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
componentWillRender() {
|
|
83
|
+
this.animationState = this.opened ? 'intro' : 'outro';
|
|
84
|
+
this.hostElement.classList.add(this.animationName());
|
|
85
|
+
}
|
|
86
|
+
componentDidRender() {
|
|
87
|
+
this.animationDeelay = window.setTimeout(() => {
|
|
88
|
+
this.animationState = this.animationState === 'intro' ? 'outro' : 'intro';
|
|
89
|
+
this.hostElement.classList.remove(this.animationName(this.animationState === 'intro' ? 'outro' : 'intro'));
|
|
90
|
+
this.hostElement.classList.add(this.animationName(this.animationState));
|
|
91
|
+
window.clearTimeout(this.animationDeelay);
|
|
92
|
+
}, 500);
|
|
93
|
+
}
|
|
94
|
+
positionChange(newValue, oldValue) {
|
|
95
|
+
window.clearTimeout(this.animationDeelay);
|
|
96
|
+
this.hostElement.classList.remove(this.animationName(null, oldValue));
|
|
97
|
+
this.hostElement.classList.remove(this.animationName('intro', oldValue));
|
|
98
|
+
this.hostElement.classList.remove(this.animationName('outro', oldValue));
|
|
99
|
+
}
|
|
100
|
+
openedChange() {
|
|
101
|
+
window.clearTimeout(this.animationDeelay);
|
|
102
|
+
}
|
|
103
|
+
onCloseListener() {
|
|
104
|
+
this.opened = false;
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
return (h(Host, { class: clsx(this.opened && this.animationName('opened')), onClick: (e) => { this.closeModal(e); } }, this.window
|
|
108
|
+
?
|
|
109
|
+
h("slot", { name: "window" })
|
|
110
|
+
:
|
|
111
|
+
h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`) }, this.top &&
|
|
112
|
+
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
113
|
+
h("slot", { name: "bottom" })), !this.window && h("mds-icon", { name: "close", class: "close" })));
|
|
114
|
+
}
|
|
115
|
+
get hostElement() { return this; }
|
|
116
|
+
static get watchers() { return {
|
|
117
|
+
"position": ["positionChange"],
|
|
118
|
+
"opened": ["openedChange"]
|
|
119
|
+
}; }
|
|
120
|
+
static get style() { return mdsModalCss; }
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const MdsModal = /*@__PURE__*/proxyCustomElement(MdsModal$1, [1,"mds-modal",{"opened":[1540],"position":[1537]},[[0,"close","onCloseListener"]]]);
|
|
124
|
+
const defineCustomElements = (opts) => {
|
|
125
|
+
if (typeof customElements !== 'undefined') {
|
|
126
|
+
[
|
|
127
|
+
MdsModal
|
|
128
|
+
].forEach(cmp => {
|
|
129
|
+
if (!customElements.get(cmp.is)) {
|
|
130
|
+
customElements.define(cmp.is, cmp, opts);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { MdsModal, defineCustomElements };
|