@xen-orchestra/web-core 0.4.0 → 0.6.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.
Files changed (132) hide show
  1. package/lib/assets/css/_colors.pcss +56 -24
  2. package/lib/assets/css/_context.pcss +9 -9
  3. package/lib/assets/css/base.pcss +6 -6
  4. package/lib/assets/error.svg +375 -0
  5. package/lib/assets/no-selection.svg +70 -0
  6. package/lib/components/backup-item/VtsBackupItem.vue +47 -0
  7. package/lib/components/backup-state/{BackupState.vue → VtsBackupState.vue} +4 -4
  8. package/lib/components/{button/ButtonGroup.vue → button-group/VtsButtonGroup.vue} +7 -6
  9. package/lib/components/cell-object/{CellObject.vue → VtsCellObject.vue} +14 -14
  10. package/lib/components/cell-text/{CellText.vue → VtsCellText.vue} +11 -11
  11. package/lib/components/console/VtsActionsConsole.vue +67 -0
  12. package/lib/components/console/VtsClipboardConsole.vue +38 -0
  13. package/lib/components/console/VtsLayoutConsole.vue +40 -0
  14. package/lib/components/console/{RemoteConsole.vue → VtsRemoteConsole.vue} +14 -17
  15. package/lib/components/donut-chart-with-legend/{DonutChartWithLegend.vue → VtsDonutChartWithLegend.vue} +6 -6
  16. package/lib/components/dropdown/DropdownItem.vue +8 -14
  17. package/lib/components/dropdown/DropdownTitle.vue +3 -3
  18. package/lib/components/icon/VtsIcon.vue +38 -42
  19. package/lib/components/layout/{LayoutSidebar.vue → VtsLayoutSidebar.vue} +31 -30
  20. package/lib/components/legend-group/VtsLegendGroup.vue +44 -0
  21. package/lib/components/{legend/LegendList.vue → legend-list/VtsLegendList.vue} +2 -2
  22. package/lib/components/menu/MenuTrigger.vue +2 -2
  23. package/lib/components/stacked-bar-with-legend/{StackedBarWithLegend.vue → VtsStackedBarWithLegend.vue} +14 -14
  24. package/lib/components/state-hero/VtsComingSoonHero.vue +13 -0
  25. package/lib/components/state-hero/VtsLoadingHero.vue +15 -0
  26. package/lib/components/state-hero/VtsNoDataHero.vue +11 -0
  27. package/lib/components/state-hero/VtsObjectNotFoundHero.vue +13 -0
  28. package/lib/components/state-hero/VtsStateHero.vue +117 -0
  29. package/lib/components/tab/TabItem.vue +6 -6
  30. package/lib/components/table/ColumnTitle.vue +7 -7
  31. package/lib/components/table/{UiTable.vue → VtsTable.vue} +7 -3
  32. package/lib/components/task/{QuickTaskButton.vue → VtsQuickTaskButton.vue} +8 -7
  33. package/lib/components/task/{QuickTaskList.vue → VtsQuickTaskList.vue} +10 -11
  34. package/lib/components/task/{QuickTaskTabBar.vue → VtsQuickTaskTabBar.vue} +9 -13
  35. package/lib/components/{tooltip/TooltipList.vue → tooltip-list/VtsTooltipList.vue} +2 -3
  36. package/lib/components/tree/{TreeItem.vue → VtsTreeItem.vue} +3 -4
  37. package/lib/components/tree/VtsTreeItemError.vue +18 -0
  38. package/lib/components/tree/{TreeLine.vue → VtsTreeLine.vue} +9 -11
  39. package/lib/components/tree/{TreeList.vue → VtsTreeList.vue} +5 -2
  40. package/lib/components/tree/VtsTreeLoadingItem.vue +61 -0
  41. package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +64 -0
  42. package/lib/components/ui/actions-title/UiActionsTitle.vue +2 -2
  43. package/lib/components/ui/button/UiButton.vue +532 -0
  44. package/lib/components/ui/button-icon/UiButtonIcon.vue +248 -0
  45. package/lib/components/{UiCard.vue → ui/card/UiCard.vue} +8 -6
  46. package/lib/components/ui/card-numbers/UiCardNumbers.vue +103 -0
  47. package/lib/components/ui/card-subtitle/UiCardSubtitle.vue +24 -0
  48. package/lib/components/ui/card-title/UiCardTitle.vue +56 -0
  49. package/lib/components/ui/checkbox/UiCheckbox.vue +410 -0
  50. package/lib/components/ui/checkbox-group/UiCheckboxGroup.vue +57 -0
  51. package/lib/components/ui/chip/ChipIcon.vue +21 -0
  52. package/lib/components/ui/chip/ChipRemoveIcon.vue +13 -0
  53. package/lib/components/ui/chip/UiChip.vue +135 -0
  54. package/lib/components/{icon/ComplexIcon.vue → ui/complex-icon/UiComplexIcon.vue} +21 -27
  55. package/lib/components/ui/counter/UiCounter.vue +134 -0
  56. package/lib/components/{donut-chart/DonutChart.vue → ui/donut-chart/UiDonutChart.vue} +28 -30
  57. package/lib/components/{head-bar/HeadBar.vue → ui/head-bar/UiHeadBar.vue} +31 -31
  58. package/lib/components/{info/VtsInfo.vue → ui/info/UiInfo.vue} +13 -11
  59. package/lib/components/{input → ui/input}/UiInput.vue +9 -7
  60. package/lib/components/ui/input/UiTextarea.vue +120 -0
  61. package/lib/components/{input/VtsLabel.vue → ui/label/UiLabel.vue} +25 -25
  62. package/lib/components/ui/legend/UiLegend.vue +98 -0
  63. package/lib/components/{LegendTitle.vue → ui/legend-title/UiLegendTitle.vue} +4 -4
  64. package/lib/components/{UiSpinner.vue → ui/loader/UiLoader.vue} +3 -3
  65. package/lib/components/{icon/ObjectIcon.vue → ui/object-icon/UiObjectIcon.vue} +44 -36
  66. package/lib/components/ui/object-link/UiObjectLink.vue +83 -0
  67. package/lib/components/ui/panel/UiPanel.vue +57 -0
  68. package/lib/components/{query-search-bar/QuerySearchBar.vue → ui/query-search-bar/UiQuerySearchBar.vue} +16 -16
  69. package/lib/components/{task/QuickTaskItem.vue → ui/quick-task-item/UiQuickTaskItem.vue} +46 -34
  70. package/lib/components/{task/QuickTaskPanel.vue → ui/quick-task-panel/UiQuickTaskPanel.vue} +8 -7
  71. package/lib/components/ui/radio-button/UiRadioButton.vue +196 -0
  72. package/lib/components/ui/radio-button-group/UiRadioButtonGroup.vue +56 -0
  73. package/lib/components/{stacked-bar → ui/stacked-bar}/StackedBarSegment.vue +23 -26
  74. package/lib/components/{stacked-bar/StackedBar.vue → ui/stacked-bar/UiStackedBar.vue} +6 -6
  75. package/lib/components/ui/table-actions/UiTableActions.vue +46 -0
  76. package/lib/components/ui/tag/UiTag.vue +118 -0
  77. package/lib/components/ui/title/UiTitle.vue +2 -2
  78. package/lib/components/ui/toaster/UiToaster.vue +100 -0
  79. package/lib/components/ui/toggle/UiToggle.vue +117 -0
  80. package/lib/components/{tooltip/TooltipItem.vue → ui/tooltip/UiTooltip.vue} +15 -15
  81. package/lib/components/ui/top-bottom-table/UiTopBottomTable.vue +64 -0
  82. package/lib/components/{tree/TreeItemLabel.vue → ui/tree-item-label/UiTreeItemLabel.vue} +60 -59
  83. package/lib/components/ui/user-link/UiUserLink.vue +76 -0
  84. package/lib/components/ui/user-logo/UiUserLogo.vue +50 -0
  85. package/lib/composables/route-query.composable.md +136 -0
  86. package/lib/composables/table.composable.md +159 -0
  87. package/lib/composables/tree/define-tree.ts +1 -1
  88. package/lib/composables/tree/tree-node-base.ts +6 -6
  89. package/lib/composables/tree.composable.md +536 -0
  90. package/lib/i18n.ts +4 -0
  91. package/lib/layouts/CoreLayout.vue +8 -6
  92. package/lib/locales/cs.json +76 -0
  93. package/lib/locales/de.json +5 -2
  94. package/lib/locales/en.json +14 -3
  95. package/lib/locales/fa.json +5 -2
  96. package/lib/locales/fr.json +14 -3
  97. package/lib/types/color.type.ts +0 -2
  98. package/lib/types/subscribable-store.type.ts +2 -2
  99. package/lib/utils/create-subscribable-store-context.util.ts +1 -1
  100. package/lib/utils/if-else.utils.md +23 -0
  101. package/lib/utils/if-else.utils.ts +2 -2
  102. package/lib/utils/to-variants.util.md +62 -0
  103. package/package.json +7 -7
  104. package/lib/components/CardNumbers.vue +0 -101
  105. package/lib/components/PowerStateIcon.vue +0 -46
  106. package/lib/components/UiTag.vue +0 -101
  107. package/lib/components/backup-item/BackupItem.vue +0 -40
  108. package/lib/components/button/ButtonIcon.vue +0 -220
  109. package/lib/components/button/UiButton.vue +0 -470
  110. package/lib/components/card/CardSubtitle.vue +0 -24
  111. package/lib/components/card/CardTitle.vue +0 -57
  112. package/lib/components/chip/ChipIcon.vue +0 -30
  113. package/lib/components/chip/ChipRemoveIcon.vue +0 -13
  114. package/lib/components/chip/UiChip.vue +0 -137
  115. package/lib/components/counter/VtsCounter.vue +0 -147
  116. package/lib/components/legend/LegendGroup.vue +0 -44
  117. package/lib/components/legend/LegendItem.vue +0 -86
  118. package/lib/components/object-link/ObjectLink.vue +0 -87
  119. package/lib/components/state-hero/ComingSoonHero.vue +0 -13
  120. package/lib/components/state-hero/LoadingHero.vue +0 -15
  121. package/lib/components/state-hero/NoDataHero.vue +0 -11
  122. package/lib/components/state-hero/ObjectNotFoundHero.vue +0 -13
  123. package/lib/components/state-hero/StateHero.vue +0 -74
  124. package/lib/components/tree/TreeItemError.vue +0 -13
  125. package/lib/components/tree/TreeLoadingItem.vue +0 -60
  126. package/lib/components/user/UserLink.vue +0 -72
  127. package/lib/components/user/UserLogo.vue +0 -57
  128. package/lib/types/backup.type.ts +0 -11
  129. package/lib/types/size.type.ts +0 -1
  130. package/lib/types/task.type.ts +0 -13
  131. /package/lib/components/backdrop/{Backdrop.vue → VtsBackdrop.vue} +0 -0
  132. /package/lib/components/divider/{Divider.vue → VtsDivider.vue} +0 -0
@@ -1,6 +1,6 @@
1
1
  <!-- WIP -->
2
2
  <template>
3
- <UiSpinner v-if="busy" class="vts-icon" />
3
+ <UiLoader v-if="busy" class="vts-icon" />
4
4
  <div v-else-if="overlayIcon !== undefined && icon !== undefined" class="vts-icon stacked" :class="accent">
5
5
  <FontAwesomeIcon :fixed-width="fixedWidth" :icon />
6
6
  <FontAwesomeIcon class="overlay-icon" :fixed-width="fixedWidth" :icon="overlayIcon" />
@@ -9,11 +9,11 @@
9
9
  </template>
10
10
 
11
11
  <script lang="ts" setup>
12
- import UiSpinner from '@core/components/UiSpinner.vue'
12
+ import UiLoader from '@core/components/ui/loader/UiLoader.vue'
13
13
  import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
14
14
  import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
15
15
 
16
- export type IconAccent = 'current' | 'brand' | 'success' | 'warning' | 'danger'
16
+ export type IconAccent = 'current' | 'brand' | 'info' | 'success' | 'warning' | 'danger'
17
17
 
18
18
  defineProps<{
19
19
  accent: IconAccent
@@ -25,71 +25,67 @@ defineProps<{
25
25
  </script>
26
26
 
27
27
  <style lang="postcss" scoped>
28
- /*
29
- ACCENT
30
- --vts-icon--color
31
- --vts-icon__overlay-icon--color
32
- */
33
28
  .vts-icon {
34
- &.current {
35
- --vts-icon--color: currentColor;
29
+ &.stacked {
30
+ display: inline-grid;
31
+ place-items: center;
36
32
 
37
- &.stacked {
38
- --vts-icon__overlay-icon--color: var(--color-neutral-background-primary);
33
+ svg {
34
+ grid-area: 1 / -1;
35
+
36
+ &:last-child {
37
+ font-size: 50%;
38
+ }
39
39
  }
40
40
  }
41
41
 
42
- &.brand {
43
- --vts-icon--color: var(--color-normal-item-base);
42
+ /* COLOR VARIANTS */
43
+
44
+ &.current {
45
+ color: currentColor;
44
46
 
45
- &.stacked {
46
- --vts-icon__overlay-icon--color: var(--color-normal-txt-item);
47
+ .overlay-icon {
48
+ color: var(--color-neutral-background-primary);
47
49
  }
48
50
  }
49
51
 
50
- &.success {
51
- --vts-icon--color: var(--color-success-item-base);
52
+ &.brand {
53
+ color: var(--color-info-item-base);
52
54
 
53
- &.stacked {
54
- --vts-icon__overlay-icon--color: var(--color-success-txt-item);
55
+ .overlay-icon {
56
+ color: var(--color-info-txt-item);
55
57
  }
56
58
  }
57
59
 
58
- &.warning {
59
- --vts-icon--color: var(--color-warning-item-base);
60
+ &.info {
61
+ color: var(--color-info-item-base);
60
62
 
61
- &.stacked {
62
- --vts-icon__overlay-icon--color: var(--color-warning-txt-item);
63
+ .overlay-icon {
64
+ color: var(--color-info-txt-item);
63
65
  }
64
66
  }
65
67
 
66
- &.danger {
67
- --vts-icon--color: var(--color-danger-item-base);
68
+ &.success {
69
+ color: var(--color-success-item-base);
68
70
 
69
- &.stacked {
70
- --vts-icon__overlay-icon--color: var(--color-danger-txt-item);
71
+ .overlay-icon {
72
+ color: var(--color-success-txt-item);
71
73
  }
72
74
  }
73
- }
74
75
 
75
- /* IMPLEMENTATION */
76
- .vts-icon {
77
- color: var(--vts-icon--color);
78
-
79
- &.stacked {
80
- display: inline-grid;
81
- place-items: center;
76
+ &.warning {
77
+ color: var(--color-warning-item-base);
82
78
 
83
79
  .overlay-icon {
84
- color: var(--vts-icon__overlay-icon--color);
80
+ color: var(--color-warning-txt-item);
85
81
  }
82
+ }
86
83
 
87
- svg {
88
- grid-area: 1 / -1;
84
+ &.danger {
85
+ color: var(--color-danger-item-base);
89
86
 
90
- &:last-child {
91
- font-size: 0.75rem;
92
- }
87
+ .overlay-icon {
88
+ color: var(--color-danger-txt-item);
93
89
  }
94
90
  }
95
91
  }
@@ -1,8 +1,7 @@
1
- <!-- v1.0 -->
2
1
  <template>
3
2
  <div
4
3
  :class="{ locked: sidebar.isLocked && !ui.isMobile, expanded: sidebar.isExpanded, mobile: ui.isMobile }"
5
- class="layout-sidebar"
4
+ class="vts-layout-sidebar"
6
5
  >
7
6
  <div v-if="!ui.isMobile" class="lock">
8
7
  <UiButtonIcon
@@ -10,17 +9,19 @@
10
9
  content: sidebar.isLocked ? $t('core.sidebar.unlock') : $t('core.sidebar.lock'),
11
10
  placement: 'right',
12
11
  }"
12
+ accent="info"
13
+ size="medium"
13
14
  :icon="sidebar.isLocked ? faLock : faLockOpen"
14
15
  @click="sidebar.toggleLock()"
15
16
  />
16
17
  </div>
17
- <div v-if="$slots.header">
18
+ <div v-if="slots.header">
18
19
  <slot name="header" />
19
20
  </div>
20
21
  <div class="content">
21
22
  <slot />
22
23
  </div>
23
- <div v-if="$slots.footer">
24
+ <div v-if="slots.footer">
24
25
  <slot name="footer" />
25
26
  </div>
26
27
  <div
@@ -33,16 +34,16 @@
33
34
  </template>
34
35
 
35
36
  <script lang="ts" setup>
36
- import UiButtonIcon from '@core/components/button/ButtonIcon.vue'
37
+ import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
37
38
  import { vTooltip } from '@core/directives/tooltip.directive'
38
39
  import { useSidebarStore } from '@core/stores/sidebar.store'
39
40
  import { useUiStore } from '@core/stores/ui.store'
40
41
  import { faLock, faLockOpen } from '@fortawesome/free-solid-svg-icons'
41
42
 
42
- defineSlots<{
43
- header(): any
43
+ const slots = defineSlots<{
44
44
  default(): any
45
- footer(): any
45
+ header?(): any
46
+ footer?(): any
46
47
  }>()
47
48
 
48
49
  const sidebar = useSidebarStore()
@@ -50,7 +51,7 @@ const ui = useUiStore()
50
51
  </script>
51
52
 
52
53
  <style lang="postcss" scoped>
53
- .layout-sidebar {
54
+ .vts-layout-sidebar {
54
55
  display: flex;
55
56
  flex-direction: column;
56
57
  height: 100%;
@@ -70,31 +71,31 @@ const ui = useUiStore()
70
71
  position: absolute;
71
72
  transform: translateX(v-bind('sidebar.cssOffset'));
72
73
  }
73
- }
74
74
 
75
- .lock {
76
- text-align: right;
77
- padding: 0.8rem;
78
- }
75
+ .lock {
76
+ text-align: right;
77
+ padding: 0.8rem;
78
+ }
79
79
 
80
- .content {
81
- flex: 1;
82
- overflow: auto;
83
- }
80
+ .content {
81
+ flex: 1;
82
+ overflow: auto;
83
+ }
84
84
 
85
- .resize-handle {
86
- position: absolute;
87
- inset: 0 0 0 auto;
88
- width: 0.8rem;
89
- background-color: transparent;
90
- cursor: col-resize;
91
- transition: background-color 0.4s;
92
- user-select: none;
85
+ .resize-handle {
86
+ position: absolute;
87
+ inset: 0 0 0 auto;
88
+ width: 0.8rem;
89
+ background-color: transparent;
90
+ cursor: col-resize;
91
+ transition: background-color 0.4s;
92
+ user-select: none;
93
93
 
94
- &:hover,
95
- &.active {
96
- background-color: var(--color-neutral-border);
97
- transition: background-color 0.05s;
94
+ &:hover,
95
+ &.active {
96
+ background-color: var(--color-neutral-border);
97
+ transition: background-color 0.05s;
98
+ }
98
99
  }
99
100
  }
100
101
  </style>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <div class="vts-legend-group">
3
+ <UiLegendTitle v-if="title" :icon="title.icon" :icon-tooltip="title.iconTooltip">
4
+ {{ title.label }}
5
+ </UiLegendTitle>
6
+ <VtsLegendList class="list">
7
+ <UiLegend
8
+ v-for="item in items"
9
+ :key="item.label"
10
+ :accent="item.accent"
11
+ :tooltip="item.tooltip"
12
+ :unit="item.unit"
13
+ :value="item.value"
14
+ >
15
+ {{ item.label }}
16
+ </UiLegend>
17
+ </VtsLegendList>
18
+ </div>
19
+ </template>
20
+
21
+ <script lang="ts" setup>
22
+ import VtsLegendList from '@core/components/legend-list/VtsLegendList.vue'
23
+ import UiLegend, { type LegendItemProps } from '@core/components/ui/legend/UiLegend.vue'
24
+ import UiLegendTitle, { type LegendTitleProps } from '@core/components/ui/legend-title/UiLegendTitle.vue'
25
+
26
+ export type LegendGroupProps = {
27
+ items: (LegendItemProps & { label: string })[]
28
+ title?: LegendTitleProps & { label: string }
29
+ }
30
+
31
+ defineProps<LegendGroupProps>()
32
+ </script>
33
+
34
+ <style lang="postcss" scoped>
35
+ .vts-legend-group {
36
+ display: flex;
37
+ flex-direction: column;
38
+ gap: 0.8rem;
39
+
40
+ .list {
41
+ padding-left: 1.6rem;
42
+ }
43
+ }
44
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ul class="legend-list" :class="{ horizontal }">
2
+ <ul class="vts-legend-list" :class="{ horizontal }">
3
3
  <slot />
4
4
  </ul>
5
5
  </template>
@@ -15,7 +15,7 @@ defineSlots<{
15
15
  </script>
16
16
 
17
17
  <style lang="postcss" scoped>
18
- .legend-list {
18
+ .vts-legend-list {
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  gap: 0.4rem;
@@ -40,12 +40,12 @@ defineProps<{
40
40
  cursor: pointer;
41
41
 
42
42
  &:hover {
43
- background-color: var(--color-normal-background-selected);
43
+ background-color: var(--color-info-background-selected);
44
44
  }
45
45
 
46
46
  &:active,
47
47
  &.active {
48
- background-color: var(--color-normal-background-hover);
48
+ background-color: var(--color-info-background-hover);
49
49
  }
50
50
  }
51
51
  }
@@ -1,25 +1,25 @@
1
1
  <template>
2
- <div class="stacked-bar-with-legend">
3
- <StackedBar :segments :max-value="maxValue" />
4
- <LegendList class="list" :horizontal="uiStore.isDesktop">
5
- <LegendItem
2
+ <div class="vts-stacked-bar-with-legend">
3
+ <UiStackedBar :segments :max-value="maxValue" />
4
+ <VtsLegendList class="list" :horizontal="uiStore.isDesktop">
5
+ <UiLegend
6
6
  v-for="segment in segments"
7
7
  :key="segment.label"
8
- :color="segment.color"
8
+ :accent="segment.accent"
9
9
  :tooltip="segment.tooltip"
10
10
  :unit="segment.unit"
11
11
  :value="segment.value"
12
12
  >
13
13
  {{ segment.label }}
14
- </LegendItem>
15
- </LegendList>
14
+ </UiLegend>
15
+ </VtsLegendList>
16
16
  </div>
17
17
  </template>
18
18
 
19
19
  <script setup lang="ts">
20
- import LegendItem, { type LegendItemProps } from '@core/components/legend/LegendItem.vue'
21
- import LegendList from '@core/components/legend/LegendList.vue'
22
- import StackedBar, { type StackedBarProps } from '@core/components/stacked-bar/StackedBar.vue'
20
+ import VtsLegendList from '@core/components/legend-list/VtsLegendList.vue'
21
+ import UiLegend, { type LegendItemProps } from '@core/components/ui/legend/UiLegend.vue'
22
+ import UiStackedBar, { type StackedBarProps } from '@core/components/ui/stacked-bar/UiStackedBar.vue'
23
23
  import { useUiStore } from '@core/stores/ui.store'
24
24
 
25
25
  type Segment = StackedBarProps['segments'][number] & LegendItemProps & { label: string }
@@ -35,13 +35,13 @@ const uiStore = useUiStore()
35
35
  </script>
36
36
 
37
37
  <style scoped lang="postcss">
38
- .stacked-bar-with-legend {
38
+ .vts-stacked-bar-with-legend {
39
39
  display: flex;
40
40
  flex-direction: column;
41
41
  gap: 0.4rem;
42
- }
43
42
 
44
- .list {
45
- margin-inline-start: auto;
43
+ .list {
44
+ margin-inline-start: auto;
45
+ }
46
46
  }
47
47
  </style>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <VtsStateHero :type class="vts-coming-soon-hero" image="under-construction">
3
+ {{ $t('coming-soon') }}
4
+ </VtsStateHero>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
9
+
10
+ defineProps<{
11
+ type: StateHeroType
12
+ }>()
13
+ </script>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <VtsStateHero v-if="!disabled" :type busy class="vts-loading-hero">
3
+ {{ $t('loading-in-progress') }}
4
+ </VtsStateHero>
5
+ <slot v-else />
6
+ </template>
7
+
8
+ <script lang="ts" setup>
9
+ import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
10
+
11
+ defineProps<{
12
+ type: StateHeroType
13
+ disabled?: boolean
14
+ }>()
15
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <VtsStateHero class="vts-no-data-hero" image="no-data" :type>{{ $t('no-data') }}</VtsStateHero>
3
+ </template>
4
+
5
+ <script lang="ts" setup>
6
+ import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
7
+
8
+ defineProps<{
9
+ type: StateHeroType
10
+ }>()
11
+ </script>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <VtsStateHero class="vts-object-not-found-hero" image="no-result" type="page">
3
+ {{ $t('object-not-found', { id }) }}
4
+ </VtsStateHero>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ import VtsStateHero from '@core/components/state-hero/VtsStateHero.vue'
9
+
10
+ defineProps<{
11
+ id: string
12
+ }>()
13
+ </script>
@@ -0,0 +1,117 @@
1
+ <template>
2
+ <div :class="type" class="vts-state-hero">
3
+ <UiLoader v-if="busy" class="loader" />
4
+ <img v-else-if="imageSrc" :src="imageSrc" alt="" class="image" />
5
+ <p v-if="slots.default" :class="typoClass" class="text">
6
+ <slot />
7
+ </p>
8
+ </div>
9
+ </template>
10
+
11
+ <script lang="ts" setup>
12
+ import UiLoader from '@core/components/ui/loader/UiLoader.vue'
13
+ import { computed } from 'vue'
14
+
15
+ export type StateHeroType = 'page' | 'card' | 'panel'
16
+
17
+ const props = defineProps<{
18
+ type: StateHeroType
19
+ busy?: boolean
20
+ image?: 'no-result' | 'under-construction' | 'no-data' | 'no-selection' | 'error' // TODO: 'offline' | 'not-found' | 'all-good' | 'all-done''
21
+ }>()
22
+
23
+ const slots = defineSlots<{
24
+ default?(): any
25
+ }>()
26
+
27
+ const typoClass = computed(() => (props.type === 'page' ? 'typo h2-black' : 'typo h4-medium'))
28
+
29
+ const imageSrc = computed(() => {
30
+ if (!props.image) {
31
+ return undefined
32
+ }
33
+
34
+ return new URL(`../../assets/${props.image}.svg`, import.meta.url).href
35
+ })
36
+ </script>
37
+
38
+ <style lang="postcss" scoped>
39
+ .vts-state-hero {
40
+ flex: 1;
41
+ display: flex;
42
+ flex-direction: column;
43
+ align-items: center;
44
+ justify-content: center;
45
+
46
+ .loader,
47
+ .text {
48
+ color: var(--color-info-txt-base);
49
+ }
50
+
51
+ .image {
52
+ order: 2;
53
+ }
54
+
55
+ .text {
56
+ order: 3;
57
+ }
58
+
59
+ &.page {
60
+ gap: 2.4rem;
61
+
62
+ .text {
63
+ order: 3;
64
+ }
65
+
66
+ .loader {
67
+ order: 1;
68
+ font-size: 10rem;
69
+ }
70
+
71
+ .image {
72
+ order: 2;
73
+ width: 90%;
74
+ max-height: none;
75
+ }
76
+ }
77
+
78
+ &.card {
79
+ gap: 2rem;
80
+
81
+ .text {
82
+ order: 3;
83
+ }
84
+
85
+ .loader {
86
+ font-size: 6rem;
87
+ order: 1;
88
+ }
89
+
90
+ .image {
91
+ order: 2;
92
+ width: 70%;
93
+ max-height: 20rem;
94
+ }
95
+ }
96
+
97
+ &.panel {
98
+ gap: 4rem;
99
+ justify-content: unset;
100
+ padding-top: 8rem;
101
+
102
+ .text {
103
+ order: 1;
104
+ }
105
+
106
+ .loader {
107
+ order: 3;
108
+ font-size: 6.4rem;
109
+ }
110
+
111
+ .image {
112
+ order: 2;
113
+ width: 80%;
114
+ }
115
+ }
116
+ }
117
+ </style>
@@ -47,20 +47,20 @@ const classNames = computed(() => {
47
47
 
48
48
  &:is(:hover, .hover, :focus-visible) {
49
49
  --color: var(--color-neutral-txt-primary);
50
- --border-color: var(--color-normal-item-hover);
51
- --background-color: var(--color-normal-background-hover);
50
+ --border-color: var(--color-info-item-hover);
51
+ --background-color: var(--color-info-background-hover);
52
52
  }
53
53
 
54
54
  &:is(:active, .pressed) {
55
55
  --color: var(--color-neutral-txt-primary);
56
- --border-color: var(--color-normal-item-active);
57
- --background-color: var(--color-normal-background-active);
56
+ --border-color: var(--color-info-item-active);
57
+ --background-color: var(--color-info-background-active);
58
58
  }
59
59
 
60
60
  &:is(.active, .selected) {
61
61
  --color: var(--color-neutral-txt-primary);
62
- --border-color: var(--color-normal-item-base);
63
- --background-color: var(--color-normal-background-selected);
62
+ --border-color: var(--color-info-item-base);
63
+ --background-color: var(--color-info-background-selected);
64
64
  }
65
65
 
66
66
  &:is(:disabled, .disabled) {
@@ -95,22 +95,22 @@ const updateInteraction = (interaction: Interaction) => {
95
95
  <style lang="postcss" scoped>
96
96
  /* COLOR VARIANTS */
97
97
  .column-header.interactive {
98
- --color: var(--color-normal-txt-base);
98
+ --color: var(--color-info-txt-base);
99
99
  --background-color: var(--color-neutral-background-primary);
100
100
 
101
101
  &.focus {
102
- --color: var(--color-normal-txt-base);
103
- --background-color: var(--color-normal-background-selected);
102
+ --color: var(--color-info-txt-base);
103
+ --background-color: var(--color-info-background-selected);
104
104
  }
105
105
 
106
106
  &:hover {
107
- --color: var(--color-normal-txt-hover);
108
- --background-color: var(--color-normal-background-hover);
107
+ --color: var(--color-info-txt-hover);
108
+ --background-color: var(--color-info-background-hover);
109
109
  }
110
110
 
111
111
  &:active {
112
- --color: var(--color-normal-txt-active);
113
- --background-color: var(--color-normal-background-active);
112
+ --color: var(--color-info-txt-active);
113
+ --background-color: var(--color-info-background-active);
114
114
  }
115
115
 
116
116
  &.disabled {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <table :class="{ 'vertical-border': verticalBorder }" class="ui-table typo p2-regular">
2
+ <table :class="{ 'vertical-border': verticalBorder }" class="vts-table typo p2-regular">
3
3
  <slot />
4
4
  </table>
5
5
  </template>
@@ -12,11 +12,15 @@ const props = defineProps<{
12
12
  verticalBorder?: boolean
13
13
  }>()
14
14
 
15
+ defineSlots<{
16
+ default(): any
17
+ }>()
18
+
15
19
  provide('tableName', props.name)
16
20
  </script>
17
21
 
18
22
  <style lang="postcss" scoped>
19
- .ui-table {
23
+ .vts-table {
20
24
  width: 100%;
21
25
  border-spacing: 0;
22
26
  background-color: var(--color-neutral-background-primary);
@@ -39,7 +43,7 @@ provide('tableName', props.name)
39
43
  :deep(thead) {
40
44
  th,
41
45
  td {
42
- color: var(--color-normal-txt-base);
46
+ color: var(--color-info-txt-base);
43
47
  font-size: 1.4rem;
44
48
  font-weight: 400;
45
49
  text-transform: uppercase;
@@ -1,24 +1,25 @@
1
1
  <template>
2
- <ButtonIcon
2
+ <UiButtonIcon
3
3
  ref="buttonRef"
4
4
  v-tooltip="{ content: $t('tasks.quick-view'), placement: 'bottom-end' }"
5
+ accent="info"
5
6
  :dot="hasNewTask"
6
7
  :icon="faBarsProgress"
7
8
  size="large"
8
9
  @click="isPanelOpen = true"
9
10
  />
10
11
  <Teleport v-if="isPanelOpen" to="body">
11
- <Backdrop @click="isPanelOpen = false" />
12
- <QuickTaskPanel ref="panelRef" :loading :tasks />
12
+ <VtsBackdrop @click="isPanelOpen = false" />
13
+ <UiQuickTaskPanel ref="panelRef" :loading :tasks />
13
14
  </Teleport>
14
15
  </template>
15
16
 
16
17
  <script lang="ts" setup>
17
- import Backdrop from '@core/components/backdrop/Backdrop.vue'
18
- import ButtonIcon from '@core/components/button/ButtonIcon.vue'
19
- import QuickTaskPanel from '@core/components/task/QuickTaskPanel.vue'
18
+ import VtsBackdrop from '@core/components/backdrop/VtsBackdrop.vue'
19
+ import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
20
+ import type { Task } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
21
+ import UiQuickTaskPanel from '@core/components/ui/quick-task-panel/UiQuickTaskPanel.vue'
20
22
  import { vTooltip } from '@core/directives/tooltip.directive'
21
- import type { Task } from '@core/types/task.type'
22
23
  import { faBarsProgress } from '@fortawesome/free-solid-svg-icons'
23
24
  import { unrefElement, watchArray, whenever } from '@vueuse/core'
24
25
  import placementJs from 'placement.js'