@everchron/ec-shards 0.8.2 → 0.8.3

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.3",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -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>
@@ -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
 
@@ -21,6 +24,9 @@
21
24
  type: String,
22
25
  required: true
23
26
  },
27
+ subIcon: {
28
+ type: String
29
+ },
24
30
  refresh: {
25
31
  type: Boolean,
26
32
  default: false
@@ -75,13 +81,17 @@
75
81
  pointer-events: none;
76
82
  }
77
83
 
78
- &:hover{
84
+ &:not([disabled]):not(.loading):hover{
79
85
  background: transparent;
80
86
 
81
87
  &:after{
82
88
  opacity: 1;
83
89
  transform: scale(1);
84
90
  }
91
+
92
+ .sub-icon{
93
+ background: $gray-2;
94
+ }
85
95
  }
86
96
 
87
97
  .badge{
@@ -95,6 +105,18 @@
95
105
  border: 2px solid #FFF;
96
106
  }
97
107
 
108
+ .sub-icon{
109
+ padding: 2px;
110
+ color: $gray-15;
111
+ position: absolute;
112
+ bottom: 1px;
113
+ left: 1px;
114
+ display: flex;
115
+ border-radius: 4px;
116
+ background: #FFF;
117
+ transition: .2s background;
118
+ }
119
+
98
120
  &.loading{
99
121
  opacity: .5;
100
122
  cursor: wait;
@@ -111,9 +133,13 @@
111
133
  &:disabled{
112
134
  opacity: .5;
113
135
  cursor: not-allowed;
136
+
137
+ .sub-icon{
138
+ color: $gray-6;
139
+ }
114
140
  }
115
141
 
116
- &.active{
142
+ &:not([disabled]):not(.loading).active{
117
143
  color: $blue-9;
118
144
 
119
145
  &:after{
@@ -121,6 +147,11 @@
121
147
  transform: scale(1);
122
148
  background: rgba($blue-8, .08);
123
149
  }
150
+
151
+ .sub-icon{
152
+ background: $blue-2;
153
+ color: $blue-13;
154
+ }
124
155
  }
125
156
  }
126
157
  </style>
@@ -130,5 +161,11 @@
130
161
 
131
162
  .popover-button.active > .ecs-toolbar-icon-button{
132
163
  color: $blue-9;
164
+
165
+ &:after{
166
+ opacity: 1;
167
+ transform: scale(1);
168
+ background: rgba($blue-8, .08);
169
+ }
133
170
  }
134
171
  </style>
@@ -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} />