@mezzanine-ui/core 0.13.10 → 0.13.12
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/_internal/input-check/index.d.ts +2 -2
- package/_internal/input-check/inputCheck.d.ts +12 -12
- package/_internal/input-check/inputCheck.js +9 -9
- package/_internal/input-check/inputCheckGroup.d.ts +7 -7
- package/_internal/input-check/inputCheckGroup.js +4 -4
- package/_internal/input-trigger-popper/index.d.ts +1 -1
- package/_internal/input-trigger-popper/inputTriggerPopper.d.ts +4 -4
- package/_internal/input-trigger-popper/inputTriggerPopper.js +3 -3
- package/_internal/overlay-with-slide-fade/index.d.ts +1 -1
- package/_internal/overlay-with-slide-fade/overlayWithSlideFade.d.ts +4 -4
- package/_internal/overlay-with-slide-fade/overlayWithSlideFade.js +3 -3
- package/accordion/accordion.d.ts +13 -13
- package/accordion/accordion.js +12 -12
- package/accordion/index.d.ts +1 -1
- package/alert/alert.d.ts +15 -15
- package/alert/alert.js +12 -12
- package/alert/index.d.ts +1 -1
- package/app-bar/appBar.d.ts +8 -8
- package/app-bar/appBar.js +5 -5
- package/app-bar/appBarBrand.d.ts +4 -4
- package/app-bar/appBarBrand.js +3 -3
- package/app-bar/appBarMain.d.ts +4 -4
- package/app-bar/appBarMain.js +3 -3
- package/app-bar/appBarSupport.d.ts +4 -4
- package/app-bar/appBarSupport.js +3 -3
- package/app-bar/index.d.ts +4 -4
- package/badge/badge.d.ts +7 -7
- package/badge/badge.js +6 -6
- package/badge/index.d.ts +1 -1
- package/button/button.d.ts +17 -17
- package/button/button.js +11 -11
- package/button/buttonGroup.d.ts +18 -18
- package/button/buttonGroup.js +15 -15
- package/button/index.d.ts +2 -2
- package/calendar/calendar.d.ts +47 -47
- package/calendar/calendar.js +61 -61
- package/calendar/index.d.ts +2 -2
- package/calendar/typings.d.ts +43 -43
- package/calendarMethodsDayjs/index.d.ts +3 -3
- package/calendarMethodsDayjs/index.js +97 -97
- package/calendarMethodsLuxon/index.d.ts +3 -3
- package/calendarMethodsLuxon/index.js +100 -100
- package/calendarMethodsMoment/index.d.ts +3 -3
- package/calendarMethodsMoment/index.js +112 -112
- package/card/card.d.ts +7 -7
- package/card/card.js +6 -6
- package/card/cardActions.d.ts +4 -4
- package/card/cardActions.js +3 -3
- package/card/index.d.ts +2 -2
- package/checkbox/checkbox.d.ts +15 -15
- package/checkbox/checkbox.js +6 -6
- package/checkbox/index.d.ts +1 -1
- package/date-range-picker/dateRangePicker.d.ts +11 -11
- package/date-range-picker/dateRangePicker.js +10 -10
- package/date-range-picker/index.d.ts +1 -1
- package/date-time-picker/dateTimePicker.d.ts +9 -9
- package/date-time-picker/dateTimePicker.js +8 -8
- package/date-time-picker/index.d.ts +1 -1
- package/drawer/drawer.d.ts +10 -10
- package/drawer/drawer.js +8 -8
- package/drawer/index.d.ts +1 -1
- package/empty/empty.d.ts +8 -8
- package/empty/empty.js +7 -7
- package/empty/index.d.ts +1 -1
- package/form/form.d.ts +1 -1
- package/form/formField.d.ts +18 -18
- package/form/formField.js +16 -16
- package/form/index.d.ts +2 -2
- package/icon/icon.d.ts +15 -15
- package/icon/icon.js +38 -38
- package/icon/index.d.ts +1 -1
- package/input/index.d.ts +1 -1
- package/input/input.d.ts +8 -8
- package/input/input.js +5 -5
- package/loading/index.d.ts +1 -1
- package/loading/loading.d.ts +8 -8
- package/loading/loading.js +7 -7
- package/menu/index.d.ts +4 -4
- package/menu/menu.d.ts +13 -13
- package/menu/menu.js +13 -13
- package/menu/menuDivider.d.ts +4 -4
- package/menu/menuDivider.js +3 -3
- package/menu/menuItem.d.ts +8 -8
- package/menu/menuItem.js +7 -7
- package/menu/menuItemGroup.d.ts +6 -6
- package/menu/menuItemGroup.js +5 -5
- package/message/index.d.ts +1 -1
- package/message/message.d.ts +16 -16
- package/message/message.js +13 -13
- package/modal/index.d.ts +1 -1
- package/modal/modal.d.ts +30 -30
- package/modal/modal.js +25 -25
- package/navigation/index.d.ts +3 -3
- package/navigation/navigation.d.ts +8 -8
- package/navigation/navigation.js +5 -5
- package/navigation/navigationItem.d.ts +6 -6
- package/navigation/navigationItem.js +5 -5
- package/navigation/navigationSubMenu.d.ts +11 -11
- package/navigation/navigationSubMenu.js +10 -10
- package/notification/index.d.ts +1 -1
- package/notification/notification.d.ts +25 -25
- package/notification/notification.js +22 -22
- package/overlay/index.d.ts +1 -1
- package/overlay/overlay.d.ts +10 -10
- package/overlay/overlay.js +9 -9
- package/package.json +3 -3
- package/page-footer/index.d.ts +1 -1
- package/page-footer/pageFooter.d.ts +4 -4
- package/page-footer/pageFooter.js +3 -3
- package/pagination/index.d.ts +4 -4
- package/pagination/pagination.d.ts +8 -8
- package/pagination/pagination.js +7 -7
- package/pagination/paginationItem.d.ts +9 -9
- package/pagination/paginationItem.js +7 -7
- package/pagination/paginationJumper.d.ts +5 -5
- package/pagination/paginationJumper.js +4 -4
- package/pagination/paginationPageSize.d.ts +5 -5
- package/pagination/paginationPageSize.js +4 -4
- package/picker/index.d.ts +1 -1
- package/picker/picker.d.ts +10 -10
- package/picker/picker.js +5 -5
- package/popconfirm/index.d.ts +1 -1
- package/popconfirm/popconfirm.d.ts +5 -5
- package/popconfirm/popconfirm.js +4 -4
- package/popover/index.d.ts +1 -1
- package/popover/popover.d.ts +6 -6
- package/popover/popover.js +5 -5
- package/progress/index.d.ts +1 -1
- package/progress/progress.d.ts +27 -27
- package/progress/progress.js +25 -25
- package/radio/index.d.ts +1 -1
- package/radio/radio.d.ts +13 -13
- package/radio/radio.js +4 -4
- package/select/index.d.ts +1 -1
- package/select/select.d.ts +30 -30
- package/select/select.js +26 -26
- package/skeleton/index.d.ts +1 -1
- package/skeleton/skeleton.d.ts +5 -5
- package/skeleton/skeleton.js +4 -4
- package/slider/index.d.ts +1 -1
- package/slider/slider.d.ts +60 -60
- package/slider/slider.js +122 -122
- package/stepper/index.d.ts +2 -2
- package/stepper/step.d.ts +9 -9
- package/stepper/step.js +8 -8
- package/stepper/stepper.d.ts +4 -4
- package/stepper/stepper.js +3 -3
- package/switch/index.d.ts +1 -1
- package/switch/switch.d.ts +13 -13
- package/switch/switch.js +21 -21
- package/table/index.d.ts +1 -1
- package/table/table.d.ts +150 -150
- package/table/table.js +65 -65
- package/tabs/index.d.ts +1 -1
- package/tabs/tabs.d.ts +11 -11
- package/tabs/tabs.js +10 -10
- package/tag/index.d.ts +1 -1
- package/tag/tag.d.ts +10 -10
- package/tag/tag.js +7 -7
- package/text-field/index.d.ts +1 -1
- package/text-field/textField.d.ts +19 -19
- package/text-field/textField.js +16 -16
- package/textarea/index.d.ts +1 -1
- package/textarea/textarea.d.ts +9 -9
- package/textarea/textarea.js +6 -6
- package/time-panel/index.d.ts +1 -1
- package/time-panel/timePanel.d.ts +33 -33
- package/time-panel/timePanel.js +45 -45
- package/tooltip/index.d.ts +1 -1
- package/tooltip/tooltip.d.ts +4 -4
- package/tooltip/tooltip.js +3 -3
- package/tree/index.d.ts +1 -1
- package/tree/tree.d.ts +49 -49
- package/tree/tree.js +20 -20
- package/typography/index.d.ts +2 -2
- package/typography/typography.d.ts +22 -22
- package/typography/typography.js +17 -17
- package/upload/UploadPictureBlock.d.ts +51 -51
- package/upload/UploadPictureBlock.js +105 -105
- package/upload/UploadPictureWall.d.ts +5 -5
- package/upload/UploadPictureWall.js +4 -4
- package/upload/index.d.ts +5 -5
- package/upload/uploadInput.d.ts +4 -4
- package/upload/uploadInput.js +3 -3
- package/upload/uploadPicture.d.ts +4 -4
- package/upload/uploadPicture.js +3 -3
- package/upload/uploadResult.d.ts +17 -17
- package/upload/uploadResult.js +14 -14
|
@@ -1,111 +1,111 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
import uniqueId from 'lodash/uniqueId';
|
|
3
3
|
|
|
4
|
-
const uploadPictureBlockPrefix = 'mzn-upload-picture-block';
|
|
5
|
-
const uploadPictureBlockClasses = {
|
|
6
|
-
host: uploadPictureBlockPrefix,
|
|
7
|
-
disabled: `${uploadPictureBlockPrefix}--disabled`,
|
|
8
|
-
error: `${uploadPictureBlockPrefix}--error`,
|
|
9
|
-
loading: `${uploadPictureBlockPrefix}--loading`,
|
|
10
|
-
group: `${uploadPictureBlockPrefix}__group`,
|
|
11
|
-
status: `${uploadPictureBlockPrefix}__status`,
|
|
12
|
-
preview: `${uploadPictureBlockPrefix}__preview`,
|
|
13
|
-
delete: `${uploadPictureBlockPrefix}__delete`,
|
|
14
|
-
};
|
|
15
|
-
function toUploadPictureBlockCssVars(variables) {
|
|
16
|
-
const { percentage, } = variables;
|
|
17
|
-
return {
|
|
18
|
-
[`--${uploadPictureBlockPrefix}-percentage`]: percentage,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
class ImageUploader extends EventEmitter {
|
|
22
|
-
constructor(file, url) {
|
|
23
|
-
super();
|
|
24
|
-
this.uid = uniqueId('file_');
|
|
25
|
-
this.file = file || null;
|
|
26
|
-
this.percentage = 0;
|
|
27
|
-
this.preview = '';
|
|
28
|
-
this.url = url || '';
|
|
29
|
-
this.isLoading = false;
|
|
30
|
-
this.isError = false;
|
|
31
|
-
}
|
|
32
|
-
setNewFile(file) {
|
|
33
|
-
this.uid = uniqueId('file_');
|
|
34
|
-
this.file = file;
|
|
35
|
-
this.percentage = 0;
|
|
36
|
-
this.preview = '';
|
|
37
|
-
this.url = '';
|
|
38
|
-
this.isLoading = false;
|
|
39
|
-
this.isError = false;
|
|
40
|
-
this.emit('fileChange');
|
|
41
|
-
}
|
|
42
|
-
setPreview() {
|
|
43
|
-
if (this.file) {
|
|
44
|
-
const reader = new FileReader();
|
|
45
|
-
reader.addEventListener('load', () => {
|
|
46
|
-
this.preview = reader.result;
|
|
47
|
-
this.emit('previewChange');
|
|
48
|
-
});
|
|
49
|
-
reader.readAsDataURL(this.file);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
setPercentage(percentage) {
|
|
53
|
-
this.percentage = percentage;
|
|
54
|
-
this.emit('percentageChange');
|
|
55
|
-
}
|
|
56
|
-
setUrl(url) {
|
|
57
|
-
this.url = url;
|
|
58
|
-
this.emit('urlChange');
|
|
59
|
-
}
|
|
60
|
-
setLoadingStatus(isLoading) {
|
|
61
|
-
this.isLoading = isLoading;
|
|
62
|
-
this.emit('loadingStatusChange');
|
|
63
|
-
}
|
|
64
|
-
setErrorStatus(isError) {
|
|
65
|
-
this.isError = isError;
|
|
66
|
-
this.emit('errorStatusChange');
|
|
67
|
-
}
|
|
68
|
-
clear() {
|
|
69
|
-
this.file = null;
|
|
70
|
-
this.percentage = 0;
|
|
71
|
-
this.preview = '';
|
|
72
|
-
this.url = '';
|
|
73
|
-
this.isLoading = false;
|
|
74
|
-
this.isError = false;
|
|
75
|
-
this.emit('clear');
|
|
76
|
-
}
|
|
77
|
-
getUid() {
|
|
78
|
-
return this.uid;
|
|
79
|
-
}
|
|
80
|
-
getFile() {
|
|
81
|
-
return this.file;
|
|
82
|
-
}
|
|
83
|
-
getPercentage() {
|
|
84
|
-
return this.percentage;
|
|
85
|
-
}
|
|
86
|
-
getPreview() {
|
|
87
|
-
return this.preview;
|
|
88
|
-
}
|
|
89
|
-
getUrl() {
|
|
90
|
-
return this.url;
|
|
91
|
-
}
|
|
92
|
-
getIsLoading() {
|
|
93
|
-
return this.isLoading;
|
|
94
|
-
}
|
|
95
|
-
getIsError() {
|
|
96
|
-
return this.isError;
|
|
97
|
-
}
|
|
98
|
-
getAll() {
|
|
99
|
-
return {
|
|
100
|
-
uid: this.uid,
|
|
101
|
-
file: this.file,
|
|
102
|
-
percentage: this.percentage,
|
|
103
|
-
preview: this.preview,
|
|
104
|
-
url: this.url,
|
|
105
|
-
isLoading: this.isLoading,
|
|
106
|
-
isError: this.isError,
|
|
107
|
-
};
|
|
108
|
-
}
|
|
4
|
+
const uploadPictureBlockPrefix = 'mzn-upload-picture-block';
|
|
5
|
+
const uploadPictureBlockClasses = {
|
|
6
|
+
host: uploadPictureBlockPrefix,
|
|
7
|
+
disabled: `${uploadPictureBlockPrefix}--disabled`,
|
|
8
|
+
error: `${uploadPictureBlockPrefix}--error`,
|
|
9
|
+
loading: `${uploadPictureBlockPrefix}--loading`,
|
|
10
|
+
group: `${uploadPictureBlockPrefix}__group`,
|
|
11
|
+
status: `${uploadPictureBlockPrefix}__status`,
|
|
12
|
+
preview: `${uploadPictureBlockPrefix}__preview`,
|
|
13
|
+
delete: `${uploadPictureBlockPrefix}__delete`,
|
|
14
|
+
};
|
|
15
|
+
function toUploadPictureBlockCssVars(variables) {
|
|
16
|
+
const { percentage, } = variables;
|
|
17
|
+
return {
|
|
18
|
+
[`--${uploadPictureBlockPrefix}-percentage`]: percentage,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
class ImageUploader extends EventEmitter {
|
|
22
|
+
constructor(file, url) {
|
|
23
|
+
super();
|
|
24
|
+
this.uid = uniqueId('file_');
|
|
25
|
+
this.file = file || null;
|
|
26
|
+
this.percentage = 0;
|
|
27
|
+
this.preview = '';
|
|
28
|
+
this.url = url || '';
|
|
29
|
+
this.isLoading = false;
|
|
30
|
+
this.isError = false;
|
|
31
|
+
}
|
|
32
|
+
setNewFile(file) {
|
|
33
|
+
this.uid = uniqueId('file_');
|
|
34
|
+
this.file = file;
|
|
35
|
+
this.percentage = 0;
|
|
36
|
+
this.preview = '';
|
|
37
|
+
this.url = '';
|
|
38
|
+
this.isLoading = false;
|
|
39
|
+
this.isError = false;
|
|
40
|
+
this.emit('fileChange');
|
|
41
|
+
}
|
|
42
|
+
setPreview() {
|
|
43
|
+
if (this.file) {
|
|
44
|
+
const reader = new FileReader();
|
|
45
|
+
reader.addEventListener('load', () => {
|
|
46
|
+
this.preview = reader.result;
|
|
47
|
+
this.emit('previewChange');
|
|
48
|
+
});
|
|
49
|
+
reader.readAsDataURL(this.file);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
setPercentage(percentage) {
|
|
53
|
+
this.percentage = percentage;
|
|
54
|
+
this.emit('percentageChange');
|
|
55
|
+
}
|
|
56
|
+
setUrl(url) {
|
|
57
|
+
this.url = url;
|
|
58
|
+
this.emit('urlChange');
|
|
59
|
+
}
|
|
60
|
+
setLoadingStatus(isLoading) {
|
|
61
|
+
this.isLoading = isLoading;
|
|
62
|
+
this.emit('loadingStatusChange');
|
|
63
|
+
}
|
|
64
|
+
setErrorStatus(isError) {
|
|
65
|
+
this.isError = isError;
|
|
66
|
+
this.emit('errorStatusChange');
|
|
67
|
+
}
|
|
68
|
+
clear() {
|
|
69
|
+
this.file = null;
|
|
70
|
+
this.percentage = 0;
|
|
71
|
+
this.preview = '';
|
|
72
|
+
this.url = '';
|
|
73
|
+
this.isLoading = false;
|
|
74
|
+
this.isError = false;
|
|
75
|
+
this.emit('clear');
|
|
76
|
+
}
|
|
77
|
+
getUid() {
|
|
78
|
+
return this.uid;
|
|
79
|
+
}
|
|
80
|
+
getFile() {
|
|
81
|
+
return this.file;
|
|
82
|
+
}
|
|
83
|
+
getPercentage() {
|
|
84
|
+
return this.percentage;
|
|
85
|
+
}
|
|
86
|
+
getPreview() {
|
|
87
|
+
return this.preview;
|
|
88
|
+
}
|
|
89
|
+
getUrl() {
|
|
90
|
+
return this.url;
|
|
91
|
+
}
|
|
92
|
+
getIsLoading() {
|
|
93
|
+
return this.isLoading;
|
|
94
|
+
}
|
|
95
|
+
getIsError() {
|
|
96
|
+
return this.isError;
|
|
97
|
+
}
|
|
98
|
+
getAll() {
|
|
99
|
+
return {
|
|
100
|
+
uid: this.uid,
|
|
101
|
+
file: this.file,
|
|
102
|
+
percentage: this.percentage,
|
|
103
|
+
preview: this.preview,
|
|
104
|
+
url: this.url,
|
|
105
|
+
isLoading: this.isLoading,
|
|
106
|
+
isError: this.isError,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
export { ImageUploader, toUploadPictureBlockCssVars, uploadPictureBlockClasses, uploadPictureBlockPrefix };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const uploadPictureWallPrefix = "mzn-upload-picture-wall";
|
|
2
|
-
export declare const uploadPictureWallClasses: {
|
|
3
|
-
host: string;
|
|
4
|
-
item: string;
|
|
5
|
-
};
|
|
1
|
+
export declare const uploadPictureWallPrefix = "mzn-upload-picture-wall";
|
|
2
|
+
export declare const uploadPictureWallClasses: {
|
|
3
|
+
host: string;
|
|
4
|
+
item: string;
|
|
5
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const uploadPictureWallPrefix = 'mzn-upload-picture-wall';
|
|
2
|
-
const uploadPictureWallClasses = {
|
|
3
|
-
host: uploadPictureWallPrefix,
|
|
4
|
-
item: `${uploadPictureWallPrefix}__item`,
|
|
1
|
+
const uploadPictureWallPrefix = 'mzn-upload-picture-wall';
|
|
2
|
+
const uploadPictureWallClasses = {
|
|
3
|
+
host: uploadPictureWallPrefix,
|
|
4
|
+
item: `${uploadPictureWallPrefix}__item`,
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { uploadPictureWallClasses, uploadPictureWallPrefix };
|
package/upload/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './uploadInput';
|
|
2
|
-
export * from './uploadResult';
|
|
3
|
-
export * from './uploadPicture';
|
|
4
|
-
export * from './UploadPictureBlock';
|
|
5
|
-
export * from './UploadPictureWall';
|
|
1
|
+
export * from './uploadInput';
|
|
2
|
+
export * from './uploadResult';
|
|
3
|
+
export * from './uploadPicture';
|
|
4
|
+
export * from './UploadPictureBlock';
|
|
5
|
+
export * from './UploadPictureWall';
|
package/upload/uploadInput.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const uploadInputPrefix = "mzn-upload-input";
|
|
2
|
-
export declare const uploadInputClasses: {
|
|
3
|
-
host: string;
|
|
4
|
-
};
|
|
1
|
+
export declare const uploadInputPrefix = "mzn-upload-input";
|
|
2
|
+
export declare const uploadInputClasses: {
|
|
3
|
+
host: string;
|
|
4
|
+
};
|
package/upload/uploadInput.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const uploadInputPrefix = 'mzn-upload-input';
|
|
2
|
-
const uploadInputClasses = {
|
|
3
|
-
host: uploadInputPrefix,
|
|
1
|
+
const uploadInputPrefix = 'mzn-upload-input';
|
|
2
|
+
const uploadInputClasses = {
|
|
3
|
+
host: uploadInputPrefix,
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export { uploadInputClasses, uploadInputPrefix };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const uploadPicturePrefix = "mzn-upload-picture";
|
|
2
|
-
export declare const uploadPictureClasses: {
|
|
3
|
-
host: string;
|
|
4
|
-
};
|
|
1
|
+
export declare const uploadPicturePrefix = "mzn-upload-picture";
|
|
2
|
+
export declare const uploadPictureClasses: {
|
|
3
|
+
host: string;
|
|
4
|
+
};
|
package/upload/uploadPicture.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const uploadPicturePrefix = 'mzn-upload-picture';
|
|
2
|
-
const uploadPictureClasses = {
|
|
3
|
-
host: uploadPicturePrefix,
|
|
1
|
+
const uploadPicturePrefix = 'mzn-upload-picture';
|
|
2
|
+
const uploadPictureClasses = {
|
|
3
|
+
host: uploadPicturePrefix,
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export { uploadPictureClasses, uploadPicturePrefix };
|
package/upload/uploadResult.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { CssVarInterpolations } from '@mezzanine-ui/system/css';
|
|
2
|
-
import { Size } from '@mezzanine-ui/system/size';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export interface UploadResultCssVars {
|
|
6
|
-
percentage?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const uploadResultPrefix = "mzn-upload-result";
|
|
9
|
-
export declare const uploadResultClasses: {
|
|
10
|
-
readonly host: "mzn-upload-result";
|
|
11
|
-
readonly size: (size: UploadResultSize) => string;
|
|
12
|
-
readonly error: "mzn-upload-result--error";
|
|
13
|
-
readonly loading: "mzn-upload-result--loading";
|
|
14
|
-
readonly name: "mzn-upload-result__name";
|
|
15
|
-
readonly actions: "mzn-upload-result__actions";
|
|
16
|
-
};
|
|
17
|
-
export declare function toUploadResultCssVars(variables: UploadResultCssVars): CssVarInterpolations;
|
|
1
|
+
import { CssVarInterpolations } from '@mezzanine-ui/system/css';
|
|
2
|
+
import { Size } from '@mezzanine-ui/system/size';
|
|
3
|
+
export type UploadResultSize = Size;
|
|
4
|
+
export type UploadResultStatus = 'done' | 'error' | 'loading';
|
|
5
|
+
export interface UploadResultCssVars {
|
|
6
|
+
percentage?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const uploadResultPrefix = "mzn-upload-result";
|
|
9
|
+
export declare const uploadResultClasses: {
|
|
10
|
+
readonly host: "mzn-upload-result";
|
|
11
|
+
readonly size: (size: UploadResultSize) => string;
|
|
12
|
+
readonly error: "mzn-upload-result--error";
|
|
13
|
+
readonly loading: "mzn-upload-result--loading";
|
|
14
|
+
readonly name: "mzn-upload-result__name";
|
|
15
|
+
readonly actions: "mzn-upload-result__actions";
|
|
16
|
+
};
|
|
17
|
+
export declare function toUploadResultCssVars(variables: UploadResultCssVars): CssVarInterpolations;
|
package/upload/uploadResult.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const uploadResultPrefix = 'mzn-upload-result';
|
|
2
|
-
const uploadResultClasses = {
|
|
3
|
-
host: uploadResultPrefix,
|
|
4
|
-
size: (size) => `${uploadResultPrefix}--${size}`,
|
|
5
|
-
error: `${uploadResultPrefix}--error`,
|
|
6
|
-
loading: `${uploadResultPrefix}--loading`,
|
|
7
|
-
name: `${uploadResultPrefix}__name`,
|
|
8
|
-
actions: `${uploadResultPrefix}__actions`,
|
|
9
|
-
};
|
|
10
|
-
function toUploadResultCssVars(variables) {
|
|
11
|
-
const { percentage, } = variables;
|
|
12
|
-
return {
|
|
13
|
-
[`--${uploadResultPrefix}-percentage`]: percentage,
|
|
14
|
-
};
|
|
1
|
+
const uploadResultPrefix = 'mzn-upload-result';
|
|
2
|
+
const uploadResultClasses = {
|
|
3
|
+
host: uploadResultPrefix,
|
|
4
|
+
size: (size) => `${uploadResultPrefix}--${size}`,
|
|
5
|
+
error: `${uploadResultPrefix}--error`,
|
|
6
|
+
loading: `${uploadResultPrefix}--loading`,
|
|
7
|
+
name: `${uploadResultPrefix}__name`,
|
|
8
|
+
actions: `${uploadResultPrefix}__actions`,
|
|
9
|
+
};
|
|
10
|
+
function toUploadResultCssVars(variables) {
|
|
11
|
+
const { percentage, } = variables;
|
|
12
|
+
return {
|
|
13
|
+
[`--${uploadResultPrefix}-percentage`]: percentage,
|
|
14
|
+
};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export { toUploadResultCssVars, uploadResultClasses, uploadResultPrefix };
|