@xen-orchestra/web-core 0.27.0 → 0.29.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/progress-bar/VtsProgressBar.vue +54 -0
- package/lib/components/progress-bar-group/VtsProgressBarGroup.vue +76 -0
- 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/data-ruler/UiDataRuler.vue +54 -6
- 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/log-entry-viewer/UiLogEntryViewer.vue +6 -2
- package/lib/components/ui/object-link/UiObjectLink.vue +4 -4
- package/lib/components/ui/progress-bar/UiProgressBar.vue +14 -70
- 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 +41 -20
- 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/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 +23 -0
- package/lib/locales/es.json +3 -3
- package/lib/locales/fr.json +23 -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/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/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/lib/utils/progress.util.ts +72 -0
- package/lib/utils/size.util.ts +6 -0
- package/package.json +1 -1
- 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
|
@@ -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
|
|
|
@@ -7,7 +7,12 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
<div class="actions">
|
|
9
9
|
<VtsCopyButton :value="content" />
|
|
10
|
-
<UiButtonIcon
|
|
10
|
+
<UiButtonIcon
|
|
11
|
+
icon="fa:arrow-up-right-from-square"
|
|
12
|
+
size="medium"
|
|
13
|
+
accent="brand"
|
|
14
|
+
@click="openRawValueInNewTab()"
|
|
15
|
+
/>
|
|
11
16
|
</div>
|
|
12
17
|
</div>
|
|
13
18
|
<code :class="fontClasses.codeClass" class="code-container">
|
|
@@ -21,7 +26,6 @@ import VtsCopyButton from '@core/components/copy-button/VtsCopyButton.vue'
|
|
|
21
26
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
22
27
|
import { useMapper } from '@core/packages/mapper'
|
|
23
28
|
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
24
|
-
import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'
|
|
25
29
|
import { computed, watch } from 'vue'
|
|
26
30
|
|
|
27
31
|
type LogEntryViewerAccent = 'info' | 'warning' | 'danger'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<RouterLink v-if="route && !disabled" :to="route" class="ui-object-link is-link typo-action-link-small">
|
|
4
4
|
<span class="icon">
|
|
5
5
|
<slot name="icon">
|
|
6
|
-
<VtsIcon :icon
|
|
6
|
+
<VtsIcon :name="icon" size="medium" />
|
|
7
7
|
</slot>
|
|
8
8
|
</span>
|
|
9
9
|
<span v-tooltip class="content text-ellipsis">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<span v-else :class="{ disabled }" class="ui-object-link typo-action-link-small">
|
|
14
14
|
<span class="icon">
|
|
15
15
|
<slot name="icon">
|
|
16
|
-
<VtsIcon :icon
|
|
16
|
+
<VtsIcon :name="icon" size="medium" />
|
|
17
17
|
</slot>
|
|
18
18
|
</span>
|
|
19
19
|
<slot />
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
<script lang="ts" setup>
|
|
24
24
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
25
25
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
26
|
-
import type {
|
|
26
|
+
import type { IconName } from '@core/icons'
|
|
27
27
|
import { type RouteLocationRaw } from 'vue-router'
|
|
28
28
|
|
|
29
29
|
defineProps<{
|
|
30
30
|
route?: RouteLocationRaw
|
|
31
31
|
disabled?: boolean
|
|
32
|
-
icon?:
|
|
32
|
+
icon?: IconName
|
|
33
33
|
}>()
|
|
34
34
|
|
|
35
35
|
defineSlots<{
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
<!-- v2 -->
|
|
2
2
|
<template>
|
|
3
|
-
<div class="ui-progress-bar"
|
|
3
|
+
<div :class="className" class="ui-progress-bar">
|
|
4
4
|
<div class="progress-bar">
|
|
5
|
-
<div
|
|
5
|
+
<div :style="{ width: fillWidth }" class="fill" />
|
|
6
6
|
</div>
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
</div>
|
|
11
|
-
<VtsLegendList class="legend">
|
|
12
|
-
<UiLegend v-if="displayMode === 'percent'" :accent :value="Math.round(percentage)" unit="%">
|
|
13
|
-
{{ legend }}
|
|
14
|
-
</UiLegend>
|
|
15
|
-
<UiLegend v-else :accent :value="legendValue">
|
|
16
|
-
{{ legend }}
|
|
7
|
+
<VtsLegendList v-if="legend" class="legend">
|
|
8
|
+
<UiLegend :accent :value="legend.value">
|
|
9
|
+
{{ legend.label }}
|
|
17
10
|
</UiLegend>
|
|
18
11
|
</VtsLegendList>
|
|
19
12
|
</div>
|
|
@@ -22,61 +15,20 @@
|
|
|
22
15
|
<script lang="ts" setup>
|
|
23
16
|
import VtsLegendList from '@core/components/legend-list/VtsLegendList.vue'
|
|
24
17
|
import UiLegend from '@core/components/ui/legend/UiLegend.vue'
|
|
25
|
-
import { formatSizeRaw } from '@core/utils/size.util.ts'
|
|
26
18
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
27
|
-
import { useClamp, useMax } from '@vueuse/math'
|
|
28
19
|
import { computed } from 'vue'
|
|
29
|
-
import { useI18n } from 'vue-i18n'
|
|
30
|
-
|
|
31
|
-
interface Props {
|
|
32
|
-
legend: string
|
|
33
|
-
value: number
|
|
34
|
-
showSteps?: boolean
|
|
35
|
-
}
|
|
36
|
-
interface PercentageProps {
|
|
37
|
-
max?: number
|
|
38
|
-
displayMode: 'percent'
|
|
39
|
-
}
|
|
40
|
-
interface ValueProps {
|
|
41
|
-
max: number
|
|
42
|
-
displayMode: 'value'
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const { value: _value, max: _max, showSteps, displayMode } = defineProps<Props & (PercentageProps | ValueProps)>()
|
|
46
|
-
|
|
47
|
-
const { n } = useI18n()
|
|
48
20
|
|
|
49
|
-
|
|
21
|
+
export type ProgressBarAccent = 'info' | 'warning' | 'danger'
|
|
50
22
|
|
|
51
|
-
|
|
23
|
+
export type ProgressBarLegend = { label: string; value?: string | number }
|
|
52
24
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const accent = computed(() => {
|
|
60
|
-
if (percentage.value >= 90) {
|
|
61
|
-
return 'danger'
|
|
62
|
-
}
|
|
25
|
+
const { accent, legend } = defineProps<{
|
|
26
|
+
accent: ProgressBarAccent
|
|
27
|
+
fillWidth: string
|
|
28
|
+
legend?: ProgressBarLegend
|
|
29
|
+
}>()
|
|
63
30
|
|
|
64
|
-
|
|
65
|
-
return 'warning'
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return 'info'
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
const className = computed(() => toVariants({ accent: accent.value }))
|
|
72
|
-
|
|
73
|
-
const formattedValue = computed(() => formatSizeRaw(value.value, 1))
|
|
74
|
-
|
|
75
|
-
const formattedMax = computed(() => formatSizeRaw(max.value, 0))
|
|
76
|
-
|
|
77
|
-
const legendValue = computed(() => {
|
|
78
|
-
return `${formattedValue.value.value} ${formattedValue.value.prefix} / ${formattedMax.value.value} ${formattedMax.value.prefix}`
|
|
79
|
-
})
|
|
31
|
+
const className = computed(() => toVariants({ accent }))
|
|
80
32
|
</script>
|
|
81
33
|
|
|
82
34
|
<style lang="postcss" scoped>
|
|
@@ -87,30 +39,22 @@ const legendValue = computed(() => {
|
|
|
87
39
|
|
|
88
40
|
.progress-bar {
|
|
89
41
|
width: 100%;
|
|
90
|
-
height: 1.2rem;
|
|
91
42
|
border-radius: 0.4rem;
|
|
92
43
|
overflow: hidden;
|
|
93
44
|
background-color: var(--color-neutral-background-disabled);
|
|
94
45
|
|
|
95
46
|
.fill {
|
|
96
47
|
width: 0;
|
|
97
|
-
height:
|
|
48
|
+
height: 1.2rem;
|
|
98
49
|
transition: width 0.25s ease-in-out;
|
|
99
50
|
}
|
|
100
51
|
}
|
|
101
52
|
|
|
102
|
-
.steps {
|
|
103
|
-
color: var(--color-neutral-txt-secondary);
|
|
104
|
-
display: flex;
|
|
105
|
-
justify-content: space-between;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
53
|
.legend {
|
|
109
54
|
margin-inline-start: auto;
|
|
110
55
|
}
|
|
111
56
|
|
|
112
57
|
/* ACCENT */
|
|
113
|
-
|
|
114
58
|
&.accent--info {
|
|
115
59
|
.fill {
|
|
116
60
|
background-color: var(--color-info-item-base);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
type="text"
|
|
11
11
|
accent="brand"
|
|
12
12
|
:aria-label="uiStore.isMobile ? t('core.query-search-bar.label') : undefined"
|
|
13
|
-
:icon="!uiStore.isMobile ?
|
|
13
|
+
:icon="!uiStore.isMobile ? 'fa:magnifying-glass' : undefined"
|
|
14
14
|
:placeholder="t('core.query-search-bar.placeholder')"
|
|
15
15
|
/>
|
|
16
16
|
<template v-if="!uiStore.isMobile">
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
<!-- Mobile icons: search + filter -->
|
|
34
34
|
<template v-else>
|
|
35
|
-
<UiButtonIcon accent="brand" size="medium" type="submit"
|
|
36
|
-
<UiButtonIcon accent="brand" size="medium" disabled
|
|
35
|
+
<UiButtonIcon accent="brand" size="medium" type="submit" icon="fa:magnifying-glass" class="action-button" />
|
|
36
|
+
<UiButtonIcon accent="brand" size="medium" disabled icon="fa:filter" class="action-button" />
|
|
37
37
|
</template>
|
|
38
38
|
</form>
|
|
39
39
|
</template>
|
|
@@ -46,7 +46,6 @@ import UiInput from '@core/components/ui/input/UiInput.vue'
|
|
|
46
46
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
47
47
|
import { useUiStore } from '@core/stores/ui.store'
|
|
48
48
|
import { uniqueId } from '@core/utils/unique-id.util'
|
|
49
|
-
import { faFilter, faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons'
|
|
50
49
|
import { ref } from 'vue'
|
|
51
50
|
import { useI18n } from 'vue-i18n'
|
|
52
51
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<li class="ui-quick-task-item">
|
|
4
4
|
<div v-if="hasSubTasks" class="toggle" @click="toggleExpand()">
|
|
5
|
-
<UiButtonIcon accent="brand" :icon="isExpanded ?
|
|
5
|
+
<UiButtonIcon accent="brand" :icon="isExpanded ? 'fa:angle-down' : 'fa:angle-right'" size="small" />
|
|
6
6
|
</div>
|
|
7
7
|
<div class="content">
|
|
8
8
|
<div class="typo-body-bold">
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<div class="line-1">
|
|
13
13
|
<UiTag v-if="task.tag" accent="neutral" variant="primary">{{ task.tag }}</UiTag>
|
|
14
14
|
<div v-if="hasSubTasks" class="subtasks">
|
|
15
|
-
<VtsIcon
|
|
15
|
+
<VtsIcon name="fa:circle-notch" size="medium" />
|
|
16
16
|
<span class="typo-body-regular-small">{{ t('tasks.n-subtasks', { n: subTasksCount }) }}</span>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
<div v-if="task.start" class="line-2 typo-body-regular-small">
|
|
20
20
|
{{ d(task.start, 'datetime_short') }}
|
|
21
21
|
<template v-if="task.end">
|
|
22
|
-
<VtsIcon
|
|
22
|
+
<VtsIcon name="fa:arrow-right" size="medium" />
|
|
23
23
|
{{ d(new Date(task.end), 'datetime_short') }}
|
|
24
24
|
</template>
|
|
25
25
|
</div>
|
|
@@ -34,7 +34,6 @@ import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
|
34
34
|
import VtsQuickTaskList from '@core/components/task/VtsQuickTaskList.vue'
|
|
35
35
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
36
36
|
import UiTag from '@core/components/ui/tag/UiTag.vue'
|
|
37
|
-
import { faAngleDown, faAngleRight, faArrowRight, faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
|
38
37
|
import { useToggle } from '@vueuse/core'
|
|
39
38
|
import { computed } from 'vue'
|
|
40
39
|
import { useI18n } from 'vue-i18n'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<label :class="variant" class="ui-radio-button typo-body-regular">
|
|
4
4
|
<span class="radio-container">
|
|
5
5
|
<input v-model="model" :disabled="isDisabled" :value class="input" type="radio" />
|
|
6
|
-
<VtsIcon
|
|
6
|
+
<VtsIcon name="fa:circle" size="medium" class="radio-icon" />
|
|
7
7
|
</span>
|
|
8
8
|
<slot />
|
|
9
9
|
</label>
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
14
14
|
import { useDisabled } from '@core/composables/disabled.composable'
|
|
15
15
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
16
|
-
import { faCircle } from '@fortawesome/free-solid-svg-icons'
|
|
17
16
|
import { computed } from 'vue'
|
|
18
17
|
|
|
19
18
|
const { accent, value, disabled } = defineProps<{
|
|
@@ -4,33 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
6
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
7
|
-
import type {
|
|
7
|
+
import type { IconName } from '@core/icons'
|
|
8
8
|
|
|
9
9
|
defineProps<{
|
|
10
10
|
disabled: boolean
|
|
11
|
-
icon:
|
|
11
|
+
icon: IconName
|
|
12
12
|
}>()
|
|
13
13
|
</script>
|
|
14
|
-
|
|
15
|
-
<style scoped lang="postcss">
|
|
16
|
-
.pagination-button.accent--brand {
|
|
17
|
-
border: 0.1rem solid var(--color-neutral-border);
|
|
18
|
-
font-size: 1rem;
|
|
19
|
-
/* Override UiButtonIcon size to match DS */
|
|
20
|
-
width: 3rem;
|
|
21
|
-
height: 3rem;
|
|
22
|
-
|
|
23
|
-
&:hover {
|
|
24
|
-
border-color: var(--color-brand-item-hover);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&:active {
|
|
28
|
-
border-color: var(--color-brand-item-active);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&:disabled {
|
|
32
|
-
background-color: var(--color-neutral-background-disabled);
|
|
33
|
-
border-color: transparent;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v5 -->
|
|
2
2
|
<template>
|
|
3
|
-
<div class="ui-table-pagination">
|
|
4
|
-
<div class="
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
3
|
+
<div class="ui-table-pagination" :class="className">
|
|
4
|
+
<div class="container">
|
|
5
|
+
<span class="typo-body-regular-small label">
|
|
6
|
+
{{ t('core.select.n-object-of', { from, to, total }) }}
|
|
7
|
+
</span>
|
|
8
|
+
<div class="buttons-container">
|
|
9
|
+
<PaginationButton :disabled="isFirstPage" icon="fa:angle-double-left" @click="emit('first')" />
|
|
10
|
+
<PaginationButton :disabled="isFirstPage" icon="fa:angle-left" @click="emit('previous')" />
|
|
11
|
+
<PaginationButton :disabled="isLastPage" icon="fa:angle-right" @click="emit('next')" />
|
|
12
|
+
<PaginationButton :disabled="isLastPage" icon="fa:angle-double-right" @click="emit('last')" />
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="container">
|
|
16
|
+
<span class="typo-body-regular-small label show">{{ t('core.pagination.show-by') }}</span>
|
|
17
|
+
<VtsSelect :id="showBySelectId" accent="brand" class="typo-body-regular-small show-by-select" />
|
|
9
18
|
</div>
|
|
10
|
-
<span class="typo-body-regular-small label">
|
|
11
|
-
{{ t('core.select.n-object-of', { from, to, total }) }}
|
|
12
|
-
</span>
|
|
13
|
-
<span class="typo-body-regular-small label show">{{ t('core.pagination.show-by') }}</span>
|
|
14
|
-
<VtsSelect :id="showBySelectId" accent="brand" class="typo-body-regular-small show-by-select" />
|
|
15
19
|
</div>
|
|
16
20
|
</template>
|
|
17
21
|
|
|
@@ -19,15 +23,19 @@
|
|
|
19
23
|
import VtsSelect from '@core/components/select/VtsSelect.vue'
|
|
20
24
|
import PaginationButton from '@core/components/ui/table-pagination/PaginationButton.vue'
|
|
21
25
|
import { useFormSelect } from '@core/packages/form-select'
|
|
22
|
-
import {
|
|
26
|
+
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
27
|
+
import { computed } from 'vue'
|
|
23
28
|
import { useI18n } from 'vue-i18n'
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
export type TablePaginationSize = 'small' | 'medium'
|
|
31
|
+
|
|
32
|
+
const { size } = defineProps<{
|
|
26
33
|
from: number
|
|
27
34
|
to: number
|
|
28
35
|
total: number
|
|
29
36
|
isFirstPage: boolean
|
|
30
37
|
isLastPage: boolean
|
|
38
|
+
size: TablePaginationSize
|
|
31
39
|
}>()
|
|
32
40
|
|
|
33
41
|
const emit = defineEmits<{
|
|
@@ -39,6 +47,8 @@ const emit = defineEmits<{
|
|
|
39
47
|
|
|
40
48
|
const showBy = defineModel<number>('showBy', { default: 24 })
|
|
41
49
|
|
|
50
|
+
const className = computed(() => toVariants({ size }))
|
|
51
|
+
|
|
42
52
|
const { t } = useI18n()
|
|
43
53
|
|
|
44
54
|
const { id: showBySelectId } = useFormSelect([12, 24, 48, -1], {
|
|
@@ -55,6 +65,21 @@ const { id: showBySelectId } = useFormSelect([12, 24, 48, -1], {
|
|
|
55
65
|
align-items: center;
|
|
56
66
|
gap: 0.8rem;
|
|
57
67
|
|
|
68
|
+
&.size--small {
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
align-items: flex-end;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.size--medium {
|
|
74
|
+
flex-direction: row;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.container {
|
|
78
|
+
display: flex;
|
|
79
|
+
gap: 0.8rem;
|
|
80
|
+
align-items: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
58
83
|
.buttons-container {
|
|
59
84
|
display: flex;
|
|
60
85
|
gap: 0.2rem;
|
|
@@ -64,19 +89,15 @@ const { id: showBySelectId } = useFormSelect([12, 24, 48, -1], {
|
|
|
64
89
|
color: var(--color-neutral-txt-secondary);
|
|
65
90
|
}
|
|
66
91
|
|
|
67
|
-
.show::before {
|
|
68
|
-
content: '-';
|
|
69
|
-
margin-right: 0.8rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
92
|
/* Workaround: we don't have "small" select yet */
|
|
73
93
|
.show-by-select {
|
|
74
|
-
width:
|
|
94
|
+
width: 6rem;
|
|
75
95
|
|
|
76
96
|
&:deep(.ui-input) {
|
|
77
97
|
height: 3rem;
|
|
78
98
|
padding-inline: 0.8rem;
|
|
79
99
|
gap: 0.8rem;
|
|
100
|
+
min-width: 6rem;
|
|
80
101
|
}
|
|
81
102
|
|
|
82
103
|
&:deep(.input) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<template>
|
|
4
4
|
<span :class="toVariants({ accent, variant })" class="ui-tag typo-body-regular-small">
|
|
5
5
|
<slot name="icon">
|
|
6
|
-
<VtsIcon :icon
|
|
6
|
+
<VtsIcon :name="icon" size="medium" />
|
|
7
7
|
</slot>
|
|
8
8
|
<span class="text-ellipsis"><slot /></span>
|
|
9
9
|
</span>
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
<script lang="ts" setup>
|
|
13
13
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
14
|
+
import type { IconName } from '@core/icons'
|
|
14
15
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
15
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
16
16
|
|
|
17
17
|
type TagAccent = 'info' | 'neutral' | 'success' | 'warning' | 'danger' | 'muted'
|
|
18
18
|
type TagVariant = 'primary' | 'secondary'
|
|
@@ -20,7 +20,7 @@ type TagVariant = 'primary' | 'secondary'
|
|
|
20
20
|
defineProps<{
|
|
21
21
|
accent: TagAccent
|
|
22
22
|
variant: TagVariant
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: IconName
|
|
24
24
|
}>()
|
|
25
25
|
|
|
26
26
|
defineSlots<{
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
import UiCharacterLimit from '@core/components/ui/character-limit/UiCharacterLimit.vue'
|
|
20
20
|
import UiInfo from '@core/components/ui/info/UiInfo.vue'
|
|
21
21
|
import UiLabel from '@core/components/ui/label/UiLabel.vue'
|
|
22
|
+
import type { IconName } from '@core/icons'
|
|
22
23
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
23
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
24
24
|
import { useFocus } from '@vueuse/core'
|
|
25
25
|
import { computed, useAttrs, useId, useTemplateRef } from 'vue'
|
|
26
26
|
import { useI18n } from 'vue-i18n'
|
|
@@ -39,7 +39,7 @@ const {
|
|
|
39
39
|
maxCharacters?: number
|
|
40
40
|
disabled?: boolean
|
|
41
41
|
href?: string
|
|
42
|
-
icon?:
|
|
42
|
+
icon?: IconName
|
|
43
43
|
required?: boolean
|
|
44
44
|
}>()
|
|
45
45
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div :class="toVariants({ accent })" class="ui-toaster">
|
|
4
4
|
<div class="content">
|
|
5
|
-
<VtsIcon class="information-icon" :
|
|
5
|
+
<VtsIcon class="information-icon" :name="icon" size="medium" />
|
|
6
6
|
<div>
|
|
7
7
|
<div class="typo-h5">
|
|
8
8
|
<slot />
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<slot name="description" />
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
<UiButtonIcon class="close-icon"
|
|
14
|
+
<UiButtonIcon class="close-icon" icon="fa:xmark" accent="brand" size="medium" @click="emit('close')" />
|
|
15
15
|
</div>
|
|
16
16
|
<div v-if="slots.actions" class="actions">
|
|
17
17
|
<slot name="actions" />
|
|
@@ -22,14 +22,13 @@
|
|
|
22
22
|
<script setup lang="ts">
|
|
23
23
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
24
24
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
25
|
+
import type { IconName } from '@core/icons'
|
|
26
|
+
import { useMapper } from '@core/packages/mapper'
|
|
25
27
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
26
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
27
|
-
import { faCheck, faCircle, faExclamation, faInfo, faXmark } from '@fortawesome/free-solid-svg-icons'
|
|
28
|
-
import { computed } from 'vue'
|
|
29
28
|
|
|
30
29
|
type ToasterAccent = 'info' | 'success' | 'warning' | 'danger'
|
|
31
30
|
|
|
32
|
-
const
|
|
31
|
+
const { accent } = defineProps<{
|
|
33
32
|
accent: ToasterAccent
|
|
34
33
|
}>()
|
|
35
34
|
|
|
@@ -43,13 +42,16 @@ const slots = defineSlots<{
|
|
|
43
42
|
actions?(): any
|
|
44
43
|
}>()
|
|
45
44
|
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
const icon = useMapper<ToasterAccent, IconName>(
|
|
46
|
+
() => accent,
|
|
47
|
+
{
|
|
48
|
+
info: 'legacy:status:info',
|
|
49
|
+
success: 'legacy:status:success',
|
|
50
|
+
warning: 'legacy:status:warning',
|
|
51
|
+
danger: 'legacy:status:danger',
|
|
52
|
+
},
|
|
53
|
+
'info'
|
|
54
|
+
)
|
|
53
55
|
</script>
|
|
54
56
|
|
|
55
57
|
<style scoped lang="postcss">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
v-tooltip="isExpanded ? t('core.close') : t('core.open')"
|
|
20
20
|
class="toggle"
|
|
21
21
|
accent="brand"
|
|
22
|
-
:icon="isExpanded ?
|
|
22
|
+
:icon="isExpanded ? 'fa:angle-down' : 'fa:angle-right'"
|
|
23
23
|
size="small"
|
|
24
24
|
:target-scale="{ x: 1.5, y: 2 }"
|
|
25
25
|
@click="emit('toggle')"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div v-else class="h-line" />
|
|
28
28
|
<a v-tooltip="{ selector: '.text' }" :href class="link typo-body-bold-small" @click="navigate">
|
|
29
29
|
<slot name="icon">
|
|
30
|
-
<VtsIcon :icon
|
|
30
|
+
<VtsIcon :name="icon" size="medium" class="icon" />
|
|
31
31
|
</slot>
|
|
32
32
|
<div class="text text-ellipsis">
|
|
33
33
|
<slot />
|
|
@@ -43,9 +43,8 @@ import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
|
43
43
|
import VtsTreeLine from '@core/components/tree/VtsTreeLine.vue'
|
|
44
44
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
45
45
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
46
|
+
import type { IconName } from '@core/icons'
|
|
46
47
|
import { IK_TREE_ITEM_EXPANDED, IK_TREE_ITEM_HAS_CHILDREN, IK_TREE_LIST_DEPTH } from '@core/utils/injection-keys.util'
|
|
47
|
-
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
48
|
-
import { faAngleDown, faAngleRight } from '@fortawesome/free-solid-svg-icons'
|
|
49
48
|
import { inject, ref, useAttrs } from 'vue'
|
|
50
49
|
import { useI18n } from 'vue-i18n'
|
|
51
50
|
import type { RouteLocationRaw } from 'vue-router'
|
|
@@ -56,7 +55,7 @@ defineOptions({
|
|
|
56
55
|
|
|
57
56
|
defineProps<{
|
|
58
57
|
route: RouteLocationRaw
|
|
59
|
-
icon?:
|
|
58
|
+
icon?: IconName
|
|
60
59
|
active?: boolean
|
|
61
60
|
}>()
|
|
62
61
|
|