@stackone/malachite 2.124.0 → 2.125.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 -5
- package/dist/components/Card.js +17 -17
- package/dist/components/Card.js.map +1 -1
- package/dist/components/HexagonScale.js +25 -10
- package/dist/components/HexagonScale.js.map +1 -1
- package/dist/components/KeyValueStrip.js +57 -41
- package/dist/components/KeyValueStrip.js.map +1 -1
- package/dist/components/PillButton.js +68 -45
- package/dist/components/PillButton.js.map +1 -1
- package/dist/components/ScoreMeter.js +79 -0
- package/dist/components/ScoreMeter.js.map +1 -0
- package/dist/components/Timeline.js +88 -77
- package/dist/components/Timeline.js.map +1 -1
- package/dist/index.d.ts +31 -2
- package/dist/index.js +293 -291
- package/dist/index.js.map +1 -1
- package/dist/tailwind.css.js +1 -1
- package/package.json +1 -1
package/COMPONENTS.md
CHANGED
|
@@ -11,7 +11,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
11
11
|
- **`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; `selected` then paints the same treatment `Table` gives `selectedRowKey`. Under `role="checkbox"` it only announces — a multi-select row carries its own checkbox, and a highlight marking one of many says nothing when most rows are checked. `selection` overrides that either way (`highlight` / `announce`). `selected="mixed"` marks a partly selected checkbox row (`aria-checked="mixed"`); it never paints or marks a row current, and counts as not selected under any other role. Use `trailing` for a control that must stay interactive — it renders outside the row button, which a nested control could not be. An `onClick` row with `trailing` is still clickable across its whole box, padding and the space around the slot included (an `href` row leaves that to its link, so a modified click still opens a new tab), with its focus ring at the row's edge; a click inside the slot (or in a menu it portals out) is the slot's own, and a disabled row drops both the click and the ring. `revealTrailing` shows that control only on hover, keyboard focus or while a menu it opened is open, keeping it in the tab order and always showing it on a touch screen. `tone="muted"` tints a row whose subject is inactive, which `disabled` does not: a muted row stays clickable. `leading` puts the row's own indicator (a presentational `Checkbox`) inside the row button ahead of the children (with `leading` or `dimmed`, pass one child; it fills the row), and `dimmed` fades the children but not `leading` or `trailing`, for a row switched off but still a click from on. _Key props:_ `divider`, `disabled`, `hover` (default on; `false` leaves the hover to something inside the row), `tone` (`default` | `muted` | `success` | `warning` | `error`; an outcome tone tints the row and recolours its text with that tag colour), `inset` (`none` | `compact` — the row owns an 8px by 16px inset, wrapping `trailing` too, so its content needs no padding wrapper), `onClick`, `href`, `target`, `rel`, `selected` (`boolean` | `"mixed"`), `selection` (`highlight` | `tint` | `announce`; `tint` paints the selected treatment without the accent bar, for a menu whose choice is already marked inside the row), `trailing`, `revealTrailing`, `leading`, `dimmed`, `role`, `className`, `style`.
|
|
12
12
|
- **`SurfaceExpandableRow`** — A row that opens to reveal a body (used as `Surface.ExpandableRow`), for a line that carries its own controls. Not `Accordion`, which puts its header inside the toggle button, so a header holding a dropdown or a second button would be invalid: here the row surface takes the click and a cell opts out by wrapping its controls in `ExpandableRow.Controls`, while the arrow stays a real button so the keyboard reaches it. That opt-out is explicit rather than sniffing the event target for an interactive ancestor, because a control rendering into a shadow root retargets the event to its host. `sticky` pins the row while its body scrolls, offset by `stickyTopOffset` for whatever is already pinned above it; it only pins while open, since a closed row has nothing to scroll past. _Key props:_ `header`, `children`, `expanded`, `onToggle`, `sticky`, `stickyTopOffset`, `divider`, `tone`, `aria-label`, `className`, `style`.
|
|
13
13
|
- **`DisclosureArrow`** — The expand/collapse triangle disclosure UI shares (`Accordion`, `Surface.ExpandableRow`). Owns its colour states so they never drift between usages: `text-primary` when expanded, `text-placeholder` otherwise, and dark on hover inside a `group` ancestor — put `group` on the clickable header or row so that hover state activates. _Key props:_ `expanded`, `size`, `className`.
|
|
14
|
-
- **`Card`** — Generic content card. `title` heads it, with dimmed `subtitle` text beside it and `extra` actions at the right of the title row. By default the title and subtitle shrink to whatever `extra` leaves them, and on a framed card are cut short with the full text in a tooltip; `wrapExtra` instead moves `extra` onto a line of its own under them, still at the right, when the title and subtitle together do not fit on one line beside it, and the header grows by that line. On a framed card `wrapExtra` also adds 6px above and below the title row, so an `extra` taller than 32px makes the header taller than 44px even when nothing wraps; use a small or medium control there. Keep text that changes width, such as a live save status, out of a wrapping `extra`, or the header jumps between one line and two as it changes. `variant="framed"` draws the detached `Table`’s frame instead: the title row sits on a grey frame and the children in a bordered section inside it, so a card above a table, such as a chart over a log list, reads as part of the same set. `tone` (`CardTone`, the same `neutral` | `warning` | `error` | `success` as `Modal`’s tray) paints a framed card’s frame in that tray colour, for a verdict card; `neutral` keeps the default grey frame. Tone is colour alone, so the title has to say the outcome. It is a type error on a default card. `dimmed`, `border`, `size`, `glassFooter` and `headerConfig` do not apply to a framed card. _Key props:_ `variant` (`CardVariant`: `default` | `framed`), `tone` (`CardTone`, framed only), `title`, `subtitle`, `extra`, `wrapExtra`, `padding`, `footer`.
|
|
14
|
+
- **`Card`** — Generic content card. `title` heads it, with dimmed `subtitle` text beside it and `extra` actions at the right of the title row. By default the title and subtitle shrink to whatever `extra` leaves them, and on a framed card are cut short with the full text in a tooltip; `wrapExtra` instead moves `extra` onto a line of its own under them, still at the right, when the title and subtitle together do not fit on one line beside it, and the header grows by that line. On a framed card `wrapExtra` also adds 6px above and below the title row, so an `extra` taller than 32px makes the header taller than 44px even when nothing wraps; use a small or medium control there. Keep text that changes width, such as a live save status, out of a wrapping `extra`, or the header jumps between one line and two as it changes. `variant="framed"` draws the detached `Table`’s frame instead: the title row sits on a grey frame and the children in a bordered section inside it, so a card above a table, such as a chart over a log list, reads as part of the same set. `tone` (`CardTone`, the same `neutral` | `warning` | `error` | `success` as `Modal`’s tray) paints a framed card’s frame in that tray colour, for a verdict card; `neutral` keeps the default grey frame. Tone is colour alone, so the title has to say the outcome. It is a type error on a default card. `dimmed`, `border`, `size`, `glassFooter` and `headerConfig` do not apply to a framed card. A framed card given no children is its title row alone, such as a question with its answer buttons in `extra`. _Key props:_ `variant` (`CardVariant`: `default` | `framed`), `tone` (`CardTone`, framed only), `title`, `subtitle`, `extra`, `wrapExtra`, `padding`, `footer`.
|
|
15
15
|
- **`LinkCard`** — A compact card that opens more about one thing elsewhere on the screen, such as another tab of a side panel: an optional icon, a title coloured by `tone`, a one-line description cut with an ellipsis, optional `trailing` content such as a level scale, and an accent “Open →”. The whole card is one button, or an anchor with `href` (an unsafe scheme such as `javascript:` is dropped); with neither `onClick` nor a safe `href` it is a static card without the action. Tone is colour alone, so the title has to say the outcome. For a resource in a new tab use `ResourceCard`; for a row in a list use `Surface.Row`. _Key props:_ `title`, `description`, `tone` (`LinkCardTone`: `neutral` | `success` | `warning` | `error`), `icon`, `trailing` (both decorative; `trailing` sits inside the control, so never interactive), `actionLabel` (default `Open`), `onClick`, `href`, `className`.
|
|
16
16
|
- **`ResourceCard`** — A card pointing at a resource elsewhere, such as an SDK’s documentation: a muted icon tile, a title, a description clamped to two lines and a link that opens in a new tab. `ResourceCard.Header` is the icon, title and description on their own, all phrasing content, so a section that opens on them, such as an `Accordion` header, can use it inside its button. _Key props:_ `icon`, `title`, `description`, `href`, `linkLabel` (default `Documentation`), `titleAs` (`h3` | `h4`), `className`. `ResourceCard.Header`: `icon`, `title`, `description`; phrasing content only, so its title is never a heading.
|
|
17
17
|
- **`SelectableCard`** — A card that is one option in a radio group — eyebrow, optional status tag, title, description, a count label and a top-right action slot. Use inside a `CardStrip`. Selection is controlled by the consumer: pass `selected`, which drives both the visual treatment and `aria-checked`. A selected card meets the sheet below the way a browser tab meets its toolbar — its bottom corners flare outward onto the strip’s rule — so its outline is one SVG path rather than borders, which would split into two lines at the tangent. `variant` picks the palette: `profile` (green), `library` (neutral) or `editing` (amber, for a profile with unsaved changes). `actions` stands in the card’s top-right corner, on the eyebrow row, and renders outside the control so a menu or icon button inside it stays clickable and keeps its own tab stop. Nothing else marks that corner: the flared outline, the tint and the green eyebrow already say which card is selected, so a radio there would only repeat them. `onDismiss` adds an x after `actions`, tinted like the eyebrow so it reads as part of the card — for discarding a draft card; `dismissDisabledReason` disables it and explains why in its tooltip. `isDefault` marks the card as the account default with a pin beside the title, named for assistive tech and tooltipped for everyone else — it belongs with the name it qualifies rather than among the actions, which read as things to press. `address` puts a one-line chip above the count for a copyable address such as a server URL: its `label` is cut short with an ellipsis, and its full `value` shows in a tooltip and is copied on click, without selecting the card. It takes the place of `description`, since the card has room for one or the other. For a row-shaped selectable use `Surface.Row` instead. _Key props:_ `value`, `title`, `titleIcon`, `isDefault`, `variant` (`profile` | `library` | `editing`), `eyebrow`, `status` (`label`, `type`, `tooltip`), `description`, `address` (`label`, `value`), `countLabel`, `actions`, `onDismiss` (`dismissLabel`, `dismissDisabledReason`), `selected`, `loading` (`loadingLabel`, `loadingHint`), `disabled`, `dimmed`, `onSelect`, `tabIndex`, `aria-label`, `className`, `style`.
|
|
@@ -108,7 +108,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
108
108
|
- **`Keycap`** — One key on a keyboard, drawn as a cap — `esc`, `⌘`, a caret, or a sigil a user types to scope a search. Renders a `<kbd>`, or a button as soon as either `onClick` or `disabled` is passed — `disabled={false}` included, since naming the prop at all is the statement that the cap is a control. `SidePanelNavFooter` is built on it.
|
|
109
109
|
- **`CollapsibleSection`** — Collapsible sunken-card section (title - subtitle header, disclosure arrow right) for stacked detail sections in side panels and detail pages. A preset over `Accordion`’s `sunken` variant.
|
|
110
110
|
- **`KeyValueList`** — Bordered card of label/value rows (`KeyValueList.Row`) for entity details: fixed-width secondary labels, free-form values, row dividers. `truncate` keeps a long value (an ID) to one line with an ellipsis at the cell width and a tooltip only when it is actually cut off — the value itself when it is text, else the row’s `tooltip` (`null` turns it off). For inline content only: a Tag or AppLogo is clipped without an ellipsis, so use its own truncate, as with `CodeText truncate`. `size="small"` tightens the rows for a list inside a dialog or panel. _Key props:_ `size` (`small` | `medium`), `label`, `truncate`, `tooltip`.
|
|
111
|
-
- **`KeyValueStrip`** — Label/value cells side by side in one sunken band, divided by rules (`KeyValueStrip.Item`), for the facts under a side panel’s header. Cells share the width equally and text values are small, in medium weight. `truncate` keeps a value to one line with an ellipsis and, for text, a tooltip only when it is cut off; with `truncate`, a given `tooltip` always shows, since it may say more than the value (a full id behind a shortened one), and `null` turns it off. `prefix` (an icon) and `suffix` (a copy button) stay whole while the value truncates. For a vertical list of rows use `KeyValueList`. _Key props:_ `aria-label`, `label`, `truncate`, `tooltip`, `prefix`, `suffix`.
|
|
111
|
+
- **`KeyValueStrip`** — Label/value cells side by side in one sunken band, divided by rules (`KeyValueStrip.Item`), for the facts under a side panel’s header. Cells share the width equally and text values are small, in medium weight. `truncate` keeps a value to one line with an ellipsis and, for text, a tooltip only when it is cut off; with `truncate`, a given `tooltip` always shows, since it may say more than the value (a full id behind a shortened one), and `null` turns it off. `prefix` (an icon) and `suffix` (a copy button) stay whole while the value truncates. `tone` (`KeyValueStripTone`: `neutral` | `success` | `warning` | `error`) puts a dot before the label in that outcome’s colour, for a strip that summarises the stages of a check; it is colour alone, so the value has to say the outcome. For a vertical list of rows use `KeyValueList`. _Key props:_ `aria-label`, `label`, `tone`, `truncate`, `tooltip`, `prefix`, `suffix`.
|
|
112
112
|
|
|
113
113
|
## Buttons & actions
|
|
114
114
|
|
|
@@ -117,7 +117,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
117
117
|
- **`SplitButton`** — One pill made of a primary action and a trailing menu trigger, sharing `Button`'s chrome: for an action with a default and a choice behind it, such as authorizing on every connected app or on one. The two segments are two real buttons, each with its own hover, active and keyboard focus, separated by a translucent seam that reads on every variant's ground; `disabled` and `loading` take both out together. The trigger shows a chevron pointing down while closed and up while `menuOpen`, which also sets `aria-expanded`, and is named by `menuLabel` since it shows no text. `trailing` sits after the label at its own size, for an `AvatarGroup` of what the action reaches. To open a `Popover` from the trigger, pass `menuTrigger`: it hands the segment to the Popover as its `trigger`, so the main segment stays a plain action rather than toggling the menu too. The menu itself is composed by the consumer from `Popover` and `Surface.Row`. _Key props:_ `variant` (every `Button` variant, default `filled`), `size` (default `medium`), `children`, `leading`, `trailing`, `onClick`, `type`, `loading`, `disabled`, `flexGrow`, `menuLabel`, `menuOpen`, `onMenuClick`, `menuIcon`, `menuHasPopup`, `menuRef`, `menuTrigger` (`(segment) => node`), `ref`, `className`, `style`.
|
|
118
118
|
- **`CloseButton`** — The bare X that dismisses a screen, panel or wizard: secondary at rest, primary on hover and keyboard focus, with no box or background at either. Use it instead of a `ghost` `Button` (which draws a hover box) or `no-style` (which has no disabled look). `surface="inverse"` is for a panel that stays dark in every theme, such as `SplitScreenLayout`’s, and reads the `closeButton` theme tokens. `loading` swaps the X for a spinner and sets `aria-busy`. Disabled and loading both use `aria-disabled` rather than `disabled`, so they ignore clicks but stay focusable and can still trigger a `Tooltip` explaining why. Named "Close" unless `aria-label` says otherwise. _Key props:_ `onClick`, `aria-label`, `size` (`small` 24px | `medium` 32px, 12px glyph), `surface` (`default` | `inverse`), `disabled`, `loading`.
|
|
119
119
|
- **`AccessPills`** — Three toggle pills, R / W / D, saying which effects an account grants (Read, Write, Delete) — on a linked-account row and in the header above the rows. Each pill is a button with `aria-pressed`, named in full by its state (`Write: some actions off`), and a tooltip on hover and focus spells that name out, since a letter alone is cryptic. On paints the effect’s tint (Read in `Tag`’s primary, Write in warning, Delete in error, the colours the dashboard already gives these effects), `"mixed"` (some, not all, of its actions on) an empty pill with a dashed border, off a neutral one. The colours come from the theme and there is no colour prop. It reports only which pill was pressed through `onToggle`: any cascade between effects (Read off turning Write and Delete off, say) and what pressing a mixed pill means belong to the caller. A pill in `disabled` stays focusable with `aria-disabled`, ignores clicks and keys, and its tooltip shows `disabledReason` instead, which is also its accessible description. `size="dense"` draws 24×20 pills in place of 26×24, for a narrow screen. _Key props:_ `value` (`{ read, write, delete }`, each `true` | `false` | `"mixed"`), `onToggle(effect)`, `disabled` (per effect), `disabledReason` (per effect, or one string), `size` (`default` | `dense`), `aria-label`, `aria-labelledby`.
|
|
120
|
-
- **`PillButton`** — Pill-shaped button, often used for filters/toggleable chips. `shape="tab"` squares the top corners so a row of them reads as attached to whatever sits above — the controls under a chat composer. Pass `href` and an interactive, non-disabled pill renders a real anchor (cmd-click, copy-link) instead of navigating from `onClick`; a disabled or `interactive={false}` pill stays static, and an unsafe scheme such as `javascript:` is dropped. `target="_blank"` always carries `noopener noreferrer`. _Key props:_ `label`, `icon`, `trailingIcon`, `selected`, `disabled`, `interactive`, `size`, `variant`, `shape` (`pill` | `tab`), `onClick`, `href`, `target`, `rel`.
|
|
120
|
+
- **`PillButton`** — Pill-shaped button, often used for filters/toggleable chips. `shape="tab"` squares the top corners so a row of them reads as attached to whatever sits above — the controls under a chat composer. Pass `href` and an interactive, non-disabled pill renders a real anchor (cmd-click, copy-link) instead of navigating from `onClick`; a disabled or `interactive={false}` pill stays static, and an unsafe scheme such as `javascript:` is dropped. `target="_blank"` always carries `noopener noreferrer`. _Key props:_ `label`, `icon`, `trailingIcon`, `selected`, `pressed` (makes a button pill a toggle: announces `aria-pressed` and paints the selected look while true, in place of `selected`; not on a link pill or the `assistant` tone), `disabled`, `interactive`, `size`, `variant`, `shape` (`pill` | `tab`), `onClick`, `href`, `target`, `rel`.
|
|
121
121
|
- **`CopyButton`** — The small copy control a copyable `Input` ends with, for a copyable value that is not an input, such as a list of scopes beside its label, so the two read the same. With `value` it copies and shows a check for a second; without, the click is the caller’s. _Key props:_ `value`, `onCopy`, `copied`, `aria-label`, `tooltip`.
|
|
122
122
|
- **`BannerButton`** — A banner that is one button: the warm ground, an icon in a white tile, a title with one line under it, and an arrow at the end that darkens on hover. For an offer of help beside a form, such as opening its setup guide, that wants more presence than a link and less than a primary button. Pass `aria-expanded` when it opens and closes something. _Key props:_ `icon`, `title`, `description`, `trailing`, `onClick`, `aria-expanded`, `aria-controls`, `aria-label`.
|
|
123
123
|
- **`Link`** — Styled anchor/link text. Opens in a new tab by default; with `renderLink`, a root-relative href goes through the app's own link component instead (href, classes, children and `onClick` when set; no `target` or `rel`), while any other href keeps the new-tab anchor. _Key props:_ `href`, `color` (`default` | `dimmed` | `inherit`; `inherit` takes the surrounding text colour, for a name in a tinted row, and thickens its underline on hover, a cue that shows on any surface and theme; it is always underlined, whatever `underline` says), `size`, `underline`, `truncate` (as a flex item, shrinks and ellipsizes the label), `onClick`, `renderLink`, `target`, `rel`.
|
|
@@ -128,11 +128,12 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
|
|
|
128
128
|
## Data display
|
|
129
129
|
|
|
130
130
|
- **`LevelMeter`** — Rising bars, shortest first, that picture how much of a scale is on — an access level in a level menu or on a level chip. Each step is `on` (a solid accent-green bar), `partial` (a green outline over a faint tint, for a step only some of whose actions are on) or `off` (an empty grey outline); every step keeps 3:1 against the surface, and colours come from the theme. Styled inline so it still draws inside an `ActionMenu`, which portals outside the shadow root and its stylesheet. Beside text that already names the level it is decorative and hidden from assistive tech; give it a `label` only when it stands alone and it reads as an image of that name. As an `ActionMenu` item `icon` or a `Button` `icon`, leave `label` off: the icon joins the item name, and the text already says the level. _Key props:_ `steps` (`LevelMeterStep[]`: `on` | `partial` | `off`), `label`, `className`.
|
|
131
|
+
- **`ScoreMeter`** — A score from 0 to 1 on a track that runs from a low end to a high end through the success, warning and error colours, such as a classifier’s confidence that a response holds a prompt injection. A ringed marker sits at the score, painted by `tone` for the outcome it led to, and an optional line marks the `threshold` where it starts to count as high; leave `threshold` out when it is not known and no line or threshold label is drawn. `lowLabel`, `highLabel` and `thresholdLabel` sit under the track and are hidden from assistive tech, which reads the `meter` by its `label` and `valueText` instead. Scores outside 0 to 1, or not a number, are clamped onto the scale. _Key props:_ `value`, `label`, `valueText`, `threshold`, `thresholdLabel`, `lowLabel`, `highLabel`, `tone` (`ScoreMeterTone`: `neutral` | `success` | `warning` | `error`; default `neutral`), `className`.
|
|
131
132
|
- **`Hexagon`** — A filled hexagon in one status tone, the mark for an outcome as a `LinkCard` `icon` and the unit of a `HexagonScale`. Tones fill from the theme: `neutral` grey (`text.dimmed`), `success` green (`text.success`), `caution` pale amber (`warning.fillMuted`), `warning` amber (`warning.fill`), `error` red (`error.background`, as `TimeBarChart` fills it). `dimmed` draws it at 20% for a step of a scale that is not the current one. Always decorative and hidden from assistive tech, so the text beside it has to name the outcome. Styled inline so it still draws outside the shadow root’s stylesheet. _Key props:_ `tone` (`HexagonTone`: `neutral` | `success` | `caution` | `warning` | `error`; default `neutral`), `size` (`HexagonSize`: `small` 16px | `medium` 18px; default `medium`), `dimmed`, `className`.
|
|
132
|
-
- **`HexagonScale`** — A row of small hexagons, one per step of an ordered scale, with the `current` step at full strength and the rest dimmed to 20%; with no `current` every step is dimmed. Built for a `LinkCard`’s `trailing` slot, where it places an outcome on a scale such as allowed → redacted → monitored → denied. Beside text that already names the step it is decorative and hidden from assistive tech; give it a `label` only when it stands alone and it reads as an image of that name. Styled inline so it still draws inside an `ActionMenu`, which portals outside the shadow root. _Key props:_ `steps` (`HexagonTone[]`, in order), `current` (index of the step drawn at full strength), `label`, `className`.
|
|
133
|
+
- **`HexagonScale`** — A row of small hexagons, one per step of an ordered scale, with the `current` step at full strength and the rest dimmed to 20%; with no `current` every step is dimmed. Built for a `LinkCard`’s `trailing` slot, where it places an outcome on a scale such as allowed → redacted → monitored → denied. Beside text that already names the step it is decorative and hidden from assistive tech; give it a `label` only when it stands alone and it reads as an image of that name. `stepLabels` names each step in a tooltip on its hexagon, and `currentNote` follows the current step’s name there, such as “High · this call”; the tooltips open on hover only, add no tab stops and need the shadow root’s stylesheet, so leave `stepLabels` off in an `ActionMenu`. Styled inline so it still draws inside an `ActionMenu`, which portals outside the shadow root. _Key props:_ `steps` (`HexagonTone[]`, in order), `current` (index of the step drawn at full strength), `label`, `stepLabels`, `currentNote`, `className`.
|
|
133
134
|
- **`TimeBarChart`** — Counts per time bucket as stacked bars on a UTC axis, the request-volume chart above a log list. Every bucket in `range` takes a slot whether or not it has data, so gaps read as gaps; a zone-less time string is read as UTC. Hover or arrow-key through buckets for a tooltip listing every series and the total; `highlightTime` shades the bucket holding a time from elsewhere on the page, such as the hovered log row. With `onRangeSelect`, dragging across bars reports the whole buckets covered, `end` exclusive so it goes straight back in as `range`, and whether the selection takes in the last bucket. `loading` dims bars already drawn rather than replacing them, and shows a spinner only when there is nothing to dim. Series colours follow the theme’s status tokens by `tone`, and failures always stack above successes whatever order `series` comes in, so position separates them where colour alone might not; a legend names them unless `legend={false}`. A visually hidden table carries the same numbers for screen readers. _Key props:_ `series` (`{ key, label, tone }[]`, stacked by tone with `error` on top; `TimeBarChartTone`: `success` | `error` | `neutral`), `buckets` (`{ start, values }[]`), `interval` (`{ unit, step }`; `TimeBarChartUnit`: `minute` | `hour` | `day` | `week` | `month`), `range` (`end` exclusive, as a selection reports it; at most 2,000 buckets, the newest kept), `TimeBarChartSize` (`small` | `medium` | `large`), `loading`, `error`, `errorTitle`, `errorSubTitle`, `valueLabel`, `legend`, `highlightTime`, `onRangeSelect`, `aria-label`, `aria-labelledby`, `className`, `style`.
|
|
134
135
|
- **`TimeBarChartSwatch`** — The mark a `TimeBarChart` draws a series in, by its `tone`, for naming the series somewhere other than the chart's legend, such as a count beside the chart standing in for it. It matches the legend and the tooltip, and the bars draw the same colour at 40%; it follows the theme with them. Decorative: the label beside it does the naming. _Key props:_ `tone` (`TimeBarChartTone`).
|
|
135
|
-
- **`Timeline`** — A vertical sequence of steps as an ordered list (`Timeline.Item`): a dot on a connecting line, a title, its timing at the right and a free-form body below, such as what happened to one API call. `titleCode` sets code after the title in the mono face as one phrase with it, such as `n8n called` then `Salesforce | Delete contact`. The dot is painted by `tone` from the theme’s text tokens (`neutral` is secondary text, the rest their status colours), or replaced by a decorative `marker` such as the caller’s logo. `icon` keeps the ring and draws a 12-14px glyph inside it in place of the dot, painted by `tone`, such as the call’s source type (MCP, API key, webhook); `skipped` beats `marker`, which beats `icon`. `stopped` puts an error badge (`stoppedLabel`, default "Stopped here") after the title of the step a flow ended on and paints its dot `error` unless a `tone` is set; the line ends at the last item. `meta` puts facts about a step in one wrapping row under its title, such as `calls` 2 and `status` 200, each label secondary and its value in the mono face, 18px apart, as a `dl`. `skipped` marks a step that never ran with a grey chevron in place of the dot; the title has to say so. For steps a person works through (complete, open, locked) use `StepList`. _Key props:_ `aria-label`, `aria-labelledby`; on `Timeline.Item`: `title`, `titleCode`, `time`, `tone` (`TimelineTone`: `neutral` | `info` | `success` | `warning` | `error`), `marker` (fills the 24px circle in place of the ringed dot), `icon` (a glyph inside the ring, painted by `tone`), `skipped`, `stopped`, `stoppedLabel`, `meta` (`TimelineMetaEntry[]`: `label`, `value`).
|
|
136
|
+
- **`Timeline`** — A vertical sequence of steps as an ordered list (`Timeline.Item`): a dot on a connecting line, a title, its timing at the right and a free-form body below, such as what happened to one API call. `titleCode` sets code after the title in the mono face as one phrase with it, such as `n8n called` then `Salesforce | Delete contact`. The dot is painted by `tone` from the theme’s text tokens (`neutral` is secondary text, the rest their status colours), or replaced by a decorative `marker` such as the caller’s logo. `icon` keeps the ring and draws a 12-14px glyph inside it in place of the dot, painted by `tone`, such as the call’s source type (MCP, API key, webhook); `skipped` beats `marker`, which beats `icon`. `stopped` puts an error badge (`stoppedLabel`, default "Stopped here") after the title of the step a flow ended on and paints its dot `error` unless a `tone` is set; the line ends at the last item. `meta` puts facts about a step in one wrapping row under its title, such as `calls` 2 and `status` 200, each label secondary and its value in the mono face, 18px apart, as a `dl`. `skipped` marks a step that never ran with a grey chevron in place of the dot; the title has to say so. For steps a person works through (complete, open, locked) use `StepList`. _Key props:_ `aria-label`, `aria-labelledby`; on `Timeline.Item`: `title`, `eyebrow` (a short label above the title naming the stage), `titleCode`, `time`, `tone` (`TimelineTone`: `neutral` | `info` | `success` | `warning` | `error`), `marker` (fills the 24px circle in place of the ringed dot), `icon` (a glyph inside the ring, painted by `tone`), `skipped`, `stopped`, `stoppedLabel`, `meta` (`TimelineMetaEntry[]`: `label`, `value`).
|
|
136
137
|
- **`Table`** — Data table with columns, sizing, pagination and row selection. `column.align` places a column's header as well as its cells. What lands on the aligned edge is the last thing in the header row rather than the title: the sort caret on a sortable column, the info icon on one carrying `info` without a sorter. `headerVariant` picks the header layout, and only `inline` lines header and body up exactly, because both are cells of one `<table>`. `detached` builds them from flex rows, where a sortable header cell is 32px narrower than a non-sortable one — its padding sits on the inner button rather than on the flex item — so its header cells sit 15–17px off their column at any alignment; reach for `inline` where exact alignment matters. Sorting is internal, so the array passed as `data` is not the order rendered once a column is sorted: `onVisibleOrderChange` reports the rows in render order — the whole of `data`, compared by `rowKey` so an equal order never re-fires — for a consumer stepping a master-detail view the way the user sees it. On the detached header, `title`, `subtitle` and `extra` add a title row on the frame above the column headers, the row a `framed` `Card` draws, and it docks with them under `stickyHeaderTop` (with `showHeader={false}` nothing docks and it scrolls with the rows). The inline header has no frame, so it draws none of the three and warns in development. _Key props:_ `TableColumns` (incl. `align`), `TableSize`, `TableType`, `TableRowSelection`, `TablePaginationPosition` (`pagination.position`, in antd naming: a pager on each edge named, aligned as named, 16px from the rows; bottom right by default), `rowDensity` (`default`; `compact`, about 30px rows; `snug`, 38px rows with 12px side padding and a tighter header), `headerVariant`, `title`, `subtitle`, `extra`, `onVisibleOrderChange`, `scrollHeight` (a height, or `"fill"` for the room left in its scroller once the content above and below it fits, so the page itself never scrolls).
|
|
137
138
|
- **`Statistic`** — Displays a statistic value with a label; primary/secondary sizes. _Key props:_ `StatisticValueSize`.
|
|
138
139
|
- **`Avatar`** — Logo/initial avatar. Renders the image when available, otherwise a coloured tile with the first letter of `name`, or with `fallback="placeholder"` the generic "no logo available" tile. Encapsulates the fallback colour. _Key props:_ `src`, `name`, `size`, `shape="square" | "circle"`, `fallback="initial" | "placeholder"`.
|
package/dist/components/Card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as B, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as G, useState as P, useEffect as h } from "react";
|
|
3
3
|
import F, { HeaderRow as M } from "./FrameHeader.js";
|
|
4
4
|
import { FRAME_CLASS as U, FRAME_SECTION_STYLE as W, frameToneBackground as Y } from "./frameStyles.js";
|
|
5
5
|
import { GLASS_SURFACE_STYLE as C } from "./glassSurface.js";
|
|
@@ -18,7 +18,7 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
18
18
|
subtitle: t,
|
|
19
19
|
extra: o,
|
|
20
20
|
wrapExtra: i = !1,
|
|
21
|
-
children:
|
|
21
|
+
children: v,
|
|
22
22
|
padding: c = "20px",
|
|
23
23
|
size: y = "default",
|
|
24
24
|
width: R,
|
|
@@ -26,8 +26,8 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
26
26
|
dimmed: H = !1,
|
|
27
27
|
direction: m,
|
|
28
28
|
align: N,
|
|
29
|
-
fullHeight:
|
|
30
|
-
border:
|
|
29
|
+
fullHeight: x = !1,
|
|
30
|
+
border: u = "base",
|
|
31
31
|
alignSelf: E,
|
|
32
32
|
height: s,
|
|
33
33
|
footer: e,
|
|
@@ -36,12 +36,12 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
36
36
|
style: w = {},
|
|
37
37
|
headerConfig: a = {}
|
|
38
38
|
}) => {
|
|
39
|
-
const p =
|
|
40
|
-
|
|
39
|
+
const p = G(null), [L, I] = P(0);
|
|
40
|
+
h(() => {
|
|
41
41
|
if (r && e && p.current) {
|
|
42
42
|
const A = new ResizeObserver(($) => {
|
|
43
|
-
for (const
|
|
44
|
-
I(
|
|
43
|
+
for (const j of $)
|
|
44
|
+
I(j.contentRect.height);
|
|
45
45
|
});
|
|
46
46
|
return A.observe(p.current), I(p.current.offsetHeight), () => A.disconnect();
|
|
47
47
|
}
|
|
@@ -49,8 +49,8 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
49
49
|
const k = [
|
|
50
50
|
"card-base",
|
|
51
51
|
H ? "card-dimmed" : "",
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
u === "rounded" ? "card-rounded" : "",
|
|
53
|
+
x ? "h-full" : "",
|
|
54
54
|
s ? "flex flex-col" : "",
|
|
55
55
|
y === "small" ? "text-sm" : "",
|
|
56
56
|
b
|
|
@@ -79,7 +79,7 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
79
79
|
width: R,
|
|
80
80
|
minWidth: S,
|
|
81
81
|
alignSelf: E,
|
|
82
|
-
...
|
|
82
|
+
...x && { height: "100%" },
|
|
83
83
|
...s && { height: s },
|
|
84
84
|
...w
|
|
85
85
|
},
|
|
@@ -93,7 +93,7 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
93
93
|
wrapExtra: i
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
/* @__PURE__ */ n(
|
|
96
|
+
v !== void 0 && /* @__PURE__ */ n(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
className: "min-h-0 flex-1",
|
|
@@ -106,7 +106,7 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
106
106
|
alignItems: N,
|
|
107
107
|
...s && { overflow: "auto" }
|
|
108
108
|
},
|
|
109
|
-
children:
|
|
109
|
+
children: v
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
112
|
e && /* @__PURE__ */ n("div", { className: "px-4 py-3", children: e })
|
|
@@ -117,7 +117,7 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
117
117
|
width: R,
|
|
118
118
|
minWidth: S,
|
|
119
119
|
alignSelf: E,
|
|
120
|
-
...
|
|
120
|
+
...x && { height: "100%" },
|
|
121
121
|
...s && { height: s, display: "flex", flexDirection: "column" },
|
|
122
122
|
...r && e && { position: "relative" },
|
|
123
123
|
overflow: "hidden",
|
|
@@ -154,7 +154,7 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
154
154
|
...D,
|
|
155
155
|
...r && e && { position: "relative" }
|
|
156
156
|
},
|
|
157
|
-
children:
|
|
157
|
+
children: v
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
160
|
e && /* @__PURE__ */ n(
|
|
@@ -168,8 +168,8 @@ const q = /^\d*\.?\d+(px|rem|em)$/, J = (f) => {
|
|
|
168
168
|
bottom: 0,
|
|
169
169
|
left: 0,
|
|
170
170
|
right: 0,
|
|
171
|
-
borderBottomLeftRadius:
|
|
172
|
-
borderBottomRightRadius:
|
|
171
|
+
borderBottomLeftRadius: u === "rounded" ? "20px" : "12px",
|
|
172
|
+
borderBottomRightRadius: u === "rounded" ? "20px" : "12px"
|
|
173
173
|
} : void 0,
|
|
174
174
|
children: e
|
|
175
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../src/components/Card.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from 'react';\nimport FrameHeader, { HeaderRow } from './FrameHeader';\nimport { FRAME_CLASS, FRAME_SECTION_STYLE, frameToneBackground } from './frameStyles';\nimport { GLASS_SURFACE_STYLE } from './glassSurface';\nimport { hasHeaderContent } from './headerContent';\nimport type { ModalTrayTone } from './modalTray';\nimport { FOREGROUND_RESET } from './selectedRow';\n\n/**\n * `framed` draws the detached Table's frame: the title row sits on a grey frame and the children\n * in a bordered section inside it, so a card above a table reads as part of the same set.\n * `dimmed`, `border`, `size`, `glassFooter` and `headerConfig` do not apply to it.\n */\nexport type CardVariant = 'default' | 'framed';\nexport type CardTone = ModalTrayTone;\n\nexport interface CardProps {\n variant?: CardVariant;\n /** Only a framed card takes a tone; see `FramedCardProps`. */\n tone?: never;\n title?: string | React.ReactNode;\n /** Dimmed text beside the title, such as a count or a unit. */\n subtitle?: React.ReactNode;\n /** Actions at the right of the title row. */\n extra?: React.ReactNode;\n /**\n * Move `extra` onto a line of its own, under the title and still at the right, when the title\n * and subtitle do not fit on one line beside it, rather than shrinking the title to fit, which\n * on a framed card cuts it short. The header grows by that line, so leave room for it in a card\n * of fixed height. On a framed card it also adds 6px above and below the title row, so an\n * `extra` taller than 32px makes the header taller than 44px; use a small or medium control.\n * Keep text that changes width, such as a live save status, out of a wrapping `extra`.\n */\n wrapExtra?: boolean;\n padding?: string;\n children?: React.ReactNode;\n size?: 'default' | 'small';\n width?: string;\n minWidth?: string;\n direction?: 'row' | 'column';\n align?: 'center';\n dimmed?: boolean;\n fullHeight?: boolean;\n border?: 'base' | 'rounded';\n alignSelf?: 'center';\n height?: string;\n footer?: React.ReactNode;\n glassFooter?: boolean;\n className?: string;\n style?: React.CSSProperties;\n headerConfig?: {\n padding?: string;\n };\n}\n\n/** A framed card, which alone takes a `tone`. A second interface so `CardProps` keeps its shape. */\nexport interface FramedCardProps extends Omit<CardProps, 'variant' | 'tone'> {\n variant: Extract<CardVariant, 'framed'>;\n /**\n * Paints the frame in the tray colour of the outcome it reports, as `Modal`'s `tray` does.\n * `neutral` keeps the default grey frame, so it still matches a detached Table.\n */\n tone?: CardTone;\n}\n\nexport type AnyCardProps = CardProps | FramedCardProps;\n\nconst PLAIN_LENGTH = /^\\d*\\.?\\d+(px|rem|em)$/;\n\n// Only plain positive lengths are copied: calc() and var() can't be split from a shorthand, and a\n// zero inset would put the title against the border, so those keep the header's own 12px.\nconst horizontalInset = (padding: string): React.CSSProperties | undefined => {\n const parts = padding.trim().split(/\\s+/);\n if (parts.length > 4 || !parts.every((part) => PLAIN_LENGTH.test(part))) {\n return undefined;\n }\n const [top, right = top, , left = right] = parts;\n return parseFloat(left) > 0 && parseFloat(right) > 0\n ? { paddingLeft: left, paddingRight: right }\n : undefined;\n};\n\nconst Card: React.FC<AnyCardProps> = ({\n variant = 'default',\n tone = 'neutral',\n title,\n subtitle,\n extra,\n wrapExtra = false,\n children,\n padding = '20px',\n size = 'default',\n width,\n minWidth,\n dimmed = false,\n direction,\n align,\n fullHeight = false,\n border = 'base',\n alignSelf,\n height,\n footer,\n glassFooter = false,\n className = '',\n style = {},\n headerConfig = {},\n}) => {\n const footerRef = useRef<HTMLDivElement>(null);\n const [footerHeight, setFooterHeight] = useState(0);\n\n useEffect(() => {\n if (glassFooter && footer && footerRef.current) {\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setFooterHeight(entry.contentRect.height);\n }\n });\n\n observer.observe(footerRef.current);\n setFooterHeight(footerRef.current.offsetHeight);\n\n return () => observer.disconnect();\n }\n }, [glassFooter, footer]);\n\n // Size-specific padding\n const sizeClasses = size === 'small' ? 'text-sm' : '';\n\n // Dynamic classes based on props\n const cardClasses = [\n 'card-base',\n dimmed ? 'card-dimmed' : '',\n border === 'rounded' ? 'card-rounded' : '',\n fullHeight ? 'h-full' : '',\n height ? 'flex flex-col' : '',\n sizeClasses,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const headerInset = headerConfig?.padding ? undefined : horizontalInset(padding);\n\n // Content styles\n const paddingValue = parseInt(padding) || 20;\n const extraPadding = 10;\n const contentStyles: React.CSSProperties = {\n padding,\n // The card clips overflow, so a long token in flowing text breaks rather than vanishing.\n // Flex and grid items keep their min-content width; those need their own wrapping.\n overflowWrap: 'break-word',\n display: direction ? 'flex' : undefined,\n flexDirection: direction,\n alignItems: align,\n ...(height && { overflow: 'auto', height: '100%' }),\n ...(glassFooter &&\n footer &&\n footerHeight > 0 && {\n paddingBottom: `${paddingValue + footerHeight + extraPadding}px`,\n }),\n };\n\n if (variant === 'framed') {\n return (\n <div\n className={`${FRAME_CLASS} flex flex-col ${className}`}\n style={{\n // The frame drops `card-base`, which carried the text colour.\n ...FOREGROUND_RESET,\n backgroundColor: frameToneBackground(tone),\n width,\n minWidth,\n alignSelf,\n ...(fullHeight && { height: '100%' }),\n ...(height && { height }),\n ...style,\n }}\n >\n {hasHeaderContent({ title, subtitle, extra }) && (\n <FrameHeader\n title={title}\n subtitle={subtitle}\n extra={extra}\n wrapExtra={wrapExtra}\n />\n )}\n <div\n className=\"min-h-0 flex-1\"\n style={{\n ...FRAME_SECTION_STYLE,\n padding,\n overflowWrap: 'break-word',\n display: direction ? 'flex' : undefined,\n flexDirection: direction,\n alignItems: align,\n ...(height && { overflow: 'auto' }),\n }}\n >\n {children}\n </div>\n {footer && <div className=\"px-4 py-3\">{footer}</div>}\n </div>\n );\n }\n\n // Card container styles\n const cardContainerStyles: React.CSSProperties = {\n width,\n minWidth,\n alignSelf,\n ...(fullHeight && { height: '100%' }),\n ...(height && { height, display: 'flex', flexDirection: 'column' }),\n ...(glassFooter && footer && { position: 'relative' }),\n overflow: 'hidden',\n ...style,\n };\n\n return (\n <div className={cardClasses} style={cardContainerStyles}>\n {/* Header */}\n {hasHeaderContent({ title, subtitle, extra }) && (\n <div\n className={headerInset ? 'card-header py-2' : 'card-header px-3 py-2'}\n style={{\n marginBottom: '1px',\n fontSize: size === 'small' ? '12px' : '13px',\n fontWeight: 'normal',\n ...(headerConfig?.padding\n ? { padding: headerConfig.padding }\n : headerInset),\n }}\n >\n <HeaderRow\n title={title}\n subtitle={subtitle}\n extra={extra}\n wrapExtra={wrapExtra}\n titleClassName=\"font-normal overflow-visible\"\n />\n </div>\n )}\n\n {/* Body */}\n <div\n className=\"flex-1\"\n style={{\n ...contentStyles,\n ...(glassFooter && footer && { position: 'relative' }),\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <div\n ref={glassFooter ? footerRef : undefined}\n className=\"card-footer px-4 py-3\"\n style={\n glassFooter\n ? {\n ...GLASS_SURFACE_STYLE,\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n borderBottomLeftRadius: border === 'rounded' ? '20px' : '12px',\n borderBottomRightRadius: border === 'rounded' ? '20px' : '12px',\n }\n : undefined\n }\n >\n {footer}\n </div>\n )}\n </div>\n );\n};\n\nexport default Card;\nexport { Card };\n"],"names":["PLAIN_LENGTH","horizontalInset","padding","parts","part","top","right","left","Card","variant","tone","title","subtitle","extra","wrapExtra","children","size","width","minWidth","dimmed","direction","align","fullHeight","border","alignSelf","height","footer","glassFooter","className","style","headerConfig","footerRef","useRef","footerHeight","setFooterHeight","useState","useEffect","observer","entries","entry","cardClasses","headerInset","paddingValue","contentStyles","jsxs","FRAME_CLASS","FOREGROUND_RESET","frameToneBackground","hasHeaderContent","jsx","FrameHeader","FRAME_SECTION_STYLE","cardContainerStyles","HeaderRow","GLASS_SURFACE_STYLE"],"mappings":";;;;;;;AAmEA,MAAMA,IAAe,0BAIfC,IAAkB,CAACC,MAAqD;AAC1E,QAAMC,IAAQD,EAAQ,KAAA,EAAO,MAAM,KAAK;AACxC,MAAIC,EAAM,SAAS,KAAK,CAACA,EAAM,MAAM,CAACC,MAASJ,EAAa,KAAKI,CAAI,CAAC;AAClE;AAEJ,QAAM,CAACC,GAAKC,IAAQD,KAAOE,IAAOD,CAAK,IAAIH;AAC3C,SAAO,WAAWI,CAAI,IAAI,KAAK,WAAWD,CAAK,IAAI,IAC7C,EAAE,aAAaC,GAAM,cAAcD,MACnC;AACV,GAEME,KAA+B,CAAC;AAAA,EAClC,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,SAAAb,IAAU;AAAA,EACV,MAAAc,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ,CAAA;AAAA,EACR,cAAAC,IAAe,CAAA;AACnB,MAAM;AACF,QAAMC,IAAYC,EAAuB,IAAI,GACvC,CAACC,GAAcC,CAAe,IAAIC,EAAS,CAAC;AAElD,EAAAC,EAAU,MAAM;AACZ,QAAIT,KAAeD,KAAUK,EAAU,S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AA,QAC9C,OAAO;AAAA,UACH,cAAc;AAAA,UACd,UAAUzB,MAAS,UAAU,SAAS;AAAA,UACtC,YAAY;AAAA,UACZ,GAAIc,KAAA,QAAAA,EAAc,UACZ,EAAE,SAASA,EAAa,YACxBW;AAAA,QAAA;AAAA,QAGV,UAAA,gBAAAQ;AAAA,UAACI;AAAA,UAAA;AAAA,YACG,OAAA1C;AAAA,YACA,UAAAC;AAAA,YACA,OAAAC;AAAA,YACA,WAAAC;AAAA,YACA,gBAAe;AAAA,UAAA;AAAA,QAAA;AAAA,MACnB;AAAA,IAAA;AAAA,IAKR,gBAAAmC;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,OAAO;AAAA,UACH,GAAGN;AAAA,UACH,GAAIhB,KAAeD,KAAU,EAAE,UAAU,WAAA;AAAA,QAAW;AAAA,QAGvD,UAAAX;AAAA,MAAA;AAAA,IAAA;AAAA,IAIJW,KACG,gBAAAuB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKtB,IAAcI,IAAY;AAAA,QAC/B,WAAU;AAAA,QACV,OACIJ,IACM;AAAA,UACI,GAAG2B;AAAA,UACH,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,MAAM;AAAA,UACN,OAAO;AAAA,UACP,wBAAwB/B,MAAW,YAAY,SAAS;AAAA,UACxD,yBAAyBA,MAAW,YAAY,SAAS;AAAA,QAAA,IAE7D;AAAA,QAGT,UAAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GAER;AAER;"}
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../src/components/Card.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from 'react';\nimport FrameHeader, { HeaderRow } from './FrameHeader';\nimport { FRAME_CLASS, FRAME_SECTION_STYLE, frameToneBackground } from './frameStyles';\nimport { GLASS_SURFACE_STYLE } from './glassSurface';\nimport { hasHeaderContent } from './headerContent';\nimport type { ModalTrayTone } from './modalTray';\nimport { FOREGROUND_RESET } from './selectedRow';\n\n/**\n * `framed` draws the detached Table's frame: the title row sits on a grey frame and the children\n * in a bordered section inside it, so a card above a table reads as part of the same set.\n * `dimmed`, `border`, `size`, `glassFooter` and `headerConfig` do not apply to it.\n */\nexport type CardVariant = 'default' | 'framed';\nexport type CardTone = ModalTrayTone;\n\nexport interface CardProps {\n variant?: CardVariant;\n /** Only a framed card takes a tone; see `FramedCardProps`. */\n tone?: never;\n title?: string | React.ReactNode;\n /** Dimmed text beside the title, such as a count or a unit. */\n subtitle?: React.ReactNode;\n /** Actions at the right of the title row. */\n extra?: React.ReactNode;\n /**\n * Move `extra` onto a line of its own, under the title and still at the right, when the title\n * and subtitle do not fit on one line beside it, rather than shrinking the title to fit, which\n * on a framed card cuts it short. The header grows by that line, so leave room for it in a card\n * of fixed height. On a framed card it also adds 6px above and below the title row, so an\n * `extra` taller than 32px makes the header taller than 44px; use a small or medium control.\n * Keep text that changes width, such as a live save status, out of a wrapping `extra`.\n */\n wrapExtra?: boolean;\n padding?: string;\n children?: React.ReactNode;\n size?: 'default' | 'small';\n width?: string;\n minWidth?: string;\n direction?: 'row' | 'column';\n align?: 'center';\n dimmed?: boolean;\n fullHeight?: boolean;\n border?: 'base' | 'rounded';\n alignSelf?: 'center';\n height?: string;\n footer?: React.ReactNode;\n glassFooter?: boolean;\n className?: string;\n style?: React.CSSProperties;\n headerConfig?: {\n padding?: string;\n };\n}\n\n/** A framed card, which alone takes a `tone`. A second interface so `CardProps` keeps its shape. */\nexport interface FramedCardProps extends Omit<CardProps, 'variant' | 'tone'> {\n variant: Extract<CardVariant, 'framed'>;\n /**\n * Paints the frame in the tray colour of the outcome it reports, as `Modal`'s `tray` does.\n * `neutral` keeps the default grey frame, so it still matches a detached Table.\n */\n tone?: CardTone;\n}\n\nexport type AnyCardProps = CardProps | FramedCardProps;\n\nconst PLAIN_LENGTH = /^\\d*\\.?\\d+(px|rem|em)$/;\n\n// Only plain positive lengths are copied: calc() and var() can't be split from a shorthand, and a\n// zero inset would put the title against the border, so those keep the header's own 12px.\nconst horizontalInset = (padding: string): React.CSSProperties | undefined => {\n const parts = padding.trim().split(/\\s+/);\n if (parts.length > 4 || !parts.every((part) => PLAIN_LENGTH.test(part))) {\n return undefined;\n }\n const [top, right = top, , left = right] = parts;\n return parseFloat(left) > 0 && parseFloat(right) > 0\n ? { paddingLeft: left, paddingRight: right }\n : undefined;\n};\n\nconst Card: React.FC<AnyCardProps> = ({\n variant = 'default',\n tone = 'neutral',\n title,\n subtitle,\n extra,\n wrapExtra = false,\n children,\n padding = '20px',\n size = 'default',\n width,\n minWidth,\n dimmed = false,\n direction,\n align,\n fullHeight = false,\n border = 'base',\n alignSelf,\n height,\n footer,\n glassFooter = false,\n className = '',\n style = {},\n headerConfig = {},\n}) => {\n const footerRef = useRef<HTMLDivElement>(null);\n const [footerHeight, setFooterHeight] = useState(0);\n\n useEffect(() => {\n if (glassFooter && footer && footerRef.current) {\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setFooterHeight(entry.contentRect.height);\n }\n });\n\n observer.observe(footerRef.current);\n setFooterHeight(footerRef.current.offsetHeight);\n\n return () => observer.disconnect();\n }\n }, [glassFooter, footer]);\n\n // Size-specific padding\n const sizeClasses = size === 'small' ? 'text-sm' : '';\n\n // Dynamic classes based on props\n const cardClasses = [\n 'card-base',\n dimmed ? 'card-dimmed' : '',\n border === 'rounded' ? 'card-rounded' : '',\n fullHeight ? 'h-full' : '',\n height ? 'flex flex-col' : '',\n sizeClasses,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const headerInset = headerConfig?.padding ? undefined : horizontalInset(padding);\n\n // Content styles\n const paddingValue = parseInt(padding) || 20;\n const extraPadding = 10;\n const contentStyles: React.CSSProperties = {\n padding,\n // The card clips overflow, so a long token in flowing text breaks rather than vanishing.\n // Flex and grid items keep their min-content width; those need their own wrapping.\n overflowWrap: 'break-word',\n display: direction ? 'flex' : undefined,\n flexDirection: direction,\n alignItems: align,\n ...(height && { overflow: 'auto', height: '100%' }),\n ...(glassFooter &&\n footer &&\n footerHeight > 0 && {\n paddingBottom: `${paddingValue + footerHeight + extraPadding}px`,\n }),\n };\n\n if (variant === 'framed') {\n return (\n <div\n className={`${FRAME_CLASS} flex flex-col ${className}`}\n style={{\n // The frame drops `card-base`, which carried the text colour.\n ...FOREGROUND_RESET,\n backgroundColor: frameToneBackground(tone),\n width,\n minWidth,\n alignSelf,\n ...(fullHeight && { height: '100%' }),\n ...(height && { height }),\n ...style,\n }}\n >\n {hasHeaderContent({ title, subtitle, extra }) && (\n <FrameHeader\n title={title}\n subtitle={subtitle}\n extra={extra}\n wrapExtra={wrapExtra}\n />\n )}\n {children !== undefined && (\n <div\n className=\"min-h-0 flex-1\"\n style={{\n ...FRAME_SECTION_STYLE,\n padding,\n overflowWrap: 'break-word',\n display: direction ? 'flex' : undefined,\n flexDirection: direction,\n alignItems: align,\n ...(height && { overflow: 'auto' }),\n }}\n >\n {children}\n </div>\n )}\n {footer && <div className=\"px-4 py-3\">{footer}</div>}\n </div>\n );\n }\n\n // Card container styles\n const cardContainerStyles: React.CSSProperties = {\n width,\n minWidth,\n alignSelf,\n ...(fullHeight && { height: '100%' }),\n ...(height && { height, display: 'flex', flexDirection: 'column' }),\n ...(glassFooter && footer && { position: 'relative' }),\n overflow: 'hidden',\n ...style,\n };\n\n return (\n <div className={cardClasses} style={cardContainerStyles}>\n {/* Header */}\n {hasHeaderContent({ title, subtitle, extra }) && (\n <div\n className={headerInset ? 'card-header py-2' : 'card-header px-3 py-2'}\n style={{\n marginBottom: '1px',\n fontSize: size === 'small' ? '12px' : '13px',\n fontWeight: 'normal',\n ...(headerConfig?.padding\n ? { padding: headerConfig.padding }\n : headerInset),\n }}\n >\n <HeaderRow\n title={title}\n subtitle={subtitle}\n extra={extra}\n wrapExtra={wrapExtra}\n titleClassName=\"font-normal overflow-visible\"\n />\n </div>\n )}\n\n {/* Body */}\n <div\n className=\"flex-1\"\n style={{\n ...contentStyles,\n ...(glassFooter && footer && { position: 'relative' }),\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <div\n ref={glassFooter ? footerRef : undefined}\n className=\"card-footer px-4 py-3\"\n style={\n glassFooter\n ? {\n ...GLASS_SURFACE_STYLE,\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n borderBottomLeftRadius: border === 'rounded' ? '20px' : '12px',\n borderBottomRightRadius: border === 'rounded' ? '20px' : '12px',\n }\n : undefined\n }\n >\n {footer}\n </div>\n )}\n </div>\n );\n};\n\nexport default Card;\nexport { Card };\n"],"names":["PLAIN_LENGTH","horizontalInset","padding","parts","part","top","right","left","Card","variant","tone","title","subtitle","extra","wrapExtra","children","size","width","minWidth","dimmed","direction","align","fullHeight","border","alignSelf","height","footer","glassFooter","className","style","headerConfig","footerRef","useRef","footerHeight","setFooterHeight","useState","useEffect","observer","entries","entry","cardClasses","headerInset","paddingValue","contentStyles","jsxs","FRAME_CLASS","FOREGROUND_RESET","frameToneBackground","hasHeaderContent","jsx","FrameHeader","FRAME_SECTION_STYLE","cardContainerStyles","HeaderRow","GLASS_SURFACE_STYLE"],"mappings":";;;;;;;AAmEA,MAAMA,IAAe,0BAIfC,IAAkB,CAACC,MAAqD;AAC1E,QAAMC,IAAQD,EAAQ,KAAA,EAAO,MAAM,KAAK;AACxC,MAAIC,EAAM,SAAS,KAAK,CAACA,EAAM,MAAM,CAACC,MAASJ,EAAa,KAAKI,CAAI,CAAC;AAClE;AAEJ,QAAM,CAACC,GAAKC,IAAQD,KAAOE,IAAOD,CAAK,IAAIH;AAC3C,SAAO,WAAWI,CAAI,IAAI,KAAK,WAAWD,CAAK,IAAI,IAC7C,EAAE,aAAaC,GAAM,cAAcD,MACnC;AACV,GAEME,KAA+B,CAAC;AAAA,EAClC,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,E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H,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,MAAM;AAAA,UACN,OAAO;AAAA,UACP,wBAAwB/B,MAAW,YAAY,SAAS;AAAA,UACxD,yBAAyBA,MAAW,YAAY,SAAS;AAAA,QAAA,IAE7D;AAAA,QAGT,UAAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GAER;AAER;"}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Hexagon as
|
|
3
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Hexagon as l } from "./Hexagon.js";
|
|
3
|
+
import f from "./Tooltip.js";
|
|
4
|
+
const p = (t, o) => {
|
|
5
|
+
const r = t == null ? void 0 : t.trim(), i = o == null ? void 0 : o.trim();
|
|
6
|
+
if (r)
|
|
7
|
+
return i ? `${r} · ${i}` : r;
|
|
8
|
+
}, v = ({
|
|
9
|
+
steps: t,
|
|
10
|
+
current: o,
|
|
11
|
+
label: r,
|
|
12
|
+
stepLabels: i,
|
|
13
|
+
currentNote: m,
|
|
14
|
+
className: d
|
|
15
|
+
}) => /* @__PURE__ */ n(
|
|
4
16
|
"span",
|
|
5
17
|
{
|
|
6
|
-
role:
|
|
7
|
-
"aria-label":
|
|
8
|
-
"aria-hidden":
|
|
9
|
-
className:
|
|
18
|
+
role: r ? "img" : void 0,
|
|
19
|
+
"aria-label": r,
|
|
20
|
+
"aria-hidden": r ? void 0 : !0,
|
|
21
|
+
className: d,
|
|
10
22
|
style: { display: "inline-flex", flexShrink: 0, alignItems: "center", gap: 2 },
|
|
11
|
-
children:
|
|
23
|
+
children: t.map((g, e) => {
|
|
24
|
+
const s = e === o, a = /* @__PURE__ */ n(l, { tone: g, size: "small", dimmed: !s }, e), c = p(i == null ? void 0 : i[e], s ? m : void 0);
|
|
25
|
+
return c ? /* @__PURE__ */ n(f, { text: c, triggerAs: "span", inline: !0, describesTrigger: !1, children: a }, e) : a;
|
|
26
|
+
})
|
|
12
27
|
}
|
|
13
28
|
);
|
|
14
29
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
v as HexagonScale,
|
|
31
|
+
v as default
|
|
17
32
|
};
|
|
18
33
|
//# sourceMappingURL=HexagonScale.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HexagonScale.js","sources":["../../src/components/HexagonScale.tsx"],"sourcesContent":["import type React from 'react';\nimport Hexagon, { type HexagonTone } from './Hexagon';\n\nexport interface HexagonScaleProps {\n /** One hexagon per step, in order. */\n steps: readonly HexagonTone[];\n /** Index of the step drawn at full strength; the rest are dimmed. Omit to dim them all. */\n current?: number;\n /** Only when it stands alone; beside text naming the step it is decorative. */\n label?: string;\n className?: string;\n}\n\n// Inline, not Tailwind: menus portal outside the shadow root's stylesheet.\nexport const HexagonScale: React.FC<HexagonScaleProps> = ({
|
|
1
|
+
{"version":3,"file":"HexagonScale.js","sources":["../../src/components/HexagonScale.tsx"],"sourcesContent":["import type React from 'react';\nimport Hexagon, { type HexagonTone } from './Hexagon';\nimport Tooltip from './Tooltip';\n\nexport interface HexagonScaleProps {\n /** One hexagon per step, in order. */\n steps: readonly HexagonTone[];\n /** Index of the step drawn at full strength; the rest are dimmed. Omit to dim them all. */\n current?: number;\n /** Only when it stands alone; beside text naming the step it is decorative. */\n label?: string;\n stepLabels?: readonly string[];\n currentNote?: string;\n className?: string;\n}\n\nconst stepName = (name: string | undefined, note: string | undefined): string | undefined => {\n const base = name?.trim();\n const extra = note?.trim();\n if (!base) {\n return undefined;\n }\n return extra ? `${base} · ${extra}` : base;\n};\n\n// Inline, not Tailwind: menus portal outside the shadow root's stylesheet.\nexport const HexagonScale: React.FC<HexagonScaleProps> = ({\n steps,\n current,\n label,\n stepLabels,\n currentNote,\n className,\n}) => (\n <span\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n className={className}\n style={{ display: 'inline-flex', flexShrink: 0, alignItems: 'center', gap: 2 }}\n >\n {steps.map((tone, index) => {\n const isCurrent = index === current;\n const hexagon = <Hexagon key={index} tone={tone} size=\"small\" dimmed={!isCurrent} />;\n const name = stepName(stepLabels?.[index], isCurrent ? currentNote : undefined);\n return name ? (\n <Tooltip key={index} text={name} triggerAs=\"span\" inline describesTrigger={false}>\n {hexagon}\n </Tooltip>\n ) : (\n hexagon\n );\n })}\n </span>\n);\n\nexport default HexagonScale;\n"],"names":["stepName","name","note","base","extra","HexagonScale","steps","current","label","stepLabels","currentNote","className","jsx","tone","index","isCurrent","hexagon","Hexagon","Tooltip"],"mappings":";;;AAgBA,MAAMA,IAAW,CAACC,GAA0BC,MAAiD;AACzF,QAAMC,IAAOF,KAAA,gBAAAA,EAAM,QACbG,IAAQF,KAAA,gBAAAA,EAAM;AACpB,MAAKC;AAGL,WAAOC,IAAQ,GAAGD,CAAI,MAAMC,CAAK,KAAKD;AAC1C,GAGaE,IAA4C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AACJ,MACI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,MAAMJ,IAAQ,QAAQ;AAAA,IACtB,cAAYA;AAAA,IACZ,eAAaA,IAAQ,SAAY;AAAA,IACjC,WAAAG;AAAA,IACA,OAAO,EAAE,SAAS,eAAe,YAAY,GAAG,YAAY,UAAU,KAAK,EAAA;AAAA,IAE1E,UAAAL,EAAM,IAAI,CAACO,GAAMC,MAAU;AACxB,YAAMC,IAAYD,MAAUP,GACtBS,sBAAWC,GAAA,EAAoB,MAAAJ,GAAY,MAAK,SAAQ,QAAQ,CAACE,EAAA,GAAzCD,CAAoD,GAC5Eb,IAAOD,EAASS,KAAA,gBAAAA,EAAaK,IAAQC,IAAYL,IAAc,MAAS;AAC9E,aAAOT,IACH,gBAAAW,EAACM,GAAA,EAAoB,MAAMjB,GAAM,WAAU,QAAO,QAAM,IAAC,kBAAkB,IACtE,UAAAe,EAAA,GADSF,CAEd,IAEAE;AAAA,IAER,CAAC;AAAA,EAAA;AACL;"}
|
|
@@ -1,66 +1,82 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import b from "./Typography/EllipsisText.js";
|
|
3
3
|
import f from "./Typography/Text.js";
|
|
4
|
-
import { textOf as
|
|
5
|
-
import { isRenderableNode as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import { textOf as h } from "./childrenText.js";
|
|
5
|
+
import { isRenderableNode as m } from "./renderableNode.js";
|
|
6
|
+
const g = {
|
|
7
|
+
neutral: "bg-[var(--malachite-text-dimmed,rgb(161,161,161))]",
|
|
8
|
+
success: "bg-[var(--malachite-text-success,rgb(2,122,66))]",
|
|
9
|
+
warning: "bg-[var(--malachite-text-warning,rgb(150,88,10))]",
|
|
10
|
+
error: "bg-[var(--malachite-text-error,rgb(237,53,54))]"
|
|
11
|
+
}, u = 0.2, v = ({
|
|
12
|
+
label: s,
|
|
13
|
+
tone: a,
|
|
14
|
+
className: t = "",
|
|
15
|
+
children: r,
|
|
16
|
+
truncate: l = !1,
|
|
17
|
+
tooltip: i,
|
|
18
|
+
prefix: n,
|
|
19
|
+
suffix: c
|
|
14
20
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
return /* @__PURE__ */
|
|
21
|
+
const d = i !== void 0, x = m(i) ? i : null, p = h(r);
|
|
22
|
+
return /* @__PURE__ */ o(
|
|
17
23
|
"div",
|
|
18
24
|
{
|
|
19
|
-
className: `flex min-w-0 flex-1 basis-0 flex-col gap-[3px] border-0 border-s border-solid border-[var(--malachite-card-border,#e8e8e8)] px-[18px] first:border-s-0 ${
|
|
25
|
+
className: `flex min-w-0 flex-1 basis-0 flex-col gap-[3px] border-0 border-s border-solid border-[var(--malachite-card-border,#e8e8e8)] px-[18px] first:border-s-0 ${t}`,
|
|
20
26
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
/* @__PURE__ */ o("dt", { className: `m-0 min-w-0 break-words ${a ? "flex items-start gap-[6px]" : ""}`, children: [
|
|
28
|
+
a && /* @__PURE__ */ e(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
"data-tone": a,
|
|
33
|
+
className: `mt-[6px] h-[6px] w-[6px] shrink-0 rounded-full ${g[a]}`
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ e(f, { size: "xsmall", color: "secondary", className: "min-w-0", children: s })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ o("dd", { className: "m-0 flex min-w-0 items-center text-[length:var(--malachite-font-size-small,13px)] leading-[1.5] font-medium text-[var(--malachite-text-primary,#0a0a0a)] [overflow-wrap:anywhere]", children: [
|
|
39
|
+
m(n) && /* @__PURE__ */ e("span", { className: "me-[8px] flex shrink-0 items-center", children: n }),
|
|
40
|
+
l ? /* @__PURE__ */ e(
|
|
41
|
+
b,
|
|
26
42
|
{
|
|
27
43
|
color: "inherit",
|
|
28
|
-
tooltip:
|
|
29
|
-
tooltipWhenTruncated: !
|
|
30
|
-
tooltipDelay:
|
|
31
|
-
focusableTrigger:
|
|
32
|
-
children:
|
|
44
|
+
tooltip: d ? x : p,
|
|
45
|
+
tooltipWhenTruncated: !d,
|
|
46
|
+
tooltipDelay: u,
|
|
47
|
+
focusableTrigger: x !== null && !!p,
|
|
48
|
+
children: r
|
|
33
49
|
}
|
|
34
|
-
) : /* @__PURE__ */ e("span", { className: "min-w-0", children:
|
|
35
|
-
|
|
50
|
+
) : /* @__PURE__ */ e("span", { className: "min-w-0", children: r }),
|
|
51
|
+
m(c) && /* @__PURE__ */ e("span", { className: "ms-[4px] flex shrink-0 items-center", children: c })
|
|
36
52
|
] })
|
|
37
53
|
]
|
|
38
54
|
}
|
|
39
55
|
);
|
|
40
|
-
},
|
|
41
|
-
className:
|
|
42
|
-
children:
|
|
43
|
-
"aria-label":
|
|
44
|
-
"aria-labelledby":
|
|
56
|
+
}, w = ({
|
|
57
|
+
className: s = "",
|
|
58
|
+
children: a,
|
|
59
|
+
"aria-label": t,
|
|
60
|
+
"aria-labelledby": r
|
|
45
61
|
}) => {
|
|
46
|
-
const
|
|
62
|
+
const l = !!(t || r);
|
|
47
63
|
return (
|
|
48
64
|
// A role on the dl would drop its term/definition semantics.
|
|
49
65
|
/* @__PURE__ */ e(
|
|
50
66
|
"div",
|
|
51
67
|
{
|
|
52
|
-
role:
|
|
53
|
-
"aria-label":
|
|
54
|
-
"aria-labelledby":
|
|
55
|
-
className: `w-full ${
|
|
56
|
-
children: /* @__PURE__ */ e("dl", { className: "m-0 flex w-full rounded-[10px] bg-[var(--malachite-table-background,#f7f7f7)] py-[11px]", children:
|
|
68
|
+
role: l ? "group" : void 0,
|
|
69
|
+
"aria-label": l && t || void 0,
|
|
70
|
+
"aria-labelledby": l && r || void 0,
|
|
71
|
+
className: `w-full ${s}`,
|
|
72
|
+
children: /* @__PURE__ */ e("dl", { className: "m-0 flex w-full rounded-[10px] bg-[var(--malachite-table-background,#f7f7f7)] py-[11px]", children: a })
|
|
57
73
|
}
|
|
58
74
|
)
|
|
59
75
|
);
|
|
60
76
|
};
|
|
61
|
-
|
|
77
|
+
w.Item = v;
|
|
62
78
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
79
|
+
w as KeyValueStrip,
|
|
80
|
+
w as default
|
|
65
81
|
};
|
|
66
82
|
//# sourceMappingURL=KeyValueStrip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueStrip.js","sources":["../../src/components/KeyValueStrip.tsx"],"sourcesContent":["import type React from 'react';\nimport EllipsisText from './Typography/EllipsisText';\nimport Text from './Typography/Text';\nimport { textOf } from './childrenText';\nimport { isRenderableNode } from './renderableNode';\n\nexport interface KeyValueStripProps {\n className?: string;\n children: React.ReactNode;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\nexport interface KeyValueStripItemProps {\n label: React.ReactNode;\n className?: string;\n children: React.ReactNode;\n /** One line with an ellipsis. Block/flex children clip without one, so use their own truncate. */\n truncate?: boolean;\n /**\n * Needs `truncate`. By default a text value shows in full when cut off; a given tooltip always\n * shows and makes a text value a tab stop. `null` turns it off.\n */\n tooltip?: React.ReactNode;\n /** Before the value, never truncated, e.g. an icon. */\n prefix?: React.ReactNode;\n /** After the value, never truncated, e.g. a copy button. */\n suffix?: React.ReactNode;\n}\n\n// Faster than Tooltip's 1s: a strip is read by hovering along it.\nconst TOOLTIP_DELAY_S = 0.2;\n\nconst Item: React.FC<KeyValueStripItemProps> = ({\n label,\n className = '',\n children,\n truncate = false,\n tooltip,\n prefix,\n suffix,\n}) => {\n const ownTooltip = tooltip !== undefined;\n const given = isRenderableNode(tooltip) ? tooltip : null;\n const text = textOf(children);\n return (\n <div\n className={`flex min-w-0 flex-1 basis-0 flex-col gap-[3px] border-0 border-s border-solid border-[var(--malachite-card-border,#e8e8e8)] px-[18px] first:border-s-0 ${className}`}\n >\n <dt className
|
|
1
|
+
{"version":3,"file":"KeyValueStrip.js","sources":["../../src/components/KeyValueStrip.tsx"],"sourcesContent":["import type React from 'react';\nimport EllipsisText from './Typography/EllipsisText';\nimport Text from './Typography/Text';\nimport { textOf } from './childrenText';\nimport { isRenderableNode } from './renderableNode';\n\nexport interface KeyValueStripProps {\n className?: string;\n children: React.ReactNode;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\nexport type KeyValueStripTone = 'neutral' | 'success' | 'warning' | 'error';\n\nexport interface KeyValueStripItemProps {\n label: React.ReactNode;\n tone?: KeyValueStripTone;\n className?: string;\n children: React.ReactNode;\n /** One line with an ellipsis. Block/flex children clip without one, so use their own truncate. */\n truncate?: boolean;\n /**\n * Needs `truncate`. By default a text value shows in full when cut off; a given tooltip always\n * shows and makes a text value a tab stop. `null` turns it off.\n */\n tooltip?: React.ReactNode;\n /** Before the value, never truncated, e.g. an icon. */\n prefix?: React.ReactNode;\n /** After the value, never truncated, e.g. a copy button. */\n suffix?: React.ReactNode;\n}\n\nconst TONE_DOT: Record<KeyValueStripTone, string> = {\n neutral: 'bg-[var(--malachite-text-dimmed,rgb(161,161,161))]',\n success: 'bg-[var(--malachite-text-success,rgb(2,122,66))]',\n warning: 'bg-[var(--malachite-text-warning,rgb(150,88,10))]',\n error: 'bg-[var(--malachite-text-error,rgb(237,53,54))]',\n};\n\n// Faster than Tooltip's 1s: a strip is read by hovering along it.\nconst TOOLTIP_DELAY_S = 0.2;\n\nconst Item: React.FC<KeyValueStripItemProps> = ({\n label,\n tone,\n className = '',\n children,\n truncate = false,\n tooltip,\n prefix,\n suffix,\n}) => {\n const ownTooltip = tooltip !== undefined;\n const given = isRenderableNode(tooltip) ? tooltip : null;\n const text = textOf(children);\n return (\n <div\n className={`flex min-w-0 flex-1 basis-0 flex-col gap-[3px] border-0 border-s border-solid border-[var(--malachite-card-border,#e8e8e8)] px-[18px] first:border-s-0 ${className}`}\n >\n <dt className={`m-0 min-w-0 break-words ${tone ? 'flex items-start gap-[6px]' : ''}`}>\n {tone && (\n <span\n aria-hidden=\"true\"\n data-tone={tone}\n className={`mt-[6px] h-[6px] w-[6px] shrink-0 rounded-full ${TONE_DOT[tone]}`}\n />\n )}\n <Text size=\"xsmall\" color=\"secondary\" className=\"min-w-0\">\n {label}\n </Text>\n </dt>\n <dd className=\"m-0 flex min-w-0 items-center text-[length:var(--malachite-font-size-small,13px)] leading-[1.5] font-medium text-[var(--malachite-text-primary,#0a0a0a)] [overflow-wrap:anywhere]\">\n {isRenderableNode(prefix) && (\n <span className=\"me-[8px] flex shrink-0 items-center\">{prefix}</span>\n )}\n {truncate ? (\n <EllipsisText\n color=\"inherit\"\n tooltip={ownTooltip ? given : text}\n tooltipWhenTruncated={!ownTooltip}\n tooltipDelay={TOOLTIP_DELAY_S}\n focusableTrigger={given !== null && !!text}\n >\n {children}\n </EllipsisText>\n ) : (\n <span className=\"min-w-0\">{children}</span>\n )}\n {isRenderableNode(suffix) && (\n <span className=\"ms-[4px] flex shrink-0 items-center\">{suffix}</span>\n )}\n </dd>\n </div>\n );\n};\n\n/**\n * Label/value cells in one sunken band, e.g. the facts under a side panel header. Not for table\n * rows: a given tooltip mounts up front.\n */\nconst KeyValueStrip: React.FC<KeyValueStripProps> & { Item: typeof Item } = ({\n className = '',\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n}) => {\n const named = !!(ariaLabel || ariaLabelledBy);\n return (\n // A role on the dl would drop its term/definition semantics.\n <div\n role={named ? 'group' : undefined}\n aria-label={named ? ariaLabel || undefined : undefined}\n aria-labelledby={named ? ariaLabelledBy || undefined : undefined}\n className={`w-full ${className}`}\n >\n <dl className=\"m-0 flex w-full rounded-[10px] bg-[var(--malachite-table-background,#f7f7f7)] py-[11px]\">\n {children}\n </dl>\n </div>\n );\n};\n\nKeyValueStrip.Item = Item;\n\nexport default KeyValueStrip;\nexport { KeyValueStrip };\n"],"names":["TONE_DOT","TOOLTIP_DELAY_S","Item","label","tone","className","children","truncate","tooltip","prefix","suffix","ownTooltip","given","isRenderableNode","text","textOf","jsxs","jsx","Text","EllipsisText","KeyValueStrip","ariaLabel","ariaLabelledBy","named"],"mappings":";;;;;AAiCA,MAAMA,IAA8C;AAAA,EAChD,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACX,GAGMC,IAAkB,KAElBC,IAAyC,CAAC;AAAA,EAC5C,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AACJ,MAAM;AACF,QAAM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