@nexub/patterns 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-27N33TGN.js +61 -0
- package/dist/chunk-33Z2ZPO7.js +71 -0
- package/dist/chunk-64PSI75E.js +83 -0
- package/dist/chunk-7QCJC2DV.js +113 -0
- package/dist/chunk-CJBHDX2U.js +42 -0
- package/dist/chunk-CWFZA7ZQ.js +1 -0
- package/dist/chunk-CZR6NZDH.js +134 -0
- package/dist/chunk-M3OHX4F4.js +42 -0
- package/dist/chunk-OC4XY3US.js +87 -0
- package/dist/chunk-RFCPEZGF.js +1 -0
- package/dist/chunk-UNQD426H.js +101 -0
- package/dist/components/ActivityPage/index.js +11 -0
- package/dist/components/ChatPage/index.js +9 -0
- package/dist/components/CheckoutPage/index.js +9 -0
- package/dist/components/DashboardPage/index.js +10 -0
- package/dist/components/PageFrame/index.js +14 -0
- package/dist/components/PaywallPage/index.js +8 -0
- package/dist/components/SettingsPage/index.js +8 -0
- package/dist/components/SignInPage/index.js +9 -0
- package/dist/components/TransactionDetailPage/index.js +9 -0
- package/dist/index.d.ts +330 -1
- package/dist/index.js +61 -15
- package/package.json +7 -7
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
AuthCard
|
|
4
|
+
} from "./chunk-HMJRSNJD.js";
|
|
5
|
+
import {
|
|
6
|
+
usePageMessages
|
|
7
|
+
} from "./chunk-7QCJC2DV.js";
|
|
8
|
+
|
|
9
|
+
// src/components/SignInPage/SignInPage.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { Alert, Button, FormField, Input, PasswordInput } from "@nexub/react";
|
|
12
|
+
import { ShieldCheck } from "@nexub/icons";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var SignInPage = React.forwardRef(function SignInPage2({
|
|
15
|
+
onSubmit,
|
|
16
|
+
biometricLabel,
|
|
17
|
+
onBiometric,
|
|
18
|
+
onForgotPassword,
|
|
19
|
+
onCreateAccount,
|
|
20
|
+
loading,
|
|
21
|
+
error,
|
|
22
|
+
logo,
|
|
23
|
+
title,
|
|
24
|
+
description,
|
|
25
|
+
submitLabel,
|
|
26
|
+
as: Tag = "main",
|
|
27
|
+
messages,
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}, ref) {
|
|
31
|
+
const m = usePageMessages(messages);
|
|
32
|
+
const [email, setEmail] = React.useState("");
|
|
33
|
+
const [password, setPassword] = React.useState("");
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
Tag,
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: ["flex min-h-full w-full items-start justify-center px-4 py-10 sm:items-center", className].filter(Boolean).join(" "),
|
|
39
|
+
...props,
|
|
40
|
+
children: /* @__PURE__ */ jsx(
|
|
41
|
+
AuthCard,
|
|
42
|
+
{
|
|
43
|
+
logo,
|
|
44
|
+
title: title ?? m.signIn,
|
|
45
|
+
description,
|
|
46
|
+
footer: onCreateAccount && /* @__PURE__ */ jsx(Button, { variant: "link", onClick: onCreateAccount, children: m.createAccount }),
|
|
47
|
+
children: /* @__PURE__ */ jsxs(
|
|
48
|
+
"form",
|
|
49
|
+
{
|
|
50
|
+
className: "flex flex-col gap-4",
|
|
51
|
+
onSubmit: (e) => {
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
if (email && password) onSubmit(email, password);
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
error && /* @__PURE__ */ jsx(Alert, { tone: "danger", role: "alert", children: error }),
|
|
57
|
+
/* @__PURE__ */ jsxs(FormField.Root, { required: true, children: [
|
|
58
|
+
/* @__PURE__ */ jsx(FormField.Label, { children: m.email }),
|
|
59
|
+
/* @__PURE__ */ jsx(FormField.Control, { children: /* @__PURE__ */ jsx(
|
|
60
|
+
Input,
|
|
61
|
+
{
|
|
62
|
+
type: "email",
|
|
63
|
+
autoComplete: "username webauthn",
|
|
64
|
+
inputMode: "email",
|
|
65
|
+
value: email,
|
|
66
|
+
onChange: (e) => setEmail(e.target.value)
|
|
67
|
+
}
|
|
68
|
+
) })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ jsxs(FormField.Root, { required: true, children: [
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
72
|
+
/* @__PURE__ */ jsx(FormField.Label, { children: m.password }),
|
|
73
|
+
onForgotPassword && /* @__PURE__ */ jsx(Button, { type: "button", variant: "link", size: "xs", onClick: onForgotPassword, children: m.forgotPassword })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsx(FormField.Control, { children: /* @__PURE__ */ jsx(PasswordInput, { autoComplete: "current-password", value: password, onChange: (e) => setPassword(e.target.value) }) })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", size: "lg", fullWidth: true, loading, disabled: !email || !password, children: submitLabel ?? m.signIn }),
|
|
78
|
+
onBiometric && biometricLabel && /* @__PURE__ */ jsx(
|
|
79
|
+
Button,
|
|
80
|
+
{
|
|
81
|
+
type: "button",
|
|
82
|
+
variant: "secondary",
|
|
83
|
+
size: "lg",
|
|
84
|
+
fullWidth: true,
|
|
85
|
+
leadingIcon: /* @__PURE__ */ jsx(ShieldCheck, { size: "sm", "aria-hidden": "true" }),
|
|
86
|
+
onClick: onBiometric,
|
|
87
|
+
children: biometricLabel
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
SignInPage
|
|
101
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import "../../chunk-RFCPEZGF.js";
|
|
3
|
+
import {
|
|
4
|
+
PageFrame,
|
|
5
|
+
defaultPageTemplateMessages,
|
|
6
|
+
groupByDay,
|
|
7
|
+
usePageMessages
|
|
8
|
+
} from "../../chunk-7QCJC2DV.js";
|
|
9
|
+
export {
|
|
10
|
+
PageFrame,
|
|
11
|
+
defaultPageTemplateMessages,
|
|
12
|
+
groupByDay,
|
|
13
|
+
usePageMessages
|
|
14
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -370,4 +370,333 @@ interface ConversationProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
370
370
|
*/
|
|
371
371
|
declare const Conversation: React.ForwardRefExoticComponent<ConversationProps & React.RefAttributes<HTMLDivElement>>;
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
interface Transaction {
|
|
374
|
+
id: string;
|
|
375
|
+
title: string;
|
|
376
|
+
subtitle?: string;
|
|
377
|
+
/** Negative = money out. */
|
|
378
|
+
amount: number;
|
|
379
|
+
currency: string;
|
|
380
|
+
date: Date;
|
|
381
|
+
status?: 'pending' | 'failed';
|
|
382
|
+
/** Avatar image URL. */
|
|
383
|
+
image?: string;
|
|
384
|
+
}
|
|
385
|
+
interface ReviewRow {
|
|
386
|
+
label: string;
|
|
387
|
+
value: string;
|
|
388
|
+
}
|
|
389
|
+
interface Quote {
|
|
390
|
+
fee: number;
|
|
391
|
+
/** Units of `to` per unit of `from`. */
|
|
392
|
+
rate: number;
|
|
393
|
+
/** e.g. "In seconds", "By Friday". */
|
|
394
|
+
arrives: string;
|
|
395
|
+
}
|
|
396
|
+
interface ChatMessage {
|
|
397
|
+
id: string;
|
|
398
|
+
role: 'user' | 'assistant';
|
|
399
|
+
text: string;
|
|
400
|
+
/** Still streaming in. */
|
|
401
|
+
streaming?: boolean;
|
|
402
|
+
}
|
|
403
|
+
interface Plan {
|
|
404
|
+
id: string;
|
|
405
|
+
name: string;
|
|
406
|
+
/** Preformatted, e.g. "$9.99 / month". */
|
|
407
|
+
price: string;
|
|
408
|
+
features: string[];
|
|
409
|
+
badge?: string;
|
|
410
|
+
}
|
|
411
|
+
interface QuickAction {
|
|
412
|
+
id: string;
|
|
413
|
+
label: string;
|
|
414
|
+
icon?: React.ReactNode;
|
|
415
|
+
onSelect: () => void;
|
|
416
|
+
}
|
|
417
|
+
interface Insight {
|
|
418
|
+
id: string;
|
|
419
|
+
title: string;
|
|
420
|
+
body: string;
|
|
421
|
+
action?: {
|
|
422
|
+
label: string;
|
|
423
|
+
onSelect: () => void;
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
interface PageTemplateMessages {
|
|
427
|
+
activity: string;
|
|
428
|
+
noActivityTitle: string;
|
|
429
|
+
noActivityDescription: string;
|
|
430
|
+
loadMore: string;
|
|
431
|
+
refresh: string;
|
|
432
|
+
pending: string;
|
|
433
|
+
failed: string;
|
|
434
|
+
completed: string;
|
|
435
|
+
date: string;
|
|
436
|
+
details: string;
|
|
437
|
+
back: string;
|
|
438
|
+
settings: string;
|
|
439
|
+
signIn: string;
|
|
440
|
+
email: string;
|
|
441
|
+
password: string;
|
|
442
|
+
forgotPassword: string;
|
|
443
|
+
createAccount: string;
|
|
444
|
+
howMuch: string;
|
|
445
|
+
amountToSend: string;
|
|
446
|
+
balance: (formatted: string) => string;
|
|
447
|
+
overBalance: (formatted: string) => string;
|
|
448
|
+
fee: string;
|
|
449
|
+
rate: string;
|
|
450
|
+
recipientGets: string;
|
|
451
|
+
arrives: string;
|
|
452
|
+
continue: string;
|
|
453
|
+
checkDetails: string;
|
|
454
|
+
edit: string;
|
|
455
|
+
done: string;
|
|
456
|
+
stepOf: (step: number, total: number) => string;
|
|
457
|
+
sent: string;
|
|
458
|
+
chat: string;
|
|
459
|
+
chatEmpty: string;
|
|
460
|
+
restorePurchases: string;
|
|
461
|
+
choosePlan: string;
|
|
462
|
+
totalBalance: string;
|
|
463
|
+
quickActions: string;
|
|
464
|
+
recentActivity: string;
|
|
465
|
+
seeAll: string;
|
|
466
|
+
insights: string;
|
|
467
|
+
}
|
|
468
|
+
declare const defaultPageTemplateMessages: PageTemplateMessages;
|
|
469
|
+
/** Defaults ← NexubProvider `messages` ← the template's own `messages` prop. */
|
|
470
|
+
declare function usePageMessages(overrides?: Partial<PageTemplateMessages>): PageTemplateMessages;
|
|
471
|
+
/** Newest first, grouped under a medium date heading ("30 Oct 2026"). */
|
|
472
|
+
declare function groupByDay(transactions: Transaction[], locale: string): {
|
|
473
|
+
title: string;
|
|
474
|
+
data: Transaction[];
|
|
475
|
+
}[];
|
|
476
|
+
interface PageFrameProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
477
|
+
/** Landmark element. Use `div` inside an app shell that already renders `<main>`. @default 'main' */
|
|
478
|
+
as?: 'main' | 'div' | 'section';
|
|
479
|
+
title?: React.ReactNode;
|
|
480
|
+
description?: React.ReactNode;
|
|
481
|
+
/** Top-right of the header: buttons, filters. */
|
|
482
|
+
actions?: React.ReactNode;
|
|
483
|
+
/** Above the title, e.g. a back link. */
|
|
484
|
+
eyebrow?: React.ReactNode;
|
|
485
|
+
/** Content width. @default 'md' */
|
|
486
|
+
width?: 'sm' | 'md' | 'lg';
|
|
487
|
+
}
|
|
488
|
+
/** Page frame shared by the templates: centred column, h1 header, responsive padding. */
|
|
489
|
+
declare const PageFrame: React.ForwardRefExoticComponent<PageFrameProps & React.RefAttributes<HTMLElement>>;
|
|
490
|
+
|
|
491
|
+
interface ActivityPageProps extends Omit<PageFrameProps, 'title' | 'children' | 'onSelect'> {
|
|
492
|
+
transactions: Transaction[];
|
|
493
|
+
/** Open one transaction. Rows become buttons when set. */
|
|
494
|
+
onSelect?: (t: Transaction) => void;
|
|
495
|
+
/** Shows a "Refresh" button (the web stand-in for pull-to-refresh). */
|
|
496
|
+
onRefresh?: () => void;
|
|
497
|
+
refreshing?: boolean;
|
|
498
|
+
/** Shows "Load more" under the list while `hasMore`. */
|
|
499
|
+
onLoadMore?: () => void;
|
|
500
|
+
hasMore?: boolean;
|
|
501
|
+
loadingMore?: boolean;
|
|
502
|
+
/** Per-row actions (the web stand-in for swipe actions), e.g. a menu button. */
|
|
503
|
+
rowActions?: (t: Transaction) => React.ReactNode;
|
|
504
|
+
/** Between the header and the list: filters, search. */
|
|
505
|
+
toolbar?: React.ReactNode;
|
|
506
|
+
empty?: React.ReactNode;
|
|
507
|
+
/** @default messages.activity */
|
|
508
|
+
title?: React.ReactNode;
|
|
509
|
+
messages?: Partial<PageTemplateMessages>;
|
|
510
|
+
}
|
|
511
|
+
/** One transaction row: avatar, title, amount coloured by direction, status. */
|
|
512
|
+
declare function TransactionRow({ t, onSelect, actions, m, locale, }: {
|
|
513
|
+
t: Transaction;
|
|
514
|
+
onSelect?: (t: Transaction) => void;
|
|
515
|
+
actions?: React.ReactNode;
|
|
516
|
+
m: PageTemplateMessages;
|
|
517
|
+
locale: string;
|
|
518
|
+
}): React.JSX.Element;
|
|
519
|
+
/**
|
|
520
|
+
* Transactions grouped by day, newest first. Web twin of the native
|
|
521
|
+
* `ActivityList`: pull-to-refresh becomes a Refresh button, paging a
|
|
522
|
+
* "Load more" button and swipe actions `rowActions`.
|
|
523
|
+
*/
|
|
524
|
+
declare const ActivityPage: React.ForwardRefExoticComponent<ActivityPageProps & React.RefAttributes<HTMLElement>>;
|
|
525
|
+
|
|
526
|
+
interface TransactionDetailPageProps extends Omit<PageFrameProps, 'title' | 'children'> {
|
|
527
|
+
transaction: Transaction;
|
|
528
|
+
/** Extra rows: reference, account, category… */
|
|
529
|
+
rows?: ReviewRow[];
|
|
530
|
+
/** Under the details: "Download receipt", "Report a problem". */
|
|
531
|
+
footer?: React.ReactNode;
|
|
532
|
+
/** Shows a back button above the hero. */
|
|
533
|
+
onBack?: () => void;
|
|
534
|
+
messages?: Partial<PageTemplateMessages>;
|
|
535
|
+
}
|
|
536
|
+
/** One transaction: hero amount, status and summary rows. Web twin of the native `TransactionDetail`. */
|
|
537
|
+
declare const TransactionDetailPage: React.ForwardRefExoticComponent<TransactionDetailPageProps & React.RefAttributes<HTMLElement>>;
|
|
538
|
+
|
|
539
|
+
interface SettingsItem {
|
|
540
|
+
title: string;
|
|
541
|
+
subtitle?: string;
|
|
542
|
+
/** Icon or avatar before the title. */
|
|
543
|
+
leading?: React.ReactNode;
|
|
544
|
+
/** Current value, shown at the end (e.g. "English"). */
|
|
545
|
+
value?: React.ReactNode;
|
|
546
|
+
/** A Switch, Select or Button at the end. The row itself stays static. */
|
|
547
|
+
control?: React.ReactNode;
|
|
548
|
+
/** Makes the row a link. */
|
|
549
|
+
href?: string;
|
|
550
|
+
/** Makes the row a button (navigation to a sub-page, a dialog…). */
|
|
551
|
+
onSelect?: () => void;
|
|
552
|
+
/** Destructive row ("Sign out", "Delete account"): error colour. */
|
|
553
|
+
destructive?: boolean;
|
|
554
|
+
}
|
|
555
|
+
interface SettingsGroup {
|
|
556
|
+
header?: string;
|
|
557
|
+
footer?: string;
|
|
558
|
+
items: SettingsItem[];
|
|
559
|
+
}
|
|
560
|
+
interface SettingsPageProps extends Omit<PageFrameProps, 'title' | 'children'> {
|
|
561
|
+
groups: SettingsGroup[];
|
|
562
|
+
/** Above the groups: a profile card. */
|
|
563
|
+
header?: React.ReactNode;
|
|
564
|
+
/** @default messages.settings */
|
|
565
|
+
title?: React.ReactNode;
|
|
566
|
+
messages?: Partial<PageTemplateMessages>;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Grouped settings on one page, inset-grouped like iOS Settings. Web twin of
|
|
570
|
+
* the native `SettingsScreen`. For a multi-section account area with a
|
|
571
|
+
* sidebar, wrap pages in `SettingsLayout`.
|
|
572
|
+
*/
|
|
573
|
+
declare const SettingsPage: React.ForwardRefExoticComponent<SettingsPageProps & React.RefAttributes<HTMLElement>>;
|
|
574
|
+
|
|
575
|
+
interface SignInPageProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onSubmit' | 'title'> {
|
|
576
|
+
onSubmit: (email: string, password: string) => void;
|
|
577
|
+
/** Passkey/biometric sign-in, named: "Sign in with a passkey". */
|
|
578
|
+
biometricLabel?: string;
|
|
579
|
+
onBiometric?: () => void;
|
|
580
|
+
onForgotPassword?: () => void;
|
|
581
|
+
onCreateAccount?: () => void;
|
|
582
|
+
loading?: boolean;
|
|
583
|
+
/** Error from the last attempt (announced). */
|
|
584
|
+
error?: string;
|
|
585
|
+
logo?: React.ReactNode;
|
|
586
|
+
/** Copy overrides. */
|
|
587
|
+
title?: string;
|
|
588
|
+
description?: string;
|
|
589
|
+
submitLabel?: string;
|
|
590
|
+
/** Landmark element. @default 'main' */
|
|
591
|
+
as?: 'main' | 'div';
|
|
592
|
+
messages?: Partial<PageTemplateMessages>;
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Email + password sign-in with browser autofill (`username`,
|
|
596
|
+
* `current-password`, `webauthn`) and an optional passkey path. Web twin of
|
|
597
|
+
* the native `SignInScreen`.
|
|
598
|
+
*/
|
|
599
|
+
declare const SignInPage: React.ForwardRefExoticComponent<SignInPageProps & React.RefAttributes<HTMLElement>>;
|
|
600
|
+
|
|
601
|
+
interface CheckoutPageProps extends Omit<PageFrameProps, 'title' | 'children'> {
|
|
602
|
+
from: string;
|
|
603
|
+
to: string;
|
|
604
|
+
/** Available balance in `from`. */
|
|
605
|
+
balance: number;
|
|
606
|
+
/** Quote for an amount: fee, rate and arrival are shown before anything else. */
|
|
607
|
+
quote: (amount: number) => Quote;
|
|
608
|
+
/** Rows on the review step. Defaults to amount, fee, rate, recipient gets, arrives. */
|
|
609
|
+
reviewRows?: (amount: number, quote: Quote) => ReviewRow[];
|
|
610
|
+
/** "Confirm and send". */
|
|
611
|
+
confirmLabel: string;
|
|
612
|
+
/** Named second factor under the button: "You'll confirm with your passkey". */
|
|
613
|
+
confirmHint?: string;
|
|
614
|
+
/** Moves the money. A rejected promise shows its message and stays on review. */
|
|
615
|
+
onConfirm: (amount: number) => void | Promise<void>;
|
|
616
|
+
/** Result screen title. @default messages.sent */
|
|
617
|
+
resultTitle?: string;
|
|
618
|
+
resultDescription?: string;
|
|
619
|
+
onDone: () => void;
|
|
620
|
+
messages?: Partial<PageTemplateMessages>;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Three-step pay flow: amount (live fee and rate) → review (every number,
|
|
624
|
+
* one confirming action) → result. Web twin of the native `AmountStep`,
|
|
625
|
+
* `ReviewStep` and `ResultScreen`.
|
|
626
|
+
*/
|
|
627
|
+
declare const CheckoutPage: React.ForwardRefExoticComponent<CheckoutPageProps & React.RefAttributes<HTMLElement>>;
|
|
628
|
+
|
|
629
|
+
interface ChatPageProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
630
|
+
messages: ChatMessage[];
|
|
631
|
+
onSend: (text: string) => void;
|
|
632
|
+
/** Stop a streaming reply. Shows the stop button while the last message streams. */
|
|
633
|
+
onStop?: () => void;
|
|
634
|
+
/** Assistant is thinking (before the first token). */
|
|
635
|
+
thinking?: boolean;
|
|
636
|
+
placeholder?: string;
|
|
637
|
+
/** Shown while there are no messages. */
|
|
638
|
+
empty?: React.ReactNode;
|
|
639
|
+
/** Assistant avatar beside its messages. */
|
|
640
|
+
assistantAvatar?: React.ReactNode;
|
|
641
|
+
/** Visible page title. Hidden headings still name the page for screen readers. @default messages.chat */
|
|
642
|
+
title?: string;
|
|
643
|
+
/** Show `title` visually. @default false */
|
|
644
|
+
showTitle?: boolean;
|
|
645
|
+
/** Landmark element. @default 'main' */
|
|
646
|
+
as?: 'main' | 'div';
|
|
647
|
+
/** Copy overrides (`messages` is the conversation). */
|
|
648
|
+
strings?: Partial<PageTemplateMessages>;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Full-height conversation: message list that follows new content, a
|
|
652
|
+
* thinking indicator and a composer. Web twin of the native `ChatScreen`.
|
|
653
|
+
* The parent sets the height (e.g. `h-dvh` or the app shell's content area).
|
|
654
|
+
*/
|
|
655
|
+
declare const ChatPage: React.ForwardRefExoticComponent<ChatPageProps & React.RefAttributes<HTMLElement>>;
|
|
656
|
+
|
|
657
|
+
interface PaywallPageProps extends Omit<PageFrameProps, 'title' | 'children'> {
|
|
658
|
+
title: string;
|
|
659
|
+
plans: Plan[];
|
|
660
|
+
defaultPlan?: string;
|
|
661
|
+
onSubscribe: (planId: string) => void;
|
|
662
|
+
onRestore?: () => void;
|
|
663
|
+
/** Legal copy (auto-renewal terms). */
|
|
664
|
+
terms?: string;
|
|
665
|
+
loading?: boolean;
|
|
666
|
+
messages?: Partial<PageTemplateMessages>;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Choose a plan, then one Continue: plans are a radio group, not a row of
|
|
670
|
+
* buttons, so the choice and the commitment stay separate. Web twin of the
|
|
671
|
+
* native `PaywallScreen`. For a pricing page with a button per plan, use `PlanCard`.
|
|
672
|
+
*/
|
|
673
|
+
declare const PaywallPage: React.ForwardRefExoticComponent<PaywallPageProps & React.RefAttributes<HTMLElement>>;
|
|
674
|
+
|
|
675
|
+
type DashboardStat = Pick<StatCardProps, 'label' | 'value' | 'delta' | 'deltaType' | 'sentiment' | 'icon' | 'description'>;
|
|
676
|
+
interface DashboardPageProps extends Omit<PageFrameProps, 'title' | 'children'> {
|
|
677
|
+
/** Page title, e.g. "Good morning, Mei". */
|
|
678
|
+
title: React.ReactNode;
|
|
679
|
+
balance: {
|
|
680
|
+
value: number;
|
|
681
|
+
currency: string;
|
|
682
|
+
label?: string;
|
|
683
|
+
};
|
|
684
|
+
/** Send, Add money, Request… Keep to four. */
|
|
685
|
+
quickActions?: QuickAction[];
|
|
686
|
+
/** Key figures under the balance. */
|
|
687
|
+
stats?: DashboardStat[];
|
|
688
|
+
/** The latest few transactions. */
|
|
689
|
+
recent?: Transaction[];
|
|
690
|
+
onSelectTransaction?: (t: Transaction) => void;
|
|
691
|
+
/** Shows "See all" beside Recent activity. */
|
|
692
|
+
onSeeAllActivity?: () => void;
|
|
693
|
+
insights?: Insight[];
|
|
694
|
+
messages?: Partial<PageTemplateMessages>;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Money-app home: balance with quick actions, key figures, recent activity and
|
|
698
|
+
* insights. Two columns from `lg`, one on phones. Web twin of the native `HomeScreen`.
|
|
699
|
+
*/
|
|
700
|
+
declare const DashboardPage: React.ForwardRefExoticComponent<DashboardPageProps & React.RefAttributes<HTMLElement>>;
|
|
701
|
+
|
|
702
|
+
export { ActivityFeed, type ActivityItemProps, ActivityPage, type ActivityPageProps, AppHeader, type AppHeaderOrg, type AppHeaderProps, type AppHeaderSearchGroup, type AppHeaderSearchItem, type AppHeaderUser, AppLauncher, type AppLauncherApp, type AppLauncherProps, AuthCard, type AuthCardProps, BentoGrid, type BentoGridProps, BentoTile, type BentoTileProps, type BentoTileSize, type ChatMessage, ChatPage, type ChatPageProps, CheckoutPage, type CheckoutPageProps, Conversation, type ConversationMessages, type ConversationProps, DashboardPage, type DashboardPageProps, type DashboardStat, ErrorSummary, type ErrorSummaryItem, type ErrorSummaryProps, FilterBar, type FilterBarProps, type FormErrorMap, InfoList, type InfoListItemProps, type InfoListRootProps, type Insight, ListDetail, type ListDetailProps, NotificationItem, type NotificationItemProps, PageFrame, type PageFrameProps, type PageTemplateMessages, PaywallPage, type PaywallPageProps, type Plan, PlanCard, type PlanCardProps, type QuickAction, type Quote, type ReviewRow, type SettingsGroup, type SettingsItem, SettingsLayout, type SettingsLayoutItem, type SettingsLayoutProps, type SettingsLayoutSectionProps, SettingsPage, type SettingsPageProps, SettingsRow, type SettingsRowProps, SettingsSection, type SettingsSectionProps, SignInPage, type SignInPageProps, StatCard, type StatCardProps, StepIndicator, type StepIndicatorProps, type StepIndicatorStep, type Transaction, TransactionDetailPage, type TransactionDetailPageProps, TransactionRow, UserCard, type UserCardProps, defaultPageTemplateMessages, groupByDay, useFormErrors, usePageMessages };
|
package/dist/index.js
CHANGED
|
@@ -2,21 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
StepIndicator
|
|
4
4
|
} from "./chunk-L456OB3Q.js";
|
|
5
|
+
import {
|
|
6
|
+
TransactionDetailPage
|
|
7
|
+
} from "./chunk-CJBHDX2U.js";
|
|
5
8
|
import {
|
|
6
9
|
UserCard
|
|
7
10
|
} from "./chunk-7NYGYETG.js";
|
|
11
|
+
import "./chunk-RFCPEZGF.js";
|
|
8
12
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
InfoList
|
|
13
|
-
} from "./chunk-WPNT5JOU.js";
|
|
14
|
-
import {
|
|
15
|
-
ListDetail
|
|
16
|
-
} from "./chunk-5JU6HUVJ.js";
|
|
17
|
-
import {
|
|
18
|
-
NotificationItem
|
|
19
|
-
} from "./chunk-5IORYY2L.js";
|
|
13
|
+
PaywallPage
|
|
14
|
+
} from "./chunk-M3OHX4F4.js";
|
|
20
15
|
import {
|
|
21
16
|
PlanCard
|
|
22
17
|
} from "./chunk-YB7G4YBU.js";
|
|
@@ -24,15 +19,48 @@ import {
|
|
|
24
19
|
SettingsLayout,
|
|
25
20
|
SettingsRow
|
|
26
21
|
} from "./chunk-WIHNK7RT.js";
|
|
22
|
+
import {
|
|
23
|
+
SettingsPage
|
|
24
|
+
} from "./chunk-27N33TGN.js";
|
|
27
25
|
import {
|
|
28
26
|
SettingsSection
|
|
29
27
|
} from "./chunk-U3FT7XAU.js";
|
|
28
|
+
import {
|
|
29
|
+
SignInPage
|
|
30
|
+
} from "./chunk-UNQD426H.js";
|
|
31
|
+
import {
|
|
32
|
+
CheckoutPage
|
|
33
|
+
} from "./chunk-CZR6NZDH.js";
|
|
34
|
+
import {
|
|
35
|
+
DashboardPage
|
|
36
|
+
} from "./chunk-33Z2ZPO7.js";
|
|
30
37
|
import {
|
|
31
38
|
StatCard
|
|
32
39
|
} from "./chunk-INKX2GYA.js";
|
|
40
|
+
import {
|
|
41
|
+
ErrorSummary,
|
|
42
|
+
useFormErrors
|
|
43
|
+
} from "./chunk-RWPFCNMJ.js";
|
|
44
|
+
import {
|
|
45
|
+
FilterBar
|
|
46
|
+
} from "./chunk-Z6VMCMSW.js";
|
|
47
|
+
import {
|
|
48
|
+
InfoList
|
|
49
|
+
} from "./chunk-WPNT5JOU.js";
|
|
50
|
+
import {
|
|
51
|
+
ListDetail
|
|
52
|
+
} from "./chunk-5JU6HUVJ.js";
|
|
53
|
+
import {
|
|
54
|
+
NotificationItem
|
|
55
|
+
} from "./chunk-5IORYY2L.js";
|
|
33
56
|
import {
|
|
34
57
|
ActivityFeed
|
|
35
58
|
} from "./chunk-HYC5N5MO.js";
|
|
59
|
+
import "./chunk-CWFZA7ZQ.js";
|
|
60
|
+
import {
|
|
61
|
+
ActivityPage,
|
|
62
|
+
TransactionRow
|
|
63
|
+
} from "./chunk-OC4XY3US.js";
|
|
36
64
|
import {
|
|
37
65
|
AppHeader
|
|
38
66
|
} from "./chunk-2WKGBINE.js";
|
|
@@ -47,32 +75,50 @@ import {
|
|
|
47
75
|
BentoGrid,
|
|
48
76
|
BentoTile
|
|
49
77
|
} from "./chunk-WZTDCJYP.js";
|
|
78
|
+
import {
|
|
79
|
+
ChatPage
|
|
80
|
+
} from "./chunk-64PSI75E.js";
|
|
50
81
|
import {
|
|
51
82
|
Conversation
|
|
52
83
|
} from "./chunk-WRP73TXG.js";
|
|
53
84
|
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
85
|
+
PageFrame,
|
|
86
|
+
defaultPageTemplateMessages,
|
|
87
|
+
groupByDay,
|
|
88
|
+
usePageMessages
|
|
89
|
+
} from "./chunk-7QCJC2DV.js";
|
|
57
90
|
export {
|
|
58
91
|
ActivityFeed,
|
|
92
|
+
ActivityPage,
|
|
59
93
|
AppHeader,
|
|
60
94
|
AppLauncher,
|
|
61
95
|
AuthCard,
|
|
62
96
|
BentoGrid,
|
|
63
97
|
BentoTile,
|
|
98
|
+
ChatPage,
|
|
99
|
+
CheckoutPage,
|
|
64
100
|
Conversation,
|
|
101
|
+
DashboardPage,
|
|
65
102
|
ErrorSummary,
|
|
66
103
|
FilterBar,
|
|
67
104
|
InfoList,
|
|
68
105
|
ListDetail,
|
|
69
106
|
NotificationItem,
|
|
107
|
+
PageFrame,
|
|
108
|
+
PaywallPage,
|
|
70
109
|
PlanCard,
|
|
71
110
|
SettingsLayout,
|
|
111
|
+
SettingsPage,
|
|
72
112
|
SettingsRow,
|
|
73
113
|
SettingsSection,
|
|
114
|
+
SignInPage,
|
|
74
115
|
StatCard,
|
|
75
116
|
StepIndicator,
|
|
117
|
+
TransactionDetailPage,
|
|
118
|
+
TransactionRow,
|
|
76
119
|
UserCard,
|
|
77
|
-
|
|
120
|
+
defaultPageTemplateMessages,
|
|
121
|
+
groupByDay,
|
|
122
|
+
useFormErrors,
|
|
123
|
+
usePageMessages
|
|
78
124
|
};
|