@usableapp/cardds 0.1.3 → 0.1.5
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/README.md +43 -40
- package/cardds.js +47 -10
- package/css/layover.css +67 -22
- package/css/sheet.css +10 -4
- package/css/step.css +14 -5
- package/css/tokens.css +1 -0
- package/dist/actions/Btn.js +1 -1
- package/dist/actions/BtnRow.js +1 -1
- package/dist/actions/Chip.js +2 -2
- package/dist/actions/Dot.js +1 -1
- package/dist/actions/Dropdown.d.ts +1 -1
- package/dist/actions/Dropdown.js +2 -2
- package/dist/actions/Fab.d.ts +1 -1
- package/dist/actions/Fab.js +2 -2
- package/dist/actions/IconBtn.d.ts +1 -1
- package/dist/actions/IconBtn.js +3 -3
- package/dist/actions/Link.d.ts +1 -1
- package/dist/actions/Link.js +2 -2
- package/dist/actions/Segment.js +1 -1
- package/dist/cardds.css +92 -31
- package/dist/cards/Card.js +1 -1
- package/dist/cards/CardFoot.js +1 -1
- package/dist/cards/CardHead.js +1 -1
- package/dist/cards/CardParts.js +1 -1
- package/dist/cards/Placeholder.js +1 -1
- package/dist/cards/Stat.js +1 -1
- package/dist/choice/Calendar.js +2 -2
- package/dist/choice/Check.js +1 -1
- package/dist/choice/DayStrip.js +1 -1
- package/dist/choice/Mood.js +1 -1
- package/dist/choice/Slider.js +1 -1
- package/dist/forms/AddRow.js +2 -2
- package/dist/forms/Composer.js +1 -1
- package/dist/forms/Field.d.ts +1 -1
- package/dist/forms/Field.js +2 -2
- package/dist/forms/FileBtn.js +1 -1
- package/dist/forms/Pin.js +1 -1
- package/dist/index.d.ts +71 -71
- package/dist/index.js +71 -71
- package/dist/journey/NoteRow.d.ts +1 -1
- package/dist/journey/NoteRow.js +2 -2
- package/dist/journey/Route.d.ts +1 -1
- package/dist/journey/Route.js +2 -2
- package/dist/journey/TileBadge.js +1 -1
- package/dist/layover/Banner.js +1 -1
- package/dist/layover/Callout.js +1 -1
- package/dist/layover/Deck.js +1 -1
- package/dist/lists/Kv.d.ts +1 -1
- package/dist/lists/Kv.js +2 -2
- package/dist/lists/Legend.js +2 -2
- package/dist/lists/Row.d.ts +1 -1
- package/dist/lists/Row.js +2 -2
- package/dist/lists/Timeline.js +1 -1
- package/dist/media/MapArea.js +1 -1
- package/dist/media/Mosaic.js +1 -1
- package/dist/media/Postcard.js +1 -1
- package/dist/media/Quote.js +1 -1
- package/dist/media/Tile.d.ts +1 -1
- package/dist/media/Tile.js +2 -2
- package/dist/numbers/Badge.js +1 -1
- package/dist/numbers/Band.js +1 -1
- package/dist/numbers/Bars.js +1 -1
- package/dist/numbers/DotGrid.js +1 -1
- package/dist/numbers/Picker.js +1 -1
- package/dist/numbers/Ring.js +1 -1
- package/dist/numbers/Track.js +1 -1
- package/dist/people/Avatar.d.ts +1 -1
- package/dist/people/Avatar.js +2 -2
- package/dist/people/AvatarPick.js +1 -1
- package/dist/scaffold/ActionBar.js +1 -1
- package/dist/scaffold/AppBar.js +1 -1
- package/dist/scaffold/Centre.js +1 -1
- package/dist/scaffold/EmptyState.js +1 -1
- package/dist/scaffold/FilterRow.js +1 -1
- package/dist/scaffold/FloatBar.js +1 -1
- package/dist/scaffold/PagerAt.js +1 -1
- package/dist/scaffold/Screen.js +1 -1
- package/dist/scaffold/Section.js +1 -1
- package/dist/scaffold/TopBar.js +1 -1
- package/dist/sheets/CardBack.js +2 -2
- package/dist/sheets/Drawer.d.ts +7 -3
- package/dist/sheets/Drawer.js +9 -5
- package/dist/sheets/Sheet.d.ts +3 -3
- package/dist/sheets/Sheet.js +1 -1
- package/dist/sheets/SheetBody.js +1 -1
- package/dist/sheets/SheetHead.js +1 -1
- package/dist/sheets/SheetStack.js +1 -1
- package/dist/sheets/SheetStage.d.ts +1 -1
- package/dist/sheets/SheetStage.js +1 -1
- package/dist/sheets/Step.d.ts +3 -4
- package/dist/sheets/Step.js +5 -5
- package/dist/type/Icon.d.ts +1 -1
- package/dist/type/Icon.js +2 -2
- package/dist/type/Text.js +1 -1
- package/package.json +3 -5
package/dist/cardds.css
CHANGED
|
@@ -217,6 +217,7 @@
|
|
|
217
217
|
============================================================ */
|
|
218
218
|
@property --sheet-peek { syntax: "<length>"; inherits: true; initial-value: 0px; }
|
|
219
219
|
@property --sheet-half { syntax: "<number>"; inherits: true; initial-value: 0.5; }
|
|
220
|
+
@property --sheet-3q { syntax: "<number>"; inherits: true; initial-value: 0.25; }
|
|
220
221
|
|
|
221
222
|
/* ---- css/palette.css — color settings — the file you tune ---- */
|
|
222
223
|
/* ============================================================
|
|
@@ -1020,15 +1021,15 @@ button { font: inherit; cursor: pointer; }
|
|
|
1020
1021
|
/* ---- css/sheet.css — sheet single: .sheet — one card as a bottom sheet, peek / half / full ---- */
|
|
1021
1022
|
/* ============================================================
|
|
1022
1023
|
cardds/sheet.css — sheet single: one card as a bottom sheet.
|
|
1023
|
-
|
|
1024
|
+
Four states: .sheet--peek · .sheet--half · .sheet--3q · .sheet--full
|
|
1024
1025
|
|
|
1025
1026
|
A sheet is rigid material, exactly like a sheet in .sheet-stack--tap
|
|
1026
1027
|
(stack.css): it is ALWAYS the full height of the box that holds it —
|
|
1027
1028
|
set once by inset: 0, never written again, never transitioned — and
|
|
1028
1029
|
a state is nothing but how far that full card has slid up. Peek is
|
|
1029
1030
|
a full sheet that slid down until only its handle and title show;
|
|
1030
|
-
half is one that slid down by half of itself;
|
|
1031
|
-
not slid at all. The box clips whatever slid below its bottom edge,
|
|
1031
|
+
half is one that slid down by half of itself; 3q (three quarters,
|
|
1032
|
+
Lh 2026-09-16) by a quarter; full is one that has not slid at all. The box clips whatever slid below its bottom edge,
|
|
1032
1033
|
so a sheet at any height is still a card: rounded top, a straight
|
|
1033
1034
|
cut at the box's edge, its content scrolling inside.
|
|
1034
1035
|
|
|
@@ -1048,7 +1049,11 @@ button { font: inherit; cursor: pointer; }
|
|
|
1048
1049
|
page. Many sheets stacked as the app's menu are the other system,
|
|
1049
1050
|
.sheet-stack (stack.css): the same material, its own class and file.
|
|
1050
1051
|
|
|
1051
|
-
<article class="card sheet sheet--half" data-sheet-states="peek half full">
|
|
1052
|
+
<article class="card sheet sheet--half" data-sheet-states="peek half 3q full">
|
|
1053
|
+
A tap on the handle TOGGLES the sheet between its own state and peek
|
|
1054
|
+
(Lh 2026-09-16) — never a step-by-step climb; a drag snaps to any of
|
|
1055
|
+
the listed states, and the state it lands on becomes the one a tap
|
|
1056
|
+
returns to.
|
|
1052
1057
|
<button class="sheet__handle" type="button" aria-label="…"></button>
|
|
1053
1058
|
<div class="card__head"><h2 class="t-h2">…</h2>…</div>
|
|
1054
1059
|
<div class="sheet__body">…controls, or small content cards…</div>
|
|
@@ -1071,6 +1076,7 @@ button { font: inherit; cursor: pointer; }
|
|
|
1071
1076
|
retune it: .my-sheet { --sheet-peek: … } */
|
|
1072
1077
|
--sheet-peek: calc(var(--card-pad) + var(--_handle) + 2 * var(--card-gap) + var(--tap));
|
|
1073
1078
|
--sheet-half: 0.5; /* a share of the sheet's own height */
|
|
1079
|
+
--sheet-3q: 0.25; /* three quarters showing: slid by a quarter */
|
|
1074
1080
|
/* the sheet's own height, seen from inside it: the box it slides in is the
|
|
1075
1081
|
size container (.step, .sheet-stage), so 100cqh is that box, less what
|
|
1076
1082
|
the sheet gives up at its top (--_top) and bottom (--_lift). The sheet
|
|
@@ -1101,6 +1107,7 @@ button { font: inherit; cursor: pointer; }
|
|
|
1101
1107
|
}
|
|
1102
1108
|
.sheet--full { --_y: 0%; --_cover: 0rem; }
|
|
1103
1109
|
.sheet--half { --_y: calc(var(--sheet-half) * 100%); --_cover: calc(var(--sheet-half) * var(--_box)); }
|
|
1110
|
+
.sheet--3q { --_y: calc(var(--sheet-3q) * 100%); --_cover: calc(var(--sheet-3q) * var(--_box)); }
|
|
1104
1111
|
.sheet--peek { --_y: calc(100% - var(--sheet-peek)); --_cover: calc(var(--_box) - var(--sheet-peek)); }
|
|
1105
1112
|
.sheet.is-dragging { transition: none; } /* follows the finger; the snap gets the ease back */
|
|
1106
1113
|
|
|
@@ -1317,12 +1324,12 @@ button { font: inherit; cursor: pointer; }
|
|
|
1317
1324
|
/* ---- css/step.css — .step: one screen, one task — card, optional sheet, bar outside ---- */
|
|
1318
1325
|
/* ============================================================
|
|
1319
1326
|
cardds/step.css — .step: one screen, one task.
|
|
1320
|
-
What the member reads (a card), what the member does when the
|
|
1327
|
+
What the member reads (words on the base — not a card, Lh 2026-09-16), what the member does when the
|
|
1321
1328
|
step asks for it (a sheet, sheet.css), and the screen's one
|
|
1322
1329
|
move (.action-bar, actions.css) OUTSIDE the step, below it.
|
|
1323
1330
|
|
|
1324
1331
|
<section class="step">
|
|
1325
|
-
<article class="
|
|
1332
|
+
<article class="step__card">…the words…</article> ← first
|
|
1326
1333
|
<article class="card sheet sheet--half">…the controls…</article> ← last, optional
|
|
1327
1334
|
</section>
|
|
1328
1335
|
<div class="action-bar">…</div>
|
|
@@ -1376,10 +1383,19 @@ button { font: inherit; cursor: pointer; }
|
|
|
1376
1383
|
frame — the bar is fixed to the viewport wherever it sits. */
|
|
1377
1384
|
:has(> .action-bar) .step { margin-bottom: calc(var(--bar-reserve) + var(--kb, 0rem)); }
|
|
1378
1385
|
|
|
1379
|
-
/* the reading
|
|
1380
|
-
|
|
1381
|
-
|
|
1386
|
+
/* the reading block: the words on the base — no frame, no area colour (it was
|
|
1387
|
+
a .card until 2026-09-16; Lh: a step reads like a page, not a card in a
|
|
1388
|
+
page). It keeps a card's inner rhythm (a head, --card-gap between things,
|
|
1389
|
+
the tokens .card publishes for the head and .bleed) and the flex rule: it
|
|
1390
|
+
hugs its content, and when the column runs out (a short phone, large text)
|
|
1391
|
+
it shrinks and scrolls inside itself instead of pushing the bar or the sheet */
|
|
1382
1392
|
.step__card {
|
|
1393
|
+
--card-pad: 0rem; /* published for .bleed: nothing to cancel */
|
|
1394
|
+
--card-gap: var(--sp-4);
|
|
1395
|
+
display: grid;
|
|
1396
|
+
gap: var(--card-gap);
|
|
1397
|
+
align-content: start;
|
|
1398
|
+
color: var(--on-surface);
|
|
1383
1399
|
flex: 0 1 auto;
|
|
1384
1400
|
min-height: 0;
|
|
1385
1401
|
margin: var(--_lead, 0) var(--screen-pad) 0; /* the screen's gap, moved in here from above the step; the inset, taken back from the bleed */
|
|
@@ -2834,49 +2850,94 @@ button { font: inherit; cursor: pointer; }
|
|
|
2834
2850
|
/* ---- css/layover.css — ask drawer, popover menu, banner, float bar, callout, deck ---- */
|
|
2835
2851
|
/* ============================================================
|
|
2836
2852
|
cardds/layover.css — cards that lay OVER other content:
|
|
2837
|
-
ask
|
|
2853
|
+
Modal (ask) · popover menu · expanding banner · float bar ·
|
|
2838
2854
|
callout · swipe deck. The sheet (peek / half / full / page)
|
|
2839
2855
|
lives in sheet.css; these compose with .sheet-stage.
|
|
2840
2856
|
============================================================ */
|
|
2841
2857
|
|
|
2842
|
-
/* ---- ask
|
|
2858
|
+
/* ---- ask: the Modal — the case drops in, its drawer opens below (Lh 2026-09-16: ONE card, two parts)
|
|
2843
2859
|
<div class="sheet-stage sheet-stage--ask">
|
|
2844
|
-
<article class="card
|
|
2845
|
-
|
|
2846
|
-
<div class="
|
|
2847
|
-
|
|
2860
|
+
<article class="card modal">
|
|
2861
|
+
<div class="modal__lift">…the card's content (a head, rows, a timeline)…</div>
|
|
2862
|
+
<div class="modal__drawer"><h2 class="t-h2">Take the case?</h2><p class="t-caption">This cannot be undone.</p>
|
|
2863
|
+
<div class="btn-trio">…</div>
|
|
2864
|
+
</div>
|
|
2865
|
+
</article>
|
|
2866
|
+
</div>
|
|
2867
|
+
.modal is the card — no border (the shadow is its edge on the scrim);
|
|
2868
|
+
.modal__lift the light part that holds the thing being asked about (it
|
|
2869
|
+
scrolls when tall); .modal__drawer the dark end that asks. The ground is
|
|
2870
|
+
the page under a scrim (like --dim). Two beats (2 × --motion-sheet) when
|
|
2871
|
+
the stage appears, and the same two backwards when it closes:
|
|
2872
|
+
1. the card drops in from above the stage to the screen's centre — its
|
|
2873
|
+
drawer still inside it, height 0: nothing of the ask shows yet
|
|
2874
|
+
2. the drawer comes out of the card's bottom edge while the lift moves
|
|
2875
|
+
up, both at once: the card grows from its centre, which never moves
|
|
2876
|
+
(the stage centres it; a growing card keeps its middle where it is)
|
|
2877
|
+
Closing: a click on any button in the drawer plays the same animations in
|
|
2878
|
+
reverse (cardds.js: Animation.reverse() on each — nothing duplicated), then
|
|
2879
|
+
fires "cardds:modal" on the .sheet-stage (bubbles, detail.answer from the
|
|
2880
|
+
button's data-answer) for the app to remove the stage.
|
|
2881
|
+
Reduced motion: the finished state, no beats; closing fires at once. */
|
|
2848
2882
|
.sheet-stage--ask {
|
|
2849
2883
|
--drawer-h: 14rem;
|
|
2850
|
-
|
|
2851
|
-
|
|
2884
|
+
display: grid;
|
|
2885
|
+
align-content: center; /* the card at the screen's centre — and kept there as it grows */
|
|
2886
|
+
padding-inline: var(--screen-pad);
|
|
2852
2887
|
}
|
|
2853
|
-
.
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2888
|
+
.sheet-stage--ask::after { content: ""; position: absolute; inset: 0; background: var(--scrim); } /* the page dimmed */
|
|
2889
|
+
.sheet-stage--ask > .sheet-stage__bg { filter: blur(var(--sp-2)); }
|
|
2890
|
+
.modal {
|
|
2891
|
+
position: relative;
|
|
2892
|
+
z-index: 1; /* over the scrim */
|
|
2893
|
+
max-height: calc(100cqh - 2 * var(--sp-5)); /* cqh: the stage (a size container) — a % here would be of the grid area, which is the card itself */
|
|
2894
|
+
padding: 0; /* the parts pad themselves */
|
|
2895
|
+
border: 0; /* no frame on the modal (Lh 2026-09-16) — its edge is the shadow */
|
|
2896
|
+
display: grid;
|
|
2897
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
2898
|
+
overflow: clip;
|
|
2860
2899
|
box-shadow: var(--shadow-sheet);
|
|
2900
|
+
}
|
|
2901
|
+
.modal__lift {
|
|
2902
|
+
padding: var(--card-pad);
|
|
2903
|
+
display: grid;
|
|
2904
|
+
gap: var(--card-gap);
|
|
2861
2905
|
align-content: start;
|
|
2906
|
+
min-height: 0;
|
|
2907
|
+
overflow-y: auto; /* tall content scrolls inside; the drawer stays */
|
|
2908
|
+
overscroll-behavior: contain;
|
|
2862
2909
|
}
|
|
2863
|
-
.
|
|
2864
|
-
position: absolute;
|
|
2865
|
-
inset-inline: 0;
|
|
2866
|
-
bottom: 0;
|
|
2910
|
+
.modal__drawer {
|
|
2867
2911
|
height: var(--drawer-h);
|
|
2912
|
+
box-sizing: border-box;
|
|
2868
2913
|
padding: var(--sp-5);
|
|
2914
|
+
overflow: clip;
|
|
2869
2915
|
display: grid;
|
|
2870
2916
|
align-content: center;
|
|
2871
2917
|
justify-items: center;
|
|
2872
2918
|
gap: var(--sp-1);
|
|
2873
2919
|
text-align: center;
|
|
2920
|
+
background: var(--card-3-bg);
|
|
2921
|
+
color: var(--card-3-ink);
|
|
2874
2922
|
--accent: var(--card-3-ink); /* the one solid button inverts on the dark drawer */
|
|
2875
2923
|
--on-accent: var(--card-3-bg);
|
|
2876
2924
|
}
|
|
2877
|
-
.
|
|
2878
|
-
.
|
|
2879
|
-
.
|
|
2925
|
+
.modal__drawer .t-caption { opacity: 0.7; }
|
|
2926
|
+
.modal__drawer .icon-btn { background: transparent; color: inherit; border-color: var(--ink-rail); }
|
|
2927
|
+
.modal__drawer .icon-btn--invert { background: var(--accent); color: var(--on-accent); border-color: transparent; width: var(--tap-lg); height: var(--tap-lg); }
|
|
2928
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
2929
|
+
.modal { animation: modal-drop calc(2 * var(--motion-sheet)) ease both; }
|
|
2930
|
+
.modal__drawer { animation: modal-open calc(2 * var(--motion-sheet)) ease both; }
|
|
2931
|
+
@keyframes modal-drop {
|
|
2932
|
+
0% { translate: 0 -100cqh; } /* above the stage */
|
|
2933
|
+
50%, 100% { translate: 0 0; } /* 1. at the centre — and it stays: beat 2 is the drawer's */
|
|
2934
|
+
}
|
|
2935
|
+
@keyframes modal-open {
|
|
2936
|
+
0%, 50% { height: 0; padding-block: 0; } /* inside the card */
|
|
2937
|
+
100% { height: var(--drawer-h); padding-block: var(--sp-5); } /* 2. out below, the lift up, together */
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2880
2941
|
.btn-trio { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); }
|
|
2881
2942
|
.btn-trio__dots {
|
|
2882
2943
|
width: var(--sp-5);
|
package/dist/cards/Card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/**
|
|
4
4
|
* Card — ONE boundary: head · content · foot. Cards are content the system offers (the words, the thing to read).
|
|
5
5
|
* Children: a CardHead first (heading left, contextual info far right), the content (frameless rows, kv, a ring,
|
package/dist/cards/CardFoot.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** CardFoot — the card's action buttons on one line: one takes the width, up to four share it evenly. Btns only. */
|
|
4
4
|
export function CardFoot({ className, ...rest }) {
|
|
5
5
|
return _jsx("div", { className: cx('card__foot', className), ...rest });
|
package/dist/cards/CardHead.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/**
|
|
4
4
|
* CardHead — the card's head: the heading on the left takes the room, the contextual info hugs the far right.
|
|
5
5
|
* Use `heading` (+ `overline`/`caption`) and `end` for the standard head, or pass children for a custom one
|
package/dist/cards/CardParts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** CardMedia — rounded media inside a card (a Placeholder or img); a corner TileBadge pins to it. */
|
|
4
4
|
export function CardMedia({ className, ...rest }) {
|
|
5
5
|
return _jsx("div", { className: cx('card__media', className), ...rest });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** Placeholder — the wireframe's crossed box standing in for a photo or illustration (currentColor, survives any palette). */
|
|
4
4
|
export function Placeholder({ size, label = 'Image', className, ...rest }) {
|
|
5
5
|
return _jsx("div", { className: cx('ph', size && `ph--${size}`, className), role: "img", "aria-label": label, ...rest });
|
package/dist/cards/Stat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** Stat — an inline stat block: an overline, a big `Text level="stat"` number, a caption; StatRows put a Delta beside the label. */
|
|
4
4
|
export function Stat({ grow, className, ...rest }) {
|
|
5
5
|
return _jsx("div", { className: cx('stat', grow && 'grow', className), ...rest });
|
package/dist/choice/Calendar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
3
|
-
import { IconBtn } from '../actions/IconBtn';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
|
+
import { IconBtn } from '../actions/IconBtn.js';
|
|
4
4
|
/** Calendar — a month grid of 44px round cells: one accent day, optional marks; prev/next in the head. */
|
|
5
5
|
export function Calendar({ title, days = 30, start = 1, selected, marks = [], marks2 = [], disabled = [], weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], nav, className, ...rest }) {
|
|
6
6
|
return (_jsxs("div", { className: cx('calendar', className), ...rest, children: [_jsxs("div", { className: "calendar__head", children: [_jsx("span", { className: "t-title", children: title }), nav ?? (_jsxs("span", { className: "icon-row", children: [_jsx(IconBtn, { sm: true, icon: "chevron-left", label: "Previous" }), _jsx(IconBtn, { sm: true, icon: "chevron-right", label: "Next" })] }))] }), _jsxs("div", { className: "calendar__grid", children: [weekdays.map((d) => _jsx("span", { className: "calendar__wd", children: d }, d)), Array.from({ length: days }, (_, i) => i + 1).map((d) => (_jsx("button", { type: "button", className: cx('calendar__day', marks.includes(d) && 'calendar__day--mark', marks2.includes(d) && 'calendar__day--mark2'), "aria-selected": d === selected ? 'true' : undefined, disabled: disabled.includes(d), style: d === 1 ? { '--start': start } : undefined, children: d }, d)))] })] }));
|
package/dist/choice/Check.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** Check — the round check circle at a Row's end (48px); the row's label wraps it. */
|
|
4
4
|
export function Check({ sm, label, className, ...rest }) {
|
|
5
5
|
return _jsx("input", { type: "checkbox", className: cx('check', sm && 'check--sm', className), "aria-label": label, ...rest });
|
package/dist/choice/DayStrip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** DayStrip — a week of Days, one selected. */
|
|
4
4
|
export function DayStrip({ className, ...rest }) {
|
|
5
5
|
return _jsx("div", { className: cx('day-strip', className), role: "tablist", ...rest });
|
package/dist/choice/Mood.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** Mood — five dots in a pill from bad to good; the picked one grows. */
|
|
4
4
|
export function Mood({ name = 'mood', value, label = 'Mood', onChange, className, ...rest }) {
|
|
5
5
|
return (_jsx("fieldset", { className: cx('mood', className), "aria-label": label, ...rest, children: [1, 2, 3, 4, 5].map((n) => (_jsxs("label", { className: "mood__opt", children: [_jsx("input", { type: "radio", name: name, value: n, defaultChecked: n === value, onChange: onChange }), _jsx("span", { className: "mood__dot" })] }, n))) }));
|
package/dist/choice/Slider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
import { cx } from '../cx';
|
|
3
|
+
import { cx } from '../cx.js';
|
|
4
4
|
/** Slider — one value along a hairline rail with a 48px knob; the whole range is thumb-tall. */
|
|
5
5
|
export function Slider({ label, glyph, className, style, ...input }) {
|
|
6
6
|
const range = useRef(null);
|
package/dist/forms/AddRow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
3
|
-
import { Icon } from '../type/Icon';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
|
+
import { Icon } from '../type/Icon.js';
|
|
4
4
|
/** AddRow — the inline "+ add another" action under a list of fields. */
|
|
5
5
|
export function AddRow({ className, children, ...rest }) {
|
|
6
6
|
return (_jsxs("button", { type: "button", className: cx('add-row', className), ...rest, children: [_jsx("span", { className: "add-row__plus", children: _jsx(Icon, { name: "plus" }) }), " ", children] }));
|
package/dist/forms/Composer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/** Composer — a big write-in area (display type) with a bottom bar: icon · hint · send. The write-in step's sheet content. */
|
|
4
4
|
export function Composer({ hint, lead, send, className, style, ...textarea }) {
|
|
5
5
|
return (_jsxs("div", { className: cx('composer', className), style: style, children: [_jsx("textarea", { className: "composer__input", ...textarea }), _jsxs("div", { className: "composer__bar", children: [lead, hint != null && _jsx("span", { className: "composer__hint", children: hint }), send] })] }));
|
package/dist/forms/Field.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { type IconName } from '../type/Icon';
|
|
2
|
+
import { type IconName } from '../type/Icon.js';
|
|
3
3
|
export interface FieldProps extends Omit<ComponentPropsWithoutRef<'input'>, 'className' | 'style'> {
|
|
4
4
|
/** a leading icon (phone-call, plane, calendar-days) */
|
|
5
5
|
icon?: IconName;
|
package/dist/forms/Field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
3
|
-
import { Icon } from '../type/Icon';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
|
+
import { Icon } from '../type/Icon.js';
|
|
4
4
|
/**
|
|
5
5
|
* Field — the flat outlined input: the LABEL IS THE PLACEHOLDER. 48px tall (56px with an action inside).
|
|
6
6
|
* Fields belong in a Sheet (what the member acts on), 1–3 per step, never in a reading card.
|
package/dist/forms/FileBtn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from '../cx';
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
3
|
/**
|
|
4
4
|
* FileBtn — a Btn that opens the device's file picker: the button IS the label of a hidden file input, so the
|
|
5
5
|
* whole button is the tap target and nothing is forwarded by script. `accept="image/*" capture="environment"`
|
package/dist/forms/Pin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
import { cx } from '../cx';
|
|
3
|
+
import { cx } from '../cx.js';
|
|
4
4
|
/**
|
|
5
5
|
* Pin — big code entry, one digit per pill; a filled cell turns accent. Lives in a Sheet.
|
|
6
6
|
* Typing a digit moves to the next cell, Backspace in an empty cell moves back, a pasted code fills every cell
|
package/dist/index.d.ts
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
import '../cardds.js';
|
|
2
|
-
export { cx } from './cx';
|
|
3
|
-
export * from './type/Icon';
|
|
4
|
-
export { ICON_NAMES } from './type/icons';
|
|
5
|
-
export * from './type/Text';
|
|
6
|
-
export * from './scaffold/Screen';
|
|
7
|
-
export * from './scaffold/AppBar';
|
|
8
|
-
export * from './scaffold/TopBar';
|
|
9
|
-
export * from './scaffold/ActionBar';
|
|
10
|
-
export * from './scaffold/PagerAt';
|
|
11
|
-
export * from './scaffold/FloatBar';
|
|
12
|
-
export * from './scaffold/FilterRow';
|
|
13
|
-
export * from './scaffold/Section';
|
|
14
|
-
export * from './scaffold/EmptyState';
|
|
15
|
-
export * from './scaffold/Centre';
|
|
16
|
-
export * from './cards/Card';
|
|
17
|
-
export * from './cards/CardHead';
|
|
18
|
-
export * from './cards/CardFoot';
|
|
19
|
-
export * from './cards/CardParts';
|
|
20
|
-
export * from './cards/Stat';
|
|
21
|
-
export * from './cards/Placeholder';
|
|
22
|
-
export * from './sheets/SheetStack';
|
|
23
|
-
export * from './sheets/CardBack';
|
|
24
|
-
export * from './sheets/Sheet';
|
|
25
|
-
export * from './sheets/SheetHead';
|
|
26
|
-
export * from './sheets/SheetBody';
|
|
27
|
-
export * from './sheets/SheetStage';
|
|
28
|
-
export * from './sheets/Step';
|
|
29
|
-
export * from './sheets/Drawer';
|
|
30
|
-
export * from './actions/Btn';
|
|
31
|
-
export * from './actions/IconBtn';
|
|
32
|
-
export * from './actions/Chip';
|
|
33
|
-
export * from './actions/Dot';
|
|
34
|
-
export * from './actions/Dropdown';
|
|
35
|
-
export * from './actions/Segment';
|
|
36
|
-
export * from './actions/Fab';
|
|
37
|
-
export * from './actions/BtnRow';
|
|
38
|
-
export * from './actions/Link';
|
|
39
|
-
export * from './forms/Field';
|
|
40
|
-
export * from './forms/FileBtn';
|
|
41
|
-
export * from './forms/AddRow';
|
|
42
|
-
export * from './forms/Pin';
|
|
43
|
-
export * from './forms/Composer';
|
|
44
|
-
export * from './choice/Check';
|
|
45
|
-
export * from './choice/DayStrip';
|
|
46
|
-
export * from './choice/Calendar';
|
|
47
|
-
export * from './choice/Mood';
|
|
48
|
-
export * from './choice/Slider';
|
|
49
|
-
export * from './numbers/Ring';
|
|
50
|
-
export * from './numbers/Track';
|
|
51
|
-
export * from './numbers/Band';
|
|
52
|
-
export * from './numbers/DotGrid';
|
|
53
|
-
export * from './numbers/Picker';
|
|
54
|
-
export * from './numbers/Badge';
|
|
55
|
-
export * from './numbers/Bars';
|
|
56
|
-
export * from './people/Avatar';
|
|
57
|
-
export * from './people/AvatarPick';
|
|
58
|
-
export * from './lists/Row';
|
|
59
|
-
export * from './lists/Kv';
|
|
60
|
-
export * from './lists/Timeline';
|
|
61
|
-
export * from './lists/Legend';
|
|
62
|
-
export * from './media/Quote';
|
|
63
|
-
export * from './media/Postcard';
|
|
64
|
-
export * from './media/MapArea';
|
|
65
|
-
export * from './media/Tile';
|
|
66
|
-
export * from './media/Mosaic';
|
|
67
|
-
export * from './layover/Banner';
|
|
68
|
-
export * from './layover/Callout';
|
|
69
|
-
export * from './layover/Deck';
|
|
70
|
-
export * from './journey/Route';
|
|
71
|
-
export * from './journey/TileBadge';
|
|
72
|
-
export * from './journey/NoteRow';
|
|
2
|
+
export { cx } from './cx.js';
|
|
3
|
+
export * from './type/Icon.js';
|
|
4
|
+
export { ICON_NAMES } from './type/icons.js';
|
|
5
|
+
export * from './type/Text.js';
|
|
6
|
+
export * from './scaffold/Screen.js';
|
|
7
|
+
export * from './scaffold/AppBar.js';
|
|
8
|
+
export * from './scaffold/TopBar.js';
|
|
9
|
+
export * from './scaffold/ActionBar.js';
|
|
10
|
+
export * from './scaffold/PagerAt.js';
|
|
11
|
+
export * from './scaffold/FloatBar.js';
|
|
12
|
+
export * from './scaffold/FilterRow.js';
|
|
13
|
+
export * from './scaffold/Section.js';
|
|
14
|
+
export * from './scaffold/EmptyState.js';
|
|
15
|
+
export * from './scaffold/Centre.js';
|
|
16
|
+
export * from './cards/Card.js';
|
|
17
|
+
export * from './cards/CardHead.js';
|
|
18
|
+
export * from './cards/CardFoot.js';
|
|
19
|
+
export * from './cards/CardParts.js';
|
|
20
|
+
export * from './cards/Stat.js';
|
|
21
|
+
export * from './cards/Placeholder.js';
|
|
22
|
+
export * from './sheets/SheetStack.js';
|
|
23
|
+
export * from './sheets/CardBack.js';
|
|
24
|
+
export * from './sheets/Sheet.js';
|
|
25
|
+
export * from './sheets/SheetHead.js';
|
|
26
|
+
export * from './sheets/SheetBody.js';
|
|
27
|
+
export * from './sheets/SheetStage.js';
|
|
28
|
+
export * from './sheets/Step.js';
|
|
29
|
+
export * from './sheets/Drawer.js';
|
|
30
|
+
export * from './actions/Btn.js';
|
|
31
|
+
export * from './actions/IconBtn.js';
|
|
32
|
+
export * from './actions/Chip.js';
|
|
33
|
+
export * from './actions/Dot.js';
|
|
34
|
+
export * from './actions/Dropdown.js';
|
|
35
|
+
export * from './actions/Segment.js';
|
|
36
|
+
export * from './actions/Fab.js';
|
|
37
|
+
export * from './actions/BtnRow.js';
|
|
38
|
+
export * from './actions/Link.js';
|
|
39
|
+
export * from './forms/Field.js';
|
|
40
|
+
export * from './forms/FileBtn.js';
|
|
41
|
+
export * from './forms/AddRow.js';
|
|
42
|
+
export * from './forms/Pin.js';
|
|
43
|
+
export * from './forms/Composer.js';
|
|
44
|
+
export * from './choice/Check.js';
|
|
45
|
+
export * from './choice/DayStrip.js';
|
|
46
|
+
export * from './choice/Calendar.js';
|
|
47
|
+
export * from './choice/Mood.js';
|
|
48
|
+
export * from './choice/Slider.js';
|
|
49
|
+
export * from './numbers/Ring.js';
|
|
50
|
+
export * from './numbers/Track.js';
|
|
51
|
+
export * from './numbers/Band.js';
|
|
52
|
+
export * from './numbers/DotGrid.js';
|
|
53
|
+
export * from './numbers/Picker.js';
|
|
54
|
+
export * from './numbers/Badge.js';
|
|
55
|
+
export * from './numbers/Bars.js';
|
|
56
|
+
export * from './people/Avatar.js';
|
|
57
|
+
export * from './people/AvatarPick.js';
|
|
58
|
+
export * from './lists/Row.js';
|
|
59
|
+
export * from './lists/Kv.js';
|
|
60
|
+
export * from './lists/Timeline.js';
|
|
61
|
+
export * from './lists/Legend.js';
|
|
62
|
+
export * from './media/Quote.js';
|
|
63
|
+
export * from './media/Postcard.js';
|
|
64
|
+
export * from './media/MapArea.js';
|
|
65
|
+
export * from './media/Tile.js';
|
|
66
|
+
export * from './media/Mosaic.js';
|
|
67
|
+
export * from './layover/Banner.js';
|
|
68
|
+
export * from './layover/Callout.js';
|
|
69
|
+
export * from './layover/Deck.js';
|
|
70
|
+
export * from './journey/Route.js';
|
|
71
|
+
export * from './journey/TileBadge.js';
|
|
72
|
+
export * from './journey/NoteRow.js';
|