@vmz/ui 0.1.16 → 0.1.18

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.
@@ -639,6 +639,45 @@
639
639
  ],
640
640
  "surfaces": ["WebSurface"],
641
641
  "contracts": ["hierarchy-rows", "parent-owned-expand", "parent-owned-selection", "keyboard-nav"]
642
+ },
643
+ "Segmented": {
644
+ "source": "src/components/Segmented.vmz",
645
+ "stableHint": "ui.Segmented",
646
+ "tokens": ["surface.mist", "surface.paper", "text.steel", "text.ink", "focus.ring"],
647
+ "surfaces": ["WebSurface"],
648
+ "contracts": ["parent-owned-value", "segment-press"]
649
+ },
650
+ "Dropdown": {
651
+ "source": "src/components/Dropdown.vmz",
652
+ "stableHint": "ui.Dropdown",
653
+ "tokens": ["line.default", "surface.paper", "surface.mist", "text.ink", "shadow.popup"],
654
+ "surfaces": ["WebSurface"],
655
+ "contracts": ["native-details-disclosure", "menu-links"]
656
+ },
657
+ "Collapse": {
658
+ "source": "src/components/Collapse.vmz",
659
+ "stableHint": "ui.Collapse",
660
+ "tokens": ["line.default", "surface.paper", "surface.mist", "text.steel"],
661
+ "surfaces": ["WebSurface"],
662
+ "contracts": ["native-details-panels", "independent-open"]
663
+ },
664
+ "Tag": {
665
+ "source": "src/components/Tag.vmz",
666
+ "stableHint": "ui.Tag",
667
+ "tokens": [
668
+ "line.default",
669
+ "surface.mist",
670
+ "surface.paper",
671
+ "text.steel",
672
+ "status.success.accent",
673
+ "status.success.foreground",
674
+ "status.warning.accent",
675
+ "status.warning.foreground",
676
+ "status.danger.accent",
677
+ "status.danger.foreground"
678
+ ],
679
+ "surfaces": ["WebSurface"],
680
+ "contracts": ["status-chip", "display-only"]
642
681
  }
643
682
  }
644
683
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmz/ui",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "type": "module",
5
5
  "description": "VMZ UI — official UI framework (component contracts + semantic token requirements). Not a theme. Not a plugin.",
6
6
  "license": "MIT",
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div
3
- v-if="selectedCount"
4
3
  class="vmz-ui-bulk-actions"
5
4
  data-vmz-ui="bulk-actions"
6
5
  role="region"
7
6
  :aria-label="label"
7
+ :data-open="selectedCount ? 'true' : 'false'"
8
8
  >
9
9
  <p class="vmz-ui-bulk-actions__count" data-vmz-fixture="bulk-count">{{ countLabel }}</p>
10
10
  <div class="vmz-ui-bulk-actions__actions">
@@ -26,6 +26,11 @@
26
26
  background: transparent;
27
27
  }
28
28
 
29
+ /* Keep host+slot mounted so default slot projects at create time (not inside v-if). */
30
+ .vmz-ui-bulk-actions[data-open='false'] {
31
+ display: none;
32
+ }
33
+
29
34
  .vmz-ui-bulk-actions__count {
30
35
  margin: 0;
31
36
  font-weight: 700;
@@ -42,7 +47,7 @@
42
47
  <script client>
43
48
  /**
44
49
  * VMZ UI — BulkActions (Console composition).
45
- * Renders when selectedCount is truthy; parent owns selection count + label.
50
+ * Hides when selectedCount is falsy but keeps the tree mounted so parent slot children project.
46
51
  */
47
52
  export default class BulkActions {
48
53
  public label: string = "Bulk actions";
@@ -63,10 +63,7 @@
63
63
  gap: var(--vmz-density-control-gap);
64
64
  }
65
65
 
66
- /* Direct hosts wrapping inline chips (Badge) must not introduce a block box (VMZ-10). */
67
- .vmz-ui-card__body > [data-vmz]:has(> .vmz-ui-badge) {
68
- display: contents;
69
- }
66
+ /* Direct host default is display:contents (runtime); Badge-only CSS special-case removed. */
70
67
 
71
68
  :where([data-density='compact']) .vmz-ui-card__body {
72
69
  gap: var(--vmz-density-compact-gap);
@@ -1,8 +1,12 @@
1
1
  <template>
2
2
  <div class="vmz-ui-collapse" data-vmz-ui="collapse">
3
- <details v-for="item in items" :key="item.id">
4
- <summary>{{ item.title }}</summary>
5
- <div class="vmz-ui-collapse__body">{{ item.body }}</div>
3
+ <details
4
+ v-for="item in items"
5
+ :key="item.id"
6
+ :data-vmz-collapse-item="item.id"
7
+ >
8
+ <summary :data-vmz-collapse-trigger="item.id">{{ item.title }}</summary>
9
+ <div class="vmz-ui-collapse__body" :data-vmz-collapse-body="item.id">{{ item.body }}</div>
6
10
  </details>
7
11
  </div>
8
12
  </template>
@@ -1,8 +1,13 @@
1
1
  <template>
2
2
  <details class="vmz-ui-dropdown" data-vmz-ui="dropdown">
3
- <summary>{{ label }}</summary>
4
- <div class="vmz-ui-dropdown__menu">
5
- <a v-for="item in items" :key="item.id" :href="item.href">{{ item.title }}</a>
3
+ <summary data-vmz-dropdown-trigger="1">{{ label }}</summary>
4
+ <div class="vmz-ui-dropdown__menu" data-vmz-dropdown-menu="1">
5
+ <a
6
+ v-for="item in items"
7
+ :key="item.id"
8
+ :href="item.href"
9
+ :data-vmz-dropdown-item="item.id"
10
+ >{{ item.title }}</a>
6
11
  </div>
7
12
  </details>
8
13
  </template>
@@ -4,8 +4,9 @@
4
4
  v-for="opt in options"
5
5
  :key="opt.value"
6
6
  type="button"
7
+ :data-vmz-segment="opt.value"
7
8
  :aria-pressed="opt.value === value ? 'true' : 'false'"
8
- @click="() => onPick(opt.value)"
9
+ @click="() => this.onPick(opt.value)"
9
10
  >{{ opt.label }}</button>
10
11
  </div>
11
12
  </template>
@@ -1,4 +1,11 @@
1
- <template><span class="vmz-ui-tag" data-vmz-ui="tag" :data-status="status||undefined"><slot /></span></template>
1
+ <template>
2
+ <span
3
+ class="vmz-ui-tag"
4
+ data-vmz-ui="tag"
5
+ :data-status="status || undefined"
6
+ :data-vmz-tag-status="status || undefined"
7
+ ><slot /></span>
8
+ </template>
2
9
  <style>
3
10
  .vmz-ui-tag{display:inline-flex;align-items:center;min-height:1.5rem;padding:0 .45rem;border:1px solid var(--vmz-line-default);border-radius:var(--vmz-radius-sm,2px);background:var(--vmz-surface-mist);color:var(--vmz-text-steel);font-size:.75rem;line-height:1}
4
11
  .vmz-ui-tag[data-status='success']{color:var(--vmz-status-success-foreground);background:color-mix(in srgb,var(--vmz-status-success-accent) 12%,var(--vmz-surface-paper));border-color:color-mix(in srgb,var(--vmz-status-success-accent) 45%,var(--vmz-line-default))}