@nadicodeai/ui 12.1.266 → 12.1.267

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.
@@ -1 +1 @@
1
- {"version":3,"file":"message-notice.d.ts","sourceRoot":"","sources":["../../src/components/message-notice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAKL,KAAK,UAAU,IAAI,iBAAiB,EACrC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAWlC;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,CACA;IAAE,SAAS,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,GACzC;IACE,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACJ,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,IAAoB,EACpB,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,+BA2EpB"}
1
+ {"version":3,"file":"message-notice.d.ts","sourceRoot":"","sources":["../../src/components/message-notice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAIL,KAAK,UAAU,IAAI,iBAAiB,EACrC,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAWlC;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,CACA;IAAE,SAAS,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,GACzC;IACE,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACJ,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,IAAoB,EACpB,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,+BA2EpB"}
@@ -2,7 +2,8 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { OctagonAlert } from "lucide-react";
4
4
  import { Alert } from "./alert.js";
5
- import { closedSentence, NOTICE_EDGE, NoticeLink, NoticeMark, } from "../internal/notice.js";
5
+ import { closedSentence, NOTICE_EDGE, NoticeMark, } from "../internal/notice.js";
6
+ import { NoticeLink } from "../internal/notice-link.js";
6
7
  import { cn } from "../lib/utils.js";
7
8
  import { PageCommandButton } from "../internal/page-command-button.js";
8
9
  import { bodyBeyondTitle } from "./product-message.js";
@@ -1,12 +1,12 @@
1
1
  import type { ComponentProps, ReactNode } from "react";
2
2
  import type { LucideIcon } from "lucide-react";
3
3
  import { type NoticeTone } from "../internal/notice.js";
4
- import type { PageCommand } from "./page-actions.js";
4
+ import type { CardCommand } from "./page-actions.js";
5
5
  export type NoticeBannerTone = NoticeTone;
6
6
  export type NoticeBannerLiveRegion = "off" | "polite" | "assertive";
7
7
  export type NoticeBannerProps = {
8
- /** The one fix the page offers, drawn as an underlined link. Required: a condition is shown with its fix. */
9
- action: PageCommand;
8
+ /** The one fix the page offers, drawn as an underlined link; it may ask first (`confirm`). Required: a condition is shown with its fix. */
9
+ action: CardCommand;
10
10
  className?: string;
11
11
  /** One more sentence the title leaves out, run on after it; not shown when it repeats the title. */
12
12
  description?: string;
@@ -27,7 +27,7 @@ export type NoticeBannerProps = {
27
27
  * @family Feedback
28
28
  * @when "A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page's own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page's own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition's `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`, a `DataTable` that is the page's job, and `EntryPage` outside the shell), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).
29
29
  * @instead "Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product's inbox, never a banner on a page, and the page that fixes it shows the state in its own section; the Portal's System health raises it through Knock to the bell at the sidebar's foot.
30
- * @behaviour "Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip's text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone's mark for another lucide icon.
30
+ * @behaviour "Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip's text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. A fix that asks first (`confirm`), such as an approval that starts a payment, opens its confirmation from the link, which stays open and busy while it runs and shows its failure inside it, so a product passes the words and never mounts the confirmation itself (nadicode decision). Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone's mark for another lucide icon.
31
31
  * @words "`label` is one sentence in sentence case that names the impact: `Your Pro trial expires in 3 days.` Don’t open with `Heads up` or apologetic preambles." (https://vercel.com/geist/project-banner) "`callToAction.label` is Title Case `Verb + Noun` and points at the resolver: `Update Payment Method`, `Reactivate Project`, `Review Tokens`." (https://vercel.com/geist/project-banner) "Name the affected entity when the project context isn’t obvious from the surrounding chrome (`Production deployments are paused on my-project`)." (https://vercel.com/geist/project-banner) "Don’t encode severity in the copy with emoji or interjections; the variant carries that signal." (https://vercel.com/geist/project-banner) "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) Ours: the `title` is the `label`: the one sentence, naming the condition, its impact and the object. A `description` only adds what the title leaves out, in one more sentence. Our `label` is the `NoteLabel` topic prefix. The action is sentence case, verb and noun, pointing at the resolver: "Update payment method", "Try again". No "Please". The words come from the product's catalogue code.
32
32
  * @access `liveRegion="assertive"` gives `role="alert"`, for a failure the person just caused; `"polite"` gives `role="status"`, announced once when it appears; `"off"` gives `role="note"` for one already there at load. The mark, given or not, is hidden.
33
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"notice-banner.d.ts","sourceRoot":"","sources":["../../src/components/notice-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAC1C,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6GAA6G;IAC7G,MAAM,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E,MAAM,CAAC;IACrB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,yDAAyD;IACzD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,sBAAsB,CAAC;IACnC,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;CACxB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAKtD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAkDnB"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Alert, AlertDescription, AlertTitle } from "./alert.js";
3
- import { closedSentence, NOTICE_EDGE, NoticeLink, NoticeMark, } from "../internal/notice.js";
3
+ import { closedSentence, NOTICE_EDGE, NoticeMark } from "../internal/notice.js";
4
+ import { NoticeLink } from "../internal/notice-link.js";
4
5
  import { cn } from "../lib/utils.js";
5
6
  import { bodyBeyondTitle } from "./product-message.js";
6
7
  const LIVE_REGION_ROLE = { assertive: "alert", polite: "status", off: "note" };
@@ -11,7 +12,7 @@ const LIVE_REGION_ROLE = { assertive: "alert", polite: "status", off: "note" };
11
12
  * @family Feedback
12
13
  * @when "A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page's own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page's own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition's `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`, a `DataTable` that is the page's job, and `EntryPage` outside the shell), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).
13
14
  * @instead "Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product's inbox, never a banner on a page, and the page that fixes it shows the state in its own section; the Portal's System health raises it through Knock to the bell at the sidebar's foot.
14
- * @behaviour "Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip's text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone's mark for another lucide icon.
15
+ * @behaviour "Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip's text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. A fix that asks first (`confirm`), such as an approval that starts a payment, opens its confirmation from the link, which stays open and busy while it runs and shows its failure inside it, so a product passes the words and never mounts the confirmation itself (nadicode decision). Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone's mark for another lucide icon.
15
16
  * @words "`label` is one sentence in sentence case that names the impact: `Your Pro trial expires in 3 days.` Don’t open with `Heads up` or apologetic preambles." (https://vercel.com/geist/project-banner) "`callToAction.label` is Title Case `Verb + Noun` and points at the resolver: `Update Payment Method`, `Reactivate Project`, `Review Tokens`." (https://vercel.com/geist/project-banner) "Name the affected entity when the project context isn’t obvious from the surrounding chrome (`Production deployments are paused on my-project`)." (https://vercel.com/geist/project-banner) "Don’t encode severity in the copy with emoji or interjections; the variant carries that signal." (https://vercel.com/geist/project-banner) "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) Ours: the `title` is the `label`: the one sentence, naming the condition, its impact and the object. A `description` only adds what the title leaves out, in one more sentence. Our `label` is the `NoteLabel` topic prefix. The action is sentence case, verb and noun, pointing at the resolver: "Update payment method", "Try again". No "Please". The words come from the product's catalogue code.
16
17
  * @access `liveRegion="assertive"` gives `role="alert"`, for a failure the person just caused; `"polite"` gives `role="status"`, announced once when it appears; `"off"` gives `role="note"` for one already there at load. The mark, given or not, is hidden.
17
18
  */
@@ -41,9 +41,11 @@ export type CardCommand = (PageCommand & {
41
41
  * commands in `PageActions`' order, with up to two secondaries. A way to another page, such as
42
42
  * "Statements", is a secondary with its `link`, drawn as a button like the others.
43
43
  */
44
- export type CardActions = Omit<PageActionsProps, "secondary"> & {
45
- /** Up to two lesser commands, outline, before the primary; one may ask first (`confirm`). */
44
+ export type CardActions = Omit<PageActionsProps, "secondary" | "primary"> & {
45
+ /** Up to two lesser commands, outline, before the primary; each may ask first (`confirm`). */
46
46
  secondary?: CardCommand | readonly [CardCommand, CardCommand] | undefined;
47
+ /** The card's filled command, which may ask first (`confirm`), or a button of `choices`. */
48
+ primary?: PagePrimaryCommand | ConfirmedCardCommand | undefined;
47
49
  /** A period or a count before the commands: "26 Oct – 26 Nov", "2 of 5 Agents". */
48
50
  meta?: string | undefined;
49
51
  };
@@ -53,7 +55,7 @@ export type CardActions = Omit<PageActionsProps, "secondary"> & {
53
55
  * @family Actions
54
56
  * @when The header of every card composition draws it from the card's `actions`: ObjectPage, ObjectSection, SettingsSection, SettingsFactsSection and TableCard. A page gives the card its `actions` and never renders this row.
55
57
  * @instead A page's own commands are `PageActions` on the title's row. A record's commands are its list's (`RecordList`) or its `RecordCommands`. A setting card whose value stands at its header's end, such as an avatar upload, gives `SettingsSection` its `control`. A link inside the card's description or footer line is a `TextLink` in that sentence (nadicode decision).
56
- * @behaviour The row holds, in order: the muted `meta` (a period or a count), the reading `period`, up to two secondaries as outline buttons, the primary as the filled button, and the three dots last. A way to another page is a secondary with its `link`, drawn as a button like the others and named for the page; it is never a text link in the header's corner. A page has one filled button, so a card on a page whose primary stands elsewhere takes outline buttons only. A secondary with `confirm`, such as a machine's Stop, asks first: pressing it opens its confirmation, which stays open and busy, saying the command's `pendingLabel`, while it runs, shows its failure inside it and closes once it succeeds, so a product passes the words and never mounts the confirmation itself. It wraps under the title when the header is narrow, as the card's header places it.
58
+ * @behaviour The row holds, in order: the muted `meta` (a period or a count), the reading `period`, up to two secondaries as outline buttons, the primary as the filled button, and the three dots last. A way to another page is a secondary with its `link`, drawn as a button like the others and named for the page; it is never a text link in the header's corner. A page has one filled button, so a card on a page whose primary stands elsewhere takes outline buttons only. A secondary or the primary with `confirm`, such as a machine's Stop, asks first: pressing it opens its confirmation, which stays open and busy, saying the command's `pendingLabel`, while it runs, shows its failure inside it and closes once it succeeds, so a product passes the words and never mounts the confirmation itself. It wraps under the title when the header is narrow, as the card's header places it.
57
59
  * @words A command is a verb on the card's object ("Add card", "Buy Extra usage for Customers"); a way to another page is that page's name as its navigation writes it ("Statements"); `meta` is a short count or period ("2 of 5 Agents").
58
60
  * @access DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A way to another page is a real link. A command with `autoFocus` takes focus as it appears, as the Edit that opened a card's in-place editor does when the editor closes.
59
61
  */
@@ -1 +1 @@
1
- {"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../src/components/page-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAMf,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,eAAe,EAGrB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AAIvB,YAAY,EAAE,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AW,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC;IAC1E,4FAA4F;IAC5F,OAAO,CAAC,EAAE,kBAAkB,GAAG,oBAAoB,GAAG,SAAS,CAAC;IAChE,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AASF;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,WAAW,sCAgCrF;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,GAAG,UAAU,EACd,EAAE,WAAW,GAAG;IAAE,OAAO,EAAE,kBAAkB,CAAA;CAAE,+BAG/C;AAyCD,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB,sCAYpF;AAyCD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,MAAa,GACd,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,+BAIA;AAED,oHAAoH;AACpH,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED,yFAAyF;AACzF,wBAAgB,eAAe,gCAS9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,sCA6BlD"}
@@ -21,7 +21,7 @@ function secondariesOf(secondary) {
21
21
  * @family Actions
22
22
  * @when The header of every card composition draws it from the card's `actions`: ObjectPage, ObjectSection, SettingsSection, SettingsFactsSection and TableCard. A page gives the card its `actions` and never renders this row.
23
23
  * @instead A page's own commands are `PageActions` on the title's row. A record's commands are its list's (`RecordList`) or its `RecordCommands`. A setting card whose value stands at its header's end, such as an avatar upload, gives `SettingsSection` its `control`. A link inside the card's description or footer line is a `TextLink` in that sentence (nadicode decision).
24
- * @behaviour The row holds, in order: the muted `meta` (a period or a count), the reading `period`, up to two secondaries as outline buttons, the primary as the filled button, and the three dots last. A way to another page is a secondary with its `link`, drawn as a button like the others and named for the page; it is never a text link in the header's corner. A page has one filled button, so a card on a page whose primary stands elsewhere takes outline buttons only. A secondary with `confirm`, such as a machine's Stop, asks first: pressing it opens its confirmation, which stays open and busy, saying the command's `pendingLabel`, while it runs, shows its failure inside it and closes once it succeeds, so a product passes the words and never mounts the confirmation itself. It wraps under the title when the header is narrow, as the card's header places it.
24
+ * @behaviour The row holds, in order: the muted `meta` (a period or a count), the reading `period`, up to two secondaries as outline buttons, the primary as the filled button, and the three dots last. A way to another page is a secondary with its `link`, drawn as a button like the others and named for the page; it is never a text link in the header's corner. A page has one filled button, so a card on a page whose primary stands elsewhere takes outline buttons only. A secondary or the primary with `confirm`, such as a machine's Stop, asks first: pressing it opens its confirmation, which stays open and busy, saying the command's `pendingLabel`, while it runs, shows its failure inside it and closes once it succeeds, so a product passes the words and never mounts the confirmation itself. It wraps under the title when the header is narrow, as the card's header places it.
25
25
  * @words A command is a verb on the card's object ("Add card", "Buy Extra usage for Customers"); a way to another page is that page's name as its navigation writes it ("Statements"); `meta` is a short count or period ("2 of 5 Agents").
26
26
  * @access DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A way to another page is a real link. A command with `autoFocus` takes focus as it appears, as the Edit that opened a card's in-place editor does when the editor closes.
27
27
  */
@@ -31,7 +31,7 @@ export function CardActionsRow({ meta, period, secondary, primary, menu }) {
31
31
  if (!hasCardActions({ meta, period, secondary, primary, menu }))
32
32
  return null;
33
33
  const secondaries = secondariesOf(secondary);
34
- return (_jsxs("div", { "data-slot": "card-actions", className: "flex max-w-full min-w-0 flex-wrap items-center gap-2", ref: row, children: [meta ? (_jsx("span", { className: "mr-1 text-label-sm text-muted-foreground", "data-slot": "card-actions-meta", children: meta })) : null, period, secondaries.map((command) => (_jsx(PageCommandButton, { command: arm(command), variant: "outline" }, command.label))), primary ? _jsx(PageCommandButton, { command: primary, variant: "default" }) : null, menu ? _jsx(ActionMenu, { ...menu, size: "page" }) : null, dialog] }));
34
+ return (_jsxs("div", { "data-slot": "card-actions", className: "flex max-w-full min-w-0 flex-wrap items-center gap-2", ref: row, children: [meta ? (_jsx("span", { className: "mr-1 text-label-sm text-muted-foreground", "data-slot": "card-actions-meta", children: meta })) : null, period, secondaries.map((command) => (_jsx(PageCommandButton, { command: arm(command), variant: "outline" }, command.label))), primary ? (_jsx(PageCommandButton, { command: "choices" in primary ? primary : arm(primary), variant: "default" })) : null, menu ? _jsx(ActionMenu, { ...menu, size: "page" }) : null, dialog] }));
35
35
  }
36
36
  export function PageCommandButton({ command, ...appearance }) {
37
37
  if ("choices" in command)
@@ -0,0 +1,18 @@
1
+ import { type CardCommand } from "../components/page-actions.js";
2
+ import type { NoticeTone } from "./notice.js";
3
+ /**
4
+ * A notice's one fix, drawn as an underlined 14 px link with no padding. In a `strip` it takes the
5
+ * darkest step of the strip's own hue (neutral takes the foreground) and returns to the strip's
6
+ * text on hover; `inline` it follows the sentence in the sentence's own colour. A fix that asks
7
+ * first (`confirm`) opens its confirmation from here, as a card's command does.
8
+ */
9
+ export declare function NoticeLink({ className, command, ...place }: {
10
+ className?: string;
11
+ command: CardCommand;
12
+ } & ({
13
+ place: "inline";
14
+ } | {
15
+ place: "strip";
16
+ tone: NoticeTone;
17
+ })): import("react").JSX.Element;
18
+ //# sourceMappingURL=notice-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notice-link.d.ts","sourceRoot":"","sources":["../../src/internal/notice-link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAIhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAgB3C;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;CACtB,GAAG,CAAC;IAAE,KAAK,EAAE,QAAQ,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,+BAgB/D"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { PageCommandButton } from "../components/page-actions.js";
4
+ import { useCommandRunner } from "./command-runner.js";
5
+ import { cn } from "../lib/utils.js";
6
+ const LINK_LOOK = "[&_[data-slot=button]]:gap-0.5 [&_[data-slot=button]]:px-0! [&_[data-slot=button]]:text-body-sm [&_[data-slot=button]]:underline [&_[data-slot=button]_svg]:size-4!";
7
+ const STRIP_LINK = "[&_[data-slot=button]]:h-6 [&_[data-slot=button]]:hover:text-inherit";
8
+ const STRIP_LINK_TONE = {
9
+ neutral: "[&_[data-slot=button]]:text-foreground",
10
+ info: "[&_[data-slot=button]]:text-(--nc-cobalto-1000)",
11
+ warning: "[&_[data-slot=button]]:text-(--nc-giallo-1000)",
12
+ destructive: "[&_[data-slot=button]]:text-(--nc-rosso-1000)",
13
+ };
14
+ const INLINE_LINK = "align-bottom [&_[data-slot=button]]:h-5 [&_[data-slot=button]]:text-current";
15
+ /**
16
+ * A notice's one fix, drawn as an underlined 14 px link with no padding. In a `strip` it takes the
17
+ * darkest step of the strip's own hue (neutral takes the foreground) and returns to the strip's
18
+ * text on hover; `inline` it follows the sentence in the sentence's own colour. A fix that asks
19
+ * first (`confirm`) opens its confirmation from here, as a card's command does.
20
+ */
21
+ export function NoticeLink({ className, command, ...place }) {
22
+ const { arm, dialog } = useCommandRunner();
23
+ return (_jsxs("span", { className: cn("inline-flex", LINK_LOOK, place.place === "strip" ? [STRIP_LINK, STRIP_LINK_TONE[place.tone]] : INLINE_LINK, className), "data-notice-action": true, children: [_jsx(PageCommandButton, { command: arm(command), size: "xs", variant: "link" }), dialog] }));
24
+ }
@@ -1,5 +1,4 @@
1
1
  import { type LucideIcon } from "lucide-react";
2
- import { type PageCommand } from "../components/page-actions.js";
3
2
  export type NoticeTone = "neutral" | "info" | "warning" | "destructive";
4
3
  /** The hue of a notice's edge: a light step of its text colour, neutral for the plain tone. */
5
4
  export declare const NOTICE_EDGE: Record<NoticeTone, string>;
@@ -10,18 +9,4 @@ export declare function NoticeMark({ icon, tone }: {
10
9
  icon?: LucideIcon | undefined;
11
10
  tone: NoticeTone;
12
11
  }): import("react").JSX.Element;
13
- /**
14
- * A notice's one fix, drawn as an underlined 14 px link with no padding. In a `strip` it takes the
15
- * darkest step of the strip's own hue (neutral takes the foreground) and returns to the strip's
16
- * text on hover; `inline` it follows the sentence in the sentence's own colour.
17
- */
18
- export declare function NoticeLink({ className, command, ...place }: {
19
- className?: string;
20
- command: PageCommand;
21
- } & ({
22
- place: "inline";
23
- } | {
24
- place: "strip";
25
- tone: NoticeTone;
26
- })): import("react").JSX.Element;
27
12
  //# sourceMappingURL=notice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice.d.ts","sourceRoot":"","sources":["../../src/internal/notice.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAiB,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAGhF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC;AAExE,+FAA+F;AAC/F,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKlD,CAAC;AAEF,4GAA4G;AAC5G,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MACA,CAAC;AAEhD,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,+BAG7F;AAgBD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;CACtB,GAAG,CAAC;IAAE,KAAK,EAAE,QAAQ,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,+BAc/D"}
1
+ {"version":3,"file":"notice.d.ts","sourceRoot":"","sources":["../../src/internal/notice.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAiB,MAAM,cAAc,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC;AAExE,+FAA+F;AAC/F,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKlD,CAAC;AAEF,4GAA4G;AAC5G,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MACA,CAAC;AAEhD,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,+BAG7F"}
@@ -1,7 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Info, TriangleAlert } from "lucide-react";
3
- import { PageCommandButton } from "../components/page-actions.js";
4
- import { cn } from "../lib/utils.js";
5
3
  /** The hue of a notice's edge: a light step of its text colour, neutral for the plain tone. */
6
4
  export const NOTICE_EDGE = {
7
5
  neutral: "border-border",
@@ -16,20 +14,3 @@ export function NoticeMark({ icon, tone }) {
16
14
  const Mark = icon ?? (tone === "warning" || tone === "destructive" ? TriangleAlert : Info);
17
15
  return _jsx(Mark, { "aria-hidden": "true" });
18
16
  }
19
- const LINK_LOOK = "[&_[data-slot=button]]:gap-0.5 [&_[data-slot=button]]:px-0! [&_[data-slot=button]]:text-body-sm [&_[data-slot=button]]:underline [&_[data-slot=button]_svg]:size-4!";
20
- const STRIP_LINK = "[&_[data-slot=button]]:h-6 [&_[data-slot=button]]:hover:text-inherit";
21
- const STRIP_LINK_TONE = {
22
- neutral: "[&_[data-slot=button]]:text-foreground",
23
- info: "[&_[data-slot=button]]:text-(--nc-cobalto-1000)",
24
- warning: "[&_[data-slot=button]]:text-(--nc-giallo-1000)",
25
- destructive: "[&_[data-slot=button]]:text-(--nc-rosso-1000)",
26
- };
27
- const INLINE_LINK = "align-bottom [&_[data-slot=button]]:h-5 [&_[data-slot=button]]:text-current";
28
- /**
29
- * A notice's one fix, drawn as an underlined 14 px link with no padding. In a `strip` it takes the
30
- * darkest step of the strip's own hue (neutral takes the foreground) and returns to the strip's
31
- * text on hover; `inline` it follows the sentence in the sentence's own colour.
32
- */
33
- export function NoticeLink({ className, command, ...place }) {
34
- return (_jsx("span", { className: cn("inline-flex", LINK_LOOK, place.place === "strip" ? [STRIP_LINK, STRIP_LINK_TONE[place.tone]] : INLINE_LINK, className), "data-notice-action": true, children: _jsx(PageCommandButton, { command: command, size: "xs", variant: "link" }) }));
35
- }
@@ -439,7 +439,7 @@ export const USAGE = [
439
439
  summary: "The end of a card's header: what the card's reader can do from it, and where it leads.",
440
440
  when: "The header of every card composition draws it from the card's `actions`: ObjectPage, ObjectSection, SettingsSection, SettingsFactsSection and TableCard. A page gives the card its `actions` and never renders this row.",
441
441
  instead: "A page's own commands are `PageActions` on the title's row. A record's commands are its list's (`RecordList`) or its `RecordCommands`. A setting card whose value stands at its header's end, such as an avatar upload, gives `SettingsSection` its `control`. A link inside the card's description or footer line is a `TextLink` in that sentence (nadicode decision).",
442
- behaviour: "The row holds, in order: the muted `meta` (a period or a count), the reading `period`, up to two secondaries as outline buttons, the primary as the filled button, and the three dots last. A way to another page is a secondary with its `link`, drawn as a button like the others and named for the page; it is never a text link in the header's corner. A page has one filled button, so a card on a page whose primary stands elsewhere takes outline buttons only. A secondary with `confirm`, such as a machine's Stop, asks first: pressing it opens its confirmation, which stays open and busy, saying the command's `pendingLabel`, while it runs, shows its failure inside it and closes once it succeeds, so a product passes the words and never mounts the confirmation itself. It wraps under the title when the header is narrow, as the card's header places it.",
442
+ behaviour: "The row holds, in order: the muted `meta` (a period or a count), the reading `period`, up to two secondaries as outline buttons, the primary as the filled button, and the three dots last. A way to another page is a secondary with its `link`, drawn as a button like the others and named for the page; it is never a text link in the header's corner. A page has one filled button, so a card on a page whose primary stands elsewhere takes outline buttons only. A secondary or the primary with `confirm`, such as a machine's Stop, asks first: pressing it opens its confirmation, which stays open and busy, saying the command's `pendingLabel`, while it runs, shows its failure inside it and closes once it succeeds, so a product passes the words and never mounts the confirmation itself. It wraps under the title when the header is narrow, as the card's header places it.",
443
443
  words: 'A command is a verb on the card\'s object ("Add card", "Buy Extra usage for Customers"); a way to another page is that page\'s name as its navigation writes it ("Statements"); `meta` is a short count or period ("2 of 5 Agents").',
444
444
  access: "DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A way to another page is a real link. A command with `autoFocus` takes focus as it appears, as the Edit that opened a card's in-place editor does when the editor closes.",
445
445
  },
@@ -1715,7 +1715,7 @@ export const USAGE = [
1715
1715
  summary: "A condition of the page's own object, with the fix the page offers.",
1716
1716
  when: '"A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page\'s own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page\'s own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition\'s `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`, a `DataTable` that is the page\'s job, and `EntryPage` outside the shell), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).',
1717
1717
  instead: '"Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product\'s inbox, never a banner on a page, and the page that fixes it shows the state in its own section; the Portal\'s System health raises it through Knock to the bell at the sidebar\'s foot.',
1718
- behaviour: '"Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip\'s text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone\'s mark for another lucide icon.',
1718
+ behaviour: '"Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip\'s text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. A fix that asks first (`confirm`), such as an approval that starts a payment, opens its confirmation from the link, which stays open and busy while it runs and shows its failure inside it, so a product passes the words and never mounts the confirmation itself (nadicode decision). Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone\'s mark for another lucide icon.',
1719
1719
  words: '"`label` is one sentence in sentence case that names the impact: `Your Pro trial expires in 3 days.` Don’t open with `Heads up` or apologetic preambles." (https://vercel.com/geist/project-banner) "`callToAction.label` is Title Case `Verb + Noun` and points at the resolver: `Update Payment Method`, `Reactivate Project`, `Review Tokens`." (https://vercel.com/geist/project-banner) "Name the affected entity when the project context isn’t obvious from the surrounding chrome (`Production deployments are paused on my-project`)." (https://vercel.com/geist/project-banner) "Don’t encode severity in the copy with emoji or interjections; the variant carries that signal." (https://vercel.com/geist/project-banner) "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) Ours: the `title` is the `label`: the one sentence, naming the condition, its impact and the object. A `description` only adds what the title leaves out, in one more sentence. Our `label` is the `NoteLabel` topic prefix. The action is sentence case, verb and noun, pointing at the resolver: "Update payment method", "Try again". No "Please". The words come from the product\'s catalogue code.',
1720
1720
  access: '`liveRegion="assertive"` gives `role="alert"`, for a failure the person just caused; `"polite"` gives `role="status"`, announced once when it appears; `"off"` gives `role="note"` for one already there at load. The mark, given or not, is hidden.',
1721
1721
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.266",
3
+ "version": "12.1.267",
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.266",
85
+ "@nadicodeai/design-system": "12.1.267",
86
86
  "@tanstack/react-table": "^9.3.1",
87
87
  "@vgpu/wgsl": "0.6.0",
88
88
  "class-variance-authority": "^0.7.1",