@usableapp/cardds 0.7.117 → 0.7.118
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 +24 -0
- package/css/actions.css +5 -4
- package/css/base.css +4 -1
- package/css/media.css +13 -1
- package/css/sheet.css +15 -6
- package/dist/cardds.css +37 -12
- package/dist/cards/Card.js +10 -1
- package/dist/catalog.json +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/media/Tile.d.ts +4 -2
- package/dist/media/Tile.js +3 -3
- package/dist/scaffold/Panes.js +11 -2
- package/dist/sheets/SheetSettings.d.ts +15 -0
- package/dist/sheets/SheetSettings.js +16 -0
- package/dist/type/Text.d.ts +13 -289
- package/dist/type/Text.js +45 -5
- package/docs/reference.md +16 -0
- package/lint/rules.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './sheets/Sheet.js';
|
|
|
32
32
|
export * from './sheets/SheetStage.js';
|
|
33
33
|
export * from './sheets/Step.js';
|
|
34
34
|
export * from './sheets/SheetSteps.js';
|
|
35
|
+
export * from './sheets/SheetSettings.js';
|
|
35
36
|
export * from './sheets/Modal.js';
|
|
36
37
|
export * from './actions/Btn.js';
|
|
37
38
|
export * from './actions/IconBtn.js';
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ export * from './sheets/Sheet.js';
|
|
|
36
36
|
export * from './sheets/SheetStage.js';
|
|
37
37
|
export * from './sheets/Step.js';
|
|
38
38
|
export * from './sheets/SheetSteps.js';
|
|
39
|
+
export * from './sheets/SheetSettings.js';
|
|
39
40
|
export * from './sheets/Modal.js';
|
|
40
41
|
export * from './actions/Btn.js';
|
|
41
42
|
export * from './actions/IconBtn.js';
|
package/dist/media/Tile.d.ts
CHANGED
|
@@ -33,13 +33,15 @@ export interface TileProps extends Omit<ComponentProps<'div'>, 'onChange'> {
|
|
|
33
33
|
upload?: boolean;
|
|
34
34
|
/** spans the whole grid */
|
|
35
35
|
wide?: boolean;
|
|
36
|
+
/** the icon at the start of the label's line, the sub under the label: a two-line tile */
|
|
37
|
+
inline?: boolean;
|
|
36
38
|
/** a slot tint */
|
|
37
39
|
tone?: 2 | 3 | 4 | 5;
|
|
38
40
|
/** div (default), button for a tap tile — pick tiles render as a label */
|
|
39
41
|
as?: 'div' | 'button';
|
|
40
42
|
}
|
|
41
|
-
/** Tile — a big square: icon top, label bottom; `pick` toggles, `upload` is the dashed slot. A `pick` or `upload` tile is filled in: On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18). A number with its icon and label in a cell is a `KvCell` (Lh 2026-10-20). */
|
|
42
|
-
export declare function Tile({ icon, label, sub, pick, type, name, checked, defaultChecked, onChange, on, upload, wide, tone, as, className, children, ...rest }: TileProps): import("react").DetailedReactHTMLElement<{
|
|
43
|
+
/** Tile — a big square: icon top, label bottom (`inline`: icon and label on one line, the sub under it); `pick` toggles, `upload` is the dashed slot. A `pick` or `upload` tile is filled in: On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18). A number with its icon and label in a cell is a `KvCell` (Lh 2026-10-20). */
|
|
44
|
+
export declare function Tile({ icon, label, sub, pick, type, name, checked, defaultChecked, onChange, on, upload, wide, inline, tone, as, className, children, ...rest }: TileProps): import("react").DetailedReactHTMLElement<{
|
|
43
45
|
translate?: "yes" | "no" | undefined | undefined;
|
|
44
46
|
slot?: string | undefined | undefined;
|
|
45
47
|
style?: import("react").CSSProperties | undefined;
|
package/dist/media/Tile.js
CHANGED
|
@@ -6,11 +6,11 @@ import { Icon } from '../type/Icon.js';
|
|
|
6
6
|
export function TileGrid({ cols3, bleed, className, ...rest }) {
|
|
7
7
|
return _jsx("div", { className: cx('tile-grid', cols3 && 'tile-grid--3', bleed && 'bleed', className), ...rest });
|
|
8
8
|
}
|
|
9
|
-
/** Tile — a big square: icon top, label bottom; `pick` toggles, `upload` is the dashed slot. A `pick` or `upload` tile is filled in: On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18). A number with its icon and label in a cell is a `KvCell` (Lh 2026-10-20). */
|
|
10
|
-
export function Tile({ icon, label, sub, pick, type = 'checkbox', name, checked, defaultChecked, onChange, on, upload, wide, tone, as, className, children, ...rest }) {
|
|
9
|
+
/** Tile — a big square: icon top, label bottom (`inline`: icon and label on one line, the sub under it); `pick` toggles, `upload` is the dashed slot. A `pick` or `upload` tile is filled in: On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18). A number with its icon and label in a cell is a `KvCell` (Lh 2026-10-20). */
|
|
10
|
+
export function Tile({ icon, label, sub, pick, type = 'checkbox', name, checked, defaultChecked, onChange, on, upload, wide, inline, tone, as, className, children, ...rest }) {
|
|
11
11
|
const el = pick ? 'label' : as ?? 'div';
|
|
12
12
|
const text = label != null && sub != null
|
|
13
13
|
? _jsxs("span", { className: "tile__text", children: [_jsx("span", { className: "tile__label", children: label }), _jsx("span", { className: "tile__sub", children: sub })] })
|
|
14
14
|
: label != null && _jsx("span", { className: "tile__label", children: label });
|
|
15
|
-
return createElement(el, { type: el === 'button' ? 'button' : undefined, className: cx('tile', pick && 'tile--pick', on && 'tile--on', upload && 'tile--upload', wide && 'tile--wide', tone && `tile--${tone}`, className), ...rest }, pick && _jsx("input", { type: type, name: name, checked: checked, defaultChecked: defaultChecked, onChange: onChange }), icon && _jsx(Icon, { name: icon }), text, children);
|
|
15
|
+
return createElement(el, { type: el === 'button' ? 'button' : undefined, className: cx('tile', pick && 'tile--pick', on && 'tile--on', upload && 'tile--upload', wide && 'tile--wide', inline && 'tile--inline', tone && `tile--${tone}`, className), ...rest }, pick && _jsx("input", { type: type, name: name, checked: checked, defaultChecked: defaultChecked, onChange: onChange }), icon && _jsx(Icon, { name: icon }), text, children);
|
|
16
16
|
}
|
package/dist/scaffold/Panes.js
CHANGED
|
@@ -20,11 +20,20 @@ export function Panes({ at, defaultAt = 0, onAtChange, dots = true, label, class
|
|
|
20
20
|
if (r && Math.abs(r.scrollLeft - current * r.clientWidth) > 1)
|
|
21
21
|
r.scrollTo({ left: current * r.clientWidth, behavior: smooth && !reducedMotion() ? 'smooth' : 'auto' });
|
|
22
22
|
};
|
|
23
|
+
const alignRef = useRef(align);
|
|
24
|
+
alignRef.current = align;
|
|
23
25
|
useLayoutEffect(() => { align(mounted.current); mounted.current = true; });
|
|
26
|
+
/* ONE watcher for the rail's life: a new one each render fires on arrival and its at-once align cuts the slide short */
|
|
24
27
|
useEffect(() => {
|
|
25
|
-
|
|
28
|
+
let width = rail.current?.clientWidth;
|
|
29
|
+
const stop = watchSize([rail.current], () => {
|
|
30
|
+
if (rail.current?.clientWidth === width)
|
|
31
|
+
return;
|
|
32
|
+
width = rail.current?.clientWidth;
|
|
33
|
+
alignRef.current(false);
|
|
34
|
+
});
|
|
26
35
|
return () => { stop(); atRest.cancel(); };
|
|
27
|
-
});
|
|
36
|
+
}, []);
|
|
28
37
|
/* the rail came to rest: the pane standing in it is where the member went */
|
|
29
38
|
const atRest = useSettled(() => {
|
|
30
39
|
const r = rail.current;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
export interface SheetSettingsProps extends ComponentProps<'div'> {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* SheetSettings — a settings sheet's content in sections, ALL open at once, one under another (Notifications · Display · Privacy).
|
|
6
|
+
* Each section is a `SheetSettingsGroup`: the same quiet title bar as a SheetStep's, then its own rows and controls. Nothing
|
|
7
|
+
* to go through: no order, no ✓, no folding, no finish — an order to walk is `SheetSteps`. Goes in a Sheet's `Body`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function SheetSettings({ className, ...rest }: SheetSettingsProps): import("react").JSX.Element;
|
|
10
|
+
export interface SheetSettingsGroupProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
11
|
+
/** the section's name, on its title bar — the group is labelled by it */
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/** SheetSettingsGroup — one section of a SheetSettings: its title bar (information, nothing to press), then what it holds (`Rows` of `Row` + `Toggle`, a `Field`). Always open. */
|
|
15
|
+
export declare function SheetSettingsGroup({ title, className, children, ...rest }: SheetSettingsGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { cx } from '../cx.js';
|
|
4
|
+
/**
|
|
5
|
+
* SheetSettings — a settings sheet's content in sections, ALL open at once, one under another (Notifications · Display · Privacy).
|
|
6
|
+
* Each section is a `SheetSettingsGroup`: the same quiet title bar as a SheetStep's, then its own rows and controls. Nothing
|
|
7
|
+
* to go through: no order, no ✓, no folding, no finish — an order to walk is `SheetSteps`. Goes in a Sheet's `Body`.
|
|
8
|
+
*/
|
|
9
|
+
export function SheetSettings({ className, ...rest }) {
|
|
10
|
+
return _jsx("div", { className: cx('sheet-settings', className), ...rest });
|
|
11
|
+
}
|
|
12
|
+
/** SheetSettingsGroup — one section of a SheetSettings: its title bar (information, nothing to press), then what it holds (`Rows` of `Row` + `Toggle`, a `Field`). Always open. */
|
|
13
|
+
export function SheetSettingsGroup({ title, className, children, ...rest }) {
|
|
14
|
+
const id = useId();
|
|
15
|
+
return (_jsxs("div", { className: cx('sheet-settings__group', className), role: "group", "aria-labelledby": id, ...rest, children: [_jsx("div", { className: "sheet-settings__head", children: _jsx("h3", { className: "sheet-settings__title", id: id, children: title }) }), _jsx("div", { className: "sheet-settings__body", children: children })] }));
|
|
16
|
+
}
|
package/dist/type/Text.d.ts
CHANGED
|
@@ -19,11 +19,17 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
19
19
|
/** the member may select and copy these words (a code, an address, a reference number) — everything else in a Screen is not
|
|
20
20
|
* selectable, like a native app (Lh 2026-09-25) */
|
|
21
21
|
selectable?: boolean;
|
|
22
|
-
/** body only: the
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
|
|
22
|
+
/** body only: a long text is CUT and opens in place on a tap — the box shows `--text-scroll-lines` lines (knob, default 3.6: a part of the next line peeks out)
|
|
23
|
+
* with a chevron under it; a tap on the box or the chevron opens the whole text there (the chevron turns up), a tap again folds it. A text that fits
|
|
24
|
+
* is shown as it is: no chevron, no tap. A cut text is a control: it never turns a turning card nor presses a card's one foot button.
|
|
25
|
+
* `--text-scroll-size` (knob, a length) makes the closed box ALWAYS that tall; `3.6lh` keeps 3.6 lines at every text size */
|
|
26
|
+
expand?: boolean;
|
|
27
|
+
/** CONTROLLED (`expand`): the whole text shows — pair it with `onOpenChange`. The app owns it */
|
|
28
|
+
open?: boolean;
|
|
29
|
+
/** UNCONTROLLED (`expand`): it starts open (default false) */
|
|
30
|
+
defaultOpen?: boolean;
|
|
31
|
+
/** (`expand`) a tap asked to open or fold the text */
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
33
|
/** the element; defaults per level (h2 for display/h1/h2, p for title/body/stat, span for the rest) */
|
|
28
34
|
as?: 'h1' | 'h2' | 'h3' | 'p' | 'span' | 'strong' | 'div';
|
|
29
35
|
}
|
|
@@ -31,288 +37,6 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
31
37
|
* Text — one of cardds's type levels (`.t-display` … `.t-stat`).
|
|
32
38
|
* Headings inside a card head are h2 by default; a screen title in a TopBar is h1.
|
|
33
39
|
* Everything scales from the root font-size, so there are no pixel sizes to pick.
|
|
40
|
+
* `expand` (body): a long text is cut under a chevron and opens in place on a tap; a text that fits is only read.
|
|
34
41
|
*/
|
|
35
|
-
export declare function Text({ level, xl, mono, muted, caps, grow, sr, selectable,
|
|
36
|
-
/** the element it renders (React 19 passes `ref` as a prop) */
|
|
37
|
-
ref?: React.Ref<HTMLElement>;
|
|
38
|
-
defaultChecked?: boolean | undefined;
|
|
39
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
40
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
41
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
42
|
-
accessKey?: string | undefined;
|
|
43
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
44
|
-
autoFocus?: boolean | undefined;
|
|
45
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
46
|
-
contextMenu?: string | undefined;
|
|
47
|
-
dir?: string | undefined;
|
|
48
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
49
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
50
|
-
hidden?: boolean | undefined;
|
|
51
|
-
id?: string | undefined;
|
|
52
|
-
lang?: string | undefined;
|
|
53
|
-
nonce?: string | undefined;
|
|
54
|
-
slot?: string | undefined;
|
|
55
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
56
|
-
style?: import("react").CSSProperties | undefined;
|
|
57
|
-
tabIndex?: number | undefined;
|
|
58
|
-
title?: string | undefined;
|
|
59
|
-
translate?: "yes" | "no" | undefined;
|
|
60
|
-
radioGroup?: string | undefined;
|
|
61
|
-
role?: import("react").AriaRole | undefined;
|
|
62
|
-
about?: string | undefined;
|
|
63
|
-
content?: string | undefined;
|
|
64
|
-
datatype?: string | undefined;
|
|
65
|
-
inlist?: any;
|
|
66
|
-
prefix?: string | undefined;
|
|
67
|
-
property?: string | undefined;
|
|
68
|
-
rel?: string | undefined;
|
|
69
|
-
resource?: string | undefined;
|
|
70
|
-
rev?: string | undefined;
|
|
71
|
-
typeof?: string | undefined;
|
|
72
|
-
vocab?: string | undefined;
|
|
73
|
-
autoCorrect?: string | undefined;
|
|
74
|
-
autoSave?: string | undefined;
|
|
75
|
-
color?: string | undefined;
|
|
76
|
-
itemProp?: string | undefined;
|
|
77
|
-
itemScope?: boolean | undefined;
|
|
78
|
-
itemType?: string | undefined;
|
|
79
|
-
itemID?: string | undefined;
|
|
80
|
-
itemRef?: string | undefined;
|
|
81
|
-
results?: number | undefined;
|
|
82
|
-
security?: string | undefined;
|
|
83
|
-
unselectable?: "on" | "off" | undefined;
|
|
84
|
-
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
85
|
-
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
86
|
-
popoverTarget?: string | undefined;
|
|
87
|
-
inert?: boolean | undefined;
|
|
88
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
89
|
-
is?: string | undefined;
|
|
90
|
-
exportparts?: string | undefined;
|
|
91
|
-
part?: string | undefined;
|
|
92
|
-
"aria-activedescendant"?: string | undefined;
|
|
93
|
-
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
94
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
95
|
-
"aria-braillelabel"?: string | undefined;
|
|
96
|
-
"aria-brailleroledescription"?: string | undefined;
|
|
97
|
-
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
98
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
99
|
-
"aria-colcount"?: number | undefined;
|
|
100
|
-
"aria-colindex"?: number | undefined;
|
|
101
|
-
"aria-colindextext"?: string | undefined;
|
|
102
|
-
"aria-colspan"?: number | undefined;
|
|
103
|
-
"aria-controls"?: string | undefined;
|
|
104
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
105
|
-
"aria-describedby"?: string | undefined;
|
|
106
|
-
"aria-description"?: string | undefined;
|
|
107
|
-
"aria-details"?: string | undefined;
|
|
108
|
-
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
109
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
110
|
-
"aria-errormessage"?: string | undefined;
|
|
111
|
-
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
112
|
-
"aria-flowto"?: string | undefined;
|
|
113
|
-
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
114
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
115
|
-
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
116
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
117
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
118
|
-
"aria-label"?: string | undefined;
|
|
119
|
-
"aria-labelledby"?: string | undefined;
|
|
120
|
-
"aria-level"?: number | undefined;
|
|
121
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
122
|
-
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
123
|
-
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
124
|
-
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
125
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
126
|
-
"aria-owns"?: string | undefined;
|
|
127
|
-
"aria-placeholder"?: string | undefined;
|
|
128
|
-
"aria-posinset"?: number | undefined;
|
|
129
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
130
|
-
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
131
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
132
|
-
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
133
|
-
"aria-roledescription"?: string | undefined;
|
|
134
|
-
"aria-rowcount"?: number | undefined;
|
|
135
|
-
"aria-rowindex"?: number | undefined;
|
|
136
|
-
"aria-rowindextext"?: string | undefined;
|
|
137
|
-
"aria-rowspan"?: number | undefined;
|
|
138
|
-
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
139
|
-
"aria-setsize"?: number | undefined;
|
|
140
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
141
|
-
"aria-valuemax"?: number | undefined;
|
|
142
|
-
"aria-valuemin"?: number | undefined;
|
|
143
|
-
"aria-valuenow"?: number | undefined;
|
|
144
|
-
"aria-valuetext"?: string | undefined;
|
|
145
|
-
children?: import("react").ReactNode | undefined;
|
|
146
|
-
dangerouslySetInnerHTML?: {
|
|
147
|
-
__html: string | TrustedHTML;
|
|
148
|
-
} | undefined;
|
|
149
|
-
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
150
|
-
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
151
|
-
onCut?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
152
|
-
onCutCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
153
|
-
onPaste?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
154
|
-
onPasteCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
155
|
-
onCompositionEnd?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
156
|
-
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
157
|
-
onCompositionStart?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
158
|
-
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
159
|
-
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
160
|
-
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
161
|
-
onFocus?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
162
|
-
onFocusCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
163
|
-
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
164
|
-
onBlurCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
165
|
-
onChange?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
166
|
-
onChangeCapture?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
167
|
-
onBeforeInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
168
|
-
onBeforeInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
169
|
-
onInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
170
|
-
onInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
171
|
-
onReset?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
172
|
-
onResetCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
173
|
-
onSubmit?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
174
|
-
onSubmitCapture?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
175
|
-
onInvalid?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
176
|
-
onInvalidCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
177
|
-
onLoad?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
178
|
-
onLoadCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
179
|
-
onError?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
180
|
-
onErrorCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
181
|
-
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
182
|
-
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
183
|
-
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
184
|
-
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
185
|
-
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
186
|
-
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
187
|
-
onAbort?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
188
|
-
onAbortCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
189
|
-
onCanPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
190
|
-
onCanPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
191
|
-
onCanPlayThrough?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
192
|
-
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
193
|
-
onDurationChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
194
|
-
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
195
|
-
onEmptied?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
196
|
-
onEmptiedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
197
|
-
onEncrypted?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
198
|
-
onEncryptedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
199
|
-
onEnded?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
200
|
-
onEndedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
201
|
-
onLoadedData?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
202
|
-
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
203
|
-
onLoadedMetadata?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
204
|
-
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
205
|
-
onLoadStart?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
206
|
-
onLoadStartCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
207
|
-
onPause?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
208
|
-
onPauseCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
209
|
-
onPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
210
|
-
onPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onPlaying?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
212
|
-
onPlayingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
213
|
-
onProgress?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
214
|
-
onProgressCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
215
|
-
onRateChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
216
|
-
onRateChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
217
|
-
onSeeked?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
218
|
-
onSeekedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
219
|
-
onSeeking?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
220
|
-
onSeekingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
221
|
-
onStalled?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
222
|
-
onStalledCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
223
|
-
onSuspend?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
224
|
-
onSuspendCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
225
|
-
onTimeUpdate?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
226
|
-
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
227
|
-
onVolumeChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
228
|
-
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
229
|
-
onWaiting?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
230
|
-
onWaitingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
231
|
-
onAuxClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
232
|
-
onAuxClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
233
|
-
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
234
|
-
onClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
235
|
-
onContextMenu?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
236
|
-
onContextMenuCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
237
|
-
onDoubleClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
238
|
-
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
239
|
-
onDrag?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
240
|
-
onDragCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
241
|
-
onDragEnd?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
242
|
-
onDragEndCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
243
|
-
onDragEnter?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
244
|
-
onDragEnterCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
245
|
-
onDragExit?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
246
|
-
onDragExitCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
247
|
-
onDragLeave?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
248
|
-
onDragLeaveCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
249
|
-
onDragOver?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
250
|
-
onDragOverCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
251
|
-
onDragStart?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
252
|
-
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
253
|
-
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
254
|
-
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
255
|
-
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
256
|
-
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
257
|
-
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
258
|
-
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
259
|
-
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
260
|
-
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
261
|
-
onMouseOut?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
262
|
-
onMouseOutCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
263
|
-
onMouseOver?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
264
|
-
onMouseOverCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
265
|
-
onMouseUp?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
266
|
-
onMouseUpCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
267
|
-
onSelect?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
268
|
-
onSelectCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
269
|
-
onTouchCancel?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
270
|
-
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
271
|
-
onTouchEnd?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
272
|
-
onTouchEndCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
273
|
-
onTouchMove?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
274
|
-
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
275
|
-
onTouchStart?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
276
|
-
onTouchStartCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
277
|
-
onPointerDown?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
278
|
-
onPointerDownCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
279
|
-
onPointerMove?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
280
|
-
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
281
|
-
onPointerUp?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
282
|
-
onPointerUpCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
283
|
-
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
284
|
-
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
285
|
-
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
286
|
-
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
287
|
-
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
288
|
-
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
289
|
-
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
290
|
-
onPointerOutCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
291
|
-
onGotPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
292
|
-
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
293
|
-
onLostPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
294
|
-
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
295
|
-
onScroll?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
296
|
-
onScrollCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
297
|
-
onScrollEnd?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
298
|
-
onScrollEndCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
299
|
-
onWheel?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
300
|
-
onWheelCapture?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
301
|
-
onAnimationStart?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
302
|
-
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
303
|
-
onAnimationEnd?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
304
|
-
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
305
|
-
onAnimationIteration?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
306
|
-
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
307
|
-
onToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
308
|
-
onBeforeToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
309
|
-
onTransitionCancel?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
310
|
-
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
311
|
-
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
312
|
-
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
313
|
-
onTransitionRun?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
314
|
-
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
315
|
-
onTransitionStart?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
316
|
-
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
317
|
-
className: string;
|
|
318
|
-
}, HTMLElement>;
|
|
42
|
+
export declare function Text({ level, xl, mono, muted, caps, grow, sr, selectable, expand, open, defaultOpen, onOpenChange, as, className, ...rest }: TextProps): import("react").JSX.Element;
|
package/dist/type/Text.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createElement, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
2
3
|
import { cx } from '../cx.js';
|
|
4
|
+
import { useControlled, useLatest } from '../state.js';
|
|
5
|
+
import { Icon } from './Icon.js';
|
|
3
6
|
const DEFAULT_AS = {
|
|
4
7
|
display: 'h2', h1: 'h2', h2: 'h2', title: 'p', body: 'p', label: 'span', caption: 'span', stat: 'p',
|
|
5
8
|
};
|
|
@@ -7,10 +10,47 @@ const DEFAULT_AS = {
|
|
|
7
10
|
* Text — one of cardds's type levels (`.t-display` … `.t-stat`).
|
|
8
11
|
* Headings inside a card head are h2 by default; a screen title in a TopBar is h1.
|
|
9
12
|
* Everything scales from the root font-size, so there are no pixel sizes to pick.
|
|
13
|
+
* `expand` (body): a long text is cut under a chevron and opens in place on a tap; a text that fits is only read.
|
|
10
14
|
*/
|
|
11
|
-
export function Text({ level, xl, mono, muted, caps, grow, sr, selectable,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
...rest,
|
|
15
|
+
export function Text({ level, xl, mono, muted, caps, grow, sr, selectable, expand, open, defaultOpen = false, onOpenChange, as, className, ...rest }) {
|
|
16
|
+
const words = cx(`t-${level}`, level === 'stat' && xl && 't-stat--xl', level === 'stat' && mono && 't-stat--mono', muted && 't-muted', caps && 't-caps', grow && 'grow', sr && 't-sr', selectable && 't-select');
|
|
17
|
+
if (expand && level === 'body')
|
|
18
|
+
return _jsx(Expand, { ...rest, words: words, as: as ?? 'p', open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange, className: className });
|
|
19
|
+
return createElement(as ?? DEFAULT_AS[level] ?? 'span', { className: cx(words, className), ...rest });
|
|
20
|
+
}
|
|
21
|
+
/* the cut text: the box is measured while it is closed (every render, and when its width changes); only a text that does not fit is a control */
|
|
22
|
+
function Expand({ words, as, open, defaultOpen = false, onOpenChange, className, children, onClick, onKeyDown, ...rest }) {
|
|
23
|
+
const [shown, ask] = useControlled(open, defaultOpen, onOpenChange);
|
|
24
|
+
const [more, setMore] = useState(false);
|
|
25
|
+
const opened = more && shown;
|
|
26
|
+
const box = useRef(null);
|
|
27
|
+
const measure = useLatest(() => {
|
|
28
|
+
const el = box.current;
|
|
29
|
+
if (el && !opened)
|
|
30
|
+
setMore(el.scrollHeight > el.clientHeight + 1); // open, the box is as tall as the text: nothing to measure until it folds
|
|
15
31
|
});
|
|
32
|
+
useLayoutEffect(() => measure.current());
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const el = box.current;
|
|
35
|
+
if (!el)
|
|
36
|
+
return;
|
|
37
|
+
const ro = new ResizeObserver(() => measure.current());
|
|
38
|
+
ro.observe(el);
|
|
39
|
+
return () => ro.disconnect();
|
|
40
|
+
}, []);
|
|
41
|
+
const control = more ? {
|
|
42
|
+
role: 'button',
|
|
43
|
+
tabIndex: 0,
|
|
44
|
+
'aria-expanded': opened,
|
|
45
|
+
onClick: (e) => { onClick?.(e); if (!e.defaultPrevented)
|
|
46
|
+
ask(!opened); },
|
|
47
|
+
onKeyDown: (e) => {
|
|
48
|
+
onKeyDown?.(e);
|
|
49
|
+
if (e.defaultPrevented || (e.key !== 'Enter' && e.key !== ' '))
|
|
50
|
+
return;
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
ask(!opened);
|
|
53
|
+
},
|
|
54
|
+
} : { onClick, onKeyDown };
|
|
55
|
+
return createElement('div', { ...rest, ...control, className: cx('t-expand', more && 't-expand--more', opened && 'is-open', className) }, createElement(as, { ref: box, className: cx(words, 't-scroll') }, children), more && _jsx(Icon, { name: opened ? 'chevron-up' : 'chevron-down', className: "t-expand__sign" }));
|
|
16
56
|
}
|
package/docs/reference.md
CHANGED
|
@@ -699,6 +699,15 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
|
|
|
699
699
|
sheet is `.card.sheet` — and both obey rule 8: rigid, full height, moved
|
|
700
700
|
by `translate` only. (The stack was first named "card stack": wrong, and
|
|
701
701
|
retired.) See them live in the gallery: `Sheet`, `SheetStack`.
|
|
702
|
+
- **Steps or settings: an order, or sections side by side** (Lh 2026-10-25).
|
|
703
|
+
`SheetSteps` is ONE task the member goes through in order (phone · code ·
|
|
704
|
+
PIN): one step open, the done ones folded with a ✓, the app moves `at`.
|
|
705
|
+
`SheetSettings` is a settings sheet: sections (`SheetSettingsGroup title`)
|
|
706
|
+
ALL open at once, one under another, each its own rows and controls, with
|
|
707
|
+
no order, no ✓, no folding and no finish. Both wear the same title bar —
|
|
708
|
+
one rule in `sheet.css`, the same `--sheet-step-bar-*` knobs — and in
|
|
709
|
+
settings the bar is information, nothing to press. Never build settings
|
|
710
|
+
out of steps. Gallery `SheetSettings`.
|
|
702
711
|
- **A step is one screen, one task: `.step`.** What the member reads is
|
|
703
712
|
words on the base (`.page` — the same block as anywhere on the base; it was `.step__card` until 2026-09-16); what the member does, if the step asks for it, is a
|
|
704
713
|
`.sheet` in front of it; the screen's one move is `.action-bar`, the screen's
|
|
@@ -1314,3 +1323,10 @@ is not drawn (`TopBar` warns once) — more moves go in a `Menu` behind one butt
|
|
|
1314
1323
|
`t-label` 13 · `t-caption` 12 · `t-stat` big tabular
|
|
1315
1324
|
numbers (`t-stat--mono`, `t-stat--xl`). Pixel values are at the default root;
|
|
1316
1325
|
each is an `--fs-*` rem token. Swap `--font-display` per app for character.
|
|
1326
|
+
|
|
1327
|
+
**A long body text is cut and opens in place** (`Text level="body" expand`, Lh 2026-10-25): the box shows
|
|
1328
|
+
`--text-scroll-lines` lines (default 3.6, a part of the next line peeks out) with a chevron under it; a tap on the box
|
|
1329
|
+
or the chevron opens the whole text there (the chevron turns up), a tap folds it. Nothing scrolls inside.
|
|
1330
|
+
Only a text that does not fit is a control (`role="button"`, `aria-expanded`, Enter/Space): so it never turns
|
|
1331
|
+
a turning card, and a card holding it beside one foot button is no longer pressed whole. A text that fits is
|
|
1332
|
+
only read. `open` + `onOpenChange`, or `defaultOpen`. `--text-scroll-size` (a length) fixes the closed box.
|
package/lint/rules.mjs
CHANGED
|
@@ -249,7 +249,7 @@ export function checkSource(source, file, { classes = carddsClasses() } = {}) {
|
|
|
249
249
|
// a Sheet's or a Modal's own children are its rows: content in it stands in its Body (a Modal's answers in its ModalAsk; the one control of a
|
|
250
250
|
// head, a Dropdown or a Toggle, in its Head). A Body is the sheet's when nothing round it in this file says otherwise; in a Card it is the card's (field-in-card)
|
|
251
251
|
...span(/<(?:Sheet|Modal)\b(?![\w.])/g).map((p) => ({ ...p, ground: false, rows: true })),
|
|
252
|
-
...span(/<(?:Body|SheetStep|StackSheet|SheetStack|CallSheet|ModalAsk)\b(?![\w.])/g).map((p) => ({ ...p, ground: false })), // a modal is a surface over the screen too
|
|
252
|
+
...span(/<(?:Body|SheetStep|SheetSettingsGroup|StackSheet|SheetStack|CallSheet|ModalAsk)\b(?![\w.])/g).map((p) => ({ ...p, ground: false })), // a modal is a surface over the screen too
|
|
253
253
|
...span(/<(?:ActionBarTier|FilterRow|TopBar|AppBar)\b(?![\w.])/g).map((p) => ({ ...p, ground: false })), // a bar's control: a Slider in a control tier, a Dropdown in a filter row or a top bar's actions, a Toggle in an app bar
|
|
254
254
|
...span(/<(?:Page|Pages|Step|Screen)\b(?![\w.])/g).map((p) => ({ ...p, ground: true })),
|
|
255
255
|
...cards.map((p) => ({ ...p, ground: false })), // a card round it is field-in-card's finding
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.118",
|
|
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.",
|