@vmz/ui 0.3.6 → 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.
Files changed (42) hide show
  1. package/README.md +51 -51
  2. package/package.json +2 -2
  3. package/src/components/Accordion.vmz +94 -94
  4. package/src/components/AppShell.vmz +5 -2
  5. package/src/components/Autocomplete.vmz +154 -154
  6. package/src/components/Badge.vmz +70 -70
  7. package/src/components/Breadcrumb.vmz +72 -72
  8. package/src/components/BulkActions.vmz +51 -51
  9. package/src/components/Button.vmz +213 -211
  10. package/src/components/Callout.vmz +77 -77
  11. package/src/components/Card.vmz +120 -120
  12. package/src/components/Checkbox.vmz +55 -55
  13. package/src/components/CodeBlock.vmz +21 -6
  14. package/src/components/ConsoleShell.vmz +251 -251
  15. package/src/components/DataTable.vmz +194 -194
  16. package/src/components/DatePicker.vmz +674 -674
  17. package/src/components/Dialog.vmz +17 -1
  18. package/src/components/Drawer.vmz +427 -427
  19. package/src/components/Dropdown.vmz +51 -5
  20. package/src/components/Empty.vmz +54 -54
  21. package/src/components/Field.vmz +115 -115
  22. package/src/components/FormItem.vmz +79 -79
  23. package/src/components/Link.vmz +5 -1
  24. package/src/components/List.vmz +102 -102
  25. package/src/components/Menu.vmz +243 -243
  26. package/src/components/Pagination.vmz +71 -69
  27. package/src/components/Popover.vmz +223 -223
  28. package/src/components/Prose.vmz +81 -81
  29. package/src/components/RadioGroup.vmz +124 -124
  30. package/src/components/Segmented.vmz +51 -51
  31. package/src/components/Select.vmz +533 -533
  32. package/src/components/Steps.vmz +103 -103
  33. package/src/components/Switch.vmz +98 -98
  34. package/src/components/Table.vmz +165 -165
  35. package/src/components/Tabs.vmz +110 -110
  36. package/src/components/Tag.vmz +43 -43
  37. package/src/components/TextArea.vmz +118 -118
  38. package/src/components/Timeline.vmz +76 -76
  39. package/src/components/Toc.vmz +74 -74
  40. package/src/components/Tooltip.vmz +58 -58
  41. package/src/components/Tree.vmz +191 -191
  42. package/src/components/Upload.vmz +1299 -1289
@@ -1,251 +1,251 @@
1
- <template>
2
- <div data-vmz-ui="console-shell" class="vmz-ui-console-shell">
3
- <aside data-vmz-shell="sidebar" :aria-label="navLabel" class="vmz-ui-console-shell__sidebar">
4
- <a :href="homeHref" class="vmz-ui-console-shell__brand">
5
- {{ brand }}
6
- </a>
7
- <nav class="vmz-ui-console-shell__nav">
8
- <a v-for="item in nav" :key="item.id" :href="item.href" :data-vmz-nav="item.id" :data-active="item.id === activeNavId ? 'true' : null" :aria-current="item.id === activeNavId ? 'page' : null">
9
- {{ item.title }}
10
- </a>
11
- </nav>
12
- </aside>
13
- <div class="vmz-ui-console-shell__body">
14
- <header data-vmz-shell="header" class="vmz-ui-console-shell__header">
15
- <div class="vmz-ui-console-shell__header-copy">
16
- <p v-if="breadcrumbLabel" data-vmz-shell="breadcrumb" class="vmz-ui-console-shell__breadcrumb">
17
- {{ breadcrumbLabel }}
18
- </p>
19
- <h1 class="vmz-ui-console-shell__title">
20
- {{ title }}
21
- </h1>
22
- <p v-if="subtitle" class="vmz-ui-console-shell__subtitle">
23
- {{ subtitle }}
24
- </p>
25
- </div>
26
- <a v-if="primaryActionLabel && primaryActionHref" :href="primaryActionHref" class="vmz-ui-console-shell__action">
27
- {{ primaryActionLabel }}
28
- </a>
29
- </header>
30
- <main data-vmz-shell="main" class="vmz-ui-console-shell__main">
31
- <slot />
32
- </main>
33
- <footer v-if="footer" data-vmz-shell="footer" class="vmz-ui-console-shell__footer">
34
- {{ footer }}
35
- </footer>
36
- </div>
37
- </div>
38
- </template>
39
- <style>
40
- .vmz-ui-console-shell {
41
- display: grid;
42
- grid-template-columns: 13rem minmax(0, 1fr);
43
- grid-template-rows: minmax(100%, 100%);
44
- min-height: 100vh;
45
- min-height: 100dvh;
46
- height: 100dvh;
47
- color: inherit;
48
- background: var(--vmz-surface-page, #f5f6f8);
49
- }
50
-
51
- .vmz-ui-console-shell__sidebar {
52
- display: flex;
53
- flex-direction: column;
54
- gap: 1rem;
55
- padding: 1rem 0.75rem 1.5rem;
56
- border-right: 1px solid var(--vmz-line-subtle, #e5e6eb);
57
- min-height: 100%;
58
- align-self: stretch;
59
- background: #fff;
60
- }
61
-
62
- .vmz-ui-console-shell__brand {
63
- font: inherit;
64
- font-weight: 600;
65
- font-size: 1rem;
66
- letter-spacing: 0;
67
- text-decoration: none;
68
- color: #1f2329;
69
- }
70
-
71
- .vmz-ui-console-shell__brand:focus-visible {
72
- outline: none;
73
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
74
- }
75
-
76
- .vmz-ui-console-shell__nav {
77
- display: flex;
78
- flex-direction: column;
79
- gap: 0.25rem;
80
- flex: 1;
81
- }
82
-
83
- .vmz-ui-console-shell__nav a {
84
- font: inherit;
85
- font-weight: 400;
86
- font-size: 0.875rem;
87
- line-height: 1.375rem;
88
- text-decoration: none;
89
- color: #51565d;
90
- padding: 0.5rem 0.5rem;
91
- border-radius: 6px;
92
- }
93
-
94
- .vmz-ui-console-shell__nav a[data-active="true"] {
95
- color: #0958d9;
96
- font-weight: 500;
97
- background: #e6f4ff;
98
- }
99
-
100
- .vmz-ui-console-shell__nav a:focus-visible {
101
- outline: none;
102
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
103
- }
104
-
105
- .vmz-ui-console-shell__body {
106
- display: flex;
107
- flex-direction: column;
108
- min-width: 0;
109
- min-height: 0;
110
- height: 100%;
111
- overflow: auto;
112
- }
113
-
114
- .vmz-ui-console-shell__header {
115
- position: sticky;
116
- top: 0;
117
- z-index: 20;
118
- display: flex;
119
- align-items: center;
120
- justify-content: space-between;
121
- gap: 1rem;
122
- min-height: 3.5rem;
123
- padding: 0.75rem 1.5rem;
124
- border-bottom: 1px solid var(--vmz-line-subtle, #e5e6eb);
125
- background: #fff;
126
- }
127
-
128
- .vmz-ui-console-shell__header-copy {
129
- display: grid;
130
- gap: 0.125rem;
131
- min-width: 0;
132
- }
133
-
134
- .vmz-ui-console-shell__breadcrumb {
135
- margin: 0;
136
- color: #646a73;
137
- font-size: 0.8125rem;
138
- line-height: 1.25rem;
139
- }
140
-
141
- .vmz-ui-console-shell__title {
142
- margin: 0;
143
- font-size: 1.5rem;
144
- line-height: 2rem;
145
- font-weight: 600;
146
- color: #1f2329;
147
- }
148
-
149
- .vmz-ui-console-shell__subtitle {
150
- margin: 0;
151
- color: #51565d;
152
- font-size: 0.875rem;
153
- line-height: 1.375rem;
154
- }
155
-
156
- .vmz-ui-console-shell__action {
157
- display: inline-flex;
158
- align-items: center;
159
- justify-content: center;
160
- min-height: 2rem;
161
- padding: 0.25rem 0.75rem;
162
- border-radius: 6px;
163
- background: #1677ff;
164
- color: #fff;
165
- font-size: 0.875rem;
166
- font-weight: 500;
167
- text-decoration: none;
168
- white-space: nowrap;
169
- }
170
-
171
- .vmz-ui-console-shell__action:hover {
172
- color: #fff;
173
- background: #0958d9;
174
- }
175
-
176
- .vmz-ui-console-shell__action:focus-visible {
177
- outline: none;
178
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
179
- }
180
-
181
- .vmz-ui-console-shell__main {
182
- flex: 1 1 auto;
183
- padding: 1.5rem;
184
- display: flex;
185
- flex-direction: column;
186
- gap: 1rem;
187
- }
188
-
189
- .vmz-ui-console-shell__footer {
190
- margin-top: auto;
191
- padding: 0.85rem 1.5rem 1.1rem;
192
- border-top: 1px solid var(--vmz-line-subtle, #e5e6eb);
193
- color: var(--vmz-text-steel, #646a73);
194
- font-size: 0.82rem;
195
- background: #fff;
196
- }
197
-
198
- @media (max-width: 40rem) {
199
- .vmz-ui-console-shell {
200
- grid-template-columns: 1fr;
201
- grid-template-rows: auto minmax(0, 1fr);
202
- height: auto;
203
- min-height: 100dvh;
204
- }
205
-
206
- .vmz-ui-console-shell__sidebar {
207
- border-right: 0;
208
- border-bottom: 1px solid var(--vmz-line-subtle, #e5e6eb);
209
- }
210
-
211
- .vmz-ui-console-shell__nav {
212
- flex-direction: row;
213
- flex-wrap: wrap;
214
- flex: 0;
215
- }
216
-
217
- .vmz-ui-console-shell__header {
218
- flex-direction: column;
219
- align-items: flex-start;
220
- padding-inline: 1rem;
221
- }
222
-
223
- .vmz-ui-console-shell__main {
224
- padding: 1rem;
225
- }
226
- }
227
- </style>
228
- <script client>
229
- /**
230
- * VMZ UI — ConsoleShell (Console composition).
231
- * Sidebar + sticky header + main slot + optional footer. Parent supplies nav.
232
- */
233
- export default class ConsoleShell {
234
- public brand: string = "VMZ";
235
- public homeHref: string = "/";
236
- public title: string = "Console";
237
- public subtitle: string = "";
238
- public breadcrumbLabel: string = "";
239
- public primaryActionLabel: string = "";
240
- public primaryActionHref: string = "";
241
- public activeNavId: string = "";
242
- public navLabel: string = "Console";
243
- public footer: string = "";
244
- /** @type {{ id: string, title: string, href: string }[]} */
245
- public nav: {
246
- id: string;
247
- title: string;
248
- href: string;
249
- }[] = [];
250
- }
251
- </script>
1
+ <template>
2
+ <div data-vmz-ui="console-shell" class="vmz-ui-console-shell">
3
+ <aside data-vmz-shell="sidebar" :aria-label="navLabel" class="vmz-ui-console-shell__sidebar">
4
+ <a :href="homeHref" class="vmz-ui-console-shell__brand">
5
+ {{ brand }}
6
+ </a>
7
+ <nav class="vmz-ui-console-shell__nav">
8
+ <a v-for="item in nav" :key="item.id" :href="item.href" :data-vmz-nav="item.id" :data-active="item.id === activeNavId ? 'true' : null" :aria-current="item.id === activeNavId ? 'page' : null">
9
+ {{ item.title }}
10
+ </a>
11
+ </nav>
12
+ </aside>
13
+ <div class="vmz-ui-console-shell__body">
14
+ <header data-vmz-shell="header" class="vmz-ui-console-shell__header">
15
+ <div class="vmz-ui-console-shell__header-copy">
16
+ <p v-if="breadcrumbLabel" data-vmz-shell="breadcrumb" class="vmz-ui-console-shell__breadcrumb">
17
+ {{ breadcrumbLabel }}
18
+ </p>
19
+ <h1 class="vmz-ui-console-shell__title">
20
+ {{ title }}
21
+ </h1>
22
+ <p v-if="subtitle" class="vmz-ui-console-shell__subtitle">
23
+ {{ subtitle }}
24
+ </p>
25
+ </div>
26
+ <a v-if="primaryActionLabel && primaryActionHref" :href="primaryActionHref" class="vmz-ui-console-shell__action">
27
+ {{ primaryActionLabel }}
28
+ </a>
29
+ </header>
30
+ <main data-vmz-shell="main" class="vmz-ui-console-shell__main">
31
+ <slot />
32
+ </main>
33
+ <footer v-if="footer" data-vmz-shell="footer" class="vmz-ui-console-shell__footer">
34
+ {{ footer }}
35
+ </footer>
36
+ </div>
37
+ </div>
38
+ </template>
39
+ <style>
40
+ .vmz-ui-console-shell {
41
+ display: grid;
42
+ grid-template-columns: 13rem minmax(0, 1fr);
43
+ grid-template-rows: minmax(100%, 100%);
44
+ min-height: 100vh;
45
+ min-height: 100dvh;
46
+ height: 100dvh;
47
+ color: inherit;
48
+ background: var(--vmz-surface-page, #f5f6f8);
49
+ }
50
+
51
+ .vmz-ui-console-shell__sidebar {
52
+ display: flex;
53
+ flex-direction: column;
54
+ gap: 1rem;
55
+ padding: 1rem 0.75rem 1.5rem;
56
+ border-right: 1px solid var(--vmz-line-subtle, #e5e6eb);
57
+ min-height: 100%;
58
+ align-self: stretch;
59
+ background: var(--vmz-surface-paper);
60
+ }
61
+
62
+ .vmz-ui-console-shell__brand {
63
+ font: inherit;
64
+ font-weight: 600;
65
+ font-size: 1rem;
66
+ letter-spacing: 0;
67
+ text-decoration: none;
68
+ color: var(--vmz-text-ink);
69
+ }
70
+
71
+ .vmz-ui-console-shell__brand:focus-visible {
72
+ outline: none;
73
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
74
+ }
75
+
76
+ .vmz-ui-console-shell__nav {
77
+ display: flex;
78
+ flex-direction: column;
79
+ gap: 0.25rem;
80
+ flex: 1;
81
+ }
82
+
83
+ .vmz-ui-console-shell__nav a {
84
+ font: inherit;
85
+ font-weight: 400;
86
+ font-size: 0.875rem;
87
+ line-height: 1.375rem;
88
+ text-decoration: none;
89
+ color: var(--vmz-text-steel);
90
+ padding: 0.5rem 0.5rem;
91
+ border-radius: var(--vmz-radius-sm);
92
+ }
93
+
94
+ .vmz-ui-console-shell__nav a[data-active="true"] {
95
+ color: var(--vmz-action-link-foreground);
96
+ font-weight: 500;
97
+ background: color-mix(in srgb, var(--vmz-action-primary-background) 10%, var(--vmz-surface-paper));
98
+ }
99
+
100
+ .vmz-ui-console-shell__nav a:focus-visible {
101
+ outline: none;
102
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
103
+ }
104
+
105
+ .vmz-ui-console-shell__body {
106
+ display: flex;
107
+ flex-direction: column;
108
+ min-width: 0;
109
+ min-height: 0;
110
+ height: 100%;
111
+ overflow: auto;
112
+ }
113
+
114
+ .vmz-ui-console-shell__header {
115
+ position: sticky;
116
+ top: 0;
117
+ z-index: 20;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: space-between;
121
+ gap: 1rem;
122
+ min-height: 3.5rem;
123
+ padding: 0.75rem 1.5rem;
124
+ border-bottom: 1px solid var(--vmz-line-subtle, #e5e6eb);
125
+ background: var(--vmz-surface-paper);
126
+ }
127
+
128
+ .vmz-ui-console-shell__header-copy {
129
+ display: grid;
130
+ gap: 0.125rem;
131
+ min-width: 0;
132
+ }
133
+
134
+ .vmz-ui-console-shell__breadcrumb {
135
+ margin: 0;
136
+ color: var(--vmz-text-steel);
137
+ font-size: 0.8125rem;
138
+ line-height: 1.25rem;
139
+ }
140
+
141
+ .vmz-ui-console-shell__title {
142
+ margin: 0;
143
+ font-size: 1.5rem;
144
+ line-height: 2rem;
145
+ font-weight: 600;
146
+ color: var(--vmz-text-ink);
147
+ }
148
+
149
+ .vmz-ui-console-shell__subtitle {
150
+ margin: 0;
151
+ color: var(--vmz-text-steel);
152
+ font-size: 0.875rem;
153
+ line-height: 1.375rem;
154
+ }
155
+
156
+ .vmz-ui-console-shell__action {
157
+ display: inline-flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ min-height: 2rem;
161
+ padding: 0.25rem 0.75rem;
162
+ border-radius: var(--vmz-radius-sm);
163
+ background: var(--vmz-action-primary-background);
164
+ color: var(--vmz-action-primary-foreground);
165
+ font-size: 0.875rem;
166
+ font-weight: 500;
167
+ text-decoration: none;
168
+ white-space: nowrap;
169
+ }
170
+
171
+ .vmz-ui-console-shell__action:hover {
172
+ color: var(--vmz-action-primary-foreground);
173
+ background: var(--vmz-action-primary-active);
174
+ }
175
+
176
+ .vmz-ui-console-shell__action:focus-visible {
177
+ outline: none;
178
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
179
+ }
180
+
181
+ .vmz-ui-console-shell__main {
182
+ flex: 1 1 auto;
183
+ padding: 1.5rem;
184
+ display: flex;
185
+ flex-direction: column;
186
+ gap: 1rem;
187
+ }
188
+
189
+ .vmz-ui-console-shell__footer {
190
+ margin-top: auto;
191
+ padding: 0.85rem 1.5rem 1.1rem;
192
+ border-top: 1px solid var(--vmz-line-subtle, #e5e6eb);
193
+ color: var(--vmz-text-steel, #646a73);
194
+ font-size: 0.82rem;
195
+ background: var(--vmz-surface-paper);
196
+ }
197
+
198
+ @media (max-width: 40rem) {
199
+ .vmz-ui-console-shell {
200
+ grid-template-columns: 1fr;
201
+ grid-template-rows: auto minmax(0, 1fr);
202
+ height: auto;
203
+ min-height: 100dvh;
204
+ }
205
+
206
+ .vmz-ui-console-shell__sidebar {
207
+ border-right: 0;
208
+ border-bottom: 1px solid var(--vmz-line-subtle, #e5e6eb);
209
+ }
210
+
211
+ .vmz-ui-console-shell__nav {
212
+ flex-direction: row;
213
+ flex-wrap: wrap;
214
+ flex: 0;
215
+ }
216
+
217
+ .vmz-ui-console-shell__header {
218
+ flex-direction: column;
219
+ align-items: flex-start;
220
+ padding-inline: 1rem;
221
+ }
222
+
223
+ .vmz-ui-console-shell__main {
224
+ padding: 1rem;
225
+ }
226
+ }
227
+ </style>
228
+ <script client>
229
+ /**
230
+ * VMZ UI — ConsoleShell (Console composition).
231
+ * Sidebar + sticky header + main slot + optional footer. Parent supplies nav.
232
+ */
233
+ export default class ConsoleShell {
234
+ public brand: string = "VMZ";
235
+ public homeHref: string = "/";
236
+ public title: string = "Console";
237
+ public subtitle: string = "";
238
+ public breadcrumbLabel: string = "";
239
+ public primaryActionLabel: string = "";
240
+ public primaryActionHref: string = "";
241
+ public activeNavId: string = "";
242
+ public navLabel: string = "Console";
243
+ public footer: string = "";
244
+ /** @type {{ id: string, title: string, href: string }[]} */
245
+ public nav: {
246
+ id: string;
247
+ title: string;
248
+ href: string;
249
+ }[] = [];
250
+ }
251
+ </script>