@stackone/malachite 2.89.1 → 2.90.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.
package/COMPONENTS.md CHANGED
@@ -27,7 +27,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
27
27
  - **`ActionBar`** — A row of actions that collapses into a single `ActionMenu` once its container drops below `collapseBelow`. Measures the nearest genuinely-wider ancestor rather than itself, since the row shrinks to its own content. `dividerBefore` renders a vertical rule in the row and a divider in the collapsed menu, so both forms group the actions the same way. _Key props:_ `buttons` (`label`, `onClick`, `icon`, `variant`, `size`, `radius`, `tooltip`, `disabled`, `dividerBefore`), `collapseBelow`, `menuLabel`, `className`.
28
28
  - **`Popover`** — An anchored, non-modal panel for arbitrary content — a workspace switcher, an org flyout. The panel renders in its own shadow root, so malachite components inside it are styled, and joins the top layer like the other overlays. It prefers its `placement` and flips to the opposite side when there is no room, clamping along the other axis. Click-opened panels take focus and hand it back to the trigger on close; `openOn="hover"` also opens on focus and stays open while the pointer or focus is in the panel. A nested Popover counts as inside its parent for outside-press and hover dismissal, and Escape closes the topmost only. A click panel also closes when focus moves somewhere outside it and its trigger, and on close it hands focus back to the trigger only if focus would otherwise fall to the page. _Key props:_ `trigger`, `children`, `open`, `defaultOpen`, `onOpenChange`, `placement` (`bottom-start` | `bottom-end` | `top-start` | `top-end` | `top-center` | `right-start` | `right-end` | `left-start`), `openOn` (`click` | `hover`), `width` (`content` | `trigger`), `padding` (`none` | `small` | `medium`), `anchorRef` (position against another element, e.g. the section a trigger row sits in), `offset` (`small` 8px | `medium` 12px | `large` 14px), `elevation` (`default` | `raised`), `initialFocus` (a ref, or a function read when the panel is shown, for what takes focus in place of the first focusable; it is read again as the panel's content changes, so focus follows content that mounts late or a focused element that is removed, but never leaves an element the user moved to; `initialFocusRef` is its deprecated form, read on open only), `openOnArrowKey` (a click panel also opens, focus inside, on the arrow key its placement points at — ArrowDown for a `bottom-*` placement; a text field trigger keeps its arrow keys), `role` (`dialog` | `menu` | `listbox`; `menu` brings no roving focus of its own), `aria-label` or `aria-labelledby` (one is required), `className`. The panel is capped to the viewport width, and only overlays opened from inside it (menus, dropdowns, modals) count as inside for outside-press dismissal. A side placement stays level with its anchor and scrolls within the room below, sliding up only when under 160px is left. Parts for the panel body: `Popover.Header` (`title`, `action`, `divider` — `false` drops the rule and sits it 4px over the list, as its label), `Popover.Action` (`icon`, `aria-label`, `onClick`, `href` (a link that opens in a new tab on Cmd/Ctrl-click or a middle click; a plain click runs `onClick` when one is given), `disabled`, `tooltip`), `Popover.List` (a scrolling list; `scrollToSelected` scrolls the list, never the page, to its selected row, one marked `aria-current`, `aria-selected` or a checked radio, each time the popover is shown, once that row mounts), `Popover.Section` (a bordered section), `Popover.Empty` (an empty-state line), `Popover.Search` (pads a `Search` above the list without a second rule), `Popover.Note` (a footnote section in small secondary text) and `Popover.Status` (`message`, `tone` (`default` | `error`), `action` (`label`, `onClick`, `pending`), `focusable`): one `status` live region for the panel's life, announcing each message it is given and staying mounted, visually hidden, while there is none, so clear `message` rather than unmounting it. Errors announce through the same region. `focusable` with a ref makes it an `initialFocus` target; resolve to it only while it has a message, since an empty one is invisible. Reach for `Status` when the message changes while the panel is open or carries an action (loading, failed, sign-in needed), and `Empty` for a static line in a list that simply has nothing in it.
29
29
  - **`Modal`** — Centred dialog over a scrim, with header slots (icon/title/subtitle/extra), a scrolling body and a pinned footer. Locks background scroll and dismisses on ESC, the close button, or a scrim click unless `closeOnOverlayClick` is off; `busy` suppresses the two pointer routes while a request is in flight and sets `aria-busy`, so a stray click cannot tear the dialog down mid-write — but never ESC, which is the only guaranteed keyboard exit from a focus trap and so always reaches `onClose`. ESC, the Tab focus trap and `aria-modal` all apply to the topmost overlay only, so these may be stacked — a dialog opened from a panel keeps Tab to itself and the panel stops claiming to be modal. The Tab trap follows focus into a malachite popup portaled out of the dialog’s own tree — a `MultiSelect` listbox or a `Popover` opened from the body — and traps Tab within that popup while it holds focus, so Tab walks and wraps that popup’s own stops rather than being yanked back to the dialog’s first control or escaping the dialog altogether. A `Dropdown` list or an `ActionMenu` is dismissed by Tab rather than trapping it: it closes and focus returns to its trigger, so Tab carries on from there. A consumer’s own portaled popup is not known to the trap and Tab will pull focus out of it. Set `role="alertdialog"` for a consequential choice, which asks assistive tech to announce the body and not just the name, and point `aria-describedby` at whichever element carries it. Width comes from the `size` union (`small` 420px | `medium` 612px | `large` 760px | `fullscreen`, which fills the window in both directions) rather than a raw pixel prop. `titleAdornment` sits immediately after the title behind a hairline divider, for naming the thing being acted on — distinct from `headerExtra`, which pins to the far right. `tray` paints a tinted plate around the card and hangs a `caption` beneath it; the plate is the dialog element itself, so that caption stays inside the `aria-modal` subtree rather than being stranded outside it by the visual nesting, and it is added to `aria-describedby` automatically because it says what the dialog is asking. It takes a tone (`neutral` | `warning` | `error` | `success`) rather than a colour, so no consumer can paint it off-palette — and the tone sets the plate and its caption colour together, so the two cannot disagree. The caption is a `{ label?, message }` pair rather than a node, because its row height, type scale and colour belong to the plate. `size` names the card, and the plate’s 4px ring is added on top. Like `SidePanel` it sits in a z-index band from 1000 — one step per stacked overlay, so what paints on top is what holds the keyboard — and stays out of the browser top layer, so a host app’s own dialogs can still cover it. `callouts` stacks full-bleed `Alert` bands at the top of the body, as on `SidePanel`; they ignore `bodyPadding` and lead `aria-describedby`, ahead of the consumer’s own description and the tray caption. For a confirmation use `ConfirmationDialog`, which is a preset over this. _Key props:_ `open`, `onClose`, `title`, `subtitle`, `icon`, `headerExtra`, `titleAdornment`, `tray`, `callouts`, `renderLink`, `headerDivider`, `footer`, `size`, `showCloseButton`, `closeOnOverlayClick`, `bodyPadding`, `bodyHeight` (`auto` | `tall` — 600px, or the viewport less 160px when smaller, for an embedded iframe at `height: 100%`), `busy`, `role` (`dialog` | `alertdialog`), `aria-label`, `aria-labelledby`, `aria-describedby`.
30
- - **`SidePanel`** — Right-hand slide-in overlay panel (drawer) with header slots (back/icon/title/subtitle/extra), scrollable body and optional footer. `subtitlePlacement="below"` stacks the subtitle on its own line under the title row, so neither truncates the other in a narrow panel. `toolbar` pins content between the header and the scrolling body (16px sides, 16px above, 8px below, no divider), such as a Search over the list it filters. Locks background scroll and dismisses on ESC, an overlay click or close. ESC and the Tab focus trap apply to the topmost overlay only, so a `Modal` may be stacked over it. The Tab trap follows focus into a malachite popup portaled out of the panel’s own tree — a `MultiSelect` listbox or a `Popover` opened from the body — and traps Tab within that popup while it holds focus, so Tab walks and wraps that popup’s own stops rather than being yanked back to the panel’s first control or escaping the panel altogether. A `Dropdown` list or an `ActionMenu` is dismissed by Tab rather than trapping it: it closes and focus returns to its trigger, so Tab carries on from there. A consumer’s own portaled popup is not known to the trap and Tab will pull focus out of it. `callouts` stacks full-bleed `Alert` bands at the top of the body, above `children` and unaffected by `bodyPadding` — the same band `ConfirmationDialog` gives its `callout` — and `renderLink` routes their root-relative markdown links through the app’s router. The callouts are announced as the panel’s description, ahead of `description`. `aside` opens a full-height column to the left, as wide again as `maxWidth`, for help that sits beside the content — a setup guide beside a form. The panel’s own header, body and footer keep their width and place, and the aside’s `title` (with an optional `headerExtra`, such as a `Stepper`) and `footer` line up with the panel’s header and footer; `bodyPadding` works as the panel’s does. The aside is never narrower than 360px, so a window too narrow for both columns scrolls the panel sideways.
30
+ - **`SidePanel`** — Right-hand slide-in overlay panel (drawer) with header slots (back/icon/title/subtitle/extra), scrollable body and optional footer. `subtitlePlacement="below"` stacks the subtitle on its own line under the title row, so neither truncates the other in a narrow panel. `toolbar` pins content between the header and the scrolling body (16px sides, 16px above, 8px below, no divider), such as a Search over the list it filters. Locks background scroll and dismisses on ESC, an overlay click or close. ESC and the Tab focus trap apply to the topmost overlay only, so a `Modal` may be stacked over it. The Tab trap follows focus into a malachite popup portaled out of the panel’s own tree — a `MultiSelect` listbox or a `Popover` opened from the body — and traps Tab within that popup while it holds focus, so Tab walks and wraps that popup’s own stops rather than being yanked back to the panel’s first control or escaping the panel altogether. A `Dropdown` list or an `ActionMenu` is dismissed by Tab rather than trapping it: it closes and focus returns to its trigger, so Tab carries on from there. A consumer’s own portaled popup is not known to the trap and Tab will pull focus out of it. `callouts` stacks full-bleed `Alert` bands at the top of the body, above `children` and unaffected by `bodyPadding` — the same band `ConfirmationDialog` gives its `callout` — and `renderLink` routes their root-relative markdown links through the app’s router. The callouts are announced as the panel’s description, ahead of `description`. `aside` opens a full-height column to the left, as wide again as `maxWidth`, for help that sits beside the content — a setup guide beside a form. The panel’s own header, body and footer keep their width and place, and the aside’s `title` (with an optional `headerExtra`, such as a `Stepper`) and `footer` line up with the panel’s header and footer; `bodyPadding` works as the panel’s does. The aside is never narrower than 360px, so a window too narrow for both columns scrolls the panel sideways. `onSubmit` makes the header, body and footer one `<form>` (`noValidate`, default prevented), so Enter in a field submits through a `type="submit"` footer button, as `FormActions` gives, the way a browser form does: not from a textarea, not mid-composition, and not while that button is disabled. Enter in the `toolbar` never submits, and the submit does not reach a form the panel is rendered inside.
31
31
  - **`useHasOpenOverlay`** — Hook reporting whether any modal-type overlay - `SidePanel` or `Modal` - is open anywhere in the app. For host chrome that has to get out of an overlay’s way, a floating support widget being the case it was added for: overlays render through a portal, so a host has no DOM signal of its own to read, and reading the library’s internal markers would couple it to something it does not own. Dropdowns and tooltips are deliberately not counted - they do not trap focus, and chrome does not need to move for them. _Key props:_ No arguments. Returns a boolean.
32
32
  - **`SidePanelNavFooter`** — Keyboard-hint footer for SidePanel: up/down keycaps to step between records and an esc-to-close hint, with an optional right-aligned actions slot.
33
33
 
@@ -60,7 +60,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
60
60
  - **`DefinitionRow`** — Row showing an icon, label, optional tag and description — for definition/detail lists. _Key props:_ `icon`, `label`, `tag`, `description`.
61
61
  - **`PreviewTree`** — Nested, indented tree for previewing hierarchical structure.
62
62
  - **`PreviewTreeRow`** — A single labelled row within a PreviewTree. _Key props:_ `label`.
63
- - **`Tabs`** — Tabbed navigation switching between content panels. `trailing` puts content on the same row, settled against its end — a count, a scope picker, the state the tabs are showing — inside the rule this component already draws. Without it a consumer had to redraw that rule to carry it past the tabs, and the tab list, which cannot wrap, would not yield any width to what sat beside it. The tabs hold their width and the trailing content gives ground; the `tablist` role stays on the tabs alone, so the extra content is not announced as one. _Key props:_ `TabItem[]`, `activeKey`, `onChange`, `trailing`, `className`, `style`.
63
+ - **`Tabs`** — Tabbed navigation switching between content panels. `trailing` puts content on the same row, settled against its end — a count, a scope picker, the state the tabs are showing — inside the rule this component already draws. Without it a consumer had to redraw that rule to carry it past the tabs, and the tab list, which cannot wrap, would not yield any width to what sat beside it. The tabs hold their width and the trailing content gives ground; the `tablist` role stays on the tabs alone, so the extra content is not announced as one. Give an item `content` and each tab gets a `tabpanel` below the strip, wired with `aria-controls` and `aria-labelledby`: a panel mounts the first time its tab opens and then stays mounted, hidden, so a search, a filter or a scroll position survives a round trip and its data is not fetched again. `destroyInactivePanels` unmounts a panel when its tab is left instead. Panels have no overflow of their own, so a sticky toolbar inside one still pins to the page. Leave `content` off every item and the strip is all it renders. _Key props:_ `TabItem[]` (`key`, `label`, `disabled`, `content`), `activeKey`, `onChange`, `trailing`, `destroyInactivePanels`, `className`, `style`.
64
64
  - **`Breadcrumbs`** — Breadcrumb trail with caret separators, an optional back button (shown only when there is more than one crumb AND the parent — the second-to-last — carries a `url` to target) and a right-aligned `actions` row. A lone crumb marked `isRoot` switches to title mode: plain emphasised text, no trail chrome, but the `actions` row still renders. Renders as a `nav`/`ol` with `aria-current="page"` on the last crumb. Pass `renderLink` to route crumbs through the app's own router instead of a plain `<a>`. Used by `PageLayout`, but standalone too. _Key props:_ `links[]` (`name`, `url`, `isRoot`), `actions[]`, `renderLink`, `className`, `style`.
65
65
  - **`ActionMenu`** — Dropdown menu of actions (kebab/overflow style). The trigger is an icon-only `Button` by default, so `size` draws exactly the square a `Button` of that size draws beside it: `xsmall` is Figma's 20px "Button Element - Square (X-Small)", `small` the 28px rung above it. Both squares are fixed rather than read off the `controlHeights` tokens, so re-theming those does not resize the trigger. A supplied `triggerIcon` is held to the tier's glyph size — 11px at `xsmall`, 16px at `small`. At 20px the `xsmall` trigger meets WCAG 2.5.8 through the *Spacing* exception rather than the 24px minimum, so keep at least 4px between adjacent triggers. `showLabel` draws `label` beside the icon instead of leaving it to the accessible name — for a menu that is the point of its corner rather than an overflow for a row that already says what it acts on — and `variant` puts the trigger on any `Button` variant, so a menu handing work to the assistant can wear the assistant ground rather than the overflow-kebab outline. An item's `icon` leads its label: every caller's names the action itself — copy, open, delete — and an icon that is part of an item's identity belongs where the eye starts rather than right-aligned, where it reads as a status column. The menu is Figma's `Dropdown Component - Options List`: a fixed sized to its widest item between a 180px floor and the 280px Figma draws, by default under the trigger's right edge, 14px below it, flipping above or clamping sideways when the viewport has no room, rounding at the library's 12px and padding wider (8px) than the menu a `Dropdown` opens. Items read in the primary text colour, or the secondary one with `tone="muted"` (e.g. a sidebar's menus); destructive ones in red; `danger: 'hover'` keeps an item in its normal colour and turns it destructive (red text on a light red ground) only on hover or keyboard focus, for an action like signing out. A ceiling rather than a flat width: taken literally it gave a menu of four short verbs 130px of air and made every kebab in an app the same width whatever it held. `minWidth` only raises it above that ceiling, so it is the one way to go past 280px, and a label too long for the box truncates rather than wrapping. _Key props:_ `ActionMenuItem[]`, `size`, `label`, `triggerIcon`, `minWidth`, `showLabel`, `variant`, `tone` (`default` | `muted`), `trigger` (your own control in place of the kebab, cloned with the menu's ref and aria state), `highlightChoices`, `placement` (`bottom-end` default | `bottom-start` | `right-start` | `top-start` | `top-center`), `offset` (`small` 8px | `medium` 12px | `large` 14px; applies to every placement; without it the default `bottom-end` keeps the options menu's 14px and the others use 8px). An item's `tag` (e.g. an "Early access" `Tag`) follows its label in a lazily loaded shadow host of its own, since the menu renders into `document.body`, and joins its accessible name; `current: true` marks the item for the page the user is on (`aria-current="page"` and the selected row paint; a `danger` item keeps its red text). An item with an `href` is a link: Cmd/Ctrl-click or a middle click opens it in a new tab and closes the menu, while a plain click runs `onClick` in its place when one is given (so a router can navigate in-app); Enter and Space both activate it. `target: '_blank'` opens it in a new tab, adds `noopener noreferrer` and tells screen readers it opens a new tab. An item with `checked` is one of a set of choices: a `menuitemradio` with `aria-checked` and a trailing check while true; picking it still runs `onClick` and closes. Give the choices of one set the same `group` and, where they sit next to each other, they share a `role="group"` named by it, so a screen reader can tell where the set ends; choices with the same `group` split by another item form separate groups. `description` adds a quieter second line under the label, announced as the item's description rather than its name. `intent` colours the label and icon: `warning` (amber) for undoing choices already made, `accent` (green) for a way forward; a disabled item drops it, and `danger` or `current` wins over it. `highlightChoices` styles the menu as a picker: the checked choice of each `group` sits on a light green row (a Dropdown selected option's ground) with a green check (a danger, intent, disabled or current choice keeps its own colours), and a text row whose label is a set's `group` name sits a notch smaller, as its heading. An item with `type: 'text'` is context rather than an action (an account's email above its actions): secondary text the arrow keys skip. Opened from the keyboard, focus lands on the first item, or on the checked choice in a menu of choices; Up/Down/Home/End move through enabled items, Tab closes the menu and moves on as usual; Escape or a picked item returns focus to the trigger.
66
66
  - **`NavItem`** — A row in an app's side navigation. Idle rows read secondary and take the list hover; the `active` row wears the accent tint and sets `aria-current="page"` on a link. `collapsed` shrinks it to a 36px icon tile whose label becomes the accessible name and a right-hand tooltip, with any `badge` pinned to the tile's corner. `variant="subitem"` indents a child row behind a dot instead of an icon; `disclosure` makes a group header button with `aria-expanded` and a rotating chevron, and `hasActiveChild` colours its text while a child is current. Renders an `<a>` with `href`, the element passed with `asChild` (a router `Link`), or a `<button>`, and forwards its ref and extra attributes so it can be a `Popover` or `ActionMenu` trigger. `disabled` keeps the row a tab stop with `aria-disabled`, drops its hover and pointer, and ignores clicks, Enter and Space; a `Popover` or `ActionMenu` it triggers stays shut on press, hover, focus and arrow keys, while other keys still reach a passed `onKeyDown` so arrow navigation through a list keeps working; a disabled `href` row renders as a button so it cannot be followed. `disabledReason` explains it in a right-hand tooltip on hover and focus and is the row's accessible description from the first focus. Not with `asChild`, whose child would still navigate. _Key props:_ `label`, `icon`, `active`, `hasActiveChild`, `collapsed`, `variant` (`item` | `subitem`), `danger`, `trailing`, `badge`, `disclosure` (`expanded` | `collapsed`), `tooltip`, `accessibleLabel` (overrides the accessible name; collapsed it defaults to the tooltip text plus `badgeLabel`), `href`, `target`, `rel`, `onClick`, `asChild` + `children`, `className`, `size` (`medium` | `small`, the tighter row for lists inside a popover), `tag` (beside the label, e.g. early access), `badgeLabel` (read in place of the badge and added to the collapsed name), `disabled`, `disabledReason`. A passed `aria-expanded` (e.g. from a `Popover`) wins over `disclosure`, and a button row forwards a passed `aria-current`.
@@ -81,6 +81,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
81
81
  - **`BaseFormComponent`** — Low-level base used by form controls; rarely used directly.
82
82
  - **`FormSectionHeading`** — Names a group of fields and rules off the space beside it, the way a long panel or settings page separates what it is asking for into parts. The label never shrinks — letting it flex clips the name long before the rule runs out of room — and it carries the same 8px inset a field label does, so a section name and the labels beneath it stand on one line. Quieter than `Typography.FormSectionTitle`, which titles a form rather than dividing one. `rule={false}` drops the rule, and it announces as a heading at `level`, so a long form can be navigated by section. _Key props:_ `children`, `rule`, `level` (2-6, default 3), `className`, `style`.
83
83
  - **`FieldGroup`** — Fields that follow from an answer given above them — the credentials a chosen authentication type asks for, say — drawn as its children: indented, with a rule down the side of the group. Stretches them to its own width, since a field left to size itself takes only the width of its content. _Key props:_ `children`, `gap` (default 40), `className`, `style`.
84
+ - **`FormActions`** — A form’s Cancel and primary pair, end-aligned: a side panel’s footer, or under a settings section. `secondary` is the outline action and always `type="button"`, so a Cancel inside a form never submits it. `primary` is filled, or `tone="destructive"` for an action that deletes; give it `type: 'submit'` inside a form or a `SidePanel` with `onSubmit` and Enter in a field presses it. _Key props:_ `primary` (`label`, `onClick`, `disabled`, `loading`, `tooltip`, `tone`, `type`), `secondary` (`label`, `onClick`, `disabled`, `loading`, `tooltip`), `size` (`small` | `medium`, default medium), `className`.
84
85
  - **`FieldBlock`** — Something a form has to show but does not ask for — a computed list, a generated value — wearing a field’s anatomy: label, optional `badge` beside it and `action` at the end of the row, content, then helper text, all on a field’s own metrics and inset. A real control brings its anatomy with it; this is for everything that has no control to bring one. _Key props:_ `label`, `badge`, `action`, `helperText`, `children`, `className`, `style`.
85
86
  - **`Input`** — Single-line text input. Passing `formControl` is enough to show validation: the resolver's message renders on its own line beneath the field in the destructive colour, politely announced, with `aria-invalid` and `aria-describedby` wired and the in-field error icon standing down once the message carries the meaning, and the control reports its edits back so a rejection clears as the customer fixes the field rather than standing until the next submit. Given a `formControl` the form owns the value: the field paints an explicit `value` first, then the value the form holds, then `defaultValue`, then empty — the ladder react-hook-form's own `useController` computes — so `reset()` and `setValue()` repaint the field and the text on screen cannot drift from the value being validated, which had put a rejection under a field the customer could see was filled. Passing `defaultValue` to a bound field warns in development, naming the component and the field: where the form has an entry for it, it is ignored, and where it has none it paints text the form will never submit. Set it through `useForm({ defaultValues })` instead. A consumer's own `helperText` keeps its line above it and stays dimmed, since it explains the field rather than reporting the fault — replacing one with the other left a field ringed in red with nothing saying what was wrong. An explicit `error` still wins, for a rejection the resolver knows nothing about, and `error={false}` suppresses the resolver outright, message included. `requiredIndicator` switches the label between the library default of naming the optional fields, an `asterisk` on the required ones for designs drawn that way, and `none` for a field whose value is supplied rather than asked for — a locked control is still required, but a marker only sends the reader looking for something to fill in. Visual only: `aria-required` is set from `required` whichever is chosen. _Key props:_ `label`, `type`, `InputSize`, `InputVariant` (`default` | `ghost`), `required`, `requiredIndicator`, `error`, `helperText`, `loading`, `formControl`, `value`, `defaultValue`, `showCopyButton`, `showPasswordToggle`, `aria-label`, `aria-labelledby`, `id`.
86
87
  - **`TextArea`** — Multi-line text input. Shows resolver validation from `formControl` on exactly the same terms as `Input`: the message gets its own line beneath any `helperText`, which keeps its own, and the value climbs the same ladder — an explicit `value`, then the value the form holds, then `defaultValue`, then empty — a disabled field included, which used to show `defaultValue` whatever the form or the consumer had said. `requiredIndicator` switches the label between the library default of naming the optional fields, an `asterisk` on the required ones for designs drawn that way, and `none` for a field whose value is supplied rather than asked for — a locked control is still required, but a marker only sends the reader looking for something to fill in. Visual only: `aria-required` is set from `required` whichever is chosen. _Key props:_ `label`, `rows`, `maxLength`, `resize`, `required`, `requiredIndicator`, `error`, `helperText`, `loading`, `formControl`, `value`, `defaultValue`, `aria-label`, `aria-labelledby`, `id`.
@@ -0,0 +1,40 @@
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import { Button as e } from "./Button.js";
3
+ const b = ({
4
+ primary: t,
5
+ secondary: l,
6
+ size: i = "medium",
7
+ className: n = ""
8
+ }) => /* @__PURE__ */ d("div", { className: `flex items-center justify-end gap-[8px] ${n}`, children: [
9
+ l ? /* @__PURE__ */ o(
10
+ e,
11
+ {
12
+ variant: "outline",
13
+ size: i,
14
+ type: "button",
15
+ disabled: l.disabled,
16
+ loading: l.loading,
17
+ tooltip: l.tooltip,
18
+ onClick: l.onClick,
19
+ children: l.label
20
+ }
21
+ ) : null,
22
+ t ? /* @__PURE__ */ o(
23
+ e,
24
+ {
25
+ variant: t.tone === "destructive" ? "destructive" : "filled",
26
+ size: i,
27
+ type: t.type ?? "button",
28
+ disabled: t.disabled,
29
+ loading: t.loading,
30
+ tooltip: t.tooltip,
31
+ onClick: t.onClick,
32
+ children: t.label
33
+ }
34
+ ) : null
35
+ ] });
36
+ export {
37
+ b as FormActions,
38
+ b as default
39
+ };
40
+ //# sourceMappingURL=FormActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormActions.js","sources":["../../src/components/FormActions.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from './Button';\n\nexport interface FormAction {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n loading?: boolean;\n tooltip?: string;\n}\n\nexport interface FormPrimaryAction extends FormAction {\n /** `destructive` for an action that deletes or revokes. */\n tone?: 'default' | 'destructive';\n /**\n * `submit` makes it the form's submit button, so Enter in a field presses it. Leave `onClick`\n * off then and handle the form's `onSubmit` (a `SidePanel`'s, say), or a click runs both.\n */\n type?: 'button' | 'submit';\n}\n\nexport interface FormActionsProps {\n /** The filled action, last in the row. */\n primary?: FormPrimaryAction;\n /** The outline action before it, usually Cancel. */\n secondary?: FormAction;\n size?: 'small' | 'medium';\n className?: string;\n}\n\n/** A form's Cancel and primary pair, end-aligned: a side panel's footer, or under a settings section. */\nconst FormActions: React.FC<FormActionsProps> = ({\n primary,\n secondary,\n size = 'medium',\n className = '',\n}) => (\n <div className={`flex items-center justify-end gap-[8px] ${className}`}>\n {secondary ? (\n <Button\n variant=\"outline\"\n size={size}\n type=\"button\"\n disabled={secondary.disabled}\n loading={secondary.loading}\n tooltip={secondary.tooltip}\n onClick={secondary.onClick}\n >\n {secondary.label}\n </Button>\n ) : null}\n {primary ? (\n <Button\n variant={primary.tone === 'destructive' ? 'destructive' : 'filled'}\n size={size}\n type={primary.type ?? 'button'}\n disabled={primary.disabled}\n loading={primary.loading}\n tooltip={primary.tooltip}\n onClick={primary.onClick}\n >\n {primary.label}\n </Button>\n ) : null}\n </div>\n);\n\nexport default FormActions;\nexport { FormActions };\n"],"names":["FormActions","primary","secondary","size","className","jsxs","jsx","Button"],"mappings":";;AA+BA,MAAMA,IAA0C,CAAC;AAAA,EAC7C,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAChB,MACI,gBAAAC,EAAC,OAAA,EAAI,WAAW,2CAA2CD,CAAS,IAC/D,UAAA;AAAA,EAAAF,IACG,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,SAAQ;AAAA,MACR,MAAAJ;AAAA,MACA,MAAK;AAAA,MACL,UAAUD,EAAU;AAAA,MACpB,SAASA,EAAU;AAAA,MACnB,SAASA,EAAU;AAAA,MACnB,SAASA,EAAU;AAAA,MAElB,UAAAA,EAAU;AAAA,IAAA;AAAA,EAAA,IAEf;AAAA,EACHD,IACG,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,SAASN,EAAQ,SAAS,gBAAgB,gBAAgB;AAAA,MAC1D,MAAAE;AAAA,MACA,MAAMF,EAAQ,QAAQ;AAAA,MACtB,UAAUA,EAAQ;AAAA,MAClB,SAASA,EAAQ;AAAA,MACjB,SAASA,EAAQ;AAAA,MACjB,SAASA,EAAQ;AAAA,MAEhB,UAAAA,EAAQ;AAAA,IAAA;AAAA,EAAA,IAEb;AAAA,EAAA,CACR;"}
@@ -1,28 +1,28 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { useId as L, useState as M, useRef as v, useEffect as ae } from "react";
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { useId as B, useState as W, useRef as v, useEffect as ne } from "react";
3
3
  import { createPortal as ie } from "react-dom";
4
- import { ShadowRootWrapper as te } from "../ShadowRootWrapper.js";
5
- import ne from "./CalloutStrip.js";
6
- import oe from "./CustomIcons/ArrowLeftIcon.js";
7
- import se from "./CustomIcons/DismissIcon.js";
4
+ import { ShadowRootWrapper as oe } from "../ShadowRootWrapper.js";
5
+ import se from "./CalloutStrip.js";
6
+ import ce from "./CustomIcons/ArrowLeftIcon.js";
7
+ import de from "./CustomIcons/DismissIcon.js";
8
8
  import N from "./Typography/EllipsisText.js";
9
- import { useOverlayBehaviour as ce, OVERLAY_ICON_BUTTON_CLASSES as W } from "./overlayBehaviour.js";
10
- import { OVERLAY_ELEVATED_ATTR as de, overlayIdentity as j } from "./portalOverlay.js";
11
- const x = 200, me = "360px", F = ({
12
- bodyPadding: a,
13
- callouts: i,
9
+ import { useOverlayBehaviour as me, OVERLAY_ICON_BUTTON_CLASSES as j } from "./overlayBehaviour.js";
10
+ import { OVERLAY_ELEVATED_ATTR as pe, overlayIdentity as F } from "./portalOverlay.js";
11
+ const x = 200, xe = "360px", H = ({
12
+ bodyPadding: r,
13
+ callouts: a,
14
14
  calloutId: n,
15
15
  renderLink: o,
16
16
  children: p
17
17
  }) => {
18
- const c = !!(i != null && i.length);
19
- return /* @__PURE__ */ r(
18
+ const c = !!(a != null && a.length);
19
+ return /* @__PURE__ */ l(
20
20
  "div",
21
21
  {
22
- className: `min-h-0 flex-1 overflow-y-auto ${a && !c ? "px-[28px]" : ""}`,
22
+ className: `min-h-0 flex-1 overflow-y-auto ${r && !c ? "px-[28px]" : ""}`,
23
23
  children: [
24
- i == null ? void 0 : i.map((s, d) => /* @__PURE__ */ e(
25
- ne,
24
+ a == null ? void 0 : a.map((s, d) => /* @__PURE__ */ e(
25
+ se,
26
26
  {
27
27
  id: n ? `${n}-${d}` : void 0,
28
28
  type: s.type,
@@ -31,13 +31,25 @@ const x = 200, me = "360px", F = ({
31
31
  },
32
32
  d
33
33
  )),
34
- a ? /* @__PURE__ */ e("div", { className: c ? "p-[28px]" : "py-[28px]", children: p }) : p
34
+ r ? /* @__PURE__ */ e("div", { className: c ? "p-[28px]" : "py-[28px]", children: p }) : p
35
35
  ]
36
36
  }
37
37
  );
38
- }, g = (a) => typeof a == "number" ? `${a}px` : a, ye = ({
39
- open: a,
40
- onClose: i,
38
+ }, g = (r) => typeof r == "number" ? `${r}px` : r, fe = (r) => {
39
+ r.key === "Enter" && r.target instanceof HTMLInputElement && r.preventDefault();
40
+ }, U = "col-start-2 row-span-3 grid min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-subgrid", ue = ({ onSubmit: r, children: a }) => r ? /* @__PURE__ */ e(
41
+ "form",
42
+ {
43
+ noValidate: !0,
44
+ className: U,
45
+ onSubmit: (n) => {
46
+ n.preventDefault(), n.stopPropagation(), r(n);
47
+ },
48
+ children: a
49
+ }
50
+ ) : /* @__PURE__ */ e("div", { className: U, children: a }), Se = ({
51
+ open: r,
52
+ onClose: a,
41
53
  title: n,
42
54
  subtitle: o,
43
55
  subtitlePlacement: p = "inline",
@@ -48,43 +60,44 @@ const x = 200, me = "360px", F = ({
48
60
  icon: w,
49
61
  headerExtra: y,
50
62
  footer: f,
51
- onBack: $,
63
+ onSubmit: $,
64
+ onBack: T,
52
65
  maxWidth: u = 1080,
53
66
  "aria-label": Y,
54
- "aria-labelledby": T,
67
+ "aria-labelledby": I,
55
68
  bodyPadding: q = !0,
56
- stacking: H = "default",
69
+ stacking: K = "default",
57
70
  callouts: h,
58
- renderLink: U,
59
- aside: l,
60
- children: G
71
+ renderLink: G,
72
+ aside: t,
73
+ children: J
61
74
  }) => {
62
- const I = L(), S = L(), [k, C] = M(!1), [J, E] = M(!1), m = v(null), t = v(null), _ = v(null), {
63
- ref: K,
64
- isTopmost: Q,
65
- zIndex: Z,
66
- elevated: ee
67
- } = ce({
68
- open: a,
69
- onClose: i,
70
- elevated: H === "above-app-overlays",
71
- hostRef: _
75
+ const S = B(), E = B(), [C, k] = W(!1), [Q, _] = W(!1), m = v(null), i = v(null), A = v(null), {
76
+ ref: Z,
77
+ isTopmost: ee,
78
+ zIndex: re,
79
+ elevated: le
80
+ } = me({
81
+ open: r,
82
+ onClose: a,
83
+ elevated: K === "above-app-overlays",
84
+ hostRef: A
72
85
  });
73
- if (ae(() => (a ? (E(!0), t.current && (clearTimeout(t.current), t.current = null), m.current = requestAnimationFrame(() => {
74
- m.current = null, C(!0);
75
- })) : (C(!1), t.current = setTimeout(() => {
76
- t.current = null, E(!1);
86
+ if (ne(() => (r ? (_(!0), i.current && (clearTimeout(i.current), i.current = null), m.current = requestAnimationFrame(() => {
87
+ m.current = null, k(!0);
88
+ })) : (k(!1), i.current = setTimeout(() => {
89
+ i.current = null, _(!1);
77
90
  }, x)), () => {
78
- m.current !== null && (cancelAnimationFrame(m.current), m.current = null), t.current && (clearTimeout(t.current), t.current = null);
79
- }), [a]), !J)
91
+ m.current !== null && (cancelAnimationFrame(m.current), m.current = null), i.current && (clearTimeout(i.current), i.current = null);
92
+ }), [r]), !Q)
80
93
  return null;
81
- const A = h == null ? void 0 : h.filter((D) => D.message.trim()), b = `calc(${g(u)} - 2px)`, R = X ? "border-0 border-b border-solid border-[var(--malachite-card-border)]" : "", re = l ? /* @__PURE__ */ r(
94
+ const P = h == null ? void 0 : h.filter((V) => V.message.trim()), b = `calc(${g(u)} - 2px)`, R = X ? "border-0 border-b border-solid border-[var(--malachite-card-border)]" : "", ae = t ? /* @__PURE__ */ l(
82
95
  "aside",
83
96
  {
84
- "aria-label": l.title,
97
+ "aria-label": t.title,
85
98
  className: "col-start-1 row-span-3 grid min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-subgrid overflow-hidden border-0 border-r border-solid border-[var(--malachite-card-border)]",
86
99
  children: [
87
- /* @__PURE__ */ r(
100
+ /* @__PURE__ */ l(
88
101
  "div",
89
102
  {
90
103
  className: `flex min-w-0 items-center gap-[8px] px-[20px] py-[18px] ${R}`,
@@ -92,25 +105,25 @@ const x = 200, me = "360px", F = ({
92
105
  /* @__PURE__ */ e("span", { className: "flex min-w-0 shrink-0", children: /* @__PURE__ */ e(
93
106
  N,
94
107
  {
95
- tooltip: l.title,
108
+ tooltip: t.title,
96
109
  tooltipWhenTruncated: !0,
97
110
  tooltipPlacement: "bottom",
98
111
  className: "min-w-0 text-[length:var(--malachite-font-size-15,15px)] font-semibold",
99
- children: l.title
112
+ children: t.title
100
113
  }
101
114
  ) }),
102
- l.headerExtra ? /* @__PURE__ */ e("span", { className: "ml-auto flex shrink-0 items-center", children: l.headerExtra }) : null
115
+ t.headerExtra ? /* @__PURE__ */ e("span", { className: "ml-auto flex shrink-0 items-center", children: t.headerExtra }) : null
103
116
  ]
104
117
  }
105
118
  ),
106
- /* @__PURE__ */ e("div", { className: `flex min-h-0 flex-col ${l.footer ? "" : "row-span-2"}`, children: /* @__PURE__ */ e(F, { bodyPadding: l.bodyPadding ?? !0, children: l.children }) }),
107
- l.footer ? /* @__PURE__ */ e("div", { className: "border-0 border-t border-solid border-[var(--malachite-card-border)] px-[24px] py-[16px]", children: l.footer }) : null
119
+ /* @__PURE__ */ e("div", { className: `flex min-h-0 flex-col ${t.footer ? "" : "row-span-2"}`, children: /* @__PURE__ */ e(H, { bodyPadding: t.bodyPadding ?? !0, children: t.children }) }),
120
+ t.footer ? /* @__PURE__ */ e("div", { className: "border-0 border-t border-solid border-[var(--malachite-card-border)] px-[24px] py-[16px]", children: t.footer }) : null
108
121
  ]
109
122
  }
110
- ) : null, P = p === "below" && !!o, z = /* @__PURE__ */ e(
123
+ ) : null, L = p === "below" && !!o, z = /* @__PURE__ */ e(
111
124
  "span",
112
125
  {
113
- className: P ? "flex min-w-0 shrink" : "flex min-w-0 max-w-full shrink-0",
126
+ className: L ? "flex min-w-0 shrink" : "flex min-w-0 max-w-full shrink-0",
114
127
  children: /* @__PURE__ */ e(
115
128
  N,
116
129
  {
@@ -122,7 +135,7 @@ const x = 200, me = "360px", F = ({
122
135
  }
123
136
  )
124
137
  }
125
- ), O = o ? /* @__PURE__ */ e(
138
+ ), D = o ? /* @__PURE__ */ e(
126
139
  N,
127
140
  {
128
141
  tooltip: o,
@@ -132,106 +145,106 @@ const x = 200, me = "360px", F = ({
132
145
  className: "min-w-0 text-[13px]",
133
146
  children: o
134
147
  }
135
- ) : null, B = c ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: c }) : null, V = y ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-baseline", children: y }) : null;
148
+ ) : null, O = c ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: c }) : null, M = y ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-baseline", children: y }) : null;
136
149
  return ie(
137
150
  // Host carries the stacking context — ShadowRootWrapper's `isolation` would
138
151
  // otherwise flatten our z-index and let sticky page elements paint over us.
139
152
  /* @__PURE__ */ e(
140
- te,
153
+ oe,
141
154
  {
142
- hostRef: _,
143
- hostStyle: { position: "relative", zIndex: Z },
144
- hostProps: ee ? { ...j("sidepanel"), [de]: "" } : j("sidepanel"),
145
- children: /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[1000]", children: [
155
+ hostRef: A,
156
+ hostStyle: { position: "relative", zIndex: re },
157
+ hostProps: le ? { ...F("sidepanel"), [pe]: "" } : F("sidepanel"),
158
+ children: /* @__PURE__ */ l("div", { className: "fixed inset-0 z-[1000]", children: [
146
159
  /* @__PURE__ */ e(
147
160
  "div",
148
161
  {
149
162
  "aria-hidden": "true",
150
- onClick: i,
151
- className: `absolute inset-0 bg-[var(--malachite-overlay-scrim)] transition-opacity duration-200 ease-in-out ${k ? "opacity-100" : "opacity-0"}`
163
+ onClick: a,
164
+ className: `absolute inset-0 bg-[var(--malachite-overlay-scrim)] transition-opacity duration-200 ease-in-out ${C ? "opacity-100" : "opacity-0"}`
152
165
  }
153
166
  ),
154
- /* @__PURE__ */ r(
167
+ /* @__PURE__ */ l(
155
168
  "div",
156
169
  {
157
- ref: K,
170
+ ref: Z,
158
171
  role: "dialog",
159
- "aria-modal": Q ? "true" : void 0,
172
+ "aria-modal": ee ? "true" : void 0,
160
173
  "aria-describedby": [
161
- ...(A ?? []).map((D, le) => `${I}-${le}`),
162
- s ? S : null
174
+ ...(P ?? []).map((V, te) => `${S}-${te}`),
175
+ s ? E : null
163
176
  ].filter(Boolean).join(" ") || void 0,
164
177
  tabIndex: -1,
165
- "aria-label": T ? void 0 : Y ?? (typeof n == "string" ? n : void 0),
166
- "aria-labelledby": T,
178
+ "aria-label": I ? void 0 : Y ?? (typeof n == "string" ? n : void 0),
179
+ "aria-labelledby": I,
167
180
  className: "absolute top-[8px] right-[8px] bottom-[8px] grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-x-auto overflow-y-hidden rounded-[20px] border border-solid border-[var(--malachite-card-border)] bg-[var(--malachite-card-background)] text-[var(--malachite-card-foreground)] outline-none [box-shadow:var(--malachite-shadow-lg)]",
168
181
  style: {
169
- width: `min(calc(100% - 16px), ${l ? `calc(2 * ${g(u)})` : g(u)})`,
182
+ width: `min(calc(100% - 16px), ${t ? `calc(2 * ${g(u)})` : g(u)})`,
170
183
  // Inline: Tailwind translate utilities silently break inside
171
184
  // shadow roots (see CLAUDE.md Shadow DOM caveats).
172
- transform: k ? "translateX(0)" : "translateX(calc(100% + 16px))",
185
+ transform: C ? "translateX(0)" : "translateX(calc(100% + 16px))",
173
186
  transition: `transform ${x}ms ease-in-out, width ${x}ms ease-in-out, grid-template-columns ${x}ms ease-in-out`,
174
187
  // The panel's own column is the width it has without an aside: `maxWidth`
175
188
  // less the 1px border either side, so opening the aside never widens it.
176
189
  // With an aside neither column gives way, so a narrow window scrolls the
177
190
  // panel instead. Both templates share one shape so the minimums animate
178
191
  // with the width rather than overflowing mid-transition.
179
- gridTemplateColumns: l ? `minmax(${me}, 1fr) minmax(${b}, ${b})` : `minmax(0px, 1fr) minmax(0px, ${b})`
192
+ gridTemplateColumns: t ? `minmax(${xe}, 1fr) minmax(${b}, ${b})` : `minmax(0px, 1fr) minmax(0px, ${b})`
180
193
  },
181
194
  children: [
182
- re,
183
- /* @__PURE__ */ r("div", { className: "col-start-2 row-span-3 grid min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-subgrid", children: [
184
- /* @__PURE__ */ r(
195
+ ae,
196
+ /* @__PURE__ */ l(ue, { onSubmit: $, children: [
197
+ /* @__PURE__ */ l(
185
198
  "div",
186
199
  {
187
200
  className: `flex flex-col gap-[20px] px-[20px] py-[18px] ${R}`,
188
201
  children: [
189
- /* @__PURE__ */ r("div", { className: "flex items-center gap-[12px]", children: [
190
- $ ? /* @__PURE__ */ e(
202
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-[12px]", children: [
203
+ T ? /* @__PURE__ */ e(
191
204
  "button",
192
205
  {
193
206
  type: "button",
194
207
  "aria-label": "Back",
195
- onClick: $,
196
- className: W,
197
- children: /* @__PURE__ */ e(oe, { size: 16 })
208
+ onClick: T,
209
+ className: j,
210
+ children: /* @__PURE__ */ e(ce, { size: 16 })
198
211
  }
199
212
  ) : null,
200
213
  w ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: w }) : null,
201
- P ? /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 items-center gap-[12px]", children: [
202
- /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
203
- /* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-[8px]", children: [
214
+ L ? /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 items-center gap-[12px]", children: [
215
+ /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
216
+ /* @__PURE__ */ l("div", { className: "flex min-w-0 items-baseline gap-[8px]", children: [
204
217
  z,
205
- B
218
+ O
206
219
  ] }),
207
- O
220
+ D
208
221
  ] }),
209
- V
210
- ] }) : /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 items-baseline gap-[12px]", children: [
211
- /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 items-baseline gap-[8px]", children: [
212
- /* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-[8px]", children: [
222
+ M
223
+ ] }) : /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 items-baseline gap-[12px]", children: [
224
+ /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 items-baseline gap-[8px]", children: [
225
+ /* @__PURE__ */ l("div", { className: "flex min-w-0 items-baseline gap-[8px]", children: [
213
226
  z,
214
- O
227
+ D
215
228
  ] }),
216
- B
229
+ O
217
230
  ] }),
218
- V
231
+ M
219
232
  ] }),
220
233
  /* @__PURE__ */ e(
221
234
  "button",
222
235
  {
223
236
  type: "button",
224
237
  "aria-label": "Close",
225
- onClick: i,
226
- className: W,
227
- children: /* @__PURE__ */ e(se, { size: 10 })
238
+ onClick: a,
239
+ className: j,
240
+ children: /* @__PURE__ */ e(de, { size: 10 })
228
241
  }
229
242
  )
230
243
  ] }),
231
244
  s ? /* @__PURE__ */ e(
232
245
  "div",
233
246
  {
234
- id: S,
247
+ id: E,
235
248
  className: "text-[13px] leading-[1.6] text-[var(--malachite-text-secondary)]",
236
249
  children: s
237
250
  }
@@ -239,16 +252,23 @@ const x = 200, me = "360px", F = ({
239
252
  ]
240
253
  }
241
254
  ),
242
- /* @__PURE__ */ r("div", { className: `flex min-h-0 flex-col ${f ? "" : "row-span-2"}`, children: [
243
- d ? /* @__PURE__ */ e("div", { className: "shrink-0 px-[16px] pt-[16px] pb-[8px]", children: d }) : null,
255
+ /* @__PURE__ */ l("div", { className: `flex min-h-0 flex-col ${f ? "" : "row-span-2"}`, children: [
256
+ d ? /* @__PURE__ */ e(
257
+ "div",
258
+ {
259
+ className: "shrink-0 px-[16px] pt-[16px] pb-[8px]",
260
+ onKeyDown: $ ? fe : void 0,
261
+ children: d
262
+ }
263
+ ) : null,
244
264
  /* @__PURE__ */ e(
245
- F,
265
+ H,
246
266
  {
247
267
  bodyPadding: q,
248
- callouts: A,
249
- calloutId: I,
250
- renderLink: U,
251
- children: G
268
+ callouts: P,
269
+ calloutId: S,
270
+ renderLink: G,
271
+ children: J
252
272
  }
253
273
  )
254
274
  ] }),
@@ -264,7 +284,7 @@ const x = 200, me = "360px", F = ({
264
284
  );
265
285
  };
266
286
  export {
267
- ye as SidePanel,
268
- ye as default
287
+ Se as SidePanel,
288
+ Se as default
269
289
  };
270
290
  //# sourceMappingURL=SidePanel.js.map