@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,23 +1,136 @@
1
1
  <template>
2
- <aside data-vmz-ui="sider" class="vmz-ui-sider">
3
- <slot />
2
+ <aside data-vmz-ui="sider" :onKeyDown="onKeyDown" class="vmz-ui-sider">
3
+ <div class="vmz-ui-sider__head">
4
+ <button type="button" :aria-label="label" :aria-expanded="open ? 'true' : 'false'" :aria-controls="bodyId" @click="toggle" class="vmz-ui-sider__toggle">
5
+ <Icon :name="open ? 'action.close' : 'action.menu'" size="md" decorative />
6
+ </button>
7
+ </div>
8
+ <div :id="bodyId" :data-open="open ? 'true' : null" class="vmz-ui-sider__body">
9
+ <slot />
10
+ </div>
4
11
  </aside>
5
12
  </template>
6
13
  <style>
7
14
  .vmz-ui-sider {
8
- width: 16rem;
9
- padding: 1rem;
10
- border-right: 1px solid var(--vmz-line-default);
15
+ flex: none;
16
+ width: 13rem;
17
+ padding: var(--vmz-space-3, 0.75rem);
18
+ border-right: 1px solid var(--vmz-line-subtle);
11
19
  background: var(--vmz-surface-paper);
20
+ color: var(--vmz-text-ink);
21
+ overflow-y: auto;
22
+ }
23
+ .vmz-ui-sider__head {
24
+ display: none;
25
+ }
26
+ .vmz-ui-sider__body {
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: var(--vmz-space-1, 0.25rem);
30
+ min-width: 0;
31
+ }
32
+ .vmz-ui-sider__body :where(nav) {
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: var(--vmz-space-1, 0.25rem);
36
+ }
37
+ .vmz-ui-sider__body :where(nav a, .vmz-ui-sider__item) {
38
+ display: flex;
39
+ align-items: center;
40
+ min-height: 2.25rem;
41
+ padding: 0 var(--vmz-space-3, 0.75rem);
42
+ border-radius: var(--vmz-radius-md, 6px);
43
+ color: var(--vmz-text-steel);
44
+ font-size: 0.875rem;
45
+ font-weight: 500;
46
+ line-height: 1.25rem;
47
+ text-decoration: none;
48
+ outline: none;
49
+ transition:
50
+ color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
51
+ background-color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
52
+ }
53
+ .vmz-ui-sider__body :where(nav a, .vmz-ui-sider__item):hover {
54
+ color: var(--vmz-text-ink);
55
+ background: var(--vmz-surface-mist);
56
+ }
57
+ .vmz-ui-sider__body :where(nav a, .vmz-ui-sider__item)[data-active="true"],
58
+ .vmz-ui-sider__body :where(nav a, .vmz-ui-sider__item)[aria-current="page"] {
59
+ color: var(--vmz-action-primary-background);
60
+ background: var(--vmz-action-primary-soft);
61
+ font-weight: 600;
62
+ box-shadow: inset 2px 0 0 var(--vmz-action-primary-background);
63
+ }
64
+ .vmz-ui-sider__body :where(nav a, .vmz-ui-sider__item):focus-visible {
65
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
66
+ }
67
+ .vmz-ui-sider__group-title {
68
+ margin: var(--vmz-space-3, 0.75rem) 0 var(--vmz-space-1, 0.25rem);
69
+ padding: 0 var(--vmz-space-3, 0.75rem);
70
+ color: var(--vmz-text-tertiary);
71
+ font-size: 0.75rem;
72
+ font-weight: 600;
73
+ line-height: 1.25rem;
74
+ letter-spacing: 0.02em;
12
75
  }
13
76
  @media (max-width: 720px) {
14
77
  .vmz-ui-sider {
15
78
  width: 100%;
79
+ padding: var(--vmz-space-2, 0.5rem) var(--vmz-space-4, 1rem);
16
80
  border-right: 0;
17
- border-bottom: 1px solid var(--vmz-line-default);
81
+ border-bottom: 1px solid var(--vmz-line-subtle);
82
+ overflow-y: visible;
83
+ }
84
+ .vmz-ui-sider__head {
85
+ display: flex;
86
+ justify-content: flex-end;
87
+ }
88
+ .vmz-ui-sider__toggle {
89
+ display: inline-flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+ width: 2.5rem;
93
+ height: 2.5rem;
94
+ padding: 0;
95
+ border: 0;
96
+ border-radius: var(--vmz-radius-md, 6px);
97
+ background: transparent;
98
+ color: var(--vmz-text-ink);
99
+ cursor: pointer;
100
+ outline: none;
101
+ }
102
+ .vmz-ui-sider__toggle:hover {
103
+ background: var(--vmz-surface-mist);
104
+ }
105
+ .vmz-ui-sider__toggle:focus-visible {
106
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
107
+ }
108
+ .vmz-ui-sider__body {
109
+ display: none;
110
+ padding-top: var(--vmz-space-2, 0.5rem);
111
+ }
112
+ .vmz-ui-sider__body[data-open="true"] {
113
+ display: flex;
18
114
  }
19
115
  }
20
116
  </style>
21
117
  <script client>
22
- export default class Sider {}
118
+ /**
119
+ * VMZ UI — Sider (Navigation column).
120
+ * Parent supplies grouped links; item 36px / radius 6 / selected soft-blue rail.
121
+ * Below 720px the column collapses behind a 40x40 menu control.
122
+ */
123
+ export default class Sider {
124
+ public label: string = "";
125
+ public bodyId: string = "vmz-ui-sider-body";
126
+ open = true;
127
+
128
+ toggle() {
129
+ this.open = !this.open;
130
+ }
131
+
132
+ onKeyDown(e) {
133
+ if (e && e.key === "Escape") this.open = false;
134
+ }
135
+ }
23
136
  </script>
@@ -13,25 +13,26 @@
13
13
  display: flex;
14
14
  flex-direction: column;
15
15
  gap: var(--vmz-density-compact-gap);
16
- min-height: 4.5rem;
16
+ min-height: calc(var(--vmz-space-8) + var(--vmz-space-2));
17
17
  }
18
18
 
19
19
  .vmz-ui-skeleton__block,
20
20
  .vmz-ui-skeleton__line {
21
- border-radius: var(--vmz-radius-md, 6px);
22
- background: color-mix(in srgb, var(--vmz-action-primary-background) 18%, transparent);
23
- animation: vmz-ui-skeleton-pulse var(--vmz-motion-overlay-duration)
24
- var(--vmz-motion-overlay-easing) infinite alternate;
21
+ background: var(--vmz-surface-mist);
22
+ animation: vmz-ui-skeleton-pulse calc(var(--vmz-motion-control-duration) * 10)
23
+ var(--vmz-motion-control-easing) infinite alternate;
25
24
  }
26
25
 
27
26
  .vmz-ui-skeleton__block {
28
27
  width: 100%;
29
- height: 2.5rem;
28
+ height: var(--vmz-control-height-lg);
29
+ border-radius: var(--vmz-radius-lg);
30
30
  }
31
31
 
32
32
  .vmz-ui-skeleton__line {
33
33
  width: 72%;
34
- height: 0.75rem;
34
+ height: var(--vmz-space-3);
35
+ border-radius: var(--vmz-radius-sm);
35
36
  }
36
37
 
37
38
  .vmz-ui-skeleton__line + .vmz-ui-skeleton__line {
@@ -57,6 +58,7 @@
57
58
  .vmz-ui-skeleton__block,
58
59
  .vmz-ui-skeleton__line {
59
60
  animation: none;
61
+ opacity: 0.75;
60
62
  }
61
63
  }
62
64
  </style>
@@ -6,19 +6,25 @@
6
6
  <style>
7
7
  .vmz-ui-space {
8
8
  display: flex;
9
- gap: var(--vmz-density-control-gap, 0.75rem);
9
+ align-items: center;
10
+ gap: var(--vmz-space-3);
10
11
  }
12
+
11
13
  .vmz-ui-space[data-direction="vertical"] {
12
14
  flex-direction: column;
15
+ align-items: stretch;
13
16
  }
17
+
14
18
  .vmz-ui-space[data-wrap="true"] {
15
19
  flex-wrap: wrap;
16
20
  }
21
+
17
22
  .vmz-ui-space[data-size="small"] {
18
- gap: 0.5rem;
23
+ gap: var(--vmz-space-2);
19
24
  }
25
+
20
26
  .vmz-ui-space[data-size="large"] {
21
- gap: 1.5rem;
27
+ gap: var(--vmz-space-5);
22
28
  }
23
29
  </style>
24
30
  <script client>
@@ -4,13 +4,14 @@
4
4
  <style>
5
5
  .vmz-ui-spinner {
6
6
  display: inline-block;
7
+ box-sizing: border-box;
7
8
  width: 1rem;
8
9
  height: 1rem;
9
- border: 2px solid color-mix(in srgb, var(--vmz-action-primary-background) 25%, transparent);
10
+ border: 2px solid var(--vmz-action-primary-soft);
10
11
  border-top-color: var(--vmz-action-primary-background);
11
- border-radius: 50%;
12
+ border-radius: var(--vmz-radius-pill);
12
13
  vertical-align: -0.15em;
13
- animation: vmz-ui-spin var(--vmz-motion-overlay-duration) var(--vmz-motion-overlay-easing)
14
+ animation: vmz-ui-spin var(--vmz-motion-control-duration) var(--vmz-motion-control-easing)
14
15
  infinite;
15
16
  }
16
17
 
@@ -34,6 +35,6 @@
34
35
  * Loading indicator; reduced-motion keeps static feedback.
35
36
  */
36
37
  export default class Spinner {
37
- public label: string = "Loading";
38
+ public label: string = "";
38
39
  }
39
40
  </script>
@@ -1,103 +1,118 @@
1
- <template>
2
- <ol data-vmz-ui="steps" :aria-label="label" class="vmz-ui-steps">
3
- <li v-for="item in items" :key="item.id" :data-vmz-step="item.id" :data-status="item.status" :aria-current="current === item.id ? 'step' : 'false'" class="vmz-ui-steps__item">
4
- <span :data-vmz-step-index="item.id" class="vmz-ui-steps__index">
5
- {{ item.index }}
6
- </span>
7
- <span class="vmz-ui-steps__body">
8
- <span class="vmz-ui-steps__title">
9
- {{ item.title }}
10
- </span>
11
- <span v-if="item.description" class="vmz-ui-steps__description">
12
- {{ item.description }}
13
- </span>
14
- </span>
15
- </li>
16
- </ol>
17
- </template>
18
- <style>
19
- .vmz-ui-steps {
20
- margin: 0;
21
- padding: 0;
22
- list-style: none;
23
- display: flex;
24
- flex-direction: column;
25
- gap: var(--vmz-density-control-gap);
26
- max-width: 36rem;
27
- }
28
-
29
- .vmz-ui-steps__item {
30
- display: flex;
31
- align-items: flex-start;
32
- gap: 0.75rem;
33
- color: var(--vmz-text-steel);
34
- }
35
-
36
- .vmz-ui-steps__item[data-status="done"] {
37
- color: var(--vmz-status-success-foreground);
38
- }
39
-
40
- .vmz-ui-steps__item[data-status="current"] {
41
- color: var(--vmz-action-primary-active);
42
- }
43
-
44
- .vmz-ui-steps__index {
45
- flex: 0 0 auto;
46
- min-width: 1.75rem;
47
- height: 1.75rem;
48
- display: inline-flex;
49
- align-items: center;
50
- justify-content: center;
51
- border: 1px solid var(--vmz-line-default);
52
- border-radius: 999px;
53
- font-weight: 700;
54
- font-size: 0.85rem;
55
- color: inherit;
56
- }
57
-
58
- .vmz-ui-steps__item[data-status="current"] .vmz-ui-steps__index {
59
- border-color: var(--vmz-action-primary-background);
60
- background: var(--vmz-action-primary-background);
61
- color: var(--vmz-action-primary-foreground);
62
- }
63
-
64
- .vmz-ui-steps__item[data-status="done"] .vmz-ui-steps__index {
65
- border-color: var(--vmz-status-success-accent);
66
- background: color-mix(in srgb, var(--vmz-status-success-accent) 18%, transparent);
67
- }
68
-
69
- .vmz-ui-steps__body {
70
- display: flex;
71
- flex-direction: column;
72
- gap: 0.2rem;
73
- padding-top: 0.125rem;
74
- }
75
-
76
- .vmz-ui-steps__title {
77
- font-weight: 700;
78
- }
79
-
80
- .vmz-ui-steps__description {
81
- font-size: 0.9em;
82
- opacity: 0.9;
83
- }
84
- </style>
85
- <script client>
86
- /**
87
- * VMZ UI — Steps.
88
- * Parent owns `current` id and item `status` (upcoming|current|done).
89
- * Navigation actions stay on the page (no private wizard store).
90
- */
91
- export default class Steps {
92
- public label: string = "Steps";
93
- public current: string = "";
94
- /** @type {{ id: string, index: string, title: string, description?: string, status: string }[]} */
95
- public items: {
96
- id: string;
97
- index: string;
98
- title: string;
99
- description?: string;
100
- status: string;
101
- }[] = [];
102
- }
103
- </script>
1
+ <template>
2
+ <ol data-vmz-ui="steps" :aria-label="label" class="vmz-ui-steps">
3
+ <li v-for="item in items" :key="item.id" :data-vmz-step="item.id" :data-status="item.status" :aria-current="current === item.id ? 'step' : 'false'" class="vmz-ui-steps__item">
4
+ <span :data-vmz-step-index="item.id" class="vmz-ui-steps__index">
5
+ <Icon v-if="item.status === 'done'" name="action.check" size="md" decorative />
6
+ <span v-else class="vmz-ui-steps__number">
7
+ {{ item.index }}
8
+ </span>
9
+ </span>
10
+ <span class="vmz-ui-steps__body">
11
+ <span class="vmz-ui-steps__title">
12
+ {{ item.title }}
13
+ </span>
14
+ <span v-if="item.description" class="vmz-ui-steps__description">
15
+ {{ item.description }}
16
+ </span>
17
+ </span>
18
+ </li>
19
+ </ol>
20
+ </template>
21
+ <style>
22
+ .vmz-ui-steps {
23
+ margin: 0;
24
+ padding: 0;
25
+ list-style: none;
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: var(--vmz-space-3, 0.75rem);
29
+ max-width: 36rem;
30
+ }
31
+
32
+ .vmz-ui-steps__item {
33
+ display: flex;
34
+ align-items: flex-start;
35
+ gap: var(--vmz-space-3, 0.75rem);
36
+ color: var(--vmz-text-ink);
37
+ }
38
+
39
+ .vmz-ui-steps__index {
40
+ flex: 0 0 auto;
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ width: 1.75rem;
45
+ height: 1.75rem;
46
+ border: 1px solid var(--vmz-line-default, var(--vmz-line-strong));
47
+ border-radius: var(--vmz-radius-pill, 999px);
48
+ background: var(--vmz-surface-paper);
49
+ font-size: 0.8125rem;
50
+ font-weight: 600;
51
+ line-height: 1;
52
+ color: var(--vmz-text-tertiary);
53
+ }
54
+
55
+ .vmz-ui-steps__item[data-status="current"] .vmz-ui-steps__index {
56
+ border-color: var(--vmz-action-primary-background);
57
+ background: var(--vmz-action-primary-background);
58
+ color: var(--vmz-action-primary-foreground);
59
+ }
60
+
61
+ .vmz-ui-steps__item[data-status="done"] .vmz-ui-steps__index {
62
+ border-color: var(--vmz-status-success-accent);
63
+ background: var(--vmz-status-success-background);
64
+ color: var(--vmz-status-success-foreground);
65
+ }
66
+
67
+ .vmz-ui-steps__body {
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: var(--vmz-space-1, 0.25rem);
71
+ padding-top: 0.125rem;
72
+ min-width: 0;
73
+ }
74
+
75
+ .vmz-ui-steps__title {
76
+ font-size: 0.875rem;
77
+ font-weight: 600;
78
+ line-height: 1.5;
79
+ color: var(--vmz-text-ink);
80
+ }
81
+
82
+ .vmz-ui-steps__item[data-status="current"] .vmz-ui-steps__title {
83
+ color: var(--vmz-action-primary-active);
84
+ }
85
+
86
+ .vmz-ui-steps__description {
87
+ font-size: 0.8125rem;
88
+ line-height: 1.5;
89
+ color: var(--vmz-text-tertiary);
90
+ }
91
+
92
+ :where([data-density="compact"]) .vmz-ui-steps {
93
+ gap: var(--vmz-density-compact-gap);
94
+ }
95
+
96
+ :where([data-density="dense"]) .vmz-ui-steps {
97
+ gap: var(--vmz-density-dense-gap);
98
+ }
99
+ </style>
100
+ <script client>
101
+ /**
102
+ * VMZ UI — Steps.
103
+ * Parent owns `current` id and item `status` (upcoming|current|done).
104
+ * Navigation actions stay on the page (no private wizard store).
105
+ */
106
+ export default class Steps {
107
+ public label: string = "";
108
+ public current: string = "";
109
+ /** @type {{ id: string, index: string, title: string, description?: string, status: string }[]} */
110
+ public items: {
111
+ id: string;
112
+ index: string;
113
+ title: string;
114
+ description?: string;
115
+ status: string;
116
+ }[] = [];
117
+ }
118
+ </script>