@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,72 +1,48 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
aria-label="Dismiss popover"
|
|
19
|
-
@click="dismiss"
|
|
20
|
-
></button>
|
|
21
|
-
<div
|
|
22
|
-
class="vmz-ui-popover__panel"
|
|
23
|
-
role="dialog"
|
|
24
|
-
aria-modal="false"
|
|
25
|
-
:aria-labelledby="titleId"
|
|
26
|
-
tabindex="-1"
|
|
27
|
-
data-vmz-overlay-layer="panel"
|
|
28
|
-
data-vmz-focus="enter"
|
|
29
|
-
:onKeyDown="onPanelKeyDown"
|
|
30
|
-
>
|
|
31
|
-
<h2 :id="titleId" class="vmz-ui-popover__title">{{ title }}</h2>
|
|
32
|
-
<div class="vmz-ui-popover__body">
|
|
33
|
-
<slot />
|
|
34
|
-
</div>
|
|
35
|
-
<div class="vmz-ui-popover__actions">
|
|
36
|
-
<button type="button" class="vmz-ui-popover__close" data-vmz-focus="close" @click="dismiss">
|
|
37
|
-
Close
|
|
38
|
-
</button>
|
|
39
|
-
</div>
|
|
2
|
+
<div data-vmz-ui="popover" :data-vmz-overlay-open="open" class="vmz-ui-popover-root">
|
|
3
|
+
<div v-if="open" data-vmz-overlay="popover" data-vmz-overlay-owner="popover" :data-vmz-overlay-stack="stackLevel" class="vmz-ui-popover">
|
|
4
|
+
<button type="button" data-vmz-overlay-layer="backdrop" aria-label="Dismiss popover" @click="dismiss" class="vmz-ui-popover__backdrop" />
|
|
5
|
+
<div role="dialog" aria-modal="false" :aria-labelledby="titleId" tabindex="-1" data-vmz-overlay-layer="panel" data-vmz-focus="enter" :onKeyDown="onPanelKeyDown" class="vmz-ui-popover__panel">
|
|
6
|
+
<h2 :id="titleId" class="vmz-ui-popover__title">
|
|
7
|
+
{{ title }}
|
|
8
|
+
</h2>
|
|
9
|
+
<div class="vmz-ui-popover__body">
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
<div class="vmz-ui-popover__actions">
|
|
13
|
+
<button type="button" data-vmz-focus="close" @click="dismiss" class="vmz-ui-popover__close">
|
|
14
|
+
Close
|
|
15
|
+
</button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
40
18
|
</div>
|
|
41
|
-
</div>
|
|
42
19
|
</div>
|
|
43
20
|
</template>
|
|
44
|
-
|
|
45
21
|
<style>
|
|
46
|
-
|
|
22
|
+
.vmz-ui-popover-root {
|
|
47
23
|
display: block;
|
|
48
|
-
|
|
24
|
+
}
|
|
49
25
|
|
|
50
|
-
|
|
26
|
+
.vmz-ui-popover {
|
|
51
27
|
position: fixed;
|
|
52
28
|
inset: 0;
|
|
53
29
|
z-index: 35;
|
|
54
30
|
pointer-events: none;
|
|
55
|
-
|
|
31
|
+
}
|
|
56
32
|
|
|
57
|
-
|
|
33
|
+
.vmz-ui-popover[data-vmz-overlay-stack="1"] {
|
|
58
34
|
z-index: 50;
|
|
59
|
-
|
|
35
|
+
}
|
|
60
36
|
|
|
61
|
-
|
|
37
|
+
.vmz-ui-popover[data-vmz-overlay-stack="2"] {
|
|
62
38
|
z-index: 60;
|
|
63
|
-
|
|
39
|
+
}
|
|
64
40
|
|
|
65
|
-
|
|
41
|
+
.vmz-ui-popover[data-vmz-overlay-stack="3"] {
|
|
66
42
|
z-index: 70;
|
|
67
|
-
|
|
43
|
+
}
|
|
68
44
|
|
|
69
|
-
|
|
45
|
+
.vmz-ui-popover__backdrop {
|
|
70
46
|
position: absolute;
|
|
71
47
|
inset: 0;
|
|
72
48
|
border: 0;
|
|
@@ -75,9 +51,9 @@
|
|
|
75
51
|
cursor: default;
|
|
76
52
|
background: transparent;
|
|
77
53
|
pointer-events: auto;
|
|
78
|
-
|
|
54
|
+
}
|
|
79
55
|
|
|
80
|
-
|
|
56
|
+
.vmz-ui-popover__panel {
|
|
81
57
|
position: absolute;
|
|
82
58
|
z-index: 1;
|
|
83
59
|
top: 30%;
|
|
@@ -93,22 +69,22 @@
|
|
|
93
69
|
color: var(--vmz-action-primary-active);
|
|
94
70
|
outline: none;
|
|
95
71
|
pointer-events: auto;
|
|
96
|
-
|
|
72
|
+
}
|
|
97
73
|
|
|
98
|
-
|
|
74
|
+
.vmz-ui-popover__panel:focus-visible {
|
|
99
75
|
box-shadow: 0 0 0 2px var(--vmz-focus-ring);
|
|
100
|
-
|
|
76
|
+
}
|
|
101
77
|
|
|
102
|
-
|
|
78
|
+
.vmz-ui-popover__title {
|
|
103
79
|
margin: 0 0 0.5rem;
|
|
104
80
|
font-size: 1rem;
|
|
105
|
-
|
|
81
|
+
}
|
|
106
82
|
|
|
107
|
-
|
|
83
|
+
.vmz-ui-popover__body {
|
|
108
84
|
margin-bottom: 0.75rem;
|
|
109
|
-
|
|
85
|
+
}
|
|
110
86
|
|
|
111
|
-
|
|
87
|
+
.vmz-ui-popover__close {
|
|
112
88
|
font: inherit;
|
|
113
89
|
font-weight: 600;
|
|
114
90
|
padding: 0.4rem 0.7rem;
|
|
@@ -117,121 +93,131 @@
|
|
|
117
93
|
cursor: pointer;
|
|
118
94
|
background: var(--vmz-action-primary-background);
|
|
119
95
|
color: var(--vmz-action-primary-foreground);
|
|
120
|
-
|
|
96
|
+
}
|
|
121
97
|
|
|
122
|
-
|
|
98
|
+
.vmz-ui-popover__close:focus-visible {
|
|
123
99
|
box-shadow: 0 0 0 2px var(--vmz-focus-ring);
|
|
124
|
-
|
|
100
|
+
}
|
|
125
101
|
</style>
|
|
126
|
-
|
|
127
102
|
<script client>
|
|
128
103
|
/**
|
|
129
|
-
* VMZ UI — Popover (UI2).
|
|
130
|
-
* Non-modal disclosure: Escape + outside dismiss + focus enter/restore.
|
|
131
|
-
* Parent owns live `open`. Fixed min size for layout stability.
|
|
132
|
-
* `stackLevel` raises z-index; Escape dismisses only the topmost stacked overlay.
|
|
133
|
-
*/
|
|
104
|
+
* VMZ UI — Popover (UI2).
|
|
105
|
+
* Non-modal disclosure: Escape + outside dismiss + focus enter/restore.
|
|
106
|
+
* Parent owns live `open`. Fixed min size for layout stability.
|
|
107
|
+
* `stackLevel` raises z-index; Escape dismisses only the topmost stacked overlay.
|
|
108
|
+
*/
|
|
134
109
|
export default class Popover {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
110
|
+
public open: boolean = false;
|
|
111
|
+
public title: string = "Popover";
|
|
112
|
+
public titleId: string = "vmz-popover-title";
|
|
113
|
+
public stackLevel: string = "0";
|
|
114
|
+
public onClose: (() => void) | null = null;
|
|
115
|
+
_restoreFocus = null;
|
|
116
|
+
_panel = null;
|
|
117
|
+
_docKeyHandler = null;
|
|
118
|
+
_observer = null;
|
|
119
|
+
async onMount() {
|
|
120
|
+
if (typeof document === "undefined" || typeof MutationObserver === "undefined") return;
|
|
121
|
+
const root = this.__vmzDomRoot;
|
|
122
|
+
if (!root || typeof root.querySelector !== "function") return;
|
|
123
|
+
this._observer = new MutationObserver(() => this._syncFromDom());
|
|
124
|
+
this._observer.observe(root, {
|
|
125
|
+
childList: true,
|
|
126
|
+
subtree: true,
|
|
127
|
+
});
|
|
128
|
+
this._syncFromDom();
|
|
129
|
+
}
|
|
130
|
+
onDestroy() {
|
|
131
|
+
if (this._observer) {
|
|
132
|
+
this._observer.disconnect();
|
|
133
|
+
this._observer = null;
|
|
134
|
+
}
|
|
135
|
+
this._teardownDocKey();
|
|
136
|
+
this._panel = null;
|
|
137
|
+
this._restoreFocus = null;
|
|
138
|
+
}
|
|
139
|
+
dismiss() {
|
|
140
|
+
this.emit("close");
|
|
141
|
+
if (typeof this.onClose === "function") this.onClose();
|
|
142
|
+
}
|
|
143
|
+
_stackValue() {
|
|
144
|
+
const n = Number(this.stackLevel);
|
|
145
|
+
return Number.isFinite(n) ? n : 0;
|
|
146
|
+
}
|
|
147
|
+
_isTopmostStack() {
|
|
148
|
+
if (typeof document === "undefined") return true;
|
|
149
|
+
const root = this.__vmzDomRoot;
|
|
150
|
+
const mine =
|
|
151
|
+
root && typeof root.querySelector === "function"
|
|
152
|
+
? root.querySelector("[data-vmz-overlay][data-vmz-overlay-stack]")
|
|
153
|
+
: null;
|
|
154
|
+
const myStack = Number(
|
|
155
|
+
mine?.getAttribute("data-vmz-overlay-stack") || this.stackLevel || "0",
|
|
156
|
+
);
|
|
157
|
+
const open = document.querySelectorAll("[data-vmz-overlay][data-vmz-overlay-stack]");
|
|
158
|
+
let max = -Infinity;
|
|
159
|
+
for (const el of open) {
|
|
160
|
+
const n = Number(el.getAttribute("data-vmz-overlay-stack") || "0");
|
|
161
|
+
if (Number.isFinite(n) && n > max) max = n;
|
|
162
|
+
}
|
|
163
|
+
if (!Number.isFinite(max)) return true;
|
|
164
|
+
return (Number.isFinite(myStack) ? myStack : 0) >= max;
|
|
165
|
+
}
|
|
166
|
+
onPanelKeyDown(ev) {
|
|
167
|
+
if (!ev || ev.key !== "Escape") return;
|
|
168
|
+
if (!this._isTopmostStack()) return;
|
|
169
|
+
ev.preventDefault();
|
|
170
|
+
ev.stopPropagation();
|
|
171
|
+
this.dismiss();
|
|
172
|
+
}
|
|
173
|
+
_syncFromDom() {
|
|
174
|
+
const root = this.__vmzDomRoot;
|
|
175
|
+
const panel =
|
|
176
|
+
root && typeof root.querySelector === "function"
|
|
177
|
+
? root.querySelector('[data-vmz-overlay="popover"] [data-vmz-focus="enter"]')
|
|
178
|
+
: null;
|
|
179
|
+
if (panel && !this._panel) this._enterFocus(panel);
|
|
180
|
+
else if (!panel && this._panel) this._exitFocus();
|
|
181
|
+
}
|
|
182
|
+
_enterFocus(panel) {
|
|
183
|
+
if (typeof document === "undefined") return;
|
|
184
|
+
const active = document.activeElement;
|
|
185
|
+
if (!this._restoreFocus) {
|
|
186
|
+
const root = this.__vmzDomRoot;
|
|
187
|
+
const outside =
|
|
188
|
+
active instanceof HTMLElement &&
|
|
189
|
+
active !== document.body &&
|
|
190
|
+
!(root && typeof root.contains === "function" && root.contains(active));
|
|
191
|
+
if (outside) this._restoreFocus = active;
|
|
192
|
+
}
|
|
193
|
+
this._panel = panel instanceof HTMLElement ? panel : null;
|
|
194
|
+
if (this._panel && typeof this._panel.focus === "function") this._panel.focus();
|
|
195
|
+
if (!this._docKeyHandler) {
|
|
196
|
+
this._docKeyHandler = (ev) => {
|
|
197
|
+
if (ev.key !== "Escape") return;
|
|
198
|
+
if (ev.defaultPrevented) return;
|
|
199
|
+
if (!this._isTopmostStack()) return;
|
|
200
|
+
ev.preventDefault();
|
|
201
|
+
ev.stopPropagation();
|
|
202
|
+
this.dismiss();
|
|
203
|
+
};
|
|
204
|
+
document.addEventListener("keydown", this._docKeyHandler);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
_exitFocus() {
|
|
208
|
+
this._teardownDocKey();
|
|
209
|
+
this._panel = null;
|
|
210
|
+
const restore = this._restoreFocus;
|
|
211
|
+
this._restoreFocus = null;
|
|
212
|
+
if (restore && typeof restore.focus === "function" && document.contains(restore)) {
|
|
213
|
+
restore.focus();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
_teardownDocKey() {
|
|
217
|
+
if (typeof document !== "undefined" && this._docKeyHandler) {
|
|
218
|
+
document.removeEventListener("keydown", this._docKeyHandler);
|
|
219
|
+
}
|
|
220
|
+
this._docKeyHandler = null;
|
|
221
|
+
}
|
|
236
222
|
}
|
|
237
223
|
</script>
|
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<div data-vmz-ui="progress" role="progressbar" :aria-valuemin="0" :aria-valuemax="100" :aria-valuenow="percent" class="vmz-ui-progress">
|
|
3
|
+
<div class="vmz-ui-progress__track">
|
|
4
|
+
<span :style='"width:" + percent + "%"' />
|
|
5
|
+
</div>
|
|
6
|
+
<span v-if="showInfo" class="vmz-ui-progress__text">
|
|
7
|
+
{{ percent }}
|
|
8
|
+
%
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
6
11
|
</template>
|
|
7
12
|
<style>
|
|
8
|
-
.vmz-ui-progress{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
.vmz-ui-progress {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 0.75rem;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
.vmz-ui-progress__track {
|
|
20
|
+
height: 0.5rem;
|
|
21
|
+
flex: 1;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
border-radius: 999px;
|
|
24
|
+
background: var(--vmz-surface-mist);
|
|
25
|
+
}
|
|
26
|
+
.vmz-ui-progress__track span {
|
|
27
|
+
display: block;
|
|
28
|
+
height: 100%;
|
|
29
|
+
border-radius: inherit;
|
|
30
|
+
background: var(--vmz-action-primary-background);
|
|
31
|
+
transition: width var(--vmz-motion-control-duration, 0.16s);
|
|
32
|
+
}
|
|
33
|
+
.vmz-ui-progress__text {
|
|
34
|
+
min-width: 2.5rem;
|
|
35
|
+
color: var(--vmz-text-steel);
|
|
36
|
+
font-size: 0.875rem;
|
|
37
|
+
}
|
|
12
38
|
</style>
|
|
13
39
|
<script client>
|
|
14
40
|
export default class Progress {
|
|
15
|
-
|
|
16
|
-
|
|
41
|
+
public percent: number = 0;
|
|
42
|
+
public showInfo: boolean = true;
|
|
17
43
|
}
|
|
18
44
|
</script>
|
package/src/components/Prose.vmz
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<article data-vmz-ui="prose" class="vmz-ui-prose">
|
|
3
|
+
<slot />
|
|
4
4
|
</article>
|
|
5
5
|
</template>
|
|
6
|
-
|
|
7
6
|
<style>
|
|
8
|
-
|
|
7
|
+
.vmz-ui-prose {
|
|
9
8
|
display: flex;
|
|
10
9
|
flex-direction: column;
|
|
11
10
|
gap: 1rem;
|
|
@@ -13,9 +12,9 @@
|
|
|
13
12
|
color: var(--vmz-text-ink);
|
|
14
13
|
font-family: var(--vmz-font-sans);
|
|
15
14
|
line-height: 1.65;
|
|
16
|
-
|
|
15
|
+
}
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
.vmz-ui-prose :where(h1, h2, h3) {
|
|
19
18
|
margin: 0;
|
|
20
19
|
font-family: var(--vmz-font-display);
|
|
21
20
|
font-weight: 700;
|
|
@@ -23,61 +22,60 @@
|
|
|
23
22
|
line-height: 1.2;
|
|
24
23
|
color: var(--vmz-text-ink);
|
|
25
24
|
scroll-margin-top: 1.25rem;
|
|
26
|
-
|
|
25
|
+
}
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
.vmz-ui-prose :where(h1) {
|
|
29
28
|
font-size: clamp(1.85rem, 4vw, 2.35rem);
|
|
30
|
-
|
|
29
|
+
}
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
.vmz-ui-prose :where(h2) {
|
|
33
32
|
font-size: 1.35rem;
|
|
34
33
|
margin-top: 0.5rem;
|
|
35
|
-
|
|
34
|
+
}
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
.vmz-ui-prose :where(h3) {
|
|
38
37
|
font-size: 1.1rem;
|
|
39
|
-
|
|
38
|
+
}
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
.vmz-ui-prose :where(p) {
|
|
42
41
|
margin: 0;
|
|
43
42
|
color: var(--vmz-text-ink);
|
|
44
|
-
|
|
43
|
+
}
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
.vmz-ui-prose :where(p.lead) {
|
|
47
46
|
font-size: 1.05rem;
|
|
48
47
|
color: var(--vmz-text-steel);
|
|
49
|
-
|
|
48
|
+
}
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
.vmz-ui-prose :where(ul, ol) {
|
|
52
51
|
margin: 0;
|
|
53
52
|
padding-left: 1.25rem;
|
|
54
53
|
color: var(--vmz-text-ink);
|
|
55
|
-
|
|
54
|
+
}
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
.vmz-ui-prose :where(li + li) {
|
|
58
57
|
margin-top: 0.35rem;
|
|
59
|
-
|
|
58
|
+
}
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
.vmz-ui-prose :where(a) {
|
|
62
61
|
color: var(--vmz-action-primary-background);
|
|
63
62
|
text-underline-offset: 0.15em;
|
|
64
|
-
|
|
63
|
+
}
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
.vmz-ui-prose :where(a:hover) {
|
|
67
66
|
color: var(--vmz-action-primary-hover);
|
|
68
|
-
|
|
67
|
+
}
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
.vmz-ui-prose :where(hr) {
|
|
71
70
|
border: 0;
|
|
72
71
|
border-top: 1px solid var(--vmz-line-default);
|
|
73
72
|
margin: 0.5rem 0;
|
|
74
|
-
|
|
73
|
+
}
|
|
75
74
|
</style>
|
|
76
|
-
|
|
77
75
|
<script client>
|
|
78
76
|
/**
|
|
79
|
-
* VMZ UI — Prose (Document/Product composition).
|
|
80
|
-
* Typography measure for long-form content; values from Style Theme only.
|
|
81
|
-
*/
|
|
77
|
+
* VMZ UI — Prose (Document/Product composition).
|
|
78
|
+
* Typography measure for long-form content; values from Style Theme only.
|
|
79
|
+
*/
|
|
82
80
|
export default class Prose {}
|
|
83
81
|
</script>
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
data-vmz-ui="query-form"
|
|
5
|
-
data-dense="true"
|
|
6
|
-
:aria-label="label"
|
|
7
|
-
@submit="onSubmitGuard"
|
|
8
|
-
>
|
|
9
|
-
<slot />
|
|
2
|
+
<form data-vmz-ui="query-form" data-dense="true" :aria-label="label" @submit="onSubmitGuard" class="vmz-ui-query-form">
|
|
3
|
+
<slot />
|
|
10
4
|
</form>
|
|
11
5
|
</template>
|
|
12
|
-
|
|
13
6
|
<style>
|
|
14
|
-
|
|
7
|
+
.vmz-ui-query-form {
|
|
15
8
|
display: flex;
|
|
16
9
|
flex-wrap: wrap;
|
|
17
10
|
align-items: flex-end;
|
|
@@ -19,21 +12,20 @@
|
|
|
19
12
|
padding: var(--vmz-density-compact-padding-y) var(--vmz-density-compact-padding-x);
|
|
20
13
|
border: 1px solid var(--vmz-line-default);
|
|
21
14
|
border-radius: var(--vmz-radius-md, 6px);
|
|
22
|
-
|
|
15
|
+
}
|
|
23
16
|
</style>
|
|
24
|
-
|
|
25
17
|
<script client>
|
|
26
18
|
/**
|
|
27
|
-
* VMZ UI — QueryForm (UI5 Console Surface).
|
|
28
|
-
* Dense multi-field query landmark; spacing from density.compact.* tokens.
|
|
29
|
-
*/
|
|
19
|
+
* VMZ UI — QueryForm (UI5 Console Surface).
|
|
20
|
+
* Dense multi-field query landmark; spacing from density.compact.* tokens.
|
|
21
|
+
*/
|
|
30
22
|
export default class QueryForm {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
public label: string = "Query";
|
|
24
|
+
public onSubmit: (() => void) | null = null;
|
|
25
|
+
onSubmitGuard(ev) {
|
|
26
|
+
if (ev && typeof ev.preventDefault === "function") ev.preventDefault();
|
|
27
|
+
this.emit("submit");
|
|
28
|
+
if (typeof this.onSubmit === "function") this.onSubmit();
|
|
29
|
+
}
|
|
38
30
|
}
|
|
39
31
|
</script>
|