@vmz/ui 0.3.6 → 0.3.8

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.
Files changed (68) hide show
  1. package/README.md +53 -51
  2. package/contracts/token-requirements.v0.json +58 -1
  3. package/package.json +5 -2
  4. package/presets/web-surface.v0.json +14 -12
  5. package/src/components/Accordion.vmz +127 -94
  6. package/src/components/Alert.vmz +125 -28
  7. package/src/components/AppShell.vmz +125 -57
  8. package/src/components/Autocomplete.vmz +261 -154
  9. package/src/components/Avatar.vmz +20 -12
  10. package/src/components/Badge.vmz +62 -70
  11. package/src/components/Breadcrumb.vmz +86 -72
  12. package/src/components/BulkActions.vmz +56 -51
  13. package/src/components/Button.vmz +237 -211
  14. package/src/components/Callout.vmz +178 -77
  15. package/src/components/Card.vmz +141 -120
  16. package/src/components/Checkbox.vmz +131 -55
  17. package/src/components/CodeBlock.vmz +77 -30
  18. package/src/components/Collapse.vmz +64 -11
  19. package/src/components/ConsoleShell.vmz +405 -251
  20. package/src/components/Content.vmz +15 -1
  21. package/src/components/DataTable.vmz +294 -194
  22. package/src/components/DatePicker.vmz +766 -674
  23. package/src/components/Descriptions.vmz +90 -0
  24. package/src/components/Dialog.vmz +137 -38
  25. package/src/components/Divider.vmz +8 -1
  26. package/src/components/Drawer.vmz +518 -427
  27. package/src/components/Dropdown.vmz +195 -51
  28. package/src/components/Empty.vmz +96 -54
  29. package/src/components/Field.vmz +170 -115
  30. package/src/components/FilterBar.vmz +34 -4
  31. package/src/components/Flex.vmz +3 -1
  32. package/src/components/Footer.vmz +6 -3
  33. package/src/components/Form.vmz +41 -0
  34. package/src/components/FormItem.vmz +78 -79
  35. package/src/components/Grid.vmz +6 -3
  36. package/src/components/Header.vmz +193 -6
  37. package/src/components/Layout.vmz +3 -1
  38. package/src/components/Link.vmz +25 -10
  39. package/src/components/List.vmz +124 -102
  40. package/src/components/Menu.vmz +416 -243
  41. package/src/components/Message.vmz +167 -0
  42. package/src/components/Notification.vmz +132 -37
  43. package/src/components/Pagination.vmz +237 -69
  44. package/src/components/Popconfirm.vmz +287 -0
  45. package/src/components/Popover.vmz +341 -223
  46. package/src/components/Progress.vmz +16 -5
  47. package/src/components/Prose.vmz +180 -81
  48. package/src/components/QueryForm.vmz +31 -9
  49. package/src/components/RadioGroup.vmz +204 -124
  50. package/src/components/Result.vmz +60 -27
  51. package/src/components/Segmented.vmz +86 -51
  52. package/src/components/Select.vmz +620 -533
  53. package/src/components/Sider.vmz +120 -7
  54. package/src/components/Skeleton.vmz +9 -7
  55. package/src/components/Space.vmz +9 -3
  56. package/src/components/Spinner.vmz +5 -4
  57. package/src/components/Steps.vmz +118 -103
  58. package/src/components/Switch.vmz +131 -98
  59. package/src/components/Table.vmz +270 -165
  60. package/src/components/Tabs.vmz +125 -110
  61. package/src/components/Tag.vmz +60 -43
  62. package/src/components/TextArea.vmz +125 -118
  63. package/src/components/Timeline.vmz +111 -76
  64. package/src/components/Toc.vmz +90 -74
  65. package/src/components/Tooltip.vmz +107 -58
  66. package/src/components/Tree.vmz +214 -191
  67. package/src/components/Typography.vmz +23 -8
  68. package/src/components/Upload.vmz +1394 -1289
@@ -1,223 +1,341 @@
1
- <template>
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>
18
- </div>
19
- </div>
20
- </template>
21
- <style>
22
- .vmz-ui-popover-root {
23
- display: block;
24
- }
25
-
26
- .vmz-ui-popover {
27
- position: fixed;
28
- inset: 0;
29
- z-index: 35;
30
- pointer-events: none;
31
- }
32
-
33
- .vmz-ui-popover[data-vmz-overlay-stack="1"] {
34
- z-index: 50;
35
- }
36
-
37
- .vmz-ui-popover[data-vmz-overlay-stack="2"] {
38
- z-index: 60;
39
- }
40
-
41
- .vmz-ui-popover[data-vmz-overlay-stack="3"] {
42
- z-index: 70;
43
- }
44
-
45
- .vmz-ui-popover__backdrop {
46
- position: absolute;
47
- inset: 0;
48
- border: 0;
49
- padding: 0;
50
- margin: 0;
51
- cursor: default;
52
- background: transparent;
53
- pointer-events: auto;
54
- }
55
-
56
- .vmz-ui-popover__panel {
57
- position: absolute;
58
- z-index: 1;
59
- top: 30%;
60
- left: 50%;
61
- transform: translateX(-50%);
62
- box-sizing: border-box;
63
- width: min(20rem, calc(100vw - 2rem));
64
- min-height: 8rem;
65
- padding: 0.85rem 1rem 1rem;
66
- border: 1px solid var(--vmz-line-default);
67
- border-radius: var(--vmz-radius-md, 6px);
68
- background: var(--vmz-action-primary-foreground);
69
- color: var(--vmz-action-primary-active);
70
- outline: none;
71
- pointer-events: auto;
72
- }
73
-
74
- .vmz-ui-popover__panel:focus-visible {
75
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
76
- }
77
-
78
- .vmz-ui-popover__title {
79
- margin: 0 0 0.5rem;
80
- font-size: 1rem;
81
- }
82
-
83
- .vmz-ui-popover__body {
84
- margin-bottom: 0.75rem;
85
- }
86
-
87
- .vmz-ui-popover__close {
88
- font: inherit;
89
- font-weight: 600;
90
- padding: 0.375rem 0.7rem;
91
- border: 1px solid transparent;
92
- border-radius: var(--vmz-radius-md, 6px);
93
- cursor: pointer;
94
- background: var(--vmz-action-primary-background);
95
- color: var(--vmz-action-primary-foreground);
96
- }
97
-
98
- .vmz-ui-popover__close:focus-visible {
99
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
100
- }
101
- </style>
102
- <script client>
103
- /**
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
- */
109
- export default class Popover {
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
- }
222
- }
223
- </script>
1
+ <template>
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="dismissLabel || closeLabel || title" @click="dismiss" class="vmz-ui-popover__backdrop" />
5
+ <div role="dialog" aria-modal="false" :aria-labelledby="title ? titleId : null" tabindex="-1" data-vmz-overlay-layer="panel" data-vmz-focus="enter" :onKeyDown="onPanelKeyDown" class="vmz-ui-popover__panel">
6
+ <span aria-hidden="true" data-vmz-popover="arrow" class="vmz-ui-popover__arrow" />
7
+ <header v-if="title || description" class="vmz-ui-popover__header">
8
+ <div class="vmz-ui-popover__heading">
9
+ <h2 v-if="title" :id="titleId" class="vmz-ui-popover__title">
10
+ {{ title }}
11
+ </h2>
12
+ <p v-if="description" class="vmz-ui-popover__description">
13
+ {{ description }}
14
+ </p>
15
+ </div>
16
+ <button type="button" data-vmz-focus="close" :aria-label="closeLabel || title" @click="dismiss" class="vmz-ui-popover__close">
17
+ <Icon name="action.close" size="md" decorative />
18
+ </button>
19
+ </header>
20
+ <div class="vmz-ui-popover__body">
21
+ <slot />
22
+ </div>
23
+ <div class="vmz-ui-popover__actions">
24
+ <slot name="actions" />
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </template>
30
+ <style>
31
+ .vmz-ui-popover-root {
32
+ display: block;
33
+ }
34
+
35
+ .vmz-ui-popover {
36
+ position: fixed;
37
+ inset: 0;
38
+ z-index: 35;
39
+ pointer-events: none;
40
+ }
41
+
42
+ .vmz-ui-popover[data-vmz-overlay-stack="1"] {
43
+ z-index: 50;
44
+ }
45
+
46
+ .vmz-ui-popover[data-vmz-overlay-stack="2"] {
47
+ z-index: 60;
48
+ }
49
+
50
+ .vmz-ui-popover[data-vmz-overlay-stack="3"] {
51
+ z-index: 70;
52
+ }
53
+
54
+ .vmz-ui-popover__backdrop {
55
+ position: absolute;
56
+ inset: 0;
57
+ border: 0;
58
+ padding: 0;
59
+ margin: 0;
60
+ cursor: default;
61
+ background: transparent;
62
+ pointer-events: auto;
63
+ }
64
+
65
+ .vmz-ui-popover__panel {
66
+ position: absolute;
67
+ z-index: 1;
68
+ top: 30%;
69
+ left: 50%;
70
+ transform: translateX(-50%);
71
+ box-sizing: border-box;
72
+ width: min(320px, calc(100vw - 32px));
73
+ padding: 12px;
74
+ border: 1px solid var(--vmz-line-subtle);
75
+ border-radius: var(--vmz-radius-lg);
76
+ background: var(--vmz-surface-paper);
77
+ color: var(--vmz-text-ink);
78
+ box-shadow: var(--vmz-shadow-popup);
79
+ outline: none;
80
+ pointer-events: auto;
81
+ animation: vmz-ui-popover-in var(--vmz-motion-overlay-duration)
82
+ var(--vmz-motion-overlay-easing);
83
+ }
84
+
85
+ .vmz-ui-popover__arrow {
86
+ position: absolute;
87
+ top: -5px;
88
+ left: 50%;
89
+ width: 8px;
90
+ height: 8px;
91
+ border-top: 1px solid var(--vmz-line-subtle);
92
+ border-left: 1px solid var(--vmz-line-subtle);
93
+ border-radius: 1px 0 0 0;
94
+ background: var(--vmz-surface-paper);
95
+ transform: translateX(-50%) rotate(45deg);
96
+ }
97
+
98
+ .vmz-ui-popover__panel:focus-visible {
99
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring), var(--vmz-shadow-popup);
100
+ }
101
+
102
+ .vmz-ui-popover__header {
103
+ display: flex;
104
+ align-items: flex-start;
105
+ gap: 8px;
106
+ }
107
+
108
+ .vmz-ui-popover__heading {
109
+ flex: 1 1 auto;
110
+ min-width: 0;
111
+ }
112
+
113
+ .vmz-ui-popover__title {
114
+ margin: 0;
115
+ font-size: 14px;
116
+ font-weight: 600;
117
+ line-height: 22px;
118
+ color: var(--vmz-text-ink);
119
+ }
120
+
121
+ .vmz-ui-popover__description {
122
+ margin: 2px 0 0;
123
+ font-size: 14px;
124
+ line-height: 22px;
125
+ color: var(--vmz-text-tertiary);
126
+ }
127
+
128
+ .vmz-ui-popover__close {
129
+ flex: 0 0 auto;
130
+ display: inline-flex;
131
+ align-items: center;
132
+ justify-content: center;
133
+ width: 28px;
134
+ height: 28px;
135
+ margin: -4px -4px 0 0;
136
+ padding: 0;
137
+ border: 0;
138
+ border-radius: var(--vmz-radius-md);
139
+ background: transparent;
140
+ color: var(--vmz-text-steel);
141
+ cursor: pointer;
142
+ outline: none;
143
+ transition:
144
+ color var(--vmz-motion-control-duration) var(--vmz-motion-control-easing),
145
+ background-color var(--vmz-motion-control-duration) var(--vmz-motion-control-easing);
146
+ }
147
+
148
+ .vmz-ui-popover__close:hover {
149
+ background: var(--vmz-surface-mist);
150
+ color: var(--vmz-text-ink);
151
+ }
152
+
153
+ .vmz-ui-popover__close:focus-visible {
154
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
155
+ }
156
+
157
+ .vmz-ui-popover__body {
158
+ margin-top: 4px;
159
+ font-size: 14px;
160
+ line-height: 22px;
161
+ color: var(--vmz-text-ink);
162
+ }
163
+
164
+ .vmz-ui-popover__header + .vmz-ui-popover__body {
165
+ margin-top: 8px;
166
+ }
167
+
168
+ .vmz-ui-popover__body :where(a) {
169
+ color: var(--vmz-action-primary-background);
170
+ text-underline-offset: 2px;
171
+ }
172
+
173
+ .vmz-ui-popover__body :where(a):hover {
174
+ background: var(--vmz-action-primary-background);
175
+ color: var(--vmz-action-primary-foreground);
176
+ }
177
+
178
+ .vmz-ui-popover__body :where(a):active {
179
+ background: var(--vmz-action-primary-active);
180
+ }
181
+
182
+ .vmz-ui-popover__actions {
183
+ display: flex;
184
+ flex-wrap: wrap;
185
+ align-items: center;
186
+ justify-content: flex-end;
187
+ gap: 8px;
188
+ margin-top: 12px;
189
+ }
190
+
191
+ .vmz-ui-popover__actions:empty {
192
+ display: none;
193
+ }
194
+
195
+ .vmz-ui-popover__actions :where(button, a) {
196
+ min-height: var(--vmz-control-height, 32px);
197
+ }
198
+
199
+ @keyframes vmz-ui-popover-in {
200
+ from {
201
+ opacity: 0;
202
+ transform: translateX(-50%) translateY(-6px) scale(0.98);
203
+ }
204
+ to {
205
+ opacity: 1;
206
+ transform: translateX(-50%) translateY(0) scale(1);
207
+ }
208
+ }
209
+
210
+ @media (prefers-reduced-motion: reduce) {
211
+ .vmz-ui-popover__panel,
212
+ .vmz-ui-popover__close {
213
+ animation: none;
214
+ transition: none;
215
+ }
216
+ }
217
+ </style>
218
+ <script client>
219
+ /**
220
+ * VMZ UI — Popover (UI2).
221
+ * Non-modal disclosure: Escape + outside dismiss + focus enter/restore.
222
+ * Parent owns live `open`. `stackLevel` raises z-index; Escape dismisses only
223
+ * the topmost stacked overlay.
224
+ *
225
+ * Appearance props: `title`, `description`. Visible copy is author-supplied;
226
+ * `closeLabel` / `dismissLabel` only name the icon button and backdrop.
227
+ */
228
+ export default class Popover {
229
+ public open: boolean = false;
230
+ public title: string = "";
231
+ public description: string = "";
232
+ public closeLabel: string = "";
233
+ public dismissLabel: string = "";
234
+ public titleId: string = "vmz-popover-title";
235
+ public stackLevel: string = "0";
236
+ public onClose: (() => void) | null = null;
237
+ _restoreFocus = null;
238
+ _panel = null;
239
+ _docKeyHandler = null;
240
+ _observer = null;
241
+ async onMount() {
242
+ if (typeof document === "undefined" || typeof MutationObserver === "undefined") return;
243
+ const root = this.__vmzDomRoot;
244
+ if (!root || typeof root.querySelector !== "function") return;
245
+ this._observer = new MutationObserver(() => this._syncFromDom());
246
+ this._observer.observe(root, {
247
+ childList: true,
248
+ subtree: true,
249
+ });
250
+ this._syncFromDom();
251
+ }
252
+ onDestroy() {
253
+ if (this._observer) {
254
+ this._observer.disconnect();
255
+ this._observer = null;
256
+ }
257
+ this._teardownDocKey();
258
+ this._panel = null;
259
+ this._restoreFocus = null;
260
+ }
261
+ dismiss() {
262
+ this.emit("close");
263
+ if (typeof this.onClose === "function") this.onClose();
264
+ }
265
+ _isTopmostStack() {
266
+ if (typeof document === "undefined") return true;
267
+ const root = this.__vmzDomRoot;
268
+ const mine =
269
+ root && typeof root.querySelector === "function"
270
+ ? root.querySelector("[data-vmz-overlay][data-vmz-overlay-stack]")
271
+ : null;
272
+ const myStack = Number(
273
+ mine?.getAttribute("data-vmz-overlay-stack") || this.stackLevel || "0",
274
+ );
275
+ const open = document.querySelectorAll("[data-vmz-overlay][data-vmz-overlay-stack]");
276
+ let max = -Infinity;
277
+ for (const el of open) {
278
+ const n = Number(el.getAttribute("data-vmz-overlay-stack") || "0");
279
+ if (Number.isFinite(n) && n > max) max = n;
280
+ }
281
+ if (!Number.isFinite(max)) return true;
282
+ return (Number.isFinite(myStack) ? myStack : 0) >= max;
283
+ }
284
+ onPanelKeyDown(ev) {
285
+ if (!ev || ev.key !== "Escape") return;
286
+ if (!this._isTopmostStack()) return;
287
+ ev.preventDefault();
288
+ ev.stopPropagation();
289
+ this.dismiss();
290
+ }
291
+ _syncFromDom() {
292
+ const root = this.__vmzDomRoot;
293
+ const panel =
294
+ root && typeof root.querySelector === "function"
295
+ ? root.querySelector('[data-vmz-overlay="popover"] [data-vmz-focus="enter"]')
296
+ : null;
297
+ if (panel && !this._panel) this._enterFocus(panel);
298
+ else if (!panel && this._panel) this._exitFocus();
299
+ }
300
+ _enterFocus(panel) {
301
+ if (typeof document === "undefined") return;
302
+ const active = document.activeElement;
303
+ if (!this._restoreFocus) {
304
+ const root = this.__vmzDomRoot;
305
+ const outside =
306
+ active instanceof HTMLElement &&
307
+ active !== document.body &&
308
+ !(root && typeof root.contains === "function" && root.contains(active));
309
+ if (outside) this._restoreFocus = active;
310
+ }
311
+ this._panel = panel instanceof HTMLElement ? panel : null;
312
+ if (this._panel && typeof this._panel.focus === "function") this._panel.focus();
313
+ if (!this._docKeyHandler) {
314
+ this._docKeyHandler = (ev) => {
315
+ if (ev.key !== "Escape") return;
316
+ if (ev.defaultPrevented) return;
317
+ if (!this._isTopmostStack()) return;
318
+ ev.preventDefault();
319
+ ev.stopPropagation();
320
+ this.dismiss();
321
+ };
322
+ document.addEventListener("keydown", this._docKeyHandler);
323
+ }
324
+ }
325
+ _exitFocus() {
326
+ this._teardownDocKey();
327
+ this._panel = null;
328
+ const restore = this._restoreFocus;
329
+ this._restoreFocus = null;
330
+ if (restore && typeof restore.focus === "function" && document.contains(restore)) {
331
+ restore.focus();
332
+ }
333
+ }
334
+ _teardownDocKey() {
335
+ if (typeof document !== "undefined" && this._docKeyHandler) {
336
+ document.removeEventListener("keydown", this._docKeyHandler);
337
+ }
338
+ this._docKeyHandler = null;
339
+ }
340
+ }
341
+ </script>
@@ -13,27 +13,38 @@
13
13
  .vmz-ui-progress {
14
14
  display: flex;
15
15
  align-items: center;
16
- gap: 0.75rem;
16
+ gap: var(--vmz-space-3);
17
17
  width: 100%;
18
18
  }
19
+
19
20
  .vmz-ui-progress__track {
20
- height: 0.5rem;
21
+ height: var(--vmz-space-2);
21
22
  flex: 1;
22
23
  overflow: hidden;
23
- border-radius: 999px;
24
+ border-radius: var(--vmz-radius-pill);
24
25
  background: var(--vmz-surface-mist);
25
26
  }
27
+
26
28
  .vmz-ui-progress__track span {
27
29
  display: block;
28
30
  height: 100%;
29
31
  border-radius: inherit;
30
32
  background: var(--vmz-action-primary-background);
31
- transition: width var(--vmz-motion-control-duration, 0.16s);
33
+ transition: width var(--vmz-motion-control-duration) var(--vmz-motion-control-easing);
32
34
  }
35
+
33
36
  .vmz-ui-progress__text {
34
- min-width: 2.5rem;
37
+ min-width: var(--vmz-space-7);
35
38
  color: var(--vmz-text-steel);
36
39
  font-size: 0.875rem;
40
+ font-variant-numeric: tabular-nums;
41
+ line-height: 1.5715;
42
+ }
43
+
44
+ @media (prefers-reduced-motion: reduce) {
45
+ .vmz-ui-progress__track span {
46
+ transition: none;
47
+ }
37
48
  }
38
49
  </style>
39
50
  <script client>