@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,76 +1,111 @@
1
- <template>
2
- <ol data-vmz-ui="timeline" :aria-label="label" class="vmz-ui-timeline">
3
- <li v-for="item in items" :key="item.id" :data-vmz-audit="item.id" class="vmz-ui-timeline__item">
4
- <p class="vmz-ui-timeline__time">
5
- {{ item.time }}
6
- </p>
7
- <p class="vmz-ui-timeline__title">
8
- {{ item.title }}
9
- </p>
10
- <p v-if="item.detail" class="vmz-ui-timeline__detail">
11
- {{ item.detail }}
12
- </p>
13
- </li>
14
- </ol>
15
- </template>
16
- <style>
17
- .vmz-ui-timeline {
18
- margin: 0;
19
- padding: 0;
20
- list-style: none;
21
- display: flex;
22
- flex-direction: column;
23
- gap: var(--vmz-density-compact-gap);
24
- border-left: 2px solid var(--vmz-line-default);
25
- }
26
-
27
- .vmz-ui-timeline__item {
28
- position: relative;
29
- padding: 0.125rem 0 0.125rem 0.85rem;
30
- }
31
-
32
- .vmz-ui-timeline__item::before {
33
- content: "";
34
- position: absolute;
35
- left: -0.35rem;
36
- top: 0.45rem;
37
- width: 0.55rem;
38
- height: 0.55rem;
39
- border-radius: 999px;
40
- background: var(--vmz-action-primary-background);
41
- }
42
-
43
- .vmz-ui-timeline__time {
44
- margin: 0;
45
- font-size: 0.85em;
46
- opacity: 0.75;
47
- color: var(--vmz-action-primary-active);
48
- }
49
-
50
- .vmz-ui-timeline__title {
51
- margin: 0.125rem 0 0;
52
- font-weight: 700;
53
- color: var(--vmz-action-primary-active);
54
- }
55
-
56
- .vmz-ui-timeline__detail {
57
- margin: 0.2rem 0 0;
58
- opacity: 0.9;
59
- }
60
- </style>
61
- <script client>
62
- /**
63
- * VMZ UI — Timeline (UI5 Console audit trail).
64
- * Parent owns audit items; stable ids for list identity.
65
- */
66
- export default class Timeline {
67
- public label: string = "Audit";
68
- /** @type {{ id: string, time: string, title: string, detail?: string }[]} */
69
- public items: {
70
- id: string;
71
- time: string;
72
- title: string;
73
- detail?: string;
74
- }[] = [];
75
- }
76
- </script>
1
+ <template>
2
+ <ol data-vmz-ui="timeline" :aria-label="label" class="vmz-ui-timeline">
3
+ <li v-for="item in items" :key="item.id" :data-vmz-audit="item.id" class="vmz-ui-timeline__item">
4
+ <span aria-hidden="true" class="vmz-ui-timeline__marker" />
5
+ <div class="vmz-ui-timeline__content">
6
+ <p class="vmz-ui-timeline__time">
7
+ {{ item.time }}
8
+ </p>
9
+ <p class="vmz-ui-timeline__title">
10
+ {{ item.title }}
11
+ </p>
12
+ <p v-if="item.detail" class="vmz-ui-timeline__detail">
13
+ {{ item.detail }}
14
+ </p>
15
+ </div>
16
+ </li>
17
+ </ol>
18
+ </template>
19
+ <style>
20
+ .vmz-ui-timeline {
21
+ margin: 0;
22
+ padding: 0;
23
+ list-style: none;
24
+ display: flex;
25
+ flex-direction: column;
26
+ color: var(--vmz-text-ink);
27
+ }
28
+
29
+ .vmz-ui-timeline__item {
30
+ display: flex;
31
+ align-items: flex-start;
32
+ gap: var(--vmz-space-3, 0.75rem);
33
+ padding: var(--vmz-space-3, 0.75rem) 0;
34
+ border-bottom: 1px solid var(--vmz-line-subtle, var(--vmz-line-default));
35
+ }
36
+
37
+ .vmz-ui-timeline__item:first-child {
38
+ padding-top: 0;
39
+ }
40
+
41
+ .vmz-ui-timeline__item:last-child {
42
+ padding-bottom: 0;
43
+ border-bottom: none;
44
+ }
45
+
46
+ .vmz-ui-timeline__marker {
47
+ flex: 0 0 auto;
48
+ width: 0.5rem;
49
+ height: 0.5rem;
50
+ margin-top: 0.45rem;
51
+ border-radius: var(--vmz-radius-pill, 999px);
52
+ background: var(--vmz-action-primary-background);
53
+ box-shadow: 0 0 0 3px var(--vmz-action-primary-soft, var(--vmz-surface-mist));
54
+ }
55
+
56
+ .vmz-ui-timeline__content {
57
+ flex: 1 1 auto;
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: var(--vmz-space-1, 0.25rem);
61
+ min-width: 0;
62
+ }
63
+
64
+ .vmz-ui-timeline__time {
65
+ margin: 0;
66
+ font-size: 0.8125rem;
67
+ line-height: 1.4;
68
+ color: var(--vmz-text-tertiary);
69
+ }
70
+
71
+ .vmz-ui-timeline__title {
72
+ margin: 0;
73
+ font-size: 0.875rem;
74
+ font-weight: 600;
75
+ line-height: 1.5;
76
+ color: var(--vmz-text-ink);
77
+ }
78
+
79
+ .vmz-ui-timeline__detail {
80
+ margin: 0;
81
+ font-size: 0.875rem;
82
+ line-height: 1.55;
83
+ color: var(--vmz-text-steel);
84
+ }
85
+
86
+ :where([data-density="compact"]) .vmz-ui-timeline__item {
87
+ gap: var(--vmz-density-compact-gap);
88
+ padding-block: var(--vmz-density-compact-gap);
89
+ }
90
+
91
+ :where([data-density="dense"]) .vmz-ui-timeline__item {
92
+ gap: var(--vmz-density-dense-gap);
93
+ padding-block: var(--vmz-density-dense-gap);
94
+ }
95
+ </style>
96
+ <script client>
97
+ /**
98
+ * VMZ UI — Timeline (UI5 Console audit trail).
99
+ * Parent owns audit items; stable ids for list identity.
100
+ */
101
+ export default class Timeline {
102
+ public label: string = "";
103
+ /** @type {{ id: string, time: string, title: string, detail?: string }[]} */
104
+ public items: {
105
+ id: string;
106
+ time: string;
107
+ title: string;
108
+ detail?: string;
109
+ }[] = [];
110
+ }
111
+ </script>
@@ -1,74 +1,90 @@
1
- <template>
2
- <aside data-vmz-ui="toc" :aria-label="label" class="vmz-ui-toc">
3
- <p class="vmz-ui-toc__title">
4
- {{ label }}
5
- </p>
6
- <nav class="vmz-ui-toc__nav">
7
- <a v-for="item in items" :key="item.id" :href="item.href" :data-vmz-toc="item.id" class="vmz-ui-toc__link">
8
- {{ item.title }}
9
- </a>
10
- </nav>
11
- </aside>
12
- </template>
13
- <style>
14
- .vmz-ui-toc {
15
- display: flex;
16
- flex-direction: column;
17
- gap: 0.5rem;
18
- min-width: 11rem;
19
- padding: 0.85rem 0.75rem;
20
- border: 1px solid var(--vmz-line-default);
21
- border-radius: var(--vmz-radius-md, 6px);
22
- background: var(--vmz-surface-mist);
23
- color: var(--vmz-text-ink);
24
- }
25
-
26
- .vmz-ui-toc__title {
27
- margin: 0;
28
- font-family: var(--vmz-font-display);
29
- font-size: 0.8rem;
30
- font-weight: 700;
31
- letter-spacing: 0.04em;
32
- text-transform: uppercase;
33
- color: var(--vmz-text-steel);
34
- }
35
-
36
- .vmz-ui-toc__nav {
37
- display: flex;
38
- flex-direction: column;
39
- gap: 0.375rem;
40
- }
41
-
42
- .vmz-ui-toc__link {
43
- font: inherit;
44
- font-weight: 600;
45
- font-size: 0.92rem;
46
- text-decoration: none;
47
- color: var(--vmz-action-primary-active);
48
- outline: none;
49
- }
50
-
51
- .vmz-ui-toc__link:hover {
52
- color: var(--vmz-action-primary-background);
53
- }
54
-
55
- .vmz-ui-toc__link:focus-visible {
56
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
57
- border-radius: var(--vmz-radius-md, 6px);
58
- }
59
- </style>
60
- <script client>
61
- /**
62
- * VMZ UI — Toc (Document/Product composition).
63
- * In-page outline; parent supplies items. Readable without JS.
64
- */
65
- export default class Toc {
66
- public label: string = "On this page";
67
- /** @type {{ id: string, title: string, href: string }[]} */
68
- public items: {
69
- id: string;
70
- title: string;
71
- href: string;
72
- }[] = [];
73
- }
74
- </script>
1
+ <template>
2
+ <aside data-vmz-ui="toc" :aria-label="label ? label : null" class="vmz-ui-toc">
3
+ <p v-if="label" class="vmz-ui-toc__title">
4
+ {{ label }}
5
+ </p>
6
+ <nav class="vmz-ui-toc__nav">
7
+ <a v-for="item in items" :key="item.id" :href="item.href" :data-vmz-toc="item.id" :data-level="item.level ? item.level : 1" :data-active="item.id === activeId ? 'true' : null" :aria-current="item.id === activeId ? 'location' : null" class="vmz-ui-toc__link">
8
+ {{ item.title }}
9
+ </a>
10
+ </nav>
11
+ </aside>
12
+ </template>
13
+ <style>
14
+ .vmz-ui-toc {
15
+ position: sticky;
16
+ top: 5rem;
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: var(--vmz-space-2, 0.5rem);
20
+ min-width: 0;
21
+ max-height: calc(100dvh - 6rem);
22
+ overflow-y: auto;
23
+ color: var(--vmz-text-ink);
24
+ }
25
+ .vmz-ui-toc__title {
26
+ margin: 0;
27
+ padding: 0 var(--vmz-space-3, 0.75rem);
28
+ color: var(--vmz-text-tertiary);
29
+ font-size: 0.75rem;
30
+ font-weight: 600;
31
+ line-height: 1.25rem;
32
+ }
33
+ .vmz-ui-toc__nav {
34
+ display: flex;
35
+ flex-direction: column;
36
+ }
37
+ .vmz-ui-toc__link {
38
+ display: block;
39
+ padding: 0.375rem var(--vmz-space-3, 0.75rem);
40
+ border-left: 2px solid transparent;
41
+ color: var(--vmz-text-steel);
42
+ font-size: 0.875rem;
43
+ font-weight: 400;
44
+ line-height: 1.5;
45
+ text-decoration: none;
46
+ outline: none;
47
+ transition:
48
+ color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1)),
49
+ border-color var(--vmz-motion-control-duration, 150ms) var(--vmz-motion-control-easing, cubic-bezier(0.4, 0, 0.2, 1));
50
+ }
51
+ .vmz-ui-toc__link:hover {
52
+ color: var(--vmz-action-primary-background);
53
+ }
54
+ .vmz-ui-toc__link[data-active="true"] {
55
+ color: var(--vmz-action-primary-background);
56
+ font-weight: 500;
57
+ border-left-color: var(--vmz-action-primary-background);
58
+ }
59
+ .vmz-ui-toc__link[data-level="2"] {
60
+ padding-left: var(--vmz-space-5, 1.5rem);
61
+ }
62
+ .vmz-ui-toc__link[data-level="3"] {
63
+ padding-left: 2.25rem;
64
+ }
65
+ .vmz-ui-toc__link[data-level="4"] {
66
+ padding-left: 3rem;
67
+ }
68
+ .vmz-ui-toc__link:focus-visible {
69
+ border-radius: var(--vmz-radius-sm, 4px);
70
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
71
+ }
72
+ </style>
73
+ <script client>
74
+ /**
75
+ * VMZ UI — Toc (Document/Product composition).
76
+ * Sticky in-page outline; parent supplies items and the current anchor.
77
+ * Readable without JS.
78
+ */
79
+ export default class Toc {
80
+ public label: string = "";
81
+ public activeId: string = "";
82
+ /** @type {{ id: string, title: string, href: string, level?: number }[]} */
83
+ public items: {
84
+ id: string;
85
+ title: string;
86
+ href: string;
87
+ level?: number;
88
+ }[] = [];
89
+ }
90
+ </script>
@@ -1,58 +1,107 @@
1
- <template>
2
- <div data-vmz-ui="tooltip" :data-open="openAttr" class="vmz-ui-tooltip">
3
- <div data-vmz-tooltip="trigger" class="vmz-ui-tooltip__trigger">
4
- <slot />
5
- </div>
6
- <div v-if="open" role="tooltip" :id="tooltipId" data-vmz-tooltip="bubble" class="vmz-ui-tooltip__bubble">
7
- {{ content }}
8
- </div>
9
- </div>
10
- </template>
11
- <style>
12
- .vmz-ui-tooltip {
13
- position: relative;
14
- display: inline-flex;
15
- flex-direction: column;
16
- align-items: flex-start;
17
- gap: 0.375rem;
18
- max-width: 28rem;
19
- }
20
-
21
- .vmz-ui-tooltip__trigger {
22
- display: inline-flex;
23
- align-items: center;
24
- gap: 0.375rem;
25
- }
26
-
27
- .vmz-ui-tooltip__bubble {
28
- box-sizing: border-box;
29
- max-width: 18rem;
30
- padding: 0.375rem 0.625rem;
31
- border: 1px solid var(--vmz-line-default);
32
- border-radius: var(--vmz-radius-md, 6px);
33
- background: var(--vmz-surface-paper);
34
- color: var(--vmz-text-ink);
35
- font-size: 0.88rem;
36
- line-height: 1.4;
37
- box-shadow: 0 1px 0 color-mix(in srgb, var(--vmz-line-default) 70%, transparent);
38
- }
39
-
40
- .vmz-ui-tooltip[data-open="true"]
41
- .vmz-ui-tooltip__trigger
42
- :where(button, a, [tabindex]):focus-visible {
43
- box-shadow: 0 0 0 3px var(--vmz-focus-ring);
44
- }
45
- </style>
46
- <script client>
47
- /**
48
- * VMZ UI — Tooltip.
49
- * Parent owns live `open` + content string. Not a second overlay runtime;
50
- * Escape/outside policies stay with richer Popover/Dialog when needed.
51
- */
52
- export default class Tooltip {
53
- public open: boolean = false;
54
- public openAttr: string = "false";
55
- public content: string = "";
56
- public tooltipId: string = "vmz-tooltip";
57
- }
58
- </script>
1
+ <template>
2
+ <div data-vmz-ui="tooltip" :data-open="openAttr" class="vmz-ui-tooltip">
3
+ <div data-vmz-tooltip="trigger" class="vmz-ui-tooltip__trigger">
4
+ <slot />
5
+ </div>
6
+ <div v-if="open" role="tooltip" :id="tooltipId" data-vmz-tooltip="bubble" class="vmz-ui-tooltip__bubble">
7
+ <span aria-hidden="true" data-vmz-tooltip="arrow" class="vmz-ui-tooltip__arrow" />
8
+ {{ content }}
9
+ </div>
10
+ </div>
11
+ </template>
12
+ <style>
13
+ .vmz-ui-tooltip {
14
+ display: inline-flex;
15
+ flex-direction: column;
16
+ align-items: flex-start;
17
+ gap: 6px;
18
+ }
19
+
20
+ .vmz-ui-tooltip__trigger {
21
+ display: inline-flex;
22
+ align-items: center;
23
+ min-height: var(--vmz-control-height, 32px);
24
+ border-radius: var(--vmz-radius-sm);
25
+ }
26
+
27
+ .vmz-ui-tooltip__trigger :where(button, a, [tabindex]):focus-visible {
28
+ box-shadow: 0 0 0 3px var(--vmz-focus-ring);
29
+ }
30
+
31
+ .vmz-ui-tooltip__bubble {
32
+ position: relative;
33
+ display: inline-flex;
34
+ align-items: center;
35
+ max-width: 18rem;
36
+ padding: 6px 10px;
37
+ border-radius: var(--vmz-radius-lg);
38
+ background: var(--vmz-surface-ink);
39
+ color: var(--vmz-text-on-ink);
40
+ font-size: 14px;
41
+ line-height: 22px;
42
+ box-shadow: var(--vmz-shadow-popup);
43
+ animation: vmz-ui-tooltip-in var(--vmz-motion-overlay-duration)
44
+ var(--vmz-motion-overlay-easing);
45
+ }
46
+
47
+ .vmz-ui-tooltip__arrow {
48
+ position: absolute;
49
+ top: -4px;
50
+ left: 14px;
51
+ width: 8px;
52
+ height: 8px;
53
+ border-radius: 1px 0 0 0;
54
+ background: var(--vmz-surface-ink);
55
+ transform: rotate(45deg);
56
+ }
57
+
58
+ .vmz-ui-tooltip__bubble :where(a) {
59
+ color: inherit;
60
+ text-decoration: underline;
61
+ }
62
+
63
+ @keyframes vmz-ui-tooltip-in {
64
+ from {
65
+ opacity: 0;
66
+ transform: translateY(-4px);
67
+ }
68
+ to {
69
+ opacity: 1;
70
+ transform: none;
71
+ }
72
+ }
73
+
74
+ @media (prefers-contrast: more) {
75
+ .vmz-ui-tooltip__bubble {
76
+ border: 1px solid var(--vmz-line-default);
77
+ background: var(--vmz-surface-paper);
78
+ color: var(--vmz-text-ink);
79
+ }
80
+
81
+ .vmz-ui-tooltip__arrow {
82
+ border-top: 1px solid var(--vmz-line-default);
83
+ border-left: 1px solid var(--vmz-line-default);
84
+ background: var(--vmz-surface-paper);
85
+ }
86
+ }
87
+
88
+ @media (prefers-reduced-motion: reduce) {
89
+ .vmz-ui-tooltip__bubble {
90
+ animation: none;
91
+ }
92
+ }
93
+ </style>
94
+ <script client>
95
+ /**
96
+ * VMZ UI — Tooltip (UI1).
97
+ * Hover/focus-visible adoption + tooltipId/aria-describedby on the trigger.
98
+ * Escape/outside policies stay with richer Popover/Dialog when needed.
99
+ * The parent owns live `open`; `openAttr` mirrors it for CSS and automation.
100
+ */
101
+ export default class Tooltip {
102
+ public open: boolean = false;
103
+ public openAttr: string = "false";
104
+ public content: string = "";
105
+ public tooltipId: string = "vmz-tooltip";
106
+ }
107
+ </script>