@energie360/ui-library 0.1.42 → 0.1.44
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/card-amount-illustrated/card-amount-illustrated.scss +1 -1
- package/components/card-footer/u-card-footer.vue +10 -1
- package/components/card-group/card-group.scss +22 -0
- package/components/card-header/u-card-header.vue +4 -2
- package/components/card-price/card-price.scss +1 -1
- package/components/hint/u-hint.vue +65 -3
- package/components/portal-logo/u-portal-logo.vue +1 -1
- package/elements/button/_button-filled-inverted.scss +1 -1
- package/elements/button/_button-filled.scss +1 -1
- package/elements/button/_button-outlined-inverted.scss +2 -2
- package/elements/button/_button-outlined.scss +1 -1
- package/elements/button/_button-plain.scss +2 -2
- package/elements/button/_button-secondary-outlined.scss +1 -1
- package/elements/button/button.scss +5 -1
- package/elements/button/u-button.vue +4 -0
- package/elements/select/select.scss +8 -2
- package/elements/select/u-select.vue +6 -2
- package/elements/select-chip/u-select-chip.vue +6 -1
- package/elements/select-tile/select-tile.scss +5 -0
- package/elements/select-tile/u-select-tile.vue +16 -6
- package/modules/navigation-toolbar-side/u-navigation-toolbar-side.vue +2 -2
- package/modules/navigation-toolbar-top/u-navigation-toolbar-top.vue +6 -1
- package/package.json +1 -1
- package/wizard/wizard-intro/u-wizard-intro.vue +4 -6
|
@@ -55,4 +55,13 @@ if (currentValue) {
|
|
|
55
55
|
</div>
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
|
-
<style lang="scss" src="./card-footer.scss"></style>
|
|
58
|
+
<style scoped lang="scss" src="./card-footer.scss"></style>
|
|
59
|
+
<style scoped lang="scss">
|
|
60
|
+
.card-footer {
|
|
61
|
+
:slotted(a),
|
|
62
|
+
:slotted(button),
|
|
63
|
+
:slotted(.button) {
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -23,6 +23,28 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
&.columns-2 {
|
|
27
|
+
grid-template-columns: repeat(2, 1fr);
|
|
28
|
+
grid-template-rows: 1fr;
|
|
29
|
+
|
|
30
|
+
@include a.bp(m) {
|
|
31
|
+
grid-template-columns: repeat(1, 1fr);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.columns-3 {
|
|
36
|
+
grid-template-columns: repeat(3, 1fr);
|
|
37
|
+
grid-template-rows: 1fr;
|
|
38
|
+
|
|
39
|
+
@include a.bp(xl) {
|
|
40
|
+
grid-template-columns: repeat(2, 1fr);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include a.bp(m) {
|
|
44
|
+
grid-template-columns: repeat(1, 1fr);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
26
48
|
&.columns-4 {
|
|
27
49
|
grid-template-columns: repeat(4, 1fr);
|
|
28
50
|
grid-template-rows: 1fr;
|
|
@@ -50,9 +50,11 @@ defineProps<Props>()
|
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
|
-
<div v-if="image ||
|
|
53
|
+
<div v-if="hasSlotContent($slots.image) || image" class="image-col">
|
|
54
54
|
<div class="image-background">
|
|
55
|
-
<slot name="image"
|
|
55
|
+
<slot name="image">
|
|
56
|
+
<img :src="image.src" :alt="image.alt" />
|
|
57
|
+
</slot>
|
|
56
58
|
</div>
|
|
57
59
|
</div>
|
|
58
60
|
|
|
@@ -39,9 +39,11 @@ const iconMap = {
|
|
|
39
39
|
<slot name="label">{{ label }}</slot>
|
|
40
40
|
</span>
|
|
41
41
|
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
<slot v-if="hasSlotContent($slots.link) || link" name="link">
|
|
43
|
+
<a :href="link.href" :target="link.target" class="hint__link">
|
|
44
|
+
{{ link.label }}
|
|
45
|
+
</a>
|
|
46
|
+
</slot>
|
|
45
47
|
</p>
|
|
46
48
|
|
|
47
49
|
<URichtext v-if="text || $slots.default" class="hint__richtext" small :text>
|
|
@@ -51,6 +53,66 @@ const iconMap = {
|
|
|
51
53
|
</template>
|
|
52
54
|
|
|
53
55
|
<style scoped lang="scss" src="./hint.scss"></style>
|
|
56
|
+
<style scoped lang="scss">
|
|
57
|
+
@use '../../elements/text-link/text-link.scss' as t;
|
|
58
|
+
@use '../../base/abstracts' as a;
|
|
59
|
+
|
|
60
|
+
.hint__label {
|
|
61
|
+
:slotted(a) {
|
|
62
|
+
@include t.text-link;
|
|
63
|
+
|
|
64
|
+
display: inline-block;
|
|
65
|
+
color: inherit;
|
|
66
|
+
margin-left: var(--e-space-2);
|
|
67
|
+
|
|
68
|
+
&:active,
|
|
69
|
+
&:hover {
|
|
70
|
+
text-decoration-color: var(--e-c-secondary-05-200);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include a.bp(lg) {
|
|
74
|
+
display: block;
|
|
75
|
+
margin-left: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.hint.hint--warning .hint__label {
|
|
81
|
+
:slotted(a) {
|
|
82
|
+
&:active,
|
|
83
|
+
&:hover {
|
|
84
|
+
text-decoration-color: var(--e-c-signal-02-100);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.hint.hint--legal .hint__label {
|
|
90
|
+
:slotted(a) {
|
|
91
|
+
&:active,
|
|
92
|
+
&:hover {
|
|
93
|
+
text-decoration-color: var(--e-c-mono-100);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hint.hint--error .hint__label {
|
|
99
|
+
:slotted(a) {
|
|
100
|
+
&:active,
|
|
101
|
+
&:hover {
|
|
102
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.hint.hint--task .hint__label {
|
|
108
|
+
:slotted(a) {
|
|
109
|
+
&:active,
|
|
110
|
+
&:hover {
|
|
111
|
+
text-decoration-color: var(--e-c-signal-03-100);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</style>
|
|
54
116
|
|
|
55
117
|
<style lang="scss">
|
|
56
118
|
.hint__richtext {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
--dot-color: var(--e-c-mono-00);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
&:hover {
|
|
17
|
-
background-color:
|
|
16
|
+
&:hover:not(.no-hover) {
|
|
17
|
+
background-color: rgb(var(--e-c-primary-01-900-rgb), 0.7);
|
|
18
18
|
border-color: var(--e-c-primary-01-200);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
background: none;
|
|
5
5
|
border: 0;
|
|
6
6
|
text-decoration: none;
|
|
7
|
-
|
|
7
|
+
gap: var(--e-space-1);
|
|
8
8
|
|
|
9
9
|
.icon {
|
|
10
10
|
--icon-fill-color: var(--e-c-primary-01-700);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
&:hover {
|
|
13
|
+
&:hover:not(.no-hover) {
|
|
14
14
|
color: var(--e-c-secondary-01-900);
|
|
15
15
|
|
|
16
16
|
.icon {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@include button-base;
|
|
23
23
|
|
|
24
24
|
// ---- PRIMARY ----
|
|
25
|
-
|
|
25
|
+
&.filled {
|
|
26
26
|
@include button-filled;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
white-space: nowrap;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
&.no-hover {
|
|
85
|
+
cursor: default;
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
// In some cases we need to force full width of a button.
|
|
85
89
|
// Is mostly the case when the button is wrapped by another element.
|
|
86
90
|
&.full-width {
|
|
@@ -17,6 +17,7 @@ interface ButtonProps {
|
|
|
17
17
|
fullWidth?: boolean
|
|
18
18
|
hideLabelM?: boolean
|
|
19
19
|
hideLabelLg?: boolean
|
|
20
|
+
noHover?: boolean
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const {
|
|
@@ -26,6 +27,7 @@ const {
|
|
|
26
27
|
href = '',
|
|
27
28
|
target = '',
|
|
28
29
|
asSpan = false,
|
|
30
|
+
noHover = false,
|
|
29
31
|
} = defineProps<ButtonProps>()
|
|
30
32
|
|
|
31
33
|
const buttonTag = computed(() => (asSpan ? 'span' : 'button'))
|
|
@@ -42,6 +44,7 @@ const buttonTag = computed(() => (asSpan ? 'span' : 'button'))
|
|
|
42
44
|
'full-width': fullWidth,
|
|
43
45
|
'hide-label-m': hideLabelM,
|
|
44
46
|
'hide-label-lg': hideLabelLg,
|
|
47
|
+
'no-hover': noHover,
|
|
45
48
|
},
|
|
46
49
|
]"
|
|
47
50
|
:href
|
|
@@ -71,6 +74,7 @@ const buttonTag = computed(() => (asSpan ? 'span' : 'button'))
|
|
|
71
74
|
'full-width': fullWidth,
|
|
72
75
|
'hide-label-m': hideLabelM,
|
|
73
76
|
'hide-label-lg': hideLabelLg,
|
|
77
|
+
'no-hover': noHover,
|
|
74
78
|
loading: loading,
|
|
75
79
|
disabled,
|
|
76
80
|
},
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
// TODO: find a better solution for this.
|
|
21
21
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%233c8420' fill-rule='evenodd' d='M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414' clip-rule='evenodd'/%3E%3C/svg%3E");
|
|
22
|
-
|
|
23
|
-
// background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.06 5.53 8 8.583 4.94 5.53 4 6.47l4 4 4-4-.94-.94Z' fill='%23333'/%3E%3C/svg%3E");
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
select {
|
|
@@ -43,4 +41,12 @@
|
|
|
43
41
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23b3b3b3' fill-rule='evenodd' d='M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414' clip-rule='evenodd'/%3E%3C/svg%3E");
|
|
44
42
|
}
|
|
45
43
|
}
|
|
44
|
+
|
|
45
|
+
&.readonly {
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
|
|
48
|
+
.control::after {
|
|
49
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%236b6b6b' fill-rule='evenodd' d='M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414' clip-rule='evenodd'/%3E%3C/svg%3E");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
46
52
|
}
|
|
@@ -6,6 +6,7 @@ import { getTranslation } from '../../utils/translations/translate'
|
|
|
6
6
|
|
|
7
7
|
interface Props extends FormFieldBase {
|
|
8
8
|
name: string
|
|
9
|
+
readonly?: boolean
|
|
9
10
|
options: SelectOption[]
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ const model = defineModel<string>()
|
|
|
14
15
|
const {
|
|
15
16
|
disabled = false,
|
|
16
17
|
required = false,
|
|
18
|
+
readonly = false,
|
|
17
19
|
helpText = '',
|
|
18
20
|
errorMessage = '',
|
|
19
21
|
} = defineProps<Props>()
|
|
@@ -27,7 +29,7 @@ const isHovering = ref(false)
|
|
|
27
29
|
const spacer = '. '
|
|
28
30
|
|
|
29
31
|
const onFocus = () => {
|
|
30
|
-
if (disabled) {
|
|
32
|
+
if (readonly || disabled) {
|
|
31
33
|
return
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -39,7 +41,7 @@ const onBlur = () => {
|
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
const onHover = () => {
|
|
42
|
-
if (disabled) {
|
|
44
|
+
if (readonly || disabled) {
|
|
43
45
|
return
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -66,6 +68,7 @@ const needsHelpTextSpacer = computed(() => {
|
|
|
66
68
|
{
|
|
67
69
|
required,
|
|
68
70
|
disabled,
|
|
71
|
+
readonly,
|
|
69
72
|
focus: isFocused,
|
|
70
73
|
hover: isHovering,
|
|
71
74
|
'float-label': true,
|
|
@@ -90,6 +93,7 @@ const needsHelpTextSpacer = computed(() => {
|
|
|
90
93
|
v-model="model"
|
|
91
94
|
:disabled
|
|
92
95
|
:required
|
|
96
|
+
:aria-readonly="readonly"
|
|
93
97
|
:name
|
|
94
98
|
@focus="onFocus"
|
|
95
99
|
@blur="onBlur"
|
|
@@ -28,7 +28,12 @@ const { onChange } = useRadio({ model, provideKey })
|
|
|
28
28
|
:class="[
|
|
29
29
|
'select-chip__button',
|
|
30
30
|
'button',
|
|
31
|
-
{
|
|
31
|
+
{
|
|
32
|
+
filled: model === value && !disabled,
|
|
33
|
+
outlined: model !== value || disabled,
|
|
34
|
+
disabled,
|
|
35
|
+
'no-hover': model === value,
|
|
36
|
+
},
|
|
32
37
|
]"
|
|
33
38
|
>
|
|
34
39
|
<UIcon v-if="model === value" name="check" />
|
|
@@ -203,3 +203,8 @@ $trs-pressed: var(--e-trs-duration-fastest) cubic-bezier(0.34, 1.56, 0.64, 1); /
|
|
|
203
203
|
border-radius: var(--e-brd-radius-1);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
+
|
|
207
|
+
.select-tile__content:not(:has(.select-tile__label-wrapper), :has(.select-tile__icon-wrapper)),
|
|
208
|
+
.select-tile__content:not(:has(.select-tile__text-wrapper), :has(.select-tile__icon-wrapper)) {
|
|
209
|
+
align-self: center;
|
|
210
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import UIcon from '../icon/u-icon.vue'
|
|
3
3
|
import { useRadio } from '../radio-group/radio-group-composables'
|
|
4
|
+
import { hasSlotContent } from '../../utils/vue/helpers'
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
name: string
|
|
7
|
-
label
|
|
8
|
-
text
|
|
8
|
+
label?: string
|
|
9
|
+
text?: string
|
|
9
10
|
disabled?: boolean
|
|
10
11
|
value: string
|
|
11
12
|
icon: string
|
|
@@ -13,7 +14,12 @@ interface Props {
|
|
|
13
14
|
provideKey?: string
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
const {
|
|
17
|
+
const {
|
|
18
|
+
disabled = false,
|
|
19
|
+
radio = false,
|
|
20
|
+
provideKey = 'select-tile-group',
|
|
21
|
+
label = '',
|
|
22
|
+
} = defineProps<Props>()
|
|
17
23
|
|
|
18
24
|
const model = defineModel<string>()
|
|
19
25
|
const { onChange } = useRadio({ model, provideKey })
|
|
@@ -32,15 +38,19 @@ const { onChange } = useRadio({ model, provideKey })
|
|
|
32
38
|
</div>
|
|
33
39
|
|
|
34
40
|
<!-- LABEL -->
|
|
35
|
-
<div class="select-tile__label-wrapper">
|
|
41
|
+
<div v-if="hasSlotContent($slots.label) || label" class="select-tile__label-wrapper">
|
|
36
42
|
<slot name="label">
|
|
37
43
|
{{ label }}
|
|
38
44
|
</slot>
|
|
39
45
|
</div>
|
|
40
46
|
|
|
41
47
|
<!-- TEXT -->
|
|
42
|
-
<div class="select-tile__text-wrapper">
|
|
43
|
-
<p>
|
|
48
|
+
<div v-if="hasSlotContent($slots.text) || text" class="select-tile__text-wrapper">
|
|
49
|
+
<p>
|
|
50
|
+
<slot name="text">
|
|
51
|
+
{{ text }}
|
|
52
|
+
</slot>
|
|
53
|
+
</p>
|
|
44
54
|
</div>
|
|
45
55
|
</div>
|
|
46
56
|
|
|
@@ -24,11 +24,11 @@ interface Props {
|
|
|
24
24
|
const {
|
|
25
25
|
collapsed = false,
|
|
26
26
|
logoImage = {
|
|
27
|
-
src: '/static/ui-assets/images/logo-
|
|
27
|
+
src: '/static/ui-assets/images/logo-short-inverted.svg',
|
|
28
28
|
alt: 'Logo Energie 360°',
|
|
29
29
|
},
|
|
30
30
|
logoMinifiedImage = {
|
|
31
|
-
src: '/static/ui-assets/images/logo-
|
|
31
|
+
src: '/static/ui-assets/images/logo-short-inverted.svg',
|
|
32
32
|
alt: 'Logo Energie 360°',
|
|
33
33
|
},
|
|
34
34
|
logoLink = {
|
|
@@ -4,7 +4,7 @@ import { UIconButton } from '../../elements'
|
|
|
4
4
|
import { UContextMenu } from '../../components'
|
|
5
5
|
import { Image } from '../../elements/types'
|
|
6
6
|
import { getTranslation } from '../../utils/translations/translate'
|
|
7
|
-
import { ref, watch, useTemplateRef } from 'vue'
|
|
7
|
+
import { ref, watch, useTemplateRef, onUnmounted } from 'vue'
|
|
8
8
|
|
|
9
9
|
interface MenuButton {
|
|
10
10
|
icon: string
|
|
@@ -80,6 +80,11 @@ watch(model, (newV) => {
|
|
|
80
80
|
closePanel()
|
|
81
81
|
}
|
|
82
82
|
})
|
|
83
|
+
|
|
84
|
+
onUnmounted(() => {
|
|
85
|
+
// In case of re-render, remove this class from <html> tag.
|
|
86
|
+
document.documentElement.classList.toggle('navigation-toolbar-mobile-open', false)
|
|
87
|
+
})
|
|
83
88
|
</script>
|
|
84
89
|
|
|
85
90
|
<template>
|
package/package.json
CHANGED
|
@@ -12,9 +12,9 @@ defineProps<Props>()
|
|
|
12
12
|
<div class="left-col">
|
|
13
13
|
<div>
|
|
14
14
|
<div class="title-slot">
|
|
15
|
-
<slot name="title"
|
|
16
|
-
|
|
17
|
-
>
|
|
15
|
+
<slot name="title">
|
|
16
|
+
<h1>{{ title }}</h1>
|
|
17
|
+
</slot>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<div class="description-slot">
|
|
@@ -35,6 +35,4 @@ defineProps<Props>()
|
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
|
-
<style lang="scss" scoped>
|
|
39
|
-
@use './wizard-intro.scss';
|
|
40
|
-
</style>
|
|
38
|
+
<style lang="scss" scoped src="./wizard-intro.scss"></style>
|