@stackone/malachite 2.112.0 → 2.114.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 (54) hide show
  1. package/COMPONENTS.md +6 -1
  2. package/dist/assets/icons/arrow_line_left.svg.js +6 -0
  3. package/dist/assets/icons/arrow_line_left.svg.js.map +1 -0
  4. package/dist/assets/icons/arrow_line_right.svg.js +6 -0
  5. package/dist/assets/icons/arrow_line_right.svg.js.map +1 -0
  6. package/dist/assets/icons/book.svg.js +6 -0
  7. package/dist/assets/icons/book.svg.js.map +1 -0
  8. package/dist/assets/icons/book_open.svg.js +6 -0
  9. package/dist/assets/icons/book_open.svg.js.map +1 -0
  10. package/dist/components/Accordion.js +66 -64
  11. package/dist/components/Accordion.js.map +1 -1
  12. package/dist/components/ActionMenu.js +97 -96
  13. package/dist/components/ActionMenu.js.map +1 -1
  14. package/dist/components/BannerButton.js +44 -0
  15. package/dist/components/BannerButton.js.map +1 -0
  16. package/dist/components/Confetti.js +46 -45
  17. package/dist/components/Confetti.js.map +1 -1
  18. package/dist/components/CopyButton.js +37 -0
  19. package/dist/components/CopyButton.js.map +1 -0
  20. package/dist/components/CustomIcons/ArrowLineLeftIcon.js +21 -0
  21. package/dist/components/CustomIcons/ArrowLineLeftIcon.js.map +1 -0
  22. package/dist/components/CustomIcons/ArrowLineRightIcon.js +21 -0
  23. package/dist/components/CustomIcons/ArrowLineRightIcon.js.map +1 -0
  24. package/dist/components/CustomIcons/BookIcon.js +16 -0
  25. package/dist/components/CustomIcons/BookIcon.js.map +1 -0
  26. package/dist/components/CustomIcons/BookOpenIcon.js +21 -0
  27. package/dist/components/CustomIcons/BookOpenIcon.js.map +1 -0
  28. package/dist/components/CustomIcons/index.js +363 -351
  29. package/dist/components/CustomIcons/index.js.map +1 -1
  30. package/dist/components/DividerToggle.js +68 -0
  31. package/dist/components/DividerToggle.js.map +1 -0
  32. package/dist/components/FormSteps.js +110 -0
  33. package/dist/components/FormSteps.js.map +1 -0
  34. package/dist/components/Input/Input.js +202 -178
  35. package/dist/components/Input/Input.js.map +1 -1
  36. package/dist/components/KeyValueList.js +36 -35
  37. package/dist/components/KeyValueList.js.map +1 -1
  38. package/dist/components/LoadingScreen.js +133 -0
  39. package/dist/components/LoadingScreen.js.map +1 -0
  40. package/dist/components/actionMenuStyles.js +70 -51
  41. package/dist/components/actionMenuStyles.js.map +1 -1
  42. package/dist/components/chromeStyles.js +2 -3
  43. package/dist/components/chromeStyles.js.map +1 -1
  44. package/dist/components/confettiPhysics.js +57 -0
  45. package/dist/components/confettiPhysics.js.map +1 -0
  46. package/dist/components/stackOneWordmarkPaths.js +10 -0
  47. package/dist/components/stackOneWordmarkPaths.js.map +1 -0
  48. package/dist/index.d.ts +285 -118
  49. package/dist/index.js +453 -435
  50. package/dist/index.js.map +1 -1
  51. package/dist/tailwind.css.js +1 -1
  52. package/dist/theme.js +12 -9
  53. package/dist/theme.js.map +1 -1
  54. package/package.json +1 -1
package/COMPONENTS.md CHANGED
@@ -47,12 +47,13 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
47
47
  - **`UsageCard`** — A small metered card: a title (optionally a link via `titleLink`, drawn with a trailing arrow), a right-aligned `detail` such as "700/1,000", and a body, usually a `Progress`. Used by `Sidebar.Usage`, and fine on its own, e.g. on a billing page. _Key props:_ `title`, `titleLink`, `detail`, `children`, `aria-label` (required; names the group), `busy` (sets `aria-busy` only).
48
48
  - **`Progress`** — Progress bar.
49
49
  - **`LoadingBar`** — Indeterminate full-width loading line; the variant colour sweeps across a pale track for work of unknown duration. Toggle `active` rather than unmounting, so the reserved height prevents layout shift. _Key props:_ `active`, `LoadingBarVariant` (`default` | `warning` | `error`), `LoadingBarSize` (`small` | `medium` | `large`), `aria-label`, `aria-labelledby`, `className`, `style`.
50
+ - **`LoadingScreen`** — The whole viewport while an app has nothing to show yet: the StackOne wordmark over a bar scanning back and forth, on the sunken page background, in either theme. It matches the screen unified-cloud paints before its bundle loads, so a page handing over to it, or from it, reads as one wait (an IdP page a sign-out passes through, say). Fixed to the viewport; render it as the page, not inside a card. Reduced motion stops the scan at full width. For loading inside a page use `LoadingBar` or `Skeleton`. _Key props:_ `aria-label` (default "Loading"), `aria-labelledby`, `className`.
50
51
  - **`ToastProvider`** — Transient top-centre toasts for the outcome of an action. Wrap the app once in `ToastProvider` and call `useToast().show({ message, variant })` anywhere beneath it. Corners match a medium button. Each toast auto-dismisses, pauses while hovered and dismisses on click; at most three show at once. Toasts are announced through always-mounted live regions (`status` for success, `alert` for error), and the pills themselves are hidden from assistive tech and never take focus, so they cannot fight a dialog's focus trap. The host mounts on the first toast and joins the top layer, so toasts paint above elevated side panels. _Key props:_ `ToastProvider`: `children`, `duration` (ms, default 3000). `useToast()` → `show({ message, variant })`, `ToastVariant` (`success` | `error`, default `success`).
51
52
  - **`Spinner`** — Loading spinner.
52
53
  - **`Skeleton`** — Loading placeholders. Includes `Skeleton.Avatar` and `Skeleton.Input`. The shimmer stops under `prefers-reduced-motion`, leaving the plain placeholder.
53
54
  - **`Tooltip`** — Hover/focus tooltip; also works on disabled controls (see CLAUDE.md). It describes its trigger once shown, so `describesTrigger={false}` where the same sentence is already on screen and referenced — otherwise a screen reader reads it twice. _Key props:_ `text`, `placement`, `delay`, `maxWidth`, `shouldShow`, `triggerAs`, `describesTrigger`, `isShrinkable`, `fill`, `wrapChildren`, `suppressed` (holds the tooltip back, e.g. while the popup its trigger opens is up), `showOnFocus` (false where script can move focus onto the trigger, e.g. an option a panel focuses on open), `focusableTrigger` (makes a trigger that cannot take focus — text, a static `Tag` — a tab stop, so the tooltip is not mouse-only; not for focusable children).
54
55
  - **`TruncatedTooltip`** — Shows a tooltip only when its text is truncated.
55
- - **`Confetti`** — Celebratory confetti burst for success moments. _Key props:_ `pieces`.
56
+ - **`Confetti`** — Celebratory confetti burst for success moments: two cannons at the bottom corners throw the pieces up, then they flutter down, tumbling, and fade, on one canvas over the viewport. Fires once on mount; re-mount it (a changing `key`) to replay. Theme colours by default, green-led. Skipped entirely under `prefers-reduced-motion`. _Key props:_ `count` (default 150), `colors` (picked at random; list one twice to weight it), `className`.
56
57
  - **`ConfirmationDialog`** — Asks the customer to confirm one consequential action — a preset over `Modal`, not a second dialog implementation. `variant` picks a whole coherent set at once (badge fill, tray tint, caption colour, badge icon and confirm-button variant), so `destructive` cannot end up with a non-destructive confirm button; `destructive` also renders as `role="alertdialog"`, and `description` is wired to the dialog through `aria-describedby`, so the consequence is announced and not just the title. `confirmPhrase` gates the confirm action on typing that exact phrase, for a consequence severe enough that one click should not be able to cause it — the typed value and the phrase are both trimmed, since copying a name picks up a trailing space and a saved name can carry padding that never renders, except that a phrase of only whitespace is matched exactly as given, so an empty field cannot confirm it; the match stays case-sensitive, and the field clears each time the dialog opens, being a per-decision gate rather than a value. Neither a destructive dialog nor one carrying a `confirmPhrase` dismisses on a scrim click, and `loading` suppresses the pointer routes — the scrim and the close button — as well as disabling the buttons. It never suppresses ESC: that is the only guaranteed keyboard exit from a focus trap, so it always reaches `onClose` and whether to abort is left to the caller. ESC reaches it whenever it is the topmost overlay, so it can be opened over a panel. `confirmDisabled` holds only the confirm action back, for a consequence still being worked out (a check the callout reports on, so pair it with a callout saying why); cancel and every dismissal route stay live. `callout` renders an `Alert` in a full-width band at the top of the body — it scrolls with the body rather than being pinned under the header, and with no `description`, `children` or `confirmPhrase` there is no body, so the band sits directly on the footer — and its `type` is chosen independently of `variant` — the frames pair a green badge with an amber callout. `titleAdornment` names the entity beside the title, `badgeIcon` overrides the variant’s glyph for an action-specific one, and `tip` is the `{ label?, message }` caption on the tray beneath the card, which `Modal` renders and describes. `children` is where extra body content goes. `onConfirm` does not close the dialog, so the caller can hold it open on `loading` while the request is in flight. `confirmPhraseLabel` also takes `{ prefix, suffix }`, which renders the phrase itself as a copyable token between the two — the gate is case-sensitive and space-exact inside the phrase, so a customer who has identified the right entity should not be locked out by a glyph they cannot tell apart. The copy control sits outside the element that names the field, so “Copy…” never lands in the field’s accessible name; `confirmPhraseCopyLabel` names it and `onPhraseCopied` reports a completed write with the phrase it copied. A rejected write says so in the field rather than failing silently, and the control is disabled where the Clipboard API is unavailable. A near miss is named rather than left to a disabled button: typing the phrase with the wrong case or the wrong spacing says which, once the whole phrase is there, and that message is the field’s `aria-describedby`. _Key props:_ `open`, `onClose`, `onConfirm`, `title`, `description`, `titleAdornment`, `badgeIcon`, `variant` (`default` | `warning` | `destructive` | `success`), `callout`, `confirmPhrase`, `confirmPhraseLabel`, `confirmPhraseCopyLabel`, `confirmPhrasePlaceholder`, `onPhraseCopied`, `confirmLabel`, `cancelLabel`, `loading`, `confirmDisabled`, `tip`, `size`, `aria-label`, `aria-labelledby`.
57
58
 
58
59
  ## Forms & inputs
@@ -78,6 +79,8 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
78
79
  - **`MultiSelect`** — Multi-select dropdown. `width` fixes the trigger, as `Dropdown` and `Search` take it, so a toolbar can put its controls on one width — and, as with those two, a container narrower than the value still wins; the menu fills the trigger and left-aligns under it, so that one prop sizes both; `minWidth` raises the 160px floor a narrow trigger falls back to. An option label too long for the menu ellipsises, and hovering it shows the full label — above the description in `hover` mode — as `Dropdown` does for its options. `requiredIndicator` follows the same three-way convention the single-select controls do, so a form choosing asterisks does not get "(Optional)" on one of its fields. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`, `width`, `minWidth`, `label`, `searchable`, `inlineSearch`, `chips`, `chipsRemovable`, `required`, `requiredIndicator`, `aria-label`, `aria-labelledby`, `id`.
79
80
  - **`FilterSearch`** — One search field that filters across several categories. Clicking lists the filters, each with its description and an example; picking one lists its values behind a `Filters > Name` breadcrumb, and typing before picking searches the values of every filter at once, tagging each match with the filter it belongs to. Select All / Deselect All act on whatever the query matches. Each filter becomes a segmented chip, its name then its values (`Connector | Notion, Attio +2`), that reopens its values when clicked; an item `icon` is drawn in its menu row and in the chip, and `chipLabel: false` on a filter drops its name from the chip (`Configured only`); Backspace in an empty field removes the last one. `onQueryChange` reports the text in the field, for analytics or a server-side search. With `textFilter` (`{ value, label }`, under a `value` no filter uses) the typed text is itself the first row while searching (`Search "acme"`); committing it adds a `Search: acme` chip whose selection is `{ filter: textFilter.value, items: [text] }`, replacing any earlier text, so a free-text search can sit in the URL beside the filters, and clicking that chip puts the text back in the field. Controlled: `onChange` gets the next selection and the `changes` that produced it, an empty `items` meaning the filter was removed, so a URL-backed selection writes back only what moved. Chips keep the order filters were added in even when `value` comes back reordered, and keep their labels while `filters` reloads. `filtersButton` puts a Filters button, with the applied count, at the right end of the bar that opens a Filters panel beneath it: every filter at once, each drawn by its `control` (`list`, the default, a checkbox per value with an optional `count` badge and a search box past 8 values; `toggle`, a switch for the filter's one value; `segmented`, All plus one segment per value), applied as they change and mirrored as chips in the bar, with Clear all leaving the typed text alone. The button and the filter chips are then the only way to filters: the field is a plain search box (`role="searchbox"`) that never opens a menu, reports what is typed through `onQueryChange`, keeps it on blur and while the panel is open, and pins it as the `textFilter` chip on Enter. _Key props:_ `filters` (`control`, item `count`), `value`, `onChange`, `onClear`, `onActiveFilterChange`, `onQueryChange`, `textFilter`, `filtersButton`, `placeholder`, `size`, `width`, `loading`, `disabled`, `clearable`, `maxVisibleChips`, `aria-label`, `aria-labelledby`, `id`.
80
81
  - **`QueryInput`** — A textbox with inline syntax colouring and a suggestion menu anchored to the caret. It carries no grammar of its own: the consumer parses the value, hands back `tokens` to colour and `suggestions` to offer, so the vocabulary lives in the consuming app rather than here. _Key props:_ `value`, `onChange`, `tokens`, `suggestions`, `activeRange`, `onAccept`, `onQueryContextChange`, `onSubmit`, `placeholder`, `size`, `disabled`, `loading`, `emptyMessage`, `className`, `style`, `aria-label`, `aria-labelledby`.
82
+ - **`DividerToggle`** — A line divider with a toggle pill in the middle to expand/collapse an optional section below it. _Key props:_ `label`, `expandedLabel`, `expanded`, `onToggle`, `aria-controls`, `className`.
83
+ - **`FormSteps`** — A vertical list of steps. Renders each step as a list item with its title, optional action, and children below. Offers `form` (lettered markers, descriptions) and `review` (numbered steps, compact lists) variants. _Key props:_ `items` (`key`, `title`, `description`, `action`, `children`), `variant` (`review` | `form`), `marker`, `className`, `aria-label`, `aria-labelledby`.
81
84
  - **`SettingRow`** — One setting: a labelled row with its control on the trailing edge, and the sentence that explains it underneath. `control` may be a render prop receiving the label’s id, so a control that no `<label htmlFor>` can reach — `Toggle` renders a `<button role="switch">` — still names itself via `aria-labelledby`. _Key props:_ `label`, `badge`, `description`, `control`, `className`.
82
85
 
83
86
  ## Lists, rows & navigation
@@ -110,6 +113,8 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
110
113
  - **`CloseButton`** — The bare X that dismisses a screen, panel or wizard: secondary at rest, primary on hover and keyboard focus, with no box or background at either. Use it instead of a `ghost` `Button` (which draws a hover box) or `no-style` (which has no disabled look). `surface="inverse"` is for a panel that stays dark in every theme, such as `SplitScreenLayout`’s, and reads the `closeButton` theme tokens. `loading` swaps the X for a spinner and sets `aria-busy`. Disabled and loading both use `aria-disabled` rather than `disabled`, so they ignore clicks but stay focusable and can still trigger a `Tooltip` explaining why. Named "Close" unless `aria-label` says otherwise. _Key props:_ `onClick`, `aria-label`, `size` (`small` 24px | `medium` 32px, 12px glyph), `surface` (`default` | `inverse`), `disabled`, `loading`.
111
114
  - **`AccessPills`** — Three toggle pills, R / W / D, saying which effects an account grants (Read, Write, Delete) — on a linked-account row and in the header above the rows. Each pill is a button with `aria-pressed`, named in full by its state (`Write: some actions off`), and a tooltip on hover and focus spells that name out, since a letter alone is cryptic. On paints the effect’s tint (Read in `Tag`’s primary, Write in warning, Delete in error, the colours the dashboard already gives these effects), `"mixed"` (some, not all, of its actions on) an empty pill with a dashed border, off a neutral one. The colours come from the theme and there is no colour prop. It reports only which pill was pressed through `onToggle`: any cascade between effects (Read off turning Write and Delete off, say) and what pressing a mixed pill means belong to the caller. A pill in `disabled` stays focusable with `aria-disabled`, ignores clicks and keys, and its tooltip shows `disabledReason` instead, which is also its accessible description. `size="dense"` draws 24×20 pills in place of 26×24, for a narrow screen. _Key props:_ `value` (`{ read, write, delete }`, each `true` | `false` | `"mixed"`), `onToggle(effect)`, `disabled` (per effect), `disabledReason` (per effect, or one string), `size` (`default` | `dense`), `aria-label`, `aria-labelledby`.
112
115
  - **`PillButton`** — Pill-shaped button, often used for filters/toggleable chips. `shape="tab"` squares the top corners so a row of them reads as attached to whatever sits above — the controls under a chat composer. Pass `href` and an interactive, non-disabled pill renders a real anchor (cmd-click, copy-link) instead of navigating from `onClick`; a disabled or `interactive={false}` pill stays static, and an unsafe scheme such as `javascript:` is dropped. `target="_blank"` always carries `noopener noreferrer`. _Key props:_ `label`, `icon`, `trailingIcon`, `selected`, `disabled`, `interactive`, `size`, `variant`, `shape` (`pill` | `tab`), `onClick`, `href`, `target`, `rel`.
116
+ - **`CopyButton`** — The small copy control a copyable `Input` ends with, for a copyable value that is not an input, such as a list of scopes beside its label, so the two read the same. With `value` it copies and shows a check for a second; without, the click is the caller’s. _Key props:_ `value`, `onCopy`, `copied`, `aria-label`, `tooltip`.
117
+ - **`BannerButton`** — A banner that is one button: the warm ground, an icon in a white tile, a title with one line under it, and an arrow at the end that darkens on hover. For an offer of help beside a form, such as opening its setup guide, that wants more presence than a link and less than a primary button. Pass `aria-expanded` when it opens and closes something. _Key props:_ `icon`, `title`, `description`, `trailing`, `onClick`, `aria-expanded`, `aria-controls`, `aria-label`.
113
118
  - **`Link`** — Styled anchor/link text. _Key props:_ `LinkProps`.
114
119
  - **`InlineConfirm`** — A confirmation asked on the control that triggered it rather than in a modal, for a reversible bulk edit where a dialog would be heavier than the change it guards. Drawn to the design's chip: 33px tall, 12px radius, its confirm cell running to the pill's own edge between two rules. Reads its own `inlineConfirm` theme tokens — a shade off the `SelectionBar` it appears beside, by design. Carries a spinning glyph by default — its own, so it takes the pill's colour rather than the sheet's dimmed grey — standing for a change waiting on an answer; pass `icon={null}` to drop it or a node to replace it. Anchored placement is in viewport coordinates, so the chip must not sit inside an ancestor carrying `transform`, `filter` or `contain`. It takes focus on open so `Enter` confirms, dismisses on `Escape` (through the shared escape-layer stack, so the topmost overlay answers) or a click outside, and returns focus to whatever opened it. `role="alertdialog"` named by the message itself, so the confirm button is never announced bare. Only one can be open at a time: opening a second dismisses the first, so it is never ambiguous what Yes answers. Pass `anchorTo` (a ref to the control it answers for) and it pins itself to that control's left, follows it while the page or a sticky header scrolls, dismisses once it scrolls out of view, and treats clicks on it as inside — without which the same click would dismiss and reopen. Left unanchored it renders in flow for the consumer to place, and must then not sit in a container that clips overflow (`Table` header cells among them). Nothing renders while `open` is false, and its listeners are attached only while it is open. _Key props:_ `open`, `message`, `confirmLabel`, `onConfirm`, `onDismiss`, `anchorTo`, `icon`, `className`, `style`.
115
120
  - **`SelectionBar`** — A bar reporting a pending selection and the actions that resolve it, for flows where changes accumulate and save once rather than writing on every toggle. Paints its own inverted surface from the `selectionBar` theme tokens, so its buttons are its own rather than `Button`. A count renders as one phrase (`3 Added`), not a number styled apart from its label, and an empty `value` carries a bare message instead; the separators between counts and before an action are glyphs (`•`, `|`) in the muted colour, not drawn rules. `emphasis` runs `primary` (a light filled button with its own edge, for the action that commits) → `secondary`, the default (a filled chip) → `quiet` (unfilled, taking a wash on hover). The pill is edgeless in light mode and keeps a hairline `border` token in dark, where a shadow alone would not separate it from the sheet. Defaults to `placement="sticky"` — render it as the last child of the scrolling content and it holds its place over a long list. Counts are announced through a live region that outlives the bar, so the first change is not lost; `open` drives an animated mount so it can appear and leave as the selection goes dirty and clean. Every action closes the bar, so the caller must move focus deliberately in `onClick`. `notice` wraps the whole bar in a warning sleeve carrying that message, for state the bar is reporting rather than an action it offers — a refused exit, say — and it leads the announcement; an empty string renders no sleeve. _Key props:_ `open`, `counts` (`value`, `label`), `actions` (`label`, `onClick`, `emphasis`, `icon`, `iconPosition`, `disabled`, `dividerBefore`), `placement`, `notice`, `aria-label`, `className`.
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const a = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M236,128a12,12,0,0,1-12,12H109l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L109,116H224A12,12,0,0,1,236,128ZM40,28A12,12,0,0,0,28,40V216a12,12,0,0,0,24,0V40A12,12,0,0,0,40,28Z" }));
3
+ export {
4
+ a as default
5
+ };
6
+ //# sourceMappingURL=arrow_line_left.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow_line_left.svg.js","sources":["../../../src/assets/icons/arrow_line_left.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgArrowLineLeft = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 256 256\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M236,128a12,12,0,0,1-12,12H109l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L109,116H224A12,12,0,0,1,236,128ZM40,28A12,12,0,0,0,28,40V216a12,12,0,0,0,24,0V40A12,12,0,0,0,40,28Z\" }));\nexport default SvgArrowLineLeft;\n"],"names":["SvgArrowLineLeft","props","React"],"mappings":";AACK,MAACA,IAAmB,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,eAAe,MAAM,gBAAgB,GAAGD,EAAK,GAAoB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,GAAG,oNAAoN,CAAC;"}
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const a = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M184.49,119.51a12,12,0,0,1,0,17l-72,72a12,12,0,0,1-17-17L147,140H32a12,12,0,0,1,0-24H147L95.51,64.49a12,12,0,0,1,17-17ZM216,28a12,12,0,0,0-12,12V216a12,12,0,0,0,24,0V40A12,12,0,0,0,216,28Z" }));
3
+ export {
4
+ a as default
5
+ };
6
+ //# sourceMappingURL=arrow_line_right.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow_line_right.svg.js","sources":["../../../src/assets/icons/arrow_line_right.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgArrowLineRight = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 256 256\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M184.49,119.51a12,12,0,0,1,0,17l-72,72a12,12,0,0,1-17-17L147,140H32a12,12,0,0,1,0-24H147L95.51,64.49a12,12,0,0,1,17-17ZM216,28a12,12,0,0,0-12,12V216a12,12,0,0,0,24,0V40A12,12,0,0,0,216,28Z\" }));\nexport default SvgArrowLineRight;\n"],"names":["SvgArrowLineRight","props","React"],"mappings":";AACK,MAACA,IAAoB,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,eAAe,MAAM,gBAAgB,GAAGD,EAAK,GAAoB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,GAAG,gMAAgM,CAAC;"}
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const a = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M208,20H72A36,36,0,0,0,36,56V224a12,12,0,0,0,12,12H192a12,12,0,0,0,0-24H60v-4a12,12,0,0,1,12-12H208a12,12,0,0,0,12-12V32A12,12,0,0,0,208,20ZM196,172H72a35.59,35.59,0,0,0-12,2.06V56A12,12,0,0,1,72,44H196Z" }));
3
+ export {
4
+ a as default
5
+ };
6
+ //# sourceMappingURL=book.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"book.svg.js","sources":["../../../src/assets/icons/book.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgBook = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 256 256\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M208,20H72A36,36,0,0,0,36,56V224a12,12,0,0,0,12,12H192a12,12,0,0,0,0-24H60v-4a12,12,0,0,1,12-12H208a12,12,0,0,0,12-12V32A12,12,0,0,0,208,20ZM196,172H72a35.59,35.59,0,0,0-12,2.06V56A12,12,0,0,1,72,44H196Z\" }));\nexport default SvgBook;\n"],"names":["SvgBook","props","React"],"mappings":";AACK,MAACA,IAAU,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,eAAe,MAAM,gBAAgB,GAAGD,EAAK,GAAoB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,GAAG,+MAA+M,CAAC;"}
@@ -0,0 +1,6 @@
1
+ import * as a from "react";
2
+ const t = (e) => /* @__PURE__ */ a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", fill: "currentColor", ...e }, /* @__PURE__ */ a.createElement("path", { d: "M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z" }));
3
+ export {
4
+ t as default
5
+ };
6
+ //# sourceMappingURL=book_open.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"book_open.svg.js","sources":["../../../src/assets/icons/book_open.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgBookOpen = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 256 256\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z\" }));\nexport default SvgBookOpen;\n"],"names":["SvgBookOpen","props","React"],"mappings":";AACK,MAACA,IAAc,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,eAAe,MAAM,gBAAgB,GAAGD,EAAK,GAAoB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,GAAG,iVAAiV,CAAC;"}
@@ -1,26 +1,26 @@
1
1
  import { jsxs as B, jsx as t } from "react/jsx-runtime";
2
- import pe, { useId as be, useState as c, useEffect as V, useRef as h } from "react";
3
- import ge from "./CollapseFocusHandOff.js";
2
+ import pe, { useId as he, useState as c, useEffect as Y, useRef as g } from "react";
3
+ import be from "./CollapseFocusHandOff.js";
4
4
  import { DisclosureArrow as I } from "./DisclosureArrow.js";
5
- import he from "./PinnedCornerCap.js";
5
+ import ge from "./PinnedCornerCap.js";
6
6
  import { ARROW_PX as L, toggleGapPx as ve, togglePaddingLeftPx as xe, bodyInsetPx as we } from "./accordionBodyInset.js";
7
- import { ROW_HOVER_COLOR as X } from "./chromeStyles.js";
8
7
  import { FOCUS_RING as Ne, FOCUS_RING_INSET as Re } from "./focusRing.js";
9
- import { FRAME_BACKGROUND as _e, FRAME_CLASS as Ce } from "./frameStyles.js";
10
- import { inertWhen as ye } from "./inert.js";
11
- import { isRenderableNode as Y } from "./renderableNode.js";
12
- import { usePinned as ke } from "./usePinned.js";
13
- const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { position: "absolute", width: 0, height: 0 }, Ie = ({
14
- title: J,
15
- header: Q,
16
- className: Z,
8
+ import { FRAME_BACKGROUND as _e, FRAME_CLASS as ye } from "./frameStyles.js";
9
+ import { inertWhen as ke } from "./inert.js";
10
+ import { isRenderableNode as J } from "./renderableNode.js";
11
+ import { usePinned as Ce } from "./usePinned.js";
12
+ const Se = "--malachite-ctx-pinned-surround", Ae = 300, Q = 1600, Be = { position: "absolute", width: 0, height: 0 }, Ie = ({
13
+ title: V,
14
+ header: Z,
15
+ className: H,
17
16
  children: i,
18
- trailing: $,
19
- leading: E,
17
+ trailing: F,
18
+ leading: $,
20
19
  arrowPosition: u = "start",
21
20
  highlightExpanded: v = !0,
22
21
  bodyIndent: ee = "none",
23
22
  variant: te = "default",
23
+ size: j = "default",
24
24
  defaultExpanded: re = !1,
25
25
  isExpanded: x,
26
26
  onToggle: w,
@@ -32,65 +32,67 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
32
32
  collapsible: n = !0,
33
33
  flashKey: f
34
34
  }, ne) => {
35
- const R = N || !n, r = te === "sunken", _ = `${be()}-body`, [F, j] = c(re), [ae, se] = c(f), [p, ie] = c(0), [O, P] = c(!1);
36
- Object.is(f, ae) || (se(f), f !== void 0 && (ie(p + 1), P(!0))), V(() => {
35
+ const R = N || !n, r = te === "sunken", _ = `${he()}-body`, [E, P] = c(re), [ae, se] = c(f), [p, ie] = c(0), [D, M] = c(!1);
36
+ Object.is(f, ae) || (se(f), f !== void 0 && (ie(p + 1), M(!0))), Y(() => {
37
37
  if (p === 0)
38
38
  return;
39
- const o = window.setTimeout(() => P(!1), H);
39
+ const o = window.setTimeout(() => M(!1), Q);
40
40
  return () => window.clearTimeout(o);
41
- }, [p]), !n && !F && j(!0);
42
- const e = !n || (x !== void 0 ? x : F), C = n && u === "gutter", de = l || e && !!i, [s, b] = c(!n), D = h(e);
43
- !e && s ? b(!1) : e && !l && !s && b(!0), V(() => {
41
+ }, [p]), !n && !E && P(!0);
42
+ const e = !n || (x !== void 0 ? x : E), y = n && u === "gutter", de = l || e && !!i, [s, h] = c(!n), T = g(e);
43
+ !e && s ? h(!1) : e && !l && !s && h(!0), Y(() => {
44
44
  if (!e) {
45
- D.current = !1;
45
+ T.current = !1;
46
46
  return;
47
47
  }
48
- if (!l || s || D.current && n)
48
+ if (!l || s || T.current && n)
49
49
  return;
50
- const o = window.setTimeout(() => b(!0), Ae);
50
+ const o = window.setTimeout(() => h(!0), Ae);
51
51
  return () => window.clearTimeout(o);
52
52
  }, [l, e, n, s]);
53
- const y = h(null), M = h(null), z = h(null), T = !!d && oe && !r, k = ke(z, m, T), S = Y(E), a = ee === "title", g = a ? "grid grid-cols-subgrid col-span-4" : "", G = () => {
53
+ const k = g(null), z = g(null), G = g(null), O = !!d && oe && !r, C = Ce(G, m, O), S = J($), a = ee === "title", b = a ? "grid grid-cols-subgrid col-span-4" : "", U = () => {
54
54
  const o = !e;
55
- x === void 0 && j(o), w == null || w(o);
55
+ x === void 0 && P(o), w == null || w(o);
56
56
  }, le = [
57
57
  a ? "grid grid-cols-[auto_auto_minmax(0,1fr)_auto]" : "flex flex-col",
58
58
  "w-full text-left",
59
59
  // The table's frame, so a sunken section reads as the same kind of container as a table
60
60
  // beside it, in both themes.
61
- r ? Ce : "",
62
- O ? "relative" : "",
63
- Z
61
+ r ? ye : "",
62
+ D ? "relative" : "",
63
+ H
64
64
  ].filter(Boolean).join(" "), ce = [
65
65
  // `group` only when enabled, so the arrow doesn't darken on hover while disabled.
66
66
  R ? "" : "group",
67
- a ? g : "flex w-full",
67
+ a ? b : "flex w-full",
68
68
  "items-center transition-colors",
69
69
  r ? "" : "border-0 border-b border-solid border-[var(--malachite-card-border)]",
70
- d ? `sticky ${k ? "z-10" : "z-[8]"}` : "",
71
- r ? "bg-transparent" : d ? e && v || R ? "" : "hover:bg-[image:linear-gradient(var(--malachite-buttonlist-hover-background,rgb(245,245,245)),var(--malachite-buttonlist-hover-background,rgb(245,245,245)))]" : e && v ? "bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))]" : R ? "bg-transparent" : "bg-transparent hover:bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))]"
72
- ].filter(Boolean).join(" "), U = [
70
+ d ? `sticky ${C ? "z-10" : "z-[8]"}` : "",
71
+ r ? "bg-transparent" : d ? e && v || R ? "" : "hover:bg-[image:linear-gradient(var(--malachite-buttonlist-hover-background),var(--malachite-buttonlist-hover-background))]" : e && v ? "bg-[var(--malachite-buttonlist-hover-background)]" : R ? "bg-transparent" : "bg-transparent hover:bg-[var(--malachite-buttonlist-hover-background)]"
72
+ ].filter(Boolean).join(" "), K = [
73
73
  "flex flex-1 items-center min-w-0 text-left",
74
- r ? "pr-[16px] py-[12px]" : "pr-[16px] py-[16px]",
74
+ r ? "pr-[16px] py-[12px]" : "pr-[16px]",
75
+ !r && j === "field" ? "py-0 min-h-[calc(var(--malachite-control-height-large,42px)_-_2px)]" : "",
76
+ !r && j !== "field" ? "py-[16px]" : "",
75
77
  a ? "col-start-3" : ""
76
78
  ].filter(Boolean).join(" "), ue = [
77
- U,
79
+ K,
78
80
  "appearance-none border-0 bg-transparent cursor-pointer select-none disabled:cursor-not-allowed",
79
81
  r ? `rounded-lg ${Ne}` : Re
80
82
  ].join(" "), W = {
81
- paddingLeft: xe(S || C),
83
+ paddingLeft: xe(S || y),
82
84
  gap: ve(r)
83
- }, K = Q ?? /* @__PURE__ */ t("span", { className: "flex-1 min-w-0 truncate font-medium text-[13px] tracking-[0.13px] text-[var(--malachite-text-primary)]", children: J }), me = !r && e && v, fe = d ? {
85
+ }, q = Z ?? /* @__PURE__ */ t("span", { className: "flex-1 min-w-0 truncate font-medium text-[13px] tracking-[0.13px] text-[var(--malachite-text-primary)]", children: V }), me = !r && e && v, fe = d ? {
84
86
  top: `${m}px`,
85
87
  backgroundColor: r ? _e : "var(--malachite-card-background)",
86
88
  ...me && {
87
- backgroundImage: `linear-gradient(${X}, ${X})`
89
+ backgroundImage: "linear-gradient(var(--malachite-buttonlist-hover-background), var(--malachite-buttonlist-hover-background))"
88
90
  }
89
91
  } : {}, A = we({
90
92
  arrowPosition: n ? u : "end",
91
93
  hasLeading: S,
92
94
  sunken: r
93
- }), q = a ? /* @__PURE__ */ t(
95
+ }), X = a ? /* @__PURE__ */ t(
94
96
  "div",
95
97
  {
96
98
  className: "col-start-3 col-span-2 min-w-0",
@@ -105,34 +107,34 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
105
107
  className: le,
106
108
  style: d && m ? { scrollMarginTop: m } : void 0,
107
109
  children: [
108
- O && /* @__PURE__ */ t(
110
+ D && /* @__PURE__ */ t(
109
111
  "span",
110
112
  {
111
113
  "aria-hidden": "true",
112
114
  className: "pointer-events-none absolute inset-0 z-[11] rounded-[inherit] [outline-offset:-2px] [animation:malachite-section-flash_ease-out] motion-reduce:[animation-name:malachite-section-flash-still]",
113
- style: { animationDuration: `${H}ms` },
115
+ style: { animationDuration: `${Q}ms` },
114
116
  "data-accordion-flash": ""
115
117
  },
116
118
  p
117
119
  ),
118
- T && /* @__PURE__ */ t("div", { ref: z, "aria-hidden": "true", style: Be }),
120
+ O && /* @__PURE__ */ t("div", { ref: G, "aria-hidden": "true", style: Be }),
119
121
  /* @__PURE__ */ B(
120
122
  "div",
121
123
  {
122
124
  className: ce,
123
125
  style: fe,
124
126
  "data-accordion-header": "",
125
- "data-pinned": k ? "" : void 0,
127
+ "data-pinned": C ? "" : void 0,
126
128
  children: [
127
- k && /* @__PURE__ */ t(
128
- he,
129
+ C && /* @__PURE__ */ t(
130
+ ge,
129
131
  {
130
132
  bordered: !0,
131
133
  radius: "var(--malachite-radius-xxl, 14px)",
132
134
  surround: `var(${Se}, var(--malachite-card-sunken-background))`
133
135
  }
134
136
  ),
135
- C && /* @__PURE__ */ t(
137
+ y && /* @__PURE__ */ t(
136
138
  "button",
137
139
  {
138
140
  type: "button",
@@ -140,7 +142,7 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
140
142
  "aria-hidden": "true",
141
143
  className: `${a ? "col-start-1" : ""} shrink-0 self-stretch flex items-center pl-[16px] appearance-none border-0 bg-transparent cursor-pointer disabled:cursor-not-allowed`,
142
144
  onMouseDown: (o) => o.preventDefault(),
143
- onClick: G,
145
+ onClick: U,
144
146
  disabled: N,
145
147
  children: /* @__PURE__ */ t(I, { expanded: e, size: L })
146
148
  }
@@ -148,24 +150,24 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
148
150
  S && /* @__PURE__ */ t(
149
151
  "div",
150
152
  {
151
- className: `${a ? "col-start-2" : ""} shrink-0 flex items-center ${C ? "pl-[12px]" : "pl-[16px]"}`,
152
- children: E
153
+ className: `${a ? "col-start-2" : ""} shrink-0 flex items-center ${y ? "pl-[12px]" : "pl-[16px]"}`,
154
+ children: $
153
155
  }
154
156
  ),
155
157
  n ? /* @__PURE__ */ B(
156
158
  "button",
157
159
  {
158
- ref: M,
160
+ ref: z,
159
161
  type: "button",
160
162
  className: ue,
161
163
  style: W,
162
- onClick: G,
164
+ onClick: U,
163
165
  "aria-expanded": e,
164
166
  "aria-controls": de ? _ : void 0,
165
167
  disabled: N,
166
168
  children: [
167
169
  u === "start" && /* @__PURE__ */ t(I, { expanded: e, size: L }),
168
- K,
170
+ q,
169
171
  u === "end" && /* @__PURE__ */ t(
170
172
  I,
171
173
  {
@@ -176,12 +178,12 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
176
178
  )
177
179
  ]
178
180
  }
179
- ) : /* @__PURE__ */ t("div", { className: U, style: W, children: K }),
180
- Y($) && /* @__PURE__ */ t(
181
+ ) : /* @__PURE__ */ t("div", { className: K, style: W, children: q }),
182
+ J(F) && /* @__PURE__ */ t(
181
183
  "div",
182
184
  {
183
185
  className: `${a ? "col-start-4" : ""} shrink-0 flex items-center pr-[16px] text-[var(--malachite-text-secondary)]`,
184
- children: $
186
+ children: F
185
187
  }
186
188
  )
187
189
  ]
@@ -196,27 +198,27 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
196
198
  /* @__PURE__ */ t(
197
199
  "div",
198
200
  {
199
- ref: y,
200
- ...ye(!e),
201
+ ref: k,
202
+ ...ke(!e),
201
203
  id: _,
202
204
  className: `grid ${a ? "grid-cols-subgrid col-span-4" : "grid-cols-[minmax(0,1fr)]"} w-full transition-[grid-template-rows] duration-200 ease-in-out`,
203
205
  style: { gridTemplateRows: e ? "1fr" : "0fr" },
204
206
  onTransitionEnd: (o) => {
205
- o.target === o.currentTarget && o.propertyName === "grid-template-rows" && b(e);
207
+ o.target === o.currentTarget && o.propertyName === "grid-template-rows" && h(e);
206
208
  },
207
209
  children: /* @__PURE__ */ t(
208
210
  "div",
209
211
  {
210
- className: [g, s ? "overflow-visible" : "overflow-hidden"].filter(Boolean).join(" "),
212
+ className: [b, s ? "overflow-visible" : "overflow-hidden"].filter(Boolean).join(" "),
211
213
  "data-settled": s ? "" : void 0,
212
214
  children: i && /* @__PURE__ */ t(
213
215
  "div",
214
216
  {
215
217
  className: [
216
- g,
218
+ b,
217
219
  r ? "pt-[4px]" : "border-b border-solid border-[var(--malachite-card-border)]"
218
220
  ].filter(Boolean).join(" "),
219
- children: q
221
+ children: X
220
222
  }
221
223
  )
222
224
  }
@@ -228,17 +230,17 @@ const Se = "--malachite-ctx-pinned-surround", Ae = 300, H = 1600, Be = { positio
228
230
  e && i && /* @__PURE__ */ t(
229
231
  "div",
230
232
  {
231
- ref: y,
233
+ ref: k,
232
234
  id: _,
233
235
  className: [
234
- g,
236
+ b,
235
237
  r ? "pt-[4px]" : "border-b border-solid border-[var(--malachite-card-border)]"
236
238
  ].filter(Boolean).join(" "),
237
- children: q
239
+ children: X
238
240
  }
239
241
  )
240
242
  ),
241
- /* @__PURE__ */ t(ge, { expanded: e, bodyRef: y, toggleRef: M })
243
+ /* @__PURE__ */ t(be, { expanded: e, bodyRef: k, toggleRef: z })
242
244
  ]
243
245
  }
244
246
  );
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sources":["../../src/components/Accordion.tsx"],"sourcesContent":["import React, { useEffect, useId, useRef, useState } from 'react';\nimport CollapseFocusHandOff from './CollapseFocusHandOff';\nimport DisclosureArrow from './DisclosureArrow';\nimport PinnedCornerCap from './PinnedCornerCap';\nimport { ARROW_PX, bodyInsetPx, toggleGapPx, togglePaddingLeftPx } from './accordionBodyInset';\nimport { ROW_HOVER_COLOR } from './chromeStyles';\nimport { FOCUS_RING, FOCUS_RING_INSET } from './focusRing';\nimport { FRAME_BACKGROUND, FRAME_CLASS } from './frameStyles';\nimport { inertWhen } from './inert';\nimport { isRenderableNode } from './renderableNode';\nimport { usePinned } from './usePinned';\n\n/** The ground behind a pinned header's card, painted into its corners. A context channel, not a\n * theme token: no palette value, not settable through `applyTheme`, absent from\n * `getCurrentTheme`. Set it on an ancestor when the card does not sit on the page ground. */\nconst PINNED_SURROUND_CHANNEL = '--malachite-ctx-pinned-surround';\n\nconst SETTLE_FALLBACK_MS = 300;\nconst FLASH_MS = 1600;\n\n// Out of flow with no insets: it rests at the section's top without a cell or a caller's gap.\nconst PIN_MARKER_STYLE: React.CSSProperties = { position: 'absolute', width: 0, height: 0 };\n\ninterface AccordionBaseProps {\n className?: string;\n children?: React.ReactNode;\n /**\n * Visual style. `default` is the flat list row (row dividers, hover background).\n * `sunken` draws the section as a sunken card (a rounded container in the table's frame\n * colour, no dividers/hover) — used for stacked detail sections in side panels and\n * detail pages (see `CollapsibleSection`). Both lead with the arrow: it is the affordance\n * that says the section opens, and a reader scanning a stack of them finds it in\n * one column rather than at whatever width each header happens to end.\n */\n variant?: 'default' | 'sunken';\n /**\n * Content pinned to the right of the header, OUTSIDE the toggle button — so it may\n * be interactive (e.g. a Checkbox) without nesting a button inside a button.\n */\n trailing?: React.ReactNode;\n /** Before the title, outside the toggle button. */\n leading?: React.ReactNode;\n /** `false` keeps an open row on the card ground. */\n highlightExpanded?: boolean;\n /** `title` starts the body under the title, 16px short of it for a compact `Surface.Row`. */\n bodyIndent?: 'none' | 'title';\n /**\n * Pin the header row to the top of the nearest scroll container so it stays\n * reachable while the body scrolls. Needs a scroll ancestor that clips without\n * trapping sticky — e.g. a `<Surface overflow=\"clip\">` (`overflow: hidden` traps it).\n */\n stickyHeader?: boolean;\n /** Offset (px) from the top of the scroll container when `stickyHeader` is set. */\n stickyTopOffset?: number;\n /**\n * With `stickyHeader`, rounds the header into its card's top corners once it pins,\n * in a flat, default-tone `<Surface overflow=\"clip\" shadow={false}>`. Set\n * `--malachite-ctx-pinned-surround` on an ancestor when the card sits on another ground.\n */\n pinnedCorners?: boolean;\n /** Change it after mount to flash an outline around the section. */\n flashKey?: React.Key;\n}\n\ninterface AccordionToggleProps {\n /** `false` is a section that never closes; the toggle props except `animate` are then ignored. */\n collapsible?: boolean;\n /** `gutter` puts the arrow before `leading` as its own mouse toggle; the title stays the keyboard one. */\n arrowPosition?: 'start' | 'end' | 'gutter';\n defaultExpanded?: boolean;\n isExpanded?: boolean;\n onToggle?: (expanded: boolean) => void;\n /** Disables the toggle (and its hover). Trailing controls manage their own state. */\n disabled?: boolean;\n /**\n * Animate the expand/collapse height (default `true`). Set `false` for an instant\n * open — the body isn't clipped, so a `position: sticky` child pins immediately with\n * no post-animation settle.\n */\n animate?: boolean;\n}\n\n/**\n * Requires at least one of `title` (simple text header) or `header` (rich ReactNode\n * content for the toggle area, e.g. avatar + badges) so the toggle is never empty.\n */\ntype AccordionProps = AccordionBaseProps &\n AccordionToggleProps &\n ({ title: string; header?: React.ReactNode } | { title?: string; header: React.ReactNode });\n\nconst AccordionSection = (\n {\n title,\n header,\n className,\n children,\n trailing,\n leading,\n arrowPosition = 'start',\n highlightExpanded = true,\n bodyIndent = 'none',\n variant = 'default',\n defaultExpanded = false,\n isExpanded,\n onToggle,\n disabled = false,\n stickyHeader = false,\n stickyTopOffset = 0,\n pinnedCorners = false,\n animate = true,\n collapsible = true,\n flashKey,\n }: AccordionProps,\n ref: React.ForwardedRef<HTMLDivElement>,\n) => {\n const quiet = disabled || !collapsible;\n const sunken = variant === 'sunken';\n const instanceId = useId();\n const bodyId = `${instanceId}-body`;\n const [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n const [prevFlashKey, setPrevFlashKey] = useState(flashKey);\n const [flashRun, setFlashRun] = useState(0);\n const [flashing, setFlashing] = useState(false);\n if (!Object.is(flashKey, prevFlashKey)) {\n setPrevFlashKey(flashKey);\n if (flashKey !== undefined) {\n setFlashRun(flashRun + 1);\n setFlashing(true);\n }\n }\n useEffect(() => {\n if (flashRun === 0) {\n return;\n }\n const end = window.setTimeout(() => setFlashing(false), FLASH_MS);\n return () => window.clearTimeout(end);\n }, [flashRun]);\n if (!collapsible && !internalExpanded) {\n setInternalExpanded(true);\n }\n\n // Use controlled state if isExpanded is provided, otherwise use internal state\n const expanded = !collapsible || (isExpanded !== undefined ? isExpanded : internalExpanded);\n const gutter = collapsible && arrowPosition === 'gutter';\n\n // The instant path only renders the body while expanded; don't advertise\n // aria-controls when the referenced element isn't in the DOM.\n const bodyRendered = animate || (expanded && !!children);\n\n // The body clips overflow so the expand/collapse height animation works. Once fully\n // expanded we release the clip (after the transition) so a `position: sticky` child\n // inside can pin — `overflow: hidden` would otherwise trap it.\n const [bodySettled, setBodySettled] = useState(!collapsible);\n const mountedOpen = useRef(expanded);\n if (!expanded && bodySettled) {\n setBodySettled(false);\n } else if (expanded && !animate && !bodySettled) {\n setBodySettled(true);\n }\n useEffect(() => {\n if (!expanded) {\n mountedOpen.current = false;\n return undefined;\n }\n if (!animate || bodySettled || (mountedOpen.current && collapsible)) {\n return undefined;\n }\n // Not `transitioncancel`: reversing a running transition fires it while the new one runs.\n const fallback = window.setTimeout(() => setBodySettled(true), SETTLE_FALLBACK_MS);\n return () => window.clearTimeout(fallback);\n }, [animate, expanded, collapsible, bodySettled]);\n // A collapsed animated body is only a zero-height row, so it renders `inert` (below); an\n // instant one unmounts. Either way focus inside it is handed out (`CollapseFocusHandOff`).\n const bodyRef = useRef<HTMLDivElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const capsCorners = Boolean(stickyHeader) && pinnedCorners && !sunken;\n const pinned = usePinned(markerRef, stickyTopOffset, capsCorners);\n const hasLeading = isRenderableNode(leading);\n\n // One header column per slot, so the body can start at the toggle's.\n const titleGrid = bodyIndent === 'title';\n const subgrid = titleGrid ? 'grid grid-cols-subgrid col-span-4' : '';\n\n const handleToggle = () => {\n const newExpanded = !expanded;\n if (isExpanded === undefined) {\n setInternalExpanded(newExpanded);\n }\n onToggle?.(newExpanded);\n };\n\n const containerClasses = [\n titleGrid ? 'grid grid-cols-[auto_auto_minmax(0,1fr)_auto]' : 'flex flex-col',\n 'w-full text-left',\n // The table's frame, so a sunken section reads as the same kind of container as a table\n // beside it, in both themes.\n sunken ? FRAME_CLASS : '',\n flashing ? 'relative' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // The whole header row is a `group` so the disclosure arrow darkens on hover; the\n // hover background and arrow react to hovering anywhere on the row. The sunken\n // variant carries its own card chrome instead of row dividers/hover.\n // A pinned header's hover paints over its inline ground (headerRowStyle), which beats a\n // bg-colour class. Written out in full so Tailwind's scanner generates it.\n const pinnedBackground =\n (expanded && highlightExpanded) || quiet\n ? ''\n : 'hover:bg-[image:linear-gradient(var(--malachite-buttonlist-hover-background,rgb(245,245,245)),var(--malachite-buttonlist-hover-background,rgb(245,245,245)))]';\n const rowBackground = sunken\n ? 'bg-transparent'\n : stickyHeader\n ? pinnedBackground\n : expanded && highlightExpanded\n ? 'bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))]'\n : quiet\n ? 'bg-transparent'\n : 'bg-transparent hover:bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))]';\n const headerRowClasses = [\n // `group` only when enabled, so the arrow doesn't darken on hover while disabled.\n quiet ? '' : 'group',\n titleGrid ? subgrid : 'flex w-full',\n 'items-center transition-colors',\n sunken ? '' : 'border-0 border-b border-solid border-[var(--malachite-card-border)]',\n stickyHeader ? `sticky ${pinned ? 'z-10' : 'z-[8]'}` : '',\n rowBackground,\n ]\n .filter(Boolean)\n .join(' ');\n const titleAreaClasses = [\n 'flex flex-1 items-center min-w-0 text-left',\n sunken ? 'pr-[16px] py-[12px]' : 'pr-[16px] py-[16px]',\n titleGrid ? 'col-start-3' : '',\n ]\n .filter(Boolean)\n .join(' ');\n // Full-bleed default rows use an inset ring; the padded sunken toggle fits an outset one.\n const toggleButtonClasses = [\n titleAreaClasses,\n 'appearance-none border-0 bg-transparent cursor-pointer select-none disabled:cursor-not-allowed',\n sunken ? `rounded-lg ${FOCUS_RING}` : FOCUS_RING_INSET,\n ].join(' ');\n const titleAreaStyle: React.CSSProperties = {\n paddingLeft: togglePaddingLeftPx(hasLeading || gutter),\n gap: toggleGapPx(sunken),\n };\n const titleContent = header ?? (\n <span className=\"flex-1 min-w-0 truncate font-medium text-[13px] tracking-[0.13px] text-[var(--malachite-text-primary)]\">\n {title}\n </span>\n );\n\n // Inline so the offset, the opaque ground and the open highlight apply even where arbitrary\n // classes are not compiled. The ground is the variant's own: a sunken section pinned in card\n // white would float over its frame.\n const highlighted = !sunken && expanded && highlightExpanded;\n const headerRowStyle: React.CSSProperties = stickyHeader\n ? {\n top: `${stickyTopOffset}px`,\n backgroundColor: sunken ? FRAME_BACKGROUND : 'var(--malachite-card-background)',\n ...(highlighted && {\n backgroundImage: `linear-gradient(${ROW_HOVER_COLOR}, ${ROW_HOVER_COLOR})`,\n }),\n }\n : {};\n\n const titleInset = bodyInsetPx({\n arrowPosition: collapsible ? arrowPosition : 'end',\n hasLeading,\n sunken,\n });\n const bodyChildren = titleGrid ? (\n <div\n className=\"col-start-3 col-span-2 min-w-0\"\n style={titleInset < 0 ? { marginLeft: titleInset } : { paddingLeft: titleInset }}\n >\n {children}\n </div>\n ) : (\n children\n );\n\n return (\n <div\n ref={ref}\n className={containerClasses}\n style={\n stickyHeader && stickyTopOffset ? { scrollMarginTop: stickyTopOffset } : undefined\n }\n >\n {flashing && (\n <span\n key={flashRun}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 z-[11] rounded-[inherit] [outline-offset:-2px] [animation:malachite-section-flash_ease-out] motion-reduce:[animation-name:malachite-section-flash-still]\"\n style={{ animationDuration: `${FLASH_MS}ms` }}\n data-accordion-flash=\"\"\n />\n )}\n {capsCorners && <div ref={markerRef} aria-hidden=\"true\" style={PIN_MARKER_STYLE} />}\n <div\n className={headerRowClasses}\n style={headerRowStyle}\n data-accordion-header=\"\"\n data-pinned={pinned ? '' : undefined}\n >\n {pinned && (\n <PinnedCornerCap\n bordered\n radius=\"var(--malachite-radius-xxl, 14px)\"\n surround={`var(${PINNED_SURROUND_CHANNEL}, var(--malachite-card-sunken-background))`}\n />\n )}\n {gutter && (\n <button\n type=\"button\"\n tabIndex={-1}\n aria-hidden=\"true\"\n className={`${titleGrid ? 'col-start-1' : ''} shrink-0 self-stretch flex items-center pl-[16px] appearance-none border-0 bg-transparent cursor-pointer disabled:cursor-not-allowed`}\n onMouseDown={(event) => event.preventDefault()}\n onClick={handleToggle}\n disabled={disabled}\n >\n <DisclosureArrow expanded={expanded} size={ARROW_PX} />\n </button>\n )}\n {hasLeading && (\n <div\n className={`${titleGrid ? 'col-start-2' : ''} shrink-0 flex items-center ${gutter ? 'pl-[12px]' : 'pl-[16px]'}`}\n >\n {leading}\n </div>\n )}\n {/* Toggle area — arrow + header/title. Interactive trailing sits outside it. */}\n {collapsible ? (\n <button\n ref={toggleRef}\n type=\"button\"\n className={toggleButtonClasses}\n style={titleAreaStyle}\n onClick={handleToggle}\n aria-expanded={expanded}\n aria-controls={bodyRendered ? bodyId : undefined}\n disabled={disabled}\n >\n {arrowPosition === 'start' && (\n <DisclosureArrow expanded={expanded} size={ARROW_PX} />\n )}\n {titleContent}\n {arrowPosition === 'end' && (\n <DisclosureArrow\n expanded={expanded}\n size={ARROW_PX}\n className=\"ml-auto\"\n />\n )}\n </button>\n ) : (\n <div className={titleAreaClasses} style={titleAreaStyle}>\n {titleContent}\n </div>\n )}\n {isRenderableNode(trailing) && (\n <div\n className={`${titleGrid ? 'col-start-4' : ''} shrink-0 flex items-center pr-[16px] text-[var(--malachite-text-secondary)]`}\n >\n {trailing}\n </div>\n )}\n </div>\n\n {animate ? (\n /* Height animates via grid-template-rows (0fr → 1fr); body clips during.\n grid-cols-[minmax(0,1fr)] pins the single column to the track width so\n wide, non-wrapping children (e.g. a table with long cell text) can't grow\n the implicit `auto` column to their max-content and overflow the container;\n the title grid's body cell uses min-w-0 instead. */\n <div\n ref={bodyRef}\n {...inertWhen(!expanded)}\n id={bodyId}\n className={`grid ${titleGrid ? 'grid-cols-subgrid col-span-4' : 'grid-cols-[minmax(0,1fr)]'} w-full transition-[grid-template-rows] duration-200 ease-in-out`}\n style={{ gridTemplateRows: expanded ? '1fr' : '0fr' }}\n onTransitionEnd={(event) => {\n if (\n event.target === event.currentTarget &&\n event.propertyName === 'grid-template-rows'\n ) {\n setBodySettled(expanded);\n }\n }}\n >\n <div\n className={[subgrid, bodySettled ? 'overflow-visible' : 'overflow-hidden']\n .filter(Boolean)\n .join(' ')}\n data-settled={bodySettled ? '' : undefined}\n >\n {children && (\n <div\n className={[\n subgrid,\n sunken\n ? 'pt-[4px]'\n : 'border-b border-solid border-[var(--malachite-card-border)]',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {bodyChildren}\n </div>\n )}\n </div>\n </div>\n ) : (\n /* Instant open — no clip, so a sticky child inside pins immediately. */\n expanded &&\n children && (\n <div\n ref={bodyRef}\n id={bodyId}\n className={[\n subgrid,\n sunken\n ? 'pt-[4px]'\n : 'border-b border-solid border-[var(--malachite-card-border)]',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {bodyChildren}\n </div>\n )\n )}\n {/* Last, so a toggle mounted in the same commit has its ref by the hand-off. */}\n <CollapseFocusHandOff expanded={expanded} bodyRef={bodyRef} toggleRef={toggleRef} />\n </div>\n );\n};\n\nconst Accordion = React.forwardRef(AccordionSection);\nAccordion.displayName = 'Accordion';\n\nexport default Accordion;\nexport { Accordion };\nexport type { AccordionProps };\n"],"names":["PINNED_SURROUND_CHANNEL","SETTLE_FALLBACK_MS","FLASH_MS","PIN_MARKER_STYLE","AccordionSection","title","header","className","children","trailing","leading","arrowPosition","highlightExpanded","bodyIndent","variant","defaultExpanded","isExpanded","onToggle","disabled","stickyHeader","stickyTopOffset","pinnedCorners","animate","collapsible","flashKey","ref","quiet","sunken","bodyId","useId","internalExpanded","setInternalExpanded","useState","prevFlashKey","setPrevFlashKey","flashRun","setFlashRun","flashing","setFlashing","useEffect","end","expanded","gutter","bodyRendered","bodySettled","setBodySettled","mountedOpen","useRef","fallback","bodyRef","toggleRef","markerRef","capsCorners","pinned","usePinned","hasLeading","isRenderableNode","titleGrid","subgrid","handleToggle","newExpanded","containerClasses","FRAME_CLASS","headerRowClasses","titleAreaClasses","toggleButtonClasses","FOCUS_RING","FOCUS_RING_INSET","titleAreaStyle","togglePaddingLeftPx","toggleGapPx","titleContent","jsx","highlighted","headerRowStyle","FRAME_BACKGROUND","ROW_HOVER_COLOR","titleInset","bodyInsetPx","bodyChildren","jsxs","PinnedCornerCap","event","DisclosureArrow","ARROW_PX","inertWhen","CollapseFocusHandOff","Accordion","React"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,KAA0B,mCAE1BC,KAAqB,KACrBC,IAAW,MAGXC,KAAwC,EAAE,UAAU,YAAY,OAAO,GAAG,QAAQ,EAAA,GAqElFC,KAAmB,CACrB;AAAA,EACI,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAA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AApC,KACG,gBAAAgE;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACG,WAAW;AAAA,wBACPd;AAAA,wBACA/B,IACM,aACA;AAAA,sBAAA,EAEL,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,sBAEZ,UAAAoD;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACL;AAAA,cAAA;AAAA,YAER;AAAA,UAAA;AAAA;AAAA;AAAA,UAIJtC,KACAjC,KACI,gBAAAgE;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,KAAKvB;AAAA,cACL,IAAIrB;AAAA,cACJ,WAAW;AAAA,gBACP8B;AAAA,gBACA/B,IACM,aACA;AAAA,cAAA,EAEL,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,cAEZ,UAAAoD;AAAA,YAAA;AAAA,UAAA;AAAA;AAAA,QAKb,gBAAAP,EAACc,IAAA,EAAqB,UAAA7C,GAAoB,SAAAQ,GAAkB,WAAAC,EAAA,CAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9F,GAEMqC,KAAYC,GAAM,WAAWpF,EAAgB;AACnDmF,GAAU,cAAc;"}
1
+ {"version":3,"file":"Accordion.js","sources":["../../src/components/Accordion.tsx"],"sourcesContent":["import React, { useEffect, useId, useRef, useState } from 'react';\nimport CollapseFocusHandOff from './CollapseFocusHandOff';\nimport DisclosureArrow from './DisclosureArrow';\nimport PinnedCornerCap from './PinnedCornerCap';\nimport { ARROW_PX, bodyInsetPx, toggleGapPx, togglePaddingLeftPx } from './accordionBodyInset';\nimport { FOCUS_RING, FOCUS_RING_INSET } from './focusRing';\nimport { FRAME_BACKGROUND, FRAME_CLASS } from './frameStyles';\nimport { inertWhen } from './inert';\nimport { isRenderableNode } from './renderableNode';\nimport { usePinned } from './usePinned';\n\n/** The ground behind a pinned header's card, painted into its corners. A context channel, not a\n * theme token: no palette value, not settable through `applyTheme`, absent from\n * `getCurrentTheme`. Set it on an ancestor when the card does not sit on the page ground. */\nconst PINNED_SURROUND_CHANNEL = '--malachite-ctx-pinned-surround';\n\nconst SETTLE_FALLBACK_MS = 300;\nconst FLASH_MS = 1600;\n\n// Out of flow with no insets: it rests at the section's top without a cell or a caller's gap.\nconst PIN_MARKER_STYLE: React.CSSProperties = { position: 'absolute', width: 0, height: 0 };\n\ninterface AccordionBaseProps {\n className?: string;\n children?: React.ReactNode;\n /**\n * Visual style. `default` is the flat list row (row dividers, hover background).\n * `sunken` draws the section as a sunken card (a rounded container in the table's frame\n * colour, no dividers/hover) — used for stacked detail sections in side panels and\n * detail pages (see `CollapsibleSection`). Both lead with the arrow: it is the affordance\n * that says the section opens, and a reader scanning a stack of them finds it in\n * one column rather than at whatever width each header happens to end.\n */\n variant?: 'default' | 'sunken';\n /**\n * `field` makes the header as tall as a large `Input`, with no padding above and below the\n * title, so a folded list in a form lines up with the fields around it.\n */\n size?: 'default' | 'field';\n /**\n * Content pinned to the right of the header, OUTSIDE the toggle button — so it may\n * be interactive (e.g. a Checkbox) without nesting a button inside a button.\n */\n trailing?: React.ReactNode;\n /** Before the title, outside the toggle button. */\n leading?: React.ReactNode;\n /** `false` keeps an open row on the card ground. */\n highlightExpanded?: boolean;\n /** `title` starts the body under the title, 16px short of it for a compact `Surface.Row`. */\n bodyIndent?: 'none' | 'title';\n /**\n * Pin the header row to the top of the nearest scroll container so it stays\n * reachable while the body scrolls. Needs a scroll ancestor that clips without\n * trapping sticky — e.g. a `<Surface overflow=\"clip\">` (`overflow: hidden` traps it).\n */\n stickyHeader?: boolean;\n /** Offset (px) from the top of the scroll container when `stickyHeader` is set. */\n stickyTopOffset?: number;\n /**\n * With `stickyHeader`, rounds the header into its card's top corners once it pins,\n * in a flat, default-tone `<Surface overflow=\"clip\" shadow={false}>`. Set\n * `--malachite-ctx-pinned-surround` on an ancestor when the card sits on another ground.\n */\n pinnedCorners?: boolean;\n /** Change it after mount to flash an outline around the section. */\n flashKey?: React.Key;\n}\n\ninterface AccordionToggleProps {\n /** `false` is a section that never closes; the toggle props except `animate` are then ignored. */\n collapsible?: boolean;\n /** `gutter` puts the arrow before `leading` as its own mouse toggle; the title stays the keyboard one. */\n arrowPosition?: 'start' | 'end' | 'gutter';\n defaultExpanded?: boolean;\n isExpanded?: boolean;\n onToggle?: (expanded: boolean) => void;\n /** Disables the toggle (and its hover). Trailing controls manage their own state. */\n disabled?: boolean;\n /**\n * Animate the expand/collapse height (default `true`). Set `false` for an instant\n * open — the body isn't clipped, so a `position: sticky` child pins immediately with\n * no post-animation settle.\n */\n animate?: boolean;\n}\n\n/**\n * Requires at least one of `title` (simple text header) or `header` (rich ReactNode\n * content for the toggle area, e.g. avatar + badges) so the toggle is never empty.\n */\ntype AccordionProps = AccordionBaseProps &\n AccordionToggleProps &\n ({ title: string; header?: React.ReactNode } | { title?: string; header: React.ReactNode });\n\nconst AccordionSection = (\n {\n title,\n header,\n className,\n children,\n trailing,\n leading,\n arrowPosition = 'start',\n highlightExpanded = true,\n bodyIndent = 'none',\n variant = 'default',\n size = 'default',\n defaultExpanded = false,\n isExpanded,\n onToggle,\n disabled = false,\n stickyHeader = false,\n stickyTopOffset = 0,\n pinnedCorners = false,\n animate = true,\n collapsible = true,\n flashKey,\n }: AccordionProps,\n ref: React.ForwardedRef<HTMLDivElement>,\n) => {\n const quiet = disabled || !collapsible;\n const sunken = variant === 'sunken';\n const instanceId = useId();\n const bodyId = `${instanceId}-body`;\n const [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n const [prevFlashKey, setPrevFlashKey] = useState(flashKey);\n const [flashRun, setFlashRun] = useState(0);\n const [flashing, setFlashing] = useState(false);\n if (!Object.is(flashKey, prevFlashKey)) {\n setPrevFlashKey(flashKey);\n if (flashKey !== undefined) {\n setFlashRun(flashRun + 1);\n setFlashing(true);\n }\n }\n useEffect(() => {\n if (flashRun === 0) {\n return;\n }\n const end = window.setTimeout(() => setFlashing(false), FLASH_MS);\n return () => window.clearTimeout(end);\n }, [flashRun]);\n if (!collapsible && !internalExpanded) {\n setInternalExpanded(true);\n }\n\n // Use controlled state if isExpanded is provided, otherwise use internal state\n const expanded = !collapsible || (isExpanded !== undefined ? isExpanded : internalExpanded);\n const gutter = collapsible && arrowPosition === 'gutter';\n\n // The instant path only renders the body while expanded; don't advertise\n // aria-controls when the referenced element isn't in the DOM.\n const bodyRendered = animate || (expanded && !!children);\n\n // The body clips overflow so the expand/collapse height animation works. Once fully\n // expanded we release the clip (after the transition) so a `position: sticky` child\n // inside can pin — `overflow: hidden` would otherwise trap it.\n const [bodySettled, setBodySettled] = useState(!collapsible);\n const mountedOpen = useRef(expanded);\n if (!expanded && bodySettled) {\n setBodySettled(false);\n } else if (expanded && !animate && !bodySettled) {\n setBodySettled(true);\n }\n useEffect(() => {\n if (!expanded) {\n mountedOpen.current = false;\n return undefined;\n }\n if (!animate || bodySettled || (mountedOpen.current && collapsible)) {\n return undefined;\n }\n // Not `transitioncancel`: reversing a running transition fires it while the new one runs.\n const fallback = window.setTimeout(() => setBodySettled(true), SETTLE_FALLBACK_MS);\n return () => window.clearTimeout(fallback);\n }, [animate, expanded, collapsible, bodySettled]);\n // A collapsed animated body is only a zero-height row, so it renders `inert` (below); an\n // instant one unmounts. Either way focus inside it is handed out (`CollapseFocusHandOff`).\n const bodyRef = useRef<HTMLDivElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const capsCorners = Boolean(stickyHeader) && pinnedCorners && !sunken;\n const pinned = usePinned(markerRef, stickyTopOffset, capsCorners);\n const hasLeading = isRenderableNode(leading);\n\n // One header column per slot, so the body can start at the toggle's.\n const titleGrid = bodyIndent === 'title';\n const subgrid = titleGrid ? 'grid grid-cols-subgrid col-span-4' : '';\n\n const handleToggle = () => {\n const newExpanded = !expanded;\n if (isExpanded === undefined) {\n setInternalExpanded(newExpanded);\n }\n onToggle?.(newExpanded);\n };\n\n const containerClasses = [\n titleGrid ? 'grid grid-cols-[auto_auto_minmax(0,1fr)_auto]' : 'flex flex-col',\n 'w-full text-left',\n // The table's frame, so a sunken section reads as the same kind of container as a table\n // beside it, in both themes.\n sunken ? FRAME_CLASS : '',\n flashing ? 'relative' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // The whole header row is a `group` so the disclosure arrow darkens on hover; the\n // hover background and arrow react to hovering anywhere on the row. The sunken\n // variant carries its own card chrome instead of row dividers/hover.\n // A pinned header's hover paints over its inline ground (headerRowStyle), which beats a\n // bg-colour class. Written out in full so Tailwind's scanner generates it.\n const pinnedBackground =\n (expanded && highlightExpanded) || quiet\n ? ''\n : 'hover:bg-[image:linear-gradient(var(--malachite-buttonlist-hover-background),var(--malachite-buttonlist-hover-background))]';\n const rowBackground = sunken\n ? 'bg-transparent'\n : stickyHeader\n ? pinnedBackground\n : expanded && highlightExpanded\n ? 'bg-[var(--malachite-buttonlist-hover-background)]'\n : quiet\n ? 'bg-transparent'\n : 'bg-transparent hover:bg-[var(--malachite-buttonlist-hover-background)]';\n const headerRowClasses = [\n // `group` only when enabled, so the arrow doesn't darken on hover while disabled.\n quiet ? '' : 'group',\n titleGrid ? subgrid : 'flex w-full',\n 'items-center transition-colors',\n sunken ? '' : 'border-0 border-b border-solid border-[var(--malachite-card-border)]',\n stickyHeader ? `sticky ${pinned ? 'z-10' : 'z-[8]'}` : '',\n rowBackground,\n ]\n .filter(Boolean)\n .join(' ');\n const titleAreaClasses = [\n 'flex flex-1 items-center min-w-0 text-left',\n sunken ? 'pr-[16px] py-[12px]' : 'pr-[16px]',\n !sunken && size === 'field'\n ? 'py-0 min-h-[calc(var(--malachite-control-height-large,42px)_-_2px)]'\n : '',\n !sunken && size !== 'field' ? 'py-[16px]' : '',\n titleGrid ? 'col-start-3' : '',\n ]\n .filter(Boolean)\n .join(' ');\n // Full-bleed default rows use an inset ring; the padded sunken toggle fits an outset one.\n const toggleButtonClasses = [\n titleAreaClasses,\n 'appearance-none border-0 bg-transparent cursor-pointer select-none disabled:cursor-not-allowed',\n sunken ? `rounded-lg ${FOCUS_RING}` : FOCUS_RING_INSET,\n ].join(' ');\n const titleAreaStyle: React.CSSProperties = {\n paddingLeft: togglePaddingLeftPx(hasLeading || gutter),\n gap: toggleGapPx(sunken),\n };\n const titleContent = header ?? (\n <span className=\"flex-1 min-w-0 truncate font-medium text-[13px] tracking-[0.13px] text-[var(--malachite-text-primary)]\">\n {title}\n </span>\n );\n\n // Inline so the offset, the opaque ground and the open highlight apply even where arbitrary\n // classes are not compiled. The ground is the variant's own: a sunken section pinned in card\n // white would float over its frame.\n const highlighted = !sunken && expanded && highlightExpanded;\n const headerRowStyle: React.CSSProperties = stickyHeader\n ? {\n top: `${stickyTopOffset}px`,\n backgroundColor: sunken ? FRAME_BACKGROUND : 'var(--malachite-card-background)',\n ...(highlighted && {\n backgroundImage:\n 'linear-gradient(var(--malachite-buttonlist-hover-background), var(--malachite-buttonlist-hover-background))',\n }),\n }\n : {};\n\n const titleInset = bodyInsetPx({\n arrowPosition: collapsible ? arrowPosition : 'end',\n hasLeading,\n sunken,\n });\n const bodyChildren = titleGrid ? (\n <div\n className=\"col-start-3 col-span-2 min-w-0\"\n style={titleInset < 0 ? { marginLeft: titleInset } : { paddingLeft: titleInset }}\n >\n {children}\n </div>\n ) : (\n children\n );\n\n return (\n <div\n ref={ref}\n className={containerClasses}\n style={\n stickyHeader && stickyTopOffset ? { scrollMarginTop: stickyTopOffset } : undefined\n }\n >\n {flashing && (\n <span\n key={flashRun}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 z-[11] rounded-[inherit] [outline-offset:-2px] [animation:malachite-section-flash_ease-out] motion-reduce:[animation-name:malachite-section-flash-still]\"\n style={{ animationDuration: `${FLASH_MS}ms` }}\n data-accordion-flash=\"\"\n />\n )}\n {capsCorners && <div ref={markerRef} aria-hidden=\"true\" style={PIN_MARKER_STYLE} />}\n <div\n className={headerRowClasses}\n style={headerRowStyle}\n data-accordion-header=\"\"\n data-pinned={pinned ? '' : undefined}\n >\n {pinned && (\n <PinnedCornerCap\n bordered\n radius=\"var(--malachite-radius-xxl, 14px)\"\n surround={`var(${PINNED_SURROUND_CHANNEL}, var(--malachite-card-sunken-background))`}\n />\n )}\n {gutter && (\n <button\n type=\"button\"\n tabIndex={-1}\n aria-hidden=\"true\"\n className={`${titleGrid ? 'col-start-1' : ''} shrink-0 self-stretch flex items-center pl-[16px] appearance-none border-0 bg-transparent cursor-pointer disabled:cursor-not-allowed`}\n onMouseDown={(event) => event.preventDefault()}\n onClick={handleToggle}\n disabled={disabled}\n >\n <DisclosureArrow expanded={expanded} size={ARROW_PX} />\n </button>\n )}\n {hasLeading && (\n <div\n className={`${titleGrid ? 'col-start-2' : ''} shrink-0 flex items-center ${gutter ? 'pl-[12px]' : 'pl-[16px]'}`}\n >\n {leading}\n </div>\n )}\n {/* Toggle area — arrow + header/title. Interactive trailing sits outside it. */}\n {collapsible ? (\n <button\n ref={toggleRef}\n type=\"button\"\n className={toggleButtonClasses}\n style={titleAreaStyle}\n onClick={handleToggle}\n aria-expanded={expanded}\n aria-controls={bodyRendered ? bodyId : undefined}\n disabled={disabled}\n >\n {arrowPosition === 'start' && (\n <DisclosureArrow expanded={expanded} size={ARROW_PX} />\n )}\n {titleContent}\n {arrowPosition === 'end' && (\n <DisclosureArrow\n expanded={expanded}\n size={ARROW_PX}\n className=\"ml-auto\"\n />\n )}\n </button>\n ) : (\n <div className={titleAreaClasses} style={titleAreaStyle}>\n {titleContent}\n </div>\n )}\n {isRenderableNode(trailing) && (\n <div\n className={`${titleGrid ? 'col-start-4' : ''} shrink-0 flex items-center pr-[16px] text-[var(--malachite-text-secondary)]`}\n >\n {trailing}\n </div>\n )}\n </div>\n\n {animate ? (\n /* Height animates via grid-template-rows (0fr → 1fr); body clips during.\n grid-cols-[minmax(0,1fr)] pins the single column to the track width so\n wide, non-wrapping children (e.g. a table with long cell text) can't grow\n the implicit `auto` column to their max-content and overflow the container;\n the title grid's body cell uses min-w-0 instead. */\n <div\n ref={bodyRef}\n {...inertWhen(!expanded)}\n id={bodyId}\n className={`grid ${titleGrid ? 'grid-cols-subgrid col-span-4' : 'grid-cols-[minmax(0,1fr)]'} w-full transition-[grid-template-rows] duration-200 ease-in-out`}\n style={{ gridTemplateRows: expanded ? '1fr' : '0fr' }}\n onTransitionEnd={(event) => {\n if (\n event.target === event.currentTarget &&\n event.propertyName === 'grid-template-rows'\n ) {\n setBodySettled(expanded);\n }\n }}\n >\n <div\n className={[subgrid, bodySettled ? 'overflow-visible' : 'overflow-hidden']\n .filter(Boolean)\n .join(' ')}\n data-settled={bodySettled ? '' : undefined}\n >\n {children && (\n <div\n className={[\n subgrid,\n sunken\n ? 'pt-[4px]'\n : 'border-b border-solid border-[var(--malachite-card-border)]',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {bodyChildren}\n </div>\n )}\n </div>\n </div>\n ) : (\n /* Instant open — no clip, so a sticky child inside pins immediately. */\n expanded &&\n children && (\n <div\n ref={bodyRef}\n id={bodyId}\n className={[\n subgrid,\n sunken\n ? 'pt-[4px]'\n : 'border-b border-solid border-[var(--malachite-card-border)]',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {bodyChildren}\n </div>\n )\n )}\n {/* Last, so a toggle mounted in the same commit has its ref by the hand-off. */}\n <CollapseFocusHandOff expanded={expanded} bodyRef={bodyRef} toggleRef={toggleRef} />\n </div>\n );\n};\n\nconst Accordion = React.forwardRef(AccordionSection);\nAccordion.displayName = 'Accordion';\n\nexport default Accordion;\nexport { Accordion };\nexport type { AccordionProps };\n"],"names":["PINNED_SURROUND_CHANNEL","SETTLE_FALLBACK_MS","FLASH_MS","PIN_MARKER_STYLE","AccordionSection","title","header","className","children","trailing","leading","arrowPosition","highlightExpanded","bodyIndent","variant","size","defaultExpanded","isExpanded","onToggle","disabled","stickyHeader","stickyTopOffset","pinnedCorners","animate","collapsible","flashKey","ref","quiet","sunken","bodyId","useId","internalExpanded","setInternalExpanded","useState","prevFlashKey","setPrevFlashKey","flashRun","setFlashRun","flashing","setFlashing","useEffect","end","expanded","gutter","bodyRendered","bodySettled","setBodySettled","mountedOpen","useRef","fallback","bodyRef","toggleRef","markerRef","capsCorners","pinned","usePinned","hasLeading","isRenderableNode","titleGrid","subgrid","handleToggle","newExpanded","containerClasses","FRAME_CLASS","headerRowClasses","titleAreaClasses","toggleButtonClasses","FOCUS_RING","FOCUS_RING_INSET","titleAreaStyle","togglePaddingLeftPx","toggleGapPx","titleContent","jsx","highlighted","headerRowStyle","FRAME_BACKGROUND","titleInset","bodyInsetPx","bodyChildren","jsxs","PinnedCornerCap","event","DisclosureArrow","ARROW_PX","inertWhen","CollapseFocusHandOff","Accordion","React"],"mappings":";;;;;;;;;;;AAcA,MAAMA,KAA0B,mCAE1BC,KAAqB,KACrBC,IAAW,MAGXC,KAAwC,EAAE,UAAU,YAAY,OAAO,GAAG,QAAQ,EAAA,GA0ElFC,KAAmB,CACrB;AAAA,EACI,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,mBAAAC,IAAoB;AAAA,EACpB,YAAAC,KAAa;AAAA,EACb,SAAAC,KAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,iBAAAC,KAAkB;AAAA,EAClB,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AAAA,EACf,iBAAAC,IAAkB;AAAA,EAClB,eAAAC,KAAgB;AAAA,EAChB,SAAAC,IAAU;AAAA,EACV,aAAAC,IAAc;AAAA,EACd,UAAAC;AACJ,GACAC,OACC;AACD,QAAMC,IAAQR,KAAY,CAACK,GACrBI,IAASd,OAAY,UAErBe,IAAS,GADIC,GAAA,CACS,SACtB,CAACC,GAAkBC,CAAmB,IAAIC,EAASjB,EAAe,GAClE,CAACkB,IAAcC,EAAe,IAAIF,EAASR,CAAQ,GACnD,CAACW,GAAUC,EAAW,IAAIJ,EAAS,CAAC,GAC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