@energie360/ui-library 0.1.20 → 0.1.22
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/u-badge.vue +9 -1
- package/components/card/card.scss +3 -1
- package/components/card/u-card.vue +1 -3
- package/components/card-cta-header/u-card-cta-header.vue +1 -1
- package/components/card-footer/u-card-footer.vue +1 -1
- package/components/card-highlight/card-highlight.scss +38 -44
- package/components/card-highlight/u-card-highlight.vue +16 -9
- package/components/chip/chip.scss +2 -2
- package/components/chip/u-chip.vue +2 -2
- package/components/collapsible/u-collapsible.vue +1 -1
- package/components/context-menu-link/u-context-menu-link.vue +2 -2
- package/components/data-card/data-card.scss +4 -4
- package/components/data-card/u-data-card.vue +4 -4
- package/components/download-list-item/download-list-item.scss +22 -1
- package/components/download-list-item/u-download-list-item.vue +46 -8
- package/components/hint/u-hint.vue +1 -1
- package/components/navigation-panel-tile/u-navigation-panel-tile.vue +5 -1
- package/components/navigation-toolbar-link/navigation-toolbar-link.scss +9 -1
- package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +1 -0
- package/components/panel/u-panel.vue +1 -1
- package/components/progress-avatar/u-progress-avatar.vue +4 -4
- package/components/richtext/u-richtext.vue +1 -1
- package/components/table/cell-ctas.scss +1 -0
- package/components/table/u-cell-icon-group.vue +9 -1
- package/components/table/u-cell-progress-bar.vue +1 -1
- package/components/table/u-table-cell.vue +1 -0
- package/components/table/u-table-heading.vue +3 -5
- package/components/tabs/u-tabs.vue +10 -4
- package/components/text-block/u-text-block.vue +1 -1
- package/components/welcome/u-welcome.vue +21 -10
- package/components/welcome/welcome.scss +36 -13
- package/dist/base-style.css +23 -22
- package/dist/base-style.css.map +1 -1
- package/elements/button/_button-plain.scss +7 -10
- package/elements/button/u-button.vue +9 -4
- package/elements/button-chip/u-button-chip.vue +13 -7
- package/elements/checkbox/u-checkbox.vue +1 -1
- package/elements/icon-button/u-icon-button.vue +1 -1
- package/elements/numeric-stepper/u-numeric-stepper.vue +1 -1
- package/elements/select-chip/u-select-chip.vue +4 -1
- package/elements/text-field/u-text-field.vue +9 -3
- package/elements/textarea/u-textarea.vue +1 -0
- package/elements/toggle-switch/u-toggle-switch.vue +1 -0
- package/layout/index.js +2 -1
- package/layout/portal/portal.scss +26 -42
- package/layout/portal/u-portal.vue +13 -34
- package/layout/portal-main/portal-main.scss +98 -0
- package/layout/portal-main/u-portal-main.vue +37 -0
- package/layout/tile-grid/u-tile-item.vue +7 -0
- package/modules/dialog/u-dialog.vue +16 -6
- package/modules/index.js +1 -2
- package/modules/navigation-panel/navigation-panel.scss +12 -1
- package/modules/toast/u-toast.vue +6 -0
- package/package.json +7 -7
- package/wizard/wizard-outro/u-wizard-outro.vue +1 -1
|
@@ -11,7 +11,15 @@ interface Props {
|
|
|
11
11
|
right?: number
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const {
|
|
14
|
+
const {
|
|
15
|
+
value = undefined,
|
|
16
|
+
state = undefined,
|
|
17
|
+
top = 0,
|
|
18
|
+
right = 0,
|
|
19
|
+
color = 'var(--e-c-mono-900)',
|
|
20
|
+
type = 'default',
|
|
21
|
+
show = true,
|
|
22
|
+
} = defineProps<Props>()
|
|
15
23
|
</script>
|
|
16
24
|
|
|
17
25
|
<template>
|
|
@@ -4,83 +4,77 @@
|
|
|
4
4
|
container: card-highlight / inline-size;
|
|
5
5
|
height: 100%;
|
|
6
6
|
|
|
7
|
-
@container
|
|
7
|
+
@container (width <= 650px) {
|
|
8
|
+
.card-highlight {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
.card-highlight__image-col {
|
|
9
|
-
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.card-highlight__chip {
|
|
18
|
+
// Forces child element (<UChip>) to be full-width.
|
|
19
|
+
display: grid;
|
|
20
|
+
width: 100%;
|
|
10
21
|
}
|
|
11
22
|
}
|
|
12
23
|
}
|
|
13
24
|
|
|
14
25
|
.card-highlight {
|
|
15
26
|
position: relative;
|
|
16
|
-
display:
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: 1fr auto;
|
|
29
|
+
grid-template-rows: 1fr auto;
|
|
30
|
+
grid-column-gap: var(--e-space-4);
|
|
31
|
+
grid-row-gap: var(--e-space-4);
|
|
32
|
+
padding: var(--e-space-6);
|
|
17
33
|
border: 1px solid var(--e-c-primary-01-100);
|
|
18
34
|
border-radius: var(--e-brd-radius-2);
|
|
19
35
|
background-color: var(--e-c-primary-01-50);
|
|
20
|
-
padding: var(--e-space-6);
|
|
21
|
-
gap: var(--e-space-4);
|
|
22
36
|
height: 100%;
|
|
23
|
-
|
|
37
|
+
}
|
|
24
38
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
39
|
+
.card-highlight__title {
|
|
40
|
+
@include a.type(300, strong);
|
|
28
41
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
43
|
+
color: var(--e-c-secondary-01-950);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.card-highlight__image-col {
|
|
47
|
+
grid-area: 1 / 2 / 3 / 3;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
32
50
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
align-items: flex-start;
|
|
51
|
+
img {
|
|
52
|
+
max-height: a.rem(225);
|
|
36
53
|
}
|
|
37
54
|
}
|
|
38
55
|
|
|
56
|
+
.card-highlight__content-col {
|
|
57
|
+
grid-area: 2 / 1 / 3 / 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
39
60
|
.card-highlight__content-col {
|
|
40
61
|
display: flex;
|
|
41
62
|
flex-direction: column;
|
|
42
63
|
align-items: flex-start;
|
|
43
64
|
row-gap: var(--e-space-4);
|
|
44
|
-
|
|
45
|
-
@include a.bp(m) {
|
|
46
|
-
width: calc(100% - 40px);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.card-highlight__title {
|
|
51
|
-
@include a.type(300, strong);
|
|
52
|
-
|
|
53
|
-
color: var(--e-c-secondary-01-950);
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
.card-highlight__text {
|
|
57
68
|
@include a.type(200);
|
|
58
69
|
|
|
59
|
-
margin-top: auto;
|
|
60
70
|
color: var(--e-c-secondary-01-900);
|
|
61
71
|
}
|
|
62
72
|
|
|
63
|
-
.card-highlight__image-col {
|
|
64
|
-
flex: 1 1 auto;
|
|
65
|
-
max-width: 60%;
|
|
66
|
-
align-self: center;
|
|
67
|
-
display: flex;
|
|
68
|
-
justify-content: flex-end;
|
|
69
|
-
|
|
70
|
-
img {
|
|
71
|
-
max-height: a.rem(225);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@include a.bp(m) {
|
|
75
|
-
max-width: none;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
73
|
.card-highlight__badge-icon {
|
|
80
74
|
position: absolute;
|
|
81
75
|
padding: 5px;
|
|
82
|
-
top: var(--e-space-
|
|
83
|
-
right: var(--e-space-
|
|
76
|
+
top: var(--e-space-5);
|
|
77
|
+
right: var(--e-space-5);
|
|
84
78
|
background-color: var(--e-c-mono-00);
|
|
85
79
|
color: var(--e-c-secondary-01-950);
|
|
86
80
|
border-radius: 100%;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { Chip } from '../chip/u-chip.vue'
|
|
2
3
|
import { Image } from '../../elements/types'
|
|
3
4
|
import { UIcon } from '../../elements'
|
|
5
|
+
import { UChip } from '../'
|
|
4
6
|
|
|
5
7
|
interface Props {
|
|
6
8
|
title?: string
|
|
7
9
|
text?: string
|
|
8
10
|
image?: Image
|
|
9
11
|
badgeIcon?: string
|
|
12
|
+
chip?: Chip
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
defineProps<Props>()
|
|
@@ -15,22 +18,26 @@ defineProps<Props>()
|
|
|
15
18
|
<template>
|
|
16
19
|
<div class="card-highlight-container">
|
|
17
20
|
<div class="card-highlight">
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
<h3 v-if="$slots.title || title" class="card-highlight__title">
|
|
22
|
+
<slot name="title">{{ title }}</slot>
|
|
23
|
+
</h3>
|
|
24
|
+
|
|
25
|
+
<div v-if="$slots.image || image" class="card-highlight__image-col" aria-hidden="true">
|
|
26
|
+
<slot name="image">
|
|
27
|
+
<img v-bind="image" />
|
|
28
|
+
</slot>
|
|
29
|
+
</div>
|
|
22
30
|
|
|
31
|
+
<div class="card-highlight__content-col">
|
|
23
32
|
<div v-if="$slots.text || text" class="card-highlight__text">
|
|
24
33
|
<slot name="text">
|
|
25
34
|
<div v-html="text"></div>
|
|
26
35
|
</slot>
|
|
27
36
|
</div>
|
|
28
|
-
</div>
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<img v-bind="image" />
|
|
38
|
+
<div v-if="$slots.info || chip" class="card-highlight__chip">
|
|
39
|
+
<slot name="info">
|
|
40
|
+
<UChip v-bind="chip"></UChip>
|
|
34
41
|
</slot>
|
|
35
42
|
</div>
|
|
36
43
|
</div>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
background-color: var(--e-c-mono-50);
|
|
5
5
|
border: 1px solid var(--e-c-mono-200);
|
|
6
6
|
border-radius: var(--e-brd-radius-2);
|
|
7
|
-
padding: var(--e-space-1_5) var(--e-space-
|
|
8
|
-
display: flex;
|
|
7
|
+
padding: var(--e-space-1_5) var(--e-space-3);
|
|
8
|
+
display: inline-flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
column-gap: var(--e-space-1);
|
|
11
11
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { UIcon } from '../../elements'
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface Chip {
|
|
5
5
|
caption?: string
|
|
6
6
|
label?: string
|
|
7
7
|
icon?: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
defineProps<
|
|
10
|
+
defineProps<Chip>()
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<template>
|
|
@@ -10,7 +10,7 @@ interface Props {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const cId = useId()
|
|
13
|
-
const { level = 3, expanded = false } = defineProps<Props>()
|
|
13
|
+
const { header = '', panel = '', level = 3, expanded = false } = defineProps<Props>()
|
|
14
14
|
|
|
15
15
|
// Initial state
|
|
16
16
|
const panelHidden = ref(!expanded)
|
|
@@ -10,7 +10,7 @@ interface Props {
|
|
|
10
10
|
active?: boolean
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const { href, active = false } = defineProps<Props>()
|
|
13
|
+
const { label = '', href = '', target = '', active = false } = defineProps<Props>()
|
|
14
14
|
|
|
15
15
|
const tag = computed(() => {
|
|
16
16
|
return href ? 'a' : 'span'
|
|
@@ -18,7 +18,7 @@ const tag = computed(() => {
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<component :is="tag" class="context-menu-link" :class="{ active }">
|
|
21
|
+
<component :is="tag" class="context-menu-link" :class="{ active }" :href :target>
|
|
22
22
|
<UIcon :name="icon" />
|
|
23
23
|
<slot>{{ label }}</slot>
|
|
24
24
|
</component>
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
border-radius: var(--e-brd-radius-2);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.data-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
.data-card__aside-column {
|
|
10
|
+
float: right;
|
|
11
|
+
margin-left: var(--e-space-2);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.data-card__list {
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
.data-card__ctas {
|
|
30
30
|
display: flex;
|
|
31
31
|
column-gap: var(--e-space-4);
|
|
32
|
-
align-items: flex-start;
|
|
33
32
|
margin-top: var(--e-space-4);
|
|
33
|
+
line-height: 0;
|
|
34
34
|
}
|
|
@@ -15,6 +15,10 @@ defineProps<Props>()
|
|
|
15
15
|
<template>
|
|
16
16
|
<div class="data-card">
|
|
17
17
|
<div class="data-card__main">
|
|
18
|
+
<div v-if="$slots.aside" class="data-card__aside-column">
|
|
19
|
+
<slot name="aside" />
|
|
20
|
+
</div>
|
|
21
|
+
|
|
18
22
|
<dl class="data-card__list">
|
|
19
23
|
<slot>
|
|
20
24
|
<div v-for="(item, idx) in data" :key="idx">
|
|
@@ -23,10 +27,6 @@ defineProps<Props>()
|
|
|
23
27
|
</div>
|
|
24
28
|
</slot>
|
|
25
29
|
</dl>
|
|
26
|
-
|
|
27
|
-
<div v-if="$slots.aside" class="data-card__aside-column">
|
|
28
|
-
<slot name="aside" />
|
|
29
|
-
</div>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<div v-if="$slots.ctas" class="data-card__ctas">
|
|
@@ -57,6 +57,24 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
&.loading {
|
|
61
|
+
pointer-events: none;
|
|
62
|
+
|
|
63
|
+
.download-list-item__cell {
|
|
64
|
+
color: var(--e-c-mono-500);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.download-list-item__link {
|
|
68
|
+
~ * .download {
|
|
69
|
+
animation-name: arrow-anim;
|
|
70
|
+
animation-delay: 100ms;
|
|
71
|
+
animation-duration: var(--e-trs-duration-slowest);
|
|
72
|
+
animation-timing-function: ease-out;
|
|
73
|
+
animation-iteration-count: infinite;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
60
78
|
&.visited {
|
|
61
79
|
.download-list-item__cell {
|
|
62
80
|
background: var(--e-c-mono-50);
|
|
@@ -124,7 +142,9 @@
|
|
|
124
142
|
|
|
125
143
|
padding: var(--e-space-5) var(--e-space-6);
|
|
126
144
|
background-color: var(--e-c-secondary-01-50);
|
|
127
|
-
transition:
|
|
145
|
+
transition:
|
|
146
|
+
background-color a.$trs-default,
|
|
147
|
+
color a.$trs-default;
|
|
128
148
|
|
|
129
149
|
+ .download-list-item__cell {
|
|
130
150
|
padding-left: var(--e-space-2);
|
|
@@ -171,6 +191,7 @@
|
|
|
171
191
|
border-radius: var(--e-brd-radius-2);
|
|
172
192
|
border: 2px solid transparent;
|
|
173
193
|
transition: border a.$trs-default;
|
|
194
|
+
cursor: pointer;
|
|
174
195
|
|
|
175
196
|
&:hover {
|
|
176
197
|
border: 2px solid var(--e-c-secondary-01-100);
|
|
@@ -1,24 +1,59 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { computed, inject, useTemplateRef, ref, watch } from 'vue'
|
|
3
3
|
import { UIcon } from '../../elements'
|
|
4
|
+
import { getCurrentInstance } from 'vue'
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
data: string[]
|
|
7
|
-
url
|
|
8
|
+
url?: string
|
|
8
9
|
compact?: boolean
|
|
9
10
|
headings?: string[]
|
|
11
|
+
visited?: boolean
|
|
12
|
+
loading?: boolean
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
visited,
|
|
17
|
+
url = '',
|
|
18
|
+
data,
|
|
19
|
+
compact = false,
|
|
20
|
+
headings = inject('headings', []),
|
|
21
|
+
} = defineProps<Props>()
|
|
13
22
|
|
|
14
|
-
const
|
|
23
|
+
const linkRef = useTemplateRef('link')
|
|
24
|
+
const instance = getCurrentInstance()
|
|
25
|
+
const emit = defineEmits(['click'])
|
|
15
26
|
const isCompact = inject('compact', compact)
|
|
27
|
+
const isVisited = ref(false)
|
|
16
28
|
const label = computed(() => data.join(', '))
|
|
29
|
+
|
|
30
|
+
const onClick = (e: Event) => {
|
|
31
|
+
if (!url) {
|
|
32
|
+
e.preventDefault()
|
|
33
|
+
emit('click', instance)
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
isVisited.value = true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const click = () => {
|
|
41
|
+
linkRef.value.click()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
watch(
|
|
45
|
+
() => visited,
|
|
46
|
+
() => {
|
|
47
|
+
isVisited.value = visited
|
|
48
|
+
},
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
defineExpose({ click })
|
|
17
52
|
</script>
|
|
18
53
|
|
|
19
54
|
<template>
|
|
20
55
|
<tr
|
|
21
|
-
:class="['download-list-item', { visited, compact: isCompact }]"
|
|
56
|
+
:class="['download-list-item', { visited: isVisited, loading, compact: isCompact }]"
|
|
22
57
|
:style="{ '--rows': Math.round(data.length / 2) }"
|
|
23
58
|
>
|
|
24
59
|
<td v-for="(cell, idx) in data" :key="idx" class="download-list-item__cell">
|
|
@@ -29,15 +64,18 @@ const label = computed(() => data.join(', '))
|
|
|
29
64
|
</td>
|
|
30
65
|
|
|
31
66
|
<td class="download-list-item__cell cta">
|
|
32
|
-
<
|
|
67
|
+
<component
|
|
68
|
+
:is="url ? 'a' : 'button'"
|
|
69
|
+
ref="link"
|
|
33
70
|
class="download-list-item__link"
|
|
34
71
|
:href="url"
|
|
35
72
|
target="_blank"
|
|
36
73
|
download
|
|
37
74
|
:aria-label="label"
|
|
38
|
-
|
|
75
|
+
:disabled="loading"
|
|
76
|
+
@click="onClick"
|
|
39
77
|
>
|
|
40
|
-
</
|
|
78
|
+
</component>
|
|
41
79
|
<div class="download-list-item__icon-wrapper">
|
|
42
80
|
<UIcon name="mini-check" class="download-list-item__check" />
|
|
43
81
|
|
|
@@ -17,6 +17,10 @@ interface Props {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const {
|
|
20
|
+
description = '',
|
|
21
|
+
icon = '',
|
|
22
|
+
iconBadge = undefined,
|
|
23
|
+
title = '',
|
|
20
24
|
href = '',
|
|
21
25
|
target = '_self',
|
|
22
26
|
active = false,
|
|
@@ -59,7 +63,7 @@ const tag = computed(() => (href ? 'a' : 'div'))
|
|
|
59
63
|
|
|
60
64
|
<style lang="scss" scoped src="./navigation-panel-tile.scss"></style>
|
|
61
65
|
<style lang="scss">
|
|
62
|
-
@use '../../base/abstracts
|
|
66
|
+
@use '../../base/abstracts' as a;
|
|
63
67
|
|
|
64
68
|
.navigation-panel-tile__description {
|
|
65
69
|
@include a.bp(lg) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../base/abstracts
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
2
|
|
|
3
3
|
@keyframes fade-in-label {
|
|
4
4
|
0% {
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
|
|
84
84
|
@include a.type(200, strong);
|
|
85
85
|
|
|
86
|
+
@include a.bp(lg) {
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
86
90
|
> * {
|
|
87
91
|
flex: 0 0 auto;
|
|
88
92
|
}
|
|
@@ -154,6 +158,10 @@
|
|
|
154
158
|
width: var(--label-width);
|
|
155
159
|
text-overflow: ellipsis;
|
|
156
160
|
overflow: hidden;
|
|
161
|
+
|
|
162
|
+
@include a.bp(lg) {
|
|
163
|
+
width: calc(100% - 24px - 8px);
|
|
164
|
+
}
|
|
157
165
|
}
|
|
158
166
|
|
|
159
167
|
// Animation
|
|
@@ -18,7 +18,9 @@ const observer = new IntersectionObserver(
|
|
|
18
18
|
if (entries[0].isIntersecting) {
|
|
19
19
|
observer.disconnect()
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
_progress.value = progress
|
|
23
|
+
}, 200)
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
26
|
{
|
|
@@ -28,9 +30,7 @@ const observer = new IntersectionObserver(
|
|
|
28
30
|
)
|
|
29
31
|
|
|
30
32
|
onMounted(() => {
|
|
31
|
-
|
|
32
|
-
observer.observe(el.value)
|
|
33
|
-
}, 200)
|
|
33
|
+
observer.observe(el.value)
|
|
34
34
|
})
|
|
35
35
|
</script>
|
|
36
36
|
|
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
inverted?: boolean
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const { small = false, inverted = false } = defineProps<Props>()
|
|
8
|
+
const { text = '', small = false, inverted = false } = defineProps<Props>()
|
|
9
9
|
|
|
10
10
|
const classes = ['richtext', { 'richtext--small': small, 'richtext--inverted': inverted }]
|
|
11
11
|
</script>
|
|
@@ -14,13 +14,21 @@ interface Props {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
defineProps<Props>()
|
|
17
|
+
|
|
18
|
+
const isColorKeyword = (str) => Object.values(TableCellIconColor).includes(str)
|
|
17
19
|
</script>
|
|
18
20
|
|
|
19
21
|
<template>
|
|
20
22
|
<div class="cell-icon-group">
|
|
21
23
|
<template v-for="(item, idx) in icons" :key="idx">
|
|
22
24
|
<UTooltip :title="item.title">
|
|
23
|
-
<UIcon
|
|
25
|
+
<UIcon
|
|
26
|
+
:name="item.icon"
|
|
27
|
+
:class="{ [`icon-color-${item.color}`]: isColorKeyword(item.color) }"
|
|
28
|
+
:style="{
|
|
29
|
+
color: !isColorKeyword(item.color) ? item.color : false,
|
|
30
|
+
}"
|
|
31
|
+
></UIcon>
|
|
24
32
|
</UTooltip>
|
|
25
33
|
</template>
|
|
26
34
|
</div>
|
|
@@ -6,17 +6,15 @@ interface Props {
|
|
|
6
6
|
nowrap?: boolean
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const { hAlign = 'left', vAlign = 'top' } = defineProps<Props>()
|
|
9
|
+
const { text = '', hAlign = 'left', vAlign = 'top' } = defineProps<Props>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
13
|
<div role="cell" :class="['table-heading', `h-align-${hAlign}`, `v-align-${vAlign}`]">
|
|
14
14
|
<div :class="['cell-content', { nowrap }]">
|
|
15
|
-
<slot
|
|
15
|
+
<slot>{{ text }}</slot>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
|
-
<style scoped lang="scss">
|
|
21
|
-
@use './table-heading.scss';
|
|
22
|
-
</style>
|
|
20
|
+
<style scoped lang="scss" src="./table-heading.scss"></style>
|
|
@@ -97,11 +97,17 @@ const positionActiveBar = () => {
|
|
|
97
97
|
activeTabEl = tabs.value.find((item) => item.value === model.value)
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
try {
|
|
101
|
+
const activeTabRelPos = getOffsetParentPosition(activeTabEl)
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
activeBarStyles.value = {
|
|
104
|
+
width: `${activeTabEl.offsetWidth}px`,
|
|
105
|
+
left: `${activeTabRelPos.left + list.value.scrollLeft}px`,
|
|
106
|
+
}
|
|
107
|
+
} catch {
|
|
108
|
+
// This will sometimes fail during resizing. Not sure why it happens.
|
|
109
|
+
// Also when coverage-testing this will fail.
|
|
110
|
+
// We don't need to do anything here.
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
|