@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.
- package/lib/components/card/VtsCardRowKeyValue.vue +1 -0
- package/lib/components/cell-object/VtsCellObject.vue +1 -2
- package/lib/components/console/VtsActionsConsole.vue +3 -9
- package/lib/components/copy-button/VtsCopyButton.vue +1 -3
- package/lib/components/dropdown/DropdownTitle.vue +3 -3
- package/lib/components/icon/VtsIcon.vue +32 -76
- package/lib/components/input-wrapper/VtsInputWrapper.vue +2 -2
- package/lib/components/layout/VtsLayoutSidebar.vue +1 -2
- package/lib/components/menu/MenuItem.vue +4 -5
- package/lib/components/menu/MenuTrigger.vue +3 -3
- package/lib/components/object-icon/VtsObjectIcon.vue +2 -2
- package/lib/components/resources/VtsResource.vue +3 -3
- package/lib/components/select/VtsSelect.vue +4 -5
- package/lib/components/table/ColumnTitle.vue +11 -12
- package/lib/components/task/VtsQuickTaskButton.vue +1 -2
- package/lib/components/tree/VtsTreeLoadingItem.vue +3 -3
- package/lib/components/ui/alarm-item/UiAlarmItem.vue +1 -2
- package/lib/components/ui/alert/UiAlert.vue +14 -13
- package/lib/components/ui/button/UiButton.vue +4 -5
- package/lib/components/ui/button-icon/UiButtonIcon.vue +3 -3
- package/lib/components/ui/checkbox/UiCheckbox.vue +2 -9
- package/lib/components/ui/chip/ChipIcon.vue +3 -3
- package/lib/components/ui/chip/ChipRemoveIcon.vue +1 -2
- package/lib/components/ui/chip/UiChip.vue +2 -2
- package/lib/components/ui/circle-progress-bar/UiCircleProgressBar.vue +7 -4
- package/lib/components/ui/collapsible-list/UiCollapsibleList.vue +73 -0
- package/lib/components/ui/donut-chart/UiDonutChart.vue +30 -17
- package/lib/components/ui/dropdown/UiDropdown.vue +5 -7
- package/lib/components/ui/dropdown-button/UiDropdownButton.vue +4 -5
- package/lib/components/ui/head-bar/UiHeadBar.vue +6 -11
- package/lib/components/ui/info/UiInfo.vue +14 -20
- package/lib/components/ui/input/UiInput.vue +6 -7
- package/lib/components/ui/label/UiLabel.vue +3 -3
- package/lib/components/ui/legend/UiLegend.vue +3 -3
- package/lib/components/ui/legend-title/UiLegendTitle.vue +7 -3
- package/lib/components/ui/link/UiLink.vue +4 -5
- package/lib/components/ui/{quoteCode/UiQuoteCode.vue → log-entry-viewer/UiLogEntryViewer.vue} +58 -21
- package/lib/components/ui/object-link/UiObjectLink.vue +4 -4
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +3 -4
- package/lib/components/ui/quick-task-item/UiQuickTaskItem.vue +3 -4
- package/lib/components/ui/radio-button/UiRadioButton.vue +1 -2
- package/lib/components/ui/table-pagination/PaginationButton.vue +2 -25
- package/lib/components/ui/table-pagination/UiTablePagination.vue +56 -95
- package/lib/components/ui/tag/UiTag.vue +3 -3
- package/lib/components/ui/text-area/UiTextarea.vue +2 -2
- package/lib/components/ui/toaster/UiToaster.vue +15 -13
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +4 -5
- package/lib/composables/default-tab.composable.md +42 -0
- package/lib/composables/default-tab.composable.ts +26 -0
- package/lib/composables/link-component.composable.ts +3 -2
- package/lib/composables/pagination.composable.ts +5 -0
- package/lib/i18n.ts +4 -0
- package/lib/icons/fa-icons.ts +48 -2
- package/lib/icons/index.ts +4 -0
- package/lib/icons/legacy-icons.ts +10 -0
- package/lib/icons/object-icons.ts +1 -1
- package/lib/layouts/CoreLayout.vue +1 -2
- package/lib/locales/cs.json +29 -10
- package/lib/locales/de.json +70 -7
- package/lib/locales/en.json +25 -0
- package/lib/locales/es.json +3 -3
- package/lib/locales/fr.json +25 -0
- package/lib/locales/it.json +17 -5
- package/lib/locales/nl.json +28 -10
- package/lib/locales/pt_BR.json +67 -0
- package/lib/locales/sv.json +17 -0
- package/lib/packages/form-select/types.ts +3 -0
- package/lib/packages/form-select/use-form-option-controller.ts +5 -6
- package/lib/packages/form-select/use-form-select-controller.ts +1 -0
- package/lib/packages/form-select/use-form-select.ts +153 -109
- package/lib/packages/icon/DisplayIcon.vue +1 -0
- package/lib/packages/progress/README.md +62 -0
- package/lib/packages/progress/types.ts +19 -0
- package/lib/packages/progress/use-progress-group.ts +68 -0
- package/lib/packages/progress/use-progress.ts +22 -0
- package/lib/packages/remote-resource/README.md +115 -0
- package/lib/packages/remote-resource/define-remote-resource.ts +294 -0
- package/lib/packages/remote-resource/types.ts +28 -0
- package/lib/packages/threshold/README.md +30 -0
- package/lib/packages/threshold/type.ts +3 -0
- package/lib/packages/threshold/use-threshold.ts +19 -0
- package/lib/types/object-icon.type.ts +0 -40
- package/package.json +2 -2
- package/lib/components/icon/NewVtsIcon.vue +0 -49
- package/lib/components/ui/complex-icon/UiComplexIcon.vue +0 -45
- package/lib/components/ui/object-icon/UiObjectIcon.vue +0 -251
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-bind="attrs"
|
|
11
11
|
/>
|
|
12
12
|
<span class="fake-checkbox">
|
|
13
|
-
<VtsIcon :icon
|
|
13
|
+
<VtsIcon :name="icon" size="medium" class="icon" />
|
|
14
14
|
</span>
|
|
15
15
|
<span v-if="slots.default" class="typo-body-regular">
|
|
16
16
|
<slot />
|
|
@@ -26,7 +26,6 @@ import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
|
26
26
|
import UiInfo from '@core/components/ui/info/UiInfo.vue'
|
|
27
27
|
import { useDisabled } from '@core/composables/disabled.composable'
|
|
28
28
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
29
|
-
import { faCheck, faMinus } from '@fortawesome/free-solid-svg-icons'
|
|
30
29
|
import { computed, type LabelHTMLAttributes, useAttrs } from 'vue'
|
|
31
30
|
|
|
32
31
|
type CheckboxAccent = 'brand' | 'warning' | 'danger'
|
|
@@ -57,13 +56,7 @@ const classNames = computed(() => [
|
|
|
57
56
|
|
|
58
57
|
const isIndeterminate = computed(() => checkboxModel.value === undefined)
|
|
59
58
|
|
|
60
|
-
const icon = computed(() =>
|
|
61
|
-
if (isIndeterminate.value) {
|
|
62
|
-
return faMinus
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return faCheck
|
|
66
|
-
})
|
|
59
|
+
const icon = computed(() => (isIndeterminate.value ? 'fa:minus' : 'fa:check'))
|
|
67
60
|
|
|
68
61
|
const attrs = useAttrs()
|
|
69
62
|
</script>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<VtsIcon :class="{ muted: disabled }"
|
|
2
|
+
<VtsIcon :class="{ muted: disabled }" :name="icon" size="medium" class="chip-icon" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
6
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
7
|
-
import type {
|
|
7
|
+
import type { IconName } from '@core/icons'
|
|
8
8
|
|
|
9
9
|
defineProps<{
|
|
10
|
-
icon?:
|
|
10
|
+
icon?: IconName
|
|
11
11
|
disabled?: boolean
|
|
12
12
|
}>()
|
|
13
13
|
</script>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UiButtonIcon :accent="buttonAccent"
|
|
2
|
+
<UiButtonIcon :accent="buttonAccent" icon="fa:xmark" size="small" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
6
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
7
7
|
import type { ChipAccent } from '@core/components/ui/chip/UiChip.vue'
|
|
8
|
-
import { faXmark } from '@fortawesome/free-solid-svg-icons'
|
|
9
8
|
import { computed } from 'vue'
|
|
10
9
|
|
|
11
10
|
const { accent } = defineProps<{
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
<script lang="ts" setup>
|
|
13
13
|
import ChipIcon from '@core/components/ui/chip/ChipIcon.vue'
|
|
14
14
|
import ChipRemoveIcon from '@core/components/ui/chip/ChipRemoveIcon.vue'
|
|
15
|
+
import type { IconName } from '@core/icons'
|
|
15
16
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
16
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
17
17
|
import { computed } from 'vue'
|
|
18
18
|
|
|
19
19
|
export type ChipAccent = 'info' | 'success' | 'warning' | 'danger'
|
|
20
20
|
|
|
21
21
|
const props = defineProps<{
|
|
22
22
|
accent: ChipAccent
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: IconName
|
|
24
24
|
disabled?: boolean
|
|
25
25
|
}>()
|
|
26
26
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
/>
|
|
19
19
|
</svg>
|
|
20
20
|
<div v-if="size !== 'extra-small'" class="overlay">
|
|
21
|
-
<VtsIcon v-if="isComplete" class="icon" :icon
|
|
21
|
+
<VtsIcon v-if="isComplete" class="icon" :name="icon" size="medium" />
|
|
22
22
|
<span v-else>{{ percentValue }}</span>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
|
|
27
27
|
<script setup lang="ts">
|
|
28
28
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
29
|
+
import type { IconName } from '@core/icons'
|
|
29
30
|
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
30
|
-
import { faCheck, faExclamation } from '@fortawesome/free-solid-svg-icons'
|
|
31
31
|
import { useClamp, useMax } from '@vueuse/math'
|
|
32
32
|
import { computed } from 'vue'
|
|
33
33
|
import { useI18n } from 'vue-i18n'
|
|
@@ -90,8 +90,7 @@ const dashOffset = computed(() => {
|
|
|
90
90
|
|
|
91
91
|
const percentValue = computed(() => n(valuePercent.value / 100, 'percent'))
|
|
92
92
|
|
|
93
|
-
const
|
|
94
|
-
const icon = computed(() => (accent === 'warning' || accent === 'danger' ? faExclamation : faCheck))
|
|
93
|
+
const icon = computed<IconName>(() => (accent === 'warning' || accent === 'danger' ? 'fa:exclamation' : 'fa:check'))
|
|
95
94
|
|
|
96
95
|
const className = computed(() => [
|
|
97
96
|
fontClass.value,
|
|
@@ -125,6 +124,10 @@ const className = computed(() => [
|
|
|
125
124
|
.success {
|
|
126
125
|
stroke: var(--color-success-item-base);
|
|
127
126
|
}
|
|
127
|
+
|
|
128
|
+
.icon {
|
|
129
|
+
color: var(--color-success-item-base);
|
|
130
|
+
}
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
&.accent--warning {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!-- v1 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="ui-collapsible-list" :class="{ expanded: isExpanded }">
|
|
4
|
+
<component :is="tag" class="container">
|
|
5
|
+
<slot />
|
|
6
|
+
</component>
|
|
7
|
+
<div v-if="hasMoreItems" class="footer">
|
|
8
|
+
<span v-if="!isExpanded" class="typo-body-regular-small">{{ t('n-more', { n: remainingItems }) }}</span>
|
|
9
|
+
<UiButton size="small" accent="brand" variant="tertiary" @click="isExpanded = !isExpanded">
|
|
10
|
+
{{ isExpanded ? t('see-less') : t('see-all') }}
|
|
11
|
+
</UiButton>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import UiButton from '@core/components/ui/button/UiButton.vue'
|
|
18
|
+
import { useStyleTag } from '@vueuse/core'
|
|
19
|
+
import { useMax } from '@vueuse/math'
|
|
20
|
+
import { computed, ref } from 'vue'
|
|
21
|
+
import { useI18n } from 'vue-i18n'
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
tag,
|
|
25
|
+
totalItems,
|
|
26
|
+
visibleItems = 5,
|
|
27
|
+
} = defineProps<{
|
|
28
|
+
tag: string
|
|
29
|
+
totalItems: number
|
|
30
|
+
visibleItems?: number
|
|
31
|
+
}>()
|
|
32
|
+
|
|
33
|
+
defineSlots<{
|
|
34
|
+
default(): any
|
|
35
|
+
}>()
|
|
36
|
+
|
|
37
|
+
const { t } = useI18n()
|
|
38
|
+
|
|
39
|
+
const remainingItems = useMax(() => totalItems - visibleItems, 0)
|
|
40
|
+
|
|
41
|
+
const hasMoreItems = computed(() => remainingItems.value > 0)
|
|
42
|
+
|
|
43
|
+
const isExpanded = ref(false)
|
|
44
|
+
|
|
45
|
+
const style = computed(
|
|
46
|
+
() => `.ui-collapsible-list:not(.expanded) > .container *:nth-child(n+${visibleItems + 1}) { display: none }`
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
useStyleTag(style)
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="postcss" scoped>
|
|
53
|
+
.ui-collapsible-list {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
gap: 0.8rem;
|
|
57
|
+
align-items: start;
|
|
58
|
+
|
|
59
|
+
.container {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
gap: 0.8rem;
|
|
63
|
+
width: 100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.footer {
|
|
67
|
+
display: flex;
|
|
68
|
+
gap: 1.2rem;
|
|
69
|
+
align-items: center;
|
|
70
|
+
color: var(--color-neutral-txt-secondary);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
<div class="ui-donut-chart">
|
|
4
|
+
<VtsIcon v-if="icon" :name="icon" size="medium" class="chart-icon" />
|
|
5
|
+
<svg viewBox="0 0 100 100">
|
|
6
|
+
<circle class="segment accent--muted" cx="50" cy="50" r="40" />
|
|
7
|
+
<circle
|
|
8
|
+
v-for="(segment, index) in computedSegments"
|
|
9
|
+
:key="index"
|
|
10
|
+
:class="`accent--${segment.accent}`"
|
|
11
|
+
:stroke-dasharray="`${segment.percent} ${circumference - segment.percent}`"
|
|
12
|
+
:stroke-dashoffset="segment.offset"
|
|
13
|
+
class="segment"
|
|
14
|
+
cx="50"
|
|
15
|
+
cy="50"
|
|
16
|
+
r="40"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
</div>
|
|
18
20
|
</template>
|
|
19
21
|
|
|
20
22
|
<script lang="ts" setup>
|
|
21
23
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
22
|
-
import type {
|
|
24
|
+
import type { IconName } from '@core/icons'
|
|
23
25
|
import { computed } from 'vue'
|
|
24
26
|
|
|
25
27
|
export type DonutSegmentAccent = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'muted'
|
|
@@ -31,7 +33,7 @@ export type DonutSegment = {
|
|
|
31
33
|
|
|
32
34
|
export type DonutChartProps = {
|
|
33
35
|
segments: DonutSegment[]
|
|
34
|
-
icon?:
|
|
36
|
+
icon?: IconName
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const props = defineProps<DonutChartProps>()
|
|
@@ -59,9 +61,20 @@ const computedSegments = computed(() => {
|
|
|
59
61
|
|
|
60
62
|
<style lang="postcss" scoped>
|
|
61
63
|
.ui-donut-chart {
|
|
64
|
+
display: grid;
|
|
65
|
+
place-items: center;
|
|
62
66
|
width: 100px;
|
|
63
67
|
height: 100px;
|
|
64
68
|
|
|
69
|
+
.chart-icon {
|
|
70
|
+
grid-area: 1 / 1;
|
|
71
|
+
z-index: 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
svg {
|
|
75
|
+
grid-area: 1 / 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
65
78
|
.segment {
|
|
66
79
|
stroke-width: 10;
|
|
67
80
|
fill: transparent;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div v-tooltip="{ selector: '.text-ellipsis' }" :class="className" class="ui-dropdown">
|
|
4
4
|
<UiCheckbox v-if="checkbox" :disabled :model-value="selected" accent="brand" />
|
|
5
5
|
<slot name="icon">
|
|
6
|
-
<VtsIcon :icon
|
|
6
|
+
<VtsIcon :name="icon" size="medium" />
|
|
7
7
|
</slot>
|
|
8
8
|
<div class="text-ellipsis typo-body-bold-small">
|
|
9
9
|
<slot />
|
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
<div v-if="info" class="info typo-body-regular-small">{{ info }}</div>
|
|
12
12
|
<VtsIcon
|
|
13
13
|
v-if="subMenuIcon || locked"
|
|
14
|
-
:
|
|
15
|
-
|
|
14
|
+
:name="locked ? 'fa:lock' : 'fa:angle-right'"
|
|
15
|
+
size="medium"
|
|
16
16
|
class="right-icon"
|
|
17
|
-
fixed-width
|
|
18
17
|
/>
|
|
19
18
|
</div>
|
|
20
19
|
</template>
|
|
@@ -23,9 +22,8 @@
|
|
|
23
22
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
24
23
|
import UiCheckbox from '@core/components/ui/checkbox/UiCheckbox.vue'
|
|
25
24
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
25
|
+
import type { IconName } from '@core/icons'
|
|
26
26
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
27
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
28
|
-
import { faAngleRight, faLock } from '@fortawesome/free-solid-svg-icons'
|
|
29
27
|
import { computed } from 'vue'
|
|
30
28
|
|
|
31
29
|
export type DropdownAccent = 'normal' | 'brand' | 'success' | 'warning' | 'danger'
|
|
@@ -44,7 +42,7 @@ const {
|
|
|
44
42
|
hover?: boolean
|
|
45
43
|
checkbox?: boolean
|
|
46
44
|
subMenuIcon?: boolean
|
|
47
|
-
icon?:
|
|
45
|
+
icon?: IconName
|
|
48
46
|
info?: string
|
|
49
47
|
}>()
|
|
50
48
|
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<!-- v5 -->
|
|
2
2
|
<template>
|
|
3
3
|
<button :class="{ selected }" :disabled="isDisabled" class="ui-dropdown-item" type="button">
|
|
4
|
-
<VtsIcon :
|
|
4
|
+
<VtsIcon :name="icon" size="medium" />
|
|
5
5
|
<span class="typo-action-button label">
|
|
6
6
|
<slot />
|
|
7
7
|
</span>
|
|
8
|
-
<VtsIcon
|
|
8
|
+
<VtsIcon name="fa:angle-down" size="medium" />
|
|
9
9
|
</button>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script lang="ts" setup>
|
|
13
13
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
14
14
|
import { useDisabled } from '@core/composables/disabled.composable'
|
|
15
|
-
import type {
|
|
16
|
-
import { faAngleDown } from '@fortawesome/free-solid-svg-icons'
|
|
15
|
+
import type { IconName } from '@core/icons'
|
|
17
16
|
|
|
18
17
|
const { disabled, selected, icon } = defineProps<{
|
|
19
18
|
disabled?: boolean
|
|
20
19
|
selected?: boolean
|
|
21
|
-
icon?:
|
|
20
|
+
icon?: IconName
|
|
22
21
|
}>()
|
|
23
22
|
|
|
24
23
|
const isDisabled = useDisabled(() => disabled)
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-head-bar">
|
|
4
4
|
<div class="label-wrapper">
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
</slot>
|
|
9
|
-
</span>
|
|
5
|
+
<slot name="icon">
|
|
6
|
+
<VtsIcon :name="icon" size="medium" />
|
|
7
|
+
</slot>
|
|
10
8
|
<h4 v-tooltip class="typo-h4 label text-ellipsis">
|
|
11
9
|
<slot />
|
|
12
10
|
</h4>
|
|
@@ -23,10 +21,10 @@
|
|
|
23
21
|
<script lang="ts" setup>
|
|
24
22
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
25
23
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
26
|
-
import type {
|
|
24
|
+
import type { IconName } from '@core/icons'
|
|
27
25
|
|
|
28
26
|
defineProps<{
|
|
29
|
-
icon?:
|
|
27
|
+
icon?: IconName
|
|
30
28
|
}>()
|
|
31
29
|
|
|
32
30
|
const slots = defineSlots<{
|
|
@@ -39,6 +37,7 @@ const slots = defineSlots<{
|
|
|
39
37
|
|
|
40
38
|
<style lang="postcss" scoped>
|
|
41
39
|
.ui-head-bar {
|
|
40
|
+
min-height: 5.6rem;
|
|
42
41
|
padding: 0.8rem 1.6rem;
|
|
43
42
|
display: flex;
|
|
44
43
|
gap: 1.6rem;
|
|
@@ -57,10 +56,6 @@ const slots = defineSlots<{
|
|
|
57
56
|
color: var(--color-neutral-txt-primary);
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
.icon {
|
|
61
|
-
font-size: 2.4rem;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
59
|
.status {
|
|
65
60
|
color: var(--color-neutral-txt-secondary);
|
|
66
61
|
display: flex;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- v4 -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-info">
|
|
4
|
-
<VtsIcon
|
|
4
|
+
<VtsIcon class="icon" :name="icon" size="medium" />
|
|
5
5
|
<p v-tooltip="!wrap" class="typo-body-regular-small" :class="{ 'text-ellipsis': !wrap }">
|
|
6
6
|
<slot />
|
|
7
7
|
</p>
|
|
@@ -11,16 +11,8 @@
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
13
13
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
faCircle,
|
|
17
|
-
faExclamation,
|
|
18
|
-
faInfo,
|
|
19
|
-
faMinus,
|
|
20
|
-
faXmark,
|
|
21
|
-
type IconDefinition,
|
|
22
|
-
} from '@fortawesome/free-solid-svg-icons'
|
|
23
|
-
import { computed } from 'vue'
|
|
14
|
+
import type { IconName } from '@core/icons'
|
|
15
|
+
import { useMapper } from '@core/packages/mapper'
|
|
24
16
|
|
|
25
17
|
export type InfoAccent = 'info' | 'success' | 'warning' | 'danger' | 'muted'
|
|
26
18
|
|
|
@@ -33,15 +25,17 @@ defineSlots<{
|
|
|
33
25
|
default(): any
|
|
34
26
|
}>()
|
|
35
27
|
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
const icon = useMapper<InfoAccent, IconName>(
|
|
29
|
+
() => accent,
|
|
30
|
+
{
|
|
31
|
+
info: 'legacy:status:info',
|
|
32
|
+
success: 'legacy:status:success',
|
|
33
|
+
warning: 'legacy:status:warning',
|
|
34
|
+
danger: 'legacy:status:danger',
|
|
35
|
+
muted: 'legacy:status:muted',
|
|
36
|
+
},
|
|
37
|
+
'muted'
|
|
38
|
+
)
|
|
45
39
|
</script>
|
|
46
40
|
|
|
47
41
|
<style lang="postcss" scoped>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- v5 -->
|
|
2
2
|
<template>
|
|
3
3
|
<div :class="toVariants({ accent, disabled })" class="ui-input" @click.self="focus()">
|
|
4
|
-
<VtsIcon :icon
|
|
4
|
+
<VtsIcon :name="icon" size="medium" class="left-icon" />
|
|
5
5
|
<input
|
|
6
6
|
:id="wrapperController?.id ?? id"
|
|
7
7
|
ref="inputRef"
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
/>
|
|
15
15
|
<UiButtonIcon
|
|
16
16
|
v-if="!disabled && modelValue && clearable"
|
|
17
|
-
|
|
17
|
+
icon="fa:xmark"
|
|
18
18
|
:target-scale="1.6"
|
|
19
19
|
accent="brand"
|
|
20
20
|
size="small"
|
|
21
21
|
@click="clear()"
|
|
22
22
|
/>
|
|
23
23
|
<slot v-if="slots['right-icon'] || rightIcon" name="right-icon">
|
|
24
|
-
<VtsIcon :
|
|
24
|
+
<VtsIcon :name="rightIcon" size="medium" class="right-icon" />
|
|
25
25
|
</slot>
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
@@ -30,11 +30,10 @@
|
|
|
30
30
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
31
31
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
32
32
|
import type { LabelAccent } from '@core/components/ui/label/UiLabel.vue'
|
|
33
|
+
import type { IconName } from '@core/icons'
|
|
33
34
|
import { useMapper } from '@core/packages/mapper/use-mapper.ts'
|
|
34
35
|
import { IK_INPUT_WRAPPER_CONTROLLER } from '@core/utils/injection-keys.util'
|
|
35
36
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
36
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
37
|
-
import { faXmark } from '@fortawesome/free-solid-svg-icons'
|
|
38
37
|
import { inject, ref, useAttrs, watchEffect } from 'vue'
|
|
39
38
|
|
|
40
39
|
type InputAccent = 'brand' | 'warning' | 'danger'
|
|
@@ -55,8 +54,8 @@ const {
|
|
|
55
54
|
required?: boolean
|
|
56
55
|
disabled?: boolean
|
|
57
56
|
type?: InputType
|
|
58
|
-
icon?:
|
|
59
|
-
rightIcon?:
|
|
57
|
+
icon?: IconName
|
|
58
|
+
rightIcon?: IconName
|
|
60
59
|
clearable?: boolean
|
|
61
60
|
}>()
|
|
62
61
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- v1 -->
|
|
2
2
|
<template>
|
|
3
3
|
<div :class="toVariants({ accent })" class="ui-label">
|
|
4
|
-
<VtsIcon
|
|
4
|
+
<VtsIcon :name="icon" size="medium" class="icon" />
|
|
5
5
|
<label :for="htmlFor" :class="{ required }" class="typo-caption label">
|
|
6
6
|
<slot />
|
|
7
7
|
</label>
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<script lang="ts" setup>
|
|
13
13
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
14
14
|
import UiLink from '@core/components/ui/link/UiLink.vue'
|
|
15
|
+
import type { IconName } from '@core/icons'
|
|
15
16
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
16
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
17
17
|
import { useI18n } from 'vue-i18n'
|
|
18
18
|
|
|
19
19
|
export type LabelAccent = 'neutral' | 'warning' | 'danger'
|
|
@@ -21,7 +21,7 @@ export type LabelAccent = 'neutral' | 'warning' | 'danger'
|
|
|
21
21
|
const { for: htmlFor } = defineProps<{
|
|
22
22
|
accent: LabelAccent
|
|
23
23
|
for?: string
|
|
24
|
-
icon?:
|
|
24
|
+
icon?: IconName
|
|
25
25
|
required?: boolean
|
|
26
26
|
href?: string
|
|
27
27
|
}>()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
3
|
<li :class="classNames" class="ui-legend">
|
|
4
|
-
<VtsIcon
|
|
4
|
+
<VtsIcon name="fa:circle" size="medium" class="circle-icon" />
|
|
5
5
|
<span class="label typo-body-regular-small"><slot /></span>
|
|
6
|
-
<VtsIcon v-if="tooltip" v-tooltip="tooltip" :
|
|
6
|
+
<VtsIcon v-if="tooltip" v-tooltip="tooltip" name="fa:info-circle" size="medium" class="tooltip-icon" />
|
|
7
7
|
<span v-if="valueLabel" class="value-and-unit typo-caption-small">{{ valueLabel }}</span>
|
|
8
8
|
</li>
|
|
9
9
|
</template>
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
13
13
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
14
14
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
15
|
-
import { faCircle, faCircleInfo } from '@fortawesome/free-solid-svg-icons'
|
|
16
15
|
import { computed } from 'vue'
|
|
17
16
|
|
|
18
17
|
export type LegendItemAccent = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'muted'
|
|
@@ -47,6 +46,7 @@ const classNames = computed(() => toVariants({ accent }))
|
|
|
47
46
|
|
|
48
47
|
.tooltip-icon {
|
|
49
48
|
font-size: 1.2rem;
|
|
49
|
+
color: var(--color-info-item-base);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.label {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-legend-title typo-caption-small">
|
|
4
4
|
<slot />
|
|
5
|
-
<VtsIcon v-tooltip="iconTooltip ?? false" :icon
|
|
5
|
+
<VtsIcon v-tooltip="iconTooltip ?? false" class="icon" :name="icon" size="medium" />
|
|
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
11
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
12
|
-
import type {
|
|
12
|
+
import type { IconName } from '@core/icons'
|
|
13
13
|
|
|
14
14
|
export type LegendTitleProps = {
|
|
15
15
|
iconTooltip?: string
|
|
16
|
-
icon?:
|
|
16
|
+
icon?: IconName
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
defineProps<LegendTitleProps>()
|
|
@@ -29,5 +29,9 @@ defineSlots<{
|
|
|
29
29
|
display: flex;
|
|
30
30
|
gap: 0.8rem;
|
|
31
31
|
align-items: center;
|
|
32
|
+
|
|
33
|
+
.icon {
|
|
34
|
+
color: var(--color-info-item-base);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
</style>
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
3
|
<component :is="component" :class="classes" class="ui-link" v-bind="attributes">
|
|
4
|
-
<VtsIcon :icon
|
|
4
|
+
<VtsIcon :name="icon" size="medium" />
|
|
5
5
|
<slot />
|
|
6
|
-
<VtsIcon v-if="attributes.target === '_blank'"
|
|
6
|
+
<VtsIcon v-if="attributes.target === '_blank'" name="fa:up-right-from-square" size="medium" class="external-icon" />
|
|
7
7
|
</component>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script lang="ts" setup>
|
|
11
11
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
12
12
|
import { type LinkOptions, useLinkComponent } from '@core/composables/link-component.composable'
|
|
13
|
-
import type {
|
|
14
|
-
import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'
|
|
13
|
+
import type { IconName } from '@core/icons'
|
|
15
14
|
import { computed } from 'vue'
|
|
16
15
|
|
|
17
16
|
const props = defineProps<
|
|
18
17
|
LinkOptions & {
|
|
19
18
|
size: 'small' | 'medium'
|
|
20
|
-
icon?:
|
|
19
|
+
icon?: IconName
|
|
21
20
|
}
|
|
22
21
|
>()
|
|
23
22
|
|