@a4ui/core 0.33.0 → 0.35.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 (58) hide show
  1. package/dist/elements.css +299 -0
  2. package/dist/full.css +299 -0
  3. package/dist/index.d.ts +27 -1
  4. package/dist/index.js +9140 -5065
  5. package/dist/ui/ActivityFeed.d.ts +49 -0
  6. package/dist/ui/AudioWaveform.d.ts +22 -0
  7. package/dist/ui/AvailabilityPicker.d.ts +35 -0
  8. package/dist/ui/CodeEditor.d.ts +25 -0
  9. package/dist/ui/CouponField.d.ts +33 -0
  10. package/dist/ui/EmojiPicker.d.ts +18 -0
  11. package/dist/ui/EventScheduler.d.ts +41 -0
  12. package/dist/ui/FollowingPointer.d.ts +24 -0
  13. package/dist/ui/GanttChart.d.ts +37 -0
  14. package/dist/ui/InteractiveMap.d.ts +50 -0
  15. package/dist/ui/JsonViewer.d.ts +24 -0
  16. package/dist/ui/Kanban.d.ts +49 -0
  17. package/dist/ui/Lamp.d.ts +22 -0
  18. package/dist/ui/Lightbox.d.ts +41 -0
  19. package/dist/ui/LocationPicker.d.ts +25 -0
  20. package/dist/ui/MaskedInput.d.ts +26 -0
  21. package/dist/ui/OnboardingChecklist.d.ts +51 -0
  22. package/dist/ui/OtpInput.d.ts +29 -0
  23. package/dist/ui/PivotTable.d.ts +37 -0
  24. package/dist/ui/PresenceAvatars.d.ts +54 -0
  25. package/dist/ui/QueryBuilder.d.ts +56 -0
  26. package/dist/ui/SheetSnap.d.ts +28 -0
  27. package/dist/ui/SignaturePad.d.ts +19 -0
  28. package/dist/ui/SpreadsheetGrid.d.ts +27 -0
  29. package/dist/ui/TreeTable.d.ts +52 -0
  30. package/dist/ui/VideoPlayerShell.d.ts +19 -0
  31. package/package.json +1 -1
  32. package/src/index.ts +60 -1
  33. package/src/ui/ActivityFeed.tsx +178 -0
  34. package/src/ui/AudioWaveform.tsx +190 -0
  35. package/src/ui/AvailabilityPicker.tsx +163 -0
  36. package/src/ui/CodeEditor.tsx +277 -0
  37. package/src/ui/CouponField.tsx +120 -0
  38. package/src/ui/EmojiPicker.tsx +424 -0
  39. package/src/ui/EventScheduler.tsx +280 -0
  40. package/src/ui/FollowingPointer.tsx +112 -0
  41. package/src/ui/GanttChart.tsx +283 -0
  42. package/src/ui/InteractiveMap.tsx +349 -0
  43. package/src/ui/JsonViewer.tsx +189 -0
  44. package/src/ui/Kanban.tsx +250 -0
  45. package/src/ui/Lamp.tsx +88 -0
  46. package/src/ui/Lightbox.tsx +261 -0
  47. package/src/ui/LocationPicker.tsx +96 -0
  48. package/src/ui/MaskedInput.tsx +108 -0
  49. package/src/ui/OnboardingChecklist.tsx +163 -0
  50. package/src/ui/OtpInput.tsx +153 -0
  51. package/src/ui/PivotTable.tsx +0 -0
  52. package/src/ui/PresenceAvatars.tsx +142 -0
  53. package/src/ui/QueryBuilder.tsx +280 -0
  54. package/src/ui/SheetSnap.tsx +264 -0
  55. package/src/ui/SignaturePad.tsx +221 -0
  56. package/src/ui/SpreadsheetGrid.tsx +304 -0
  57. package/src/ui/TreeTable.tsx +172 -0
  58. package/src/ui/VideoPlayerShell.tsx +282 -0
@@ -0,0 +1,49 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single audit-trail entry rendered by {@link ActivityFeed}. */
3
+ export interface ActivityItem {
4
+ id: string;
5
+ /** Name of the user/system that performed the action. */
6
+ actor: string;
7
+ /** What happened, rendered right after `actor` (e.g. `"commented on Invoice #42"`). */
8
+ action: JSX.Element;
9
+ /** Leading icon shown when `avatar` is omitted. Defaults to a generic activity icon. */
10
+ icon?: JSX.Element;
11
+ /** ISO 8601 timestamp of the event. */
12
+ timestamp: string;
13
+ avatar?: string;
14
+ }
15
+ export interface ActivityFeedProps {
16
+ items: ActivityItem[];
17
+ class?: string;
18
+ }
19
+ /**
20
+ * Chronological audit-trail list (newest first), grouped under subtle day
21
+ * headers (`"Today"` / `"Yesterday"` / a locale date) with a continuous
22
+ * connector line down the left, in the same spirit as {@link Timeline}. Each
23
+ * row shows an avatar (or a fallback icon), `"{actor} {action}"`, and a
24
+ * relative timestamp whose `title` carries the absolute time. Distinct from
25
+ * {@link TransactionFeed}: this is generic activity/audit history, not a
26
+ * financial ledger.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <ActivityFeed
31
+ * items={[
32
+ * {
33
+ * id: '1',
34
+ * actor: 'Ada Lovelace',
35
+ * action: <>commented on <strong>Invoice #42</strong></>,
36
+ * timestamp: '2026-07-21T09:15:00Z',
37
+ * avatar: ada.avatarUrl,
38
+ * },
39
+ * {
40
+ * id: '2',
41
+ * actor: 'System',
42
+ * action: 'archived the project',
43
+ * timestamp: '2026-07-20T18:02:00Z',
44
+ * },
45
+ * ]}
46
+ * />
47
+ * ```
48
+ */
49
+ export declare function ActivityFeed(props: ActivityFeedProps): JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface AudioWaveformProps {
3
+ src?: string;
4
+ peaks?: number[];
5
+ /** Bar row height in pixels. @default 64 */
6
+ height?: number;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Waveform of vertical bars driven by an optional hidden `<audio>` element.
11
+ * Pass `peaks` (numbers in `0..1`) for a real waveform, or omit it for a
12
+ * deterministic placeholder shape. The played portion (up to
13
+ * `currentTime / duration`) is highlighted; clicking a bar seeks there. With
14
+ * no `src`, playback is simulated on a timer for demo purposes.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <AudioWaveform src="/media/track.mp3" />
19
+ * <AudioWaveform peaks={[0.2, 0.8, 0.4, 0.9, 0.3]} height={48} />
20
+ * ```
21
+ */
22
+ export declare function AudioWaveform(props: AudioWaveformProps): JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface AvailabilityPickerProps {
3
+ /** Open slots per date, keyed by local ISO 'YYYY-MM-DD'; each value is a list of 'HH:mm' times. */
4
+ slotsByDate: Record<string, string[]>;
5
+ /** Controlled selection; omit to manage selection internally. */
6
+ value?: {
7
+ date: string;
8
+ time: string;
9
+ };
10
+ onChange?: (selection: {
11
+ date: string;
12
+ time: string;
13
+ }) => void;
14
+ /** Label shown near the slots. @default the browser's Intl timezone */
15
+ timezone?: string;
16
+ class?: string;
17
+ }
18
+ /**
19
+ * Booking-style availability picker: a scrollable list of bookable dates on the
20
+ * left (built from the keys of `slotsByDate`) and a scrollable grid of open
21
+ * 'HH:mm' slots for the selected date on the right, with a timezone label.
22
+ * Controlled via `value`/`onChange`, or self-managed when `value` is omitted.
23
+ * Fully keyboard accessible (native buttons, `aria-pressed` on the current pick).
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * const [selection, setSelection] = createSignal<{ date: string; time: string }>()
28
+ * <AvailabilityPicker
29
+ * slotsByDate={{ '2026-07-22': ['09:00', '09:30', '14:00'], '2026-07-23': ['10:00'] }}
30
+ * value={selection()}
31
+ * onChange={setSelection}
32
+ * />
33
+ * ```
34
+ */
35
+ export declare function AvailabilityPicker(props: AvailabilityPickerProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface CodeEditorProps {
3
+ value: string;
4
+ /** Called with the new source string on every input event. */
5
+ onInput?: (v: string) => void;
6
+ /** Language used to pick the keyword set for highlighting. Default `'ts'`. */
7
+ language?: 'ts' | 'js' | 'json' | 'html' | 'css';
8
+ /** Hides the caret and blocks editing; the overlay still highlights. */
9
+ readOnly?: boolean;
10
+ class?: string;
11
+ }
12
+ /**
13
+ * A minimal code editor: line numbers in a gutter, a transparent textarea for
14
+ * input, and a `<pre>` overlay underneath it that renders approximate syntax
15
+ * highlighting from simple regexes (keywords, strings, numbers, comments).
16
+ * Not a full parser — good for READMEs, config editors, and demo panes, not
17
+ * a replacement for a real editor component (CodeMirror/Monaco).
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * const [src, setSrc] = createSignal('const x: number = 1\n')
22
+ * <CodeEditor value={src()} onInput={setSrc} language="ts" />
23
+ * ```
24
+ */
25
+ export declare function CodeEditor(props: CodeEditorProps): JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface CouponFieldProps {
3
+ /** Validate/apply a coupon code. Resolve with `{ ok: false }` for a rejected
4
+ * code — do not throw for expected rejections, only for unexpected failures. */
5
+ onApply: (code: string) => Promise<{
6
+ ok: boolean;
7
+ message?: string;
8
+ discount?: string;
9
+ }>;
10
+ placeholder?: string;
11
+ class?: string;
12
+ }
13
+ /**
14
+ * Coupon/promo code input with an "Apply" button. Tracks explicit
15
+ * idle/loading/success/error state: loading shows a spinner and disables the
16
+ * input, success shows the applied discount with a way to remove it and try
17
+ * another code, error shows the failure message inline and lets the user retry.
18
+ * Rejections are read from the resolved `{ ok: false }` result, not caught
19
+ * exceptions — an unexpected throw from `onApply` propagates uncaught.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <CouponField
24
+ * onApply={async (code) => {
25
+ * const res = await api.applyCoupon(code)
26
+ * return res.valid
27
+ * ? { ok: true, discount: '-$10' }
28
+ * : { ok: false, message: 'That code has expired.' }
29
+ * }}
30
+ * />
31
+ * ```
32
+ */
33
+ export declare function CouponField(props: CouponFieldProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface EmojiPickerProps {
3
+ /** Called with the emoji character whenever the user picks one. */
4
+ onSelect: (emoji: string) => void;
5
+ class?: string;
6
+ }
7
+ /**
8
+ * A searchable emoji grid with an inline curated dataset (no network fetch),
9
+ * category tabs that scroll to their section, and a session-only "Recents"
10
+ * row. Type in the search box to filter by keyword, or click a category icon
11
+ * to jump the grid to that section.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <EmojiPicker onSelect={(emoji) => insertAtCursor(emoji)} />
16
+ * ```
17
+ */
18
+ export declare function EmojiPicker(props: EmojiPickerProps): JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single scheduled event; `start`/`end` are local ISO datetimes ('YYYY-MM-DDTHH:mm'). */
3
+ export interface SchedulerEvent {
4
+ id: string;
5
+ title: string;
6
+ start: string;
7
+ end: string;
8
+ tone?: 'primary' | 'accent';
9
+ }
10
+ export interface EventSchedulerProps {
11
+ events: SchedulerEvent[];
12
+ /** Day to show (day view) or the week containing it (week view). ISO 'YYYY-MM-DD'. @default today */
13
+ date?: string;
14
+ /** @default 'day' */
15
+ view?: 'day' | 'week';
16
+ /** First hour band shown (0–23). @default 7 */
17
+ startHour?: number;
18
+ /** Last hour band shown, exclusive (0–23). @default 21 */
19
+ endHour?: number;
20
+ class?: string;
21
+ }
22
+ /**
23
+ * Time-grid calendar: one column per visible day, hour bands from `startHour` to
24
+ * `endHour`, events absolutely positioned by their start/end minutes and split
25
+ * side-by-side when they overlap. Draws a "now" line through today's column
26
+ * when it's in view. Read-only positioning (drag-to-create/resize is out of
27
+ * scope). Scrolls vertically when the hour range is tall.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <EventScheduler
32
+ * view="week"
33
+ * date="2026-07-21"
34
+ * events={[
35
+ * { id: '1', title: 'Standup', start: '2026-07-21T09:00', end: '2026-07-21T09:30', tone: 'primary' },
36
+ * { id: '2', title: 'Design review', start: '2026-07-21T09:15', end: '2026-07-21T10:00', tone: 'accent' },
37
+ * ]}
38
+ * />
39
+ * ```
40
+ */
41
+ export declare function EventScheduler(props: EventSchedulerProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface FollowingPointerProps {
3
+ label?: JSX.Element;
4
+ /** Tone of the custom cursor + label chip. @default 'primary' */
5
+ color?: 'primary' | 'accent';
6
+ children: JSX.Element;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Wraps `children` in a `relative` container that hides the native cursor
11
+ * and renders a custom pointer — a small arrow glyph plus a rounded label
12
+ * chip in the given tone — that follows the mouse within the container.
13
+ * Hidden until the pointer enters, hidden again on leave. Under
14
+ * {@link motionReduced}, the native cursor is kept and nothing custom is
15
+ * rendered. Listeners are cleaned up on unmount.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <FollowingPointer label="Alex" color="accent">
20
+ * <div class="grid h-48 place-items-center rounded-lg border">Hover me</div>
21
+ * </FollowingPointer>
22
+ * ```
23
+ */
24
+ export declare function FollowingPointer(props: FollowingPointerProps): JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single bar rendered by {@link GanttChart}. */
3
+ export interface GanttTask {
4
+ id: string;
5
+ name: string;
6
+ /** ISO date, `'YYYY-MM-DD'`. */
7
+ start: string;
8
+ /** ISO date, `'YYYY-MM-DD'`. */
9
+ end: string;
10
+ /** Ids of tasks that must finish before this one starts; drawn as elbow connectors. */
11
+ dependencies?: string[];
12
+ /** Bar color. Defaults to `'primary'`. */
13
+ tone?: 'primary' | 'accent';
14
+ }
15
+ export interface GanttChartProps {
16
+ tasks: GanttTask[];
17
+ class?: string;
18
+ }
19
+ /**
20
+ * Read-only Gantt chart: a header row of date ticks over a proportional time
21
+ * axis, one row per task with a colored bar spanning `start`–`end`, elbow
22
+ * connectors for `dependencies`, and a "today" marker when today falls
23
+ * within the overall range. Horizontal scroll kicks in when the range is
24
+ * wide relative to the container.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <GanttChart
29
+ * tasks={[
30
+ * { id: 'design', name: 'Design', start: '2026-01-05', end: '2026-01-16', tone: 'accent' },
31
+ * { id: 'build', name: 'Build', start: '2026-01-19', end: '2026-02-06', dependencies: ['design'] },
32
+ * { id: 'launch', name: 'Launch', start: '2026-02-09', end: '2026-02-10', dependencies: ['build'] },
33
+ * ]}
34
+ * />
35
+ * ```
36
+ */
37
+ export declare function GanttChart(props: GanttChartProps): JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface MapMarker {
3
+ lat: number;
4
+ lng: number;
5
+ label?: string;
6
+ id?: string;
7
+ }
8
+ export interface InteractiveMapProps {
9
+ /** Initial view center. Also acts as a recenter trigger: passing a new
10
+ * `{ lat, lng }` after mount pans the view there (e.g. a "use my
11
+ * location" button) without fighting the user's own drag/zoom in between.
12
+ * @default { lat: 0, lng: 0 } */
13
+ center?: {
14
+ lat: number;
15
+ lng: number;
16
+ };
17
+ /** Initial integer zoom level, clamped to `[2, 18]`. Synced the same way
18
+ * as `center` when it changes after mount. @default 3 */
19
+ zoom?: number;
20
+ /** Pins rendered on top of the tiles, projected to their pixel position. */
21
+ markers?: MapMarker[];
22
+ /** Tile URL template with `{z}`/`{x}`/`{y}` placeholders.
23
+ * @default 'https://tile.openstreetmap.org/{z}/{x}/{y}.png' */
24
+ tileUrl?: string;
25
+ /** Height of the map, in px. @default 400 */
26
+ height?: number;
27
+ /** Fires with the lat/lng under the pointer on a click (drags don't count). */
28
+ onClick?: (coord: {
29
+ lat: number;
30
+ lng: number;
31
+ }) => void;
32
+ class?: string;
33
+ }
34
+ /**
35
+ * A slippy tile map built directly on Web Mercator math — no map SDK. Pan by
36
+ * dragging, zoom with the +/- buttons or the wheel (zoom keeps the point
37
+ * under the cursor fixed), place `markers`, and get the lat/lng of a click
38
+ * via `onClick`. Recomputes its tile grid on resize (`ResizeObserver`).
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <InteractiveMap
43
+ * center={{ lat: 48.8584, lng: 2.2945 }}
44
+ * zoom={13}
45
+ * markers={[{ lat: 48.8584, lng: 2.2945, label: 'Eiffel Tower' }]}
46
+ * onClick={(coord) => console.log('clicked', coord)}
47
+ * />
48
+ * ```
49
+ */
50
+ export declare function InteractiveMap(props: InteractiveMapProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface JsonViewerProps {
3
+ /** The value to render — object, array, or a primitive at the root. */
4
+ data: unknown;
5
+ /** Expand every object/array node on first render. Defaults to `false`. */
6
+ defaultExpanded?: boolean;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Collapsible, indented JSON tree. Objects/arrays are expandable nodes (chevron
11
+ * + key + a `{…}` / `[…]` summary with child count); primitives render as
12
+ * `key: value` with the value tinted by type. Expanded state is tracked
13
+ * internally by path, seeded fully-open when `defaultExpanded` is set. An
14
+ * optional search box highlights keys/values that match.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <JsonViewer
19
+ * defaultExpanded
20
+ * data={{ user: { id: 1, name: 'Ada', active: true, tags: ['admin', 'core'] } }}
21
+ * />
22
+ * ```
23
+ */
24
+ export declare function JsonViewer(props: JsonViewerProps): JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single card on a {@link Kanban} board. */
3
+ export interface KanbanCard {
4
+ /** Stable unique id (used for drag tracking + list keying). */
5
+ id: string;
6
+ /** Card body — usually a title/label. */
7
+ title: JSX.Element;
8
+ /** Optional trailing badge (e.g. priority, assignee initials). */
9
+ badge?: JSX.Element;
10
+ }
11
+ /** A column of a {@link Kanban} board. */
12
+ export interface KanbanColumn {
13
+ /** Stable unique id. */
14
+ id: string;
15
+ /** Column heading. */
16
+ title: string;
17
+ /** Cards in the column, top to bottom. */
18
+ cards: KanbanCard[];
19
+ /** Optional WIP limit — the count badge switches to a warning tone past it. */
20
+ limit?: number;
21
+ }
22
+ export interface KanbanProps {
23
+ /** Columns, in display order left to right. */
24
+ columns: KanbanColumn[];
25
+ /** Called with the full new columns array after any drag (reorder or move). */
26
+ onChange?: (columns: KanbanColumn[]) => void;
27
+ class?: string;
28
+ }
29
+ /**
30
+ * Horizontal Kanban board: glass column panels holding vertical lists of
31
+ * draggable cards. Drag a card by its grip handle to reorder it within a
32
+ * column or drop it into another column — a dashed placeholder marks the
33
+ * drop slot and a floating clone follows the pointer, the same pointer-events
34
+ * idiom as {@link Sortable} extended to track which column's list the
35
+ * pointer is currently over. Works controlled (pass `columns` sourced from
36
+ * your own state + `onChange` to write it back) or uncontrolled (pass
37
+ * `columns` once and just read the final layout from `onChange`).
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * const [columns, setColumns] = createSignal<KanbanColumn[]>([
42
+ * { id: 'todo', title: 'To do', cards: [{ id: '1', title: 'Write spec' }] },
43
+ * { id: 'doing', title: 'Doing', cards: [], limit: 2 },
44
+ * { id: 'done', title: 'Done', cards: [] },
45
+ * ])
46
+ * <Kanban columns={columns()} onChange={setColumns} />
47
+ * ```
48
+ */
49
+ export declare function Kanban(props: KanbanProps): JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface LampProps {
3
+ children?: JSX.Element;
4
+ class?: string;
5
+ }
6
+ /**
7
+ * Hero/section backdrop: a spotlight beam fanning down from the top center —
8
+ * two symmetric blurred gradient cones (`--primary` / `--accent`) plus a
9
+ * bright thin source line — over a dark base, with `children` centered in
10
+ * the illuminated area below. Grows/brightens in on mount via Motion
11
+ * (opacity + scale); static under {@link motionReduced}. Self-contained
12
+ * (`relative overflow-hidden`); size it with `class` (e.g. `min-h-[28rem]`).
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Lamp class="min-h-[28rem]">
17
+ * <h1 class="text-4xl font-semibold text-foreground">Build in the light</h1>
18
+ * <p class="mt-4 text-muted-foreground">A hero backdrop with a spotlight glow.</p>
19
+ * </Lamp>
20
+ * ```
21
+ */
22
+ export declare function Lamp(props: LampProps): JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { JSX } from 'solid-js';
2
+ /** One image in a {@link Lightbox}. */
3
+ export interface LightboxImage {
4
+ src: string;
5
+ alt?: string;
6
+ /** Smaller image used in the thumbnail grid/strip; falls back to `src`. */
7
+ thumb?: string;
8
+ }
9
+ export interface LightboxProps {
10
+ images: LightboxImage[];
11
+ /** Controlled overlay open state. When set, wins over internal state — pair with `onOpenChange`. */
12
+ open?: boolean;
13
+ /** Controlled active image index (clamped to the images array). When set, wins over internal state — pair with `onIndexChange`. */
14
+ index?: number;
15
+ onOpenChange?: (open: boolean) => void;
16
+ onIndexChange?: (index: number) => void;
17
+ /** Show the thumbnail strip at the bottom of the overlay. @default true */
18
+ showThumbnails?: boolean;
19
+ class?: string;
20
+ }
21
+ /**
22
+ * Responsive thumbnail grid (`thumb || src`) that opens into a full-screen
23
+ * viewer on click: the active image centered, prev/next chevrons, a close
24
+ * button, an alt-text caption, a zoom toggle, and (by default) a thumbnail
25
+ * strip with the active image highlighted. Navigate with the arrow keys or
26
+ * Escape, click the backdrop to close. Works controlled
27
+ * (`open`/`index` + `onOpenChange`/`onIndexChange`) or uncontrolled. Body
28
+ * scroll locks while open, like `Modal`; the zoom transition is skipped
29
+ * under `prefers-reduced-motion` but stays fully functional.
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * <Lightbox
34
+ * images={[
35
+ * { src: '/photos/1-full.jpg', thumb: '/photos/1-thumb.jpg', alt: 'Sunset over the bay' },
36
+ * { src: '/photos/2-full.jpg', thumb: '/photos/2-thumb.jpg', alt: 'Mountain trail' },
37
+ * ]}
38
+ * />
39
+ * ```
40
+ */
41
+ export declare function Lightbox(props: LightboxProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface LocationValue {
3
+ lat: number;
4
+ lng: number;
5
+ label?: string;
6
+ }
7
+ export interface LocationPickerProps {
8
+ /** Controlled value. Omit to let the component manage its own state. */
9
+ value?: LocationValue;
10
+ /** Fires with the full value whenever the label, the pin, or geolocation changes it. */
11
+ onChange?: (v: LocationValue) => void;
12
+ class?: string;
13
+ }
14
+ /**
15
+ * Text label + compact map field for picking a location: click or drag the
16
+ * map to drop the pin (no geocoding — the label is a free-text tag the caller
17
+ * attaches to the coordinates), or use the "use my location" button.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * const [place, setPlace] = createSignal<LocationValue>({ lat: 48.8584, lng: 2.2945, label: 'Eiffel Tower' })
22
+ * <LocationPicker value={place()} onChange={setPlace} />
23
+ * ```
24
+ */
25
+ export declare function LocationPicker(props: LocationPickerProps): JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface MaskedInputProps {
3
+ /** `#` = digit slot, `A` = letter slot, any other char is a literal, e.g. `'(###) ###-####'`. */
4
+ mask: string;
5
+ /** Controlled raw value (just the entered #/A characters, no literals). */
6
+ value?: string;
7
+ /** Called with `(raw, formatted)` on every accepted keystroke or paste. */
8
+ onInput?: (raw: string, formatted: string) => void;
9
+ placeholder?: string;
10
+ class?: string;
11
+ 'aria-label'?: string;
12
+ }
13
+ /**
14
+ * Format-as-you-type input over a real `<input>`. `mask` uses `#` for a digit
15
+ * slot and `A` for a letter slot; any other character is a literal inserted
16
+ * automatically as the user reaches it. Characters that don't fit the next
17
+ * slot are rejected, and pasted text is normalized by re-extracting only its
18
+ * valid #/A characters. Controlled (`value`) or uncontrolled.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const [phone, setPhone] = createSignal('')
23
+ * <MaskedInput mask="(###) ###-####" value={phone()} onInput={setPhone} placeholder="(555) 123-4567" />
24
+ * ```
25
+ */
26
+ export declare function MaskedInput(props: MaskedInputProps): JSX.Element;
@@ -0,0 +1,51 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single step in an {@link OnboardingChecklist}. */
3
+ export interface OnboardingStep {
4
+ /** Stable identifier, used as the toggle key and `For` item key. */
5
+ id: string;
6
+ title: JSX.Element;
7
+ /** Optional detail shown when the step is expanded. */
8
+ description?: JSX.Element;
9
+ /** Whether the step is complete. */
10
+ done?: boolean;
11
+ /** Optional call-to-action rendered alongside the description. */
12
+ action?: {
13
+ label: string;
14
+ onClick: () => void;
15
+ };
16
+ }
17
+ export interface OnboardingChecklistProps {
18
+ steps: OnboardingStep[];
19
+ /** Called with the step id and its next `done` state when the indicator is toggled. */
20
+ onToggle?: (id: string, done: boolean) => void;
21
+ /** Heading shown above the progress summary. Defaults to `'Getting started'`. */
22
+ title?: JSX.Element;
23
+ class?: string;
24
+ }
25
+ /**
26
+ * Card-shaped onboarding/setup checklist: a header with a completion ring and
27
+ * "{done} of {total} complete" summary, followed by expandable steps. Each
28
+ * step has a clickable check indicator (toggles `done` via `onToggle`), a
29
+ * title, and an optional description + CTA revealed on expand. Completion is
30
+ * controlled by the caller; expansion is local UI state (one step open at a time).
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * const [steps, setSteps] = createSignal<OnboardingStep[]>([
35
+ * { id: 'profile', title: 'Complete your profile', done: true },
36
+ * {
37
+ * id: 'invite',
38
+ * title: 'Invite a teammate',
39
+ * description: 'Collaborate faster by adding at least one teammate.',
40
+ * action: { label: 'Invite', onClick: () => openInviteDialog() },
41
+ * },
42
+ * ])
43
+ * <OnboardingChecklist
44
+ * steps={steps()}
45
+ * onToggle={(id, done) =>
46
+ * setSteps((prev) => prev.map((s) => (s.id === id ? { ...s, done } : s)))
47
+ * }
48
+ * />
49
+ * ```
50
+ */
51
+ export declare function OnboardingChecklist(props: OnboardingChecklistProps): JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface OtpInputProps {
3
+ /** Number of single-character boxes. @default 6 */
4
+ length?: number;
5
+ /** Controlled value; when provided, the group renders it and the parent owns state. */
6
+ value?: string;
7
+ /** Called with the full joined value on every box change (both typing and deletion). */
8
+ onInput?: (value: string) => void;
9
+ /** Called once with the full value when every box is filled. */
10
+ onComplete?: (value: string) => void;
11
+ /** Restrict input to digits and switch the mobile keyboard to numeric. */
12
+ numeric?: boolean;
13
+ class?: string;
14
+ 'aria-label'?: string;
15
+ }
16
+ /**
17
+ * Segmented one-time-passcode input: one `<input maxlength=1>` per character.
18
+ * Typing advances focus to the next box, Backspace on an empty box moves back
19
+ * and clears the previous one, arrow keys move focus, and pasting a string
20
+ * distributes its characters across boxes starting at the focused index.
21
+ * Works controlled (pass `value`) or uncontrolled.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * const [code, setCode] = createSignal('')
26
+ * <OtpInput length={6} value={code()} onInput={setCode} numeric onComplete={verify} />
27
+ * ```
28
+ */
29
+ export declare function OtpInput(props: OtpInputProps): JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { JSX } from 'solid-js';
2
+ /** A single record fed into {@link PivotTable}. */
3
+ export interface PivotDatum {
4
+ [key: string]: string | number;
5
+ }
6
+ export interface PivotTableProps {
7
+ data: PivotDatum[];
8
+ /** Field whose unique values become row headers. */
9
+ rowField: string;
10
+ /** Field whose unique values become column headers. */
11
+ columnField: string;
12
+ /** Numeric field aggregated into each cell. */
13
+ valueField: string;
14
+ /** Aggregation applied per (row, column) bucket. Defaults to 'sum'. */
15
+ aggregate?: 'sum' | 'count' | 'avg';
16
+ class?: string;
17
+ }
18
+ /**
19
+ * Cross-tab table: crosses the unique values of `rowField` and `columnField`,
20
+ * aggregating `valueField` into each cell (default `'sum'`), plus row/column
21
+ * totals.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <PivotTable
26
+ * data={[
27
+ * { region: 'West', product: 'Widget', revenue: 100 },
28
+ * { region: 'West', product: 'Gadget', revenue: 50 },
29
+ * { region: 'East', product: 'Widget', revenue: 75 },
30
+ * ]}
31
+ * rowField="region"
32
+ * columnField="product"
33
+ * valueField="revenue"
34
+ * />
35
+ * ```
36
+ */
37
+ export declare function PivotTable(props: PivotTableProps): JSX.Element;