@everchron/ec-shards 0.6.77 → 0.6.78

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.77",
3
+ "version": "0.6.78",
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="30" height="30" viewBox="0 0 30 30"><polygon vector-effect="non-scaling-stroke" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" points="16.048 5.25 7.146 17.167 15 17.167 13.952 24.75 22.854 12.833 15 12.833"/></svg>
@@ -14,7 +14,7 @@
14
14
  @mouseleave="$emit('mouseleave', $event)">
15
15
 
16
16
  <ecs-icon v-if="icon" :type="icon" :width="iconSize" :height="iconSize" />
17
- <div v-if="label != null" class="label">{{ label }}</div>
17
+ <div v-if="label != null" class="button-label">{{ label }}</div>
18
18
  <div v-if="chevron" class="chevron" :class="active ? 'expand' : ''" />
19
19
  </button>
20
20
  </template>
@@ -102,7 +102,7 @@
102
102
  padding: 1px;
103
103
  height: 22px;
104
104
 
105
- .label{
105
+ .button-label{
106
106
  padding: 0 6px;
107
107
  }
108
108
 
@@ -117,7 +117,7 @@
117
117
  font-size: 12px;
118
118
  height: 20px;
119
119
 
120
- .label{
120
+ .button-label{
121
121
  padding: 0 4px;
122
122
  }
123
123
  }
@@ -35,6 +35,21 @@
35
35
  }
36
36
  }
37
37
 
38
+ &-selected{
39
+ background: rgba($blue-10, .1);
40
+
41
+ .ecs-fade-escape{
42
+ &:before{
43
+ opacity: 1;
44
+ background: linear-gradient(to right, rgba(242,247,254,0) 0%, rgba(242,247,254,1) 60%, rgba(242,247,254,1) 100%);
45
+ }
46
+
47
+ &:after{
48
+ opacity: 0;
49
+ }
50
+ }
51
+ }
52
+
38
53
  &-add{
39
54
  background: #F2FBF5;
40
55
 
@@ -14,11 +14,14 @@
14
14
  :collapsed="!isVisible"
15
15
  @click="toggleCollapse" />
16
16
 
17
- <ecs-icon v-if="icon" :type="icon" :color="iconColor" />
17
+ <ecs-icon v-if="icon" :type="icon" :color="iconColor" :width="iconSize" :height="iconSize" />
18
18
  <span class="title">
19
19
  <slot></slot>
20
20
  </span>
21
21
  <span v-if="count" class="after small subtle">{{count}}</span>
22
+ <div v-if="$slots.actions" class="ecs-tree-view-entry-actions">
23
+ <slot name="actions"></slot>
24
+ </div>
22
25
  </div>
23
26
  <div v-if="$slots.collapse" :class="isVisible ? 'collapse-show' : 'collapse-hide'">
24
27
  <slot name="collapse"></slot>
@@ -58,7 +61,7 @@
58
61
  },
59
62
  state: {
60
63
  type: String,
61
- validator: v => ['active', 'shadow', 'add', 'null', null].includes(v),
64
+ validator: v => ['active', 'shadow', 'add', 'selected', 'hover', 'null', null].includes(v),
62
65
  default: null
63
66
  },
64
67
  selectable: {
@@ -92,6 +95,12 @@
92
95
  return `color-${this.iconColor}`
93
96
  return this.iconColor
94
97
  },
98
+ iconSize() {
99
+ if (this.large == true)
100
+ return '30'
101
+ else
102
+ return '20'
103
+ },
95
104
  stateClass() {
96
105
  if (this.state && this.state !== '')
97
106
  return `ecs-state-${this.state}`
@@ -121,9 +130,6 @@
121
130
  .ecs-tree-view-entry{
122
131
  display: flex;
123
132
  align-items: center;
124
- -webkit-user-select: none;
125
- -moz-user-select: none;
126
- -ms-user-select: none;
127
133
  user-select: none;
128
134
  transition: .1s;
129
135
  font-size: 13px;
@@ -175,10 +181,6 @@
175
181
  line-height: 30px;
176
182
  }
177
183
 
178
- i[class*="icon-"]{
179
- margin-right: -4px;
180
- }
181
-
182
184
  .ecs-form-check{
183
185
  margin-bottom: 0;
184
186
  padding-left: 2px;
@@ -45,9 +45,18 @@ export const treeListItemSizes = () => ({
45
45
  export const treeListItemStates = () => ({
46
46
  components: { EcsTreeListItem, EcsTreeList },
47
47
  template: `<ecs-tree-list>
48
- <ecs-tree-list-item :count="13" state="null" class="mb-1">
48
+ <ecs-tree-list-item :count="13" class="mb-1">
49
49
  Default
50
50
  </ecs-tree-list-item>
51
+ <ecs-tree-list-item :count="13" state="hover" class="mb-1">
52
+ Hover
53
+ </ecs-tree-list-item>
54
+ <ecs-tree-list-item :count="13" selectable class="mb-1">
55
+ Selectable
56
+ </ecs-tree-list-item>
57
+ <ecs-tree-list-item :count="13" selectable state="selected" class="mb-1">
58
+ Selected
59
+ </ecs-tree-list-item>
51
60
  <ecs-tree-list-item :count="13" state="active" class="mb-1">
52
61
  Active
53
62
  </ecs-tree-list-item>