@nadicodeai/ui 12.1.212 → 12.1.213
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/dist/components/activity-feed.d.ts +1 -1
- package/dist/components/activity-feed.js +1 -1
- package/dist/components/chart-card.d.ts +4 -2
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +3 -3
- package/dist/components/kpi-card.d.ts +5 -3
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +8 -4
- package/dist/components/record-list.js +1 -1
- package/dist/showcase/usage.generated.js +3 -3
- package/package.json +2 -2
|
@@ -55,7 +55,7 @@ export declare function ActivityFeedSkeleton(): import("react").JSX.Element;
|
|
|
55
55
|
*
|
|
56
56
|
* @family Compositions
|
|
57
57
|
* @when A record's history: a Customer's, a Partner's or an Installation's Activity tab in the Portal, the company wiki's updates in Nadia. Each answers "what happened, and when?".
|
|
58
|
-
* @instead The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime.
|
|
58
|
+
* @instead The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime. A history never stands under a list on the same page: it has its own tab (owner).
|
|
59
59
|
* @behaviour The search, filters and window sit right above the rows, kept in the URL by the product. Days stand newest first, each a title and a muted date over one card of rows; a row is the time of day, the actor's 24 px mark, the sentence with a status badge only for an exception, and one muted line of detail. "Show older events" follows the last day as a full-width `LoadMoreButton`, or as a `ButtonLink` when it navigates; there is never a page count. States, first that holds: failed, loading (still rows in the row's shape, which `ActivityFeedSkeleton` also draws while a page reads the events before it can draw the feed; nadicode decision), no match with Clear filters, nothing yet in one line, the days. Nothing yet is one quiet line, never a picture; a failed read is the warning mark with Retry, never "no events". The time is the time of day in the viewer's own zone in tabular figures (`RecordTime`), with UTC and the viewer's zone in its hover card; one rule for every feed, never a time printed in UTC as the viewer's: a server-rendered page passes the viewer's `timeZone`, since without it the server and the first client render print UTC. The actor's mark is a person's initials, an Agent's real orb or an Installation's tile; the system's own work has no mark and never takes an orb. Under 900 px the time moves under the sentence. It draws no card header: the tab is the title.
|
|
60
60
|
* @words The sentence names the actor in `<strong>`, the action in the past tense and the object as a link that keeps the text's colour: "Marco Rinaldi created the Agent Acme Quotes". Day titles are "Today", "Yesterday", then the weekday; dates are the product's own ("14 October"). Nothing yet: "No events yet." and what will appear. No match: "No events match these filters.".
|
|
61
61
|
* @access The toolbar is named by `label`; each day's title is a level-3 heading over a list of its events; while loading, one status named by `loadingLabel` stands for the rows, and `ActivityFeedSkeleton`, a page's placeholder before it can draw the feed, is busy and carries no words; each time is a `<time>` with its exact moment for assistive technology. A system event has no mark, so nothing empty is announced.
|
|
@@ -47,7 +47,7 @@ function Days({ days, locale, timeZone, older, }) {
|
|
|
47
47
|
*
|
|
48
48
|
* @family Compositions
|
|
49
49
|
* @when A record's history: a Customer's, a Partner's or an Installation's Activity tab in the Portal, the company wiki's updates in Nadia. Each answers "what happened, and when?".
|
|
50
|
-
* @instead The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime.
|
|
50
|
+
* @instead The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime. A history never stands under a list on the same page: it has its own tab (owner).
|
|
51
51
|
* @behaviour The search, filters and window sit right above the rows, kept in the URL by the product. Days stand newest first, each a title and a muted date over one card of rows; a row is the time of day, the actor's 24 px mark, the sentence with a status badge only for an exception, and one muted line of detail. "Show older events" follows the last day as a full-width `LoadMoreButton`, or as a `ButtonLink` when it navigates; there is never a page count. States, first that holds: failed, loading (still rows in the row's shape, which `ActivityFeedSkeleton` also draws while a page reads the events before it can draw the feed; nadicode decision), no match with Clear filters, nothing yet in one line, the days. Nothing yet is one quiet line, never a picture; a failed read is the warning mark with Retry, never "no events". The time is the time of day in the viewer's own zone in tabular figures (`RecordTime`), with UTC and the viewer's zone in its hover card; one rule for every feed, never a time printed in UTC as the viewer's: a server-rendered page passes the viewer's `timeZone`, since without it the server and the first client render print UTC. The actor's mark is a person's initials, an Agent's real orb or an Installation's tile; the system's own work has no mark and never takes an orb. Under 900 px the time moves under the sentence. It draws no card header: the tab is the title.
|
|
52
52
|
* @words The sentence names the actor in `<strong>`, the action in the past tense and the object as a link that keeps the text's colour: "Marco Rinaldi created the Agent Acme Quotes". Day titles are "Today", "Yesterday", then the weekday; dates are the product's own ("14 October"). Nothing yet: "No events yet." and what will appear. No match: "No events match these filters.".
|
|
53
53
|
* @access The toolbar is named by `label`; each day's title is a level-3 heading over a list of its events; while loading, one status named by `loadingLabel` stands for the rows, and `ActivityFeedSkeleton`, a page's placeholder before it can draw the feed, is busy and carries no words; each time is a `<time>` with its exact moment for assistive technology. A system event has no mark, so nothing empty is announced.
|
|
@@ -103,7 +103,7 @@ declare function foldOtherSeries(series: readonly ChartSeries[], data: readonly
|
|
|
103
103
|
* @family Charts
|
|
104
104
|
* @when Every chart and every reading built around one: the frame a page never builds by hand. A chart is a named section of its page.
|
|
105
105
|
* @instead A single figure is a `KpiCard`, never nested inside a chart. A ranking beside the plot goes in the card's `aside`, not a second card.
|
|
106
|
-
* @behaviour `summaryPlacement="beside"` stands the summary at the plot's leading edge from `sm` up and above it on a phone, as Usage's Activity card puts the period's total beside its calendar (nadicode decision). The plot may be given as a node, for a plot that names itself, such as an `ActivityCalendar`, or a page rendered on the server. `cardSize="sm"` draws the compact card, as `Card`'s `size`, for a reading that stands beside fuller cards (nadicode decision). The default header puts controls at the trailing edge on wide cards, below the title on narrow cards. The way to the reading's owner is a › icon link after the controls, as Vercel's Observability preview cards open their page. The summary variant keeps controls immediately after the title, the owner link at the trailing edge, and the total and period above the plot. The ranking sits beside the plot only when the card itself reaches 48 rem; narrower cards keep a full-width plot and put the ranking below it. Controls wrap on narrow cards. An empty dataset shows its `emptyState` in the plot's place. The footer carries the reading time and at most one command on that reading. While its page reads the series, `ChartCardSkeleton` stands in its place: the same card, a bar for the title, the summary's figure when the card has one (`summary`),
|
|
106
|
+
* @behaviour `summaryPlacement="beside"` stands the summary at the plot's leading edge from `sm` up and above it on a phone, as Usage's Activity card puts the period's total beside its calendar (nadicode decision). The plot may be given as a node, for a plot that names itself, such as an `ActivityCalendar`, or a page rendered on the server. `cardSize="sm"` draws the compact card, as `Card`'s `size`, for a reading that stands beside fuller cards (nadicode decision). The default header puts controls at the trailing edge on wide cards, below the title on narrow cards. The way to the reading's owner is a › icon link after the controls, as Vercel's Observability preview cards open their page. The summary variant keeps controls immediately after the title, the owner link at the trailing edge, and the total and period above the plot. The ranking sits beside the plot only when the card itself reaches 48 rem; narrower cards keep a full-width plot and put the ranking below it. Controls wrap on narrow cards. An empty dataset shows its `emptyState` in the plot's place. The footer carries the reading time and at most one command on that reading. While its page reads the series, `ChartCardSkeleton` stands in its place: the same card, a bar for the title, the summary's figure when the card has one (`summary`), the plot's area at its `size`'s height, and the footer's line when the card has one (`footer`), with no words (nadicode decision).
|
|
107
107
|
* @words Title names the measure and its split: "Model spend by Customer". Period as dates. The link's name says where it goes: "Explore Usage by model", "Open revenue in Analytics". Footer: the reading's time, "Updated 4 minutes ago" or "Read at 12:42". Sentence case throughout.
|
|
108
108
|
* @access The title is a heading at the page's level (default 2) and labels the plot. The owner link is a native link named by its `label`. The plot is focusable and shows the 2 px focus outline only on keyboard focus. `ChartCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
109
109
|
*/
|
|
@@ -115,10 +115,12 @@ declare function ChartCard({ variant, title, period, controls, link, summary, su
|
|
|
115
115
|
* What stands in a ChartCard's place while its page reads the series: the card, a bar for the
|
|
116
116
|
* title, the summary's figure when the card has one, and the plot's area at its height.
|
|
117
117
|
*/
|
|
118
|
-
declare function ChartCardSkeleton({ summary, size, }: {
|
|
118
|
+
declare function ChartCardSkeleton({ summary, size, footer, }: {
|
|
119
119
|
/** The card leads with a summary figure above its plot. */
|
|
120
120
|
summary?: boolean;
|
|
121
121
|
size?: ChartCardSize;
|
|
122
|
+
/** The card ends with a footer, such as its reading time. */
|
|
123
|
+
footer?: boolean;
|
|
122
124
|
}): React.JSX.Element;
|
|
123
125
|
declare function ChartSummary({ variant, label, value, valueTitle, valueSize, trend, status, }: ChartSummaryProps): React.JSX.Element;
|
|
124
126
|
/** The plot frame class: fixed height, no aspect ratio, full width. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-card.d.ts","sourceRoot":"","sources":["../../src/components/chart-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEhF,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG3F,KAAK,WAAW,GAAG;IACjB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAElD,KAAK,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC;AACtC,KAAK,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9C,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAA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series, data, entityColorMap, otherLabel) {
|
|
|
63
63
|
* @family Charts
|
|
64
64
|
* @when Every chart and every reading built around one: the frame a page never builds by hand. A chart is a named section of its page.
|
|
65
65
|
* @instead A single figure is a `KpiCard`, never nested inside a chart. A ranking beside the plot goes in the card's `aside`, not a second card.
|
|
66
|
-
* @behaviour `summaryPlacement="beside"` stands the summary at the plot's leading edge from `sm` up and above it on a phone, as Usage's Activity card puts the period's total beside its calendar (nadicode decision). The plot may be given as a node, for a plot that names itself, such as an `ActivityCalendar`, or a page rendered on the server. `cardSize="sm"` draws the compact card, as `Card`'s `size`, for a reading that stands beside fuller cards (nadicode decision). The default header puts controls at the trailing edge on wide cards, below the title on narrow cards. The way to the reading's owner is a › icon link after the controls, as Vercel's Observability preview cards open their page. The summary variant keeps controls immediately after the title, the owner link at the trailing edge, and the total and period above the plot. The ranking sits beside the plot only when the card itself reaches 48 rem; narrower cards keep a full-width plot and put the ranking below it. Controls wrap on narrow cards. An empty dataset shows its `emptyState` in the plot's place. The footer carries the reading time and at most one command on that reading. While its page reads the series, `ChartCardSkeleton` stands in its place: the same card, a bar for the title, the summary's figure when the card has one (`summary`),
|
|
66
|
+
* @behaviour `summaryPlacement="beside"` stands the summary at the plot's leading edge from `sm` up and above it on a phone, as Usage's Activity card puts the period's total beside its calendar (nadicode decision). The plot may be given as a node, for a plot that names itself, such as an `ActivityCalendar`, or a page rendered on the server. `cardSize="sm"` draws the compact card, as `Card`'s `size`, for a reading that stands beside fuller cards (nadicode decision). The default header puts controls at the trailing edge on wide cards, below the title on narrow cards. The way to the reading's owner is a › icon link after the controls, as Vercel's Observability preview cards open their page. The summary variant keeps controls immediately after the title, the owner link at the trailing edge, and the total and period above the plot. The ranking sits beside the plot only when the card itself reaches 48 rem; narrower cards keep a full-width plot and put the ranking below it. Controls wrap on narrow cards. An empty dataset shows its `emptyState` in the plot's place. The footer carries the reading time and at most one command on that reading. While its page reads the series, `ChartCardSkeleton` stands in its place: the same card, a bar for the title, the summary's figure when the card has one (`summary`), the plot's area at its `size`'s height, and the footer's line when the card has one (`footer`), with no words (nadicode decision).
|
|
67
67
|
* @words Title names the measure and its split: "Model spend by Customer". Period as dates. The link's name says where it goes: "Explore Usage by model", "Open revenue in Analytics". Footer: the reading's time, "Updated 4 minutes ago" or "Read at 12:42". Sentence case throughout.
|
|
68
68
|
* @access The title is a heading at the page's level (default 2) and labels the plot. The owner link is a native link named by its `label`. The plot is focusable and shows the 2 px focus outline only on keyboard focus. `ChartCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
69
69
|
*/
|
|
@@ -80,8 +80,8 @@ function ChartCard({ variant = "default", title, period, controls, link, summary
|
|
|
80
80
|
* What stands in a ChartCard's place while its page reads the series: the card, a bar for the
|
|
81
81
|
* title, the summary's figure when the card has one, and the plot's area at its height.
|
|
82
82
|
*/
|
|
83
|
-
function ChartCardSkeleton({ summary = false, size = "default", }) {
|
|
84
|
-
return (_jsx(SkeletonRegion, { busy: true, "data-slot": "chart-card-skeleton", children: _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: _jsx(Skeleton, { boxHeight: 26, className: "max-w-full", height: 20, width: 160 }) }) }), summary ? (_jsx("div", { className: "px-(--card-spacing)", children: _jsx(Skeleton, { className: "max-w-full", height: 64, width: 192 }) })) : null, _jsx(CardContent, { children: _jsx(Skeleton, { className: cn("w-full", chartSizes[size]) }) })] }) }));
|
|
83
|
+
function ChartCardSkeleton({ summary = false, size = "default", footer = false, }) {
|
|
84
|
+
return (_jsx(SkeletonRegion, { busy: true, "data-slot": "chart-card-skeleton", children: _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: _jsx(Skeleton, { boxHeight: 26, className: "max-w-full", height: 20, width: 160 }) }) }), summary ? (_jsx("div", { className: "px-(--card-spacing)", children: _jsx(Skeleton, { className: "max-w-full", height: 64, width: 192 }) })) : null, _jsx(CardContent, { children: _jsx(Skeleton, { className: cn("w-full", chartSizes[size]) }) }), footer ? (_jsx(FooterStrip, { hint: _jsx(Skeleton, { boxHeight: 20, className: "max-w-full", height: 16, width: 160 }), hintSlot: "chart-card-reading" })) : null] }) }));
|
|
85
85
|
}
|
|
86
86
|
function ChartSummary({ variant = "default", label, value, valueTitle, valueSize = "default", trend, status, }) {
|
|
87
87
|
return (_jsxs("div", { "data-slot": "chart-summary", className: "flex flex-col items-start gap-2", children: [_jsx("div", { className: cn(variant === "summary" ? "sr-only" : "text-muted-foreground text-sm"), children: label }), _jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-3", children: [_jsx("div", { "data-slot": "chart-summary-value", className: cn("truncate tabular-nums", variant === "summary"
|
|
@@ -43,17 +43,19 @@ type KpiCardProps = {
|
|
|
43
43
|
* @family Charts
|
|
44
44
|
* @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
|
|
45
45
|
* @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap is `Progress`.
|
|
46
|
-
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words (nadicode decision).
|
|
46
|
+
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words; with `presentation="inline"`, the same lines with no card, inside the section that groups the figure (nadicode decision).
|
|
47
47
|
* @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
|
|
48
48
|
* @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
49
49
|
*/
|
|
50
50
|
declare function KpiCard({ label, value, delta, note, tone, render, presentation, sparkline, }: KpiCardProps): React.JSX.Element;
|
|
51
51
|
/**
|
|
52
52
|
* What stands in a KpiCard's place while its page reads the figure: the card, the label's two
|
|
53
|
-
* lines, the value's line and, for a figure with a comparison or a note, the footer's line.
|
|
53
|
+
* lines, the value's line and, for a figure with a comparison or a note, the footer's line. An
|
|
54
|
+
* inline figure's placeholder holds the same lines with no card.
|
|
54
55
|
*/
|
|
55
|
-
declare function KpiCardSkeleton({ footer }: {
|
|
56
|
+
declare function KpiCardSkeleton({ footer, presentation, }: {
|
|
56
57
|
footer?: boolean;
|
|
58
|
+
presentation?: KpiCardProps["presentation"];
|
|
57
59
|
}): React.JSX.Element;
|
|
58
60
|
export { KpiCard, KpiCardSkeleton };
|
|
59
61
|
export type { KpiCardDelta, KpiCardDirection, KpiCardProps, KpiCardTone };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAY3D,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQtF,KAAK,gBAAgB,GAAG,cAAc,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,KAAK,YAAY,GAAG;IAClB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,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AAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACjC;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,CAAC;AAQF;;;;;;;;;;;;GAYG;AACH,iBAAS,OAAO,CAAC,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAgB,EAChB,MAAM,EACN,YAAqB,EACrB,SAAS,GACV,EAAE,YAAY,qBAwHd;AAED;;;;GAIG;AACH,iBAAS,eAAe,CAAC,EACvB,MAAc,EACd,YAAqB,GACtB,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;CAC7C,qBA6BA;AAED,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -25,7 +25,7 @@ const VALUE_TONE_CLASS = {
|
|
|
25
25
|
* @family Charts
|
|
26
26
|
* @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
|
|
27
27
|
* @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap is `Progress`.
|
|
28
|
-
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words (nadicode decision).
|
|
28
|
+
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words; with `presentation="inline"`, the same lines with no card, inside the section that groups the figure (nadicode decision).
|
|
29
29
|
* @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
|
|
30
30
|
* @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
31
31
|
*/
|
|
@@ -42,9 +42,13 @@ function KpiCard({ label, value, delta, note, tone = "default", render, presenta
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* What stands in a KpiCard's place while its page reads the figure: the card, the label's two
|
|
45
|
-
* lines, the value's line and, for a figure with a comparison or a note, the footer's line.
|
|
45
|
+
* lines, the value's line and, for a figure with a comparison or a note, the footer's line. An
|
|
46
|
+
* inline figure's placeholder holds the same lines with no card.
|
|
46
47
|
*/
|
|
47
|
-
function KpiCardSkeleton({ footer = false }) {
|
|
48
|
-
|
|
48
|
+
function KpiCardSkeleton({ footer = false, presentation = "card", }) {
|
|
49
|
+
if (presentation === "inline") {
|
|
50
|
+
return (_jsxs(SkeletonRegion, { busy: true, className: "grid min-w-0 gap-2", "data-slot": "kpi-card-skeleton", children: [_jsx(Skeleton, { boxHeight: 20, className: "max-w-full", height: 16, width: 128 }), _jsx(Skeleton, { boxHeight: 32, height: 24, width: 96 }), footer ? _jsx(Skeleton, { boxHeight: 16, className: "max-w-full", height: 12, width: 160 }) : null] }));
|
|
51
|
+
}
|
|
52
|
+
return (_jsx(SkeletonRegion, { busy: true, "data-slot": "kpi-card-skeleton", children: _jsxs(Card, { className: "h-full", size: "sm", children: [_jsxs(CardHeader, { children: [_jsx(CardDescription, { className: "min-h-10", children: _jsx(Skeleton, { boxHeight: 20, className: "max-w-full", height: 16, width: 128 }) }), _jsx(CardTitle, { children: _jsx(Skeleton, { boxHeight: 32, height: 24, width: 96 }) })] }), footer ? (_jsx(CardFooter, { children: _jsx(Skeleton, { boxHeight: 20, height: 16, width: "100%" }) })) : null] }) }));
|
|
49
53
|
}
|
|
50
54
|
export { KpiCard, KpiCardSkeleton };
|
|
@@ -175,7 +175,7 @@ function CommandsCell({ row }) {
|
|
|
175
175
|
return (_jsxs("div", { className: "flex items-center justify-end gap-2", children: [_jsxs(WideOnly, { children: [buttons.length > 0 ? (_jsx("div", { className: "flex min-w-0 justify-end gap-2 *:max-w-full *:min-w-0 *:shrink [&>*>span:not([data-icon])]:truncate", children: _jsx(RowCommandButtons, { arm: arm, commands: buttons }) })) : null, state ? _jsx(RowMessageActions, { state: state }) : null] }), menu] }));
|
|
176
176
|
}
|
|
177
177
|
function LoadingRows({ rows }) {
|
|
178
|
-
return Array.from({ length: rows }, (_, index) => (_jsxs("div", { className: "flex items-center gap-4 px-2 py-4", children: [_jsx(Skeleton, { className: "shrink-0", height: 32, width: 32 }), _jsxs("div", { className: "grid min-w-0 gap-2", children: [_jsx(Skeleton, { className: "max-w-full", height: 16, width: 160 }), _jsx(Skeleton, { className: "max-w-full", height: 16, width: 224 })] }), _jsx(Skeleton, { className: "
|
|
178
|
+
return Array.from({ length: rows }, (_, index) => (_jsxs("div", { className: "flex items-center gap-4 px-2 py-4", children: [_jsx(Skeleton, { className: "shrink-0", height: 32, width: 32 }), _jsxs("div", { className: "grid min-w-0 flex-1 grid-cols-[minmax(0,1fr)] gap-2", children: [_jsx(Skeleton, { className: "max-w-full", height: 16, width: 160 }), _jsx(Skeleton, { className: "max-w-full", height: 16, width: 224 })] }), _jsx(Skeleton, { className: "shrink-0", height: 16, width: 92 })] }, index)));
|
|
179
179
|
}
|
|
180
180
|
function LoadingRecords({ label }) {
|
|
181
181
|
return (_jsx("div", { "aria-busy": "true", "aria-label": label, className: "divide-y divide-border", role: "status", children: _jsx(LoadingRows, { rows: 3 }) }));
|
|
@@ -20,7 +20,7 @@ export const USAGE = [
|
|
|
20
20
|
family: "Compositions",
|
|
21
21
|
summary: "What happened to a record, and when: one row per event under its day, newest first.",
|
|
22
22
|
when: "A record's history: a Customer's, a Partner's or an Installation's Activity tab in the Portal, the company wiki's updates in Nadia. Each answers \"what happened, and when?\".",
|
|
23
|
-
instead: 'The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime.',
|
|
23
|
+
instead: 'The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime. A history never stands under a list on the same page: it has its own tab (owner).',
|
|
24
24
|
behaviour: "The search, filters and window sit right above the rows, kept in the URL by the product. Days stand newest first, each a title and a muted date over one card of rows; a row is the time of day, the actor's 24 px mark, the sentence with a status badge only for an exception, and one muted line of detail. \"Show older events\" follows the last day as a full-width `LoadMoreButton`, or as a `ButtonLink` when it navigates; there is never a page count. States, first that holds: failed, loading (still rows in the row's shape, which `ActivityFeedSkeleton` also draws while a page reads the events before it can draw the feed; nadicode decision), no match with Clear filters, nothing yet in one line, the days. Nothing yet is one quiet line, never a picture; a failed read is the warning mark with Retry, never \"no events\". The time is the time of day in the viewer's own zone in tabular figures (`RecordTime`), with UTC and the viewer's zone in its hover card; one rule for every feed, never a time printed in UTC as the viewer's: a server-rendered page passes the viewer's `timeZone`, since without it the server and the first client render print UTC. The actor's mark is a person's initials, an Agent's real orb or an Installation's tile; the system's own work has no mark and never takes an orb. Under 900 px the time moves under the sentence. It draws no card header: the tab is the title.",
|
|
25
25
|
words: 'The sentence names the actor in `<strong>`, the action in the past tense and the object as a link that keeps the text\'s colour: "Marco Rinaldi created the Agent Acme Quotes". Day titles are "Today", "Yesterday", then the weekday; dates are the product\'s own ("14 October"). Nothing yet: "No events yet." and what will appear. No match: "No events match these filters.".',
|
|
26
26
|
access: "The toolbar is named by `label`; each day's title is a level-3 heading over a list of its events; while loading, one status named by `loadingLabel` stands for the rows, and `ActivityFeedSkeleton`, a page's placeholder before it can draw the feed, is busy and carries no words; each time is a `<time>` with its exact moment for assistive technology. A system event has no mark, so nothing empty is announced.",
|
|
@@ -1935,7 +1935,7 @@ export const USAGE = [
|
|
|
1935
1935
|
summary: "The card every chart in the kit renders: one header, the summary, the plot, its legend and the reading's time. The plots (`ChartBarStacked`, `ChartAreaStacked`, `ChartBarMultiple`, `ChartBarHorizontal`) hold only their own plot; a page never builds a chart card frame by hand.",
|
|
1936
1936
|
when: "Every chart and every reading built around one: the frame a page never builds by hand. A chart is a named section of its page.",
|
|
1937
1937
|
instead: "A single figure is a `KpiCard`, never nested inside a chart. A ranking beside the plot goes in the card's `aside`, not a second card.",
|
|
1938
|
-
behaviour: "`summaryPlacement=\"beside\"` stands the summary at the plot's leading edge from `sm` up and above it on a phone, as Usage's Activity card puts the period's total beside its calendar (nadicode decision). The plot may be given as a node, for a plot that names itself, such as an `ActivityCalendar`, or a page rendered on the server. `cardSize=\"sm\"` draws the compact card, as `Card`'s `size`, for a reading that stands beside fuller cards (nadicode decision). The default header puts controls at the trailing edge on wide cards, below the title on narrow cards. The way to the reading's owner is a › icon link after the controls, as Vercel's Observability preview cards open their page. The summary variant keeps controls immediately after the title, the owner link at the trailing edge, and the total and period above the plot. The ranking sits beside the plot only when the card itself reaches 48 rem; narrower cards keep a full-width plot and put the ranking below it. Controls wrap on narrow cards. An empty dataset shows its `emptyState` in the plot's place. The footer carries the reading time and at most one command on that reading. While its page reads the series, `ChartCardSkeleton` stands in its place: the same card, a bar for the title, the summary's figure when the card has one (`summary`),
|
|
1938
|
+
behaviour: "`summaryPlacement=\"beside\"` stands the summary at the plot's leading edge from `sm` up and above it on a phone, as Usage's Activity card puts the period's total beside its calendar (nadicode decision). The plot may be given as a node, for a plot that names itself, such as an `ActivityCalendar`, or a page rendered on the server. `cardSize=\"sm\"` draws the compact card, as `Card`'s `size`, for a reading that stands beside fuller cards (nadicode decision). The default header puts controls at the trailing edge on wide cards, below the title on narrow cards. The way to the reading's owner is a › icon link after the controls, as Vercel's Observability preview cards open their page. The summary variant keeps controls immediately after the title, the owner link at the trailing edge, and the total and period above the plot. The ranking sits beside the plot only when the card itself reaches 48 rem; narrower cards keep a full-width plot and put the ranking below it. Controls wrap on narrow cards. An empty dataset shows its `emptyState` in the plot's place. The footer carries the reading time and at most one command on that reading. While its page reads the series, `ChartCardSkeleton` stands in its place: the same card, a bar for the title, the summary's figure when the card has one (`summary`), the plot's area at its `size`'s height, and the footer's line when the card has one (`footer`), with no words (nadicode decision).",
|
|
1939
1939
|
words: 'Title names the measure and its split: "Model spend by Customer". Period as dates. The link\'s name says where it goes: "Explore Usage by model", "Open revenue in Analytics". Footer: the reading\'s time, "Updated 4 minutes ago" or "Read at 12:42". Sentence case throughout.',
|
|
1940
1940
|
access: "The title is a heading at the page's level (default 2) and labels the plot. The owner link is a native link named by its `label`. The plot is focusable and shows the 2 px focus outline only on keyboard focus. `ChartCardSkeleton` is busy and its bars are hidden from assistive technology.",
|
|
1941
1941
|
},
|
|
@@ -1990,7 +1990,7 @@ export const USAGE = [
|
|
|
1990
1990
|
summary: "One measured figure, the way the dashboard-01 section card shows it: the label above the value, the change top right as a badge, and the named comparison in the footer (`rule/kpi-card-trend-top-right`). With its values over the period (`sparkline`) it reads as Vercel Observability's overview tile: the label, the value with the change badge at its right, the line across the card's width under it, and the comparison under the line, with no footer.",
|
|
1991
1991
|
when: "One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.",
|
|
1992
1992
|
instead: "A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap is `Progress`.",
|
|
1993
|
-
behaviour: "Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words (nadicode decision).",
|
|
1993
|
+
behaviour: "Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words; with `presentation=\"inline\"`, the same lines with no card, inside the section that groups the figure (nadicode decision).",
|
|
1994
1994
|
words: 'The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.',
|
|
1995
1995
|
access: "The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.",
|
|
1996
1996
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.213",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@headless-tree/react": "1.8.0",
|
|
83
83
|
"@iconify-icons/logos": "^2.0.3",
|
|
84
84
|
"@iconify/react": "^6.0.2",
|
|
85
|
-
"@nadicodeai/design-system": "12.1.
|
|
85
|
+
"@nadicodeai/design-system": "12.1.213",
|
|
86
86
|
"@tanstack/react-table": "^9.3.1",
|
|
87
87
|
"@vgpu/wgsl": "0.6.0",
|
|
88
88
|
"class-variance-authority": "^0.7.1",
|