@stackone/malachite 0.49.0 → 0.50.1
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 +2 -2
- package/dist/index.d.ts +6 -9
- package/dist/index.js +718 -762
- 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.
|
|
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. Pass `stickyHeader` (+ optional `stickyTopOffset`) to pin the header while the body scrolls — needs
|
|
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`.
|
package/dist/index.d.ts
CHANGED
|
@@ -25,16 +25,12 @@ declare interface AccordionBaseProps {
|
|
|
25
25
|
disabled?: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Pin the header row to the top of the nearest scroll container so it stays
|
|
28
|
-
* reachable while the body scrolls. Needs
|
|
29
|
-
* `<Surface overflow="
|
|
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
30
|
*/
|
|
31
31
|
stickyHeader?: boolean;
|
|
32
32
|
/** Offset (px) from the top of the scroll container when `stickyHeader` is set. */
|
|
33
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
34
|
/**
|
|
39
35
|
* Animate the expand/collapse height (default `true`). Set `false` for an instant
|
|
40
36
|
* open — the body isn't clipped, so a `position: sticky` child pins immediately with
|
|
@@ -1415,10 +1411,11 @@ export declare interface SurfaceProps {
|
|
|
1415
1411
|
padding?: boolean;
|
|
1416
1412
|
/**
|
|
1417
1413
|
* Content overflow. Defaults to `hidden` so children are clipped to the rounded
|
|
1418
|
-
* corners.
|
|
1419
|
-
*
|
|
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.
|
|
1420
1417
|
*/
|
|
1421
|
-
overflow?: 'hidden' | 'visible';
|
|
1418
|
+
overflow?: 'hidden' | 'visible' | 'clip';
|
|
1422
1419
|
role?: default_2.AriaRole;
|
|
1423
1420
|
'aria-label'?: string;
|
|
1424
1421
|
'aria-labelledby'?: string;
|