@maggioli-design-system/mds-progress 3.0.1 → 3.1.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-91b93373.js → index-abfa4aa9.js} +161 -66
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-progress.cjs.entry.js +14 -3
- package/dist/cjs/mds-progress.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/floating-controller.js +180 -0
- package/dist/collection/common/slot.js +28 -0
- package/dist/collection/common/string.js +30 -0
- package/dist/collection/components/mds-progress/mds-progress.css +119 -0
- package/dist/collection/components/mds-progress/mds-progress.js +20 -1
- package/dist/collection/dictionary/animation.js +5 -0
- package/dist/collection/dictionary/file-extensions.js +6 -59
- package/dist/collection/dictionary/keyboard.js +84 -0
- package/dist/collection/dictionary/tree.js +13 -0
- package/dist/collection/fixtures/filenames.js +62 -1
- package/dist/collection/type/animation.js +1 -0
- package/dist/collection/type/keyboard.js +1 -0
- package/dist/collection/type/tree.js +1 -0
- package/dist/collection/type/variant-file-format.js +5 -0
- package/dist/components/mds-progress.js +13 -2
- package/dist/documentation.d.ts +8 -0
- package/dist/documentation.json +14 -6
- package/dist/esm/{index-c78d74f1.js → index-a89959e6.js} +161 -66
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-progress.entry.js +14 -3
- package/dist/esm/mds-progress.js +3 -3
- package/dist/esm-es5/index-a89959e6.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-4484605e.system.js → p-2b265ffa.system.js} +1 -1
- package/dist/mds-progress/p-321f64dc.system.entry.js +1 -0
- package/dist/mds-progress/p-64876922.system.js +2 -0
- package/dist/mds-progress/p-8a9536f1.js +2 -0
- package/dist/mds-progress/p-a2e9544b.entry.js +1 -0
- package/dist/stats.json +77 -39
- package/dist/types/common/floating-controller.d.ts +46 -0
- package/dist/types/common/slot.d.ts +4 -0
- package/dist/types/common/string.d.ts +4 -0
- package/dist/types/dictionary/animation.d.ts +2 -0
- package/dist/types/dictionary/keyboard.d.ts +2 -0
- package/dist/types/dictionary/tree.d.ts +4 -0
- 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/keyboard.d.ts +12 -0
- package/dist/types/type/tree.d.ts +3 -0
- package/dist/types/type/variant-file-format.d.ts +1 -1
- package/documentation.json +75 -17
- package/package.json +3 -3
- package/src/common/floating-controller.ts +263 -0
- package/src/common/slot.ts +35 -0
- package/src/common/string.ts +42 -0
- package/src/components/mds-progress/mds-progress.css +1 -0
- package/src/dictionary/animation.ts +8 -0
- package/src/dictionary/file-extensions.ts +6 -60
- package/src/dictionary/keyboard.ts +87 -0
- package/src/dictionary/tree.ts +21 -0
- package/src/fixtures/filenames.ts +63 -0
- package/src/fixtures/icons.json +39 -1
- package/src/fixtures/iconsauce.json +6 -0
- package/src/meta/file-format/locale.el.json +26 -21
- package/src/meta/file-format/locale.en.json +26 -21
- package/src/meta/file-format/locale.es.json +26 -21
- package/src/meta/file-format/locale.it.json +26 -21
- package/src/meta/keyboard/keys.json +83 -0
- package/src/tailwind/components.css +11 -0
- package/src/tailwind/fouc.css +118 -0
- package/src/type/animation.ts +3 -0
- package/src/type/file-types.ts +6 -0
- package/src/type/keyboard.ts +93 -0
- package/src/type/tree.ts +12 -0
- package/src/type/variant-file-format.ts +6 -0
- package/www/build/mds-progress.esm.js +1 -1
- package/www/build/mds-progress.js +1 -1
- package/www/build/{p-4484605e.system.js → p-2b265ffa.system.js} +1 -1
- package/www/build/p-321f64dc.system.entry.js +1 -0
- package/www/build/p-64876922.system.js +2 -0
- package/www/build/p-8a9536f1.js +2 -0
- package/www/build/p-a2e9544b.entry.js +1 -0
- package/dist/esm-es5/index-c78d74f1.js +0 -1
- package/dist/mds-progress/p-1a7421ef.system.js +0 -2
- package/dist/mds-progress/p-3fa56e3f.js +0 -2
- package/dist/mds-progress/p-ae143936.entry.js +0 -1
- package/dist/mds-progress/p-aed14e74.system.entry.js +0 -1
- package/www/build/p-1a7421ef.system.js +0 -2
- package/www/build/p-3fa56e3f.js +0 -2
- package/www/build/p-ae143936.entry.js +0 -1
- package/www/build/p-aed14e74.system.entry.js +0 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { arrow, autoPlacement, autoUpdate, computePosition, flip, offset, shift, } from "@floating-ui/dom";
|
|
2
|
+
import { cssDurationToMilliseconds } from "./unit";
|
|
3
|
+
import { setAttributeIfEmpty } from "./aria";
|
|
4
|
+
export class FloatingController {
|
|
5
|
+
constructor(host, arrowEl) {
|
|
6
|
+
this.arrowInset = (middleware, arrowPosition) => {
|
|
7
|
+
const { arrow } = middleware;
|
|
8
|
+
const inset = { bottom: '', left: '', right: '', top: '' };
|
|
9
|
+
if (arrow === undefined) {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
switch (arrowPosition) {
|
|
13
|
+
case 'bottom':
|
|
14
|
+
inset.left = arrow.x !== null ? `${arrow.x}px` : '';
|
|
15
|
+
inset.top = '100%';
|
|
16
|
+
break;
|
|
17
|
+
case 'left':
|
|
18
|
+
inset.right = '100%';
|
|
19
|
+
inset.top = arrow.y !== null ? `${arrow.y}px` : '';
|
|
20
|
+
break;
|
|
21
|
+
case 'right':
|
|
22
|
+
inset.left = '100%';
|
|
23
|
+
inset.top = arrow.y !== null ? `${arrow.y}px` : '';
|
|
24
|
+
break;
|
|
25
|
+
case 'top':
|
|
26
|
+
inset.left = arrow.x !== null ? `${arrow.x}px` : '';
|
|
27
|
+
inset.top = '';
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
return inset;
|
|
33
|
+
};
|
|
34
|
+
this.arrowTransform = (arrowPosition) => {
|
|
35
|
+
let transformProps = this._host.arrow && this._host.visible ? 'scale(1)' : 'scale(0)';
|
|
36
|
+
switch (arrowPosition) {
|
|
37
|
+
case 'bottom':
|
|
38
|
+
transformProps = `rotate(180deg) ${transformProps} translate(0, -100%)`;
|
|
39
|
+
break;
|
|
40
|
+
case 'left':
|
|
41
|
+
transformProps = `rotate(-90deg) ${transformProps} translate(50%, -50%)`;
|
|
42
|
+
break;
|
|
43
|
+
case 'right':
|
|
44
|
+
transformProps = `rotate(90deg) ${transformProps} translate(-50%, -50%)`;
|
|
45
|
+
break;
|
|
46
|
+
case 'top':
|
|
47
|
+
transformProps = `rotate(0deg) ${transformProps} translate(0, 0)`;
|
|
48
|
+
break;
|
|
49
|
+
default:
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
return { transform: transformProps };
|
|
53
|
+
};
|
|
54
|
+
this.arrowTransformOrigin = (arrowPosition) => {
|
|
55
|
+
switch (arrowPosition) {
|
|
56
|
+
case 'bottom':
|
|
57
|
+
return { transformOrigin: 'center top' };
|
|
58
|
+
case 'left':
|
|
59
|
+
return { transformOrigin: 'right center' };
|
|
60
|
+
case 'right':
|
|
61
|
+
return { transformOrigin: 'left center' };
|
|
62
|
+
case 'top':
|
|
63
|
+
return { transformOrigin: 'center bottom' };
|
|
64
|
+
default:
|
|
65
|
+
return { transformOrigin: 'center top' };
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
this.calculatePosition = () => {
|
|
69
|
+
if (!this._caller)
|
|
70
|
+
return;
|
|
71
|
+
const middleware = new Array();
|
|
72
|
+
const config = {};
|
|
73
|
+
if (this._host.shiftPadding) {
|
|
74
|
+
config.padding = this._host.shiftPadding;
|
|
75
|
+
}
|
|
76
|
+
if (this._host.autoPlacement) {
|
|
77
|
+
middleware.push(autoPlacement());
|
|
78
|
+
}
|
|
79
|
+
if (this._host.offset) {
|
|
80
|
+
middleware.push(offset(this._host.offset));
|
|
81
|
+
}
|
|
82
|
+
if (!this._host.autoPlacement && this._host.flip) {
|
|
83
|
+
middleware.push(flip(config));
|
|
84
|
+
}
|
|
85
|
+
if (this._host.shift) {
|
|
86
|
+
middleware.push(shift(config));
|
|
87
|
+
}
|
|
88
|
+
if (this.arrowEl && this._host.arrow) {
|
|
89
|
+
middleware.push(arrow({
|
|
90
|
+
element: this.arrowEl,
|
|
91
|
+
padding: this._host.arrowPadding,
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
computePosition(this._caller, this._host, {
|
|
95
|
+
middleware,
|
|
96
|
+
placement: this._host.placement,
|
|
97
|
+
strategy: this._host.strategy,
|
|
98
|
+
}).then(({ x, y, placement, middlewareData }) => {
|
|
99
|
+
Object.assign(this._host.style, {
|
|
100
|
+
left: `${x}px`,
|
|
101
|
+
top: `${y}px`,
|
|
102
|
+
});
|
|
103
|
+
const arrowStyle = {};
|
|
104
|
+
const arrowPosition = {
|
|
105
|
+
top: 'bottom',
|
|
106
|
+
right: 'left',
|
|
107
|
+
bottom: 'top',
|
|
108
|
+
left: 'right',
|
|
109
|
+
}[placement.split('-')[0]];
|
|
110
|
+
if (arrowPosition && this.arrowEl) {
|
|
111
|
+
Object.assign(arrowStyle, this.arrowTransform(arrowPosition));
|
|
112
|
+
Object.assign(arrowStyle, this.arrowInset(middlewareData, arrowPosition));
|
|
113
|
+
Object.assign(arrowStyle, this.arrowTransformOrigin(arrowPosition));
|
|
114
|
+
Object.assign(this.arrowEl.style, arrowStyle);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
this._host = host;
|
|
119
|
+
this.arrowEl = arrowEl;
|
|
120
|
+
}
|
|
121
|
+
updateCaller(target) {
|
|
122
|
+
var _a, _b, _c;
|
|
123
|
+
// search caller in document or rootNode of host (if target is in shadowDOM)
|
|
124
|
+
const caller = (_c = (_b = (_a = this._host.parentElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(target)) !== null && _c !== void 0 ? _c : this._host.getRootNode().querySelector(target);
|
|
125
|
+
if (!caller) {
|
|
126
|
+
throw Error(`Target not found: ${target}`);
|
|
127
|
+
}
|
|
128
|
+
this._caller = caller;
|
|
129
|
+
setAttributeIfEmpty(this._caller, 'aria-haspopup', 'true');
|
|
130
|
+
setAttributeIfEmpty(this._caller, 'aria-controls', target);
|
|
131
|
+
setAttributeIfEmpty(this._host, 'role', 'menu');
|
|
132
|
+
setAttributeIfEmpty(this._host, 'aria-labelledby', target);
|
|
133
|
+
return caller;
|
|
134
|
+
}
|
|
135
|
+
updatePosition() {
|
|
136
|
+
if (this.cleanupAutoUpdate)
|
|
137
|
+
this.cleanupAutoUpdate();
|
|
138
|
+
this.cleanupAutoUpdate = autoUpdate(this._caller, this._host, this.calculatePosition);
|
|
139
|
+
}
|
|
140
|
+
dismiss() {
|
|
141
|
+
this.cleanupAutoUpdate();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export class Backdrop {
|
|
145
|
+
constructor(backdropId) {
|
|
146
|
+
this.defaultBackdropId = 'magma-backdrop';
|
|
147
|
+
this.backdropBackgroundVisible = 'rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))';
|
|
148
|
+
this.backdropBackgroundHidden = 'rgba(var(--magma-backdrop-color, 0 0 0) / 0)';
|
|
149
|
+
this.backdropId = backdropId !== null && backdropId !== void 0 ? backdropId : this.defaultBackdropId;
|
|
150
|
+
this.cssBackdropZIndex = `var(--${this.backdropId}-z-index, 4000)`;
|
|
151
|
+
this.cssBackdropDuration = `var(--${this.backdropId}-animation-duration, 300ms)`;
|
|
152
|
+
}
|
|
153
|
+
attachBackdrop() {
|
|
154
|
+
if (!this.backdropEl) {
|
|
155
|
+
this.backdropEl = document.createElement('div');
|
|
156
|
+
this.backdropEl.className = this.backdropId;
|
|
157
|
+
this.backdropEl.style.inset = '0';
|
|
158
|
+
this.backdropEl.style.pointerEvents = 'none';
|
|
159
|
+
this.backdropEl.style.position = 'fixed';
|
|
160
|
+
this.backdropEl.style.transition = `background-color ${this.cssBackdropDuration} ease-out`;
|
|
161
|
+
this.backdropEl.style.zIndex = this.cssBackdropZIndex;
|
|
162
|
+
}
|
|
163
|
+
this.backdropEl.style.backgroundColor = this.backdropBackgroundHidden;
|
|
164
|
+
document.body.appendChild(this.backdropEl);
|
|
165
|
+
clearTimeout(this.backdropTimer);
|
|
166
|
+
this.backdropTimer = setTimeout(() => {
|
|
167
|
+
this.backdropEl.style.backgroundColor = this.backdropBackgroundVisible;
|
|
168
|
+
}, 1);
|
|
169
|
+
}
|
|
170
|
+
detachBackdrop() {
|
|
171
|
+
if (!this.backdropEl) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
this.backdropEl.style.backgroundColor = 'transparent';
|
|
175
|
+
clearTimeout(this.backdropTimer);
|
|
176
|
+
this.backdropTimer = setTimeout(() => {
|
|
177
|
+
this.backdropEl.remove();
|
|
178
|
+
}, cssDurationToMilliseconds(this.cssBackdropDuration));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const hasSlottedElements = (el, name) => {
|
|
2
|
+
var _a;
|
|
3
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])';
|
|
4
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
5
|
+
if (slot) {
|
|
6
|
+
return slot.assignedElements({ flatten: true }).length > 0;
|
|
7
|
+
}
|
|
8
|
+
return false;
|
|
9
|
+
};
|
|
10
|
+
const hasSlottedNodes = (el, name) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])';
|
|
13
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
14
|
+
if (slot) {
|
|
15
|
+
return slot.assignedNodes().length > 0;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
const hasSlotted = (el, name) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])';
|
|
22
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
23
|
+
if (slot) {
|
|
24
|
+
return slot.assignedNodes().length > 0 || slot.assignedElements().length > 0;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
};
|
|
28
|
+
export { hasSlottedElements, hasSlottedNodes, hasSlotted, };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const levenshteinDistance = (a, b) => {
|
|
2
|
+
const dp = Array.from({ length: a.length + 1 }, (_, i) =>
|
|
3
|
+
// eslint-disable-next-line no-nested-ternary
|
|
4
|
+
Array.from({ length: b.length + 1 }, (_, j) => (i === 0 ? j : j === 0 ? i : 0)));
|
|
5
|
+
for (let i = 1; i <= a.length; i++) {
|
|
6
|
+
for (let j = 1; j <= b.length; j++) {
|
|
7
|
+
if (a[i - 1] === b[j - 1]) {
|
|
8
|
+
dp[i][j] = dp[i - 1][j - 1];
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
dp[i][j] = 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return dp[a.length][b.length];
|
|
16
|
+
};
|
|
17
|
+
const closest = (input, validCodes) => {
|
|
18
|
+
let [closest] = validCodes;
|
|
19
|
+
let minDistance = levenshteinDistance(input, closest);
|
|
20
|
+
for (const code of validCodes) {
|
|
21
|
+
const distance = levenshteinDistance(input, code);
|
|
22
|
+
if (distance < minDistance) {
|
|
23
|
+
minDistance = distance;
|
|
24
|
+
closest = code;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return closest;
|
|
28
|
+
};
|
|
29
|
+
const firstLetterUppercase = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
30
|
+
export { closest, firstLetterUppercase, levenshteinDistance, };
|
|
@@ -181,3 +181,122 @@
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
:host(:not(:is([hydrated], .hydrated))) {
|
|
185
|
+
animation-duration: 0s;
|
|
186
|
+
border-color: transparent;
|
|
187
|
+
box-shadow: 0 0 0 transparent;
|
|
188
|
+
opacity: 0;
|
|
189
|
+
outline-color: transparent;
|
|
190
|
+
transition-delay: 0s;
|
|
191
|
+
transition-duration: 0s;
|
|
192
|
+
visibility: hidden;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */
|
|
196
|
+
|
|
197
|
+
mds-accordion:not(:is([hydrated], .hydrated)),
|
|
198
|
+
mds-accordion-item:not(:is([hydrated], .hydrated)),
|
|
199
|
+
mds-accordion-timer:not(:is([hydrated], .hydrated)),
|
|
200
|
+
mds-accordion-timer-item:not(:is([hydrated], .hydrated)),
|
|
201
|
+
mds-author:not(:is([hydrated], .hydrated)),
|
|
202
|
+
mds-avatar:not(:is([hydrated], .hydrated)),
|
|
203
|
+
mds-badge:not(:is([hydrated], .hydrated)),
|
|
204
|
+
mds-banner:not(:is([hydrated], .hydrated)),
|
|
205
|
+
mds-benchmark-bar:not(:is([hydrated], .hydrated)),
|
|
206
|
+
mds-bibliography:not(:is([hydrated], .hydrated)),
|
|
207
|
+
mds-breadcrumb:not(:is([hydrated], .hydrated)),
|
|
208
|
+
mds-breadcrumb-item:not(:is([hydrated], .hydrated)),
|
|
209
|
+
mds-button:not(:is([hydrated], .hydrated)),
|
|
210
|
+
mds-card:not(:is([hydrated], .hydrated)),
|
|
211
|
+
mds-card-content:not(:is([hydrated], .hydrated)),
|
|
212
|
+
mds-card-footer:not(:is([hydrated], .hydrated)),
|
|
213
|
+
mds-card-header:not(:is([hydrated], .hydrated)),
|
|
214
|
+
mds-card-media:not(:is([hydrated], .hydrated)),
|
|
215
|
+
mds-chip:not(:is([hydrated], .hydrated)),
|
|
216
|
+
mds-details:not(:is([hydrated], .hydrated)),
|
|
217
|
+
mds-dropdown:not(:is([hydrated], .hydrated)),
|
|
218
|
+
mds-entity:not(:is([hydrated], .hydrated)),
|
|
219
|
+
mds-file:not(:is([hydrated], .hydrated)),
|
|
220
|
+
mds-file-preview:not(:is([hydrated], .hydrated)),
|
|
221
|
+
mds-filter:not(:is([hydrated], .hydrated)),
|
|
222
|
+
mds-filter-item:not(:is([hydrated], .hydrated)),
|
|
223
|
+
mds-header:not(:is([hydrated], .hydrated)),
|
|
224
|
+
mds-header-bar:not(:is([hydrated], .hydrated)),
|
|
225
|
+
mds-help:not(:is([hydrated], .hydrated)),
|
|
226
|
+
mds-horizontal-scroll:not(:is([hydrated], .hydrated)),
|
|
227
|
+
mds-hr:not(:is([hydrated], .hydrated)),
|
|
228
|
+
mds-icon:not(:is([hydrated], .hydrated)),
|
|
229
|
+
mds-img:not(:is([hydrated], .hydrated)),
|
|
230
|
+
mds-input:not(:is([hydrated], .hydrated)),
|
|
231
|
+
mds-input-field:not(:is([hydrated], .hydrated)),
|
|
232
|
+
mds-input-range:not(:is([hydrated], .hydrated)),
|
|
233
|
+
mds-input-select:not(:is([hydrated], .hydrated)),
|
|
234
|
+
mds-input-switch:not(:is([hydrated], .hydrated)),
|
|
235
|
+
mds-input-tip:not(:is([hydrated], .hydrated)),
|
|
236
|
+
mds-input-tip-item:not(:is([hydrated], .hydrated)),
|
|
237
|
+
mds-input-upload:not(:is([hydrated], .hydrated)),
|
|
238
|
+
mds-keyboard:not(:is([hydrated], .hydrated)),
|
|
239
|
+
mds-keyboard-key:not(:is([hydrated], .hydrated)),
|
|
240
|
+
mds-kpi:not(:is([hydrated], .hydrated)),
|
|
241
|
+
mds-kpi-item:not(:is([hydrated], .hydrated)),
|
|
242
|
+
mds-label:not(:is([hydrated], .hydrated)),
|
|
243
|
+
mds-list:not(:is([hydrated], .hydrated)),
|
|
244
|
+
mds-list-item:not(:is([hydrated], .hydrated)),
|
|
245
|
+
mds-modal:not(:is([hydrated], .hydrated)),
|
|
246
|
+
mds-note:not(:is([hydrated], .hydrated)),
|
|
247
|
+
mds-notification:not(:is([hydrated], .hydrated)),
|
|
248
|
+
mds-paginator:not(:is([hydrated], .hydrated)),
|
|
249
|
+
mds-paginator-item:not(:is([hydrated], .hydrated)),
|
|
250
|
+
mds-pref:not(:is([hydrated], .hydrated)),
|
|
251
|
+
mds-pref-animation:not(:is([hydrated], .hydrated)),
|
|
252
|
+
mds-pref-consumption:not(:is([hydrated], .hydrated)),
|
|
253
|
+
mds-pref-contrast:not(:is([hydrated], .hydrated)),
|
|
254
|
+
mds-pref-language:not(:is([hydrated], .hydrated)),
|
|
255
|
+
mds-pref-language-item:not(:is([hydrated], .hydrated)),
|
|
256
|
+
mds-pref-theme:not(:is([hydrated], .hydrated)),
|
|
257
|
+
mds-price-table:not(:is([hydrated], .hydrated)),
|
|
258
|
+
mds-price-table-features:not(:is([hydrated], .hydrated)),
|
|
259
|
+
mds-price-table-features-cell:not(:is([hydrated], .hydrated)),
|
|
260
|
+
mds-price-table-features-row:not(:is([hydrated], .hydrated)),
|
|
261
|
+
mds-price-table-header:not(:is([hydrated], .hydrated)),
|
|
262
|
+
mds-price-table-list:not(:is([hydrated], .hydrated)),
|
|
263
|
+
mds-price-table-list-item:not(:is([hydrated], .hydrated)),
|
|
264
|
+
mds-progress:not(:is([hydrated], .hydrated)),
|
|
265
|
+
mds-push-notification:not(:is([hydrated], .hydrated)),
|
|
266
|
+
mds-push-notifications:not(:is([hydrated], .hydrated)),
|
|
267
|
+
mds-quote:not(:is([hydrated], .hydrated)),
|
|
268
|
+
mds-separator:not(:is([hydrated], .hydrated)),
|
|
269
|
+
mds-spinner:not(:is([hydrated], .hydrated)),
|
|
270
|
+
mds-stepper-bar:not(:is([hydrated], .hydrated)),
|
|
271
|
+
mds-stepper-bar-item:not(:is([hydrated], .hydrated)),
|
|
272
|
+
mds-tab:not(:is([hydrated], .hydrated)),
|
|
273
|
+
mds-tab-bar:not(:is([hydrated], .hydrated)),
|
|
274
|
+
mds-tab-bar-item:not(:is([hydrated], .hydrated)),
|
|
275
|
+
mds-tab-item:not(:is([hydrated], .hydrated)),
|
|
276
|
+
mds-table:not(:is([hydrated], .hydrated)),
|
|
277
|
+
mds-table-body:not(:is([hydrated], .hydrated)),
|
|
278
|
+
mds-table-cell:not(:is([hydrated], .hydrated)),
|
|
279
|
+
mds-table-footer:not(:is([hydrated], .hydrated)),
|
|
280
|
+
mds-table-header:not(:is([hydrated], .hydrated)),
|
|
281
|
+
mds-table-header-cell:not(:is([hydrated], .hydrated)),
|
|
282
|
+
mds-table-row:not(:is([hydrated], .hydrated)),
|
|
283
|
+
mds-text:not(:is([hydrated], .hydrated)),
|
|
284
|
+
mds-toast:not(:is([hydrated], .hydrated)),
|
|
285
|
+
mds-tooltip:not(:is([hydrated], .hydrated)),
|
|
286
|
+
mds-tree:not(:is([hydrated], .hydrated)),
|
|
287
|
+
mds-tree-item:not(:is([hydrated], .hydrated)),
|
|
288
|
+
mds-url-view:not(:is([hydrated], .hydrated)),
|
|
289
|
+
mds-usage:not(:is([hydrated], .hydrated)),
|
|
290
|
+
mds-video-wall:not(:is([hydrated], .hydrated)),
|
|
291
|
+
mds-zero:not(:is([hydrated], .hydrated))
|
|
292
|
+
{
|
|
293
|
+
animation-duration: 0s;
|
|
294
|
+
border-color: transparent;
|
|
295
|
+
box-shadow: 0 0 0 transparent;
|
|
296
|
+
opacity: 0;
|
|
297
|
+
outline-color: transparent;
|
|
298
|
+
transition-delay: 0s;
|
|
299
|
+
transition-duration: 0s;
|
|
300
|
+
visibility: hidden;
|
|
301
|
+
}
|
|
302
|
+
|
|
@@ -3,10 +3,21 @@ import { removeAttributesIf, ifAttribute } from "../../common/aria";
|
|
|
3
3
|
export class MdsProgress {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.stepsList = new Array();
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* A value between 0 and 1 that rapresents the status progress
|
|
8
|
+
*/
|
|
7
9
|
this.progress = 0;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the direction of the progress bar, if horizonatl or vertical
|
|
12
|
+
*/
|
|
8
13
|
this.direction = 'horizontal';
|
|
14
|
+
/**
|
|
15
|
+
* Sets the theme variant colors
|
|
16
|
+
*/
|
|
9
17
|
this.variant = 'primary';
|
|
18
|
+
/**
|
|
19
|
+
* Sets the steps that can be pronounced by accessibility technologies
|
|
20
|
+
*/
|
|
10
21
|
this.steps = 'Inizio,Un quarto,Metà,Tre quarti,Fine';
|
|
11
22
|
}
|
|
12
23
|
componentWillLoad() {
|
|
@@ -63,6 +74,8 @@ export class MdsProgress {
|
|
|
63
74
|
"tags": [],
|
|
64
75
|
"text": "A value between 0 and 1 that rapresents the status progress"
|
|
65
76
|
},
|
|
77
|
+
"getter": false,
|
|
78
|
+
"setter": false,
|
|
66
79
|
"attribute": "progress",
|
|
67
80
|
"reflect": false,
|
|
68
81
|
"defaultValue": "0"
|
|
@@ -87,6 +100,8 @@ export class MdsProgress {
|
|
|
87
100
|
"tags": [],
|
|
88
101
|
"text": "Specifies the direction of the progress bar, if horizonatl or vertical"
|
|
89
102
|
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
90
105
|
"attribute": "direction",
|
|
91
106
|
"reflect": true,
|
|
92
107
|
"defaultValue": "'horizontal'"
|
|
@@ -111,6 +126,8 @@ export class MdsProgress {
|
|
|
111
126
|
"tags": [],
|
|
112
127
|
"text": "Sets the theme variant colors"
|
|
113
128
|
},
|
|
129
|
+
"getter": false,
|
|
130
|
+
"setter": false,
|
|
114
131
|
"attribute": "variant",
|
|
115
132
|
"reflect": true,
|
|
116
133
|
"defaultValue": "'primary'"
|
|
@@ -129,6 +146,8 @@ export class MdsProgress {
|
|
|
129
146
|
"tags": [],
|
|
130
147
|
"text": "Sets the steps that can be pronounced by accessibility technologies"
|
|
131
148
|
},
|
|
149
|
+
"getter": false,
|
|
150
|
+
"setter": false,
|
|
132
151
|
"attribute": "steps",
|
|
133
152
|
"reflect": false,
|
|
134
153
|
"defaultValue": "'Inizio,Un quarto,Met\u00E0,Tre quarti,Fine'"
|
|
@@ -14,8 +14,8 @@ const fileExtensionsDictionary = {
|
|
|
14
14
|
exe: { format: 'executable', description: 'fileEXE' },
|
|
15
15
|
flac: { format: 'audio', description: 'uncompressedAudio' },
|
|
16
16
|
gif: { format: 'image', description: 'compressedImage', preview: true },
|
|
17
|
-
htm: { format: 'markup', description: 'documentWeb' },
|
|
18
17
|
heic: { format: 'image', description: 'imageHEFF' },
|
|
18
|
+
htm: { format: 'markup', description: 'documentWeb' },
|
|
19
19
|
html: { format: 'markup', description: 'documentWeb' },
|
|
20
20
|
jpe: { format: 'image', description: 'compressedImage', preview: true },
|
|
21
21
|
jpeg: { format: 'image', description: 'compressedImage', preview: true },
|
|
@@ -32,9 +32,12 @@ const fileExtensionsDictionary = {
|
|
|
32
32
|
mpg4: { format: 'video', description: 'videoSD' },
|
|
33
33
|
mpg: { format: 'video', description: 'videoSD' },
|
|
34
34
|
mpga: { format: 'audio', description: 'compressedAudio' },
|
|
35
|
+
odf: { format: 'document', description: 'openDocumentFormat' },
|
|
35
36
|
odp: { format: 'slide', description: 'slideLO' },
|
|
36
37
|
ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
|
|
37
38
|
odt: { format: 'text', description: 'documentLO' },
|
|
39
|
+
ole: { format: 'document', description: 'objectLinkingAndEmbedding' },
|
|
40
|
+
p7m: { format: 'certificate', description: 'documentDigitalSingnature' },
|
|
38
41
|
pdf: { format: 'document', description: 'documentAdobe' },
|
|
39
42
|
php: { format: 'code', description: 'filePHP' },
|
|
40
43
|
png: { format: 'image', description: 'imagePNG', preview: true },
|
|
@@ -47,6 +50,7 @@ const fileExtensionsDictionary = {
|
|
|
47
50
|
tar: { format: 'archive', description: 'uncompressedArchive' },
|
|
48
51
|
tiff: { format: 'image', description: 'imageTIFF' },
|
|
49
52
|
ts: { format: 'code', description: 'fileTS' },
|
|
53
|
+
tsd: { format: 'certificate', description: 'certificateTSD' },
|
|
50
54
|
tsx: { format: 'code', description: 'fileTSX' },
|
|
51
55
|
txt: { format: 'text', description: 'documentTXT' },
|
|
52
56
|
wav: { format: 'audio', description: 'uncompressedAudio' },
|
|
@@ -54,66 +58,9 @@ const fileExtensionsDictionary = {
|
|
|
54
58
|
xar: { format: 'archive', description: 'compressedArchive' },
|
|
55
59
|
xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
56
60
|
xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
61
|
+
xml: { format: 'markup', description: 'extensibleMarkupLanguage' },
|
|
57
62
|
zip: { format: 'archive', description: 'compressedArchive' },
|
|
58
63
|
};
|
|
59
|
-
// const fileExtensionsDictionary: FileExtenstion = {
|
|
60
|
-
// '7z': { format: 'archive', description: 'Archivio compresso' },
|
|
61
|
-
// ace: { format: 'archive', description: 'Archivio compresso' },
|
|
62
|
-
// ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
63
|
-
// dart: { format: 'code', description: 'Dart' },
|
|
64
|
-
// db: { format: 'data', description: 'File di database' },
|
|
65
|
-
// default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
66
|
-
// dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
67
|
-
// doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
68
|
-
// docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
69
|
-
// docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
70
|
-
// eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
71
|
-
// eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
72
|
-
// exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
73
|
-
// flac: { format: 'audio', description: 'Audio non compresso' },
|
|
74
|
-
// gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
75
|
-
// htm: { format: 'markup', description: 'Pagina web' },
|
|
76
|
-
// heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
77
|
-
// html: { format: 'markup', description: 'Pagina web' },
|
|
78
|
-
// jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
79
|
-
// jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
80
|
-
// jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
81
|
-
// js: { format: 'code', description: 'JavaScript' },
|
|
82
|
-
// json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
83
|
-
// jsx: { format: 'code', description: 'JavaScript' },
|
|
84
|
-
// m2v: { format: 'video', description: 'Filmato SD' },
|
|
85
|
-
// mp2: { format: 'audio', description: 'Audio compresso' },
|
|
86
|
-
// mp3: { format: 'audio', description: 'Audio compresso' },
|
|
87
|
-
// mp4: { format: 'video', description: 'Filmato HD' },
|
|
88
|
-
// mp4v: { format: 'video', description: 'Filmato HD' },
|
|
89
|
-
// mpeg: { format: 'video', description: 'Filmato SD' },
|
|
90
|
-
// mpg4: { format: 'video', description: 'Filmato SD' },
|
|
91
|
-
// mpg: { format: 'video', description: 'Filmato SD' },
|
|
92
|
-
// mpga: { format: 'audio', description: 'Audio compresso' },
|
|
93
|
-
// odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
94
|
-
// ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
95
|
-
// odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
96
|
-
// pdf: { format: 'document', description: 'Documento Adobe' },
|
|
97
|
-
// php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
98
|
-
// png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
99
|
-
// ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
100
|
-
// rar: { format: 'archive', description: 'Archivio compresso' },
|
|
101
|
-
// rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
102
|
-
// sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
103
|
-
// shtml: { format: 'markup', description: 'Pagina web' },
|
|
104
|
-
// svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
105
|
-
// tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
106
|
-
// tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
107
|
-
// ts: { format: 'code', description: 'TypeScript' },
|
|
108
|
-
// tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
109
|
-
// txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
110
|
-
// wav: { format: 'audio', description: 'Audio non compresso' },
|
|
111
|
-
// webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
112
|
-
// xar: { format: 'archive', description: 'Archivio compresso' },
|
|
113
|
-
// xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
114
|
-
// xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
115
|
-
// zip: { format: 'archive', description: 'Archivio compresso' },
|
|
116
|
-
// }
|
|
117
64
|
const genericMimeToExt = new Map([
|
|
118
65
|
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
119
66
|
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const keyboardKeyNameDictionary = [
|
|
2
|
+
'0',
|
|
3
|
+
'1',
|
|
4
|
+
'2',
|
|
5
|
+
'3',
|
|
6
|
+
'4',
|
|
7
|
+
'5',
|
|
8
|
+
'6',
|
|
9
|
+
'7',
|
|
10
|
+
'8',
|
|
11
|
+
'9',
|
|
12
|
+
'a',
|
|
13
|
+
'alt',
|
|
14
|
+
'altleft',
|
|
15
|
+
'altright',
|
|
16
|
+
'arrowdown',
|
|
17
|
+
'arrowleft',
|
|
18
|
+
'arrowright',
|
|
19
|
+
'arrowup',
|
|
20
|
+
'b',
|
|
21
|
+
'backspace',
|
|
22
|
+
'c',
|
|
23
|
+
'capslock',
|
|
24
|
+
'command',
|
|
25
|
+
'commandleft',
|
|
26
|
+
'commandright',
|
|
27
|
+
'control',
|
|
28
|
+
'controlleft',
|
|
29
|
+
'controlright',
|
|
30
|
+
'd',
|
|
31
|
+
'delete',
|
|
32
|
+
'e',
|
|
33
|
+
'end',
|
|
34
|
+
'enter',
|
|
35
|
+
'escape',
|
|
36
|
+
'f',
|
|
37
|
+
'f1',
|
|
38
|
+
'f10',
|
|
39
|
+
'f11',
|
|
40
|
+
'f12',
|
|
41
|
+
'f2',
|
|
42
|
+
'f3',
|
|
43
|
+
'f4',
|
|
44
|
+
'f5',
|
|
45
|
+
'f6',
|
|
46
|
+
'f7',
|
|
47
|
+
'f8',
|
|
48
|
+
'f9',
|
|
49
|
+
'g',
|
|
50
|
+
'h',
|
|
51
|
+
'home',
|
|
52
|
+
'i',
|
|
53
|
+
'j',
|
|
54
|
+
'k',
|
|
55
|
+
'l',
|
|
56
|
+
'm',
|
|
57
|
+
'n',
|
|
58
|
+
'o',
|
|
59
|
+
'option',
|
|
60
|
+
'optionleft',
|
|
61
|
+
'optionright',
|
|
62
|
+
'p',
|
|
63
|
+
'pagedown',
|
|
64
|
+
'pageup',
|
|
65
|
+
'q',
|
|
66
|
+
'r',
|
|
67
|
+
's',
|
|
68
|
+
'shift',
|
|
69
|
+
'shiftleft',
|
|
70
|
+
'shiftright',
|
|
71
|
+
'space',
|
|
72
|
+
't',
|
|
73
|
+
'tab',
|
|
74
|
+
'u',
|
|
75
|
+
'v',
|
|
76
|
+
'w',
|
|
77
|
+
'windows',
|
|
78
|
+
'windowsleft',
|
|
79
|
+
'windowsright',
|
|
80
|
+
'x',
|
|
81
|
+
'y',
|
|
82
|
+
'z',
|
|
83
|
+
];
|
|
84
|
+
export { keyboardKeyNameDictionary, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const treeActionsDictionary = [
|
|
2
|
+
'auto',
|
|
3
|
+
'visible',
|
|
4
|
+
];
|
|
5
|
+
const treeAppearanceDictionary = [
|
|
6
|
+
'depth',
|
|
7
|
+
'none',
|
|
8
|
+
];
|
|
9
|
+
const treeIconDictionary = [
|
|
10
|
+
'folder',
|
|
11
|
+
'chevron',
|
|
12
|
+
];
|
|
13
|
+
export { treeActionsDictionary, treeAppearanceDictionary, treeIconDictionary, };
|