@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.
- package/README.md +53 -51
- package/contracts/token-requirements.v0.json +58 -1
- package/package.json +5 -2
- package/presets/web-surface.v0.json +14 -12
- package/src/components/Accordion.vmz +127 -94
- package/src/components/Alert.vmz +125 -28
- package/src/components/AppShell.vmz +125 -57
- package/src/components/Autocomplete.vmz +261 -154
- package/src/components/Avatar.vmz +20 -12
- package/src/components/Badge.vmz +62 -70
- package/src/components/Breadcrumb.vmz +86 -72
- package/src/components/BulkActions.vmz +56 -51
- package/src/components/Button.vmz +237 -211
- package/src/components/Callout.vmz +178 -77
- package/src/components/Card.vmz +141 -120
- package/src/components/Checkbox.vmz +131 -55
- package/src/components/CodeBlock.vmz +77 -30
- package/src/components/Collapse.vmz +64 -11
- package/src/components/ConsoleShell.vmz +405 -251
- package/src/components/Content.vmz +15 -1
- package/src/components/DataTable.vmz +294 -194
- package/src/components/DatePicker.vmz +766 -674
- package/src/components/Descriptions.vmz +90 -0
- package/src/components/Dialog.vmz +137 -38
- package/src/components/Divider.vmz +8 -1
- package/src/components/Drawer.vmz +518 -427
- package/src/components/Dropdown.vmz +195 -51
- package/src/components/Empty.vmz +96 -54
- package/src/components/Field.vmz +170 -115
- package/src/components/FilterBar.vmz +34 -4
- package/src/components/Flex.vmz +3 -1
- package/src/components/Footer.vmz +6 -3
- package/src/components/Form.vmz +41 -0
- package/src/components/FormItem.vmz +78 -79
- package/src/components/Grid.vmz +6 -3
- package/src/components/Header.vmz +193 -6
- package/src/components/Layout.vmz +3 -1
- package/src/components/Link.vmz +25 -10
- package/src/components/List.vmz +124 -102
- package/src/components/Menu.vmz +416 -243
- package/src/components/Message.vmz +167 -0
- package/src/components/Notification.vmz +132 -37
- package/src/components/Pagination.vmz +237 -69
- package/src/components/Popconfirm.vmz +287 -0
- package/src/components/Popover.vmz +341 -223
- package/src/components/Progress.vmz +16 -5
- package/src/components/Prose.vmz +180 -81
- package/src/components/QueryForm.vmz +31 -9
- package/src/components/RadioGroup.vmz +204 -124
- package/src/components/Result.vmz +60 -27
- package/src/components/Segmented.vmz +86 -51
- package/src/components/Select.vmz +620 -533
- package/src/components/Sider.vmz +120 -7
- package/src/components/Skeleton.vmz +9 -7
- package/src/components/Space.vmz +9 -3
- package/src/components/Spinner.vmz +5 -4
- package/src/components/Steps.vmz +118 -103
- package/src/components/Switch.vmz +131 -98
- package/src/components/Table.vmz +270 -165
- package/src/components/Tabs.vmz +125 -110
- package/src/components/Tag.vmz +60 -43
- package/src/components/TextArea.vmz +125 -118
- package/src/components/Timeline.vmz +111 -76
- package/src/components/Toc.vmz +90 -74
- package/src/components/Tooltip.vmz +107 -58
- package/src/components/Tree.vmz +214 -191
- package/src/components/Typography.vmz +23 -8
- package/src/components/Upload.vmz +1394 -1289
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section data-vmz-ui="result" :data-status="status" class="vmz-ui-result">
|
|
3
|
-
<
|
|
3
|
+
<span aria-hidden="true" class="vmz-ui-result__icon">
|
|
4
|
+
<Icon :name="statusIcon()" size="lg" decorative />
|
|
5
|
+
</span>
|
|
6
|
+
<p v-if="title" class="vmz-ui-result__title">
|
|
4
7
|
{{ title }}
|
|
5
8
|
</p>
|
|
6
9
|
<p v-if="description" class="vmz-ui-result__description">
|
|
@@ -15,68 +18,98 @@
|
|
|
15
18
|
.vmz-ui-result {
|
|
16
19
|
display: flex;
|
|
17
20
|
flex-direction: column;
|
|
18
|
-
align-items:
|
|
19
|
-
gap: var(--vmz-
|
|
20
|
-
padding:
|
|
21
|
-
border: 1px solid var(--vmz-
|
|
22
|
-
border-radius: var(--vmz-radius-
|
|
23
|
-
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--vmz-space-2, 0.5rem);
|
|
23
|
+
padding: var(--vmz-space-6, 2rem) var(--vmz-space-5, 1.5rem);
|
|
24
|
+
border: 1px solid var(--vmz-line-default, var(--vmz-line-strong));
|
|
25
|
+
border-radius: var(--vmz-radius-lg, 8px);
|
|
26
|
+
background: var(--vmz-surface-paper);
|
|
27
|
+
color: var(--vmz-text-ink);
|
|
28
|
+
text-align: center;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
.vmz-ui-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
.vmz-ui-result__icon {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
margin-bottom: var(--vmz-space-1, 0.25rem);
|
|
29
36
|
}
|
|
30
37
|
|
|
31
|
-
.vmz-ui-
|
|
32
|
-
|
|
33
|
-
color: var(--vmz-status-success-foreground);
|
|
38
|
+
.vmz-ui-result__icon .vmz-ui-icon[data-size] {
|
|
39
|
+
font-size: 2.5rem;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
|
-
.vmz-ui-result[data-status="
|
|
37
|
-
|
|
38
|
-
color: var(--vmz-status-warning-foreground);
|
|
42
|
+
.vmz-ui-result[data-status="info"] .vmz-ui-result__icon {
|
|
43
|
+
color: var(--vmz-status-info-accent);
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
.vmz-ui-result[data-status="
|
|
42
|
-
|
|
43
|
-
color: var(--vmz-status-danger-foreground);
|
|
46
|
+
.vmz-ui-result[data-status="success"] .vmz-ui-result__icon {
|
|
47
|
+
color: var(--vmz-status-success-accent);
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
.vmz-ui-result[data-status="warning"] .vmz-ui-result__icon {
|
|
51
|
+
color: var(--vmz-status-warning-accent);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.vmz-ui-result[data-status="danger"] .vmz-ui-result__icon,
|
|
55
|
+
.vmz-ui-result[data-status="error"] .vmz-ui-result__icon {
|
|
56
|
+
color: var(--vmz-status-danger-accent);
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
.vmz-ui-result__title {
|
|
52
60
|
margin: 0;
|
|
53
|
-
font-
|
|
54
|
-
font-
|
|
61
|
+
font-family: var(--vmz-font-sans, inherit);
|
|
62
|
+
font-size: 1.5rem;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
line-height: 1.32;
|
|
65
|
+
color: var(--vmz-text-ink);
|
|
55
66
|
}
|
|
56
67
|
|
|
57
68
|
.vmz-ui-result__description {
|
|
58
69
|
margin: 0;
|
|
59
|
-
|
|
70
|
+
max-width: 40rem;
|
|
71
|
+
font-size: 0.9375rem;
|
|
72
|
+
line-height: 1.55;
|
|
73
|
+
color: var(--vmz-text-tertiary);
|
|
60
74
|
}
|
|
61
75
|
|
|
62
76
|
.vmz-ui-result__actions {
|
|
63
77
|
display: flex;
|
|
64
78
|
flex-wrap: wrap;
|
|
65
|
-
|
|
79
|
+
justify-content: center;
|
|
80
|
+
gap: var(--vmz-space-3, 0.75rem);
|
|
81
|
+
margin-top: var(--vmz-space-2, 0.5rem);
|
|
66
82
|
}
|
|
67
83
|
|
|
68
84
|
.vmz-ui-result__actions:empty {
|
|
69
85
|
display: none;
|
|
70
86
|
}
|
|
87
|
+
|
|
88
|
+
:where([data-density="compact"]) .vmz-ui-result {
|
|
89
|
+
gap: var(--vmz-space-1, 0.25rem);
|
|
90
|
+
padding: var(--vmz-space-5, 1.5rem) var(--vmz-space-4, 1rem);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where([data-density="dense"]) .vmz-ui-result {
|
|
94
|
+
gap: var(--vmz-space-1, 0.25rem);
|
|
95
|
+
padding: var(--vmz-space-4, 1rem);
|
|
96
|
+
}
|
|
71
97
|
</style>
|
|
72
98
|
<script client>
|
|
73
99
|
/**
|
|
74
100
|
* VMZ UI — Result (UI4 Commercial Surface).
|
|
75
|
-
* Outcome block for success/error flows; status → status.* tokens.
|
|
101
|
+
* Outcome block for success/error flows; status → status.* accent tokens.
|
|
76
102
|
*/
|
|
77
103
|
export default class Result {
|
|
78
104
|
public title: string = "";
|
|
79
105
|
public description: string = "";
|
|
80
106
|
public status: string = "info";
|
|
107
|
+
|
|
108
|
+
statusIcon() {
|
|
109
|
+
const status = String(this.status || "").toLowerCase();
|
|
110
|
+
if (status === "success" || status === "warning") return `status.${status}`;
|
|
111
|
+
if (status === "danger" || status === "error") return "status.danger";
|
|
112
|
+
return "status.info";
|
|
113
|
+
}
|
|
81
114
|
}
|
|
82
115
|
</script>
|
|
@@ -1,51 +1,86 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div data-vmz-ui="segmented" role="group" :aria-label="label" class="vmz-ui-segmented">
|
|
3
|
-
<button v-for="opt in options" :key="opt.value" type="button" :data-vmz-segment="opt.value" :aria-pressed="opt.value === value ? 'true' : 'false'" @click="(() => onPick(opt.value))">
|
|
4
|
-
{{ opt.label }}
|
|
5
|
-
</button>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
<style>
|
|
9
|
-
.vmz-ui-segmented {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
padding:
|
|
13
|
-
border-radius: var(--vmz-radius-
|
|
14
|
-
background: var(--vmz-surface-mist);
|
|
15
|
-
overflow-x: auto;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
font
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div data-vmz-ui="segmented" role="group" :aria-label="label" :data-size="size" class="vmz-ui-segmented">
|
|
3
|
+
<button v-for="opt in options" :key="opt.value" type="button" :data-vmz-segment="opt.value" :aria-pressed="opt.value === value ? 'true' : 'false'" @click="(() => onPick(opt.value))">
|
|
4
|
+
{{ opt.label }}
|
|
5
|
+
</button>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<style>
|
|
9
|
+
.vmz-ui-segmented {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
padding: var(--vmz-space-1);
|
|
13
|
+
border-radius: var(--vmz-radius-lg);
|
|
14
|
+
background: var(--vmz-surface-mist);
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.vmz-ui-segmented button {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
min-height: var(--vmz-control-height);
|
|
21
|
+
padding: 0 var(--vmz-space-3);
|
|
22
|
+
border: 0;
|
|
23
|
+
border-radius: var(--vmz-radius-md);
|
|
24
|
+
background: transparent;
|
|
25
|
+
color: var(--vmz-text-steel);
|
|
26
|
+
font: inherit;
|
|
27
|
+
font-size: 0.875rem;
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
line-height: 1.5715;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
outline: none;
|
|
33
|
+
transition:
|
|
34
|
+
background-color var(--vmz-motion-control-duration) var(--vmz-motion-control-easing),
|
|
35
|
+
color var(--vmz-motion-control-duration) var(--vmz-motion-control-easing),
|
|
36
|
+
box-shadow var(--vmz-motion-control-duration) var(--vmz-motion-control-easing);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.vmz-ui-segmented[data-size="small"] button {
|
|
40
|
+
min-height: var(--vmz-control-height-sm);
|
|
41
|
+
padding: 0 var(--vmz-space-2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.vmz-ui-segmented[data-size="large"] button {
|
|
45
|
+
min-height: var(--vmz-control-height-lg);
|
|
46
|
+
padding: 0 var(--vmz-space-4);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.vmz-ui-segmented button:hover:not([aria-pressed="true"]) {
|
|
50
|
+
color: var(--vmz-text-ink);
|
|
51
|
+
background: var(--vmz-surface-fill);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.vmz-ui-segmented button[aria-pressed="true"] {
|
|
55
|
+
background: var(--vmz-surface-paper);
|
|
56
|
+
color: var(--vmz-text-ink);
|
|
57
|
+
box-shadow: 0 0 0 1px var(--vmz-line-default);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.vmz-ui-segmented button[aria-pressed="true"]:hover {
|
|
61
|
+
color: var(--vmz-text-ink);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.vmz-ui-segmented button:focus-visible {
|
|
65
|
+
box-shadow: 0 0 0 3px var(--vmz-focus-ring);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (prefers-reduced-motion: reduce) {
|
|
69
|
+
.vmz-ui-segmented button {
|
|
70
|
+
transition: none;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
74
|
+
<script client>
|
|
75
|
+
export default class Segmented {
|
|
76
|
+
public label: string = "";
|
|
77
|
+
public value: string = "";
|
|
78
|
+
public size: string = "middle";
|
|
79
|
+
public options: Array<{ value: string; label: string }> = [];
|
|
80
|
+
public onChange: ((value: string) => void) | null = null;
|
|
81
|
+
onPick(next: string) {
|
|
82
|
+
this.emit("change", next);
|
|
83
|
+
if (typeof this.onChange === "function") this.onChange(next);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|