@vmz/ui 0.2.2 → 0.2.4

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 (63) hide show
  1. package/package.json +1 -1
  2. package/src/components/Accordion.vmz +46 -63
  3. package/src/components/Alert.vmz +35 -38
  4. package/src/components/AppShell.vmz +92 -75
  5. package/src/components/Autocomplete.vmz +91 -119
  6. package/src/components/Avatar.vmz +37 -8
  7. package/src/components/Badge.vmz +29 -23
  8. package/src/components/Breadcrumb.vmz +36 -34
  9. package/src/components/BulkActions.vmz +22 -28
  10. package/src/components/Button.vmz +139 -121
  11. package/src/components/Callout.vmz +33 -36
  12. package/src/components/Card.vmz +68 -51
  13. package/src/components/Checkbox.vmz +28 -47
  14. package/src/components/CodeBlock.vmz +31 -25
  15. package/src/components/Collapse.vmz +34 -16
  16. package/src/components/ConsoleShell.vmz +183 -94
  17. package/src/components/Content.vmz +8 -4
  18. package/src/components/DataTable.vmz +124 -150
  19. package/src/components/DatePicker.vmz +526 -521
  20. package/src/components/Dialog.vmz +408 -327
  21. package/src/components/Divider.vmz +38 -11
  22. package/src/components/Drawer.vmz +325 -318
  23. package/src/components/Dropdown.vmz +53 -19
  24. package/src/components/Empty.vmz +23 -21
  25. package/src/components/Field.vmz +77 -83
  26. package/src/components/FilterBar.vmz +8 -10
  27. package/src/components/Flex.vmz +21 -6
  28. package/src/components/Footer.vmz +9 -4
  29. package/src/components/Form.vmz +35 -46
  30. package/src/components/FormItem.vmz +44 -43
  31. package/src/components/Grid.vmz +22 -6
  32. package/src/components/Header.vmz +11 -4
  33. package/src/components/Icon.vmz +43 -44
  34. package/src/components/Layout.vmz +9 -4
  35. package/src/components/Link.vmz +17 -25
  36. package/src/components/List.vmz +62 -75
  37. package/src/components/Menu.vmz +182 -197
  38. package/src/components/Notification.vmz +35 -38
  39. package/src/components/Pagination.vmz +37 -47
  40. package/src/components/Popover.vmz +157 -171
  41. package/src/components/Progress.vmz +36 -10
  42. package/src/components/Prose.vmz +29 -31
  43. package/src/components/QueryForm.vmz +14 -22
  44. package/src/components/RadioGroup.vmz +70 -84
  45. package/src/components/Result.vmz +36 -38
  46. package/src/components/Segmented.vmz +43 -22
  47. package/src/components/Select.vmz +404 -411
  48. package/src/components/Sider.vmz +21 -4
  49. package/src/components/Skeleton.vmz +34 -42
  50. package/src/components/Space.vmz +24 -9
  51. package/src/components/Spinner.vmz +17 -23
  52. package/src/components/Steps.vmz +48 -51
  53. package/src/components/Switch.vmz +50 -60
  54. package/src/components/Table.vmz +81 -84
  55. package/src/components/Tabs.vmz +66 -88
  56. package/src/components/Tag.vmz +36 -11
  57. package/src/components/TextArea.vmz +73 -77
  58. package/src/components/Timeline.vmz +36 -32
  59. package/src/components/Toc.vmz +31 -37
  60. package/src/components/Tooltip.vmz +25 -35
  61. package/src/components/Tree.vmz +127 -144
  62. package/src/components/Typography.vmz +33 -7
  63. package/src/components/Upload.vmz +1135 -1057
@@ -1,67 +1,40 @@
1
1
  <template>
2
- <div
3
- class="vmz-ui-autocomplete"
4
- data-vmz-ui="autocomplete"
5
- :data-invalid="invalidAttr"
6
- :data-open="openAttr"
7
- >
8
- <label v-if="label" class="vmz-ui-autocomplete__label" :for="controlId">{{ label }}</label>
9
- <input
10
- :id="controlId"
11
- class="vmz-ui-autocomplete__control"
12
- type="text"
13
- role="combobox"
14
- autocomplete="off"
15
- aria-autocomplete="list"
16
- :aria-expanded="openAttr"
17
- :aria-controls="listId"
18
- :aria-invalid="error ? 'true' : 'false'"
19
- :aria-describedby="describedBy"
20
- :value="value"
21
- :disabled="disabled"
22
- @input="onDomInput"
23
- :onKeyDown="onKeyDown"
24
- />
25
- <ul
26
- v-if="listOpen"
27
- :id="listId"
28
- class="vmz-ui-autocomplete__list"
29
- role="listbox"
30
- data-vmz-autocomplete="list"
31
- @click="onListClick"
32
- >
33
- <li
34
- v-for="opt in options"
35
- :key="opt.value"
36
- class="vmz-ui-autocomplete__option"
37
- role="option"
38
- :data-vmz-option="opt.value"
39
- tabindex="-1"
40
- >
41
- {{ opt.label }}
42
- </li>
43
- </ul>
44
- <p v-if="showEmpty" class="vmz-ui-autocomplete__empty" data-vmz-autocomplete="empty">{{ emptyText }}</p>
45
- <p v-if="description" :id="descriptionId" class="vmz-ui-autocomplete__description">{{ description }}</p>
46
- <p v-if="error" :id="errorId" class="vmz-ui-autocomplete__error" role="alert">{{ error }}</p>
2
+ <div data-vmz-ui="autocomplete" :data-invalid="invalidAttr" :data-open="openAttr" class="vmz-ui-autocomplete">
3
+ <label v-if="label" :for="controlId" class="vmz-ui-autocomplete__label">
4
+ {{ label }}
5
+ </label>
6
+ <input :id="controlId" type="text" role="combobox" autocomplete="off" aria-autocomplete="list" :aria-expanded="openAttr" :aria-controls="listId" :aria-invalid='error ? "true" : "false"' :aria-describedby="describedBy" :value="value" :disabled="disabled" @input="onDomInput" :onKeyDown="onKeyDown" class="vmz-ui-autocomplete__control" />
7
+ <ul v-if="listOpen" :id="listId" role="listbox" data-vmz-autocomplete="list" @click="onListClick" class="vmz-ui-autocomplete__list">
8
+ <li v-for="opt in options" :key="opt.value" role="option" :data-vmz-option="opt.value" tabindex="-1" class="vmz-ui-autocomplete__option">
9
+ {{ opt.label }}
10
+ </li>
11
+ </ul>
12
+ <p v-if="showEmpty" data-vmz-autocomplete="empty" class="vmz-ui-autocomplete__empty">
13
+ {{ emptyText }}
14
+ </p>
15
+ <p v-if="description" :id="descriptionId" class="vmz-ui-autocomplete__description">
16
+ {{ description }}
17
+ </p>
18
+ <p v-if="error" :id="errorId" role="alert" class="vmz-ui-autocomplete__error">
19
+ {{ error }}
20
+ </p>
47
21
  </div>
48
22
  </template>
49
-
50
23
  <style>
51
- .vmz-ui-autocomplete {
24
+ .vmz-ui-autocomplete {
52
25
  position: relative;
53
26
  display: flex;
54
27
  flex-direction: column;
55
28
  gap: 0.35rem;
56
29
  max-width: 28rem;
57
- }
30
+ }
58
31
 
59
- .vmz-ui-autocomplete__label {
32
+ .vmz-ui-autocomplete__label {
60
33
  font: inherit;
61
34
  font-weight: 600;
62
- }
35
+ }
63
36
 
64
- .vmz-ui-autocomplete__control {
37
+ .vmz-ui-autocomplete__control {
65
38
  font: inherit;
66
39
  padding: var(--vmz-density-control-padding-y) var(--vmz-density-control-padding-x);
67
40
  border: 1px solid var(--vmz-line-default);
@@ -69,22 +42,22 @@
69
42
  background: transparent;
70
43
  color: inherit;
71
44
  outline: none;
72
- }
45
+ }
73
46
 
74
- .vmz-ui-autocomplete[data-invalid='true'] .vmz-ui-autocomplete__control {
47
+ .vmz-ui-autocomplete[data-invalid="true"] .vmz-ui-autocomplete__control {
75
48
  border-color: var(--vmz-status-danger-accent);
76
- }
49
+ }
77
50
 
78
- .vmz-ui-autocomplete__control:focus-visible {
51
+ .vmz-ui-autocomplete__control:focus-visible {
79
52
  box-shadow: 0 0 0 2px var(--vmz-focus-ring);
80
- }
53
+ }
81
54
 
82
- .vmz-ui-autocomplete__control:disabled {
55
+ .vmz-ui-autocomplete__control:disabled {
83
56
  opacity: 0.55;
84
57
  cursor: not-allowed;
85
- }
58
+ }
86
59
 
87
- .vmz-ui-autocomplete__list {
60
+ .vmz-ui-autocomplete__list {
88
61
  list-style: none;
89
62
  margin: 0;
90
63
  padding: 0.25rem 0;
@@ -93,90 +66,89 @@
93
66
  background: var(--vmz-surface-paper);
94
67
  max-height: 12rem;
95
68
  overflow: auto;
96
- }
69
+ }
97
70
 
98
- .vmz-ui-autocomplete__option {
71
+ .vmz-ui-autocomplete__option {
99
72
  margin: 0;
100
73
  padding: 0.45rem 0.75rem;
101
74
  cursor: pointer;
102
75
  font-weight: 600;
103
76
  color: var(--vmz-text-ink);
104
- }
77
+ }
105
78
 
106
- .vmz-ui-autocomplete__option:hover,
107
- .vmz-ui-autocomplete__option:focus {
79
+ .vmz-ui-autocomplete__option:hover,
80
+ .vmz-ui-autocomplete__option:focus {
108
81
  background: var(--vmz-surface-mist);
109
82
  outline: none;
110
- }
83
+ }
111
84
 
112
- .vmz-ui-autocomplete__empty {
85
+ .vmz-ui-autocomplete__empty {
113
86
  margin: 0;
114
87
  color: var(--vmz-text-steel);
115
88
  font-size: 0.9em;
116
- }
89
+ }
117
90
 
118
- .vmz-ui-autocomplete__description {
91
+ .vmz-ui-autocomplete__description {
119
92
  margin: 0;
120
93
  opacity: 0.75;
121
94
  font-size: 0.9em;
122
- }
95
+ }
123
96
 
124
- .vmz-ui-autocomplete__error {
97
+ .vmz-ui-autocomplete__error {
125
98
  margin: 0;
126
99
  color: var(--vmz-status-danger-foreground);
127
100
  font-size: 0.9em;
128
- }
101
+ }
129
102
  </style>
130
-
131
103
  <script client>
132
104
  /**
133
- * VMZ UI — Autocomplete.
134
- * Parent owns value, listOpen, and filtered options — no parallel query/store.
135
- * Selection notifies via onSelect(value); Escape closes via onClose.
136
- */
105
+ * VMZ UI — Autocomplete.
106
+ * Parent owns value, listOpen, and filtered options — no parallel query/store.
107
+ * Selection notifies via onSelect(value); Escape closes via onClose.
108
+ */
137
109
  export default class Autocomplete {
138
- public label: string = "";
139
- public description: string = "";
140
- public error: string = "";
141
- public value: string = "";
142
- public options: Array<{
143
- value: string;
144
- label: string;
145
- }> = [];
146
- public listOpen: boolean = false;
147
- public openAttr: string = "false";
148
- public showEmpty: boolean = false;
149
- public emptyText: string = "No matches";
150
- public disabled: boolean = false;
151
- public invalidAttr: string = "false";
152
- public controlId: string = "vmz-autocomplete";
153
- public listId: string = "vmz-autocomplete-list";
154
- public descriptionId: string = "vmz-autocomplete-desc";
155
- public errorId: string = "vmz-autocomplete-err";
156
- public describedBy: string = "";
157
- public onInput: ((e: Event) => void) | null = null;
158
- public onSelect: ((value: string) => void) | null = null;
159
- public onClose: (() => void) | null = null;
160
- onDomInput(e: Event) {
161
- this.emit("input", e);
162
- if (typeof this.onInput === "function") this.onInput(e);
163
- }
164
- onListClick(ev) {
165
- if (this.disabled) return;
166
- const t = ev && ev.target;
167
- if (!t || typeof t.closest !== "function") return;
168
- const opt = t.closest("[data-vmz-option]");
169
- if (!opt) return;
170
- const next = opt.getAttribute("data-vmz-option") || "";
171
- if (!next) return;
172
- this.emit("select", next);
173
- if (typeof this.onSelect === "function") this.onSelect(next);
174
- }
175
- onKeyDown(ev) {
176
- if (!ev || ev.key !== "Escape") return;
177
- ev.preventDefault();
178
- this.emit("close");
179
- if (typeof this.onClose === "function") this.onClose();
180
- }
110
+ public label: string = "";
111
+ public description: string = "";
112
+ public error: string = "";
113
+ public value: string = "";
114
+ public options: Array<{
115
+ value: string;
116
+ label: string;
117
+ }> = [];
118
+ public listOpen: boolean = false;
119
+ public openAttr: string = "false";
120
+ public showEmpty: boolean = false;
121
+ public emptyText: string = "No matches";
122
+ public disabled: boolean = false;
123
+ public invalidAttr: string = "false";
124
+ public controlId: string = "vmz-autocomplete";
125
+ public listId: string = "vmz-autocomplete-list";
126
+ public descriptionId: string = "vmz-autocomplete-desc";
127
+ public errorId: string = "vmz-autocomplete-err";
128
+ public describedBy: string = "";
129
+ public onInput: ((e: Event) => void) | null = null;
130
+ public onSelect: ((value: string) => void) | null = null;
131
+ public onClose: (() => void) | null = null;
132
+ onDomInput(e: Event) {
133
+ this.emit("input", e);
134
+ if (typeof this.onInput === "function") this.onInput(e);
135
+ }
136
+ onListClick(ev) {
137
+ if (this.disabled) return;
138
+ const t = ev && ev.target;
139
+ if (!t || typeof t.closest !== "function") return;
140
+ const opt = t.closest("[data-vmz-option]");
141
+ if (!opt) return;
142
+ const next = opt.getAttribute("data-vmz-option") || "";
143
+ if (!next) return;
144
+ this.emit("select", next);
145
+ if (typeof this.onSelect === "function") this.onSelect(next);
146
+ }
147
+ onKeyDown(ev) {
148
+ if (!ev || ev.key !== "Escape") return;
149
+ ev.preventDefault();
150
+ this.emit("close");
151
+ if (typeof this.onClose === "function") this.onClose();
152
+ }
181
153
  }
182
154
  </script>
@@ -1,16 +1,45 @@
1
1
  <template>
2
- <span class="vmz-ui-avatar" data-vmz-ui="avatar" :data-size="size" :aria-label="label"><img v-if="src" :src="src" alt="" /><span v-if="!src">{{ text }}</span></span>
2
+ <span data-vmz-ui="avatar" :data-size="size" :aria-label="label" class="vmz-ui-avatar">
3
+ <img v-if="src" :src="src" alt />
4
+ <span v-if="!src">
5
+ {{ text }}
6
+ </span>
7
+ </span>
3
8
  </template>
4
-
5
9
  <style>
6
- .vmz-ui-avatar{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;overflow:hidden;border-radius:50%;background:color-mix(in srgb,var(--vmz-action-primary-background,#1677ff) 14%,white);color:var(--vmz-action-primary-active,#0958d9);font-weight:650}.vmz-ui-avatar[data-size='small']{width:1.5rem;height:1.5rem;font-size:.75rem}.vmz-ui-avatar[data-size='large']{width:2.75rem;height:2.75rem;font-size:1.1rem}.vmz-ui-avatar img{width:100%;height:100%;object-fit:cover}
10
+ .vmz-ui-avatar {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ width: 2rem;
15
+ height: 2rem;
16
+ overflow: hidden;
17
+ border-radius: 50%;
18
+ background: color-mix(in srgb, var(--vmz-action-primary-background, #1677ff) 14%, white);
19
+ color: var(--vmz-action-primary-active, #0958d9);
20
+ font-weight: 650;
21
+ }
22
+ .vmz-ui-avatar[data-size="small"] {
23
+ width: 1.5rem;
24
+ height: 1.5rem;
25
+ font-size: 0.75rem;
26
+ }
27
+ .vmz-ui-avatar[data-size="large"] {
28
+ width: 2.75rem;
29
+ height: 2.75rem;
30
+ font-size: 1.1rem;
31
+ }
32
+ .vmz-ui-avatar img {
33
+ width: 100%;
34
+ height: 100%;
35
+ object-fit: cover;
36
+ }
7
37
  </style>
8
-
9
38
  <script client>
10
39
  export default class Avatar {
11
- public src: string = "";
12
- public text: string = "";
13
- public label: string = "";
14
- public size: string = "middle";
40
+ public src: string = "";
41
+ public text: string = "";
42
+ public label: string = "";
43
+ public size: string = "middle";
15
44
  }
16
45
  </script>
@@ -1,11 +1,10 @@
1
1
  <template>
2
- <span class="vmz-ui-badge" data-vmz-ui="badge" :data-tone="tone">
3
- <slot />
2
+ <span data-vmz-ui="badge" :data-tone="tone" class="vmz-ui-badge">
3
+ <slot />
4
4
  </span>
5
5
  </template>
6
-
7
6
  <style>
8
- .vmz-ui-badge {
7
+ .vmz-ui-badge {
9
8
  display: inline-flex;
10
9
  align-items: center;
11
10
  gap: 0.25rem;
@@ -19,46 +18,53 @@
19
18
  line-height: 1.2;
20
19
  background: var(--vmz-surface-mist);
21
20
  color: var(--vmz-text-ink);
22
- }
21
+ }
23
22
 
24
- .vmz-ui-badge[data-tone='brand'] {
25
- border-color: color-mix(in srgb, var(--vmz-action-primary-background) 35%, var(--vmz-line-default));
26
- background: color-mix(in srgb, var(--vmz-action-primary-background) 12%, var(--vmz-surface-paper));
23
+ .vmz-ui-badge[data-tone="brand"] {
24
+ border-color: color-mix(
25
+ in srgb,
26
+ var(--vmz-action-primary-background) 35%,
27
+ var(--vmz-line-default)
28
+ );
29
+ background: color-mix(
30
+ in srgb,
31
+ var(--vmz-action-primary-background) 12%,
32
+ var(--vmz-surface-paper)
33
+ );
27
34
  color: var(--vmz-action-primary-active);
28
- }
35
+ }
29
36
 
30
- .vmz-ui-badge[data-tone='info'] {
37
+ .vmz-ui-badge[data-tone="info"] {
31
38
  border-color: var(--vmz-status-info-accent);
32
39
  background: color-mix(in srgb, var(--vmz-status-info-accent) 12%, var(--vmz-surface-paper));
33
40
  color: var(--vmz-status-info-foreground);
34
- }
41
+ }
35
42
 
36
- .vmz-ui-badge[data-tone='success'] {
43
+ .vmz-ui-badge[data-tone="success"] {
37
44
  border-color: var(--vmz-status-success-accent);
38
45
  background: color-mix(in srgb, var(--vmz-status-success-accent) 12%, var(--vmz-surface-paper));
39
46
  color: var(--vmz-status-success-foreground);
40
- }
47
+ }
41
48
 
42
- .vmz-ui-badge[data-tone='warning'] {
49
+ .vmz-ui-badge[data-tone="warning"] {
43
50
  border-color: var(--vmz-status-warning-accent);
44
51
  background: color-mix(in srgb, var(--vmz-status-warning-accent) 12%, var(--vmz-surface-paper));
45
52
  color: var(--vmz-status-warning-foreground);
46
- }
53
+ }
47
54
 
48
- .vmz-ui-badge[data-tone='danger'] {
55
+ .vmz-ui-badge[data-tone="danger"] {
49
56
  border-color: var(--vmz-status-danger-accent);
50
57
  background: color-mix(in srgb, var(--vmz-status-danger-accent) 12%, var(--vmz-surface-paper));
51
58
  color: var(--vmz-status-danger-foreground);
52
- }
59
+ }
53
60
  </style>
54
-
55
61
  <script client>
56
62
  /**
57
- * VMZ UI — Badge (Foundation).
58
- * Compact status / label chip; tones share status.* + action tokens.
59
- */
63
+ * VMZ UI — Badge (Foundation).
64
+ * Compact status / label chip; tones share status.* + action tokens.
65
+ */
60
66
  export default class Badge {
61
- static __vmzHostBox = 'contents';
62
- public tone: string = "brand";
67
+ static __vmzHostBox = "contents";
68
+ public tone: string = "brand";
63
69
  }
64
70
  </script>
@@ -1,20 +1,23 @@
1
1
  <template>
2
- <nav class="vmz-ui-breadcrumb" data-vmz-ui="breadcrumb" :aria-label="label">
3
- <ol class="vmz-ui-breadcrumb__list">
4
- <li v-for="item in items" :key="item.id" class="vmz-ui-breadcrumb__item" :data-vmz-crumb="item.id">
5
- <a v-if="item.href" class="vmz-ui-breadcrumb__link" :href="item.href">{{ item.title }}</a>
6
- <span v-if="!item.href" class="vmz-ui-breadcrumb__current" aria-current="page">{{ item.title }}</span>
7
- </li>
8
- </ol>
2
+ <nav data-vmz-ui="breadcrumb" :aria-label="label" class="vmz-ui-breadcrumb">
3
+ <ol class="vmz-ui-breadcrumb__list">
4
+ <li v-for="item in items" :key="item.id" :data-vmz-crumb="item.id" class="vmz-ui-breadcrumb__item">
5
+ <a v-if="item.href" :href="item.href" class="vmz-ui-breadcrumb__link">
6
+ {{ item.title }}
7
+ </a>
8
+ <span v-if="!item.href" aria-current="page" class="vmz-ui-breadcrumb__current">
9
+ {{ item.title }}
10
+ </span>
11
+ </li>
12
+ </ol>
9
13
  </nav>
10
14
  </template>
11
-
12
15
  <style>
13
- .vmz-ui-breadcrumb {
16
+ .vmz-ui-breadcrumb {
14
17
  font: inherit;
15
- }
18
+ }
16
19
 
17
- .vmz-ui-breadcrumb__list {
20
+ .vmz-ui-breadcrumb__list {
18
21
  display: flex;
19
22
  flex-wrap: wrap;
20
23
  gap: 0.35rem 0.55rem;
@@ -22,49 +25,48 @@
22
25
  padding: 0;
23
26
  list-style: none;
24
27
  align-items: center;
25
- }
28
+ }
26
29
 
27
- .vmz-ui-breadcrumb__item {
30
+ .vmz-ui-breadcrumb__item {
28
31
  display: inline-flex;
29
32
  align-items: center;
30
33
  gap: 0.55rem;
31
34
  font-weight: 600;
32
- }
35
+ }
33
36
 
34
- .vmz-ui-breadcrumb__item:not(:last-child)::after {
35
- content: '/';
37
+ .vmz-ui-breadcrumb__item:not(:last-child)::after {
38
+ content: "/";
36
39
  color: var(--vmz-action-primary-active);
37
40
  opacity: 0.55;
38
41
  font-weight: 400;
39
- }
42
+ }
40
43
 
41
- .vmz-ui-breadcrumb__link {
44
+ .vmz-ui-breadcrumb__link {
42
45
  color: var(--vmz-action-primary-background);
43
46
  text-decoration: none;
44
- }
47
+ }
45
48
 
46
- .vmz-ui-breadcrumb__link:focus-visible {
49
+ .vmz-ui-breadcrumb__link:focus-visible {
47
50
  outline: none;
48
51
  box-shadow: 0 0 0 2px var(--vmz-focus-ring);
49
- }
52
+ }
50
53
 
51
- .vmz-ui-breadcrumb__current {
54
+ .vmz-ui-breadcrumb__current {
52
55
  color: var(--vmz-action-primary-active);
53
- }
56
+ }
54
57
  </style>
55
-
56
58
  <script client>
57
59
  /**
58
- * VMZ UI — Breadcrumb (UI5 Console Surface).
59
- * Parent owns items; last crumb typically has no href (current page).
60
- */
60
+ * VMZ UI — Breadcrumb (UI5 Console Surface).
61
+ * Parent owns items; last crumb typically has no href (current page).
62
+ */
61
63
  export default class Breadcrumb {
62
- public label: string = "Breadcrumb";
63
- /** @type {{ id: string, title: string, href?: string }[]} */
64
- public items: {
65
- id: string;
66
- title: string;
67
- href?: string;
68
- }[] = [];
64
+ public label: string = "Breadcrumb";
65
+ /** @type {{ id: string, title: string, href?: string }[]} */
66
+ public items: {
67
+ id: string;
68
+ title: string;
69
+ href?: string;
70
+ }[] = [];
69
71
  }
70
72
  </script>
@@ -1,20 +1,15 @@
1
1
  <template>
2
- <div
3
- class="vmz-ui-bulk-actions"
4
- data-vmz-ui="bulk-actions"
5
- role="region"
6
- :aria-label="label"
7
- :data-open="selectedCount ? 'true' : 'false'"
8
- >
9
- <p class="vmz-ui-bulk-actions__count" data-vmz-fixture="bulk-count">{{ countLabel }}</p>
10
- <div class="vmz-ui-bulk-actions__actions">
11
- <slot />
12
- </div>
2
+ <div data-vmz-ui="bulk-actions" role="region" :aria-label="label" :data-open='selectedCount ? "true" : "false"' class="vmz-ui-bulk-actions">
3
+ <p data-vmz-fixture="bulk-count" class="vmz-ui-bulk-actions__count">
4
+ {{ countLabel }}
5
+ </p>
6
+ <div class="vmz-ui-bulk-actions__actions">
7
+ <slot />
8
+ </div>
13
9
  </div>
14
10
  </template>
15
-
16
11
  <style>
17
- .vmz-ui-bulk-actions {
12
+ .vmz-ui-bulk-actions {
18
13
  display: flex;
19
14
  flex-wrap: wrap;
20
15
  align-items: center;
@@ -24,34 +19,33 @@
24
19
  border: 1px solid var(--vmz-line-default);
25
20
  border-radius: var(--vmz-radius-md, 6px);
26
21
  background: transparent;
27
- }
22
+ }
28
23
 
29
- /* Keep host+slot mounted so default slot projects at create time (not inside v-if). */
30
- .vmz-ui-bulk-actions[data-open='false'] {
24
+ /* Keep host+slot mounted so default slot projects at create time (not inside v-if). */
25
+ .vmz-ui-bulk-actions[data-open="false"] {
31
26
  display: none;
32
- }
27
+ }
33
28
 
34
- .vmz-ui-bulk-actions__count {
29
+ .vmz-ui-bulk-actions__count {
35
30
  margin: 0;
36
31
  font-weight: 700;
37
32
  color: var(--vmz-action-primary-active);
38
- }
33
+ }
39
34
 
40
- .vmz-ui-bulk-actions__actions {
35
+ .vmz-ui-bulk-actions__actions {
41
36
  display: flex;
42
37
  flex-wrap: wrap;
43
38
  gap: 0.5rem;
44
- }
39
+ }
45
40
  </style>
46
-
47
41
  <script client>
48
42
  /**
49
- * VMZ UI — BulkActions (Console composition).
50
- * Hides when selectedCount is falsy but keeps the tree mounted so parent slot children project.
51
- */
43
+ * VMZ UI — BulkActions (Console composition).
44
+ * Hides when selectedCount is falsy but keeps the tree mounted so parent slot children project.
45
+ */
52
46
  export default class BulkActions {
53
- public label: string = "Bulk actions";
54
- public selectedCount: number = 0;
55
- public countLabel: string = "";
47
+ public label: string = "Bulk actions";
48
+ public selectedCount: number = 0;
49
+ public countLabel: string = "";
56
50
  }
57
51
  </script>