@mangtre/ui 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 (95) hide show
  1. package/LICENSE +26 -0
  2. package/dist/MangThemeProvider-BqdGKBP2.d.ts +34 -0
  3. package/dist/Money-Dw3GnUvX.d.ts +27 -0
  4. package/dist/actions.d.ts +31 -0
  5. package/dist/actions.js +13 -0
  6. package/dist/ai.d.ts +58 -0
  7. package/dist/ai.js +13 -0
  8. package/dist/analytics.d.ts +40 -0
  9. package/dist/analytics.js +15 -0
  10. package/dist/app.d.ts +24 -0
  11. package/dist/app.js +9 -0
  12. package/dist/catalog.d.ts +76 -0
  13. package/dist/catalog.js +1210 -0
  14. package/dist/charts.d.ts +89 -0
  15. package/dist/charts.js +34 -0
  16. package/dist/chunk-3AL4SUFD.js +301 -0
  17. package/dist/chunk-4XNSYKQE.js +142 -0
  18. package/dist/chunk-5Z4VLQKH.js +43 -0
  19. package/dist/chunk-7P2EQZYD.js +59 -0
  20. package/dist/chunk-7WHNIEDV.js +120 -0
  21. package/dist/chunk-ASZKHSMG.js +82 -0
  22. package/dist/chunk-BCBN2EGH.js +216 -0
  23. package/dist/chunk-BLYAFV45.js +320 -0
  24. package/dist/chunk-DLKEXWPA.js +90 -0
  25. package/dist/chunk-DTASXPTB.js +70 -0
  26. package/dist/chunk-FZRXVRC7.js +63 -0
  27. package/dist/chunk-ID233AGM.js +108 -0
  28. package/dist/chunk-IVYXOKMO.js +74 -0
  29. package/dist/chunk-IX3DYETF.js +61 -0
  30. package/dist/chunk-JJB4PJC3.js +166 -0
  31. package/dist/chunk-K5Q3RCV6.js +119 -0
  32. package/dist/chunk-LNRUPJDF.js +161 -0
  33. package/dist/chunk-LZORNMBL.js +0 -0
  34. package/dist/chunk-OBPXCUVF.js +282 -0
  35. package/dist/chunk-OJX2EIMB.js +145 -0
  36. package/dist/chunk-PPOYMKV3.js +170 -0
  37. package/dist/chunk-PQGUWJG4.js +47 -0
  38. package/dist/chunk-RE7OWRA4.js +187 -0
  39. package/dist/chunk-SJF3CHAW.js +108 -0
  40. package/dist/chunk-UF6ANDJZ.js +112 -0
  41. package/dist/chunk-VGC5DMOM.js +107 -0
  42. package/dist/chunk-VP56Z4BS.js +0 -0
  43. package/dist/chunk-VRD66FIA.js +77 -0
  44. package/dist/chunk-X7T2DJLU.js +113 -0
  45. package/dist/chunk-XPV3OOLU.js +147 -0
  46. package/dist/chunk-YN5O6YL6.js +69 -0
  47. package/dist/chunk-Z4ANGBPC.js +94 -0
  48. package/dist/creator.d.ts +55 -0
  49. package/dist/creator.js +20 -0
  50. package/dist/data-room.d.ts +50 -0
  51. package/dist/data-room.js +17 -0
  52. package/dist/editor.d.ts +32 -0
  53. package/dist/editor.js +14 -0
  54. package/dist/feedback.d.ts +48 -0
  55. package/dist/feedback.js +16 -0
  56. package/dist/forms.d.ts +91 -0
  57. package/dist/forms.js +26 -0
  58. package/dist/handoff.d.ts +37 -0
  59. package/dist/handoff.js +13 -0
  60. package/dist/index.css +2 -0
  61. package/dist/index.d.ts +62 -0
  62. package/dist/index.js +338 -0
  63. package/dist/layout.d.ts +57 -0
  64. package/dist/layout.js +22 -0
  65. package/dist/learning.d.ts +46 -0
  66. package/dist/learning.js +15 -0
  67. package/dist/media.d.ts +48 -0
  68. package/dist/media.js +16 -0
  69. package/dist/monetization.d.ts +30 -0
  70. package/dist/monetization.js +14 -0
  71. package/dist/money.d.ts +45 -0
  72. package/dist/money.js +28 -0
  73. package/dist/navigation.d.ts +36 -0
  74. package/dist/navigation.js +14 -0
  75. package/dist/overlay.d.ts +72 -0
  76. package/dist/overlay.js +20 -0
  77. package/dist/platform.d.ts +94 -0
  78. package/dist/platform.js +42 -0
  79. package/dist/primitives.d.ts +83 -0
  80. package/dist/primitives.js +22 -0
  81. package/dist/privacy.d.ts +28 -0
  82. package/dist/privacy.js +15 -0
  83. package/dist/sandbox.d.ts +40 -0
  84. package/dist/sandbox.js +15 -0
  85. package/dist/settings.d.ts +29 -0
  86. package/dist/settings.js +13 -0
  87. package/dist/surface.d.ts +33 -0
  88. package/dist/surface.js +16 -0
  89. package/dist/theme.css +63 -0
  90. package/dist/theme.d.ts +64 -0
  91. package/dist/theme.js +27 -0
  92. package/dist/tokens.css +119 -0
  93. package/dist/tokens.d.ts +128 -0
  94. package/dist/tokens.js +8 -0
  95. package/package.json +151 -0
@@ -0,0 +1,46 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { Locale } from '@mangtre/core';
4
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
5
+
6
+ interface Themed {
7
+ theme?: ThemeMode;
8
+ className?: string;
9
+ }
10
+ interface FlashcardProps extends Themed {
11
+ front: ReactNode;
12
+ back: ReactNode;
13
+ /** Controlled flip; omit for internal toggle on click. */
14
+ flipped?: boolean;
15
+ onFlip?: (flipped: boolean) => void;
16
+ locale?: Locale;
17
+ }
18
+ declare function Flashcard({ front, back, flipped, onFlip, locale, theme, className, }: FlashcardProps): react.JSX.Element;
19
+ interface QuizOption {
20
+ id: string;
21
+ label: ReactNode;
22
+ }
23
+ interface QuizCardProps extends Themed {
24
+ question: ReactNode;
25
+ options: QuizOption[];
26
+ /** Selected option id. */
27
+ value?: string | null;
28
+ onSelect?: (id: string) => void;
29
+ /** When set, options reveal correct/wrong and lock. */
30
+ correctId?: string;
31
+ revealed?: boolean;
32
+ }
33
+ declare function QuizCard({ question, options, value, onSelect, correctId, revealed, theme, className, }: QuizCardProps): react.JSX.Element;
34
+ interface ScoreCardProps extends Themed {
35
+ score: number;
36
+ total: number;
37
+ label?: ReactNode;
38
+ }
39
+ declare function ScoreCard({ score, total, label, theme, className }: ScoreCardProps): react.JSX.Element;
40
+ interface StreakBadgeProps extends Themed {
41
+ days: number;
42
+ locale?: Locale;
43
+ }
44
+ declare function StreakBadge({ days, locale, theme, className }: StreakBadgeProps): react.JSX.Element;
45
+
46
+ export { Flashcard, type FlashcardProps, QuizCard, type QuizCardProps, type QuizOption, ScoreCard, type ScoreCardProps, StreakBadge, type StreakBadgeProps };
@@ -0,0 +1,15 @@
1
+ import {
2
+ Flashcard,
3
+ QuizCard,
4
+ ScoreCard,
5
+ StreakBadge
6
+ } from "./chunk-4XNSYKQE.js";
7
+ import "./chunk-FZRXVRC7.js";
8
+ import "./chunk-3AL4SUFD.js";
9
+ import "./chunk-PPOYMKV3.js";
10
+ export {
11
+ Flashcard,
12
+ QuizCard,
13
+ ScoreCard,
14
+ StreakBadge
15
+ };
@@ -0,0 +1,48 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
4
+ import '@mangtre/core';
5
+
6
+ interface Themed {
7
+ theme?: ThemeMode;
8
+ className?: string;
9
+ }
10
+ interface DropzoneProps extends Themed {
11
+ onFiles: (files: File[]) => void;
12
+ accept?: string;
13
+ multiple?: boolean;
14
+ label?: ReactNode;
15
+ icon?: ReactNode;
16
+ }
17
+ declare function Dropzone({ onFiles, accept, multiple, label, icon, theme, className, }: DropzoneProps): react.JSX.Element;
18
+ interface FilePreviewProps extends Themed {
19
+ name: string;
20
+ size?: number;
21
+ icon?: ReactNode;
22
+ action?: ReactNode;
23
+ }
24
+ declare function FilePreview({ name, size, icon, action, theme, className, }: FilePreviewProps): react.JSX.Element;
25
+ interface ImagePreviewProps extends Themed {
26
+ src: string;
27
+ alt: string;
28
+ maxHeight?: string | number;
29
+ }
30
+ declare function ImagePreview({ src, alt, maxHeight, theme, className, }: ImagePreviewProps): react.JSX.Element;
31
+ interface AvatarProps extends Themed {
32
+ /** Image URL; falls back to initials of `name`. */
33
+ src?: string;
34
+ name?: string;
35
+ size?: number;
36
+ }
37
+ declare function Avatar({ src, name, size, theme, className }: AvatarProps): react.JSX.Element;
38
+ interface AvatarGroupProps extends Themed {
39
+ people: Array<{
40
+ name?: string;
41
+ src?: string;
42
+ }>;
43
+ max?: number;
44
+ size?: number;
45
+ }
46
+ declare function AvatarGroup({ people, max, size, theme, className }: AvatarGroupProps): react.JSX.Element;
47
+
48
+ export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Dropzone, type DropzoneProps, FilePreview, type FilePreviewProps, ImagePreview, type ImagePreviewProps };
package/dist/media.js ADDED
@@ -0,0 +1,16 @@
1
+ import {
2
+ Avatar,
3
+ AvatarGroup,
4
+ Dropzone,
5
+ FilePreview,
6
+ ImagePreview
7
+ } from "./chunk-RE7OWRA4.js";
8
+ import "./chunk-3AL4SUFD.js";
9
+ import "./chunk-PPOYMKV3.js";
10
+ export {
11
+ Avatar,
12
+ AvatarGroup,
13
+ Dropzone,
14
+ FilePreview,
15
+ ImagePreview
16
+ };
@@ -0,0 +1,30 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { Locale } from '@mangtre/core';
4
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
5
+
6
+ interface Themed {
7
+ theme?: ThemeMode;
8
+ className?: string;
9
+ }
10
+ interface ComingSoonMonetizationCardProps extends Themed {
11
+ title?: ReactNode;
12
+ children?: ReactNode;
13
+ locale?: Locale;
14
+ }
15
+ declare function ComingSoonMonetizationCard({ title, children, locale, theme, className, }: ComingSoonMonetizationCardProps): react.JSX.Element;
16
+ type PayoutStatus = "none" | "pending" | "paid";
17
+ declare function PayoutStatusBadge({ status, locale, theme, className, }: Themed & {
18
+ status: PayoutStatus;
19
+ locale?: Locale;
20
+ }): react.JSX.Element;
21
+ interface EarningsRow {
22
+ period: string;
23
+ amount: number;
24
+ }
25
+ declare function EarningsLedgerTable({ rows, locale, theme, className, }: Themed & {
26
+ rows: EarningsRow[];
27
+ locale?: Locale;
28
+ }): react.JSX.Element;
29
+
30
+ export { ComingSoonMonetizationCard, type ComingSoonMonetizationCardProps, EarningsLedgerTable, type EarningsRow, type PayoutStatus, PayoutStatusBadge };
@@ -0,0 +1,14 @@
1
+ import {
2
+ ComingSoonMonetizationCard,
3
+ EarningsLedgerTable,
4
+ PayoutStatusBadge
5
+ } from "./chunk-ASZKHSMG.js";
6
+ import "./chunk-IX3DYETF.js";
7
+ import "./chunk-FZRXVRC7.js";
8
+ import "./chunk-3AL4SUFD.js";
9
+ import "./chunk-PPOYMKV3.js";
10
+ export {
11
+ ComingSoonMonetizationCard,
12
+ EarningsLedgerTable,
13
+ PayoutStatusBadge
14
+ };
@@ -0,0 +1,45 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { Locale } from '@mangtre/core';
4
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
5
+ export { M as MoneyText, V as VndText, f as formatVnd } from './Money-Dw3GnUvX.js';
6
+
7
+ interface Themed {
8
+ theme?: ThemeMode;
9
+ className?: string;
10
+ }
11
+ interface AmountSummaryProps extends Themed {
12
+ label: ReactNode;
13
+ amount: number;
14
+ sign?: "auto" | "none";
15
+ }
16
+ declare function AmountSummary({ label, amount, sign, theme, className, }: AmountSummaryProps): react.JSX.Element;
17
+ interface ExpenseRowProps extends Themed {
18
+ note: ReactNode;
19
+ /** e.g. payer + split summary. */
20
+ meta?: ReactNode;
21
+ amount: number;
22
+ action?: ReactNode;
23
+ }
24
+ declare function ExpenseRow({ note, meta, amount, action, theme, className }: ExpenseRowProps): react.JSX.Element;
25
+ declare function ExpenseList({ children, theme, className }: Themed & {
26
+ children: ReactNode;
27
+ }): react.JSX.Element;
28
+ interface PaidBadgeProps extends Themed {
29
+ locale?: Locale;
30
+ }
31
+ declare function PaidBadge({ locale, theme, className }: PaidBadgeProps): react.JSX.Element;
32
+ declare function UnpaidBadge({ locale, theme, className }: PaidBadgeProps): react.JSX.Element;
33
+ interface SettlementCardProps extends Themed {
34
+ from: ReactNode;
35
+ to: ReactNode;
36
+ amount: number;
37
+ /** App-generated VietQR node (canvas/svg/img). */
38
+ qr?: ReactNode;
39
+ paid?: boolean;
40
+ onMarkPaid?: () => void;
41
+ locale?: Locale;
42
+ }
43
+ declare function SettlementCard({ from, to, amount, qr, paid, onMarkPaid, locale, theme, className, }: SettlementCardProps): react.JSX.Element;
44
+
45
+ export { AmountSummary, type AmountSummaryProps, ExpenseList, ExpenseRow, type ExpenseRowProps, PaidBadge, type PaidBadgeProps, SettlementCard, type SettlementCardProps, UnpaidBadge };
package/dist/money.js ADDED
@@ -0,0 +1,28 @@
1
+ import {
2
+ AmountSummary,
3
+ ExpenseList,
4
+ ExpenseRow,
5
+ PaidBadge,
6
+ SettlementCard,
7
+ UnpaidBadge
8
+ } from "./chunk-UF6ANDJZ.js";
9
+ import {
10
+ MoneyText,
11
+ VndText,
12
+ formatVnd
13
+ } from "./chunk-IX3DYETF.js";
14
+ import "./chunk-FZRXVRC7.js";
15
+ import "./chunk-YN5O6YL6.js";
16
+ import "./chunk-3AL4SUFD.js";
17
+ import "./chunk-PPOYMKV3.js";
18
+ export {
19
+ AmountSummary,
20
+ ExpenseList,
21
+ ExpenseRow,
22
+ MoneyText,
23
+ PaidBadge,
24
+ SettlementCard,
25
+ UnpaidBadge,
26
+ VndText,
27
+ formatVnd
28
+ };
@@ -0,0 +1,36 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
4
+ import '@mangtre/core';
5
+
6
+ interface TabsProps {
7
+ value?: string;
8
+ defaultValue?: string;
9
+ onValueChange?: (value: string) => void;
10
+ theme?: ThemeMode;
11
+ className?: string;
12
+ children: ReactNode;
13
+ }
14
+ declare function Tabs({ value, defaultValue, onValueChange, theme, className, children, }: TabsProps): react.JSX.Element;
15
+ interface TabListProps {
16
+ /** Accessible label for the tab set. */
17
+ label?: string;
18
+ className?: string;
19
+ children: ReactNode;
20
+ }
21
+ declare function TabList({ label, className, children }: TabListProps): react.JSX.Element;
22
+ interface TabProps {
23
+ value: string;
24
+ disabled?: boolean;
25
+ className?: string;
26
+ children: ReactNode;
27
+ }
28
+ declare function Tab({ value, disabled, className, children }: TabProps): react.JSX.Element;
29
+ interface TabPanelProps {
30
+ value: string;
31
+ className?: string;
32
+ children: ReactNode;
33
+ }
34
+ declare function TabPanel({ value, className, children }: TabPanelProps): react.JSX.Element | null;
35
+
36
+ export { Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
@@ -0,0 +1,14 @@
1
+ import {
2
+ Tab,
3
+ TabList,
4
+ TabPanel,
5
+ Tabs
6
+ } from "./chunk-SJF3CHAW.js";
7
+ import "./chunk-3AL4SUFD.js";
8
+ import "./chunk-PPOYMKV3.js";
9
+ export {
10
+ Tab,
11
+ TabList,
12
+ TabPanel,
13
+ Tabs
14
+ };
@@ -0,0 +1,72 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
4
+ import '@mangtre/core';
5
+
6
+ interface DialogProps {
7
+ open: boolean;
8
+ onClose: () => void;
9
+ title?: ReactNode;
10
+ /** Footer actions (e.g. buttons). */
11
+ footer?: ReactNode;
12
+ /** Close when the backdrop is clicked. Default true. */
13
+ dismissOnBackdrop?: boolean;
14
+ theme?: ThemeMode;
15
+ className?: string;
16
+ children?: ReactNode;
17
+ }
18
+ declare function Dialog({ open, onClose, title, footer, dismissOnBackdrop, theme, className, children, }: DialogProps): react.JSX.Element | null;
19
+
20
+ interface SheetProps {
21
+ open: boolean;
22
+ onClose: () => void;
23
+ /** Edge the sheet attaches to. Default `"right"`. */
24
+ side?: "right" | "left" | "bottom";
25
+ title?: ReactNode;
26
+ footer?: ReactNode;
27
+ dismissOnBackdrop?: boolean;
28
+ theme?: ThemeMode;
29
+ className?: string;
30
+ children?: ReactNode;
31
+ }
32
+ declare function Sheet({ open, onClose, side, title, footer, dismissOnBackdrop, theme, className, children, }: SheetProps): react.JSX.Element | null;
33
+
34
+ type ToastTone = "default" | "success" | "danger" | "warning";
35
+ interface ToastInput {
36
+ message: ReactNode;
37
+ tone?: ToastTone;
38
+ /** Auto-dismiss after N ms. Default 4000; 0 disables auto-dismiss. */
39
+ duration?: number;
40
+ }
41
+ interface ToastItem extends ToastInput {
42
+ id: number;
43
+ }
44
+ type ToastAction = {
45
+ type: "add";
46
+ toast: ToastItem;
47
+ } | {
48
+ type: "dismiss";
49
+ id: number;
50
+ };
51
+ /** Pure queue reducer — exported for tests. Caps the queue at 4 (drops oldest). */
52
+ declare function toastReducer(state: ToastItem[], action: ToastAction): ToastItem[];
53
+ interface ToastCtx {
54
+ toast: (input: ToastInput) => number;
55
+ dismiss: (id: number) => void;
56
+ }
57
+ interface ToastProviderProps {
58
+ theme?: ThemeMode;
59
+ children: ReactNode;
60
+ }
61
+ declare function ToastProvider({ theme, children }: ToastProviderProps): react.JSX.Element;
62
+ /** Access the toast API. Must be used inside `<ToastProvider>`. */
63
+ declare function useToast(): ToastCtx;
64
+ interface ToastViewportProps {
65
+ items: ToastItem[];
66
+ onDismiss: (id: number) => void;
67
+ theme?: ThemeMode;
68
+ }
69
+ /** Renders the active toasts (used internally by `ToastProvider`). */
70
+ declare function ToastViewport({ items, onDismiss, theme }: ToastViewportProps): react.JSX.Element | null;
71
+
72
+ export { Dialog, type DialogProps, Sheet, type SheetProps, type ToastAction, type ToastInput, type ToastItem, ToastProvider, type ToastProviderProps, type ToastTone, ToastViewport, type ToastViewportProps, toastReducer, useToast };
@@ -0,0 +1,20 @@
1
+ import {
2
+ Dialog,
3
+ Sheet
4
+ } from "./chunk-LNRUPJDF.js";
5
+ import {
6
+ ToastProvider,
7
+ ToastViewport,
8
+ toastReducer,
9
+ useToast
10
+ } from "./chunk-DTASXPTB.js";
11
+ import "./chunk-3AL4SUFD.js";
12
+ import "./chunk-PPOYMKV3.js";
13
+ export {
14
+ Dialog,
15
+ Sheet,
16
+ ToastProvider,
17
+ ToastViewport,
18
+ toastReducer,
19
+ useToast
20
+ };
@@ -0,0 +1,94 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
4
+ import { Locale } from '@mangtre/core';
5
+ export { M as MoneyText, a as MoneyTextProps, V as VndText, b as VndTextProps, f as formatVnd } from './Money-Dw3GnUvX.js';
6
+
7
+ type BadgeTone = "accent" | "neutral" | "success" | "danger" | "warning" | "info";
8
+ interface BadgeProps {
9
+ tone?: BadgeTone;
10
+ icon?: ReactNode;
11
+ theme?: ThemeMode;
12
+ className?: string;
13
+ children?: ReactNode;
14
+ }
15
+ declare function Badge({ tone, icon, theme, className, children }: BadgeProps): react.JSX.Element;
16
+ interface VerifiedBadgeProps {
17
+ /** Visible label; omit + set `compact` for icon-only. Default "Măng Verified". */
18
+ label?: string;
19
+ /** Icon-only (label becomes screen-reader-only). */
20
+ compact?: boolean;
21
+ /** Tooltip text. */
22
+ title?: string;
23
+ theme?: ThemeMode;
24
+ className?: string;
25
+ }
26
+ /** "Măng Verified" — first-party / curated app mark. */
27
+ declare function VerifiedBadge({ label, compact, title, theme, className, }: VerifiedBadgeProps): react.JSX.Element;
28
+
29
+ type Surface = "desktop" | "web" | "zalo";
30
+ interface SurfaceBadgeProps {
31
+ surface: Surface;
32
+ locale?: Locale;
33
+ theme?: ThemeMode;
34
+ className?: string;
35
+ }
36
+ declare function SurfaceBadge({ surface, locale, theme, className }: SurfaceBadgeProps): react.JSX.Element;
37
+ interface PermissionBadgeProps {
38
+ /** Permission key (e.g. "storage", "data", "ai"). */
39
+ permission: string;
40
+ /** Flag curation-sensitive permissions (warning tone). */
41
+ sensitive?: boolean;
42
+ theme?: ThemeMode;
43
+ className?: string;
44
+ }
45
+ declare function PermissionBadge({ permission, sensitive, theme, className }: PermissionBadgeProps): react.JSX.Element;
46
+ interface DataBadgeProps {
47
+ locale?: Locale;
48
+ theme?: ThemeMode;
49
+ className?: string;
50
+ }
51
+ /** "Trên máy" — local-first, nothing leaves the device. */
52
+ declare function LocalBadge({ locale, theme, className }: DataBadgeProps): react.JSX.Element;
53
+ /** "Đám mây" — data persisted on Măng's server. */
54
+ declare function CloudBadge({ locale, theme, className }: DataBadgeProps): react.JSX.Element;
55
+ /** "Trực tiếp" — live, shared across devices in real time. */
56
+ declare function RealtimeBadge({ locale, theme, className }: DataBadgeProps): react.JSX.Element;
57
+
58
+ interface GracefulDegradePanelProps {
59
+ icon?: ReactNode;
60
+ title?: ReactNode;
61
+ children?: ReactNode;
62
+ theme?: ThemeMode;
63
+ className?: string;
64
+ }
65
+ /** A panel shown in place of a feature that isn't available on the current surface. */
66
+ declare function GracefulDegradePanel({ icon, title, children, theme, className, }: GracefulDegradePanelProps): react.JSX.Element;
67
+ interface SurfaceGateProps {
68
+ /** Surfaces where the feature runs; omit = all. */
69
+ surfaces?: Surface[];
70
+ /** The surface this document is running on. */
71
+ current: Surface;
72
+ locale?: Locale;
73
+ /** Shown when blocked; defaults to a GracefulDegradePanel. Pass `null` to render nothing. */
74
+ fallback?: ReactNode;
75
+ theme?: ThemeMode;
76
+ children: ReactNode;
77
+ }
78
+ declare function SurfaceGate({ surfaces, current, locale, fallback, theme, children, }: SurfaceGateProps): react.JSX.Element;
79
+ interface PermissionGateProps {
80
+ granted: boolean;
81
+ fallback?: ReactNode;
82
+ children: ReactNode;
83
+ }
84
+ /** Render children only when a permission/capability is granted. */
85
+ declare function PermissionGate({ granted, fallback, children }: PermissionGateProps): react.JSX.Element;
86
+ interface SurfaceOnlyProps {
87
+ current: Surface;
88
+ children: ReactNode;
89
+ }
90
+ declare const DesktopOnly: ({ current, children }: SurfaceOnlyProps) => react.JSX.Element | null;
91
+ declare const WebOnly: ({ current, children }: SurfaceOnlyProps) => react.JSX.Element | null;
92
+ declare const ZaloOnly: ({ current, children }: SurfaceOnlyProps) => react.JSX.Element | null;
93
+
94
+ export { Badge, type BadgeProps, type BadgeTone, CloudBadge, DesktopOnly, GracefulDegradePanel, type GracefulDegradePanelProps, LocalBadge, PermissionBadge, type PermissionBadgeProps, PermissionGate, type PermissionGateProps, RealtimeBadge, type Surface, SurfaceBadge, type SurfaceBadgeProps, SurfaceGate, type SurfaceGateProps, VerifiedBadge, type VerifiedBadgeProps, WebOnly, ZaloOnly };
@@ -0,0 +1,42 @@
1
+ import {
2
+ CloudBadge,
3
+ DesktopOnly,
4
+ GracefulDegradePanel,
5
+ LocalBadge,
6
+ PermissionBadge,
7
+ PermissionGate,
8
+ RealtimeBadge,
9
+ SurfaceBadge,
10
+ SurfaceGate,
11
+ WebOnly,
12
+ ZaloOnly
13
+ } from "./chunk-K5Q3RCV6.js";
14
+ import {
15
+ MoneyText,
16
+ VndText,
17
+ formatVnd
18
+ } from "./chunk-IX3DYETF.js";
19
+ import {
20
+ Badge,
21
+ VerifiedBadge
22
+ } from "./chunk-FZRXVRC7.js";
23
+ import "./chunk-3AL4SUFD.js";
24
+ import "./chunk-PPOYMKV3.js";
25
+ export {
26
+ Badge,
27
+ CloudBadge,
28
+ DesktopOnly,
29
+ GracefulDegradePanel,
30
+ LocalBadge,
31
+ MoneyText,
32
+ PermissionBadge,
33
+ PermissionGate,
34
+ RealtimeBadge,
35
+ SurfaceBadge,
36
+ SurfaceGate,
37
+ VerifiedBadge,
38
+ VndText,
39
+ WebOnly,
40
+ ZaloOnly,
41
+ formatVnd
42
+ };
@@ -0,0 +1,83 @@
1
+ import * as react from 'react';
2
+ import { ElementType, CSSProperties, ReactNode } from 'react';
3
+ import { tokens } from './tokens.js';
4
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
5
+ import '@mangtre/core';
6
+
7
+ type SpaceKey = keyof typeof tokens.space;
8
+ interface BoxProps {
9
+ as?: ElementType;
10
+ className?: string;
11
+ style?: CSSProperties;
12
+ children?: ReactNode;
13
+ }
14
+ /** A plain layout box (defaults to `<div>`). */
15
+ declare function Box({ as, className, style, children }: BoxProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
16
+ interface StackProps extends BoxProps {
17
+ /** Main-axis direction. Default `"column"`. */
18
+ direction?: "row" | "column";
19
+ /** Gap between children, as a token spacing step (0–16). Default `4`. */
20
+ gap?: SpaceKey;
21
+ align?: CSSProperties["alignItems"];
22
+ justify?: CSSProperties["justifyContent"];
23
+ wrap?: boolean;
24
+ }
25
+ /** Flex container with token-based gap. */
26
+ declare function Stack({ as, direction, gap, align, justify, wrap, className, style, children, }: StackProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
27
+ /** Horizontal stack (row). */
28
+ declare function HStack(props: Omit<StackProps, "direction">): react.JSX.Element;
29
+ /** Vertical stack (column). */
30
+ declare function VStack(props: Omit<StackProps, "direction">): react.JSX.Element;
31
+ interface SpacerProps {
32
+ /** Fixed size as a token spacing step; omit to flex-grow and push siblings apart. */
33
+ size?: SpaceKey;
34
+ }
35
+ /** Flexible spacer — grows to fill (or a fixed token gap when `size` is given). */
36
+ declare function Spacer({ size }: SpacerProps): react.JSX.Element;
37
+
38
+ type SizeKey = keyof typeof tokens.fontSize;
39
+ type Tone = "default" | "muted" | "strong" | "accent";
40
+ interface TextProps {
41
+ as?: "p" | "span" | "div" | "label" | "small";
42
+ size?: SizeKey;
43
+ tone?: Tone;
44
+ /** Font weight token key. */
45
+ weight?: keyof typeof tokens.fontWeight;
46
+ theme?: ThemeMode;
47
+ className?: string;
48
+ style?: CSSProperties;
49
+ children?: ReactNode;
50
+ }
51
+ /** Body text. */
52
+ declare function Text({ as, size, tone, weight, theme, className, style, children, }: TextProps): react.DetailedReactHTMLElement<{
53
+ className: string;
54
+ "data-tone": Tone;
55
+ style: CSSProperties;
56
+ "data-theme": ThemeMode;
57
+ "data-density": string;
58
+ }, HTMLElement>;
59
+ interface HeadingProps {
60
+ /** Heading level 1–6 (semantic). Default `2`. */
61
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
62
+ size?: SizeKey;
63
+ theme?: ThemeMode;
64
+ className?: string;
65
+ style?: CSSProperties;
66
+ children?: ReactNode;
67
+ }
68
+ /** Display heading (Quicksand). */
69
+ declare function Heading({ level, size, theme, className, style, children }: HeadingProps): react.DetailedReactHTMLElement<{
70
+ className: string;
71
+ style: CSSProperties;
72
+ "data-theme": ThemeMode;
73
+ "data-density": string;
74
+ }, HTMLElement>;
75
+
76
+ interface DividerProps {
77
+ theme?: ThemeMode;
78
+ className?: string;
79
+ style?: CSSProperties;
80
+ }
81
+ declare function Divider({ theme, className, style }: DividerProps): react.JSX.Element;
82
+
83
+ export { Box, type BoxProps, Divider, type DividerProps, HStack, Heading, type HeadingProps, Spacer, type SpacerProps, Stack, type StackProps, Text, type TextProps, VStack };
@@ -0,0 +1,22 @@
1
+ import {
2
+ Box,
3
+ Divider,
4
+ HStack,
5
+ Heading,
6
+ Spacer,
7
+ Stack,
8
+ Text,
9
+ VStack
10
+ } from "./chunk-7WHNIEDV.js";
11
+ import "./chunk-3AL4SUFD.js";
12
+ import "./chunk-PPOYMKV3.js";
13
+ export {
14
+ Box,
15
+ Divider,
16
+ HStack,
17
+ Heading,
18
+ Spacer,
19
+ Stack,
20
+ Text,
21
+ VStack
22
+ };
@@ -0,0 +1,28 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { Locale } from '@mangtre/core';
4
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
5
+
6
+ interface Themed {
7
+ theme?: ThemeMode;
8
+ className?: string;
9
+ }
10
+ interface PrivacyNoticeProps extends Themed {
11
+ children: ReactNode;
12
+ icon?: ReactNode;
13
+ }
14
+ declare function PrivacyNotice({ children, icon, theme, className }: PrivacyNoticeProps): react.JSX.Element;
15
+ declare function LocalFirstNotice({ locale, theme, className, }: Themed & {
16
+ locale?: Locale;
17
+ }): react.JSX.Element;
18
+ declare function NoPiiBadge({ locale, theme, className }: Themed & {
19
+ locale?: Locale;
20
+ }): react.JSX.Element;
21
+ interface ExternalLinkWarningProps extends Themed {
22
+ /** The destination shown to the user. */
23
+ href: string;
24
+ locale?: Locale;
25
+ }
26
+ declare function ExternalLinkWarning({ href, locale, theme, className, }: ExternalLinkWarningProps): react.JSX.Element;
27
+
28
+ export { ExternalLinkWarning, type ExternalLinkWarningProps, LocalFirstNotice, NoPiiBadge, PrivacyNotice, type PrivacyNoticeProps };
@@ -0,0 +1,15 @@
1
+ import {
2
+ ExternalLinkWarning,
3
+ LocalFirstNotice,
4
+ NoPiiBadge,
5
+ PrivacyNotice
6
+ } from "./chunk-IVYXOKMO.js";
7
+ import "./chunk-FZRXVRC7.js";
8
+ import "./chunk-3AL4SUFD.js";
9
+ import "./chunk-PPOYMKV3.js";
10
+ export {
11
+ ExternalLinkWarning,
12
+ LocalFirstNotice,
13
+ NoPiiBadge,
14
+ PrivacyNotice
15
+ };