@everchron/ec-shards 0.6.54 → 0.6.70

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.54",
3
+ "version": "0.6.70",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -2,7 +2,8 @@
2
2
  <button
3
3
  class="ecs-button-table"
4
4
  :class="[
5
- active ? 'active' : '', hasLabel,
5
+ active ? 'active' : '',
6
+ hasLabel,
6
7
  subtle ? 'subtle' : ''
7
8
  ]"
8
9
  :disabled="disabled"
@@ -11,7 +12,7 @@
11
12
  @mouseleave="$emit('mouseleave', $event)">
12
13
 
13
14
  <ecs-icon v-if="icon" :type="icon" width="20" height="20" />
14
- <div v-if="label">{{ label }}</div>
15
+ <div v-if="label != null">{{ label }}</div>
15
16
  </button>
16
17
  </template>
17
18
 
@@ -43,7 +44,7 @@
43
44
 
44
45
  computed: {
45
46
  hasLabel() {
46
- if (this.label && this.label !== '')
47
+ if (this.label && this.label !== '' || this.label != null)
47
48
  return `has-label`
48
49
  return this.label
49
50
  }
@@ -60,7 +61,7 @@
60
61
  align-items: center;
61
62
  border-radius: 3px;
62
63
  background: rgba($gray-7, .1);
63
- color: $gray-12;
64
+ color: $gray-14;
64
65
  transition: .2s;
65
66
  font-size: 14px;
66
67
  padding: 1px;
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <li class="ecs-quicklinks-link" :class="[typeClass, active ? 'active' : '']">
2
+ <li class="ecs-quicklinks-link" :class="[
3
+ typeClass,
4
+ active ? 'active' : '',
5
+ disabled ? 'disabled' : ''
6
+ ]">
3
7
  <label v-if="type === 'icon'" @click="$emit('click', $event)">
4
8
  <ecs-icon :type="icon" />
5
9
  <span class="filter-description">{{label}}</span>
@@ -7,7 +11,7 @@
7
11
  </label>
8
12
 
9
13
  <div v-else-if="type === 'favorability'" class="ecs-form-check" @click="$emit('click', $event)">
10
- <ecs-rating-favorability :type="favorabilityType" rating="Good" :label="false" :disabled="disabled" />
14
+ <ecs-rating-favorability :type="favorabilityType" :rating="rating" :label="false" :disabled="disabled" />
11
15
  <label class="ml-3">
12
16
  <span class="static-label">{{label}}</span>
13
17
  </label>
@@ -126,6 +130,10 @@
126
130
  color: $gray-8;
127
131
  }
128
132
 
133
+ label{
134
+ cursor: pointer;
135
+ }
136
+
129
137
  .ecs-form-check,
130
138
  label{
131
139
  width: 100%;
@@ -201,6 +209,15 @@
201
209
  color: $blue-9;
202
210
  }
203
211
  }
212
+
213
+ &.disabled{
214
+ cursor: default;
215
+ opacity: .5;
216
+
217
+ label{
218
+ cursor: default;
219
+ }
220
+ }
204
221
  }
205
222
  }
206
223
  </style>
@@ -220,5 +237,4 @@
220
237
  top: auto !important;
221
238
  }
222
239
  }
223
-
224
- </style>
240
+ </style>
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div class="ecs-favorability" :class="typeClass">
3
- <div class="ecs-favorability-button" :class="[css, loading ? `loading` : ``]" :title="ratingLabel">
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="ratingLabel && label" class="label" :class="loading ? `loading` : ``">{{ ratingLabel }}</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
- <ecs-skeleton-loader v-if="loading && ratingLabel" type="single" style="width:calc(100% - 30px)" />
9
+ <ecs-skeleton-loader v-if="loading && label" type="single" style="width:calc(100% - 30px)" />
10
10
  </div>
11
11
  </template>
12
12
 
@@ -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'].includes(v),
28
28
  required: true
29
29
  },
30
30
  type: {
@@ -45,10 +45,6 @@
45
45
  },
46
46
 
47
47
  computed: {
48
- ratingLabel() {
49
- return this.rating ? this.rating == 'Good' || this.rating == 'Bad' ? `${ this.rating } for Us` : this.rating : null
50
- },
51
-
52
48
  typeClass() {
53
49
  if (this.type && this.type !== '')
54
50
  return `ecs-favorability-${ this.type }`
@@ -57,12 +53,14 @@
57
53
 
58
54
  iconType() {
59
55
  switch (this.rating){
60
- case 'Good':
56
+ case 'good':
61
57
  return 'fav-arrow'
62
- case 'Mixed':
58
+ case 'mixed':
63
59
  return 'fav-mixed'
64
- case 'Bad':
60
+ case 'bad':
65
61
  return 'fav-arrow'
62
+ case 'unrated':
63
+ return 'fav-unrated'
66
64
  default:
67
65
  return 'fav-unrated'
68
66
  }
@@ -103,6 +101,7 @@
103
101
  .label{
104
102
  font-size: 13px;
105
103
  margin-left: 8px;
104
+ text-transform: capitalize;
106
105
  }
107
106
 
108
107
  .good{
@@ -28,7 +28,7 @@
28
28
  },
29
29
  party: {
30
30
  type: String,
31
- validator: v => ['client', 'opposition', 'joint', 'other', 'court', null].includes(v)
31
+ validator: v => ['client', 'opposing', 'joint', 'other', 'court', null].includes(v)
32
32
  },
33
33
  count: {
34
34
  type: Number,
@@ -7,7 +7,7 @@ export default {
7
7
 
8
8
  export const text = () => ({
9
9
  components: { EcsButtonTable },
10
- template: `<ecs-button-table icon="parties" label="4"></ecs-button-table>`,
10
+ template: `<ecs-button-table icon="parties" label="5"></ecs-button-table>`,
11
11
  });
12
12
 
13
13
  export const iconOnly = () => ({
@@ -8,38 +8,38 @@ export default {
8
8
  export const favorability = () => ({
9
9
  components: { EcsRatingFavorability },
10
10
  template: `<main>
11
- <ecs-rating-favorability rating="Good" />
12
- <ecs-rating-favorability rating="Mixed" />
13
- <ecs-rating-favorability rating="Bad" />
14
- <ecs-rating-favorability rating="Unrated" />
11
+ <ecs-rating-favorability rating="good" />
12
+ <ecs-rating-favorability rating="mixed" />
13
+ <ecs-rating-favorability rating="bad" />
14
+ <ecs-rating-favorability rating="unrated" />
15
15
  </main>`,
16
16
  });
17
17
 
18
18
  export const favorabilityLabel = () => ({
19
19
  components: { EcsRatingFavorability },
20
20
  template: `<main>
21
- <ecs-rating-favorability label rating="Good" />
22
- <ecs-rating-favorability label rating="Mixed" />
23
- <ecs-rating-favorability label rating="Bad" />
24
- <ecs-rating-favorability label rating="Unrated" />
21
+ <ecs-rating-favorability label rating="good" />
22
+ <ecs-rating-favorability label rating="mixed" />
23
+ <ecs-rating-favorability label rating="bad" />
24
+ <ecs-rating-favorability label rating="unrated" />
25
25
  </main>`,
26
26
  });
27
27
 
28
28
  export const favorabilityTypes = () => ({
29
29
  components: { EcsRatingFavorability },
30
30
  template: `<main>
31
- <ecs-rating-favorability rating="Good" />
32
- <ecs-rating-favorability type="active" rating="Good" />
33
- <ecs-rating-favorability type="subtle" rating="Good" />
31
+ <ecs-rating-favorability rating="good" />
32
+ <ecs-rating-favorability type="active" rating="good" />
33
+ <ecs-rating-favorability type="subtle" rating="good" />
34
34
  </main>`,
35
35
  });
36
36
 
37
37
  export const favorabilityLoading = () => ({
38
38
  components: { EcsRatingFavorability },
39
39
  template: `<main>
40
- <ecs-rating-favorability label loading rating="Good" />
41
- <ecs-rating-favorability label loading rating="Mixed" />
42
- <ecs-rating-favorability label loading rating="Bad" />
43
- <ecs-rating-favorability label loading rating="Unrated" />
40
+ <ecs-rating-favorability label loading rating="good" />
41
+ <ecs-rating-favorability label loading rating="mixed" />
42
+ <ecs-rating-favorability label loading rating="bad" />
43
+ <ecs-rating-favorability label loading rating="unrated" />
44
44
  </main>`,
45
45
  });
@@ -17,10 +17,10 @@ Rating component to rate documents and entries by favorability.
17
17
  </Canvas>
18
18
 
19
19
  ```js
20
- <ecs-rating-favorability rating="Good" />
21
- <ecs-rating-favorability rating="Mixed" />
22
- <ecs-rating-favorability rating="Bad" />
23
- <ecs-rating-favorability rating="Unrated" />
20
+ <ecs-rating-favorability rating="good" />
21
+ <ecs-rating-favorability rating="mixed" />
22
+ <ecs-rating-favorability rating="bad" />
23
+ <ecs-rating-favorability rating="unrated" />
24
24
  ```
25
25
 
26
26
  ## Labels
@@ -34,10 +34,10 @@ Add a label to show the favorability name by adding the `label` prop.
34
34
  </Canvas>
35
35
 
36
36
  ```js
37
- <ecs-rating-favorability label rating="Good" />
38
- <ecs-rating-favorability label rating="Mixed" />
39
- <ecs-rating-favorability label rating="Bad" />
40
- <ecs-rating-favorability label rating="Unrated" />
37
+ <ecs-rating-favorability label rating="good" />
38
+ <ecs-rating-favorability label rating="mixed" />
39
+ <ecs-rating-favorability label rating="bad" />
40
+ <ecs-rating-favorability label rating="unrated" />
41
41
  ```
42
42
 
43
43
  ## Type
@@ -52,8 +52,8 @@ There are several visual variants of favorability ratings available. Set the `ty
52
52
 
53
53
  ```js
54
54
  <ecs-rating-favorability rating="good" />
55
- <ecs-rating-favorability type="active" rating="Good" />
56
- <ecs-rating-favorability type="subtle" rating="Good" />
55
+ <ecs-rating-favorability type="active" rating="good" />
56
+ <ecs-rating-favorability type="subtle" rating="good" />
57
57
  ```
58
58
 
59
59
  ## Loading
@@ -67,10 +67,10 @@ Add the `loading` attribute to display a skeleton loader for the favorability co
67
67
  </Canvas>
68
68
 
69
69
  ```js
70
- <ecs-rating-favorability label loading rating="Good" />
71
- <ecs-rating-favorability label loading rating="Mixed" />
72
- <ecs-rating-favorability label loading rating="Bad" />
73
- <ecs-rating-favorability label loading rating="Unrated" />
70
+ <ecs-rating-favorability label loading rating="good" />
71
+ <ecs-rating-favorability label loading rating="mixed" />
72
+ <ecs-rating-favorability label loading rating="bad" />
73
+ <ecs-rating-favorability label loading rating="unrated" />
74
74
  ```
75
75
 
76
76
  ## Props
@@ -32,9 +32,9 @@ export const partyTag = () => ({
32
32
  <ecs-tag type="party" party="client" active>active</ecs-tag>
33
33
  </main>
34
34
  <main class="mb-4">
35
- <ecs-tag type="party" party="opposition">opposition</ecs-tag>
36
- <ecs-tag type="party" party="opposition" hover>hover</ecs-tag>
37
- <ecs-tag type="party" party="opposition" active>active</ecs-tag>
35
+ <ecs-tag type="party" party="opposing">opposition</ecs-tag>
36
+ <ecs-tag type="party" party="opposing" hover>hover</ecs-tag>
37
+ <ecs-tag type="party" party="opposing" active>active</ecs-tag>
38
38
  </main>
39
39
  <main class="mb-4">
40
40
  <ecs-tag type="party" party="joint">joint</ecs-tag>
@@ -70,4 +70,4 @@ export const tagsLoading = () => ({
70
70
  <ecs-tag type="group" loading>hover</ecs-tag>
71
71
  <ecs-tag type="filter" loading>active</ecs-tag>
72
72
  </main>`,
73
- });
73
+ });
@@ -66,9 +66,9 @@ For the party tag style, set the `type` prop to `party`. Party tags require the
66
66
  <ecs-tag type="party" party="client">client</ecs-tag>
67
67
  <ecs-tag type="party" party="client" hover>hover</ecs-tag>
68
68
  <ecs-tag type="party" party="client" active>active</ecs-tag>
69
- <ecs-tag type="party" party="opposition">opposition</ecs-tag>
70
- <ecs-tag type="party" party="opposition" hover>hover</ecs-tag>
71
- <ecs-tag type="party" party="opposition" active>active</ecs-tag>
69
+ <ecs-tag type="party" party="opposing">opposition</ecs-tag>
70
+ <ecs-tag type="party" party="opposing" hover>hover</ecs-tag>
71
+ <ecs-tag type="party" party="opposing" active>active</ecs-tag>
72
72
  <ecs-tag type="party" party="joint">joint</ecs-tag>
73
73
  <ecs-tag type="party" party="joint" hover>hover</ecs-tag>
74
74
  <ecs-tag type="party" party="joint" active>active</ecs-tag>
@@ -114,4 +114,4 @@ Add the `loading` attribute to show a skeleton loader within the tag.
114
114
 
115
115
  ## Props, Slots and Events
116
116
 
117
- <ArgsTable of={EcsTag} />
117
+ <ArgsTable of={EcsTag} />