@usableapp/cardds 0.1.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.
Files changed (170) hide show
  1. package/README.md +562 -0
  2. package/cardds.css +18 -0
  3. package/cardds.js +473 -0
  4. package/css/actions.css +292 -0
  5. package/css/base.css +128 -0
  6. package/css/card.css +283 -0
  7. package/css/choice.css +297 -0
  8. package/css/fonts.css +37 -0
  9. package/css/forms.css +64 -0
  10. package/css/journey.css +61 -0
  11. package/css/layover.css +243 -0
  12. package/css/lists.css +142 -0
  13. package/css/media.css +232 -0
  14. package/css/numbers.css +258 -0
  15. package/css/palette.css +112 -0
  16. package/css/people.css +79 -0
  17. package/css/sheet.css +295 -0
  18. package/css/stack.css +262 -0
  19. package/css/step.css +71 -0
  20. package/css/tokens.css +177 -0
  21. package/dist/actions/Btn.d.ts +311 -0
  22. package/dist/actions/Btn.js +14 -0
  23. package/dist/actions/BtnRow.d.ts +5 -0
  24. package/dist/actions/BtnRow.js +6 -0
  25. package/dist/actions/Chip.d.ts +328 -0
  26. package/dist/actions/Chip.js +25 -0
  27. package/dist/actions/Dot.d.ts +7 -0
  28. package/dist/actions/Dot.js +6 -0
  29. package/dist/actions/Dropdown.d.ts +34 -0
  30. package/dist/actions/Dropdown.js +19 -0
  31. package/dist/actions/Fab.d.ts +9 -0
  32. package/dist/actions/Fab.js +7 -0
  33. package/dist/actions/IconBtn.d.ts +308 -0
  34. package/dist/actions/IconBtn.js +8 -0
  35. package/dist/actions/Link.d.ts +301 -0
  36. package/dist/actions/Link.js +8 -0
  37. package/dist/actions/Segment.d.ts +11 -0
  38. package/dist/actions/Segment.js +10 -0
  39. package/dist/cardds.css +3068 -0
  40. package/dist/cards/Card.d.ts +310 -0
  41. package/dist/cards/Card.js +14 -0
  42. package/dist/cards/CardFoot.d.ts +5 -0
  43. package/dist/cards/CardFoot.js +6 -0
  44. package/dist/cards/CardHead.d.ts +21 -0
  45. package/dist/cards/CardHead.js +11 -0
  46. package/dist/cards/CardParts.d.ts +25 -0
  47. package/dist/cards/CardParts.js +26 -0
  48. package/dist/cards/Placeholder.d.ts +9 -0
  49. package/dist/cards/Placeholder.js +6 -0
  50. package/dist/cards/Stat.d.ts +17 -0
  51. package/dist/cards/Stat.js +14 -0
  52. package/dist/choice/Calendar.d.ts +23 -0
  53. package/dist/choice/Calendar.js +7 -0
  54. package/dist/choice/Check.d.ts +14 -0
  55. package/dist/choice/Check.js +10 -0
  56. package/dist/choice/DayStrip.d.ts +16 -0
  57. package/dist/choice/DayStrip.js +10 -0
  58. package/dist/choice/Mood.d.ts +11 -0
  59. package/dist/choice/Mood.js +6 -0
  60. package/dist/choice/Slider.d.ts +11 -0
  61. package/dist/choice/Slider.js +14 -0
  62. package/dist/cx.d.ts +2 -0
  63. package/dist/cx.js +2 -0
  64. package/dist/forms/AddRow.d.ts +5 -0
  65. package/dist/forms/AddRow.js +7 -0
  66. package/dist/forms/Composer.d.ts +13 -0
  67. package/dist/forms/Composer.js +6 -0
  68. package/dist/forms/Field.d.ts +17 -0
  69. package/dist/forms/Field.js +10 -0
  70. package/dist/forms/FileBtn.d.ts +18 -0
  71. package/dist/forms/FileBtn.js +10 -0
  72. package/dist/forms/Pin.d.ts +19 -0
  73. package/dist/forms/Pin.js +27 -0
  74. package/dist/index.d.ts +72 -0
  75. package/dist/index.js +75 -0
  76. package/dist/journey/NoteRow.d.ts +7 -0
  77. package/dist/journey/NoteRow.js +7 -0
  78. package/dist/journey/Route.d.ts +18 -0
  79. package/dist/journey/Route.js +8 -0
  80. package/dist/journey/TileBadge.d.ts +15 -0
  81. package/dist/journey/TileBadge.js +6 -0
  82. package/dist/layover/Banner.d.ts +9 -0
  83. package/dist/layover/Banner.js +6 -0
  84. package/dist/layover/Callout.d.ts +10 -0
  85. package/dist/layover/Callout.js +6 -0
  86. package/dist/layover/Deck.d.ts +9 -0
  87. package/dist/layover/Deck.js +10 -0
  88. package/dist/lists/Kv.d.ts +27 -0
  89. package/dist/lists/Kv.js +19 -0
  90. package/dist/lists/Legend.d.ts +11 -0
  91. package/dist/lists/Legend.js +11 -0
  92. package/dist/lists/Row.d.ts +319 -0
  93. package/dist/lists/Row.js +17 -0
  94. package/dist/lists/Timeline.d.ts +11 -0
  95. package/dist/lists/Timeline.js +10 -0
  96. package/dist/media/MapArea.d.ts +20 -0
  97. package/dist/media/MapArea.js +11 -0
  98. package/dist/media/Mosaic.d.ts +11 -0
  99. package/dist/media/Mosaic.js +10 -0
  100. package/dist/media/Postcard.d.ts +20 -0
  101. package/dist/media/Postcard.js +10 -0
  102. package/dist/media/Quote.d.ts +11 -0
  103. package/dist/media/Quote.js +6 -0
  104. package/dist/media/Tile.d.ts +320 -0
  105. package/dist/media/Tile.js +16 -0
  106. package/dist/numbers/Badge.d.ts +7 -0
  107. package/dist/numbers/Badge.js +6 -0
  108. package/dist/numbers/Band.d.ts +16 -0
  109. package/dist/numbers/Band.js +10 -0
  110. package/dist/numbers/Bars.d.ts +14 -0
  111. package/dist/numbers/Bars.js +10 -0
  112. package/dist/numbers/DotGrid.d.ts +12 -0
  113. package/dist/numbers/DotGrid.js +6 -0
  114. package/dist/numbers/Picker.d.ts +13 -0
  115. package/dist/numbers/Picker.js +18 -0
  116. package/dist/numbers/Ring.d.ts +15 -0
  117. package/dist/numbers/Ring.js +6 -0
  118. package/dist/numbers/Track.d.ts +12 -0
  119. package/dist/numbers/Track.js +10 -0
  120. package/dist/people/Avatar.d.ts +314 -0
  121. package/dist/people/Avatar.js +13 -0
  122. package/dist/people/AvatarPick.d.ts +18 -0
  123. package/dist/people/AvatarPick.js +10 -0
  124. package/dist/scaffold/ActionBar.d.ts +21 -0
  125. package/dist/scaffold/ActionBar.js +16 -0
  126. package/dist/scaffold/AppBar.d.ts +18 -0
  127. package/dist/scaffold/AppBar.js +10 -0
  128. package/dist/scaffold/Centre.d.ts +30 -0
  129. package/dist/scaffold/Centre.js +41 -0
  130. package/dist/scaffold/EmptyState.d.ts +14 -0
  131. package/dist/scaffold/EmptyState.js +8 -0
  132. package/dist/scaffold/FilterRow.d.ts +5 -0
  133. package/dist/scaffold/FilterRow.js +6 -0
  134. package/dist/scaffold/FloatBar.d.ts +310 -0
  135. package/dist/scaffold/FloatBar.js +15 -0
  136. package/dist/scaffold/PagerAt.d.ts +11 -0
  137. package/dist/scaffold/PagerAt.js +6 -0
  138. package/dist/scaffold/Screen.d.ts +299 -0
  139. package/dist/scaffold/Screen.js +11 -0
  140. package/dist/scaffold/Section.d.ts +12 -0
  141. package/dist/scaffold/Section.js +13 -0
  142. package/dist/scaffold/TopBar.d.ts +15 -0
  143. package/dist/scaffold/TopBar.js +9 -0
  144. package/dist/sheets/CardBack.d.ts +7 -0
  145. package/dist/sheets/CardBack.js +7 -0
  146. package/dist/sheets/Drawer.d.ts +17 -0
  147. package/dist/sheets/Drawer.js +16 -0
  148. package/dist/sheets/Sheet.d.ts +21 -0
  149. package/dist/sheets/Sheet.js +13 -0
  150. package/dist/sheets/SheetBody.d.ts +5 -0
  151. package/dist/sheets/SheetBody.js +6 -0
  152. package/dist/sheets/SheetHead.d.ts +13 -0
  153. package/dist/sheets/SheetHead.js +6 -0
  154. package/dist/sheets/SheetStack.d.ts +21 -0
  155. package/dist/sheets/SheetStack.js +14 -0
  156. package/dist/sheets/SheetStage.d.ts +20 -0
  157. package/dist/sheets/SheetStage.js +11 -0
  158. package/dist/sheets/Step.d.ts +15 -0
  159. package/dist/sheets/Step.js +15 -0
  160. package/dist/type/Icon.d.ts +16 -0
  161. package/dist/type/Icon.js +12 -0
  162. package/dist/type/Text.d.ts +302 -0
  163. package/dist/type/Text.js +16 -0
  164. package/dist/type/icons.d.ts +6 -0
  165. package/dist/type/icons.js +2 -0
  166. package/fonts/LICENSES.md +44 -0
  167. package/fonts/fc-pride-medium.otf +0 -0
  168. package/fonts/pk-nonthaburi-demo.ttf +0 -0
  169. package/icons.svg +61 -0
  170. package/package.json +62 -0
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from 'react';
3
+ import { cx } from '../cx';
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 }) {
6
+ const range = useRef(null);
7
+ // the knob's place is published by cardds.js on every input event; on mount it publishes once
8
+ // for the value the slider starts at, so a glyph sits on the knob before the first move
9
+ useEffect(() => {
10
+ if (glyph != null && range.current)
11
+ range.current.dispatchEvent(new Event('input', { bubbles: true }));
12
+ }, [glyph]);
13
+ return (_jsxs("label", { 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", ...input })] }));
14
+ }
package/dist/cx.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** joins class names, dropping the falsy ones — every component builds its class list with it */
2
+ export declare const cx: (...parts: Array<string | false | null | undefined | 0>) => string;
package/dist/cx.js ADDED
@@ -0,0 +1,2 @@
1
+ /** joins class names, dropping the falsy ones — every component builds its class list with it */
2
+ export const cx = (...parts) => parts.filter(Boolean).join(' ');
@@ -0,0 +1,5 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export interface AddRowProps extends ComponentPropsWithoutRef<'button'> {
3
+ }
4
+ /** AddRow — the inline "+ add another" action under a list of fields. */
5
+ export declare function AddRow({ className, children, ...rest }: AddRowProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Icon } from '../type/Icon';
4
+ /** AddRow — the inline "+ add another" action under a list of fields. */
5
+ export function AddRow({ className, children, ...rest }) {
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] }));
7
+ }
@@ -0,0 +1,13 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface ComposerProps extends Omit<ComponentPropsWithoutRef<'textarea'>, 'className' | 'style'> {
3
+ /** the caption between the two buttons ("Your request is born") */
4
+ hint?: ReactNode;
5
+ /** the left button of the bar (an IconBtn — voice) */
6
+ lead?: ReactNode;
7
+ /** the right button of the bar (an `IconBtn invert` — send) */
8
+ send?: ReactNode;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+ /** Composer — a big write-in area (display type) with a bottom bar: icon · hint · send. The write-in step's sheet content. */
13
+ export declare function Composer({ hint, lead, send, className, style, ...textarea }: ComposerProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ /** Composer — a big write-in area (display type) with a bottom bar: icon · hint · send. The write-in step's sheet content. */
4
+ export function Composer({ hint, lead, send, className, style, ...textarea }) {
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] })] }));
6
+ }
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { type IconName } from '../type/Icon';
3
+ export interface FieldProps extends Omit<ComponentPropsWithoutRef<'input'>, 'className' | 'style'> {
4
+ /** a leading icon (phone-call, plane, calendar-days) */
5
+ icon?: IconName;
6
+ /** an action inside the field, flush right — an `IconBtn sm invert` */
7
+ action?: ReactNode;
8
+ /** the accessible name when the placeholder is not enough */
9
+ label?: string;
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ }
13
+ /**
14
+ * Field — the flat outlined input: the LABEL IS THE PLACEHOLDER. 48px tall (56px with an action inside).
15
+ * Fields belong in a Sheet (what the member acts on), 1–3 per step, never in a reading card.
16
+ */
17
+ export declare function Field({ icon, action, label, className, style, ...input }: FieldProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Icon } from '../type/Icon';
4
+ /**
5
+ * Field — the flat outlined input: the LABEL IS THE PLACEHOLDER. 48px tall (56px with an action inside).
6
+ * Fields belong in a Sheet (what the member acts on), 1–3 per step, never in a reading card.
7
+ */
8
+ export function Field({ icon, action, label, className, style, ...input }) {
9
+ return (_jsxs("label", { className: cx('field', action != null && 'field--action', className), style: style, children: [icon && _jsx(Icon, { name: icon, size: "sm" }), _jsx("input", { "aria-label": label, ...input }), action] }));
10
+ }
@@ -0,0 +1,18 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface FileBtnProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'className' | 'style' | 'children'> {
3
+ /** the filled accent button — the one forward move */
4
+ primary?: boolean;
5
+ /** ink on whatever it sits on, a faint outline */
6
+ quiet?: boolean;
7
+ /** full width */
8
+ block?: boolean;
9
+ /** the button's words (and an Icon, if any) */
10
+ children?: ReactNode;
11
+ className?: string;
12
+ }
13
+ /**
14
+ * FileBtn — a Btn that opens the device's file picker: the button IS the label of a hidden file input, so the
15
+ * whole button is the tap target and nothing is forwarded by script. `accept="image/*" capture="environment"`
16
+ * opens the camera; without `capture` the gallery. The picked file arrives in `onChange` like any input.
17
+ */
18
+ export declare function FileBtn({ primary, quiet, block, className, children, ...input }: FileBtnProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ /**
4
+ * FileBtn — a Btn that opens the device's file picker: the button IS the label of a hidden file input, so the
5
+ * whole button is the tap target and nothing is forwarded by script. `accept="image/*" capture="environment"`
6
+ * opens the camera; without `capture` the gallery. The picked file arrives in `onChange` like any input.
7
+ */
8
+ export function FileBtn({ primary, quiet, block, className, children, ...input }) {
9
+ return (_jsxs("label", { className: cx('btn', primary && 'btn--primary', quiet && 'btn--quiet', block && 'btn--block', className), children: [_jsx("input", { type: "file", hidden: true, ...input }), children] }));
10
+ }
@@ -0,0 +1,19 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ export interface PinProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
3
+ /** how many digits (4 or 6) */
4
+ length?: number;
5
+ /** digits already typed, left to right ("03") */
6
+ value?: string;
7
+ /** accessible name prefix for each cell ("Digit" → "Digit 1") */
8
+ label?: string;
9
+ /** the code so far, after every keystroke; `complete` once every cell holds a digit */
10
+ onChange?: (code: string, complete: boolean) => void;
11
+ /** focus the first empty cell on mount */
12
+ autoFocus?: boolean;
13
+ }
14
+ /**
15
+ * Pin — big code entry, one digit per pill; a filled cell turns accent. Lives in a Sheet.
16
+ * Typing a digit moves to the next cell, Backspace in an empty cell moves back, a pasted code fills every cell
17
+ * (cardds.js, delegated — the cells stay plain inputs). The first cell takes the SMS one-time-code autofill.
18
+ */
19
+ export declare function Pin({ length, value, label, onChange, autoFocus, className, ...rest }: PinProps): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from 'react';
3
+ import { cx } from '../cx';
4
+ /**
5
+ * Pin — big code entry, one digit per pill; a filled cell turns accent. Lives in a Sheet.
6
+ * Typing a digit moves to the next cell, Backspace in an empty cell moves back, a pasted code fills every cell
7
+ * (cardds.js, delegated — the cells stay plain inputs). The first cell takes the SMS one-time-code autofill.
8
+ */
9
+ export function Pin({ length = 6, value = '', label = 'Digit', onChange, autoFocus, className, ...rest }) {
10
+ const ref = useRef(null);
11
+ useEffect(() => {
12
+ const el = ref.current;
13
+ if (!el || !onChange)
14
+ return;
15
+ const on = (e) => { const d = e.detail; onChange(d.code, d.complete); };
16
+ el.addEventListener('cardds:pin', on);
17
+ return () => el.removeEventListener('cardds:pin', on);
18
+ }, [onChange]);
19
+ useEffect(() => {
20
+ if (!autoFocus)
21
+ return;
22
+ const cells = ref.current?.querySelectorAll('.pin__cell');
23
+ if (cells)
24
+ ([...cells].find((c) => !c.value) ?? cells[cells.length - 1])?.focus();
25
+ }, [autoFocus]);
26
+ return (_jsx("div", { ref: ref, className: cx('pin', className), ...rest, children: Array.from({ length }, (_, i) => (_jsx("input", { className: "pin__cell", inputMode: "numeric", pattern: "[0-9]*", placeholder: " ", defaultValue: value[i] ?? '', "aria-label": `${label} ${i + 1}`, autoComplete: i === 0 ? 'one-time-code' : 'off' }, i))) }));
27
+ }
@@ -0,0 +1,72 @@
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';
package/dist/index.js ADDED
@@ -0,0 +1,75 @@
1
+ // cardds — the React adapter over the CSS. Thin: every component emits the
2
+ // markup contract the CSS documents, nothing more. cardds.js rides along for
3
+ // the behaviours (sheet handle, stack open/close, dropdown value sync).
4
+ import '../cardds.js';
5
+ export { cx } from './cx';
6
+ export * from './type/Icon';
7
+ export { ICON_NAMES } from './type/icons';
8
+ export * from './type/Text';
9
+ export * from './scaffold/Screen';
10
+ export * from './scaffold/AppBar';
11
+ export * from './scaffold/TopBar';
12
+ export * from './scaffold/ActionBar';
13
+ export * from './scaffold/PagerAt';
14
+ export * from './scaffold/FloatBar';
15
+ export * from './scaffold/FilterRow';
16
+ export * from './scaffold/Section';
17
+ export * from './scaffold/EmptyState';
18
+ export * from './scaffold/Centre';
19
+ export * from './cards/Card';
20
+ export * from './cards/CardHead';
21
+ export * from './cards/CardFoot';
22
+ export * from './cards/CardParts';
23
+ export * from './cards/Stat';
24
+ export * from './cards/Placeholder';
25
+ export * from './sheets/SheetStack';
26
+ export * from './sheets/CardBack';
27
+ export * from './sheets/Sheet';
28
+ export * from './sheets/SheetHead';
29
+ export * from './sheets/SheetBody';
30
+ export * from './sheets/SheetStage';
31
+ export * from './sheets/Step';
32
+ export * from './sheets/Drawer';
33
+ export * from './actions/Btn';
34
+ export * from './actions/IconBtn';
35
+ export * from './actions/Chip';
36
+ export * from './actions/Dot';
37
+ export * from './actions/Dropdown';
38
+ export * from './actions/Segment';
39
+ export * from './actions/Fab';
40
+ export * from './actions/BtnRow';
41
+ export * from './actions/Link';
42
+ export * from './forms/Field';
43
+ export * from './forms/FileBtn';
44
+ export * from './forms/AddRow';
45
+ export * from './forms/Pin';
46
+ export * from './forms/Composer';
47
+ export * from './choice/Check';
48
+ export * from './choice/DayStrip';
49
+ export * from './choice/Calendar';
50
+ export * from './choice/Mood';
51
+ export * from './choice/Slider';
52
+ export * from './numbers/Ring';
53
+ export * from './numbers/Track';
54
+ export * from './numbers/Band';
55
+ export * from './numbers/DotGrid';
56
+ export * from './numbers/Picker';
57
+ export * from './numbers/Badge';
58
+ export * from './numbers/Bars';
59
+ export * from './people/Avatar';
60
+ export * from './people/AvatarPick';
61
+ export * from './lists/Row';
62
+ export * from './lists/Kv';
63
+ export * from './lists/Timeline';
64
+ export * from './lists/Legend';
65
+ export * from './media/Quote';
66
+ export * from './media/Postcard';
67
+ export * from './media/MapArea';
68
+ export * from './media/Tile';
69
+ export * from './media/Mosaic';
70
+ export * from './layover/Banner';
71
+ export * from './layover/Callout';
72
+ export * from './layover/Deck';
73
+ export * from './journey/Route';
74
+ export * from './journey/TileBadge';
75
+ export * from './journey/NoteRow';
@@ -0,0 +1,7 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import { type IconName } from '../type/Icon';
3
+ export interface NoteRowProps extends ComponentPropsWithoutRef<'div'> {
4
+ icon?: IconName;
5
+ }
6
+ /** NoteRow — icon + caption: transit hints, fine print. */
7
+ export declare function NoteRow({ icon, className, children, ...rest }: NoteRowProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Icon } from '../type/Icon';
4
+ /** NoteRow — icon + caption: transit hints, fine print. */
5
+ export function NoteRow({ icon = 'clock', className, children, ...rest }) {
6
+ return (_jsxs("div", { className: cx('note-row', className), ...rest, children: [_jsx(Icon, { name: icon, size: "sm" }), " ", children] }));
7
+ }
@@ -0,0 +1,18 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { type IconName } from '../type/Icon';
3
+ export interface RoutePoint {
4
+ /** the place name (caption) */
5
+ place: ReactNode;
6
+ /** the code, big (DMK) */
7
+ code: ReactNode;
8
+ /** the time */
9
+ time: ReactNode;
10
+ }
11
+ export interface RouteProps extends ComponentPropsWithoutRef<'div'> {
12
+ from: RoutePoint;
13
+ to: RoutePoint;
14
+ /** the icon on the dotted connector (plane by default) */
15
+ via?: IconName;
16
+ }
17
+ /** Route — endpoint · dotted connector with an icon · endpoint: flights, buses, deliveries. */
18
+ export declare function Route({ from, to, via, className, ...rest }: RouteProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Icon } from '../type/Icon';
4
+ /** Route — endpoint · dotted connector with an icon · endpoint: flights, buses, deliveries. */
5
+ export function Route({ from, to, via = 'plane', className, ...rest }) {
6
+ const point = (p, end) => (_jsxs("div", { className: cx('route__point', end && 'route__point--end'), children: [_jsx("span", { className: "route__place", children: p.place }), _jsx("span", { className: "route__code", children: p.code }), _jsx("span", { className: "route__time", children: p.time })] }));
7
+ return (_jsxs("div", { className: cx('route', className), ...rest, children: [point(from), _jsx("span", { className: "route__via", children: _jsx(Icon, { name: via, size: "sm" }) }), point(to, true)] }));
8
+ }
@@ -0,0 +1,15 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface TileBadgeProps extends ComponentPropsWithoutRef<'span'> {
3
+ /** the small label above ("Gate") */
4
+ label: ReactNode;
5
+ /** the big value ("21") */
6
+ value: ReactNode;
7
+ /** a second small label under the value ("Thu") */
8
+ sub?: ReactNode;
9
+ /** no fill: a date box beside a title (Jun / 18) */
10
+ plain?: boolean;
11
+ /** pinned to a CardMedia's corner (rating, price) */
12
+ corner?: boolean;
13
+ }
14
+ /** TileBadge — a tiny label over a big value: gate, seat, date, rating. */
15
+ export declare function TileBadge({ label, value, sub, plain, corner, className, ...rest }: TileBadgeProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ /** TileBadge — a tiny label over a big value: gate, seat, date, rating. */
4
+ export function TileBadge({ label, value, sub, plain, corner, className, ...rest }) {
5
+ return (_jsxs("span", { className: cx('tile-badge', plain && 'tile-badge--plain', corner && 'tile-badge--corner', className), ...rest, children: [_jsx("span", { className: "tile-badge__label", children: label }), _jsx("span", { className: "tile-badge__value", children: value }), sub != null && _jsx("span", { className: "tile-badge__label", children: sub })] }));
6
+ }
@@ -0,0 +1,9 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface BannerProps extends ComponentPropsWithoutRef<'details'> {
3
+ /** the chip that opens it (a `Chip on` with a chevron Icon xs) */
4
+ summary: ReactNode;
5
+ /** the tone of the opened card */
6
+ tone?: 1 | 2 | 3;
7
+ }
8
+ /** Banner — a chip that expands into a tinted card, no JS (a native details). */
9
+ export declare function Banner({ summary, tone, className, children, ...rest }: BannerProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ /** Banner — a chip that expands into a tinted card, no JS (a native details). */
4
+ export function Banner({ summary, tone = 3, className, children, ...rest }) {
5
+ return (_jsxs("details", { className: cx('banner', className), ...rest, children: [_jsx("summary", { children: summary }), _jsx("div", { className: cx('card banner__body', tone !== 1 && `card--${tone}`), children: children })] }));
6
+ }
@@ -0,0 +1,10 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface CalloutProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
3
+ title: ReactNode;
4
+ sub?: ReactNode;
5
+ /** position over the stage background (CSS lengths / percentages) */
6
+ top?: string;
7
+ left?: string;
8
+ }
9
+ /** Callout — a small card with a tail, pinned over a map or a media. */
10
+ export declare function Callout({ title, sub, top, left, className, style, ...rest }: CalloutProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ /** Callout — a small card with a tail, pinned over a map or a media. */
4
+ export function Callout({ title, sub, top, left, className, style, ...rest }) {
5
+ return (_jsxs("div", { className: cx('callout', className), style: { top, left, translate: left ? '-50% 0' : undefined, ...style }, ...rest, children: [_jsx("span", { className: "callout__title", children: title }), sub != null && _jsx("span", { className: "callout__sub", children: sub })] }));
6
+ }
@@ -0,0 +1,9 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export interface DeckProps extends ComponentPropsWithoutRef<'div'> {
3
+ }
4
+ /** Deck — swipe cards fanned behind each other; the LAST child is on top. Children are Cards (the front one may `fold`). */
5
+ export declare function Deck({ className, ...rest }: DeckProps): import("react").JSX.Element;
6
+ export interface DeckActionsProps extends ComponentPropsWithoutRef<'div'> {
7
+ }
8
+ /** DeckActions — the two big round buttons under a Deck (skip · keep). */
9
+ export declare function DeckActions({ className, ...rest }: DeckActionsProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ /** Deck — swipe cards fanned behind each other; the LAST child is on top. Children are Cards (the front one may `fold`). */
4
+ export function Deck({ className, ...rest }) {
5
+ return _jsx("div", { className: cx('deck', className), ...rest });
6
+ }
7
+ /** DeckActions — the two big round buttons under a Deck (skip · keep). */
8
+ export function DeckActions({ className, ...rest }) {
9
+ return _jsx("div", { className: cx('deck__actions', className), ...rest });
10
+ }
@@ -0,0 +1,27 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { type IconName } from '../type/Icon';
3
+ export interface KvProps extends ComponentPropsWithoutRef<'dl'> {
4
+ /** hairlines between rows */
5
+ lined?: boolean;
6
+ }
7
+ /** Kv — key-value rows: label left, value right (Pay with · Time credits); children are KVRows. */
8
+ export declare function Kv({ lined, className, ...rest }: KvProps): import("react").JSX.Element;
9
+ export interface KvRowProps extends ComponentPropsWithoutRef<'div'> {
10
+ /** the key */
11
+ label: ReactNode;
12
+ /** the value */
13
+ children?: ReactNode;
14
+ }
15
+ /** KvRow — one key · value line (48px tall); the value may hold a Chip, an Avatar, an Icon. */
16
+ export declare function KvRow({ label, className, children, ...rest }: KvRowProps): import("react").JSX.Element;
17
+ export interface KvGridProps extends ComponentPropsWithoutRef<'div'> {
18
+ }
19
+ /** KvGrid — value-over-label cells split by a rule (Sex | Weight); children are KVCells. */
20
+ export declare function KvGrid({ className, ...rest }: KvGridProps): import("react").JSX.Element;
21
+ export interface KvCellProps extends ComponentPropsWithoutRef<'div'> {
22
+ icon?: IconName;
23
+ value: ReactNode;
24
+ label: ReactNode;
25
+ }
26
+ /** KvCell — an icon, a big value, a caption label. */
27
+ export declare function KvCell({ icon, value, label, className, ...rest }: KvCellProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Icon } from '../type/Icon';
4
+ /** Kv — key-value rows: label left, value right (Pay with · Time credits); children are KVRows. */
5
+ export function Kv({ lined, className, ...rest }) {
6
+ return _jsx("dl", { className: cx('kv', lined && 'kv--lined', className), ...rest });
7
+ }
8
+ /** KvRow — one key · value line (48px tall); the value may hold a Chip, an Avatar, an Icon. */
9
+ export function KvRow({ label, className, children, ...rest }) {
10
+ return (_jsxs("div", { className: cx('kv__row', className), ...rest, children: [_jsx("dt", { className: "kv__key", children: label }), _jsx("dd", { className: "kv__val", children: children })] }));
11
+ }
12
+ /** KvGrid — value-over-label cells split by a rule (Sex | Weight); children are KVCells. */
13
+ export function KvGrid({ className, ...rest }) {
14
+ return _jsx("div", { className: cx('kv-grid', className), ...rest });
15
+ }
16
+ /** KvCell — an icon, a big value, a caption label. */
17
+ export function KvCell({ icon, value, label, className, ...rest }) {
18
+ return (_jsxs("div", { className: cx('kv-cell', className), ...rest, children: [icon && _jsx(Icon, { name: icon }), _jsx("span", { className: "kv-cell__val", children: value }), _jsx("span", { className: "kv-cell__key", children: label })] }));
19
+ }
@@ -0,0 +1,11 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export interface LegendProps extends ComponentPropsWithoutRef<'div'> {
3
+ }
4
+ /** Legend — signal dots with captions under a chart; children are LegendItems. */
5
+ export declare function Legend({ className, ...rest }: LegendProps): import("react").JSX.Element;
6
+ export interface LegendItemProps extends ComponentPropsWithoutRef<'span'> {
7
+ /** which signal dot: `a` (default) or `b` */
8
+ dot?: 'a' | 'b';
9
+ }
10
+ /** LegendItem — a Dot and its caption. */
11
+ export declare function LegendItem({ dot, className, children, ...rest }: LegendItemProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Dot } from '../actions/Dot';
4
+ /** Legend — signal dots with captions under a chart; children are LegendItems. */
5
+ export function Legend({ className, ...rest }) {
6
+ return _jsx("div", { className: cx('legend', className), ...rest });
7
+ }
8
+ /** LegendItem — a Dot and its caption. */
9
+ export function LegendItem({ dot = 'a', className, children, ...rest }) {
10
+ return (_jsxs("span", { className: cx('legend__item', className), ...rest, children: [_jsx(Dot, { b: dot === 'b' }), " ", children] }));
11
+ }