@everchron/ec-shards 2.0.4 → 2.0.5
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/ec-shards.common.js +50 -28
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +50 -28
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +2 -2
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/dropzone/dropzone.vue +18 -1
- package/src/stories/Changelog.stories.mdx +12 -0
- package/src/stories/dropzone/dropzone.stories.js +2 -2
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<input @change="change" type="file" :multiple="multiple" ref="file" />
|
|
14
14
|
|
|
15
|
-
<ecs-empty-state type="
|
|
15
|
+
<ecs-empty-state :type="iconType" :iconColor="iconColor">
|
|
16
16
|
<ecs-skeleton-loader v-if="initializing" type="single" :width="100" class="ecs-dropzone-skeleton" />
|
|
17
17
|
<div v-else>
|
|
18
18
|
Drag and drop your {{ fileTypeLabel }} or <i @click="() => this.$refs.file.click()">browse</i> to upload.
|
|
@@ -44,6 +44,12 @@
|
|
|
44
44
|
},
|
|
45
45
|
|
|
46
46
|
props: {
|
|
47
|
+
/** Determines the icon that should be shown inside the drop zone. */
|
|
48
|
+
state: {
|
|
49
|
+
type: String,
|
|
50
|
+
validator: v => ['default', 'upload', 'viruscheck'].includes(v),
|
|
51
|
+
default: 'default'
|
|
52
|
+
},
|
|
47
53
|
/** Determines the file label in the informational text. E.g. "Drag and drop your **`load file`** or browse to upload." */
|
|
48
54
|
fileTypeLabel: {
|
|
49
55
|
type: String,
|
|
@@ -107,6 +113,17 @@
|
|
|
107
113
|
return !this.dragging && this.error
|
|
108
114
|
},
|
|
109
115
|
|
|
116
|
+
iconType(){
|
|
117
|
+
switch (this.state){
|
|
118
|
+
case 'upload':
|
|
119
|
+
return 'empty-file-upload'
|
|
120
|
+
case 'viruscheck':
|
|
121
|
+
return 'empty-file-virus-scan'
|
|
122
|
+
default:
|
|
123
|
+
return 'empty-file-drag'
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
|
|
110
127
|
iconColor(){
|
|
111
128
|
if(this.dragging)
|
|
112
129
|
return '#6BAFFF'
|
|
@@ -6,6 +6,18 @@ import { Meta } from '@storybook/addon-docs/blocks';
|
|
|
6
6
|
Changelog
|
|
7
7
|
</h1>
|
|
8
8
|
|
|
9
|
+
## Version 2.0.5 (5 October 2022)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- Added `state` prop to EcsDropzone that allows to change the dropzone icon.
|
|
14
|
+
|
|
15
|
+
## Version 2.0.4 (5 October 2022)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- Animated the icons for virus check and file upload.
|
|
20
|
+
|
|
9
21
|
## Version 2.0.2 (22 September 2022)
|
|
10
22
|
|
|
11
23
|
### Breaking Changes
|
|
@@ -56,7 +56,7 @@ export const dropzoneProcessing = () => ({
|
|
|
56
56
|
components: { EcsDropzone },
|
|
57
57
|
template: `
|
|
58
58
|
<div style="width:100%; height: 600px">
|
|
59
|
-
<ecs-dropzone loading />
|
|
59
|
+
<ecs-dropzone state="viruscheck" loading />
|
|
60
60
|
</div>
|
|
61
61
|
`,
|
|
62
62
|
});
|
|
@@ -65,7 +65,7 @@ export const dropzoneUploading = () => ({
|
|
|
65
65
|
components: { EcsDropzone },
|
|
66
66
|
template: `
|
|
67
67
|
<div style="width:100%; height: 600px">
|
|
68
|
-
<ecs-dropzone :progress="56" />
|
|
68
|
+
<ecs-dropzone state="upload" :progress="56" />
|
|
69
69
|
</div>
|
|
70
70
|
`,
|
|
71
71
|
});
|