@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.
Files changed (124) 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/components/backup-item/VtsBackupItem.vue +47 -0
  5. package/lib/components/backup-state/{BackupState.vue → VtsBackupState.vue} +4 -4
  6. package/lib/components/{button/ButtonGroup.vue → button-group/VtsButtonGroup.vue} +7 -6
  7. package/lib/components/cell-object/{CellObject.vue → VtsCellObject.vue} +14 -14
  8. package/lib/components/cell-text/{CellText.vue → VtsCellText.vue} +11 -11
  9. package/lib/components/console/{RemoteConsole.vue → VtsRemoteConsole.vue} +12 -18
  10. package/lib/components/donut-chart-with-legend/{DonutChartWithLegend.vue → VtsDonutChartWithLegend.vue} +6 -6
  11. package/lib/components/dropdown/DropdownItem.vue +8 -14
  12. package/lib/components/dropdown/DropdownTitle.vue +3 -3
  13. package/lib/components/icon/VtsIcon.vue +38 -42
  14. package/lib/components/layout/{LayoutSidebar.vue → VtsLayoutSidebar.vue} +31 -30
  15. package/lib/components/legend-group/VtsLegendGroup.vue +44 -0
  16. package/lib/components/{legend/LegendList.vue → legend-list/VtsLegendList.vue} +2 -2
  17. package/lib/components/menu/MenuTrigger.vue +2 -2
  18. package/lib/components/stacked-bar-with-legend/{StackedBarWithLegend.vue → VtsStackedBarWithLegend.vue} +14 -14
  19. package/lib/components/state-hero/VtsComingSoonHero.vue +13 -0
  20. package/lib/components/state-hero/VtsLoadingHero.vue +15 -0
  21. package/lib/components/state-hero/VtsNoDataHero.vue +11 -0
  22. package/lib/components/state-hero/VtsObjectNotFoundHero.vue +13 -0
  23. package/lib/components/state-hero/{StateHero.vue → VtsStateHero.vue} +42 -35
  24. package/lib/components/tab/TabItem.vue +6 -6
  25. package/lib/components/table/ColumnTitle.vue +7 -7
  26. package/lib/components/table/{UiTable.vue → VtsTable.vue} +7 -3
  27. package/lib/components/task/{QuickTaskButton.vue → VtsQuickTaskButton.vue} +8 -7
  28. package/lib/components/task/{QuickTaskList.vue → VtsQuickTaskList.vue} +10 -11
  29. package/lib/components/task/{QuickTaskTabBar.vue → VtsQuickTaskTabBar.vue} +9 -13
  30. package/lib/components/{tooltip/TooltipList.vue → tooltip-list/VtsTooltipList.vue} +2 -3
  31. package/lib/components/tree/{TreeItem.vue → VtsTreeItem.vue} +3 -4
  32. package/lib/components/tree/VtsTreeItemError.vue +18 -0
  33. package/lib/components/tree/{TreeLine.vue → VtsTreeLine.vue} +9 -11
  34. package/lib/components/tree/{TreeList.vue → VtsTreeList.vue} +5 -2
  35. package/lib/components/tree/VtsTreeLoadingItem.vue +61 -0
  36. package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +64 -0
  37. package/lib/components/ui/actions-title/UiActionsTitle.vue +18 -0
  38. package/lib/components/ui/button/UiButton.vue +532 -0
  39. package/lib/components/ui/button-icon/UiButtonIcon.vue +248 -0
  40. package/lib/components/{UiCard.vue → ui/card/UiCard.vue} +8 -6
  41. package/lib/components/ui/card-numbers/UiCardNumbers.vue +103 -0
  42. package/lib/components/ui/card-subtitle/UiCardSubtitle.vue +24 -0
  43. package/lib/components/ui/card-title/UiCardTitle.vue +56 -0
  44. package/lib/components/ui/checkbox/UiCheckbox.vue +410 -0
  45. package/lib/components/ui/checkbox-group/UiCheckboxGroup.vue +57 -0
  46. package/lib/components/ui/chip/ChipIcon.vue +21 -0
  47. package/lib/components/ui/chip/ChipRemoveIcon.vue +13 -0
  48. package/lib/components/ui/chip/UiChip.vue +135 -0
  49. package/lib/components/{icon/ComplexIcon.vue → ui/complex-icon/UiComplexIcon.vue} +21 -27
  50. package/lib/components/ui/counter/UiCounter.vue +134 -0
  51. package/lib/components/{donut-chart/DonutChart.vue → ui/donut-chart/UiDonutChart.vue} +28 -30
  52. package/lib/components/{head-bar/HeadBar.vue → ui/head-bar/UiHeadBar.vue} +31 -31
  53. package/lib/components/{info/VtsInfo.vue → ui/info/UiInfo.vue} +13 -11
  54. package/lib/components/{input → ui/input}/UiInput.vue +9 -7
  55. package/lib/components/ui/input/UiTextarea.vue +120 -0
  56. package/lib/components/ui/label/UiLabel.vue +76 -0
  57. package/lib/components/ui/legend/UiLegend.vue +98 -0
  58. package/lib/components/{LegendTitle.vue → ui/legend-title/UiLegendTitle.vue} +4 -4
  59. package/lib/components/{UiSpinner.vue → ui/loader/UiLoader.vue} +3 -3
  60. package/lib/components/{icon/ObjectIcon.vue → ui/object-icon/UiObjectIcon.vue} +44 -36
  61. package/lib/components/ui/object-link/UiObjectLink.vue +83 -0
  62. package/lib/components/ui/panel/UiPanel.vue +57 -0
  63. package/lib/components/{query-search-bar/QuerySearchBar.vue → ui/query-search-bar/UiQuerySearchBar.vue} +16 -16
  64. package/lib/components/{task/QuickTaskItem.vue → ui/quick-task-item/UiQuickTaskItem.vue} +46 -34
  65. package/lib/components/{task/QuickTaskPanel.vue → ui/quick-task-panel/UiQuickTaskPanel.vue} +8 -7
  66. package/lib/components/ui/radio-button/UiRadioButton.vue +196 -0
  67. package/lib/components/ui/radio-button-group/UiRadioButtonGroup.vue +56 -0
  68. package/lib/components/{stacked-bar → ui/stacked-bar}/StackedBarSegment.vue +23 -26
  69. package/lib/components/{stacked-bar/StackedBar.vue → ui/stacked-bar/UiStackedBar.vue} +6 -6
  70. package/lib/components/ui/table-actions/UiTableActions.vue +46 -0
  71. package/lib/components/ui/tag/UiTag.vue +118 -0
  72. package/lib/components/ui/title/UiTitle.vue +39 -0
  73. package/lib/components/ui/toaster/UiToaster.vue +100 -0
  74. package/lib/components/ui/toggle/UiToggle.vue +117 -0
  75. package/lib/components/{tooltip/TooltipItem.vue → ui/tooltip/UiTooltip.vue} +15 -15
  76. package/lib/components/ui/top-bottom-table/UiTopBottomTable.vue +64 -0
  77. package/lib/components/{tree/TreeItemLabel.vue → ui/tree-item-label/UiTreeItemLabel.vue} +60 -59
  78. package/lib/components/ui/user-link/UiUserLink.vue +76 -0
  79. package/lib/components/ui/user-logo/UiUserLogo.vue +50 -0
  80. package/lib/composables/route-query.composable.md +136 -0
  81. package/lib/composables/table.composable.md +159 -0
  82. package/lib/composables/tree/define-tree.ts +1 -1
  83. package/lib/composables/tree/tree-node-base.ts +6 -6
  84. package/lib/composables/tree.composable.md +536 -0
  85. package/lib/layouts/CoreLayout.vue +8 -6
  86. package/lib/locales/de.json +3 -2
  87. package/lib/locales/en.json +7 -3
  88. package/lib/locales/fa.json +3 -2
  89. package/lib/locales/fr.json +7 -3
  90. package/lib/types/color.type.ts +0 -2
  91. package/lib/types/subscribable-store.type.ts +2 -2
  92. package/lib/utils/create-subscribable-store-context.util.ts +1 -1
  93. package/lib/utils/if-else.utils.md +23 -0
  94. package/lib/utils/if-else.utils.ts +2 -2
  95. package/lib/utils/to-variants.util.md +62 -0
  96. package/package.json +7 -7
  97. package/lib/components/CardNumbers.vue +0 -101
  98. package/lib/components/PowerStateIcon.vue +0 -46
  99. package/lib/components/UiTag.vue +0 -101
  100. package/lib/components/backup-item/BackupItem.vue +0 -40
  101. package/lib/components/button/ButtonIcon.vue +0 -220
  102. package/lib/components/button/UiButton.vue +0 -470
  103. package/lib/components/card/CardSubtitle.vue +0 -24
  104. package/lib/components/card/CardTitle.vue +0 -57
  105. package/lib/components/chip/ChipIcon.vue +0 -30
  106. package/lib/components/chip/ChipRemoveIcon.vue +0 -13
  107. package/lib/components/chip/UiChip.vue +0 -137
  108. package/lib/components/counter/VtsCounter.vue +0 -147
  109. package/lib/components/legend/LegendGroup.vue +0 -44
  110. package/lib/components/legend/LegendItem.vue +0 -86
  111. package/lib/components/object-link/ObjectLink.vue +0 -87
  112. package/lib/components/state-hero/ComingSoonHero.vue +0 -13
  113. package/lib/components/state-hero/LoadingHero.vue +0 -15
  114. package/lib/components/state-hero/NoDataHero.vue +0 -11
  115. package/lib/components/state-hero/ObjectNotFoundHero.vue +0 -13
  116. package/lib/components/tree/TreeItemError.vue +0 -13
  117. package/lib/components/tree/TreeLoadingItem.vue +0 -60
  118. package/lib/components/user/UserLink.vue +0 -72
  119. package/lib/components/user/UserLogo.vue +0 -57
  120. package/lib/types/backup.type.ts +0 -11
  121. package/lib/types/size.type.ts +0 -1
  122. package/lib/types/task.type.ts +0 -13
  123. /package/lib/components/backdrop/{Backdrop.vue → VtsBackdrop.vue} +0 -0
  124. /package/lib/components/divider/{Divider.vue → VtsDivider.vue} +0 -0
@@ -12,21 +12,37 @@
12
12
 
13
13
  --color-neutral-border: #d0d0d5;
14
14
 
15
- /* NORMAL */
15
+ /* BRAND */
16
16
 
17
- --color-normal-txt-base: #6b63bf;
18
- --color-normal-txt-hover: color-mix(in srgb, #000000 20%, var(--color-normal-txt-base));
19
- --color-normal-txt-active: color-mix(in srgb, #000000 40%, var(--color-normal-txt-base));
17
+ --color-brand-txt-base: #6b63bf;
18
+ --color-brand-txt-hover: color-mix(in srgb, #000000 20%, var(--color-brand-txt-base));
19
+ --color-brand-txt-active: color-mix(in srgb, #000000 40%, var(--color-brand-txt-base));
20
20
 
21
- --color-normal-background-selected: color-mix(in srgb, #ffffff 90%, var(--color-normal-item-base));
22
- --color-normal-background-hover: color-mix(in srgb, #ffffff 80%, var(--color-normal-item-base));
23
- --color-normal-background-active: color-mix(in srgb, #ffffff 70%, var(--color-normal-item-base));
21
+ --color-brand-background-selected: color-mix(in srgb, #ffffff 90%, var(--color-brand-item-base));
22
+ --color-brand-background-hover: color-mix(in srgb, #ffffff 80%, var(--color-brand-item-base));
23
+ --color-brand-background-active: color-mix(in srgb, #ffffff 70%, var(--color-brand-item-base));
24
24
 
25
- --color-normal-txt-item: #030029;
26
- --color-normal-item-base: #8f84ff;
27
- --color-normal-item-hover: color-mix(in srgb, #ffffff 20%, var(--color-normal-item-base));
28
- --color-normal-item-active: color-mix(in srgb, #ffffff 40%, var(--color-normal-item-base));
29
- --color-normal-item-disabled: #d2ceff;
25
+ --color-brand-txt-item: #030029;
26
+ --color-brand-item-base: #8f84ff;
27
+ --color-brand-item-hover: color-mix(in srgb, #ffffff 20%, var(--color-brand-item-base));
28
+ --color-brand-item-active: color-mix(in srgb, #ffffff 40%, var(--color-brand-item-base));
29
+ --color-brand-item-disabled: #d2ceff;
30
+
31
+ /* INFO */
32
+
33
+ --color-info-txt-base: #6b63bf;
34
+ --color-info-txt-hover: color-mix(in srgb, #000000 20%, var(--color-info-txt-base));
35
+ --color-info-txt-active: color-mix(in srgb, #000000 40%, var(--color-info-txt-base));
36
+
37
+ --color-info-background-selected: color-mix(in srgb, #ffffff 90%, var(--color-info-item-base));
38
+ --color-info-background-hover: color-mix(in srgb, #ffffff 80%, var(--color-info-item-base));
39
+ --color-info-background-active: color-mix(in srgb, #ffffff 70%, var(--color-info-item-base));
40
+
41
+ --color-info-txt-item: #030029;
42
+ --color-info-item-base: #8f84ff;
43
+ --color-info-item-hover: color-mix(in srgb, #ffffff 20%, var(--color-info-item-base));
44
+ --color-info-item-active: color-mix(in srgb, #ffffff 40%, var(--color-info-item-base));
45
+ --color-info-item-disabled: #d2ceff;
30
46
 
31
47
  /* SUCCESS */
32
48
 
@@ -91,21 +107,37 @@
91
107
 
92
108
  --color-neutral-border: #363647;
93
109
 
94
- /* NORMAL */
110
+ /* BRAND */
111
+
112
+ --color-brand-txt-base: #9b92ff;
113
+ --color-brand-txt-hover: color-mix(in srgb, #ffffff 20%, var(--color-brand-txt-base));
114
+ --color-brand-txt-active: color-mix(in srgb, #ffffff 40%, var(--color-brand-txt-base));
115
+
116
+ --color-brand-background-selected: color-mix(in srgb, #000000 70%, var(--color-brand-item-base));
117
+ --color-brand-background-hover: color-mix(in srgb, #000000 60%, var(--color-brand-item-base));
118
+ --color-brand-background-active: color-mix(in srgb, #000000 50%, var(--color-brand-item-base));
119
+
120
+ --color-brand-txt-item: #030029;
121
+ --color-brand-item-base: #8f84ff;
122
+ --color-brand-item-hover: color-mix(in srgb, #ffffff 20%, var(--color-brand-item-base));
123
+ --color-brand-item-active: color-mix(in srgb, #ffffff 40%, var(--color-brand-item-base));
124
+ --color-brand-item-disabled: #393566;
125
+
126
+ /* INFO */
95
127
 
96
- --color-normal-txt-base: #9b92ff;
97
- --color-normal-txt-hover: color-mix(in srgb, #ffffff 20%, var(--color-normal-txt-base));
98
- --color-normal-txt-active: color-mix(in srgb, #ffffff 40%, var(--color-normal-txt-base));
128
+ --color-info-txt-base: #9b92ff;
129
+ --color-info-txt-hover: color-mix(in srgb, #ffffff 20%, var(--color-info-txt-base));
130
+ --color-info-txt-active: color-mix(in srgb, #ffffff 40%, var(--color-info-txt-base));
99
131
 
100
- --color-normal-background-selected: color-mix(in srgb, #000000 70%, var(--color-normal-txt-base));
101
- --color-normal-background-hover: color-mix(in srgb, #000000 60%, var(--color-normal-txt-base));
102
- --color-normal-background-active: color-mix(in srgb, #000000 50%, var(--color-normal-txt-base));
132
+ --color-info-background-selected: color-mix(in srgb, #000000 70%, var(--color-info-item-base));
133
+ --color-info-background-hover: color-mix(in srgb, #000000 60%, var(--color-info-item-base));
134
+ --color-info-background-active: color-mix(in srgb, #000000 50%, var(--color-info-item-base));
103
135
 
104
- --color-normal-txt-item: #030029;
105
- --color-normal-item-base: #8f84ff;
106
- --color-normal-item-hover: color-mix(in srgb, #ffffff 20%, var(--color-normal-item-base));
107
- --color-normal-item-active: color-mix(in srgb, #ffffff 40%, var(--color-normal-item-base));
108
- --color-normal-item-disabled: #393566;
136
+ --color-info-txt-item: #030029;
137
+ --color-info-item-base: #8f84ff;
138
+ --color-info-item-hover: color-mix(in srgb, #ffffff 20%, var(--color-info-item-base));
139
+ --color-info-item-active: color-mix(in srgb, #ffffff 40%, var(--color-info-item-base));
140
+ --color-info-item-disabled: #393566;
109
141
 
110
142
  /* SUCCESS */
111
143
 
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  .context-color-info {
14
- color: var(--color-normal-txt-base);
14
+ color: var(--color-info-txt-base);
15
15
  }
16
16
 
17
17
  .context-background-color-success {
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  .context-background-color-info {
30
- background-color: var(--color-normal-background-selected);
30
+ background-color: var(--color-info-background-selected);
31
31
  }
32
32
 
33
33
  .context-border-color-success {
@@ -43,18 +43,18 @@
43
43
  }
44
44
 
45
45
  .context-border-color-info {
46
- border-color: var(--color-normal-txt-base);
46
+ border-color: var(--color-info-txt-base);
47
47
  }
48
48
 
49
49
  .color-context-info {
50
- --color-context-primary: var(--color-normal-txt-base);
51
- --color-context-primary-hover: var(--color-normal-txt-hover);
52
- --color-context-primary-active: var(--color-normal-txt-active);
50
+ --color-context-primary: var(--color-info-txt-base);
51
+ --color-context-primary-hover: var(--color-info-txt-hover);
52
+ --color-context-primary-active: var(--color-info-txt-active);
53
53
  --color-context-primary-disabled: var(--color-neutral-txt-secondary);
54
54
 
55
- --color-context-secondary: var(--color-normal-background-selected);
56
- --color-context-secondary-hover: var(--color-normal-background-selected);
57
- --color-context-secondary-active: var(--color-normal-background-active);
55
+ --color-context-secondary: var(--color-info-background-selected);
56
+ --color-context-secondary-hover: var(--color-info-background-selected);
57
+ --color-context-secondary-active: var(--color-info-background-active);
58
58
 
59
59
  --color-context-tertiary: var(--color-neutral-background-primary);
60
60
  }
@@ -19,8 +19,8 @@
19
19
 
20
20
  --scrollbar-width: 1.4rem;
21
21
  --scrollbar-border: 0.4rem;
22
- --scrollbar-thumb-color: var(--color-normal-item-active);
23
- --scrollbar-track-color: var(--color-normal-background-selected);
22
+ --scrollbar-thumb-color: var(--color-info-item-active);
23
+ --scrollbar-track-color: var(--color-info-background-selected);
24
24
 
25
25
  /* Firefox/Gecko and Chrome versions >= 121 */
26
26
  scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  a {
48
- color: var(--color-normal-txt-base);
48
+ color: var(--color-info-txt-base);
49
49
  }
50
50
 
51
51
  code,
@@ -62,17 +62,17 @@ pre {
62
62
 
63
63
  .link {
64
64
  text-decoration: underline;
65
- color: var(--color-normal-txt-base);
65
+ color: var(--color-info-txt-base);
66
66
  cursor: pointer;
67
67
  }
68
68
 
69
69
  .link:hover {
70
- color: var(--color-normal-txt-hover);
70
+ color: var(--color-info-txt-hover);
71
71
  }
72
72
 
73
73
  .link:active,
74
74
  .link.router-link-active {
75
- color: var(--color-normal-txt-active);
75
+ color: var(--color-info-txt-active);
76
76
  }
77
77
 
78
78
  .link.router-link-active {
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <div class="vts-backup-item">
3
+ <RouterLink v-if="backup.route !== undefined" :to="backup.route">
4
+ {{ backup.label }}
5
+ </RouterLink>
6
+ <p v-else class="typo p3-medium">
7
+ {{ backup.label }}
8
+ </p>
9
+ <div class="states">
10
+ <VtsBackupState v-for="(state, index) in backup.states" :key="index" :state />
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script lang="ts" setup>
16
+ import VtsBackupState, { type BackupState } from '@core/components/backup-state/VtsBackupState.vue'
17
+ import type { RouteLocationRaw } from 'vue-router'
18
+
19
+ export type BackupStates = BackupState[]
20
+
21
+ export type Backup = {
22
+ label: string
23
+ route?: RouteLocationRaw
24
+ states: BackupStates
25
+ }
26
+
27
+ defineProps<{
28
+ backup: Backup
29
+ }>()
30
+ </script>
31
+
32
+ <style lang="postcss" scoped>
33
+ .vts-backup-item {
34
+ padding: 0.8rem 0.4rem;
35
+ border-top: 0.1rem solid var(--color-neutral-border);
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 0.2rem;
39
+
40
+ .states {
41
+ margin-inline-start: auto;
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 0.2rem;
45
+ }
46
+ }
47
+ </style>
@@ -1,15 +1,15 @@
1
- <!-- v1.0 -->
2
1
  <template>
3
- <VtsIcon :accent="color" :icon class="backup-state" />
2
+ <VtsIcon :accent="color" :icon class="vts-backup-state" />
4
3
  </template>
5
4
 
6
5
  <script lang="ts" setup>
7
6
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
8
- import type { BackupState } from '@core/types/backup.type'
9
7
  import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
10
8
  import { faCheckCircle, faCircleMinus, faCircleXmark } from '@fortawesome/free-solid-svg-icons'
11
9
  import { computed } from 'vue'
12
10
 
11
+ export type BackupState = 'success' | 'failure' | 'partial'
12
+
13
13
  type Props = {
14
14
  state: BackupState
15
15
  }
@@ -27,7 +27,7 @@ const color = computed(() => states[props.state].color)
27
27
  </script>
28
28
 
29
29
  <style lang="postcss" scoped>
30
- .backup-state {
30
+ .vts-backup-state {
31
31
  font-size: 1rem;
32
32
  }
33
33
  </style>
@@ -1,7 +1,8 @@
1
- <!-- v1.0 -->
2
1
  <template>
3
- <div class="button-group">
4
- <div class="line"><slot /></div>
2
+ <div class="vts-button-group">
3
+ <div class="line">
4
+ <slot />
5
+ </div>
5
6
  <div v-if="slots.tertiary" class="line">
6
7
  <slot name="tertiary" />
7
8
  </div>
@@ -10,13 +11,13 @@
10
11
 
11
12
  <script lang="ts" setup>
12
13
  const slots = defineSlots<{
13
- default: () => void
14
- tertiary?: () => void
14
+ default(): any
15
+ tertiary?(): any
15
16
  }>()
16
17
  </script>
17
18
 
18
19
  <style lang="postcss" scoped>
19
- .button-group {
20
+ .vts-button-group {
20
21
  display: flex;
21
22
  flex-direction: column;
22
23
  align-items: center;
@@ -1,6 +1,6 @@
1
- <!-- v1.0 -->
1
+ <!-- WIP -->
2
2
  <template>
3
- <td class="cell-object">
3
+ <td class="vts-cell-object">
4
4
  <div class="data">
5
5
  <slot />
6
6
  <template v-if="id !== undefined">
@@ -10,9 +10,9 @@
10
10
  <UiButton
11
11
  v-if="isSupported && copiableId"
12
12
  :left-icon="faCopy"
13
- level="secondary"
13
+ variant="secondary"
14
14
  size="small"
15
- :color="copied ? 'success' : 'normal'"
15
+ :accent="copied ? 'success' : 'info'"
16
16
  @click="copy(id)"
17
17
  >
18
18
  {{ copied ? $t('core.copied') : $t('core.copy-id') }}
@@ -23,7 +23,7 @@
23
23
  </template>
24
24
 
25
25
  <script lang="ts" setup>
26
- import UiButton from '@core/components/button/UiButton.vue'
26
+ import UiButton from '@core/components/ui/button/UiButton.vue'
27
27
  import { vTooltip } from '@core/directives/tooltip.directive'
28
28
  import { faCopy } from '@fortawesome/free-solid-svg-icons'
29
29
  import { useClipboard } from '@vueuse/core'
@@ -37,18 +37,18 @@ const { isSupported, copy, copied } = useClipboard()
37
37
  </script>
38
38
 
39
39
  <style lang="postcss" scoped>
40
- .cell-object {
40
+ .vts-cell-object {
41
41
  padding: 0.8rem;
42
42
  border: 0.1rem solid var(--color-neutral-border);
43
- }
44
43
 
45
- .data {
46
- display: flex;
47
- gap: 1.6rem;
48
- align-items: center;
49
- }
44
+ .data {
45
+ display: flex;
46
+ gap: 1.6rem;
47
+ align-items: center;
48
+ }
50
49
 
51
- .id {
52
- color: var(--color-neutral-txt-secondary);
50
+ .id {
51
+ color: var(--color-neutral-txt-secondary);
52
+ }
53
53
  }
54
54
  </style>
@@ -1,6 +1,6 @@
1
- <!-- v1.0 -->
1
+ <!-- WIP -->
2
2
  <template>
3
- <td class="cell-text">
3
+ <td class="vts-cell-text">
4
4
  <div class="data typo p2-regular">
5
5
  <span v-tooltip class="text-ellipsis">
6
6
  <slot />
@@ -22,19 +22,19 @@ const slots = defineSlots<{
22
22
  </script>
23
23
 
24
24
  <style lang="postcss" scoped>
25
- .cell-text {
25
+ .vts-cell-text {
26
26
  padding: 0.8rem;
27
27
  border: 0.1rem solid var(--color-neutral-border);
28
28
  color: var(--color-neutral-txt-primary);
29
- }
30
29
 
31
- .data {
32
- display: flex;
33
- gap: 1.6rem;
34
- align-items: center;
35
- }
30
+ .data {
31
+ display: flex;
32
+ gap: 1.6rem;
33
+ align-items: center;
34
+ }
36
35
 
37
- .info {
38
- color: var(--color-neutral-txt-secondary);
36
+ .info {
37
+ color: var(--color-neutral-txt-secondary);
38
+ }
39
39
  }
40
40
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="uiStore.isMobile ? 'mobile' : undefined" class="remote-console">
2
+ <div :class="uiStore.isMobile ? 'mobile' : undefined" class="vts-remote-console">
3
3
  <div ref="consoleContainer" class="console" />
4
4
  </div>
5
5
  </template>
@@ -96,26 +96,20 @@ const uiStore = useUiStore()
96
96
  </script>
97
97
 
98
98
  <style lang="postcss" scoped>
99
- .remote-console {
100
- --padding: 0.8rem;
101
- --height: 80rem;
102
- --width: 100%;
99
+ .vts-remote-console {
100
+ padding: 0.8rem;
101
+ height: 80rem;
102
+ width: 100%;
103
+ max-width: 100%;
103
104
 
104
105
  &.mobile {
105
- --padding: 0.8rem 0;
106
- --height: 100%;
107
- --width: 95vw;
106
+ padding: 0.8rem 0;
107
+ height: 100%;
108
+ width: 95vw;
108
109
  }
109
- }
110
-
111
- .remote-console {
112
- padding: var(--padding);
113
- height: var(--height);
114
- width: var(--width);
115
- max-width: 100%;
116
- }
117
110
 
118
- .console {
119
- height: 100%;
111
+ .console {
112
+ height: 100%;
113
+ }
120
114
  }
121
115
  </style>
@@ -1,13 +1,13 @@
1
1
  <template>
2
- <div class="donut-chart-with-legend">
3
- <DonutChart :icon :segments />
4
- <LegendGroup :items="segments" :title />
2
+ <div class="vts-donut-chart-with-legend">
3
+ <UiDonutChart :icon :segments />
4
+ <VtsLegendGroup :items="segments" :title />
5
5
  </div>
6
6
  </template>
7
7
 
8
8
  <script lang="ts" setup>
9
- import DonutChart, { type DonutChartProps } from '@core/components/donut-chart/DonutChart.vue'
10
- import LegendGroup, { type LegendGroupProps } from '@core/components/legend/LegendGroup.vue'
9
+ import VtsLegendGroup, { type LegendGroupProps } from '@core/components/legend-group/VtsLegendGroup.vue'
10
+ import UiDonutChart, { type DonutChartProps } from '@core/components/ui/donut-chart/UiDonutChart.vue'
11
11
 
12
12
  export type DonutChartWithLegendProps = {
13
13
  segments: (DonutChartProps['segments'][number] & LegendGroupProps['items'][number])[]
@@ -19,7 +19,7 @@ defineProps<DonutChartWithLegendProps>()
19
19
  </script>
20
20
 
21
21
  <style lang="postcss" scoped>
22
- .donut-chart-with-legend {
22
+ .vts-donut-chart-with-legend {
23
23
  display: flex;
24
24
  align-items: center;
25
25
  gap: 3.2rem;
@@ -1,11 +1,6 @@
1
1
  <template>
2
2
  <div v-tooltip="{ selector: '.label' }" :class="[color, { disabled, selected }]" class="dropdown-item">
3
- <!-- TODO: replace with correct color typing when available -->
4
- <VtsIcon
5
- v-if="checkbox"
6
- :accent="color === 'normal' ? 'brand' : color"
7
- :icon="selected ? faSquareCheck : faSquare"
8
- />
3
+ <VtsIcon v-if="checkbox" :accent="color" :icon="selected ? faSquareCheck : faSquare" />
9
4
  <slot name="icon">
10
5
  <VtsIcon :icon accent="current" />
11
6
  </slot>
@@ -13,14 +8,13 @@
13
8
  <slot />
14
9
  </div>
15
10
  <div v-if="info" class="info-text p3 italic">{{ info }}</div>
16
- <VtsIcon v-if="arrow" :accent="disabled ? 'current' : 'brand'" :icon="faAngleRight" class="right-icon" />
11
+ <VtsIcon v-if="arrow" :accent="disabled ? 'current' : 'info'" :icon="faAngleRight" class="right-icon" />
17
12
  </div>
18
13
  </template>
19
14
 
20
15
  <script lang="ts" setup>
21
- import VtsIcon from '@core/components/icon/VtsIcon.vue'
16
+ import VtsIcon, { type IconAccent } from '@core/components/icon/VtsIcon.vue'
22
17
  import { vTooltip } from '@core/directives/tooltip.directive'
23
- import type { Color } from '@core/types/color.type'
24
18
  import { IK_DROPDOWN_CHECKBOX } from '@core/utils/injection-keys.util'
25
19
  import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
26
20
  import { faSquare } from '@fortawesome/free-regular-svg-icons'
@@ -29,7 +23,7 @@ import { computed, inject } from 'vue'
29
23
 
30
24
  defineProps<{
31
25
  arrow?: boolean
32
- color: Color
26
+ color: IconAccent
33
27
  disabled?: boolean
34
28
  icon?: IconDefinition
35
29
  info?: string
@@ -45,23 +39,23 @@ const checkbox = inject(
45
39
  <style lang="postcss" scoped>
46
40
  /* COLOR VARIANTS */
47
41
  .dropdown-item {
48
- &.normal {
42
+ &.info {
49
43
  --color: var(--color-neutral-txt-primary);
50
44
  --background-color: var(--color-neutral-background-primary);
51
45
 
52
46
  &:is(.active, .selected) {
53
47
  --color: var(--color-neutral-txt-primary);
54
- --background-color: var(--color-normal-background-selected);
48
+ --background-color: var(--color-info-background-selected);
55
49
  }
56
50
 
57
51
  &:is(:hover, .hover, :focus-visible) {
58
52
  --color: var(--color-neutral-txt-primary);
59
- --background-color: var(--color-normal-background-hover);
53
+ --background-color: var(--color-info-background-hover);
60
54
  }
61
55
 
62
56
  &:is(:active, .pressed) {
63
57
  --color: var(--color-neutral-txt-primary);
64
- --background-color: var(--color-normal-background-active);
58
+ --background-color: var(--color-info-background-active);
65
59
  }
66
60
 
67
61
  &.disabled {
@@ -55,14 +55,14 @@ const emit = defineEmits<{
55
55
  span {
56
56
  cursor: pointer;
57
57
  text-decoration: underline;
58
- color: var(--color-normal-txt-base);
58
+ color: var(--color-info-txt-base);
59
59
 
60
60
  &:hover {
61
- color: var(--color-normal-item-hover);
61
+ color: var(--color-info-item-hover);
62
62
  }
63
63
 
64
64
  &:active {
65
- color: var(--color-normal-item-active);
65
+ color: var(--color-info-item-active);
66
66
  }
67
67
  }
68
68
  }
@@ -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
  }