@everchron/ec-shards 7.5.26 → 7.5.28

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": "7.5.26",
3
+ "version": "7.5.28",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
Binary file
Binary file
Binary file
@@ -131,10 +131,10 @@
131
131
  },
132
132
 
133
133
  methods: {
134
- handleClick(e) {
134
+ handleClick() {
135
135
  this.indeterminateState = false
136
136
  this.checked = !this.checked
137
- this.$emit('input', this.checked ? this.valueWhenTrue : this.valueWhenFalse, this.id, e)
137
+ this.$emit('input', this.checked ? this.valueWhenTrue : this.valueWhenFalse, this.id)
138
138
  }
139
139
  }
140
140
  }
@@ -49,7 +49,7 @@
49
49
  /** The text content of the link. */
50
50
  label: {
51
51
  type: String,
52
- required: true
52
+ required: false
53
53
  },
54
54
  /** Determines if the (...) more button will be shown. */
55
55
  moreButton: {
@@ -1,5 +1,6 @@
1
1
  <template>
2
- <div class="ecs-formatted" :class="small ? `ecs-formatted-sml` : ''" :id="formattedId">
2
+ <div class="ecs-formatted" :class="[small ? 'ecs-formatted-sml' : '', aiGenerated ? 'ai-generated' : '']" :id="formattedId">
3
+ <ecs-icon v-if="!loading && aiGenerated" type="sparkle-ai" :size="small ? '16' : '20'" color="#A940AE" class="ai-indicator" />
3
4
  <slot v-if="!loading" ref="slot"></slot>
4
5
  <ecs-skeleton-loader v-else type="multi" :line-height="small ? 1 : 2" :count="skeletonCount" />
5
6
  </div>
@@ -7,10 +8,11 @@
7
8
 
8
9
  <script>
9
10
  import EcsSkeletonLoader from '../skeleton-loader/skeleton-loader'
11
+ import EcsIcon from '../icon/icon'
10
12
  import { uniqueIdMixin } from '../mixins/unique-id'
11
13
 
12
14
  export default {
13
- components: { EcsSkeletonLoader },
15
+ components: { EcsSkeletonLoader, EcsIcon },
14
16
  mixins: [uniqueIdMixin],
15
17
 
16
18
  data() {
@@ -34,6 +36,11 @@
34
36
  skeletonCount: {
35
37
  type: Number,
36
38
  default: 4
39
+ },
40
+ /** Shows a small AI indicator icon at the beginning of the formatted text. */
41
+ aiGenerated: {
42
+ type: Boolean,
43
+ default: false
37
44
  }
38
45
  },
39
46
 
@@ -232,5 +239,21 @@
232
239
  > div > :last-child{
233
240
  margin-bottom: 0;
234
241
  }
242
+
243
+ &.ai-generated{
244
+ > :nth-child(2),
245
+ > div > :nth-child(2){
246
+ margin-top: 0;
247
+ }
248
+ }
249
+
250
+ .ai-indicator{
251
+ float: left;
252
+ margin-right: 4px;
253
+
254
+ + ul{
255
+ margin-left: 24px;
256
+ }
257
+ }
235
258
  }
236
259
  </style>
@@ -163,6 +163,15 @@ h1, h2, h3, h4, h5, h6, label{
163
163
  line-height: $type-scale-2-line-height;
164
164
  color: $color-gray-9;
165
165
 
166
+ :deep(a){
167
+ color: $color-blue-10;
168
+
169
+ &:hover{
170
+ color: $color-blue-11;
171
+ text-decoration: underline;
172
+ }
173
+ }
174
+
166
175
  &.emphasized{
167
176
  font-weight: $font-weight-medium;
168
177
  }
@@ -7,7 +7,7 @@ export default {
7
7
 
8
8
  export const formattedText = () => ({
9
9
  components: { EcsFormatted },
10
- template: `<ecs-formatted>
10
+ template: `<ecs-formatted ai-generated>
11
11
  <p>Non-euclidean
12
12
  <b>tentacles</b>
13
13
  cat
@@ -37,7 +37,7 @@ export const sublines = () => ({
37
37
  export const formText = () => ({
38
38
  components: { EcsText },
39
39
  template: `<div>
40
- <ecs-text type="form">Default Form Text</ecs-text>
40
+ <ecs-text type="form">Default Form Text <a href="#">Test</a></ecs-text>
41
41
  <ecs-text type="form" color="negative">Error Form Text</ecs-text>
42
42
  </div>`,
43
43
  });