@stackone/malachite 2.19.0 → 2.19.2
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 +1 -0
- package/dist/{CodeBlockHighlighter-B8ORO1RQ.js → CodeBlockHighlighter-BEU9qOam.js} +2 -2
- package/dist/{CodeBlockHighlighter-B8ORO1RQ.js.map → CodeBlockHighlighter-BEU9qOam.js.map} +1 -1
- package/dist/{index-UCSkCSNL.js → index-BkW49pNT.js} +1700 -1670
- package/dist/index-BkW49pNT.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +45 -44
- package/package.json +1 -1
- package/dist/index-UCSkCSNL.js.map +0 -1
package/COMPONENTS.md
CHANGED
|
@@ -25,6 +25,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
25
25
|
- **`ActionBar`** — A row of actions that collapses into a single `ActionMenu` once its container drops below `collapseBelow`. Measures the nearest genuinely-wider ancestor rather than itself, since the row shrinks to its own content. `dividerBefore` renders a vertical rule in the row and a divider in the collapsed menu, so both forms group the actions the same way. _Key props:_ `buttons` (`label`, `onClick`, `icon`, `variant`, `size`, `radius`, `tooltip`, `disabled`, `dividerBefore`), `collapseBelow`, `menuLabel`, `className`.
|
|
26
26
|
- **`Modal`** — Centred dialog over a scrim, with header slots (icon/title/subtitle/extra), a scrolling body and a pinned footer. Locks background scroll and dismisses on ESC, the close button, or a scrim click unless `closeOnOverlayClick` is off; `busy` suppresses the two pointer routes while a request is in flight and sets `aria-busy`, so a stray click cannot tear the dialog down mid-write — but never ESC, which is the only guaranteed keyboard exit from a focus trap and so always reaches `onClose`. ESC, the Tab focus trap and `aria-modal` all apply to the topmost overlay only, so these may be stacked — a dialog opened from a panel keeps Tab to itself and the panel stops claiming to be modal. Set `role="alertdialog"` for a consequential choice, which asks assistive tech to announce the body and not just the name, and point `aria-describedby` at whichever element carries it. Width comes from the `size` union (`small` 420px | `medium` 612px | `large` 760px) rather than a raw pixel prop. `titleAdornment` sits immediately after the title behind a hairline divider, for naming the thing being acted on — distinct from `headerExtra`, which pins to the far right. `tray` paints a tinted plate around the card and hangs a `caption` beneath it; the plate is the dialog element itself, so that caption stays inside the `aria-modal` subtree rather than being stranded outside it by the visual nesting, and it is added to `aria-describedby` automatically because it says what the dialog is asking. It takes a tone (`neutral` | `warning` | `error` | `success`) rather than a colour, so no consumer can paint it off-palette — and the tone sets the plate and its caption colour together, so the two cannot disagree. The caption is a `{ label?, message }` pair rather than a node, because its row height, type scale and colour belong to the plate. `size` names the card, and the plate’s 4px ring is added on top. Like `SidePanel` it sits in a z-index band from 1000 — one step per stacked overlay, so what paints on top is what holds the keyboard — and stays out of the browser top layer, so a host app’s own dialogs can still cover it. For a confirmation use `ConfirmationDialog`, which is a preset over this. _Key props:_ `open`, `onClose`, `title`, `subtitle`, `icon`, `headerExtra`, `titleAdornment`, `tray`, `headerDivider`, `footer`, `size`, `showCloseButton`, `closeOnOverlayClick`, `bodyPadding`, `busy`, `role` (`dialog` | `alertdialog`), `aria-label`, `aria-labelledby`, `aria-describedby`.
|
|
27
27
|
- **`SidePanel`** — Right-hand slide-in overlay panel (drawer) with header slots (back/icon/title/subtitle/extra), scrollable body and optional footer. Locks background scroll and dismisses on ESC, an overlay click or close. ESC and the Tab focus trap apply to the topmost overlay only, so a `Modal` may be stacked over it.
|
|
28
|
+
- **`useHasOpenOverlay`** — Hook reporting whether any modal-type overlay - `SidePanel` or `Modal` - is open anywhere in the app. For host chrome that has to get out of an overlay’s way, a floating support widget being the case it was added for: overlays render through a portal, so a host has no DOM signal of its own to read, and reading the library’s internal markers would couple it to something it does not own. Dropdowns and tooltips are deliberately not counted - they do not trap focus, and chrome does not need to move for them. _Key props:_ No arguments. Returns a boolean.
|
|
28
29
|
- **`SidePanelNavFooter`** — Keyboard-hint footer for SidePanel: up/down keycaps to step between records and an esc-to-close hint, with an optional right-aligned actions slot.
|
|
29
30
|
|
|
30
31
|
## Feedback & status
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as Pn } from "react/jsx-runtime";
|
|
2
|
-
import { _ as ue, a as se, C as cn, b as fe } from "./index-
|
|
2
|
+
import { _ as ue, a as se, C as cn, b as fe } from "./index-BkW49pNT.js";
|
|
3
3
|
import H from "react";
|
|
4
4
|
function de(n, e) {
|
|
5
5
|
if (n == null) return {};
|
|
@@ -2788,4 +2788,4 @@ const ht = {
|
|
|
2788
2788
|
export {
|
|
2789
2789
|
bt as default
|
|
2790
2790
|
};
|
|
2791
|
-
//# sourceMappingURL=CodeBlockHighlighter-
|
|
2791
|
+
//# sourceMappingURL=CodeBlockHighlighter-BEU9qOam.js.map
|