@vmz/ui 0.3.5 → 0.3.7
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 +2 -2
- package/presets/web-surface.v0.json +19 -7
- package/src/components/Accordion.vmz +2 -2
- package/src/components/AppShell.vmz +79 -32
- package/src/components/Autocomplete.vmz +3 -3
- package/src/components/Badge.vmz +1 -1
- package/src/components/Breadcrumb.vmz +3 -3
- package/src/components/BulkActions.vmz +2 -2
- package/src/components/Button.vmz +38 -17
- package/src/components/Callout.vmz +1 -1
- package/src/components/Card.vmz +19 -5
- package/src/components/Checkbox.vmz +2 -2
- package/src/components/CodeBlock.vmz +93 -19
- package/src/components/ConsoleShell.vmz +21 -21
- package/src/components/DataTable.vmz +4 -4
- package/src/components/DatePicker.vmz +9 -9
- package/src/components/Dialog.vmz +26 -7
- package/src/components/Drawer.vmz +3 -3
- package/src/components/Dropdown.vmz +181 -16
- package/src/components/Empty.vmz +1 -1
- package/src/components/Field.vmz +4 -4
- package/src/components/FormItem.vmz +1 -1
- package/src/components/Link.vmz +38 -4
- package/src/components/List.vmz +2 -2
- package/src/components/Menu.vmz +4 -4
- package/src/components/Pagination.vmz +7 -5
- package/src/components/Popover.vmz +3 -3
- package/src/components/Prose.vmz +1 -1
- package/src/components/RadioGroup.vmz +4 -4
- package/src/components/Segmented.vmz +1 -1
- package/src/components/Select.vmz +12 -12
- package/src/components/Steps.vmz +1 -1
- package/src/components/Switch.vmz +2 -2
- package/src/components/Table.vmz +45 -13
- package/src/components/Tabs.vmz +3 -3
- package/src/components/Tag.vmz +5 -2
- package/src/components/TextArea.vmz +4 -4
- package/src/components/Timeline.vmz +2 -2
- package/src/components/Toc.vmz +3 -3
- package/src/components/Tooltip.vmz +4 -4
- package/src/components/Tree.vmz +4 -4
- package/src/components/Upload.vmz +23 -13
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<details data-vmz-ui="dropdown" class="vmz-ui-dropdown">
|
|
3
|
-
<summary data-vmz-dropdown-trigger="1">
|
|
2
|
+
<details data-vmz-ui="dropdown" data-vmz-motion="overlay" data-vmz-motion-token="motion.overlay" class="vmz-ui-dropdown">
|
|
3
|
+
<summary data-vmz-dropdown-trigger="1" class="vmz-ui-dropdown__trigger">
|
|
4
4
|
{{ label }}
|
|
5
5
|
</summary>
|
|
6
|
-
<div data-vmz-dropdown-menu="1" class="vmz-ui-dropdown__menu">
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<div data-vmz-dropdown-menu="1" role="menu" class="vmz-ui-dropdown__menu">
|
|
7
|
+
<div v-for="item in items" :key="item.id" class="vmz-ui-dropdown__row">
|
|
8
|
+
<div v-if="item.divider" role="separator" class="vmz-ui-dropdown__divider" />
|
|
9
|
+
<a v-else-if="hasHref(item)" :href="item.href" role="menuitem" :data-vmz-dropdown-item="item.id" :data-danger="item.danger ? 'true' : 'false'" :data-disabled="item.disabled ? 'true' : 'false'" :aria-disabled="item.disabled ? 'true' : null" :tabindex="item.disabled ? -1 : null" class="vmz-ui-dropdown__item">
|
|
10
|
+
{{ item.title }}
|
|
11
|
+
</a>
|
|
12
|
+
<button v-else type="button" role="menuitem" :data-vmz-dropdown-item="item.id" :data-danger="item.danger ? 'true' : 'false'" :data-disabled="item.disabled ? 'true' : 'false'" :aria-disabled="item.disabled ? 'true' : null" :tabindex="item.disabled ? -1 : null" @click="onItemClick" class="vmz-ui-dropdown__item">
|
|
13
|
+
{{ item.title }}
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
10
16
|
</div>
|
|
11
17
|
</details>
|
|
12
18
|
</template>
|
|
@@ -15,47 +21,206 @@
|
|
|
15
21
|
position: relative;
|
|
16
22
|
display: inline-block;
|
|
17
23
|
}
|
|
18
|
-
|
|
24
|
+
|
|
25
|
+
.vmz-ui-dropdown__trigger {
|
|
19
26
|
list-style: none;
|
|
20
27
|
min-height: 2.5rem;
|
|
21
28
|
display: inline-flex;
|
|
22
29
|
align-items: center;
|
|
23
|
-
|
|
30
|
+
gap: 0.375rem;
|
|
31
|
+
padding: 0 0.9375rem;
|
|
24
32
|
border: 1px solid var(--vmz-line-default);
|
|
25
33
|
border-radius: var(--vmz-radius-md, 6px);
|
|
26
34
|
background: var(--vmz-surface-paper);
|
|
35
|
+
color: var(--vmz-text-ink);
|
|
27
36
|
cursor: pointer;
|
|
28
37
|
font-weight: 550;
|
|
38
|
+
outline: none;
|
|
39
|
+
transition:
|
|
40
|
+
border-color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
41
|
+
background-color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
42
|
+
box-shadow var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Chevron: affordance that the trigger opens a surface, not a page. */
|
|
46
|
+
.vmz-ui-dropdown__trigger::after {
|
|
47
|
+
content: "";
|
|
48
|
+
width: 0.4375rem;
|
|
49
|
+
height: 0.4375rem;
|
|
50
|
+
margin-top: -0.1875rem;
|
|
51
|
+
border-right: 1.5px solid currentColor;
|
|
52
|
+
border-bottom: 1.5px solid currentColor;
|
|
53
|
+
opacity: 0.55;
|
|
54
|
+
transform: rotate(45deg);
|
|
55
|
+
transition: transform var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
29
56
|
}
|
|
57
|
+
|
|
30
58
|
.vmz-ui-dropdown summary::-webkit-details-marker {
|
|
31
59
|
display: none;
|
|
32
60
|
}
|
|
61
|
+
|
|
62
|
+
.vmz-ui-dropdown__trigger:hover {
|
|
63
|
+
border-color: var(--vmz-action-primary-hover);
|
|
64
|
+
background: var(--vmz-surface-mist);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.vmz-ui-dropdown__trigger:focus-visible {
|
|
68
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.vmz-ui-dropdown[open] > .vmz-ui-dropdown__trigger {
|
|
72
|
+
border-color: var(--vmz-action-primary-background);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vmz-ui-dropdown[open] > .vmz-ui-dropdown__trigger::after {
|
|
76
|
+
margin-top: 0.125rem;
|
|
77
|
+
transform: rotate(-135deg);
|
|
78
|
+
}
|
|
79
|
+
|
|
33
80
|
.vmz-ui-dropdown__menu {
|
|
34
81
|
position: absolute;
|
|
35
|
-
top: calc(100% + 0.
|
|
82
|
+
top: calc(100% + 0.375rem);
|
|
36
83
|
right: 0;
|
|
37
84
|
z-index: 50;
|
|
38
85
|
min-width: 11rem;
|
|
39
|
-
padding: 0.
|
|
40
|
-
border: 1px solid var(--vmz-line-default);
|
|
86
|
+
padding: 0.25rem;
|
|
87
|
+
border: 1px solid var(--vmz-line-subtle, var(--vmz-line-default));
|
|
41
88
|
border-radius: var(--vmz-radius-lg, 8px);
|
|
42
89
|
background: var(--vmz-surface-paper);
|
|
43
90
|
box-shadow: var(--vmz-shadow-popup);
|
|
91
|
+
transform-origin: top right;
|
|
92
|
+
animation: vmz-dropdown-in var(--vmz-motion-overlay-duration, 180ms) var(--vmz-motion-overlay-easing, cubic-bezier(0.2, 0, 0, 1));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@keyframes vmz-dropdown-in {
|
|
96
|
+
from {
|
|
97
|
+
opacity: 0;
|
|
98
|
+
transform: translateY(-0.25rem) scale(0.98);
|
|
99
|
+
}
|
|
100
|
+
to {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
transform: translateY(0) scale(1);
|
|
103
|
+
}
|
|
44
104
|
}
|
|
45
|
-
|
|
105
|
+
|
|
106
|
+
@media (prefers-reduced-motion: reduce) {
|
|
107
|
+
.vmz-ui-dropdown__menu {
|
|
108
|
+
animation: none;
|
|
109
|
+
}
|
|
110
|
+
.vmz-ui-dropdown__trigger,
|
|
111
|
+
.vmz-ui-dropdown__trigger::after {
|
|
112
|
+
transition: none;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.vmz-ui-dropdown__row {
|
|
117
|
+
display: contents;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.vmz-ui-dropdown__item {
|
|
46
121
|
display: block;
|
|
47
|
-
|
|
48
|
-
|
|
122
|
+
width: 100%;
|
|
123
|
+
padding: 0.5rem 0.75rem;
|
|
124
|
+
border: 0;
|
|
125
|
+
border-radius: var(--vmz-radius-sm, 4px);
|
|
126
|
+
background: transparent;
|
|
49
127
|
color: var(--vmz-text-ink);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
font: inherit;
|
|
130
|
+
font-size: 0.875rem;
|
|
131
|
+
line-height: 1.4286;
|
|
132
|
+
text-align: left;
|
|
50
133
|
text-decoration: none;
|
|
134
|
+
outline: none;
|
|
135
|
+
transition:
|
|
136
|
+
background-color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
137
|
+
color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.vmz-ui-dropdown__item:hover {
|
|
141
|
+
background: var(--vmz-surface-mist);
|
|
51
142
|
}
|
|
52
|
-
|
|
143
|
+
|
|
144
|
+
.vmz-ui-dropdown__item:focus-visible {
|
|
53
145
|
background: var(--vmz-surface-mist);
|
|
146
|
+
box-shadow: inset 0 0 0 3px var(--vmz-focus-ring);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.vmz-ui-dropdown__item[data-danger="true"] {
|
|
150
|
+
color: var(--vmz-status-danger-foreground);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.vmz-ui-dropdown__item[data-danger="true"]:hover {
|
|
154
|
+
background: color-mix(in srgb, var(--vmz-status-danger-accent) 12%, transparent);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.vmz-ui-dropdown__item[data-disabled="true"] {
|
|
158
|
+
color: var(--vmz-text-steel);
|
|
159
|
+
cursor: not-allowed;
|
|
160
|
+
pointer-events: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.vmz-ui-dropdown__divider {
|
|
164
|
+
height: 1px;
|
|
165
|
+
margin: 0.25rem 0.5rem;
|
|
166
|
+
background: var(--vmz-line-subtle, var(--vmz-line-default));
|
|
54
167
|
}
|
|
55
168
|
</style>
|
|
56
169
|
<script client>
|
|
170
|
+
/**
|
|
171
|
+
* VMZ UI — Dropdown (Menu).
|
|
172
|
+
* Native `<details>` disclosure: works without JS. An item with a non-empty
|
|
173
|
+
* `href` is a plain link; an item without `href` is an action button that
|
|
174
|
+
* notifies via `onSelect(id)`. Selection handlers never navigate.
|
|
175
|
+
*/
|
|
176
|
+
export type DropdownItem = {
|
|
177
|
+
id: string;
|
|
178
|
+
title: string;
|
|
179
|
+
/** Non-empty → link item (native navigation). Empty/absent → action item. */
|
|
180
|
+
href?: string;
|
|
181
|
+
/** Destructive action styling. */
|
|
182
|
+
danger?: boolean;
|
|
183
|
+
/** Non-interactive state: neither navigates nor selects. */
|
|
184
|
+
disabled?: boolean;
|
|
185
|
+
/** Render a separator instead of a row (title/href are ignored). */
|
|
186
|
+
divider?: boolean;
|
|
187
|
+
};
|
|
188
|
+
|
|
57
189
|
export default class Dropdown {
|
|
58
190
|
public label: string = "Menu";
|
|
59
|
-
public items:
|
|
191
|
+
public items: DropdownItem[] = [];
|
|
192
|
+
/** Action-item selection callback (`:on-select`). Link items bypass it. */
|
|
193
|
+
public onSelect: ((id: string) => void) | null = null;
|
|
194
|
+
|
|
195
|
+
hasHref(item) {
|
|
196
|
+
return typeof item?.href === "string" && item.href.length > 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
onItemClick(ev) {
|
|
200
|
+
const el = ev && ev.currentTarget;
|
|
201
|
+
const id =
|
|
202
|
+
el && typeof el.getAttribute === "function"
|
|
203
|
+
? el.getAttribute("data-vmz-dropdown-item")
|
|
204
|
+
: null;
|
|
205
|
+
if (!id) return;
|
|
206
|
+
const item = this.items.find((candidate) => candidate.id === id);
|
|
207
|
+
if (!item || item.disabled || this.hasHref(item)) return;
|
|
208
|
+
this.close();
|
|
209
|
+
if (typeof this.onSelect === "function") this.onSelect(id);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
close() {
|
|
213
|
+
const root = this.__vmzDomRoot;
|
|
214
|
+
if (!root) return;
|
|
215
|
+
const details =
|
|
216
|
+
root.tagName === "DETAILS"
|
|
217
|
+
? root
|
|
218
|
+
: typeof root.closest === "function"
|
|
219
|
+
? root.closest("details")
|
|
220
|
+
: null;
|
|
221
|
+
if (details && typeof details.removeAttribute === "function") {
|
|
222
|
+
details.removeAttribute("open");
|
|
223
|
+
}
|
|
224
|
+
}
|
|
60
225
|
}
|
|
61
226
|
</script>
|
package/src/components/Empty.vmz
CHANGED
package/src/components/Field.vmz
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
.vmz-ui-field {
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
|
-
gap: 0.
|
|
19
|
+
gap: 0.375rem;
|
|
20
20
|
max-width: 28rem;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
outline: none;
|
|
44
44
|
transition:
|
|
45
45
|
border-color var(--vmz-motion-control-duration, 120ms)
|
|
46
|
-
var(--vmz-motion-control-easing,
|
|
46
|
+
var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
47
47
|
box-shadow var(--vmz-motion-control-duration, 120ms)
|
|
48
|
-
var(--vmz-motion-control-easing,
|
|
48
|
+
var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.vmz-ui-field__control::placeholder {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
.vmz-ui-field__control:focus-visible {
|
|
65
65
|
border-color: var(--vmz-action-primary-background);
|
|
66
|
-
box-shadow: 0 0 0
|
|
66
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.vmz-ui-field__control:disabled {
|
package/src/components/Link.vmz
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a data-vmz-ui="link" :href="href" :target="target" :rel="rel" class="vmz-ui-link">
|
|
2
|
+
<a data-vmz-ui="link" :data-variant="variant" :href="href" :target="target" :rel="rel" class="vmz-ui-link">
|
|
3
3
|
<slot />
|
|
4
4
|
</a>
|
|
5
5
|
</template>
|
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
font-weight: 600;
|
|
10
10
|
color: var(--vmz-action-primary-background);
|
|
11
11
|
text-decoration: underline;
|
|
12
|
-
text-underline-offset: 0.
|
|
12
|
+
text-underline-offset: 0.2em;
|
|
13
13
|
text-decoration-thickness: 1px;
|
|
14
|
+
text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
|
|
14
15
|
outline: none;
|
|
16
|
+
border-radius: var(--vmz-radius-sm, 4px);
|
|
17
|
+
transition:
|
|
18
|
+
color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
19
|
+
text-decoration-color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
.vmz-ui-link:hover {
|
|
18
23
|
color: var(--vmz-action-primary-hover);
|
|
24
|
+
text-decoration-color: currentColor;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
.vmz-ui-link:active {
|
|
@@ -23,8 +29,30 @@
|
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
.vmz-ui-link:focus-visible {
|
|
26
|
-
box-shadow: 0 0 0
|
|
27
|
-
|
|
32
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Quiet inline link: neutral ink, underline appears only on intent. */
|
|
36
|
+
.vmz-ui-link[data-variant="muted"] {
|
|
37
|
+
color: var(--vmz-text-steel);
|
|
38
|
+
text-decoration-color: transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.vmz-ui-link[data-variant="muted"]:hover {
|
|
42
|
+
color: var(--vmz-action-primary-background);
|
|
43
|
+
text-decoration-color: currentColor;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Navigation link: chrome, not prose — underline is the hover affordance. */
|
|
47
|
+
.vmz-ui-link[data-variant="nav"] {
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
text-decoration-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.vmz-ui-link[data-variant="nav"]:hover {
|
|
54
|
+
text-decoration: underline;
|
|
55
|
+
text-decoration-color: currentColor;
|
|
28
56
|
}
|
|
29
57
|
</style>
|
|
30
58
|
<script client>
|
|
@@ -37,5 +65,11 @@ export default class Link {
|
|
|
37
65
|
public href: string = "#";
|
|
38
66
|
public target: string = "";
|
|
39
67
|
public rel: string = "";
|
|
68
|
+
/**
|
|
69
|
+
* `default` inline prose link · `muted` quiet inline link · `nav` chrome link.
|
|
70
|
+
* Appearance/semantic hint only: navigation, `href`, `target` and `rel` are
|
|
71
|
+
* unaffected, and unknown values render as `default` without error.
|
|
72
|
+
*/
|
|
73
|
+
public variant: string = "default";
|
|
40
74
|
}
|
|
41
75
|
</script>
|
package/src/components/List.vmz
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
.vmz-ui-list {
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: column;
|
|
17
|
-
gap: 0.
|
|
17
|
+
gap: 0.375rem;
|
|
18
18
|
max-width: 28rem;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.vmz-ui-list__item:focus-visible {
|
|
58
|
-
box-shadow: 0 0 0
|
|
58
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
59
59
|
}
|
|
60
60
|
</style>
|
|
61
61
|
<script client>
|
package/src/components/Menu.vmz
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.vmz-ui-menu__trigger:focus-visible {
|
|
39
|
-
box-shadow: 0 0 0
|
|
39
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.vmz-ui-menu__panel {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.vmz-ui-menu__panel:focus-visible {
|
|
58
|
-
box-shadow: 0 0 0
|
|
58
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.vmz-ui-menu__item {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
width: 100%;
|
|
64
64
|
text-align: left;
|
|
65
65
|
font: inherit;
|
|
66
|
-
padding: 0.
|
|
66
|
+
padding: 0.375rem 0.625rem;
|
|
67
67
|
border: 0;
|
|
68
68
|
border-radius: var(--vmz-radius-md, 6px);
|
|
69
69
|
background: transparent;
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.vmz-ui-menu__item:focus-visible {
|
|
81
|
-
box-shadow: 0 0 0
|
|
81
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
82
82
|
}
|
|
83
83
|
</style>
|
|
84
84
|
<script client>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav data-vmz-ui="pagination" :aria-label="label" class="vmz-ui-pagination">
|
|
3
3
|
<button type="button" :disabled="prevDisabled" @click="onPrevClick" class="vmz-ui-pagination__btn">
|
|
4
|
-
|
|
4
|
+
{{ prevLabel }}
|
|
5
5
|
</button>
|
|
6
6
|
<p data-vmz-fixture="page-status" class="vmz-ui-pagination__status">
|
|
7
7
|
{{ status }}
|
|
8
8
|
</p>
|
|
9
9
|
<button type="button" :disabled="nextDisabled" @click="onNextClick" class="vmz-ui-pagination__btn">
|
|
10
|
-
|
|
10
|
+
{{ nextLabel }}
|
|
11
11
|
</button>
|
|
12
12
|
</nav>
|
|
13
13
|
</template>
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-wrap: wrap;
|
|
18
18
|
align-items: center;
|
|
19
|
-
gap: 0.
|
|
19
|
+
gap: 0.625rem 1rem;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.vmz-ui-pagination__btn {
|
|
23
23
|
font: inherit;
|
|
24
24
|
font-weight: 600;
|
|
25
|
-
padding: 0.
|
|
25
|
+
padding: 0.375rem 0.7rem;
|
|
26
26
|
border: 1px solid var(--vmz-line-default);
|
|
27
27
|
border-radius: var(--vmz-radius-md, 6px);
|
|
28
28
|
background: transparent;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.vmz-ui-pagination__btn:focus-visible {
|
|
35
|
-
box-shadow: 0 0 0
|
|
35
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.vmz-ui-pagination__btn:disabled {
|
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
*/
|
|
53
53
|
export default class Pagination {
|
|
54
54
|
public label: string = "Pagination";
|
|
55
|
+
public prevLabel: string = "Previous";
|
|
56
|
+
public nextLabel: string = "Next";
|
|
55
57
|
public status: string = "Page 1 / 1";
|
|
56
58
|
public prevDisabled: boolean = true;
|
|
57
59
|
public nextDisabled: boolean = true;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.vmz-ui-popover__panel:focus-visible {
|
|
75
|
-
box-shadow: 0 0 0
|
|
75
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.vmz-ui-popover__title {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
.vmz-ui-popover__close {
|
|
88
88
|
font: inherit;
|
|
89
89
|
font-weight: 600;
|
|
90
|
-
padding: 0.
|
|
90
|
+
padding: 0.375rem 0.7rem;
|
|
91
91
|
border: 1px solid transparent;
|
|
92
92
|
border-radius: var(--vmz-radius-md, 6px);
|
|
93
93
|
cursor: pointer;
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.vmz-ui-popover__close:focus-visible {
|
|
99
|
-
box-shadow: 0 0 0
|
|
99
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
100
100
|
}
|
|
101
101
|
</style>
|
|
102
102
|
<script client>
|
package/src/components/Prose.vmz
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
.vmz-ui-radio-group {
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: column;
|
|
26
|
-
gap: 0.
|
|
26
|
+
gap: 0.5rem;
|
|
27
27
|
max-width: 28rem;
|
|
28
28
|
margin: 0;
|
|
29
29
|
padding: 0;
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
.vmz-ui-radio-group__list {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
|
-
gap: 0.
|
|
43
|
+
gap: 0.375rem;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.vmz-ui-radio-group__option {
|
|
47
47
|
display: inline-flex;
|
|
48
48
|
align-items: center;
|
|
49
|
-
gap: 0.
|
|
49
|
+
gap: 0.5rem;
|
|
50
50
|
font: inherit;
|
|
51
51
|
cursor: pointer;
|
|
52
52
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.vmz-ui-radio-group__input:focus-visible {
|
|
62
|
-
box-shadow: 0 0 0
|
|
62
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.vmz-ui-radio-group__input:disabled {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
position: relative;
|
|
43
43
|
display: flex;
|
|
44
44
|
flex-direction: column;
|
|
45
|
-
gap: 0.
|
|
45
|
+
gap: 0.375rem;
|
|
46
46
|
max-width: 28rem;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
display: inline-flex;
|
|
57
57
|
align-items: center;
|
|
58
58
|
justify-content: space-between;
|
|
59
|
-
gap: 0.
|
|
59
|
+
gap: 0.5rem;
|
|
60
60
|
width: 100%;
|
|
61
61
|
min-height: var(--vmz-control-height, 2rem);
|
|
62
62
|
box-sizing: border-box;
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
cursor: pointer;
|
|
73
73
|
transition:
|
|
74
74
|
border-color var(--vmz-motion-control-duration, 120ms)
|
|
75
|
-
var(--vmz-motion-control-easing,
|
|
75
|
+
var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
76
76
|
box-shadow var(--vmz-motion-control-duration, 120ms)
|
|
77
|
-
var(--vmz-motion-control-easing,
|
|
77
|
+
var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.vmz-ui-select[data-invalid="true"] .vmz-ui-select__control {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
.vmz-ui-select__control:focus-visible,
|
|
89
89
|
.vmz-ui-select.is-opened .vmz-ui-select__control {
|
|
90
90
|
border-color: var(--vmz-action-primary-background);
|
|
91
|
-
box-shadow: 0 0 0
|
|
91
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.vmz-ui-select__control:disabled {
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.vmz-ui-select__search {
|
|
142
|
-
padding: 0.
|
|
142
|
+
padding: 0.375rem 0.5rem 0.125rem;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.vmz-ui-select__search-input {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
box-sizing: border-box;
|
|
148
148
|
font: inherit;
|
|
149
149
|
font-size: 0.875rem;
|
|
150
|
-
padding: 0.25rem 0.
|
|
150
|
+
padding: 0.25rem 0.5rem;
|
|
151
151
|
border: 1px solid var(--vmz-line-default, #d9d9d9);
|
|
152
152
|
border-radius: var(--vmz-radius-md, 6px);
|
|
153
153
|
background: var(--vmz-surface-paper, #fff);
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
.vmz-ui-select__search-input:focus-visible {
|
|
159
|
-
box-shadow: 0 0 0
|
|
159
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.vmz-ui-select__list {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.vmz-ui-select__empty {
|
|
172
|
-
padding: 0.
|
|
172
|
+
padding: 0.5rem 0.625rem;
|
|
173
173
|
opacity: 0.7;
|
|
174
174
|
font-size: 0.92em;
|
|
175
175
|
}
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
box-sizing: border-box;
|
|
181
181
|
text-align: left;
|
|
182
182
|
font: inherit;
|
|
183
|
-
padding: 0.
|
|
183
|
+
padding: 0.375rem 0.625rem;
|
|
184
184
|
border: 0;
|
|
185
185
|
border-radius: var(--vmz-radius-md, 6px);
|
|
186
186
|
background: transparent;
|
|
@@ -202,14 +202,14 @@
|
|
|
202
202
|
.vmz-ui-select__footer {
|
|
203
203
|
display: flex;
|
|
204
204
|
justify-content: flex-end;
|
|
205
|
-
padding: 0.
|
|
205
|
+
padding: 0.375rem 0.5rem 0.5rem;
|
|
206
206
|
border-top: 1px solid var(--vmz-line-default, #d9dee3);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.vmz-ui-select__done {
|
|
210
210
|
font: inherit;
|
|
211
211
|
font-weight: 600;
|
|
212
|
-
padding: 0.
|
|
212
|
+
padding: 0.25rem 0.7rem;
|
|
213
213
|
border: 1px solid var(--vmz-line-default, #d9dee3);
|
|
214
214
|
border-radius: var(--vmz-radius-md, 6px);
|
|
215
215
|
background: var(--vmz-surface-paper, #fff);
|
package/src/components/Steps.vmz
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.vmz-ui-switch {
|
|
13
13
|
display: inline-flex;
|
|
14
14
|
align-items: center;
|
|
15
|
-
gap: 0.
|
|
15
|
+
gap: 0.5rem;
|
|
16
16
|
font: inherit;
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.vmz-ui-switch__control:focus-visible {
|
|
38
|
-
box-shadow: 0 0 0
|
|
38
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.vmz-ui-switch__control:disabled {
|