@vmz/ui 0.1.0 → 0.1.2

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 (66) hide show
  1. package/README.md +8 -0
  2. package/contracts/token-requirements.v0.json +2 -6
  3. package/package.json +18 -2
  4. package/presets/web-surface.v0.json +24 -10
  5. package/src/components/Accordion.vmz +88 -89
  6. package/src/components/Alert.vmz +64 -63
  7. package/src/components/AppShell.vmz +64 -45
  8. package/src/components/Autocomplete.vmz +152 -151
  9. package/src/components/Avatar.vmz +16 -0
  10. package/src/components/Badge.vmz +46 -46
  11. package/src/components/Breadcrumb.vmz +52 -48
  12. package/src/components/BulkActions.vmz +37 -37
  13. package/src/components/Button.vmz +90 -75
  14. package/src/components/Callout.vmz +61 -61
  15. package/src/components/Card.vmz +58 -51
  16. package/src/components/Checkbox.vmz +56 -53
  17. package/src/components/CodeBlock.vmz +51 -51
  18. package/src/components/Collapse.vmz +20 -0
  19. package/src/components/ConsoleShell.vmz +134 -99
  20. package/src/components/Content.vmz +11 -0
  21. package/src/components/DataTable.vmz +197 -196
  22. package/src/components/DatePicker.vmz +613 -536
  23. package/src/components/Dialog.vmz +365 -384
  24. package/src/components/Divider.vmz +19 -0
  25. package/src/components/Drawer.vmz +361 -378
  26. package/src/components/Dropdown.vmz +22 -0
  27. package/src/components/Empty.vmz +36 -36
  28. package/src/components/Field.vmz +69 -40
  29. package/src/components/FilterBar.vmz +15 -15
  30. package/src/components/Flex.vmz +12 -0
  31. package/src/components/Footer.vmz +11 -0
  32. package/src/components/Form.vmz +56 -58
  33. package/src/components/FormItem.vmz +59 -59
  34. package/src/components/Grid.vmz +12 -0
  35. package/src/components/Header.vmz +11 -0
  36. package/src/components/Icon.vmz +86 -0
  37. package/src/components/Layout.vmz +11 -0
  38. package/src/components/Link.vmz +33 -33
  39. package/src/components/List.vmz +96 -96
  40. package/src/components/Menu.vmz +229 -240
  41. package/src/components/Notification.vmz +62 -62
  42. package/src/components/Pagination.vmz +63 -65
  43. package/src/components/Popover.vmz +202 -219
  44. package/src/components/Progress.vmz +18 -0
  45. package/src/components/Prose.vmz +61 -61
  46. package/src/components/QueryForm.vmz +26 -27
  47. package/src/components/RadioGroup.vmz +116 -113
  48. package/src/components/Result.vmz +63 -63
  49. package/src/components/Segmented.vmz +29 -0
  50. package/src/components/Select.vmz +462 -290
  51. package/src/components/Sider.vmz +6 -0
  52. package/src/components/Skeleton.vmz +58 -58
  53. package/src/components/Space.vmz +15 -0
  54. package/src/components/Spinner.vmz +29 -29
  55. package/src/components/Steps.vmz +86 -86
  56. package/src/components/Switch.vmz +86 -88
  57. package/src/components/Table.vmz +116 -114
  58. package/src/components/Tabs.vmz +113 -112
  59. package/src/components/Tag.vmz +8 -0
  60. package/src/components/TextArea.vmz +76 -49
  61. package/src/components/Timeline.vmz +55 -50
  62. package/src/components/Toc.vmz +64 -60
  63. package/src/components/Tooltip.vmz +51 -51
  64. package/src/components/Tree.vmz +184 -190
  65. package/src/components/Typography.vmz +9 -0
  66. package/src/components/Upload.vmz +1130 -1151
@@ -1,91 +1,118 @@
1
1
  <template>
2
2
  <div class="vmz-ui-textarea" data-vmz-ui="textarea" data-invalid={invalidAttr}>
3
- <label if={label} class="vmz-ui-textarea__label" for={controlId}>{label}</label>
4
- <textarea
5
- id={controlId}
6
- class="vmz-ui-textarea__control"
7
- rows={rows}
8
- value={value}
9
- disabled={disabled}
10
- readonly={readonly}
11
- aria-invalid={error ? 'true' : 'false'}
12
- aria-describedby={describedBy}
13
- onInput={onInput}
14
- ></textarea>
15
- <p if={description} id={descriptionId} class="vmz-ui-textarea__description">{description}</p>
16
- <p if={error} id={errorId} class="vmz-ui-textarea__error" role="alert">{error}</p>
17
- </div>
3
+ <label if={label} class="vmz-ui-textarea__label" for={controlId}>{label}</label>
4
+ <textarea
5
+ id={controlId}
6
+ class="vmz-ui-textarea__control"
7
+ rows={rows}
8
+ value={value}
9
+ disabled={disabled}
10
+ readonly={readonly}
11
+ aria-invalid={error ? 'true' : 'false'}
12
+ aria-describedby={describedBy}
13
+ onInput={onInput}
14
+ ></textarea>
15
+ <p if={description} id={descriptionId} class="vmz-ui-textarea__description">{description}</p>
16
+ <p if={error} id={errorId} class="vmz-ui-textarea__error" role="alert">{error}</p>
17
+ </div>
18
18
  </template>
19
19
 
20
20
  <style>
21
- .vmz-ui-textarea {
22
- display: flex;
23
- flex-direction: column;
24
- gap: 0.35rem;
25
- max-width: 28rem;
26
- }
21
+ .vmz-ui-textarea {
22
+ display: flex;
23
+ flex-direction: column;
24
+ gap: 0.45rem;
25
+ max-width: none;
26
+ width: 100%;
27
+ }
27
28
 
28
29
  .vmz-ui-textarea__label {
29
30
  font: inherit;
30
- font-weight: 600;
31
+ font-weight: 500;
32
+ font-size: 0.875rem;
31
33
  }
32
34
 
33
35
  .vmz-ui-textarea__control {
34
- font: inherit;
35
- min-height: 6rem;
36
- padding: var(--vmz-density-control-padding-y) var(--vmz-density-control-padding-x);
37
- border: 1px solid var(--vmz-action-primary-background);
38
- border-radius: 2px;
39
- background: transparent;
40
- color: inherit;
36
+ box-sizing: border-box;
37
+ width: 100%;
38
+ font-family: var(--vmz-font-sans, inherit);
39
+ font-size: 0.875rem;
40
+ line-height: 1.5715;
41
+ min-height: 5.5rem;
42
+ padding: var(--vmz-density-control-padding-y, 0.25rem)
43
+ var(--vmz-density-control-padding-x, 0.75rem);
44
+ border: 1px solid var(--vmz-line-default, #d9d9d9);
45
+ border-radius: var(--vmz-radius-md, 6px);
46
+ background: var(--vmz-surface-paper, #fff);
47
+ color: var(--vmz-text-ink, inherit);
41
48
  outline: none;
42
49
  resize: vertical;
50
+ transition:
51
+ border-color var(--vmz-motion-control-duration, 120ms) var(--vmz-motion-control-easing, linear),
52
+ box-shadow var(--vmz-motion-control-duration, 120ms) var(--vmz-motion-control-easing, linear);
53
+ }
54
+
55
+ .vmz-ui-textarea__control::placeholder {
56
+ color: var(--vmz-text-steel, #8c8c8c);
57
+ opacity: 1;
43
58
  }
44
59
 
45
60
  .vmz-ui-textarea[data-invalid='true'] .vmz-ui-textarea__control {
46
61
  border-color: var(--vmz-status-danger-accent);
47
62
  }
48
63
 
64
+ .vmz-ui-textarea__control:hover:not(:disabled):not(:focus-visible) {
65
+ border-color: var(--vmz-action-primary-background);
66
+ }
67
+
49
68
  .vmz-ui-textarea__control:focus-visible {
69
+ border-color: var(--vmz-action-primary-background);
50
70
  box-shadow: 0 0 0 2px var(--vmz-focus-ring);
51
71
  }
52
72
 
73
+ .vmz-ui-textarea__control:disabled,
74
+ .vmz-ui-textarea__control:read-only {
75
+ cursor: default;
76
+ background: var(--vmz-surface-mist, #fafafa);
77
+ }
78
+
53
79
  .vmz-ui-textarea__control:disabled {
54
- opacity: 0.55;
55
80
  cursor: not-allowed;
81
+ opacity: 0.55;
56
82
  }
57
83
 
58
84
  .vmz-ui-textarea__description {
59
85
  margin: 0;
60
- opacity: 0.75;
61
- font-size: 0.9em;
86
+ color: var(--vmz-text-steel, #8c8c8c);
87
+ font-size: 0.875rem;
88
+ line-height: 1.4;
62
89
  }
63
90
 
64
91
  .vmz-ui-textarea__error {
65
92
  margin: 0;
66
93
  color: var(--vmz-status-danger-foreground);
67
- font-size: 0.9em;
94
+ font-size: 0.875rem;
68
95
  }
69
96
  </style>
70
97
 
71
98
  <script client>
72
99
  /**
73
- * VMZ UI — TextArea.
74
- * Same label/description/error ownership contract as Field; parent owns value.
75
- */
100
+ * VMZ UI — TextArea.
101
+ * Same label/description/error ownership contract as Field; parent owns value.
102
+ */
76
103
  export default class TextArea {
77
- public label: string = '';
78
- public description: string = '';
79
- public error: string = '';
80
- public value: string = '';
81
- public rows: number = 4;
82
- public disabled: boolean = false;
83
- public readonly: boolean = false;
84
- public invalidAttr: string = 'false';
85
- public controlId: string = 'vmz-textarea';
86
- public descriptionId: string = 'vmz-textarea-desc';
87
- public errorId: string = 'vmz-textarea-err';
88
- public describedBy: string = '';
89
- public onInput: ((e: Event) => void) | null = null;
104
+ public label: string = "";
105
+ public description: string = "";
106
+ public error: string = "";
107
+ public value: string = "";
108
+ public rows: number = 4;
109
+ public disabled: boolean = false;
110
+ public readonly: boolean = false;
111
+ public invalidAttr: string = "false";
112
+ public controlId: string = "vmz-textarea";
113
+ public descriptionId: string = "vmz-textarea-desc";
114
+ public errorId: string = "vmz-textarea-err";
115
+ public describedBy: string = "";
116
+ public onInput: ((e: Event) => void) | null = null;
90
117
  }
91
118
  </script>
@@ -1,67 +1,72 @@
1
1
  <template>
2
2
  <ol class="vmz-ui-timeline" data-vmz-ui="timeline" aria-label={label}>
3
- <li each={items} as="item" key={item.id} class="vmz-ui-timeline__item" data-vmz-audit={item.id}>
4
- <p class="vmz-ui-timeline__time">{item.time}</p>
5
- <p class="vmz-ui-timeline__title">{item.title}</p>
6
- <p if={item.detail} class="vmz-ui-timeline__detail">{item.detail}</p>
7
- </li>
8
- </ol>
3
+ <li each={items} as="item" key={item.id} class="vmz-ui-timeline__item" data-vmz-audit={item.id}>
4
+ <p class="vmz-ui-timeline__time">{item.time}</p>
5
+ <p class="vmz-ui-timeline__title">{item.title}</p>
6
+ <p if={item.detail} class="vmz-ui-timeline__detail">{item.detail}</p>
7
+ </li>
8
+ </ol>
9
9
  </template>
10
10
 
11
11
  <style>
12
- .vmz-ui-timeline {
13
- margin: 0;
14
- padding: 0;
15
- list-style: none;
16
- display: flex;
17
- flex-direction: column;
18
- gap: var(--vmz-density-compact-gap);
19
- border-left: 2px solid var(--vmz-action-primary-background);
20
- }
12
+ .vmz-ui-timeline {
13
+ margin: 0;
14
+ padding: 0;
15
+ list-style: none;
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: var(--vmz-density-compact-gap);
19
+ border-left: 2px solid var(--vmz-line-default);
20
+ }
21
21
 
22
- .vmz-ui-timeline__item {
23
- position: relative;
24
- padding: 0.15rem 0 0.15rem 0.85rem;
25
- }
22
+ .vmz-ui-timeline__item {
23
+ position: relative;
24
+ padding: 0.15rem 0 0.15rem 0.85rem;
25
+ }
26
26
 
27
- .vmz-ui-timeline__item::before {
28
- content: '';
29
- position: absolute;
30
- left: -0.35rem;
31
- top: 0.45rem;
32
- width: 0.55rem;
33
- height: 0.55rem;
34
- border-radius: 999px;
35
- background: var(--vmz-action-primary-background);
36
- }
27
+ .vmz-ui-timeline__item::before {
28
+ content: '';
29
+ position: absolute;
30
+ left: -0.35rem;
31
+ top: 0.45rem;
32
+ width: 0.55rem;
33
+ height: 0.55rem;
34
+ border-radius: 999px;
35
+ background: var(--vmz-action-primary-background);
36
+ }
37
37
 
38
- .vmz-ui-timeline__time {
39
- margin: 0;
40
- font-size: 0.85em;
41
- opacity: 0.75;
42
- color: var(--vmz-action-primary-active);
43
- }
38
+ .vmz-ui-timeline__time {
39
+ margin: 0;
40
+ font-size: 0.85em;
41
+ opacity: 0.75;
42
+ color: var(--vmz-action-primary-active);
43
+ }
44
44
 
45
- .vmz-ui-timeline__title {
46
- margin: 0.15rem 0 0;
47
- font-weight: 700;
48
- color: var(--vmz-action-primary-active);
49
- }
45
+ .vmz-ui-timeline__title {
46
+ margin: 0.15rem 0 0;
47
+ font-weight: 700;
48
+ color: var(--vmz-action-primary-active);
49
+ }
50
50
 
51
- .vmz-ui-timeline__detail {
52
- margin: 0.2rem 0 0;
53
- opacity: 0.9;
54
- }
51
+ .vmz-ui-timeline__detail {
52
+ margin: 0.2rem 0 0;
53
+ opacity: 0.9;
54
+ }
55
55
  </style>
56
56
 
57
57
  <script client>
58
58
  /**
59
- * VMZ UI — Timeline (UI5 Console audit trail).
60
- * Parent owns audit items; stable ids for list identity.
61
- */
59
+ * VMZ UI — Timeline (UI5 Console audit trail).
60
+ * Parent owns audit items; stable ids for list identity.
61
+ */
62
62
  export default class Timeline {
63
- public label: string = 'Audit';
64
- /** @type {{ id: string, time: string, title: string, detail?: string }[]} */
65
- public items: { id: string; time: string; title: string; detail?: string }[] = [];
63
+ public label: string = "Audit";
64
+ /** @type {{ id: string, time: string, title: string, detail?: string }[]} */
65
+ public items: {
66
+ id: string;
67
+ time: string;
68
+ title: string;
69
+ detail?: string;
70
+ }[] = [];
66
71
  }
67
72
  </script>
@@ -1,77 +1,81 @@
1
1
  <template>
2
2
  <aside class="vmz-ui-toc" data-vmz-ui="toc" aria-label={label}>
3
- <p class="vmz-ui-toc__title">{label}</p>
4
- <nav class="vmz-ui-toc__nav">
5
- <a
6
- each={items}
7
- as="item"
8
- key={item.id}
9
- class="vmz-ui-toc__link"
10
- href={item.href}
11
- data-vmz-toc={item.id}
12
- >
13
- {item.title}
14
- </a>
15
- </nav>
16
- </aside>
3
+ <p class="vmz-ui-toc__title">{label}</p>
4
+ <nav class="vmz-ui-toc__nav">
5
+ <a
6
+ each={items}
7
+ as="item"
8
+ key={item.id}
9
+ class="vmz-ui-toc__link"
10
+ href={item.href}
11
+ data-vmz-toc={item.id}
12
+ >
13
+ {item.title}
14
+ </a>
15
+ </nav>
16
+ </aside>
17
17
  </template>
18
18
 
19
19
  <style>
20
- .vmz-ui-toc {
21
- display: flex;
22
- flex-direction: column;
23
- gap: 0.55rem;
24
- min-width: 11rem;
25
- padding: 0.85rem 0.75rem;
26
- border: 1px solid var(--vmz-line-default);
27
- border-radius: 2px;
28
- background: var(--vmz-surface-mist);
29
- color: var(--vmz-text-ink);
30
- }
20
+ .vmz-ui-toc {
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: 0.55rem;
24
+ min-width: 11rem;
25
+ padding: 0.85rem 0.75rem;
26
+ border: 1px solid var(--vmz-line-default);
27
+ border-radius: var(--vmz-radius-md, 6px);
28
+ background: var(--vmz-surface-mist);
29
+ color: var(--vmz-text-ink);
30
+ }
31
31
 
32
- .vmz-ui-toc__title {
33
- margin: 0;
34
- font-family: var(--vmz-font-display);
35
- font-size: 0.8rem;
36
- font-weight: 700;
37
- letter-spacing: 0.04em;
38
- text-transform: uppercase;
39
- color: var(--vmz-text-steel);
40
- }
32
+ .vmz-ui-toc__title {
33
+ margin: 0;
34
+ font-family: var(--vmz-font-display);
35
+ font-size: 0.8rem;
36
+ font-weight: 700;
37
+ letter-spacing: 0.04em;
38
+ text-transform: uppercase;
39
+ color: var(--vmz-text-steel);
40
+ }
41
41
 
42
- .vmz-ui-toc__nav {
43
- display: flex;
44
- flex-direction: column;
45
- gap: 0.35rem;
46
- }
42
+ .vmz-ui-toc__nav {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: 0.35rem;
46
+ }
47
47
 
48
- .vmz-ui-toc__link {
49
- font: inherit;
50
- font-weight: 600;
51
- font-size: 0.92rem;
52
- text-decoration: none;
53
- color: var(--vmz-action-primary-active);
54
- outline: none;
55
- }
48
+ .vmz-ui-toc__link {
49
+ font: inherit;
50
+ font-weight: 600;
51
+ font-size: 0.92rem;
52
+ text-decoration: none;
53
+ color: var(--vmz-action-primary-active);
54
+ outline: none;
55
+ }
56
56
 
57
- .vmz-ui-toc__link:hover {
58
- color: var(--vmz-action-primary-background);
59
- }
57
+ .vmz-ui-toc__link:hover {
58
+ color: var(--vmz-action-primary-background);
59
+ }
60
60
 
61
- .vmz-ui-toc__link:focus-visible {
62
- box-shadow: 0 0 0 2px var(--vmz-focus-ring);
63
- border-radius: 2px;
64
- }
61
+ .vmz-ui-toc__link:focus-visible {
62
+ box-shadow: 0 0 0 2px var(--vmz-focus-ring);
63
+ border-radius: var(--vmz-radius-md, 6px);
64
+ }
65
65
  </style>
66
66
 
67
67
  <script client>
68
68
  /**
69
- * VMZ UI — Toc (Document/Product composition).
70
- * In-page outline; parent supplies items. Readable without JS.
71
- */
69
+ * VMZ UI — Toc (Document/Product composition).
70
+ * In-page outline; parent supplies items. Readable without JS.
71
+ */
72
72
  export default class Toc {
73
- public label: string = 'On this page';
74
- /** @type {{ id: string, title: string, href: string }[]} */
75
- public items: { id: string; title: string; href: string }[] = [];
73
+ public label: string = "On this page";
74
+ /** @type {{ id: string, title: string, href: string }[]} */
75
+ public items: {
76
+ id: string;
77
+ title: string;
78
+ href: string;
79
+ }[] = [];
76
80
  }
77
81
  </script>
@@ -1,68 +1,68 @@
1
1
  <template>
2
2
  <div
3
- class="vmz-ui-tooltip"
4
- data-vmz-ui="tooltip"
5
- data-open={openAttr}
6
- >
7
- <div class="vmz-ui-tooltip__trigger" data-vmz-tooltip="trigger">
8
- <slot />
9
- </div>
10
- <div
11
- if={open}
12
- class="vmz-ui-tooltip__bubble"
13
- role="tooltip"
14
- id={tooltipId}
15
- data-vmz-tooltip="bubble"
3
+ class="vmz-ui-tooltip"
4
+ data-vmz-ui="tooltip"
5
+ data-open={openAttr}
16
6
  >
17
- {content}
7
+ <div class="vmz-ui-tooltip__trigger" data-vmz-tooltip="trigger">
8
+ <slot />
9
+ </div>
10
+ <div
11
+ if={open}
12
+ class="vmz-ui-tooltip__bubble"
13
+ role="tooltip"
14
+ id={tooltipId}
15
+ data-vmz-tooltip="bubble"
16
+ >
17
+ {content}
18
+ </div>
18
19
  </div>
19
- </div>
20
20
  </template>
21
21
 
22
22
  <style>
23
- .vmz-ui-tooltip {
24
- position: relative;
25
- display: inline-flex;
26
- flex-direction: column;
27
- align-items: flex-start;
28
- gap: 0.35rem;
29
- max-width: 28rem;
30
- }
23
+ .vmz-ui-tooltip {
24
+ position: relative;
25
+ display: inline-flex;
26
+ flex-direction: column;
27
+ align-items: flex-start;
28
+ gap: 0.35rem;
29
+ max-width: 28rem;
30
+ }
31
31
 
32
- .vmz-ui-tooltip__trigger {
33
- display: inline-flex;
34
- align-items: center;
35
- gap: 0.35rem;
36
- }
32
+ .vmz-ui-tooltip__trigger {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ gap: 0.35rem;
36
+ }
37
37
 
38
- .vmz-ui-tooltip__bubble {
39
- box-sizing: border-box;
40
- max-width: 18rem;
41
- padding: 0.4rem 0.65rem;
42
- border: 1px solid var(--vmz-line-default);
43
- border-radius: 2px;
44
- background: var(--vmz-surface-paper);
45
- color: var(--vmz-text-ink);
46
- font-size: 0.88rem;
47
- line-height: 1.4;
48
- box-shadow: 0 1px 0 color-mix(in srgb, var(--vmz-line-default) 70%, transparent);
49
- }
38
+ .vmz-ui-tooltip__bubble {
39
+ box-sizing: border-box;
40
+ max-width: 18rem;
41
+ padding: 0.4rem 0.65rem;
42
+ border: 1px solid var(--vmz-line-default);
43
+ border-radius: var(--vmz-radius-md, 6px);
44
+ background: var(--vmz-surface-paper);
45
+ color: var(--vmz-text-ink);
46
+ font-size: 0.88rem;
47
+ line-height: 1.4;
48
+ box-shadow: 0 1px 0 color-mix(in srgb, var(--vmz-line-default) 70%, transparent);
49
+ }
50
50
 
51
- .vmz-ui-tooltip[data-open='true'] .vmz-ui-tooltip__trigger :where(button, a, [tabindex]):focus-visible {
52
- box-shadow: 0 0 0 2px var(--vmz-focus-ring);
53
- }
51
+ .vmz-ui-tooltip[data-open='true'] .vmz-ui-tooltip__trigger :where(button, a, [tabindex]):focus-visible {
52
+ box-shadow: 0 0 0 2px var(--vmz-focus-ring);
53
+ }
54
54
  </style>
55
55
 
56
56
  <script client>
57
57
  /**
58
- * VMZ UI — Tooltip.
59
- * Parent owns live `open` + content string. Not a second overlay runtime;
60
- * Escape/outside policies stay with richer Popover/Dialog when needed.
61
- */
58
+ * VMZ UI — Tooltip.
59
+ * Parent owns live `open` + content string. Not a second overlay runtime;
60
+ * Escape/outside policies stay with richer Popover/Dialog when needed.
61
+ */
62
62
  export default class Tooltip {
63
- public open: boolean = false;
64
- public openAttr: string = 'false';
65
- public content: string = '';
66
- public tooltipId: string = 'vmz-tooltip';
63
+ public open: boolean = false;
64
+ public openAttr: string = "false";
65
+ public content: string = "";
66
+ public tooltipId: string = "vmz-tooltip";
67
67
  }
68
68
  </script>