@stackone/malachite 0.48.0 → 0.49.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 +6 -6
- package/dist/index.d.ts +38 -1
- package/dist/index.js +1141 -1047
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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. Set `overflow="visible"` when a descendant must escape the card box (e.g. a sticky row). _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 an unclipped scroll ancestor (e.g. `<Surface overflow="visible">`); `roundTop`/`roundBottom` round the first/last row inside such a Surface. _Key props:_ `title` or `header`, `trailing`, `disabled`, `isExpanded`/`defaultExpanded`, `onToggle`, `stickyHeader`, `stickyTopOffset`, `roundTop`, `roundBottom`, `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
|
|
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
|
|
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).
|
|
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,24 @@ 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 an unclipped scroll ancestor — e.g. a
|
|
29
|
+
* `<Surface overflow="visible">`, since `overflow: hidden` traps sticky.
|
|
30
|
+
*/
|
|
31
|
+
stickyHeader?: boolean;
|
|
32
|
+
/** Offset (px) from the top of the scroll container when `stickyHeader` is set. */
|
|
33
|
+
stickyTopOffset?: number;
|
|
34
|
+
/** Round the top corners — for the first row inside an `overflow="visible"` Surface. */
|
|
35
|
+
roundTop?: boolean;
|
|
36
|
+
/** Round the bottom corners — for the last row inside an `overflow="visible"` Surface. */
|
|
37
|
+
roundBottom?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Animate the expand/collapse height (default `true`). Set `false` for an instant
|
|
40
|
+
* open — the body isn't clipped, so a `position: sticky` child pins immediately with
|
|
41
|
+
* no post-animation settle.
|
|
42
|
+
*/
|
|
43
|
+
animate?: boolean;
|
|
26
44
|
}
|
|
27
45
|
|
|
28
46
|
/**
|
|
@@ -238,9 +256,16 @@ export declare interface CheckboxProps {
|
|
|
238
256
|
checked: boolean;
|
|
239
257
|
/** Tri-state "partial" look — overrides the checked tick with a square. */
|
|
240
258
|
indeterminate?: boolean;
|
|
241
|
-
|
|
259
|
+
/** Optional when `presentational` — a presentational checkbox is a visual indicator only. */
|
|
260
|
+
onChange?: (checked: boolean) => void;
|
|
242
261
|
disabled?: boolean;
|
|
243
262
|
size?: number;
|
|
263
|
+
/**
|
|
264
|
+
* Render a visual-only indicator (a non-interactive, non-focusable `<span>`,
|
|
265
|
+
* `aria-hidden`) instead of an interactive checkbox. Use this inside a clickable
|
|
266
|
+
* row/card whose wrapper is the real control, so there's a single tab stop.
|
|
267
|
+
*/
|
|
268
|
+
presentational?: boolean;
|
|
244
269
|
'aria-label'?: string;
|
|
245
270
|
'aria-labelledby'?: string;
|
|
246
271
|
className?: string;
|
|
@@ -1388,6 +1413,12 @@ declare interface SurfaceComponent extends default_2.FC<SurfaceProps> {
|
|
|
1388
1413
|
export declare interface SurfaceProps {
|
|
1389
1414
|
children?: default_2.ReactNode;
|
|
1390
1415
|
padding?: boolean;
|
|
1416
|
+
/**
|
|
1417
|
+
* Content overflow. Defaults to `hidden` so children are clipped to the rounded
|
|
1418
|
+
* corners. Set to `visible` when a descendant needs to escape the card box —
|
|
1419
|
+
* e.g. a `position: sticky` row, which `overflow: hidden` would otherwise trap.
|
|
1420
|
+
*/
|
|
1421
|
+
overflow?: 'hidden' | 'visible';
|
|
1391
1422
|
role?: default_2.AriaRole;
|
|
1392
1423
|
'aria-label'?: string;
|
|
1393
1424
|
'aria-labelledby'?: string;
|
|
@@ -1733,6 +1764,12 @@ export declare interface WizardLayoutProps {
|
|
|
1733
1764
|
stepper?: default_2.ReactNode;
|
|
1734
1765
|
/** Far-right top-bar slot — e.g. a theme toggle. */
|
|
1735
1766
|
trailing?: default_2.ReactNode;
|
|
1767
|
+
/**
|
|
1768
|
+
* Pinned below the top bar and always visible while the content scrolls —
|
|
1769
|
+
* e.g. connection logos + a step title. Rendered in the same centred column
|
|
1770
|
+
* as the content (`contentWidth`).
|
|
1771
|
+
*/
|
|
1772
|
+
header?: default_2.ReactNode;
|
|
1736
1773
|
/** Pinned to the bottom of the screen — typically a <FooterNav />. */
|
|
1737
1774
|
footer?: default_2.ReactNode;
|
|
1738
1775
|
/** Vertically centre the content (used for terminal/success screens). */
|