@designa8/vibedesign-nestora-ds-v1-176b 0.2.3 → 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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-nestora-ds-v1-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.2.3**.
3
+ Complete design system generated by Atoms Design, version **0.2.4**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -5266,6 +5266,10 @@ var LEADING = "flex min-w-0 items-center gap-sm";
5266
5266
  var TRAILING = "flex shrink-0 items-center gap-sm";
5267
5267
  var META = "text-body-md font-weight-body-md text-muted";
5268
5268
  var ROW_POINTER = "cursor-pointer transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50";
5269
+ var ROW_VARIANT = {
5270
+ card: { variant: "row", size: "md" },
5271
+ plain: { variant: "row-quiet", size: "md" }
5272
+ };
5269
5273
  var ListItem = React40.forwardRef(
5270
5274
  function ListItem2({
5271
5275
  icon = "arrow-up-right",
@@ -5274,6 +5278,7 @@ var ListItem = React40.forwardRef(
5274
5278
  selected,
5275
5279
  trailingIcon = "chevron-right",
5276
5280
  visualState = "rest",
5281
+ chrome = "card",
5277
5282
  disabled = false,
5278
5283
  className,
5279
5284
  children,
@@ -5283,13 +5288,14 @@ var ListItem = React40.forwardRef(
5283
5288
  }, ref) {
5284
5289
  const leadingNode = leading ?? (icon ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: icon, size: 18, strokeWidth: 1.75, className: "shrink-0" }) : null);
5285
5290
  const isOption = selected !== void 0;
5291
+ const recipe = ROW_VARIANT[chrome] ?? ROW_VARIANT.card;
5286
5292
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5287
5293
  Button,
5288
5294
  {
5289
5295
  ref,
5290
5296
  type,
5291
- variant: "row",
5292
- size: "md",
5297
+ variant: recipe.variant,
5298
+ size: recipe.size,
5293
5299
  role: role ?? (isOption ? "option" : void 0),
5294
5300
  "aria-selected": isOption ? selected : void 0,
5295
5301
  "aria-checked": isOption ? selected : void 0,
package/dist/index.js CHANGED
@@ -5141,6 +5141,10 @@ var LEADING = "flex min-w-0 items-center gap-sm";
5141
5141
  var TRAILING = "flex shrink-0 items-center gap-sm";
5142
5142
  var META = "text-body-md font-weight-body-md text-muted";
5143
5143
  var ROW_POINTER = "cursor-pointer transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50";
5144
+ var ROW_VARIANT = {
5145
+ card: { variant: "row", size: "md" },
5146
+ plain: { variant: "row-quiet", size: "md" }
5147
+ };
5144
5148
  var ListItem = React40.forwardRef(
5145
5149
  function ListItem2({
5146
5150
  icon = "arrow-up-right",
@@ -5149,6 +5153,7 @@ var ListItem = React40.forwardRef(
5149
5153
  selected,
5150
5154
  trailingIcon = "chevron-right",
5151
5155
  visualState = "rest",
5156
+ chrome = "card",
5152
5157
  disabled = false,
5153
5158
  className,
5154
5159
  children,
@@ -5158,13 +5163,14 @@ var ListItem = React40.forwardRef(
5158
5163
  }, ref) {
5159
5164
  const leadingNode = leading ?? (icon ? /* @__PURE__ */ jsx40(Icon, { name: icon, size: 18, strokeWidth: 1.75, className: "shrink-0" }) : null);
5160
5165
  const isOption = selected !== void 0;
5166
+ const recipe = ROW_VARIANT[chrome] ?? ROW_VARIANT.card;
5161
5167
  return /* @__PURE__ */ jsxs37(
5162
5168
  Button,
5163
5169
  {
5164
5170
  ref,
5165
5171
  type,
5166
- variant: "row",
5167
- size: "md",
5172
+ variant: recipe.variant,
5173
+ size: recipe.size,
5168
5174
  role: role ?? (isOption ? "option" : void 0),
5169
5175
  "aria-selected": isOption ? selected : void 0,
5170
5176
  "aria-checked": isOption ? selected : void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-nestora-ds-v1-176b",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Design system generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -11,6 +11,13 @@ type IconGlyph = React.ComponentProps<typeof Icon>["name"];
11
11
  */
12
12
  export type ListItemVisualState = "rest" | "hover";
13
13
 
14
+ /**
15
+ * Row chrome. `card` (default) is the bordered, canvas-filled row for a loose
16
+ * list. `plain` is the borderless, transparent row for a list that already sits
17
+ * inside a bordered panel — a command palette, a popover, a menu-like surface.
18
+ */
19
+ export type ListItemChrome = "card" | "plain";
20
+
14
21
  export interface ListItemProps
15
22
  extends Omit<React.ComponentPropsWithoutRef<"button">, "children"> {
16
23
  /** Row label — the primary line the row is about. */
@@ -31,6 +38,12 @@ export interface ListItemProps
31
38
  trailingIcon?: IconGlyph | null;
32
39
  /** Freezes one interaction state at rest (documentation boards). */
33
40
  visualState?: ListItemVisualState;
41
+ /**
42
+ * `card` (default) keeps the bordered row. `plain` drops the border and the
43
+ * canvas fill so the row sits flush inside a panel that already owns a
44
+ * stroke — no box inside a box.
45
+ */
46
+ chrome?: ListItemChrome;
34
47
  }
35
48
 
36
49
  const LEADING = "flex min-w-0 items-center gap-sm";
@@ -48,10 +61,16 @@ const ROW_POINTER =
48
61
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue " +
49
62
  "disabled:cursor-not-allowed disabled:opacity-50";
50
63
 
64
+ const ROW_VARIANT = {
65
+ card: { variant: "row", size: "md" },
66
+ plain: { variant: "row-quiet", size: "md" },
67
+ } as const;
68
+
51
69
  /**
52
70
  * Compact navigation row: leading glyph, label, an optional trailing value, and
53
71
  * a disclosure chevron. Used in a settings list, a category picker, or a
54
- * selectable group.
72
+ * selectable group. Pass `chrome="plain"` inside an already-bordered panel
73
+ * (command palette results, popover lists).
55
74
  */
56
75
  export const ListItem = React.forwardRef<HTMLButtonElement, ListItemProps>(
57
76
  function ListItem(
@@ -62,6 +81,7 @@ export const ListItem = React.forwardRef<HTMLButtonElement, ListItemProps>(
62
81
  selected,
63
82
  trailingIcon = "chevron-right",
64
83
  visualState = "rest",
84
+ chrome = "card",
65
85
  disabled = false,
66
86
  className,
67
87
  children,
@@ -79,12 +99,14 @@ export const ListItem = React.forwardRef<HTMLButtonElement, ListItemProps>(
79
99
 
80
100
  const isOption = selected !== undefined;
81
101
 
102
+ const recipe = ROW_VARIANT[chrome] ?? ROW_VARIANT.card;
103
+
82
104
  return (
83
105
  <Button
84
106
  ref={ref}
85
107
  type={type}
86
- variant="row"
87
- size="md"
108
+ variant={recipe.variant}
109
+ size={recipe.size}
88
110
  role={role ?? (isOption ? "option" : undefined)}
89
111
  aria-selected={isOption ? selected : undefined}
90
112
  /* The shared row recipe paints its chosen state from aria-checked. */
@@ -7,12 +7,28 @@ const OPTIONS = [
7
7
  { id: "rent", label: "Rent", meta: "1,250 USD" },
8
8
  ];
9
9
 
10
+ const COMMANDS = [
11
+ { id: "new-payment", label: "New payment", meta: "1,000 USD" },
12
+ { id: "add-payee", label: "Add a payee", meta: "240 USD" },
13
+ { id: "export", label: "Export statement", meta: "0 USD" },
14
+ ];
15
+
10
16
  const HEADING = "text-heading-xs text-ink";
11
17
 
12
18
  const CAPTION = "block text-caption text-muted";
13
19
 
20
+ /* A panel that already owns the stroke — the rows inside it must not add one. */
21
+ const PANEL =
22
+ "w-full rounded-lg border border-hairline bg-surface p-xs shadow-card";
23
+
14
24
  export default function ListItemPreview() {
15
- const [selected, setSelected] = React.useState("transfers");
25
+ const [selected, setSelected] = React.useState<string | null>(null);
26
+ const [command, setCommand] = React.useState<string | null>(null);
27
+
28
+ const selectedLabel =
29
+ OPTIONS.find((option) => option.id === selected)?.label ?? "none";
30
+ const commandLabel =
31
+ COMMANDS.find((entry) => entry.id === command)?.label ?? "none";
16
32
 
17
33
  return (
18
34
  <div className="w-full max-w-3xl mx-auto space-y-xl p-lg text-ink">
@@ -23,21 +39,38 @@ export default function ListItemPreview() {
23
39
  aria-label="Recent payees"
24
40
  className="flex w-full flex-col gap-xs"
25
41
  >
26
- {OPTIONS.map((option) => {
27
- const isSelected = selected === option.id;
28
- return (
29
- <ListItem
30
- key={option.id}
31
- selected={isSelected}
32
- meta={isSelected ? option.meta : undefined}
33
- onClick={() => setSelected(option.id)}
34
- >
35
- {option.label}
36
- </ListItem>
37
- );
38
- })}
42
+ {OPTIONS.map((option) => (
43
+ <ListItem
44
+ key={option.id}
45
+ selected={selected === option.id}
46
+ meta={option.meta}
47
+ onClick={() => setSelected(option.id)}
48
+ >
49
+ {option.label}
50
+ </ListItem>
51
+ ))}
52
+ </div>
53
+ <span className={CAPTION}>{`Selected: ${selectedLabel}`}</span>
54
+ </section>
55
+
56
+ <section className="space-y-sm">
57
+ <h2 className={HEADING}>Inside a bordered panel</h2>
58
+ <div role="listbox" aria-label="Command results" className={PANEL}>
59
+ {COMMANDS.map((entry) => (
60
+ <ListItem
61
+ key={entry.id}
62
+ chrome="plain"
63
+ selected={command === entry.id}
64
+ meta={entry.meta}
65
+ onClick={() => setCommand(entry.id)}
66
+ >
67
+ {entry.label}
68
+ </ListItem>
69
+ ))}
39
70
  </div>
40
- <span className={CAPTION}>Click a row to select it.</span>
71
+ <span className={CAPTION}>
72
+ {`Selected: ${commandLabel} — chrome="plain" keeps a single stroke on the panel.`}
73
+ </span>
41
74
  </section>
42
75
 
43
76
  <section className="space-y-sm">
@@ -51,14 +84,6 @@ export default function ListItemPreview() {
51
84
  <ListItem visualState="hover">Transfers</ListItem>
52
85
  <span className={CAPTION}>Hover</span>
53
86
  </div>
54
- <div className="space-y-xs">
55
- <div role="listbox" aria-label="Selected example">
56
- <ListItem selected meta="1,000 USD">
57
- Transfers
58
- </ListItem>
59
- </div>
60
- <span className={CAPTION}>Selected</span>
61
- </div>
62
87
  <div className="space-y-xs">
63
88
  <ListItem meta="1,000 USD">Transfers</ListItem>
64
89
  <span className={CAPTION}>With meta</span>