@everchron/ec-shards 0.6.78 → 0.6.82

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.6.78",
3
+ "version": "0.6.82",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -58,6 +58,11 @@
58
58
  }
59
59
  },
60
60
 
61
+ mounted(){
62
+ if (this.label == 0)
63
+ console.log('label == 0 disabled', this.disabled)
64
+ },
65
+
61
66
  computed: {
62
67
  hasLabel() {
63
68
  if (this.label && this.label !== '' || this.label != null)
@@ -73,7 +73,7 @@
73
73
  height: 16px;
74
74
  left: 16px;
75
75
  top: 16px;
76
- //animation: spin .8s infinite linear reverse; removed distracting animation via conversation
76
+ animation: spin 1.5s infinite linear reverse;
77
77
  background: svg-uri('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g fill="none" fill-rule="evenodd"><circle cx="8" cy="8" r="8" fill="#FFF"/><path fill="#2F333C" d="M14.0263548,8.16381819 C14.0113782,7.38027913 13.841386,6.59917757 13.5274173,5.88496663 C13.2144798,5.17012288 12.7602845,4.52256819 12.2027063,3.98746663 C11.6454563,3.45196663 10.9846126,3.0286385 10.2693001,2.74935725 C9.55440947,2.46899788 8.78575322,2.335076 8.02635478,2.35131819 C7.2668626,2.36634163 6.51074541,2.53148225 5.81931572,2.83595882 C5.12734697,3.13942757 4.50046416,3.57974788 3.98258916,4.12005257 C3.46433916,4.660076 3.05493291,5.30022444 2.78509697,5.99268538 C2.51422978,6.68481819 2.38515947,7.42846663 2.40135478,8.16381819 C2.4164251,8.89928694 2.57671416,9.63039632 2.8716751,10.2990448 C3.1656751,10.9681854 3.59209697,11.5743729 4.11515166,12.0749979 C4.6379251,12.5760213 5.25740166,12.9715291 5.92703447,13.2318729 C6.59638603,13.4932479 7.31507353,13.6174432 8.02635478,13.6013182 C8.73777666,13.586201 9.44387822,13.4307635 10.0897454,13.1452948 C10.7360345,12.8607401 11.3215735,12.4482635 11.804972,11.9424354 C12.2887454,11.4368885 12.6703313,10.8381073 12.9212298,10.1913026 C13.073972,9.79921663 13.177636,9.38974007 13.2322688,8.97491975 C13.2468704,8.9757635 13.2615423,8.976326 13.2763548,8.976326 C13.6905657,8.976326 14.0263548,8.64056038 14.0263548,8.226326 C14.0263548,8.20527913 14.0252532,8.18446663 14.0235657,8.16384163 L14.0263548,8.16384163 L14.0263548,8.16381819 Z M12.8346282,10.1553963 C12.5595657,10.7788573 12.1609876,11.3436776 11.672386,11.8098494 C11.1840657,12.2763729 10.6059798,12.6440604 9.98202666,12.8855135 C9.35826103,13.1278338 8.68956572,13.2423729 8.02635478,13.2263182 C7.36302666,13.2111073 6.70687041,13.0653494 6.10658916,12.7988885 C5.50600322,12.5332713 4.96185478,12.1486151 4.51290947,11.6772635 C4.06363603,11.2061932 3.70984697,10.6487791 3.47788603,10.0476776 C3.24503447,9.44669319 3.13537041,8.80298225 3.15135478,8.16381819 C3.1666126,7.52453694 3.30754228,6.89336507 3.5644876,6.3158885 C3.82063603,5.73815413 4.19141728,5.21467757 4.64549541,4.78295882 C5.0993626,4.35091194 5.63608135,4.01104475 6.21433135,3.78855257 C6.79251103,3.56519319 7.4112376,3.46035725 8.02635478,3.47631819 C8.64158916,3.49162288 9.24777666,3.627701 9.80247197,3.87515413 C10.3573782,4.12183382 10.8601595,4.47869319 11.2746282,4.91556819 C11.6894251,5.35218538 12.0153704,5.86823225 12.2284173,6.42363069 C12.442261,6.97900569 12.5422688,7.57274788 12.5263548,8.16381819 L12.5291438,8.16381819 C12.5274563,8.18444319 12.5263548,8.20525569 12.5263548,8.22630257 C12.5263548,8.61316194 12.8192298,8.93146663 13.1953313,8.97189632 C13.1223938,9.37996663 13.0016204,9.77835725 12.8346282,10.1553963 L12.8346282,10.1553963 Z"/></g></svg>');
78
78
  }
79
79
  }
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="ecs-favorability" :class="typeClass">
3
- <div class="ecs-favorability-button" :class="[css, loading ? `loading` : ``]" :title="rating">
3
+ <div class="ecs-favorability-button" :class="[css, loading ? 'loading' : '']" :title="rating">
4
4
  <ecs-icon :type="iconType" />
5
5
  </div>
6
- <span v-if="label" class="label" :class="loading ? `loading` : ``">{{ rating }}</span>
6
+ <span v-if="label" class="label" :class="loading ? 'loading' : ''">{{ rating }}</span>
7
7
 
8
8
  <ecs-skeleton-loader v-if="loading" type="rect" :width="20" :height="20" />
9
9
  <ecs-skeleton-loader v-if="loading && label" type="single" style="width:calc(100% - 30px)" />
@@ -24,7 +24,7 @@
24
24
  },
25
25
  rating: {
26
26
  type: String,
27
- validator: v => ['good', 'mixed', 'bad', 'unrated'].includes(v),
27
+ validator: v => ['good', 'mixed', 'bad', 'unrated', 'Good', 'Mixed', 'Bad', 'Unrated'].includes(v),
28
28
  required: true
29
29
  },
30
30
  type: {
@@ -54,12 +54,16 @@
54
54
  iconType() {
55
55
  switch (this.rating){
56
56
  case 'good':
57
+ case 'Good':
57
58
  return 'fav-arrow'
58
59
  case 'mixed':
60
+ case 'Mixed':
59
61
  return 'fav-mixed'
60
62
  case 'bad':
63
+ case 'Bad':
61
64
  return 'fav-arrow'
62
65
  case 'unrated':
66
+ case 'Unrated':
63
67
  return 'fav-unrated'
64
68
  default:
65
69
  return 'fav-unrated'
@@ -5,6 +5,7 @@
5
5
  selectable ? 'selectable' : '',
6
6
  draggable ? 'draggable' : '',
7
7
  large ? 'ecs-tree-view-entry-lg' : '',
8
+ actionsOnHover ? 'actions-hover' : '',
8
9
  stateClass
9
10
  ]">
10
11
 
@@ -15,7 +16,7 @@
15
16
  @click="toggleCollapse" />
16
17
 
17
18
  <ecs-icon v-if="icon" :type="icon" :color="iconColor" :width="iconSize" :height="iconSize" />
18
- <span class="title">
19
+ <span @click="$emit('click', $event)" class="title">
19
20
  <slot></slot>
20
21
  </span>
21
22
  <span v-if="count" class="after small subtle">{{count}}</span>
@@ -75,7 +76,11 @@
75
76
  draggable: {
76
77
  type: Boolean,
77
78
  default: false
78
- }
79
+ },
80
+ actionsOnHover: {
81
+ type: Boolean,
82
+ default: false
83
+ },
79
84
  },
80
85
 
81
86
  data () {
@@ -154,6 +159,21 @@
154
159
  }
155
160
  }
156
161
 
162
+ &.ecs-state-hover{
163
+ cursor: pointer;
164
+ }
165
+
166
+ &.actions-hover{
167
+ .ecs-tree-view-entry-actions{
168
+ opacity: 0;
169
+ transition: .2s;
170
+ }
171
+
172
+ &:hover .ecs-tree-view-entry-actions{
173
+ opacity: 1;
174
+ }
175
+ }
176
+
157
177
  &.active{
158
178
  background: rgba(#0661EB, .06);
159
179
  }
@@ -199,6 +219,11 @@
199
219
  overflow: hidden;
200
220
  white-space: nowrap;
201
221
  margin-left: 6px;
222
+ flex: 1;
223
+ }
224
+
225
+ &-actions{
226
+ margin-left: auto;
202
227
  }
203
228
 
204
229
  .after{
@@ -1,5 +1,6 @@
1
1
  import EcsTreeListItem from '@components/tree-list-item/tree-list-item'
2
2
  import EcsTreeList from '@components/tree-list/tree-list'
3
+ import EcsButton from '@components/button/button'
3
4
 
4
5
  export default {
5
6
  title: 'Content Structures/Tree List Item',
@@ -92,3 +93,21 @@ export const treeListItemDraggable = () => ({
92
93
  </ecs-tree-list-item>
93
94
  </ecs-tree-list>`,
94
95
  });
96
+
97
+ export const treeListItemActions = () => ({
98
+ components: { EcsTreeListItem, EcsTreeList, EcsButton },
99
+ template: `<ecs-tree-list>
100
+ <ecs-tree-list-item state="hover">
101
+ Actions (always visible)
102
+ <template slot="actions">
103
+ <ecs-button size="xsml" icon="link-remove" icon-only />
104
+ </template>
105
+ </ecs-tree-list-item>
106
+ <ecs-tree-list-item state="hover" actions-on-hover>
107
+ Actions (on hover)
108
+ <template slot="actions">
109
+ <ecs-button size="xsml" icon="link-remove" icon-only />
110
+ </template>
111
+ </ecs-tree-list-item>
112
+ </ecs-tree-list>`,
113
+ });
@@ -143,6 +143,27 @@ If a tree view item can be dragged, set the `draggable` attribute. This will add
143
143
  </ecs-tree-list>
144
144
  ```
145
145
 
146
+ ## Actions
147
+
148
+ If a tree view item has any additional controls or action buttons, use the `actions` slot.
149
+
150
+ <Canvas withSource="none" withToolbar={true}>
151
+ <Story name="Tree List Item Actions" height="80px">
152
+ {stories.treeListItemActions()}
153
+ </Story>
154
+ </Canvas>
155
+
156
+ ```js
157
+ <ecs-tree-list>
158
+ <ecs-tree-list-item>
159
+ Draggable List Item
160
+ <template slot="actions">
161
+ <ecs-button size="xsml" icon="link-break" icon-only />
162
+ </template>
163
+ </ecs-tree-list-item>
164
+ </ecs-tree-list>
165
+ ```
166
+
146
167
  ## Props, Slots and Events
147
168
 
148
- <ArgsTable of={EcsTreeListItem} />
169
+ <ArgsTable of={EcsTreeListItem} />
package/src/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file