@maggioli-design-system/mds-modal 5.0.0 → 5.2.1
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/mds-modal.cjs.entry.js +7 -5
- package/dist/collection/common/aria.js +17 -1
- package/dist/collection/common/device.js +6 -0
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/common/slot.js +13 -0
- package/dist/collection/components/mds-modal/mds-modal.css +10 -23
- package/dist/collection/components/mds-modal/mds-modal.js +6 -4
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +15 -6
- package/dist/collection/dictionary/animation.js +5 -0
- package/dist/collection/dictionary/file-extensions.js +61 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/collection/fixtures/filenames.js +62 -1
- package/dist/collection/type/animation.js +1 -0
- package/dist/collection/type/variant-file-format.js +5 -0
- package/dist/components/mds-modal.js +7 -5
- package/dist/documentation.json +11 -1
- package/dist/esm/mds-modal.entry.js +7 -5
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/p-08a99956.entry.js +1 -0
- package/dist/mds-modal/p-0d78ea55.system.entry.js +1 -0
- package/dist/mds-modal/p-67c6f337.system.js +1 -1
- package/dist/stats.json +36 -17
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/common/slot.d.ts +2 -0
- package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +3 -3
- package/dist/types/dictionary/animation.d.ts +2 -0
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/fixtures/filenames.d.ts +62 -1
- package/dist/types/type/animation.d.ts +1 -0
- package/dist/types/type/file-types.d.ts +1 -1
- package/dist/types/type/text.d.ts +2 -0
- package/dist/types/type/variant-file-format.d.ts +1 -1
- package/documentation.json +35 -10
- package/package.json +2 -2
- package/readme.md +2 -0
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/keyboard-manager.ts +2 -2
- package/src/common/slot.ts +15 -0
- package/src/components/mds-modal/css/mds-modal-animate-left.css +2 -1
- package/src/components/mds-modal/css/mds-modal-animate-right.css +2 -1
- package/src/components/mds-modal/css/mds-modal-animate.css +0 -10
- package/src/components/mds-modal/mds-modal.css +6 -0
- package/src/components/mds-modal/mds-modal.tsx +3 -2
- package/src/components/mds-modal/readme.md +2 -0
- package/src/components/mds-modal/test/mds-modal.stories.tsx +18 -8
- package/src/dictionary/animation.ts +8 -0
- package/src/dictionary/file-extensions.ts +61 -56
- package/src/dictionary/text.ts +64 -0
- package/src/fixtures/filenames.ts +63 -0
- package/src/fixtures/icons.json +9 -0
- package/src/fixtures/iconsauce.json +5 -0
- package/src/meta/file-format/locale.el.json +44 -0
- package/src/meta/file-format/locale.en.json +44 -0
- package/src/meta/file-format/locale.es.json +44 -0
- package/src/meta/file-format/locale.it.json +44 -0
- package/src/type/animation.ts +3 -0
- package/src/type/file-types.ts +6 -0
- package/src/type/text.ts +59 -0
- package/src/type/variant-file-format.ts +6 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/p-08a99956.entry.js +1 -0
- package/www/build/p-0d78ea55.system.entry.js +1 -0
- package/www/build/p-67c6f337.system.js +1 -1
- package/dist/mds-modal/p-63a918d2.system.entry.js +0 -1
- package/dist/mds-modal/p-67200987.entry.js +0 -1
- package/www/build/p-63a918d2.system.entry.js +0 -1
- package/www/build/p-67200987.entry.js +0 -1
package/dist/stats.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-20T08:54:03",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "22.11.0"
|
|
@@ -9,18 +9,20 @@
|
|
|
9
9
|
"fsNamespace": "mds-modal",
|
|
10
10
|
"components": 1,
|
|
11
11
|
"entries": 1,
|
|
12
|
-
"bundles":
|
|
12
|
+
"bundles": 97,
|
|
13
13
|
"outputs": [
|
|
14
14
|
{
|
|
15
15
|
"name": "dist-collection",
|
|
16
|
-
"files":
|
|
16
|
+
"files": 49,
|
|
17
17
|
"generatedFiles": [
|
|
18
18
|
"./dist/collection/common/aria.js",
|
|
19
19
|
"./dist/collection/common/date.js",
|
|
20
|
+
"./dist/collection/common/device.js",
|
|
20
21
|
"./dist/collection/common/file.js",
|
|
21
22
|
"./dist/collection/common/icon.js",
|
|
22
23
|
"./dist/collection/common/keyboard-manager.js",
|
|
23
24
|
"./dist/collection/common/locale.js",
|
|
25
|
+
"./dist/collection/common/slot.js",
|
|
24
26
|
"./dist/collection/common/unit.js",
|
|
25
27
|
"./dist/collection/common/yugop/core.js",
|
|
26
28
|
"./dist/collection/common/yugop/index.js",
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
"./dist/collection/components/mds-modal/meta/dictionary.js",
|
|
34
36
|
"./dist/collection/components/mds-modal/meta/types.js",
|
|
35
37
|
"./dist/collection/components/mds-modal/test/mds-modal.stories.js",
|
|
38
|
+
"./dist/collection/dictionary/animation.js",
|
|
36
39
|
"./dist/collection/dictionary/autocomplete.js",
|
|
37
40
|
"./dist/collection/dictionary/button.js",
|
|
38
41
|
"./dist/collection/dictionary/color.js",
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
"./dist/collection/dictionary/variant.js",
|
|
47
50
|
"./dist/collection/fixtures/cities.js",
|
|
48
51
|
"./dist/collection/fixtures/filenames.js",
|
|
52
|
+
"./dist/collection/type/animation.js",
|
|
49
53
|
"./dist/collection/type/autocomplete.js",
|
|
50
54
|
"./dist/collection/type/button.js",
|
|
51
55
|
"./dist/collection/type/date.js",
|
|
@@ -99,23 +103,23 @@
|
|
|
99
103
|
"./dist/mds-modal/index.esm.js",
|
|
100
104
|
"./dist/mds-modal/mds-modal.esm.js",
|
|
101
105
|
"./dist/mds-modal/mds-modal.js",
|
|
106
|
+
"./dist/mds-modal/p-08a99956.entry.js",
|
|
107
|
+
"./dist/mds-modal/p-0d78ea55.system.entry.js",
|
|
102
108
|
"./dist/mds-modal/p-0ed6e0c8.js",
|
|
103
109
|
"./dist/mds-modal/p-423dac35.system.js",
|
|
104
110
|
"./dist/mds-modal/p-50ea2036.system.js",
|
|
105
111
|
"./dist/mds-modal/p-56ba5cbf.system.js",
|
|
106
|
-
"./dist/mds-modal/p-63a918d2.system.entry.js",
|
|
107
|
-
"./dist/mds-modal/p-67200987.entry.js",
|
|
108
112
|
"./dist/mds-modal/p-67c6f337.system.js",
|
|
109
113
|
"./dist/mds-modal/p-e1255160.js",
|
|
110
114
|
"./www/build/index.esm.js",
|
|
111
115
|
"./www/build/mds-modal.esm.js",
|
|
112
116
|
"./www/build/mds-modal.js",
|
|
117
|
+
"./www/build/p-08a99956.entry.js",
|
|
118
|
+
"./www/build/p-0d78ea55.system.entry.js",
|
|
113
119
|
"./www/build/p-0ed6e0c8.js",
|
|
114
120
|
"./www/build/p-423dac35.system.js",
|
|
115
121
|
"./www/build/p-50ea2036.system.js",
|
|
116
122
|
"./www/build/p-56ba5cbf.system.js",
|
|
117
|
-
"./www/build/p-63a918d2.system.entry.js",
|
|
118
|
-
"./www/build/p-67200987.entry.js",
|
|
119
123
|
"./www/build/p-67c6f337.system.js",
|
|
120
124
|
"./www/build/p-e1255160.js"
|
|
121
125
|
]
|
|
@@ -150,12 +154,12 @@
|
|
|
150
154
|
"components": [
|
|
151
155
|
"mds-modal"
|
|
152
156
|
],
|
|
153
|
-
"bundleId": "p-
|
|
154
|
-
"fileName": "p-
|
|
157
|
+
"bundleId": "p-08a99956",
|
|
158
|
+
"fileName": "p-08a99956.entry.js",
|
|
155
159
|
"imports": [
|
|
156
160
|
"p-0ed6e0c8.js"
|
|
157
161
|
],
|
|
158
|
-
"originalByteSize":
|
|
162
|
+
"originalByteSize": 20016
|
|
159
163
|
}
|
|
160
164
|
],
|
|
161
165
|
"esm": [
|
|
@@ -169,7 +173,7 @@
|
|
|
169
173
|
"imports": [
|
|
170
174
|
"index-1c34ac95.js"
|
|
171
175
|
],
|
|
172
|
-
"originalByteSize":
|
|
176
|
+
"originalByteSize": 20020
|
|
173
177
|
}
|
|
174
178
|
],
|
|
175
179
|
"es5": [
|
|
@@ -183,7 +187,7 @@
|
|
|
183
187
|
"imports": [
|
|
184
188
|
"index-1c34ac95.js"
|
|
185
189
|
],
|
|
186
|
-
"originalByteSize":
|
|
190
|
+
"originalByteSize": 20020
|
|
187
191
|
}
|
|
188
192
|
],
|
|
189
193
|
"system": [
|
|
@@ -192,12 +196,12 @@
|
|
|
192
196
|
"components": [
|
|
193
197
|
"mds-modal"
|
|
194
198
|
],
|
|
195
|
-
"bundleId": "p-
|
|
196
|
-
"fileName": "p-
|
|
199
|
+
"bundleId": "p-0d78ea55.system",
|
|
200
|
+
"fileName": "p-0d78ea55.system.entry.js",
|
|
197
201
|
"imports": [
|
|
198
202
|
"p-423dac35.system.js"
|
|
199
203
|
],
|
|
200
|
-
"originalByteSize":
|
|
204
|
+
"originalByteSize": 21559
|
|
201
205
|
}
|
|
202
206
|
],
|
|
203
207
|
"commonjs": [
|
|
@@ -211,7 +215,7 @@
|
|
|
211
215
|
"imports": [
|
|
212
216
|
"index-7b5471f5.js"
|
|
213
217
|
],
|
|
214
|
-
"originalByteSize":
|
|
218
|
+
"originalByteSize": 20103
|
|
215
219
|
}
|
|
216
220
|
]
|
|
217
221
|
},
|
|
@@ -581,6 +585,18 @@
|
|
|
581
585
|
"annotation": "prop",
|
|
582
586
|
"mode": "$"
|
|
583
587
|
},
|
|
588
|
+
{
|
|
589
|
+
"name": "--mds-modal-window-radius",
|
|
590
|
+
"docs": "Set the border radius of the window",
|
|
591
|
+
"annotation": "prop",
|
|
592
|
+
"mode": "$"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "--mds-modal-window-distance",
|
|
596
|
+
"docs": "Set the distance between the modal window and the screen bounds",
|
|
597
|
+
"annotation": "prop",
|
|
598
|
+
"mode": "$"
|
|
599
|
+
},
|
|
584
600
|
{
|
|
585
601
|
"name": "--mds-modal-window-shadow",
|
|
586
602
|
"docs": "Set the box shadow of the window",
|
|
@@ -670,7 +686,6 @@
|
|
|
670
686
|
"onClick",
|
|
671
687
|
"name",
|
|
672
688
|
"class",
|
|
673
|
-
"role",
|
|
674
689
|
"part",
|
|
675
690
|
"icon",
|
|
676
691
|
"variant",
|
|
@@ -706,10 +721,12 @@
|
|
|
706
721
|
"sourceGraph": {
|
|
707
722
|
"./src/common/aria.ts": [],
|
|
708
723
|
"./src/common/date.ts": [],
|
|
724
|
+
"./src/common/device.ts": [],
|
|
709
725
|
"./src/common/file.ts": [],
|
|
710
726
|
"./src/common/icon.ts": [],
|
|
711
727
|
"./src/common/keyboard-manager.ts": [],
|
|
712
728
|
"./src/common/locale.ts": [],
|
|
729
|
+
"./src/common/slot.ts": [],
|
|
713
730
|
"./src/common/unit.ts": [],
|
|
714
731
|
"./src/common/yugop/core.ts": [
|
|
715
732
|
"./src/common/yugop/utils/math",
|
|
@@ -733,6 +750,7 @@
|
|
|
733
750
|
"./src/components/mds-modal/test/mds-modal.stories.tsx": [
|
|
734
751
|
"./src/components/mds-modal/meta/dictionary"
|
|
735
752
|
],
|
|
753
|
+
"./src/dictionary/animation.ts": [],
|
|
736
754
|
"./src/dictionary/autocomplete.ts": [],
|
|
737
755
|
"./src/dictionary/button.ts": [],
|
|
738
756
|
"./src/dictionary/color.ts": [],
|
|
@@ -749,6 +767,7 @@
|
|
|
749
767
|
"./src/dictionary/variant.ts": [],
|
|
750
768
|
"./src/fixtures/cities.ts": [],
|
|
751
769
|
"./src/fixtures/filenames.ts": [],
|
|
770
|
+
"./src/type/animation.ts": [],
|
|
752
771
|
"./src/type/autocomplete.ts": [],
|
|
753
772
|
"./src/type/button.ts": [],
|
|
754
773
|
"./src/type/date.ts": [],
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
declare const unslugName: (name: string) => string;
|
|
2
2
|
declare const setAttributeIfEmpty: (element: HTMLElement, attribute: string, value: string) => string;
|
|
3
|
+
declare const removeAttributesIf: (element: HTMLElement, attribute: string, valueCheck: string | undefined, cleanAttributes: string | string[]) => boolean;
|
|
4
|
+
declare const ifAttribute: (element: HTMLElement, attribute: string, valueCheck?: string) => boolean;
|
|
3
5
|
declare const hashValue: (value: string) => string;
|
|
4
6
|
declare const hashRandomValue: (value?: string) => string;
|
|
5
|
-
export {
|
|
7
|
+
export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
|
|
@@ -5,7 +5,6 @@ declare const _default: {
|
|
|
5
5
|
description: string;
|
|
6
6
|
type: {
|
|
7
7
|
name: string;
|
|
8
|
-
required: boolean;
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
10
|
position: {
|
|
@@ -16,12 +15,13 @@ declare const _default: {
|
|
|
16
15
|
options: string[];
|
|
17
16
|
type: {
|
|
18
17
|
name: string;
|
|
19
|
-
required: boolean;
|
|
20
18
|
};
|
|
21
19
|
};
|
|
22
20
|
};
|
|
23
21
|
};
|
|
24
22
|
export default _default;
|
|
25
23
|
export declare const Default: any;
|
|
26
|
-
export declare const
|
|
24
|
+
export declare const DefaultWindowCustomized: any;
|
|
25
|
+
export declare const CustomWindowElement: any;
|
|
26
|
+
export declare const Interactive: any;
|
|
27
27
|
export declare const ARIATest: any;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
declare const typographyTagDictionary: string[];
|
|
2
|
+
declare const typographyHeadingTagDictionary: string[];
|
|
1
3
|
declare const truncateDictionary: string[];
|
|
2
|
-
export { truncateDictionary, };
|
|
4
|
+
export { truncateDictionary, typographyHeadingTagDictionary, typographyTagDictionary, };
|
|
@@ -1,2 +1,63 @@
|
|
|
1
1
|
declare const filesList: string[];
|
|
2
|
-
|
|
2
|
+
declare const namedFilesList: {
|
|
3
|
+
'7z': string;
|
|
4
|
+
'No extension file': string;
|
|
5
|
+
'png with URL': string;
|
|
6
|
+
ace: string;
|
|
7
|
+
ai: string;
|
|
8
|
+
db: string;
|
|
9
|
+
default: string;
|
|
10
|
+
dmg: string;
|
|
11
|
+
doc: string;
|
|
12
|
+
docm: string;
|
|
13
|
+
docx: string;
|
|
14
|
+
eml: string;
|
|
15
|
+
eps: string;
|
|
16
|
+
exe: string;
|
|
17
|
+
flac: string;
|
|
18
|
+
gif: string;
|
|
19
|
+
htm: string;
|
|
20
|
+
html: string;
|
|
21
|
+
jpe: string;
|
|
22
|
+
jpeg: string;
|
|
23
|
+
jpg: string;
|
|
24
|
+
js: string;
|
|
25
|
+
json: string;
|
|
26
|
+
jsx: string;
|
|
27
|
+
m2v: string;
|
|
28
|
+
mp2: string;
|
|
29
|
+
mp3: string;
|
|
30
|
+
mp4: string;
|
|
31
|
+
mp4v: string;
|
|
32
|
+
mpeg: string;
|
|
33
|
+
mpg4: string;
|
|
34
|
+
mpg: string;
|
|
35
|
+
mpga: string;
|
|
36
|
+
odf: string;
|
|
37
|
+
odp: string;
|
|
38
|
+
ods: string;
|
|
39
|
+
odt: string;
|
|
40
|
+
ole: string;
|
|
41
|
+
p7m: string;
|
|
42
|
+
pdf: string;
|
|
43
|
+
php: string;
|
|
44
|
+
png: string;
|
|
45
|
+
ppt: string;
|
|
46
|
+
rar: string;
|
|
47
|
+
rtf: string;
|
|
48
|
+
sass: string;
|
|
49
|
+
shtml: string;
|
|
50
|
+
svg: string;
|
|
51
|
+
tar: string;
|
|
52
|
+
ts: string;
|
|
53
|
+
tsd: string;
|
|
54
|
+
txt: string;
|
|
55
|
+
wav: string;
|
|
56
|
+
webp: string;
|
|
57
|
+
xar: string;
|
|
58
|
+
xls: string;
|
|
59
|
+
xlsx: string;
|
|
60
|
+
xml: string;
|
|
61
|
+
zip: string;
|
|
62
|
+
};
|
|
63
|
+
export { filesList, namedFilesList, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HorizontalActionsAnimationType = 'fade' | 'slide';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ExtensionSuffixType = '7z' | 'ace' | 'ai' | 'db' | 'default' | 'dmg' | 'doc' | 'docm' | 'docx' | 'eml' | 'eps' | 'exe' | 'flac' | 'gif' | 'heic' | 'htm' | 'html' | 'jpe' | 'jpeg' | 'jpg' | 'js' | 'json' | 'jsx' | 'm2v' | 'mp2' | 'mp3' | 'mp4' | 'mp4v' | 'mpeg' | 'mpg' | 'mpg4' | 'mpga' | 'odp' | 'ods' | 'odt' | 'pdf' | 'php' | 'png' | 'ppt' | 'rar' | 'rtf' | 'sass' | 'shtml' | 'svg' | 'tar' | 'tiff' | 'ts' | 'txt' | 'wav' | 'webp' | 'xar' | 'xls' | 'xlsx' | 'zip';
|
|
1
|
+
export type ExtensionSuffixType = '7z' | 'ace' | 'ai' | 'db' | 'default' | 'dmg' | 'doc' | 'docm' | 'docx' | 'eml' | 'eps' | 'exe' | 'flac' | 'gif' | 'heic' | 'htm' | 'html' | 'jpe' | 'jpeg' | 'jpg' | 'js' | 'json' | 'jsx' | 'm2v' | 'mp2' | 'mp3' | 'mp4' | 'mp4v' | 'mpeg' | 'mpg' | 'mpg4' | 'mpga' | 'odf' | 'odp' | 'ods' | 'odt' | 'odt' | 'ole' | 'p7m' | 'pdf' | 'php' | 'png' | 'ppt' | 'rar' | 'rtf' | 'sass' | 'shtml' | 'svg' | 'tar' | 'tiff' | 'ts' | 'tsd' | 'txt' | 'wav' | 'webp' | 'xar' | 'xls' | 'xlsx' | 'xml' | 'zip';
|
|
@@ -1 +1,3 @@
|
|
|
1
|
+
export type TypographyTagType = 'abbr' | 'address' | 'article' | 'b' | 'bdo' | 'blockquote' | 'cite' | 'code' | 'dd' | 'del' | 'details' | 'dfn' | 'div' | 'dl' | 'dt' | 'em' | 'figcaption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'i' | 'ins' | 'kbd' | 'label' | 'legend' | 'li' | 'mark' | 'ol' | 'p' | 'pre' | 'q' | 'rb' | 'rt' | 'ruby' | 's' | 'samp' | 'small' | 'span' | 'strong' | 'sub' | 'summary' | 'sup' | 'time' | 'u' | 'ul' | 'var';
|
|
2
|
+
export type TypographyHeadingTagType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
1
3
|
export type TypographyTruncateType = 'all' | 'none' | 'word';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeFullVariantType } from "./variant";
|
|
2
|
-
type FileFormat = 'archive' | 'attachment' | 'audio' | 'code' | 'data' | 'document' | 'email' | 'executable' | 'image' | 'markup' | 'slide' | 'spreadsheet' | 'text' | 'vector' | 'video';
|
|
2
|
+
type FileFormat = 'archive' | 'attachment' | 'audio' | 'certificate' | 'code' | 'data' | 'document' | 'email' | 'executable' | 'image' | 'markup' | 'slide' | 'spreadsheet' | 'text' | 'vector' | 'video';
|
|
3
3
|
interface FileFormatVariant {
|
|
4
4
|
icon: string;
|
|
5
5
|
variant: ThemeFullVariantType;
|
package/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-19T14:37:09",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.22.2",
|
|
@@ -225,11 +225,21 @@
|
|
|
225
225
|
"annotation": "prop",
|
|
226
226
|
"docs": "Set the background color of the window"
|
|
227
227
|
},
|
|
228
|
+
{
|
|
229
|
+
"name": "--mds-modal-window-distance",
|
|
230
|
+
"annotation": "prop",
|
|
231
|
+
"docs": "Set the distance between the modal window and the screen bounds"
|
|
232
|
+
},
|
|
228
233
|
{
|
|
229
234
|
"name": "--mds-modal-window-overflow",
|
|
230
235
|
"annotation": "prop",
|
|
231
236
|
"docs": "Set the overflow of the window"
|
|
232
237
|
},
|
|
238
|
+
{
|
|
239
|
+
"name": "--mds-modal-window-radius",
|
|
240
|
+
"annotation": "prop",
|
|
241
|
+
"docs": "Set the border radius of the window"
|
|
242
|
+
},
|
|
233
243
|
{
|
|
234
244
|
"name": "--mds-modal-window-shadow",
|
|
235
245
|
"annotation": "prop",
|
|
@@ -438,7 +448,7 @@
|
|
|
438
448
|
"path": "src/components/mds-dropdown/meta/event-detail.ts"
|
|
439
449
|
},
|
|
440
450
|
"src/type/file-types.ts::ExtensionSuffixType": {
|
|
441
|
-
"declaration": "export type ExtensionSuffixType =\n | '7z'\n | 'ace'\n | 'ai'\n | 'db'\n | 'default'\n | 'dmg'\n | 'doc'\n | 'docm'\n | 'docx'\n | 'eml'\n | 'eps'\n | 'exe'\n | 'flac'\n | 'gif'\n | 'heic'\n | 'htm'\n | 'html'\n | 'jpe'\n | 'jpeg'\n | 'jpg'\n | 'js'\n | 'json'\n | 'jsx'\n | 'm2v'\n | 'mp2'\n | 'mp3'\n | 'mp4'\n | 'mp4v'\n | 'mpeg'\n | 'mpg'\n | 'mpg4'\n | 'mpga'\n | 'odp'\n | 'ods'\n | 'odt'\n | 'pdf'\n | 'php'\n | 'png'\n | 'ppt'\n | 'rar'\n | 'rtf'\n | 'sass'\n | 'shtml'\n | 'svg'\n | 'tar'\n | 'tiff'\n | 'ts'\n | 'txt'\n | 'wav'\n | 'webp'\n | 'xar'\n | 'xls'\n | 'xlsx'\n | 'zip'",
|
|
451
|
+
"declaration": "export type ExtensionSuffixType =\n | '7z'\n | 'ace'\n | 'ai'\n | 'db'\n | 'default'\n | 'dmg'\n | 'doc'\n | 'docm'\n | 'docx'\n | 'eml'\n | 'eps'\n | 'exe'\n | 'flac'\n | 'gif'\n | 'heic'\n | 'htm'\n | 'html'\n | 'jpe'\n | 'jpeg'\n | 'jpg'\n | 'js'\n | 'json'\n | 'jsx'\n | 'm2v'\n | 'mp2'\n | 'mp3'\n | 'mp4'\n | 'mp4v'\n | 'mpeg'\n | 'mpg'\n | 'mpg4'\n | 'mpga'\n | 'odf'\n | 'odp'\n | 'ods'\n | 'odt'\n | 'odt'\n | 'ole'\n | 'p7m'\n | 'pdf'\n | 'php'\n | 'png'\n | 'ppt'\n | 'rar'\n | 'rtf'\n | 'sass'\n | 'shtml'\n | 'svg'\n | 'tar'\n | 'tiff'\n | 'ts'\n | 'tsd'\n | 'txt'\n | 'wav'\n | 'webp'\n | 'xar'\n | 'xls'\n | 'xlsx'\n | 'xml'\n | 'zip'",
|
|
442
452
|
"docstring": "",
|
|
443
453
|
"path": "src/type/file-types.ts"
|
|
444
454
|
},
|
|
@@ -677,11 +687,6 @@
|
|
|
677
687
|
"docstring": "",
|
|
678
688
|
"path": "src/components/mds-progress/meta/types.ts"
|
|
679
689
|
},
|
|
680
|
-
"src/type/date.ts::ISO8601Date": {
|
|
681
|
-
"declaration": "type ISO8601Date = ISO8601DateFormat<string, 'ISO8601Date'>",
|
|
682
|
-
"docstring": "",
|
|
683
|
-
"path": "src/type/date.ts"
|
|
684
|
-
},
|
|
685
690
|
"src/components/mds-push-notification/meta/types.ts::NotificationDateFormatType": {
|
|
686
691
|
"declaration": "string",
|
|
687
692
|
"docstring": "",
|
|
@@ -697,6 +702,11 @@
|
|
|
697
702
|
"docstring": "",
|
|
698
703
|
"path": "src/components/mds-push-notification/meta/event-detail.ts"
|
|
699
704
|
},
|
|
705
|
+
"src/type/text.ts::TypographyHeadingTagType": {
|
|
706
|
+
"declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
|
|
707
|
+
"docstring": "",
|
|
708
|
+
"path": "src/type/text.ts"
|
|
709
|
+
},
|
|
700
710
|
"src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
|
|
701
711
|
"declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
|
|
702
712
|
"docstring": "",
|
|
@@ -707,6 +717,11 @@
|
|
|
707
717
|
"docstring": "",
|
|
708
718
|
"path": "src/components/mds-stepper-bar-item/meta/event-detail.ts"
|
|
709
719
|
},
|
|
720
|
+
"src/type/animation.ts::HorizontalActionsAnimationType": {
|
|
721
|
+
"declaration": "export type HorizontalActionsAnimationType =\n | 'fade'\n | 'slide'",
|
|
722
|
+
"docstring": "",
|
|
723
|
+
"path": "src/type/animation.ts"
|
|
724
|
+
},
|
|
710
725
|
"src/components/mds-tab/meta/event-detail.ts::MdsTabEventDetail": {
|
|
711
726
|
"declaration": "export interface MdsTabEventDetail {\n id: number\n value?: string\n}",
|
|
712
727
|
"docstring": "",
|
|
@@ -727,8 +742,18 @@
|
|
|
727
742
|
"docstring": "",
|
|
728
743
|
"path": "src/components/mds-tab-item/meta/event-detail.ts"
|
|
729
744
|
},
|
|
745
|
+
"src/components/mds-table/meta/event-detail.ts::MdsTableSelectionEventDetail": {
|
|
746
|
+
"declaration": "export interface MdsTableSelectionEventDetail {\n rows: MdsTableRowSelection[]\n}",
|
|
747
|
+
"docstring": "",
|
|
748
|
+
"path": "src/components/mds-table/meta/event-detail.ts"
|
|
749
|
+
},
|
|
750
|
+
"src/components/mds-table/meta/type.ts::MdsTableRowSelection": {
|
|
751
|
+
"declaration": "{\n index: number\n value?: string | number\n}",
|
|
752
|
+
"docstring": "",
|
|
753
|
+
"path": "src/components/mds-table/meta/type.ts"
|
|
754
|
+
},
|
|
730
755
|
"src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
|
|
731
|
-
"declaration": "export type SortDirectionType =\n | '
|
|
756
|
+
"declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
|
|
732
757
|
"docstring": "",
|
|
733
758
|
"path": "src/components/mds-table-header-cell/meta/types.ts"
|
|
734
759
|
},
|
|
@@ -737,10 +762,10 @@
|
|
|
737
762
|
"docstring": "",
|
|
738
763
|
"path": "src/components/mds-text/meta/types.ts"
|
|
739
764
|
},
|
|
740
|
-
"src/
|
|
765
|
+
"src/type/text.ts::TypographyTagType": {
|
|
741
766
|
"declaration": "export type TypographyTagType =\n | 'abbr'\n | 'address'\n | 'article'\n | 'b'\n | 'bdo'\n | 'blockquote'\n | 'cite'\n | 'code'\n | 'dd'\n | 'del'\n | 'details'\n | 'dfn'\n | 'div'\n | 'dl'\n | 'dt'\n | 'em'\n | 'figcaption'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'i'\n | 'ins'\n | 'kbd'\n | 'label'\n | 'legend'\n | 'li'\n | 'mark'\n | 'ol'\n | 'p'\n | 'pre'\n | 'q'\n | 'rb'\n | 'rt'\n | 'ruby'\n | 's'\n | 'samp'\n | 'small'\n | 'span'\n | 'strong'\n | 'sub'\n | 'summary'\n | 'sup'\n | 'time'\n | 'u'\n | 'ul'\n | 'var'",
|
|
742
767
|
"docstring": "",
|
|
743
|
-
"path": "src/
|
|
768
|
+
"path": "src/type/text.ts"
|
|
744
769
|
},
|
|
745
770
|
"src/type/variant.ts::ThemeLuminanceVariantType": {
|
|
746
771
|
"declaration": "export type ThemeLuminanceVariantType =\n | 'dark'\n | 'light'",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-modal",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "mds-modal is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "stencil test --spec --e2e"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@maggioli-design-system/mds-button": "6.
|
|
27
|
+
"@maggioli-design-system/mds-button": "6.1.3",
|
|
28
28
|
"@maggioli-design-system/styles": "15.5.0",
|
|
29
29
|
"@stencil/core": "4.22.2",
|
|
30
30
|
"clsx": "2.1.0"
|
package/readme.md
CHANGED
|
@@ -49,7 +49,9 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
|
|
|
49
49
|
| `--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`. |
|
|
50
50
|
| `--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`. |
|
|
51
51
|
| `--mds-modal-window-background` | Set the background color of the window |
|
|
52
|
+
| `--mds-modal-window-distance` | Set the distance between the modal window and the screen bounds |
|
|
52
53
|
| `--mds-modal-window-overflow` | Set the overflow of the window |
|
|
54
|
+
| `--mds-modal-window-radius` | Set the border radius of the window |
|
|
53
55
|
| `--mds-modal-window-shadow` | Set the box shadow of the window |
|
|
54
56
|
| `--mds-modal-z-index` | Set the z-index of the window when the component is opened |
|
|
55
57
|
|
package/src/common/aria.ts
CHANGED
|
@@ -20,6 +20,24 @@ const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: str
|
|
|
20
20
|
return value
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const removeAttributesIf = (element: HTMLElement, attribute: string, valueCheck: string = 'true', cleanAttributes: string | string[]): boolean => {
|
|
24
|
+
if (ifAttribute(element, attribute, valueCheck)) {
|
|
25
|
+
const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes]
|
|
26
|
+
attributesList.forEach(attributeToRemove => {
|
|
27
|
+
element.removeAttribute(attributeToRemove)
|
|
28
|
+
})
|
|
29
|
+
return true
|
|
30
|
+
}
|
|
31
|
+
return false
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const ifAttribute = (element: HTMLElement, attribute: string, valueCheck: string = 'true'): boolean => {
|
|
35
|
+
if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
|
|
36
|
+
return true
|
|
37
|
+
}
|
|
38
|
+
return false
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
const hashValue = (value: string): string => `${value}-${hash(value)}`
|
|
24
42
|
|
|
25
43
|
const hashRandomValue = (value?: string): string => {
|
|
@@ -32,8 +50,10 @@ const hashRandomValue = (value?: string): string => {
|
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
export {
|
|
35
|
-
unslugName,
|
|
36
|
-
setAttributeIfEmpty,
|
|
37
53
|
hashRandomValue,
|
|
38
54
|
hashValue,
|
|
55
|
+
removeAttributesIf,
|
|
56
|
+
setAttributeIfEmpty,
|
|
57
|
+
ifAttribute,
|
|
58
|
+
unslugName,
|
|
39
59
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const isMobileDevice = (): boolean => {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera
|
|
4
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
isMobileDevice,
|
|
9
|
+
}
|
|
@@ -36,14 +36,14 @@ export class KeyboardManager {
|
|
|
36
36
|
|
|
37
37
|
attachEscapeBehavior = (callback: () => void): void => {
|
|
38
38
|
this.escapeCallback = callback
|
|
39
|
-
if (window !== undefined) {
|
|
39
|
+
if (typeof window !== 'undefined') {
|
|
40
40
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
detachEscapeBehavior = (): void => {
|
|
45
45
|
this.escapeCallback = () => { return }
|
|
46
|
-
if (window !== undefined) {
|
|
46
|
+
if (typeof window !== 'undefined') {
|
|
47
47
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const hasSlottedElements = (el: HTMLElement, name?: string): boolean => {
|
|
2
|
+
let query = 'slot'
|
|
3
|
+
if (name) {
|
|
4
|
+
query = `slot[name=${name}]`
|
|
5
|
+
}
|
|
6
|
+
const slot: HTMLSlotElement = el.shadowRoot?.querySelector(query) as HTMLSlotElement
|
|
7
|
+
if (slot) {
|
|
8
|
+
return slot.assignedNodes().length > 0
|
|
9
|
+
}
|
|
10
|
+
return false
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
hasSlottedElements,
|
|
15
|
+
}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* @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`.
|
|
11
11
|
* @prop --mds-modal-window-background: Set the background color of the window
|
|
12
12
|
* @prop --mds-modal-window-overflow: Set the overflow of the window
|
|
13
|
+
* @prop --mds-modal-window-radius: Set the border radius of the window
|
|
14
|
+
* @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds
|
|
13
15
|
* @prop --mds-modal-window-shadow: Set the box shadow of the window
|
|
14
16
|
* @prop --mds-modal-z-index: Set the z-index of the window when the component is opened
|
|
15
17
|
*/
|
|
@@ -23,7 +25,9 @@
|
|
|
23
25
|
--mds-modal-transition-outro-ease: theme('transitionTimingFunction.in-out-quint');
|
|
24
26
|
--mds-modal-window-background: theme('colors.tone-neutral');
|
|
25
27
|
--mds-modal-window-overflow: auto;
|
|
28
|
+
--mds-modal-window-radius: 0;
|
|
26
29
|
--mds-modal-window-shadow: theme('boxShadow.2xl');
|
|
30
|
+
--mds-modal-window-distance: 0;
|
|
27
31
|
--mds-modal-z-index: var(--magma-modal-z-index);
|
|
28
32
|
|
|
29
33
|
@apply ease-in-out-expo;
|
|
@@ -76,9 +80,11 @@
|
|
|
76
80
|
@apply gap-0;
|
|
77
81
|
|
|
78
82
|
background-color: var(--mds-modal-window-background);
|
|
83
|
+
border-radius: var(--mds-modal-window-radius);
|
|
79
84
|
box-shadow: var(--mds-modal-window-shadow);
|
|
80
85
|
display: grid;
|
|
81
86
|
grid-template-rows: 1fr;
|
|
87
|
+
margin: var(--mds-modal-window-distance);
|
|
82
88
|
overflow: var(--mds-modal-window-overflow);
|
|
83
89
|
}
|
|
84
90
|
|
|
@@ -51,6 +51,7 @@ export class MdsModal {
|
|
|
51
51
|
@Event({ bubbles: true, composed: true, eventName: 'mdsModalHide' }) hideEvent: EventEmitter<void>
|
|
52
52
|
|
|
53
53
|
private updateCSSCustomProps = (): void => {
|
|
54
|
+
if (typeof window === 'undefined') return
|
|
54
55
|
const elementStyles = window.getComputedStyle(this.host)
|
|
55
56
|
this.cssTransitionDuration = elementStyles.getPropertyValue('--mds-modal-transition-duration') ?? '500'
|
|
56
57
|
}
|
|
@@ -86,7 +87,7 @@ export class MdsModal {
|
|
|
86
87
|
this.window = this.host.querySelector('[slot="window"]') !== null
|
|
87
88
|
|
|
88
89
|
if (this.window) {
|
|
89
|
-
this.host.querySelector('[slot="window"]')?.setAttribute('role', '
|
|
90
|
+
this.host.querySelector('[slot="window"]')?.setAttribute('role', 'dialog')
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -132,7 +133,7 @@ export class MdsModal {
|
|
|
132
133
|
<Host aria-modal={clsx(this.opened ? 'true' : 'false' )} onClick={(e: Event) => { this.closeModal(e) }}>
|
|
133
134
|
{ this.window
|
|
134
135
|
? <slot name="window"/>
|
|
135
|
-
: <div class={clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`)}
|
|
136
|
+
: <div class={clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`)} part="window">
|
|
136
137
|
{ this.top &&
|
|
137
138
|
<slot name="top"/>
|
|
138
139
|
}
|