goodteditor-ui 1.0.21 → 1.0.24
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 +6 -9
- package/src/components/ui/Avatar.vue +5 -2
- package/src/components/ui/Tooltip.md +0 -60
- package/src/components/ui/WysiwygEditor/extensions/bullet-list.js +1 -1
- package/src/components/ui/WysiwygEditor/extensions/ordered-list.js +1 -1
- package/src/components/ui/WysiwygEditor.vue +0 -5
- package/src/components/ui/utils/WithPopover.js +2 -20
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goodteditor-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"homepage": "https://goodt-ui.netlify.app/",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"serve": "vue-
|
|
8
|
-
"build": "vue-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"docs:
|
|
12
|
-
"docs:deploy": "npx netlify deploy --dir=docs --prod",
|
|
13
|
-
"notify": "node ./ci/teams-notify.js",
|
|
14
|
-
"publish": "npm run docs:build && npm run docs:deploy && npm run notify"
|
|
7
|
+
"serve": "npx vue-styleguidist server",
|
|
8
|
+
"build": "npx vue-styleguidist build",
|
|
9
|
+
"dev": "vue-cli-service serve",
|
|
10
|
+
"docs:build": "set NODE_ENV=development && npm run build",
|
|
11
|
+
"docs:deploy": "npx netlify deploy --dir=docs --prod"
|
|
15
12
|
},
|
|
16
13
|
"dependencies": {
|
|
17
14
|
"@popperjs/core": "2.11.2",
|
|
@@ -52,63 +52,3 @@ export default {
|
|
|
52
52
|
};
|
|
53
53
|
</script>
|
|
54
54
|
```
|
|
55
|
-
|
|
56
|
-
Advanced example. Using cursor tracking
|
|
57
|
-
|
|
58
|
-
```vue
|
|
59
|
-
<template>
|
|
60
|
-
<div class="pos-rel pad-l5">
|
|
61
|
-
<ui-tooltip v-bind="options">
|
|
62
|
-
<template #target="{ binds }">
|
|
63
|
-
<div
|
|
64
|
-
ref="target"
|
|
65
|
-
class="pad-l2 bg-green color-white radius text-center"
|
|
66
|
-
v-bind="binds"
|
|
67
|
-
>
|
|
68
|
-
hover me
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
71
|
-
<div>
|
|
72
|
-
I follow the cursor everywhere
|
|
73
|
-
</div>
|
|
74
|
-
</ui-tooltip>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
77
|
-
<script>
|
|
78
|
-
import UiTooltip from './Tooltip.vue';
|
|
79
|
-
export default {
|
|
80
|
-
components: { UiTooltip },
|
|
81
|
-
data() {
|
|
82
|
-
return {
|
|
83
|
-
options: {
|
|
84
|
-
show: false,
|
|
85
|
-
shouldFollowCursor: true,
|
|
86
|
-
cursorCoordinates: [0, 0]
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
},
|
|
90
|
-
mounted() {
|
|
91
|
-
this.$refs.target.addEventListener('mouseover', this.showTooltip);
|
|
92
|
-
this.$refs.target.addEventListener('mousemove', this.changeTooltipCoords);
|
|
93
|
-
this.$refs.target.addEventListener('mouseleave', this.hideTooltip);
|
|
94
|
-
},
|
|
95
|
-
beforeDestroy() {
|
|
96
|
-
this.$refs.target.removeEventListener('mouseover', this.showTooltip);
|
|
97
|
-
this.$refs.target.removeEventListener('mousemove', this.changeTooltipCoords);
|
|
98
|
-
this.$refs.target.removeEventListener('mouseleave', this.hideTooltip);
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
methods: {
|
|
102
|
-
showTooltip() {
|
|
103
|
-
this.options.show = true;
|
|
104
|
-
},
|
|
105
|
-
hideTooltip() {
|
|
106
|
-
this.options.show = false;
|
|
107
|
-
},
|
|
108
|
-
changeTooltipCoords({ clientX: x, clientY: y }) {
|
|
109
|
-
this.options.cursorCoordinates = [x, y];
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
</script>
|
|
114
|
-
```
|
|
@@ -42,20 +42,6 @@ export default {
|
|
|
42
42
|
autoWidth: {
|
|
43
43
|
type: Boolean,
|
|
44
44
|
default: false,
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* Should follow the cursor
|
|
48
|
-
*/
|
|
49
|
-
shouldFollowCursor: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* Cursor coordinates [ x, y ]
|
|
55
|
-
*/
|
|
56
|
-
cursorCoordinates: {
|
|
57
|
-
type: Array,
|
|
58
|
-
default: () => [0, 0]
|
|
59
45
|
}
|
|
60
46
|
},
|
|
61
47
|
data() {
|
|
@@ -75,9 +61,7 @@ export default {
|
|
|
75
61
|
position,
|
|
76
62
|
positionOffset,
|
|
77
63
|
autoWidth,
|
|
78
|
-
popoverTarget: target
|
|
79
|
-
shouldFollowCursor,
|
|
80
|
-
cursorCoordinates
|
|
64
|
+
popoverTarget: target
|
|
81
65
|
} = this;
|
|
82
66
|
return {
|
|
83
67
|
zIndex,
|
|
@@ -85,9 +69,7 @@ export default {
|
|
|
85
69
|
position,
|
|
86
70
|
positionOffset,
|
|
87
71
|
autoWidth,
|
|
88
|
-
target
|
|
89
|
-
shouldFollowCursor,
|
|
90
|
-
cursorCoordinates
|
|
72
|
+
target
|
|
91
73
|
};
|
|
92
74
|
},
|
|
93
75
|
},
|