@stll/ui 0.75.0 → 0.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/components/button-classes.d.ts +66 -0
  2. package/dist/components/button-classes.js +62 -0
  3. package/dist/components/button.d.ts +11 -4
  4. package/dist/components/button.js +8 -48
  5. package/dist/components/checkbox.js +1 -1
  6. package/dist/components/command.js +1 -1
  7. package/dist/components/composer-tokens.d.ts +9 -1
  8. package/dist/components/composer-tokens.js +9 -1
  9. package/dist/components/composer.d.ts +2 -2
  10. package/dist/components/composer.js +4 -4
  11. package/dist/components/control-face.d.ts +158 -0
  12. package/dist/components/control-face.js +192 -0
  13. package/dist/components/court-badge.d.ts +4 -2
  14. package/dist/components/court-badge.js +5 -3
  15. package/dist/components/details-grid.d.ts +8 -3
  16. package/dist/components/details-grid.js +28 -15
  17. package/dist/components/details-list-face.d.ts +7 -0
  18. package/dist/components/details-list-face.js +25 -0
  19. package/dist/components/document-mark.shared.d.ts +149 -0
  20. package/dist/components/document-mark.shared.js +62 -0
  21. package/dist/components/field-classes.d.ts +4 -0
  22. package/dist/components/field-classes.js +6 -0
  23. package/dist/components/field.js +5 -3
  24. package/dist/components/frame.d.ts +5 -1
  25. package/dist/components/frame.js +2 -2
  26. package/dist/components/input-otp-face.d.ts +4 -0
  27. package/dist/components/input-otp-face.js +15 -0
  28. package/dist/components/input-otp.d.ts +1 -1
  29. package/dist/components/input-otp.js +3 -8
  30. package/dist/components/label-classes.d.ts +20 -0
  31. package/dist/components/label-classes.js +21 -0
  32. package/dist/components/label.d.ts +2 -20
  33. package/dist/components/label.js +2 -19
  34. package/dist/components/landing-shell.d.ts +64 -0
  35. package/dist/components/landing-shell.js +189 -0
  36. package/dist/components/landing.d.ts +2 -39
  37. package/dist/components/landing.js +2 -66
  38. package/dist/components/list-shell.d.ts +39 -0
  39. package/dist/components/list-shell.js +99 -0
  40. package/dist/components/list.d.ts +3 -24
  41. package/dist/components/list.js +2 -49
  42. package/dist/components/outcome-screen-core.d.ts +25 -0
  43. package/dist/components/outcome-screen-core.js +76 -0
  44. package/dist/components/outcome-screen-face.d.ts +3 -0
  45. package/dist/components/outcome-screen-face.js +6 -0
  46. package/dist/components/outcome-screen-view.d.ts +9 -21
  47. package/dist/components/outcome-screen-view.js +36 -101
  48. package/dist/components/segmented-icon-toggle.d.ts +4 -1
  49. package/dist/components/segmented-icon-toggle.js +5 -4
  50. package/dist/components/select-classes.d.ts +10 -0
  51. package/dist/components/select-classes.js +13 -0
  52. package/dist/components/select.js +3 -7
  53. package/dist/components/skeleton.d.ts +3 -1
  54. package/dist/components/skeleton.js +9 -2
  55. package/dist/components/split-button.d.ts +2 -1
  56. package/dist/components/split-button.js +6 -14
  57. package/dist/components/switch.d.ts +1 -5
  58. package/dist/components/switch.js +2 -5
  59. package/dist/components/table-cell.d.ts +35 -0
  60. package/dist/components/table-cell.js +26 -0
  61. package/dist/components/table-shell.d.ts +131 -0
  62. package/dist/components/table-shell.js +141 -0
  63. package/dist/components/table.d.ts +4 -88
  64. package/dist/components/table.js +21 -70
  65. package/dist/components/tabs-classes.d.ts +8 -0
  66. package/dist/components/tabs-classes.js +10 -0
  67. package/dist/components/tabs.js +4 -3
  68. package/dist/components/toggle-classes.d.ts +13 -0
  69. package/dist/components/toggle-classes.js +10 -0
  70. package/dist/components/toggle-group-classes.d.ts +12 -0
  71. package/dist/components/toggle-group-classes.js +13 -0
  72. package/dist/components/toggle-group.js +3 -2
  73. package/dist/components/truncated-text-face.d.ts +33 -0
  74. package/dist/components/truncated-text-face.js +30 -0
  75. package/dist/components/truncated-text.d.ts +1 -6
  76. package/dist/components/truncated-text.js +1 -15
  77. package/dist/components/view-toolbar-classes.d.ts +13 -0
  78. package/dist/components/view-toolbar-classes.js +15 -0
  79. package/dist/components/view-toolbar-shell.d.ts +24 -0
  80. package/dist/components/view-toolbar-shell.js +43 -0
  81. package/dist/components/view-toolbar.d.ts +2 -15
  82. package/dist/components/view-toolbar.js +8 -26
  83. package/dist/data-table/table.js +2 -1
  84. package/dist/icons.d.ts +2 -2
  85. package/dist/icons.js +2 -2
  86. package/dist/index.d.ts +15 -9
  87. package/dist/index.js +11 -8
  88. package/dist/kanban/card-shell.js +1 -1
  89. package/dist/kanban/column-bands.d.ts +0 -8
  90. package/dist/kanban/column-bands.js +1 -18
  91. package/dist/kanban/column-header-shell.d.ts +39 -0
  92. package/dist/kanban/column-header-shell.js +48 -0
  93. package/dist/kanban/column-header.js +9 -12
  94. package/dist/kanban/index.d.ts +2 -2
  95. package/dist/kanban/index.js +3 -3
  96. package/dist/kanban/layout-tokens.d.ts +18 -1
  97. package/dist/kanban/layout-tokens.js +18 -1
  98. package/dist/kanban/sticky-lane.d.ts +2 -7
  99. package/dist/kanban/sticky-lane.js +1 -6
  100. package/dist/kanban/subgroup-board.js +2 -2
  101. package/dist/lib/{menu-row.js → list-row-metric.js} +1 -1
  102. package/package.json +52 -4
  103. /package/dist/lib/{menu-row.d.ts → list-row-metric.d.ts} +0 -0
@@ -2,7 +2,11 @@ import * as React from "react";
2
2
  declare const Frame: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
3
3
  declare const FramePanel: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
4
4
  declare const FrameHeader: ({ className, ...props }: React.ComponentProps<"header">) => React.JSX.Element;
5
- declare const FrameTitle: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
5
+ /** `destructive` names an irreversible section (a danger zone). */
6
+ type FrameTitleTone = "default" | "destructive";
7
+ declare const FrameTitle: ({ className, tone, ...props }: React.ComponentProps<"div"> & {
8
+ tone?: FrameTitleTone | undefined;
9
+ }) => React.JSX.Element;
6
10
  declare const FrameDescription: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
7
11
  declare const FrameFooter: ({ className, ...props }: React.ComponentProps<"footer">) => React.JSX.Element;
8
12
  export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle };
@@ -16,8 +16,8 @@ const FrameHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("header", {
16
16
  "data-slot": "frame-panel-header",
17
17
  ...props
18
18
  });
19
- const FrameTitle = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
20
- className: cn("text-sm font-semibold", className),
19
+ const FrameTitle = ({ className, tone = "default", ...props }) => /* @__PURE__ */ jsx("div", {
20
+ className: cn("text-sm font-semibold", tone === "destructive" && "text-destructive-foreground", className),
21
21
  "data-slot": "frame-panel-title",
22
22
  ...props
23
23
  });
@@ -0,0 +1,4 @@
1
+ declare const InputOTPGroup: ({ className, ...props }: React.ComponentProps<"div">) => import("react").JSX.Element;
2
+ /** The box behind each code character, including before the input mounts. */
3
+ declare const InputOTPSlotFace: ({ className, ...props }: React.ComponentProps<"div">) => import("react").JSX.Element;
4
+ export { InputOTPGroup, InputOTPSlotFace };
@@ -0,0 +1,15 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ // src/components/input-otp-face.tsx
4
+ const InputOTPGroup = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
5
+ className: cn("flex items-center", className),
6
+ "data-slot": "input-otp-group",
7
+ ...props
8
+ });
9
+ /** The box behind each code character, including before the input mounts. */
10
+ const InputOTPSlotFace = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
11
+ className: cn("border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex h-9 w-9 items-center justify-center border-y border-e text-sm shadow-xs outline-none first:rounded-s-md first:border-s last:rounded-e-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className),
12
+ "data-slot": "input-otp-slot",
13
+ ...props
14
+ });
15
+ export { InputOTPGroup, InputOTPSlotFace };
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
+ import { InputOTPGroup } from "./input-otp-face.js";
2
3
  import { OTPInput } from "input-otp";
3
4
  declare const InputOTP: ({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
4
5
  containerClassName?: string;
5
6
  }) => React.JSX.Element;
6
- declare const InputOTPGroup: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
7
7
  declare const InputOTPSlot: ({ index, className, ...props }: React.ComponentProps<"div"> & {
8
8
  index: number;
9
9
  }) => React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { MinusIcon } from "../icons.js";
3
3
  import { cn } from "../lib/utils.js";
4
+ import { InputOTPGroup, InputOTPSlotFace } from "./input-otp-face.js";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import * as React from "react";
6
7
  import { OTPInput, OTPInputContext } from "input-otp";
@@ -11,17 +12,11 @@ const InputOTP = ({ className, containerClassName, ...props }) => /* @__PURE__ *
11
12
  "data-slot": "input-otp",
12
13
  ...props
13
14
  });
14
- const InputOTPGroup = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
15
- className: cn("flex items-center", className),
16
- "data-slot": "input-otp-group",
17
- ...props
18
- });
19
15
  const InputOTPSlot = ({ index, className, ...props }) => {
20
16
  const { char, hasFakeCaret, isActive } = React.use(OTPInputContext).slots[index] ?? {};
21
- return /* @__PURE__ */ jsxs("div", {
22
- className: cn("border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex h-9 w-9 items-center justify-center border-y border-e text-sm shadow-xs outline-none first:rounded-s-md first:border-s last:rounded-e-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className),
17
+ return /* @__PURE__ */ jsxs(InputOTPSlotFace, {
18
+ className,
23
19
  "data-active": isActive,
24
- "data-slot": "input-otp-slot",
25
20
  ...props,
26
21
  children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
27
22
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
@@ -0,0 +1,20 @@
1
+ /**
2
+ * - `default`: the caption above or beside a control.
3
+ * - `choice`: one row of a list of choices, wrapping its radio or checkbox so
4
+ * the whole row picks it; it highlights on hover and rings while the
5
+ * control inside has keyboard focus.
6
+ * - `choice-card`: a bordered card wrapping its radio, for choices that carry
7
+ * a description; the chosen card takes the primary border.
8
+ * - `muted`: a quiet caption in small type, for a filter bar or a dense side
9
+ * form where the controls, not their names, carry the eye.
10
+ *
11
+ * The choice variants dim and stop inviting a click while their control is
12
+ * disabled.
13
+ */
14
+ export declare const LABEL_VARIANT_CLASS_NAME: {
15
+ readonly default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4";
16
+ readonly choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64";
17
+ readonly "choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50";
18
+ readonly muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium";
19
+ };
20
+ export type LabelVariant = keyof typeof LABEL_VARIANT_CLASS_NAME;
@@ -0,0 +1,21 @@
1
+ // src/components/label-classes.ts
2
+ /**
3
+ * - `default`: the caption above or beside a control.
4
+ * - `choice`: one row of a list of choices, wrapping its radio or checkbox so
5
+ * the whole row picks it; it highlights on hover and rings while the
6
+ * control inside has keyboard focus.
7
+ * - `choice-card`: a bordered card wrapping its radio, for choices that carry
8
+ * a description; the chosen card takes the primary border.
9
+ * - `muted`: a quiet caption in small type, for a filter bar or a dense side
10
+ * form where the controls, not their names, carry the eye.
11
+ *
12
+ * The choice variants dim and stop inviting a click while their control is
13
+ * disabled.
14
+ */
15
+ const LABEL_VARIANT_CLASS_NAME = {
16
+ default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4",
17
+ choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64",
18
+ "choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50",
19
+ muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium"
20
+ };
21
+ export { LABEL_VARIANT_CLASS_NAME };
@@ -1,24 +1,6 @@
1
+ import { LabelVariant } from "./label-classes.js";
1
2
  import { useRender } from "@base-ui/react/use-render";
2
- /**
3
- * - `default`: the caption above or beside a control.
4
- * - `choice`: one row of a list of choices, wrapping its radio or checkbox so
5
- * the whole row picks it; it highlights on hover and rings while the
6
- * control inside has keyboard focus.
7
- * - `choice-card`: a bordered card wrapping its radio, for choices that carry
8
- * a description; the chosen card takes the primary border.
9
- * - `muted`: a quiet caption in small type, for a filter bar or a dense side
10
- * form where the controls, not their names, carry the eye.
11
- *
12
- * The choice variants dim and stop inviting a click while their control is
13
- * disabled.
14
- */
15
- declare const LABEL_VARIANT_CLASS_NAME: {
16
- readonly default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4";
17
- readonly choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64";
18
- readonly "choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50";
19
- readonly muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium";
20
- };
21
- type LabelVariant = keyof typeof LABEL_VARIANT_CLASS_NAME;
3
+ /** A caption for a control; the variants are described in ./label-classes.ts. */
22
4
  declare function Label({ className, render, variant, ...props }: useRender.ComponentProps<"label"> & {
23
5
  variant?: LabelVariant;
24
6
  }): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
@@ -1,27 +1,10 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/utils.js";
3
+ import { LABEL_VARIANT_CLASS_NAME } from "./label-classes.js";
3
4
  import { mergeProps } from "@base-ui/react/merge-props";
4
5
  import { useRender } from "@base-ui/react/use-render";
5
6
  // src/components/label.tsx
6
- /**
7
- * - `default`: the caption above or beside a control.
8
- * - `choice`: one row of a list of choices, wrapping its radio or checkbox so
9
- * the whole row picks it; it highlights on hover and rings while the
10
- * control inside has keyboard focus.
11
- * - `choice-card`: a bordered card wrapping its radio, for choices that carry
12
- * a description; the chosen card takes the primary border.
13
- * - `muted`: a quiet caption in small type, for a filter bar or a dense side
14
- * form where the controls, not their names, carry the eye.
15
- *
16
- * The choice variants dim and stop inviting a click while their control is
17
- * disabled.
18
- */
19
- const LABEL_VARIANT_CLASS_NAME = {
20
- default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4",
21
- choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64",
22
- "choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50",
23
- muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium"
24
- };
7
+ /** A caption for a control; the variants are described in ./label-classes.ts. */
25
8
  function Label({ className, render, variant = "default", ...props }) {
26
9
  const defaultProps = {
27
10
  className: cn(LABEL_VARIANT_CLASS_NAME[variant], className),
@@ -0,0 +1,64 @@
1
+ import { ReactElement, ReactNode } from "react";
2
+ type LandingLayoutProps = {
3
+ /** Header-slot actions that belong to the page rather than the fold. */
4
+ actions?: ReactNode | undefined;
5
+ /** The layout stands in for the page while it loads (a pending view). */
6
+ placeholder?: boolean | undefined;
7
+ /** The greeting and the box; centred in the upper fold. */
8
+ hero: ReactNode;
9
+ /** The columns; take the rest of the height, each scrolling on its own. */
10
+ children: ReactNode;
11
+ /** Below the columns, in its own bounded scroll: crawlable navigation. */
12
+ footer?: ReactNode | undefined;
13
+ };
14
+ export declare const LandingLayout: ({ actions, placeholder, hero, children, footer }: LandingLayoutProps) => import("react").JSX.Element;
15
+ type LandingGreetingProps = {
16
+ /** The mark in the tile: the product mark, or the section's icon. */
17
+ icon: ReactNode;
18
+ /** The one line under the tile, as the page's heading. */
19
+ children: ReactNode;
20
+ };
21
+ export declare const LandingGreeting: ({ icon, children }: LandingGreetingProps) => import("react").JSX.Element;
22
+ /** A column's heading: an icon and a sentence-case label, as a link or a trigger. */
23
+ export declare const LANDING_SECTION_HEADING_CLASS = "text-foreground hover:bg-accent/50 focus-visible:ring-ring [&>svg]:text-muted-foreground flex items-center gap-2 rounded-md px-2 py-0.5 text-sm font-semibold outline-none focus-visible:ring-2";
24
+ /** A row of a column, as a link or a button. Its text lines up with the
25
+ * heading's label; the icon slot under the heading icon stays empty unless
26
+ * the icon identifies the row (a matter's colour). */
27
+ export declare const LANDING_ROW_CLASS = "group hover:bg-accent/50 focus-visible:ring-ring rounded-md px-2 py-1.5 text-start outline-none focus-visible:ring-2";
28
+ /**
29
+ * A column's rows while they load, on a `LandingItemText` row's lines (the
30
+ * empty icon slot, a `text-sm` title over a `text-xs` meta line), so the rows
31
+ * that arrive take the placeholders' place without moving anything. With a
32
+ * `label` the stack is announced as one busy region; without one (inside a
33
+ * pending frame that already announces itself) it is decoration.
34
+ */
35
+ export declare const LandingRowsPending: ({ label }: {
36
+ label?: string | undefined;
37
+ }) => import("react").JSX.Element;
38
+ /** A column heading whose label is not known yet: its real icon (it needs no
39
+ * data) and a bar on the label's line, in the heading's own inset. */
40
+ export declare const LandingSectionHeadingPending: ({ icon }: {
41
+ icon?: ReactElement | undefined;
42
+ }) => import("react").JSX.Element;
43
+ /** Which box the hero holds: the chat composer, whose trailing controls sit
44
+ * on a 38px hit row, or the law entry box, whose single search button is
45
+ * the (+) trigger's 28px circle. */
46
+ export type LandingBox = "composer" | "search";
47
+ /**
48
+ * The hero's box before it mounts (the chat composer, the law entry box),
49
+ * from the composer tokens both are built on: the bordered box, the
50
+ * three-line text well, the action row with its round ends, and the status
51
+ * row's line beneath.
52
+ */
53
+ export declare const LandingBoxPending: ({ box }: {
54
+ box: LandingBox;
55
+ }) => import("react").JSX.Element;
56
+ type LandingSectionProps = {
57
+ children: ReactNode;
58
+ heading: ReactNode;
59
+ };
60
+ /** A column: its heading stays put, its rows scroll beneath it. The rows get
61
+ * the same ring room as the hero box, since the viewport clips a flush row's
62
+ * focus ring; the heading takes the same inset so the labels stay aligned. */
63
+ export declare const LandingSection: ({ children, heading }: LandingSectionProps) => import("react").JSX.Element;
64
+ export {};
@@ -0,0 +1,189 @@
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { COMPOSER_BOX_CLASS, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS } from "./composer-tokens.js";
4
+ import { ScrollArea } from "./scroll-area.js";
5
+ import { Skeleton } from "./skeleton.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { createContext, use } from "react";
8
+ // src/components/landing-shell.tsx
9
+ /**
10
+ * A home screen's one shape: a greeting and a box in the upper fold, three
11
+ * columns of what the reader reaches from it below. The chat home and the
12
+ * law home render from these, so a reader who has learned one has learned
13
+ * the other, and the two cannot drift apart.
14
+ */
15
+ const LandingPlaceholderContext = createContext(false);
16
+ const LandingScroll = ({ children, className, scrollFade = false }) => use(LandingPlaceholderContext) ? /* @__PURE__ */ jsx("div", {
17
+ className: cn("flex size-full min-h-0 flex-col", className),
18
+ children: /* @__PURE__ */ jsx("div", {
19
+ className: "relative min-h-0 flex-1 overflow-hidden rounded-[inherit]",
20
+ children
21
+ })
22
+ }) : /* @__PURE__ */ jsx(ScrollArea, {
23
+ className,
24
+ scrollFade,
25
+ children
26
+ });
27
+ const LandingLayout = ({ actions, placeholder = false, hero, children, footer }) => /* @__PURE__ */ jsx(LandingPlaceholderContext, {
28
+ value: placeholder,
29
+ children: /* @__PURE__ */ jsxs("div", {
30
+ className: "mx-auto flex h-full w-full max-w-5xl flex-1 flex-col overflow-hidden",
31
+ children: [actions, /* @__PURE__ */ jsx("div", {
32
+ className: "@container flex min-h-0 flex-1 flex-col overflow-hidden",
33
+ children: /* @__PURE__ */ jsx(LandingScroll, {
34
+ className: "min-h-0 flex-1",
35
+ children: /* @__PURE__ */ jsxs("div", {
36
+ className: "flex min-h-full w-full flex-col items-center px-4 @2xl:h-full",
37
+ children: [
38
+ /* @__PURE__ */ jsx(LandingScroll, {
39
+ className: "min-h-72 w-full max-w-2xl shrink-0 basis-[22rem] @2xl:shrink",
40
+ scrollFade: true,
41
+ children: /* @__PURE__ */ jsx("div", {
42
+ className: "flex min-h-full w-full flex-col items-center justify-center gap-8 px-1",
43
+ children: hero
44
+ })
45
+ }),
46
+ /* @__PURE__ */ jsx("div", {
47
+ className: "grid w-full shrink-0 gap-8 pb-6 @2xl:min-h-0 @2xl:flex-1 @2xl:auto-rows-fr @2xl:grid-cols-3",
48
+ children
49
+ }),
50
+ footer !== void 0 && /* @__PURE__ */ jsx(LandingScroll, {
51
+ className: "h-auto max-h-[40dvh] w-full shrink-0",
52
+ scrollFade: true,
53
+ children: footer
54
+ })
55
+ ]
56
+ })
57
+ })
58
+ })]
59
+ })
60
+ });
61
+ const LandingGreeting = ({ icon, children }) => /* @__PURE__ */ jsxs("div", {
62
+ className: "flex w-full flex-col items-center gap-4 text-center",
63
+ children: [/* @__PURE__ */ jsx("div", {
64
+ className: "border-border bg-background text-foreground flex size-12 items-center justify-center rounded-lg border shadow-sm",
65
+ children: icon
66
+ }), /* @__PURE__ */ jsx("h1", {
67
+ className: "text-foreground max-w-md text-center text-lg font-medium",
68
+ children
69
+ })]
70
+ });
71
+ /** A column's heading: an icon and a sentence-case label, as a link or a trigger. */
72
+ const LANDING_SECTION_HEADING_CLASS = "text-foreground hover:bg-accent/50 focus-visible:ring-ring [&>svg]:text-muted-foreground flex items-center gap-2 rounded-md px-2 py-0.5 text-sm font-semibold outline-none focus-visible:ring-2";
73
+ /** A row of a column, as a link or a button. Its text lines up with the
74
+ * heading's label; the icon slot under the heading icon stays empty unless
75
+ * the icon identifies the row (a matter's colour). */
76
+ const LANDING_ROW_CLASS = "group hover:bg-accent/50 focus-visible:ring-ring rounded-md px-2 py-1.5 text-start outline-none focus-visible:ring-2";
77
+ /** A row's box without its interaction: the inset `LANDING_ROW_CLASS` gives. */
78
+ const LANDING_ROW_BOX_CLASS = "rounded-md px-2 py-1.5";
79
+ const LANDING_ROWS_PENDING_KEYS = [
80
+ "a",
81
+ "b",
82
+ "c"
83
+ ];
84
+ const LANDING_ROW_TITLE_WIDTHS = [
85
+ "w-3/5",
86
+ "w-4/5",
87
+ "w-1/2"
88
+ ];
89
+ const LANDING_ROW_META_WIDTHS = [
90
+ "w-2/5",
91
+ "w-1/3",
92
+ "w-2/5"
93
+ ];
94
+ /** The stack a column's rows sit in (`LandingSection`'s list). */
95
+ const LANDING_ROWS_CLASS = "flex flex-col gap-1";
96
+ /**
97
+ * A column's rows while they load, on a `LandingItemText` row's lines (the
98
+ * empty icon slot, a `text-sm` title over a `text-xs` meta line), so the rows
99
+ * that arrive take the placeholders' place without moving anything. With a
100
+ * `label` the stack is announced as one busy region; without one (inside a
101
+ * pending frame that already announces itself) it is decoration.
102
+ */
103
+ const LandingRowsPending = ({ label }) => /* @__PURE__ */ jsx("div", {
104
+ ...label === void 0 ? { "aria-hidden": true } : {
105
+ "aria-busy": true,
106
+ "aria-label": label,
107
+ role: "status"
108
+ },
109
+ className: LANDING_ROWS_CLASS,
110
+ children: LANDING_ROWS_PENDING_KEYS.map((key, index) => /* @__PURE__ */ jsx("div", {
111
+ "aria-hidden": "true",
112
+ className: LANDING_ROW_BOX_CLASS,
113
+ "data-slot": "landing-row-skeleton",
114
+ children: /* @__PURE__ */ jsxs("div", {
115
+ className: "flex min-w-0 items-start gap-2",
116
+ children: [/* @__PURE__ */ jsx("span", { className: "size-4 shrink-0" }), /* @__PURE__ */ jsxs("div", {
117
+ className: "min-w-0 flex-1",
118
+ children: [/* @__PURE__ */ jsx("div", {
119
+ className: "flex h-5 items-center",
120
+ children: /* @__PURE__ */ jsx(Skeleton, { className: cn("h-3.5", LANDING_ROW_TITLE_WIDTHS[index]) })
121
+ }), /* @__PURE__ */ jsx("div", {
122
+ className: "flex h-4 items-center",
123
+ children: /* @__PURE__ */ jsx(Skeleton, { className: cn("h-2.5", LANDING_ROW_META_WIDTHS[index]) })
124
+ })]
125
+ })]
126
+ })
127
+ }, key))
128
+ });
129
+ /** A column heading whose label is not known yet: its real icon (it needs no
130
+ * data) and a bar on the label's line, in the heading's own inset. */
131
+ const LandingSectionHeadingPending = ({ icon }) => /* @__PURE__ */ jsxs("div", {
132
+ "aria-hidden": "true",
133
+ className: "[&>svg]:text-muted-foreground flex items-center gap-2 px-2 py-0.5",
134
+ children: [icon ?? /* @__PURE__ */ jsx(Skeleton, { className: "size-4 shrink-0" }), /* @__PURE__ */ jsx("div", {
135
+ className: "flex h-5 items-center",
136
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-28" })
137
+ })]
138
+ });
139
+ const BOX_TRAILING_CONTROLS_CLASS = {
140
+ composer: "h-9.5",
141
+ search: "h-7"
142
+ };
143
+ /**
144
+ * The hero's box before it mounts (the chat composer, the law entry box),
145
+ * from the composer tokens both are built on: the bordered box, the
146
+ * three-line text well, the action row with its round ends, and the status
147
+ * row's line beneath.
148
+ */
149
+ const LandingBoxPending = ({ box }) => /* @__PURE__ */ jsxs("div", {
150
+ "aria-hidden": "true",
151
+ className: "flex w-full flex-col",
152
+ children: [/* @__PURE__ */ jsxs("div", {
153
+ className: COMPOSER_BOX_CLASS,
154
+ children: [/* @__PURE__ */ jsx("div", {
155
+ className: COMPOSER_LARGE_TEXT_WELL_CLASS,
156
+ children: /* @__PURE__ */ jsx("div", {
157
+ className: cn(COMPOSER_LARGE_EDITOR_CLASS, "py-0.5"),
158
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" })
159
+ })
160
+ }), /* @__PURE__ */ jsxs("div", {
161
+ className: COMPOSER_LARGE_ACTION_ROW_CLASS,
162
+ children: [/* @__PURE__ */ jsx(Skeleton, { className: "me-auto size-7 rounded-full" }), /* @__PURE__ */ jsx("span", {
163
+ className: cn("flex items-center", BOX_TRAILING_CONTROLS_CLASS[box]),
164
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "size-7 rounded-full" })
165
+ })]
166
+ })]
167
+ }), /* @__PURE__ */ jsxs("div", {
168
+ className: "mt-1.5 flex h-6 items-center justify-between gap-2 px-1",
169
+ children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" })]
170
+ })]
171
+ });
172
+ /** A column: its heading stays put, its rows scroll beneath it. The rows get
173
+ * the same ring room as the hero box, since the viewport clips a flush row's
174
+ * focus ring; the heading takes the same inset so the labels stay aligned. */
175
+ const LandingSection = ({ children, heading }) => /* @__PURE__ */ jsxs("section", {
176
+ className: "flex min-h-0 min-w-0 flex-col",
177
+ children: [/* @__PURE__ */ jsx("div", {
178
+ className: "mb-3 shrink-0 px-1",
179
+ children: heading
180
+ }), /* @__PURE__ */ jsx(LandingScroll, {
181
+ className: "@2xl:min-h-0 @2xl:flex-1",
182
+ scrollFade: true,
183
+ children: /* @__PURE__ */ jsx("div", {
184
+ className: cn(LANDING_ROWS_CLASS, "px-1 pt-1 pb-4"),
185
+ children
186
+ })
187
+ })]
188
+ });
189
+ export { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingBoxPending, LandingGreeting, LandingLayout, LandingRowsPending, LandingSection, LandingSectionHeadingPending };
@@ -1,42 +1,5 @@
1
+ import { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingBoxPending, LandingGreeting, LandingLayout, LandingRowsPending, LandingSection, LandingSectionHeadingPending } from "./landing-shell.js";
1
2
  import { ReactElement, ReactNode } from "react";
2
- /**
3
- * A home screen's one shape: a greeting and a box in the upper fold, three
4
- * columns of what the reader reaches from it below. The chat home and the
5
- * law home render from these, so a reader who has learned one has learned
6
- * the other, and the two cannot drift apart.
7
- */
8
- type LandingLayoutProps = {
9
- /** Header-slot actions that belong to the page rather than the fold. */
10
- actions?: ReactNode | undefined;
11
- /** The greeting and the box; centred in the upper fold. */
12
- hero: ReactNode;
13
- /** The columns; take the rest of the height, each scrolling on its own. */
14
- children: ReactNode;
15
- /** Below the columns, in its own bounded scroll: crawlable navigation. */
16
- footer?: ReactNode | undefined;
17
- };
18
- export declare const LandingLayout: ({ actions, hero, children, footer }: LandingLayoutProps) => import("react").JSX.Element;
19
- type LandingGreetingProps = {
20
- /** The mark in the tile: the product mark, or the section's icon. */
21
- icon: ReactNode;
22
- /** The one line under the tile, as the page's heading. */
23
- children: ReactNode;
24
- };
25
- export declare const LandingGreeting: ({ icon, children }: LandingGreetingProps) => import("react").JSX.Element;
26
- /** A column's heading: an icon and a sentence-case label, as a link or a trigger. */
27
- export declare const LANDING_SECTION_HEADING_CLASS = "text-foreground hover:bg-accent/50 focus-visible:ring-ring [&>svg]:text-muted-foreground flex items-center gap-2 rounded-md px-2 py-0.5 text-sm font-semibold outline-none focus-visible:ring-2";
28
- /** A row of a column, as a link or a button. Its text lines up with the
29
- * heading's label; the icon slot under the heading icon stays empty unless
30
- * the icon identifies the row (a matter's colour). */
31
- export declare const LANDING_ROW_CLASS = "group hover:bg-accent/50 focus-visible:ring-ring rounded-md px-2 py-1.5 text-start outline-none focus-visible:ring-2";
32
- type LandingSectionProps = {
33
- children: ReactNode;
34
- heading: ReactNode;
35
- };
36
- /** A column: its heading stays put, its rows scroll beneath it. The rows get
37
- * the same ring room as the hero box, since the viewport clips a flush row's
38
- * focus ring; the heading takes the same inset so the labels stay aligned. */
39
- export declare const LandingSection: ({ children, heading }: LandingSectionProps) => import("react").JSX.Element;
40
3
  type LandingButtonProps = {
41
4
  icon?: ReactElement;
42
5
  meta?: ReactNode | undefined;
@@ -60,4 +23,4 @@ type LandingEmptyProps = {
60
23
  children: ReactNode;
61
24
  };
62
25
  export declare const LandingEmpty: ({ children }: LandingEmptyProps) => import("react").JSX.Element;
63
- export {};
26
+ export { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingBoxPending, LandingGreeting, LandingLayout, LandingRowsPending, LandingSection, LandingSectionHeadingPending };
@@ -1,74 +1,10 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { BidiText } from "./bidi-text.js";
4
- import { ScrollArea } from "./scroll-area.js";
4
+ import { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingBoxPending, LandingGreeting, LandingLayout, LandingRowsPending, LandingSection, LandingSectionHeadingPending } from "./landing-shell.js";
5
5
  import { TruncatedText } from "./truncated-text.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  // src/components/landing.tsx
8
- const LandingLayout = ({ actions, hero, children, footer }) => /* @__PURE__ */ jsxs("div", {
9
- className: "mx-auto flex h-full w-full max-w-5xl flex-1 flex-col overflow-hidden",
10
- children: [actions, /* @__PURE__ */ jsx("div", {
11
- className: "@container flex min-h-0 flex-1 flex-col overflow-hidden",
12
- children: /* @__PURE__ */ jsx(ScrollArea, {
13
- className: "min-h-0 flex-1",
14
- children: /* @__PURE__ */ jsxs("div", {
15
- className: "flex min-h-full w-full flex-col items-center px-4 @2xl:h-full",
16
- children: [
17
- /* @__PURE__ */ jsx(ScrollArea, {
18
- className: "min-h-72 w-full max-w-2xl shrink-0 basis-[22rem] @2xl:shrink",
19
- scrollFade: true,
20
- children: /* @__PURE__ */ jsx("div", {
21
- className: "flex min-h-full w-full flex-col items-center justify-center gap-8 px-1",
22
- children: hero
23
- })
24
- }),
25
- /* @__PURE__ */ jsx("div", {
26
- className: "grid w-full shrink-0 gap-8 pb-6 @2xl:min-h-0 @2xl:flex-1 @2xl:auto-rows-fr @2xl:grid-cols-3",
27
- children
28
- }),
29
- footer !== void 0 && /* @__PURE__ */ jsx(ScrollArea, {
30
- className: "h-auto max-h-[40dvh] w-full shrink-0",
31
- scrollFade: true,
32
- children: footer
33
- })
34
- ]
35
- })
36
- })
37
- })]
38
- });
39
- const LandingGreeting = ({ icon, children }) => /* @__PURE__ */ jsxs("div", {
40
- className: "flex w-full flex-col items-center gap-4 text-center",
41
- children: [/* @__PURE__ */ jsx("div", {
42
- className: "border-border bg-background text-foreground flex size-12 items-center justify-center rounded-lg border shadow-sm",
43
- children: icon
44
- }), /* @__PURE__ */ jsx("h1", {
45
- className: "text-foreground max-w-md text-center text-lg font-medium",
46
- children
47
- })]
48
- });
49
- /** A column's heading: an icon and a sentence-case label, as a link or a trigger. */
50
- const LANDING_SECTION_HEADING_CLASS = "text-foreground hover:bg-accent/50 focus-visible:ring-ring [&>svg]:text-muted-foreground flex items-center gap-2 rounded-md px-2 py-0.5 text-sm font-semibold outline-none focus-visible:ring-2";
51
- /** A row of a column, as a link or a button. Its text lines up with the
52
- * heading's label; the icon slot under the heading icon stays empty unless
53
- * the icon identifies the row (a matter's colour). */
54
- const LANDING_ROW_CLASS = "group hover:bg-accent/50 focus-visible:ring-ring rounded-md px-2 py-1.5 text-start outline-none focus-visible:ring-2";
55
- /** A column: its heading stays put, its rows scroll beneath it. The rows get
56
- * the same ring room as the hero box, since the viewport clips a flush row's
57
- * focus ring; the heading takes the same inset so the labels stay aligned. */
58
- const LandingSection = ({ children, heading }) => /* @__PURE__ */ jsxs("section", {
59
- className: "flex min-h-0 min-w-0 flex-col",
60
- children: [/* @__PURE__ */ jsx("div", {
61
- className: "mb-3 shrink-0 px-1",
62
- children: heading
63
- }), /* @__PURE__ */ jsx(ScrollArea, {
64
- className: "@2xl:min-h-0 @2xl:flex-1",
65
- scrollFade: true,
66
- children: /* @__PURE__ */ jsx("div", {
67
- className: "flex flex-col gap-1 px-1 pt-1 pb-4",
68
- children
69
- })
70
- })]
71
- });
72
8
  const LandingButton = ({ icon, meta, onClick, title }) => /* @__PURE__ */ jsx("button", {
73
9
  className: LANDING_ROW_CLASS,
74
10
  onClick,
@@ -107,4 +43,4 @@ const LandingEmpty = ({ children }) => /* @__PURE__ */ jsx("div", {
107
43
  className: "border-border text-muted-foreground rounded-md border border-dashed px-3 py-3 text-sm",
108
44
  children
109
45
  });
110
- export { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingButton, LandingEmpty, LandingGreeting, LandingItemText, LandingLayout, LandingRowIcon, LandingSection };
46
+ export { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingBoxPending, LandingButton, LandingEmpty, LandingGreeting, LandingItemText, LandingLayout, LandingRowIcon, LandingRowsPending, LandingSection, LandingSectionHeadingPending };
@@ -0,0 +1,39 @@
1
+ import * as React from "react";
2
+ declare const ListGroup: ({ className, ...props }: React.ComponentProps<"section">) => React.JSX.Element;
3
+ declare const ListGroupHeader: ({ className, ...props }: React.ComponentProps<"header">) => React.JSX.Element;
4
+ /** Title and description stack; takes the space the header action leaves. */
5
+ declare const ListGroupHeading: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
6
+ declare const ListGroupTitle: ({ className, children, ...props }: React.ComponentProps<"h2">) => React.JSX.Element;
7
+ /** The group's one quiet line under its title. */
8
+ declare const ListGroupDescription: ({ className, ...props }: React.ComponentProps<"p">) => React.JSX.Element;
9
+ /**
10
+ * The surface. Depth comes from a ring plus a soft shadow, not a frame.
11
+ *
12
+ * A row wrapped in `EntityActions` sits inside its `display: contents`
13
+ * listener, which draws no border, and its menu anchor follows it as a
14
+ * sibling, so `divide-y` cannot reach it: such a row draws its own hairline
15
+ * on top, from the second wrapped row on.
16
+ */
17
+ declare const List: ({ className, ...props }: React.ComponentProps<"ul">) => React.JSX.Element;
18
+ /** A row's box: its height floor, inset and the gap between its slots. */
19
+ export declare const LIST_ITEM_ROW_CLASS = "flex min-h-14 w-full items-center gap-3 px-4 py-2.5 text-start";
20
+ type ListItemSkeletonProps = {
21
+ /** Which placeholder row this is: the widths vary row to row. */
22
+ index: number;
23
+ /** A 32px `ListItemMedia` tile before the text. */
24
+ media?: boolean | undefined;
25
+ /** A `ListItemDescription` line under the title. */
26
+ description?: boolean | undefined;
27
+ /** The trailing slot (a date, a status), as wide as its placeholder. */
28
+ trailing?: "text" | undefined;
29
+ };
30
+ /**
31
+ * A `ListItem` while its data loads: the row's box, and a bar on each line
32
+ * the row will hold (a `text-sm` title, a `text-xs` description, the
33
+ * trailing text), so the row that arrives takes its place without moving
34
+ * anything. Decoration: the loading view announces itself once.
35
+ */
36
+ declare const ListItemSkeleton: ({ description, index, media, trailing }: ListItemSkeletonProps) => React.JSX.Element;
37
+ /** A group title whose text waits on data: a bar on the title's line. */
38
+ declare const ListGroupTitlePending: () => React.JSX.Element;
39
+ export { List, ListGroup, ListGroupDescription, ListGroupHeader, ListGroupHeading, ListGroupTitle, ListGroupTitlePending, ListItemSkeleton };