@stackone/malachite 0.67.1 → 0.68.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 +5 -3
- package/README.md +13 -0
- package/dist/{CodeBlockHighlighter-DdYtkBCd.js → CodeBlockHighlighter-BYwemPlk.js} +2 -2
- package/dist/CodeBlockHighlighter-BYwemPlk.js.map +1 -0
- package/dist/{index-DgGKenM_.js → index-BRH2BT_r.js} +2832 -2655
- package/dist/index-BRH2BT_r.js.map +1 -0
- package/dist/index.d.ts +66 -4
- package/dist/index.js +81 -78
- package/package.json +14 -14
- package/dist/CodeBlockHighlighter-DdYtkBCd.js.map +0 -1
- package/dist/index-DgGKenM_.js.map +0 -1
package/COMPONENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by `
|
|
1
|
+
<!-- GENERATED by `pnpm docs:components` from scripts/component-catalog.mjs. Do not edit by hand. -->
|
|
2
2
|
|
|
3
3
|
# Malachite components
|
|
4
4
|
|
|
@@ -19,6 +19,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
19
19
|
- **`Spacer`** — Empty element that adds fixed spacing between siblings.
|
|
20
20
|
- **`Divider`** — Horizontal/vertical separator; supports a dashed line style. _Key props:_ `lineStyle="solid" | "dashed"`, `DividerVariant`, `SpacingSize`, `PaddingSize`.
|
|
21
21
|
- **`OverflowRow`** — Horizontal row that collapses items that do not fit into an overflow affordance.
|
|
22
|
+
- **`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`.
|
|
22
23
|
- **`SidePanel`** — Right-hand slide-in overlay panel (drawer) with header slots (back/icon/title/subtitle/extra), scrollable body and optional footer. Locks background scroll, traps focus, dismisses on ESC (topmost layer), overlay click or close.
|
|
23
24
|
- **`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.
|
|
24
25
|
|
|
@@ -48,7 +49,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
48
49
|
- **`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`.
|
|
49
50
|
- **`SegmentedControl`** — A pill track of mutually-exclusive options — the segmented “one of these” control. Owns the track background, the selected-thumb chrome and the `radiogroup` semantics, so consumers never hand-roll a track around `PillButton` (whose `default` variant tokens are tuned for standalone filter pills, not a sunken track). Single tab stop with arrow-key move-and-select; selection is conveyed via `aria-checked` and a foreground change, not background colour alone. Restyle via the `segmentedControl` theme tokens. _Key props:_ `options` (`value`, `label`, `icon`, `disabled`), `value`, `onChange`, `SegmentedControlSize` (`small` | `medium`), `fullWidth`, `disabled`, `aria-label`, `aria-labelledby`, `className`.
|
|
50
51
|
- **`Toggle`** — On/off switch. Add `label` for a visible caption, and `variant` to give it standalone toolbar-filter chrome — pick the family it sits beside: `pill` matches the filter-bar inputs (`Search`, `MultiSelect`), `button` renders the whole control as an outline `Button` with the switch as its trailing icon. `bordered` is shorthand for `variant="pill"`. _Key props:_ `checked`, `onChange`, `disabled`, `ToggleSize` (`small` | `medium`), `label`, `ToggleVariant` (`pill` | `button`), `bordered`, `aria-label`, `aria-labelledby`, `id`.
|
|
51
|
-
- **`Dropdown`** — Single-select dropdown. _Key props:_ `DropdownItem[]`, `DropdownSize`, `label`, `search`, `required`, `error`, `helperText`, `loading`, `formControl`, `aria-label`, `aria-labelledby`, `id`.
|
|
52
|
+
- **`Dropdown`** — Single-select dropdown. `DropdownSize` is `xsmall` (28px) | `small` (32px) | `medium` (42px); `xsmall` is the chip that sits beside a page title and rounds tighter (10px) than the taller sizes. _Key props:_ `DropdownItem[]`, `DropdownSize`, `label`, `search`, `required`, `error`, `helperText`, `loading`, `formControl`, `aria-label`, `aria-labelledby`, `id`.
|
|
52
53
|
- **`MultiSelect`** — Multi-select dropdown. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`, `label`, `searchable`, `inlineSearch`, `chips`, `chipsRemovable`, `required`, `aria-label`, `aria-labelledby`, `id`.
|
|
53
54
|
|
|
54
55
|
## Buttons & actions
|
|
@@ -75,13 +76,14 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
75
76
|
## Typography
|
|
76
77
|
|
|
77
78
|
- **`ClampText`** — Clamps text to N lines; expands to full text on hover/focus with a height animation. Wrapping markdown? Pass `variant="flow"` to the `Typography.MarkdownBlock` inside it, or the clamp counts blocks instead of lines.
|
|
78
|
-
- **`Typography`** — Text primitives — use these instead of raw colour tokens on `<span>`s. Includes `Typography.Text`, `Typography.SecondaryText`, `Typography.EllipsisText`, etc., with size/weight/color props. `Typography.CodeText` takes `variant="inline"` for a chip mid-sentence; `Typography.MarkdownBlock` takes `variant="flow"` for use inside `ClampText` and `normalizeSource` for machine-generated descriptions that omit blank lines between blocks.
|
|
79
|
+
- **`Typography`** — Text primitives — use these instead of raw colour tokens on `<span>`s. Includes `Typography.Text`, `Typography.SecondaryText`, `Typography.EllipsisText`, etc., with size/weight/color props. `Typography.Text` takes `font="sans" | "heading" | "body" | "mono"`; `Typography.CodeText` takes `variant="inline"` for a chip mid-sentence; `Typography.MarkdownBlock` takes `variant="flow"` for use inside `ClampText` and `normalizeSource` for machine-generated descriptions that omit blank lines between blocks.
|
|
79
80
|
|
|
80
81
|
## Data display
|
|
81
82
|
|
|
82
83
|
- **`Table`** — Data table with columns, sizing, pagination and row selection. _Key props:_ `TableColumns`, `TableSize`, `TableType`, `TableRowSelection`, `TablePaginationPosition`.
|
|
83
84
|
- **`Statistic`** — Displays a statistic value with a label; primary/secondary sizes. _Key props:_ `StatisticValueSize`.
|
|
84
85
|
- **`Avatar`** — Logo/initial avatar. Renders the image when available, otherwise a coloured tile with the first letter of `name`. Encapsulates the fallback colour. _Key props:_ `src`, `name`, `size`, `shape="square" | "circle"`.
|
|
86
|
+
- **`AppLogo`** — A connector's mark, optionally with its name and version tag. Builds on `Avatar`, so a missing or broken logo falls back to a coloured initial. The gap tightens below 18px so the mark and label still read as one unit. _Key props:_ `src`, `name`, `showName`, `size`, `nameSize`, `nameWeight`, `version`, `truncate`, `className`.
|
|
85
87
|
- **`ConnectionHeader`** — Two tilted logo tiles (from → to) showing a connection between apps. _Key props:_ `from`, `to` (`ConnectionEndpoint`: `icon`, `label`, `background`).
|
|
86
88
|
- **`CodeBlock`** — Syntax-styled code block. _Key props:_ `code`.
|
|
87
89
|
- **`Stepper`** — Progress dots/segments for a multi-step flow; optionally clickable. _Key props:_ `steps`, `active`, `onChange`.
|
package/README.md
CHANGED
|
@@ -30,6 +30,19 @@ export const Example = () => <Button variant="filled">Save</Button>;
|
|
|
30
30
|
`COMPONENTS.md`, shipped in the package, catalogs every exported component with its
|
|
31
31
|
purpose and key props. Reach for one of those before hand-rolling UI.
|
|
32
32
|
|
|
33
|
+
## Developing on this repo
|
|
34
|
+
|
|
35
|
+
Node 22 (`.nvmrc`) and pnpm 10+, which self-delegates to the version pinned in
|
|
36
|
+
`packageManager`. `corepack enable` sets one up if you have none.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm install --frozen-lockfile
|
|
40
|
+
pnpm test
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Not npm — a stray `npm install` leaves a clean `git status` and an unvalidated
|
|
44
|
+
`node_modules`. See [`CONTRIBUTING.md`](CONTRIBUTING.md) and [`CLAUDE.md`](CLAUDE.md).
|
|
45
|
+
|
|
33
46
|
## Theming
|
|
34
47
|
|
|
35
48
|
Colors come from `--malachite-*` CSS custom properties rather than being passed in as
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as On } from "react/jsx-runtime";
|
|
2
|
-
import { _ as ce, a as ue, C as rn, b as se } from "./index-
|
|
2
|
+
import { _ as ce, a as ue, C as rn, b as se } from "./index-BRH2BT_r.js";
|
|
3
3
|
import H from "react";
|
|
4
4
|
function fe(n, e) {
|
|
5
5
|
if (n == null) return {};
|
|
@@ -2751,4 +2751,4 @@ const pt = {
|
|
|
2751
2751
|
export {
|
|
2752
2752
|
vt as default
|
|
2753
2753
|
};
|
|
2754
|
-
//# sourceMappingURL=CodeBlockHighlighter-
|
|
2754
|
+
//# sourceMappingURL=CodeBlockHighlighter-BYwemPlk.js.map
|