@xen-orchestra/web-core 0.3.0 → 0.5.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/_colors.pcss +56 -24
- package/lib/assets/css/_context.pcss +9 -9
- package/lib/assets/css/base.pcss +6 -6
- package/lib/components/backup-item/VtsBackupItem.vue +47 -0
- package/lib/components/backup-state/{BackupState.vue → VtsBackupState.vue} +4 -4
- package/lib/components/{button/ButtonGroup.vue → button-group/VtsButtonGroup.vue} +7 -6
- package/lib/components/cell-object/{CellObject.vue → VtsCellObject.vue} +14 -14
- package/lib/components/cell-text/{CellText.vue → VtsCellText.vue} +11 -11
- package/lib/components/console/{RemoteConsole.vue → VtsRemoteConsole.vue} +12 -18
- package/lib/components/donut-chart-with-legend/{DonutChartWithLegend.vue → VtsDonutChartWithLegend.vue} +6 -6
- package/lib/components/dropdown/DropdownItem.vue +8 -14
- package/lib/components/dropdown/DropdownTitle.vue +3 -3
- package/lib/components/icon/VtsIcon.vue +38 -42
- package/lib/components/layout/{LayoutSidebar.vue → VtsLayoutSidebar.vue} +31 -30
- package/lib/components/legend-group/VtsLegendGroup.vue +44 -0
- package/lib/components/{legend/LegendList.vue → legend-list/VtsLegendList.vue} +2 -2
- package/lib/components/menu/MenuTrigger.vue +2 -2
- package/lib/components/stacked-bar-with-legend/{StackedBarWithLegend.vue → VtsStackedBarWithLegend.vue} +14 -14
- package/lib/components/state-hero/VtsComingSoonHero.vue +13 -0
- package/lib/components/state-hero/VtsLoadingHero.vue +15 -0
- package/lib/components/state-hero/VtsNoDataHero.vue +11 -0
- package/lib/components/state-hero/VtsObjectNotFoundHero.vue +13 -0
- package/lib/components/state-hero/{StateHero.vue → VtsStateHero.vue} +42 -35
- package/lib/components/tab/TabItem.vue +6 -6
- package/lib/components/table/ColumnTitle.vue +7 -7
- package/lib/components/table/{UiTable.vue → VtsTable.vue} +7 -3
- package/lib/components/task/{QuickTaskButton.vue → VtsQuickTaskButton.vue} +8 -7
- package/lib/components/task/{QuickTaskList.vue → VtsQuickTaskList.vue} +10 -11
- package/lib/components/task/{QuickTaskTabBar.vue → VtsQuickTaskTabBar.vue} +9 -13
- package/lib/components/{tooltip/TooltipList.vue → tooltip-list/VtsTooltipList.vue} +2 -3
- package/lib/components/tree/{TreeItem.vue → VtsTreeItem.vue} +3 -4
- package/lib/components/tree/VtsTreeItemError.vue +18 -0
- package/lib/components/tree/{TreeLine.vue → VtsTreeLine.vue} +9 -11
- package/lib/components/tree/{TreeList.vue → VtsTreeList.vue} +5 -2
- package/lib/components/tree/VtsTreeLoadingItem.vue +61 -0
- package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +64 -0
- package/lib/components/ui/actions-title/UiActionsTitle.vue +18 -0
- package/lib/components/ui/button/UiButton.vue +532 -0
- package/lib/components/ui/button-icon/UiButtonIcon.vue +248 -0
- package/lib/components/{UiCard.vue → ui/card/UiCard.vue} +8 -6
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +103 -0
- package/lib/components/ui/card-subtitle/UiCardSubtitle.vue +24 -0
- package/lib/components/ui/card-title/UiCardTitle.vue +56 -0
- package/lib/components/ui/checkbox/UiCheckbox.vue +410 -0
- package/lib/components/ui/checkbox-group/UiCheckboxGroup.vue +57 -0
- package/lib/components/ui/chip/ChipIcon.vue +21 -0
- package/lib/components/ui/chip/ChipRemoveIcon.vue +13 -0
- package/lib/components/ui/chip/UiChip.vue +135 -0
- package/lib/components/{icon/ComplexIcon.vue → ui/complex-icon/UiComplexIcon.vue} +21 -27
- package/lib/components/ui/counter/UiCounter.vue +134 -0
- package/lib/components/{donut-chart/DonutChart.vue → ui/donut-chart/UiDonutChart.vue} +28 -30
- package/lib/components/{head-bar/HeadBar.vue → ui/head-bar/UiHeadBar.vue} +31 -31
- package/lib/components/{info/VtsInfo.vue → ui/info/UiInfo.vue} +13 -11
- package/lib/components/{input → ui/input}/UiInput.vue +9 -7
- package/lib/components/ui/input/UiTextarea.vue +120 -0
- package/lib/components/ui/label/UiLabel.vue +76 -0
- package/lib/components/ui/legend/UiLegend.vue +98 -0
- package/lib/components/{LegendTitle.vue → ui/legend-title/UiLegendTitle.vue} +4 -4
- package/lib/components/{UiSpinner.vue → ui/loader/UiLoader.vue} +3 -3
- package/lib/components/{icon/ObjectIcon.vue → ui/object-icon/UiObjectIcon.vue} +44 -36
- package/lib/components/ui/object-link/UiObjectLink.vue +83 -0
- package/lib/components/ui/panel/UiPanel.vue +57 -0
- package/lib/components/{query-search-bar/QuerySearchBar.vue → ui/query-search-bar/UiQuerySearchBar.vue} +16 -16
- package/lib/components/{task/QuickTaskItem.vue → ui/quick-task-item/UiQuickTaskItem.vue} +46 -34
- package/lib/components/{task/QuickTaskPanel.vue → ui/quick-task-panel/UiQuickTaskPanel.vue} +8 -7
- package/lib/components/ui/radio-button/UiRadioButton.vue +196 -0
- package/lib/components/ui/radio-button-group/UiRadioButtonGroup.vue +56 -0
- package/lib/components/{stacked-bar → ui/stacked-bar}/StackedBarSegment.vue +23 -26
- package/lib/components/{stacked-bar/StackedBar.vue → ui/stacked-bar/UiStackedBar.vue} +6 -6
- package/lib/components/ui/table-actions/UiTableActions.vue +46 -0
- package/lib/components/ui/tag/UiTag.vue +118 -0
- package/lib/components/ui/title/UiTitle.vue +39 -0
- package/lib/components/ui/toaster/UiToaster.vue +100 -0
- package/lib/components/ui/toggle/UiToggle.vue +117 -0
- package/lib/components/{tooltip/TooltipItem.vue → ui/tooltip/UiTooltip.vue} +15 -15
- package/lib/components/ui/top-bottom-table/UiTopBottomTable.vue +64 -0
- package/lib/components/{tree/TreeItemLabel.vue → ui/tree-item-label/UiTreeItemLabel.vue} +60 -59
- package/lib/components/ui/user-link/UiUserLink.vue +76 -0
- package/lib/components/ui/user-logo/UiUserLogo.vue +50 -0
- package/lib/composables/route-query.composable.md +136 -0
- package/lib/composables/table.composable.md +159 -0
- package/lib/composables/tree/define-tree.ts +1 -1
- package/lib/composables/tree/tree-node-base.ts +6 -6
- package/lib/composables/tree.composable.md +536 -0
- package/lib/layouts/CoreLayout.vue +8 -6
- package/lib/locales/de.json +3 -2
- package/lib/locales/en.json +7 -3
- package/lib/locales/fa.json +3 -2
- package/lib/locales/fr.json +7 -3
- package/lib/types/color.type.ts +0 -2
- package/lib/types/subscribable-store.type.ts +2 -2
- package/lib/utils/create-subscribable-store-context.util.ts +1 -1
- package/lib/utils/if-else.utils.md +23 -0
- package/lib/utils/if-else.utils.ts +2 -2
- package/lib/utils/to-variants.util.md +62 -0
- package/package.json +7 -7
- package/lib/components/CardNumbers.vue +0 -101
- package/lib/components/PowerStateIcon.vue +0 -46
- package/lib/components/UiTag.vue +0 -101
- package/lib/components/backup-item/BackupItem.vue +0 -40
- package/lib/components/button/ButtonIcon.vue +0 -220
- package/lib/components/button/UiButton.vue +0 -470
- package/lib/components/card/CardSubtitle.vue +0 -24
- package/lib/components/card/CardTitle.vue +0 -57
- package/lib/components/chip/ChipIcon.vue +0 -30
- package/lib/components/chip/ChipRemoveIcon.vue +0 -13
- package/lib/components/chip/UiChip.vue +0 -137
- package/lib/components/counter/VtsCounter.vue +0 -147
- package/lib/components/legend/LegendGroup.vue +0 -44
- package/lib/components/legend/LegendItem.vue +0 -86
- package/lib/components/object-link/ObjectLink.vue +0 -87
- package/lib/components/state-hero/ComingSoonHero.vue +0 -13
- package/lib/components/state-hero/LoadingHero.vue +0 -15
- package/lib/components/state-hero/NoDataHero.vue +0 -11
- package/lib/components/state-hero/ObjectNotFoundHero.vue +0 -13
- package/lib/components/tree/TreeItemError.vue +0 -13
- package/lib/components/tree/TreeLoadingItem.vue +0 -60
- package/lib/components/user/UserLink.vue +0 -72
- package/lib/components/user/UserLogo.vue +0 -57
- package/lib/types/backup.type.ts +0 -11
- package/lib/types/size.type.ts +0 -1
- package/lib/types/task.type.ts +0 -13
- /package/lib/components/backdrop/{Backdrop.vue → VtsBackdrop.vue} +0 -0
- /package/lib/components/divider/{Divider.vue → VtsDivider.vue} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<!-- v1.1 -->
|
|
2
1
|
<template>
|
|
3
|
-
<li class="tree-item">
|
|
2
|
+
<li class="vts-tree-item">
|
|
4
3
|
<slot />
|
|
5
4
|
<slot v-if="expanded" name="sublist" />
|
|
6
5
|
</li>
|
|
@@ -15,8 +14,8 @@ const props = defineProps<{
|
|
|
15
14
|
}>()
|
|
16
15
|
|
|
17
16
|
defineSlots<{
|
|
18
|
-
default
|
|
19
|
-
sublist
|
|
17
|
+
default(): any
|
|
18
|
+
sublist?(): any
|
|
20
19
|
}>()
|
|
21
20
|
|
|
22
21
|
const hasChildren = ref(false)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li class="vts-tree-item-error typo h6-semi-bold">
|
|
3
|
+
<slot />
|
|
4
|
+
</li>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
defineSlots<{
|
|
9
|
+
default(): any
|
|
10
|
+
}>()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style lang="postcss" scoped>
|
|
14
|
+
.vts-tree-item-error {
|
|
15
|
+
padding-left: 3rem;
|
|
16
|
+
color: var(--color-danger-txt-base);
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<!-- v1.1 -->
|
|
2
1
|
<template>
|
|
3
|
-
<div class="tree-line">
|
|
2
|
+
<div class="vts-tree-line">
|
|
4
3
|
<div :class="{ 'tree-line-half-height': halfHeight }" class="tree-line-vertical" />
|
|
5
4
|
<div :class="{ right }" class="tree-line-horizontal" />
|
|
6
5
|
</div>
|
|
@@ -14,8 +13,7 @@ defineProps<{
|
|
|
14
13
|
</script>
|
|
15
14
|
|
|
16
15
|
<style lang="postcss" scoped>
|
|
17
|
-
.tree-line {
|
|
18
|
-
--offset: 0.7rem;
|
|
16
|
+
.vts-tree-line {
|
|
19
17
|
flex: 0 1 1em;
|
|
20
18
|
align-self: stretch;
|
|
21
19
|
display: flex;
|
|
@@ -24,9 +22,9 @@ defineProps<{
|
|
|
24
22
|
|
|
25
23
|
.tree-line-vertical {
|
|
26
24
|
width: 0.1rem;
|
|
27
|
-
background: var(--color-
|
|
28
|
-
height: calc(100% +
|
|
29
|
-
transform: translateY(calc(
|
|
25
|
+
background: var(--color-info-txt-base);
|
|
26
|
+
height: calc(100% + 0.7rem);
|
|
27
|
+
transform: translateY(calc(0.7rem * -1));
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
.tree-line-horizontal {
|
|
@@ -35,16 +33,16 @@ defineProps<{
|
|
|
35
33
|
background: transparent;
|
|
36
34
|
|
|
37
35
|
&.right {
|
|
38
|
-
background: var(--color-
|
|
36
|
+
background: var(--color-info-txt-base);
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
.tree-item:last-child {
|
|
44
|
-
> .tree-item-label {
|
|
41
|
+
.vts-tree-item:last-child {
|
|
42
|
+
> .ui-tree-item-label {
|
|
45
43
|
.tree-line-half-height {
|
|
46
44
|
align-self: start;
|
|
47
|
-
height: calc(50% +
|
|
45
|
+
height: calc(50% + 0.7rem);
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<!-- v1.1 -->
|
|
2
1
|
<template>
|
|
3
|
-
<ul class="tree-list">
|
|
2
|
+
<ul class="vts-tree-list">
|
|
4
3
|
<slot />
|
|
5
4
|
</ul>
|
|
6
5
|
</template>
|
|
@@ -9,6 +8,10 @@
|
|
|
9
8
|
import { IK_TREE_LIST_DEPTH } from '@core/utils/injection-keys.util'
|
|
10
9
|
import { inject, provide } from 'vue'
|
|
11
10
|
|
|
11
|
+
defineSlots<{
|
|
12
|
+
default(): any
|
|
13
|
+
}>()
|
|
14
|
+
|
|
12
15
|
const depth = inject(IK_TREE_LIST_DEPTH, 0)
|
|
13
16
|
provide(IK_TREE_LIST_DEPTH, depth + 1)
|
|
14
17
|
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li class="vts-tree-loading-item">
|
|
3
|
+
<div class="label-placeholder">
|
|
4
|
+
<div class="link-placeholder">
|
|
5
|
+
<template v-if="depth > 1">
|
|
6
|
+
<VtsTreeLine v-for="i in depth - 1" :key="i" :right="i === depth - 1" full-height />
|
|
7
|
+
</template>
|
|
8
|
+
<VtsIcon :icon accent="current" />
|
|
9
|
+
<div class="loader"> </div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</li>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
17
|
+
import VtsTreeLine from '@core/components/tree/VtsTreeLine.vue'
|
|
18
|
+
import { IK_TREE_LIST_DEPTH } from '@core/utils/injection-keys.util'
|
|
19
|
+
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
20
|
+
import { inject } from 'vue'
|
|
21
|
+
|
|
22
|
+
defineProps<{
|
|
23
|
+
icon: IconDefinition
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const depth = inject(IK_TREE_LIST_DEPTH, 0)
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="postcss" scoped>
|
|
30
|
+
.vts-tree-loading-item {
|
|
31
|
+
.label-placeholder {
|
|
32
|
+
display: flex;
|
|
33
|
+
height: 4rem;
|
|
34
|
+
background-color: var(--color-neutral-background-primary);
|
|
35
|
+
|
|
36
|
+
.link-placeholder {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
flex: 1;
|
|
40
|
+
padding: 0 0.8rem;
|
|
41
|
+
gap: 0.4rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.loader {
|
|
45
|
+
flex: 1;
|
|
46
|
+
animation: pulse alternate 1s infinite;
|
|
47
|
+
background-color: var(--color-info-background-selected);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes pulse {
|
|
52
|
+
0% {
|
|
53
|
+
opacity: 0.5;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
100% {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!-- v2 -->
|
|
2
|
+
<template>
|
|
3
|
+
<button :class="{ disabled: isDisabled, selected }" class="ui-account-menu-button" type="button">
|
|
4
|
+
<UiUserLogo class="logo" :size />
|
|
5
|
+
</button>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts" setup>
|
|
9
|
+
import UiUserLogo from '@core/components/ui/user-logo/UiUserLogo.vue'
|
|
10
|
+
import { useContext } from '@core/composables/context.composable'
|
|
11
|
+
import { DisabledContext } from '@core/context'
|
|
12
|
+
|
|
13
|
+
defineProps<{
|
|
14
|
+
size: 'small' | 'medium'
|
|
15
|
+
selected?: boolean
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const isDisabled = useContext(DisabledContext)
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="postcss" scoped>
|
|
22
|
+
.ui-account-menu-button {
|
|
23
|
+
padding: 0.4rem;
|
|
24
|
+
border-radius: 0.4rem;
|
|
25
|
+
border-color: transparent;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
|
|
28
|
+
&:not(.disabled) {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
background-color: var(--color-info-background-hover);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:active {
|
|
37
|
+
background-color: var(--color-info-background-active);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.selected {
|
|
41
|
+
background-color: var(--color-info-background-selected);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
outline: none;
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: -0.4rem;
|
|
51
|
+
border: 0.2rem solid var(--color-info-txt-base);
|
|
52
|
+
border-radius: 0.4rem;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.disabled {
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
|
|
59
|
+
.logo {
|
|
60
|
+
border-color: var(--color-neutral-txt-secondary);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- v2 -->
|
|
2
|
+
<template>
|
|
3
|
+
<span class="ui-actions-title typo p2-regular">
|
|
4
|
+
<slot />
|
|
5
|
+
</span>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts" setup>
|
|
9
|
+
defineSlots<{
|
|
10
|
+
default(): any
|
|
11
|
+
}>()
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<style scoped lang="postcss">
|
|
15
|
+
.ui-actions-title {
|
|
16
|
+
color: var(--color-neutral-txt-secondary);
|
|
17
|
+
}
|
|
18
|
+
</style>
|