@xen-orchestra/web-core 0.26.1 → 0.28.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 (86) hide show
  1. package/lib/components/card/VtsCardRowKeyValue.vue +1 -0
  2. package/lib/components/cell-object/VtsCellObject.vue +1 -2
  3. package/lib/components/console/VtsActionsConsole.vue +3 -9
  4. package/lib/components/copy-button/VtsCopyButton.vue +1 -3
  5. package/lib/components/dropdown/DropdownTitle.vue +3 -3
  6. package/lib/components/icon/VtsIcon.vue +32 -76
  7. package/lib/components/input-wrapper/VtsInputWrapper.vue +2 -2
  8. package/lib/components/layout/VtsLayoutSidebar.vue +1 -2
  9. package/lib/components/menu/MenuItem.vue +4 -5
  10. package/lib/components/menu/MenuTrigger.vue +3 -3
  11. package/lib/components/object-icon/VtsObjectIcon.vue +2 -2
  12. package/lib/components/resources/VtsResource.vue +3 -3
  13. package/lib/components/select/VtsSelect.vue +4 -5
  14. package/lib/components/table/ColumnTitle.vue +11 -12
  15. package/lib/components/task/VtsQuickTaskButton.vue +1 -2
  16. package/lib/components/tree/VtsTreeLoadingItem.vue +3 -3
  17. package/lib/components/ui/alarm-item/UiAlarmItem.vue +1 -2
  18. package/lib/components/ui/alert/UiAlert.vue +14 -13
  19. package/lib/components/ui/button/UiButton.vue +4 -5
  20. package/lib/components/ui/button-icon/UiButtonIcon.vue +3 -3
  21. package/lib/components/ui/checkbox/UiCheckbox.vue +2 -9
  22. package/lib/components/ui/chip/ChipIcon.vue +3 -3
  23. package/lib/components/ui/chip/ChipRemoveIcon.vue +1 -2
  24. package/lib/components/ui/chip/UiChip.vue +2 -2
  25. package/lib/components/ui/circle-progress-bar/UiCircleProgressBar.vue +7 -4
  26. package/lib/components/ui/collapsible-list/UiCollapsibleList.vue +73 -0
  27. package/lib/components/ui/donut-chart/UiDonutChart.vue +30 -17
  28. package/lib/components/ui/dropdown/UiDropdown.vue +5 -7
  29. package/lib/components/ui/dropdown-button/UiDropdownButton.vue +4 -5
  30. package/lib/components/ui/head-bar/UiHeadBar.vue +6 -11
  31. package/lib/components/ui/info/UiInfo.vue +14 -20
  32. package/lib/components/ui/input/UiInput.vue +6 -7
  33. package/lib/components/ui/label/UiLabel.vue +3 -3
  34. package/lib/components/ui/legend/UiLegend.vue +3 -3
  35. package/lib/components/ui/legend-title/UiLegendTitle.vue +7 -3
  36. package/lib/components/ui/link/UiLink.vue +4 -5
  37. package/lib/components/ui/{quoteCode/UiQuoteCode.vue → log-entry-viewer/UiLogEntryViewer.vue} +58 -21
  38. package/lib/components/ui/object-link/UiObjectLink.vue +4 -4
  39. package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +3 -4
  40. package/lib/components/ui/quick-task-item/UiQuickTaskItem.vue +3 -4
  41. package/lib/components/ui/radio-button/UiRadioButton.vue +1 -2
  42. package/lib/components/ui/table-pagination/PaginationButton.vue +2 -25
  43. package/lib/components/ui/table-pagination/UiTablePagination.vue +56 -95
  44. package/lib/components/ui/tag/UiTag.vue +3 -3
  45. package/lib/components/ui/text-area/UiTextarea.vue +2 -2
  46. package/lib/components/ui/toaster/UiToaster.vue +15 -13
  47. package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +4 -5
  48. package/lib/composables/default-tab.composable.md +42 -0
  49. package/lib/composables/default-tab.composable.ts +26 -0
  50. package/lib/composables/link-component.composable.ts +3 -2
  51. package/lib/composables/pagination.composable.ts +5 -0
  52. package/lib/i18n.ts +4 -0
  53. package/lib/icons/fa-icons.ts +48 -2
  54. package/lib/icons/index.ts +4 -0
  55. package/lib/icons/legacy-icons.ts +10 -0
  56. package/lib/icons/object-icons.ts +1 -1
  57. package/lib/layouts/CoreLayout.vue +1 -2
  58. package/lib/locales/cs.json +29 -10
  59. package/lib/locales/de.json +70 -7
  60. package/lib/locales/en.json +25 -0
  61. package/lib/locales/es.json +3 -3
  62. package/lib/locales/fr.json +25 -0
  63. package/lib/locales/it.json +17 -5
  64. package/lib/locales/nl.json +28 -10
  65. package/lib/locales/pt_BR.json +67 -0
  66. package/lib/locales/sv.json +17 -0
  67. package/lib/packages/form-select/types.ts +3 -0
  68. package/lib/packages/form-select/use-form-option-controller.ts +5 -6
  69. package/lib/packages/form-select/use-form-select-controller.ts +1 -0
  70. package/lib/packages/form-select/use-form-select.ts +153 -109
  71. package/lib/packages/icon/DisplayIcon.vue +1 -0
  72. package/lib/packages/progress/README.md +62 -0
  73. package/lib/packages/progress/types.ts +19 -0
  74. package/lib/packages/progress/use-progress-group.ts +68 -0
  75. package/lib/packages/progress/use-progress.ts +22 -0
  76. package/lib/packages/remote-resource/README.md +115 -0
  77. package/lib/packages/remote-resource/define-remote-resource.ts +294 -0
  78. package/lib/packages/remote-resource/types.ts +28 -0
  79. package/lib/packages/threshold/README.md +30 -0
  80. package/lib/packages/threshold/type.ts +3 -0
  81. package/lib/packages/threshold/use-threshold.ts +19 -0
  82. package/lib/types/object-icon.type.ts +0 -40
  83. package/package.json +2 -2
  84. package/lib/components/icon/NewVtsIcon.vue +0 -49
  85. package/lib/components/ui/complex-icon/UiComplexIcon.vue +0 -45
  86. package/lib/components/ui/object-icon/UiObjectIcon.vue +0 -251
@@ -49,6 +49,7 @@ const slots = defineSlots<{
49
49
  gap: 0.8rem;
50
50
  margin-left: auto;
51
51
  font-size: 1.6rem;
52
+ align-items: center;
52
53
  }
53
54
  }
54
55
  </style>
@@ -9,7 +9,7 @@
9
9
  </span>
10
10
  <UiButton
11
11
  v-if="isSupported && copiableId"
12
- :left-icon="faCopy"
12
+ left-icon="fa:copy"
13
13
  variant="secondary"
14
14
  size="small"
15
15
  accent="brand"
@@ -25,7 +25,6 @@
25
25
  <script lang="ts" setup>
26
26
  import UiButton from '@core/components/ui/button/UiButton.vue'
27
27
  import { vTooltip } from '@core/directives/tooltip.directive'
28
- import { faCopy } from '@fortawesome/free-solid-svg-icons'
29
28
  import { useClipboard } from '@vueuse/core'
30
29
  import { useI18n } from 'vue-i18n'
31
30
 
@@ -5,7 +5,7 @@
5
5
  accent="brand"
6
6
  variant="tertiary"
7
7
  size="medium"
8
- :left-icon="isFullscreen ? faDownLeftAndUpRightToCenter : faUpRightAndDownLeftFromCenter"
8
+ :left-icon="isFullscreen ? 'fa:down-left-and-up-right-to-center' : 'fa:up-right-and-down-left-from-center'"
9
9
  @click="toggleFullScreen"
10
10
  >
11
11
  {{ t(isFullscreen ? 'exit-fullscreen' : 'fullscreen') }}
@@ -15,7 +15,7 @@
15
15
  accent="brand"
16
16
  variant="tertiary"
17
17
  size="medium"
18
- :left-icon="faArrowUpRightFromSquare"
18
+ left-icon="fa:arrow-up-right-from-square"
19
19
  @click="openInNewTab"
20
20
  >
21
21
  {{ t('open-console-in-new-tab') }}
@@ -25,7 +25,7 @@
25
25
  accent="brand"
26
26
  variant="tertiary"
27
27
  size="medium"
28
- :left-icon="faKeyboard"
28
+ left-icon="fa:keyboard"
29
29
  @click="sendCtrlAltDel"
30
30
  >
31
31
  {{ t('send-ctrl-alt-del') }}
@@ -36,12 +36,6 @@
36
36
  import UiButton from '@core/components/ui/button/UiButton.vue'
37
37
  import UiCardTitle from '@core/components/ui/card-title/UiCardTitle.vue'
38
38
  import { useUiStore } from '@core/stores/ui.store'
39
- import {
40
- faArrowUpRightFromSquare,
41
- faDownLeftAndUpRightToCenter,
42
- faKeyboard,
43
- faUpRightAndDownLeftFromCenter,
44
- } from '@fortawesome/free-solid-svg-icons'
45
39
  import { useActiveElement, useMagicKeys, whenever } from '@vueuse/core'
46
40
  import { logicAnd } from '@vueuse/math'
47
41
  import { computed } from 'vue'
@@ -5,8 +5,6 @@
5
5
  <script setup lang="ts">
6
6
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
7
7
  import { vTooltip } from '@core/directives/tooltip.directive'
8
- import { faCopy } from '@fortawesome/free-regular-svg-icons'
9
- import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'
10
8
  import { useClipboard } from '@vueuse/core'
11
9
  import { computed } from 'vue'
12
10
  import { useI18n } from 'vue-i18n'
@@ -19,5 +17,5 @@ const { t } = useI18n()
19
17
 
20
18
  const { copy, copied } = useClipboard({ source: () => value })
21
19
 
22
- const icon = computed(() => (copied.value ? faCheckCircle : faCopy))
20
+ const icon = computed(() => (copied.value ? 'fa:check-circle' : 'fa:copy'))
23
21
  </script>
@@ -4,7 +4,7 @@
4
4
  -->
5
5
  <template>
6
6
  <div class="dropdown-title">
7
- <VtsIcon :icon accent="current" />
7
+ <VtsIcon :name="icon" size="medium" />
8
8
  <div class="label c3 semi-bold">
9
9
  <slot />
10
10
  </div>
@@ -21,12 +21,12 @@
21
21
 
22
22
  <script lang="ts" setup>
23
23
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
24
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
24
+ import type { IconName } from '@core/icons'
25
25
  import { useI18n } from 'vue-i18n'
26
26
 
27
27
  withDefaults(
28
28
  defineProps<{
29
- icon?: IconDefinition
29
+ icon?: IconName
30
30
  selected?: 'all' | 'some' | 'none'
31
31
  onToggleSelectAll?: (value: boolean) => void
32
32
  }>(),
@@ -1,100 +1,56 @@
1
- <!-- WIP -->
2
1
  <template>
3
- <UiLoader v-if="busy" class="vts-icon" />
4
- <div v-else-if="overlayIcon !== undefined && icon !== undefined" class="vts-icon stacked" :class="accent">
5
- <FontAwesomeIcon :fixed-width="fixedWidth" :icon />
6
- <FontAwesomeIcon class="overlay-icon" :fixed-width="fixedWidth" :icon="overlayIcon" />
7
- </div>
8
- <FontAwesomeIcon v-else-if="icon !== undefined" :class="accent" :fixed-width="fixedWidth" :icon class="vts-icon" />
2
+ <UiLoader v-if="busy" />
3
+ <DisplayIcon v-else-if="icon" class="vts-icon" :class="className" :icon />
9
4
  </template>
10
5
 
11
6
  <script lang="ts" setup>
12
7
  import UiLoader from '@core/components/ui/loader/UiLoader.vue'
13
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
14
- import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
8
+ import { type IconName, icons } from '@core/icons'
9
+ import { DisplayIcon } from '@core/packages/icon'
10
+ import { toVariants } from '@core/utils/to-variants.util.ts'
11
+ import { computed } from 'vue'
15
12
 
16
- export type IconAccent = 'current' | 'brand' | 'info' | 'success' | 'warning' | 'danger' | 'muted'
13
+ export type IconSize = 'small' | 'medium' | 'large' | 'current'
17
14
 
18
- defineProps<{
19
- accent: IconAccent
20
- icon?: IconDefinition
21
- overlayIcon?: IconDefinition
15
+ const { size, name } = defineProps<{
16
+ size: IconSize
17
+ name: IconName | undefined
22
18
  busy?: boolean
23
- fixedWidth?: boolean
24
19
  }>()
25
- </script>
26
-
27
- <style lang="postcss" scoped>
28
- .vts-icon {
29
- &.stacked {
30
- display: inline-grid;
31
- place-items: center;
32
-
33
- svg {
34
- grid-area: 1 / -1;
35
20
 
36
- &:last-child {
37
- font-size: 50%;
38
- }
39
- }
40
- }
41
-
42
- /* COLOR VARIANTS */
43
-
44
- &.current {
45
- color: currentColor;
21
+ const className = computed(() =>
22
+ toVariants({
23
+ size: size === 'current' ? undefined : size,
24
+ })
25
+ )
46
26
 
47
- .overlay-icon {
48
- color: var(--color-neutral-background-primary);
49
- }
27
+ const icon = computed(() => {
28
+ if (!name) {
29
+ return undefined
50
30
  }
51
31
 
52
- &.brand {
53
- color: var(--color-brand-item-base);
32
+ const icon = icons[name]
54
33
 
55
- .overlay-icon {
56
- color: var(--color-brand-txt-item);
57
- }
34
+ if (icon === undefined) {
35
+ console.warn(`Icon "${name}" not found.`)
58
36
  }
59
37
 
60
- &.info {
61
- color: var(--color-info-item-base);
62
-
63
- .overlay-icon {
64
- color: var(--color-info-txt-item);
65
- }
66
- }
67
-
68
- &.success {
69
- color: var(--color-success-item-base);
70
-
71
- .overlay-icon {
72
- color: var(--color-success-txt-item);
73
- }
74
- }
75
-
76
- &.warning {
77
- color: var(--color-warning-item-base);
38
+ return icon
39
+ })
40
+ </script>
78
41
 
79
- .overlay-icon {
80
- color: var(--color-warning-txt-item);
81
- }
42
+ <style lang="postcss" scoped>
43
+ .vts-icon {
44
+ &.size--small {
45
+ font-size: 1.2rem;
82
46
  }
83
47
 
84
- &.danger {
85
- color: var(--color-danger-item-base);
86
-
87
- .overlay-icon {
88
- color: var(--color-danger-txt-item);
89
- }
48
+ &.size--medium {
49
+ font-size: 1.6rem;
90
50
  }
91
51
 
92
- &.muted {
93
- color: var(--color-neutral-background-disabled);
94
-
95
- .overlay-icon {
96
- color: var(--color-neutral-txt-secondary);
97
- }
52
+ &.size--large {
53
+ font-size: 2rem;
98
54
  }
99
55
  }
100
56
  </style>
@@ -21,11 +21,11 @@
21
21
  import UiInfo, { type InfoAccent } from '@core/components/ui/info/UiInfo.vue'
22
22
  import UiLabel, { type LabelAccent } from '@core/components/ui/label/UiLabel.vue'
23
23
  import { useRanked } from '@core/composables/ranked.composable.ts'
24
+ import type { IconName } from '@core/icons'
24
25
  import { useMapper } from '@core/packages/mapper/use-mapper.ts'
25
26
  import type { MaybeArray } from '@core/types/utility.type'
26
27
  import { IK_INPUT_WRAPPER_CONTROLLER } from '@core/utils/injection-keys.util'
27
28
  import { toArray } from '@core/utils/to-array.utils'
28
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
29
29
  import { useArrayMap } from '@vueuse/core'
30
30
  import { provide, reactive, useId } from 'vue'
31
31
 
@@ -40,7 +40,7 @@ export type InputWrapperController = {
40
40
  const { message: _message } = defineProps<{
41
41
  label?: string
42
42
  learnMoreUrl?: string
43
- icon?: IconDefinition
43
+ icon?: IconName
44
44
  message?: InputWrapperMessage
45
45
  }>()
46
46
 
@@ -11,7 +11,7 @@
11
11
  }"
12
12
  accent="brand"
13
13
  size="medium"
14
- :icon="sidebar.isLocked ? faThumbTackSlash : faThumbTack"
14
+ :icon="sidebar.isLocked ? 'fa:thumb-tack-slash' : 'fa:thumb-tack'"
15
15
  @click="sidebar.toggleLock()"
16
16
  />
17
17
  </div>
@@ -38,7 +38,6 @@ import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
38
38
  import { vTooltip } from '@core/directives/tooltip.directive'
39
39
  import { useSidebarStore } from '@core/stores/sidebar.store'
40
40
  import { useUiStore } from '@core/stores/ui.store'
41
- import { faThumbTack, faThumbTackSlash } from '@fortawesome/free-solid-svg-icons'
42
41
  import { useI18n } from 'vue-i18n'
43
42
 
44
43
  const slots = defineSlots<{
@@ -15,7 +15,7 @@
15
15
  <template #trigger="{ open, isOpen }">
16
16
  <MenuTrigger :active="isOpen" :busy="isBusy" :disabled="isDisabled" :icon @click="open">
17
17
  <slot />
18
- <VtsIcon :fixed-width="false" :icon="submenuIcon" accent="current" class="submenu-icon" />
18
+ <VtsIcon :name="submenuIcon" size="medium" class="submenu-icon" />
19
19
  </MenuTrigger>
20
20
  </template>
21
21
  <slot name="submenu" />
@@ -28,13 +28,12 @@ import VtsIcon from '@core/components/icon/VtsIcon.vue'
28
28
  import MenuList from '@core/components/menu/MenuList.vue'
29
29
  import MenuTrigger from '@core/components/menu/MenuTrigger.vue'
30
30
  import { useDisabled } from '@core/composables/disabled.composable'
31
+ import type { IconName } from '@core/icons'
31
32
  import { IK_CLOSE_MENU, IK_MENU_HORIZONTAL } from '@core/utils/injection-keys.util'
32
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
33
- import { faAngleDown, faAngleRight } from '@fortawesome/free-solid-svg-icons'
34
33
  import { computed, inject, ref } from 'vue'
35
34
 
36
35
  const props = defineProps<{
37
- icon?: IconDefinition
36
+ icon?: IconName
38
37
  onClick?: () => any
39
38
  disabled?: boolean
40
39
  busy?: boolean
@@ -46,7 +45,7 @@ const isParentHorizontal = inject(
46
45
  )
47
46
  const isDisabled = useDisabled(() => props.disabled)
48
47
 
49
- const submenuIcon = computed(() => (isParentHorizontal.value ? faAngleDown : faAngleRight))
48
+ const submenuIcon = computed((): IconName => (isParentHorizontal.value ? 'fa:angle-down' : 'fa:angle-right'))
50
49
 
51
50
  const isHandlingClick = ref(false)
52
51
  const isBusy = computed(() => isHandlingClick.value || props.busy === true)
@@ -1,20 +1,20 @@
1
1
  <!-- v1.0 -->
2
2
  <template>
3
3
  <div :class="{ active, disabled }" class="menu-trigger">
4
- <VtsIcon :busy :icon accent="current" />
4
+ <VtsIcon :name="icon" size="medium" :busy />
5
5
  <slot />
6
6
  </div>
7
7
  </template>
8
8
 
9
9
  <script lang="ts" setup>
10
10
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
11
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
11
+ import type { IconName } from '@core/icons'
12
12
 
13
13
  defineProps<{
14
14
  active?: boolean
15
15
  busy?: boolean
16
16
  disabled?: boolean
17
- icon?: IconDefinition
17
+ icon?: IconName
18
18
  }>()
19
19
  </script>
20
20
 
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <NewVtsIcon :name="iconName" :size />
2
+ <VtsIcon :name="iconName" :size />
3
3
  </template>
4
4
 
5
5
  <script generic="TType extends ObjectIconType" lang="ts" setup>
6
- import NewVtsIcon, { type IconSize } from '@core/components/icon/NewVtsIcon.vue'
6
+ import VtsIcon, { type IconSize } from '@core/components/icon/VtsIcon.vue'
7
7
  import type { ObjectIconName } from '@core/icons'
8
8
  import { computed } from 'vue'
9
9
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <li class="vts-resource">
3
- <VtsIcon accent="brand" :icon class="icon" />
3
+ <VtsIcon :name="icon" size="medium" class="icon" />
4
4
  <div class="separator" />
5
5
  <div class="label typo-h6">{{ label }}</div>
6
6
  <div class="count typo-body-regular-small">{{ count }}</div>
@@ -9,10 +9,10 @@
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
12
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
12
+ import type { IconName } from '@core/icons'
13
13
 
14
14
  defineProps<{
15
- icon: IconDefinition
15
+ icon: IconName
16
16
  label: string
17
17
  count: string | number
18
18
  }>()
@@ -8,7 +8,7 @@
8
8
  :model-value="selectedLabel"
9
9
  :placeholder
10
10
  :required="isRequired"
11
- :right-icon="faAngleDown"
11
+ right-icon="fa:angle-down"
12
12
  readonly
13
13
  />
14
14
 
@@ -22,7 +22,7 @@
22
22
  ref="searchRef"
23
23
  v-model="searchTerm"
24
24
  :placeholder="searchPlaceholder"
25
- :right-icon="faMagnifyingGlass"
25
+ right-icon="fa:magnifying-glass"
26
26
  accent="brand"
27
27
  />
28
28
  </div>
@@ -46,6 +46,7 @@ import VtsOption from '@core/components/select/VtsOption.vue'
46
46
  import UiDropdown from '@core/components/ui/dropdown/UiDropdown.vue'
47
47
  import UiDropdownList from '@core/components/ui/dropdown/UiDropdownList.vue'
48
48
  import UiInput from '@core/components/ui/input/UiInput.vue'
49
+ import type { IconName } from '@core/icons'
49
50
  import {
50
51
  type FormSelect,
51
52
  type FormSelectId,
@@ -53,8 +54,6 @@ import {
53
54
  useFormSelectController,
54
55
  } from '@core/packages/form-select'
55
56
  import { toVariants } from '@core/utils/to-variants.util.ts'
56
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
57
- import { faAngleDown, faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons'
58
57
  import { useCurrentElement, useElementSize } from '@vueuse/core'
59
58
  import { computed, inject } from 'vue'
60
59
  import { useI18n } from 'vue-i18n'
@@ -62,7 +61,7 @@ import { useI18n } from 'vue-i18n'
62
61
  const { accent, id } = defineProps<{
63
62
  accent: 'brand' | 'warning' | 'danger'
64
63
  id: TSelectId
65
- icon?: IconDefinition
64
+ icon?: IconName
66
65
  }>()
67
66
 
68
67
  defineSlots<{
@@ -9,10 +9,10 @@
9
9
  >
10
10
  <div class="content">
11
11
  <span class="label">
12
- <VtsIcon :icon accent="current" />
12
+ <VtsIcon :name="icon" size="medium" />
13
13
  <slot />
14
14
  </span>
15
- <VtsIcon :icon="currentInteraction?.icon" accent="current" />
15
+ <VtsIcon :name="currentInteraction?.icon" size="medium" />
16
16
  </div>
17
17
  </th>
18
18
  </template>
@@ -23,7 +23,7 @@
23
23
  :disabled="interaction.disabled"
24
24
  :on-click="() => updateInteraction(interaction)"
25
25
  >
26
- <VtsIcon :icon="interaction.icon" accent="current" />
26
+ <VtsIcon :name="interaction.icon" size="medium" />
27
27
  {{ interaction.label }}
28
28
  <i v-if="currentInteraction?.id === interaction.id" class="current-interaction typo-body-regular-small">
29
29
  {{ t('core.current').toLowerCase() }}
@@ -37,8 +37,7 @@ import VtsIcon from '@core/components/icon/VtsIcon.vue'
37
37
  import MenuItem from '@core/components/menu/MenuItem.vue'
38
38
  import MenuList from '@core/components/menu/MenuList.vue'
39
39
  import { vTooltip } from '@core/directives/tooltip.directive'
40
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
41
- import { faArrowDown, faArrowUp, faEyeSlash, faFilter, faLayerGroup } from '@fortawesome/free-solid-svg-icons'
40
+ import type { IconName } from '@core/icons'
42
41
  import { noop } from '@vueuse/core'
43
42
  import { computed, inject } from 'vue'
44
43
  import { useI18n } from 'vue-i18n'
@@ -48,14 +47,14 @@ type InteractionId = 'sort-asc' | 'sort-desc' | 'group' | 'filter' | 'hide'
48
47
  type Interaction = {
49
48
  disabled?: boolean
50
49
  id: InteractionId
51
- icon: IconDefinition
50
+ icon: IconName
52
51
  label: string
53
52
  }
54
53
 
55
54
  const props = withDefaults(
56
55
  defineProps<{
57
56
  id?: string
58
- icon?: IconDefinition
57
+ icon?: IconName
59
58
  interactive?: boolean
60
59
  disabled?: boolean
61
60
  }>(),
@@ -68,11 +67,11 @@ const { t } = useI18n()
68
67
  const router = useRouter()
69
68
 
70
69
  const interactions = computed<Interaction[]>(() => [
71
- { id: 'sort-asc', icon: faArrowDown, label: t('core.sort.ascending'), disabled: true },
72
- { id: 'sort-desc', icon: faArrowUp, label: t('core.sort.descending'), disabled: true },
73
- { id: 'group', icon: faLayerGroup, label: t('core.group'), disabled: true },
74
- { id: 'filter', icon: faFilter, label: t('core.filter'), disabled: true },
75
- { id: 'hide', icon: faEyeSlash, label: t('core.hide'), disabled: true },
70
+ { id: 'sort-asc', icon: 'fa:arrow-down', label: t('core.sort.ascending'), disabled: true },
71
+ { id: 'sort-desc', icon: 'fa:arrow-up', label: t('core.sort.descending'), disabled: true },
72
+ { id: 'group', icon: 'fa:layer-group', label: t('core.group'), disabled: true },
73
+ { id: 'filter', icon: 'fa:filter', label: t('core.filter'), disabled: true },
74
+ { id: 'hide', icon: 'fa:eye-slash', label: t('core.hide'), disabled: true },
76
75
  ])
77
76
 
78
77
  const tableName = inject<string>('tableName')
@@ -4,7 +4,7 @@
4
4
  v-tooltip="{ content: t('tasks.quick-view'), placement: 'bottom-end' }"
5
5
  accent="brand"
6
6
  :dot="hasNewTask"
7
- :icon="faBarsProgress"
7
+ icon="fa:bars-progress"
8
8
  size="large"
9
9
  @click="isPanelOpen = true"
10
10
  />
@@ -20,7 +20,6 @@ import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
20
20
  import type { Task } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
21
21
  import UiQuickTaskPanel from '@core/components/ui/quick-task-panel/UiQuickTaskPanel.vue'
22
22
  import { vTooltip } from '@core/directives/tooltip.directive'
23
- import { faBarsProgress } from '@fortawesome/free-solid-svg-icons'
24
23
  import { unrefElement, watchArray, whenever } from '@vueuse/core'
25
24
  import placementJs from 'placement.js'
26
25
  import { computed, nextTick, ref } from 'vue'
@@ -5,7 +5,7 @@
5
5
  <template v-if="depth > 1">
6
6
  <VtsTreeLine v-for="i in depth - 1" :key="i" :right="i === depth - 1" full-height />
7
7
  </template>
8
- <VtsIcon :icon accent="current" />
8
+ <VtsIcon :name="icon" size="medium" />
9
9
  <div class="loader">&nbsp;</div>
10
10
  </div>
11
11
  </div>
@@ -15,12 +15,12 @@
15
15
  <script lang="ts" setup>
16
16
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
17
17
  import VtsTreeLine from '@core/components/tree/VtsTreeLine.vue'
18
+ import type { IconName } from '@core/icons'
18
19
  import { IK_TREE_LIST_DEPTH } from '@core/utils/injection-keys.util'
19
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
20
20
  import { inject } from 'vue'
21
21
 
22
22
  defineProps<{
23
- icon: IconDefinition
23
+ icon: IconName
24
24
  }>()
25
25
 
26
26
  const depth = inject(IK_TREE_LIST_DEPTH, 0)
@@ -5,7 +5,7 @@
5
5
  <div class="label-percent typo-body-regular text-ellipsis">
6
6
  <UiButtonIcon
7
7
  v-if="description"
8
- :icon="isDescriptionVisible ? faAngleDown : faAngleRight"
8
+ :icon="isDescriptionVisible ? 'fa:angle-down' : 'fa:angle-right'"
9
9
  size="small"
10
10
  accent="brand"
11
11
  :target-scale="2"
@@ -38,7 +38,6 @@ import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
38
38
  import { useTimeAgo } from '@core/composables/locale-time-ago.composable.ts'
39
39
  import { vTooltip } from '@core/directives/tooltip.directive'
40
40
  import { toVariants } from '@core/utils/to-variants.util'
41
- import { faAngleDown, faAngleRight } from '@fortawesome/free-solid-svg-icons'
42
41
  import { useToggle } from '@vueuse/core'
43
42
  import { computed } from 'vue'
44
43
  import { useI18n } from 'vue-i18n'
@@ -2,7 +2,7 @@
2
2
  <template>
3
3
  <div :class="toVariants({ accent })" class="ui-alert">
4
4
  <div class="content">
5
- <VtsIcon class="information-icon" :accent :icon="faCircle" :overlay-icon="icon" />
5
+ <VtsIcon class="information-icon" :name="icon" size="current" />
6
6
  <div class="alert typo-body-regular-small">
7
7
  <div>
8
8
  <slot />
@@ -14,7 +14,7 @@
14
14
  <UiButtonIcon
15
15
  v-if="close"
16
16
  class="close-button"
17
- :icon="faXmark"
17
+ icon="fa:xmark"
18
18
  accent="brand"
19
19
  size="medium"
20
20
  @click="emit('close')"
@@ -26,10 +26,9 @@
26
26
  <script setup lang="ts">
27
27
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
28
28
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
29
+ import type { IconName } from '@core/icons'
30
+ import { useMapper } from '@core/packages/mapper'
29
31
  import { toVariants } from '@core/utils/to-variants.util'
30
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
31
- import { faCheck, faCircle, faExclamation, faInfo, faXmark } from '@fortawesome/free-solid-svg-icons'
32
- import { computed } from 'vue'
33
32
 
34
33
  type AlertAccent = 'info' | 'success' | 'warning' | 'danger'
35
34
 
@@ -47,14 +46,16 @@ const slots = defineSlots<{
47
46
  description?(): any
48
47
  }>()
49
48
 
50
- const iconByAccent: Record<AlertAccent, IconDefinition> = {
51
- info: faInfo,
52
- success: faCheck,
53
- warning: faExclamation,
54
- danger: faXmark,
55
- }
56
-
57
- const icon = computed(() => iconByAccent[accent])
49
+ const icon = useMapper<AlertAccent, IconName>(
50
+ () => accent,
51
+ {
52
+ info: 'legacy:status:info',
53
+ success: 'legacy:status:success',
54
+ warning: 'legacy:status:warning',
55
+ danger: 'legacy:status:danger',
56
+ },
57
+ 'info'
58
+ )
58
59
  </script>
59
60
 
60
61
  <style scoped lang="postcss">
@@ -1,18 +1,17 @@
1
1
  <!-- v6 -->
2
2
  <template>
3
3
  <button :class="classNames" :disabled="busy || isDisabled || lockIcon" class="ui-button" type="button">
4
- <VtsIcon :busy :icon="leftIcon" accent="current" class="icon" fixed-width />
4
+ <VtsIcon :busy :name="leftIcon" class="icon" size="current" />
5
5
  <slot />
6
- <VtsIcon v-if="lockIcon" :icon="faLock" accent="current" class="icon" fixed-width />
6
+ <VtsIcon v-if="lockIcon" name="fa:lock" size="medium" class="icon" />
7
7
  </button>
8
8
  </template>
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
12
12
  import { useDisabled } from '@core/composables/disabled.composable'
13
+ import type { IconName } from '@core/icons'
13
14
  import { toVariants } from '@core/utils/to-variants.util'
14
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
15
- import { faLock } from '@fortawesome/free-solid-svg-icons'
16
15
  import { computed } from 'vue'
17
16
 
18
17
  type ButtonVariant = 'primary' | 'secondary' | 'tertiary'
@@ -26,7 +25,7 @@ const { accent, variant, size, disabled, busy, lockIcon } = defineProps<{
26
25
  busy?: boolean
27
26
  disabled?: boolean
28
27
  lockIcon?: boolean
29
- leftIcon?: IconDefinition
28
+ leftIcon?: IconName
30
29
  }>()
31
30
 
32
31
  defineSlots<{
@@ -2,15 +2,15 @@
2
2
  <!-- TODO: Add complex icon -->
3
3
  <template>
4
4
  <button :class="classNames" :disabled class="ui-button-icon" type="button">
5
- <VtsIcon :icon accent="current" />
5
+ <VtsIcon :name="icon" size="medium" />
6
6
  <span v-if="dot" class="dot" />
7
7
  </button>
8
8
  </template>
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
12
+ import type { IconName } from '@core/icons'
12
13
  import { toVariants } from '@core/utils/to-variants.util'
13
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
14
14
  import { computed } from 'vue'
15
15
 
16
16
  type ButtonIconAccent = 'brand' | 'warning' | 'danger'
@@ -23,7 +23,7 @@ const {
23
23
  selected,
24
24
  targetScale = 1,
25
25
  } = defineProps<{
26
- icon: IconDefinition
26
+ icon: IconName
27
27
  size: ButtonSize
28
28
  accent: ButtonIconAccent
29
29
  disabled?: boolean