@maggioli-design-system/mds-progress 3.0.0 → 3.0.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/{index-9725b4b4.js → index-91b93373.js} +5 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-progress.cjs.entry.js +25 -3
- package/dist/cjs/mds-progress.cjs.js +1 -1
- 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/components/mds-progress/mds-progress.js +8 -2
- package/dist/collection/components/mds-progress/test/mds-progress.stories.js +1 -1
- package/dist/collection/dictionary/file-extensions.js +114 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/components/mds-progress.js +24 -2
- package/dist/documentation.json +1 -1
- package/dist/esm/{index-9f9c0c97.js → index-c78d74f1.js} +5 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-progress.entry.js +25 -3
- package/dist/esm/mds-progress.js +2 -2
- package/dist/esm-es5/index-c78d74f1.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-progress.entry.js +1 -1
- package/dist/esm-es5/mds-progress.js +1 -1
- package/dist/mds-progress/mds-progress.esm.js +1 -1
- package/dist/mds-progress/mds-progress.js +1 -1
- package/dist/mds-progress/{p-c09df41d.system.js → p-1a7421ef.system.js} +2 -2
- package/dist/mds-progress/{p-93b285aa.js → p-3fa56e3f.js} +2 -2
- package/dist/mds-progress/p-4484605e.system.js +1 -0
- package/dist/mds-progress/p-ae143936.entry.js +1 -0
- package/dist/mds-progress/p-aed14e74.system.entry.js +1 -0
- package/dist/stats.json +35 -33
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/components/mds-progress/mds-progress.d.ts +1 -0
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/type/text.d.ts +2 -0
- package/documentation.json +9 -4
- package/package.json +1 -1
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/keyboard-manager.ts +2 -2
- package/src/components/mds-progress/mds-progress.tsx +9 -2
- package/src/components/mds-progress/test/mds-progress.stories.tsx +1 -1
- package/src/dictionary/file-extensions.ts +115 -56
- package/src/dictionary/text.ts +64 -0
- package/src/fixtures/icons.json +8 -0
- package/src/fixtures/iconsauce.json +5 -0
- package/src/meta/file-format/locale.el.json +39 -0
- package/src/meta/file-format/locale.en.json +39 -0
- package/src/meta/file-format/locale.es.json +39 -0
- package/src/meta/file-format/locale.it.json +39 -0
- package/src/type/text.ts +59 -0
- package/www/build/mds-progress.esm.js +1 -1
- package/www/build/mds-progress.js +1 -1
- package/www/build/{p-c09df41d.system.js → p-1a7421ef.system.js} +2 -2
- package/www/build/{p-93b285aa.js → p-3fa56e3f.js} +2 -2
- package/www/build/p-4484605e.system.js +1 -0
- package/www/build/p-ae143936.entry.js +1 -0
- package/www/build/p-aed14e74.system.entry.js +1 -0
- package/dist/esm-es5/index-9f9c0c97.js +0 -1
- package/dist/mds-progress/p-0e39acfd.system.js +0 -1
- package/dist/mds-progress/p-b8db6677.entry.js +0 -1
- package/dist/mds-progress/p-fafac9b1.system.entry.js +0 -1
- package/www/build/p-0e39acfd.system.js +0 -1
- package/www/build/p-b8db6677.entry.js +0 -1
- package/www/build/p-fafac9b1.system.entry.js +0 -1
package/dist/stats.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-04T16:28:22",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "22.11.0"
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
"fsNamespace": "mds-progress",
|
|
10
10
|
"components": 1,
|
|
11
11
|
"entries": 1,
|
|
12
|
-
"bundles":
|
|
12
|
+
"bundles": 94,
|
|
13
13
|
"outputs": [
|
|
14
14
|
{
|
|
15
15
|
"name": "dist-collection",
|
|
16
|
-
"files":
|
|
16
|
+
"files": 46,
|
|
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",
|
|
@@ -77,19 +78,19 @@
|
|
|
77
78
|
"files": 42,
|
|
78
79
|
"generatedFiles": [
|
|
79
80
|
"./dist/cjs/app-globals-3a1e7e63.js",
|
|
80
|
-
"./dist/cjs/index-
|
|
81
|
+
"./dist/cjs/index-91b93373.js",
|
|
81
82
|
"./dist/cjs/index.cjs.js",
|
|
82
83
|
"./dist/cjs/loader.cjs.js",
|
|
83
84
|
"./dist/cjs/mds-progress.cjs.entry.js",
|
|
84
85
|
"./dist/cjs/mds-progress.cjs.js",
|
|
85
86
|
"./dist/esm-es5/app-globals-0f993ce5.js",
|
|
86
|
-
"./dist/esm-es5/index-
|
|
87
|
+
"./dist/esm-es5/index-c78d74f1.js",
|
|
87
88
|
"./dist/esm-es5/index.js",
|
|
88
89
|
"./dist/esm-es5/loader.js",
|
|
89
90
|
"./dist/esm-es5/mds-progress.entry.js",
|
|
90
91
|
"./dist/esm-es5/mds-progress.js",
|
|
91
92
|
"./dist/esm/app-globals-0f993ce5.js",
|
|
92
|
-
"./dist/esm/index-
|
|
93
|
+
"./dist/esm/index-c78d74f1.js",
|
|
93
94
|
"./dist/esm/index.js",
|
|
94
95
|
"./dist/esm/loader.js",
|
|
95
96
|
"./dist/esm/mds-progress.entry.js",
|
|
@@ -99,25 +100,25 @@
|
|
|
99
100
|
"./dist/mds-progress/index.esm.js",
|
|
100
101
|
"./dist/mds-progress/mds-progress.esm.js",
|
|
101
102
|
"./dist/mds-progress/mds-progress.js",
|
|
102
|
-
"./dist/mds-progress/p-
|
|
103
|
+
"./dist/mds-progress/p-1a7421ef.system.js",
|
|
104
|
+
"./dist/mds-progress/p-3fa56e3f.js",
|
|
105
|
+
"./dist/mds-progress/p-4484605e.system.js",
|
|
103
106
|
"./dist/mds-progress/p-50ea2036.system.js",
|
|
104
107
|
"./dist/mds-progress/p-56ba5cbf.system.js",
|
|
105
|
-
"./dist/mds-progress/p-
|
|
106
|
-
"./dist/mds-progress/p-
|
|
107
|
-
"./dist/mds-progress/p-c09df41d.system.js",
|
|
108
|
+
"./dist/mds-progress/p-ae143936.entry.js",
|
|
109
|
+
"./dist/mds-progress/p-aed14e74.system.entry.js",
|
|
108
110
|
"./dist/mds-progress/p-e1255160.js",
|
|
109
|
-
"./dist/mds-progress/p-fafac9b1.system.entry.js",
|
|
110
111
|
"./www/build/index.esm.js",
|
|
111
112
|
"./www/build/mds-progress.esm.js",
|
|
112
113
|
"./www/build/mds-progress.js",
|
|
113
|
-
"./www/build/p-
|
|
114
|
+
"./www/build/p-1a7421ef.system.js",
|
|
115
|
+
"./www/build/p-3fa56e3f.js",
|
|
116
|
+
"./www/build/p-4484605e.system.js",
|
|
114
117
|
"./www/build/p-50ea2036.system.js",
|
|
115
118
|
"./www/build/p-56ba5cbf.system.js",
|
|
116
|
-
"./www/build/p-
|
|
117
|
-
"./www/build/p-
|
|
118
|
-
"./www/build/p-
|
|
119
|
-
"./www/build/p-e1255160.js",
|
|
120
|
-
"./www/build/p-fafac9b1.system.entry.js"
|
|
119
|
+
"./www/build/p-ae143936.entry.js",
|
|
120
|
+
"./www/build/p-aed14e74.system.entry.js",
|
|
121
|
+
"./www/build/p-e1255160.js"
|
|
121
122
|
]
|
|
122
123
|
},
|
|
123
124
|
{
|
|
@@ -150,12 +151,12 @@
|
|
|
150
151
|
"components": [
|
|
151
152
|
"mds-progress"
|
|
152
153
|
],
|
|
153
|
-
"bundleId": "p-
|
|
154
|
-
"fileName": "p-
|
|
154
|
+
"bundleId": "p-ae143936",
|
|
155
|
+
"fileName": "p-ae143936.entry.js",
|
|
155
156
|
"imports": [
|
|
156
|
-
"p-
|
|
157
|
+
"p-3fa56e3f.js"
|
|
157
158
|
],
|
|
158
|
-
"originalByteSize":
|
|
159
|
+
"originalByteSize": 8154
|
|
159
160
|
}
|
|
160
161
|
],
|
|
161
162
|
"esm": [
|
|
@@ -167,9 +168,9 @@
|
|
|
167
168
|
"bundleId": "mds-progress",
|
|
168
169
|
"fileName": "mds-progress.entry.js",
|
|
169
170
|
"imports": [
|
|
170
|
-
"index-
|
|
171
|
+
"index-c78d74f1.js"
|
|
171
172
|
],
|
|
172
|
-
"originalByteSize":
|
|
173
|
+
"originalByteSize": 8158
|
|
173
174
|
}
|
|
174
175
|
],
|
|
175
176
|
"es5": [
|
|
@@ -181,9 +182,9 @@
|
|
|
181
182
|
"bundleId": "mds-progress",
|
|
182
183
|
"fileName": "mds-progress.entry.js",
|
|
183
184
|
"imports": [
|
|
184
|
-
"index-
|
|
185
|
+
"index-c78d74f1.js"
|
|
185
186
|
],
|
|
186
|
-
"originalByteSize":
|
|
187
|
+
"originalByteSize": 8158
|
|
187
188
|
}
|
|
188
189
|
],
|
|
189
190
|
"system": [
|
|
@@ -192,12 +193,12 @@
|
|
|
192
193
|
"components": [
|
|
193
194
|
"mds-progress"
|
|
194
195
|
],
|
|
195
|
-
"bundleId": "p-
|
|
196
|
-
"fileName": "p-
|
|
196
|
+
"bundleId": "p-aed14e74.system",
|
|
197
|
+
"fileName": "p-aed14e74.system.entry.js",
|
|
197
198
|
"imports": [
|
|
198
|
-
"p-
|
|
199
|
+
"p-1a7421ef.system.js"
|
|
199
200
|
],
|
|
200
|
-
"originalByteSize":
|
|
201
|
+
"originalByteSize": 9159
|
|
201
202
|
}
|
|
202
203
|
],
|
|
203
204
|
"commonjs": [
|
|
@@ -209,9 +210,9 @@
|
|
|
209
210
|
"bundleId": "mds-progress.cjs",
|
|
210
211
|
"fileName": "mds-progress.cjs.entry.js",
|
|
211
212
|
"imports": [
|
|
212
|
-
"index-
|
|
213
|
+
"index-91b93373.js"
|
|
213
214
|
],
|
|
214
|
-
"originalByteSize":
|
|
215
|
+
"originalByteSize": 8223
|
|
215
216
|
}
|
|
216
217
|
]
|
|
217
218
|
},
|
|
@@ -524,7 +525,7 @@
|
|
|
524
525
|
"sourceMapPath": null,
|
|
525
526
|
"hasAttributeChangedCallbackFn": false,
|
|
526
527
|
"hasComponentWillLoadFn": true,
|
|
527
|
-
"hasComponentDidLoadFn":
|
|
528
|
+
"hasComponentDidLoadFn": true,
|
|
528
529
|
"hasComponentShouldUpdateFn": false,
|
|
529
530
|
"hasComponentWillUpdateFn": false,
|
|
530
531
|
"hasComponentDidUpdateFn": false,
|
|
@@ -594,12 +595,13 @@
|
|
|
594
595
|
],
|
|
595
596
|
"componentGraph": {
|
|
596
597
|
"sc-mds-progress": [
|
|
597
|
-
"p-
|
|
598
|
+
"p-3fa56e3f.js"
|
|
598
599
|
]
|
|
599
600
|
},
|
|
600
601
|
"sourceGraph": {
|
|
601
602
|
"./src/common/aria.ts": [],
|
|
602
603
|
"./src/common/date.ts": [],
|
|
604
|
+
"./src/common/device.ts": [],
|
|
603
605
|
"./src/common/file.ts": [],
|
|
604
606
|
"./src/common/icon.ts": [],
|
|
605
607
|
"./src/common/keyboard-manager.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, };
|
|
@@ -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 +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';
|
package/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-04T15:30:05",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.22.2",
|
|
@@ -615,6 +615,11 @@
|
|
|
615
615
|
"docstring": "",
|
|
616
616
|
"path": "src/components/mds-push-notification/meta/event-detail.ts"
|
|
617
617
|
},
|
|
618
|
+
"src/type/text.ts::TypographyHeadingTagType": {
|
|
619
|
+
"declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
|
|
620
|
+
"docstring": "",
|
|
621
|
+
"path": "src/type/text.ts"
|
|
622
|
+
},
|
|
618
623
|
"src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
|
|
619
624
|
"declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
|
|
620
625
|
"docstring": "",
|
|
@@ -646,7 +651,7 @@
|
|
|
646
651
|
"path": "src/components/mds-tab-item/meta/event-detail.ts"
|
|
647
652
|
},
|
|
648
653
|
"src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
|
|
649
|
-
"declaration": "export type SortDirectionType =\n | '
|
|
654
|
+
"declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
|
|
650
655
|
"docstring": "",
|
|
651
656
|
"path": "src/components/mds-table-header-cell/meta/types.ts"
|
|
652
657
|
},
|
|
@@ -655,10 +660,10 @@
|
|
|
655
660
|
"docstring": "",
|
|
656
661
|
"path": "src/components/mds-text/meta/types.ts"
|
|
657
662
|
},
|
|
658
|
-
"src/
|
|
663
|
+
"src/type/text.ts::TypographyTagType": {
|
|
659
664
|
"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'",
|
|
660
665
|
"docstring": "",
|
|
661
|
-
"path": "src/
|
|
666
|
+
"path": "src/type/text.ts"
|
|
662
667
|
},
|
|
663
668
|
"src/type/variant.ts::ThemeLuminanceVariantType": {
|
|
664
669
|
"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-progress",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "mds-progress 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",
|
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
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, Element, Host, h, Prop, Watch, State } from '@stencil/core'
|
|
2
2
|
import { DirectionType } from './meta/types'
|
|
3
3
|
import { ThemeVariantType } from '@type/variant'
|
|
4
|
+
import { removeAttributesIf, ifAttribute } from '@common/aria'
|
|
4
5
|
|
|
5
6
|
@Component({
|
|
6
7
|
tag: 'mds-progress',
|
|
@@ -37,10 +38,16 @@ export class MdsProgress {
|
|
|
37
38
|
this.setProgress(this.progress)
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
componentDidLoad (): void {
|
|
42
|
+
removeAttributesIf(this.element, 'aria-hidden', 'true', ['aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext', 'role'])
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
private setProgress (progress: number): void {
|
|
41
46
|
if (this.steps) {
|
|
42
47
|
this.currentStep = this.stepsList[Math.round(progress * (this.stepsList.length - 1))]
|
|
43
|
-
this.element
|
|
48
|
+
if (!ifAttribute(this.element, 'aria-hidden')) {
|
|
49
|
+
this.element.setAttribute('aria-valuetext', this.currentStep)
|
|
50
|
+
}
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
53
|
|
|
@@ -56,7 +63,7 @@ export class MdsProgress {
|
|
|
56
63
|
|
|
57
64
|
render () {
|
|
58
65
|
return (
|
|
59
|
-
<Host aria-valuemax="100" aria-valuemin="0" aria-valuenow={ Math.round(this.progress * 100) } role="progressbar">
|
|
66
|
+
<Host aria-valuemax="100" aria-valuemin="0" aria-valuenow={ !ifAttribute(this.element, 'aria-hidden') && Math.round(this.progress * 100) } role="progressbar">
|
|
60
67
|
<div class="contrast-area"></div>
|
|
61
68
|
<div class="progress" style={
|
|
62
69
|
this.direction === 'horizontal'
|
|
@@ -11,64 +11,123 @@ interface ExtensionInfo {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const fileExtensionsDictionary: FileExtenstion = {
|
|
14
|
-
'7z': { format: 'archive', description: '
|
|
15
|
-
ace: { format: 'archive', description: '
|
|
16
|
-
ai: { format: 'vector', description: '
|
|
17
|
-
dart: { format: 'code', description: '
|
|
18
|
-
db: { format: 'data', description: '
|
|
19
|
-
default: { format: 'attachment', description: '
|
|
20
|
-
dmg: { format: 'executable', description: '
|
|
21
|
-
doc: { format: 'text', description: '
|
|
22
|
-
docm: { format: 'text', description: '
|
|
23
|
-
docx: { format: 'text', description: '
|
|
24
|
-
eml: { format: 'email', description: '
|
|
25
|
-
eps: { format: 'vector', description: '
|
|
26
|
-
exe: { format: 'executable', description: '
|
|
27
|
-
flac: { format: 'audio', description: '
|
|
28
|
-
gif: { format: 'image', description: '
|
|
29
|
-
htm: { format: 'markup', description: '
|
|
30
|
-
heic: { format: 'image', description: '
|
|
31
|
-
html: { format: 'markup', description: '
|
|
32
|
-
jpe: { format: 'image', description: '
|
|
33
|
-
jpeg: { format: 'image', description: '
|
|
34
|
-
jpg: { format: 'image', description: '
|
|
35
|
-
js: { format: 'code', description: '
|
|
36
|
-
json: { format: 'data', description: '
|
|
37
|
-
jsx: { format: 'code', description: '
|
|
38
|
-
m2v: { format: 'video', description: '
|
|
39
|
-
mp2: { format: 'audio', description: '
|
|
40
|
-
mp3: { format: 'audio', description: '
|
|
41
|
-
mp4: { format: 'video', description: '
|
|
42
|
-
mp4v: { format: 'video', description: '
|
|
43
|
-
mpeg: { format: 'video', description: '
|
|
44
|
-
mpg4: { format: 'video', description: '
|
|
45
|
-
mpg: { format: 'video', description: '
|
|
46
|
-
mpga: { format: 'audio', description: '
|
|
47
|
-
odp: { format: 'slide', description: '
|
|
48
|
-
ods: { format: 'spreadsheet', description: '
|
|
49
|
-
odt: { format: 'text', description: '
|
|
50
|
-
pdf: { format: 'document', description: '
|
|
51
|
-
php: { format: 'code', description: '
|
|
52
|
-
png: { format: 'image', description: '
|
|
53
|
-
ppt: { format: 'slide', description: '
|
|
54
|
-
rar: { format: 'archive', description: '
|
|
55
|
-
rtf: { format: 'text', description: '
|
|
56
|
-
sass: { format: 'code', description: '
|
|
57
|
-
shtml: { format: 'markup', description: '
|
|
58
|
-
svg: { format: 'vector', description: '
|
|
59
|
-
tar: { format: 'archive', description: '
|
|
60
|
-
tiff: { format: 'image', description: '
|
|
61
|
-
ts: { format: 'code', description: '
|
|
62
|
-
tsx: { format: 'code', description: '
|
|
63
|
-
txt: { format: 'text', description: '
|
|
64
|
-
wav: { format: 'audio', description: '
|
|
65
|
-
webp: { format: 'image', description: '
|
|
66
|
-
xar: { format: 'archive', description: '
|
|
67
|
-
xls: { format: 'spreadsheet', description: '
|
|
68
|
-
xlsx: { format: 'spreadsheet', description: '
|
|
69
|
-
zip: { format: 'archive', description: '
|
|
14
|
+
'7z': { format: 'archive', description: 'compressedArchive' },
|
|
15
|
+
ace: { format: 'archive', description: 'compressedArchive' },
|
|
16
|
+
ai: { format: 'vector', description: 'fileAI' },
|
|
17
|
+
dart: { format: 'code', description: 'dart' },
|
|
18
|
+
db: { format: 'data', description: 'fileDB' },
|
|
19
|
+
default: { format: 'attachment', description: 'unknown' },
|
|
20
|
+
dmg: { format: 'executable', description: 'appleDiskImage' },
|
|
21
|
+
doc: { format: 'text', description: 'documentMS' },
|
|
22
|
+
docm: { format: 'text', description: 'documentMS' },
|
|
23
|
+
docx: { format: 'text', description: 'compressedDocumentMS' },
|
|
24
|
+
eml: { format: 'email', description: 'email' },
|
|
25
|
+
eps: { format: 'vector', description: 'fileEPS' },
|
|
26
|
+
exe: { format: 'executable', description: 'fileEXE' },
|
|
27
|
+
flac: { format: 'audio', description: 'uncompressedAudio' },
|
|
28
|
+
gif: { format: 'image', description: 'compressedImage', preview: true },
|
|
29
|
+
htm: { format: 'markup', description: 'documentWeb' },
|
|
30
|
+
heic: { format: 'image', description: 'imageHEFF' },
|
|
31
|
+
html: { format: 'markup', description: 'documentWeb' },
|
|
32
|
+
jpe: { format: 'image', description: 'compressedImage', preview: true },
|
|
33
|
+
jpeg: { format: 'image', description: 'compressedImage', preview: true },
|
|
34
|
+
jpg: { format: 'image', description: 'compressedImage', preview: true },
|
|
35
|
+
js: { format: 'code', description: 'fileJS' },
|
|
36
|
+
json: { format: 'data', description: 'fileJSON' },
|
|
37
|
+
jsx: { format: 'code', description: 'fileJS' },
|
|
38
|
+
m2v: { format: 'video', description: 'videoSD' },
|
|
39
|
+
mp2: { format: 'audio', description: 'compressedAudio' },
|
|
40
|
+
mp3: { format: 'audio', description: 'compressedAudio' },
|
|
41
|
+
mp4: { format: 'video', description: 'videoHD' },
|
|
42
|
+
mp4v: { format: 'video', description: 'videoHD' },
|
|
43
|
+
mpeg: { format: 'video', description: 'videoSD' },
|
|
44
|
+
mpg4: { format: 'video', description: 'videoSD' },
|
|
45
|
+
mpg: { format: 'video', description: 'videoSD' },
|
|
46
|
+
mpga: { format: 'audio', description: 'compressedAudio' },
|
|
47
|
+
odp: { format: 'slide', description: 'slideLO' },
|
|
48
|
+
ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
|
|
49
|
+
odt: { format: 'text', description: 'documentLO' },
|
|
50
|
+
pdf: { format: 'document', description: 'documentAdobe' },
|
|
51
|
+
php: { format: 'code', description: 'filePHP' },
|
|
52
|
+
png: { format: 'image', description: 'imagePNG', preview: true },
|
|
53
|
+
ppt: { format: 'slide', description: 'slidePowerPoint' },
|
|
54
|
+
rar: { format: 'archive', description: 'compressedArchive' },
|
|
55
|
+
rtf: { format: 'text', description: 'documentRTF' },
|
|
56
|
+
sass: { format: 'code', description: 'fileSASS' },
|
|
57
|
+
shtml: { format: 'markup', description: 'documentWeb' },
|
|
58
|
+
svg: { format: 'vector', description: 'imageSVG', preview: true },
|
|
59
|
+
tar: { format: 'archive', description: 'uncompressedArchive' },
|
|
60
|
+
tiff: { format: 'image', description: 'imageTIFF' },
|
|
61
|
+
ts: { format: 'code', description: 'fileTS' },
|
|
62
|
+
tsx: { format: 'code', description: 'fileTSX' },
|
|
63
|
+
txt: { format: 'text', description: 'documentTXT' },
|
|
64
|
+
wav: { format: 'audio', description: 'uncompressedAudio' },
|
|
65
|
+
webp: { format: 'image', description: 'imageWEBP', preview: true },
|
|
66
|
+
xar: { format: 'archive', description: 'compressedArchive' },
|
|
67
|
+
xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
68
|
+
xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
69
|
+
zip: { format: 'archive', description: 'compressedArchive' },
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
// const fileExtensionsDictionary: FileExtenstion = {
|
|
73
|
+
// '7z': { format: 'archive', description: 'Archivio compresso' },
|
|
74
|
+
// ace: { format: 'archive', description: 'Archivio compresso' },
|
|
75
|
+
// ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
76
|
+
// dart: { format: 'code', description: 'Dart' },
|
|
77
|
+
// db: { format: 'data', description: 'File di database' },
|
|
78
|
+
// default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
79
|
+
// dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
80
|
+
// doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
81
|
+
// docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
82
|
+
// docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
83
|
+
// eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
84
|
+
// eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
85
|
+
// exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
86
|
+
// flac: { format: 'audio', description: 'Audio non compresso' },
|
|
87
|
+
// gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
88
|
+
// htm: { format: 'markup', description: 'Pagina web' },
|
|
89
|
+
// heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
90
|
+
// html: { format: 'markup', description: 'Pagina web' },
|
|
91
|
+
// jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
92
|
+
// jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
93
|
+
// jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
94
|
+
// js: { format: 'code', description: 'JavaScript' },
|
|
95
|
+
// json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
96
|
+
// jsx: { format: 'code', description: 'JavaScript' },
|
|
97
|
+
// m2v: { format: 'video', description: 'Filmato SD' },
|
|
98
|
+
// mp2: { format: 'audio', description: 'Audio compresso' },
|
|
99
|
+
// mp3: { format: 'audio', description: 'Audio compresso' },
|
|
100
|
+
// mp4: { format: 'video', description: 'Filmato HD' },
|
|
101
|
+
// mp4v: { format: 'video', description: 'Filmato HD' },
|
|
102
|
+
// mpeg: { format: 'video', description: 'Filmato SD' },
|
|
103
|
+
// mpg4: { format: 'video', description: 'Filmato SD' },
|
|
104
|
+
// mpg: { format: 'video', description: 'Filmato SD' },
|
|
105
|
+
// mpga: { format: 'audio', description: 'Audio compresso' },
|
|
106
|
+
// odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
107
|
+
// ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
108
|
+
// odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
109
|
+
// pdf: { format: 'document', description: 'Documento Adobe' },
|
|
110
|
+
// php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
111
|
+
// png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
112
|
+
// ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
113
|
+
// rar: { format: 'archive', description: 'Archivio compresso' },
|
|
114
|
+
// rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
115
|
+
// sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
116
|
+
// shtml: { format: 'markup', description: 'Pagina web' },
|
|
117
|
+
// svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
118
|
+
// tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
119
|
+
// tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
120
|
+
// ts: { format: 'code', description: 'TypeScript' },
|
|
121
|
+
// tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
122
|
+
// txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
123
|
+
// wav: { format: 'audio', description: 'Audio non compresso' },
|
|
124
|
+
// webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
125
|
+
// xar: { format: 'archive', description: 'Archivio compresso' },
|
|
126
|
+
// xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
127
|
+
// xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
128
|
+
// zip: { format: 'archive', description: 'Archivio compresso' },
|
|
129
|
+
// }
|
|
130
|
+
|
|
72
131
|
const genericMimeToExt: Map<string, string[]> = new Map([
|
|
73
132
|
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
74
133
|
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
package/src/dictionary/text.ts
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
const typographyTagDictionary = [
|
|
2
|
+
'abbr',
|
|
3
|
+
'address',
|
|
4
|
+
'article',
|
|
5
|
+
'b',
|
|
6
|
+
'bdo',
|
|
7
|
+
'blockquote',
|
|
8
|
+
'cite',
|
|
9
|
+
'code',
|
|
10
|
+
'dd',
|
|
11
|
+
'del',
|
|
12
|
+
'details',
|
|
13
|
+
'dfn',
|
|
14
|
+
'div',
|
|
15
|
+
'dl',
|
|
16
|
+
'dt',
|
|
17
|
+
'em',
|
|
18
|
+
'figcaption',
|
|
19
|
+
'h1',
|
|
20
|
+
'h2',
|
|
21
|
+
'h3',
|
|
22
|
+
'h4',
|
|
23
|
+
'h5',
|
|
24
|
+
'h6',
|
|
25
|
+
'i',
|
|
26
|
+
'ins',
|
|
27
|
+
'kbd',
|
|
28
|
+
'label',
|
|
29
|
+
'legend',
|
|
30
|
+
'li',
|
|
31
|
+
'mark',
|
|
32
|
+
'ol',
|
|
33
|
+
'p',
|
|
34
|
+
'pre',
|
|
35
|
+
'q',
|
|
36
|
+
'rb',
|
|
37
|
+
'rt',
|
|
38
|
+
'ruby',
|
|
39
|
+
's',
|
|
40
|
+
'samp',
|
|
41
|
+
'small',
|
|
42
|
+
'span',
|
|
43
|
+
'strong',
|
|
44
|
+
'sub',
|
|
45
|
+
'summary',
|
|
46
|
+
'sup',
|
|
47
|
+
'time',
|
|
48
|
+
'u',
|
|
49
|
+
'ul',
|
|
50
|
+
'var',
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
const typographyHeadingTagDictionary = [
|
|
54
|
+
'h1',
|
|
55
|
+
'h2',
|
|
56
|
+
'h3',
|
|
57
|
+
'h4',
|
|
58
|
+
'h5',
|
|
59
|
+
'h6',
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
|
|
1
63
|
const truncateDictionary = [
|
|
2
64
|
'all',
|
|
3
65
|
'none',
|
|
@@ -6,4 +68,6 @@ const truncateDictionary = [
|
|
|
6
68
|
|
|
7
69
|
export {
|
|
8
70
|
truncateDictionary,
|
|
71
|
+
typographyHeadingTagDictionary,
|
|
72
|
+
typographyTagDictionary,
|
|
9
73
|
}
|