@xen-orchestra/web-core 0.39.1 → 0.41.0
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/lib/assets/css/_fonts.pcss +7 -0
- package/lib/assets/fonts/poppins-vates.ttf +0 -0
- package/lib/components/card/VtsCardRowKeyValue.vue +113 -7
- package/lib/components/code-snippet/VtsCodeSnippet.vue +44 -0
- package/lib/components/label-value-list/VtsLabelValueList.vue +46 -0
- package/lib/components/layout/VtsLayoutSidebar.vue +10 -2
- package/lib/components/menu/MenuList.vue +2 -4
- package/lib/components/modal/VtsActionModal.vue +72 -0
- package/lib/components/modal/VtsModalList.vue +1 -1
- package/lib/components/object-icon/VtsObjectIcon.vue +3 -3
- package/lib/components/tree/VtsTreeItem.vue +3 -1
- package/lib/components/ui/alert/UiAlert.vue +4 -4
- package/lib/components/ui/collapsible-list/UiCollapsibleList.vue +1 -1
- package/lib/components/ui/info/UiInfo.vue +5 -5
- package/lib/components/ui/logo-text/UiLogoText.vue +18 -0
- package/lib/components/ui/subtitle/UiSubtitle.vue +18 -0
- package/lib/components/ui/tag/UiTag.vue +3 -4
- package/lib/components/ui/title/UiTitle.vue +5 -5
- package/lib/components/ui/toaster/UiToaster.vue +4 -4
- package/lib/i18n.ts +8 -0
- package/lib/icons/action-icons.ts +212 -0
- package/lib/icons/index.ts +9 -6
- package/lib/icons/object-icons.ts +202 -179
- package/lib/icons/status-icons.ts +222 -0
- package/lib/icons/table-icons.ts +86 -0
- package/lib/locales/cs.json +46 -18
- package/lib/locales/da.json +56 -0
- package/lib/locales/de.json +32 -3
- package/lib/locales/en.json +26 -1
- package/lib/locales/es.json +62 -28
- package/lib/locales/fa.json +1 -1
- package/lib/locales/fi.json +295 -0
- package/lib/locales/fr.json +26 -1
- package/lib/locales/it.json +84 -0
- package/lib/locales/ja.json +102 -0
- package/lib/locales/ko.json +99 -0
- package/lib/locales/nb-NO.json +18 -6
- package/lib/locales/nl.json +47 -17
- package/lib/locales/pl.json +311 -0
- package/lib/locales/pt-BR.json +96 -1
- package/lib/locales/ru.json +80 -7
- package/lib/locales/sv.json +41 -1
- package/lib/locales/uk.json +2 -1
- package/lib/packages/tree/use-tree.ts +70 -15
- package/lib/tables/column-sets/new-vm-network-columns.ts +1 -1
- package/lib/tables/column-sets/new-vm-sr-columns.ts +1 -1
- package/lib/tables/column-sets/server-columns.ts +1 -1
- package/lib/types/object-icon.type.ts +1 -1
- package/lib/utils/line-height.util.ts +22 -0
- package/package.json +1 -1
- package/lib/icons/legacy-icons.ts +0 -115
|
@@ -4,3 +4,10 @@
|
|
|
4
4
|
@import '@fontsource/poppins/700.css';
|
|
5
5
|
@import '@fontsource/poppins/900.css';
|
|
6
6
|
@import '@fontsource/poppins/400-italic.css';
|
|
7
|
+
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: 'Poppins Vates';
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-display: swap;
|
|
12
|
+
src: url(../fonts/poppins-vates.ttf) format('truetype');
|
|
13
|
+
}
|
|
Binary file
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="vts-card-row-key-value typo-body-regular-small"
|
|
4
|
+
:class="{ truncate: shouldTruncate, 'align-top': alignTop }"
|
|
5
|
+
>
|
|
3
6
|
<div class="key">
|
|
4
7
|
<slot name="key" />
|
|
5
8
|
</div>
|
|
6
|
-
<div
|
|
7
|
-
<
|
|
9
|
+
<div class="value-container">
|
|
10
|
+
<div ref="truncatableValueElement" class="value" :class="{ truncated: shouldTruncate && !isExpanded }">
|
|
11
|
+
<slot name="value" />
|
|
12
|
+
</div>
|
|
13
|
+
<UiButtonIcon
|
|
14
|
+
v-if="shouldTruncate"
|
|
15
|
+
v-tooltip="isExpanded ? t('action:show-less') : t('action:show-more')"
|
|
16
|
+
:icon="isExpanded ? 'fa:chevron-up' : 'fa:chevron-down'"
|
|
17
|
+
class="show-more"
|
|
18
|
+
size="small"
|
|
19
|
+
accent="brand"
|
|
20
|
+
@click="toggleExpanded()"
|
|
21
|
+
/>
|
|
8
22
|
</div>
|
|
9
23
|
<div v-if="slots.addons" class="addons">
|
|
10
24
|
<slot name="addons" />
|
|
@@ -13,29 +27,121 @@
|
|
|
13
27
|
</template>
|
|
14
28
|
|
|
15
29
|
<script lang="ts" setup>
|
|
30
|
+
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
16
31
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
32
|
+
import { calculateLineCount } from '@core/utils/line-height.util.ts'
|
|
33
|
+
import { useStyleTag } from '@vueuse/core'
|
|
34
|
+
import { useToggle } from '@vueuse/shared'
|
|
35
|
+
import { computed, nextTick, onMounted, ref, useTemplateRef, watch } from 'vue'
|
|
36
|
+
import { useI18n } from 'vue-i18n'
|
|
37
|
+
|
|
38
|
+
const { truncate } = defineProps<{
|
|
39
|
+
truncate?: number | boolean
|
|
40
|
+
alignTop?: boolean
|
|
41
|
+
}>()
|
|
17
42
|
|
|
18
43
|
const slots = defineSlots<{
|
|
19
44
|
key(): any
|
|
20
45
|
value(): any
|
|
21
46
|
addons?(): any
|
|
22
47
|
}>()
|
|
48
|
+
|
|
49
|
+
const DEFAULT_MAX_LINES = 5
|
|
50
|
+
|
|
51
|
+
const { t } = useI18n()
|
|
52
|
+
|
|
53
|
+
const truncatableValueElementRef = useTemplateRef('truncatableValueElement')
|
|
54
|
+
const lineCount = ref(0)
|
|
55
|
+
|
|
56
|
+
const isTruncationEnabled = computed(() => truncate !== undefined && truncate !== false)
|
|
57
|
+
|
|
58
|
+
const lineLimit = computed(() => {
|
|
59
|
+
if (typeof truncate === 'number') {
|
|
60
|
+
return truncate
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return DEFAULT_MAX_LINES
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const shouldTruncate = computed(() => isTruncationEnabled.value && lineCount.value > lineLimit.value)
|
|
67
|
+
|
|
68
|
+
const [isExpanded, toggleExpanded] = useToggle(false)
|
|
69
|
+
|
|
70
|
+
const calculateLines = async () => {
|
|
71
|
+
await nextTick()
|
|
72
|
+
|
|
73
|
+
if (!truncatableValueElementRef.value) {
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
lineCount.value = calculateLineCount(truncatableValueElementRef.value)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const style = computed(() => {
|
|
81
|
+
if (!(shouldTruncate.value || isExpanded.value)) {
|
|
82
|
+
return ''
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return `.vts-card-row-key-value.truncate .value.truncated { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${lineLimit.value}; line-clamp: ${lineLimit.value}; overflow: hidden; text-overflow: ellipsis; }`
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
useStyleTag(style)
|
|
89
|
+
|
|
90
|
+
onMounted(() => calculateLines())
|
|
91
|
+
|
|
92
|
+
watch(
|
|
93
|
+
() => slots.value?.(),
|
|
94
|
+
() => calculateLines()
|
|
95
|
+
)
|
|
23
96
|
</script>
|
|
24
97
|
|
|
25
98
|
<style lang="postcss" scoped>
|
|
26
99
|
.vts-card-row-key-value {
|
|
27
100
|
display: flex;
|
|
28
101
|
align-items: center;
|
|
29
|
-
gap: 1.6rem;
|
|
102
|
+
column-gap: 1.6rem;
|
|
103
|
+
|
|
104
|
+
&.truncate {
|
|
105
|
+
display: grid;
|
|
106
|
+
row-gap: 0.4rem;
|
|
107
|
+
grid-template-columns: 1fr auto;
|
|
108
|
+
|
|
109
|
+
.key {
|
|
110
|
+
grid-column: 1 / -1;
|
|
111
|
+
grid-row: 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.addons {
|
|
115
|
+
grid-column: 2;
|
|
116
|
+
grid-row: 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.value-container {
|
|
120
|
+
grid-column: 1 / -1;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&.align-top:not(.truncate) {
|
|
125
|
+
align-items: flex-start;
|
|
126
|
+
}
|
|
30
127
|
|
|
31
128
|
.key {
|
|
32
129
|
overflow-wrap: break-word;
|
|
33
130
|
color: var(--color-neutral-txt-secondary);
|
|
34
131
|
}
|
|
35
132
|
|
|
36
|
-
.value {
|
|
37
|
-
|
|
38
|
-
|
|
133
|
+
.value-container {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: end;
|
|
136
|
+
gap: 0.8rem;
|
|
137
|
+
|
|
138
|
+
.value {
|
|
139
|
+
color: var(--color-neutral-txt-primary);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.show-more {
|
|
143
|
+
flex-shrink: 0;
|
|
144
|
+
}
|
|
39
145
|
}
|
|
40
146
|
|
|
41
147
|
.value:empty::before {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vts-code-snippet">
|
|
3
|
+
<slot>
|
|
4
|
+
{{ content }}
|
|
5
|
+
</slot>
|
|
6
|
+
<div v-if="copy || slots.addons" class="addons">
|
|
7
|
+
<slot name="addons">
|
|
8
|
+
<VtsCopyButton v-if="copy && content" :value="String(content)" />
|
|
9
|
+
</slot>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import VtsCopyButton from '@core/components/copy-button/VtsCopyButton.vue'
|
|
16
|
+
|
|
17
|
+
defineProps<{
|
|
18
|
+
content?: string | number
|
|
19
|
+
copy?: boolean
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const slots = defineSlots<{
|
|
23
|
+
default?(): any
|
|
24
|
+
addons?(): any
|
|
25
|
+
}>()
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style lang="postcss" scoped>
|
|
29
|
+
.vts-code-snippet {
|
|
30
|
+
font-family: 'Courier New', Courier, monospace;
|
|
31
|
+
font-size: 1.4rem;
|
|
32
|
+
color: var(--color-neutral-txt-primary);
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 0.8rem;
|
|
36
|
+
|
|
37
|
+
.addons {
|
|
38
|
+
margin-inline-start: auto;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 0.8rem;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-for="(value, label) in fields" :key="label">
|
|
3
|
+
<VtsCardRowKeyValue v-if="isPrimitiveOrBooleanString(value)">
|
|
4
|
+
<template #key>
|
|
5
|
+
<span class="label">{{ label }}</span>
|
|
6
|
+
</template>
|
|
7
|
+
<template #value>
|
|
8
|
+
<template v-if="isBooleanLike(value)">
|
|
9
|
+
<VtsEnabledState :enabled="toBoolean(value)" />
|
|
10
|
+
</template>
|
|
11
|
+
<template v-else>
|
|
12
|
+
{{ value }}
|
|
13
|
+
</template>
|
|
14
|
+
</template>
|
|
15
|
+
<template v-if="!isBooleanLike(value)" #addons>
|
|
16
|
+
<VtsCopyButton :value="String(value)" />
|
|
17
|
+
</template>
|
|
18
|
+
</VtsCardRowKeyValue>
|
|
19
|
+
<VtsLabelValueList v-else :fields="value" />
|
|
20
|
+
</template>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import VtsCardRowKeyValue from '@core/components/card/VtsCardRowKeyValue.vue'
|
|
25
|
+
import VtsCopyButton from '@core/components/copy-button/VtsCopyButton.vue'
|
|
26
|
+
import VtsEnabledState from '@core/components/enabled-state/VtsEnabledState.vue'
|
|
27
|
+
|
|
28
|
+
defineProps<{
|
|
29
|
+
fields: Record<string, unknown> | unknown
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const isBooleanString = (value: unknown): value is string => value === 'true' || value === 'false'
|
|
33
|
+
|
|
34
|
+
const isBooleanLike = (value: unknown): boolean => typeof value === 'boolean' || isBooleanString(value)
|
|
35
|
+
|
|
36
|
+
const toBoolean = (value: unknown): boolean => value === true || value === 'true'
|
|
37
|
+
|
|
38
|
+
const isPrimitiveOrBooleanString = (value: unknown): boolean =>
|
|
39
|
+
['number', 'string'].includes(typeof value) || isBooleanString(value)
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="postcss" scoped>
|
|
43
|
+
.label {
|
|
44
|
+
text-transform: capitalize;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:class="{
|
|
3
|
+
:class="{
|
|
4
|
+
locked: sidebar.isLocked && !ui.isMobile,
|
|
5
|
+
expanded: sidebar.isExpanded,
|
|
6
|
+
mobile: ui.isMobile,
|
|
7
|
+
'border-right': !ui.isMobile,
|
|
8
|
+
}"
|
|
4
9
|
class="vts-layout-sidebar"
|
|
5
10
|
>
|
|
6
11
|
<div v-if="!ui.isMobile" class="lock">
|
|
@@ -58,13 +63,16 @@ const ui = useUiStore()
|
|
|
58
63
|
flex-direction: column;
|
|
59
64
|
height: 100%;
|
|
60
65
|
background-color: var(--color-neutral-background-secondary);
|
|
61
|
-
border-right: 0.1rem solid var(--color-neutral-border);
|
|
62
66
|
width: v-bind('sidebar.cssWidth');
|
|
63
67
|
z-index: 1010;
|
|
64
68
|
transition:
|
|
65
69
|
margin-left 0.25s,
|
|
66
70
|
transform 0.25s;
|
|
67
71
|
|
|
72
|
+
&.border-right {
|
|
73
|
+
border-right: 0.1rem solid var(--color-neutral-border);
|
|
74
|
+
}
|
|
75
|
+
|
|
68
76
|
&.locked {
|
|
69
77
|
margin-left: v-bind('sidebar.cssOffset');
|
|
70
78
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- v1.0 -->
|
|
2
2
|
<template>
|
|
3
3
|
<slot :is-open="isOpen" :open="open" name="trigger" />
|
|
4
|
-
<Teleport :disabled="!
|
|
4
|
+
<Teleport :disabled="!hasTrigger" to="body">
|
|
5
5
|
<ul
|
|
6
6
|
v-if="!hasTrigger || isOpen"
|
|
7
7
|
ref="menu"
|
|
@@ -50,9 +50,7 @@ let clearClickOutsideEvent: (() => void) | undefined
|
|
|
50
50
|
|
|
51
51
|
const hasTrigger = useSlots().trigger !== undefined
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (shouldTeleport) {
|
|
53
|
+
if (hasTrigger) {
|
|
56
54
|
provide(IK_MENU_TELEPORTED, true)
|
|
57
55
|
}
|
|
58
56
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VtsModal :accent icon="status:info-picto">
|
|
3
|
+
<template #title>
|
|
4
|
+
<span>{{ modalTexts.title }}</span>
|
|
5
|
+
</template>
|
|
6
|
+
<template #content>
|
|
7
|
+
<span>{{ modalTexts.message }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #buttons>
|
|
10
|
+
<VtsModalCancelButton>{{ t('action:go-back') }}</VtsModalCancelButton>
|
|
11
|
+
<VtsModalConfirmButton>
|
|
12
|
+
{{ modalTexts.action }}
|
|
13
|
+
</VtsModalConfirmButton>
|
|
14
|
+
</template>
|
|
15
|
+
</VtsModal>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import VtsModal from '@core/components/modal/VtsModal.vue'
|
|
20
|
+
import VtsModalCancelButton from '@core/components/modal/VtsModalCancelButton.vue'
|
|
21
|
+
import VtsModalConfirmButton from '@core/components/modal/VtsModalConfirmButton.vue'
|
|
22
|
+
import type { ModalAccent } from '@core/components/ui/modal/UiModal.vue'
|
|
23
|
+
import { useMapper } from '@core/packages/mapper/use-mapper.ts'
|
|
24
|
+
import { useI18n } from 'vue-i18n'
|
|
25
|
+
|
|
26
|
+
type ObjectType = 'vm'
|
|
27
|
+
type XoVmActions = 'reboot' | 'shutdown' | 'force-reboot' | 'force-shutdown'
|
|
28
|
+
type ActionTexts = {
|
|
29
|
+
title: string
|
|
30
|
+
message: string
|
|
31
|
+
action: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const { action, object } = defineProps<{
|
|
35
|
+
action: XoVmActions
|
|
36
|
+
accent: ModalAccent
|
|
37
|
+
object: ObjectType
|
|
38
|
+
}>()
|
|
39
|
+
|
|
40
|
+
const { t } = useI18n()
|
|
41
|
+
|
|
42
|
+
const textMappingsByObject: Record<ObjectType, Record<XoVmActions, ActionTexts>> = {
|
|
43
|
+
vm: {
|
|
44
|
+
'force-reboot': {
|
|
45
|
+
title: t('modal:confirm-vm-force-reboot'),
|
|
46
|
+
message: t('modal:vm-force-reboot-message'),
|
|
47
|
+
action: t('modal:action:vm-force-reboot'),
|
|
48
|
+
},
|
|
49
|
+
'force-shutdown': {
|
|
50
|
+
title: t('modal:confirm-vm-force-shutdown'),
|
|
51
|
+
message: t('modal:vm-force-shutdown-message'),
|
|
52
|
+
action: t('modal:action:vm-force-shutdown'),
|
|
53
|
+
},
|
|
54
|
+
reboot: {
|
|
55
|
+
title: t('modal:confirm-vm-reboot'),
|
|
56
|
+
message: t('modal:vm-reboot-message'),
|
|
57
|
+
action: t('modal:action:vm-reboot'),
|
|
58
|
+
},
|
|
59
|
+
shutdown: {
|
|
60
|
+
title: t('modal:confirm-vm-shutdown'),
|
|
61
|
+
message: t('modal:vm-shutdown-message'),
|
|
62
|
+
action: t('modal:action:vm-shutdown'),
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const modalTexts = useMapper(
|
|
68
|
+
() => action,
|
|
69
|
+
() => textMappingsByObject[object],
|
|
70
|
+
() => 'shutdown'
|
|
71
|
+
)
|
|
72
|
+
</script>
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
<script generic="TType extends ObjectType, TState extends ObjectState<TType>" lang="ts" setup>
|
|
6
6
|
import VtsIcon, { type IconSize } from '@core/components/icon/VtsIcon.vue'
|
|
7
|
-
import
|
|
7
|
+
import { icon, objectIcon, type ObjectState, type ObjectType } from '@core/icons'
|
|
8
8
|
import { computed } from 'vue'
|
|
9
9
|
|
|
10
10
|
const { type, state } = defineProps<{
|
|
11
11
|
type: TType
|
|
12
|
-
state
|
|
12
|
+
state?: TState
|
|
13
13
|
size: IconSize
|
|
14
14
|
}>()
|
|
15
15
|
|
|
16
|
-
const iconName = computed(() => `object:${type}
|
|
16
|
+
const iconName = computed(() => (state ? objectIcon(type, state) : icon(`object:${type}`)))
|
|
17
17
|
</script>
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="vts-tree-item" @click="handleClick()">
|
|
2
|
+
<div class="vts-tree-item" :data-node-id="nodeId" @click="handleClick()">
|
|
3
3
|
<slot />
|
|
4
4
|
<slot v-if="expanded" name="sublist" />
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script lang="ts" setup>
|
|
9
|
+
import type { TreeNodeId } from '@core/packages/tree/types.ts'
|
|
9
10
|
import { useSidebarStore } from '@core/stores/sidebar.store'
|
|
10
11
|
import { useUiStore } from '@core/stores/ui.store'
|
|
11
12
|
import { IK_TREE_ITEM_EXPANDED, IK_TREE_ITEM_HAS_CHILDREN } from '@core/utils/injection-keys.util'
|
|
12
13
|
import { onBeforeMount, onBeforeUpdate, provide, ref, toRef, useSlots } from 'vue'
|
|
13
14
|
|
|
14
15
|
const props = defineProps<{
|
|
16
|
+
nodeId?: TreeNodeId
|
|
15
17
|
expanded?: boolean
|
|
16
18
|
}>()
|
|
17
19
|
|
|
@@ -49,10 +49,10 @@ const slots = defineSlots<{
|
|
|
49
49
|
const icon = useMapper<AlertAccent, IconName>(
|
|
50
50
|
() => accent,
|
|
51
51
|
{
|
|
52
|
-
info: '
|
|
53
|
-
success: '
|
|
54
|
-
warning: '
|
|
55
|
-
danger: '
|
|
52
|
+
info: 'status:info-circle',
|
|
53
|
+
success: 'status:success-circle',
|
|
54
|
+
warning: 'status:warning-circle',
|
|
55
|
+
danger: 'status:danger-circle',
|
|
56
56
|
},
|
|
57
57
|
'info'
|
|
58
58
|
)
|
|
@@ -42,7 +42,7 @@ const hasMoreItems = computed(() => remainingItems.value > 0)
|
|
|
42
42
|
const isExpanded = ref(false)
|
|
43
43
|
|
|
44
44
|
const style = computed(
|
|
45
|
-
() => `.ui-collapsible-list:not(.expanded) > .container *:nth-child(n+${visibleItems + 1}) { display: none }`
|
|
45
|
+
() => `.ui-collapsible-list:not(.expanded) > .container > *:nth-child(n+${visibleItems + 1}) { display: none }`
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
useStyleTag(style)
|
|
@@ -28,11 +28,11 @@ defineSlots<{
|
|
|
28
28
|
const icon = useMapper<InfoAccent, IconName>(
|
|
29
29
|
() => accent,
|
|
30
30
|
{
|
|
31
|
-
info: '
|
|
32
|
-
success: '
|
|
33
|
-
warning: '
|
|
34
|
-
danger: '
|
|
35
|
-
muted: '
|
|
31
|
+
info: 'status:info-circle',
|
|
32
|
+
success: 'status:success-circle',
|
|
33
|
+
warning: 'status:warning-circle',
|
|
34
|
+
danger: 'status:danger-circle',
|
|
35
|
+
muted: 'status:disabled',
|
|
36
36
|
},
|
|
37
37
|
'muted'
|
|
38
38
|
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-logo-text">{{ text }}</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
defineProps<{
|
|
7
|
+
text: string
|
|
8
|
+
}>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<style lang="postcss" scoped>
|
|
12
|
+
.ui-logo-text {
|
|
13
|
+
font-family: 'Poppins Vates', sans-serif;
|
|
14
|
+
font-size: 2.4rem;
|
|
15
|
+
color: var(--color-neutral-txt-primary);
|
|
16
|
+
text-transform: uppercase;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- v1 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="ui-subtitle typo-h6">
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
defineSlots<{
|
|
10
|
+
default(): any
|
|
11
|
+
}>()
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<style scoped lang="postcss">
|
|
15
|
+
.ui-subtitle {
|
|
16
|
+
color: var(--color-neutral-txt-primary);
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<slot name="icon">
|
|
6
6
|
<VtsIcon :name="icon" size="medium" />
|
|
7
7
|
</slot>
|
|
8
|
-
<span
|
|
8
|
+
<span>
|
|
9
9
|
<slot />
|
|
10
10
|
</span>
|
|
11
11
|
</span>
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
|
|
14
14
|
<script lang="ts" setup>
|
|
15
15
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
16
|
-
import { vTooltip } from '@core/directives/tooltip.directive.ts'
|
|
17
16
|
import type { IconName } from '@core/icons'
|
|
18
17
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
19
18
|
|
|
@@ -38,11 +37,11 @@ defineSlots<{
|
|
|
38
37
|
justify-content: center;
|
|
39
38
|
align-items: center;
|
|
40
39
|
gap: 0.8rem;
|
|
41
|
-
white-space:
|
|
40
|
+
white-space: normal;
|
|
41
|
+
word-break: break-word;
|
|
42
42
|
padding: 0.2rem 0.8rem;
|
|
43
43
|
border-radius: 0.4rem;
|
|
44
44
|
vertical-align: middle;
|
|
45
|
-
min-width: 0;
|
|
46
45
|
|
|
47
46
|
/* COLOR VARIANTS */
|
|
48
47
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v5 -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-title">
|
|
4
4
|
<div class="typo-h4 label">
|
|
5
5
|
<slot />
|
|
6
6
|
</div>
|
|
7
|
-
<div v-if="slots.
|
|
8
|
-
<slot name="
|
|
7
|
+
<div v-if="slots.action" class="action">
|
|
8
|
+
<slot name="action" />
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
const slots = defineSlots<{
|
|
15
15
|
default(): any
|
|
16
|
-
|
|
16
|
+
action?(): any
|
|
17
17
|
}>()
|
|
18
18
|
</script>
|
|
19
19
|
|
|
@@ -29,7 +29,7 @@ const slots = defineSlots<{
|
|
|
29
29
|
color: var(--color-brand-txt-base);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.
|
|
32
|
+
.action {
|
|
33
33
|
margin-inline-start: auto;
|
|
34
34
|
display: flex;
|
|
35
35
|
align-items: center;
|
|
@@ -45,10 +45,10 @@ const slots = defineSlots<{
|
|
|
45
45
|
const icon = useMapper<ToasterAccent, IconName>(
|
|
46
46
|
() => accent,
|
|
47
47
|
{
|
|
48
|
-
info: '
|
|
49
|
-
success: '
|
|
50
|
-
warning: '
|
|
51
|
-
danger: '
|
|
48
|
+
info: 'status:info-circle',
|
|
49
|
+
success: 'status:success-circle',
|
|
50
|
+
warning: 'status:warning-circle',
|
|
51
|
+
danger: 'status:danger-circle',
|
|
52
52
|
},
|
|
53
53
|
'info'
|
|
54
54
|
)
|