@energie360/ui-library 0.1.14 → 0.1.16
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/base/abstracts/_layers.scss +1 -0
- package/base/abstracts/_resets.scss +1 -0
- package/components/card-header/card-header.scss +32 -32
- package/components/context-menu/context-menu.scss +1 -0
- package/components/hint/hint.scss +126 -0
- package/components/hint/u-hint.vue +54 -0
- package/components/index.js +2 -0
- package/components/inline-edit/u-inline-edit.vue +3 -1
- package/components/navigation-panel-tile/navigation-panel-tile.scss +105 -0
- package/components/navigation-panel-tile/u-navigation-panel-tile.vue +82 -0
- package/components/navigation-toolbar-link/navigation-toolbar-link.scss +23 -11
- package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +1 -1
- package/components/richtext/_wizard.scss +26 -0
- package/components/richtext/richtext.scss +26 -4
- package/components/richtext/u-richtext.vue +1 -3
- package/components/welcome/welcome.scss +1 -0
- package/dist/base-style.css +1 -0
- package/dist/base-style.css.map +1 -1
- package/elements/checkbox/checkbox.scss +150 -0
- package/elements/checkbox/u-checkbox.vue +42 -0
- package/elements/form/form.scss +3 -2
- package/elements/form-field/form-field-prefix-suffix.scss +1 -2
- package/elements/icon/u-icon.vue +34 -24
- package/elements/index.js +3 -0
- package/elements/radio/radio.scss +91 -2
- package/elements/radio/u-radio.vue +6 -3
- package/elements/radio-group/radio-group.scss +28 -0
- package/elements/radio-group/u-radio-group.vue +23 -3
- package/elements/select-chip/select-chip.scss +1 -0
- package/elements/select-chip/u-select-chip.vue +2 -2
- package/elements/select-chips/select-chips.scss +18 -0
- package/elements/select-chips/u-select-chips.vue +16 -3
- package/elements/select-tile/select-tile.scss +205 -0
- package/elements/select-tile/u-select-tile.vue +53 -0
- package/elements/select-tiles/select-tiles.scss +32 -0
- package/elements/select-tiles/u-select-tiles.vue +31 -0
- package/elements/text-field/text-field.types.ts +1 -0
- package/elements/text-field/u-text-field.vue +22 -14
- package/elements/toggle-switch/toggle-switch.scss +14 -4
- package/elements/toggle-switch/u-toggle-switch.vue +23 -20
- package/modules/index.js +4 -0
- package/modules/navigation-panel/navigation-panel.scss +65 -0
- package/modules/navigation-panel/u-navigation-panel.vue +22 -0
- package/modules/navigation-toolbar-side/navigation-toolbar-side.scss +1 -1
- package/modules/navigation-toolbar-top/navigation-toolbar-top.scss +1 -0
- package/modules/progress-indicator/progress-indicator.scss +84 -0
- package/modules/progress-indicator/u-progress-indicator.vue +34 -0
- package/modules/toast/toast-message.scss +67 -0
- package/modules/toast/toast.scss +14 -0
- package/modules/toast/u-toast-message.vue +46 -0
- package/modules/toast/u-toast.vue +26 -0
- package/modules/toast/useToast.ts +40 -0
- package/package.json +1 -1
- package/utils/translations/translate.js +0 -10
- package/wizard/index.js +1 -0
- package/wizard/wizard-outro/u-wizard-outro.vue +49 -0
- package/wizard/wizard-outro/wizard-outro.scss +56 -0
- package/elements/button/button.js +0 -12
- package/elements/elements.js +0 -35
- package/elements/icon/icon.js +0 -13
- package/elements/icon-button/icon-button.js +0 -12
- package/elements/loader/loader.js +0 -13
- package/modules/feedback/index.js +0 -1
- package/modules/inline-edit-group/index.js +0 -1
|
@@ -9,6 +9,38 @@ $image-col-width-small: 100px;
|
|
|
9
9
|
display: flex;
|
|
10
10
|
column-gap: var(--e-space-2);
|
|
11
11
|
|
|
12
|
+
.image-background {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
width: 100%;
|
|
17
|
+
aspect-ratio: 1;
|
|
18
|
+
background-color: var(--e-c-primary-01-100);
|
|
19
|
+
border-radius: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.badge {
|
|
23
|
+
@include a.type(100, strong);
|
|
24
|
+
|
|
25
|
+
position: absolute;
|
|
26
|
+
padding: a.rem(6) a.rem(8) a.rem(4);
|
|
27
|
+
color: var(--e-c-mono-00);
|
|
28
|
+
background-color: var(--e-c-secondary-05-500);
|
|
29
|
+
border-radius: var(--e-brd-radius-1);
|
|
30
|
+
top: a.rem(-16);
|
|
31
|
+
right: a.rem(-16);
|
|
32
|
+
|
|
33
|
+
@include a.bp(m) {
|
|
34
|
+
top: a.rem(-12);
|
|
35
|
+
right: a.rem(-12);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include a.bp(s) {
|
|
39
|
+
top: a.rem(-10);
|
|
40
|
+
right: a.rem(-10);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
12
44
|
@container (max-width: 260px) {
|
|
13
45
|
flex-direction: column-reverse;
|
|
14
46
|
}
|
|
@@ -64,35 +96,3 @@ $image-col-width-small: 100px;
|
|
|
64
96
|
flex-basis: a.rem($image-col-width-small);
|
|
65
97
|
}
|
|
66
98
|
}
|
|
67
|
-
|
|
68
|
-
.image-background {
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
width: 100%;
|
|
73
|
-
aspect-ratio: 1;
|
|
74
|
-
background-color: var(--e-c-primary-01-100);
|
|
75
|
-
border-radius: 100%;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.badge {
|
|
79
|
-
@include a.type(100, strong);
|
|
80
|
-
|
|
81
|
-
position: absolute;
|
|
82
|
-
padding: a.rem(6) a.rem(8) a.rem(4);
|
|
83
|
-
color: var(--e-c-mono-00);
|
|
84
|
-
background-color: var(--e-c-secondary-05-500);
|
|
85
|
-
border-radius: var(--e-brd-radius-1);
|
|
86
|
-
top: a.rem(-16);
|
|
87
|
-
right: a.rem(-16);
|
|
88
|
-
|
|
89
|
-
@include a.bp(m) {
|
|
90
|
-
top: a.rem(-12);
|
|
91
|
-
right: a.rem(-12);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@include a.bp(s) {
|
|
95
|
-
top: a.rem(-10);
|
|
96
|
-
right: a.rem(-10);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
@use '../../elements/text-link/text-link.scss' as t;
|
|
3
|
+
|
|
4
|
+
.hint {
|
|
5
|
+
@mixin type-neutral {
|
|
6
|
+
background-color: var(--e-c-secondary-05-100);
|
|
7
|
+
color: var(--e-c-secondary-05-900);
|
|
8
|
+
|
|
9
|
+
&::before {
|
|
10
|
+
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");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// override some richtext styles.
|
|
14
|
+
.richtext {
|
|
15
|
+
a {
|
|
16
|
+
font-size: 100px;
|
|
17
|
+
color: inherit;
|
|
18
|
+
|
|
19
|
+
&:active,
|
|
20
|
+
&:hover {
|
|
21
|
+
text-decoration-color: var(--e-c-secondary-05-200);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin type-warning {
|
|
28
|
+
background-color: var(--e-c-signal-02-100);
|
|
29
|
+
color: var(--e-c-signal-02-900);
|
|
30
|
+
|
|
31
|
+
&::before {
|
|
32
|
+
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");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// override some richtext styles.
|
|
36
|
+
.richtext {
|
|
37
|
+
a {
|
|
38
|
+
color: inherit;
|
|
39
|
+
|
|
40
|
+
&:active,
|
|
41
|
+
&:hover {
|
|
42
|
+
text-decoration-color: var(--e-c-signal-02-100);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin type-legal {
|
|
49
|
+
background-color: var(--e-c-mono-00);
|
|
50
|
+
border: 1px solid var(--e-c-mono-500);
|
|
51
|
+
border-left-width: 4px;
|
|
52
|
+
border-left-color: var(--e-c-mono-700);
|
|
53
|
+
color: var(--e-c-mono-900);
|
|
54
|
+
|
|
55
|
+
&::before {
|
|
56
|
+
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m12.86 3.404-.81.81 3.352 3.352.81-.81-3.353-3.352Zm.707-1.697a1 1 0 0 0-1.415 0l-1.8 1.8a1 1 0 0 0-.01 1.404L6.952 8.303a1 1 0 0 0-1.404.01l-1.84 1.84a1 1 0 0 0 0 1.414l4.342 4.342a1 1 0 0 0 1.414 0l1.84-1.84a1 1 0 0 0 0-1.414l-.092-.092.93-.93L20.6 20l1.4-1.4-8.46-8.366 1.063-1.062.091.091a1 1 0 0 0 1.415 0l1.8-1.8a1 1 0 0 0 0-1.414l-4.342-4.342ZM6.253 10.01l-.85.85 3.352 3.352.85-.85-3.352-3.352Zm1.975-.581 3.235-3.235L13.32 8.05l-3.235 3.235L8.23 9.429ZM16 21H4v-2h12v2Z' fill='%236B6B6B'/%3E%3C/svg%3E");
|
|
57
|
+
top: 0;
|
|
58
|
+
left: calc(
|
|
59
|
+
-24px - 12px - 4px
|
|
60
|
+
); // 24px: icon width, 12px: distance to box, 4px: additonal border-width
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
> p,
|
|
64
|
+
.richtext {
|
|
65
|
+
margin-left: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include a.bp(lg) {
|
|
69
|
+
margin-top: calc(4px + 4px + 24px);
|
|
70
|
+
border: 1px solid var(--e-c-mono-500);
|
|
71
|
+
border-top-width: 4px;
|
|
72
|
+
border-top-color: var(--e-c-mono-700);
|
|
73
|
+
|
|
74
|
+
&::before {
|
|
75
|
+
left: 0;
|
|
76
|
+
top: calc(
|
|
77
|
+
-24px - 4px - 4px
|
|
78
|
+
); // 24px: icon height, 12px: distance to box, 4px: additonal border-width
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Default type
|
|
84
|
+
@include type-neutral;
|
|
85
|
+
|
|
86
|
+
position: relative;
|
|
87
|
+
padding: var(--e-space-5) var(--e-space-4);
|
|
88
|
+
border-radius: var(--e-brd-radius-1);
|
|
89
|
+
|
|
90
|
+
&::before {
|
|
91
|
+
content: '';
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: var(--e-space-5);
|
|
94
|
+
left: var(--e-space-4);
|
|
95
|
+
width: a.rem(24);
|
|
96
|
+
height: a.rem(24);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
> p,
|
|
100
|
+
.richtext {
|
|
101
|
+
margin-left: var(--e-space-9);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
> p {
|
|
105
|
+
@include a.type(200, strong);
|
|
106
|
+
|
|
107
|
+
margin-bottom: var(--e-space-1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@include a.bp(lg) {
|
|
111
|
+
padding: var(--e-space-4);
|
|
112
|
+
|
|
113
|
+
&::before {
|
|
114
|
+
top: var(--e-space-4);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Modifiers
|
|
119
|
+
&.hint--warning {
|
|
120
|
+
@include type-warning;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.hint--legal {
|
|
124
|
+
@include type-legal;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { URichtext } from '../'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
type?: 'neutral' | 'warning' | 'legal'
|
|
6
|
+
label?: string
|
|
7
|
+
text?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { type = 'neutral' } = defineProps<Props>()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div :class="['hint', `hint--${type}`]">
|
|
15
|
+
<p class="hint__label">
|
|
16
|
+
<slot name="label">{{ label }}</slot>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<URichtext class="hint__richtext" small :text><slot></slot></URichtext>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped lang="scss" src="./hint.scss"></style>
|
|
24
|
+
|
|
25
|
+
<style lang="scss">
|
|
26
|
+
.hint__richtext {
|
|
27
|
+
a {
|
|
28
|
+
color: inherit;
|
|
29
|
+
|
|
30
|
+
&:active,
|
|
31
|
+
&:hover {
|
|
32
|
+
text-decoration-color: var(--e-c-secondary-05-200);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.hint--warning {
|
|
38
|
+
.hint__richtext a {
|
|
39
|
+
&:active,
|
|
40
|
+
&:hover {
|
|
41
|
+
text-decoration-color: var(--e-c-signal-02-100);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hint--legal {
|
|
47
|
+
.hint__richtext a {
|
|
48
|
+
&:active,
|
|
49
|
+
&:hover {
|
|
50
|
+
text-decoration-color: var(--e-c-mono-100);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
package/components/index.js
CHANGED
|
@@ -49,3 +49,5 @@ export { default as UContextMenuDivider } from './context-menu-divider/u-context
|
|
|
49
49
|
export { default as UCircularProgress } from './circular-progress/u-circular-progress.vue'
|
|
50
50
|
export { default as UProgressAvatar } from './progress-avatar/u-progress-avatar.vue'
|
|
51
51
|
export { default as UWelcome } from './welcome/u-welcome.vue'
|
|
52
|
+
export { default as UHint } from './hint/u-hint.vue'
|
|
53
|
+
export { default as UNavigationPanelTile } from './navigation-panel-tile/u-navigation-panel-tile.vue'
|
|
@@ -74,7 +74,9 @@ defineExpose({ collapse })
|
|
|
74
74
|
<div class="inline-edit__heading-col">
|
|
75
75
|
<p :id="headingId" class="inline-edit__title">{{ title }}</p>
|
|
76
76
|
|
|
77
|
-
<p class="inline-edit__summary"
|
|
77
|
+
<p class="inline-edit__summary">
|
|
78
|
+
<slot name="summary">{{ summary }}</slot>
|
|
79
|
+
</p>
|
|
78
80
|
<p class="inline-edit__description" v-html="description"></p>
|
|
79
81
|
</div>
|
|
80
82
|
<div class="inline-edit__heading-cta-col">
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@use '../../base/abstracts/' as a;
|
|
2
|
+
|
|
3
|
+
.navigation-panel-tile {
|
|
4
|
+
display: flex;
|
|
5
|
+
column-gap: var(--e-space-2);
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
border: 2px solid var(--e-c-secondary-01-100);
|
|
8
|
+
border-radius: var(--e-brd-radius-2);
|
|
9
|
+
padding: var(--e-space-4);
|
|
10
|
+
transition: background-color a.$trs-ease-out;
|
|
11
|
+
background-color: var(--e-c-mono-00);
|
|
12
|
+
|
|
13
|
+
&.active:not(.disabled) {
|
|
14
|
+
background-color: var(--e-c-secondary-01-1000);
|
|
15
|
+
border-color: var(--e-c-secondary-01-1000);
|
|
16
|
+
|
|
17
|
+
.navigation-panel-tile__title,
|
|
18
|
+
.navigation-panel-tile__description,
|
|
19
|
+
.navigation-panel-tile__icon-wrapper {
|
|
20
|
+
color: var(--e-c-mono-00);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.greyed:not(.disabled, :hover, .active) {
|
|
25
|
+
background-color: var(--e-c-mono-50);
|
|
26
|
+
border-color: var(--e-c-mono-200);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.disabled {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
border-color: var(--e-c-mono-200);
|
|
32
|
+
|
|
33
|
+
.navigation-panel-tile__title,
|
|
34
|
+
.navigation-panel-tile__description,
|
|
35
|
+
.navigation-panel-tile__icon-wrapper {
|
|
36
|
+
color: var(--e-c-mono-500);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: var(--e-c-primary-01-50);
|
|
42
|
+
|
|
43
|
+
.navigation-panel-tile__title,
|
|
44
|
+
.navigation-panel-tile__description {
|
|
45
|
+
color: var(--e-c-primary-01-700);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:active {
|
|
50
|
+
background-color: var(--e-c-primary-01-100);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@include a.bp(lg) {
|
|
54
|
+
height: a.rem(82);
|
|
55
|
+
width: a.rem(260);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.navigation-panel-tile__title {
|
|
60
|
+
@include a.type(200, strong);
|
|
61
|
+
|
|
62
|
+
transition: color a.$trs-ease-out;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.navigation-panel-tile__icon-wrapper {
|
|
66
|
+
position: relative;
|
|
67
|
+
transition: color a.$trs-ease-out;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.navigation-panel-tile__description {
|
|
71
|
+
@include a.type(100);
|
|
72
|
+
|
|
73
|
+
color: var(--e-c-mono-700);
|
|
74
|
+
transition: color a.$trs-ease-out;
|
|
75
|
+
|
|
76
|
+
@include a.bp(lg) {
|
|
77
|
+
width: a.rem(192);
|
|
78
|
+
height: a.rem(22);
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
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
|
+
.navigation-panel-tile__text-column {
|
|
100
|
+
flex: 1 1 auto;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.badge + .icon {
|
|
104
|
+
color: var(--e-c-mono-500);
|
|
105
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { UIcon } from '../../elements'
|
|
4
|
+
|
|
5
|
+
type IconBadge = 'inactive'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
active?: boolean
|
|
9
|
+
description?: string
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
greyed?: boolean
|
|
12
|
+
href?: string
|
|
13
|
+
icon?: string
|
|
14
|
+
iconBadge?: IconBadge
|
|
15
|
+
target?: string
|
|
16
|
+
title?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
href = '',
|
|
21
|
+
target = '_self',
|
|
22
|
+
active = false,
|
|
23
|
+
disabled = false,
|
|
24
|
+
greyed = false,
|
|
25
|
+
} = defineProps<Props>()
|
|
26
|
+
|
|
27
|
+
const tag = computed(() => (href ? 'a' : 'div'))
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<component
|
|
32
|
+
:is="tag"
|
|
33
|
+
:href="tag === 'a' ? href : null"
|
|
34
|
+
:target="tag === 'a' ? target : null"
|
|
35
|
+
:class="['navigation-panel-tile', { active, disabled, greyed }]"
|
|
36
|
+
>
|
|
37
|
+
<div class="navigation-panel-tile__text-column">
|
|
38
|
+
<div class="navigation-panel-tile__title">
|
|
39
|
+
<slot name="title">
|
|
40
|
+
{{ title }}
|
|
41
|
+
</slot>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="navigation-panel-tile__description">
|
|
44
|
+
<slot name="description">
|
|
45
|
+
<div v-if="description" v-html="description" />
|
|
46
|
+
</slot>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="navigation-panel-tile__icon-column">
|
|
51
|
+
<div v-if="icon" class="navigation-panel-tile__icon-wrapper">
|
|
52
|
+
<span v-if="iconBadge" :class="['badge', iconBadge]" />
|
|
53
|
+
|
|
54
|
+
<UIcon :name="icon" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</component>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<style lang="scss" scoped src="./navigation-panel-tile.scss"></style>
|
|
61
|
+
<style lang="scss">
|
|
62
|
+
@use '../../base/abstracts/' as a;
|
|
63
|
+
|
|
64
|
+
.navigation-panel-tile__description {
|
|
65
|
+
@include a.bp(lg) {
|
|
66
|
+
p {
|
|
67
|
+
width: a.rem(192);
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
br {
|
|
74
|
+
content: '';
|
|
75
|
+
|
|
76
|
+
&::after {
|
|
77
|
+
content: ' ';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
// TODO: How to handle text overflow?
|
|
2
|
-
|
|
3
1
|
@use '../../base/abstracts/' as a;
|
|
4
2
|
|
|
5
|
-
@keyframes
|
|
3
|
+
@keyframes fade-in-label {
|
|
6
4
|
0% {
|
|
7
5
|
opacity: 0;
|
|
8
6
|
transform: translateX(calc(100% + #{a.rem(8)}));
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
@keyframes
|
|
15
|
+
@keyframes fade-out-label {
|
|
18
16
|
0% {
|
|
19
17
|
opacity: 1;
|
|
20
18
|
transform: translateX(100%);
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
0% {
|
|
37
35
|
overflow: hidden;
|
|
38
36
|
padding: var(--e-space-1_5) var(--e-space-3);
|
|
39
|
-
width:
|
|
37
|
+
width: var(--nav-toolbar-link-width);
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
100% {
|
|
@@ -56,11 +54,13 @@
|
|
|
56
54
|
100% {
|
|
57
55
|
overflow: hidden;
|
|
58
56
|
padding: var(--e-space-1_5) var(--e-space-3);
|
|
59
|
-
width:
|
|
57
|
+
width: var(--nav-toolbar-link-width);
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
.navigation-toolbar-link {
|
|
62
|
+
// We assume that the width of the link is fixed.
|
|
63
|
+
--nav-toolbar-link-width: #{a.rem(232)};
|
|
64
64
|
--transition-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1); /* easeOutCubic */
|
|
65
65
|
|
|
66
66
|
position: relative;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
align-items: center;
|
|
72
72
|
flex-wrap: nowrap;
|
|
73
73
|
white-space: nowrap;
|
|
74
|
-
width:
|
|
74
|
+
width: var(--nav-toolbar-link-width);
|
|
75
75
|
column-gap: var(--e-space-2);
|
|
76
76
|
background-color: var(--e-c-secondary-01-1000);
|
|
77
77
|
color: var(--e-c-mono-00);
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
&.hover-out:not(.is-expanding, .is-collapsing, .label-hidden) {
|
|
125
125
|
.navigation-toolbar-link__label {
|
|
126
126
|
// TODO: Maybe just use transitions instead of keyframe animations
|
|
127
|
-
animation-name:
|
|
127
|
+
animation-name: fade-out-label;
|
|
128
128
|
animation-duration: var(--e-trs-duration-faster);
|
|
129
129
|
animation-timing-function: ease-out;
|
|
130
130
|
}
|
|
@@ -132,10 +132,9 @@
|
|
|
132
132
|
|
|
133
133
|
&:hover:not(.is-expanding, .is-collapsing, .label-hidden) {
|
|
134
134
|
.navigation-toolbar-link__label {
|
|
135
|
-
animation-name:
|
|
135
|
+
animation-name: fade-in-label;
|
|
136
136
|
animation-duration: var(--e-trs-duration-faster);
|
|
137
137
|
animation-timing-function: ease-out;
|
|
138
|
-
|
|
139
138
|
padding: var(--e-space-1_5) var(--e-space-2);
|
|
140
139
|
transform: translateX(100%);
|
|
141
140
|
width: auto;
|
|
@@ -146,16 +145,29 @@
|
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
147
|
|
|
148
|
+
.navigation-toolbar-link__label {
|
|
149
|
+
// internal CSS variable
|
|
150
|
+
--label-width: calc(
|
|
151
|
+
var(--nav-toolbar-link-width) - var(--e-space-2) - 24px - 2 * var(--e-space-3)
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
width: var(--label-width);
|
|
155
|
+
text-overflow: ellipsis;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
}
|
|
158
|
+
|
|
149
159
|
// Animation
|
|
150
160
|
.navigation-toolbar-link {
|
|
151
161
|
&.is-collapsing,
|
|
152
162
|
&.is-expanding {
|
|
153
163
|
animation-duration: var(--e-trs-duration-faster);
|
|
154
164
|
|
|
165
|
+
// animation-duration: 5s;
|
|
166
|
+
|
|
155
167
|
.navigation-toolbar-link__label {
|
|
156
168
|
animation: none;
|
|
157
169
|
position: static;
|
|
158
|
-
width:
|
|
170
|
+
width: var(--label-width);
|
|
159
171
|
height: auto;
|
|
160
172
|
opacity: 1;
|
|
161
173
|
background-color: transparent;
|
|
@@ -99,7 +99,7 @@ const tag = computed(() => {
|
|
|
99
99
|
@mouseleave="onHoverOut"
|
|
100
100
|
>
|
|
101
101
|
<UIcon :name="icon" />
|
|
102
|
-
<span ref="label" class="navigation-toolbar-link__label">
|
|
102
|
+
<span ref="label" class="navigation-toolbar-link__label" :title="label">
|
|
103
103
|
<slot>{{ label }}</slot>
|
|
104
104
|
</span>
|
|
105
105
|
</component>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.richtext.richtext--wizard {
|
|
4
|
+
// Spacing rules
|
|
5
|
+
* + * {
|
|
6
|
+
margin-top: var(--e-spac-2);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
* + h2,
|
|
10
|
+
* + h3,
|
|
11
|
+
* + .richtext__title-large,
|
|
12
|
+
* + .richtext__title-small {
|
|
13
|
+
margin-top: var(--e-space-6);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
h2,
|
|
17
|
+
.richtext__title-large {
|
|
18
|
+
@include a.type(300, strong);
|
|
19
|
+
|
|
20
|
+
color: var(--e-c-mono-900);
|
|
21
|
+
|
|
22
|
+
@include a.bp(lg) {
|
|
23
|
+
@include a.type(200, strong);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '../../base/abstracts
|
|
2
|
-
@use '
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
@use './wizard';
|
|
3
3
|
|
|
4
4
|
.richtext {
|
|
5
5
|
// Spacing rules
|
|
@@ -74,7 +74,21 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
a {
|
|
77
|
-
|
|
77
|
+
font-weight: var(--e-type-weight-strong);
|
|
78
|
+
color: var(--e-c-primary-01-700);
|
|
79
|
+
text-decoration: underline;
|
|
80
|
+
text-underline-offset: 0.3em;
|
|
81
|
+
transition:
|
|
82
|
+
text-decoration-color a.$trs-default,
|
|
83
|
+
color a.$trs-default;
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
text-decoration-color: var(--e-c-primary-01-50);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:active {
|
|
90
|
+
text-decoration-color: var(--e-c-primary-01-700);
|
|
91
|
+
}
|
|
78
92
|
}
|
|
79
93
|
|
|
80
94
|
ul,
|
|
@@ -168,7 +182,15 @@
|
|
|
168
182
|
}
|
|
169
183
|
|
|
170
184
|
a {
|
|
171
|
-
|
|
185
|
+
color: var(--e-c-primary-01-50);
|
|
186
|
+
|
|
187
|
+
&:hover {
|
|
188
|
+
text-decoration-color: var(--e-c-primary-01-200);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:active {
|
|
192
|
+
text-decoration-color: var(--e-c-primary-01-50);
|
|
193
|
+
}
|
|
172
194
|
}
|
|
173
195
|
|
|
174
196
|
ul > li::before {
|
|
@@ -16,6 +16,4 @@ const classes = ['richtext', { 'richtext--small': small, 'richtext--inverted': i
|
|
|
16
16
|
<div v-else :class="classes"><slot></slot></div>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
|
-
<style lang="scss">
|
|
20
|
-
@use './richtext.scss';
|
|
21
|
-
</style>
|
|
19
|
+
<style lang="scss" src="./richtext.scss"></style>
|