@designa8/vibedesign-v6 1.8.3 → 1.8.5

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plasma/vibedesign-v6
2
2
 
3
- Generated design system, version **1.8.3**.
3
+ Generated design system, version **1.8.5**.
4
4
 
5
5
  ## Local install (npm link)
6
6
 
package/dist/index.cjs CHANGED
@@ -3086,12 +3086,14 @@ var FilterTabBar = import_react13.default.forwardRef(
3086
3086
  {
3087
3087
  role: "tab",
3088
3088
  "aria-selected": isActive,
3089
+ "aria-label": tab.label ?? tab.value,
3089
3090
  variant: isActive ? "primary" : "ghost",
3090
3091
  size: "sm",
3091
3092
  onClick: () => onChange(tab.value),
3092
3093
  className: "gap-xs",
3093
3094
  children: [
3094
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: tab.label }),
3095
+ tab.icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
3096
+ tab.label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: tab.label }),
3095
3097
  tab.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3096
3098
  "span",
3097
3099
  {
@@ -3286,6 +3288,7 @@ var PreviewToolbar = import_react15.default.forwardRef(
3286
3288
  onInspectTokens,
3287
3289
  onFullscreen,
3288
3290
  onExpand,
3291
+ expanded = false,
3289
3292
  modelLabel = "Sonnet 4.6",
3290
3293
  kindLabel = "ATOM",
3291
3294
  onOverflow,
@@ -3313,21 +3316,24 @@ var PreviewToolbar = import_react15.default.forwardRef(
3313
3316
  ViewportBtn,
3314
3317
  {
3315
3318
  label,
3316
- active: viewport === id,
3319
+ active: !expanded && viewport === id,
3317
3320
  onClick: () => onViewportChange?.(id),
3318
3321
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, {})
3319
3322
  },
3320
3323
  id
3321
3324
  )),
3322
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-px h-4 bg-hairline mx-xxs", "aria-hidden": true }),
3323
3325
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3324
3326
  Button,
3325
3327
  {
3326
- variant: "ghost",
3328
+ variant: expanded ? "primary" : "ghost",
3327
3329
  size: "sm",
3328
3330
  "aria-label": "Expand preview",
3331
+ "aria-pressed": expanded,
3329
3332
  onClick: onExpand,
3330
- className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
3333
+ className: [
3334
+ "!w-8 !h-8 !p-0 rounded-sm shrink-0",
3335
+ expanded ? "" : "text-muted"
3336
+ ].join(" "),
3331
3337
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ExpandIcon, {})
3332
3338
  }
3333
3339
  )
package/dist/index.js CHANGED
@@ -3038,12 +3038,14 @@ var FilterTabBar = React13.forwardRef(
3038
3038
  {
3039
3039
  role: "tab",
3040
3040
  "aria-selected": isActive,
3041
+ "aria-label": tab.label ?? tab.value,
3041
3042
  variant: isActive ? "primary" : "ghost",
3042
3043
  size: "sm",
3043
3044
  onClick: () => onChange(tab.value),
3044
3045
  className: "gap-xs",
3045
3046
  children: [
3046
- /* @__PURE__ */ jsx13("span", { children: tab.label }),
3047
+ tab.icon && /* @__PURE__ */ jsx13("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
3048
+ tab.label && /* @__PURE__ */ jsx13("span", { children: tab.label }),
3047
3049
  tab.count !== void 0 && /* @__PURE__ */ jsx13(
3048
3050
  "span",
3049
3051
  {
@@ -3238,6 +3240,7 @@ var PreviewToolbar = React15.forwardRef(
3238
3240
  onInspectTokens,
3239
3241
  onFullscreen,
3240
3242
  onExpand,
3243
+ expanded = false,
3241
3244
  modelLabel = "Sonnet 4.6",
3242
3245
  kindLabel = "ATOM",
3243
3246
  onOverflow,
@@ -3265,21 +3268,24 @@ var PreviewToolbar = React15.forwardRef(
3265
3268
  ViewportBtn,
3266
3269
  {
3267
3270
  label,
3268
- active: viewport === id,
3271
+ active: !expanded && viewport === id,
3269
3272
  onClick: () => onViewportChange?.(id),
3270
3273
  children: /* @__PURE__ */ jsx15(Icon, {})
3271
3274
  },
3272
3275
  id
3273
3276
  )),
3274
- /* @__PURE__ */ jsx15("div", { className: "w-px h-4 bg-hairline mx-xxs", "aria-hidden": true }),
3275
3277
  /* @__PURE__ */ jsx15(
3276
3278
  Button,
3277
3279
  {
3278
- variant: "ghost",
3280
+ variant: expanded ? "primary" : "ghost",
3279
3281
  size: "sm",
3280
3282
  "aria-label": "Expand preview",
3283
+ "aria-pressed": expanded,
3281
3284
  onClick: onExpand,
3282
- className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
3285
+ className: [
3286
+ "!w-8 !h-8 !p-0 rounded-sm shrink-0",
3287
+ expanded ? "" : "text-muted"
3288
+ ].join(" "),
3283
3289
  children: /* @__PURE__ */ jsx15(ExpandIcon, {})
3284
3290
  }
3285
3291
  )
package/dist/styles.css CHANGED
@@ -364,9 +364,6 @@
364
364
  .mx-xs {
365
365
  margin-inline: var(--spacing-xs);
366
366
  }
367
- .mx-xxs {
368
- margin-inline: var(--spacing-xxs);
369
- }
370
367
  .my-xl {
371
368
  margin-block: var(--spacing-xl);
372
369
  }
@@ -572,9 +569,6 @@
572
569
  .w-full {
573
570
  width: 100%;
574
571
  }
575
- .w-px {
576
- width: 1px;
577
- }
578
572
  .max-w-2xl {
579
573
  max-width: var(--container-2xl);
580
574
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-v6",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
4
4
  "description": "Design system \"Plasma Design System\" generated by atom-server.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -5,9 +5,11 @@ export interface FilterTab {
5
5
  /** Unique identifier for this tab */
6
6
  value: string;
7
7
  /** Display label */
8
- label: string;
8
+ label?: string;
9
9
  /** Optional count badge */
10
10
  count?: number;
11
+ /** Optional icon rendered before the label */
12
+ icon?: React.ReactNode;
11
13
  }
12
14
 
13
15
  export interface FilterTabBarProps
@@ -42,12 +44,19 @@ export const FilterTabBar = React.forwardRef<HTMLDivElement, FilterTabBarProps>(
42
44
  key={tab.value}
43
45
  role="tab"
44
46
  aria-selected={isActive}
47
+ aria-label={tab.label ?? tab.value}
45
48
  variant={isActive ? "primary" : "ghost"}
46
49
  size="sm"
47
50
  onClick={() => onChange(tab.value)}
48
51
  className="gap-xs"
49
52
  >
50
- <span>{tab.label}</span>
53
+ {tab.icon && (
54
+ <span className="inline-flex items-center justify-center shrink-0" aria-hidden="true">
55
+ {tab.icon}
56
+ </span>
57
+ )}
58
+
59
+ {tab.label && <span>{tab.label}</span>}
51
60
 
52
61
  {tab.count !== undefined && (
53
62
  <span
@@ -1,31 +1,113 @@
1
1
  import React, { useState } from "react";
2
2
  import { FilterTabBar } from "./FilterTabBar";
3
3
 
4
- const tabs = [
4
+ /* Minimal inline SVG icons — no external deps */
5
+ const IconGrid = () => (
6
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
7
+ <rect x="1" y="1" width="6" height="6" rx="1.5" fill="currentColor" />
8
+ <rect x="9" y="1" width="6" height="6" rx="1.5" fill="currentColor" />
9
+ <rect x="1" y="9" width="6" height="6" rx="1.5" fill="currentColor" />
10
+ <rect x="9" y="9" width="6" height="6" rx="1.5" fill="currentColor" />
11
+ </svg>
12
+ );
13
+
14
+ const IconAtom = () => (
15
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
16
+ <circle cx="8" cy="8" r="2" fill="currentColor" />
17
+ <ellipse cx="8" cy="8" rx="7" ry="3" stroke="currentColor" strokeWidth="1.25" fill="none" />
18
+ <ellipse cx="8" cy="8" rx="7" ry="3" stroke="currentColor" strokeWidth="1.25" fill="none" transform="rotate(60 8 8)" />
19
+ <ellipse cx="8" cy="8" rx="7" ry="3" stroke="currentColor" strokeWidth="1.25" fill="none" transform="rotate(120 8 8)" />
20
+ </svg>
21
+ );
22
+
23
+ const IconLayers = () => (
24
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
25
+ <path d="M8 1L15 5L8 9L1 5L8 1Z" fill="currentColor" opacity="0.4" />
26
+ <path d="M1 8L8 12L15 8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" fill="none" />
27
+ <path d="M1 11L8 15L15 11" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" fill="none" />
28
+ </svg>
29
+ );
30
+
31
+ const IconStar = () => (
32
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
33
+ <path d="M8 1l1.854 4.146H14l-3.427 2.708 1.31 4.146L8 9.764l-3.883 2.236 1.31-4.146L2 5.146h4.146L8 1z" />
34
+ </svg>
35
+ );
36
+
37
+ const IconArchive = () => (
38
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
39
+ <rect x="1" y="1" width="14" height="3" rx="1" fill="currentColor" opacity="0.5" />
40
+ <path d="M2 5h12v8a1 1 0 01-1 1H3a1 1 0 01-1-1V5z" fill="currentColor" opacity="0.3" />
41
+ <path d="M6 8h4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
42
+ </svg>
43
+ );
44
+
45
+ const tabsWithCounts = [
5
46
  { value: "all", label: "All", count: 15 },
6
47
  { value: "atoms", label: "Atoms", count: 8 },
7
48
  { value: "molecules", label: "Molecules", count: 2 },
8
49
  { value: "organisms", label: "Organisms", count: 5 },
9
- { value: "templates", label: "Templates", count: 0 },
50
+ ];
51
+
52
+ const tabsWithIcons = [
53
+ { value: "all", label: "All", icon: <IconGrid /> },
54
+ { value: "atoms", label: "Atoms", icon: <IconAtom />, count: 8 },
55
+ { value: "molecules", label: "Molecules", icon: <IconLayers />, count: 2 },
56
+ ];
57
+
58
+ const tabsIconOnly = [
59
+ { value: "all", icon: <IconGrid />, label: "All" },
60
+ { value: "starred", icon: <IconStar />, label: "Starred" },
61
+ { value: "archived", icon: <IconArchive />, label: "Archived" },
10
62
  ];
11
63
 
12
64
  export default function FilterTabBarPreview() {
13
- const [active, setActive] = useState("all");
65
+ const [active1, setActive1] = useState("all");
66
+ const [active2, setActive2] = useState("all");
67
+ const [active3, setActive3] = useState("all");
68
+ const [active4, setActive4] = useState("all");
14
69
 
15
70
  return (
16
- <div className="w-full max-w-3xl mx-auto p-xl flex flex-col items-center gap-xl bg-canvas py-xxl justify-center">
17
- <FilterTabBar tabs={tabs} value={active} onChange={setActive} />
18
-
19
- {/* No-count variant */}
20
- <FilterTabBar
21
- tabs={[
22
- { value: "recent", label: "Recent" },
23
- { value: "starred", label: "Starred" },
24
- { value: "archived", label: "Archived" },
25
- ]}
26
- value="recent"
27
- onChange={() => {}}
28
- />
71
+ <div className="w-full max-w-3xl mx-auto p-xl flex flex-col items-start gap-xl bg-canvas py-xxl">
72
+ {/* Label + count (existing behavior) */}
73
+ <div className="flex flex-col gap-sm w-full">
74
+ <p className="text-caption text-muted uppercase tracking-wide">Label + count</p>
75
+ <FilterTabBar tabs={tabsWithCounts} value={active1} onChange={setActive1} />
76
+ </div>
77
+
78
+ {/* Icon + label (new) */}
79
+ <div className="flex flex-col gap-sm w-full">
80
+ <p className="text-caption text-muted uppercase tracking-wide">Icon + label</p>
81
+ <FilterTabBar tabs={tabsWithIcons} value={active2} onChange={setActive2} />
82
+ </div>
83
+
84
+ {/* Icon + label + count (new) */}
85
+ <div className="flex flex-col gap-sm w-full">
86
+ <p className="text-caption text-muted uppercase tracking-wide">Icon + label + count</p>
87
+ <FilterTabBar
88
+ tabs={[
89
+ { value: "all", label: "All", icon: <IconGrid />, count: 15 },
90
+ { value: "atoms", label: "Atoms", icon: <IconAtom />, count: 8 },
91
+ { value: "molecules", label: "Molecules", icon: <IconLayers />, count: 2 },
92
+ ]}
93
+ value={active3}
94
+ onChange={setActive3}
95
+ />
96
+ </div>
97
+
98
+ {/* Label only (no count or icon) */}
99
+ <div className="flex flex-col gap-sm w-full">
100
+ <p className="text-caption text-muted uppercase tracking-wide">Label only</p>
101
+ <FilterTabBar
102
+ tabs={[
103
+ { value: "recent", label: "Recent" },
104
+ { value: "starred", label: "Starred" },
105
+ { value: "archived", label: "Archived" },
106
+ ]}
107
+ value={active4}
108
+ onChange={setActive4}
109
+ />
110
+ </div>
29
111
  </div>
30
112
  );
31
113
  }
@@ -97,6 +97,12 @@ export interface PreviewToolbarProps {
97
97
  onInspectTokens?: () => void;
98
98
  onFullscreen?: () => void;
99
99
  onExpand?: () => void;
100
+ /**
101
+ * When true, the expand/arrows button renders with variant=primary and
102
+ * aria-pressed=true. None of the three viewport buttons appear active while
103
+ * expanded is true — only one selection indicator is shown at a time.
104
+ */
105
+ expanded?: boolean;
100
106
  /** Model name shown as a chip, e.g. "Sonnet 4.6" */
101
107
  modelLabel?: string;
102
108
  /** Component kind shown as a chip, e.g. "ATOM" */
@@ -140,6 +146,7 @@ export const PreviewToolbar = React.forwardRef<HTMLDivElement, PreviewToolbarPro
140
146
  onInspectTokens,
141
147
  onFullscreen,
142
148
  onExpand,
149
+ expanded = false,
143
150
  modelLabel = "Sonnet 4.6",
144
151
  kindLabel = "ATOM",
145
152
  onOverflow,
@@ -167,21 +174,23 @@ export const PreviewToolbar = React.forwardRef<HTMLDivElement, PreviewToolbarPro
167
174
  <ViewportBtn
168
175
  key={id}
169
176
  label={label}
170
- active={viewport === id}
177
+ active={!expanded && viewport === id}
171
178
  onClick={() => onViewportChange?.(id)}
172
179
  >
173
180
  <Icon />
174
181
  </ViewportBtn>
175
182
  ))}
176
183
 
177
- <div className="w-px h-4 bg-hairline mx-xxs" aria-hidden />
178
-
179
184
  <Button
180
- variant="ghost"
185
+ variant={expanded ? "primary" : "ghost"}
181
186
  size="sm"
182
187
  aria-label="Expand preview"
188
+ aria-pressed={expanded}
183
189
  onClick={onExpand}
184
- className="!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0"
190
+ className={[
191
+ "!w-8 !h-8 !p-0 rounded-sm shrink-0",
192
+ expanded ? "" : "text-muted",
193
+ ].join(" ")}
185
194
  >
186
195
  <ExpandIcon />
187
196
  </Button>
@@ -5,6 +5,7 @@ export default function PreviewToolbarPreview() {
5
5
  const [viewport, setViewport] = useState<Viewport>("desktop");
6
6
  const [darkMode, setDarkMode] = useState(false);
7
7
  const [inspecting, setInspecting] = useState(false);
8
+ const [expanded, setExpanded] = useState(false);
8
9
 
9
10
  return (
10
11
  <div className="w-full max-w-5xl mx-auto p-lg space-y-xl">
@@ -12,7 +13,7 @@ export default function PreviewToolbarPreview() {
12
13
  <div className="space-y-xxs">
13
14
  <p className="text-body-sm text-muted uppercase tracking-wide">Preview toolbar</p>
14
15
  <p className="text-body-sm text-muted">
15
- Interactive — click the viewport icons, toggle Dark mode, and try Inspect tokens.
16
+ Interactive — click the viewport icons, toggle Dark mode, Inspect tokens, and the Expand button.
16
17
  </p>
17
18
  </div>
18
19
 
@@ -26,8 +27,9 @@ export default function PreviewToolbarPreview() {
26
27
  onDarkToggle={() => setDarkMode((d) => !d)}
27
28
  inspecting={inspecting}
28
29
  onInspectTokens={() => setInspecting((i) => !i)}
30
+ expanded={expanded}
31
+ onExpand={() => setExpanded((e) => !e)}
29
32
  onFullscreen={() => {}}
30
- onExpand={() => {}}
31
33
  onOverflow={() => {}}
32
34
  />
33
35
  </div>
@@ -35,10 +37,24 @@ export default function PreviewToolbarPreview() {
35
37
  <p className="text-body-sm text-muted text-center">
36
38
  Active viewport: <strong className="text-ink">{viewport}</strong> ·
37
39
  Dark mode: <strong className="text-ink">{darkMode ? "on" : "off"}</strong> ·
38
- Inspecting: <strong className="text-ink">{inspecting ? "on" : "off"}</strong>
40
+ Inspecting: <strong className="text-ink">{inspecting ? "on" : "off"}</strong> ·
41
+ Expanded: <strong className="text-ink">{expanded ? "on" : "off"}</strong>
39
42
  </p>
40
43
  </div>
41
44
 
45
+ {/* ── Variant: expanded=true ───────────────────── */}
46
+ <div className="space-y-sm">
47
+ <p className="text-body-sm text-muted font-weight-heading-sm">Expanded active (expanded=true) — viewport buttons deselected</p>
48
+ <div className="flex items-center justify-center w-full bg-canvas rounded-xl p-xl border border-hairline">
49
+ <PreviewToolbar
50
+ viewport="desktop"
51
+ expanded
52
+ modelLabel="Sonnet 4.6"
53
+ kindLabel="ATOM"
54
+ />
55
+ </div>
56
+ </div>
57
+
42
58
  {/* ── Variant: inspecting=true ─────────────────── */}
43
59
  <div className="space-y-sm">
44
60
  <p className="text-body-sm text-muted font-weight-heading-sm">Inspecting active (inspecting=true)</p>