@xen-orchestra/web-core 0.58.0 → 0.60.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/assets/css/_colors.pcss +1 -1
- package/lib/components/card/VtsCardRowKeyValue.vue +1 -1
- package/lib/components/cell-object/VtsCellObject.vue +1 -1
- package/lib/components/cell-text/VtsCellText.vue +1 -1
- package/lib/components/console/VtsActionsConsole.vue +1 -1
- package/lib/components/console/VtsClipboardConsole.vue +1 -1
- package/lib/components/console/VtsLayoutConsole.vue +1 -1
- package/lib/components/console/VtsRemoteConsole.vue +1 -1
- package/lib/components/copy-button/VtsCopyButton.vue +1 -1
- package/lib/components/delete-button/VtsDeleteButton.vue +1 -1
- package/lib/components/icon/VtsIcon.vue +1 -1
- package/lib/components/input-wrapper/VtsInputWrapper.vue +3 -3
- package/lib/components/key-value-pair/VtsKeyValuePair.vue +1 -1
- package/lib/components/layout/VtsContentSidePanel.vue +2 -2
- package/lib/components/linear-chart/VtsLinearChart.vue +1 -1
- package/lib/components/menu/MenuItem.vue +2 -2
- package/lib/components/menu/MenuList.vue +2 -2
- package/lib/components/menu/MenuSeparator.vue +1 -1
- package/lib/components/modal/VtsActionModal.vue +57 -13
- package/lib/components/modal/VtsBlockedModal.vue +7 -7
- package/lib/components/modal/VtsDeleteModal.vue +20 -15
- package/lib/components/modal/VtsErrorModal.vue +10 -6
- package/lib/components/object-icon/VtsObjectIcon.vue +3 -1
- package/lib/components/panel/VtsPanel.vue +1 -1
- package/lib/components/panel/VtsSidePanel.vue +3 -3
- package/lib/components/query-builder/VtsQueryBuilder.vue +3 -3
- package/lib/components/query-builder/VtsQueryBuilderButton.vue +17 -11
- package/lib/components/query-builder/VtsQueryBuilderFilter.vue +1 -1
- package/lib/components/query-builder/VtsQueryBuilderGroup.vue +1 -1
- package/lib/components/query-builder/VtsQueryBuilderModal.vue +13 -8
- package/lib/components/query-builder/VtsQueryBuilderRow.vue +1 -1
- package/lib/components/relative-time/VtsRelativeTime.vue +2 -2
- package/lib/components/space-card/VtsSpaceCard.vue +11 -7
- package/lib/components/sr-connection-modal/VtsSrConnectionModal.vue +77 -0
- package/lib/components/stacked-bar-with-legend/VtsStackedBarWithLegend.vue +1 -1
- package/lib/components/state-hero/VtsStateHero.vue +1 -1
- package/lib/components/status/VtsStatus.vue +1 -1
- package/lib/components/tab/TabItem.vue +2 -2
- package/lib/components/tab/TabList.vue +1 -1
- package/lib/components/table/VtsTable.vue +3 -3
- package/lib/components/table/cells/VtsCollapsedListCell.vue +1 -1
- package/lib/components/table/cells/VtsLinkCell.vue +2 -2
- package/lib/components/table/cells/VtsStatusCell.vue +3 -3
- package/lib/components/table/cells/VtsTagCell.vue +2 -2
- package/lib/components/table/cells/VtsTextCell.vue +1 -1
- package/lib/components/tag/VtsTag.vue +1 -1
- package/lib/components/task/VtsQuickTaskButton.vue +1 -1
- package/lib/components/task/VtsQuickTaskTabBar.vue +1 -1
- package/lib/components/tooltip-list/VtsTooltipList.vue +1 -1
- package/lib/components/tree/VtsTreeList.vue +1 -1
- package/lib/components/tree/VtsTreeLoadingItem.vue +1 -1
- package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +1 -1
- package/lib/components/ui/alarm-item/UiAlarmItem.vue +2 -2
- package/lib/components/ui/alert/UiAlert.vue +1 -1
- package/lib/components/ui/button/UiButton.vue +2 -2
- package/lib/components/ui/button-icon/UiButtonIcon.vue +1 -1
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +1 -1
- package/lib/components/ui/checkbox/UiCheckbox.vue +201 -189
- package/lib/components/ui/chip/UiChip.vue +1 -1
- package/lib/components/ui/counter/UiCounter.vue +1 -1
- package/lib/components/ui/drawer/UiDrawer.vue +37 -54
- package/lib/components/ui/dropdown/UiDropdown.vue +2 -2
- package/lib/components/ui/dropdown-button/UiDropdownButton.vue +1 -1
- package/lib/components/ui/head-bar/UiHeadBar.vue +1 -1
- package/lib/components/ui/info/UiInfo.vue +1 -1
- package/lib/components/ui/input/UiInput.vue +2 -2
- package/lib/components/ui/label/UiLabel.vue +1 -1
- package/lib/components/ui/legend/UiLegend.vue +2 -2
- package/lib/components/ui/legend-title/UiLegendTitle.vue +1 -1
- package/lib/components/ui/link/UiLink.vue +2 -2
- package/lib/components/ui/loader/UiLoader.vue +1 -1
- package/lib/components/ui/modal/UiModal.vue +17 -5
- package/lib/components/ui/object-link/UiObjectLink.vue +1 -1
- package/lib/components/ui/panel-card/UiPanelCard.vue +20 -0
- package/lib/components/ui/progress-bar/UiProgressBar.vue +1 -1
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +2 -2
- package/lib/components/ui/quick-task-panel/UiQuickTaskPanel.vue +1 -1
- package/lib/components/ui/radio-button/UiRadioButton.vue +2 -2
- package/lib/components/ui/stacked-bar/StackedBarSegment.vue +2 -2
- package/lib/components/ui/stacked-bar/UiStackedBar.vue +1 -1
- package/lib/components/ui/tag/UiTag.vue +1 -1
- package/lib/components/ui/task-item/UiTaskItem.vue +1 -1
- package/lib/components/ui/text-area/UiTextarea.vue +1 -1
- package/lib/components/ui/toaster/UiToaster.vue +1 -1
- package/lib/components/ui/toggle/UiToggle.vue +1 -1
- package/lib/components/ui/tooltip/UiTooltip.vue +2 -2
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +6 -2
- package/lib/components/ui/user-link/UiUserLink.vue +1 -1
- package/lib/components/ui/user-logo/UiUserLogo.vue +1 -1
- package/lib/components/{vif-connection-toggle-modal/VtsVifConnectionToggleModal.vue → vif-connection-modal/VtsVifConnectionModal.vue} +15 -10
- package/lib/composables/chart-theme.composable.ts +1 -1
- package/lib/composables/context.composable.ts +1 -1
- package/lib/composables/default-tab.composable.ts +1 -1
- package/lib/composables/disabled.composable.ts +1 -1
- package/lib/composables/hide-route-query.composable.ts +1 -1
- package/lib/composables/link-component.composable.ts +1 -1
- package/lib/composables/modals/use-action-modal.ts +11 -0
- package/lib/composables/modals/use-blocked-modal.ts +10 -0
- package/lib/composables/modals/use-delete-modal.ts +11 -0
- package/lib/composables/pagination.composable.ts +2 -2
- package/lib/composables/route-query/types.ts +1 -1
- package/lib/composables/route-query.composable.ts +5 -5
- package/lib/composables/sort-route-query.composable.ts +1 -1
- package/lib/composables/tab-list.composable.ts +1 -1
- package/lib/composables/table/create-base-definition.ts +1 -1
- package/lib/composables/table/create-define-column.ts +6 -6
- package/lib/composables/table/create-sorting-definition.ts +2 -2
- package/lib/composables/table/create-visibility-definition.ts +2 -2
- package/lib/composables/table/type.ts +1 -1
- package/lib/composables/table.composable.ts +4 -4
- package/lib/composables/tree-filter.composable.ts +1 -1
- package/lib/directives/tooltip.directive.ts +2 -2
- package/lib/i18n.ts +4 -0
- package/lib/icons/index.ts +1 -1
- package/lib/locales/ar.json +1 -0
- package/lib/locales/cs.json +54 -6
- package/lib/locales/de.json +0 -2
- package/lib/locales/en.json +91 -9
- package/lib/locales/es.json +0 -1
- package/lib/locales/fi.json +20 -1
- package/lib/locales/fr.json +95 -13
- package/lib/locales/nb-NO.json +0 -1
- package/lib/locales/nl.json +81 -6
- package/lib/locales/pt-BR.json +1 -1
- package/lib/locales/pt.json +0 -1
- package/lib/locales/sk.json +54 -6
- package/lib/locales/sv.json +38 -2
- package/lib/locales/zh-Hans.json +0 -4
- package/lib/packages/form-select/use-form-select-controller.ts +1 -1
- package/lib/packages/job/define-job.ts +5 -5
- package/lib/packages/job/index.ts +4 -4
- package/lib/packages/job/use-job-store.ts +2 -2
- package/lib/packages/menu/action.ts +1 -1
- package/lib/packages/menu/context.ts +1 -1
- package/lib/packages/menu/index.ts +10 -10
- package/lib/packages/menu/job.ts +3 -3
- package/lib/packages/menu/link.ts +1 -1
- package/lib/packages/menu/router-link.ts +1 -1
- package/lib/packages/menu/toggle-target.ts +1 -1
- package/lib/packages/query-builder/group/build-root-group.ts +1 -1
- package/lib/packages/query-builder/node/handle-comparison-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-glob-pattern-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-group-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-node.ts +8 -8
- package/lib/packages/query-builder/node/handle-null-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-property-group-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-property-node.ts +8 -8
- package/lib/packages/query-builder/node/handle-regexp-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-string-or-number-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-truthy-property-node.ts +1 -1
- package/lib/packages/query-builder/use-query-builder.ts +2 -2
- package/lib/packages/remote-resource/define-remote-resource.ts +1 -1
- package/lib/packages/threshold/use-threshold.ts +1 -1
- package/lib/packages/tree/branch-definition.ts +2 -2
- package/lib/packages/tree/branch.ts +8 -2
- package/lib/packages/tree/build-nodes.ts +3 -3
- package/lib/packages/tree/define-branch.ts +2 -2
- package/lib/packages/tree/define-leaf.ts +2 -2
- package/lib/packages/tree/define-tree.ts +3 -3
- package/lib/packages/tree/leaf-definition.ts +1 -1
- package/lib/packages/tree/leaf.ts +2 -2
- package/lib/packages/tree/tree-node-base.ts +2 -2
- package/lib/packages/tree/tree-node-definition-base.ts +1 -1
- package/lib/packages/tree/types.ts +6 -6
- package/lib/packages/tree/use-tree.ts +2 -2
- package/lib/stores/panel.store.ts +1 -1
- package/lib/stores/tooltip.store.ts +2 -2
- package/lib/tables/column-definitions/action-column.ts +2 -2
- package/lib/tables/column-definitions/button-column.ts +3 -3
- package/lib/tables/column-definitions/button-icon-column.ts +2 -2
- package/lib/tables/column-definitions/date-column.ts +3 -3
- package/lib/tables/column-definitions/info-column.ts +3 -3
- package/lib/tables/column-definitions/input-column.ts +3 -3
- package/lib/tables/column-definitions/link-column.ts +2 -2
- package/lib/tables/column-definitions/literal-column.ts +3 -3
- package/lib/tables/column-definitions/number-column.ts +2 -2
- package/lib/tables/column-definitions/percent-column.ts +2 -2
- package/lib/tables/column-definitions/progress-bar-column.ts +2 -2
- package/lib/tables/column-definitions/select-column.ts +2 -2
- package/lib/tables/column-definitions/status-column.ts +2 -2
- package/lib/tables/column-definitions/tag-column.ts +3 -3
- package/lib/tables/column-sets/backup-issue-columns.ts +1 -1
- package/lib/tables/column-sets/backup-job-columns.ts +1 -1
- package/lib/tables/column-sets/backup-job-schedule-columns.ts +1 -1
- package/lib/tables/column-sets/backup-log-columns.ts +1 -1
- package/lib/tables/column-sets/host-columns.ts +3 -3
- package/lib/tables/column-sets/network-columns.ts +2 -2
- package/lib/tables/column-sets/pif-columns.ts +2 -2
- package/lib/tables/column-sets/server-columns.ts +1 -1
- package/lib/tables/column-sets/sr-columns.ts +3 -3
- package/lib/tables/column-sets/vdi-columns.ts +2 -0
- package/lib/tables/column-sets/vif-columns.ts +1 -1
- package/lib/tables/column-sets/vif-network-columns.ts +1 -1
- package/lib/tables/column-sets/vm-backup-archive-columns.ts +3 -3
- package/lib/tables/column-sets/vm-backup-run-colums.ts +2 -2
- package/lib/tables/column-sets/vm-columns.ts +1 -1
- package/lib/types/object.type.ts +11 -1
- package/lib/utils/create-subscribable-store-context.util.ts +2 -2
- package/lib/utils/download-bugtools.utils.ts +1 -1
- package/lib/utils/if-else.utils.ts +2 -2
- package/lib/utils/injection-keys.util.ts +0 -2
- package/lib/utils/progress.util.ts +1 -1
- package/lib/utils/to-array.utils.ts +1 -1
- package/package.json +1 -1
- package/lib/components/drawer/VtsDrawer.vue +0 -89
- package/lib/components/drawer/VtsDrawerButton.vue +0 -22
- package/lib/components/drawer/VtsDrawerCancelButton.vue +0 -33
- package/lib/components/drawer/VtsDrawerConfirmButton.vue +0 -32
- package/lib/components/drawer/VtsDrawerList.vue +0 -34
- package/lib/components/modal/VtsModal.vue +0 -82
- package/lib/components/modal/VtsModalButton.vue +0 -35
- package/lib/components/modal/VtsModalCancelButton.vue +0 -37
- package/lib/components/modal/VtsModalConfirmButton.vue +0 -21
- package/lib/components/modal/VtsModalList.vue +0 -34
- package/lib/packages/drawer/DrawerProvider.vue +0 -17
- package/lib/packages/drawer/README.md +0 -189
- package/lib/packages/drawer/create-drawer-opener.ts +0 -119
- package/lib/packages/drawer/drawer.store.ts +0 -22
- package/lib/packages/drawer/types.ts +0 -93
- package/lib/packages/drawer/use-drawer.ts +0 -53
- package/lib/packages/modal/ModalProvider.vue +0 -17
- package/lib/packages/modal/README.md +0 -253
- package/lib/packages/modal/create-modal-opener.ts +0 -106
- package/lib/packages/modal/modal.store.ts +0 -22
- package/lib/packages/modal/types.ts +0 -91
- package/lib/packages/modal/use-modal.ts +0 -53
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v8 -->
|
|
2
2
|
<template>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
3
|
+
<div class="ui-checkbox">
|
|
4
|
+
<label :class="classNames" class="checkbox-label" v-bind="wrapperAttrs">
|
|
5
|
+
<input
|
|
6
|
+
v-model="checkboxModel"
|
|
7
|
+
:class="{ indeterminate: isIndeterminate }"
|
|
8
|
+
:disabled="isDisabled"
|
|
9
|
+
class="input"
|
|
10
|
+
type="checkbox"
|
|
11
|
+
v-bind="attrs"
|
|
12
|
+
/>
|
|
13
|
+
<span class="fake-checkbox">
|
|
14
|
+
<VtsIcon :name="icon" size="medium" class="icon" />
|
|
15
|
+
</span>
|
|
16
|
+
<span v-if="slots.default" class="typo-body-regular">
|
|
17
|
+
<slot />
|
|
18
|
+
</span>
|
|
19
|
+
</label>
|
|
20
|
+
<UiInfo v-if="slots.info" accent="info">
|
|
21
|
+
<slot name="info" />
|
|
22
|
+
</UiInfo>
|
|
23
|
+
<UiInfo v-if="slots.message && accent !== 'brand'" :accent>
|
|
24
|
+
<slot name="message" />
|
|
25
|
+
</UiInfo>
|
|
26
|
+
</div>
|
|
22
27
|
</template>
|
|
23
28
|
|
|
24
29
|
<script lang="ts" setup>
|
|
25
30
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
26
31
|
import UiInfo from '@core/components/ui/info/UiInfo.vue'
|
|
27
|
-
import { useDisabled } from '@core/composables/disabled.composable'
|
|
28
|
-
import { toVariants } from '@core/utils/to-variants.util'
|
|
32
|
+
import { useDisabled } from '@core/composables/disabled.composable.ts'
|
|
33
|
+
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
29
34
|
import { computed, type LabelHTMLAttributes, useAttrs } from 'vue'
|
|
30
35
|
|
|
31
36
|
type CheckboxAccent = 'brand' | 'warning' | 'danger'
|
|
@@ -43,6 +48,7 @@ const checkboxModel = defineModel<boolean | undefined | string[]>({ default: und
|
|
|
43
48
|
const slots = defineSlots<{
|
|
44
49
|
default?(): any
|
|
45
50
|
info?(): any
|
|
51
|
+
message?(): any
|
|
46
52
|
}>()
|
|
47
53
|
|
|
48
54
|
const isDisabled = useDisabled(() => disabled)
|
|
@@ -63,234 +69,240 @@ const attrs = useAttrs()
|
|
|
63
69
|
|
|
64
70
|
<style lang="postcss" scoped>
|
|
65
71
|
.ui-checkbox {
|
|
66
|
-
display:
|
|
67
|
-
|
|
68
|
-
gap: 0.
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
gap: 0.4rem;
|
|
69
75
|
|
|
70
|
-
.
|
|
76
|
+
.checkbox-label {
|
|
71
77
|
display: inline-flex;
|
|
72
78
|
align-items: center;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
gap: 0.4rem;
|
|
80
|
+
|
|
81
|
+
.fake-checkbox {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
height: 1.6rem;
|
|
86
|
+
width: 1.6rem;
|
|
87
|
+
transition:
|
|
88
|
+
background-color 0.125s ease-in-out,
|
|
89
|
+
border-color 0.125s ease-in-out;
|
|
90
|
+
border: 0.2rem solid transparent;
|
|
91
|
+
border-radius: 0.2rem;
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
|
|
94
|
+
.icon {
|
|
95
|
+
font-size: 0.75rem;
|
|
96
|
+
color: var(--color-neutral-background-primary);
|
|
97
|
+
transition: opacity 0.125s ease-in-out;
|
|
98
|
+
}
|
|
87
99
|
}
|
|
88
|
-
}
|
|
89
100
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
.input {
|
|
102
|
+
font-size: inherit;
|
|
103
|
+
position: absolute;
|
|
104
|
+
pointer-events: none;
|
|
105
|
+
opacity: 0;
|
|
95
106
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
&.indeterminate + .fake-checkbox > .icon {
|
|
108
|
+
opacity: 1;
|
|
109
|
+
color: var(--color-neutral-background-primary);
|
|
110
|
+
}
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
112
|
+
& + .fake-checkbox > .icon {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
&:checked + .fake-checkbox > .icon {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
}
|
|
108
119
|
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
&:focus-visible + .fake-checkbox {
|
|
121
|
+
outline: none;
|
|
111
122
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
&::before {
|
|
124
|
+
content: '';
|
|
125
|
+
position: absolute;
|
|
126
|
+
inset: -0.5rem;
|
|
127
|
+
border-radius: 0.4rem;
|
|
128
|
+
border-width: 0.2rem;
|
|
129
|
+
border-style: solid;
|
|
130
|
+
}
|
|
119
131
|
}
|
|
120
132
|
}
|
|
121
|
-
}
|
|
122
133
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
134
|
+
&.accent--brand {
|
|
135
|
+
.input:not(:disabled) {
|
|
136
|
+
& + .fake-checkbox {
|
|
137
|
+
border-color: var(--color-brand-txt-base);
|
|
138
|
+
}
|
|
128
139
|
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
&.indeterminate + .fake-checkbox {
|
|
141
|
+
background-color: var(--color-brand-txt-base);
|
|
142
|
+
|
|
143
|
+
&:hover {
|
|
144
|
+
border-color: transparent;
|
|
145
|
+
background-color: var(--color-brand-txt-hover);
|
|
146
|
+
}
|
|
131
147
|
|
|
132
|
-
|
|
148
|
+
&:active {
|
|
149
|
+
background-color: var(--color-brand-txt-active);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.indeterminate:hover + .fake-checkbox {
|
|
133
154
|
border-color: transparent;
|
|
134
|
-
background-color: var(--color-brand-
|
|
155
|
+
background-color: var(--color-brand-txt-hover);
|
|
135
156
|
}
|
|
136
157
|
|
|
137
|
-
&:
|
|
138
|
-
|
|
158
|
+
&:hover + .fake-checkbox {
|
|
159
|
+
border-color: var(--color-brand-txt-hover);
|
|
139
160
|
}
|
|
140
|
-
}
|
|
141
161
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
162
|
+
&:focus-visible + .fake-checkbox::before {
|
|
163
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
164
|
+
}
|
|
146
165
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
166
|
+
&:active + .fake-checkbox {
|
|
167
|
+
border-color: var(--color-brand-txt-active);
|
|
168
|
+
}
|
|
150
169
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
170
|
+
&:checked + .fake-checkbox {
|
|
171
|
+
border-color: transparent;
|
|
172
|
+
background-color: var(--color-brand-txt-base);
|
|
173
|
+
}
|
|
154
174
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
175
|
+
&:checked:hover + .fake-checkbox {
|
|
176
|
+
background-color: var(--color-brand-txt-hover);
|
|
177
|
+
}
|
|
158
178
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
179
|
+
&:checked:active + .fake-checkbox {
|
|
180
|
+
background-color: var(--color-brand-txt-active);
|
|
181
|
+
}
|
|
162
182
|
}
|
|
183
|
+
}
|
|
163
184
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
185
|
+
&.accent--warning {
|
|
186
|
+
.input:not(:disabled) {
|
|
187
|
+
& + .fake-checkbox {
|
|
188
|
+
border-color: var(--color-warning-txt-base);
|
|
189
|
+
}
|
|
167
190
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
191
|
+
&.indeterminate + .fake-checkbox {
|
|
192
|
+
background-color: var(--color-warning-txt-base);
|
|
173
193
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
194
|
+
&:hover {
|
|
195
|
+
border-color: transparent;
|
|
196
|
+
background-color: var(--color-warning-txt-hover);
|
|
197
|
+
}
|
|
179
198
|
|
|
180
|
-
|
|
181
|
-
|
|
199
|
+
&:active {
|
|
200
|
+
background-color: var(--color-warning-txt-active);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
182
203
|
|
|
183
|
-
|
|
204
|
+
&.indeterminate:hover + .fake-checkbox {
|
|
184
205
|
border-color: transparent;
|
|
185
|
-
background-color: var(--color-warning-
|
|
206
|
+
background-color: var(--color-warning-txt-hover);
|
|
186
207
|
}
|
|
187
208
|
|
|
188
|
-
&:
|
|
189
|
-
|
|
209
|
+
&:hover + .fake-checkbox {
|
|
210
|
+
border-color: var(--color-warning-txt-hover);
|
|
190
211
|
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
&.indeterminate:hover + .fake-checkbox {
|
|
194
|
-
border-color: transparent;
|
|
195
|
-
background-color: var(--color-warning-item-hover);
|
|
196
|
-
}
|
|
197
212
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
&:focus-visible + .fake-checkbox::before {
|
|
203
|
-
border: 0.2rem solid var(--color-brand-txt-base);
|
|
204
|
-
}
|
|
213
|
+
&:focus-visible + .fake-checkbox::before {
|
|
214
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
215
|
+
}
|
|
205
216
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
217
|
+
&:active + .fake-checkbox {
|
|
218
|
+
border-color: var(--color-warning-txt-active);
|
|
219
|
+
}
|
|
209
220
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
221
|
+
&:checked + .fake-checkbox {
|
|
222
|
+
border-color: transparent;
|
|
223
|
+
background-color: var(--color-warning-txt-base);
|
|
224
|
+
}
|
|
214
225
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
226
|
+
&:checked:hover + .fake-checkbox {
|
|
227
|
+
background-color: var(--color-warning-txt-hover);
|
|
228
|
+
}
|
|
218
229
|
|
|
219
|
-
|
|
220
|
-
|
|
230
|
+
&:checked:active + .fake-checkbox {
|
|
231
|
+
background-color: var(--color-warning-txt-active);
|
|
232
|
+
}
|
|
221
233
|
}
|
|
222
234
|
}
|
|
223
|
-
}
|
|
224
235
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
236
|
+
&.accent--danger {
|
|
237
|
+
.input:not(:disabled) {
|
|
238
|
+
& + .fake-checkbox {
|
|
239
|
+
border-color: var(--color-danger-txt-base);
|
|
229
240
|
|
|
230
|
-
|
|
231
|
-
|
|
241
|
+
> .icon {
|
|
242
|
+
color: var(--color-danger-txt-item);
|
|
243
|
+
}
|
|
232
244
|
}
|
|
233
|
-
}
|
|
234
245
|
|
|
235
|
-
|
|
236
|
-
|
|
246
|
+
&.indeterminate + .fake-checkbox {
|
|
247
|
+
background-color: var(--color-danger-txt-base);
|
|
237
248
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
249
|
+
&:hover {
|
|
250
|
+
border-color: transparent;
|
|
251
|
+
background-color: var(--color-danger-txt-hover);
|
|
252
|
+
}
|
|
242
253
|
|
|
243
|
-
|
|
244
|
-
|
|
254
|
+
&:active {
|
|
255
|
+
background-color: var(--color-danger-txt-active);
|
|
256
|
+
}
|
|
245
257
|
}
|
|
246
|
-
}
|
|
247
258
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
259
|
+
&.indeterminate:hover + .fake-checkbox {
|
|
260
|
+
border-color: transparent;
|
|
261
|
+
background-color: var(--color-danger-txt-hover);
|
|
262
|
+
}
|
|
252
263
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
264
|
+
&:hover + .fake-checkbox {
|
|
265
|
+
border-color: var(--color-danger-txt-hover);
|
|
266
|
+
}
|
|
256
267
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
268
|
+
&:focus-visible + .fake-checkbox::before {
|
|
269
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
270
|
+
}
|
|
260
271
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
272
|
+
&:active + .fake-checkbox {
|
|
273
|
+
border-color: var(--color-danger-txt-active);
|
|
274
|
+
}
|
|
264
275
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
276
|
+
&:checked + .fake-checkbox {
|
|
277
|
+
border-color: transparent;
|
|
278
|
+
background-color: var(--color-danger-txt-base);
|
|
279
|
+
}
|
|
269
280
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
281
|
+
&:checked:hover + .fake-checkbox {
|
|
282
|
+
background-color: var(--color-danger-txt-hover);
|
|
283
|
+
}
|
|
273
284
|
|
|
274
|
-
|
|
275
|
-
|
|
285
|
+
&:checked:active + .fake-checkbox {
|
|
286
|
+
background-color: var(--color-danger-txt-active);
|
|
287
|
+
}
|
|
276
288
|
}
|
|
277
289
|
}
|
|
278
|
-
}
|
|
279
290
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
291
|
+
.input:disabled {
|
|
292
|
+
& + .fake-checkbox {
|
|
293
|
+
cursor: not-allowed;
|
|
294
|
+
border-color: var(--color-neutral-txt-secondary);
|
|
284
295
|
|
|
285
|
-
|
|
286
|
-
|
|
296
|
+
> .icon {
|
|
297
|
+
color: var(--color-neutral-background-disabled);
|
|
298
|
+
}
|
|
287
299
|
}
|
|
288
|
-
}
|
|
289
300
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
301
|
+
&:checked + .fake-checkbox,
|
|
302
|
+
&.indeterminate + .fake-checkbox {
|
|
303
|
+
border-color: transparent;
|
|
304
|
+
background-color: var(--color-neutral-txt-secondary);
|
|
305
|
+
}
|
|
294
306
|
}
|
|
295
307
|
}
|
|
296
308
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<script lang="ts" setup>
|
|
14
14
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
15
|
-
import { toVariants } from '@core/utils/to-variants.util'
|
|
15
|
+
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
16
16
|
import { computed } from 'vue'
|
|
17
17
|
|
|
18
18
|
export type ChipAccent = 'info' | 'success' | 'warning' | 'danger'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script lang="ts" setup>
|
|
9
|
-
import { toVariants } from '@core/utils/to-variants.util'
|
|
9
|
+
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
10
10
|
import { computed } from 'vue'
|
|
11
11
|
|
|
12
12
|
type CounterAccent = 'brand' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'muted'
|
|
@@ -1,46 +1,50 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
icon="action:close-cancel-clear"
|
|
15
|
-
accent="brand"
|
|
16
|
-
size="small"
|
|
17
|
-
@click="emit('dismiss')"
|
|
18
|
-
/>
|
|
2
|
+
<form class="ui-drawer" @click.self="emit('dismiss')" @submit.prevent="emit('confirm')">
|
|
3
|
+
<aside
|
|
4
|
+
:aria-labelledby="slots.title || title !== undefined ? titleId : undefined"
|
|
5
|
+
aria-modal="true"
|
|
6
|
+
class="drawer"
|
|
7
|
+
role="dialog"
|
|
8
|
+
>
|
|
9
|
+
<div class="header">
|
|
10
|
+
<div v-if="slots.title || title !== undefined" :id="titleId" class="typo-h4">
|
|
11
|
+
<slot name="title">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</slot>
|
|
19
14
|
</div>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
<UiButtonIcon
|
|
16
|
+
v-if="onDismiss"
|
|
17
|
+
:target-scale="2"
|
|
18
|
+
icon="action:close-cancel-clear"
|
|
19
|
+
accent="brand"
|
|
20
|
+
size="small"
|
|
21
|
+
@click="emit('dismiss')"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="content">
|
|
25
|
+
<slot name="content" />
|
|
26
|
+
</div>
|
|
27
|
+
<VtsButtonGroup v-if="slots.buttons" no-stack class="buttons">
|
|
28
|
+
<slot name="buttons" />
|
|
29
|
+
</VtsButtonGroup>
|
|
30
|
+
</aside>
|
|
31
|
+
</form>
|
|
29
32
|
</template>
|
|
30
33
|
|
|
31
34
|
<script lang="ts" setup>
|
|
32
35
|
import VtsButtonGroup from '@core/components/button-group/VtsButtonGroup.vue'
|
|
33
36
|
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
37
|
+
import { useOverlayEscape } from '@core/packages/overlay/use-overlay-escape.ts'
|
|
38
|
+
import { useId } from 'vue'
|
|
34
39
|
|
|
35
40
|
defineProps<{
|
|
36
|
-
isOpen: boolean
|
|
37
|
-
isDismissible?: boolean
|
|
38
41
|
title?: string
|
|
42
|
+
onDismiss?: () => any
|
|
39
43
|
}>()
|
|
40
44
|
|
|
41
45
|
const emit = defineEmits<{
|
|
46
|
+
confirm: []
|
|
42
47
|
dismiss: []
|
|
43
|
-
afterLeave: []
|
|
44
48
|
}>()
|
|
45
49
|
|
|
46
50
|
const slots = defineSlots<{
|
|
@@ -48,34 +52,13 @@ const slots = defineSlots<{
|
|
|
48
52
|
title?(): any
|
|
49
53
|
buttons?(): any
|
|
50
54
|
}>()
|
|
51
|
-
</script>
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
/* Slide-in from right */
|
|
55
|
-
.drawer-enter-active.ui-drawer,
|
|
56
|
-
.drawer-leave-active.ui-drawer {
|
|
57
|
-
transition: opacity 0.3s ease;
|
|
58
|
-
}
|
|
56
|
+
useOverlayEscape(() => emit('dismiss'))
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
transition: transform 0.3s ease;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.drawer-enter-from.ui-drawer,
|
|
66
|
-
.drawer-leave-to.ui-drawer {
|
|
67
|
-
opacity: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.drawer-enter-from .drawer,
|
|
71
|
-
.drawer-leave-to .drawer {
|
|
72
|
-
transform: translateX(100%);
|
|
73
|
-
|
|
74
|
-
&:dir(rtl) {
|
|
75
|
-
transform: translateX(-100%);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
58
|
+
const titleId = useId()
|
|
59
|
+
</script>
|
|
78
60
|
|
|
61
|
+
<style lang="postcss" scoped>
|
|
79
62
|
.ui-drawer {
|
|
80
63
|
position: fixed;
|
|
81
64
|
display: flex;
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
<script lang="ts" setup>
|
|
22
22
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
23
23
|
import UiCheckbox from '@core/components/ui/checkbox/UiCheckbox.vue'
|
|
24
|
-
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
24
|
+
import { vTooltip } from '@core/directives/tooltip.directive.ts'
|
|
25
25
|
import type { IconName } from '@core/icons'
|
|
26
|
-
import { toVariants } from '@core/utils/to-variants.util'
|
|
26
|
+
import { toVariants } from '@core/utils/to-variants.util.ts'
|
|
27
27
|
import { computed } from 'vue'
|
|
28
28
|
|
|
29
29
|
export type DropdownAccent = 'normal' | 'brand' | 'success' | 'warning' | 'danger'
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<script lang="ts" setup>
|
|
13
13
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
14
|
-
import { useDisabled } from '@core/composables/disabled.composable'
|
|
14
|
+
import { useDisabled } from '@core/composables/disabled.composable.ts'
|
|
15
15
|
import type { IconName } from '@core/icons'
|
|
16
16
|
|
|
17
17
|
const { disabled, selected, icon } = defineProps<{
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<script lang="ts" setup>
|
|
22
22
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
23
|
-
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
23
|
+
import { vTooltip } from '@core/directives/tooltip.directive.ts'
|
|
24
24
|
import type { IconName } from '@core/icons'
|
|
25
25
|
|
|
26
26
|
defineProps<{
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
13
|
-
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
13
|
+
import { vTooltip } from '@core/directives/tooltip.directive.ts'
|
|
14
14
|
import type { IconName } from '@core/icons'
|
|
15
15
|
import { useMapper } from '@core/packages/mapper'
|
|
16
16
|
|