@usableapp/cardds 0.7.122 → 0.7.123
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/CHANGELOG.md +9 -0
- package/css/stamp.css +2 -0
- package/dist/cardds.css +2 -0
- package/dist/catalog.json +1 -1
- package/dist/stamp/Stamp.d.ts +3 -1
- package/dist/stamp/Stamp.js +2 -2
- package/docs/reference.md +2 -1
- package/package.json +1 -1
package/dist/stamp/Stamp.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
|
|
|
13
13
|
bare?: boolean;
|
|
14
14
|
/** the inline size: a stamp beside a status line's words (a card's `Foot`: the stamp, "X took it", a round button), one `Chip xs` tall (`--stamp-xs-size`). Always bare and flat (no shadow). Several, lapped with a "+8": `AvatarStack more` */
|
|
15
15
|
xs?: boolean;
|
|
16
|
+
/** kept back: the stamp keeps its box and draws nothing, hidden from screen readers too — until the app is ready to show it; when this turns false it appears in the same box, so nothing beside it moves */
|
|
17
|
+
held?: boolean;
|
|
16
18
|
/** in a `Head`: the words keep no room for the stamp — they run the head's whole width and lie OVER it, the stamp in its place and size at the right under them (a long title that would wrap in the column beside it). Never hides a word */
|
|
17
19
|
under?: boolean;
|
|
18
20
|
/** turned a little on its middle — the one stamp a start screen hands over */
|
|
@@ -33,7 +35,7 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
|
|
|
33
35
|
* the app it has landed, so it sends. The strike scales it down from twice its size, so it never moves the layout (it may cover its neighbours for a moment);
|
|
34
36
|
* a `tilt` is kept, the stamp ends at its turn. Afterwards the same stamp stands in the same place with no strike: drop `arrive` or keep it, nothing is struck twice.
|
|
35
37
|
*/
|
|
36
|
-
export declare function Stamp({ pictures, tone, name, words, bare, xs, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
|
|
38
|
+
export declare function Stamp({ pictures, tone, name, words, bare, xs, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
|
|
37
39
|
export interface StampPlaceProps extends Omit<ComponentProps<'span'>, 'onClick'> {
|
|
38
40
|
/** a gap nobody is asked to fill: a paler edge (an album's free places) */
|
|
39
41
|
faint?: boolean;
|
package/dist/stamp/Stamp.js
CHANGED
|
@@ -11,11 +11,11 @@ import { useStrike } from './useStrike.js';
|
|
|
11
11
|
* the app it has landed, so it sends. The strike scales it down from twice its size, so it never moves the layout (it may cover its neighbours for a moment);
|
|
12
12
|
* a `tilt` is kept, the stamp ends at its turn. Afterwards the same stamp stands in the same place with no strike: drop `arrive` or keep it, nothing is struck twice.
|
|
13
13
|
*/
|
|
14
|
-
export function Stamp({ pictures, tone = 'custard', name, words, bare, xs, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
|
|
14
|
+
export function Stamp({ pictures, tone = 'custard', name, words, bare, xs, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
|
|
15
15
|
const shown = pictures.slice(0, 4);
|
|
16
16
|
const { struck } = useStrike(arrive, onArrived, onAnimationEnd);
|
|
17
17
|
const { tap, Box, boxProps } = pressable(onClick, 'span', rest);
|
|
18
|
-
return (_jsx(Box, { className: cx('stamp', `stamp--${shown.length}`, bare && 'stamp--bare', xs && 'stamp--xs', under && 'stamp--under', tilt && `stamp--tilt-${tilt}`, tap && 'stamp--tap', arrive && 'stamp--arrive', className), onAnimationEnd: struck, ...boxProps, children: _jsx("span", { className: "stamp__paper", children: _jsxs("span", { className: cx('stamp__pic', `sticky--${tone}`), children: [shown.map((picture, i) => _jsx("span", { className: "stamp__art", "aria-hidden": "true", children: picture }, i)), (name != null || words != null) && (_jsxs("span", { className: "stamp__cap", children: [words != null && _jsx("span", { className: "stamp__words", children: words }), name != null && _jsx("span", { className: "stamp__name", children: name })] }))] }) }) }));
|
|
18
|
+
return (_jsx(Box, { className: cx('stamp', `stamp--${shown.length}`, bare && 'stamp--bare', xs && 'stamp--xs', held && 'stamp--held', under && 'stamp--under', tilt && `stamp--tilt-${tilt}`, tap && 'stamp--tap', arrive && 'stamp--arrive', className), onAnimationEnd: struck, "aria-hidden": held || undefined, ...boxProps, children: _jsx("span", { className: "stamp__paper", children: _jsxs("span", { className: cx('stamp__pic', `sticky--${tone}`), children: [shown.map((picture, i) => _jsx("span", { className: "stamp__art", "aria-hidden": "true", children: picture }, i)), (name != null || words != null) && (_jsxs("span", { className: "stamp__cap", children: [words != null && _jsx("span", { className: "stamp__words", children: words }), name != null && _jsx("span", { className: "stamp__name", children: name })] }))] }) }) }));
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* StampPlace — an empty place for a stamp: a 4:5 frame of round dots the size a Stamp is (`--stamp-size`), a word or an Icon inside.
|
package/docs/reference.md
CHANGED
|
@@ -812,7 +812,8 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
|
|
|
812
812
|
stamp in an `AvatarStack` are `--stamp-sm-size` wide (one tap: 48 × 60), on any surface and in any row. And the inline
|
|
813
813
|
one: `Stamp xs` stands beside a status line's words (a card's `Foot`: the stamp, "X took it", a round button), one
|
|
814
814
|
`Chip xs` tall, `--stamp-xs-size` (18.7 × 23.4, on `--fs-base`); always bare, no shadow, its teeth fewer and larger.
|
|
815
|
-
Several lap in an `AvatarStack` with `more` ("+8"), the count then at the chip's scale.
|
|
815
|
+
Several lap in an `AvatarStack` with `more` ("+8"), the count then at the chip's scale. A stamp the app is not ready to show yet is `held`: it keeps its box, draws nothing,
|
|
816
|
+
is hidden from screen readers, and appears in the same box when `held` turns false, so nothing beside it moves (any size). The stamps in
|
|
816
817
|
a `PostDesk`'s tray are the standard size. One exception, by the owner's decision: the stamp at a postcard's corner is
|
|
817
818
|
the postcard's own size, 72 × 90 (`--post-corner-stamp-w`), in neither. `words` is not drawn on a stamp 96 wide or
|
|
818
819
|
narrower, so at the standard size only `name` shows, and it is larger.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.123",
|
|
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.",
|