@everchron/ec-shards 7.4.10 → 7.4.11
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/dist/ec-shards.common.js +24 -6
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +24 -6
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +2 -2
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/formatted/formatted.vue +32 -2
package/package.json
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="ecs-formatted" :class="small ? `ecs-formatted-sml` : ''">
|
|
3
|
-
<slot v-if="!loading"></slot>
|
|
2
|
+
<div class="ecs-formatted" :class="small ? `ecs-formatted-sml` : ''" :id="formattedId">
|
|
3
|
+
<slot v-if="!loading" ref="slot"></slot>
|
|
4
4
|
<ecs-skeleton-loader v-else type="multi" :line-height="small ? 1 : 2" :count="skeletonCount" />
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
9
9
|
import EcsSkeletonLoader from '../skeleton-loader/skeleton-loader'
|
|
10
|
+
import { uniqueIdMixin } from '../mixins/unique-id'
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
13
|
components: { EcsSkeletonLoader },
|
|
14
|
+
mixins: [uniqueIdMixin],
|
|
15
|
+
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
formattedId: null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
|
|
14
22
|
props: {
|
|
15
23
|
/** Sets the general font size of the formatted text component to small. */
|
|
@@ -27,6 +35,18 @@
|
|
|
27
35
|
type: Number,
|
|
28
36
|
default: 4
|
|
29
37
|
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
created() {
|
|
41
|
+
this.formattedId = this.generateUniqueId()
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
mounted() {
|
|
45
|
+
const links = this.$el.querySelectorAll(`#${this.formattedId} a`)
|
|
46
|
+
links.forEach(link => {
|
|
47
|
+
const url = link.getAttribute('href')
|
|
48
|
+
link.setAttribute('title', `Open ${url}`)
|
|
49
|
+
})
|
|
30
50
|
}
|
|
31
51
|
}
|
|
32
52
|
</script>
|
|
@@ -62,10 +82,20 @@
|
|
|
62
82
|
font-weight: 600;
|
|
63
83
|
}
|
|
64
84
|
|
|
85
|
+
a[href*="//"]:not([href*="everchron.com"]):not([href*="everchron.co.uk"]):not([href*="localhost"]):not([href*="everchron.github.io"]):after{
|
|
86
|
+
content: "";
|
|
87
|
+
display: inline-block;
|
|
88
|
+
width: 12px;
|
|
89
|
+
height: 12px;
|
|
90
|
+
background: svg-uri('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.73333 2.09998H9.89999V4.26664" stroke="#{$color-gray-8}" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.86668 5.13331L9.90001 2.09998" stroke="#{$color-gray-8}" stroke-linecap="round" stroke-linejoin="round"/><path d="M9.03333 6.86667V9.03334C9.03333 9.51217 8.6455 9.90001 8.16667 9.90001H2.96667C2.48783 9.90001 2.1 9.51217 2.1 9.03334V3.83334C2.1 3.35451 2.48783 2.96667 2.96667 2.96667H5.13333" stroke="#{$color-gray-8}" stroke-linecap="round" stroke-linejoin="round"/></svg>');
|
|
91
|
+
}
|
|
92
|
+
|
|
65
93
|
a{
|
|
66
94
|
color: $color-blue-10;
|
|
67
95
|
text-decoration: none;
|
|
68
96
|
transition: .2s;
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
69
99
|
|
|
70
100
|
&:after{
|
|
71
101
|
opacity: .7;
|