@usableapp/cardds 0.7.92 → 0.7.93

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.
@@ -6,9 +6,11 @@ export interface StampBookProps extends ComponentProps<'div'> {
6
6
  strip?: boolean;
7
7
  /** the page with NO ground — no fill, no padding, no round: the stamps lie on what holds the book, three across, each its own size in the middle of its third. Put the name INSIDE the stamp (`Stamp name`), not under it */
8
8
  bare?: boolean;
9
+ /** the THIRD SIZE: each stamp as wide as its third (4:5), the gaps between them one `--screen-pad` both ways — three stamps and two gaps fill the row, nothing at its sides. With `bare` at 375: 103.67 × 129.58. The one place a stamp is not `--stamp-size` */
10
+ fill?: boolean;
9
11
  }
10
- /** StampBook — the album page: StampCells three across on an album ground, the free places drawn empty up to `places`. The book places its stamps and never sizes them: each is the one size of a stamp, in the middle of its third. */
11
- export declare function StampBook({ places, strip, bare, className, children, ...rest }: StampBookProps): import("react").JSX.Element;
12
+ /** StampBook — the album page: StampCells three across on an album ground, the free places drawn empty up to `places`. The book places its stamps and sizes them only with `fill`: otherwise each is the one size of a stamp, in the middle of its third. */
13
+ export declare function StampBook({ places, strip, bare, fill, className, children, ...rest }: StampBookProps): import("react").JSX.Element;
12
14
  export interface StampCellProps extends Omit<ComponentProps<'span'>, 'onClick'> {
13
15
  /** a short line under the stamp — who it is from */
14
16
  label?: ReactNode;
@@ -4,10 +4,10 @@ import { cx } from '../cx.js';
4
4
  import { pressable } from '../pressable.js';
5
5
  import { Icon } from '../type/Icon.js';
6
6
  import { StampPlace } from './Stamp.js';
7
- /** StampBook — the album page: StampCells three across on an album ground, the free places drawn empty up to `places`. The book places its stamps and never sizes them: each is the one size of a stamp, in the middle of its third. */
8
- export function StampBook({ places = 0, strip, bare, className, children, ...rest }) {
7
+ /** StampBook — the album page: StampCells three across on an album ground, the free places drawn empty up to `places`. The book places its stamps and sizes them only with `fill`: otherwise each is the one size of a stamp, in the middle of its third. */
8
+ export function StampBook({ places = 0, strip, bare, fill, className, children, ...rest }) {
9
9
  const free = Math.max(0, places - Children.toArray(children).length); // toArray drops null / undefined / booleans: `{owned && <StampCell/>}` that is false holds no place (Children.count counts it)
10
- return (_jsxs("div", { className: cx('stamp-book', strip && 'stamp-book--strip', bare && 'stamp-book--bare', className), ...rest, children: [children, Array.from({ length: free }, (_, i) => _jsx(StampPlace, { faint: true, "aria-hidden": "true" }, i))] }));
10
+ return (_jsxs("div", { className: cx('stamp-book', strip && 'stamp-book--strip', bare && 'stamp-book--bare', fill && !strip && 'stamp-book--fill', className), ...rest, children: [children, Array.from({ length: free }, (_, i) => _jsx(StampPlace, { faint: true, "aria-hidden": "true" }, i))] }));
11
11
  }
12
12
  /** StampCell — one place of a StampBook: a Stamp (the child) and a short label under it. */
13
13
  export function StampCell({ label, onClick, on, className, children, ...rest }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.7.92",
3
+ "version": "0.7.93",
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.",