@nadicodeai/ui 12.1.210 → 12.1.211

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.
Files changed (125) hide show
  1. package/AGENTS.md +11 -4
  2. package/dist/components/account-menu.d.ts +3 -3
  3. package/dist/components/account-menu.d.ts.map +1 -1
  4. package/dist/components/account-menu.js +7 -5
  5. package/dist/components/activity-feed.d.ts +4 -2
  6. package/dist/components/activity-feed.d.ts.map +1 -1
  7. package/dist/components/activity-feed.js +10 -3
  8. package/dist/components/board.d.ts +45 -0
  9. package/dist/components/board.d.ts.map +1 -0
  10. package/dist/components/board.js +35 -0
  11. package/dist/components/breadcrumb.d.ts +3 -3
  12. package/dist/components/breadcrumb.d.ts.map +1 -1
  13. package/dist/components/button.d.ts +6 -1
  14. package/dist/components/button.d.ts.map +1 -1
  15. package/dist/components/button.js +5 -2
  16. package/dist/components/card-row.js +1 -1
  17. package/dist/components/chart-card.d.ts +19 -6
  18. package/dist/components/chart-card.d.ts.map +1 -1
  19. package/dist/components/chart-card.js +17 -7
  20. package/dist/components/collection-page.d.ts +4 -4
  21. package/dist/components/collection-page.d.ts.map +1 -1
  22. package/dist/components/collection-page.js +4 -8
  23. package/dist/components/column-foot.d.ts +53 -0
  24. package/dist/components/column-foot.d.ts.map +1 -0
  25. package/dist/components/column-foot.js +32 -0
  26. package/dist/components/conversation-card.d.ts +38 -0
  27. package/dist/components/conversation-card.d.ts.map +1 -0
  28. package/dist/components/conversation-card.js +19 -0
  29. package/dist/components/data-table.d.ts +26 -21
  30. package/dist/components/data-table.d.ts.map +1 -1
  31. package/dist/components/data-table.js +34 -22
  32. package/dist/components/entry-page.d.ts +55 -0
  33. package/dist/components/entry-page.d.ts.map +1 -0
  34. package/dist/components/entry-page.js +41 -0
  35. package/dist/components/entry-scene.d.ts +1 -1
  36. package/dist/components/entry-scene.js +1 -1
  37. package/dist/components/filter-toolbar.d.ts +43 -0
  38. package/dist/components/filter-toolbar.d.ts.map +1 -0
  39. package/dist/components/filter-toolbar.js +44 -0
  40. package/dist/components/hive-scene.d.ts +4 -1
  41. package/dist/components/hive-scene.d.ts.map +1 -1
  42. package/dist/components/hive-scene.js +6 -1
  43. package/dist/components/kpi-card.d.ts +10 -3
  44. package/dist/components/kpi-card.d.ts.map +1 -1
  45. package/dist/components/kpi-card.js +11 -3
  46. package/dist/components/message-notice.d.ts +3 -3
  47. package/dist/components/message-notice.js +1 -1
  48. package/dist/components/notice-banner.d.ts +1 -1
  49. package/dist/components/notice-banner.js +1 -1
  50. package/dist/components/object-workspace.d.ts +25 -5
  51. package/dist/components/object-workspace.d.ts.map +1 -1
  52. package/dist/components/object-workspace.js +30 -7
  53. package/dist/components/page-actions.d.ts +0 -2
  54. package/dist/components/page-actions.d.ts.map +1 -1
  55. package/dist/components/page-actions.js +1 -5
  56. package/dist/components/page-frame.d.ts +38 -0
  57. package/dist/components/page-frame.d.ts.map +1 -0
  58. package/dist/components/page-frame.js +29 -0
  59. package/dist/components/place-count.d.ts +20 -0
  60. package/dist/components/place-count.d.ts.map +1 -0
  61. package/dist/components/place-count.js +16 -0
  62. package/dist/components/plan-card.d.ts +49 -0
  63. package/dist/components/plan-card.d.ts.map +1 -0
  64. package/dist/components/plan-card.js +22 -0
  65. package/dist/components/product-band.d.ts +20 -0
  66. package/dist/components/product-band.d.ts.map +1 -0
  67. package/dist/components/product-band.js +23 -0
  68. package/dist/components/product-shell.d.ts +314 -44
  69. package/dist/components/product-shell.d.ts.map +1 -1
  70. package/dist/components/product-shell.js +465 -36
  71. package/dist/components/reading-column.d.ts +1 -1
  72. package/dist/components/reading-column.js +1 -1
  73. package/dist/components/record-list.d.ts +19 -3
  74. package/dist/components/record-list.d.ts.map +1 -1
  75. package/dist/components/record-list.js +23 -8
  76. package/dist/components/record-time.d.ts +6 -2
  77. package/dist/components/record-time.d.ts.map +1 -1
  78. package/dist/components/record-time.js +8 -5
  79. package/dist/components/row-edit-form.d.ts +1 -1
  80. package/dist/components/row-edit-form.js +1 -1
  81. package/dist/components/scope-switcher.d.ts +3 -1
  82. package/dist/components/scope-switcher.d.ts.map +1 -1
  83. package/dist/components/scope-switcher.js +3 -6
  84. package/dist/components/settings-page.d.ts +3 -3
  85. package/dist/components/settings-page.js +3 -3
  86. package/dist/components/settings-section.d.ts +18 -4
  87. package/dist/components/settings-section.d.ts.map +1 -1
  88. package/dist/components/settings-section.js +12 -4
  89. package/dist/components/sidebar-sections.d.ts.map +1 -1
  90. package/dist/components/sidebar-sections.js +4 -4
  91. package/dist/components/sidebar.d.ts +27 -5
  92. package/dist/components/sidebar.d.ts.map +1 -1
  93. package/dist/components/sidebar.js +55 -23
  94. package/dist/components/table-card.d.ts.map +1 -1
  95. package/dist/components/table-card.js +2 -1
  96. package/dist/components/toast.d.ts +10 -1
  97. package/dist/components/toast.d.ts.map +1 -1
  98. package/dist/components/toast.js +24 -1
  99. package/dist/index.d.ts +5 -0
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +5 -0
  102. package/dist/internal/button-classes.d.ts +2 -0
  103. package/dist/internal/button-classes.d.ts.map +1 -1
  104. package/dist/internal/button-classes.js +54 -46
  105. package/dist/internal/card-actions.d.ts +3 -0
  106. package/dist/internal/card-actions.d.ts.map +1 -0
  107. package/dist/internal/card-actions.js +4 -0
  108. package/dist/internal/footer-strip.d.ts.map +1 -1
  109. package/dist/internal/footer-strip.js +3 -1
  110. package/dist/lib/product-shell.d.ts +20 -0
  111. package/dist/lib/product-shell.d.ts.map +1 -0
  112. package/dist/lib/product-shell.js +19 -0
  113. package/dist/showcase/specimens/compositions.d.ts +15 -0
  114. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  115. package/dist/showcase/specimens/compositions.js +70 -0
  116. package/dist/showcase/specimens/index.d.ts +11 -0
  117. package/dist/showcase/specimens/index.d.ts.map +1 -1
  118. package/dist/showcase/specimens/navigation.d.ts +4 -0
  119. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  120. package/dist/showcase/specimens/navigation.js +26 -1
  121. package/dist/showcase/usage.generated.d.ts +1 -1
  122. package/dist/showcase/usage.generated.d.ts.map +1 -1
  123. package/dist/showcase/usage.generated.js +159 -38
  124. package/dist/styles/components.css +12 -0
  125. package/package.json +6 -2
@@ -0,0 +1,38 @@
1
+ import type { ComponentProps, ReactElement, ReactNode } from "react";
2
+ import { type ReadingColumnWidth } from "./reading-column.js";
3
+ type PageFrameTitle = {
4
+ /** The page's title, drawn as its h1 with the page's actions on its row, for a page whose composition draws none. */
5
+ title: string;
6
+ /** One muted line under the title, saying what the page's concept is. */
7
+ description?: ReactNode;
8
+ /** The heading's own props, such as a fuller name that adds the record the page belongs to: "Skills, Sofia". */
9
+ headingProps?: Omit<ComponentProps<"h1">, "children">;
10
+ } | {
11
+ title?: undefined;
12
+ description?: never;
13
+ headingProps?: never;
14
+ };
15
+ export type PageFrameProps = PageFrameTitle & {
16
+ /** The product's `<main />`, which the frame fills with the page and scrolls: a page owns its landmarks, so no component renders one. */
17
+ main: ReactElement;
18
+ /** The landmark's name when the title is not it: the record the page belongs to ("Sofia"), or the page's name where its composition draws the title ("Scheduled tasks"). */
19
+ label?: string;
20
+ /** The page's measure: `full` for collections, objects and boards, `settings` for a page of settings, `reading` for a conversation or a form. */
21
+ column?: ReadingColumnWidth;
22
+ /** The page: a page composition, or the sections of one. */
23
+ children: ReactNode;
24
+ };
25
+ /**
26
+ * The page area of a product whose host app draws the window around its pages: the page's `main`
27
+ * landmark, its scrolling and gutter, its column, and its title row when its composition draws none.
28
+ *
29
+ * @family Compositions
30
+ * @when Every page of Nadia's window, whose `ProductShell` stands in Hermes's window with `host` while Hermes renders each page in its own page area: Settings, the company's places, an Agent's Edit sections and her landing, Scheduled tasks, a past conversation and New Agent.
31
+ * @instead A product whose `ProductShell` draws the page area itself (its `main`) gives the shell its page composition and never draws this. A page whose composition titles it (the `title` of `CollectionPage` or `OverviewPage`, `ObjectPage`'s `headingProps`) gives the frame a `label` and no `title`, so the page has one h1. A board whose lanes the host draws is `BoardHeader` above them and `BoardEmpty` in their place. A page never draws `PageHeader` or `ReadingColumn` itself, which `nadicodeai/page-composition` refuses.
32
+ * @behaviour The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row, as a product's chrome does; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there.
33
+ * @words The product's: the title is the page's name as the product's column writes it ("Skills", "Mail"); the description is one sentence saying what the page's concept does; the label names the record the page belongs to ("Sofia") or the page whose composition draws the title ("Scheduled tasks").
34
+ * @access The product's element is the page's `main` landmark, named by `label`, or by the title. The title is the page's h1, and `headingProps` gives it a fuller name where the title alone does not say whose page it is. DOM order is visual order.
35
+ */
36
+ export declare function PageFrame({ main, label, title, description, headingProps, column, children, }: PageFrameProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
37
+ export {};
38
+ //# sourceMappingURL=page-frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-frame.d.ts","sourceRoot":"","sources":["../../src/components/page-frame.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAErF,KAAK,cAAc,GACf;IACE,qHAAqH;IACrH,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gHAAgH;IAChH,YAAY,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;CACvD,GACD;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAErE,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG;IAC5C,yIAAyI;IACzI,IAAI,EAAE,YAAY,CAAC;IACnB,4KAA4K;IAC5K,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iJAAiJ;IACjJ,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,MAAe,EACf,QAAQ,GACT,EAAE,cAAc,8EAqBhB"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { PageActionsHostProvider } from "./page-actions.js";
5
+ import { PageHeader } from "./page-header.js";
6
+ import { ReadingColumn } from "./reading-column.js";
7
+ /**
8
+ * The page area of a product whose host app draws the window around its pages: the page's `main`
9
+ * landmark, its scrolling and gutter, its column, and its title row when its composition draws none.
10
+ *
11
+ * @family Compositions
12
+ * @when Every page of Nadia's window, whose `ProductShell` stands in Hermes's window with `host` while Hermes renders each page in its own page area: Settings, the company's places, an Agent's Edit sections and her landing, Scheduled tasks, a past conversation and New Agent.
13
+ * @instead A product whose `ProductShell` draws the page area itself (its `main`) gives the shell its page composition and never draws this. A page whose composition titles it (the `title` of `CollectionPage` or `OverviewPage`, `ObjectPage`'s `headingProps`) gives the frame a `label` and no `title`, so the page has one h1. A board whose lanes the host draws is `BoardHeader` above them and `BoardEmpty` in their place. A page never draws `PageHeader` or `ReadingColumn` itself, which `nadicodeai/page-composition` refuses.
14
+ * @behaviour The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row, as a product's chrome does; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there.
15
+ * @words The product's: the title is the page's name as the product's column writes it ("Skills", "Mail"); the description is one sentence saying what the page's concept does; the label names the record the page belongs to ("Sofia") or the page whose composition draws the title ("Scheduled tasks").
16
+ * @access The product's element is the page's `main` landmark, named by `label`, or by the title. The title is the page's h1, and `headingProps` gives it a fuller name where the title alone does not say whose page it is. DOM order is visual order.
17
+ */
18
+ export function PageFrame({ main, label, title, description, headingProps, column = "full", children, }) {
19
+ return useRender({
20
+ defaultTagName: "div",
21
+ render: main,
22
+ props: {
23
+ "aria-label": label ?? title,
24
+ className: "h-full min-h-0 overflow-y-auto p-nadicode-lg [scrollbar-gutter:stable_both-edges]",
25
+ children: (_jsx(PageActionsHostProvider, { titled: Boolean(title), children: _jsxs(ReadingColumn, { width: column, children: [title ? (_jsx(PageHeader, { description: description, headingProps: headingProps, title: title })) : null, children] }) })),
26
+ },
27
+ state: { slot: "page-frame" },
28
+ });
29
+ }
@@ -0,0 +1,20 @@
1
+ import type * as React from "react";
2
+ import { SidebarMenuBadge } from "./sidebar.js";
3
+ export type PlaceCountProps = Omit<React.ComponentProps<typeof SidebarMenuBadge>, "children"> & {
4
+ /** How many things wait at the row's place. */
5
+ count: number;
6
+ /** What a screen reader hears after the figure, such as "unread messages". */
7
+ spoken?: string;
8
+ };
9
+ /**
10
+ * The count at the end of a column's row: how many things wait at that place.
11
+ *
12
+ * @family Navigation
13
+ * @when The end of a place's row in a column, which `ProductShell` draws from a place's `badge` and a column the product does not draw, such as Alveare's carried Buzz sidebar, mounts for its unread counts.
14
+ * @instead A count anywhere else is a `Badge`; a product never draws `SidebarMenuBadge` itself.
15
+ * @behaviour Plain figures in the column's ink, or with `tone` `attention` a filled circle in the attention colour for a count that needs the person, as `ProductShell` draws a place's badge. Above 99 it reads 99+. Hidden while the column shows icons alone.
16
+ * @words A figure; `spoken` names what is counted for a screen reader.
17
+ * @access The figure is read with its row; `spoken` follows it for a screen reader only.
18
+ */
19
+ export declare function PlaceCount({ count, spoken, ...props }: PlaceCountProps): React.JSX.Element;
20
+ //# sourceMappingURL=place-count.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"place-count.d.ts","sourceRoot":"","sources":["../../src/components/place-count.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,EAAE,UAAU,CAAC,GAAG;IAC9F,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,qBAOtE"}
@@ -0,0 +1,16 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SidebarMenuBadge } from "./sidebar.js";
3
+ const MOST_SHOWN = 99;
4
+ /**
5
+ * The count at the end of a column's row: how many things wait at that place.
6
+ *
7
+ * @family Navigation
8
+ * @when The end of a place's row in a column, which `ProductShell` draws from a place's `badge` and a column the product does not draw, such as Alveare's carried Buzz sidebar, mounts for its unread counts.
9
+ * @instead A count anywhere else is a `Badge`; a product never draws `SidebarMenuBadge` itself.
10
+ * @behaviour Plain figures in the column's ink, or with `tone` `attention` a filled circle in the attention colour for a count that needs the person, as `ProductShell` draws a place's badge. Above 99 it reads 99+. Hidden while the column shows icons alone.
11
+ * @words A figure; `spoken` names what is counted for a screen reader.
12
+ * @access The figure is read with its row; `spoken` follows it for a screen reader only.
13
+ */
14
+ export function PlaceCount({ count, spoken, ...props }) {
15
+ return (_jsxs(SidebarMenuBadge, { ...props, children: [count > MOST_SHOWN ? `${MOST_SHOWN}+` : count, spoken ? _jsxs("span", { className: "sr-only", children: [" ", spoken] }) : null] }));
16
+ }
@@ -0,0 +1,49 @@
1
+ import { type ComponentProps, type ReactElement, type ReactNode } from "react";
2
+ export type PlanCardAllowance = {
3
+ /** The use the plan includes against the smallest one, as a figure: "3×". Left out when the plan includes none. */
4
+ figure?: string | undefined;
5
+ /** The same in words, which a screen reader reads: "Three times the usage of Pro". */
6
+ label: string;
7
+ };
8
+ export type PlanCardInclusions = {
9
+ /** What the list is: "Also included". */
10
+ label: string;
11
+ items: readonly string[];
12
+ };
13
+ export type PlanCardProps = Omit<ComponentProps<"section">, "title" | "children"> & {
14
+ /** The plan's name: "Business". */
15
+ name: string;
16
+ /** The name's heading level: 3 under the catalogue's own heading, 2 where nothing titles the plans. */
17
+ headingLevel?: 2 | 3;
18
+ /** The plan's emblem across the top of the card: the product's image element. Decorative: the name says which plan it is. */
19
+ picture?: ReactElement | undefined;
20
+ /** The plan's standing for this viewer at the name's trailing edge: Current, Next, Recommended, each a `Badge`. */
21
+ status?: ReactNode;
22
+ /** One line under the name, for a plan whose audience needs saying: "For Partners who resell nadicode". */
23
+ description?: string | undefined;
24
+ /** How much use the plan includes. */
25
+ allowance: PlanCardAllowance;
26
+ /** What comes with the plan beyond its use, each item after a check mark. */
27
+ inclusions?: PlanCardInclusions | undefined;
28
+ /** The price as it reads, its period beside it, and the line under it: "€49", "/month", "VAT excluded". */
29
+ price: {
30
+ amount: string;
31
+ period: string;
32
+ note?: string | undefined;
33
+ };
34
+ /** At the card's foot under a divider: the command that chooses the plan, or the line that says why it cannot be chosen. */
35
+ action: ReactNode;
36
+ };
37
+ /**
38
+ * One plan a person can choose, in a row of plans: its emblem, name, use, what comes with it, its
39
+ * price and the command that chooses it.
40
+ *
41
+ * @family Compositions
42
+ * @when The plans a person compares and chooses from: the Portal's plan catalogue in Billing, a Partner's plans above its Customers' (nadicode decision).
43
+ * @instead The plan an account holds now is a fact of its billing, in an `ObjectSection` or a `SettingsFactsSection`. A thing added from a catalogue with no price is a `CatalogCard` or a `CatalogEntry`. A row of these cards is a `CardRow`.
44
+ * @behaviour A resting card. The `picture` fills its width at the top, square, the card's corner clipping it; then the name, with the `status` badges at its trailing edge; then the `description`, the allowance's `figure` large over its `label`, the `inclusions` as a list under their label, each item after a muted check mark, and the price with its period beside it and its `note` under it. The `action` stands at the card's foot under a divider, so the actions of a row of cards line up whatever each plan holds. Neutral throughout: a plan is told apart by its emblem and its badges, never a coloured card (nadicode decision).
45
+ * @words The name as the plan is called everywhere. A badge is one word: "Current", "Next", "Recommended". The allowance's label says the use in words ("Three times the usage of Pro", "Usage included"); the price is the amount, the period "/month", the note what the price leaves out ("VAT excluded"). The action is a verb on the plan ("Subscribe", "Change plan"), or the line that says why there is none ("Your current plan").
46
+ * @access A `section` labelled by the plan's name, a heading at `headingLevel`. The picture and the allowance's figure are hidden from assistive technology, which reads the name and the label instead. The inclusions are a list.
47
+ */
48
+ export declare function PlanCard({ name, headingLevel, picture, status, description, allowance, inclusions, price, action, className, ...props }: PlanCardProps): import("react").JSX.Element;
49
+ //# sourceMappingURL=plan-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-card.d.ts","sourceRoot":"","sources":["../../src/components/plan-card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAKtF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,mHAAmH;IACnH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAClF,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC,mHAAmH;IACnH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2GAA2G;IAC3G,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,sCAAsC;IACtC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC5C,2GAA2G;IAC3G,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACrE,4HAA4H;IAC5H,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,YAAgB,EAChB,OAAO,EACP,MAAM,EACN,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,+BAiEf"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Check } from "lucide-react";
3
+ import { useId } from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Card, CardContent, CardHeader, CardTitle } from "./card.js";
6
+ /**
7
+ * One plan a person can choose, in a row of plans: its emblem, name, use, what comes with it, its
8
+ * price and the command that chooses it.
9
+ *
10
+ * @family Compositions
11
+ * @when The plans a person compares and chooses from: the Portal's plan catalogue in Billing, a Partner's plans above its Customers' (nadicode decision).
12
+ * @instead The plan an account holds now is a fact of its billing, in an `ObjectSection` or a `SettingsFactsSection`. A thing added from a catalogue with no price is a `CatalogCard` or a `CatalogEntry`. A row of these cards is a `CardRow`.
13
+ * @behaviour A resting card. The `picture` fills its width at the top, square, the card's corner clipping it; then the name, with the `status` badges at its trailing edge; then the `description`, the allowance's `figure` large over its `label`, the `inclusions` as a list under their label, each item after a muted check mark, and the price with its period beside it and its `note` under it. The `action` stands at the card's foot under a divider, so the actions of a row of cards line up whatever each plan holds. Neutral throughout: a plan is told apart by its emblem and its badges, never a coloured card (nadicode decision).
14
+ * @words The name as the plan is called everywhere. A badge is one word: "Current", "Next", "Recommended". The allowance's label says the use in words ("Three times the usage of Pro", "Usage included"); the price is the amount, the period "/month", the note what the price leaves out ("VAT excluded"). The action is a verb on the plan ("Subscribe", "Change plan"), or the line that says why there is none ("Your current plan").
15
+ * @access A `section` labelled by the plan's name, a heading at `headingLevel`. The picture and the allowance's figure are hidden from assistive technology, which reads the name and the label instead. The inclusions are a list.
16
+ */
17
+ export function PlanCard({ name, headingLevel = 3, picture, status, description, allowance, inclusions, price, action, className, ...props }) {
18
+ const headingId = useId();
19
+ const inclusionsId = useId();
20
+ const Heading = headingLevel === 2 ? "h2" : "h3";
21
+ return (_jsxs(Card, { className: cn("h-full", picture && "pt-0", className), render: _jsx("section", { ...props, "aria-labelledby": headingId, "data-slot": "plan-card" }), children: [picture ? (_jsx("div", { "aria-hidden": "true", className: "*:aspect-square *:h-auto *:w-full *:object-contain", "data-slot": "plan-card-picture", children: picture })) : null, _jsxs(CardHeader, { className: "flex flex-row items-start justify-between gap-3", children: [_jsx(CardTitle, { children: _jsx(Heading, { id: headingId, children: name }) }), status ? _jsx("div", { className: "flex flex-wrap justify-end gap-2", children: status }) : null] }), _jsxs(CardContent, { className: "flex flex-1 flex-col gap-4", children: [description ? _jsx("p", { className: "text-body-sm", children: description }) : null, _jsxs("div", { className: "flex flex-col gap-2", "data-slot": "plan-card-allowance", children: [allowance.figure ? (_jsx("p", { "aria-hidden": "true", className: "text-display-lg tabular-nums", children: allowance.figure })) : null, _jsx("p", { className: "text-body-sm text-muted-foreground", children: allowance.label })] }), inclusions && inclusions.items.length > 0 ? (_jsxs("div", { className: "flex flex-col gap-2", "data-slot": "plan-card-inclusions", children: [_jsx("p", { className: "text-caption text-muted-foreground", id: inclusionsId, children: inclusions.label }), _jsx("ul", { "aria-labelledby": inclusionsId, className: "flex flex-col gap-1.5 text-body-sm", children: inclusions.items.map((item) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx(Check, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }), item] }, item))) })] })) : null, _jsxs("div", { className: "flex flex-col gap-1", "data-slot": "plan-card-price", children: [_jsxs("p", { className: "text-body-lg font-medium tabular-nums", children: [price.amount, _jsx("span", { className: "text-body-sm text-muted-foreground", children: price.period })] }), price.note ? _jsx("p", { className: "text-caption text-muted-foreground", children: price.note }) : null] }), _jsx("div", { className: "mt-auto border-t pt-4", "data-slot": "plan-card-action", children: _jsx("div", { className: "flex min-h-control-height items-center", children: action }) })] })] }));
22
+ }
@@ -0,0 +1,20 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ /**
3
+ * One product a person downloads, as a band: its name, its line and its downloads, beside its picture.
4
+ *
5
+ * @family Compositions
6
+ * @when The Downloads page, one band per product: Nadia, Alveare, Alveare Server, NadiaOS.
7
+ * @instead One file among a product's files is an `Item` row in an `ItemGroup` inside the band; an entry a person adds from a catalogue is a `CatalogCard`; the steps after a download are `NumberedSteps`.
8
+ * @behaviour One resting card. The content stands centred in its height, 24 px in from the card's edges and 24 px between its parts. From a card 57 rem wide the picture stands at the right, a quarter of the card and at most 288 px, its foot on the card's bottom edge; on a narrower card it stands centred under the content, 224 px square. The product's picture fills its square, so the band never jumps when it loads. While the page reads the releases, `ProductBandSkeleton` stands in its place: the same band, the mark's square and the name's and line's bars, the download button's bar, and the picture's square, with no words (nadicode decision).
9
+ * @words None of its own: the product's name, its line and its download labels are the product's, from its catalogue.
10
+ * @access The picture is decorative: hidden from assistive technology and never a target. The content names the band with its own heading. `ProductBandSkeleton` is busy and its bars are hidden from assistive technology.
11
+ */
12
+ export declare function ProductBand({ picture, children, }: {
13
+ /** The product's picture, an image that fills the square it is given: the product's router image with `fill`. */
14
+ picture: ReactElement;
15
+ /** The product's mark, heading, line and downloads. */
16
+ children: ReactNode;
17
+ }): import("react").JSX.Element;
18
+ /** What stands in a ProductBand's place while its page reads the releases, with no words. */
19
+ export declare function ProductBandSkeleton(): import("react").JSX.Element;
20
+ //# sourceMappingURL=product-band.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-band.d.ts","sourceRoot":"","sources":["../../src/components/product-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBrD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,GACT,EAAE;IACD,iHAAiH;IACjH,OAAO,EAAE,YAAY,CAAC;IACtB,uDAAuD;IACvD,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAMA;AAED,6FAA6F;AAC7F,wBAAgB,mBAAmB,gCAsBlC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Card } from "./card.js";
3
+ import { Skeleton, SkeletonRegion } from "./skeleton.js";
4
+ function Band({ content, picture }) {
5
+ return (_jsxs("div", { className: "flex flex-col @[57rem]:flex-row @[57rem]:items-stretch", "data-slot": "product-band", children: [_jsx("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-6 p-6 @[57rem]:pr-4", children: content }), _jsx("div", { "aria-hidden": "true", className: "pointer-events-none flex justify-center px-6 pt-2 @[57rem]:w-1/4 @[57rem]:max-w-72 @[57rem]:shrink-0 @[57rem]:items-end @[57rem]:px-0 @[57rem]:pt-6", "data-slot": "product-band-picture", children: _jsx("div", { className: "relative aspect-square w-56 @[57rem]:w-full", children: picture }) })] }));
6
+ }
7
+ /**
8
+ * One product a person downloads, as a band: its name, its line and its downloads, beside its picture.
9
+ *
10
+ * @family Compositions
11
+ * @when The Downloads page, one band per product: Nadia, Alveare, Alveare Server, NadiaOS.
12
+ * @instead One file among a product's files is an `Item` row in an `ItemGroup` inside the band; an entry a person adds from a catalogue is a `CatalogCard`; the steps after a download are `NumberedSteps`.
13
+ * @behaviour One resting card. The content stands centred in its height, 24 px in from the card's edges and 24 px between its parts. From a card 57 rem wide the picture stands at the right, a quarter of the card and at most 288 px, its foot on the card's bottom edge; on a narrower card it stands centred under the content, 224 px square. The product's picture fills its square, so the band never jumps when it loads. While the page reads the releases, `ProductBandSkeleton` stands in its place: the same band, the mark's square and the name's and line's bars, the download button's bar, and the picture's square, with no words (nadicode decision).
14
+ * @words None of its own: the product's name, its line and its download labels are the product's, from its catalogue.
15
+ * @access The picture is decorative: hidden from assistive technology and never a target. The content names the band with its own heading. `ProductBandSkeleton` is busy and its bars are hidden from assistive technology.
16
+ */
17
+ export function ProductBand({ picture, children, }) {
18
+ return (_jsx(Card, { className: "@container gap-0 py-0", children: _jsx(Band, { content: children, picture: picture }) }));
19
+ }
20
+ /** What stands in a ProductBand's place while its page reads the releases, with no words. */
21
+ export function ProductBandSkeleton() {
22
+ return (_jsx(SkeletonRegion, { busy: true, "data-slot": "product-band-skeleton", children: _jsx(Card, { className: "@container gap-0 py-0", children: _jsx(Band, { content: _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-start gap-4", children: [_jsx(Skeleton, { className: "size-14 shrink-0" }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [_jsx(Skeleton, { className: "h-7 w-40 max-w-full" }), _jsx(Skeleton, { className: "h-4 w-full max-w-xl" })] })] }), _jsx(Skeleton, { className: "h-control-height w-52 max-w-full" })] }), picture: _jsx(Skeleton, { className: "size-full" }) }) }) }));
23
+ }