@energie360/ui-library 0.1.16 → 0.1.18
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 +56 -0
- package/components/badge/u-badge.vue +47 -0
- package/components/card-contact/card-contact.scss +39 -0
- package/components/card-contact/u-card-contact.vue +44 -0
- package/components/card-cta-bar/card-cta-bar.scss +4 -0
- package/components/card-cta-bar/u-card-cta-bar.vue +24 -0
- package/components/card-cta-header/u-card-cta-header.vue +10 -7
- package/components/card-footer/u-card-footer.vue +5 -3
- package/components/card-group/u-card-group.vue +1 -1
- package/components/card-header/card-header.scss +29 -4
- package/components/card-header/u-card-header.vue +22 -3
- package/components/card-highlight/card-highlight.scss +70 -0
- package/components/card-highlight/u-card-highlight.vue +41 -0
- package/components/card-info/card-info.scss +40 -0
- package/components/card-info/u-card-info.vue +35 -0
- package/components/card-price-list/card-price-list.scss +39 -0
- package/components/card-price-list/u-card-price-list.vue +37 -0
- package/components/card-section/card-section.scss +21 -1
- package/components/card-section/u-card-section.vue +9 -1
- package/components/data-card/data-card.scss +34 -0
- package/components/data-card/u-data-card.vue +49 -0
- package/components/data-card-group/data-card-group.scss +12 -0
- package/components/data-card-group/u-data-card-group.vue +7 -0
- package/components/download-list/download-list.scss +58 -0
- package/components/download-list/u-download-list.vue +44 -0
- package/components/download-list-item/download-list-item.scss +267 -0
- package/components/download-list-item/u-download-list-item.vue +65 -0
- package/components/file-upload/file-list.scss +68 -0
- package/components/file-upload/file-upload.scss +119 -0
- package/components/file-upload/u-file-list.vue +55 -0
- package/components/file-upload/u-file-upload.vue +220 -0
- package/components/hint/hint.scss +67 -6
- package/components/hint/u-hint.vue +11 -1
- package/components/index.js +13 -0
- package/components/inline-edit/inline-edit.scss +5 -1
- package/components/inline-edit/u-inline-edit.vue +21 -12
- package/components/progress-avatar/u-progress-avatar.vue +27 -3
- package/components/richtext/richtext.scss +9 -2
- package/components/richtext/u-richtext.vue +3 -1
- package/components/search-group/search-group.scss +59 -0
- package/components/search-group/u-search-group.vue +32 -0
- package/components/skeleton-loader/skeleton-loader.scss +39 -0
- package/components/skeleton-loader/u-skeleton-loader.vue +28 -0
- package/components/table/cell-ctas.scss +1 -7
- package/components/table/cell-icon-text.scss +15 -4
- package/components/table/table-cell.mixins.scss +3 -2
- package/components/table/table-cell.scss +5 -0
- package/components/table/table-heading.scss +7 -0
- package/components/table/u-cell-ctas.vue +15 -6
- package/components/table/u-cell-icon-text.vue +13 -5
- package/components/table/u-table-cell.vue +3 -1
- package/components/table/u-table-heading.vue +2 -1
- package/components/tabs/tabs.scss +10 -1
- package/components/tabs/u-tabs.vue +64 -25
- package/dist/elements/form.css +170 -0
- package/dist/elements/form.css.map +1 -0
- package/dist/layout/form-grid.css +184 -0
- package/dist/layout/form-grid.css.map +1 -0
- package/dist/layout/split.css.map +1 -1
- package/elements/button/_button-plain-small-spaceless.scss +10 -0
- package/elements/button/button.scss +32 -0
- package/elements/button/u-button.vue +47 -4
- package/elements/form/form.scss +1 -1
- package/elements/form-field/form-field-base.scss +4 -0
- package/elements/form-field/form-field-prefix-suffix.scss +5 -0
- package/elements/select/u-select.vue +6 -6
- package/elements/text-field/text-field.scss +15 -0
- package/elements/text-field/text-field.types.ts +1 -0
- package/elements/text-field/u-text-field.vue +44 -8
- package/elements/toggle-switch/toggle-switch-small.scss +10 -0
- package/elements/toggle-switch/toggle-switch.scss +25 -21
- package/elements/toggle-switch/u-toggle-switch.vue +22 -12
- package/i18n/i18n.ts +32 -0
- package/layout/container/container.scss +18 -0
- package/layout/index.js +4 -0
- package/layout/portal/portal.scss +63 -0
- package/layout/portal/u-portal.vue +51 -0
- package/layout/settings/settings.scss +33 -0
- package/layout/settings/u-settings-layout.vue +19 -0
- package/layout/tile-grid/tile-grid.scss +13 -0
- package/layout/tile-grid/tile-item.scss +31 -0
- package/layout/tile-grid/u-tile-grid.vue +7 -0
- package/layout/tile-grid/u-tile-item.vue +15 -0
- package/modules/content-title/content-title.scss +43 -0
- package/modules/content-title/u-content-title.vue +19 -0
- package/modules/dialog/_animations.scss +49 -0
- package/modules/dialog/dialog.scss +172 -0
- package/modules/dialog/u-dialog.vue +139 -0
- package/modules/footer/footer.scss +8 -1
- package/modules/footer/u-footer.vue +1 -1
- package/modules/index.js +3 -0
- package/modules/inline-edit-group/u-inline-edit-group.vue +2 -0
- package/modules/search-filter/search-filter.scss +106 -0
- package/modules/search-filter/u-search-filter.vue +54 -0
- package/package.json +3 -1
- package/utility/elements/form.scss +1 -0
- package/utility/layout/form-grid.scss +1 -0
- package/utils/array/intersect.js +7 -0
- package/utils/functions/breakpoint.js +4 -9
- package/utils/functions/format-bytes.js +17 -0
- package/utils/global/mime-types.js +8 -0
- package/utils/translations/translate.js +10 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../base/abstracts
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
2
|
|
|
3
3
|
.card-section {
|
|
4
4
|
padding: var(--e-space-6);
|
|
@@ -10,4 +10,24 @@
|
|
|
10
10
|
@include a.bp(s) {
|
|
11
11
|
padding: var(--e-space-4);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
// Modifiers
|
|
15
|
+
&.full-height {
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Handle special case
|
|
20
|
+
&:has(.card-cta-bar) {
|
|
21
|
+
margin-top: auto; // We assume it is the bottom section, like in a card-tile configuration.
|
|
22
|
+
flex: 0; // Force this section to keep minimal height.
|
|
23
|
+
padding: var(--e-space-4) var(--e-space-6);
|
|
24
|
+
|
|
25
|
+
@include a.bp(m) {
|
|
26
|
+
padding: var(--e-space-4) var(--e-space-5);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include a.bp(s) {
|
|
30
|
+
padding: var(--e-space-4);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
13
33
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
fullHeight?: boolean
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
defineProps<Props>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
1
9
|
<template>
|
|
2
|
-
<div class="card-section">
|
|
10
|
+
<div :class="['card-section', { 'full-height': fullHeight }]">
|
|
3
11
|
<slot></slot>
|
|
4
12
|
</div>
|
|
5
13
|
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.data-card {
|
|
4
|
+
padding: var(--e-space-4);
|
|
5
|
+
border: 1px solid var(--e-c-mono-200);
|
|
6
|
+
border-radius: var(--e-brd-radius-2);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.data-card__main {
|
|
10
|
+
display: flex;
|
|
11
|
+
column-gap: var(--e-space-2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.data-card__list {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
row-gap: var(--e-space-2);
|
|
18
|
+
flex: 1 0 auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.data-card__heading {
|
|
22
|
+
@include a.type(100, strong);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.data-card__value {
|
|
26
|
+
@include a.type(100);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.data-card__ctas {
|
|
30
|
+
display: flex;
|
|
31
|
+
column-gap: var(--e-space-4);
|
|
32
|
+
align-items: flex-start;
|
|
33
|
+
margin-top: var(--e-space-4);
|
|
34
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// TODO: add possibility to add items via slot
|
|
3
|
+
interface dataItem {
|
|
4
|
+
heading: string
|
|
5
|
+
value: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
data?: dataItem[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
defineProps<Props>()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div class="data-card">
|
|
17
|
+
<div class="data-card__main">
|
|
18
|
+
<dl class="data-card__list">
|
|
19
|
+
<slot>
|
|
20
|
+
<div v-for="(item, idx) in data" :key="idx">
|
|
21
|
+
<dt class="data-card__heading">{{ item.heading }}</dt>
|
|
22
|
+
<dd class="data-card__value" v-html="item.value"></dd>
|
|
23
|
+
</div>
|
|
24
|
+
</slot>
|
|
25
|
+
</dl>
|
|
26
|
+
|
|
27
|
+
<div v-if="$slots.aside" class="data-card__aside-column">
|
|
28
|
+
<slot name="aside" />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div v-if="$slots.ctas" class="data-card__ctas">
|
|
33
|
+
<slot name="ctas" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<style scoped lang="scss" src="./data-card.scss"></style>
|
|
39
|
+
<style scoped lang="scss">
|
|
40
|
+
@use '../../base/abstracts' as a;
|
|
41
|
+
|
|
42
|
+
:slotted(dt) {
|
|
43
|
+
@include a.type(100, strong);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:slotted(dd) {
|
|
47
|
+
@include a.type(100);
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
@use '../../base/accessibility';
|
|
3
|
+
|
|
4
|
+
.download-list {
|
|
5
|
+
margin-top: calc(var(--e-space-2) * -1);
|
|
6
|
+
margin-bottom: calc(var(--e-space-2) * -1);
|
|
7
|
+
border-collapse: separate;
|
|
8
|
+
border-spacing: 0 var(--e-space-2);
|
|
9
|
+
width: 100%;
|
|
10
|
+
|
|
11
|
+
thead {
|
|
12
|
+
@include a.bp(lg) {
|
|
13
|
+
@include a.visually-hidden;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
tbody {
|
|
18
|
+
@include a.bp(lg) {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
row-gap: var(--e-space-2);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include a.bp(lg) {
|
|
26
|
+
display: block;
|
|
27
|
+
width: 100%;
|
|
28
|
+
border-collapse: collapse;
|
|
29
|
+
border-spacing: 0;
|
|
30
|
+
margin-top: 0;
|
|
31
|
+
margin-bottom: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.download-list__heading {
|
|
35
|
+
@include a.type(200, strong);
|
|
36
|
+
|
|
37
|
+
padding: var(--e-space-4) var(--e-space-6) var(--e-space-3);
|
|
38
|
+
text-align: left;
|
|
39
|
+
|
|
40
|
+
+ .download-list__heading {
|
|
41
|
+
padding-left: var(--e-space-2);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Variants
|
|
46
|
+
&.compact {
|
|
47
|
+
.download-list__heading {
|
|
48
|
+
@include a.type(100, strong);
|
|
49
|
+
|
|
50
|
+
padding-left: var(--e-space-4);
|
|
51
|
+
padding-right: var(--e-space-4);
|
|
52
|
+
|
|
53
|
+
+ .download-list__heading {
|
|
54
|
+
padding-left: var(--e-space-2);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provide, ref, watch } from 'vue'
|
|
3
|
+
import { getTranslation } from '../../utils/translations/translate'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
headings: string[]
|
|
7
|
+
compact?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { headings, compact = false } = defineProps<Props>()
|
|
11
|
+
|
|
12
|
+
const isCompact = ref(compact)
|
|
13
|
+
|
|
14
|
+
provide('headings', headings)
|
|
15
|
+
provide('compact', isCompact)
|
|
16
|
+
|
|
17
|
+
watch(
|
|
18
|
+
() => compact,
|
|
19
|
+
(n) => {
|
|
20
|
+
isCompact.value = n
|
|
21
|
+
},
|
|
22
|
+
)
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<table :class="['download-list', { compact }]">
|
|
27
|
+
<thead>
|
|
28
|
+
<tr>
|
|
29
|
+
<th v-for="(heading, idx) in headings" :key="idx" class="download-list__heading">
|
|
30
|
+
{{ heading }}
|
|
31
|
+
</th>
|
|
32
|
+
<th class="download-list__heading">
|
|
33
|
+
<span class="visually-hidden">{{ getTranslation('download') }}</span>
|
|
34
|
+
</th>
|
|
35
|
+
</tr>
|
|
36
|
+
</thead>
|
|
37
|
+
|
|
38
|
+
<tbody>
|
|
39
|
+
<slot></slot>
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<style scoped lang="scss" src="./download-list.scss"></style>
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.download-list-item {
|
|
4
|
+
@keyframes arrow-anim {
|
|
5
|
+
0% {
|
|
6
|
+
transform: translateY(-30%);
|
|
7
|
+
opacity: 0.2;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
80% {
|
|
11
|
+
transform: translateY(0);
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
100% {
|
|
16
|
+
transform: translateY(2%);
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes hide-download {
|
|
22
|
+
0% {
|
|
23
|
+
transform: none;
|
|
24
|
+
transform-origin: bottom center;
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
transform: rotate(60deg);
|
|
30
|
+
transform-origin: bottom center;
|
|
31
|
+
opacity: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes show-check {
|
|
36
|
+
0% {
|
|
37
|
+
transform: rotate(-60deg);
|
|
38
|
+
transform-origin: bottom center;
|
|
39
|
+
opacity: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
100% {
|
|
43
|
+
transform: rotate(0);
|
|
44
|
+
transform-origin: bottom center;
|
|
45
|
+
opacity: 1;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
position: relative;
|
|
50
|
+
transform: scale(1); // Safari hack
|
|
51
|
+
height: a.rem(64);
|
|
52
|
+
transition: background-color a.$trs-default;
|
|
53
|
+
|
|
54
|
+
&:focus-within {
|
|
55
|
+
.download-list-item__cell {
|
|
56
|
+
background: var(--e-c-secondary-01-100);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.visited {
|
|
61
|
+
.download-list-item__cell {
|
|
62
|
+
background: var(--e-c-mono-50);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.download-list-item__link:hover {
|
|
66
|
+
border-color: transparent;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.download-list-item__check {
|
|
70
|
+
animation-name: show-check;
|
|
71
|
+
animation-duration: var(--e-trs-duration-fast);
|
|
72
|
+
animation-fill-mode: forwards;
|
|
73
|
+
animation-timing-function: ease-out;
|
|
74
|
+
animation-iteration-count: 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.download-list-item__download {
|
|
78
|
+
animation-name: hide-download;
|
|
79
|
+
animation-duration: var(--e-trs-duration-fast);
|
|
80
|
+
animation-fill-mode: forwards;
|
|
81
|
+
animation-timing-function: ease-out;
|
|
82
|
+
animation-iteration-count: 1;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include a.bp(lg) {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-auto-flow: column;
|
|
89
|
+
grid-template-columns: 1fr 1fr a.rem(96);
|
|
90
|
+
grid-template-rows: repeat(var(--rows), auto);
|
|
91
|
+
row-gap: var(--e-space-2);
|
|
92
|
+
column-gap: var(--e-space-4);
|
|
93
|
+
height: auto;
|
|
94
|
+
padding: var(--e-space-5) var(--e-space-6);
|
|
95
|
+
background: var(--e-c-secondary-01-50);
|
|
96
|
+
border-radius: var(--e-brd-radius-2);
|
|
97
|
+
|
|
98
|
+
&:focus-within {
|
|
99
|
+
background-color: var(--e-c-secondary-01-100);
|
|
100
|
+
|
|
101
|
+
.download-list-item__cell {
|
|
102
|
+
background: transparent;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.visited {
|
|
107
|
+
background: var(--e-c-mono-50);
|
|
108
|
+
|
|
109
|
+
.download-list-item__cell {
|
|
110
|
+
background: none;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include a.bp(m) {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
padding-right: a.rem(96);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.download-list-item__cell {
|
|
123
|
+
@include a.type(200);
|
|
124
|
+
|
|
125
|
+
padding: var(--e-space-5) var(--e-space-6);
|
|
126
|
+
background-color: var(--e-c-secondary-01-50);
|
|
127
|
+
transition: background-color a.$trs-default;
|
|
128
|
+
|
|
129
|
+
+ .download-list-item__cell {
|
|
130
|
+
padding-left: var(--e-space-2);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:first-child {
|
|
134
|
+
border-bottom-left-radius: var(--e-brd-radius-2);
|
|
135
|
+
border-top-left-radius: var(--e-brd-radius-2);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:last-child {
|
|
139
|
+
border-bottom-right-radius: var(--e-brd-radius-2);
|
|
140
|
+
border-top-right-radius: var(--e-brd-radius-2);
|
|
141
|
+
padding-top: var(--e-space-2);
|
|
142
|
+
padding-bottom: var(--e-space-2);
|
|
143
|
+
width: 0; // Force this cell to have width of content.
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@include a.bp(lg) {
|
|
147
|
+
@include a.type(100);
|
|
148
|
+
|
|
149
|
+
background-color: transparent;
|
|
150
|
+
|
|
151
|
+
&,
|
|
152
|
+
+ .download-list-item__cell,
|
|
153
|
+
&:last-child {
|
|
154
|
+
padding: 0;
|
|
155
|
+
width: auto;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.cta {
|
|
159
|
+
position: absolute;
|
|
160
|
+
inset: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.download-list-item__link {
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 0;
|
|
168
|
+
left: 0;
|
|
169
|
+
width: 100%;
|
|
170
|
+
height: 100%;
|
|
171
|
+
border-radius: var(--e-brd-radius-2);
|
|
172
|
+
border: 2px solid transparent;
|
|
173
|
+
transition: border a.$trs-default;
|
|
174
|
+
|
|
175
|
+
&:hover {
|
|
176
|
+
border: 2px solid var(--e-c-secondary-01-100);
|
|
177
|
+
|
|
178
|
+
~ * .download {
|
|
179
|
+
animation-name: arrow-anim;
|
|
180
|
+
animation-delay: 100ms;
|
|
181
|
+
animation-duration: var(--e-trs-duration-slowest);
|
|
182
|
+
animation-timing-function: ease-out;
|
|
183
|
+
animation-iteration-count: infinite;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.download-list-item__icon-wrapper {
|
|
189
|
+
display: flex;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
align-items: center;
|
|
192
|
+
margin-left: auto;
|
|
193
|
+
width: var(--e-space-12);
|
|
194
|
+
height: var(--e-space-12);
|
|
195
|
+
position: relative;
|
|
196
|
+
pointer-events: none;
|
|
197
|
+
|
|
198
|
+
.download-list-item__download {
|
|
199
|
+
position: absolute;
|
|
200
|
+
width: a.rem(24);
|
|
201
|
+
height: a.rem(24);
|
|
202
|
+
fill: var(--e-c-primary-01-700);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.download-list-item__check {
|
|
206
|
+
opacity: 0;
|
|
207
|
+
position: absolute;
|
|
208
|
+
color: var(--e-c-secondary-05-500);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@include a.bp(lg) {
|
|
212
|
+
position: absolute;
|
|
213
|
+
right: var(--e-space-4);
|
|
214
|
+
top: 50%;
|
|
215
|
+
transform: translateY(-50%);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@include a.bp(m) {
|
|
219
|
+
top: a.rem(8);
|
|
220
|
+
transform: none;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.download-list-item__cell-heading {
|
|
225
|
+
@include a.type(50, strong);
|
|
226
|
+
|
|
227
|
+
display: none;
|
|
228
|
+
margin-right: var(--e-space-2);
|
|
229
|
+
|
|
230
|
+
@include a.bp(lg) {
|
|
231
|
+
display: inline-block;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Variants
|
|
236
|
+
.download-list-item.compact {
|
|
237
|
+
height: a.rem(56);
|
|
238
|
+
row-gap: var(--e-space-1);
|
|
239
|
+
|
|
240
|
+
.download-list-item__cell {
|
|
241
|
+
@include a.type(100);
|
|
242
|
+
|
|
243
|
+
padding: var(--e-space-4);
|
|
244
|
+
|
|
245
|
+
+ .download-list-item__cell {
|
|
246
|
+
padding-left: var(--e-space-2);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:last-child {
|
|
250
|
+
padding-top: var(--e-space-1);
|
|
251
|
+
padding-bottom: var(--e-space-1);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@include a.bp(lg) {
|
|
256
|
+
height: auto;
|
|
257
|
+
padding: var(--e-space-4);
|
|
258
|
+
|
|
259
|
+
.download-list-item__cell {
|
|
260
|
+
&,
|
|
261
|
+
+ .download-list-item__cell,
|
|
262
|
+
&:last-child {
|
|
263
|
+
padding: 0;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed, inject } from 'vue'
|
|
3
|
+
import { UIcon } from '../../elements'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
data: string[]
|
|
7
|
+
url: string
|
|
8
|
+
compact?: boolean
|
|
9
|
+
headings?: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { data, compact = false, headings = inject('headings', []) } = defineProps<Props>()
|
|
13
|
+
|
|
14
|
+
const visited = ref(false)
|
|
15
|
+
const isCompact = inject('compact', compact)
|
|
16
|
+
const label = computed(() => data.join(', '))
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<tr
|
|
21
|
+
:class="['download-list-item', { visited, compact: isCompact }]"
|
|
22
|
+
:style="{ '--rows': Math.round(data.length / 2) }"
|
|
23
|
+
>
|
|
24
|
+
<td v-for="(cell, idx) in data" :key="idx" class="download-list-item__cell">
|
|
25
|
+
<span class="download-list-item__cell-heading" aria-hidden="true">
|
|
26
|
+
{{ headings[idx] }}
|
|
27
|
+
</span>
|
|
28
|
+
{{ cell }}
|
|
29
|
+
</td>
|
|
30
|
+
|
|
31
|
+
<td class="download-list-item__cell cta">
|
|
32
|
+
<a
|
|
33
|
+
class="download-list-item__link"
|
|
34
|
+
:href="url"
|
|
35
|
+
target="_blank"
|
|
36
|
+
download
|
|
37
|
+
:aria-label="label"
|
|
38
|
+
@click="visited = true"
|
|
39
|
+
>
|
|
40
|
+
</a>
|
|
41
|
+
<div class="download-list-item__icon-wrapper">
|
|
42
|
+
<UIcon name="mini-check" class="download-list-item__check" />
|
|
43
|
+
|
|
44
|
+
<svg
|
|
45
|
+
class="download-list-item__download"
|
|
46
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
47
|
+
viewBox="0 0 24 24"
|
|
48
|
+
aria-hidden="true"
|
|
49
|
+
>
|
|
50
|
+
<g clip-path="url(#a)">
|
|
51
|
+
<path
|
|
52
|
+
d="M6 20q-.824 0-1.412-.587A1.93 1.93 0 0 1 4 18v-3h2v3h12v-3h2v3q0 .824-.587 1.413A1.93 1.93 0 0 1 18 20z"
|
|
53
|
+
/>
|
|
54
|
+
<path class="download" d="m12 16-5-5 1.4-1.45 2.6 2.6V4h2v8.15l2.6-2.6L17 11z" />
|
|
55
|
+
</g>
|
|
56
|
+
<defs>
|
|
57
|
+
<clipPath id="a"><path d="M0 0h24v24H0z" /></clipPath>
|
|
58
|
+
</defs>
|
|
59
|
+
</svg>
|
|
60
|
+
</div>
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style scoped lang="scss" src="./download-list-item.scss"></style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
|
|
3
|
+
.file-list__item {
|
|
4
|
+
@include a.type(200);
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: a.rem(64);
|
|
9
|
+
padding-left: var(--e-space-4);
|
|
10
|
+
padding-right: var(--e-space-2);
|
|
11
|
+
column-gap: var(--e-space-4);
|
|
12
|
+
background-color: var(--e-c-mono-50);
|
|
13
|
+
border: 1px solid var(--e-c-mono-100);
|
|
14
|
+
border-radius: var(--e-brd-radius-1);
|
|
15
|
+
|
|
16
|
+
+ .file-list__item {
|
|
17
|
+
margin-top: var(--e-space-3);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.error {
|
|
21
|
+
border-color: var(--e-c-signal-03-100);
|
|
22
|
+
background-color: rgb(var(--e-c-signal-03-100-rgb), 0.2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include a.bp(m) {
|
|
26
|
+
height: a.rem(72);
|
|
27
|
+
padding: var(--e-space-3) var(--e-space-2) var(--e-space-3) var(--e-space-3);
|
|
28
|
+
|
|
29
|
+
.file-list__item-content {
|
|
30
|
+
flex: 0 1 auto;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.file-list__item-name {
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
display: block;
|
|
37
|
+
margin-right: 0;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.file-list__item-name {
|
|
45
|
+
margin-right: var(--e-space-2);
|
|
46
|
+
font-weight: bold;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.file-list__item-error {
|
|
50
|
+
@include a.type(100, strong);
|
|
51
|
+
|
|
52
|
+
color: var(--e-c-signal-03-700);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.file-list__file-cta {
|
|
56
|
+
margin-left: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// TransitonGroup animation
|
|
60
|
+
.list-enter-active,
|
|
61
|
+
.list-leave-active {
|
|
62
|
+
transition: all a.$trs-default;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.list-enter-from,
|
|
66
|
+
.list-leave-to {
|
|
67
|
+
opacity: 0;
|
|
68
|
+
}
|