@energie360/ui-library 0.1.27 → 0.1.29
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-price-list/u-card-price-list.vue +1 -1
- package/components/definition-list/definition-list.scss +5 -0
- package/components/definition-list/u-definition-list.vue +7 -0
- package/components/definition-list-item/definition-list-item.scss +79 -0
- package/components/definition-list-item/u-definition-list-item.vue +57 -0
- package/components/download-list-item/u-download-list-item.vue +2 -2
- package/components/file-upload/u-file-upload.vue +1 -1
- package/components/index.js +2 -0
- package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +9 -1
- package/components/rating/u-rating.vue +2 -2
- package/components/table/u-table-cell.vue +1 -1
- package/elements/numeric-stepper/u-numeric-stepper.vue +2 -2
- package/elements/select-chip/u-select-chip.vue +1 -1
- package/elements/select-chips/select-chips.scss +1 -1
- package/elements/select-tile/select-tile.scss +1 -1
- package/elements/select-tile/u-select-tile.vue +1 -1
- package/elements/toggle-switch/u-toggle-switch.vue +1 -1
- package/modules/content-title/content-title.scss +4 -0
- package/modules/search-filter/search-filter.scss +11 -0
- package/modules/search-filter/u-search-filter.vue +25 -3
- package/modules/toast/u-toast-message.vue +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.definition-list-item {
|
|
4
|
+
@include a.type(300);
|
|
5
|
+
|
|
6
|
+
display: table-row;
|
|
7
|
+
|
|
8
|
+
dt,
|
|
9
|
+
dd {
|
|
10
|
+
display: table-cell;
|
|
11
|
+
padding-bottom: var(--e-space-6);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
dt {
|
|
15
|
+
@include a.type(300, strong);
|
|
16
|
+
|
|
17
|
+
padding-right: var(--e-space-10);
|
|
18
|
+
min-width: calc(220px + var(--e-space-10));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:last-child {
|
|
22
|
+
dt,
|
|
23
|
+
dd {
|
|
24
|
+
padding-bottom: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Variants
|
|
29
|
+
&.small {
|
|
30
|
+
@include a.type(100);
|
|
31
|
+
|
|
32
|
+
dt,
|
|
33
|
+
dd {
|
|
34
|
+
padding-bottom: var(--e-space-4);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
dt {
|
|
38
|
+
@include a.type(100, strong);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.compact {
|
|
43
|
+
dt,
|
|
44
|
+
dd {
|
|
45
|
+
padding-bottom: var(--e-space-1);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@include a.bp(lg) {
|
|
51
|
+
.definition-list-item,
|
|
52
|
+
.definition-list-item.small {
|
|
53
|
+
@include a.type(200);
|
|
54
|
+
|
|
55
|
+
display: block;
|
|
56
|
+
padding-bottom: var(--e-space-6);
|
|
57
|
+
|
|
58
|
+
dt,
|
|
59
|
+
dd {
|
|
60
|
+
display: block;
|
|
61
|
+
padding-bottom: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
dt {
|
|
65
|
+
@include a.type(200, strong);
|
|
66
|
+
|
|
67
|
+
padding-bottom: var(--e-space-2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:last-child {
|
|
71
|
+
padding-bottom: 0;
|
|
72
|
+
|
|
73
|
+
dt,
|
|
74
|
+
dd {
|
|
75
|
+
padding-bottom: var(--e-space-2);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
name?: string
|
|
4
|
+
value?: string
|
|
5
|
+
variant?: 'normal' | 'small'
|
|
6
|
+
compact?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { name = '', value = '', variant = 'normal' } = defineProps<Props>()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div :class="['definition-list-item', variant, { compact }]">
|
|
14
|
+
<dt>
|
|
15
|
+
<slot name="name">{{ name }}</slot>
|
|
16
|
+
</dt>
|
|
17
|
+
|
|
18
|
+
<dd>
|
|
19
|
+
<slot name="value">{{ value }}</slot>
|
|
20
|
+
</dd>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style scoped lang="scss" src="./definition-list-item.scss"></style>
|
|
25
|
+
|
|
26
|
+
<style lang="scss">
|
|
27
|
+
@use '../../elements/text-link/text-link' as t;
|
|
28
|
+
@use '../../base/abstracts' as a;
|
|
29
|
+
|
|
30
|
+
dd {
|
|
31
|
+
a {
|
|
32
|
+
@include t.text-link;
|
|
33
|
+
|
|
34
|
+
@include a.type(300);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.small {
|
|
39
|
+
dd {
|
|
40
|
+
a {
|
|
41
|
+
@include a.type(100);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include a.bp(lg) {
|
|
47
|
+
dd a {
|
|
48
|
+
@include a.type(200);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.small {
|
|
52
|
+
dd a {
|
|
53
|
+
@include a.type(200);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -15,7 +15,7 @@ interface Props {
|
|
|
15
15
|
const {
|
|
16
16
|
visited,
|
|
17
17
|
url = '',
|
|
18
|
-
data,
|
|
18
|
+
data = [],
|
|
19
19
|
compact = false,
|
|
20
20
|
headings = inject('headings', []),
|
|
21
21
|
} = defineProps<Props>()
|
|
@@ -77,7 +77,7 @@ defineExpose({ click })
|
|
|
77
77
|
>
|
|
78
78
|
</component>
|
|
79
79
|
<div class="download-list-item__icon-wrapper">
|
|
80
|
-
<UIcon name="
|
|
80
|
+
<UIcon name="check" class="download-list-item__check" />
|
|
81
81
|
|
|
82
82
|
<svg
|
|
83
83
|
class="download-list-item__download"
|
|
@@ -212,7 +212,7 @@ const onRemoveError = (filename: string, lastModified: number) => {
|
|
|
212
212
|
</div>
|
|
213
213
|
|
|
214
214
|
<div v-if="maxFileCountError" class="file-upload__max-files-error">
|
|
215
|
-
<UIcon name="
|
|
215
|
+
<UIcon name="alert-octagon" /> {{ getTranslation('maxFileCountAllowed', { $COUNT: 4 }) }}
|
|
216
216
|
</div>
|
|
217
217
|
</div>
|
|
218
218
|
</template>
|
package/components/index.js
CHANGED
|
@@ -70,3 +70,5 @@ export { default as USliderProgressAnimation } from './slider-progress-animation
|
|
|
70
70
|
export { default as UStickyCta } from './sticky-cta/u-sticky-cta.vue'
|
|
71
71
|
export { default as UNotificationItem } from './notification-item/u-notification-item.vue'
|
|
72
72
|
export { default as UNotificationList } from './notification-list/u-notification-list.vue'
|
|
73
|
+
export { default as UDefinitionList } from './definition-list/u-definition-list.vue'
|
|
74
|
+
export { default as UDefinitionListItem } from './definition-list-item/u-definition-list-item.vue'
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, watch, computed, useTemplateRef } from 'vue'
|
|
3
3
|
import { UIcon } from '../../elements'
|
|
4
|
+
import { UBadge } from '../../components'
|
|
5
|
+
import { Badge } from '../badge/u-badge.vue'
|
|
4
6
|
|
|
5
7
|
// TODO: Label animation when collapsed is a mess. Refactor it as soon as possbile!
|
|
6
8
|
|
|
7
9
|
interface Props {
|
|
8
10
|
label?: string
|
|
9
11
|
icon: string
|
|
12
|
+
badge?: Badge
|
|
10
13
|
href?: string
|
|
11
14
|
target?: string
|
|
12
15
|
active?: boolean
|
|
@@ -16,6 +19,7 @@ interface Props {
|
|
|
16
19
|
|
|
17
20
|
const {
|
|
18
21
|
label = '',
|
|
22
|
+
badge = undefined,
|
|
19
23
|
active = false,
|
|
20
24
|
collapsed = false,
|
|
21
25
|
labelHidden = false,
|
|
@@ -99,7 +103,11 @@ const tag = computed(() => {
|
|
|
99
103
|
@mouseenter="onHover"
|
|
100
104
|
@mouseleave="onHoverOut"
|
|
101
105
|
>
|
|
102
|
-
<
|
|
106
|
+
<UBadge v-if="badge" v-bind="badge">
|
|
107
|
+
<UIcon :name="icon" />
|
|
108
|
+
</UBadge>
|
|
109
|
+
<UIcon v-else :name="icon" />
|
|
110
|
+
|
|
103
111
|
<span ref="label" class="navigation-toolbar-link__label" :title="label">
|
|
104
112
|
<slot>{{ label }}</slot>
|
|
105
113
|
</span>
|
|
@@ -47,7 +47,7 @@ const onDislike = () => {
|
|
|
47
47
|
<template>
|
|
48
48
|
<div class="rating">
|
|
49
49
|
<button :class="['rating__button', 'up', { active: likeActive }]" type="button" @click="onLike">
|
|
50
|
-
<UIcon :name="likeActive ? 'thumbs-up-
|
|
50
|
+
<UIcon :name="likeActive ? 'thumbs-up-filled' : 'thumbs-up'" />
|
|
51
51
|
|
|
52
52
|
<span class="visually-hidden">
|
|
53
53
|
{{ likeText || getTranslation('like') }}
|
|
@@ -63,7 +63,7 @@ const onDislike = () => {
|
|
|
63
63
|
type="button"
|
|
64
64
|
@click="onDislike"
|
|
65
65
|
>
|
|
66
|
-
<UIcon :name="dislikeActive ? 'thumbs-down-
|
|
66
|
+
<UIcon :name="dislikeActive ? 'thumbs-down-filled' : 'thumbs-down'" />
|
|
67
67
|
|
|
68
68
|
<span class="visually-hidden">
|
|
69
69
|
{{ dislikeText || getTranslation('dislike') }}
|
|
@@ -132,7 +132,7 @@ onMounted(() => {
|
|
|
132
132
|
@click="onStepDown"
|
|
133
133
|
>
|
|
134
134
|
<span class="visually-hidden">{{ getTranslation('decreaseValue') }}</span>
|
|
135
|
-
<UIcon name="
|
|
135
|
+
<UIcon name="minus"></UIcon>
|
|
136
136
|
</button>
|
|
137
137
|
|
|
138
138
|
<button
|
|
@@ -144,7 +144,7 @@ onMounted(() => {
|
|
|
144
144
|
@click="onStepUp"
|
|
145
145
|
>
|
|
146
146
|
<span class="visually-hidden">{{ getTranslation('increaseValue') }}</span>
|
|
147
|
-
<UIcon name="
|
|
147
|
+
<UIcon name="plus"></UIcon>
|
|
148
148
|
</button>
|
|
149
149
|
</div>
|
|
150
150
|
|
|
@@ -31,7 +31,7 @@ const { onChange } = useRadio({ model, provideKey })
|
|
|
31
31
|
{ filled: model === value && !disabled, outlined: model !== value || disabled, disabled },
|
|
32
32
|
]"
|
|
33
33
|
>
|
|
34
|
-
<UIcon v-if="model === value" name="
|
|
34
|
+
<UIcon v-if="model === value" name="check" />
|
|
35
35
|
<slot name="label">
|
|
36
36
|
{{ label }}
|
|
37
37
|
</slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ref, useTemplateRef, onMounted } from 'vue'
|
|
2
|
+
import { ref, useTemplateRef, onMounted, useSlots } from 'vue'
|
|
3
3
|
import { UIconButton } from '../../elements'
|
|
4
4
|
import { UBadge } from '../../components'
|
|
5
5
|
|
|
@@ -9,12 +9,16 @@ interface Props {
|
|
|
9
9
|
|
|
10
10
|
defineProps<Props>()
|
|
11
11
|
|
|
12
|
+
const slots = useSlots()
|
|
12
13
|
const showFilters = ref(false)
|
|
13
14
|
const filtersEl = useTemplateRef('filters')
|
|
14
15
|
const filterCount = ref(0)
|
|
16
|
+
const noSearch = ref(false)
|
|
15
17
|
|
|
16
18
|
onMounted(() => {
|
|
17
19
|
filterCount.value = filtersEl.value.children.length
|
|
20
|
+
noSearch.value = !slots.search
|
|
21
|
+
showFilters.value = noSearch.value === true
|
|
18
22
|
})
|
|
19
23
|
</script>
|
|
20
24
|
|
|
@@ -22,13 +26,17 @@ onMounted(() => {
|
|
|
22
26
|
<div
|
|
23
27
|
:class="[
|
|
24
28
|
'search-filter',
|
|
25
|
-
{
|
|
29
|
+
{
|
|
30
|
+
'show-filters': showFilters,
|
|
31
|
+
'collapsed-desktop': filterCount + 1 >= 4,
|
|
32
|
+
'no-search': noSearch,
|
|
33
|
+
},
|
|
26
34
|
]"
|
|
27
35
|
:style="{
|
|
28
36
|
'--field-count': filterCount + 1,
|
|
29
37
|
}"
|
|
30
38
|
>
|
|
31
|
-
<div class="search-filter__search">
|
|
39
|
+
<div v-if="!noSearch" class="search-filter__search">
|
|
32
40
|
<slot name="search" />
|
|
33
41
|
|
|
34
42
|
<div class="search-filter__filter-toggle">
|
|
@@ -52,3 +60,17 @@ onMounted(() => {
|
|
|
52
60
|
</template>
|
|
53
61
|
|
|
54
62
|
<style scoped lang="scss" src="./search-filter.scss"></style>
|
|
63
|
+
|
|
64
|
+
<style lang="scss">
|
|
65
|
+
@use '../../base/abstracts' as a;
|
|
66
|
+
|
|
67
|
+
@include a.bp(m) {
|
|
68
|
+
.no-search {
|
|
69
|
+
.search-filter__filter {
|
|
70
|
+
.button {
|
|
71
|
+
width: fit-content;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</style>
|