@energie360/ui-library 0.1.31 → 0.1.32
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/components/hint/hint.scss +40 -0
- package/components/hint/u-hint.vue +10 -1
- package/modules/index.js +1 -0
- package/modules/login-animation/butterfly-sprite.json +9 -0
- package/modules/login-animation/butterfly-sprite.png +0 -0
- package/modules/login-animation/login-animation.scss +65 -0
- package/modules/login-animation/u-login-animation.vue +79 -0
- package/package.json +1 -1
|
@@ -111,6 +111,42 @@
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
@mixin type-error {
|
|
115
|
+
background-color: var(--e-c-signal-03-100);
|
|
116
|
+
color: var(--e-c-signal-03-900);
|
|
117
|
+
|
|
118
|
+
&::before {
|
|
119
|
+
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.1396 0C15.4048 0 15.6592 0.105542 15.8467 0.292969L21.707 6.15332C21.8945 6.34084 22 6.59522 22 6.86035V15.1396C22 15.4048 21.8945 15.6592 21.707 15.8467L15.8467 21.707C15.6592 21.8945 15.4048 22 15.1396 22H6.86035C6.59522 22 6.34084 21.8945 6.15332 21.707L0.292969 15.8467C0.105542 15.6592 0 15.4048 0 15.1396V6.86035C0 6.59522 0.105542 6.34084 0.292969 6.15332L6.15332 0.292969C6.34084 0.105542 6.59522 0 6.86035 0H15.1396ZM11 14C10.4477 14 10 14.4477 10 15C10 15.5523 10.4477 16 11 16H11.0098C11.5621 16 12.0098 15.5523 12.0098 15C12.0098 14.4477 11.5621 14 11.0098 14H11ZM11 6C10.4477 6 10 6.44772 10 7V11C10 11.5523 10.4477 12 11 12C11.5523 12 12 11.5523 12 11V7C12 6.44772 11.5523 6 11 6Z' fill='%23FF0C3E'/%3E%3C/svg%3E");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hint__richtext {
|
|
123
|
+
margin-left: var(--e-space-9);
|
|
124
|
+
|
|
125
|
+
@include a.bp(lg) {
|
|
126
|
+
margin-left: 0;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// override some richtext styles.
|
|
131
|
+
.richtext {
|
|
132
|
+
a {
|
|
133
|
+
color: inherit;
|
|
134
|
+
|
|
135
|
+
&:active,
|
|
136
|
+
&:hover {
|
|
137
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.hint__link {
|
|
143
|
+
&:active,
|
|
144
|
+
&:hover {
|
|
145
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
114
150
|
.hint {
|
|
115
151
|
position: relative;
|
|
116
152
|
padding: var(--e-space-5) var(--e-space-4);
|
|
@@ -178,4 +214,8 @@
|
|
|
178
214
|
&.hint--legal {
|
|
179
215
|
@include type-legal;
|
|
180
216
|
}
|
|
217
|
+
|
|
218
|
+
&.hint--error {
|
|
219
|
+
@include type-error;
|
|
220
|
+
}
|
|
181
221
|
}
|
|
@@ -3,7 +3,7 @@ import { URichtext } from '../'
|
|
|
3
3
|
import { Cta } from '../../elements/types'
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
type?: 'neutral' | 'warning' | 'legal'
|
|
6
|
+
type?: 'neutral' | 'warning' | 'legal' | 'error'
|
|
7
7
|
label?: string
|
|
8
8
|
link?: Cta
|
|
9
9
|
text?: string
|
|
@@ -59,4 +59,13 @@ const { label = '', link = undefined, text = '', type = 'neutral' } = defineProp
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
.hint--error {
|
|
64
|
+
.hint__richtext a {
|
|
65
|
+
&:active,
|
|
66
|
+
&:hover {
|
|
67
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
62
71
|
</style>
|
package/modules/index.js
CHANGED
|
@@ -9,3 +9,4 @@ export { default as UToast, toast } from './toast/u-toast.vue'
|
|
|
9
9
|
export { default as UDialog } from './dialog/u-dialog.vue'
|
|
10
10
|
export { default as USearchFilter } from './search-filter/u-search-filter.vue'
|
|
11
11
|
export { default as UContentTitle } from './content-title/u-content-title.vue'
|
|
12
|
+
export { default as ULoginAnimation } from './login-animation/u-login-animation.vue'
|
|
Binary file
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
$sprite-width: 52px;
|
|
4
|
+
$sprite-height: 77px;
|
|
5
|
+
$sprite-width-mobile: 40px;
|
|
6
|
+
$sprite-height-mobile: 59px;
|
|
7
|
+
|
|
8
|
+
@keyframes island-image {
|
|
9
|
+
0% {
|
|
10
|
+
transform: translateY(-10px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
100% {
|
|
14
|
+
transform: translateY(10px);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.login-animation {
|
|
19
|
+
background-color: var(--e-c-secondary-01-1000);
|
|
20
|
+
height: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.login-animation__image {
|
|
27
|
+
position: relative;
|
|
28
|
+
max-width: 680px;
|
|
29
|
+
margin: 0 60px;
|
|
30
|
+
|
|
31
|
+
img {
|
|
32
|
+
user-select: none;
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
display: block;
|
|
35
|
+
width: 100%;
|
|
36
|
+
animation-name: island-image;
|
|
37
|
+
animation-iteration-count: infinite;
|
|
38
|
+
animation-duration: 1.6s;
|
|
39
|
+
animation-direction: alternate;
|
|
40
|
+
animation-timing-function: ease-in-out;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include a.bp(lg) {
|
|
44
|
+
margin: 0 40px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include a.bp(m) {
|
|
48
|
+
margin: 0 20px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.login-animation__sprite {
|
|
53
|
+
position: absolute;
|
|
54
|
+
z-index: 1;
|
|
55
|
+
top: calc(50% - (#{$sprite-height} / 2) + 10%);
|
|
56
|
+
left: calc(50% - (#{$sprite-width} / 2) + 10%);
|
|
57
|
+
|
|
58
|
+
@include a.bp(m) {
|
|
59
|
+
width: $sprite-width-mobile;
|
|
60
|
+
height: $sprite-height-mobile;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.flip {
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { USpriteAnimation } from '../../components'
|
|
3
|
+
import { useTemplateRef, ref } from 'vue'
|
|
4
|
+
import butterflySpritePositions from './butterfly-sprite.json'
|
|
5
|
+
import butterflySprite from './butterfly-sprite.png'
|
|
6
|
+
import { gsap } from 'gsap'
|
|
7
|
+
|
|
8
|
+
const butterfly = useTemplateRef('butterfly')
|
|
9
|
+
const butterflyWrapper = useTemplateRef('butterflyWrapper')
|
|
10
|
+
const container = useTemplateRef('container')
|
|
11
|
+
const mouseRightSide = ref(true)
|
|
12
|
+
|
|
13
|
+
const onSpriteReady = () => {
|
|
14
|
+
butterfly.value.playLoop()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const onMouseleave = () => {
|
|
18
|
+
gsap.to(butterflyWrapper.value, {
|
|
19
|
+
x: 0,
|
|
20
|
+
y: 0,
|
|
21
|
+
ease: 'power2',
|
|
22
|
+
duration: 4,
|
|
23
|
+
overwrite: true,
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const onMousemove = (e) => {
|
|
28
|
+
const { left, top, width, height } = container.value.getBoundingClientRect()
|
|
29
|
+
|
|
30
|
+
const halfW = width / 2
|
|
31
|
+
const halfH = height / 2
|
|
32
|
+
const mouseX = e.x - left
|
|
33
|
+
const mouseY = e.y - top
|
|
34
|
+
|
|
35
|
+
mouseRightSide.value = mouseX > halfW
|
|
36
|
+
|
|
37
|
+
const x = gsap.utils.interpolate(-halfW, halfW, mouseX / width)
|
|
38
|
+
const y = gsap.utils.interpolate(-halfH, halfH, mouseY / height)
|
|
39
|
+
|
|
40
|
+
gsap.to(butterflyWrapper.value, {
|
|
41
|
+
x: x,
|
|
42
|
+
y: y,
|
|
43
|
+
duration: 4,
|
|
44
|
+
ease: 'power1',
|
|
45
|
+
overwrite: true,
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<div class="login-animation">
|
|
52
|
+
<div
|
|
53
|
+
ref="container"
|
|
54
|
+
class="login-animation__image"
|
|
55
|
+
@mousemove="onMousemove"
|
|
56
|
+
@mouseleave="onMouseleave"
|
|
57
|
+
>
|
|
58
|
+
<div ref="butterflyWrapper" :class="['login-animation__sprite', { flip: !mouseRightSide }]">
|
|
59
|
+
<USpriteAnimation
|
|
60
|
+
ref="butterfly"
|
|
61
|
+
:style="{
|
|
62
|
+
transform: mouseRightSide ? 'scaleX(1)' : 'scaleX(-1)',
|
|
63
|
+
}"
|
|
64
|
+
:spritesheet-path="butterflySprite"
|
|
65
|
+
:frame-positions="butterflySpritePositions"
|
|
66
|
+
:frame-width="202"
|
|
67
|
+
:frame-height="300"
|
|
68
|
+
:width="52"
|
|
69
|
+
:height="77"
|
|
70
|
+
:duration="1000"
|
|
71
|
+
@ready="onSpriteReady"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
<img src="/static/ui-assets/images/forest.png" alt="" />
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<style lang="scss" scoped src="./login-animation.scss"></style>
|