@usableapp/cardds 0.2.2 → 0.4.0
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 +35 -107
- package/cardds.js +6 -449
- package/css/actions.css +41 -35
- package/css/base.css +9 -9
- package/css/card.css +26 -25
- package/css/choice.css +50 -50
- package/css/forms.css +18 -18
- package/css/journey.css +16 -16
- package/css/layover.css +45 -45
- package/css/lists.css +43 -43
- package/css/media.css +33 -33
- package/css/numbers.css +25 -25
- package/css/people.css +11 -11
- package/css/sheet.css +29 -29
- package/css/step.css +6 -6
- package/css/theme.template.css +6 -3
- package/css/tokens.css +2 -0
- package/dist/actions/Btn.d.ts +109 -108
- package/dist/actions/BtnRow.d.ts +2 -2
- package/dist/actions/Chip.d.ts +102 -101
- package/dist/actions/Dot.d.ts +2 -2
- package/dist/actions/Dropdown.d.ts +36 -19
- package/dist/actions/Dropdown.js +41 -11
- package/dist/actions/Fab.d.ts +2 -2
- package/dist/actions/IconBtn.d.ts +298 -10
- package/dist/actions/IconBtn.js +6 -8
- package/dist/actions/Link.d.ts +105 -104
- package/dist/actions/Segment.d.ts +3 -3
- package/dist/cardds.css +354 -345
- package/dist/cards/Card.d.ts +99 -98
- package/dist/cards/CardFoot.d.ts +2 -2
- package/dist/cards/CardHead.d.ts +2 -2
- package/dist/cards/CardParts.d.ts +7 -7
- package/dist/cards/Placeholder.d.ts +2 -2
- package/dist/cards/Stat.d.ts +7 -5
- package/dist/cards/Stat.js +2 -2
- package/dist/choice/Calendar.d.ts +17 -6
- package/dist/choice/Calendar.js +9 -3
- package/dist/choice/Check.d.ts +3 -3
- package/dist/choice/DayStrip.d.ts +3 -3
- package/dist/choice/Mood.d.ts +2 -2
- package/dist/choice/Slider.d.ts +3 -3
- package/dist/choice/Slider.js +12 -8
- package/dist/forms/AddRow.d.ts +2 -2
- package/dist/forms/Composer.d.ts +2 -2
- package/dist/forms/Field.d.ts +2 -2
- package/dist/forms/FileBtn.d.ts +2 -2
- package/dist/forms/Pin.d.ts +10 -7
- package/dist/forms/Pin.js +47 -18
- package/dist/journey/NoteRow.d.ts +2 -2
- package/dist/journey/Route.d.ts +2 -2
- package/dist/journey/TileBadge.d.ts +2 -2
- package/dist/layover/Banner.d.ts +2 -2
- package/dist/layover/Callout.d.ts +2 -2
- package/dist/layover/Deck.d.ts +3 -3
- package/dist/lists/Bubble.d.ts +3 -3
- package/dist/lists/Kv.d.ts +5 -5
- package/dist/lists/Legend.d.ts +3 -3
- package/dist/lists/Row.d.ts +5 -4
- package/dist/lists/Timeline.d.ts +3 -3
- package/dist/media/MapArea.d.ts +2 -2
- package/dist/media/Mosaic.d.ts +3 -3
- package/dist/media/Postcard.d.ts +9 -5
- package/dist/media/Postcard.js +8 -3
- package/dist/media/Quote.d.ts +2 -2
- package/dist/media/Tile.d.ts +5 -4
- package/dist/numbers/Badge.d.ts +2 -2
- package/dist/numbers/Band.d.ts +3 -3
- package/dist/numbers/Bars.d.ts +3 -3
- package/dist/numbers/DotGrid.d.ts +2 -2
- package/dist/numbers/Picker.d.ts +20 -8
- package/dist/numbers/Picker.js +51 -13
- package/dist/numbers/Ring.d.ts +2 -2
- package/dist/numbers/Track.d.ts +3 -3
- package/dist/people/Avatar.d.ts +100 -99
- package/dist/people/AvatarPick.d.ts +3 -3
- package/dist/scaffold/ActionBar.d.ts +3 -3
- package/dist/scaffold/AppBar.d.ts +2 -2
- package/dist/scaffold/BaseContent.d.ts +7 -7
- package/dist/scaffold/BaseContent.js +4 -4
- package/dist/scaffold/Centre.d.ts +3 -3
- package/dist/scaffold/EmptyState.d.ts +2 -2
- package/dist/scaffold/FilterRow.d.ts +2 -2
- package/dist/scaffold/FloatBar.d.ts +105 -104
- package/dist/scaffold/PagerAt.d.ts +2 -2
- package/dist/scaffold/Screen.d.ts +100 -99
- package/dist/scaffold/TopBar.d.ts +2 -2
- package/dist/sheets/CardBack.d.ts +2 -2
- package/dist/sheets/Drawer.d.ts +19 -8
- package/dist/sheets/Drawer.js +29 -5
- package/dist/sheets/Sheet.d.ts +29 -16
- package/dist/sheets/Sheet.js +157 -11
- package/dist/sheets/SheetBody.d.ts +2 -2
- package/dist/sheets/SheetHead.d.ts +2 -2
- package/dist/sheets/SheetStack.d.ts +15 -3
- package/dist/sheets/SheetStack.js +74 -2
- package/dist/sheets/SheetStage.d.ts +2 -2
- package/dist/sheets/Step.d.ts +2 -2
- package/dist/type/Icon.d.ts +22 -7
- package/dist/type/Icon.js +27 -4
- package/dist/type/Text.d.ts +7 -1
- package/dist/type/Text.js +2 -2
- package/package.json +3 -2
package/dist/cards/Card.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface CardProps extends
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
export interface CardProps extends ComponentProps<'article'> {
|
|
3
3
|
/** the tone slot: 1 (default, light) · 2 (tinted) · 3 (dark / accent — controls invert automatically) */
|
|
4
4
|
tone?: 1 | 2 | 3;
|
|
5
5
|
/** compact: a small card inside a card or a sheet body (a note, a promo) */
|
|
@@ -26,74 +26,119 @@ export interface CardProps extends ComponentPropsWithoutRef<'article'> {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function Card({ tone, sm, row, cover, fold, centre, band, as, className, ...rest }: CardProps): import("react").DetailedReactHTMLElement<{
|
|
28
28
|
href?: string;
|
|
29
|
-
|
|
29
|
+
ref?: import("react").Ref<HTMLElement> | undefined;
|
|
30
|
+
key?: import("react").Key | null | undefined;
|
|
31
|
+
defaultChecked?: boolean | undefined;
|
|
32
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
33
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
34
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
35
|
+
accessKey?: string | undefined;
|
|
36
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
37
|
+
autoFocus?: boolean | undefined;
|
|
38
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
39
|
+
contextMenu?: string | undefined;
|
|
40
|
+
dir?: string | undefined;
|
|
41
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
42
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
43
|
+
hidden?: boolean | undefined;
|
|
44
|
+
id?: string | undefined;
|
|
45
|
+
lang?: string | undefined;
|
|
46
|
+
nonce?: string | undefined;
|
|
47
|
+
slot?: string | undefined;
|
|
48
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
30
49
|
style?: import("react").CSSProperties | undefined;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
lang?: string | undefined | undefined;
|
|
36
|
-
nonce?: string | undefined | undefined;
|
|
37
|
-
part?: string | undefined | undefined;
|
|
50
|
+
tabIndex?: number | undefined;
|
|
51
|
+
title?: string | undefined;
|
|
52
|
+
translate?: "yes" | "no" | undefined;
|
|
53
|
+
radioGroup?: string | undefined;
|
|
38
54
|
role?: import("react").AriaRole | undefined;
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
about?: string | undefined;
|
|
56
|
+
content?: string | undefined;
|
|
57
|
+
datatype?: string | undefined;
|
|
58
|
+
inlist?: any;
|
|
59
|
+
prefix?: string | undefined;
|
|
60
|
+
property?: string | undefined;
|
|
61
|
+
rel?: string | undefined;
|
|
62
|
+
resource?: string | undefined;
|
|
63
|
+
rev?: string | undefined;
|
|
64
|
+
typeof?: string | undefined;
|
|
65
|
+
vocab?: string | undefined;
|
|
66
|
+
autoCorrect?: string | undefined;
|
|
67
|
+
autoSave?: string | undefined;
|
|
68
|
+
color?: string | undefined;
|
|
69
|
+
itemProp?: string | undefined;
|
|
70
|
+
itemScope?: boolean | undefined;
|
|
71
|
+
itemType?: string | undefined;
|
|
72
|
+
itemID?: string | undefined;
|
|
73
|
+
itemRef?: string | undefined;
|
|
74
|
+
results?: number | undefined;
|
|
75
|
+
security?: string | undefined;
|
|
76
|
+
unselectable?: "on" | "off" | undefined;
|
|
77
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
78
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
79
|
+
popoverTarget?: string | undefined;
|
|
80
|
+
inert?: boolean | undefined;
|
|
81
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
82
|
+
is?: string | undefined;
|
|
83
|
+
exportparts?: string | undefined;
|
|
84
|
+
part?: string | undefined;
|
|
85
|
+
"aria-activedescendant"?: string | undefined;
|
|
41
86
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
42
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined
|
|
43
|
-
"aria-braillelabel"?: string | undefined
|
|
44
|
-
"aria-brailleroledescription"?: string | undefined
|
|
87
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
88
|
+
"aria-braillelabel"?: string | undefined;
|
|
89
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
45
90
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
46
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined
|
|
47
|
-
"aria-colcount"?: number | undefined
|
|
48
|
-
"aria-colindex"?: number | undefined
|
|
49
|
-
"aria-colindextext"?: string | undefined
|
|
50
|
-
"aria-colspan"?: number | undefined
|
|
51
|
-
"aria-controls"?: string | undefined
|
|
52
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined
|
|
53
|
-
"aria-describedby"?: string | undefined
|
|
54
|
-
"aria-description"?: string | undefined
|
|
55
|
-
"aria-details"?: string | undefined
|
|
91
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
92
|
+
"aria-colcount"?: number | undefined;
|
|
93
|
+
"aria-colindex"?: number | undefined;
|
|
94
|
+
"aria-colindextext"?: string | undefined;
|
|
95
|
+
"aria-colspan"?: number | undefined;
|
|
96
|
+
"aria-controls"?: string | undefined;
|
|
97
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
98
|
+
"aria-describedby"?: string | undefined;
|
|
99
|
+
"aria-description"?: string | undefined;
|
|
100
|
+
"aria-details"?: string | undefined;
|
|
56
101
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
57
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined
|
|
58
|
-
"aria-errormessage"?: string | undefined
|
|
102
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
103
|
+
"aria-errormessage"?: string | undefined;
|
|
59
104
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
60
|
-
"aria-flowto"?: string | undefined
|
|
105
|
+
"aria-flowto"?: string | undefined;
|
|
61
106
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
62
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined
|
|
107
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
63
108
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
64
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined
|
|
65
|
-
"aria-keyshortcuts"?: string | undefined
|
|
66
|
-
"aria-label"?: string | undefined
|
|
67
|
-
"aria-labelledby"?: string | undefined
|
|
68
|
-
"aria-level"?: number | undefined
|
|
69
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined
|
|
109
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
110
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
111
|
+
"aria-label"?: string | undefined;
|
|
112
|
+
"aria-labelledby"?: string | undefined;
|
|
113
|
+
"aria-level"?: number | undefined;
|
|
114
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
70
115
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
71
116
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
72
117
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
73
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined
|
|
74
|
-
"aria-owns"?: string | undefined
|
|
75
|
-
"aria-placeholder"?: string | undefined
|
|
76
|
-
"aria-posinset"?: number | undefined
|
|
77
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined
|
|
118
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
119
|
+
"aria-owns"?: string | undefined;
|
|
120
|
+
"aria-placeholder"?: string | undefined;
|
|
121
|
+
"aria-posinset"?: number | undefined;
|
|
122
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
78
123
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
79
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined
|
|
124
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
80
125
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
81
|
-
"aria-roledescription"?: string | undefined
|
|
82
|
-
"aria-rowcount"?: number | undefined
|
|
83
|
-
"aria-rowindex"?: number | undefined
|
|
84
|
-
"aria-rowindextext"?: string | undefined
|
|
85
|
-
"aria-rowspan"?: number | undefined
|
|
126
|
+
"aria-roledescription"?: string | undefined;
|
|
127
|
+
"aria-rowcount"?: number | undefined;
|
|
128
|
+
"aria-rowindex"?: number | undefined;
|
|
129
|
+
"aria-rowindextext"?: string | undefined;
|
|
130
|
+
"aria-rowspan"?: number | undefined;
|
|
86
131
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
87
|
-
"aria-setsize"?: number | undefined
|
|
88
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined
|
|
89
|
-
"aria-valuemax"?: number | undefined
|
|
90
|
-
"aria-valuemin"?: number | undefined
|
|
91
|
-
"aria-valuenow"?: number | undefined
|
|
92
|
-
"aria-valuetext"?: string | undefined
|
|
93
|
-
children?: import("react").ReactNode;
|
|
132
|
+
"aria-setsize"?: number | undefined;
|
|
133
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
134
|
+
"aria-valuemax"?: number | undefined;
|
|
135
|
+
"aria-valuemin"?: number | undefined;
|
|
136
|
+
"aria-valuenow"?: number | undefined;
|
|
137
|
+
"aria-valuetext"?: string | undefined;
|
|
138
|
+
children?: import("react").ReactNode | undefined;
|
|
94
139
|
dangerouslySetInnerHTML?: {
|
|
95
140
|
__html: string | TrustedHTML;
|
|
96
|
-
} | undefined
|
|
141
|
+
} | undefined;
|
|
97
142
|
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
98
143
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
99
144
|
onCut?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
@@ -262,49 +307,5 @@ export declare function Card({ tone, sm, row, cover, fold, centre, band, as, cla
|
|
|
262
307
|
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
263
308
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
264
309
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
265
|
-
key?: import("react").Key | null | undefined;
|
|
266
|
-
defaultChecked?: boolean | undefined | undefined;
|
|
267
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
268
|
-
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
269
|
-
accessKey?: string | undefined | undefined;
|
|
270
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
271
|
-
autoFocus?: boolean | undefined | undefined;
|
|
272
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
273
|
-
contextMenu?: string | undefined | undefined;
|
|
274
|
-
dir?: string | undefined | undefined;
|
|
275
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
276
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
277
|
-
hidden?: boolean | undefined | undefined;
|
|
278
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
279
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
280
|
-
radioGroup?: string | undefined | undefined;
|
|
281
|
-
about?: string | undefined | undefined;
|
|
282
|
-
content?: string | undefined | undefined;
|
|
283
|
-
datatype?: string | undefined | undefined;
|
|
284
|
-
inlist?: any;
|
|
285
|
-
prefix?: string | undefined | undefined;
|
|
286
|
-
property?: string | undefined | undefined;
|
|
287
|
-
rel?: string | undefined | undefined;
|
|
288
|
-
resource?: string | undefined | undefined;
|
|
289
|
-
rev?: string | undefined | undefined;
|
|
290
|
-
typeof?: string | undefined | undefined;
|
|
291
|
-
vocab?: string | undefined | undefined;
|
|
292
|
-
autoCorrect?: string | undefined | undefined;
|
|
293
|
-
autoSave?: string | undefined | undefined;
|
|
294
|
-
itemProp?: string | undefined | undefined;
|
|
295
|
-
itemScope?: boolean | undefined | undefined;
|
|
296
|
-
itemType?: string | undefined | undefined;
|
|
297
|
-
itemID?: string | undefined | undefined;
|
|
298
|
-
itemRef?: string | undefined | undefined;
|
|
299
|
-
results?: number | undefined | undefined;
|
|
300
|
-
security?: string | undefined | undefined;
|
|
301
|
-
unselectable?: "on" | "off" | undefined | undefined;
|
|
302
|
-
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
303
|
-
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
304
|
-
popoverTarget?: string | undefined | undefined;
|
|
305
|
-
inert?: boolean | undefined | undefined;
|
|
306
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
307
|
-
is?: string | undefined | undefined;
|
|
308
|
-
exportparts?: string | undefined | undefined;
|
|
309
310
|
className: string;
|
|
310
311
|
}, HTMLElement>;
|
package/dist/cards/CardFoot.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CardFootProps extends
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface CardFootProps extends ComponentProps<'div'> {
|
|
3
3
|
}
|
|
4
4
|
/** CardFoot — the card's action buttons on one line: one takes the width, up to four share it evenly. Btns only. */
|
|
5
5
|
export declare function CardFoot({ className, ...rest }: CardFootProps): import("react").JSX.Element;
|
package/dist/cards/CardHead.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CardHeadProps extends
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface CardHeadProps extends ComponentProps<'div'> {
|
|
3
3
|
/** the heading (a string becomes an h2 at level `t-h2`) — wraps freely, as many lines as the words need */
|
|
4
4
|
heading?: ReactNode;
|
|
5
5
|
/** small caps above the heading ("Step 1 of 4", "Time bank") */
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CardMediaProps extends
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface CardMediaProps extends ComponentProps<'div'> {
|
|
3
3
|
}
|
|
4
4
|
/** CardMedia — rounded media inside a card (a Placeholder or img); a corner TileBadge pins to it. */
|
|
5
5
|
export declare function CardMedia({ className, ...rest }: CardMediaProps): import("react").JSX.Element;
|
|
6
|
-
export interface CardBodyProps extends
|
|
6
|
+
export interface CardBodyProps extends ComponentProps<'div'> {
|
|
7
7
|
}
|
|
8
8
|
/** CardBody — the flexible middle of a `Card row`: a title over a caption. */
|
|
9
9
|
export declare function CardBody({ className, ...rest }: CardBodyProps): import("react").JSX.Element;
|
|
10
|
-
export interface CardThumbProps extends
|
|
10
|
+
export interface CardThumbProps extends ComponentProps<'span'> {
|
|
11
11
|
}
|
|
12
12
|
/** CardThumb — the small outlined square leading a `Card row` (a number, an initial, an icon). */
|
|
13
13
|
export declare function CardThumb({ className, ...rest }: CardThumbProps): import("react").JSX.Element;
|
|
14
|
-
export interface CardEndProps extends
|
|
14
|
+
export interface CardEndProps extends ComponentProps<'div'> {
|
|
15
15
|
}
|
|
16
16
|
/** CardEnd — the trailing value + caption, right-aligned (in a head or a row card). */
|
|
17
17
|
export declare function CardEnd({ className, ...rest }: CardEndProps): import("react").JSX.Element;
|
|
18
|
-
export interface CardListProps extends
|
|
18
|
+
export interface CardListProps extends ComponentProps<'div'> {
|
|
19
19
|
}
|
|
20
20
|
/** CardList — a stack of `Card row`s, each its own boundary. */
|
|
21
21
|
export declare function CardList({ className, ...rest }: CardListProps): import("react").JSX.Element;
|
|
22
|
-
export interface IconRowProps extends
|
|
22
|
+
export interface IconRowProps extends ComponentProps<'span'> {
|
|
23
23
|
}
|
|
24
24
|
/** IconRow — a trailing cluster of Icons in a card or stack head. */
|
|
25
25
|
export declare function IconRow({ className, ...rest }: IconRowProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface PlaceholderProps extends
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface PlaceholderProps extends ComponentProps<'div'> {
|
|
3
3
|
/** sm 7.5rem · md 9rem · default 10rem tall */
|
|
4
4
|
size?: 'sm' | 'md';
|
|
5
5
|
/** what the image would be */
|
package/dist/cards/Stat.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface StatProps extends
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface StatProps extends ComponentProps<'div'> {
|
|
3
3
|
/** takes the remaining row space beside a Ring */
|
|
4
4
|
grow?: boolean;
|
|
5
|
+
/** centred: the one number of a sheet or a stage, under a centred Avatar */
|
|
6
|
+
centre?: boolean;
|
|
5
7
|
}
|
|
6
8
|
/** Stat — an inline stat block: an overline, a big `Text level="stat"` number, a caption; StatRows put a Delta beside the label. */
|
|
7
|
-
export declare function Stat({ grow, className, ...rest }: StatProps): import("react").JSX.Element;
|
|
8
|
-
export interface StatRowProps extends
|
|
9
|
+
export declare function Stat({ grow, centre, className, ...rest }: StatProps): import("react").JSX.Element;
|
|
10
|
+
export interface StatRowProps extends ComponentProps<'div'> {
|
|
9
11
|
}
|
|
10
12
|
/** StatRow — label left, Delta (or caption) right, inside a Stat. */
|
|
11
13
|
export declare function StatRow({ className, ...rest }: StatRowProps): import("react").JSX.Element;
|
|
12
|
-
export interface DeltaProps extends
|
|
14
|
+
export interface DeltaProps extends ComponentProps<'span'> {
|
|
13
15
|
/** a drop: painted in the signal colour */
|
|
14
16
|
neg?: boolean;
|
|
15
17
|
}
|
package/dist/cards/Stat.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
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
|
-
export function Stat({ grow, className, ...rest }) {
|
|
5
|
-
return _jsx("div", { className: cx('stat', grow && 'grow', className), ...rest });
|
|
4
|
+
export function Stat({ grow, centre, className, ...rest }) {
|
|
5
|
+
return _jsx("div", { className: cx('stat', grow && 'grow', centre && 'stat--centre', className), ...rest });
|
|
6
6
|
}
|
|
7
7
|
/** StatRow — label left, Delta (or caption) right, inside a Stat. */
|
|
8
8
|
export function StatRow({ className, ...rest }) {
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface CalendarProps extends Omit<
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
export interface CalendarProps extends Omit<ComponentProps<'div'>, 'title' | 'onSelect'> {
|
|
3
3
|
/** the month shown ("June") */
|
|
4
4
|
title: ReactNode;
|
|
5
5
|
/** days in the month */
|
|
6
6
|
days?: number;
|
|
7
7
|
/** weekday column of the 1st (1 = first column) */
|
|
8
8
|
start?: number;
|
|
9
|
-
/** the
|
|
10
|
-
selected?: number;
|
|
9
|
+
/** CONTROLLED: the picked day, or `null` for none. The app owns it — pair it with `onSelect`. (`undefined` = uncontrolled.) */
|
|
10
|
+
selected?: number | null;
|
|
11
|
+
/** UNCONTROLLED: the day picked on arrival; the calendar then keeps its own */
|
|
12
|
+
defaultSelected?: number;
|
|
13
|
+
/** a day was tapped */
|
|
14
|
+
onSelect?: (day: number) => void;
|
|
15
|
+
/** the head's two buttons: the app turns the month (it owns `title`, `days`, `start`) */
|
|
16
|
+
onPrev?: () => void;
|
|
17
|
+
onNext?: () => void;
|
|
18
|
+
/** their accessible names */
|
|
19
|
+
prevLabel?: string;
|
|
20
|
+
nextLabel?: string;
|
|
11
21
|
/** softly marked days */
|
|
12
22
|
marks?: number[];
|
|
13
23
|
/** strongly marked days */
|
|
@@ -19,5 +29,6 @@ export interface CalendarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'ti
|
|
|
19
29
|
/** replace the default prev/next icon buttons */
|
|
20
30
|
nav?: ReactNode;
|
|
21
31
|
}
|
|
22
|
-
/** Calendar — a month grid of 44px round cells: one accent day, optional marks; prev/next in the head.
|
|
23
|
-
|
|
32
|
+
/** Calendar — a month grid of 44px round cells: one accent day, optional marks; prev/next in the head. It shows ONE month and knows no dates:
|
|
33
|
+
* the app owns which month (`title`, `days`, `start` + `onPrev` / `onNext`) and which day (`selected` + `onSelect`, or `defaultSelected`). */
|
|
34
|
+
export declare function Calendar({ title, days, start, selected, defaultSelected, onSelect, onPrev, onNext, prevLabel, nextLabel, marks, marks2, disabled, weekdays, nav, className, ...rest }: CalendarProps): import("react").JSX.Element;
|
package/dist/choice/Calendar.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { cx } from '../cx.js';
|
|
3
4
|
import { IconBtn } from '../actions/IconBtn.js';
|
|
4
|
-
/** Calendar — a month grid of 44px round cells: one accent day, optional marks; prev/next in the head.
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/** Calendar — a month grid of 44px round cells: one accent day, optional marks; prev/next in the head. It shows ONE month and knows no dates:
|
|
6
|
+
* the app owns which month (`title`, `days`, `start` + `onPrev` / `onNext`) and which day (`selected` + `onSelect`, or `defaultSelected`). */
|
|
7
|
+
export function Calendar({ title, days = 30, start = 1, selected, defaultSelected, onSelect, onPrev, onNext, prevLabel = 'Previous', nextLabel = 'Next', marks = [], marks2 = [], disabled = [], weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], nav, className, ...rest }) {
|
|
8
|
+
const [inner, setInner] = useState(defaultSelected);
|
|
9
|
+
const day = selected !== undefined ? selected : inner;
|
|
10
|
+
const pick = (d) => { if (selected === undefined)
|
|
11
|
+
setInner(d); onSelect?.(d); };
|
|
12
|
+
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: prevLabel, onClick: onPrev }), _jsx(IconBtn, { sm: true, icon: "chevron-right", label: nextLabel, onClick: onNext })] }))] }), _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 === day ? 'true' : undefined, onClick: () => pick(d), disabled: disabled.includes(d), style: d === 1 ? { '--start': start } : undefined, children: d }, d)))] })] }));
|
|
7
13
|
}
|
package/dist/choice/Check.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CheckProps extends
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface CheckProps extends ComponentProps<'input'> {
|
|
3
3
|
/** 40px instead of 48px */
|
|
4
4
|
sm?: boolean;
|
|
5
5
|
/** accessible name */
|
|
@@ -7,7 +7,7 @@ export interface CheckProps extends ComponentPropsWithoutRef<'input'> {
|
|
|
7
7
|
}
|
|
8
8
|
/** Check — the round check circle at a Row's end (48px); the row's label wraps it. */
|
|
9
9
|
export declare function Check({ sm, label, className, ...rest }: CheckProps): import("react").JSX.Element;
|
|
10
|
-
export interface ToggleProps extends
|
|
10
|
+
export interface ToggleProps extends ComponentProps<'input'> {
|
|
11
11
|
label?: string;
|
|
12
12
|
}
|
|
13
13
|
/** Toggle — the big switch (64×36) at a Row's end. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface DayStripProps extends
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface DayStripProps extends ComponentProps<'div'> {
|
|
3
3
|
}
|
|
4
4
|
/** DayStrip — a week of Days, one selected. */
|
|
5
5
|
export declare function DayStrip({ className, ...rest }: DayStripProps): import("react").JSX.Element;
|
|
6
|
-
export interface DayProps extends Omit<
|
|
6
|
+
export interface DayProps extends Omit<ComponentProps<'button'>, 'name'> {
|
|
7
7
|
/** weekday name (Thu) */
|
|
8
8
|
name: ReactNode;
|
|
9
9
|
/** the date number */
|
package/dist/choice/Mood.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface MoodProps extends Omit<
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface MoodProps extends Omit<ComponentProps<'fieldset'>, 'onChange'> {
|
|
3
3
|
/** the radio group name */
|
|
4
4
|
name?: string;
|
|
5
5
|
/** the picked dot, 1 (worst) to 5 (best) */
|
package/dist/choice/Slider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface SliderProps extends Omit<
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
export interface SliderProps extends Omit<ComponentProps<'input'>, 'className' | 'style' | 'type'> {
|
|
3
3
|
/** the label row above the track (optional in a bar that already says what it does) */
|
|
4
4
|
label?: ReactNode;
|
|
5
5
|
/** one sample letter IN the knob, at the type size the slider sets (a text-size slider's ก) */
|
|
@@ -8,4 +8,4 @@ export interface SliderProps extends Omit<ComponentPropsWithoutRef<'input'>, 'cl
|
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
}
|
|
10
10
|
/** Slider — one value along a hairline rail with a 48px knob; the whole range is thumb-tall. */
|
|
11
|
-
export declare function Slider({ label, glyph, className, style, ...input }: SliderProps): import("react").JSX.Element;
|
|
11
|
+
export declare function Slider({ label, glyph, className, style, onInput, ...input }: SliderProps): import("react").JSX.Element;
|
package/dist/choice/Slider.js
CHANGED
|
@@ -2,13 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
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
|
-
export function Slider({ label, glyph, className, style, ...input }) {
|
|
5
|
+
export function Slider({ label, glyph, className, style, onInput, ...input }) {
|
|
6
6
|
const range = useRef(null);
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const box = useRef(null);
|
|
8
|
+
// the knob's place along the rail, 0..1, published on the slider as --slider-at so the glyph can ride the knob (choice.css)
|
|
9
|
+
const place = () => {
|
|
10
|
+
const r = range.current;
|
|
11
|
+
if (!r || !box.current)
|
|
12
|
+
return;
|
|
13
|
+
const min = Number(r.min) || 0, max = Number(r.max) || 100;
|
|
14
|
+
box.current.style.setProperty('--slider-at', String(max > min ? Math.min(1, Math.max(0, (Number(r.value) - min) / (max - min))) : 0));
|
|
15
|
+
};
|
|
16
|
+
useEffect(place); // after every render: a controlled value, a new min / max
|
|
17
|
+
return (_jsxs("label", { ref: box, className: cx('slider', className), style: style, children: [label != null && _jsx("span", { className: "slider__label", children: label }), glyph != null && _jsx("span", { className: "slider__glyph", "aria-hidden": "true", children: glyph }), _jsx("input", { ref: range, className: "slider__range", type: "range", onInput: (e) => { place(); onInput?.(e); }, ...input })] }));
|
|
14
18
|
}
|
package/dist/forms/AddRow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface AddRowProps extends
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface AddRowProps extends ComponentProps<'button'> {
|
|
3
3
|
}
|
|
4
4
|
/** AddRow — the inline "+ add another" action under a list of fields. */
|
|
5
5
|
export declare function AddRow({ className, children, ...rest }: AddRowProps): import("react").JSX.Element;
|
package/dist/forms/Composer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface ComposerProps extends Omit<
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface ComposerProps extends Omit<ComponentProps<'textarea'>, 'className' | 'style'> {
|
|
3
3
|
/** the caption between the two buttons ("Your request is born") */
|
|
4
4
|
hint?: ReactNode;
|
|
5
5
|
/** the left button of the bar (an IconBtn — voice) */
|
package/dist/forms/Field.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { type IconName } from '../type/Icon.js';
|
|
3
|
-
export interface FieldProps extends Omit<
|
|
3
|
+
export interface FieldProps extends Omit<ComponentProps<'input'>, 'className' | 'style'> {
|
|
4
4
|
/** a leading icon (phone-call, plane, calendar-days) */
|
|
5
5
|
icon?: IconName;
|
|
6
6
|
/** an action inside the field, flush right — an `IconBtn sm invert` */
|
package/dist/forms/FileBtn.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface FileBtnProps extends Omit<
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface FileBtnProps extends Omit<ComponentProps<'input'>, 'type' | 'className' | 'style' | 'children'> {
|
|
3
3
|
/** the filled accent button — the one forward move */
|
|
4
4
|
primary?: boolean;
|
|
5
5
|
/** ink on whatever it sits on, a faint outline */
|
package/dist/forms/Pin.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface PinProps extends Omit<
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
export interface PinProps extends Omit<ComponentProps<'div'>, 'onChange' | 'defaultValue'> {
|
|
3
3
|
/** how many digits (4 or 6) */
|
|
4
4
|
length?: number;
|
|
5
|
-
/** digits
|
|
5
|
+
/** CONTROLLED: the digits so far, left to right ("03"). The app owns it — pair it with `onChange`. */
|
|
6
6
|
value?: string;
|
|
7
|
+
/** UNCONTROLLED: the digits it starts with; the Pin then keeps its own */
|
|
8
|
+
defaultValue?: string;
|
|
7
9
|
/** accessible name prefix for each cell ("Digit" → "Digit 1") */
|
|
8
10
|
label?: string;
|
|
9
|
-
/** the code so far, after every
|
|
11
|
+
/** the code so far, after every change; `complete` once every cell holds a digit */
|
|
10
12
|
onChange?: (code: string, complete: boolean) => void;
|
|
11
13
|
/** focus the first empty cell on mount */
|
|
12
14
|
autoFocus?: boolean;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Pin — big code entry, one digit per pill; a filled cell turns accent. Lives in a Sheet.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
+
* Its own behaviour, inside it: typing a digit moves to the next cell, Backspace in an empty cell moves back and clears, the
|
|
19
|
+
* arrows walk the cells, a pasted code fills them from the one it landed in; only digits stay. The first cell takes the SMS
|
|
20
|
+
* one-time-code autofill. The code is a VALUE, controlled like an input: `value` + `onChange`, or `defaultValue`.
|
|
18
21
|
*/
|
|
19
|
-
export declare function Pin({ length, value, label, onChange, autoFocus, className, ...rest }: PinProps): import("react").JSX.Element;
|
|
22
|
+
export declare function Pin({ length, value, defaultValue, label, onChange, autoFocus, className, ...rest }: PinProps): import("react").JSX.Element;
|