@stackone/malachite 0.48.0 → 0.50.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
@@ -6,7 +6,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
6
6
 
7
7
  ## Layout & containers
8
8
 
9
- - **`Surface`** — Rounded, bordered card container with the standard elevation shadow. _Key props:_ `children`, `className`, `style`.
9
+ - **`Surface`** — Rounded, bordered card container with the standard elevation shadow. Use `overflow="clip"` to keep the rounded clipping while letting a `position: sticky` descendant still pin (`hidden` would trap it); `visible` disables clipping. _Key props:_ `children`, `padding`, `overflow`, `className`, `style`.
10
10
  - **`SurfaceRow`** — A full-bleed row inside a Surface (used as `Surface.Row`). Owns hover highlight, colour transition and an optional bottom divider. Pass `onClick`/`href` to make the whole row clickable (renders as a real button/anchor, so keyboard nav works). For a selectable row use `role="radio"` + `selected` and put a presentational `<Radio>` inside as the indicator. _Key props:_ `divider`, `disabled`, `onClick`, `href`, `selected`, `role`, `className`, `style`.
11
11
  - **`Card`** — Generic content card.
12
12
  - **`SplitScreenLayout`** — Two-pane full-screen layout (content + preview/aside) with an optional dismiss button.
@@ -20,7 +20,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
20
20
  ## Lists, rows & navigation
21
21
 
22
22
  - **`ButtonList`** — Vertical list of pill-style button/link rows with built-in hover/focus/active states. _Key props:_ `buttons[]` (`key`, `children`, `onClick`, `href`), `compact`.
23
- - **`Accordion`** — Expand/collapse section with a clickable header (disclosure arrow + title/header + trailing slot). Use `header` for rich content and `trailing` for an interactive control (e.g. a Checkbox) — trailing sits outside the toggle button, so a selectable+expandable row is just an Accordion. Controlled or uncontrolled. _Key props:_ `title` or `header`, `trailing`, `disabled`, `isExpanded`/`defaultExpanded`, `onToggle`.
23
+ - **`Accordion`** — Expand/collapse section with a clickable header (disclosure arrow + title/header + trailing slot). Use `header` for rich content and `trailing` for an interactive control (e.g. a Checkbox) — trailing sits outside the toggle button, so a selectable+expandable row is just an Accordion. Controlled or uncontrolled. Pass `stickyHeader` (+ optional `stickyTopOffset`) to pin the header while the body scrolls — needs a scroll ancestor that clips without trapping sticky (e.g. `<Surface overflow="clip">`). `animate={false}` opens instantly. _Key props:_ `title` or `header`, `trailing`, `disabled`, `isExpanded`/`defaultExpanded`, `onToggle`, `stickyHeader`, `stickyTopOffset`, `animate`.
24
24
  - **`DefinitionRow`** — Row showing an icon, label, optional tag and description — for definition/detail lists. _Key props:_ `icon`, `label`, `tag`, `description`.
25
25
  - **`PreviewTree`** — Nested, indented tree for previewing hierarchical structure.
26
26
  - **`PreviewTreeRow`** — A single labelled row within a PreviewTree. _Key props:_ `label`.
@@ -37,11 +37,11 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
37
37
  - **`Input`** — Single-line text input.
38
38
  - **`TextArea`** — Multi-line text input.
39
39
  - **`Search`** — Search input with a leading icon; `filled` and `muted` variants. _Key props:_ `value`, `onChange`, `placeholder`, `variant`, `size`, `disabled`.
40
- - **`Checkbox`** — Checkbox supporting checked/indeterminate/disabled. _Key props:_ `checked`, `indeterminate`, `disabled`, `onChange`.
40
+ - **`Checkbox`** — Checkbox supporting checked/indeterminate/disabled. Pass `presentational` to render a visual-only, non-focusable indicator for use inside a clickable row/card. _Key props:_ `checked`, `indeterminate`, `disabled`, `onChange`, `presentational`.
41
41
  - **`Radio`** — Single radio control with hover state; parent manages the group. Pass `presentational` to render a visual-only, non-focusable indicator for use inside a clickable row/card. _Key props:_ `checked`, `onChange`, `disabled`, `size`, `presentational`.
42
42
  - **`Toggle`** — On/off switch.
43
43
  - **`Dropdown`** — Single-select dropdown. _Key props:_ `DropdownItem[]`, `DropdownSize`.
44
- - **`MultiSelect`** — Multi-select dropdown with chips, inline search, keyboard navigation, and per-option descriptions. Supports controlled (`value`) and uncontrolled (`defaultValue`) modes. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`, `chips`, `chipsRemovable`, `chipsMax`, `inlineSearch`, `defaultValue`, `name`, `description`, `tooltip`, `required`, `formControl`. _Base props:_ `options`, `value`, `onChange` (optional), `placeholder`, `searchable`, `size`, `width`, `disabled`, `error`, `loading`, `label`. _Option props:_ `disabled` (locked/non-removable), `badge` (right-aligned ReactNode in dropdown only), `description`, `descriptionMode` (`icon` | `subtitle` | `hover`), `descriptionIcon`, `descriptionMaxLines`.
44
+ - **`MultiSelect`** — Multi-select dropdown. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`.
45
45
 
46
46
  ## Buttons & actions
47
47
 
@@ -54,12 +54,12 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
54
54
  - **`Alert`** — Inline alert/callout (info, success, warning, error).
55
55
  - **`StatusBadge`** — Large status indicator (e.g. success checkmark) for terminal/confirmation screens. _Key props:_ `type`.
56
56
  - **`StatBadge`** — Pill showing a numeric value with a label (e.g. "3 accounts selected"). _Key props:_ `count`, `label`.
57
- - **`Tag`** — Small status/label tag. Types: success, error, warning, default, primary, secondary, emphasis. _Key props:_ `value`, `type`, `paddingSize`, `textTransform`, `WidthSize`, `onRemove` (renders × close icon), `bordered`, `shadow`, `icon`, `iconPosition`.
57
+ - **`Tag`** — Small status/label tag. Types: success, error, warning, default. _Key props:_ `value`, `type`, `paddingSize`, `textTransform`, `WidthSize`.
58
58
  - **`NumberTag`** — Compact numeric badge/counter.
59
59
  - **`Progress`** — Progress bar.
60
60
  - **`Spinner`** — Loading spinner.
61
61
  - **`Skeleton`** — Loading placeholders. Includes `Skeleton.Avatar` and `Skeleton.Input`.
62
- - **`Tooltip`** — Hover/focus tooltip; also works on disabled controls (see CLAUDE.md). _Key props:_ `text`, `delay`, `placement`, `maxWidth`, `wrapChildren`, `isShrinkable`, `fill`.
62
+ - **`Tooltip`** — Hover/focus tooltip; also works on disabled controls (see CLAUDE.md).
63
63
  - **`TruncatedTooltip`** — Shows a tooltip only when its text is truncated.
64
64
  - **`Confetti`** — Celebratory confetti burst for success moments. _Key props:_ `pieces`.
65
65
 
package/dist/index.d.ts CHANGED
@@ -23,6 +23,20 @@ declare interface AccordionBaseProps {
23
23
  onToggle?: (expanded: boolean) => void;
24
24
  /** Disables the toggle (and its hover). Trailing controls manage their own state. */
25
25
  disabled?: boolean;
26
+ /**
27
+ * Pin the header row to the top of the nearest scroll container so it stays
28
+ * reachable while the body scrolls. Needs a scroll ancestor that clips without
29
+ * trapping sticky — e.g. a `<Surface overflow="clip">` (`overflow: hidden` traps it).
30
+ */
31
+ stickyHeader?: boolean;
32
+ /** Offset (px) from the top of the scroll container when `stickyHeader` is set. */
33
+ stickyTopOffset?: number;
34
+ /**
35
+ * Animate the expand/collapse height (default `true`). Set `false` for an instant
36
+ * open — the body isn't clipped, so a `position: sticky` child pins immediately with
37
+ * no post-animation settle.
38
+ */
39
+ animate?: boolean;
26
40
  }
27
41
 
28
42
  /**
@@ -238,9 +252,16 @@ export declare interface CheckboxProps {
238
252
  checked: boolean;
239
253
  /** Tri-state "partial" look — overrides the checked tick with a square. */
240
254
  indeterminate?: boolean;
241
- onChange: (checked: boolean) => void;
255
+ /** Optional when `presentational` — a presentational checkbox is a visual indicator only. */
256
+ onChange?: (checked: boolean) => void;
242
257
  disabled?: boolean;
243
258
  size?: number;
259
+ /**
260
+ * Render a visual-only indicator (a non-interactive, non-focusable `<span>`,
261
+ * `aria-hidden`) instead of an interactive checkbox. Use this inside a clickable
262
+ * row/card whose wrapper is the real control, so there's a single tab stop.
263
+ */
264
+ presentational?: boolean;
244
265
  'aria-label'?: string;
245
266
  'aria-labelledby'?: string;
246
267
  className?: string;
@@ -1388,6 +1409,13 @@ declare interface SurfaceComponent extends default_2.FC<SurfaceProps> {
1388
1409
  export declare interface SurfaceProps {
1389
1410
  children?: default_2.ReactNode;
1390
1411
  padding?: boolean;
1412
+ /**
1413
+ * Content overflow. Defaults to `hidden` so children are clipped to the rounded
1414
+ * corners. Use `clip` to keep the rounded clipping WITHOUT creating a scroll
1415
+ * container — so a `position: sticky` descendant still pins (unlike `hidden`,
1416
+ * which traps it). `visible` disables clipping entirely.
1417
+ */
1418
+ overflow?: 'hidden' | 'visible' | 'clip';
1391
1419
  role?: default_2.AriaRole;
1392
1420
  'aria-label'?: string;
1393
1421
  'aria-labelledby'?: string;
@@ -1733,6 +1761,12 @@ export declare interface WizardLayoutProps {
1733
1761
  stepper?: default_2.ReactNode;
1734
1762
  /** Far-right top-bar slot — e.g. a theme toggle. */
1735
1763
  trailing?: default_2.ReactNode;
1764
+ /**
1765
+ * Pinned below the top bar and always visible while the content scrolls —
1766
+ * e.g. connection logos + a step title. Rendered in the same centred column
1767
+ * as the content (`contentWidth`).
1768
+ */
1769
+ header?: default_2.ReactNode;
1736
1770
  /** Pinned to the bottom of the screen — typically a <FooterNav />. */
1737
1771
  footer?: default_2.ReactNode;
1738
1772
  /** Vertically centre the content (used for terminal/success screens). */