@xen-orchestra/web-core 0.13.0 → 0.15.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 +8 -8
- package/lib/assets/css/_typography.pcss +148 -6
- package/lib/assets/css/base.pcss +6 -6
- package/lib/components/backup-item/VtsBackupItem.vue +1 -1
- package/lib/components/card/VtsCardRowKeyValue.vue +4 -2
- package/lib/components/cell-object/VtsCellObject.vue +2 -2
- package/lib/components/cell-text/VtsCellText.vue +2 -2
- package/lib/components/console/VtsActionsConsole.vue +3 -3
- package/lib/components/console/VtsClipboardConsole.vue +2 -2
- package/lib/components/data-table/VtsDataTable.vue +11 -3
- package/lib/components/dropdown/DropdownItem.vue +1 -1
- package/lib/components/icon/VtsIcon.vue +2 -2
- package/lib/components/layout/VtsLayoutSidebar.vue +1 -1
- package/lib/components/menu/MenuTrigger.vue +2 -2
- package/lib/components/resources/VtsResource.vue +42 -0
- package/lib/components/resources/VtsResources.vue +13 -0
- package/lib/components/state-hero/VtsPageNotFoundHero.vue +1 -1
- package/lib/components/state-hero/VtsStateHero.vue +2 -2
- package/lib/components/tab/TabItem.vue +10 -10
- package/lib/components/table/ColumnTitle.vue +8 -8
- package/lib/components/table/VtsTable.vue +2 -2
- package/lib/components/task/VtsQuickTaskButton.vue +1 -1
- package/lib/components/task/VtsQuickTaskList.vue +1 -1
- package/lib/components/task/VtsQuickTaskTabBar.vue +7 -1
- package/lib/components/tree/VtsTreeItemError.vue +1 -1
- package/lib/components/tree/VtsTreeLine.vue +2 -2
- package/lib/components/tree/VtsTreeLoadingItem.vue +1 -1
- package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +4 -4
- package/lib/components/ui/actions-title/UiActionsTitle.vue +1 -1
- package/lib/components/ui/button/UiButton.vue +58 -167
- package/lib/components/ui/button-icon/UiButtonIcon.vue +56 -55
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +4 -6
- package/lib/components/ui/card-subtitle/UiCardSubtitle.vue +5 -5
- package/lib/components/ui/card-title/UiCardTitle.vue +4 -4
- package/lib/components/ui/checkbox/UiCheckbox.vue +39 -141
- package/lib/components/ui/checkbox-group/UiCheckboxGroup.vue +4 -4
- package/lib/components/ui/chip/ChipRemoveIcon.vue +7 -3
- package/lib/components/ui/chip/UiChip.vue +1 -1
- package/lib/components/ui/counter/UiCounter.vue +22 -12
- package/lib/components/ui/dropdown-button/UiDropdownButton.vue +14 -14
- package/lib/components/ui/head-bar/UiHeadBar.vue +2 -2
- package/lib/components/ui/info/UiInfo.vue +1 -1
- package/lib/components/ui/input/UiInput.vue +9 -2
- package/lib/components/ui/label/UiLabel.vue +1 -1
- package/lib/components/ui/legend/UiLegend.vue +3 -3
- package/lib/components/ui/legend-title/UiLegendTitle.vue +1 -1
- package/lib/components/ui/link/UiLink.vue +10 -15
- package/lib/components/ui/object-link/UiObjectLink.vue +10 -10
- package/lib/components/ui/panel/UiPanel.vue +4 -2
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +5 -5
- package/lib/components/ui/quick-task-item/UiQuickTaskItem.vue +4 -4
- package/lib/components/ui/radio-button/UiRadioButton.vue +32 -63
- package/lib/components/ui/radio-button-group/UiRadioButtonGroup.vue +4 -4
- package/lib/components/ui/stacked-bar/StackedBarSegment.vue +1 -1
- package/lib/components/ui/table-pagination/PaginationButton.vue +8 -5
- package/lib/components/ui/table-pagination/UiTablePagination.vue +20 -20
- package/lib/components/ui/tag/UiTag.vue +1 -1
- package/lib/components/ui/title/UiTitle.vue +3 -3
- package/lib/components/ui/toaster/UiToaster.vue +3 -3
- package/lib/components/ui/toggle/UiToggle.vue +3 -3
- package/lib/components/ui/tooltip/UiTooltip.vue +1 -1
- package/lib/components/ui/top-bottom-table/UiTopBottomTable.vue +3 -3
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +9 -9
- package/lib/components/ui/user-link/UiUserLink.vue +8 -8
- package/lib/components/ui/user-logo/UiUserLogo.vue +1 -1
- package/lib/i18n.ts +4 -0
- package/lib/layouts/CoreLayout.vue +1 -1
- package/lib/locales/cs.json +362 -16
- package/lib/locales/de.json +245 -41
- package/lib/locales/en.json +304 -14
- package/lib/locales/es.json +355 -29
- package/lib/locales/fa.json +206 -9
- package/lib/locales/fr.json +308 -18
- package/lib/locales/sv.json +421 -0
- package/lib/utils/to-variants.util.md +3 -3
- package/package.json +1 -1
- package/lib/assets/css/typography/_legacy.pcss +0 -123
- package/lib/assets/css/typography/_letter-spacing.pcss +0 -27
- package/lib/assets/css/typography/_line-height.pcss +0 -19
- package/lib/assets/css/typography/_size.pcss +0 -95
- package/lib/assets/css/typography/_style.pcss +0 -35
- package/lib/assets/css/typography/_weight.pcss +0 -57
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-card-title">
|
|
4
4
|
<div class="main-content">
|
|
5
|
-
<div class="title typo
|
|
5
|
+
<div class="title typo-body-bold">
|
|
6
6
|
<slot />
|
|
7
7
|
</div>
|
|
8
|
-
<div v-if="slots.info" class="info typo
|
|
8
|
+
<div v-if="slots.info" class="info typo-body-bold-small">
|
|
9
9
|
<slot name="info" />
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
|
-
<p v-if="slots.description" class="description typo
|
|
12
|
+
<p v-if="slots.description" class="description typo-body-regular-small">
|
|
13
13
|
<slot name="description" />
|
|
14
14
|
</p>
|
|
15
15
|
</div>
|
|
@@ -46,7 +46,7 @@ const slots = defineSlots<{
|
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
48
|
gap: 0.8rem;
|
|
49
|
-
color: var(--color-
|
|
49
|
+
color: var(--color-brand-txt-base);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.description {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v5 -->
|
|
2
2
|
<template>
|
|
3
3
|
<label :class="classNames" class="ui-checkbox" v-bind="wrapperAttrs">
|
|
4
4
|
<input
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
v-bind="attrs"
|
|
11
11
|
/>
|
|
12
12
|
<span class="fake-checkbox">
|
|
13
|
-
<VtsIcon :icon accent="
|
|
13
|
+
<VtsIcon :icon accent="current" class="icon" />
|
|
14
14
|
</span>
|
|
15
|
-
<span v-if="slots.default" class="typo
|
|
15
|
+
<span v-if="slots.default" class="typo-body-regular">
|
|
16
16
|
<slot />
|
|
17
17
|
</span>
|
|
18
18
|
</label>
|
|
19
|
-
<UiInfo v-if="slots.info" :accent>
|
|
19
|
+
<UiInfo v-if="slots.info" :accent="accent === 'brand' ? 'info' : accent">
|
|
20
20
|
<slot name="info" />
|
|
21
21
|
</UiInfo>
|
|
22
22
|
</template>
|
|
@@ -29,11 +29,11 @@ import { toVariants } from '@core/utils/to-variants.util'
|
|
|
29
29
|
import { faCheck, faMinus } from '@fortawesome/free-solid-svg-icons'
|
|
30
30
|
import { computed, type LabelHTMLAttributes, useAttrs } from 'vue'
|
|
31
31
|
|
|
32
|
-
type CheckboxAccent = '
|
|
32
|
+
type CheckboxAccent = 'brand' | 'warning' | 'danger'
|
|
33
33
|
|
|
34
34
|
defineOptions({ inheritAttrs: false })
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const { accent, disabled } = defineProps<{
|
|
37
37
|
accent: CheckboxAccent
|
|
38
38
|
disabled?: boolean
|
|
39
39
|
wrapperAttrs?: LabelHTMLAttributes
|
|
@@ -46,11 +46,11 @@ const slots = defineSlots<{
|
|
|
46
46
|
info?(): any
|
|
47
47
|
}>()
|
|
48
48
|
|
|
49
|
-
const isDisabled = useDisabled(() =>
|
|
49
|
+
const isDisabled = useDisabled(() => disabled)
|
|
50
50
|
|
|
51
51
|
const classNames = computed(() => [
|
|
52
52
|
toVariants({
|
|
53
|
-
accent
|
|
53
|
+
accent,
|
|
54
54
|
disabled: isDisabled.value,
|
|
55
55
|
}),
|
|
56
56
|
])
|
|
@@ -127,144 +127,59 @@ const attrs = useAttrs()
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
&.accent--
|
|
131
|
-
.input {
|
|
130
|
+
&.accent--brand {
|
|
131
|
+
.input:not(:disabled) {
|
|
132
132
|
& + .fake-checkbox {
|
|
133
|
-
border-color: var(--color-
|
|
133
|
+
border-color: var(--color-brand-item-base);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
&.indeterminate + .fake-checkbox {
|
|
137
|
-
background-color: var(--color-
|
|
137
|
+
background-color: var(--color-brand-item-base);
|
|
138
138
|
|
|
139
139
|
&:hover {
|
|
140
140
|
border-color: transparent;
|
|
141
|
-
background-color: var(--color-
|
|
141
|
+
background-color: var(--color-brand-item-hover);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
&:active {
|
|
145
|
-
background-color: var(--color-
|
|
145
|
+
background-color: var(--color-brand-item-active);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
&.indeterminate:hover + .fake-checkbox {
|
|
150
150
|
border-color: transparent;
|
|
151
|
-
background-color: var(--color-
|
|
151
|
+
background-color: var(--color-brand-item-hover);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
&:hover + .fake-checkbox {
|
|
155
|
-
border-color: var(--color-
|
|
155
|
+
border-color: var(--color-brand-item-hover);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
&:focus-visible + .fake-checkbox::before {
|
|
159
|
-
border: 0.2rem solid var(--color-
|
|
159
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
&:active + .fake-checkbox {
|
|
163
|
-
border-color: var(--color-
|
|
163
|
+
border-color: var(--color-brand-item-active);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
&:checked + .fake-checkbox {
|
|
167
167
|
border-color: transparent;
|
|
168
|
-
background-color: var(--color-
|
|
168
|
+
background-color: var(--color-brand-item-base);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
&:checked:hover + .fake-checkbox {
|
|
172
|
-
background-color: var(--color-
|
|
172
|
+
background-color: var(--color-brand-item-hover);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
&:checked:active + .fake-checkbox {
|
|
176
|
-
background-color: var(--color-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&:disabled {
|
|
180
|
-
& + .fake-checkbox {
|
|
181
|
-
cursor: not-allowed;
|
|
182
|
-
border-color: var(--color-neutral-txt-secondary);
|
|
183
|
-
|
|
184
|
-
> .icon {
|
|
185
|
-
color: var(--color-neutral-txt-secondary);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&:checked + .fake-checkbox,
|
|
190
|
-
&.indeterminate + .fake-checkbox {
|
|
191
|
-
border-color: transparent;
|
|
192
|
-
background-color: var(--color-info-item-disabled);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&.accent--success {
|
|
199
|
-
.input {
|
|
200
|
-
& + .fake-checkbox {
|
|
201
|
-
border-color: var(--color-success-item-base);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
&.indeterminate + .fake-checkbox {
|
|
205
|
-
background-color: var(--color-success-item-base);
|
|
206
|
-
|
|
207
|
-
&:hover {
|
|
208
|
-
border-color: transparent;
|
|
209
|
-
background-color: var(--color-success-item-hover);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
&:active {
|
|
213
|
-
background-color: var(--color-success-item-active);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
&.indeterminate:hover + .fake-checkbox {
|
|
218
|
-
border-color: transparent;
|
|
219
|
-
background-color: var(--color-success-item-hover);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
&:hover + .fake-checkbox {
|
|
223
|
-
border-color: var(--color-success-item-hover);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
&:focus-visible + .fake-checkbox::before {
|
|
227
|
-
border: 0.2rem solid var(--color-success-txt-base);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
&:active + .fake-checkbox {
|
|
231
|
-
border-color: var(--color-success-item-active);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
&:checked + .fake-checkbox {
|
|
235
|
-
border-color: transparent;
|
|
236
|
-
background-color: var(--color-success-item-base);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
&:checked:hover + .fake-checkbox {
|
|
240
|
-
background-color: var(--color-success-item-hover);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&:checked:active + .fake-checkbox {
|
|
244
|
-
background-color: var(--color-success-item-active);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
&:disabled {
|
|
248
|
-
& + .fake-checkbox {
|
|
249
|
-
cursor: not-allowed;
|
|
250
|
-
border-color: var(--color-neutral-txt-secondary);
|
|
251
|
-
|
|
252
|
-
> .icon {
|
|
253
|
-
color: var(--color-neutral-txt-secondary);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
&:checked + .fake-checkbox,
|
|
258
|
-
&.indeterminate + .fake-checkbox {
|
|
259
|
-
border-color: transparent;
|
|
260
|
-
background-color: var(--color-success-item-disabled);
|
|
261
|
-
}
|
|
176
|
+
background-color: var(--color-brand-item-active);
|
|
262
177
|
}
|
|
263
178
|
}
|
|
264
179
|
}
|
|
265
180
|
|
|
266
181
|
&.accent--warning {
|
|
267
|
-
.input {
|
|
182
|
+
.input:not(:disabled) {
|
|
268
183
|
& + .fake-checkbox {
|
|
269
184
|
border-color: var(--color-warning-item-base);
|
|
270
185
|
}
|
|
@@ -292,7 +207,7 @@ const attrs = useAttrs()
|
|
|
292
207
|
}
|
|
293
208
|
|
|
294
209
|
&:focus-visible + .fake-checkbox::before {
|
|
295
|
-
border: 0.2rem solid var(--color-
|
|
210
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
296
211
|
}
|
|
297
212
|
|
|
298
213
|
&:active + .fake-checkbox {
|
|
@@ -311,28 +226,11 @@ const attrs = useAttrs()
|
|
|
311
226
|
&:checked:active + .fake-checkbox {
|
|
312
227
|
background-color: var(--color-warning-item-active);
|
|
313
228
|
}
|
|
314
|
-
|
|
315
|
-
&:disabled {
|
|
316
|
-
& + .fake-checkbox {
|
|
317
|
-
cursor: not-allowed;
|
|
318
|
-
border-color: var(--color-neutral-txt-secondary);
|
|
319
|
-
|
|
320
|
-
> .icon {
|
|
321
|
-
color: var(--color-neutral-txt-secondary);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
&:checked + .fake-checkbox,
|
|
326
|
-
&.indeterminate + .fake-checkbox {
|
|
327
|
-
border-color: transparent;
|
|
328
|
-
background-color: var(--color-warning-item-disabled);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
229
|
}
|
|
332
230
|
}
|
|
333
231
|
|
|
334
232
|
&.accent--danger {
|
|
335
|
-
.input {
|
|
233
|
+
.input:not(:disabled) {
|
|
336
234
|
& + .fake-checkbox {
|
|
337
235
|
border-color: var(--color-danger-item-base);
|
|
338
236
|
|
|
@@ -364,7 +262,7 @@ const attrs = useAttrs()
|
|
|
364
262
|
}
|
|
365
263
|
|
|
366
264
|
&:focus-visible + .fake-checkbox::before {
|
|
367
|
-
border: 0.2rem solid var(--color-
|
|
265
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
368
266
|
}
|
|
369
267
|
|
|
370
268
|
&:active + .fake-checkbox {
|
|
@@ -383,24 +281,24 @@ const attrs = useAttrs()
|
|
|
383
281
|
&:checked:active + .fake-checkbox {
|
|
384
282
|
background-color: var(--color-danger-item-active);
|
|
385
283
|
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
386
286
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
> .icon {
|
|
393
|
-
color: var(--color-neutral-txt-secondary);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
287
|
+
.input:disabled {
|
|
288
|
+
& + .fake-checkbox {
|
|
289
|
+
cursor: not-allowed;
|
|
290
|
+
border-color: var(--color-neutral-txt-secondary);
|
|
396
291
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
border-color: transparent;
|
|
400
|
-
background-color: var(--color-danger-item-disabled);
|
|
401
|
-
}
|
|
292
|
+
> .icon {
|
|
293
|
+
color: var(--color-neutral-background-disabled);
|
|
402
294
|
}
|
|
403
295
|
}
|
|
296
|
+
|
|
297
|
+
&:checked + .fake-checkbox,
|
|
298
|
+
&.indeterminate + .fake-checkbox {
|
|
299
|
+
border-color: transparent;
|
|
300
|
+
background-color: var(--color-neutral-txt-secondary);
|
|
301
|
+
}
|
|
404
302
|
}
|
|
405
303
|
}
|
|
406
304
|
</style>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<slot />
|
|
11
11
|
</div>
|
|
12
12
|
<slot v-if="slots.info || info !== undefined" name="info">
|
|
13
|
-
<UiInfo :accent>
|
|
13
|
+
<UiInfo :accent="accent === 'brand' ? 'info' : accent">
|
|
14
14
|
{{ info }}
|
|
15
15
|
</UiInfo>
|
|
16
16
|
</slot>
|
|
@@ -22,8 +22,8 @@ import UiInfo from '@core/components/ui/info/UiInfo.vue'
|
|
|
22
22
|
import UiLabel from '@core/components/ui/label/UiLabel.vue'
|
|
23
23
|
import { computed } from 'vue'
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
accent: '
|
|
25
|
+
const { accent } = defineProps<{
|
|
26
|
+
accent: 'brand' | 'warning' | 'danger'
|
|
27
27
|
label?: string
|
|
28
28
|
info?: string
|
|
29
29
|
vertical?: boolean
|
|
@@ -35,7 +35,7 @@ const slots = defineSlots<{
|
|
|
35
35
|
info?(): any
|
|
36
36
|
}>()
|
|
37
37
|
|
|
38
|
-
const labelAccent = computed(() => (
|
|
38
|
+
const labelAccent = computed(() => (accent === 'brand' ? 'neutral' : accent))
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<style scoped lang="postcss">
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<UiButtonIcon :accent="buttonAccent" :icon="faXmark" size="small" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
|
-
import
|
|
6
|
+
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
7
7
|
import type { ChipAccent } from '@core/components/ui/chip/UiChip.vue'
|
|
8
8
|
import { faXmark } from '@fortawesome/free-solid-svg-icons'
|
|
9
|
+
import { computed } from 'vue'
|
|
9
10
|
|
|
10
|
-
defineProps<{
|
|
11
|
+
const { accent } = defineProps<{
|
|
11
12
|
accent: ChipAccent
|
|
12
13
|
}>()
|
|
14
|
+
|
|
15
|
+
// FIXME: temporary fix for the 'success' accent, since it doesn't exist in the UiButtonIcon component
|
|
16
|
+
const buttonAccent = computed(() => (accent === 'info' || accent === 'success' ? 'brand' : accent))
|
|
13
17
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- v4 -->
|
|
2
2
|
<template>
|
|
3
|
-
<span :class="classNames" class="ui-chip typo
|
|
3
|
+
<span :class="classNames" class="ui-chip typo-body-regular-small" @click="emit('edit')">
|
|
4
4
|
<ChipIcon :disabled :icon />
|
|
5
5
|
<span class="content text-ellipsis">
|
|
6
6
|
<slot />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
3
|
<span :class="classNames" class="ui-counter">
|
|
4
4
|
<span class="inner">{{ value }}</span>
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
import { toVariants } from '@core/utils/to-variants.util'
|
|
10
10
|
import { computed } from 'vue'
|
|
11
11
|
|
|
12
|
-
type CounterAccent = '
|
|
12
|
+
type CounterAccent = 'brand' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'muted'
|
|
13
13
|
type CounterVariant = 'primary' | 'secondary'
|
|
14
14
|
type CounterSize = 'small' | 'medium'
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const { size, accent, variant } = defineProps<{
|
|
17
17
|
value: number | string
|
|
18
18
|
accent: CounterAccent
|
|
19
19
|
variant: CounterVariant
|
|
@@ -21,17 +21,17 @@ const props = defineProps<{
|
|
|
21
21
|
}>()
|
|
22
22
|
|
|
23
23
|
const typoClasses = {
|
|
24
|
-
small: 'typo
|
|
25
|
-
medium: 'typo
|
|
24
|
+
small: 'typo-body-bold-small',
|
|
25
|
+
medium: 'typo-body-bold',
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const classNames = computed(() => {
|
|
29
29
|
return [
|
|
30
|
-
typoClasses[
|
|
30
|
+
typoClasses[size],
|
|
31
31
|
toVariants({
|
|
32
|
-
accent
|
|
33
|
-
variant
|
|
34
|
-
size
|
|
32
|
+
accent,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
35
|
}),
|
|
36
36
|
]
|
|
37
37
|
})
|
|
@@ -52,9 +52,9 @@ const classNames = computed(() => {
|
|
|
52
52
|
/* VARIANT + ACCENT VARIANTS */
|
|
53
53
|
|
|
54
54
|
&.variant--primary {
|
|
55
|
-
&.accent--
|
|
56
|
-
background-color: var(--color-
|
|
57
|
-
color: var(--color-
|
|
55
|
+
&.accent--brand {
|
|
56
|
+
background-color: var(--color-brand-item-base);
|
|
57
|
+
color: var(--color-brand-txt-item);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&.accent--neutral {
|
|
@@ -62,6 +62,11 @@ const classNames = computed(() => {
|
|
|
62
62
|
color: var(--color-neutral-background-primary);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
&.accent--info {
|
|
66
|
+
background-color: var(--color-info-item-base);
|
|
67
|
+
color: var(--color-info-txt-item);
|
|
68
|
+
}
|
|
69
|
+
|
|
65
70
|
&.accent--success {
|
|
66
71
|
background-color: var(--color-success-item-base);
|
|
67
72
|
color: var(--color-success-txt-item);
|
|
@@ -84,6 +89,11 @@ const classNames = computed(() => {
|
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
&.variant--secondary {
|
|
92
|
+
&.accent--brand {
|
|
93
|
+
background-color: var(--color-brand-background-selected);
|
|
94
|
+
color: var(--color-brand-txt-base);
|
|
95
|
+
}
|
|
96
|
+
|
|
87
97
|
&.accent--info {
|
|
88
98
|
background-color: var(--color-info-background-selected);
|
|
89
99
|
color: var(--color-info-txt-base);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v5 -->
|
|
2
2
|
<template>
|
|
3
3
|
<button :class="{ selected }" :disabled="isDisabled" class="ui-dropdown-item" type="button">
|
|
4
4
|
<VtsIcon :icon accent="current" class="left-icon" fixed-width />
|
|
5
|
-
<span class="typo
|
|
5
|
+
<span class="typo-action-button label">
|
|
6
6
|
<slot />
|
|
7
7
|
</span>
|
|
8
8
|
<VtsIcon :icon="faAngleDown" accent="current" class="right-icon" fixed-width />
|
|
@@ -28,31 +28,31 @@ const isDisabled = useDisabled(() => disabled)
|
|
|
28
28
|
.ui-dropdown-item {
|
|
29
29
|
display: inline-flex;
|
|
30
30
|
align-items: center;
|
|
31
|
-
padding-block:
|
|
31
|
+
padding-block: 1.2rem;
|
|
32
32
|
padding-inline: 1.6rem;
|
|
33
33
|
gap: 0.8rem;
|
|
34
34
|
background: var(--color-neutral-background-primary);
|
|
35
|
-
border: 0.1rem solid var(--color-
|
|
35
|
+
border: 0.1rem solid var(--color-brand-txt-base);
|
|
36
36
|
border-radius: 9rem;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
position: relative;
|
|
39
|
-
color: var(--color-
|
|
39
|
+
color: var(--color-brand-txt-base);
|
|
40
40
|
|
|
41
41
|
&:hover {
|
|
42
|
-
border-color: var(--color-
|
|
43
|
-
background-color: var(--color-
|
|
44
|
-
color: var(--color-
|
|
42
|
+
border-color: var(--color-brand-txt-hover);
|
|
43
|
+
background-color: var(--color-brand-background-hover);
|
|
44
|
+
color: var(--color-brand-txt-hover);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&:active {
|
|
48
|
-
border-color: var(--color-
|
|
49
|
-
background-color: var(--color-
|
|
50
|
-
color: var(--color-
|
|
48
|
+
border-color: var(--color-brand-txt-active);
|
|
49
|
+
background-color: var(--color-brand-background-active);
|
|
50
|
+
color: var(--color-brand-txt-active);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&.selected:not(:disabled) {
|
|
54
|
-
background-color: var(--color-
|
|
55
|
-
outline: 0.1rem solid var(--color-
|
|
54
|
+
background-color: var(--color-brand-background-selected);
|
|
55
|
+
outline: 0.1rem solid var(--color-brand-txt-base);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&:focus-visible {
|
|
@@ -62,7 +62,7 @@ const isDisabled = useDisabled(() => disabled)
|
|
|
62
62
|
content: '';
|
|
63
63
|
position: absolute;
|
|
64
64
|
inset: -0.5rem;
|
|
65
|
-
border: 0.2rem solid var(--color-
|
|
65
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
66
66
|
border-radius: 0.4rem;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
<VtsIcon :icon accent="current" />
|
|
8
8
|
</slot>
|
|
9
9
|
</span>
|
|
10
|
-
<h4 v-tooltip class="typo
|
|
10
|
+
<h4 v-tooltip class="typo-h4 label text-ellipsis">
|
|
11
11
|
<slot />
|
|
12
12
|
</h4>
|
|
13
13
|
</div>
|
|
14
|
-
<div v-if="slots.status" class="status typo
|
|
14
|
+
<div v-if="slots.status" class="status typo-caption-small">
|
|
15
15
|
<slot name="status" />
|
|
16
16
|
</div>
|
|
17
17
|
<div v-if="slots.actions" class="actions">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-info">
|
|
4
4
|
<VtsIcon :accent class="icon" :icon="faCircle" :overlay-icon="icon" />
|
|
5
|
-
<p v-tooltip="!wrap" class="typo
|
|
5
|
+
<p v-tooltip="!wrap" class="typo-form-info" :class="{ 'text-ellipsis': !wrap }">
|
|
6
6
|
<slot />
|
|
7
7
|
</p>
|
|
8
8
|
</div>
|
|
@@ -6,12 +6,19 @@
|
|
|
6
6
|
</UiLabel>
|
|
7
7
|
<div>
|
|
8
8
|
<VtsIcon :icon accent="current" class="before" />
|
|
9
|
-
<input
|
|
9
|
+
<input
|
|
10
|
+
:id
|
|
11
|
+
v-model.trim="modelValue"
|
|
12
|
+
class="typo-body-regular input text-ellipsis"
|
|
13
|
+
:type
|
|
14
|
+
:disabled
|
|
15
|
+
v-bind="attrs"
|
|
16
|
+
/>
|
|
10
17
|
<VtsIcon
|
|
11
18
|
v-if="!attrs.disabled && modelValue && clearable"
|
|
12
19
|
:icon="faXmark"
|
|
13
20
|
class="after"
|
|
14
|
-
accent="
|
|
21
|
+
accent="brand"
|
|
15
22
|
@click="modelValue = ''"
|
|
16
23
|
/>
|
|
17
24
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div :class="toVariants({ accent })" class="ui-label">
|
|
4
4
|
<VtsIcon accent="current" :icon class="icon" />
|
|
5
|
-
<label :for="htmlFor" :class="{ required }" class="typo
|
|
5
|
+
<label :for="htmlFor" :class="{ required }" class="typo-caption label">
|
|
6
6
|
<slot />
|
|
7
7
|
</label>
|
|
8
8
|
<UiLink v-if="href" class="learn-more-link" size="small" :href>{{ $t('learn-more') }}</UiLink>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
3
|
<li :class="classNames" class="ui-legend">
|
|
4
|
-
<VtsIcon :icon="faCircle" accent="
|
|
5
|
-
<span class="label typo
|
|
4
|
+
<VtsIcon :icon="faCircle" accent="current" class="circle-icon" />
|
|
5
|
+
<span class="label typo-body-regular-small"><slot /></span>
|
|
6
6
|
<VtsIcon v-if="tooltip" v-tooltip="tooltip" :icon="faCircleInfo" class="tooltip-icon" accent="info" />
|
|
7
|
-
<span v-if="valueLabel" class="value-and-unit typo
|
|
7
|
+
<span v-if="valueLabel" class="value-and-unit typo-caption-small">{{ valueLabel }}</span>
|
|
8
8
|
</li>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
3
|
<component :is="component" :class="classes" class="ui-link" v-bind="attributes">
|
|
4
4
|
<VtsIcon :icon accent="current" />
|
|
5
5
|
<slot />
|
|
6
|
-
<VtsIcon
|
|
7
|
-
v-if="attributes.target === '_blank'"
|
|
8
|
-
:icon="faArrowUpRightFromSquare"
|
|
9
|
-
accent="current"
|
|
10
|
-
class="external-icon"
|
|
11
|
-
/>
|
|
6
|
+
<VtsIcon v-if="attributes.target === '_blank'" :icon="faUpRightFromSquare" accent="current" class="external-icon" />
|
|
12
7
|
</component>
|
|
13
8
|
</template>
|
|
14
9
|
|
|
@@ -16,7 +11,7 @@
|
|
|
16
11
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
17
12
|
import { type LinkOptions, useLinkComponent } from '@core/composables/link-component.composable'
|
|
18
13
|
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
19
|
-
import {
|
|
14
|
+
import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'
|
|
20
15
|
import { computed } from 'vue'
|
|
21
16
|
|
|
22
17
|
const props = defineProps<
|
|
@@ -27,8 +22,8 @@ const props = defineProps<
|
|
|
27
22
|
>()
|
|
28
23
|
|
|
29
24
|
const typoClasses = {
|
|
30
|
-
small: 'typo
|
|
31
|
-
medium: 'typo
|
|
25
|
+
small: 'typo-action-link-small',
|
|
26
|
+
medium: 'typo-action-link',
|
|
32
27
|
}
|
|
33
28
|
|
|
34
29
|
const { component, attributes, isDisabled } = useLinkComponent('span', () => props)
|
|
@@ -41,14 +36,14 @@ const classes = computed(() => [typoClasses[props.size], { disabled: isDisabled.
|
|
|
41
36
|
display: inline-flex;
|
|
42
37
|
align-items: center;
|
|
43
38
|
gap: 0.8rem;
|
|
44
|
-
color: var(--color-
|
|
39
|
+
color: var(--color-brand-txt-base);
|
|
45
40
|
|
|
46
41
|
&:hover {
|
|
47
|
-
color: var(--color-
|
|
42
|
+
color: var(--color-brand-txt-hover);
|
|
48
43
|
}
|
|
49
44
|
|
|
50
45
|
&:active {
|
|
51
|
-
color: var(--color-
|
|
46
|
+
color: var(--color-brand-txt-active);
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
&:focus-visible {
|
|
@@ -57,8 +52,8 @@ const classes = computed(() => [typoClasses[props.size], { disabled: isDisabled.
|
|
|
57
52
|
&::before {
|
|
58
53
|
content: '';
|
|
59
54
|
position: absolute;
|
|
60
|
-
inset: -0.
|
|
61
|
-
border: 0.2rem solid var(--color-
|
|
55
|
+
inset: -0.4rem;
|
|
56
|
+
border: 0.2rem solid var(--color-brand-txt-base);
|
|
62
57
|
border-radius: 0.4rem;
|
|
63
58
|
}
|
|
64
59
|
}
|