@vmz/ui 0.3.4 → 0.3.6
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 +51 -51
- package/package.json +2 -2
- package/presets/web-surface.v0.json +19 -7
- package/src/components/Accordion.vmz +94 -94
- package/src/components/AppShell.vmz +77 -33
- package/src/components/Autocomplete.vmz +154 -154
- package/src/components/Badge.vmz +70 -70
- package/src/components/Breadcrumb.vmz +72 -72
- package/src/components/BulkActions.vmz +51 -51
- package/src/components/Button.vmz +211 -192
- package/src/components/Callout.vmz +77 -77
- package/src/components/Card.vmz +120 -106
- package/src/components/Checkbox.vmz +55 -55
- package/src/components/CodeBlock.vmz +77 -18
- package/src/components/ConsoleShell.vmz +251 -251
- package/src/components/DataTable.vmz +194 -194
- package/src/components/DatePicker.vmz +674 -674
- package/src/components/Dialog.vmz +10 -7
- package/src/components/Drawer.vmz +427 -427
- package/src/components/Dropdown.vmz +135 -16
- package/src/components/Empty.vmz +54 -54
- package/src/components/Field.vmz +115 -115
- package/src/components/FormItem.vmz +79 -79
- package/src/components/Link.vmz +34 -4
- package/src/components/List.vmz +102 -102
- package/src/components/Menu.vmz +243 -243
- package/src/components/Pagination.vmz +69 -69
- package/src/components/Popover.vmz +223 -223
- package/src/components/Prose.vmz +81 -81
- package/src/components/RadioGroup.vmz +124 -124
- package/src/components/Segmented.vmz +51 -51
- package/src/components/Select.vmz +533 -533
- package/src/components/Steps.vmz +103 -103
- package/src/components/Switch.vmz +98 -98
- package/src/components/Table.vmz +165 -133
- package/src/components/Tabs.vmz +110 -110
- package/src/components/Tag.vmz +43 -40
- package/src/components/TextArea.vmz +118 -118
- package/src/components/Timeline.vmz +76 -76
- package/src/components/Toc.vmz +74 -74
- package/src/components/Tooltip.vmz +58 -58
- package/src/components/Tree.vmz +191 -191
- package/src/components/Upload.vmz +1289 -1289
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div data-vmz-ui="textarea" :data-invalid="invalidAttr" class="vmz-ui-textarea">
|
|
3
|
-
<label v-if="label" :for="controlId" class="vmz-ui-textarea__label">
|
|
4
|
-
{{ label }}
|
|
5
|
-
</label>
|
|
6
|
-
<textarea :id="controlId" :rows="rows" :value="value" :disabled="disabled" :readonly="readonly" :aria-invalid="error ? 'true' : 'false'" :aria-describedby="describedBy" @input="onDomInput" class="vmz-ui-textarea__control" />
|
|
7
|
-
<p v-if="description" :id="descriptionId" class="vmz-ui-textarea__description">
|
|
8
|
-
{{ description }}
|
|
9
|
-
</p>
|
|
10
|
-
<p v-if="error" :id="errorId" role="alert" class="vmz-ui-textarea__error">
|
|
11
|
-
{{ error }}
|
|
12
|
-
</p>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
<style>
|
|
16
|
-
.vmz-ui-textarea {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
gap: 0.
|
|
20
|
-
max-width: none;
|
|
21
|
-
width: 100%;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.vmz-ui-textarea__label {
|
|
25
|
-
font: inherit;
|
|
26
|
-
font-weight: 500;
|
|
27
|
-
font-size: 0.875rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.vmz-ui-textarea__control {
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
width: 100%;
|
|
33
|
-
font-family: var(--vmz-font-sans, inherit);
|
|
34
|
-
font-size: 0.875rem;
|
|
35
|
-
line-height: 1.5715;
|
|
36
|
-
min-height: 5.5rem;
|
|
37
|
-
padding: var(--vmz-density-control-padding-y, 0.25rem)
|
|
38
|
-
var(--vmz-density-control-padding-x, 0.75rem);
|
|
39
|
-
border: 1px solid var(--vmz-line-default, #d9d9d9);
|
|
40
|
-
border-radius: var(--vmz-radius-md, 6px);
|
|
41
|
-
background: var(--vmz-surface-paper, #fff);
|
|
42
|
-
color: var(--vmz-text-ink, inherit);
|
|
43
|
-
outline: none;
|
|
44
|
-
resize: vertical;
|
|
45
|
-
transition:
|
|
46
|
-
border-color var(--vmz-motion-control-duration, 120ms)
|
|
47
|
-
var(--vmz-motion-control-easing,
|
|
48
|
-
box-shadow var(--vmz-motion-control-duration, 120ms)
|
|
49
|
-
var(--vmz-motion-control-easing,
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.vmz-ui-textarea__control::placeholder {
|
|
53
|
-
color: var(--vmz-text-steel, #8c8c8c);
|
|
54
|
-
opacity: 1;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.vmz-ui-textarea[data-invalid="true"] .vmz-ui-textarea__control {
|
|
58
|
-
border-color: var(--vmz-status-danger-accent);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.vmz-ui-textarea__control:hover:not(:disabled):not(:focus-visible) {
|
|
62
|
-
border-color: var(--vmz-action-primary-background);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.vmz-ui-textarea__control:focus-visible {
|
|
66
|
-
border-color: var(--vmz-action-primary-background);
|
|
67
|
-
box-shadow: 0 0 0
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.vmz-ui-textarea__control:disabled,
|
|
71
|
-
.vmz-ui-textarea__control:read-only {
|
|
72
|
-
cursor: default;
|
|
73
|
-
background: var(--vmz-surface-mist, #fafafa);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.vmz-ui-textarea__control:disabled {
|
|
77
|
-
cursor: not-allowed;
|
|
78
|
-
opacity: 0.55;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.vmz-ui-textarea__description {
|
|
82
|
-
margin: 0;
|
|
83
|
-
color: var(--vmz-text-steel, #8c8c8c);
|
|
84
|
-
font-size: 0.875rem;
|
|
85
|
-
line-height: 1.4;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.vmz-ui-textarea__error {
|
|
89
|
-
margin: 0;
|
|
90
|
-
color: var(--vmz-status-danger-foreground);
|
|
91
|
-
font-size: 0.875rem;
|
|
92
|
-
}
|
|
93
|
-
</style>
|
|
94
|
-
<script client>
|
|
95
|
-
/**
|
|
96
|
-
* VMZ UI — TextArea.
|
|
97
|
-
* Same label/description/error ownership contract as Field; parent owns value.
|
|
98
|
-
*/
|
|
99
|
-
export default class TextArea {
|
|
100
|
-
public label: string = "";
|
|
101
|
-
public description: string = "";
|
|
102
|
-
public error: string = "";
|
|
103
|
-
public value: string = "";
|
|
104
|
-
public rows: number = 4;
|
|
105
|
-
public disabled: boolean = false;
|
|
106
|
-
public readonly: boolean = false;
|
|
107
|
-
public invalidAttr: string = "false";
|
|
108
|
-
public controlId: string = "vmz-textarea";
|
|
109
|
-
public descriptionId: string = "vmz-textarea-desc";
|
|
110
|
-
public errorId: string = "vmz-textarea-err";
|
|
111
|
-
public describedBy: string = "";
|
|
112
|
-
public onInput: ((e: Event) => void) | null = null;
|
|
113
|
-
onDomInput(e: Event) {
|
|
114
|
-
this.emit("input", e);
|
|
115
|
-
if (typeof this.onInput === "function") this.onInput(e);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div data-vmz-ui="textarea" :data-invalid="invalidAttr" class="vmz-ui-textarea">
|
|
3
|
+
<label v-if="label" :for="controlId" class="vmz-ui-textarea__label">
|
|
4
|
+
{{ label }}
|
|
5
|
+
</label>
|
|
6
|
+
<textarea :id="controlId" :rows="rows" :value="value" :disabled="disabled" :readonly="readonly" :aria-invalid="error ? 'true' : 'false'" :aria-describedby="describedBy" @input="onDomInput" class="vmz-ui-textarea__control" />
|
|
7
|
+
<p v-if="description" :id="descriptionId" class="vmz-ui-textarea__description">
|
|
8
|
+
{{ description }}
|
|
9
|
+
</p>
|
|
10
|
+
<p v-if="error" :id="errorId" role="alert" class="vmz-ui-textarea__error">
|
|
11
|
+
{{ error }}
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<style>
|
|
16
|
+
.vmz-ui-textarea {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 0.5rem;
|
|
20
|
+
max-width: none;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.vmz-ui-textarea__label {
|
|
25
|
+
font: inherit;
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
font-size: 0.875rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vmz-ui-textarea__control {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
width: 100%;
|
|
33
|
+
font-family: var(--vmz-font-sans, inherit);
|
|
34
|
+
font-size: 0.875rem;
|
|
35
|
+
line-height: 1.5715;
|
|
36
|
+
min-height: 5.5rem;
|
|
37
|
+
padding: var(--vmz-density-control-padding-y, 0.25rem)
|
|
38
|
+
var(--vmz-density-control-padding-x, 0.75rem);
|
|
39
|
+
border: 1px solid var(--vmz-line-default, #d9d9d9);
|
|
40
|
+
border-radius: var(--vmz-radius-md, 6px);
|
|
41
|
+
background: var(--vmz-surface-paper, #fff);
|
|
42
|
+
color: var(--vmz-text-ink, inherit);
|
|
43
|
+
outline: none;
|
|
44
|
+
resize: vertical;
|
|
45
|
+
transition:
|
|
46
|
+
border-color var(--vmz-motion-control-duration, 120ms)
|
|
47
|
+
var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
48
|
+
box-shadow var(--vmz-motion-control-duration, 120ms)
|
|
49
|
+
var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.vmz-ui-textarea__control::placeholder {
|
|
53
|
+
color: var(--vmz-text-steel, #8c8c8c);
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.vmz-ui-textarea[data-invalid="true"] .vmz-ui-textarea__control {
|
|
58
|
+
border-color: var(--vmz-status-danger-accent);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.vmz-ui-textarea__control:hover:not(:disabled):not(:focus-visible) {
|
|
62
|
+
border-color: var(--vmz-action-primary-background);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vmz-ui-textarea__control:focus-visible {
|
|
66
|
+
border-color: var(--vmz-action-primary-background);
|
|
67
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.vmz-ui-textarea__control:disabled,
|
|
71
|
+
.vmz-ui-textarea__control:read-only {
|
|
72
|
+
cursor: default;
|
|
73
|
+
background: var(--vmz-surface-mist, #fafafa);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.vmz-ui-textarea__control:disabled {
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
opacity: 0.55;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vmz-ui-textarea__description {
|
|
82
|
+
margin: 0;
|
|
83
|
+
color: var(--vmz-text-steel, #8c8c8c);
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
line-height: 1.4;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.vmz-ui-textarea__error {
|
|
89
|
+
margin: 0;
|
|
90
|
+
color: var(--vmz-status-danger-foreground);
|
|
91
|
+
font-size: 0.875rem;
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
94
|
+
<script client>
|
|
95
|
+
/**
|
|
96
|
+
* VMZ UI — TextArea.
|
|
97
|
+
* Same label/description/error ownership contract as Field; parent owns value.
|
|
98
|
+
*/
|
|
99
|
+
export default class TextArea {
|
|
100
|
+
public label: string = "";
|
|
101
|
+
public description: string = "";
|
|
102
|
+
public error: string = "";
|
|
103
|
+
public value: string = "";
|
|
104
|
+
public rows: number = 4;
|
|
105
|
+
public disabled: boolean = false;
|
|
106
|
+
public readonly: boolean = false;
|
|
107
|
+
public invalidAttr: string = "false";
|
|
108
|
+
public controlId: string = "vmz-textarea";
|
|
109
|
+
public descriptionId: string = "vmz-textarea-desc";
|
|
110
|
+
public errorId: string = "vmz-textarea-err";
|
|
111
|
+
public describedBy: string = "";
|
|
112
|
+
public onInput: ((e: Event) => void) | null = null;
|
|
113
|
+
onDomInput(e: Event) {
|
|
114
|
+
this.emit("input", e);
|
|
115
|
+
if (typeof this.onInput === "function") this.onInput(e);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
</script>
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ol data-vmz-ui="timeline" :aria-label="label" class="vmz-ui-timeline">
|
|
3
|
-
<li v-for="item in items" :key="item.id" :data-vmz-audit="item.id" class="vmz-ui-timeline__item">
|
|
4
|
-
<p class="vmz-ui-timeline__time">
|
|
5
|
-
{{ item.time }}
|
|
6
|
-
</p>
|
|
7
|
-
<p class="vmz-ui-timeline__title">
|
|
8
|
-
{{ item.title }}
|
|
9
|
-
</p>
|
|
10
|
-
<p v-if="item.detail" class="vmz-ui-timeline__detail">
|
|
11
|
-
{{ item.detail }}
|
|
12
|
-
</p>
|
|
13
|
-
</li>
|
|
14
|
-
</ol>
|
|
15
|
-
</template>
|
|
16
|
-
<style>
|
|
17
|
-
.vmz-ui-timeline {
|
|
18
|
-
margin: 0;
|
|
19
|
-
padding: 0;
|
|
20
|
-
list-style: none;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
gap: var(--vmz-density-compact-gap);
|
|
24
|
-
border-left: 2px solid var(--vmz-line-default);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.vmz-ui-timeline__item {
|
|
28
|
-
position: relative;
|
|
29
|
-
padding: 0.
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.vmz-ui-timeline__item::before {
|
|
33
|
-
content: "";
|
|
34
|
-
position: absolute;
|
|
35
|
-
left: -0.35rem;
|
|
36
|
-
top: 0.45rem;
|
|
37
|
-
width: 0.55rem;
|
|
38
|
-
height: 0.55rem;
|
|
39
|
-
border-radius: 999px;
|
|
40
|
-
background: var(--vmz-action-primary-background);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.vmz-ui-timeline__time {
|
|
44
|
-
margin: 0;
|
|
45
|
-
font-size: 0.85em;
|
|
46
|
-
opacity: 0.75;
|
|
47
|
-
color: var(--vmz-action-primary-active);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.vmz-ui-timeline__title {
|
|
51
|
-
margin: 0.
|
|
52
|
-
font-weight: 700;
|
|
53
|
-
color: var(--vmz-action-primary-active);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.vmz-ui-timeline__detail {
|
|
57
|
-
margin: 0.2rem 0 0;
|
|
58
|
-
opacity: 0.9;
|
|
59
|
-
}
|
|
60
|
-
</style>
|
|
61
|
-
<script client>
|
|
62
|
-
/**
|
|
63
|
-
* VMZ UI — Timeline (UI5 Console audit trail).
|
|
64
|
-
* Parent owns audit items; stable ids for list identity.
|
|
65
|
-
*/
|
|
66
|
-
export default class Timeline {
|
|
67
|
-
public label: string = "Audit";
|
|
68
|
-
/** @type {{ id: string, time: string, title: string, detail?: string }[]} */
|
|
69
|
-
public items: {
|
|
70
|
-
id: string;
|
|
71
|
-
time: string;
|
|
72
|
-
title: string;
|
|
73
|
-
detail?: string;
|
|
74
|
-
}[] = [];
|
|
75
|
-
}
|
|
76
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<ol data-vmz-ui="timeline" :aria-label="label" class="vmz-ui-timeline">
|
|
3
|
+
<li v-for="item in items" :key="item.id" :data-vmz-audit="item.id" class="vmz-ui-timeline__item">
|
|
4
|
+
<p class="vmz-ui-timeline__time">
|
|
5
|
+
{{ item.time }}
|
|
6
|
+
</p>
|
|
7
|
+
<p class="vmz-ui-timeline__title">
|
|
8
|
+
{{ item.title }}
|
|
9
|
+
</p>
|
|
10
|
+
<p v-if="item.detail" class="vmz-ui-timeline__detail">
|
|
11
|
+
{{ item.detail }}
|
|
12
|
+
</p>
|
|
13
|
+
</li>
|
|
14
|
+
</ol>
|
|
15
|
+
</template>
|
|
16
|
+
<style>
|
|
17
|
+
.vmz-ui-timeline {
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
list-style: none;
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: var(--vmz-density-compact-gap);
|
|
24
|
+
border-left: 2px solid var(--vmz-line-default);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.vmz-ui-timeline__item {
|
|
28
|
+
position: relative;
|
|
29
|
+
padding: 0.125rem 0 0.125rem 0.85rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.vmz-ui-timeline__item::before {
|
|
33
|
+
content: "";
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: -0.35rem;
|
|
36
|
+
top: 0.45rem;
|
|
37
|
+
width: 0.55rem;
|
|
38
|
+
height: 0.55rem;
|
|
39
|
+
border-radius: 999px;
|
|
40
|
+
background: var(--vmz-action-primary-background);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.vmz-ui-timeline__time {
|
|
44
|
+
margin: 0;
|
|
45
|
+
font-size: 0.85em;
|
|
46
|
+
opacity: 0.75;
|
|
47
|
+
color: var(--vmz-action-primary-active);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.vmz-ui-timeline__title {
|
|
51
|
+
margin: 0.125rem 0 0;
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
color: var(--vmz-action-primary-active);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vmz-ui-timeline__detail {
|
|
57
|
+
margin: 0.2rem 0 0;
|
|
58
|
+
opacity: 0.9;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
<script client>
|
|
62
|
+
/**
|
|
63
|
+
* VMZ UI — Timeline (UI5 Console audit trail).
|
|
64
|
+
* Parent owns audit items; stable ids for list identity.
|
|
65
|
+
*/
|
|
66
|
+
export default class Timeline {
|
|
67
|
+
public label: string = "Audit";
|
|
68
|
+
/** @type {{ id: string, time: string, title: string, detail?: string }[]} */
|
|
69
|
+
public items: {
|
|
70
|
+
id: string;
|
|
71
|
+
time: string;
|
|
72
|
+
title: string;
|
|
73
|
+
detail?: string;
|
|
74
|
+
}[] = [];
|
|
75
|
+
}
|
|
76
|
+
</script>
|
package/src/components/Toc.vmz
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<aside data-vmz-ui="toc" :aria-label="label" class="vmz-ui-toc">
|
|
3
|
-
<p class="vmz-ui-toc__title">
|
|
4
|
-
{{ label }}
|
|
5
|
-
</p>
|
|
6
|
-
<nav class="vmz-ui-toc__nav">
|
|
7
|
-
<a v-for="item in items" :key="item.id" :href="item.href" :data-vmz-toc="item.id" class="vmz-ui-toc__link">
|
|
8
|
-
{{ item.title }}
|
|
9
|
-
</a>
|
|
10
|
-
</nav>
|
|
11
|
-
</aside>
|
|
12
|
-
</template>
|
|
13
|
-
<style>
|
|
14
|
-
.vmz-ui-toc {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
gap: 0.
|
|
18
|
-
min-width: 11rem;
|
|
19
|
-
padding: 0.85rem 0.75rem;
|
|
20
|
-
border: 1px solid var(--vmz-line-default);
|
|
21
|
-
border-radius: var(--vmz-radius-md, 6px);
|
|
22
|
-
background: var(--vmz-surface-mist);
|
|
23
|
-
color: var(--vmz-text-ink);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.vmz-ui-toc__title {
|
|
27
|
-
margin: 0;
|
|
28
|
-
font-family: var(--vmz-font-display);
|
|
29
|
-
font-size: 0.8rem;
|
|
30
|
-
font-weight: 700;
|
|
31
|
-
letter-spacing: 0.04em;
|
|
32
|
-
text-transform: uppercase;
|
|
33
|
-
color: var(--vmz-text-steel);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.vmz-ui-toc__nav {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
gap: 0.
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.vmz-ui-toc__link {
|
|
43
|
-
font: inherit;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
font-size: 0.92rem;
|
|
46
|
-
text-decoration: none;
|
|
47
|
-
color: var(--vmz-action-primary-active);
|
|
48
|
-
outline: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.vmz-ui-toc__link:hover {
|
|
52
|
-
color: var(--vmz-action-primary-background);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.vmz-ui-toc__link:focus-visible {
|
|
56
|
-
box-shadow: 0 0 0
|
|
57
|
-
border-radius: var(--vmz-radius-md, 6px);
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
60
|
-
<script client>
|
|
61
|
-
/**
|
|
62
|
-
* VMZ UI — Toc (Document/Product composition).
|
|
63
|
-
* In-page outline; parent supplies items. Readable without JS.
|
|
64
|
-
*/
|
|
65
|
-
export default class Toc {
|
|
66
|
-
public label: string = "On this page";
|
|
67
|
-
/** @type {{ id: string, title: string, href: string }[]} */
|
|
68
|
-
public items: {
|
|
69
|
-
id: string;
|
|
70
|
-
title: string;
|
|
71
|
-
href: string;
|
|
72
|
-
}[] = [];
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<aside data-vmz-ui="toc" :aria-label="label" class="vmz-ui-toc">
|
|
3
|
+
<p class="vmz-ui-toc__title">
|
|
4
|
+
{{ label }}
|
|
5
|
+
</p>
|
|
6
|
+
<nav class="vmz-ui-toc__nav">
|
|
7
|
+
<a v-for="item in items" :key="item.id" :href="item.href" :data-vmz-toc="item.id" class="vmz-ui-toc__link">
|
|
8
|
+
{{ item.title }}
|
|
9
|
+
</a>
|
|
10
|
+
</nav>
|
|
11
|
+
</aside>
|
|
12
|
+
</template>
|
|
13
|
+
<style>
|
|
14
|
+
.vmz-ui-toc {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 0.5rem;
|
|
18
|
+
min-width: 11rem;
|
|
19
|
+
padding: 0.85rem 0.75rem;
|
|
20
|
+
border: 1px solid var(--vmz-line-default);
|
|
21
|
+
border-radius: var(--vmz-radius-md, 6px);
|
|
22
|
+
background: var(--vmz-surface-mist);
|
|
23
|
+
color: var(--vmz-text-ink);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vmz-ui-toc__title {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-family: var(--vmz-font-display);
|
|
29
|
+
font-size: 0.8rem;
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
letter-spacing: 0.04em;
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
color: var(--vmz-text-steel);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.vmz-ui-toc__nav {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 0.375rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.vmz-ui-toc__link {
|
|
43
|
+
font: inherit;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
font-size: 0.92rem;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
color: var(--vmz-action-primary-active);
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.vmz-ui-toc__link:hover {
|
|
52
|
+
color: var(--vmz-action-primary-background);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.vmz-ui-toc__link:focus-visible {
|
|
56
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
57
|
+
border-radius: var(--vmz-radius-md, 6px);
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
60
|
+
<script client>
|
|
61
|
+
/**
|
|
62
|
+
* VMZ UI — Toc (Document/Product composition).
|
|
63
|
+
* In-page outline; parent supplies items. Readable without JS.
|
|
64
|
+
*/
|
|
65
|
+
export default class Toc {
|
|
66
|
+
public label: string = "On this page";
|
|
67
|
+
/** @type {{ id: string, title: string, href: string }[]} */
|
|
68
|
+
public items: {
|
|
69
|
+
id: string;
|
|
70
|
+
title: string;
|
|
71
|
+
href: string;
|
|
72
|
+
}[] = [];
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div data-vmz-ui="tooltip" :data-open="openAttr" class="vmz-ui-tooltip">
|
|
3
|
-
<div data-vmz-tooltip="trigger" class="vmz-ui-tooltip__trigger">
|
|
4
|
-
<slot />
|
|
5
|
-
</div>
|
|
6
|
-
<div v-if="open" role="tooltip" :id="tooltipId" data-vmz-tooltip="bubble" class="vmz-ui-tooltip__bubble">
|
|
7
|
-
{{ content }}
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
<style>
|
|
12
|
-
.vmz-ui-tooltip {
|
|
13
|
-
position: relative;
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: flex-start;
|
|
17
|
-
gap: 0.
|
|
18
|
-
max-width: 28rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.vmz-ui-tooltip__trigger {
|
|
22
|
-
display: inline-flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
gap: 0.
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.vmz-ui-tooltip__bubble {
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
max-width: 18rem;
|
|
30
|
-
padding: 0.
|
|
31
|
-
border: 1px solid var(--vmz-line-default);
|
|
32
|
-
border-radius: var(--vmz-radius-md, 6px);
|
|
33
|
-
background: var(--vmz-surface-paper);
|
|
34
|
-
color: var(--vmz-text-ink);
|
|
35
|
-
font-size: 0.88rem;
|
|
36
|
-
line-height: 1.4;
|
|
37
|
-
box-shadow: 0 1px 0 color-mix(in srgb, var(--vmz-line-default) 70%, transparent);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.vmz-ui-tooltip[data-open="true"]
|
|
41
|
-
.vmz-ui-tooltip__trigger
|
|
42
|
-
:where(button, a, [tabindex]):focus-visible {
|
|
43
|
-
box-shadow: 0 0 0
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
<script client>
|
|
47
|
-
/**
|
|
48
|
-
* VMZ UI — Tooltip.
|
|
49
|
-
* Parent owns live `open` + content string. Not a second overlay runtime;
|
|
50
|
-
* Escape/outside policies stay with richer Popover/Dialog when needed.
|
|
51
|
-
*/
|
|
52
|
-
export default class Tooltip {
|
|
53
|
-
public open: boolean = false;
|
|
54
|
-
public openAttr: string = "false";
|
|
55
|
-
public content: string = "";
|
|
56
|
-
public tooltipId: string = "vmz-tooltip";
|
|
57
|
-
}
|
|
58
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div data-vmz-ui="tooltip" :data-open="openAttr" class="vmz-ui-tooltip">
|
|
3
|
+
<div data-vmz-tooltip="trigger" class="vmz-ui-tooltip__trigger">
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
<div v-if="open" role="tooltip" :id="tooltipId" data-vmz-tooltip="bubble" class="vmz-ui-tooltip__bubble">
|
|
7
|
+
{{ content }}
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<style>
|
|
12
|
+
.vmz-ui-tooltip {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: flex-start;
|
|
17
|
+
gap: 0.375rem;
|
|
18
|
+
max-width: 28rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.vmz-ui-tooltip__trigger {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 0.375rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.vmz-ui-tooltip__bubble {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
max-width: 18rem;
|
|
30
|
+
padding: 0.375rem 0.625rem;
|
|
31
|
+
border: 1px solid var(--vmz-line-default);
|
|
32
|
+
border-radius: var(--vmz-radius-md, 6px);
|
|
33
|
+
background: var(--vmz-surface-paper);
|
|
34
|
+
color: var(--vmz-text-ink);
|
|
35
|
+
font-size: 0.88rem;
|
|
36
|
+
line-height: 1.4;
|
|
37
|
+
box-shadow: 0 1px 0 color-mix(in srgb, var(--vmz-line-default) 70%, transparent);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.vmz-ui-tooltip[data-open="true"]
|
|
41
|
+
.vmz-ui-tooltip__trigger
|
|
42
|
+
:where(button, a, [tabindex]):focus-visible {
|
|
43
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
46
|
+
<script client>
|
|
47
|
+
/**
|
|
48
|
+
* VMZ UI — Tooltip.
|
|
49
|
+
* Parent owns live `open` + content string. Not a second overlay runtime;
|
|
50
|
+
* Escape/outside policies stay with richer Popover/Dialog when needed.
|
|
51
|
+
*/
|
|
52
|
+
export default class Tooltip {
|
|
53
|
+
public open: boolean = false;
|
|
54
|
+
public openAttr: string = "false";
|
|
55
|
+
public content: string = "";
|
|
56
|
+
public tooltipId: string = "vmz-tooltip";
|
|
57
|
+
}
|
|
58
|
+
</script>
|