@energie360/ui-library 0.1.31 → 0.1.33
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/badge/badge.scss +11 -4
- package/components/badge/u-badge.vue +3 -13
- package/components/card-amount/u-card-amount.vue +1 -1
- package/components/card-amount-illustrated/u-card-amount-illustrated.vue +1 -1
- package/components/card-contact/u-card-contact.vue +1 -1
- package/components/card-highlight/u-card-highlight.vue +2 -2
- package/components/card-price-list/u-card-price-list.vue +2 -2
- package/components/card-statistic/card-statistic.scss +31 -0
- package/components/card-statistic/u-card-statistic.vue +34 -0
- package/components/chip/chip.scss +1 -0
- package/components/chip/u-chip.vue +1 -0
- package/components/download-list-item/u-download-list-item.vue +1 -0
- package/components/empty/empty.scss +27 -0
- package/components/empty/u-empty.vue +32 -0
- package/components/hint/hint.scss +144 -33
- package/components/hint/u-hint.vue +44 -4
- package/components/index.js +2 -0
- package/components/navigation-panel-tile/navigation-panel-tile.scss +0 -18
- package/components/navigation-panel-tile/u-navigation-panel-tile.vue +8 -7
- package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +2 -2
- package/components/progress-avatar/u-progress-avatar.vue +1 -1
- package/components/slider/u-slider.vue +1 -1
- package/components/slider-progress-animation/u-slider-progress-animation.vue +1 -1
- package/components/table/table-cell.scss +9 -0
- package/components/table/u-cell-icon-group.vue +1 -1
- package/components/table/u-cell-progress-bar.vue +1 -1
- package/components/table/u-table-cell.vue +3 -0
- package/components/text-block/u-text-block.vue +1 -1
- package/dist/base-style.css +2 -2
- package/elements/button/u-button.vue +2 -1
- package/layout/portal-block/portal-block.scss +36 -3
- package/layout/portal-block/u-portal-block.vue +9 -3
- package/modules/dialog/dialog.scss +28 -23
- package/modules/dialog/u-dialog.vue +14 -17
- 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 +74 -0
- package/modules/navigation-toolbar-top/u-navigation-toolbar-top.vue +24 -2
- package/package.json +9 -9
- package/utils/http/url.js +25 -0
- package/utils/vue/helpers.ts +27 -0
- package/wizard/wizard-outro/u-wizard-outro.vue +3 -0
|
@@ -31,11 +31,18 @@ $ease-out-bounce: cubic-bezier(0.674, 1.901, 0.651, 0.744);
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.badge__sup.number {
|
|
34
|
-
width: 16px;
|
|
34
|
+
min-width: 16px;
|
|
35
35
|
height: 16px;
|
|
36
36
|
font-size: 10px;
|
|
37
37
|
font-weight: bold;
|
|
38
|
-
line-height:
|
|
38
|
+
line-height: 10px;
|
|
39
|
+
letter-spacing: 0;
|
|
40
|
+
border-radius: 24px;
|
|
41
|
+
text-align: center;
|
|
42
|
+
padding: 0 2px;
|
|
43
|
+
top: var(--top, -5px);
|
|
44
|
+
right: var(--right, 3px);
|
|
45
|
+
transform: translateX(50%);
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
.badge__sup.state {
|
|
@@ -48,8 +55,8 @@ $ease-out-bounce: cubic-bezier(0.674, 1.901, 0.651, 0.744);
|
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
.badge__sup.dot {
|
|
51
|
-
top: var(--top, -
|
|
52
|
-
right: var(--right, -
|
|
58
|
+
top: var(--top, -1px);
|
|
59
|
+
right: var(--right, -1px);
|
|
53
60
|
width: 8px;
|
|
54
61
|
height: 8px;
|
|
55
62
|
border-radius: 100%;
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
export interface Badge {
|
|
3
3
|
color?: string
|
|
4
4
|
dot?: boolean
|
|
5
|
-
type?: 'default' | 'success' | 'error' | 'warning' | 'info'
|
|
6
5
|
value?: number
|
|
7
6
|
state?: '' | 'inactive'
|
|
8
7
|
show?: boolean
|
|
9
|
-
border?: boolean
|
|
10
8
|
top?: number
|
|
11
9
|
right?: number
|
|
12
10
|
}
|
|
@@ -17,7 +15,6 @@ const {
|
|
|
17
15
|
top = 0,
|
|
18
16
|
right = 0,
|
|
19
17
|
color = 'var(--e-c-mono-900)',
|
|
20
|
-
type = 'default',
|
|
21
18
|
show = true,
|
|
22
19
|
} = defineProps<Badge>()
|
|
23
20
|
</script>
|
|
@@ -32,23 +29,16 @@ const {
|
|
|
32
29
|
>
|
|
33
30
|
<slot></slot>
|
|
34
31
|
|
|
35
|
-
<sup
|
|
36
|
-
v-if="dot"
|
|
37
|
-
class="badge__sup dot"
|
|
38
|
-
:class="[`type-${type}`, { border }]"
|
|
39
|
-
:style="{ backgroundColor: color }"
|
|
40
|
-
></sup>
|
|
32
|
+
<sup v-if="dot" class="badge__sup dot" :style="{ backgroundColor: color }"></sup>
|
|
41
33
|
|
|
42
34
|
<sup
|
|
43
35
|
v-else-if="state"
|
|
44
36
|
class="badge__sup state"
|
|
45
|
-
:class="[state
|
|
37
|
+
:class="[state]"
|
|
46
38
|
:style="{ backgroundColor: color }"
|
|
47
39
|
></sup>
|
|
48
40
|
|
|
49
|
-
<sup v-else class="badge__sup number" :
|
|
50
|
-
value
|
|
51
|
-
}}</sup>
|
|
41
|
+
<sup v-else class="badge__sup number" :style="{ backgroundColor: color }">{{ value }}</sup>
|
|
52
42
|
</span>
|
|
53
43
|
</template>
|
|
54
44
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import UProgressBar from '../progress-bar/u-progress-bar.vue'
|
|
3
3
|
import { useTemplateRef, inject, watch, ref, onMounted, onUnmounted } from 'vue'
|
|
4
4
|
import { Image } from '../../elements/types'
|
|
5
5
|
import '@lottiefiles/lottie-player'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { Chip } from '../chip/u-chip.vue'
|
|
3
3
|
import { Image } from '../../elements/types'
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import UIcon from '../../elements/icon/u-icon.vue'
|
|
5
|
+
import UChip from '../chip/u-chip.vue'
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
title?: string
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.card-statistic {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
column-gap: var(--e-space-2);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.card-statistic__image {
|
|
10
|
+
width: 80px;
|
|
11
|
+
height: 80px;
|
|
12
|
+
flex: 0 0 auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.card-statistic__content {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
row-gap: var(--e-space-2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.card-statistic__label {
|
|
22
|
+
@include a.type(200);
|
|
23
|
+
|
|
24
|
+
order: 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.card-statistic__value {
|
|
28
|
+
@include a.type(700, strong);
|
|
29
|
+
|
|
30
|
+
order: 1;
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Image } from '../../elements/types'
|
|
3
|
+
import { hasSlotContent } from '../../utils/vue/helpers'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
label?: string
|
|
7
|
+
value?: string
|
|
8
|
+
image?: Image
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
defineProps<Props>()
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="card-statistic">
|
|
16
|
+
<dl class="card-statistic__content">
|
|
17
|
+
<dt class="card-statistic__label">
|
|
18
|
+
<slot name="label">{{ label }}</slot>
|
|
19
|
+
</dt>
|
|
20
|
+
|
|
21
|
+
<dd class="card-statistic__value">
|
|
22
|
+
<slot name="value">{{ value }}</slot>
|
|
23
|
+
</dd>
|
|
24
|
+
</dl>
|
|
25
|
+
|
|
26
|
+
<div v-if="image || hasSlotContent($slots.image)" class="card-statistic__image">
|
|
27
|
+
<slot name="image">
|
|
28
|
+
<img v-bind="image" />
|
|
29
|
+
</slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<style scoped lang="scss" src="./card-statistic.scss"></style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.empty {
|
|
4
|
+
text-align: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.empty__image {
|
|
8
|
+
margin: 0 auto var(--e-space-6);
|
|
9
|
+
width: a.rem(120);
|
|
10
|
+
height: a.rem(120);
|
|
11
|
+
|
|
12
|
+
> img {
|
|
13
|
+
object-fit: cover;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.empty__title {
|
|
20
|
+
@include a.type(600);
|
|
21
|
+
|
|
22
|
+
margin-bottom: var(--e-space-6);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.empty__text {
|
|
26
|
+
@include a.type(300, strong);
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { hasSlotContent } from '../../utils/vue/helpers'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title?: string
|
|
6
|
+
text?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
defineProps<Props>()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="empty">
|
|
14
|
+
<div class="empty__image">
|
|
15
|
+
<slot name="image">
|
|
16
|
+
<img src="/static/ui-assets/images/search.svg" alt="" />
|
|
17
|
+
</slot>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<p v-if="title || hasSlotContent($slots.title)" class="empty__title">
|
|
21
|
+
<slot name="title">
|
|
22
|
+
{{ title }}
|
|
23
|
+
</slot>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<p v-if="text || hasSlotContent($slots.text)" class="empty__text">
|
|
27
|
+
<slot name="text"> {{ text }} </slot>
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style scoped lang="scss" src="./empty.scss"></style>
|
|
@@ -7,10 +7,6 @@
|
|
|
7
7
|
background-color: var(--e-c-secondary-05-100);
|
|
8
8
|
color: var(--e-c-secondary-05-900);
|
|
9
9
|
|
|
10
|
-
&::before {
|
|
11
|
-
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1Zm1-8h-2V7h2v2Z' fill='%230096DC'/%3E%3C/svg%3E");
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
.hint__richtext {
|
|
15
11
|
margin-left: var(--e-space-9);
|
|
16
12
|
|
|
@@ -19,6 +15,10 @@
|
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
17
|
|
|
18
|
+
.hint__icon {
|
|
19
|
+
color: var(--e-c-secondary-05-500);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
22
|
// override some richtext styles.
|
|
23
23
|
.richtext {
|
|
24
24
|
a {
|
|
@@ -37,10 +37,6 @@
|
|
|
37
37
|
background-color: var(--e-c-signal-02-100);
|
|
38
38
|
color: var(--e-c-signal-02-900);
|
|
39
39
|
|
|
40
|
-
&::before {
|
|
41
|
-
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 21 12 2l11 19H1Zm11-3c.283 0 .52-.096.713-.288A.968.968 0 0 0 13 17a.968.968 0 0 0-.287-.712A.968.968 0 0 0 12 16a.968.968 0 0 0-.713.288A.968.968 0 0 0 11 17c0 .283.096.52.287.712.192.192.43.288.713.288Zm-1-3h2v-5h-2v5Z' fill='%23FF9800'/%3E%3C/svg%3E");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
.hint__richtext {
|
|
45
41
|
margin-left: var(--e-space-9);
|
|
46
42
|
|
|
@@ -49,6 +45,10 @@
|
|
|
49
45
|
}
|
|
50
46
|
}
|
|
51
47
|
|
|
48
|
+
.hint__icon {
|
|
49
|
+
color: var(--e-c-signal-02-500);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
// override some richtext styles.
|
|
53
53
|
.richtext {
|
|
54
54
|
a {
|
|
@@ -76,17 +76,18 @@
|
|
|
76
76
|
border-left-color: var(--e-c-mono-700);
|
|
77
77
|
color: var(--e-c-mono-900);
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
left: calc(
|
|
83
|
-
-24px - 12px - 4px
|
|
84
|
-
); // 24px: icon width, 12px: distance to box, 4px: additonal border-width
|
|
79
|
+
.hint__label,
|
|
80
|
+
.hint__richtext {
|
|
81
|
+
margin-left: 0;
|
|
85
82
|
}
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
&.no-label .hint__label {
|
|
85
|
+
height: 0;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
|
|
88
|
+
@include a.bp(lg) {
|
|
89
|
+
margin-top: -8px;
|
|
90
|
+
}
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
.hint__link {
|
|
@@ -96,13 +97,22 @@
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
|
|
100
|
+
.hint__icon {
|
|
101
|
+
top: 0;
|
|
102
|
+
left: calc(
|
|
103
|
+
-24px - 12px - 4px
|
|
104
|
+
); // 24px: icon width, 12px: distance to box, 4px: additonal border-width
|
|
105
|
+
|
|
106
|
+
color: var(--e-c-mono-700);
|
|
107
|
+
}
|
|
108
|
+
|
|
99
109
|
@include a.bp(lg) {
|
|
100
110
|
margin-top: calc(4px + 4px + 24px);
|
|
101
111
|
border: 1px solid var(--e-c-mono-500);
|
|
102
112
|
border-top-width: 4px;
|
|
103
113
|
border-top-color: var(--e-c-mono-700);
|
|
104
114
|
|
|
105
|
-
|
|
115
|
+
.hint__icon {
|
|
106
116
|
left: 0;
|
|
107
117
|
top: calc(
|
|
108
118
|
-24px - 4px - 4px
|
|
@@ -111,6 +121,78 @@
|
|
|
111
121
|
}
|
|
112
122
|
}
|
|
113
123
|
|
|
124
|
+
@mixin type-error {
|
|
125
|
+
background-color: var(--e-c-signal-03-100);
|
|
126
|
+
color: var(--e-c-signal-03-900);
|
|
127
|
+
|
|
128
|
+
.hint__richtext {
|
|
129
|
+
margin-left: var(--e-space-9);
|
|
130
|
+
|
|
131
|
+
@include a.bp(lg) {
|
|
132
|
+
margin-left: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// override some richtext styles.
|
|
137
|
+
.richtext {
|
|
138
|
+
a {
|
|
139
|
+
color: inherit;
|
|
140
|
+
|
|
141
|
+
&:active,
|
|
142
|
+
&:hover {
|
|
143
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.hint__link {
|
|
149
|
+
&:active,
|
|
150
|
+
&:hover {
|
|
151
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.hint__icon {
|
|
156
|
+
color: var(--e-c-signal-03-500);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@mixin type-task {
|
|
161
|
+
background-color: var(--e-c-secondary-03-100);
|
|
162
|
+
color: var(--e-c-signal-03-900);
|
|
163
|
+
|
|
164
|
+
.hint__richtext {
|
|
165
|
+
margin-left: var(--e-space-9);
|
|
166
|
+
|
|
167
|
+
@include a.bp(lg) {
|
|
168
|
+
margin-left: 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.hint__icon {
|
|
173
|
+
color: var(--e-c-secondary-03-500);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// override some richtext styles.
|
|
177
|
+
.richtext {
|
|
178
|
+
a {
|
|
179
|
+
color: inherit;
|
|
180
|
+
|
|
181
|
+
&:active,
|
|
182
|
+
&:hover {
|
|
183
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.hint__link {
|
|
189
|
+
&:active,
|
|
190
|
+
&:hover {
|
|
191
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
114
196
|
.hint {
|
|
115
197
|
position: relative;
|
|
116
198
|
padding: var(--e-space-5) var(--e-space-4);
|
|
@@ -124,7 +206,6 @@
|
|
|
124
206
|
|
|
125
207
|
display: inline-block;
|
|
126
208
|
color: inherit;
|
|
127
|
-
margin-left: var(--e-space-2);
|
|
128
209
|
|
|
129
210
|
&:active,
|
|
130
211
|
&:hover {
|
|
@@ -133,11 +214,19 @@
|
|
|
133
214
|
|
|
134
215
|
@include a.bp(lg) {
|
|
135
216
|
display: block;
|
|
136
|
-
margin-left: 0;
|
|
137
217
|
}
|
|
138
218
|
}
|
|
139
219
|
|
|
140
220
|
.hint__label {
|
|
221
|
+
@include a.type(200, strong);
|
|
222
|
+
|
|
223
|
+
margin-left: var(--e-space-9);
|
|
224
|
+
|
|
225
|
+
@include a.bp(lg) {
|
|
226
|
+
margin-left: var(--e-space-7);
|
|
227
|
+
min-height: 24px;
|
|
228
|
+
}
|
|
229
|
+
|
|
141
230
|
+ .hint__richtext {
|
|
142
231
|
margin-top: var(--e-space-1);
|
|
143
232
|
|
|
@@ -147,29 +236,35 @@
|
|
|
147
236
|
}
|
|
148
237
|
}
|
|
149
238
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
position: absolute;
|
|
153
|
-
top: var(--e-space-5);
|
|
154
|
-
left: var(--e-space-4);
|
|
155
|
-
width: a.rem(24);
|
|
156
|
-
height: a.rem(24);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
> p {
|
|
160
|
-
@include a.type(200, strong);
|
|
239
|
+
.hint__label-text + .hint__link {
|
|
240
|
+
margin-left: var(--e-space-2);
|
|
161
241
|
|
|
162
|
-
|
|
242
|
+
@include a.bp(lg) {
|
|
243
|
+
margin-left: 0;
|
|
244
|
+
}
|
|
163
245
|
}
|
|
164
246
|
|
|
165
247
|
@include a.bp(lg) {
|
|
166
248
|
padding: var(--e-space-4);
|
|
167
249
|
|
|
168
|
-
|
|
250
|
+
.hint__icon {
|
|
169
251
|
top: var(--e-space-4);
|
|
170
252
|
}
|
|
171
253
|
}
|
|
172
254
|
|
|
255
|
+
// States
|
|
256
|
+
&.no-label {
|
|
257
|
+
.hint__label {
|
|
258
|
+
// This gives same layout as when `.hint__label` was removed from DOM.
|
|
259
|
+
// We can't remove it because wew need this element for mobile layout.
|
|
260
|
+
margin-top: -4px;
|
|
261
|
+
|
|
262
|
+
@include a.bp(lg) {
|
|
263
|
+
margin-top: 0;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
173
268
|
// Modifiers
|
|
174
269
|
&.hint--warning {
|
|
175
270
|
@include type-warning;
|
|
@@ -178,4 +273,20 @@
|
|
|
178
273
|
&.hint--legal {
|
|
179
274
|
@include type-legal;
|
|
180
275
|
}
|
|
276
|
+
|
|
277
|
+
&.hint--error {
|
|
278
|
+
@include type-error;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&.hint--task {
|
|
282
|
+
@include type-task;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.hint__icon {
|
|
287
|
+
position: absolute;
|
|
288
|
+
top: var(--e-space-5);
|
|
289
|
+
left: var(--e-space-4);
|
|
290
|
+
width: a.rem(24);
|
|
291
|
+
height: a.rem(24);
|
|
181
292
|
}
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import URichtext from '../richtext/u-richtext.vue'
|
|
3
3
|
import { Cta } from '../../elements/types'
|
|
4
|
+
import { hasSlotContent } from '../../utils/vue/helpers'
|
|
5
|
+
import UIcon from '../../elements/icon/u-icon.vue'
|
|
4
6
|
|
|
5
7
|
interface Props {
|
|
6
|
-
type?: 'neutral' | 'warning' | 'legal'
|
|
8
|
+
type?: 'neutral' | 'warning' | 'legal' | 'error' | 'task'
|
|
7
9
|
label?: string
|
|
8
10
|
link?: Cta
|
|
9
11
|
text?: string
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
const { label = '', link = undefined, text = '', type = 'neutral' } = defineProps<Props>()
|
|
15
|
+
|
|
16
|
+
// default mapping 'type' -> icon
|
|
17
|
+
const iconMap = {
|
|
18
|
+
neutral: 'info-circle-filled',
|
|
19
|
+
warning: 'alert-triangle-filled',
|
|
20
|
+
legal: 'legal',
|
|
21
|
+
error: 'alert-octagon-filled',
|
|
22
|
+
task: 'check-circle-filled',
|
|
23
|
+
}
|
|
13
24
|
</script>
|
|
14
25
|
|
|
15
26
|
<template>
|
|
16
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
:class="[
|
|
29
|
+
'hint',
|
|
30
|
+
`hint--${type}`,
|
|
31
|
+
{ 'no-label': !label && !hasSlotContent($slots.label) && !link },
|
|
32
|
+
]"
|
|
33
|
+
>
|
|
34
|
+
<span class="hint__icon">
|
|
35
|
+
<slot name="icon"> <UIcon :name="iconMap[type]" /> </slot>
|
|
36
|
+
</span>
|
|
17
37
|
<p class="hint__label">
|
|
18
|
-
<
|
|
38
|
+
<span v-if="label || hasSlotContent($slots.label)" class="hint__label-text">
|
|
39
|
+
<slot name="label">{{ label }}</slot>
|
|
40
|
+
</span>
|
|
19
41
|
|
|
20
42
|
<a v-if="link" :href="link.href" :target="link.target" class="hint__link">
|
|
21
43
|
{{ link.label }}
|
|
@@ -59,4 +81,22 @@ const { label = '', link = undefined, text = '', type = 'neutral' } = defineProp
|
|
|
59
81
|
}
|
|
60
82
|
}
|
|
61
83
|
}
|
|
84
|
+
|
|
85
|
+
.hint--error {
|
|
86
|
+
.hint__richtext a {
|
|
87
|
+
&:active,
|
|
88
|
+
&:hover {
|
|
89
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.hint--error {
|
|
95
|
+
.hint__richtext a {
|
|
96
|
+
&:active,
|
|
97
|
+
&:hover {
|
|
98
|
+
text-decoration-color: var(--e-c-secondary-03-100);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
62
102
|
</style>
|
package/components/index.js
CHANGED
|
@@ -72,3 +72,5 @@ export { default as UNotificationItem } from './notification-item/u-notification
|
|
|
72
72
|
export { default as UNotificationList } from './notification-list/u-notification-list.vue'
|
|
73
73
|
export { default as UDefinitionList } from './definition-list/u-definition-list.vue'
|
|
74
74
|
export { default as UDefinitionListItem } from './definition-list-item/u-definition-list-item.vue'
|
|
75
|
+
export { default as UCardStatistic } from './card-statistic/u-card-statistic.vue'
|
|
76
|
+
export { default as UEmpty } from './empty/u-empty.vue'
|
|
@@ -82,24 +82,6 @@
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.badge {
|
|
86
|
-
position: absolute;
|
|
87
|
-
top: -2px;
|
|
88
|
-
right: -2px;
|
|
89
|
-
width: a.rem(13);
|
|
90
|
-
height: a.rem(13);
|
|
91
|
-
background-color: var(--e-c-mono-900);
|
|
92
|
-
border-radius: 100%;
|
|
93
|
-
|
|
94
|
-
&.inactive {
|
|
95
|
-
background-image: url("data:image/svg+xml,%3Csvg width='13' height='13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6.5' cy='6.5' r='6.5' fill='%23333'/%3E%3Cpath d='m4.414 3 2.12 2.121L8.658 3l1.414 1.414-2.122 2.122 2.122 2.121-1.414 1.414-2.122-2.12-2.12 2.12L3 8.656l2.12-2.12L3 4.412 4.414 3Z' fill='%23fff'/%3E%3C/svg%3E");
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
85
|
.navigation-panel-tile__text-column {
|
|
100
86
|
flex: 1 1 auto;
|
|
101
87
|
}
|
|
102
|
-
|
|
103
|
-
.badge + .icon {
|
|
104
|
-
color: var(--e-c-mono-500);
|
|
105
|
-
}
|