@yenio-pld/blocks 1.2.0-rc.2 → 1.2.0-rc.20
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/index.cjs +5993 -2147
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +613 -86
- package/dist/index.d.ts +613 -86
- package/dist/index.js +5440 -1667
- package/dist/index.js.map +1 -1
- package/dist/theme-init.cjs +1 -1
- package/dist/theme-init.cjs.map +1 -1
- package/dist/theme-init.d.cts +1 -1
- package/dist/theme-init.d.ts +1 -1
- package/dist/theme-init.js +1 -1
- package/dist/theme-init.js.map +1 -1
- package/dist/ui/alert-dialog.js +4 -1
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +7 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/checkbox.d.ts +16 -0
- package/dist/ui/checkbox.js +66 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/combobox.d.ts +1 -0
- package/dist/ui/combobox.js +4 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/dialog.d.ts +4 -2
- package/dist/ui/dialog.js +61 -5
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/select.d.ts +5 -1
- package/dist/ui/select.js +137 -10
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/sheet.js +3 -3
- package/dist/ui/sheet.js.map +1 -1
- package/package.json +10 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ComponentType, ReactElement, FormEvent, KeyboardEvent, RefObject, CSSProperties, ComponentProps, ImgHTMLAttributes, SyntheticEvent } from 'react';
|
|
2
|
+
import { ReactNode, ComponentType, ReactElement, FormEvent, KeyboardEvent, RefObject, CSSProperties, ComponentProps, ImgHTMLAttributes, SyntheticEvent, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
@@ -68,68 +68,17 @@ declare function TableSkeleton({ columns, rows, }: {
|
|
|
68
68
|
rows?: number;
|
|
69
69
|
}): react.JSX.Element;
|
|
70
70
|
|
|
71
|
-
type Language = {
|
|
72
|
-
/** Language key/code (e.g., "en", "es") */
|
|
73
|
-
key: string;
|
|
74
|
-
/** Short label kept for callers that still pass segmented copy */
|
|
75
|
-
label: string;
|
|
76
|
-
/** Full native name for the menu (e.g., "English", "Español") */
|
|
77
|
-
nativeName: string;
|
|
78
|
-
};
|
|
79
|
-
type LanguageSwitcherLabels = {
|
|
80
|
-
/** Accessible name for the language trigger */
|
|
81
|
-
language?: string;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Default languages when none are provided via props or context.
|
|
85
|
-
*/
|
|
86
|
-
declare const defaultLanguages: Language[];
|
|
87
|
-
type LanguageSwitcherProps = {
|
|
88
|
-
/**
|
|
89
|
-
* Available languages. Optional if using LanguageContext.
|
|
90
|
-
* When context is available, context.languages is used; props override context.
|
|
91
|
-
* Falls back to defaultLanguages if neither provided.
|
|
92
|
-
*/
|
|
93
|
-
languages?: Language[];
|
|
94
|
-
/**
|
|
95
|
-
* Current selected language key. Optional if using LanguageContext.
|
|
96
|
-
* When context is available, context.language is used; props override context.
|
|
97
|
-
*/
|
|
98
|
-
currentLanguage?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Callback when language changes. Optional if using LanguageContext.
|
|
101
|
-
* When context is available, context.setLanguage is used; props override context.
|
|
102
|
-
*/
|
|
103
|
-
onLanguageChange?: (languageKey: string) => void;
|
|
104
|
-
/** Accessible name for the trigger */
|
|
105
|
-
labels?: LanguageSwitcherLabels;
|
|
106
|
-
className?: string;
|
|
107
|
-
/** Size of the trigger */
|
|
108
|
-
size?: "sm" | "md" | "lg";
|
|
109
|
-
/** Shape of the trigger */
|
|
110
|
-
shape?: "rounded" | "squared" | "pill";
|
|
111
|
-
/**
|
|
112
|
-
* Kept for existing callers. Both variants render the languages glyph
|
|
113
|
-
* and open the locale menu.
|
|
114
|
-
*/
|
|
115
|
-
variant?: "default" | "mini";
|
|
116
|
-
/** @deprecated The trigger is always the languages glyph. */
|
|
117
|
-
showIcon?: boolean;
|
|
118
|
-
/** Dropdown alignment */
|
|
119
|
-
align?: "start" | "center" | "end";
|
|
120
|
-
/** Dropdown side */
|
|
121
|
-
side?: "top" | "bottom" | "left" | "right";
|
|
122
|
-
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
123
|
-
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
124
|
-
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
125
|
-
tooltipAlign?: "start" | "center" | "end";
|
|
126
|
-
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
127
|
-
tooltipSideOffset?: number;
|
|
128
|
-
};
|
|
129
|
-
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, align, side, }: LanguageSwitcherProps): react.JSX.Element;
|
|
130
|
-
|
|
131
71
|
/** Fixed row height shared with `DataTableSkeleton` so list swaps do not jump. */
|
|
132
72
|
declare const DATA_TABLE_ROW_CLASS = "h-14";
|
|
73
|
+
/** Default skeleton row count; body min-height locks to this box. */
|
|
74
|
+
declare const DATA_TABLE_DEFAULT_SKELETON_ROWS = 5;
|
|
75
|
+
/**
|
|
76
|
+
* Tailwind min-height for the default 5×`h-14` body box. Loading, empty, and
|
|
77
|
+
* short result sets share this so list swaps do not jump.
|
|
78
|
+
*/
|
|
79
|
+
declare const DATA_TABLE_BODY_MIN_CLASS = "min-h-[calc(5*3.5rem)]";
|
|
80
|
+
/** Body min-height for a given skeleton row count (`h-14` = 3.5rem). */
|
|
81
|
+
declare function dataTableBodyMinClass(rows?: number): string;
|
|
133
82
|
/** Any icon component. Avoids pinning a Lucide type across package copies. */
|
|
134
83
|
type ShellIcon = ComponentType<{
|
|
135
84
|
className?: string;
|
|
@@ -159,6 +108,12 @@ type AppNavItem = {
|
|
|
159
108
|
type AppNavGroup = {
|
|
160
109
|
label: string;
|
|
161
110
|
items: AppNavItem[];
|
|
111
|
+
/** When true, the group starts collapsed and can be toggled. */
|
|
112
|
+
collapsible?: boolean;
|
|
113
|
+
/** Optional badge next to the group label (e.g. pending compliance count). */
|
|
114
|
+
badge?: string | number;
|
|
115
|
+
/** Controlled open state for collapsible groups. Uncontrolled when omitted. */
|
|
116
|
+
defaultOpen?: boolean;
|
|
162
117
|
};
|
|
163
118
|
type AppShellProps = {
|
|
164
119
|
/** Sidebar header. Usually the mark, product name, and organization. */
|
|
@@ -167,7 +122,16 @@ type AppShellProps = {
|
|
|
167
122
|
/** Accessible name for the single sidebar landmark. */
|
|
168
123
|
navLabel?: string;
|
|
169
124
|
sidebarFooter?: ReactNode;
|
|
170
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Optional header lead (breadcrumbs). Sits after the sidebar trigger.
|
|
127
|
+
*/
|
|
128
|
+
headerStart?: ReactNode;
|
|
129
|
+
/**
|
|
130
|
+
* Flexible middle of the sticky header (rates ticker, search).
|
|
131
|
+
* Keeps utilities in `headerEnd` from competing for space.
|
|
132
|
+
*/
|
|
133
|
+
headerMiddle?: ReactNode;
|
|
134
|
+
/** Sticky header end slot (environment select, theme, language). */
|
|
171
135
|
headerEnd?: ReactNode;
|
|
172
136
|
/**
|
|
173
137
|
* Initial desktop open state. Read the `sidebar_state` cookie in the
|
|
@@ -180,7 +144,7 @@ type AppShellProps = {
|
|
|
180
144
|
children: ReactNode;
|
|
181
145
|
className?: string;
|
|
182
146
|
};
|
|
183
|
-
declare function AppShell({ brand, nav, navLabel, sidebarFooter, headerEnd, defaultOpen, pathname, renderLink, children, className, }: AppShellProps): react.JSX.Element;
|
|
147
|
+
declare function AppShell({ brand, nav, navLabel, sidebarFooter, headerStart, headerMiddle, headerEnd, defaultOpen, pathname, renderLink, children, className, }: AppShellProps): react.JSX.Element;
|
|
184
148
|
declare function PageContainer({ children, className, }: {
|
|
185
149
|
children: ReactNode;
|
|
186
150
|
className?: string;
|
|
@@ -189,6 +153,8 @@ type NavTab = {
|
|
|
189
153
|
label: string;
|
|
190
154
|
href: string;
|
|
191
155
|
active?: boolean;
|
|
156
|
+
/** Optional count shown beside the label (Attio-style). */
|
|
157
|
+
count?: number;
|
|
192
158
|
};
|
|
193
159
|
type NavTabsProps = {
|
|
194
160
|
tabs: NavTab[];
|
|
@@ -200,27 +166,23 @@ type NavTabsProps = {
|
|
|
200
166
|
declare function NavTabs({ tabs, label, renderLink, className, }: NavTabsProps): react.JSX.Element;
|
|
201
167
|
type AccountMenuLabels = {
|
|
202
168
|
menu?: string;
|
|
169
|
+
account?: string;
|
|
203
170
|
signOut?: string;
|
|
204
|
-
theme?: string;
|
|
205
|
-
language?: string;
|
|
206
|
-
system?: string;
|
|
207
|
-
light?: string;
|
|
208
|
-
dark?: string;
|
|
209
171
|
};
|
|
210
172
|
type AccountMenuProps = {
|
|
211
173
|
name: string;
|
|
212
174
|
email: string;
|
|
175
|
+
/** Kept for callers; org belongs in the shell brand, not the account menu. */
|
|
213
176
|
organization?: string;
|
|
214
177
|
imageSrc?: string;
|
|
215
178
|
/** Passed to the avatar image. Empty when the image is decorative. */
|
|
216
179
|
imageAlt?: string;
|
|
217
180
|
labels?: AccountMenuLabels;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
onLanguageChange?: (language: string) => void;
|
|
181
|
+
/** When set, shows an Account item above Sign out. */
|
|
182
|
+
onAccount?: () => void;
|
|
221
183
|
onSignOut?: () => void;
|
|
222
184
|
};
|
|
223
|
-
declare function AccountMenu({ name, email,
|
|
185
|
+
declare function AccountMenu({ name, email, imageSrc, imageAlt, labels: userLabels, onAccount, onSignOut, }: AccountMenuProps): react.JSX.Element;
|
|
224
186
|
type DataTableColumn<T> = {
|
|
225
187
|
key: string;
|
|
226
188
|
header: ReactNode;
|
|
@@ -236,6 +198,10 @@ type DataTableProps<T> = {
|
|
|
236
198
|
toolbar?: ReactNode;
|
|
237
199
|
emptyTitle: string;
|
|
238
200
|
emptyDescription?: string;
|
|
201
|
+
emptyIllustration?: {
|
|
202
|
+
src: string;
|
|
203
|
+
alt?: string;
|
|
204
|
+
};
|
|
239
205
|
loading?: boolean;
|
|
240
206
|
skeletonRows?: number;
|
|
241
207
|
/** Omit when there is no next page. Keep it mounted, with `pending`, while a page appends. */
|
|
@@ -247,7 +213,7 @@ type DataTableProps<T> = {
|
|
|
247
213
|
label?: string;
|
|
248
214
|
className?: string;
|
|
249
215
|
};
|
|
250
|
-
declare function DataTable<T>({ columns, rows, rowKey, toolbar, emptyTitle, emptyDescription, loading, skeletonRows, loadMore, label, className, }: DataTableProps<T>): react.JSX.Element;
|
|
216
|
+
declare function DataTable<T>({ columns, rows, rowKey, toolbar, emptyTitle, emptyDescription, emptyIllustration, loading, skeletonRows, loadMore, label, className, }: DataTableProps<T>): react.JSX.Element;
|
|
251
217
|
|
|
252
218
|
/**
|
|
253
219
|
* Ignore navigation-start signals for the rest of this turn. An in-flight
|
|
@@ -282,13 +248,19 @@ declare function NavigationProgress({ pathname, search, ariaLabel, forceVisible,
|
|
|
282
248
|
declare function RouteLoading({ children }: {
|
|
283
249
|
children: ReactNode;
|
|
284
250
|
}): react.JSX.Element;
|
|
285
|
-
declare function PageTitleSkeleton({ label, action, }: {
|
|
251
|
+
declare function PageTitleSkeleton({ label, actions, action, }: {
|
|
286
252
|
label: string;
|
|
253
|
+
/** Number of action-button slots (0–3). Prefer this over `action`. */
|
|
254
|
+
actions?: number;
|
|
255
|
+
/** @deprecated Prefer `actions={1}`. */
|
|
287
256
|
action?: boolean;
|
|
288
257
|
}): react.JSX.Element;
|
|
289
|
-
declare function DataTableSkeleton({ label, rows, }: {
|
|
258
|
+
declare function DataTableSkeleton({ label, rows, columns, showSearch, toolbarSkeleton, }: {
|
|
290
259
|
label: string;
|
|
291
260
|
rows?: number;
|
|
261
|
+
columns?: number;
|
|
262
|
+
showSearch?: boolean;
|
|
263
|
+
toolbarSkeleton?: ReactNode;
|
|
292
264
|
}): react.JSX.Element;
|
|
293
265
|
declare function DetailPageSkeleton({ label }: {
|
|
294
266
|
label: string;
|
|
@@ -297,11 +269,16 @@ declare function FormCardSkeleton({ label, fields, }: {
|
|
|
297
269
|
label: string;
|
|
298
270
|
fields?: number;
|
|
299
271
|
}): react.JSX.Element;
|
|
300
|
-
|
|
272
|
+
type DashboardSkeletonVariant = "store" | "admin";
|
|
273
|
+
declare function DashboardSkeleton({ label, variant, showTitle, }: {
|
|
301
274
|
label: string;
|
|
275
|
+
variant?: DashboardSkeletonVariant;
|
|
276
|
+
/** Store only. Omit when a real `PageTitle` already paints above. */
|
|
277
|
+
showTitle?: boolean;
|
|
302
278
|
}): react.JSX.Element;
|
|
303
279
|
|
|
304
280
|
declare function LoadingState({ label, className, }: {
|
|
281
|
+
/** Visible label. Prefer a translated phrase; omit for a spinner-only state. */
|
|
305
282
|
label?: string;
|
|
306
283
|
className?: string;
|
|
307
284
|
}): react.JSX.Element;
|
|
@@ -317,15 +294,30 @@ type EmptyStateIcon = react.ComponentType<{
|
|
|
317
294
|
className?: string;
|
|
318
295
|
"aria-hidden"?: boolean | "true" | "false";
|
|
319
296
|
}>;
|
|
297
|
+
type EmptyStateIllustration = {
|
|
298
|
+
src: string;
|
|
299
|
+
alt?: string;
|
|
300
|
+
};
|
|
320
301
|
type EmptyStateProps = {
|
|
321
302
|
title: string;
|
|
322
303
|
description?: string;
|
|
323
304
|
action?: react.ReactNode;
|
|
324
305
|
icon?: EmptyStateIcon;
|
|
306
|
+
illustration?: EmptyStateIllustration;
|
|
325
307
|
variant?: "default" | "compact";
|
|
326
308
|
className?: string;
|
|
327
309
|
};
|
|
328
|
-
declare function EmptyState({ title, description, action, icon: Icon, variant, className, }: EmptyStateProps): react.JSX.Element;
|
|
310
|
+
declare function EmptyState({ title, description, action, icon: Icon, illustration, variant, className, }: EmptyStateProps): react.JSX.Element;
|
|
311
|
+
|
|
312
|
+
type ProductIllustrationProps = {
|
|
313
|
+
src: string;
|
|
314
|
+
/** Decorative product art: default empty alt. */
|
|
315
|
+
alt?: string;
|
|
316
|
+
className?: string;
|
|
317
|
+
size?: "sm" | "md" | "lg";
|
|
318
|
+
};
|
|
319
|
+
/** Transparent PNG product illustration sized for empty states and intro panels. */
|
|
320
|
+
declare function ProductIllustration({ src, alt, className, size, }: ProductIllustrationProps): react.JSX.Element;
|
|
329
321
|
|
|
330
322
|
declare function Empty({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
|
|
331
323
|
declare function EmptyHeader({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
|
|
@@ -344,13 +336,16 @@ type ConfirmDestructiveDialogProps = {
|
|
|
344
336
|
description: string;
|
|
345
337
|
confirmLabel?: string;
|
|
346
338
|
cancelLabel?: string;
|
|
339
|
+
/** When false, confirm uses the primary button style (deliver/receive/convert). */
|
|
340
|
+
destructive?: boolean;
|
|
347
341
|
onConfirm: () => void;
|
|
348
342
|
};
|
|
349
343
|
/**
|
|
350
344
|
* Shared confirm step for destructive actions (delete, mute, etc.).
|
|
351
345
|
* Prefer this over window.confirm so focus stays in the app and copy is clear.
|
|
346
|
+
* Set `destructive={false}` for irreversible but constructive confirms.
|
|
352
347
|
*/
|
|
353
|
-
declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, }: ConfirmDestructiveDialogProps): react.JSX.Element;
|
|
348
|
+
declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, onConfirm, }: ConfirmDestructiveDialogProps): react.JSX.Element;
|
|
354
349
|
|
|
355
350
|
type NotificationBellItem = {
|
|
356
351
|
id: string;
|
|
@@ -545,15 +540,18 @@ declare function FieldMessage({ id, children, className, ...props }: FieldMessag
|
|
|
545
540
|
|
|
546
541
|
type SafeImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> & {
|
|
547
542
|
src?: string | null;
|
|
543
|
+
/**
|
|
544
|
+
* Tiny JPEG data URL painted as a clipped cover background until the image
|
|
545
|
+
* loads. No CSS `filter: blur()` — the LQIP is already soft, and filters
|
|
546
|
+
* paint outside the box even when a parent sets `overflow: hidden`.
|
|
547
|
+
* `null` and omission keep the image with no placeholder.
|
|
548
|
+
*/
|
|
549
|
+
blurDataUrl?: string | null;
|
|
548
550
|
/** Rendered when `src` is missing/empty or the image fails to load. */
|
|
549
551
|
fallback: ReactNode;
|
|
550
552
|
onError?: (event: SyntheticEvent<HTMLImageElement>) => void;
|
|
551
553
|
};
|
|
552
|
-
|
|
553
|
-
* `<img>` that swaps to `fallback` when the source is missing or fails to load,
|
|
554
|
-
* so the browser never shows its default broken-image glyph.
|
|
555
|
-
*/
|
|
556
|
-
declare function SafeImage({ src, fallback, alt, onError, ...imgProps }: SafeImageProps): react.JSX.Element;
|
|
554
|
+
declare function SafeImage({ src, fallback, alt, onError, onLoad, blurDataUrl, style, className, ...imgProps }: SafeImageProps): react.JSX.Element;
|
|
557
555
|
|
|
558
556
|
type ThemeSwitcherLabels = {
|
|
559
557
|
/** Accessible name for the theme trigger */
|
|
@@ -591,6 +589,313 @@ type ThemeSwitcherProps = {
|
|
|
591
589
|
};
|
|
592
590
|
declare function ThemeSwitcher({ className, size, shape, align, side, labels: userLabels, }: ThemeSwitcherProps): react.JSX.Element;
|
|
593
591
|
|
|
592
|
+
type Language = {
|
|
593
|
+
/** Language key/code (e.g., "en", "es") */
|
|
594
|
+
key: string;
|
|
595
|
+
/** Short label kept for callers that still pass segmented copy */
|
|
596
|
+
label: string;
|
|
597
|
+
/** Full native name for the menu (e.g., "English", "Español") */
|
|
598
|
+
nativeName: string;
|
|
599
|
+
};
|
|
600
|
+
type LanguageSwitcherLabels = {
|
|
601
|
+
/** Accessible name for the language trigger */
|
|
602
|
+
language?: string;
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
* Default languages when none are provided via props or context.
|
|
606
|
+
*/
|
|
607
|
+
declare const defaultLanguages: Language[];
|
|
608
|
+
type LanguageSwitcherProps = {
|
|
609
|
+
/**
|
|
610
|
+
* Available languages. Optional if using LanguageContext.
|
|
611
|
+
* When context is available, context.languages is used; props override context.
|
|
612
|
+
* Falls back to defaultLanguages if neither provided.
|
|
613
|
+
*/
|
|
614
|
+
languages?: Language[];
|
|
615
|
+
/**
|
|
616
|
+
* Current selected language key. Optional if using LanguageContext.
|
|
617
|
+
* When context is available, context.language is used; props override context.
|
|
618
|
+
*/
|
|
619
|
+
currentLanguage?: string;
|
|
620
|
+
/**
|
|
621
|
+
* Callback when language changes. Optional if using LanguageContext.
|
|
622
|
+
* When context is available, context.setLanguage is used; props override context.
|
|
623
|
+
*/
|
|
624
|
+
onLanguageChange?: (languageKey: string) => void;
|
|
625
|
+
/** Accessible name for the trigger */
|
|
626
|
+
labels?: LanguageSwitcherLabels;
|
|
627
|
+
className?: string;
|
|
628
|
+
/** Size of the trigger */
|
|
629
|
+
size?: "sm" | "md" | "lg";
|
|
630
|
+
/** Shape of the trigger */
|
|
631
|
+
shape?: "rounded" | "squared" | "pill";
|
|
632
|
+
/**
|
|
633
|
+
* Kept for existing callers. Both variants render the languages glyph
|
|
634
|
+
* and open the locale menu.
|
|
635
|
+
*/
|
|
636
|
+
variant?: "default" | "mini";
|
|
637
|
+
/** @deprecated The trigger is always the languages glyph. */
|
|
638
|
+
showIcon?: boolean;
|
|
639
|
+
/** Dropdown alignment */
|
|
640
|
+
align?: "start" | "center" | "end";
|
|
641
|
+
/** Dropdown side */
|
|
642
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
643
|
+
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
644
|
+
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
645
|
+
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
646
|
+
tooltipAlign?: "start" | "center" | "end";
|
|
647
|
+
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
648
|
+
tooltipSideOffset?: number;
|
|
649
|
+
};
|
|
650
|
+
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, align, side, }: LanguageSwitcherProps): react.JSX.Element;
|
|
651
|
+
|
|
652
|
+
type CountryLocale = "es-MX" | "en";
|
|
653
|
+
type CountryRecord = {
|
|
654
|
+
code: string;
|
|
655
|
+
labelEs: string;
|
|
656
|
+
};
|
|
657
|
+
type CountryOption = {
|
|
658
|
+
code: string;
|
|
659
|
+
labelEs: string;
|
|
660
|
+
};
|
|
661
|
+
declare const COUNTRY_OPTIONS: readonly CountryOption[];
|
|
662
|
+
declare function isKnownCountryCode(code: string): boolean;
|
|
663
|
+
declare function countryLabel(code: string, locale: CountryLocale): string;
|
|
664
|
+
declare function formatCountryOptionLabel(code: string, locale: CountryLocale): string;
|
|
665
|
+
type CountryPickerItem = {
|
|
666
|
+
value: string;
|
|
667
|
+
label: string;
|
|
668
|
+
};
|
|
669
|
+
declare function countryPickerItems(locale: CountryLocale): CountryPickerItem[];
|
|
670
|
+
declare function filterCountries(query: string, locale: CountryLocale): CountryPickerItem[];
|
|
671
|
+
|
|
672
|
+
type CountryPickerPurpose = "country" | "nationality";
|
|
673
|
+
type CountryPickerLabels = {
|
|
674
|
+
ariaLabel?: string;
|
|
675
|
+
placeholder?: string;
|
|
676
|
+
search?: string;
|
|
677
|
+
noResults?: string;
|
|
678
|
+
clear?: string;
|
|
679
|
+
open?: string;
|
|
680
|
+
};
|
|
681
|
+
type CountryPickerProps = {
|
|
682
|
+
value: string;
|
|
683
|
+
onValueChange: (code: string) => void;
|
|
684
|
+
purpose: CountryPickerPurpose;
|
|
685
|
+
locale?: CountryLocale;
|
|
686
|
+
id?: string;
|
|
687
|
+
name?: string;
|
|
688
|
+
disabled?: boolean;
|
|
689
|
+
required?: boolean;
|
|
690
|
+
allowEmpty?: boolean;
|
|
691
|
+
className?: string;
|
|
692
|
+
labels?: CountryPickerLabels;
|
|
693
|
+
"aria-invalid"?: boolean;
|
|
694
|
+
};
|
|
695
|
+
declare function CountryPicker({ value, onValueChange, purpose, locale, id, name, disabled, required, allowEmpty, className, labels: labelsProp, "aria-invalid": ariaInvalid, }: CountryPickerProps): react.JSX.Element;
|
|
696
|
+
|
|
697
|
+
type TaxRegimeLocale = "es-MX" | "en";
|
|
698
|
+
type TaxRegimeRecord = {
|
|
699
|
+
code: string;
|
|
700
|
+
labelEs: string;
|
|
701
|
+
labelEn: string;
|
|
702
|
+
};
|
|
703
|
+
type TaxRegimeOption = {
|
|
704
|
+
code: string;
|
|
705
|
+
labelEs: string;
|
|
706
|
+
labelEn: string;
|
|
707
|
+
};
|
|
708
|
+
declare const SAT_TAX_REGIME_CODES: readonly string[];
|
|
709
|
+
declare const TAX_REGIME_OPTIONS: readonly TaxRegimeOption[];
|
|
710
|
+
declare function isKnownTaxRegimeCode(code: string): boolean;
|
|
711
|
+
declare function taxRegimeLabel(code: string, locale: TaxRegimeLocale): string;
|
|
712
|
+
declare function formatTaxRegimeOptionLabel(code: string, locale: TaxRegimeLocale): string;
|
|
713
|
+
type TaxRegimePickerItem = {
|
|
714
|
+
value: string;
|
|
715
|
+
label: string;
|
|
716
|
+
};
|
|
717
|
+
declare function taxRegimePickerItems(locale: TaxRegimeLocale): TaxRegimePickerItem[];
|
|
718
|
+
declare function filterTaxRegimes(query: string, locale: TaxRegimeLocale): TaxRegimePickerItem[];
|
|
719
|
+
|
|
720
|
+
type TaxRegimePickerLabels = {
|
|
721
|
+
ariaLabel?: string;
|
|
722
|
+
placeholder?: string;
|
|
723
|
+
search?: string;
|
|
724
|
+
noResults?: string;
|
|
725
|
+
clear?: string;
|
|
726
|
+
open?: string;
|
|
727
|
+
/** Drawer title on narrow viewports. Defaults to placeholder. */
|
|
728
|
+
title?: string;
|
|
729
|
+
};
|
|
730
|
+
type TaxRegimePickerProps = {
|
|
731
|
+
value: string;
|
|
732
|
+
onValueChange: (code: string) => void;
|
|
733
|
+
locale?: TaxRegimeLocale;
|
|
734
|
+
id?: string;
|
|
735
|
+
name?: string;
|
|
736
|
+
disabled?: boolean;
|
|
737
|
+
required?: boolean;
|
|
738
|
+
allowEmpty?: boolean;
|
|
739
|
+
className?: string;
|
|
740
|
+
labels?: TaxRegimePickerLabels;
|
|
741
|
+
"aria-invalid"?: boolean;
|
|
742
|
+
};
|
|
743
|
+
declare function TaxRegimePicker({ value, onValueChange, locale, id, name, disabled, required, allowEmpty, className, labels: labelsProp, "aria-invalid": ariaInvalid, }: TaxRegimePickerProps): react.JSX.Element;
|
|
744
|
+
|
|
745
|
+
type SearchablePickerOption = {
|
|
746
|
+
id: string;
|
|
747
|
+
label: string;
|
|
748
|
+
sublabel?: string;
|
|
749
|
+
};
|
|
750
|
+
type SearchablePickerProps = {
|
|
751
|
+
value: string;
|
|
752
|
+
selectedLabel?: string | null;
|
|
753
|
+
onChange: (id: string, option?: SearchablePickerOption) => void;
|
|
754
|
+
options: SearchablePickerOption[];
|
|
755
|
+
query: string;
|
|
756
|
+
onQueryChange: (query: string) => void;
|
|
757
|
+
loading?: boolean;
|
|
758
|
+
loadingMore?: boolean;
|
|
759
|
+
hasMore?: boolean;
|
|
760
|
+
onLoadMore?: () => void;
|
|
761
|
+
placeholder?: string;
|
|
762
|
+
emptyLabel?: string;
|
|
763
|
+
loadMoreLabel?: string;
|
|
764
|
+
clearLabel?: string;
|
|
765
|
+
searchPlaceholder?: string;
|
|
766
|
+
openLabel?: string;
|
|
767
|
+
disabled?: boolean;
|
|
768
|
+
allowClear?: boolean;
|
|
769
|
+
title?: string;
|
|
770
|
+
id?: string;
|
|
771
|
+
className?: string;
|
|
772
|
+
"aria-invalid"?: boolean;
|
|
773
|
+
onOpenChange?: (open: boolean) => void;
|
|
774
|
+
/** When set, a create action appears for a non-empty query (not while loading). Presentation only. */
|
|
775
|
+
onCreate?: (query: string) => void;
|
|
776
|
+
/** Label for the create action. Defaults to `Add "{query}"`. */
|
|
777
|
+
createLabel?: string;
|
|
778
|
+
};
|
|
779
|
+
declare function SearchablePicker({ value, selectedLabel, onChange, options, query, onQueryChange, loading, loadingMore, hasMore, onLoadMore, placeholder, emptyLabel, loadMoreLabel, clearLabel, searchPlaceholder, openLabel, disabled, allowClear, title, id, className, "aria-invalid": ariaInvalid, onOpenChange, onCreate, createLabel, }: SearchablePickerProps): react.JSX.Element;
|
|
780
|
+
|
|
781
|
+
type PaginatedComboboxItem = {
|
|
782
|
+
value: string;
|
|
783
|
+
label: string;
|
|
784
|
+
secondary?: string;
|
|
785
|
+
};
|
|
786
|
+
type PaginatedComboboxLabels = {
|
|
787
|
+
ariaLabel?: string;
|
|
788
|
+
placeholder?: string;
|
|
789
|
+
noResults?: string;
|
|
790
|
+
clear?: string;
|
|
791
|
+
open?: string;
|
|
792
|
+
loadMore?: string;
|
|
793
|
+
loading?: string;
|
|
794
|
+
};
|
|
795
|
+
type PaginatedComboboxProps = {
|
|
796
|
+
value: string;
|
|
797
|
+
onValueChange: (value: string, item: PaginatedComboboxItem | null) => void;
|
|
798
|
+
items: PaginatedComboboxItem[];
|
|
799
|
+
/** Label for the current value when it is not in the loaded page. */
|
|
800
|
+
selectedItem?: PaginatedComboboxItem | null;
|
|
801
|
+
onQueryChange: (query: string) => void;
|
|
802
|
+
loading?: boolean;
|
|
803
|
+
loadingMore?: boolean;
|
|
804
|
+
nextCursor?: string | null;
|
|
805
|
+
onLoadMore?: () => void;
|
|
806
|
+
onOpenChange?: (open: boolean) => void;
|
|
807
|
+
debounceMs?: number;
|
|
808
|
+
id?: string;
|
|
809
|
+
name?: string;
|
|
810
|
+
disabled?: boolean;
|
|
811
|
+
required?: boolean;
|
|
812
|
+
allowEmpty?: boolean;
|
|
813
|
+
className?: string;
|
|
814
|
+
labels?: PaginatedComboboxLabels;
|
|
815
|
+
"aria-invalid"?: boolean;
|
|
816
|
+
};
|
|
817
|
+
declare function PaginatedCombobox({ value, onValueChange, items, selectedItem, onQueryChange, loading, loadingMore, nextCursor, onLoadMore, onOpenChange, debounceMs, id, name, disabled, required, allowEmpty, className, labels: labelsProp, "aria-invalid": ariaInvalid, }: PaginatedComboboxProps): react.JSX.Element;
|
|
818
|
+
|
|
819
|
+
/** Mexican RFC and CURP normalize + validate (UI + app shared). */
|
|
820
|
+
type PersonKindForRfc = "natural_person_mx" | "natural_person_foreign" | "legal_entity_mx" | "legal_entity_foreign" | "trust" | "other";
|
|
821
|
+
type RfcValidationError = "moral" | "natural" | "length";
|
|
822
|
+
type CurpValidationError = "format" | "check_digit";
|
|
823
|
+
declare const CURP_REGEX: RegExp;
|
|
824
|
+
declare function normalizeRfc(raw: string): string;
|
|
825
|
+
declare function rfcMaxLengthForPersonKind(personKind?: PersonKindForRfc | null): number;
|
|
826
|
+
declare function validateRfcForPersonKind(rfc: string, personKind: PersonKindForRfc): {
|
|
827
|
+
ok: true;
|
|
828
|
+
} | {
|
|
829
|
+
ok: false;
|
|
830
|
+
code: RfcValidationError;
|
|
831
|
+
};
|
|
832
|
+
/** Trim + uppercase. Does not require a valid CURP. */
|
|
833
|
+
declare function normalizeCurpInput(raw: string): string;
|
|
834
|
+
declare function curpCheckDigit(curp17: string): number;
|
|
835
|
+
declare function validateCurp(curp: string): {
|
|
836
|
+
ok: true;
|
|
837
|
+
} | {
|
|
838
|
+
ok: false;
|
|
839
|
+
code: CurpValidationError;
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
type RfcInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "maxLength" | "autoCapitalize" | "spellCheck"> & {
|
|
843
|
+
value: string;
|
|
844
|
+
onValueChange: (value: string) => void;
|
|
845
|
+
personKind?: PersonKindForRfc | null;
|
|
846
|
+
};
|
|
847
|
+
declare function RfcInput({ value, onValueChange, personKind, className, ...props }: RfcInputProps): react.JSX.Element;
|
|
848
|
+
|
|
849
|
+
type CurpInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "maxLength" | "autoCapitalize" | "spellCheck"> & {
|
|
850
|
+
value: string;
|
|
851
|
+
onValueChange: (value: string) => void;
|
|
852
|
+
};
|
|
853
|
+
declare function CurpInput({ value, onValueChange, className, ...props }: CurpInputProps): react.JSX.Element;
|
|
854
|
+
|
|
855
|
+
type PasswordInputProps = Omit<react.ComponentProps<"input">, "type"> & {
|
|
856
|
+
/** Accessible label for the toggle when the value is masked. */
|
|
857
|
+
showLabel?: string;
|
|
858
|
+
/** Accessible label for the toggle when the value is visible. */
|
|
859
|
+
hideLabel?: string;
|
|
860
|
+
};
|
|
861
|
+
declare function PasswordInput({ className, disabled, showLabel, hideLabel, ...props }: PasswordInputProps): react.JSX.Element;
|
|
862
|
+
|
|
863
|
+
type PhoneInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "inputMode"> & {
|
|
864
|
+
value: string;
|
|
865
|
+
onValueChange: (value: string) => void;
|
|
866
|
+
/** ISO 3166-1 alpha-2. Defaults to Mexico (`MX` / +52). */
|
|
867
|
+
defaultCountry?: string;
|
|
868
|
+
searchPlaceholder?: string;
|
|
869
|
+
countryListLabel?: string;
|
|
870
|
+
countryTriggerLabel?: string;
|
|
871
|
+
emptyLabel?: string;
|
|
872
|
+
};
|
|
873
|
+
declare function PhoneInput({ value, onValueChange, defaultCountry, searchPlaceholder, countryListLabel, countryTriggerLabel, emptyLabel, className, disabled, id, name, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, placeholder, ...props }: PhoneInputProps): react.JSX.Element;
|
|
874
|
+
|
|
875
|
+
type MoneyCurrency = "MXN" | "USD";
|
|
876
|
+
/** Format integer minor units for display (major units with currency symbol). */
|
|
877
|
+
declare function formatMoney(valueMinor: number | null, currency: MoneyCurrency, locale?: string): string;
|
|
878
|
+
/** Cents-first: append a digit (0–9) to minor units. */
|
|
879
|
+
declare function appendMoneyDigit(valueMinor: number | null, digit: number): number | null;
|
|
880
|
+
/** Cents-first: remove the least significant digit. */
|
|
881
|
+
declare function backspaceMoneyMinor(valueMinor: number | null): number | null;
|
|
882
|
+
/** Parse a pasted or typed major-unit decimal into minor units. */
|
|
883
|
+
declare function parseMoneyToMinor(raw: string): number | null;
|
|
884
|
+
|
|
885
|
+
type MoneyInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "inputMode" | "defaultValue" | "size"> & {
|
|
886
|
+
valueMinor: number | null;
|
|
887
|
+
onValueMinorChange: (valueMinor: number | null) => void;
|
|
888
|
+
currency?: MoneyCurrency;
|
|
889
|
+
currencies?: MoneyCurrency[];
|
|
890
|
+
showCurrencySwitch?: boolean;
|
|
891
|
+
onCurrencyChange?: (currency: MoneyCurrency) => void;
|
|
892
|
+
locale?: string;
|
|
893
|
+
moneySize?: "default" | "large";
|
|
894
|
+
mxnLabel?: string;
|
|
895
|
+
usdLabel?: string;
|
|
896
|
+
};
|
|
897
|
+
declare function MoneyInput({ valueMinor, onValueMinorChange, currency, currencies, showCurrencySwitch, onCurrencyChange, locale, moneySize, mxnLabel, usdLabel, className, disabled, id, name, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, placeholder, ...props }: MoneyInputProps): react.JSX.Element;
|
|
898
|
+
|
|
594
899
|
type AvatarEditorLabels = {
|
|
595
900
|
uploadAria?: string;
|
|
596
901
|
uploadHint?: string;
|
|
@@ -722,13 +1027,15 @@ declare const DEFAULT_FILE_UPLOAD_LABELS: {
|
|
|
722
1027
|
type FileDropzoneProps = {
|
|
723
1028
|
accept?: string;
|
|
724
1029
|
maxSize?: number;
|
|
1030
|
+
/** When true, drop/browse can accept several files; `onFile` runs once per file. */
|
|
1031
|
+
multiple?: boolean;
|
|
725
1032
|
disabled?: boolean;
|
|
726
1033
|
labels?: Partial<FileDropzoneLabels>;
|
|
727
1034
|
onFile: (file: File) => void;
|
|
728
1035
|
onReject?: (reason: "type" | "size") => void;
|
|
729
1036
|
className?: string;
|
|
730
1037
|
};
|
|
731
|
-
declare function FileDropzone({ accept, maxSize, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): react.JSX.Element;
|
|
1038
|
+
declare function FileDropzone({ accept, maxSize, multiple, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): react.JSX.Element;
|
|
732
1039
|
|
|
733
1040
|
type FileUploadTrayProps = {
|
|
734
1041
|
jobs: UploadJob[];
|
|
@@ -923,6 +1230,224 @@ type LegalAcceptCheckboxProps = {
|
|
|
923
1230
|
};
|
|
924
1231
|
declare function LegalAcceptCheckbox({ id, checked, onCheckedChange, termsHref, privacyHref, labels, disabled, className, }: LegalAcceptCheckboxProps): react.JSX.Element;
|
|
925
1232
|
|
|
1233
|
+
type StepProgressSegment = {
|
|
1234
|
+
id: string;
|
|
1235
|
+
label: string;
|
|
1236
|
+
};
|
|
1237
|
+
type StepProgressProps = {
|
|
1238
|
+
segments: readonly StepProgressSegment[];
|
|
1239
|
+
/** Zero-based index of the active segment. */
|
|
1240
|
+
current: number;
|
|
1241
|
+
className?: string;
|
|
1242
|
+
/** Accessible name for the progress region. */
|
|
1243
|
+
"aria-label"?: string;
|
|
1244
|
+
};
|
|
1245
|
+
/**
|
|
1246
|
+
* Segmented wizard progress (filled bars + current label).
|
|
1247
|
+
* Labels stay visible for the active segment only on narrow screens.
|
|
1248
|
+
*/
|
|
1249
|
+
declare function StepProgress({ segments, current, className, "aria-label": ariaLabel, }: StepProgressProps): react.JSX.Element;
|
|
1250
|
+
|
|
1251
|
+
type OptionRowProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
1252
|
+
icon?: ReactNode;
|
|
1253
|
+
title: string;
|
|
1254
|
+
description?: string;
|
|
1255
|
+
badge?: string;
|
|
1256
|
+
badgeVariant?: "default" | "secondary" | "outline" | "success" | "warning";
|
|
1257
|
+
showChevron?: boolean;
|
|
1258
|
+
};
|
|
1259
|
+
/** List row with icon, title, description, optional badge, and chevron. */
|
|
1260
|
+
declare function OptionRow({ icon, title, description, badge, badgeVariant, showChevron, className, type, ...props }: OptionRowProps): react.JSX.Element;
|
|
1261
|
+
|
|
1262
|
+
type StickyActionBarProps = HTMLAttributes<HTMLDivElement> & {
|
|
1263
|
+
children: ReactNode;
|
|
1264
|
+
/** Optional secondary action on the left (e.g. decline / skip). */
|
|
1265
|
+
secondary?: ReactNode;
|
|
1266
|
+
};
|
|
1267
|
+
/**
|
|
1268
|
+
* Bottom-pinned action strip for mobile wizard steps.
|
|
1269
|
+
* Use inside a full-height flex column so it stays at the foot of the viewport.
|
|
1270
|
+
*/
|
|
1271
|
+
declare function StickyActionBar({ children, secondary, className, ...props }: StickyActionBarProps): react.JSX.Element;
|
|
1272
|
+
|
|
1273
|
+
type StatusTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
1274
|
+
type StatusBadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
1275
|
+
label: string;
|
|
1276
|
+
tone?: StatusTone;
|
|
1277
|
+
};
|
|
1278
|
+
/** Shared status chip for list cells and detail headers. */
|
|
1279
|
+
declare function StatusBadge({ label, tone, className, ...props }: StatusBadgeProps): react.JSX.Element;
|
|
1280
|
+
|
|
1281
|
+
type DetailFact = {
|
|
1282
|
+
label: string;
|
|
1283
|
+
value?: ReactNode;
|
|
1284
|
+
};
|
|
1285
|
+
type DetailHeaderProps = {
|
|
1286
|
+
title: string;
|
|
1287
|
+
badge?: ReactNode;
|
|
1288
|
+
subtitle?: ReactNode;
|
|
1289
|
+
/** Key facts rendered as a DataList under the title row. */
|
|
1290
|
+
facts?: DetailFact[];
|
|
1291
|
+
/** Empty placeholder for fact values. Default: "—" */
|
|
1292
|
+
factsEmpty?: ReactNode;
|
|
1293
|
+
primaryAction?: ReactNode;
|
|
1294
|
+
/** Secondary actions beside the primary (callers typically pass ≤2). */
|
|
1295
|
+
secondaryActions?: ReactNode[];
|
|
1296
|
+
/** Overflow menu items (DropdownMenuItem children). */
|
|
1297
|
+
moreMenu?: ReactNode;
|
|
1298
|
+
moreLabel?: string;
|
|
1299
|
+
/** Optional tab strip (caller usually passes NavTabs). */
|
|
1300
|
+
tabs?: ReactNode;
|
|
1301
|
+
className?: string;
|
|
1302
|
+
};
|
|
1303
|
+
/**
|
|
1304
|
+
* Shared detail page chrome: title, status, facts, and action hierarchy.
|
|
1305
|
+
*/
|
|
1306
|
+
declare function DetailHeader({ title, badge, subtitle, facts, factsEmpty, primaryAction, secondaryActions, moreMenu, moreLabel, tabs, className, }: DetailHeaderProps): react.JSX.Element;
|
|
1307
|
+
|
|
1308
|
+
type FormSectionProps = HTMLAttributes<HTMLElement> & {
|
|
1309
|
+
title: string;
|
|
1310
|
+
description?: string;
|
|
1311
|
+
children: ReactNode;
|
|
1312
|
+
/** Extra content beside the title (e.g. a counter). */
|
|
1313
|
+
aside?: ReactNode;
|
|
1314
|
+
};
|
|
1315
|
+
/**
|
|
1316
|
+
* Labeled form section with a short reason and a one→two column field grid.
|
|
1317
|
+
*/
|
|
1318
|
+
declare function FormSection({ title, description, children, aside, className, ...props }: FormSectionProps): react.JSX.Element;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Registers `beforeunload` while `dirty` is true.
|
|
1322
|
+
* App Router cannot block in-app navigation; pair with confirms on controlled links.
|
|
1323
|
+
*/
|
|
1324
|
+
declare function useDirtyGuard(dirty: boolean): void;
|
|
1325
|
+
|
|
1326
|
+
type WizardLayoutProps = {
|
|
1327
|
+
steps: readonly StepProgressSegment[];
|
|
1328
|
+
current: number;
|
|
1329
|
+
children: ReactNode;
|
|
1330
|
+
onBack?: () => void;
|
|
1331
|
+
onNext?: () => void;
|
|
1332
|
+
backLabel?: string;
|
|
1333
|
+
nextLabel?: string;
|
|
1334
|
+
nextDisabled?: boolean;
|
|
1335
|
+
pending?: boolean;
|
|
1336
|
+
/** Replaces the default Back button. */
|
|
1337
|
+
secondary?: ReactNode;
|
|
1338
|
+
/** Replaces the default Continue button. */
|
|
1339
|
+
primary?: ReactNode;
|
|
1340
|
+
progressLabel?: string;
|
|
1341
|
+
className?: string;
|
|
1342
|
+
};
|
|
1343
|
+
/**
|
|
1344
|
+
* Composes StepProgress + content + StickyActionBar for multi-step flows.
|
|
1345
|
+
*/
|
|
1346
|
+
declare function WizardLayout({ steps, current, children, onBack, onNext, backLabel, nextLabel, nextDisabled, pending, secondary, primary, progressLabel, className, }: WizardLayoutProps): react.JSX.Element;
|
|
1347
|
+
type SectionSummaryProps = {
|
|
1348
|
+
title: string;
|
|
1349
|
+
children: ReactNode;
|
|
1350
|
+
editLabel?: string;
|
|
1351
|
+
onEdit?: () => void;
|
|
1352
|
+
className?: string;
|
|
1353
|
+
};
|
|
1354
|
+
/** Review-step card with an Edit affordance that jumps back to a prior step. */
|
|
1355
|
+
declare function SectionSummary({ title, children, editLabel, onEdit, className, }: SectionSummaryProps): react.JSX.Element;
|
|
1356
|
+
|
|
1357
|
+
type QueueLayoutProps = {
|
|
1358
|
+
list: ReactNode;
|
|
1359
|
+
review: ReactNode;
|
|
1360
|
+
/** Shown in the review pane when nothing is selected. */
|
|
1361
|
+
emptyReview?: ReactNode;
|
|
1362
|
+
selectedId?: string | null;
|
|
1363
|
+
/** Accessible name for the split region. */
|
|
1364
|
+
"aria-label"?: string;
|
|
1365
|
+
className?: string;
|
|
1366
|
+
/** Optional shortcut hint under the list (e.g. "j / k to move"). */
|
|
1367
|
+
shortcutHint?: string;
|
|
1368
|
+
};
|
|
1369
|
+
/**
|
|
1370
|
+
* Split review queue: list left, review right. Stacks below `lg`.
|
|
1371
|
+
*/
|
|
1372
|
+
declare function QueueLayout({ list, review, emptyReview, selectedId, "aria-label": ariaLabel, className, shortcutHint, }: QueueLayoutProps): react.JSX.Element;
|
|
1373
|
+
type UseQueueKeysOptions = {
|
|
1374
|
+
enabled?: boolean;
|
|
1375
|
+
ids: readonly string[];
|
|
1376
|
+
selectedId: string | null | undefined;
|
|
1377
|
+
onSelect: (id: string | null) => void;
|
|
1378
|
+
};
|
|
1379
|
+
/**
|
|
1380
|
+
* `j` / `k` move selection, `Enter` keeps selection (focus review), `Esc` clears.
|
|
1381
|
+
* Ignored while typing in inputs or when a dialog is focused.
|
|
1382
|
+
*/
|
|
1383
|
+
declare function useQueueKeys({ enabled, ids, selectedId, onSelect, }: UseQueueKeysOptions): void;
|
|
1384
|
+
/** Optional helper for list rows that should advance with Enter. */
|
|
1385
|
+
declare function queueRowKeyDown(event: KeyboardEvent, onOpen: () => void): void;
|
|
1386
|
+
|
|
1387
|
+
type SectionCardTone = "default" | "danger";
|
|
1388
|
+
type SectionCardProps = {
|
|
1389
|
+
id: string;
|
|
1390
|
+
title: ReactNode;
|
|
1391
|
+
description?: string;
|
|
1392
|
+
badge?: ReactNode;
|
|
1393
|
+
headerAction?: ReactNode;
|
|
1394
|
+
footer?: ReactNode;
|
|
1395
|
+
children: ReactNode;
|
|
1396
|
+
tone?: SectionCardTone;
|
|
1397
|
+
className?: string;
|
|
1398
|
+
/** Skip entrance motion (useful in tests). */
|
|
1399
|
+
animate?: boolean;
|
|
1400
|
+
};
|
|
1401
|
+
/**
|
|
1402
|
+
* Settings / account section card with optional danger tone.
|
|
1403
|
+
* Motion honors prefers-reduced-motion via framer-motion.
|
|
1404
|
+
*/
|
|
1405
|
+
declare function SectionCard({ id, title, description, badge, headerAction, footer, children, tone, className, animate, }: SectionCardProps): react.JSX.Element;
|
|
1406
|
+
|
|
1407
|
+
type SectionNavItem = {
|
|
1408
|
+
id: string;
|
|
1409
|
+
label: string;
|
|
1410
|
+
};
|
|
1411
|
+
type UseSectionNavResult = {
|
|
1412
|
+
active: string;
|
|
1413
|
+
scrollToSection: (id: string) => void;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* IntersectionObserver-backed active section for a long settings page.
|
|
1417
|
+
*/
|
|
1418
|
+
declare function useSectionNav(sections: readonly SectionNavItem[]): UseSectionNavResult;
|
|
1419
|
+
type SectionNavListProps = {
|
|
1420
|
+
sections: readonly SectionNavItem[];
|
|
1421
|
+
active: string;
|
|
1422
|
+
onSelect: (id: string) => void;
|
|
1423
|
+
/** Localized accessible name for the nav landmark. */
|
|
1424
|
+
ariaLabel: string;
|
|
1425
|
+
className?: string;
|
|
1426
|
+
layout: "mobile" | "desktop";
|
|
1427
|
+
};
|
|
1428
|
+
declare function SectionNavList({ sections, active, onSelect, ariaLabel, className, layout, }: SectionNavListProps): react.JSX.Element;
|
|
1429
|
+
type SectionNavProps = {
|
|
1430
|
+
sections: readonly SectionNavItem[];
|
|
1431
|
+
ariaLabel: string;
|
|
1432
|
+
className?: string;
|
|
1433
|
+
};
|
|
1434
|
+
/**
|
|
1435
|
+
* Responsive settings section nav: chip strip on small screens, sticky list on md+.
|
|
1436
|
+
*/
|
|
1437
|
+
declare function SectionNav({ sections, ariaLabel, className, }: SectionNavProps): react.JSX.Element;
|
|
1438
|
+
|
|
1439
|
+
type SettingRowProps = {
|
|
1440
|
+
label: string;
|
|
1441
|
+
description?: string;
|
|
1442
|
+
control: ReactNode;
|
|
1443
|
+
className?: string;
|
|
1444
|
+
htmlFor?: string;
|
|
1445
|
+
};
|
|
1446
|
+
/**
|
|
1447
|
+
* Settings row: label + description on the left, control on the right.
|
|
1448
|
+
*/
|
|
1449
|
+
declare function SettingRow({ label, description, control, className, htmlFor, }: SettingRowProps): react.JSX.Element;
|
|
1450
|
+
|
|
926
1451
|
type LegalMarkdownProps = {
|
|
927
1452
|
markdown: string;
|
|
928
1453
|
className?: string;
|
|
@@ -959,9 +1484,11 @@ type AuditTimelineProps = {
|
|
|
959
1484
|
/** Single primary action shown only when the timeline is empty. */
|
|
960
1485
|
emptyAction?: ReactNode;
|
|
961
1486
|
className?: string;
|
|
1487
|
+
/** BCP 47 locale for the default formatter (next-intl). Default: `en`. */
|
|
1488
|
+
locale?: string;
|
|
962
1489
|
formatOccurredAt?: (occurredAt: number) => string;
|
|
963
1490
|
};
|
|
964
|
-
declare function AuditTimeline({ items, labels, emptyAction, className, formatOccurredAt: format, }: AuditTimelineProps): react.JSX.Element;
|
|
1491
|
+
declare function AuditTimeline({ items, labels, emptyAction, className, locale, formatOccurredAt: format, }: AuditTimelineProps): react.JSX.Element;
|
|
965
1492
|
|
|
966
1493
|
type RiskSeverity = "low" | "medium" | "high";
|
|
967
1494
|
type RiskBadgeLabels = {
|
|
@@ -1050,4 +1577,4 @@ declare function sourceUrlIsHttps(url: string): boolean;
|
|
|
1050
1577
|
declare function matchClaimIsUnverified(hit: MatchReviewHit): boolean;
|
|
1051
1578
|
declare function MatchReview({ hit, onResolve, labels, sourceLabels, emptyAction, className, }: MatchReviewProps): react.JSX.Element;
|
|
1052
1579
|
|
|
1053
|
-
export { AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AppNavGroup, type AppNavItem, AppShell, type AppShellProps, type AuditActor, type AuditSubject, AuditTimeline, type AuditTimelineItem, type AuditTimelineLabels, type AuditTimelineProps, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ControlKind, CookieConsentBanner, type CookieConsentBannerLabels, type CookieConsentBannerProps, CookieConsentValue, CostBreakdownCard, type CostBreakdownCardProps, type CostBreakdownItem, type CreateMultipartUploadControllerOptions, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, DataList, DataListItem, type DataListItemProps, type DataListProps, DataTable, type DataTableColumn, type DataTableProps, DataTableSkeleton, DetailPageSkeleton, type DimensionBreakdownRow, DimensionBreakdownTable, type DimensionBreakdownTableProps, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, EntityGraph, type EntityGraphEdge, type EntityGraphLabels, type EntityGraphNode, type EntityGraphProps, ErrorState, Field, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, FormCardSkeleton, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LegalAcceptCheckbox, type LegalAcceptCheckboxLabels, type LegalAcceptCheckboxProps, LegalAcceptDialog, type LegalAcceptDialogLabels, type LegalAcceptDialogProps, LegalMarkdown, type LegalMarkdownProps, ListSkeleton, LoadingState, MatchReview, type MatchReviewHit, type MatchReviewLabels, type MatchReviewProps, type MatchReviewSource, type MatchReviewStatus, MetricChartCard, type MetricChartCardProps, MetricEmptyState, type MetricEmptyStateProps, MetricSkeleton, type MetricSkeletonProps, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, type NavTab, NavTabs, type NavTabsProps, NavigationProgress, type NavigationProgressProps, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, PageContainer, PageTitle, type PageTitleProps, PageTitleSkeleton, type PartRange, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, SafeImage, type SafeImageProps, type ShellIcon, type ShellLinkProps, type ShellLinkRenderer, SparklineStat, type SparklineStatProps, StatHighlightCard, type StatHighlightCardProps, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type TimeRange, TimeRangePicker, type TimeRangePickerLabels, type TimeRangePickerProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, cn, createMultipartUploadController, defaultLanguages, fileMatchesAccept, matchClaimIsUnverified, partRanges, progressFromBytes, renderShellLink, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useEditableSection, useLanguageContext, useMediaQuery };
|
|
1580
|
+
export { AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AppNavGroup, type AppNavItem, AppShell, type AppShellProps, type AuditActor, type AuditSubject, AuditTimeline, type AuditTimelineItem, type AuditTimelineLabels, type AuditTimelineProps, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ControlKind, CookieConsentBanner, type CookieConsentBannerLabels, type CookieConsentBannerProps, CookieConsentValue, CostBreakdownCard, type CostBreakdownCardProps, type CostBreakdownItem, type CountryLocale, type CountryOption, CountryPicker, type CountryPickerItem, type CountryPickerLabels, type CountryPickerProps, type CountryPickerPurpose, type CountryRecord, type CreateMultipartUploadControllerOptions, CurpInput, type CurpInputProps, type CurpValidationError, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, type DashboardSkeletonVariant, DataList, DataListItem, type DataListItemProps, type DataListProps, DataTable, type DataTableColumn, type DataTableProps, DataTableSkeleton, type DetailFact, DetailHeader, type DetailHeaderProps, DetailPageSkeleton, type DimensionBreakdownRow, DimensionBreakdownTable, type DimensionBreakdownTableProps, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateIllustration, type EmptyStateProps, EmptyTitle, EntityGraph, type EntityGraphEdge, type EntityGraphLabels, type EntityGraphNode, type EntityGraphProps, ErrorState, Field, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, FormCardSkeleton, FormSection, type FormSectionProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LegalAcceptCheckbox, type LegalAcceptCheckboxLabels, type LegalAcceptCheckboxProps, LegalAcceptDialog, type LegalAcceptDialogLabels, type LegalAcceptDialogProps, LegalMarkdown, type LegalMarkdownProps, ListSkeleton, LoadingState, MatchReview, type MatchReviewHit, type MatchReviewLabels, type MatchReviewProps, type MatchReviewSource, type MatchReviewStatus, MetricChartCard, type MetricChartCardProps, MetricEmptyState, type MetricEmptyStateProps, MetricSkeleton, type MetricSkeletonProps, type MoneyCurrency, MoneyInput, type MoneyInputProps, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, type NavTab, NavTabs, type NavTabsProps, NavigationProgress, type NavigationProgressProps, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, OptionRow, type OptionRowProps, PageContainer, PageTitle, type PageTitleProps, PageTitleSkeleton, PaginatedCombobox, type PaginatedComboboxItem, type PaginatedComboboxLabels, type PaginatedComboboxProps, type PartRange, PasswordInput, type PasswordInputProps, type PersonKindForRfc, PhoneInput, type PhoneInputProps, ProductIllustration, type ProductIllustrationProps, QueueLayout, type QueueLayoutProps, RfcInput, type RfcInputProps, type RfcValidationError, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, SAT_TAX_REGIME_CODES, SafeImage, type SafeImageProps, SearchablePicker, type SearchablePickerOption, type SearchablePickerProps, SectionCard, type SectionCardProps, type SectionCardTone, SectionNav, type SectionNavItem, SectionNavList, type SectionNavListProps, type SectionNavProps, SectionSummary, type SectionSummaryProps, SettingRow, type SettingRowProps, type ShellIcon, type ShellLinkProps, type ShellLinkRenderer, SparklineStat, type SparklineStatProps, StatHighlightCard, type StatHighlightCardProps, StatusBadge, type StatusBadgeProps, type StatusTone, StepProgress, type StepProgressProps, type StepProgressSegment, StickyActionBar, type StickyActionBarProps, TAX_REGIME_OPTIONS, TIME_RANGE_OPTIONS, TableSkeleton, type TaxRegimeLocale, type TaxRegimeOption, TaxRegimePicker, type TaxRegimePickerItem, type TaxRegimePickerLabels, type TaxRegimePickerProps, type TaxRegimeRecord, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type TimeRange, TimeRangePicker, type TimeRangePickerLabels, type TimeRangePickerProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseQueueKeysOptions, type UseSectionNavResult, WizardLayout, type WizardLayoutProps, appendMoneyDigit, backspaceMoneyMinor, cn, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, filterTaxRegimes, formatCountryOptionLabel, formatMoney, formatTaxRegimeOptionLabel, isKnownCountryCode, isKnownTaxRegimeCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, parseMoneyToMinor, partRanges, progressFromBytes, queueRowKeyDown, renderShellLink, rfcMaxLengthForPersonKind, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, taxRegimeLabel, taxRegimePickerItems, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind };
|