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