@stll/ui 0.71.0 → 0.73.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 (91) hide show
  1. package/dist/calendar/primitives.d.ts +7 -7
  2. package/dist/components/alert-dialog.d.ts +15 -15
  3. package/dist/components/animated-preview.d.ts +9 -9
  4. package/dist/components/animated-preview.js +3 -3
  5. package/dist/components/application-rail.d.ts +8 -8
  6. package/dist/components/bidi-text.d.ts +7 -7
  7. package/dist/components/brand-icons.d.ts +5 -5
  8. package/dist/components/breadcrumb.d.ts +8 -8
  9. package/dist/components/button.d.ts +4 -2
  10. package/dist/components/button.js +8 -1
  11. package/dist/components/button.native-classes.js +15 -0
  12. package/dist/components/button.shared.d.ts +5 -1
  13. package/dist/components/button.shared.js +6 -0
  14. package/dist/components/checkbox.d.ts +15 -1
  15. package/dist/components/checkbox.js +74 -30
  16. package/dist/components/collapsible.d.ts +2 -2
  17. package/dist/components/collapsible.js +3 -3
  18. package/dist/components/color-picker.d.ts +4 -4
  19. package/dist/components/combobox.d.ts +23 -23
  20. package/dist/components/combobox.js +6 -6
  21. package/dist/components/command.d.ts +19 -19
  22. package/dist/components/composer.js +1 -1
  23. package/dist/components/destructive-action-confirmation.d.ts +5 -5
  24. package/dist/components/destructive-action-confirmation.js +2 -2
  25. package/dist/components/destructive-confirm-dialog.d.ts +7 -7
  26. package/dist/components/details-grid.d.ts +6 -6
  27. package/dist/components/dialog.d.ts +19 -19
  28. package/dist/components/frame.d.ts +7 -7
  29. package/dist/components/hex-color-picker.d.ts +16 -2
  30. package/dist/components/highlighted-textarea.d.ts +13 -0
  31. package/dist/components/highlighted-textarea.js +47 -0
  32. package/dist/components/input-group.d.ts +6 -6
  33. package/dist/components/input-otp.d.ts +7 -7
  34. package/dist/components/input-otp.js +2 -2
  35. package/dist/components/input.d.ts +5 -5
  36. package/dist/components/kbd.d.ts +3 -3
  37. package/dist/components/list.d.ts +20 -20
  38. package/dist/components/menu.d.ts +22 -21
  39. package/dist/components/menu.js +4 -1
  40. package/dist/components/outcome-screen-view.d.ts +88 -0
  41. package/dist/components/outcome-screen-view.js +170 -0
  42. package/dist/components/outcome-screen.d.ts +16 -0
  43. package/dist/components/outcome-screen.js +47 -0
  44. package/dist/components/outline-rail.d.ts +12 -0
  45. package/dist/components/pagination.d.ts +9 -9
  46. package/dist/components/popover.d.ts +10 -9
  47. package/dist/components/popover.js +4 -1
  48. package/dist/components/preview-pane.d.ts +6 -6
  49. package/dist/components/prose.d.ts +2 -2
  50. package/dist/components/scroll-to-top.d.ts +5 -0
  51. package/dist/components/search-field.d.ts +3 -3
  52. package/dist/components/select.d.ts +9 -9
  53. package/dist/components/select.js +11 -11
  54. package/dist/components/sheet.d.ts +16 -16
  55. package/dist/components/steps.d.ts +6 -6
  56. package/dist/components/switch.d.ts +5 -5
  57. package/dist/components/switch.native.d.ts +3 -3
  58. package/dist/components/table-layout.d.ts +14 -0
  59. package/dist/components/table-layout.js +15 -0
  60. package/dist/components/table.d.ts +18 -17
  61. package/dist/components/table.js +2 -1
  62. package/dist/components/textarea.d.ts +5 -3
  63. package/dist/components/textarea.js +27 -15
  64. package/dist/components/time-field.d.ts +3 -3
  65. package/dist/components/toast.d.ts +20 -20
  66. package/dist/components/toast.js +3 -3
  67. package/dist/components/toggle-group.d.ts +4 -4
  68. package/dist/components/toggle.d.ts +3 -3
  69. package/dist/components/tooltip-trigger-helper.d.ts +4 -4
  70. package/dist/components/truncated-text.d.ts +4 -4
  71. package/dist/components/truncated-text.js +3 -3
  72. package/dist/data-table/index.d.ts +7 -0
  73. package/dist/hooks/use-contained-handler.d.ts +2 -2
  74. package/dist/hooks/use-mobile.js +2 -2
  75. package/dist/hooks/use-viewport-width.js +2 -2
  76. package/dist/icons.d.ts +29 -1
  77. package/dist/icons.js +55 -1
  78. package/dist/index.d.ts +10 -1
  79. package/dist/index.js +3 -1
  80. package/dist/inspector/chrome.d.ts +22 -22
  81. package/dist/inspector/index.d.ts +9 -0
  82. package/dist/kanban/grouping.d.ts +10 -0
  83. package/dist/kanban/index.d.ts +9 -0
  84. package/dist/kanban/sortable-interactions.d.ts +8 -8
  85. package/dist/kanban/sortable-interactions.js +11 -11
  86. package/dist/lib/button-disposition.d.ts +2 -2
  87. package/dist/lib/tooltip-content.d.ts +2 -2
  88. package/dist/lib/utils.d.ts +2 -2
  89. package/dist/styles/collapsible.css +26 -0
  90. package/dist/styles/theme.css +35 -0
  91. package/package.json +17 -9
@@ -1,4 +1,4 @@
1
- import * as React$1 from "react";
1
+ import * as React from "react";
2
2
  import { TruncatedTextLines } from "./truncated-text.js";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { useRender } from "@base-ui/react/use-render";
@@ -10,40 +10,40 @@ import { useRender } from "@base-ui/react/use-render";
10
10
  * truncates and the trailing column keeps its width, so actions stay on
11
11
  * screen at any viewport.
12
12
  */
13
- declare const ListGroup: ({ className, ...props }: React$1.ComponentProps<"section">) => React$1.JSX.Element;
14
- declare const ListGroupHeader: ({ className, ...props }: React$1.ComponentProps<"header">) => React$1.JSX.Element;
13
+ declare const ListGroup: ({ className, ...props }: React.ComponentProps<"section">) => React.JSX.Element;
14
+ declare const ListGroupHeader: ({ className, ...props }: React.ComponentProps<"header">) => React.JSX.Element;
15
15
  /** Title and description stack; takes the space the header action leaves. */
16
- declare const ListGroupHeading: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
17
- declare const ListGroupTitle: ({ className, children, ...props }: React$1.ComponentProps<"h2">) => React$1.JSX.Element;
16
+ declare const ListGroupHeading: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
17
+ declare const ListGroupTitle: ({ className, children, ...props }: React.ComponentProps<"h2">) => React.JSX.Element;
18
18
  /**
19
19
  * Quiet item count after the title; shows matches while a search filters,
20
20
  * and a changed digit fades in rather than snapping. `count` arrives
21
21
  * formatted in the caller's locale.
22
22
  */
23
- declare const ListGroupCount: ({ className, count, ...props }: Omit<React$1.ComponentProps<"span">, "children"> & {
23
+ declare const ListGroupCount: ({ className, count, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
24
24
  count: string;
25
- }) => React$1.JSX.Element;
26
- declare const ListGroupDescription: ({ className, ...props }: React$1.ComponentProps<"p">) => React$1.JSX.Element;
25
+ }) => React.JSX.Element;
26
+ declare const ListGroupDescription: ({ className, ...props }: React.ComponentProps<"p">) => React.JSX.Element;
27
27
  /** Quiet trailing affordance on the header row (a link or ghost button). */
28
- declare const ListGroupAction: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
28
+ declare const ListGroupAction: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
29
29
  /** The surface. Depth comes from a ring plus a soft shadow, not a frame. */
30
- declare const List: ({ className, ...props }: React$1.ComponentProps<"ul">) => React$1.JSX.Element;
30
+ declare const List: ({ className, ...props }: React.ComponentProps<"ul">) => React.JSX.Element;
31
31
  /**
32
32
  * One row. Pass `render` (a link or button element) to make the whole row the
33
33
  * target; then keep other interactive elements out of it. Rows with their own
34
34
  * trailing buttons stay a plain `li` and put the actions in `ListItemActions`.
35
35
  */
36
- declare const ListItem: ({ className, render, children, ...props }: useRender.ComponentProps<"div">) => React$1.JSX.Element;
36
+ declare const ListItem: ({ className, render, children, ...props }: useRender.ComponentProps<"div">) => React.JSX.Element;
37
37
  declare const listItemMediaVariants: (props?: ({
38
38
  variant?: "icon" | "initial" | null | undefined;
39
39
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
40
40
  /** Fixed 32px tile for an icon, logo or initial. */
41
- declare const ListItemMedia: ({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof listItemMediaVariants>) => React$1.JSX.Element;
42
- declare const ListItemContent: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
41
+ declare const ListItemMedia: ({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof listItemMediaVariants>) => React.JSX.Element;
42
+ declare const ListItemContent: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
43
43
  declare const listItemTitleVariants: (props?: ({
44
44
  variant?: "name" | "statement" | null | undefined;
45
45
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
46
- declare const ListItemTitle: ({ className, variant, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof listItemTitleVariants>) => React$1.JSX.Element;
46
+ declare const ListItemTitle: ({ className, variant, ...props }: React.ComponentProps<"span"> & VariantProps<typeof listItemTitleVariants>) => React.JSX.Element;
47
47
  declare const listItemDescriptionVariants: (props?: ({
48
48
  variant?: "code" | "paragraph" | "text" | null | undefined;
49
49
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -51,18 +51,18 @@ declare const listItemDescriptionVariants: (props?: ({
51
51
  * Secondary line, one line by default. Use the `paragraph` variant (two
52
52
  * lines) or `lines` when more is genuinely needed; never `whitespace-nowrap`.
53
53
  */
54
- declare const ListItemDescription: ({ className, variant, lines, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof listItemDescriptionVariants> & {
54
+ declare const ListItemDescription: ({ className, variant, lines, ...props }: React.ComponentProps<"span"> & VariantProps<typeof listItemDescriptionVariants> & {
55
55
  lines?: TruncatedTextLines;
56
- }) => React$1.JSX.Element;
57
- declare const ListItemActions: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
56
+ }) => React.JSX.Element;
57
+ declare const ListItemActions: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
58
58
  /** Single-line empty row inside a `List`. Phrase it as the next action. */
59
- declare const ListEmpty: ({ className, ...props }: React$1.ComponentProps<"li">) => React$1.JSX.Element;
59
+ declare const ListEmpty: ({ className, ...props }: React.ComponentProps<"li">) => React.JSX.Element;
60
60
  type StatusTone = "neutral" | "success" | "warning" | "destructive";
61
61
  /**
62
62
  * Dot + label status. The label always carries the meaning; the dot only
63
63
  * reinforces it, so colour is never the sole signal.
64
64
  */
65
- declare const ListItemStatus: ({ tone, className, children, ...props }: React$1.ComponentProps<"span"> & {
65
+ declare const ListItemStatus: ({ tone, className, children, ...props }: React.ComponentProps<"span"> & {
66
66
  tone?: StatusTone;
67
- }) => React$1.JSX.Element;
67
+ }) => React.JSX.Element;
68
68
  export { List, ListEmpty, ListGroup, ListGroupAction, ListGroupCount, ListGroupDescription, ListGroupHeader, ListGroupHeading, ListGroupTitle, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemMedia, ListItemStatus, ListItemTitle, type StatusTone };
@@ -1,17 +1,18 @@
1
- import * as React$1 from "react";
1
+ import * as React from "react";
2
2
  import { Kbd } from "./kbd.js";
3
3
  import { Menu as Menu$1 } from "@base-ui/react/menu";
4
4
  declare const MenuCreateHandle: typeof Menu$1.createHandle;
5
5
  declare const Menu: typeof Menu$1.Root;
6
- declare const MenuPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
7
- declare function MenuTrigger({ tooltip, ...props }: Menu$1.Trigger.Props & {
8
- tooltip?: React$1.ReactNode;
9
- }): React$1.JSX.Element;
10
- declare const MenuAnchor: () => React$1.JSX.Element;
6
+ declare const MenuPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare function MenuTrigger({ appearance, className, tooltip, ...props }: Menu$1.Trigger.Props & {
8
+ appearance?: "default" | "caption";
9
+ tooltip?: React.ReactNode;
10
+ }): React.JSX.Element;
11
+ declare const MenuAnchor: () => React.JSX.Element;
11
12
  declare const MenuPopup: ({ children, className, sideOffset, align, alignOffset, side, anchor, collisionAvoidance, header, viewportClassName, ...props }: Menu$1.Popup.Props & {
12
13
  /** Content pinned above the scrolling list, such as a search field. It sits
13
14
  * outside the list, so a row scrolled into view can never hide under it. */
14
- header?: React$1.ReactNode;
15
+ header?: React.ReactNode;
15
16
  /** Classes for the scrolling list inside the popup, e.g. a lower height
16
17
  * cap for a long searchable list. */
17
18
  viewportClassName?: string;
@@ -21,12 +22,12 @@ declare const MenuPopup: ({ children, className, sideOffset, align, alignOffset,
21
22
  side?: Menu$1.Positioner.Props["side"];
22
23
  anchor?: Menu$1.Positioner.Props["anchor"];
23
24
  collisionAvoidance?: Menu$1.Positioner.Props["collisionAvoidance"];
24
- }) => React$1.JSX.Element;
25
- declare const MenuGroup: (props: Menu$1.Group.Props) => React$1.JSX.Element;
25
+ }) => React.JSX.Element;
26
+ declare const MenuGroup: (props: Menu$1.Group.Props) => React.JSX.Element;
26
27
  declare const MenuItem: ({ className, inset, variant, ...props }: Menu$1.Item.Props & {
27
28
  inset?: boolean;
28
29
  variant?: "default" | "destructive";
29
- }) => React$1.JSX.Element;
30
+ }) => React.JSX.Element;
30
31
  /**
31
32
  * A menu row that navigates: an `<a>` with the item's look, so it opens in a
32
33
  * new tab on a modified click, shows its URL on hover and is announced as a
@@ -36,33 +37,33 @@ declare const MenuItem: ({ className, inset, variant, ...props }: Menu$1.Item.Pr
36
37
  */
37
38
  declare const MenuLinkItem: ({ className, inset, ...props }: Menu$1.LinkItem.Props & {
38
39
  inset?: boolean;
39
- }) => React$1.JSX.Element;
40
+ }) => React.JSX.Element;
40
41
  declare const MenuCheckboxItem: ({ className, children, checked, variant, ...props }: Menu$1.CheckboxItem.Props & {
41
42
  variant?: "default" | "switch";
42
- }) => React$1.JSX.Element;
43
- declare const MenuRadioGroup: (props: Menu$1.RadioGroup.Props) => React$1.JSX.Element;
43
+ }) => React.JSX.Element;
44
+ declare const MenuRadioGroup: (props: Menu$1.RadioGroup.Props) => React.JSX.Element;
44
45
  declare const MenuRadioItem: ({ className, children, indicator, ...props }: Menu$1.RadioItem.Props & {
45
46
  indicator?: "check" | "none";
46
- }) => React$1.JSX.Element;
47
+ }) => React.JSX.Element;
47
48
  declare const MenuGroupLabel: ({ className, inset, ...props }: Menu$1.GroupLabel.Props & {
48
49
  inset?: boolean;
49
- }) => React$1.JSX.Element;
50
- declare const MenuSeparator: ({ className, ...props }: Menu$1.Separator.Props) => React$1.JSX.Element;
50
+ }) => React.JSX.Element;
51
+ declare const MenuSeparator: ({ className, ...props }: Menu$1.Separator.Props) => React.JSX.Element;
51
52
  /**
52
53
  * The shortcut at the end of a menu row. Pass `keys` (`["mod", "K"]`) to have
53
54
  * it spelled for the reader's platform; see `Kbd`. It is the `plain` `Kbd`,
54
55
  * with no key-cap box, which would crowd a row of labels.
55
56
  */
56
- declare const MenuShortcut: ({ className, ...props }: Omit<React$1.ComponentProps<typeof Kbd>, "variant">) => React$1.JSX.Element;
57
- declare const MenuSub: (props: Menu$1.SubmenuRoot.Props) => React$1.JSX.Element;
57
+ declare const MenuShortcut: ({ className, ...props }: Omit<React.ComponentProps<typeof Kbd>, "variant">) => React.JSX.Element;
58
+ declare const MenuSub: (props: Menu$1.SubmenuRoot.Props) => React.JSX.Element;
58
59
  declare const MenuSubTrigger: ({ className, inset, children, ...props }: Menu$1.SubmenuTrigger.Props & {
59
60
  inset?: boolean;
60
- }) => React$1.JSX.Element;
61
+ }) => React.JSX.Element;
61
62
  declare const MenuSubPopup: ({ className, sideOffset, alignOffset, align, ...props }: Menu$1.Popup.Props & {
62
- header?: React$1.ReactNode;
63
+ header?: React.ReactNode;
63
64
  viewportClassName?: string;
64
65
  align?: Menu$1.Positioner.Props["align"];
65
66
  sideOffset?: Menu$1.Positioner.Props["sideOffset"];
66
67
  alignOffset?: Menu$1.Positioner.Props["alignOffset"];
67
- }) => React$1.JSX.Element;
68
+ }) => React.JSX.Element;
68
69
  export { Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuLinkItem as DropdownMenuLinkItem, MenuLinkItem, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, MenuAnchor };
@@ -2,6 +2,7 @@
2
2
  import { ChevronRightIcon } from "../icons.js";
3
3
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
4
4
  import { cn } from "../lib/utils.js";
5
+ import { COMPOSER_PICKER_TRIGGER_CLASS } from "./composer-tokens.js";
5
6
  import { DirectionalIcon } from "./directional-icon.js";
6
7
  import { Kbd } from "./kbd.js";
7
8
  import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
@@ -11,10 +12,12 @@ import { Menu as Menu$1 } from "@base-ui/react/menu";
11
12
  const MenuCreateHandle = Menu$1.createHandle;
12
13
  const Menu = Menu$1.Root;
13
14
  const MenuPortal = Menu$1.Portal;
14
- function MenuTrigger({ tooltip, ...props }) {
15
+ function MenuTrigger({ appearance = "default", className, tooltip, ...props }) {
16
+ const appearanceClassName = appearance === "caption" ? cn(COMPOSER_PICKER_TRIGGER_CLASS, "relative pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11") : void 0;
15
17
  return renderTooltipTrigger({
16
18
  tooltip,
17
19
  trigger: /* @__PURE__ */ jsx(Menu$1.Trigger, {
20
+ className: typeof className === "function" ? (state) => cn(appearanceClassName, className(state)) : cn(appearanceClassName, className),
18
21
  "data-slot": "menu-trigger",
19
22
  nativeButton: true,
20
23
  ...props
@@ -0,0 +1,88 @@
1
+ import { ReactNode, Ref } from "react";
2
+ export type OutcomeTone = "success" | "error";
3
+ /** One fact about what the flow connected, e.g. Account: jan@firm.example. */
4
+ export type OutcomeDetail = {
5
+ /** What the fact is, in a word or two. */
6
+ label: string;
7
+ /** The fact itself; isolated as its own bidi run (names, emails). */
8
+ value: ReactNode;
9
+ };
10
+ type OutcomeLayoutProps = {
11
+ tone: OutcomeTone;
12
+ /** What happened, in a few words. Also the document title. */
13
+ title: string;
14
+ /** What it means, or what to do next. */
15
+ description?: ReactNode;
16
+ /** The other side's identity (a logo), drawn in a tile beside stella's. */
17
+ counterpart?: ReactNode;
18
+ /** The flow's facts, drawn by `OutcomeDetailList`. */
19
+ details?: ReactNode;
20
+ /** A command to run next, drawn by `OutcomeCommand`. */
21
+ command?: ReactNode;
22
+ /** The way on, as buttons or links. */
23
+ actions?: ReactNode;
24
+ /** A quiet footnote, drawn by `OutcomeNote`. */
25
+ note?: ReactNode;
26
+ /**
27
+ * `page` owns the viewport; `embedded` sits inside a layout that already
28
+ * frames the page (the sign-in layout).
29
+ */
30
+ surface?: "page" | "embedded";
31
+ /** The document title, when it differs from `title` (an app suffix). */
32
+ documentTitle?: string;
33
+ /** Makes the heading focusable and hands it over, to move focus to it. */
34
+ headingRef?: Ref<HTMLHeadingElement>;
35
+ };
36
+ export type OutcomeScreenViewProps = Omit<OutcomeLayoutProps, "details" | "command" | "note"> & {
37
+ /**
38
+ * What the flow connected, 1 to 3 facts it already holds (the account, the
39
+ * organization, the access granted). Leave it out when there is nothing
40
+ * specific to say; never fill it with generic text.
41
+ */
42
+ details?: readonly OutcomeDetail[];
43
+ /** A command the person runs next, e.g. to try again from a terminal. */
44
+ command?: string;
45
+ /**
46
+ * That the tab can be closed, and only when it really can: never beside a
47
+ * redirect or a button, which are the way on themselves.
48
+ */
49
+ note?: ReactNode;
50
+ };
51
+ /** The facts' one quiet surface; its rows are `OutcomeDetailRow`s. */
52
+ export declare const OutcomeDetailList: ({ children }: {
53
+ children: ReactNode;
54
+ }) => import("react").JSX.Element;
55
+ /**
56
+ * One fact: its label in the start column, the value (one bidi run) beside
57
+ * it. A long value wraps rather than cut short, so an email reads in full.
58
+ */
59
+ export declare const OutcomeDetailRow: ({ label, value }: {
60
+ label: ReactNode;
61
+ value: ReactNode;
62
+ }) => import("react").JSX.Element;
63
+ /**
64
+ * A place or control in the app, named as it reads there ("General"), set
65
+ * apart inside running text so the way back can be scanned.
66
+ */
67
+ export declare const OutcomeControl: ({ children }: {
68
+ children: ReactNode;
69
+ }) => import("react").JSX.Element;
70
+ /** A button's label inside running text; the sentence supplies the quotes. */
71
+ export declare const OutcomeButtonLabel: ({ children }: {
72
+ children: ReactNode;
73
+ }) => import("react").JSX.Element;
74
+ /** A command to run, set as code: left to right in every language. */
75
+ export declare const OutcomeCommand: ({ children }: {
76
+ children: ReactNode;
77
+ }) => import("react").JSX.Element;
78
+ /** The quiet line under everything else. */
79
+ export declare const OutcomeNote: ({ children }: {
80
+ children: ReactNode;
81
+ }) => import("react").JSX.Element;
82
+ /**
83
+ * The screen with every optional part already drawn: `OutcomeScreenView`
84
+ * draws them from props, the generator puts template slots in their place.
85
+ */
86
+ export declare const OutcomeLayout: ({ tone, title, description, counterpart, details, command, actions, note, surface, documentTitle, headingRef }: OutcomeLayoutProps) => import("react").JSX.Element;
87
+ export declare const OutcomeScreenView: ({ details, command, note, ...layout }: OutcomeScreenViewProps) => import("react").JSX.Element;
88
+ export {};
@@ -0,0 +1,170 @@
1
+ import { CheckIcon, XIcon } from "../icons.js";
2
+ import { cn } from "../lib/utils.js";
3
+ import { StellaMark } from "./stella-mark.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ // src/components/outcome-screen-view.tsx
6
+ const TONE_BADGE = {
7
+ success: {
8
+ className: "bg-success",
9
+ Icon: CheckIcon
10
+ },
11
+ error: {
12
+ className: "bg-destructive",
13
+ Icon: XIcon
14
+ }
15
+ };
16
+ const TILE_CLASS = "bg-card text-foreground shadow-outcome-tile relative flex size-14 shrink-0 items-center justify-center rounded-2xl";
17
+ const StatusBadge = ({ className, tone }) => {
18
+ const { className: toneClass, Icon } = TONE_BADGE[tone];
19
+ return /* @__PURE__ */ jsx("span", {
20
+ className: cn("text-background ring-background motion-safe:animate-outcome-badge flex size-5 items-center justify-center rounded-full ring-2", toneClass, className),
21
+ "data-slot": "outcome-badge",
22
+ "data-tone": tone,
23
+ children: /* @__PURE__ */ jsx(Icon, {
24
+ className: "size-3",
25
+ strokeWidth: 3
26
+ })
27
+ });
28
+ };
29
+ const OutcomeGlyph = ({ counterpart, tone }) => {
30
+ const stellaTile = /* @__PURE__ */ jsx("span", {
31
+ className: TILE_CLASS,
32
+ "data-slot": "outcome-tile",
33
+ children: /* @__PURE__ */ jsx(StellaMark, { className: "size-7" })
34
+ });
35
+ if (counterpart === void 0 || counterpart === null) return /* @__PURE__ */ jsxs("div", {
36
+ className: "relative",
37
+ "aria-hidden": "true",
38
+ children: [stellaTile, /* @__PURE__ */ jsx(StatusBadge, {
39
+ className: "absolute -end-1.25 -bottom-1.25",
40
+ tone
41
+ })]
42
+ });
43
+ return /* @__PURE__ */ jsxs("div", {
44
+ className: "flex items-center",
45
+ "aria-hidden": "true",
46
+ children: [
47
+ /* @__PURE__ */ jsx("span", {
48
+ className: TILE_CLASS,
49
+ "data-slot": "outcome-tile",
50
+ children: counterpart
51
+ }),
52
+ /* @__PURE__ */ jsxs("span", {
53
+ className: "relative flex w-16 items-center justify-center",
54
+ children: [/* @__PURE__ */ jsx("span", {
55
+ className: "bg-border motion-safe:animate-outcome-connector h-px w-full",
56
+ "data-slot": "outcome-connector"
57
+ }), /* @__PURE__ */ jsx(StatusBadge, {
58
+ className: "absolute",
59
+ tone
60
+ })]
61
+ }),
62
+ stellaTile
63
+ ]
64
+ });
65
+ };
66
+ /** The facts' one quiet surface; its rows are `OutcomeDetailRow`s. */
67
+ const OutcomeDetailList = ({ children }) => /* @__PURE__ */ jsx("dl", {
68
+ className: "bg-muted mt-6 grid w-full max-w-[22rem] grid-cols-[max-content_minmax(0,1fr)] gap-x-4 rounded-xl px-4 py-2 text-start text-sm",
69
+ "data-slot": "outcome-details",
70
+ children
71
+ });
72
+ /**
73
+ * One fact: its label in the start column, the value (one bidi run) beside
74
+ * it. A long value wraps rather than cut short, so an email reads in full.
75
+ */
76
+ const OutcomeDetailRow = ({ label, value }) => /* @__PURE__ */ jsxs("div", {
77
+ className: "col-span-2 grid grid-cols-subgrid py-1.5",
78
+ "data-slot": "outcome-detail",
79
+ children: [/* @__PURE__ */ jsx("dt", {
80
+ className: "text-muted-foreground",
81
+ children: label
82
+ }), /* @__PURE__ */ jsx("dd", {
83
+ className: "text-foreground min-w-0 wrap-break-word",
84
+ children: /* @__PURE__ */ jsx("bdi", { children: value })
85
+ })]
86
+ });
87
+ /**
88
+ * A place or control in the app, named as it reads there ("General"), set
89
+ * apart inside running text so the way back can be scanned.
90
+ */
91
+ const OutcomeControl = ({ children }) => /* @__PURE__ */ jsx("bdi", {
92
+ className: "bg-muted text-foreground rounded-md px-1.5 py-0.5 font-medium whitespace-nowrap",
93
+ "data-slot": "outcome-control",
94
+ children
95
+ });
96
+ /** A button's label inside running text; the sentence supplies the quotes. */
97
+ const OutcomeButtonLabel = ({ children }) => /* @__PURE__ */ jsx("bdi", {
98
+ className: "text-foreground font-medium",
99
+ "data-slot": "outcome-button-label",
100
+ children
101
+ });
102
+ /** A command to run, set as code: left to right in every language. */
103
+ const OutcomeCommand = ({ children }) => /* @__PURE__ */ jsx("code", {
104
+ className: "bg-muted text-foreground mt-5 max-w-full rounded-lg px-3 py-1.5 font-mono text-[0.8125rem] break-all select-all",
105
+ "data-slot": "outcome-command",
106
+ dir: "ltr",
107
+ children
108
+ });
109
+ /** The quiet line under everything else. */
110
+ const OutcomeNote = ({ children }) => /* @__PURE__ */ jsx("p", {
111
+ className: "text-muted-foreground mt-6 text-xs",
112
+ "data-slot": "outcome-note",
113
+ children
114
+ });
115
+ /**
116
+ * The screen with every optional part already drawn: `OutcomeScreenView`
117
+ * draws them from props, the generator puts template slots in their place.
118
+ */
119
+ const OutcomeLayout = ({ tone, title, description, counterpart, details, command, actions, note, surface = "page", documentTitle, headingRef }) => {
120
+ const outcome = /* @__PURE__ */ jsxs("section", {
121
+ className: "motion-safe:animate-rise flex w-full max-w-[26rem] flex-col items-center text-center wrap-anywhere",
122
+ "data-slot": "outcome",
123
+ "data-tone": tone,
124
+ role: "status",
125
+ children: [
126
+ /* @__PURE__ */ jsx(OutcomeGlyph, {
127
+ counterpart,
128
+ tone
129
+ }),
130
+ /* @__PURE__ */ jsx("h1", {
131
+ className: "mt-7 text-2xl font-semibold tracking-tight text-balance outline-none",
132
+ ref: headingRef,
133
+ tabIndex: headingRef === void 0 ? void 0 : -1,
134
+ children: title
135
+ }),
136
+ description === void 0 ? null : /* @__PURE__ */ jsx("p", {
137
+ className: "text-muted-foreground mt-2 max-w-[22rem] text-sm text-pretty",
138
+ children: description
139
+ }),
140
+ details,
141
+ command,
142
+ actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
143
+ className: "mt-7 flex flex-wrap justify-center gap-2",
144
+ children: actions
145
+ }),
146
+ note
147
+ ]
148
+ });
149
+ const titleElement = /* @__PURE__ */ jsx("title", { children: documentTitle ?? title });
150
+ if (surface === "embedded") return /* @__PURE__ */ jsxs("div", {
151
+ className: "flex w-full justify-center py-10",
152
+ "data-slot": "outcome-screen",
153
+ children: [titleElement, outcome]
154
+ });
155
+ return /* @__PURE__ */ jsxs("main", {
156
+ className: "bg-background text-foreground flex min-h-dvh w-full flex-col items-center justify-center px-4 pt-12 pb-[14svh] font-sans",
157
+ "data-slot": "outcome-screen",
158
+ children: [titleElement, outcome]
159
+ });
160
+ };
161
+ const OutcomeScreenView = ({ details, command, note, ...layout }) => /* @__PURE__ */ jsx(OutcomeLayout, {
162
+ ...layout,
163
+ note: note === void 0 ? void 0 : /* @__PURE__ */ jsx(OutcomeNote, { children: note }),
164
+ command: command === void 0 ? void 0 : /* @__PURE__ */ jsx(OutcomeCommand, { children: command }),
165
+ details: details === void 0 || details.length === 0 ? void 0 : /* @__PURE__ */ jsx(OutcomeDetailList, { children: details.map(({ label, value }) => /* @__PURE__ */ jsx(OutcomeDetailRow, {
166
+ label,
167
+ value
168
+ }, label)) })
169
+ });
170
+ export { OutcomeButtonLabel, OutcomeCommand, OutcomeControl, OutcomeDetailList, OutcomeDetailRow, OutcomeLayout, OutcomeNote, OutcomeScreenView };
@@ -0,0 +1,16 @@
1
+ import { OutcomeDetail, OutcomeScreenViewProps } from "./outcome-screen-view.js";
2
+ export type OutcomeCloseTab = {
3
+ /** Runs before the tab closes, e.g. to tell the opener what happened. */
4
+ onBeforeClose?: () => void;
5
+ /**
6
+ * Runs when the browser kept the tab open (it only closes tabs a script
7
+ * opened), so the member is taken somewhere useful instead of stranded.
8
+ */
9
+ onStillOpen: () => void;
10
+ };
11
+ type OutcomeScreenProps = Omit<OutcomeScreenViewProps, "headingRef"> & {
12
+ /** Close the tab once shown; see `OutcomeCloseTab`. */
13
+ closeTab?: OutcomeCloseTab;
14
+ };
15
+ export declare const OutcomeScreen: ({ closeTab, ...view }: OutcomeScreenProps) => import("react").JSX.Element;
16
+ export type { OutcomeDetail };
@@ -0,0 +1,47 @@
1
+ import { useLatest } from "../hooks/use-latest.js";
2
+ import { OutcomeScreenView } from "./outcome-screen-view.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { useEffect, useRef } from "react";
5
+ // src/components/outcome-screen.tsx
6
+ /** How long a tab that asked to close waits before it counts as still open. */
7
+ const CLOSE_FALLBACK_MS = 150;
8
+ /** Closes the tab once shown, and reports when the browser kept it open. */
9
+ const useCloseTab = (closeTab) => {
10
+ const latest = useLatest(closeTab);
11
+ const wantsClose = closeTab !== void 0;
12
+ useEffect(() => {
13
+ const request = wantsClose ? latest.current : void 0;
14
+ let fallback;
15
+ if (request !== void 0) {
16
+ request.onBeforeClose?.();
17
+ window.close();
18
+ fallback = setTimeout(() => {
19
+ latest.current?.onStillOpen();
20
+ }, CLOSE_FALLBACK_MS);
21
+ }
22
+ return () => clearTimeout(fallback);
23
+ }, [latest, wantsClose]);
24
+ };
25
+ /**
26
+ * Moves focus to the outcome's heading once shown. A flow often swaps its form
27
+ * for the outcome in one render; the status region then appears together with
28
+ * its message, which assistive technology may not announce, and the control
29
+ * that was pressed is gone. Focus on the heading reads it out and keeps the
30
+ * reader on the page.
31
+ */
32
+ const useFocusedHeading = () => {
33
+ const heading = useRef(null);
34
+ useEffect(() => {
35
+ heading.current?.focus({ preventScroll: true });
36
+ }, []);
37
+ return heading;
38
+ };
39
+ const OutcomeScreen = ({ closeTab, ...view }) => {
40
+ useCloseTab(closeTab);
41
+ const heading = useFocusedHeading();
42
+ return /* @__PURE__ */ jsx(OutcomeScreenView, {
43
+ ...view,
44
+ headingRef: heading
45
+ });
46
+ };
47
+ export { OutcomeScreen };
@@ -1,3 +1,15 @@
1
+ /**
2
+ * Outline navigation: an embedded panel, a host-owned rail, or a disclosure.
3
+ *
4
+ * Embedded presentations fill their host track. The standalone disclosure
5
+ * owns a thin column of ticks; hovering, focusing, or tapping the column
6
+ * reveals the collapsible tree. Click a tick or a row to jump.
7
+ *
8
+ * Generic over the position source: callers supply `resolvePct` (vertical % for
9
+ * a tick) and `onJump`. Active tracking is derived from `resolvePct` by default,
10
+ * or driven externally via the controlled `activeId` prop (e.g. a virtualised
11
+ * editor that measures rendered anchors itself).
12
+ */
1
13
  import { ReactNode, RefObject } from "react";
2
14
  /**
3
15
  * How prominently an entry reads next to the entries around it. A caller
@@ -1,15 +1,15 @@
1
- import * as React$1 from "react";
1
+ import * as React from "react";
2
2
  import { Button } from "./button.js";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
- declare const Pagination: ({ className, ...props }: React$1.ComponentProps<"nav">) => React$1.JSX.Element;
5
- declare const PaginationContent: ({ className, ...props }: React$1.ComponentProps<"ul">) => React$1.JSX.Element;
6
- declare const PaginationItem: ({ ...props }: React$1.ComponentProps<"li">) => React$1.JSX.Element;
4
+ declare const Pagination: ({ className, ...props }: React.ComponentProps<"nav">) => React.JSX.Element;
5
+ declare const PaginationContent: ({ className, ...props }: React.ComponentProps<"ul">) => React.JSX.Element;
6
+ declare const PaginationItem: ({ ...props }: React.ComponentProps<"li">) => React.JSX.Element;
7
7
  type PaginationLinkProps = {
8
8
  isActive?: boolean;
9
- size?: React$1.ComponentProps<typeof Button>["size"];
9
+ size?: React.ComponentProps<typeof Button>["size"];
10
10
  } & useRender.ComponentProps<"a">;
11
- declare function PaginationLink({ className, isActive, size, render, ...props }: PaginationLinkProps): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
12
- declare const PaginationPrevious: ({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>) => React$1.JSX.Element;
13
- declare const PaginationNext: ({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>) => React$1.JSX.Element;
14
- declare const PaginationEllipsis: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
11
+ declare function PaginationLink({ className, isActive, size, render, ...props }: PaginationLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
12
+ declare const PaginationPrevious: ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => React.JSX.Element;
13
+ declare const PaginationNext: ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => React.JSX.Element;
14
+ declare const PaginationEllipsis: ({ className, ...props }: React.ComponentProps<"span">) => React.JSX.Element;
15
15
  export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -1,12 +1,13 @@
1
- import * as React$1 from "react";
1
+ import * as React from "react";
2
2
  import { ComponentProps } from "react";
3
3
  import { OverlayLayer } from "../lib/overlay-layer.js";
4
4
  import { Popover as Popover$1 } from "@base-ui/react/popover";
5
5
  declare const PopoverCreateHandle: typeof Popover$1.createHandle;
6
6
  declare const Popover: typeof Popover$1.Root;
7
- declare function PopoverTrigger({ tooltip, ...props }: Popover$1.Trigger.Props & {
8
- tooltip?: React$1.ReactNode;
9
- }): React$1.JSX.Element;
7
+ declare function PopoverTrigger({ appearance, className, tooltip, ...props }: Popover$1.Trigger.Props & {
8
+ appearance?: "default" | "caption";
9
+ tooltip?: React.ReactNode;
10
+ }): React.JSX.Element;
10
11
  /**
11
12
  * Viewport padding. The inline value also feeds the page-width calculation of
12
13
  * the viewport, so both axes change together.
@@ -28,7 +29,7 @@ declare const PopoverPopup: ({ children, className, side, align, sideOffset, ali
28
29
  anchor?: Popover$1.Positioner.Props["anchor"];
29
30
  layer?: OverlayLayer;
30
31
  tooltipStyle?: boolean;
31
- }) => React$1.JSX.Element;
32
+ }) => React.JSX.Element;
32
33
  /**
33
34
  * Popover surface with the content layout baked in: children stack in a vertical
34
35
  * flex container. coss renders popup children inside a separate inner Viewport,
@@ -38,8 +39,8 @@ declare const PopoverPopup: ({ children, className, side, align, sideOffset, ali
38
39
  */
39
40
  declare const PopoverPanel: ({ children, contentClassName, ...props }: ComponentProps<typeof PopoverPopup> & {
40
41
  contentClassName?: string;
41
- }) => React$1.JSX.Element;
42
- declare const PopoverClose: ({ ...props }: Popover$1.Close.Props) => React$1.JSX.Element;
43
- declare const PopoverTitle: ({ className, ...props }: Popover$1.Title.Props) => React$1.JSX.Element;
44
- declare const PopoverDescription: ({ className, ...props }: Popover$1.Description.Props) => React$1.JSX.Element;
42
+ }) => React.JSX.Element;
43
+ declare const PopoverClose: ({ ...props }: Popover$1.Close.Props) => React.JSX.Element;
44
+ declare const PopoverTitle: ({ className, ...props }: Popover$1.Title.Props) => React.JSX.Element;
45
+ declare const PopoverDescription: ({ className, ...props }: Popover$1.Description.Props) => React.JSX.Element;
45
46
  export { Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger };
@@ -2,16 +2,19 @@
2
2
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
3
3
  import { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME } from "../lib/positioner-sizing.js";
4
4
  import { cn } from "../lib/utils.js";
5
+ import { COMPOSER_PICKER_TRIGGER_CLASS } from "./composer-tokens.js";
5
6
  import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  import { Popover as Popover$1 } from "@base-ui/react/popover";
8
9
  // src/components/popover.tsx
9
10
  const PopoverCreateHandle = Popover$1.createHandle;
10
11
  const Popover = Popover$1.Root;
11
- function PopoverTrigger({ tooltip, ...props }) {
12
+ function PopoverTrigger({ appearance = "default", className, tooltip, ...props }) {
13
+ const appearanceClassName = appearance === "caption" ? cn(COMPOSER_PICKER_TRIGGER_CLASS, "relative pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11") : void 0;
12
14
  return renderTooltipTrigger({
13
15
  tooltip,
14
16
  trigger: /* @__PURE__ */ jsx(Popover$1.Trigger, {
17
+ className: typeof className === "function" ? (state) => cn(appearanceClassName, className(state)) : cn(appearanceClassName, className),
15
18
  "data-slot": "popover-trigger",
16
19
  ...props
17
20
  })