@tristan2828/ui-foundation 4.137.0 → 4.137.2

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.
@@ -7,8 +7,11 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent
7
7
  Add a full CRUD entity end to end. The entity name is this skill's
8
8
  argument — if none was given, ask for one before proceeding.
9
9
 
10
- Read `docs/foundation/add-an-entity.md` in full, then follow it exactly, in order —
11
- starting with its "Before anything: the entity plan" section. Never guess
10
+ Follow `docs/foundation/add-an-entity.md` exactly, in order. Read its
11
+ index, "Before anything: the entity plan" and "The steps" (steps 1 to 10)
12
+ in full. Then reach "Step 6 in detail" and the sections after it through
13
+ the index, reading each one the entity's plan calls for: every field type
14
+ it has, and the standard for every screen it builds. Never guess
12
15
  what the entity is: every field comes from `docs/entities/<entity>.md`,
13
16
  and if that file doesn't exist you plan it with the developer and wait for
14
17
  their go-ahead before building anything. That file is the only copy of the
@@ -1185,7 +1185,7 @@ const price = editInPlace({
1185
1185
  saved by it), and on a touch screen or under 768px it carries Indent
1186
1186
  and Outdent for list items, where there is no Tab. A field with only the
1187
1187
  floating toolbar (`inline` notes, and notes on a form) gets the same
1188
- two in a small "Editor tools" strip over its corner while it has focus,
1188
+ two in a small "Editor Tools" strip over its corner while it has focus,
1189
1189
  with the Image button too when the editor has `upload`. On a touch screen the
1190
1190
  toolbar is instead one row pinned to the top of the keyboard while the
1191
1191
  field has focus (Aa for every format, in the keyboard's place; the list
@@ -29,7 +29,7 @@
29
29
  - [Several values over time](#several-values-over-time) · lines 1152–1190
30
30
  - [Parts of a whole over time](#parts-of-a-whole-over-time) · lines 1192–1233
31
31
  - [A list as a board](#a-list-as-a-board) · lines 1235–1345
32
- - [Order, groups and the header (4.131)](#order-groups-and-the-header-4131) · lines 1288–1345
32
+ - [Order, groups and the header](#order-groups-and-the-header) · lines 1288–1345
33
33
  - [A list as cards](#a-list-as-cards) · lines 1347–1394
34
34
  - [Images full screen](#images-full-screen) · lines 1396–1442
35
35
  - [Key numbers on a record](#key-numbers-on-a-record) · lines 1444–1480
@@ -1285,7 +1285,7 @@ the table's.
1285
1285
  snap points; a phone shows one column at a time, with the edge of the
1286
1286
  next one showing.
1287
1287
 
1288
- ### Order, groups and the header (4.131)
1288
+ ### Order, groups and the header
1289
1289
 
1290
1290
  ```tsx
1291
1291
  <Board<Job, Stage, Size>
@@ -109,7 +109,7 @@ export function BottomBar({ items, nav, activeTo, navLook = 'list', }) {
109
109
  const tiles = openItem !== undefined && bottomBarTiles(openItem, section, navLook);
110
110
  // The current entry's pages show under the tiles when the section's own look is tiles.
111
111
  const withPages = (section?.look ?? navLook) === 'tiles';
112
- return (_jsxs(_Fragment, { children: [_jsx("nav", { "aria-label": "Bottom bar", "data-slot": "app-shell-bottom-bar", className: "fixed inset-x-0 bottom-0 z-20 border-t border-border bg-background pb-[env(safe-area-inset-bottom)] md:hidden", children: _jsx("ul", { className: "flex h-16 items-stretch gap-1 px-2 py-1.5", children: shown.map((item, index) => {
112
+ return (_jsxs(_Fragment, { children: [_jsx("nav", { "aria-label": "Bottom Bar", "data-slot": "app-shell-bottom-bar", className: "fixed inset-x-0 bottom-0 z-20 border-t border-border bg-background pb-[env(safe-area-inset-bottom)] md:hidden", children: _jsx("ul", { className: "flex h-16 items-stretch gap-1 px-2 py-1.5", children: shown.map((item, index) => {
113
113
  const isCurrent = index === current;
114
114
  const { count, countLabel } = bottomBarCount(item, nav);
115
115
  if ('to' in item) {
@@ -72,7 +72,7 @@ export function ColorField({ id, value, onChange, onBlur, colors = COLOR_CHOICES
72
72
  if (!event.currentTarget.contains(event.relatedTarget))
73
73
  onBlur?.();
74
74
  };
75
- return (_jsx("div", { "data-slot": "color-field", className: cn('min-w-0', className), onBlur: leave, children: _jsxs(RadioGroup, { id: id, value: picked, onValueChange: choose, disabled: disabled, "aria-invalid": invalid || undefined, className: cn('grid grid-cols-[repeat(auto-fill,minmax(7.5rem,1fr))] gap-1 rounded-md', invalid && 'ring-3 ring-destructive/20 dark:ring-destructive/40'), ...aria, children: [colors.map((choice, at) => (_jsxs("label", { "data-slot": "color-field-choice", className: CHOICE, children: [_jsx(RadioGroupItem, { value: String(at), "aria-invalid": invalid || undefined }), _jsx(ColorSwatch, { color: choice.color, label: choice.name })] }, `${choice.name}-${at}`))), _jsxs("div", { "data-slot": "color-field-custom", className: "col-span-full flex min-w-0 flex-wrap items-center gap-2", children: [_jsxs("label", { className: cn(CHOICE, 'w-fit'), onClick: openPicker, children: [_jsx(RadioGroupItem, { value: CUSTOM, "aria-invalid": invalid || undefined }), "Custom"] }), _jsx("input", { ref: picker, type: "color", "data-slot": "color-field-picker", "aria-label": "Custom colour", value: pickerHex(value), disabled: disabled, onChange: (event) => {
75
+ return (_jsx("div", { "data-slot": "color-field", className: cn('min-w-0', className), onBlur: leave, children: _jsxs(RadioGroup, { id: id, value: picked, onValueChange: choose, disabled: disabled, "aria-invalid": invalid || undefined, className: cn('grid grid-cols-[repeat(auto-fill,minmax(7.5rem,1fr))] gap-1 rounded-md', invalid && 'ring-3 ring-destructive/20 dark:ring-destructive/40'), ...aria, children: [colors.map((choice, at) => (_jsxs("label", { "data-slot": "color-field-choice", className: CHOICE, children: [_jsx(RadioGroupItem, { value: String(at), "aria-invalid": invalid || undefined }), _jsx(ColorSwatch, { color: choice.color, label: choice.name })] }, `${choice.name}-${at}`))), _jsxs("div", { "data-slot": "color-field-custom", className: "col-span-full flex min-w-0 flex-wrap items-center gap-2", children: [_jsxs("label", { className: cn(CHOICE, 'w-fit'), onClick: openPicker, children: [_jsx(RadioGroupItem, { value: CUSTOM, "aria-invalid": invalid || undefined }), "Custom"] }), _jsx("input", { ref: picker, type: "color", "data-slot": "color-field-picker", "aria-label": "Custom Colour", value: pickerHex(value), disabled: disabled, onChange: (event) => {
76
76
  const color = storedColor(event.target.value);
77
77
  if (!color)
78
78
  return;
@@ -26,5 +26,5 @@ export function EmojiField({ id, value, onChange, placeholder = 'Pick an emoji',
26
26
  onChange(next);
27
27
  changeOpen(false);
28
28
  };
29
- return (_jsxs(Popover, { open: open, onOpenChange: changeOpen, children: [_jsx(PopoverTrigger, { render: _jsx(Button, { id: id, type: "button", variant: "outline", "aria-invalid": invalid || undefined, "aria-readonly": readOnly || undefined, className: cn('w-full justify-start font-normal', !value && 'text-muted-foreground', className), ...aria }), children: value ? (_jsx("span", { className: "text-base leading-none", children: value })) : (_jsxs(_Fragment, { children: [_jsx(SmilePlus, { "aria-hidden": "true", className: "size-4" }), placeholder] })) }), _jsxs(PopoverContent, { className: "w-72 gap-2 p-2", align: "start", "data-slot": "emoji-field-popup", "aria-label": "Emoji", children: [_jsx(Input, { type: "search", autoComplete: "off", "aria-label": "Search emoji", placeholder: "Search", value: query, onChange: (event) => setQuery(event.target.value) }), _jsx("div", { className: "max-h-64 overflow-y-auto", children: groups.length === 0 ? (_jsxs("p", { className: "p-2 text-sm text-muted-foreground", children: ["No emoji match \"", query.trim(), "\"."] })) : (groups.map((group) => (_jsxs("section", { "aria-label": group.label, className: "mb-2 last:mb-0", children: [_jsx("h3", { className: "px-1 py-1 text-xs font-medium text-muted-foreground", children: group.label }), _jsx("div", { className: "grid grid-cols-7 gap-0.5", children: group.emojis.map((entry) => (_jsx("button", { type: "button", "aria-label": entry.name, title: entry.name, "aria-pressed": entry.emoji === value, onClick: () => pick(entry.emoji), className: "flex size-8 items-center justify-center rounded-md text-xl leading-none outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-pressed:bg-accent", children: entry.emoji }, entry.emoji))) })] }, group.label)))) }), clearable && value && (_jsx("div", { className: "border-t border-border pt-2", children: _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "w-full", onClick: () => pick(''), children: "Clear" }) }))] })] }));
29
+ return (_jsxs(Popover, { open: open, onOpenChange: changeOpen, children: [_jsx(PopoverTrigger, { render: _jsx(Button, { id: id, type: "button", variant: "outline", "aria-invalid": invalid || undefined, "aria-readonly": readOnly || undefined, className: cn('w-full justify-start font-normal', !value && 'text-muted-foreground', className), ...aria }), children: value ? (_jsx("span", { className: "text-base leading-none", children: value })) : (_jsxs(_Fragment, { children: [_jsx(SmilePlus, { "aria-hidden": "true", className: "size-4" }), placeholder] })) }), _jsxs(PopoverContent, { className: "w-72 gap-2 p-2", align: "start", "data-slot": "emoji-field-popup", "aria-label": "Emoji", children: [_jsx(Input, { type: "search", autoComplete: "off", "aria-label": "Search Emoji", placeholder: "Search", value: query, onChange: (event) => setQuery(event.target.value) }), _jsx("div", { className: "max-h-64 overflow-y-auto", children: groups.length === 0 ? (_jsxs("p", { className: "p-2 text-sm text-muted-foreground", children: ["No emoji match \"", query.trim(), "\"."] })) : (groups.map((group) => (_jsxs("section", { "aria-label": group.label, className: "mb-2 last:mb-0", children: [_jsx("h3", { className: "px-1 py-1 text-xs font-medium text-muted-foreground", children: group.label }), _jsx("div", { className: "grid grid-cols-7 gap-0.5", children: group.emojis.map((entry) => (_jsx("button", { type: "button", "aria-label": entry.name, title: entry.name, "aria-pressed": entry.emoji === value, onClick: () => pick(entry.emoji), className: "flex size-8 items-center justify-center rounded-md text-xl leading-none outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-pressed:bg-accent", children: entry.emoji }, entry.emoji))) })] }, group.label)))) }), clearable && value && (_jsx("div", { className: "border-t border-border pt-2", children: _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "w-full", onClick: () => pick(''), children: "Clear" }) }))] })] }));
30
30
  }
@@ -118,7 +118,7 @@ function ViewerImage({ image }) {
118
118
  if (element?.complete)
119
119
  setState(element.naturalWidth > 0 ? 'loaded' : 'failed');
120
120
  }, []);
121
- return (_jsxs("div", { className: "absolute inset-x-4 inset-y-2 md:inset-x-20 md:inset-y-4", "data-state": state, children: [state !== 'failed' && (_jsx("img", { ref: seeIfDone, src: image.src, alt: image.alt, decoding: "async", draggable: false, onLoad: () => setState('loaded'), onError: () => setState('failed'), className: cn('size-full object-contain transition-opacity duration-150', state === 'loading' && 'opacity-0') }, attempt)), state === 'loading' && (_jsx("div", { "data-slot": "image-viewer-loading", className: "absolute inset-0 flex items-center justify-center", children: _jsx(Spinner, { className: "size-8 text-muted-foreground", "aria-label": "Loading image" }) })), state === 'failed' && (_jsxs("div", { "data-slot": "image-viewer-error", role: "alert", className: "absolute inset-0 flex flex-col items-center justify-center gap-3 p-4 text-center", children: [_jsx(ImageOffIcon, { "aria-hidden": true, className: "size-10 text-muted-foreground" }), _jsx("p", { className: "type-body text-foreground", children: "This image couldn\u2019t be loaded." }), _jsx("p", { className: "max-w-prose type-caption text-muted-foreground", children: image.alt }), _jsx(Button, { variant: "outline", onClick: () => {
121
+ return (_jsxs("div", { className: "absolute inset-x-4 inset-y-2 md:inset-x-20 md:inset-y-4", "data-state": state, children: [state !== 'failed' && (_jsx("img", { ref: seeIfDone, src: image.src, alt: image.alt, decoding: "async", draggable: false, onLoad: () => setState('loaded'), onError: () => setState('failed'), className: cn('size-full object-contain transition-opacity duration-150', state === 'loading' && 'opacity-0') }, attempt)), state === 'loading' && (_jsx("div", { "data-slot": "image-viewer-loading", className: "absolute inset-0 flex items-center justify-center", children: _jsx(Spinner, { className: "size-8 text-muted-foreground", "aria-label": "Loading Image" }) })), state === 'failed' && (_jsxs("div", { "data-slot": "image-viewer-error", role: "alert", className: "absolute inset-0 flex flex-col items-center justify-center gap-3 p-4 text-center", children: [_jsx(ImageOffIcon, { "aria-hidden": true, className: "size-10 text-muted-foreground" }), _jsx("p", { className: "type-body text-foreground", children: "This image couldn\u2019t be loaded." }), _jsx("p", { className: "max-w-prose type-caption text-muted-foreground", children: image.alt }), _jsx(Button, { variant: "outline", onClick: () => {
122
122
  setAttempt((n) => n + 1);
123
123
  setState('loading');
124
124
  }, children: "Try Again" })] }))] }));
@@ -78,5 +78,5 @@ export function LineChart({ label, points, target, projection, mark, levels, for
78
78
  return (_jsxs("figure", { "data-slot": "line-chart", "data-state": "success", "aria-label": label, className: cn('grid min-w-0 gap-x-2 gap-y-1.5', steps ? 'grid-cols-[auto_minmax(0,1fr)]' : 'grid-cols-1', className), children: [steps && (_jsxs("div", { "aria-hidden": "true", "data-slot": "line-chart-levels", className: "relative", style: { height }, children: [levels.map((name, index) => (_jsx("span", { className: "absolute right-0 -translate-y-1/2 type-caption whitespace-nowrap text-muted-foreground", style: { top: percent(layout.levelYs[index]) }, children: name }, name))), _jsx("span", { className: "invisible flex h-0 flex-col overflow-hidden type-caption whitespace-nowrap", children: levels.map((name) => (_jsx("span", { children: name }, name))) })] })), _jsxs("div", { "aria-hidden": "true", className: "relative border-b border-border", style: { height }, children: [steps &&
79
79
  layout.levelYs.map((y, index) => (_jsx("span", { "data-slot": "line-chart-level-rule", className: "absolute inset-x-0 border-t border-dashed border-border", style: { top: percent(y) } }, index))), target && layout.targetY !== undefined && (_jsxs(_Fragment, { children: [_jsx("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 size-full overflow-visible text-success-text", children: _jsx("line", { x1: "0", x2: "100", y1: layout.targetY * 100, y2: layout.targetY * 100, strokeWidth: 1.5, strokeDasharray: "6 4", vectorEffect: "non-scaling-stroke", className: "stroke-current" }) }), _jsxs("span", { className: cn('absolute right-0 -translate-y-full type-caption text-success-text tabular-nums', PLATE), style: { top: percent(layout.targetY) }, children: [target.label, " ", formatY(target.y)] })] })), points.length > 1 && (_jsx("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 size-full overflow-visible text-info-text", children: _jsx("polyline", { points: line, fill: "none", strokeWidth: 2, strokeLinejoin: "round", strokeLinecap: "round", vectorEffect: "non-scaling-stroke", className: "stroke-current" }) })), projected.length > 1 && (_jsx("svg", { "data-slot": "line-chart-projection", viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 size-full overflow-visible text-info-text", children: _jsx("polyline", { points: toLine(projected), fill: "none", strokeWidth: 2, strokeDasharray: "6 4", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke", className: "stroke-current" }) })), dot && (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "line-chart-mark", className: "absolute size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-info-text ring-2 ring-card", style: { left: percent(dot.x), top: percent(dot.y) } }), _jsx("span", { className: cn('absolute type-caption font-medium text-foreground tabular-nums', PLATE, besides(dot.x),
80
80
  // Under the lowest point, where the line isn't; over any other.
81
- mark === 'min' ? 'mt-1' : '-translate-y-full -mt-1'), style: { left: percent(dot.x), top: percent(dot.y) }, children: formatY(points[marked ? layout.markIndex : 0].y) })] }))] }), _jsxs("div", { "aria-hidden": "true", className: cn('flex justify-between gap-3 type-caption text-muted-foreground tabular-nums', steps && 'col-start-2'), children: [_jsx("span", { children: formatX(points[0].x) }), (points.length > 1 || ahead.length > 0) && _jsx("span", { children: formatX(lastX) })] }), _jsx("figcaption", { className: "sr-only", children: steps ? `${summary}; one of ${levels.join(', ')}` : summary }), _jsxs("table", { className: "sr-only", children: [_jsx("caption", { children: label }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: "When" }), _jsx("th", { scope: "col", children: "Value" })] }) }), _jsxs("tbody", { children: [points.map((point, index) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatX(point.x) }), _jsx("td", { children: formatY(point.y) })] }, index))), ahead.map((point, index) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatX(point.x) }), _jsxs("td", { children: [formatY(point.y), " (", projection.label, ")"] })] }, `ahead-${index}`)))] })] })] }));
81
+ mark === 'min' ? 'mt-1' : '-translate-y-full -mt-1'), style: { left: percent(dot.x), top: percent(dot.y) }, children: formatY(points[marked ? layout.markIndex : 0].y) })] }))] }), _jsxs("div", { "aria-hidden": "true", className: cn('flex justify-between gap-3 type-caption text-muted-foreground tabular-nums', steps && 'col-start-2'), children: [_jsx("span", { children: formatX(points[0].x) }), (points.length > 1 || ahead.length > 0) && _jsx("span", { children: formatX(lastX) })] }), _jsx("figcaption", { className: "sr-only", children: steps ? `${summary}; one of ${levels.join(', ')}` : summary }), _jsx("div", { className: "sr-only", children: _jsxs("table", { children: [_jsx("caption", { children: label }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: "When" }), _jsx("th", { scope: "col", children: "Value" })] }) }), _jsxs("tbody", { children: [points.map((point, index) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatX(point.x) }), _jsx("td", { children: formatY(point.y) })] }, index))), ahead.map((point, index) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatX(point.x) }), _jsxs("td", { children: [formatY(point.y), " (", projection.label, ")"] })] }, `ahead-${index}`)))] })] }) })] }));
82
82
  }
@@ -72,7 +72,7 @@ export type ListHeaderProps = {
72
72
  /** The page's other actions (Export, Import), in ⋯ after the folded links. */
73
73
  more?: readonly ListHeaderAction[];
74
74
  /**
75
- * Soft-deleted records, for a list that has them: "Show deleted" in ⋯,
75
+ * Soft-deleted records, for a list that has them: "Show Deleted" in ⋯,
76
76
  * and the notice while it is on. `noun` completes "Showing deleted
77
77
  * <noun>" (default "records").
78
78
  */
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
4
4
  // The related screens (Board, Change log) stay out as buttons while
5
5
  // there's one; two or more fold into the menu with the page's other
6
6
  // extras, so the row is the same on a list with no siblings and one with
7
- // four. "Show deleted" is the menu's last item, and while it's on a notice
7
+ // four. "Show Deleted" is the menu's last item, and while it's on a notice
8
8
  // says so with "Back to the list", so the ⋯ menu and the notice are one
9
9
  // component and a list can't show deleted records without saying so.
10
10
  //
@@ -16,7 +16,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
16
16
  // one thing seen three ways (Exercises / Targets / Weak spots): links in a
17
17
  // segmented row, the one on marked as the current page. They're the
18
18
  // page's own peers, so they aren't in ⋯, which keeps only what's left
19
- // (Show deleted). On a phone the switch takes its own line under the
19
+ // (Show Deleted). On a phone the switch takes its own line under the
20
20
  // title and scrolls sideways if it must.
21
21
  //
22
22
  // `secondaryAction` is one more button, beside New and before it, for a
@@ -144,7 +144,7 @@ export function MonthCalendar({ label, items = [], today, selected, onSelect, mo
144
144
  }
145
145
  const dayLabel = (day) => formatPlainDate(day, { weekday: 'long', month: 'long', day: 'numeric' }, locale);
146
146
  const pickedItems = byDay.get(picked) ?? [];
147
- return (_jsxs("div", { "data-slot": "month-calendar", className: cn('flex min-w-0 flex-col gap-3', className), children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("h2", { className: "mr-auto type-body font-semibold text-foreground", "aria-live": "polite", children: monthName }), _jsx(Button, { variant: "outline", size: "icon-sm", "aria-label": "Previous month", onClick: () => showMonth(shiftMonth(shown, -1)), children: _jsx(ChevronLeftIcon, { "aria-hidden": "true" }) }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => pick(today), children: "Today" }), _jsx(Button, { variant: "outline", size: "icon-sm", "aria-label": "Next month", onClick: () => showMonth(shiftMonth(shown, 1)), children: _jsx(ChevronRightIcon, { "aria-hidden": "true" }) })] }), error ? (_jsx(ErrorState, { error: error, onRetry: onRetry })) : (_jsxs(_Fragment, { children: [!isLoading && !monthHasItems && (_jsx("p", { "data-slot": "month-calendar-empty", className: "text-sm text-muted-foreground", children: emptyText })), _jsxs("table", { ref: gridRef, role: "grid", "aria-label": `${label}, ${monthName}`, "aria-busy": isLoading || undefined, className: "w-full table-fixed border-separate border-spacing-0 overflow-hidden rounded-md border-t border-l border-border", children: [_jsx("thead", { children: _jsx("tr", { children: weekdayNames.map((name) => (_jsxs("th", { scope: "col", abbr: name.long, className: "border-r border-b border-border bg-muted/40 px-1 py-1 text-left text-xs font-medium text-muted-foreground uppercase max-md:text-center", children: [_jsx("span", { className: "sr-only", children: name.long }), _jsx("span", { className: "max-md:hidden", "aria-hidden": "true", children: name.short }), _jsx("span", { className: "md:hidden", "aria-hidden": "true", children: name.narrow })] }, name.long))) }) }), _jsx("tbody", { children: weeks.map((week, row) => (_jsx("tr", { children: week.map((day, column) => {
147
+ return (_jsxs("div", { "data-slot": "month-calendar", className: cn('flex min-w-0 flex-col gap-3', className), children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("h2", { className: "mr-auto type-body font-semibold text-foreground", "aria-live": "polite", children: monthName }), _jsx(Button, { variant: "outline", size: "icon-sm", "aria-label": "Previous Month", onClick: () => showMonth(shiftMonth(shown, -1)), children: _jsx(ChevronLeftIcon, { "aria-hidden": "true" }) }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => pick(today), children: "Today" }), _jsx(Button, { variant: "outline", size: "icon-sm", "aria-label": "Next Month", onClick: () => showMonth(shiftMonth(shown, 1)), children: _jsx(ChevronRightIcon, { "aria-hidden": "true" }) })] }), error ? (_jsx(ErrorState, { error: error, onRetry: onRetry })) : (_jsxs(_Fragment, { children: [!isLoading && !monthHasItems && (_jsx("p", { "data-slot": "month-calendar-empty", className: "text-sm text-muted-foreground", children: emptyText })), _jsxs("table", { ref: gridRef, role: "grid", "aria-label": `${label}, ${monthName}`, "aria-busy": isLoading || undefined, className: "w-full table-fixed border-separate border-spacing-0 overflow-hidden rounded-md border-t border-l border-border", children: [_jsx("thead", { children: _jsx("tr", { children: weekdayNames.map((name) => (_jsxs("th", { scope: "col", abbr: name.long, className: "border-r border-b border-border bg-muted/40 px-1 py-1 text-left text-xs font-medium text-muted-foreground uppercase max-md:text-center", children: [_jsx("span", { className: "sr-only", children: name.long }), _jsx("span", { className: "max-md:hidden", "aria-hidden": "true", children: name.short }), _jsx("span", { className: "md:hidden", "aria-hidden": "true", children: name.narrow })] }, name.long))) }) }), _jsx("tbody", { children: weeks.map((week, row) => (_jsx("tr", { children: week.map((day, column) => {
148
148
  if (!day)
149
149
  return _jsx("td", { className: "border-r border-b border-border bg-muted/20" }, column);
150
150
  const list = byDay.get(day) ?? [];
@@ -68,8 +68,8 @@ export function MultiLineChart({ label, series, target, formatY = defaultY, form
68
68
  return (_jsx("span", { "data-slot": "multi-line-chart-dot", className: cn('absolute size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full ring-2 ring-card', DOT[tone]), style: { left: percent(places[0].x), top: percent(places[0].y) } }, s));
69
69
  }
70
70
  return (_jsx("svg", { "data-slot": "multi-line-chart-series", viewBox: "0 0 100 100", preserveAspectRatio: "none", className: cn('absolute inset-0 size-full overflow-visible', TONE[tone]), children: _jsx("polyline", { points: places.map((place) => `${place.x * 100},${place.y * 100}`).join(' '), fill: "none", strokeWidth: 2, strokeDasharray: one.dashed ? DASH : undefined, strokeLinejoin: "round", strokeLinecap: one.dashed ? undefined : 'round', vectorEffect: "non-scaling-stroke", className: "stroke-current" }) }, s));
71
- })] }), _jsxs("div", { "aria-hidden": "true", className: "flex justify-between gap-3 type-caption text-muted-foreground tabular-nums", children: [_jsx("span", { children: formatX(left.x) }), right.at > left.at && _jsx("span", { children: formatX(right.x) })] }), _jsx("ul", { "aria-hidden": "true", "data-slot": "multi-line-chart-legend", className: "flex flex-wrap gap-x-4 gap-y-1 type-caption text-foreground", children: drawn.map((one, s) => (_jsxs("li", { className: "flex items-center gap-1.5", children: [_jsx("svg", { viewBox: "0 0 16 4", className: cn('h-1 w-4 shrink-0', TONE[one.tone ?? 'info']), children: _jsx("line", { x1: "0", x2: "16", y1: "2", y2: "2", strokeWidth: 2, strokeDasharray: one.dashed ? '4 2' : undefined, className: "stroke-current" }) }), _jsx("span", { children: one.label }), _jsx("span", { className: "font-medium tabular-nums", children: formatY(one.points[one.points.length - 1].y) })] }, s))) }), _jsx("figcaption", { className: "sr-only", children: summary }), _jsxs("table", { className: "sr-only", children: [_jsx("caption", { children: label }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: "When" }), drawn.map((one, s) => (_jsx("th", { scope: "col", children: one.label }, s)))] }) }), _jsx("tbody", { children: rows.map((x) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatX(x) }), drawn.map((one, s) => {
72
- const point = one.points.find((p) => String(p.x) === String(x));
73
- return _jsx("td", { children: point ? formatY(point.y) : '' }, s);
74
- })] }, String(x)))) })] })] }));
71
+ })] }), _jsxs("div", { "aria-hidden": "true", className: "flex justify-between gap-3 type-caption text-muted-foreground tabular-nums", children: [_jsx("span", { children: formatX(left.x) }), right.at > left.at && _jsx("span", { children: formatX(right.x) })] }), _jsx("ul", { "aria-hidden": "true", "data-slot": "multi-line-chart-legend", className: "flex flex-wrap gap-x-4 gap-y-1 type-caption text-foreground", children: drawn.map((one, s) => (_jsxs("li", { className: "flex items-center gap-1.5", children: [_jsx("svg", { viewBox: "0 0 16 4", className: cn('h-1 w-4 shrink-0', TONE[one.tone ?? 'info']), children: _jsx("line", { x1: "0", x2: "16", y1: "2", y2: "2", strokeWidth: 2, strokeDasharray: one.dashed ? '4 2' : undefined, className: "stroke-current" }) }), _jsx("span", { children: one.label }), _jsx("span", { className: "font-medium tabular-nums", children: formatY(one.points[one.points.length - 1].y) })] }, s))) }), _jsx("figcaption", { className: "sr-only", children: summary }), _jsx("div", { className: "sr-only", children: _jsxs("table", { children: [_jsx("caption", { children: label }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: "When" }), drawn.map((one, s) => (_jsx("th", { scope: "col", children: one.label }, s)))] }) }), _jsx("tbody", { children: rows.map((x) => (_jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatX(x) }), drawn.map((one, s) => {
72
+ const point = one.points.find((p) => String(p.x) === String(x));
73
+ return _jsx("td", { children: point ? formatY(point.y) : '' }, s);
74
+ })] }, String(x)))) })] }) })] }));
75
75
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- // A quick add's one line (F1, look I4): what parseQuickAdd reads is
2
+ // A quick add's one line: what parseQuickAdd reads is
3
3
  // marked in the box as you type and shown under it as chips, so a misread
4
4
  // is seen at once. ✕ on a read chip gives its words back to the title
5
5
  // (the "sun" that wasn't Sunday). The app passes its own chips, the ones
@@ -59,7 +59,7 @@ export type RichTextEditorProps = {
59
59
  /**
60
60
  * Images uploaded into the text: pasted, dropped, or picked with an
61
61
  * Image button (on the fixed toolbar; with `toolbar="floating"`, on the
62
- * "Editor tools" strip shown while the field has focus; on a phone, in
62
+ * "Editor Tools" strip shown while the field has focus; on a phone, in
63
63
  * the row pinned to the keyboard) or the slash menu's Image ("/image"). Each file goes
64
64
  * through this (the app's own storage: the package knows no endpoint) and goes in as
65
65
  * `![](url)`, from the result's `url`, else its `thumbUrl`. A
@@ -85,7 +85,7 @@ export function RichTextFloatingToolbar({ view, state, field, controls, onFormat
85
85
  ref(element);
86
86
  else if (ref)
87
87
  ref.current = element;
88
- }, role: "toolbar", "aria-label": "Format selection", "aria-controls": controls, "data-slot": "rich-text-floating-toolbar", "data-side": placement?.side, style: placement ? { top: placement.top, left: placement.left } : undefined, className: cn('absolute z-50 flex items-center gap-0.5 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10', 'animate-in fade-in-0 zoom-in-95 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2',
88
+ }, role: "toolbar", "aria-label": "Format Selection", "aria-controls": controls, "data-slot": "rich-text-floating-toolbar", "data-side": placement?.side, style: placement ? { top: placement.top, left: placement.left } : undefined, className: cn('absolute z-50 flex items-center gap-0.5 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10', 'animate-in fade-in-0 zoom-in-95 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2',
89
89
  // Measured before it's seen, so it never shows in the wrong place.
90
90
  !placement && 'invisible'), onKeyDown: onKeyDown, onBlur: onBlur, children: _jsx(FormatButtons, { formats: "selection", state: state, readOnly: false, onFormat: onFormat, onPage: onPage }) }));
91
91
  }
@@ -11,7 +11,7 @@ export function RichTextToolsBar({ state, readOnly, fullScreen, controls, onForm
11
11
  onReturn();
12
12
  }
13
13
  };
14
- return (_jsx("div", { ref: ref, role: "toolbar", "aria-label": "Editor tools", "aria-controls": controls, "data-slot": "rich-text-tools-bar", className: cn('absolute right-0 z-40 flex items-center gap-0.5 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10',
14
+ return (_jsx("div", { ref: ref, role: "toolbar", "aria-label": "Editor Tools", "aria-controls": controls, "data-slot": "rich-text-tools-bar", className: cn('absolute right-0 z-40 flex items-center gap-0.5 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10',
15
15
  // Above the field, or inside its corner once it fills the window.
16
16
  fullScreen ? 'top-2 right-2' : 'bottom-full mb-1'), onKeyDown: onKeyDown, onBlur: onBlur, children: _jsx(FormatButtons, { formats: "tools", state: state, readOnly: readOnly, onFormat: onFormat, onImage: onImage, onFullScreen: onFullScreen, fullScreen: fullScreen }) }));
17
17
  }
@@ -77,7 +77,7 @@ export function seriesLayout(series, target) {
77
77
  targetY: shared.targetY,
78
78
  };
79
79
  }
80
- // Amounts stacked from zero (StackedAreaChart, 4.132): every band shares
80
+ // Amounts stacked from zero (StackedAreaChart): every band shares
81
81
  // `xs`, a band's bottom is the sum of the bands below it and its top adds
82
82
  // its own value, so the top band's top is the total. The range is 0 to the
83
83
  // largest total with room above only. `values` are already cleaned: one per
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tristan2828/ui-foundation",
3
- "version": "4.137.0",
3
+ "version": "4.137.2",
4
4
  "description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -182,7 +182,7 @@
182
182
  "sonner": "^2.0.8",
183
183
  "tailwindcss": "^4.3.5",
184
184
  "typescript": "~6.0.3",
185
- "typescript-eslint": "^8.72.2",
185
+ "typescript-eslint": "^8.73.0",
186
186
  "vite": "^8.3.8",
187
187
  "vitest": "^5.1.0",
188
188
  "zod": "^4.6.7"
package/styles/index.css CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  @custom-variant density-compact (&:where([data-density="compact"], [data-density="compact"] *));
30
30
 
31
- /* Page width (4.133): data-width="wide" on <html> (an app's own setting,
31
+ /* Page width: data-width="wide" on <html> (an app's own setting,
32
32
  kept per browser as Text Size's data-density is) lifts a record page's
33
33
  reading cap, so its column fills a wide screen; the facts rail stays
34
34
  300px. A record in a dialog keeps the dialog's size. `page-wide:max-w-none`. */