@usableapp/cardds 0.7.111 → 0.7.113

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.
@@ -16,4 +16,4 @@ export interface JourneyBadgeProps extends ComponentProps<'span'> {
16
16
  stretch?: boolean;
17
17
  }
18
18
  /** JourneyBadge — a tiny label over a big value: gate, seat, date, rating. `stretch`: a date in a head that takes its form from the title's height, no taller than its own three lines. */
19
- export declare function JourneyBadge({ label, value, sub, plain, corner, stretch, className, ...rest }: JourneyBadgeProps): import("react").JSX.Element;
19
+ export declare function JourneyBadge({ label, value, sub, plain, corner, stretch, className, style, ...rest }: JourneyBadgeProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from '../cx.js';
3
3
  /** JourneyBadge — a tiny label over a big value: gate, seat, date, rating. `stretch`: a date in a head that takes its form from the title's height, no taller than its own three lines. */
4
- export function JourneyBadge({ label, value, sub, plain, corner, stretch, className, ...rest }) {
5
- return (_jsxs("span", { className: cx('tile-badge', plain && 'tile-badge--plain', corner && 'tile-badge--corner', stretch && 'tile-badge--stretch', className), ...rest, children: [_jsx("span", { className: "tile-badge__label", children: label }), _jsx("span", { className: "tile-badge__value", children: value }), sub != null && _jsx("span", { className: "tile-badge__label", children: sub })] }));
4
+ export function JourneyBadge({ label, value, sub, plain, corner, stretch, className, style, ...rest }) {
5
+ const chars = typeof value === 'string' ? value.length + (typeof sub === 'string' ? sub.length / 2 : 0) : 0; // shortcut: words that are not plain strings fall back to the knob
6
+ return (_jsxs("span", { className: cx('tile-badge', plain && 'tile-badge--plain', corner && 'tile-badge--corner', stretch && 'tile-badge--stretch', className), style: stretch && chars ? { '--_badge-chars': chars, ...style } : style, ...rest, children: [_jsx("span", { className: "tile-badge__label", children: label }), _jsx("span", { className: "tile-badge__value", children: value }), sub != null && _jsx("span", { className: "tile-badge__label", children: sub })] }));
6
7
  }
@@ -19,7 +19,10 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
19
19
  /** the member may select and copy these words (a code, an address, a reference number) — everything else in a Screen is not
20
20
  * selectable, like a native app (Lh 2026-09-25) */
21
21
  selectable?: boolean;
22
- /** body only: the words show `--text-scroll-lines` lines (knob, default 3) in a plain box with no border, and the rest scrolls inside the box — a long reason in a card. A scroll never turns a turning card */
22
+ /** body only: the words show `--text-scroll-lines` lines (knob, default 3.5 — the half line shows there is more, Lh 2026-10-24) in a plain box with no
23
+ * border, and the rest scrolls inside the box — a long reason in a card. The box counts in the text's own lines, so a bigger text size keeps 3.5 lines.
24
+ * A scroll never turns a turning card. `--text-scroll-size` (knob, a length) makes the box ALWAYS that tall: a short text keeps the room, a long one
25
+ * scrolls in it; `3.5lh` keeps 3.5 lines at every text size */
23
26
  scroll?: boolean;
24
27
  /** the element; defaults per level (h2 for display/h1/h2, p for title/body/stat, span for the rest) */
25
28
  as?: 'h1' | 'h2' | 'h3' | 'p' | 'span' | 'strong' | 'div';
package/docs/reference.md CHANGED
@@ -746,7 +746,8 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
746
746
  at 375 a stamp is 103.67 × 129.58. A `false` or `null` child holds no place.
747
747
  - A stamp stands for a person in three more places. In a `Centre` — a `Stamp` or a `StampPlace` — it stands in the
748
748
  middle and the words and link under it centre. In a card's head — `<Card foot={<Btn primary block>…</Btn>}><Head><Words title={name} meta={greeting} /><Stamp bare …/></Head></Card>` — the words stand at the left and the stamp at the right,
749
- beside both lines; the card's one button presses it whole. In an `AvatarStack` it is a head, the small size
749
+ beside both lines; in a head that leads with a date (a `JourneyBadge`, then a `ChipRow`) it stands on a row of its own under the
750
+ date and the chips, in the order given. The card's one button presses it whole. In an `AvatarStack` it is a head, the small size
750
751
  (`more="+9"` for the count).
751
752
  - **`StampOn`** — a stamp stuck on a surface. `at` is the stamp's middle as a share of the surface (`{ x, y }`, 0 to 1),
752
753
  `turn` its angle in degrees. With `onAtChange` the member drags it (the arrow keys move it too) and it asks with the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.7.111",
3
+ "version": "0.7.113",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "description": "card-first mobile design system, React-first: the components in src/ are thin wrappers over the CSS contract (css/*.css stays the only truth); gallery/ shows every story live (npm run dev), tests/ measures the geometry.",