@vmz/ui 0.2.3 → 0.2.5
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/package.json +1 -1
- package/src/components/Accordion.vmz +46 -63
- package/src/components/Alert.vmz +35 -38
- package/src/components/AppShell.vmz +92 -75
- package/src/components/Autocomplete.vmz +91 -119
- package/src/components/Avatar.vmz +37 -8
- package/src/components/Badge.vmz +29 -23
- package/src/components/Breadcrumb.vmz +36 -34
- package/src/components/BulkActions.vmz +22 -28
- package/src/components/Button.vmz +139 -121
- package/src/components/Callout.vmz +33 -36
- package/src/components/Card.vmz +68 -51
- package/src/components/Checkbox.vmz +28 -47
- package/src/components/CodeBlock.vmz +31 -25
- package/src/components/Collapse.vmz +34 -16
- package/src/components/ConsoleShell.vmz +107 -110
- package/src/components/Content.vmz +8 -4
- package/src/components/DataTable.vmz +124 -150
- package/src/components/DatePicker.vmz +526 -521
- package/src/components/Dialog.vmz +408 -327
- package/src/components/Divider.vmz +38 -11
- package/src/components/Drawer.vmz +325 -318
- package/src/components/Dropdown.vmz +53 -19
- package/src/components/Empty.vmz +23 -21
- package/src/components/Field.vmz +77 -83
- package/src/components/FilterBar.vmz +8 -10
- package/src/components/Flex.vmz +21 -6
- package/src/components/Footer.vmz +9 -4
- package/src/components/Form.vmz +35 -46
- package/src/components/FormItem.vmz +44 -43
- package/src/components/Grid.vmz +22 -6
- package/src/components/Header.vmz +11 -4
- package/src/components/Icon.vmz +43 -44
- package/src/components/Layout.vmz +9 -4
- package/src/components/Link.vmz +17 -25
- package/src/components/List.vmz +62 -75
- package/src/components/Menu.vmz +182 -197
- package/src/components/Notification.vmz +35 -38
- package/src/components/Pagination.vmz +37 -47
- package/src/components/Popover.vmz +157 -171
- package/src/components/Progress.vmz +36 -10
- package/src/components/Prose.vmz +29 -31
- package/src/components/QueryForm.vmz +14 -22
- package/src/components/RadioGroup.vmz +70 -84
- package/src/components/Result.vmz +36 -38
- package/src/components/Segmented.vmz +43 -22
- package/src/components/Select.vmz +404 -411
- package/src/components/Sider.vmz +21 -4
- package/src/components/Skeleton.vmz +34 -42
- package/src/components/Space.vmz +24 -9
- package/src/components/Spinner.vmz +17 -23
- package/src/components/Steps.vmz +48 -51
- package/src/components/Switch.vmz +50 -60
- package/src/components/Table.vmz +81 -84
- package/src/components/Tabs.vmz +66 -88
- package/src/components/Tag.vmz +36 -11
- package/src/components/TextArea.vmz +73 -77
- package/src/components/Timeline.vmz +36 -32
- package/src/components/Toc.vmz +31 -37
- package/src/components/Tooltip.vmz +25 -35
- package/src/components/Tree.vmz +127 -144
- package/src/components/Typography.vmz +33 -7
- package/src/components/Upload.vmz +1135 -1057
|
@@ -1,67 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:disabled="disabled"
|
|
22
|
-
@input="onDomInput"
|
|
23
|
-
:onKeyDown="onKeyDown"
|
|
24
|
-
/>
|
|
25
|
-
<ul
|
|
26
|
-
v-if="listOpen"
|
|
27
|
-
:id="listId"
|
|
28
|
-
class="vmz-ui-autocomplete__list"
|
|
29
|
-
role="listbox"
|
|
30
|
-
data-vmz-autocomplete="list"
|
|
31
|
-
@click="onListClick"
|
|
32
|
-
>
|
|
33
|
-
<li
|
|
34
|
-
v-for="opt in options"
|
|
35
|
-
:key="opt.value"
|
|
36
|
-
class="vmz-ui-autocomplete__option"
|
|
37
|
-
role="option"
|
|
38
|
-
:data-vmz-option="opt.value"
|
|
39
|
-
tabindex="-1"
|
|
40
|
-
>
|
|
41
|
-
{{ opt.label }}
|
|
42
|
-
</li>
|
|
43
|
-
</ul>
|
|
44
|
-
<p v-if="showEmpty" class="vmz-ui-autocomplete__empty" data-vmz-autocomplete="empty">{{ emptyText }}</p>
|
|
45
|
-
<p v-if="description" :id="descriptionId" class="vmz-ui-autocomplete__description">{{ description }}</p>
|
|
46
|
-
<p v-if="error" :id="errorId" class="vmz-ui-autocomplete__error" role="alert">{{ error }}</p>
|
|
2
|
+
<div data-vmz-ui="autocomplete" :data-invalid="invalidAttr" :data-open="openAttr" class="vmz-ui-autocomplete">
|
|
3
|
+
<label v-if="label" :for="controlId" class="vmz-ui-autocomplete__label">
|
|
4
|
+
{{ label }}
|
|
5
|
+
</label>
|
|
6
|
+
<input :id="controlId" type="text" role="combobox" autocomplete="off" aria-autocomplete="list" :aria-expanded="openAttr" :aria-controls="listId" :aria-invalid='error ? "true" : "false"' :aria-describedby="describedBy" :value="value" :disabled="disabled" @input="onDomInput" :onKeyDown="onKeyDown" class="vmz-ui-autocomplete__control" />
|
|
7
|
+
<ul v-if="listOpen" :id="listId" role="listbox" data-vmz-autocomplete="list" @click="onListClick" class="vmz-ui-autocomplete__list">
|
|
8
|
+
<li v-for="opt in options" :key="opt.value" role="option" :data-vmz-option="opt.value" tabindex="-1" class="vmz-ui-autocomplete__option">
|
|
9
|
+
{{ opt.label }}
|
|
10
|
+
</li>
|
|
11
|
+
</ul>
|
|
12
|
+
<p v-if="showEmpty" data-vmz-autocomplete="empty" class="vmz-ui-autocomplete__empty">
|
|
13
|
+
{{ emptyText }}
|
|
14
|
+
</p>
|
|
15
|
+
<p v-if="description" :id="descriptionId" class="vmz-ui-autocomplete__description">
|
|
16
|
+
{{ description }}
|
|
17
|
+
</p>
|
|
18
|
+
<p v-if="error" :id="errorId" role="alert" class="vmz-ui-autocomplete__error">
|
|
19
|
+
{{ error }}
|
|
20
|
+
</p>
|
|
47
21
|
</div>
|
|
48
22
|
</template>
|
|
49
|
-
|
|
50
23
|
<style>
|
|
51
|
-
|
|
24
|
+
.vmz-ui-autocomplete {
|
|
52
25
|
position: relative;
|
|
53
26
|
display: flex;
|
|
54
27
|
flex-direction: column;
|
|
55
28
|
gap: 0.35rem;
|
|
56
29
|
max-width: 28rem;
|
|
57
|
-
|
|
30
|
+
}
|
|
58
31
|
|
|
59
|
-
|
|
32
|
+
.vmz-ui-autocomplete__label {
|
|
60
33
|
font: inherit;
|
|
61
34
|
font-weight: 600;
|
|
62
|
-
|
|
35
|
+
}
|
|
63
36
|
|
|
64
|
-
|
|
37
|
+
.vmz-ui-autocomplete__control {
|
|
65
38
|
font: inherit;
|
|
66
39
|
padding: var(--vmz-density-control-padding-y) var(--vmz-density-control-padding-x);
|
|
67
40
|
border: 1px solid var(--vmz-line-default);
|
|
@@ -69,22 +42,22 @@
|
|
|
69
42
|
background: transparent;
|
|
70
43
|
color: inherit;
|
|
71
44
|
outline: none;
|
|
72
|
-
|
|
45
|
+
}
|
|
73
46
|
|
|
74
|
-
|
|
47
|
+
.vmz-ui-autocomplete[data-invalid="true"] .vmz-ui-autocomplete__control {
|
|
75
48
|
border-color: var(--vmz-status-danger-accent);
|
|
76
|
-
|
|
49
|
+
}
|
|
77
50
|
|
|
78
|
-
|
|
51
|
+
.vmz-ui-autocomplete__control:focus-visible {
|
|
79
52
|
box-shadow: 0 0 0 2px var(--vmz-focus-ring);
|
|
80
|
-
|
|
53
|
+
}
|
|
81
54
|
|
|
82
|
-
|
|
55
|
+
.vmz-ui-autocomplete__control:disabled {
|
|
83
56
|
opacity: 0.55;
|
|
84
57
|
cursor: not-allowed;
|
|
85
|
-
|
|
58
|
+
}
|
|
86
59
|
|
|
87
|
-
|
|
60
|
+
.vmz-ui-autocomplete__list {
|
|
88
61
|
list-style: none;
|
|
89
62
|
margin: 0;
|
|
90
63
|
padding: 0.25rem 0;
|
|
@@ -93,90 +66,89 @@
|
|
|
93
66
|
background: var(--vmz-surface-paper);
|
|
94
67
|
max-height: 12rem;
|
|
95
68
|
overflow: auto;
|
|
96
|
-
|
|
69
|
+
}
|
|
97
70
|
|
|
98
|
-
|
|
71
|
+
.vmz-ui-autocomplete__option {
|
|
99
72
|
margin: 0;
|
|
100
73
|
padding: 0.45rem 0.75rem;
|
|
101
74
|
cursor: pointer;
|
|
102
75
|
font-weight: 600;
|
|
103
76
|
color: var(--vmz-text-ink);
|
|
104
|
-
|
|
77
|
+
}
|
|
105
78
|
|
|
106
|
-
|
|
107
|
-
|
|
79
|
+
.vmz-ui-autocomplete__option:hover,
|
|
80
|
+
.vmz-ui-autocomplete__option:focus {
|
|
108
81
|
background: var(--vmz-surface-mist);
|
|
109
82
|
outline: none;
|
|
110
|
-
|
|
83
|
+
}
|
|
111
84
|
|
|
112
|
-
|
|
85
|
+
.vmz-ui-autocomplete__empty {
|
|
113
86
|
margin: 0;
|
|
114
87
|
color: var(--vmz-text-steel);
|
|
115
88
|
font-size: 0.9em;
|
|
116
|
-
|
|
89
|
+
}
|
|
117
90
|
|
|
118
|
-
|
|
91
|
+
.vmz-ui-autocomplete__description {
|
|
119
92
|
margin: 0;
|
|
120
93
|
opacity: 0.75;
|
|
121
94
|
font-size: 0.9em;
|
|
122
|
-
|
|
95
|
+
}
|
|
123
96
|
|
|
124
|
-
|
|
97
|
+
.vmz-ui-autocomplete__error {
|
|
125
98
|
margin: 0;
|
|
126
99
|
color: var(--vmz-status-danger-foreground);
|
|
127
100
|
font-size: 0.9em;
|
|
128
|
-
|
|
101
|
+
}
|
|
129
102
|
</style>
|
|
130
|
-
|
|
131
103
|
<script client>
|
|
132
104
|
/**
|
|
133
|
-
* VMZ UI — Autocomplete.
|
|
134
|
-
* Parent owns value, listOpen, and filtered options — no parallel query/store.
|
|
135
|
-
* Selection notifies via onSelect(value); Escape closes via onClose.
|
|
136
|
-
*/
|
|
105
|
+
* VMZ UI — Autocomplete.
|
|
106
|
+
* Parent owns value, listOpen, and filtered options — no parallel query/store.
|
|
107
|
+
* Selection notifies via onSelect(value); Escape closes via onClose.
|
|
108
|
+
*/
|
|
137
109
|
export default class Autocomplete {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
110
|
+
public label: string = "";
|
|
111
|
+
public description: string = "";
|
|
112
|
+
public error: string = "";
|
|
113
|
+
public value: string = "";
|
|
114
|
+
public options: Array<{
|
|
115
|
+
value: string;
|
|
116
|
+
label: string;
|
|
117
|
+
}> = [];
|
|
118
|
+
public listOpen: boolean = false;
|
|
119
|
+
public openAttr: string = "false";
|
|
120
|
+
public showEmpty: boolean = false;
|
|
121
|
+
public emptyText: string = "No matches";
|
|
122
|
+
public disabled: boolean = false;
|
|
123
|
+
public invalidAttr: string = "false";
|
|
124
|
+
public controlId: string = "vmz-autocomplete";
|
|
125
|
+
public listId: string = "vmz-autocomplete-list";
|
|
126
|
+
public descriptionId: string = "vmz-autocomplete-desc";
|
|
127
|
+
public errorId: string = "vmz-autocomplete-err";
|
|
128
|
+
public describedBy: string = "";
|
|
129
|
+
public onInput: ((e: Event) => void) | null = null;
|
|
130
|
+
public onSelect: ((value: string) => void) | null = null;
|
|
131
|
+
public onClose: (() => void) | null = null;
|
|
132
|
+
onDomInput(e: Event) {
|
|
133
|
+
this.emit("input", e);
|
|
134
|
+
if (typeof this.onInput === "function") this.onInput(e);
|
|
135
|
+
}
|
|
136
|
+
onListClick(ev) {
|
|
137
|
+
if (this.disabled) return;
|
|
138
|
+
const t = ev && ev.target;
|
|
139
|
+
if (!t || typeof t.closest !== "function") return;
|
|
140
|
+
const opt = t.closest("[data-vmz-option]");
|
|
141
|
+
if (!opt) return;
|
|
142
|
+
const next = opt.getAttribute("data-vmz-option") || "";
|
|
143
|
+
if (!next) return;
|
|
144
|
+
this.emit("select", next);
|
|
145
|
+
if (typeof this.onSelect === "function") this.onSelect(next);
|
|
146
|
+
}
|
|
147
|
+
onKeyDown(ev) {
|
|
148
|
+
if (!ev || ev.key !== "Escape") return;
|
|
149
|
+
ev.preventDefault();
|
|
150
|
+
this.emit("close");
|
|
151
|
+
if (typeof this.onClose === "function") this.onClose();
|
|
152
|
+
}
|
|
181
153
|
}
|
|
182
154
|
</script>
|
|
@@ -1,16 +1,45 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<span data-vmz-ui="avatar" :data-size="size" :aria-label="label" class="vmz-ui-avatar">
|
|
3
|
+
<img v-if="src" :src="src" alt />
|
|
4
|
+
<span v-if="!src">
|
|
5
|
+
{{ text }}
|
|
6
|
+
</span>
|
|
7
|
+
</span>
|
|
3
8
|
</template>
|
|
4
|
-
|
|
5
9
|
<style>
|
|
6
|
-
|
|
10
|
+
.vmz-ui-avatar {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
width: 2rem;
|
|
15
|
+
height: 2rem;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
background: color-mix(in srgb, var(--vmz-action-primary-background, #1677ff) 14%, white);
|
|
19
|
+
color: var(--vmz-action-primary-active, #0958d9);
|
|
20
|
+
font-weight: 650;
|
|
21
|
+
}
|
|
22
|
+
.vmz-ui-avatar[data-size="small"] {
|
|
23
|
+
width: 1.5rem;
|
|
24
|
+
height: 1.5rem;
|
|
25
|
+
font-size: 0.75rem;
|
|
26
|
+
}
|
|
27
|
+
.vmz-ui-avatar[data-size="large"] {
|
|
28
|
+
width: 2.75rem;
|
|
29
|
+
height: 2.75rem;
|
|
30
|
+
font-size: 1.1rem;
|
|
31
|
+
}
|
|
32
|
+
.vmz-ui-avatar img {
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
object-fit: cover;
|
|
36
|
+
}
|
|
7
37
|
</style>
|
|
8
|
-
|
|
9
38
|
<script client>
|
|
10
39
|
export default class Avatar {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
40
|
+
public src: string = "";
|
|
41
|
+
public text: string = "";
|
|
42
|
+
public label: string = "";
|
|
43
|
+
public size: string = "middle";
|
|
15
44
|
}
|
|
16
45
|
</script>
|
package/src/components/Badge.vmz
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<span data-vmz-ui="badge" :data-tone="tone" class="vmz-ui-badge">
|
|
3
|
+
<slot />
|
|
4
4
|
</span>
|
|
5
5
|
</template>
|
|
6
|
-
|
|
7
6
|
<style>
|
|
8
|
-
|
|
7
|
+
.vmz-ui-badge {
|
|
9
8
|
display: inline-flex;
|
|
10
9
|
align-items: center;
|
|
11
10
|
gap: 0.25rem;
|
|
@@ -19,46 +18,53 @@
|
|
|
19
18
|
line-height: 1.2;
|
|
20
19
|
background: var(--vmz-surface-mist);
|
|
21
20
|
color: var(--vmz-text-ink);
|
|
22
|
-
|
|
21
|
+
}
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
border-color: color-mix(
|
|
26
|
-
|
|
23
|
+
.vmz-ui-badge[data-tone="brand"] {
|
|
24
|
+
border-color: color-mix(
|
|
25
|
+
in srgb,
|
|
26
|
+
var(--vmz-action-primary-background) 35%,
|
|
27
|
+
var(--vmz-line-default)
|
|
28
|
+
);
|
|
29
|
+
background: color-mix(
|
|
30
|
+
in srgb,
|
|
31
|
+
var(--vmz-action-primary-background) 12%,
|
|
32
|
+
var(--vmz-surface-paper)
|
|
33
|
+
);
|
|
27
34
|
color: var(--vmz-action-primary-active);
|
|
28
|
-
|
|
35
|
+
}
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
.vmz-ui-badge[data-tone="info"] {
|
|
31
38
|
border-color: var(--vmz-status-info-accent);
|
|
32
39
|
background: color-mix(in srgb, var(--vmz-status-info-accent) 12%, var(--vmz-surface-paper));
|
|
33
40
|
color: var(--vmz-status-info-foreground);
|
|
34
|
-
|
|
41
|
+
}
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
.vmz-ui-badge[data-tone="success"] {
|
|
37
44
|
border-color: var(--vmz-status-success-accent);
|
|
38
45
|
background: color-mix(in srgb, var(--vmz-status-success-accent) 12%, var(--vmz-surface-paper));
|
|
39
46
|
color: var(--vmz-status-success-foreground);
|
|
40
|
-
|
|
47
|
+
}
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
.vmz-ui-badge[data-tone="warning"] {
|
|
43
50
|
border-color: var(--vmz-status-warning-accent);
|
|
44
51
|
background: color-mix(in srgb, var(--vmz-status-warning-accent) 12%, var(--vmz-surface-paper));
|
|
45
52
|
color: var(--vmz-status-warning-foreground);
|
|
46
|
-
|
|
53
|
+
}
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
.vmz-ui-badge[data-tone="danger"] {
|
|
49
56
|
border-color: var(--vmz-status-danger-accent);
|
|
50
57
|
background: color-mix(in srgb, var(--vmz-status-danger-accent) 12%, var(--vmz-surface-paper));
|
|
51
58
|
color: var(--vmz-status-danger-foreground);
|
|
52
|
-
|
|
59
|
+
}
|
|
53
60
|
</style>
|
|
54
|
-
|
|
55
61
|
<script client>
|
|
56
62
|
/**
|
|
57
|
-
* VMZ UI — Badge (Foundation).
|
|
58
|
-
* Compact status / label chip; tones share status.* + action tokens.
|
|
59
|
-
*/
|
|
63
|
+
* VMZ UI — Badge (Foundation).
|
|
64
|
+
* Compact status / label chip; tones share status.* + action tokens.
|
|
65
|
+
*/
|
|
60
66
|
export default class Badge {
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
static __vmzHostBox = "contents";
|
|
68
|
+
public tone: string = "brand";
|
|
63
69
|
}
|
|
64
70
|
</script>
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<nav data-vmz-ui="breadcrumb" :aria-label="label" class="vmz-ui-breadcrumb">
|
|
3
|
+
<ol class="vmz-ui-breadcrumb__list">
|
|
4
|
+
<li v-for="item in items" :key="item.id" :data-vmz-crumb="item.id" class="vmz-ui-breadcrumb__item">
|
|
5
|
+
<a v-if="item.href" :href="item.href" class="vmz-ui-breadcrumb__link">
|
|
6
|
+
{{ item.title }}
|
|
7
|
+
</a>
|
|
8
|
+
<span v-if="!item.href" aria-current="page" class="vmz-ui-breadcrumb__current">
|
|
9
|
+
{{ item.title }}
|
|
10
|
+
</span>
|
|
11
|
+
</li>
|
|
12
|
+
</ol>
|
|
9
13
|
</nav>
|
|
10
14
|
</template>
|
|
11
|
-
|
|
12
15
|
<style>
|
|
13
|
-
|
|
16
|
+
.vmz-ui-breadcrumb {
|
|
14
17
|
font: inherit;
|
|
15
|
-
|
|
18
|
+
}
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
.vmz-ui-breadcrumb__list {
|
|
18
21
|
display: flex;
|
|
19
22
|
flex-wrap: wrap;
|
|
20
23
|
gap: 0.35rem 0.55rem;
|
|
@@ -22,49 +25,48 @@
|
|
|
22
25
|
padding: 0;
|
|
23
26
|
list-style: none;
|
|
24
27
|
align-items: center;
|
|
25
|
-
|
|
28
|
+
}
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
.vmz-ui-breadcrumb__item {
|
|
28
31
|
display: inline-flex;
|
|
29
32
|
align-items: center;
|
|
30
33
|
gap: 0.55rem;
|
|
31
34
|
font-weight: 600;
|
|
32
|
-
|
|
35
|
+
}
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
content:
|
|
37
|
+
.vmz-ui-breadcrumb__item:not(:last-child)::after {
|
|
38
|
+
content: "/";
|
|
36
39
|
color: var(--vmz-action-primary-active);
|
|
37
40
|
opacity: 0.55;
|
|
38
41
|
font-weight: 400;
|
|
39
|
-
|
|
42
|
+
}
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
.vmz-ui-breadcrumb__link {
|
|
42
45
|
color: var(--vmz-action-primary-background);
|
|
43
46
|
text-decoration: none;
|
|
44
|
-
|
|
47
|
+
}
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
.vmz-ui-breadcrumb__link:focus-visible {
|
|
47
50
|
outline: none;
|
|
48
51
|
box-shadow: 0 0 0 2px var(--vmz-focus-ring);
|
|
49
|
-
|
|
52
|
+
}
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
.vmz-ui-breadcrumb__current {
|
|
52
55
|
color: var(--vmz-action-primary-active);
|
|
53
|
-
|
|
56
|
+
}
|
|
54
57
|
</style>
|
|
55
|
-
|
|
56
58
|
<script client>
|
|
57
59
|
/**
|
|
58
|
-
* VMZ UI — Breadcrumb (UI5 Console Surface).
|
|
59
|
-
* Parent owns items; last crumb typically has no href (current page).
|
|
60
|
-
*/
|
|
60
|
+
* VMZ UI — Breadcrumb (UI5 Console Surface).
|
|
61
|
+
* Parent owns items; last crumb typically has no href (current page).
|
|
62
|
+
*/
|
|
61
63
|
export default class Breadcrumb {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
public label: string = "Breadcrumb";
|
|
65
|
+
/** @type {{ id: string, title: string, href?: string }[]} */
|
|
66
|
+
public items: {
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
href?: string;
|
|
70
|
+
}[] = [];
|
|
69
71
|
}
|
|
70
72
|
</script>
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<p class="vmz-ui-bulk-actions__count" data-vmz-fixture="bulk-count">{{ countLabel }}</p>
|
|
10
|
-
<div class="vmz-ui-bulk-actions__actions">
|
|
11
|
-
<slot />
|
|
12
|
-
</div>
|
|
2
|
+
<div data-vmz-ui="bulk-actions" role="region" :aria-label="label" :data-open='selectedCount ? "true" : "false"' class="vmz-ui-bulk-actions">
|
|
3
|
+
<p data-vmz-fixture="bulk-count" class="vmz-ui-bulk-actions__count">
|
|
4
|
+
{{ countLabel }}
|
|
5
|
+
</p>
|
|
6
|
+
<div class="vmz-ui-bulk-actions__actions">
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
13
9
|
</div>
|
|
14
10
|
</template>
|
|
15
|
-
|
|
16
11
|
<style>
|
|
17
|
-
|
|
12
|
+
.vmz-ui-bulk-actions {
|
|
18
13
|
display: flex;
|
|
19
14
|
flex-wrap: wrap;
|
|
20
15
|
align-items: center;
|
|
@@ -24,34 +19,33 @@
|
|
|
24
19
|
border: 1px solid var(--vmz-line-default);
|
|
25
20
|
border-radius: var(--vmz-radius-md, 6px);
|
|
26
21
|
background: transparent;
|
|
27
|
-
|
|
22
|
+
}
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
/* Keep host+slot mounted so default slot projects at create time (not inside v-if). */
|
|
25
|
+
.vmz-ui-bulk-actions[data-open="false"] {
|
|
31
26
|
display: none;
|
|
32
|
-
|
|
27
|
+
}
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
.vmz-ui-bulk-actions__count {
|
|
35
30
|
margin: 0;
|
|
36
31
|
font-weight: 700;
|
|
37
32
|
color: var(--vmz-action-primary-active);
|
|
38
|
-
|
|
33
|
+
}
|
|
39
34
|
|
|
40
|
-
|
|
35
|
+
.vmz-ui-bulk-actions__actions {
|
|
41
36
|
display: flex;
|
|
42
37
|
flex-wrap: wrap;
|
|
43
38
|
gap: 0.5rem;
|
|
44
|
-
|
|
39
|
+
}
|
|
45
40
|
</style>
|
|
46
|
-
|
|
47
41
|
<script client>
|
|
48
42
|
/**
|
|
49
|
-
* VMZ UI — BulkActions (Console composition).
|
|
50
|
-
* Hides when selectedCount is falsy but keeps the tree mounted so parent slot children project.
|
|
51
|
-
*/
|
|
43
|
+
* VMZ UI — BulkActions (Console composition).
|
|
44
|
+
* Hides when selectedCount is falsy but keeps the tree mounted so parent slot children project.
|
|
45
|
+
*/
|
|
52
46
|
export default class BulkActions {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
public label: string = "Bulk actions";
|
|
48
|
+
public selectedCount: number = 0;
|
|
49
|
+
public countLabel: string = "";
|
|
56
50
|
}
|
|
57
51
|
</script>
|