@softure-ai/theme-notion 0.33.0 → 0.34.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,24 @@ Newest first. Each version lists what changed for an app that uses the theme. Wh
4
4
  production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
5
5
  "Definition of done").
6
6
 
7
+ ## 0.34.0
8
+
9
+ - `ListEntry` (#1481): a list row with an identity and a right column. `title` and `details` (the lines under it) on
10
+ the left; `status` at the top of the right column and `actions` under it. With `href` (and `linkComponent` for a
11
+ router's link) the title's link is stretched over the whole row with an arrow beside the column, which never wraps
12
+ alone; the column stays above the link. Below `md` the column wraps under the identity, right-aligned, with 44 px
13
+ controls. A control marked `data-row-wide` makes the column take the full row width, its lines starting on the left.
14
+ `ListRow` is unchanged.
15
+ - `ResultBadge` (#1481): a result as a filled tag in its tone's colour (`TONE_COLORS`), the tone's icon
16
+ (`RESULT_BADGE_ICONS`, overridable with `icon`) and always a word; `isSpinning` spins the icon
17
+ (`motion-safe:animate-spin`) for a run in progress.
18
+ - Migration: an app that built its own list row with a state/actions column and a stretched title link, or its own
19
+ result badge on the tones, replaces them with `ListEntry` and `ResultBadge`.
20
+ - `Badge` (#1482): a badge given a palette `color` renders `data-color="<color>"` next to its `data-variant`, the way
21
+ `Status` names its colour, so a browser test checks a filled tag with `[data-color=red]` as it checks a status.
22
+ `color="none"` or no colour sets nothing; an app's own `data-color` still wins.
23
+ - Migration: an app that added its own `data-tone` or `data-color` to its badges to test their colour drops it.
24
+
7
25
  ## 0.33.0
8
26
 
9
27
  - `DialogContent` and `SheetContent` (#1476): on open they focus the first form field (`input` other than hidden,
package/README.md CHANGED
@@ -109,6 +109,9 @@ name outside a `CommandDialog`; without it the field has none), `SortableList in
109
109
  does not fit ends in an ellipsis while the icon keeps its size, and the full word is the badge's `title` when it is
110
110
  a string or a number (pass `title` for any other node). A plain `Badge` clips its text at the end; wrap the
111
111
  text in `<span className="min-w-0 truncate">` for an ellipsis.
112
+ - A badge names its colour and variant in attributes, so a browser test checks them without parsing classes: a
113
+ `Badge` with a palette `color` renders `data-color="<color>"` next to `data-variant` (none for `color="none"`), and
114
+ a `Status` renders `data-color` the same way (`[data-slot=badge][data-color=red]`).
112
115
  - Installed on a phone's home screen (`viewport-fit=cover`), the parts at a screen edge pad by the screen's
113
116
  safe-area insets on the edges they touch: `SheetContent` (every `side`, its close button too), the `Sidebar` on a
114
117
  phone, the popper `SelectContent` (its height stops short of the inset it opens towards) and `PageFrame`. The insets
@@ -139,7 +142,7 @@ All 37 shadcn/ui components of the design system, exported from the package root
139
142
  avatar, badge, breadcrumb, button, button-group, card, checkbox, collapsible, command, dialog, dropdown-menu, empty,
140
143
  field, input, input-group, item, kbd, label, popover, progress, radio-group, scroll-area, select, separator, sheet,
141
144
  sidebar, skeleton, sonner (`Toaster`), spinner, switch, table, tabs, textarea, tooltip. Compositions: `Status` (badge, icon,
142
- word), `PageHeader` (breadcrumb, icon box, title, description, actions), `PageLayout` (a screen in the app shell: its
145
+ word), `ResultBadge` (a result as a filled tag in its tone's colour, with an icon and a word, below), `PageHeader` (breadcrumb, icon box, title, description, actions), `PageLayout` (a screen in the app shell: its
143
146
  `PageHeader`, then its sections, at one width and spacing, below), `PropertyList` (fields of one record),
144
147
  `DetailTable` (an item's details as a label and value table, laid out fixed at its container's width, each label
145
148
  above its value where the table is narrower than 28rem), `FoldRow` (a list row folding open to a `DetailTable`
@@ -154,6 +157,7 @@ stages with a state, below), `Timeline` (dated entries on a vertical rail, below
154
157
  `Prose` (the text styles of a long read the app does not draw itself, such as Markdown rendered to HTML, below),
155
158
  `SortableList`, `SortableItem`, `SortableHandle` and `SortableActivator` (rows reordered by dragging, below),
156
159
  `List`, `ListItem` and `ListRow` (a list of rows, compact or roomy by the page's density, below),
160
+ `ListEntry` (a list row with an identity and a right column, its state over its controls, below),
157
161
  `ListGroup` and `ListGroupHeading` (a run of rows under a heading that sticks at the top of its scroll, below),
158
162
  `MiniProgress` (a compact bar with its figure inside, for a table cell or a tile, below),
159
163
  `UpdatePrompt` (the offer to reload into a new build, for an installed app, below),
@@ -521,6 +525,48 @@ scheme the theme's `border` is that card's own grey.
521
525
  renders with other components, `LIST_CLASSES` holds the same classes (`list`, `tintedList`, `item`, `row`), e.g.
522
526
  `<SortableList className={LIST_CLASSES.list}>` with `<SortableItem className={LIST_CLASSES.item}>`.
523
527
 
528
+ **`ListEntry`: a row with a right column.** The most common row of an admin list: what the row is on the left
529
+ (`title`, in the medium weight, and `details`, the lines under it in the muted colour) and a right column with the
530
+ row's state on top (`status`, badges that wrap right-aligned) and its controls under it (`actions`). With `href` the
531
+ title is a link stretched over the whole row, so the row is one box lit on hover with one focus ring, and a muted arrow
532
+ sits beside the column; the arrow and the column are one group, so the arrow never wraps onto a line of its own. The
533
+ column stays above the link: its controls are their own targets, and a click on the gap between them or on the arrow
534
+ still opens the row. Pass `linkComponent` for a router's link (it takes `href`, `className` and `children`). On a
535
+ phone (below `md`) the column wraps under the identity, right-aligned, and every control is at least the touch target
536
+ (44 px). A control that needs room while it is open (an inline answer form) carries `data-row-wide`: the column then
537
+ takes the full row width under the identity, its lines starting on the left. Place the row in a `ListItem`, so it
538
+ follows the list's density.
539
+
540
+ ```tsx
541
+ <List aria-label="Deploys">
542
+ {deploys.map((deploy) => (
543
+ <ListItem key={deploy.id}>
544
+ <ListEntry
545
+ href={`/deploys/${deploy.id}`}
546
+ linkComponent={Link}
547
+ title={deploy.name}
548
+ details={<><span>{deploy.branch}</span><span>{deploy.startedAt}</span></>}
549
+ status={<ResultBadge tone={TONE_BY_RESULT[deploy.result]}>{deploy.resultLabel}</ResultBadge>}
550
+ actions={<Button variant="ghost" size="icon-sm" aria-label="Retry"><RotateCw /></Button>}
551
+ />
552
+ </ListItem>
553
+ ))}
554
+ </List>
555
+ ```
556
+
557
+ **`ResultBadge`: a result in its tone.** A result (passed, failed, skipped, running) as a filled tag in its tone's
558
+ colour (`TONE_COLORS`: `success` green, `warning` orange, `danger` red, `muted` gray, `default` the default tag), with
559
+ the tone's icon (`RESULT_BADGE_ICONS`: `CircleCheck`, `TriangleAlert`, `CircleX`, `CircleMinus`, `Circle`; pass
560
+ `icon` for another) and always a word. The app keeps its own table of which result takes which tone; the theme owns
561
+ the colours, so "failed" is red in every list. `isSpinning` marks a run still in progress: the icon (a
562
+ `LoaderCircle` unless `icon` is given) spins with `motion-safe:animate-spin`, still for a reader who asked for reduced
563
+ motion. `Status` is the ghost counterpart, for a state written in text colour.
564
+
565
+ ```tsx
566
+ <ResultBadge tone="danger">Failed</ResultBadge>
567
+ <ResultBadge tone="muted" isSpinning>Running</ResultBadge>
568
+ ```
569
+
524
570
  **`ListGroup`, `ListGroupHeading`: a sticky group heading.** A heading over a run of rows (a country's days, a month's
525
571
  entries) that sticks at the top of the scroll container while its rows pass under it, and is pushed away by the next
526
572
  group's heading. Put the groups straight in the scrolling element and give it no padding: a sticky box sticks at the
package/dist/index.d.ts CHANGED
@@ -50,7 +50,7 @@ export { FilterChip, FilterChipAdd, type FilterChipAddProps, type FilterChipProp
50
50
  export { FoldRow, type FoldRowBadge, type FoldRowProps } from "./notion/FoldRow.js";
51
51
  export { InstallBar, type InstallBarOffer, type InstallBarProps } from "./notion/InstallBar.js";
52
52
  export { LaunchScreen, type LaunchScreenProps } from "./notion/LaunchScreen.js";
53
- export { LIST_CLASSES, List, ListGroup, ListGroupHeading, ListItem, ListRow, type ListGroupHeadingProps, type ListGroupProps, type ListItemProps, type ListProps, type ListRowProps, type ListSurface, } from "./notion/List.js";
53
+ export { LIST_CLASSES, List, ListGroup, ListGroupHeading, ListItem, ListEntry, ListRow, type ListGroupHeadingProps, type ListGroupProps, type ListItemProps, type ListProps, type ListEntryLinkComponent, type ListEntryProps, type ListRowProps, type ListSurface, } from "./notion/List.js";
54
54
  export { PALETTE_COLORS, type PaletteColor } from "./notion/palette.js";
55
55
  export { MarkPopover, type MarkPopoverProps } from "./notion/MarkPopover.js";
56
56
  export { MiniProgress, type MiniProgressProps } from "./notion/MiniProgress.js";
@@ -69,6 +69,7 @@ export { SortableActivator, SortableHandle, SortableItem, SortableList, type Sor
69
69
  export { StatCards, StatPills, StatsFold, type StatCard, type StatCardAside, type StatCardsProps, type StatPill, type StatPillsProps, type StatsFoldProps, } from "./notion/Stats.js";
70
70
  export { FileInput, type FileInputMessages, type FileInputMessagesOverride, type FileInputProps } from "./notion/FileInput.js";
71
71
  export { FormGrid, type FormGridColumns, type FormGridProps } from "./notion/FormGrid.js";
72
+ export { RESULT_BADGE_ICONS, ResultBadge, type ResultBadgeProps } from "./notion/ResultBadge.js";
72
73
  export { Status, type StatusProps } from "./notion/Status.js";
73
74
  export { Steps, type StepItem, type StepState, type StepsLayout, type StepsProps } from "./notion/Steps.js";
74
75
  export { TabBar, type TabBarItem, type TabBarProps } from "./notion/TabBar.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1E,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,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,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACjG,OAAO,EACL,WAAW,EACX,UAAU,EACV,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ export { FilterChip, FilterChipAdd } from "./notion/FilterChip.js";
52
52
  export { FoldRow } from "./notion/FoldRow.js";
53
53
  export { InstallBar } from "./notion/InstallBar.js";
54
54
  export { LaunchScreen } from "./notion/LaunchScreen.js";
55
- export { LIST_CLASSES, List, ListGroup, ListGroupHeading, ListItem, ListRow, } from "./notion/List.js";
55
+ export { LIST_CLASSES, List, ListGroup, ListGroupHeading, ListItem, ListEntry, ListRow, } from "./notion/List.js";
56
56
  export { PALETTE_COLORS } from "./notion/palette.js";
57
57
  export { MarkPopover } from "./notion/MarkPopover.js";
58
58
  export { MiniProgress } from "./notion/MiniProgress.js";
@@ -71,6 +71,7 @@ export { SortableActivator, SortableHandle, SortableItem, SortableList, } from "
71
71
  export { StatCards, StatPills, StatsFold, } from "./notion/Stats.js";
72
72
  export { FileInput } from "./notion/FileInput.js";
73
73
  export { FormGrid } from "./notion/FormGrid.js";
74
+ export { RESULT_BADGE_ICONS, ResultBadge } from "./notion/ResultBadge.js";
74
75
  export { Status } from "./notion/Status.js";
75
76
  export { Steps } from "./notion/Steps.js";
76
77
  export { TabBar } from "./notion/TabBar.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,oGAAoG;AACpG,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAuB,MAAM,qBAAqB,CAAC;AAE1E,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B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Ae,EAAqB,MAAM,2BAA2B,CAAC;AACpG,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,GAOf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAA0C,MAAM,wBAAwB,CAAC;AACjG,OAAO,EACL,WAAW,EACX,UAAU,EACV,UAAU,GAQX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAA0B,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Density } from "@softure-ai/theme-kit";
2
- import type { ComponentProps } from "react";
2
+ import type { ComponentProps, ElementType, ReactNode } from "react";
3
3
  /**
4
4
  * The classes of a list that follows the density (`data-density` on the list or an ancestor; theme-kit's
5
5
  * `--list-*` variables). For a list the app renders itself, such as a `SortableList` and its `SortableItem`s.
@@ -48,6 +48,37 @@ export type ListRowProps = ComponentProps<"div"> & {
48
48
  };
49
49
  /** A row in a `ListItem`: full width, the density's vertical padding, the theme's hover. */
50
50
  export declare function ListRow({ asChild, className, ...props }: ListRowProps): import("react").JSX.Element;
51
+ /** The link a `ListEntry` title renders: a plain `a`, or the app's router link taking the same props. */
52
+ export type ListEntryLinkComponent = ElementType<{
53
+ href: string;
54
+ className?: string;
55
+ children?: ReactNode;
56
+ }>;
57
+ export type ListEntryProps = Omit<ComponentProps<"div">, "title" | "children"> & {
58
+ /** What the row is: its name, in the medium weight. With `href` it is the link that opens the row. */
59
+ readonly title: ReactNode;
60
+ /** Lines under the title (facts, a path, a time), in the muted colour; the app lays out its own lines. */
61
+ readonly details?: ReactNode;
62
+ /** The row's state, at the top of the right column (one or more badges, which wrap right-aligned). */
63
+ readonly status?: ReactNode;
64
+ /**
65
+ * The row's controls, under the status. They stay their own targets above the row's link, and are at least the
66
+ * touch target (44 px) on a phone. A control marked `data-row-wide` (an inline form that needs room) makes the right
67
+ * column take the full row width under the identity, its lines starting on the left.
68
+ */
69
+ readonly actions?: ReactNode;
70
+ /** The row opens this address: the title's link is stretched over the whole row, with an arrow at its right. */
71
+ readonly href?: string;
72
+ /** The element for the link (a router's link component); a plain `a` by default. */
73
+ readonly linkComponent?: ListEntryLinkComponent;
74
+ };
75
+ /**
76
+ * A list row with an identity and a right column: the title and its detail lines on the left, the row's state at the
77
+ * top of the right column and its controls under it. With `href` the title is a link stretched over the whole row, so
78
+ * the row is one box lit on hover, and an arrow sits beside the column (never on a line of its own); the column stays
79
+ * above the link. On a phone (below `md`) the column wraps under the identity, right-aligned. Place it in a `ListItem`.
80
+ */
81
+ export declare function ListEntry({ title, details, status, actions, href, linkComponent: Link, className, ...props }: ListEntryProps): import("react").JSX.Element;
51
82
  export type ListGroupProps = ComponentProps<"div"> & {
52
83
  /** Renders the child element (a `section`, an app's own `li`) with the group's classes. */
53
84
  readonly asChild?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/notion/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;aACvB,IAAI,EAAE,oEAAoE;aAC1E,UAAU,EAAE,wEAAwE;aACpF,IAAI,EAAE,oBAAoB;aAC1B,GAAG,EAAE,uPAAuP;aAC5P,KAAK,EAAE,4CAA4C;aACnD,YAAY,EACV,kIAAkI;aACpI,kBAAkB,EAChB,qIAAqI;CAC/H,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,GAA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I,EACJ,aAAa,EAAE,IAAU,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,+BAyEhB;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD,2FAA2F;IAC3F,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAe,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAGjF;AAED,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC1D,2GAA2G;IAC3G,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC/B,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,4GAA4G;AAC5G,wBAAgB,gBAAgB,CAAC,EAAE,OAAgB,EAAE,OAAe,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAUjH"}
@@ -1,6 +1,8 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronRight } from "lucide-react";
2
3
  import { Slot } from "radix-ui";
3
4
  import { cn } from "../lib/utils.js";
5
+ import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
4
6
  /**
5
7
  * The classes of a list that follows the density (`data-density` on the list or an ancestor; theme-kit's
6
8
  * `--list-*` variables). For a list the app renders itself, such as a `SortableList` and its `SortableItem`s.
@@ -40,6 +42,23 @@ export function ListRow({ asChild = false, className, ...props }) {
40
42
  const Comp = asChild ? Slot.Root : "div";
41
43
  return _jsx(Comp, { "data-slot": "list-row", className: cn(LIST_CLASSES.row, className), ...props });
42
44
  }
45
+ function isDrawn(node) {
46
+ return node !== undefined && node !== null && node !== false;
47
+ }
48
+ /**
49
+ * A list row with an identity and a right column: the title and its detail lines on the left, the row's state at the
50
+ * top of the right column and its controls under it. With `href` the title is a link stretched over the whole row, so
51
+ * the row is one box lit on hover, and an arrow sits beside the column (never on a line of its own); the column stays
52
+ * above the link. On a phone (below `md`) the column wraps under the identity, right-aligned. Place it in a `ListItem`.
53
+ */
54
+ export function ListEntry({ title, details, status, actions, href, linkComponent: Link = "a", className, ...props }) {
55
+ const hasStatus = isDrawn(status);
56
+ const hasActions = isDrawn(actions);
57
+ const hasColumn = hasStatus || hasActions;
58
+ const hasLink = href !== undefined;
59
+ const titleClasses = "min-w-0 text-ui-medium text-foreground";
60
+ return (_jsxs("div", { "data-slot": "list-entry", className: cn("relative flex w-full min-w-0 flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-2 py-(--list-row-y) text-ui transition-colors duration-100 hover:bg-accent", "has-[[data-slot=list-entry-title]:focus-visible]:ring-2 has-[[data-slot=list-entry-title]:focus-visible]:ring-ring", className), ...props, children: [_jsxs("div", { "data-slot": "list-entry-identity", className: "flex min-w-0 flex-1 basis-48 flex-col gap-0.5 max-md:basis-full", children: [hasLink ? (_jsx(Link, { "data-slot": "list-entry-title", href: href, className: cn(titleClasses, "outline-none after:absolute after:inset-0 after:rounded-md after:content-['']"), children: title })) : (_jsx("span", { "data-slot": "list-entry-title", className: titleClasses, children: title })), isDrawn(details) ? (_jsx("div", { "data-slot": "list-entry-details", className: "flex min-w-0 flex-col text-ui text-muted-foreground", children: details })) : null] }), hasColumn || hasLink ? (_jsxs("div", { "data-slot": "list-entry-side", className: "group/list-entry-side pointer-events-none relative z-10 ml-auto flex max-w-full min-w-0 flex-nowrap items-center gap-2 has-[[data-row-wide]]:ml-0 has-[[data-row-wide]]:basis-full", children: [hasColumn ? (_jsxs("div", { "data-slot": "list-entry-column", className: "flex min-w-0 flex-col items-end gap-1 has-[[data-row-wide]]:flex-1 has-[[data-row-wide]]:items-stretch", children: [hasStatus ? (_jsx("div", { "data-slot": "list-entry-status", className: "pointer-events-auto flex min-w-0 flex-wrap items-center justify-end gap-1 group-has-[[data-row-wide]]/list-entry-side:justify-start", children: status })) : null, hasActions ? (_jsx("div", { "data-slot": "list-entry-actions", className: "pointer-events-auto flex min-w-0 flex-wrap items-center justify-end gap-1 has-[[data-row-wide]]:flex-col has-[[data-row-wide]]:items-stretch has-[[data-row-wide]]:justify-start max-md:*:min-h-touch-target max-md:*:min-w-touch-target", children: actions })) : null] })) : null, hasLink ? (_jsx("span", { "data-slot": "list-entry-arrow", "aria-hidden": "true", className: "flex shrink-0 text-muted-foreground", children: _jsx(ChevronRight, { strokeWidth: ICON_STROKE_WIDTH, className: "size-4" }) })) : null] })) : null] }));
61
+ }
43
62
  /**
44
63
  * A run of rows under a `ListGroupHeading` (a country's days, a month's entries), placed straight in the scroll
45
64
  * container, which has no top padding of its own: the heading sticks at the top while the group's rows pass under it,
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sourceRoot":"","sources":["../../src/notion/List.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGhC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,oEAAoE;IAC1E,UAAU,EAAE,wEAAwE;IACpF,IAAI,EAAE,oBAAoB;IAC1B,GAAG,EAAE,uPAAuP;IAC5P,KAAK,EAAE,4CAA4C;IACnD,YAAY,EACV,kIAAkI;IACpI,kBAAkB,EAChB,qIAAqI;CAC/H,CAAC;AAaX;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa;IACpG,OAAO,CACL,KAAC,OAAO,iBACI,MAAM,kBACF,OAAO,kBACP,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,CA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B,EAAE,SAAS,EAAC,QAAQ,GAAG,GAC9D,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AAOD;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAkB;IAChF,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACzC,OAAO,KAAC,IAAI,iBAAW,YAAY,EAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAClG,CAAC;AASD,4GAA4G;AAC5G,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyB;IAChH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACzC,OAAO,CACL,KAAC,IAAI,iBACO,oBAAoB,kBAChB,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE,SAAS,CAAC,KACxG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type LucideIcon } from "lucide-react";
2
+ import type { ReactNode } from "react";
3
+ import { type Tone } from "./tones.js";
4
+ /** The icon a result badge draws for each tone when the app passes none. */
5
+ export declare const RESULT_BADGE_ICONS: Readonly<Record<Tone, LucideIcon>>;
6
+ export interface ResultBadgeProps {
7
+ /** What the result means; the theme owns its colour (`TONE_COLORS`), so one result reads alike in every list. */
8
+ readonly tone: Tone;
9
+ /** The app's own icon in place of the tone's default (a spinning run defaults to a loader). */
10
+ readonly icon?: LucideIcon;
11
+ /** A run still in progress: the icon spins, unless the reader asked for reduced motion. */
12
+ readonly isSpinning?: boolean;
13
+ /** The word: a result always carries one, so results read apart without telling colours apart. */
14
+ readonly children: ReactNode;
15
+ /** The full word on hover; defaults to the word itself when it is a string or a number. */
16
+ readonly title?: string;
17
+ readonly className?: string;
18
+ }
19
+ export declare function ResultBadge({ tone, icon, isSpinning, children, title, className }: ResultBadgeProps): import("react").JSX.Element;
20
+ //# sourceMappingURL=ResultBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultBadge.d.ts","sourceRoot":"","sources":["../../src/notion/ResultBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0E,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAe,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEpD,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAMjE,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,iHAAiH;IACjH,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AASD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,UAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BAmB3G"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Circle, CircleCheck, CircleMinus, CircleX, LoaderCircle, TriangleAlert } from "lucide-react";
3
+ import { cn } from "../lib/utils.js";
4
+ import { Badge } from "../ui/badge.js";
5
+ import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
6
+ import { TONE_COLORS } from "./tones.js";
7
+ /** The icon a result badge draws for each tone when the app passes none. */
8
+ export const RESULT_BADGE_ICONS = {
9
+ default: Circle,
10
+ success: CircleCheck,
11
+ warning: TriangleAlert,
12
+ danger: CircleX,
13
+ muted: CircleMinus,
14
+ };
15
+ /** The word as plain text, or undefined when it is any other node. */
16
+ function getPlainText(children) {
17
+ return typeof children === "string" || typeof children === "number" ? String(children) : undefined;
18
+ }
19
+ // A result (passed, failed, skipped, running): a filled tag in its tone's colour, with an icon and a word. The filled
20
+ // counterpart of `Status`, for a list whose rows each end in a result.
21
+ export function ResultBadge({ tone, icon, isSpinning = false, children, title, className }) {
22
+ const Icon = icon ?? (isSpinning ? LoaderCircle : RESULT_BADGE_ICONS[tone]);
23
+ return (_jsxs(Badge, { variant: "tag", color: TONE_COLORS[tone] ?? "default", "data-slot": "result-badge", "data-tone": tone, "data-color": TONE_COLORS[tone] ?? "default", "data-spinning": isSpinning || undefined, title: title ?? getPlainText(children), className: cn("gap-1 [&>svg]:size-3.5 [&>svg]:shrink-0", className), children: [_jsx(Icon, { "aria-hidden": "true", strokeWidth: ICON_STROKE_WIDTH, className: isSpinning ? "motion-safe:animate-spin" : undefined }), _jsx("span", { "data-slot": "result-badge-label", className: "min-w-0 truncate", children: children })] }));
24
+ }
25
+ //# sourceMappingURL=ResultBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultBadge.js","sourceRoot":"","sources":["../../src/notion/ResultBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE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AyC,EAAE,SAAS,CAAC,aAEnE,KAAC,IAAI,mBAAa,MAAM,EAAC,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,GAAI,EAC3H,4BAAgB,oBAAoB,EAAC,SAAS,EAAC,kBAAkB,YAC9D,QAAQ,GACJ,IACD,CACT,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAoBjE,QAAA,MAAM,aAAa;;;8EAyClB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,KAAK,EACL,OAAe,EACf,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,GAC5C,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAW3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAoBjE,QAAA,MAAM,aAAa;;;8EAyClB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,KAAK,EACL,OAAe,EACf,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,GAC5C,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAY3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
package/dist/ui/badge.js CHANGED
@@ -55,7 +55,7 @@ const badgeVariants = cva("inline-flex w-fit max-w-full shrink-0 items-center ju
55
55
  });
56
56
  function Badge({ className, variant = "default", color, asChild = false, ...props }) {
57
57
  const Comp = asChild ? Slot.Root : "span";
58
- return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant, color }), className), ...props }));
58
+ return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, "data-color": color === "none" ? undefined : (color ?? undefined), className: cn(badgeVariants({ variant, color }), className), ...props }));
59
59
  }
60
60
  export { Badge, badgeVariants };
61
61
  //# sourceMappingURL=badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,sCAAsC;IAC5C,KAAK,EAAE,wCAAwC;IAC/C,MAAM,EAAE,0CAA0C;IAClD,MAAM,EAAE,0CAA0C;IAClD,KAAK,EAAE,wCAAwC;IAC/C,IAAI,EAAE,sCAAsC;IAC5C,MAAM,EAAE,0CAA0C;IAClD,IAAI,EAAE,sCAAsC;IAC5C,GAAG,EAAE,oCAAoC;CAC1C,CAAA;AAED,kEAAkE;AAClE,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAU,CAAA;AAE7F,MAAM,aAAa,GAAG,GA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,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,EAAE;YACR,GAAG,EAAE,EAAE;SACR;KACF;IACD,uEAAuE;IACvE,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;QACxE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;QAC9B,KAAK,EAAE,KAAgC;QACvC,SAAS;KACV,CAAC,CAAC;IACH,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,MAAM;KACd;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAEkD;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAEzC,OAAO,CACL,KAAC,IAAI,iBACO,OAAO,kBACH,OAAO,gBACT,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,SAAS,CAAC,EAC/D,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,KACvD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softure-ai/theme-notion",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "SOFTURE AI Notion theme: shadcn/ui components (new-york v4, Radix, Tailwind CSS v4, lucide) with the Notion design system's tokens and deltas, ready to import.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -72,11 +72,14 @@ export {
72
72
  ListGroup,
73
73
  ListGroupHeading,
74
74
  ListItem,
75
+ ListEntry,
75
76
  ListRow,
76
77
  type ListGroupHeadingProps,
77
78
  type ListGroupProps,
78
79
  type ListItemProps,
79
80
  type ListProps,
81
+ type ListEntryLinkComponent,
82
+ type ListEntryProps,
80
83
  type ListRowProps,
81
84
  type ListSurface,
82
85
  } from "./notion/List.js";
@@ -121,6 +124,7 @@ export {
121
124
  } from "./notion/Stats.js";
122
125
  export { FileInput, type FileInputMessages, type FileInputMessagesOverride, type FileInputProps } from "./notion/FileInput.js";
123
126
  export { FormGrid, type FormGridColumns, type FormGridProps } from "./notion/FormGrid.js";
127
+ export { RESULT_BADGE_ICONS, ResultBadge, type ResultBadgeProps } from "./notion/ResultBadge.js";
124
128
  export { Status, type StatusProps } from "./notion/Status.js";
125
129
  export { Steps, type StepItem, type StepState, type StepsLayout, type StepsProps } from "./notion/Steps.js";
126
130
  export { TabBar, type TabBarItem, type TabBarProps } from "./notion/TabBar.js";
@@ -1,9 +1,12 @@
1
1
  import type { Density } from "@softure-ai/theme-kit";
2
+ import { ChevronRight } from "lucide-react";
2
3
  import { Slot } from "radix-ui";
3
- import type { ComponentProps } from "react";
4
+ import type { ComponentProps, ElementType, ReactNode } from "react";
4
5
 
5
6
  import { cn } from "../lib/utils.js";
6
7
 
8
+ import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
9
+
7
10
  /**
8
11
  * The classes of a list that follows the density (`data-density` on the list or an ancestor; theme-kit's
9
12
  * `--list-*` variables). For a list the app renders itself, such as a `SortableList` and its `SortableItem`s.
@@ -78,6 +81,122 @@ export function ListRow({ asChild = false, className, ...props }: ListRowProps)
78
81
  return <Comp data-slot="list-row" className={cn(LIST_CLASSES.row, className)} {...props} />;
79
82
  }
80
83
 
84
+ /** The link a `ListEntry` title renders: a plain `a`, or the app's router link taking the same props. */
85
+ export type ListEntryLinkComponent = ElementType<{ href: string; className?: string; children?: ReactNode }>;
86
+
87
+ export type ListEntryProps = Omit<ComponentProps<"div">, "title" | "children"> & {
88
+ /** What the row is: its name, in the medium weight. With `href` it is the link that opens the row. */
89
+ readonly title: ReactNode;
90
+ /** Lines under the title (facts, a path, a time), in the muted colour; the app lays out its own lines. */
91
+ readonly details?: ReactNode;
92
+ /** The row's state, at the top of the right column (one or more badges, which wrap right-aligned). */
93
+ readonly status?: ReactNode;
94
+ /**
95
+ * The row's controls, under the status. They stay their own targets above the row's link, and are at least the
96
+ * touch target (44 px) on a phone. A control marked `data-row-wide` (an inline form that needs room) makes the right
97
+ * column take the full row width under the identity, its lines starting on the left.
98
+ */
99
+ readonly actions?: ReactNode;
100
+ /** The row opens this address: the title's link is stretched over the whole row, with an arrow at its right. */
101
+ readonly href?: string;
102
+ /** The element for the link (a router's link component); a plain `a` by default. */
103
+ readonly linkComponent?: ListEntryLinkComponent;
104
+ };
105
+
106
+ function isDrawn(node: ReactNode): boolean {
107
+ return node !== undefined && node !== null && node !== false;
108
+ }
109
+
110
+ /**
111
+ * A list row with an identity and a right column: the title and its detail lines on the left, the row's state at the
112
+ * top of the right column and its controls under it. With `href` the title is a link stretched over the whole row, so
113
+ * the row is one box lit on hover, and an arrow sits beside the column (never on a line of its own); the column stays
114
+ * above the link. On a phone (below `md`) the column wraps under the identity, right-aligned. Place it in a `ListItem`.
115
+ */
116
+ export function ListEntry({
117
+ title,
118
+ details,
119
+ status,
120
+ actions,
121
+ href,
122
+ linkComponent: Link = "a",
123
+ className,
124
+ ...props
125
+ }: ListEntryProps) {
126
+ const hasStatus = isDrawn(status);
127
+ const hasActions = isDrawn(actions);
128
+ const hasColumn = hasStatus || hasActions;
129
+ const hasLink = href !== undefined;
130
+ const titleClasses = "min-w-0 text-ui-medium text-foreground";
131
+ return (
132
+ <div
133
+ data-slot="list-entry"
134
+ className={cn(
135
+ "relative flex w-full min-w-0 flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-2 py-(--list-row-y) text-ui transition-colors duration-100 hover:bg-accent",
136
+ "has-[[data-slot=list-entry-title]:focus-visible]:ring-2 has-[[data-slot=list-entry-title]:focus-visible]:ring-ring",
137
+ className,
138
+ )}
139
+ {...props}
140
+ >
141
+ <div data-slot="list-entry-identity" className="flex min-w-0 flex-1 basis-48 flex-col gap-0.5 max-md:basis-full">
142
+ {hasLink ? (
143
+ <Link
144
+ data-slot="list-entry-title"
145
+ href={href}
146
+ className={cn(titleClasses, "outline-none after:absolute after:inset-0 after:rounded-md after:content-['']")}
147
+ >
148
+ {title}
149
+ </Link>
150
+ ) : (
151
+ <span data-slot="list-entry-title" className={titleClasses}>
152
+ {title}
153
+ </span>
154
+ )}
155
+ {isDrawn(details) ? (
156
+ <div data-slot="list-entry-details" className="flex min-w-0 flex-col text-ui text-muted-foreground">
157
+ {details}
158
+ </div>
159
+ ) : null}
160
+ </div>
161
+ {hasColumn || hasLink ? (
162
+ <div
163
+ data-slot="list-entry-side"
164
+ className="group/list-entry-side pointer-events-none relative z-10 ml-auto flex max-w-full min-w-0 flex-nowrap items-center gap-2 has-[[data-row-wide]]:ml-0 has-[[data-row-wide]]:basis-full"
165
+ >
166
+ {hasColumn ? (
167
+ <div
168
+ data-slot="list-entry-column"
169
+ className="flex min-w-0 flex-col items-end gap-1 has-[[data-row-wide]]:flex-1 has-[[data-row-wide]]:items-stretch"
170
+ >
171
+ {hasStatus ? (
172
+ <div
173
+ data-slot="list-entry-status"
174
+ className="pointer-events-auto flex min-w-0 flex-wrap items-center justify-end gap-1 group-has-[[data-row-wide]]/list-entry-side:justify-start"
175
+ >
176
+ {status}
177
+ </div>
178
+ ) : null}
179
+ {hasActions ? (
180
+ <div
181
+ data-slot="list-entry-actions"
182
+ className="pointer-events-auto flex min-w-0 flex-wrap items-center justify-end gap-1 has-[[data-row-wide]]:flex-col has-[[data-row-wide]]:items-stretch has-[[data-row-wide]]:justify-start max-md:*:min-h-touch-target max-md:*:min-w-touch-target"
183
+ >
184
+ {actions}
185
+ </div>
186
+ ) : null}
187
+ </div>
188
+ ) : null}
189
+ {hasLink ? (
190
+ <span data-slot="list-entry-arrow" aria-hidden="true" className="flex shrink-0 text-muted-foreground">
191
+ <ChevronRight strokeWidth={ICON_STROKE_WIDTH} className="size-4" />
192
+ </span>
193
+ ) : null}
194
+ </div>
195
+ ) : null}
196
+ </div>
197
+ );
198
+ }
199
+
81
200
  export type ListGroupProps = ComponentProps<"div"> & {
82
201
  /** Renders the child element (a `section`, an app's own `li`) with the group's classes. */
83
202
  readonly asChild?: boolean;
@@ -0,0 +1,59 @@
1
+ import { Circle, CircleCheck, CircleMinus, CircleX, LoaderCircle, TriangleAlert, type LucideIcon } from "lucide-react";
2
+ import type { ReactNode } from "react";
3
+
4
+ import { cn } from "../lib/utils.js";
5
+ import { Badge } from "../ui/badge.js";
6
+
7
+ import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
8
+ import { TONE_COLORS, type Tone } from "./tones.js";
9
+
10
+ /** The icon a result badge draws for each tone when the app passes none. */
11
+ export const RESULT_BADGE_ICONS: Readonly<Record<Tone, LucideIcon>> = {
12
+ default: Circle,
13
+ success: CircleCheck,
14
+ warning: TriangleAlert,
15
+ danger: CircleX,
16
+ muted: CircleMinus,
17
+ };
18
+
19
+ export interface ResultBadgeProps {
20
+ /** What the result means; the theme owns its colour (`TONE_COLORS`), so one result reads alike in every list. */
21
+ readonly tone: Tone;
22
+ /** The app's own icon in place of the tone's default (a spinning run defaults to a loader). */
23
+ readonly icon?: LucideIcon;
24
+ /** A run still in progress: the icon spins, unless the reader asked for reduced motion. */
25
+ readonly isSpinning?: boolean;
26
+ /** The word: a result always carries one, so results read apart without telling colours apart. */
27
+ readonly children: ReactNode;
28
+ /** The full word on hover; defaults to the word itself when it is a string or a number. */
29
+ readonly title?: string;
30
+ readonly className?: string;
31
+ }
32
+
33
+ /** The word as plain text, or undefined when it is any other node. */
34
+ function getPlainText(children: ReactNode): string | undefined {
35
+ return typeof children === "string" || typeof children === "number" ? String(children) : undefined;
36
+ }
37
+
38
+ // A result (passed, failed, skipped, running): a filled tag in its tone's colour, with an icon and a word. The filled
39
+ // counterpart of `Status`, for a list whose rows each end in a result.
40
+ export function ResultBadge({ tone, icon, isSpinning = false, children, title, className }: ResultBadgeProps) {
41
+ const Icon = icon ?? (isSpinning ? LoaderCircle : RESULT_BADGE_ICONS[tone]);
42
+ return (
43
+ <Badge
44
+ variant="tag"
45
+ color={TONE_COLORS[tone] ?? "default"}
46
+ data-slot="result-badge"
47
+ data-tone={tone}
48
+ data-color={TONE_COLORS[tone] ?? "default"}
49
+ data-spinning={isSpinning || undefined}
50
+ title={title ?? getPlainText(children)}
51
+ className={cn("gap-1 [&>svg]:size-3.5 [&>svg]:shrink-0", className)}
52
+ >
53
+ <Icon aria-hidden="true" strokeWidth={ICON_STROKE_WIDTH} className={isSpinning ? "motion-safe:animate-spin" : undefined} />
54
+ <span data-slot="result-badge-label" className="min-w-0 truncate">
55
+ {children}
56
+ </span>
57
+ </Badge>
58
+ );
59
+ }
package/src/ui/badge.tsx CHANGED
@@ -76,6 +76,7 @@ function Badge({
76
76
  <Comp
77
77
  data-slot="badge"
78
78
  data-variant={variant}
79
+ data-color={color === "none" ? undefined : (color ?? undefined)}
79
80
  className={cn(badgeVariants({ variant, color }), className)}
80
81
  {...props}
81
82
  />