@everchron/ec-shards 0.8.2 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "0.8.2",
3
+ "version": "0.8.5",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -29,10 +29,10 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/core": "^7.13.15",
32
- "@storybook/addon-actions": "^6.2.8",
33
- "@storybook/addon-essentials": "^6.2.8",
34
- "@storybook/addon-links": "^6.2.8",
35
- "@storybook/vue": "^6.2.8",
32
+ "@storybook/addon-actions": "^6.5.9",
33
+ "@storybook/addon-essentials": "^6.5.9",
34
+ "@storybook/addon-links": "^6.5.9",
35
+ "@storybook/vue": "^6.5.9",
36
36
  "@vue/cli-plugin-babel": "~4.5.0",
37
37
  "@vue/cli-service": "~4.5.0",
38
38
  "babel-eslint": "^10.1.0",
package/src/.DS_Store ADDED
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path vector-effect="non-scaling-stroke" d="M9.39477 14.5005C10.0036 14.0011 10.8919 14.0455 11.4477 14.6024L12.388 15.5416V11.7521C12.388 10.2734 13.8364 9.22903 15.2394 9.69703L18.2759 10.7089C19.161 11.0035 19.7579 11.8323 19.7579 12.7639V17.2034C19.7579 19.2672 18.0842 20.9409 16.0204 20.9409H14.2589C13.0814 20.9409 11.9731 20.3863 11.2668 19.4438L9.1391 16.6022C8.64835 15.9457 8.76102 15.0194 9.39477 14.5005V14.5005Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path vector-effect="non-scaling-stroke" d="M10.0329 24.1163L5.88483 19.9682C5.47858 19.5619 5.25 19.0105 5.25 18.4352V11.5637C5.25 10.9895 5.47858 10.4381 5.88375 10.0329L10.0318 5.88483C10.4381 5.47858 10.9895 5.25 11.5637 5.25H18.4342C19.0094 5.25 19.5608 5.47858 19.9671 5.88483L24.1141 10.0318C24.5214 10.4392 24.75 10.9917 24.75 11.5669V18.4352C24.75 19.0094 24.5214 19.5598 24.1163 19.966L19.9682 24.1152C19.5619 24.5214 19.0105 24.75 18.4352 24.75H11.5637C10.9895 24.75 10.4381 24.5214 10.0329 24.1163V24.1163Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
Binary file
@@ -7,6 +7,9 @@
7
7
  ]" @click="$emit('click', $event)">
8
8
  <ecs-icon :type="icon" />
9
9
  <span v-if="hasBadge" class="badge" />
10
+ <div class="sub-icon">
11
+ <ecs-icon v-if="subIcon" :type="subIcon" width="14" height="14" />
12
+ </div>
10
13
  </button>
11
14
  </template>
12
15
 
@@ -16,11 +19,24 @@
16
19
  export default {
17
20
  components: { EcsIcon },
18
21
 
22
+ mounted(){
23
+ console.log('subIcon', this.subIcon)
24
+ },
25
+
26
+ watch:{
27
+ subIcon(){
28
+ console.log('w:subIcon', this.subIcon)
29
+ }
30
+ },
31
+
19
32
  props: {
20
33
  icon: {
21
34
  type: String,
22
35
  required: true
23
36
  },
37
+ subIcon: {
38
+ type: String
39
+ },
24
40
  refresh: {
25
41
  type: Boolean,
26
42
  default: false
@@ -75,13 +91,17 @@
75
91
  pointer-events: none;
76
92
  }
77
93
 
78
- &:hover{
94
+ &:not([disabled]):not(.loading):hover{
79
95
  background: transparent;
80
96
 
81
97
  &:after{
82
98
  opacity: 1;
83
99
  transform: scale(1);
84
100
  }
101
+
102
+ .sub-icon{
103
+ background: $gray-2;
104
+ }
85
105
  }
86
106
 
87
107
  .badge{
@@ -95,6 +115,18 @@
95
115
  border: 2px solid #FFF;
96
116
  }
97
117
 
118
+ .sub-icon{
119
+ padding: 2px;
120
+ color: $gray-15;
121
+ position: absolute;
122
+ bottom: 1px;
123
+ left: 1px;
124
+ display: flex;
125
+ border-radius: 4px;
126
+ background: #FFF;
127
+ transition: .2s background;
128
+ }
129
+
98
130
  &.loading{
99
131
  opacity: .5;
100
132
  cursor: wait;
@@ -111,9 +143,13 @@
111
143
  &:disabled{
112
144
  opacity: .5;
113
145
  cursor: not-allowed;
146
+
147
+ .sub-icon{
148
+ color: $gray-6;
149
+ }
114
150
  }
115
151
 
116
- &.active{
152
+ &:not([disabled]):not(.loading).active{
117
153
  color: $blue-9;
118
154
 
119
155
  &:after{
@@ -121,6 +157,11 @@
121
157
  transform: scale(1);
122
158
  background: rgba($blue-8, .08);
123
159
  }
160
+
161
+ .sub-icon{
162
+ background: $blue-2;
163
+ color: $blue-13;
164
+ }
124
165
  }
125
166
  }
126
167
  </style>
@@ -130,5 +171,11 @@
130
171
 
131
172
  .popover-button.active > .ecs-toolbar-icon-button{
132
173
  color: $blue-9;
174
+
175
+ &:after{
176
+ opacity: 1;
177
+ transform: scale(1);
178
+ background: rgba($blue-8, .08);
179
+ }
133
180
  }
134
181
  </style>
@@ -21,7 +21,7 @@
21
21
  <slot name="control"></slot>
22
22
  </div>
23
23
 
24
- <span @click="$emit('click', $event)" class="title">
24
+ <span @click="$emit('click', $event)" class="title" :class="titleOverflow ? 'overflow' : ''">
25
25
  <slot></slot>
26
26
  </span>
27
27
 
@@ -43,7 +43,7 @@
43
43
  import EcsButtonCollapse from '../button-collapse/button-collapse'
44
44
 
45
45
  export default {
46
- components: { EcsIcon, EcsButtonCollapse },
46
+ components: { EcsIcon, EcsStates, EcsButtonCollapse },
47
47
 
48
48
  props: {
49
49
  id: String,
@@ -76,6 +76,7 @@
76
76
  type: Boolean,
77
77
  default: false
78
78
  },
79
+ /** Prop Description */
79
80
  large: {
80
81
  type: Boolean,
81
82
  default: false
@@ -88,6 +89,10 @@
88
89
  type: Boolean,
89
90
  default: false
90
91
  },
92
+ titleOverflow: {
93
+ type: Boolean,
94
+ default: false
95
+ }
91
96
  },
92
97
 
93
98
  data () {
@@ -229,6 +234,10 @@
229
234
  margin-left: 6px;
230
235
  margin-right: 8px;
231
236
  flex: 1;
237
+
238
+ &.overflow{
239
+ overflow: unset;
240
+ }
232
241
  }
233
242
 
234
243
  &-control{
@@ -15,3 +15,10 @@ export const regular = () => ({
15
15
  <ecs-button-toolbar-icon icon="toolbar-cards" has-badge />
16
16
  </main>`,
17
17
  });
18
+
19
+ export const subIcon = () => ({
20
+ components: { EcsButtonToolbarIcon },
21
+ template: `<main>
22
+ <ecs-button-toolbar-icon icon="toolbar-refresh" sub-icon="mail" />
23
+ </main>`,
24
+ });
@@ -23,7 +23,6 @@ Toolbar icon buttons are a special type of button, that should be used exclusive
23
23
  <ecs-button-toolbar-icon loading icon="toolbar-sort" />
24
24
  <ecs-button-toolbar-icon disabled icon="toolbar-sort" />
25
25
  <ecs-button-toolbar-icon icon="toolbar-cards" has-badge />
26
-
27
26
  ```
28
27
 
29
28
  ## States
@@ -35,6 +34,20 @@ Toolbar icon buttons can have different states, which can be applied by setting
35
34
  + `active`
36
35
  + `has-badge`
37
36
 
37
+ ## Sub Icon
38
+
39
+ A sub icon can be shown in the bottom left edge, which can communicate additional activity state changes.
40
+
41
+ <Canvas withSource="none" withToolbar={true}>
42
+ <Story name="Sub Icon" height="50px">
43
+ {stories.subIcon()}
44
+ </Story>
45
+ </Canvas>
46
+
47
+ ```js
48
+ <ecs-button-toolbar-icon icon="refresh" sub-icon="mail" />
49
+ ```
50
+
38
51
  ## Props, Slots and Events
39
52
 
40
53
  <ArgsTable of={EcsButtonToolbarIcon} />