@enso-ui/scroll-to-top 3.0.8 → 4.0.0
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/LICENSE +1 -1
- package/README.md +3 -3
- package/package.json +5 -19
- package/src/bulma/ScrollToTop.vue +31 -10
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Scroll To Top
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|

|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Scroll to top control
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
The component can be used outside of the Enso ecosystem.
|
|
@@ -27,4 +27,4 @@ Thank you to all the people who already contributed to Enso!
|
|
|
27
27
|
|
|
28
28
|
## License
|
|
29
29
|
|
|
30
|
-
[
|
|
30
|
+
[MIT](https://opensource.org/licenses/MIT)
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/scroll-to-top",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Scroll To Top",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
6
|
"repository": {
|
|
10
7
|
"type": "git",
|
|
11
8
|
"url": "git+https://github.com/enso-ui/scroll-to-top.git"
|
|
@@ -16,28 +13,17 @@
|
|
|
16
13
|
"bulma"
|
|
17
14
|
],
|
|
18
15
|
"author": "Adrian Ocneanu <aocneanu@gmail.com>",
|
|
19
|
-
"license": "
|
|
16
|
+
"license": "MIT",
|
|
20
17
|
"bugs": {
|
|
21
18
|
"url": "https://github.com/enso-ui/scroll-to-top/issues"
|
|
22
19
|
},
|
|
23
20
|
"homepage": "https://github.com/enso-ui/scroll-to-top#readme",
|
|
24
21
|
"dependencies": {
|
|
25
22
|
"@enso-ui/transitions": "^2.0",
|
|
26
|
-
"@fortawesome/fontawesome-svg-core": "^
|
|
27
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
28
|
-
"@fortawesome/vue-fontawesome": "3.
|
|
23
|
+
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
24
|
+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
25
|
+
"@fortawesome/vue-fontawesome": "3.1.3",
|
|
29
26
|
"bulma": "^0.9.0",
|
|
30
27
|
"vue": "^3.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@vue/cli-plugin-babel": "5.0.0-beta.6",
|
|
34
|
-
"@vue/cli-plugin-eslint": "5.0.0-beta.6",
|
|
35
|
-
"@vue/eslint-config-airbnb": "^5.0.0",
|
|
36
|
-
"autoprefixer": "^9.6.1",
|
|
37
|
-
"babel-eslint": "^10.0.1",
|
|
38
|
-
"cross-env": "^6.0.0",
|
|
39
|
-
"eslint": "^7.0.0",
|
|
40
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
41
|
-
"eslint-plugin-vue": "^8.0.0"
|
|
42
28
|
}
|
|
43
29
|
}
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
<core-scroll-to-top>
|
|
3
3
|
<template #default="{ visible, type, controlEvents }">
|
|
4
4
|
<zoom>
|
|
5
|
-
<
|
|
5
|
+
<button class="button scroll-control"
|
|
6
6
|
:class="[type, $attrs.class]"
|
|
7
|
+
type="button"
|
|
7
8
|
v-on="controlEvents"
|
|
8
9
|
v-if="visible">
|
|
9
10
|
<slot>
|
|
10
11
|
<span class="icon is-large">
|
|
11
|
-
<fa icon="
|
|
12
|
+
<fa :icon="faCircleUp"/>
|
|
12
13
|
</span>
|
|
13
14
|
</slot>
|
|
14
|
-
</
|
|
15
|
+
</button>
|
|
15
16
|
</zoom>
|
|
16
17
|
</template>
|
|
17
18
|
</core-scroll-to-top>
|
|
@@ -20,41 +21,61 @@
|
|
|
20
21
|
<script>
|
|
21
22
|
import { Zoom } from '@enso-ui/transitions';
|
|
22
23
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
23
|
-
import {
|
|
24
|
-
import { faArrowAltCircleUp } from '@fortawesome/free-solid-svg-icons';
|
|
24
|
+
import { faCircleUp } from '@fortawesome/free-solid-svg-icons';
|
|
25
25
|
import CoreScrollToTop from '../renderless/CoreScrollToTop.vue';
|
|
26
26
|
|
|
27
|
-
library.add(faArrowAltCircleUp);
|
|
28
|
-
|
|
29
27
|
export default {
|
|
30
28
|
name: 'ScrollToTop',
|
|
31
29
|
|
|
32
30
|
components: { CoreScrollToTop, Fa, Zoom },
|
|
31
|
+
|
|
32
|
+
data: () => ({
|
|
33
|
+
faCircleUp,
|
|
34
|
+
}),
|
|
33
35
|
};
|
|
34
36
|
</script>
|
|
35
37
|
|
|
36
38
|
<style lang="scss">
|
|
37
|
-
.scroll-control {
|
|
38
|
-
z-index:
|
|
39
|
+
.button.scroll-control {
|
|
40
|
+
z-index: 41;
|
|
39
41
|
position: fixed;
|
|
40
|
-
bottom:
|
|
42
|
+
bottom: 2.5em;
|
|
41
43
|
|
|
42
44
|
@media screen and (min-width: 769px) {
|
|
43
45
|
[dir='ltr'] & {
|
|
46
|
+
left: auto;
|
|
44
47
|
right: 1.5em;
|
|
45
48
|
}
|
|
46
49
|
[dir='rtl'] & {
|
|
50
|
+
right: auto;
|
|
47
51
|
left: 1.5em;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
@media screen and (max-width: 768px) {
|
|
51
55
|
[dir='ltr'] & {
|
|
56
|
+
left: auto;
|
|
52
57
|
right: 0.5em;
|
|
53
58
|
}
|
|
54
59
|
[dir='rtl'] & {
|
|
60
|
+
right: auto;
|
|
55
61
|
left: 0.5em;
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
[data-theme='light'] {
|
|
67
|
+
.button.scroll-control {
|
|
68
|
+
color: #fff;
|
|
69
|
+
|
|
70
|
+
&:hover,
|
|
71
|
+
&:focus,
|
|
72
|
+
&:active,
|
|
73
|
+
&.is-hovered,
|
|
74
|
+
&.is-focused,
|
|
75
|
+
&.is-active {
|
|
76
|
+
color: #fff;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
60
81
|
</style>
|