@everchron/ec-shards 6.2.0 → 6.2.2

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.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><g fill="#FFF" transform="translate(13 13)"><path fill-opacity=".3" d="M7.6916556,-1.21758623e-15 L26.3083444,3.10752092e-16 C28.9829006,-1.80555915e-16 29.9527593,0.278476833 30.9305371,0.801398111 C31.9083149,1.32431939 32.6756806,2.09168511 33.1986019,3.06946289 C33.7215232,4.04724067 34,5.01709938 34,7.6916556 L34,26.3083444 C34,28.9829006 33.7215232,29.9527593 33.1986019,30.9305371 C32.6756806,31.9083149 31.9083149,32.6756806 30.9305371,33.1986019 C29.9527593,33.7215232 28.9829006,34 26.3083444,34 L7.6916556,34 C5.01709938,34 4.04724067,33.7215232 3.06946289,33.1986019 C2.09168511,32.6756806 1.32431939,31.9083149 0.801398111,30.9305371 C0.278476833,29.9527593 6.4726736e-16,28.9829006 -1.1140022e-15,26.3083444 L2.07168062e-16,7.6916556 C-1.2037061e-16,5.01709938 0.278476833,4.04724067 0.801398111,3.06946289 C1.32431939,2.09168511 2.09168511,1.32431939 3.06946289,0.801398111 C4.04724067,0.278476833 5.01709938,7.07452665e-16 7.6916556,-1.21758623e-15 Z"/><path d="M20,23 L14,23 L14,24.5 C14,26.9852813 11.9852814,29 9.5,29 C7.01471862,29 5,26.9852813 5,24.5 C5,22.0147187 7.01471862,20 9.5,20 L11,20 L11,14 L9.5,14 C7.01471862,14 5,11.9852814 5,9.5 C5,7.01471862 7.01471862,5 9.5,5 C11.9852814,5 14,7.01471862 14,9.5 L14,11 L20,11 L20,9.5 C20,7.01471862 22.0147187,5 24.5,5 C26.9852813,5 29,7.01471862 29,9.5 C29,11.9852814 26.9852813,14 24.5,14 L14,14 L14,20 L20,20 L20,18.5 C20,17.671573 20.671573,17 21.5,17 C22.3284271,17 23,17.671573 23,18.5 L23,20 L24.5,20 C26.9852813,20 29,22.0147187 29,24.5 C29,26.9852813 26.9852813,29 24.5,29 C22.0147187,29 20,26.9852813 20,24.5 L20,23 Z M11,11 L11,9.5 C11,8.67157287 10.3284271,8 9.5,8 C8.67157287,8 8,8.67157287 8,9.5 C8,10.3284271 8.67157287,11 9.5,11 L11,11 Z M11,23 L9.5,23 C8.67157287,23 8,23.6715729 8,24.5 C8,25.3284271 8.67157287,26 9.5,26 C10.3284271,26 11,25.3284271 11,24.5 L11,23 Z M23,11 L24.5,11 C25.3284271,11 26,10.3284271 26,9.5 C26,8.67157287 25.3284271,8 24.5,8 C23.6715729,8 23,8.67157287 23,9.5 L23,11 Z M23,23 L23,24.5 C23,25.3284271 23.6715729,26 24.5,26 C25.3284271,26 26,25.3284271 26,24.5 C26,23.6715729 25.3284271,23 24.5,23 L23,23 Z"/></g></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><g fill="#FFF" transform="translate(13 13)"><path fill-opacity=".3" d="M7.6916556,-1.21758623e-15 L26.3083444,3.10752092e-16 C28.9829006,-1.80555915e-16 29.9527593,0.278476833 30.9305371,0.801398111 C31.9083149,1.32431939 32.6756806,2.09168511 33.1986019,3.06946289 C33.7215232,4.04724067 34,5.01709938 34,7.6916556 L34,26.3083444 C34,28.9829006 33.7215232,29.9527593 33.1986019,30.9305371 C32.6756806,31.9083149 31.9083149,32.6756806 30.9305371,33.1986019 C29.9527593,33.7215232 28.9829006,34 26.3083444,34 L7.6916556,34 C5.01709938,34 4.04724067,33.7215232 3.06946289,33.1986019 C2.09168511,32.6756806 1.32431939,31.9083149 0.801398111,30.9305371 C0.278476833,29.9527593 6.4726736e-16,28.9829006 -1.1140022e-15,26.3083444 L2.07168062e-16,7.6916556 C-1.2037061e-16,5.01709938 0.278476833,4.04724067 0.801398111,3.06946289 C1.32431939,2.09168511 2.09168511,1.32431939 3.06946289,0.801398111 C4.04724067,0.278476833 5.01709938,7.07452665e-16 7.6916556,-1.21758623e-15 Z"/><path d="M20,23 L14,23 L14,24.5 C14,26.9852813 11.9852814,29 9.5,29 C7.01471862,29 5,26.9852813 5,24.5 C5,22.0147187 7.01471862,20 9.5,20 L11,20 L11,14 L9.5,14 C7.01471862,14 5,11.9852814 5,9.5 C5,7.01471862 7.01471862,5 9.5,5 C11.9852814,5 14,7.01471862 14,9.5 L14,11 L20,11 L20,9.5 C20,7.01471862 22.0147187,5 24.5,5 C26.9852813,5 29,7.01471862 29,9.5 C29,11.9852814 26.9852813,14 24.5,14 L14,14 L14,20 L20,20 L20,18.5 C20,17.671573 20.671573,17 21.5,17 C22.3284271,17 23,17.671573 23,18.5 L23,20 L24.5,20 C26.9852813,20 29,22.0147187 29,24.5 C29,26.9852813 26.9852813,29 24.5,29 C22.0147187,29 20,26.9852813 20,24.5 L20,23 Z M11,11 L11,9.5 C11,8.67157287 10.3284271,8 9.5,8 C8.67157287,8 8,8.67157287 8,9.5 C8,10.3284271 8.67157287,11 9.5,11 L11,11 Z M11,23 L9.5,23 C8.67157287,23 8,23.6715729 8,24.5 C8,25.3284271 8.67157287,26 9.5,26 C10.3284271,26 11,25.3284271 11,24.5 L11,23 Z M23,11 L24.5,11 C25.3284271,11 26,10.3284271 26,9.5 C26,8.67157287 25.3284271,8 24.5,8 C23.6715729,8 23,8.67157287 23,9.5 L23,11 Z M23,23 L23,24.5 C23,25.3284271 23.6715729,26 24.5,26 C25.3284271,26 26,25.3284271 26,24.5 C26,23.6715729 25.3284271,23 24.5,23 L23,23 Z"/></g></svg>
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div class="ecs-directory-entry">
3
- <ecs-icon :type="icon" color="#A1A6B0" />
3
+ <ecs-icon v-if="icon" :type="icon" color="#A1A6B0" />
4
+ <ecs-favicon v-else-if="favicon" :website="favicon" />
4
5
  <div v-if="indicator" class="indicator" :style="`background-color:`+indicator" />
5
6
  <div class="items">
6
7
  <slot></slot>
@@ -10,21 +11,33 @@
10
11
 
11
12
  <script>
12
13
  import EcsIcon from '../icon/icon'
14
+ import EcsFavicon from '../favicon/favicon'
13
15
 
14
16
  export default {
15
17
  components: {
16
- EcsIcon
18
+ EcsIcon,
19
+ EcsFavicon
17
20
  },
21
+
18
22
  props: {
19
23
  /** Adds an icon to the list item. The prop value must match a specific icons name. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
20
24
  icon: {
21
- type: String,
22
- required: true
25
+ type: String
26
+ },
27
+ /** Adds a website favicon to the list item. The prop value must match a specific icons name. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/images/favicons). */
28
+ favicon: {
29
+ type: String
23
30
  },
24
31
  /** Adds a small badge to the directory entry icon. Used to indicate online, or status states. The value must a color value (HEX, RGB, or shards variable). */
25
32
  indicator: {
26
33
  type: String,
27
34
  }
35
+ },
36
+
37
+ mounted(){
38
+ if(!this.icon && !this.favicon){
39
+ console.warn('Icon or Favicon prop is required for ecs-directory-entry component')
40
+ }
28
41
  }
29
42
  }
30
43
  </script>
@@ -41,6 +54,10 @@
41
54
  margin-bottom: 0;
42
55
  }
43
56
 
57
+ .ecs-favicon{
58
+ margin: 5px;
59
+ }
60
+
44
61
  .indicator{
45
62
  position: absolute;
46
63
  top: 16px;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-state-icon" role="presentation" :class="[type, iconColor]" />
2
+ <div class="ecs-state-icon" role="presentation" :class="[type, iconColor]" :style="iconStyle" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -15,6 +15,20 @@ export default {
15
15
  type: String,
16
16
  validator: v => ['vibrant', 'danger', 'neutral'].includes(v),
17
17
  default: 'neutral'
18
+ },
19
+ /** The size of the icon, in pixels. */
20
+ size: {
21
+ type: Number,
22
+ default: 60
23
+ }
24
+ },
25
+
26
+ computed: {
27
+ iconStyle(){
28
+ return {
29
+ width: `${this.size}px`,
30
+ height: `${this.size}px`
31
+ }
18
32
  }
19
33
  }
20
34
  }
@@ -25,10 +39,9 @@ export default {
25
39
  @import "../mixins/svg-uri";
26
40
 
27
41
  .ecs-state-icon{
28
- width: 60px;
29
- height: 60px;
30
42
  background: $color-gray-6;
31
43
  border-radius: 100%;
44
+ position: relative;
32
45
 
33
46
  &.vibrant{
34
47
  background: $color-blue-8;
@@ -41,111 +54,113 @@ export default {
41
54
  &:before{
42
55
  content: '';
43
56
  display: block;
44
- width: 60px;
45
- height: 60px;
46
- position: relative;
47
- left: 0;
48
- top: 0;
57
+ position: absolute;
58
+ inset: 0;
59
+ background-size: cover;
49
60
  }
50
61
 
51
62
  &.archive:before{
52
- background: url('../../assets/images/dialog-icons/dialog-archive.svg');
63
+ background-image: url('../../assets/images/dialog-icons/dialog-archive.svg');
53
64
  }
54
65
 
55
66
  &.annotation:before{
56
- background: url('../../assets/images/dialog-icons/dialog-annotation.svg');
67
+ background-image: url('../../assets/images/dialog-icons/dialog-annotation.svg');
57
68
  }
58
69
 
59
70
  &.comment:before{
60
- background: url('../../assets/images/dialog-icons/dialog-comment.svg');
71
+ background-image: url('../../assets/images/dialog-icons/dialog-comment.svg');
72
+ }
73
+
74
+ &.command:before{
75
+ background-image: url('../../assets/images/dialog-icons/dialog-command.svg');
61
76
  }
62
77
 
63
78
  &.document:before{
64
- background: url('../../assets/images/dialog-icons/dialog-document.svg');
79
+ background-image: url('../../assets/images/dialog-icons/dialog-document.svg');
65
80
  }
66
81
 
67
82
  &.download:before{
68
- background: url('../../assets/images/dialog-icons/dialog-download.svg');
83
+ background-image: url('../../assets/images/dialog-icons/dialog-download.svg');
69
84
  }
70
85
 
71
86
  &.edit:before{
72
- background: url('../../assets/images/dialog-icons/dialog-edit.svg');
87
+ background-image: url('../../assets/images/dialog-icons/dialog-edit.svg');
73
88
  }
74
89
 
75
90
  &.entry-add:before{
76
- background: url('../../assets/images/dialog-icons/dialog-entry-add.svg');
91
+ background-image: url('../../assets/images/dialog-icons/dialog-entry-add.svg');
77
92
  }
78
93
 
79
94
  &.error:before{
80
- background: url('../../assets/images/dialog-icons/dialog-error.svg');
95
+ background-image: url('../../assets/images/dialog-icons/dialog-error.svg');
81
96
  }
82
97
 
83
98
  &.folder-add:before{
84
- background: url('../../assets/images/dialog-icons/dialog-folder-add.svg');
99
+ background-image: url('../../assets/images/dialog-icons/dialog-folder-add.svg');
85
100
  }
86
101
 
87
102
  &.folder-remove:before{
88
- background: url('../../assets/images/dialog-icons/dialog-folder-remove.svg');
103
+ background-image: url('../../assets/images/dialog-icons/dialog-folder-remove.svg');
89
104
  }
90
105
 
91
106
  &.organization:before{
92
- background: url('../../assets/images/dialog-icons/dialog-organization.svg');
107
+ background-image: url('../../assets/images/dialog-icons/dialog-organization.svg');
93
108
  }
94
109
 
95
110
  &.security:before{
96
- background: url('../../assets/images/dialog-icons/dialog-security.svg');
111
+ background-image: url('../../assets/images/dialog-icons/dialog-security.svg');
97
112
  }
98
113
 
99
114
  &.tag:before{
100
- background: url('../../assets/images/dialog-icons/dialog-tag.svg');
115
+ background-image: url('../../assets/images/dialog-icons/dialog-tag.svg');
101
116
  }
102
117
 
103
118
  &.translation:before{
104
- background: url('../../assets/images/dialog-icons/dialog-translation.svg');
119
+ background-image: url('../../assets/images/dialog-icons/dialog-translation.svg');
105
120
  }
106
121
 
107
122
  &.upload:before{
108
- background: url('../../assets/images/dialog-icons/dialog-upload.svg');
123
+ background-image: url('../../assets/images/dialog-icons/dialog-upload.svg');
109
124
  }
110
125
 
111
126
  &.user:before{
112
- background: url('../../assets/images/dialog-icons/dialog-user.svg');
127
+ background-image: url('../../assets/images/dialog-icons/dialog-user.svg');
113
128
  }
114
129
 
115
130
  &.video:before{
116
- background: url('../../assets/images/dialog-icons/dialog-video.svg');
131
+ background-image: url('../../assets/images/dialog-icons/dialog-video.svg');
117
132
  }
118
133
 
119
134
  &.flag:before{
120
- background: url('../../assets/images/dialog-icons/dialog-flag.svg');
135
+ background-image: url('../../assets/images/dialog-icons/dialog-flag.svg');
121
136
  }
122
137
 
123
138
  &.rate:before{
124
- background: url('../../assets/images/dialog-icons/dialog-rate.svg');
139
+ background-image: url('../../assets/images/dialog-icons/dialog-rate.svg');
125
140
  }
126
141
 
127
142
  &.search:before{
128
- background: url('../../assets/images/dialog-icons/dialog-search.svg');
143
+ background-image: url('../../assets/images/dialog-icons/dialog-search.svg');
129
144
  }
130
145
 
131
146
  &.merge:before{
132
- background: url('../../assets/images/dialog-icons/dialog-merge.svg');
147
+ background-image: url('../../assets/images/dialog-icons/dialog-merge.svg');
133
148
  }
134
149
 
135
150
  &.sync:before{
136
- background: url('../../assets/images/dialog-icons/dialog-sync.svg');
151
+ background-image: url('../../assets/images/dialog-icons/dialog-sync.svg');
137
152
  }
138
153
 
139
154
  &.link:before{
140
- background: url('../../assets/images/dialog-icons/dialog-link.svg');
155
+ background-image: url('../../assets/images/dialog-icons/dialog-link.svg');
141
156
  }
142
157
 
143
158
  &.field:before{
144
- background: url('../../assets/images/dialog-icons/dialog-field.svg');
159
+ background-image: url('../../assets/images/dialog-icons/dialog-field.svg');
145
160
  }
146
161
 
147
162
  &.table:before{
148
- background: url('../../assets/images/dialog-icons/dialog-table.svg');
163
+ background-image: url('../../assets/images/dialog-icons/dialog-table.svg');
149
164
  }
150
165
  }
151
166
 
@@ -6,6 +6,20 @@ import { Meta } from '@storybook/addon-docs/blocks';
6
6
  Changelog
7
7
  </h1>
8
8
 
9
+ ## Version 6.2.2 (15 May 2023)
10
+
11
+ ### Features
12
+
13
+ - Added new EcsStateIcon component
14
+ - Refactored EcsDialogHeader component to use new EcsStateIcon component for icons
15
+ - Allow favicons to be used in EcsDirectoryEntry component
16
+
17
+ ### Fixes
18
+
19
+ - Added missing command icons to EcsStateIcon component
20
+ - Removed legacy Relativity illustration
21
+ - Fixed the EcsDialog content overflow bug
22
+
9
23
  ## Version 6.1.3 (8 May 2023)
10
24
 
11
25
  ### Fixes
@@ -28,3 +28,12 @@ export const directoryEntryIndicator = () => ({
28
28
  Active
29
29
  </ecs-directory-entry>`,
30
30
  });
31
+
32
+ export const directoryEntryFavicon = () => ({
33
+ components: { EcsDirectoryEntry },
34
+ template: `
35
+ <ecs-directory-entry favicon="twitter">
36
+ <a href="https://twitter.com">@twitteruser</a>
37
+ </ecs-directory-entry>
38
+ `
39
+ });
@@ -19,3 +19,12 @@ export const StateIconColors = () => ({
19
19
  <ecs-state-icon type="table" icon-color="danger" />
20
20
  </main>`,
21
21
  });
22
+
23
+ export const StateIconSize = () => ({
24
+ components: { EcsStateIcon },
25
+ template: `
26
+ <main>
27
+ <ecs-state-icon type="table" :size="30" />
28
+ <ecs-state-icon type="table" :size="100" />
29
+ </main>`,
30
+ });