{{ after }}
@@ -36,6 +36,13 @@ defineProps<{
inline?: boolean
}>()
+const slots = defineSlots<{
+ default(): any
+ label?(): any
+ before?(): any
+ after?(): any
+}>()
+
const isIcon = (maybeIcon: any): maybeIcon is IconDefinition => typeof maybeIcon === 'object'
diff --git a/@xen-orchestra/lite/src/components/HostPatchesTable.vue b/@xen-orchestra/lite/src/components/HostPatchesTable.vue
index 4fa69f74f97..d3f50ed1fc2 100644
--- a/@xen-orchestra/lite/src/components/HostPatchesTable.vue
+++ b/@xen-orchestra/lite/src/components/HostPatchesTable.vue
@@ -9,7 +9,7 @@
-
import type { PRIMARY_ADDRESS_TYPE } from '@/libs/xen-api/xen-api.enums'
import { usePoolStore } from '@/stores/xen-api/pool.store'
-import UiButton from '@core/components/button/UiButton.vue'
+import UiButton from '@core/components/ui/button/UiButton.vue'
import { faDownload, faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'
import { computed } from 'vue'
import { useRouter } from 'vue-router'
diff --git a/@xen-orchestra/lite/src/components/component-story/ComponentStory.vue b/@xen-orchestra/lite/src/components/component-story/ComponentStory.vue
index d512ca4473c..68fb4f1a63b 100644
--- a/@xen-orchestra/lite/src/components/component-story/ComponentStory.vue
+++ b/@xen-orchestra/lite/src/components/component-story/ComponentStory.vue
@@ -3,7 +3,7 @@
Props
Events
-
Logs
-
+
Clear
@@ -85,12 +91,12 @@ import {
ModelParam,
type Param,
} from '@/libs/story/story-param'
-import UiButton from '@core/components/button/UiButton.vue'
-import VtsCounter from '@core/components/counter/VtsCounter.vue'
import MenuItem from '@core/components/menu/MenuItem.vue'
import MenuList from '@core/components/menu/MenuList.vue'
import TabItem from '@core/components/tab/TabItem.vue'
import TabList from '@core/components/tab/TabList.vue'
+import UiButton from '@core/components/ui/button/UiButton.vue'
+import UiCounter from '@core/components/ui/counter/UiCounter.vue'
import { faSliders } from '@fortawesome/free-solid-svg-icons'
import 'highlight.js/styles/github-dark.css'
import { uniqueId, upperFirst } from 'lodash-es'
diff --git a/@xen-orchestra/lite/src/components/form/FormCheckbox.vue b/@xen-orchestra/lite/src/components/form/FormCheckbox.vue
index 9b69f93710b..313c2a1739a 100644
--- a/@xen-orchestra/lite/src/components/form/FormCheckbox.vue
+++ b/@xen-orchestra/lite/src/components/form/FormCheckbox.vue
@@ -6,7 +6,7 @@
:disabled="isDisabled"
:type="type === 'radio' ? 'radio' : 'checkbox'"
class="input"
- v-bind="$attrs"
+ v-bind="attrs"
/>
@@ -21,7 +21,7 @@ import { DisabledContext } from '@/context'
import { IK_CHECKBOX_TYPE, IK_FORM_HAS_LABEL } from '@/types/injection-keys'
import { faCheck, faCircle, faMinus } from '@fortawesome/free-solid-svg-icons'
import { useVModel } from '@vueuse/core'
-import { computed, type HTMLAttributes, inject } from 'vue'
+import { computed, type HTMLAttributes, inject, useAttrs } from 'vue'
defineOptions({ inheritAttrs: false })
@@ -38,6 +38,8 @@ const emit = defineEmits<{
'update:modelValue': [value: boolean]
}>()
+const attrs = useAttrs()
+
const value = useVModel(props, 'modelValue', emit)
const type = inject(IK_CHECKBOX_TYPE, 'checkbox')
const hasLabel = inject(
diff --git a/@xen-orchestra/lite/src/components/form/FormInput.vue b/@xen-orchestra/lite/src/components/form/FormInput.vue
index 6b34b611487..0e62dc72b44 100644
--- a/@xen-orchestra/lite/src/components/form/FormInput.vue
+++ b/@xen-orchestra/lite/src/components/form/FormInput.vue
@@ -9,7 +9,7 @@
:disabled="isDisabled"
:required
class="select"
- v-bind="$attrs"
+ v-bind="attrs"
>
@@ -26,7 +26,7 @@
:disabled="isDisabled"
:required
class="textarea"
- v-bind="$attrs"
+ v-bind="attrs"
/>
{{ before }}
@@ -59,7 +59,7 @@ import { IK_INPUT_ID, IK_INPUT_TYPE } from '@/types/injection-keys'
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
import { faAngleDown } from '@fortawesome/free-solid-svg-icons'
import { useTextareaAutosize, useVModel } from '@vueuse/core'
-import { computed, type HTMLAttributes, inject, nextTick, ref, watch } from 'vue'
+import { computed, type HTMLAttributes, inject, nextTick, ref, useAttrs, watch } from 'vue'
defineOptions({ inheritAttrs: false })
@@ -84,6 +84,8 @@ const emit = defineEmits<{
'update:modelValue': [value: any]
}>()
+const attrs = useAttrs()
+
const { name: contextColor } = useContext(ColorContext, () => props.color)
const inputElement = ref()
diff --git a/@xen-orchestra/lite/src/components/infra/InfraAction.vue b/@xen-orchestra/lite/src/components/infra/InfraAction.vue
deleted file mode 100644
index 92009efffd0..00000000000
--- a/@xen-orchestra/lite/src/components/infra/InfraAction.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/@xen-orchestra/lite/src/components/infra/InfraHostItem.vue b/@xen-orchestra/lite/src/components/infra/InfraHostItem.vue
index 6828f455bc2..d494b1bd01d 100644
--- a/@xen-orchestra/lite/src/components/infra/InfraHostItem.vue
+++ b/@xen-orchestra/lite/src/components/infra/InfraHostItem.vue
@@ -1,10 +1,14 @@
-
-
+
+
{{ host.name_label || '(Host)' }}
-
-
+
-
+
-
+
-
+
-
+
-
-
diff --git a/@xen-orchestra/lite/src/components/infra/InfraLoadingItem.vue b/@xen-orchestra/lite/src/components/infra/InfraLoadingItem.vue
deleted file mode 100644
index cb946e6e68e..00000000000
--- a/@xen-orchestra/lite/src/components/infra/InfraLoadingItem.vue
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/@xen-orchestra/lite/src/components/infra/InfraPoolList.vue b/@xen-orchestra/lite/src/components/infra/InfraPoolList.vue
index b36f94fe9be..988a4a0d510 100644
--- a/@xen-orchestra/lite/src/components/infra/InfraPoolList.vue
+++ b/@xen-orchestra/lite/src/components/infra/InfraPoolList.vue
@@ -1,37 +1,37 @@
-
-
-
+
+
+
{{ $t('error-no-data') }}
-
-
-
+
+
{{ pool.name_label || '(Pool)' }}
-
+
-
+
-
+
-
-
+
+
diff --git a/@xen-orchestra/lite/src/components/ui/UiCardTitle.vue b/@xen-orchestra/lite/src/components/ui/UiCardTitle.vue
index 4d8e34a83b8..9e69e406b3e 100644
--- a/@xen-orchestra/lite/src/components/ui/UiCardTitle.vue
+++ b/@xen-orchestra/lite/src/components/ui/UiCardTitle.vue
@@ -1,10 +1,10 @@
-
+
{{ left }}
-
+
-
+
{{ right }}
@@ -12,7 +12,7 @@
+
diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/checkbox/ui-checkbox.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/checkbox/ui-checkbox.story.vue
new file mode 100644
index 00000000000..657d2abe9f7
--- /dev/null
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/checkbox/ui-checkbox.story.vue
@@ -0,0 +1,31 @@
+
+
+
+ {{ settings.defaultSlot }}
+ {{ settings.info }}
+
+
+
+
+
diff --git a/@xen-orchestra/lite/src/stories/web-core/ui-chip.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/chip/ui-chip.story.vue
similarity index 60%
rename from @xen-orchestra/lite/src/stories/web-core/ui-chip.story.vue
rename to @xen-orchestra/lite/src/stories/web-core/ui/chip/ui-chip.story.vue
index 05fd6e88412..0ca459450cf 100644
--- a/@xen-orchestra/lite/src/stories/web-core/ui-chip.story.vue
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/chip/ui-chip.story.vue
@@ -3,8 +3,8 @@
v-slot="{ properties, settings }"
:params="[
iconProp(),
- colorProp(),
- prop('disabled').bool().widget().ctx(),
+ prop('accent').required().enum('info', 'success', 'warning', 'danger').preset('info').widget(),
+ prop('disabled').bool().widget(),
event('edit'),
event('remove'),
slot(),
@@ -17,6 +17,6 @@
diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/complex-icon/ui-complex-icon.story.md b/@xen-orchestra/lite/src/stories/web-core/ui/complex-icon/ui-complex-icon.story.md
new file mode 100644
index 00000000000..e675f8642a6
--- /dev/null
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/complex-icon/ui-complex-icon.story.md
@@ -0,0 +1,14 @@
+ComplexIcon component usage:
+
+```vue-template
+
+
+
+
+```
+
+```vue-script
+import UiComplexIcon from '@core/components/ui/complex-icon/UiComplexIcon.vue'
+import VtsIcon from '@core/components/icon/VtsIcon.vue'
+import {faLightbulb, faRotateRight} from '@fortawesome/free-solid-svg-icons'
+```
diff --git a/@xen-orchestra/lite/src/stories/web-core/icon/complex-icon.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/complex-icon/ui-complex-icon.story.vue
similarity index 60%
rename from @xen-orchestra/lite/src/stories/web-core/icon/complex-icon.story.vue
rename to @xen-orchestra/lite/src/stories/web-core/ui/complex-icon/ui-complex-icon.story.vue
index 32752f906cd..3aa1113b8b4 100644
--- a/@xen-orchestra/lite/src/stories/web-core/icon/complex-icon.story.vue
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/complex-icon/ui-complex-icon.story.vue
@@ -2,21 +2,21 @@
-
+
-
+
diff --git a/@xen-orchestra/lite/src/stories/web-core/counter/vts-counter.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/counter/ui-counter.story.vue
similarity index 86%
rename from @xen-orchestra/lite/src/stories/web-core/counter/vts-counter.story.vue
rename to @xen-orchestra/lite/src/stories/web-core/ui/counter/ui-counter.story.vue
index 4c3f981c85a..0347bb4157d 100644
--- a/@xen-orchestra/lite/src/stories/web-core/counter/vts-counter.story.vue
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/counter/ui-counter.story.vue
@@ -12,12 +12,12 @@
prop('variant').enum('primary', 'secondary').required().preset('primary').widget(),
]"
>
-
+
diff --git a/@xen-orchestra/lite/src/stories/web-core/donut-chart/donut-chart.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/donut-chart/ui-donut-chart.story.vue
similarity index 57%
rename from @xen-orchestra/lite/src/stories/web-core/donut-chart/donut-chart.story.vue
rename to @xen-orchestra/lite/src/stories/web-core/ui/donut-chart/ui-donut-chart.story.vue
index 84183b8f7b8..666c5943236 100644
--- a/@xen-orchestra/lite/src/stories/web-core/donut-chart/donut-chart.story.vue
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/donut-chart/ui-donut-chart.story.vue
@@ -3,7 +3,7 @@
v-slot="{ properties }"
:params="[prop('segments').type('DonutSegment[]').required().preset(segments).widget(object()), iconProp()]"
>
-
+
@@ -11,12 +11,14 @@
import ComponentStory from '@/components/component-story/ComponentStory.vue'
import { prop, iconProp } from '@/libs/story/story-param'
import { object } from '@/libs/story/story-widget'
-import DonutChart, { type DonutSegment } from '@core/components/donut-chart/DonutChart.vue'
+import UiDonutChart, { type DonutSegment } from '@core/components/ui/donut-chart/UiDonutChart.vue'
const segments: DonutSegment[] = [
- { value: 16, color: 'success' },
- { value: 22, color: 'warning' },
- { value: 35, color: 'danger' },
- { value: 12, color: 'disabled' },
+ { value: 13, accent: 'info' },
+ { value: 14, accent: 'neutral' },
+ { value: 16, accent: 'success' },
+ { value: 22, accent: 'warning' },
+ { value: 35, accent: 'danger' },
+ { value: 12, accent: 'muted' },
]
diff --git a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.md b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.md
similarity index 77%
rename from @xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.md
rename to @xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.md
index f91273e7745..92b69cd9133 100644
--- a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.md
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.md
@@ -1,7 +1,7 @@
-`HeadBar` component usage with `ObjectIcon` and `UiButton` components:
+`UiHeadBar` component usage with `ObjectIcon` and `UiButton` components:
```vue-template
-
+
Host name
@@ -10,12 +10,12 @@
New VM
Change state
-
+
```
```vue-script
import UiButton from '@core/components/button/UiButton.vue'
-import HeadBar from '@core/components/head-bar/HeadBar.vue'
+import UiHeadBar from '@core/components/ui/head-bar/UiHeadBar.vue'
import ObjectIcon from '@core/components/icon/ObjectIcon.vue'
import { faPlus, faPowerOff } from '@fortawesome/free-solid-svg-icons'
```
diff --git a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.vue
similarity index 71%
rename from @xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.vue
rename to @xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.vue
index e270149cb9d..fd91aabae6b 100644
--- a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.vue
+++ b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.vue
@@ -12,17 +12,17 @@
setting('showStatusSlotDemoContent').widget(boolean()),
]"
>
-
+
{{ settings.default }}
-
+
migrating... (34%)
- New VM
- Change state
+ New VM
+ Change state
-
+
@@ -30,14 +30,14 @@
import ComponentStory from '@/components/component-story/ComponentStory.vue'
import { iconProp, setting, slot } from '@/libs/story/story-param'
import { boolean } from '@/libs/story/story-widget'
-import UiButton from '@core/components/button/UiButton.vue'
-import HeadBar from '@core/components/head-bar/HeadBar.vue'
-import UiSpinner from '@core/components/UiSpinner.vue'
+import UiButton from '@core/components/ui/button/UiButton.vue'
+import UiHeadBar from '@core/components/ui/head-bar/UiHeadBar.vue'
+import UiLoader from '@core/components/ui/loader/UiLoader.vue'
import { faPlus, faPowerOff } from '@fortawesome/free-solid-svg-icons'
diff --git a/@xen-orchestra/web-core/lib/components/PowerStateIcon.vue b/@xen-orchestra/web-core/lib/components/PowerStateIcon.vue
deleted file mode 100644
index 2384ece5f0a..00000000000
--- a/@xen-orchestra/web-core/lib/components/PowerStateIcon.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/@xen-orchestra/web-core/lib/components/UiTag.vue b/@xen-orchestra/web-core/lib/components/UiTag.vue
deleted file mode 100644
index 2d55738f29a..00000000000
--- a/@xen-orchestra/web-core/lib/components/UiTag.vue
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/@xen-orchestra/web-core/lib/components/backdrop/Backdrop.vue b/@xen-orchestra/web-core/lib/components/backdrop/VtsBackdrop.vue
similarity index 100%
rename from @xen-orchestra/web-core/lib/components/backdrop/Backdrop.vue
rename to @xen-orchestra/web-core/lib/components/backdrop/VtsBackdrop.vue
diff --git a/@xen-orchestra/web-core/lib/components/backup-item/BackupItem.vue b/@xen-orchestra/web-core/lib/components/backup-item/BackupItem.vue
deleted file mode 100644
index 2ab4eeb9829..00000000000
--- a/@xen-orchestra/web-core/lib/components/backup-item/BackupItem.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- {{ backup.label }}
-
-
- {{ backup.label }}
-
-
-
-
-
-
-
-
-
-
diff --git a/@xen-orchestra/web-core/lib/components/backup-item/VtsBackupItem.vue b/@xen-orchestra/web-core/lib/components/backup-item/VtsBackupItem.vue
new file mode 100644
index 00000000000..7b1431a867c
--- /dev/null
+++ b/@xen-orchestra/web-core/lib/components/backup-item/VtsBackupItem.vue
@@ -0,0 +1,47 @@
+
+
+
+ {{ backup.label }}
+
+
+ {{ backup.label }}
+
+
+
+
+
+
+
+
+
+
diff --git a/@xen-orchestra/web-core/lib/components/backup-state/BackupState.vue b/@xen-orchestra/web-core/lib/components/backup-state/VtsBackupState.vue
similarity index 85%
rename from @xen-orchestra/web-core/lib/components/backup-state/BackupState.vue
rename to @xen-orchestra/web-core/lib/components/backup-state/VtsBackupState.vue
index 1b1c7e4556f..1bda32cfa0f 100644
--- a/@xen-orchestra/web-core/lib/components/backup-state/BackupState.vue
+++ b/@xen-orchestra/web-core/lib/components/backup-state/VtsBackupState.vue
@@ -1,15 +1,15 @@
-
-
+
diff --git a/@xen-orchestra/web-core/lib/components/button/ButtonGroup.vue b/@xen-orchestra/web-core/lib/components/button-group/VtsButtonGroup.vue
similarity index 75%
rename from @xen-orchestra/web-core/lib/components/button/ButtonGroup.vue
rename to @xen-orchestra/web-core/lib/components/button-group/VtsButtonGroup.vue
index c20e17fe80b..9547999524e 100644
--- a/@xen-orchestra/web-core/lib/components/button/ButtonGroup.vue
+++ b/@xen-orchestra/web-core/lib/components/button-group/VtsButtonGroup.vue
@@ -1,7 +1,8 @@
-
- |