@usableapp/cardds 0.7.118 → 0.7.119
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 +18 -0
- package/css/base.css +3 -0
- package/css/lists.css +1 -0
- package/css/parts.css +28 -2
- package/css/stamp.css +4 -0
- package/css/theme.template.css +1 -1
- package/css/tokens.css +3 -1
- package/dist/actions/Link.d.ts +3 -1
- package/dist/actions/Link.js +2 -2
- package/dist/cardds.css +39 -3
- 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
|
+
/** 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
|
+
under?: boolean;
|
|
16
18
|
/** turned a little on its middle — the one stamp a start screen hands over */
|
|
17
19
|
tilt?: 'left' | 'right';
|
|
18
20
|
/** the whole stamp is a button: it renders a `<button>` */
|
|
@@ -31,7 +33,7 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
|
|
|
31
33
|
* 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);
|
|
32
34
|
* 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.
|
|
33
35
|
*/
|
|
34
|
-
export declare function Stamp({ pictures, tone, name, words, bare, xs, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
|
|
36
|
+
export declare function Stamp({ pictures, tone, name, words, bare, xs, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
|
|
35
37
|
export interface StampPlaceProps extends Omit<ComponentProps<'span'>, 'onClick'> {
|
|
36
38
|
/** a gap nobody is asked to fill: a paler edge (an album's free places) */
|
|
37
39
|
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, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
|
|
14
|
+
export function Stamp({ pictures, tone = 'custard', name, words, bare, xs, 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', 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', 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 })] }))] }) }) }));
|
|
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
|
@@ -826,7 +826,8 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
|
|
|
826
826
|
at 375 a stamp is 103.67 × 129.58. A `false` or `null` child holds no place.
|
|
827
827
|
- A stamp stands for a person in three more places. In a `Centre` — a `Stamp` or a `StampPlace` — it stands in the
|
|
828
828
|
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,
|
|
829
|
-
beside both lines
|
|
829
|
+
beside both lines (`Stamp under`: the words keep no room for it, they run the head's whole width over the stamp, which lies under them in
|
|
830
|
+
its place and size — for a long title); in a head that leads with a date (a `JourneyBadge`, then a `ChipRow`) it stands on a row of its own under the
|
|
830
831
|
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
|
|
831
832
|
(`more="+9"` for the count).
|
|
832
833
|
- **`StampOn`** — a stamp stuck on a surface. `at` is the stamp's middle as a share of the surface (`{ x, y }`, 0 to 1),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.119",
|
|
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.",
|