@yenio-pld/blocks 1.2.0-rc.8 → 1.2.0-rc.9
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 +1509 -192
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +392 -78
- package/dist/index.d.ts +392 -78
- package/dist/index.js +1404 -114
- package/dist/index.js.map +1 -1
- package/dist/ui/button.d.ts +2 -2
- 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/dialog.d.ts +1 -1
- package/dist/ui/dialog.js +27 -1
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/select.js +24 -17
- 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 +5 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ReactNode, ComponentType, ReactElement, FormEvent, KeyboardEvent, RefObject, CSSProperties, ComponentProps, ImgHTMLAttributes, SyntheticEvent } from 'react';
|
|
1
|
+
import * as react 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';
|
|
@@ -40,7 +40,7 @@ interface LanguageContextValue {
|
|
|
40
40
|
* React context for language.
|
|
41
41
|
* Blocks components will consume this context when available.
|
|
42
42
|
*/
|
|
43
|
-
declare const LanguageContext:
|
|
43
|
+
declare const LanguageContext: react.Context<LanguageContextValue | null>;
|
|
44
44
|
/**
|
|
45
45
|
* Hook to consume the language context.
|
|
46
46
|
* Returns null if no provider is present (components should fall back to props).
|
|
@@ -57,16 +57,16 @@ type PageTitleProps = {
|
|
|
57
57
|
/** Stacks full-width below `sm`, then sits beside the title. */
|
|
58
58
|
actions?: ReactNode;
|
|
59
59
|
};
|
|
60
|
-
declare function PageTitle({ title, description, eyebrow, back, actions, }: PageTitleProps):
|
|
60
|
+
declare function PageTitle({ title, description, eyebrow, back, actions, }: PageTitleProps): react.JSX.Element;
|
|
61
61
|
declare function Field({ label, children, }: {
|
|
62
62
|
label: string;
|
|
63
63
|
children: ReactNode;
|
|
64
|
-
}):
|
|
65
|
-
declare function ListSkeleton():
|
|
64
|
+
}): react.JSX.Element;
|
|
65
|
+
declare function ListSkeleton(): react.JSX.Element;
|
|
66
66
|
declare function TableSkeleton({ columns, rows, }: {
|
|
67
67
|
columns: number;
|
|
68
68
|
rows?: number;
|
|
69
|
-
}):
|
|
69
|
+
}): react.JSX.Element;
|
|
70
70
|
|
|
71
71
|
/** Fixed row height shared with `DataTableSkeleton` so list swaps do not jump. */
|
|
72
72
|
declare const DATA_TABLE_ROW_CLASS = "h-14";
|
|
@@ -99,6 +99,12 @@ type AppNavItem = {
|
|
|
99
99
|
type AppNavGroup = {
|
|
100
100
|
label: string;
|
|
101
101
|
items: AppNavItem[];
|
|
102
|
+
/** When true, the group starts collapsed and can be toggled. */
|
|
103
|
+
collapsible?: boolean;
|
|
104
|
+
/** Optional badge next to the group label (e.g. pending compliance count). */
|
|
105
|
+
badge?: string | number;
|
|
106
|
+
/** Controlled open state for collapsible groups. Uncontrolled when omitted. */
|
|
107
|
+
defaultOpen?: boolean;
|
|
102
108
|
};
|
|
103
109
|
type AppShellProps = {
|
|
104
110
|
/** Sidebar header. Usually the mark, product name, and organization. */
|
|
@@ -107,7 +113,16 @@ type AppShellProps = {
|
|
|
107
113
|
/** Accessible name for the single sidebar landmark. */
|
|
108
114
|
navLabel?: string;
|
|
109
115
|
sidebarFooter?: ReactNode;
|
|
110
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Optional header lead (breadcrumbs). Sits after the sidebar trigger.
|
|
118
|
+
*/
|
|
119
|
+
headerStart?: ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Flexible middle of the sticky header (rates ticker, search).
|
|
122
|
+
* Keeps utilities in `headerEnd` from competing for space.
|
|
123
|
+
*/
|
|
124
|
+
headerMiddle?: ReactNode;
|
|
125
|
+
/** Sticky header end slot (environment select, theme, language). */
|
|
111
126
|
headerEnd?: ReactNode;
|
|
112
127
|
/**
|
|
113
128
|
* Initial desktop open state. Read the `sidebar_state` cookie in the
|
|
@@ -120,15 +135,17 @@ type AppShellProps = {
|
|
|
120
135
|
children: ReactNode;
|
|
121
136
|
className?: string;
|
|
122
137
|
};
|
|
123
|
-
declare function AppShell({ brand, nav, navLabel, sidebarFooter, headerEnd, defaultOpen, pathname, renderLink, children, className, }: AppShellProps):
|
|
138
|
+
declare function AppShell({ brand, nav, navLabel, sidebarFooter, headerStart, headerMiddle, headerEnd, defaultOpen, pathname, renderLink, children, className, }: AppShellProps): react.JSX.Element;
|
|
124
139
|
declare function PageContainer({ children, className, }: {
|
|
125
140
|
children: ReactNode;
|
|
126
141
|
className?: string;
|
|
127
|
-
}):
|
|
142
|
+
}): react.JSX.Element;
|
|
128
143
|
type NavTab = {
|
|
129
144
|
label: string;
|
|
130
145
|
href: string;
|
|
131
146
|
active?: boolean;
|
|
147
|
+
/** Optional count shown beside the label (Attio-style). */
|
|
148
|
+
count?: number;
|
|
132
149
|
};
|
|
133
150
|
type NavTabsProps = {
|
|
134
151
|
tabs: NavTab[];
|
|
@@ -137,7 +154,7 @@ type NavTabsProps = {
|
|
|
137
154
|
renderLink?: ShellLinkRenderer;
|
|
138
155
|
className?: string;
|
|
139
156
|
};
|
|
140
|
-
declare function NavTabs({ tabs, label, renderLink, className, }: NavTabsProps):
|
|
157
|
+
declare function NavTabs({ tabs, label, renderLink, className, }: NavTabsProps): react.JSX.Element;
|
|
141
158
|
type AccountMenuLabels = {
|
|
142
159
|
menu?: string;
|
|
143
160
|
account?: string;
|
|
@@ -156,7 +173,7 @@ type AccountMenuProps = {
|
|
|
156
173
|
onAccount?: () => void;
|
|
157
174
|
onSignOut?: () => void;
|
|
158
175
|
};
|
|
159
|
-
declare function AccountMenu({ name, email, imageSrc, imageAlt, labels: userLabels, onAccount, onSignOut, }: AccountMenuProps):
|
|
176
|
+
declare function AccountMenu({ name, email, imageSrc, imageAlt, labels: userLabels, onAccount, onSignOut, }: AccountMenuProps): react.JSX.Element;
|
|
160
177
|
type DataTableColumn<T> = {
|
|
161
178
|
key: string;
|
|
162
179
|
header: ReactNode;
|
|
@@ -183,7 +200,7 @@ type DataTableProps<T> = {
|
|
|
183
200
|
label?: string;
|
|
184
201
|
className?: string;
|
|
185
202
|
};
|
|
186
|
-
declare function DataTable<T>({ columns, rows, rowKey, toolbar, emptyTitle, emptyDescription, loading, skeletonRows, loadMore, label, className, }: DataTableProps<T>):
|
|
203
|
+
declare function DataTable<T>({ columns, rows, rowKey, toolbar, emptyTitle, emptyDescription, loading, skeletonRows, loadMore, label, className, }: DataTableProps<T>): react.JSX.Element;
|
|
187
204
|
|
|
188
205
|
/**
|
|
189
206
|
* Ignore navigation-start signals for the rest of this turn. An in-flight
|
|
@@ -213,65 +230,66 @@ type NavigationProgressProps = {
|
|
|
213
230
|
* or {@link signalNavigationStart}, and stays up while a visible
|
|
214
231
|
* `[data-route-loading]` node is on screen.
|
|
215
232
|
*/
|
|
216
|
-
declare function NavigationProgress({ pathname, search, ariaLabel, forceVisible, }: NavigationProgressProps):
|
|
233
|
+
declare function NavigationProgress({ pathname, search, ariaLabel, forceVisible, }: NavigationProgressProps): react.JSX.Element | null;
|
|
217
234
|
/** Marks a route `loading.tsx` so the top progress bar stays up until it unmounts. */
|
|
218
235
|
declare function RouteLoading({ children }: {
|
|
219
236
|
children: ReactNode;
|
|
220
|
-
}):
|
|
237
|
+
}): react.JSX.Element;
|
|
221
238
|
declare function PageTitleSkeleton({ label, action, }: {
|
|
222
239
|
label: string;
|
|
223
240
|
action?: boolean;
|
|
224
|
-
}):
|
|
241
|
+
}): react.JSX.Element;
|
|
225
242
|
declare function DataTableSkeleton({ label, rows, }: {
|
|
226
243
|
label: string;
|
|
227
244
|
rows?: number;
|
|
228
|
-
}):
|
|
245
|
+
}): react.JSX.Element;
|
|
229
246
|
declare function DetailPageSkeleton({ label }: {
|
|
230
247
|
label: string;
|
|
231
|
-
}):
|
|
248
|
+
}): react.JSX.Element;
|
|
232
249
|
declare function FormCardSkeleton({ label, fields, }: {
|
|
233
250
|
label: string;
|
|
234
251
|
fields?: number;
|
|
235
|
-
}):
|
|
252
|
+
}): react.JSX.Element;
|
|
236
253
|
declare function DashboardSkeleton({ label }: {
|
|
237
254
|
label: string;
|
|
238
|
-
}):
|
|
255
|
+
}): react.JSX.Element;
|
|
239
256
|
|
|
240
257
|
declare function LoadingState({ label, className, }: {
|
|
258
|
+
/** Visible label. Prefer a translated phrase; omit for a spinner-only state. */
|
|
241
259
|
label?: string;
|
|
242
260
|
className?: string;
|
|
243
|
-
}):
|
|
261
|
+
}): react.JSX.Element;
|
|
244
262
|
declare function ErrorState({ title, description, action, className, }: {
|
|
245
263
|
title?: string;
|
|
246
264
|
description?: string;
|
|
247
|
-
action?:
|
|
265
|
+
action?: react.ReactNode;
|
|
248
266
|
className?: string;
|
|
249
|
-
}):
|
|
267
|
+
}): react.JSX.Element;
|
|
250
268
|
/** Accept any icon component with a className prop — avoids LucideIcon
|
|
251
269
|
* version skew between blocks peers and consuming apps. */
|
|
252
|
-
type EmptyStateIcon =
|
|
270
|
+
type EmptyStateIcon = react.ComponentType<{
|
|
253
271
|
className?: string;
|
|
254
272
|
"aria-hidden"?: boolean | "true" | "false";
|
|
255
273
|
}>;
|
|
256
274
|
type EmptyStateProps = {
|
|
257
275
|
title: string;
|
|
258
276
|
description?: string;
|
|
259
|
-
action?:
|
|
277
|
+
action?: react.ReactNode;
|
|
260
278
|
icon?: EmptyStateIcon;
|
|
261
279
|
variant?: "default" | "compact";
|
|
262
280
|
className?: string;
|
|
263
281
|
};
|
|
264
|
-
declare function EmptyState({ title, description, action, icon: Icon, variant, className, }: EmptyStateProps):
|
|
282
|
+
declare function EmptyState({ title, description, action, icon: Icon, variant, className, }: EmptyStateProps): react.JSX.Element;
|
|
265
283
|
|
|
266
|
-
declare function Empty({ className, ...props }:
|
|
267
|
-
declare function EmptyHeader({ className, ...props }:
|
|
284
|
+
declare function Empty({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
|
|
285
|
+
declare function EmptyHeader({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
|
|
268
286
|
declare const emptyMediaVariants: (props?: ({
|
|
269
287
|
variant?: "default" | "icon" | null | undefined;
|
|
270
288
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
271
|
-
declare function EmptyMedia({ className, variant, ...props }:
|
|
272
|
-
declare function EmptyTitle({ className, ...props }:
|
|
273
|
-
declare function EmptyDescription({ className, ...props }:
|
|
274
|
-
declare function EmptyContent({ className, ...props }:
|
|
289
|
+
declare function EmptyMedia({ className, variant, ...props }: react.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): react.JSX.Element;
|
|
290
|
+
declare function EmptyTitle({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
|
|
291
|
+
declare function EmptyDescription({ className, ...props }: react.ComponentProps<"p">): react.JSX.Element;
|
|
292
|
+
declare function EmptyContent({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
|
|
275
293
|
|
|
276
294
|
type ConfirmDestructiveDialogProps = {
|
|
277
295
|
open: boolean;
|
|
@@ -280,13 +298,16 @@ type ConfirmDestructiveDialogProps = {
|
|
|
280
298
|
description: string;
|
|
281
299
|
confirmLabel?: string;
|
|
282
300
|
cancelLabel?: string;
|
|
301
|
+
/** When false, confirm uses the primary button style (deliver/receive/convert). */
|
|
302
|
+
destructive?: boolean;
|
|
283
303
|
onConfirm: () => void;
|
|
284
304
|
};
|
|
285
305
|
/**
|
|
286
306
|
* Shared confirm step for destructive actions (delete, mute, etc.).
|
|
287
307
|
* Prefer this over window.confirm so focus stays in the app and copy is clear.
|
|
308
|
+
* Set `destructive={false}` for irreversible but constructive confirms.
|
|
288
309
|
*/
|
|
289
|
-
declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, }: ConfirmDestructiveDialogProps):
|
|
310
|
+
declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, onConfirm, }: ConfirmDestructiveDialogProps): react.JSX.Element;
|
|
290
311
|
|
|
291
312
|
type NotificationBellItem = {
|
|
292
313
|
id: string;
|
|
@@ -313,7 +334,7 @@ type NotificationBellProps = {
|
|
|
313
334
|
align?: "start" | "end";
|
|
314
335
|
className?: string;
|
|
315
336
|
};
|
|
316
|
-
declare function NotificationBell({ items, unreadCount, isLoading, labels: labelOverrides, viewAllHref, formatTime, onOpenChange, align, className, }: NotificationBellProps):
|
|
337
|
+
declare function NotificationBell({ items, unreadCount, isLoading, labels: labelOverrides, viewAllHref, formatTime, onOpenChange, align, className, }: NotificationBellProps): react.JSX.Element;
|
|
317
338
|
|
|
318
339
|
type EditableSectionMode = "reading" | "editing" | "saving";
|
|
319
340
|
type EditableSectionLabels = {
|
|
@@ -444,7 +465,7 @@ type EditableSectionProps = UseEditableSectionOptions & {
|
|
|
444
465
|
*
|
|
445
466
|
* Does not render a Card — place `actions` wherever your layout needs them.
|
|
446
467
|
*/
|
|
447
|
-
declare function EditableSection({ readView, editView, children, className, ...options }: EditableSectionProps):
|
|
468
|
+
declare function EditableSection({ readView, editView, children, className, ...options }: EditableSectionProps): react.JSX.Element;
|
|
448
469
|
|
|
449
470
|
/**
|
|
450
471
|
* Read-mode description list. Column grid and label placement match the
|
|
@@ -452,7 +473,7 @@ declare function EditableSection({ readView, editView, children, className, ...o
|
|
|
452
473
|
* so labels and values keep the same x-position across modes.
|
|
453
474
|
*/
|
|
454
475
|
type DataListProps = ComponentProps<"dl">;
|
|
455
|
-
declare function DataList({ className, ...props }: DataListProps):
|
|
476
|
+
declare function DataList({ className, ...props }: DataListProps): react.JSX.Element;
|
|
456
477
|
type DataListItemProps = {
|
|
457
478
|
label: ReactNode;
|
|
458
479
|
children?: ReactNode;
|
|
@@ -462,7 +483,7 @@ type DataListItemProps = {
|
|
|
462
483
|
labelClassName?: string;
|
|
463
484
|
valueClassName?: string;
|
|
464
485
|
};
|
|
465
|
-
declare function DataListItem({ label, children, empty, className, labelClassName, valueClassName, }: DataListItemProps):
|
|
486
|
+
declare function DataListItem({ label, children, empty, className, labelClassName, valueClassName, }: DataListItemProps): react.JSX.Element;
|
|
466
487
|
|
|
467
488
|
type FieldMessageProps = Omit<ComponentProps<"p">, "children"> & {
|
|
468
489
|
children?: ReactNode;
|
|
@@ -477,19 +498,22 @@ type FieldMessageProps = Omit<ComponentProps<"p">, "children"> & {
|
|
|
477
498
|
* so async errors do not shift fields under the pointer (CLS outside the
|
|
478
499
|
* 500ms input exclusion window).
|
|
479
500
|
*/
|
|
480
|
-
declare function FieldMessage({ id, children, className, ...props }: FieldMessageProps):
|
|
501
|
+
declare function FieldMessage({ id, children, className, ...props }: FieldMessageProps): react.JSX.Element;
|
|
481
502
|
|
|
482
503
|
type SafeImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> & {
|
|
483
504
|
src?: string | null;
|
|
505
|
+
/**
|
|
506
|
+
* Tiny JPEG data URL painted as a clipped cover background until the image
|
|
507
|
+
* loads. No CSS `filter: blur()` — the LQIP is already soft, and filters
|
|
508
|
+
* paint outside the box even when a parent sets `overflow: hidden`.
|
|
509
|
+
* `null` and omission keep the image with no placeholder.
|
|
510
|
+
*/
|
|
511
|
+
blurDataUrl?: string | null;
|
|
484
512
|
/** Rendered when `src` is missing/empty or the image fails to load. */
|
|
485
513
|
fallback: ReactNode;
|
|
486
514
|
onError?: (event: SyntheticEvent<HTMLImageElement>) => void;
|
|
487
515
|
};
|
|
488
|
-
|
|
489
|
-
* `<img>` that swaps to `fallback` when the source is missing or fails to load,
|
|
490
|
-
* so the browser never shows its default broken-image glyph.
|
|
491
|
-
*/
|
|
492
|
-
declare function SafeImage({ src, fallback, alt, onError, ...imgProps }: SafeImageProps): React.JSX.Element;
|
|
516
|
+
declare function SafeImage({ src, fallback, alt, onError, onLoad, blurDataUrl, style, className, ...imgProps }: SafeImageProps): react.JSX.Element;
|
|
493
517
|
|
|
494
518
|
type ThemeSwitcherLabels = {
|
|
495
519
|
/** Accessible name for the theme trigger */
|
|
@@ -525,7 +549,7 @@ type ThemeSwitcherProps = {
|
|
|
525
549
|
/** Translation labels - consumers can pass their own t() values */
|
|
526
550
|
labels?: ThemeSwitcherLabels;
|
|
527
551
|
};
|
|
528
|
-
declare function ThemeSwitcher({ className, size, shape, align, side, labels: userLabels, }: ThemeSwitcherProps):
|
|
552
|
+
declare function ThemeSwitcher({ className, size, shape, align, side, labels: userLabels, }: ThemeSwitcherProps): react.JSX.Element;
|
|
529
553
|
|
|
530
554
|
type Language = {
|
|
531
555
|
/** Language key/code (e.g., "en", "es") */
|
|
@@ -585,7 +609,7 @@ type LanguageSwitcherProps = {
|
|
|
585
609
|
/** @deprecated No longer used; the trigger no longer renders a tooltip. */
|
|
586
610
|
tooltipSideOffset?: number;
|
|
587
611
|
};
|
|
588
|
-
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, align, side, }: LanguageSwitcherProps):
|
|
612
|
+
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, align, side, }: LanguageSwitcherProps): react.JSX.Element;
|
|
589
613
|
|
|
590
614
|
type CountryLocale = "es-MX" | "en";
|
|
591
615
|
type CountryRecord = {
|
|
@@ -630,7 +654,39 @@ type CountryPickerProps = {
|
|
|
630
654
|
labels?: CountryPickerLabels;
|
|
631
655
|
"aria-invalid"?: boolean;
|
|
632
656
|
};
|
|
633
|
-
declare function CountryPicker({ value, onValueChange, purpose, locale, id, name, disabled, required, allowEmpty, className, labels: labelsProp, "aria-invalid": ariaInvalid, }: CountryPickerProps):
|
|
657
|
+
declare function CountryPicker({ value, onValueChange, purpose, locale, id, name, disabled, required, allowEmpty, className, labels: labelsProp, "aria-invalid": ariaInvalid, }: CountryPickerProps): react.JSX.Element;
|
|
658
|
+
|
|
659
|
+
type SearchablePickerOption = {
|
|
660
|
+
id: string;
|
|
661
|
+
label: string;
|
|
662
|
+
sublabel?: string;
|
|
663
|
+
};
|
|
664
|
+
type SearchablePickerProps = {
|
|
665
|
+
value: string;
|
|
666
|
+
selectedLabel?: string | null;
|
|
667
|
+
onChange: (id: string, option?: SearchablePickerOption) => void;
|
|
668
|
+
options: SearchablePickerOption[];
|
|
669
|
+
query: string;
|
|
670
|
+
onQueryChange: (query: string) => void;
|
|
671
|
+
loading?: boolean;
|
|
672
|
+
loadingMore?: boolean;
|
|
673
|
+
hasMore?: boolean;
|
|
674
|
+
onLoadMore?: () => void;
|
|
675
|
+
placeholder?: string;
|
|
676
|
+
emptyLabel?: string;
|
|
677
|
+
loadMoreLabel?: string;
|
|
678
|
+
clearLabel?: string;
|
|
679
|
+
searchPlaceholder?: string;
|
|
680
|
+
openLabel?: string;
|
|
681
|
+
disabled?: boolean;
|
|
682
|
+
allowClear?: boolean;
|
|
683
|
+
title?: string;
|
|
684
|
+
id?: string;
|
|
685
|
+
className?: string;
|
|
686
|
+
"aria-invalid"?: boolean;
|
|
687
|
+
onOpenChange?: (open: boolean) => void;
|
|
688
|
+
};
|
|
689
|
+
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, }: SearchablePickerProps): react.JSX.Element;
|
|
634
690
|
|
|
635
691
|
type PaginatedComboboxItem = {
|
|
636
692
|
value: string;
|
|
@@ -668,7 +724,43 @@ type PaginatedComboboxProps = {
|
|
|
668
724
|
labels?: PaginatedComboboxLabels;
|
|
669
725
|
"aria-invalid"?: boolean;
|
|
670
726
|
};
|
|
671
|
-
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):
|
|
727
|
+
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;
|
|
728
|
+
|
|
729
|
+
/** Mexican RFC and CURP normalize + validate (UI + app shared). */
|
|
730
|
+
type PersonKindForRfc = "natural_person_mx" | "natural_person_foreign" | "legal_entity_mx" | "legal_entity_foreign" | "trust" | "other";
|
|
731
|
+
type RfcValidationError = "moral" | "natural" | "length";
|
|
732
|
+
type CurpValidationError = "format" | "check_digit";
|
|
733
|
+
declare const CURP_REGEX: RegExp;
|
|
734
|
+
declare function normalizeRfc(raw: string): string;
|
|
735
|
+
declare function rfcMaxLengthForPersonKind(personKind?: PersonKindForRfc | null): number;
|
|
736
|
+
declare function validateRfcForPersonKind(rfc: string, personKind: PersonKindForRfc): {
|
|
737
|
+
ok: true;
|
|
738
|
+
} | {
|
|
739
|
+
ok: false;
|
|
740
|
+
code: RfcValidationError;
|
|
741
|
+
};
|
|
742
|
+
/** Trim + uppercase. Does not require a valid CURP. */
|
|
743
|
+
declare function normalizeCurpInput(raw: string): string;
|
|
744
|
+
declare function curpCheckDigit(curp17: string): number;
|
|
745
|
+
declare function validateCurp(curp: string): {
|
|
746
|
+
ok: true;
|
|
747
|
+
} | {
|
|
748
|
+
ok: false;
|
|
749
|
+
code: CurpValidationError;
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
type RfcInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "maxLength" | "autoCapitalize" | "spellCheck"> & {
|
|
753
|
+
value: string;
|
|
754
|
+
onValueChange: (value: string) => void;
|
|
755
|
+
personKind?: PersonKindForRfc | null;
|
|
756
|
+
};
|
|
757
|
+
declare function RfcInput({ value, onValueChange, personKind, className, ...props }: RfcInputProps): react.JSX.Element;
|
|
758
|
+
|
|
759
|
+
type CurpInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "maxLength" | "autoCapitalize" | "spellCheck"> & {
|
|
760
|
+
value: string;
|
|
761
|
+
onValueChange: (value: string) => void;
|
|
762
|
+
};
|
|
763
|
+
declare function CurpInput({ value, onValueChange, className, ...props }: CurpInputProps): react.JSX.Element;
|
|
672
764
|
|
|
673
765
|
type AvatarEditorLabels = {
|
|
674
766
|
uploadAria?: string;
|
|
@@ -707,7 +799,7 @@ interface AvatarEditorProps {
|
|
|
707
799
|
/** Override English chrome strings */
|
|
708
800
|
labels?: AvatarEditorLabels;
|
|
709
801
|
}
|
|
710
|
-
declare function AvatarEditor({ value: _value, onChange, size, showGrid: initialShowGrid, outputSize, outputFormat, outputQuality, className, controlSize, labels, }: AvatarEditorProps):
|
|
802
|
+
declare function AvatarEditor({ value: _value, onChange, size, showGrid: initialShowGrid, outputSize, outputFormat, outputQuality, className, controlSize, labels, }: AvatarEditorProps): react.JSX.Element;
|
|
711
803
|
|
|
712
804
|
interface AvatarEditorDialogProps {
|
|
713
805
|
/** Current avatar URL or data URL */
|
|
@@ -745,7 +837,7 @@ interface AvatarEditorDialogProps {
|
|
|
745
837
|
/** Override AvatarEditor chrome strings */
|
|
746
838
|
editorLabels?: AvatarEditorLabels;
|
|
747
839
|
}
|
|
748
|
-
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, editorLabels, }: AvatarEditorDialogProps):
|
|
840
|
+
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, editorLabels, }: AvatarEditorDialogProps): react.JSX.Element;
|
|
749
841
|
|
|
750
842
|
type MultipartUploadPart = {
|
|
751
843
|
partNumber: number;
|
|
@@ -801,13 +893,15 @@ declare const DEFAULT_FILE_UPLOAD_LABELS: {
|
|
|
801
893
|
type FileDropzoneProps = {
|
|
802
894
|
accept?: string;
|
|
803
895
|
maxSize?: number;
|
|
896
|
+
/** When true, drop/browse can accept several files; `onFile` runs once per file. */
|
|
897
|
+
multiple?: boolean;
|
|
804
898
|
disabled?: boolean;
|
|
805
899
|
labels?: Partial<FileDropzoneLabels>;
|
|
806
900
|
onFile: (file: File) => void;
|
|
807
901
|
onReject?: (reason: "type" | "size") => void;
|
|
808
902
|
className?: string;
|
|
809
903
|
};
|
|
810
|
-
declare function FileDropzone({ accept, maxSize, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps):
|
|
904
|
+
declare function FileDropzone({ accept, maxSize, multiple, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): react.JSX.Element;
|
|
811
905
|
|
|
812
906
|
type FileUploadTrayProps = {
|
|
813
907
|
jobs: UploadJob[];
|
|
@@ -817,7 +911,7 @@ type FileUploadTrayProps = {
|
|
|
817
911
|
onCancel: (id: string) => void;
|
|
818
912
|
className?: string;
|
|
819
913
|
};
|
|
820
|
-
declare function FileUploadTray({ jobs, labels: labelOverrides, onPause, onResume, onCancel, className, }: FileUploadTrayProps):
|
|
914
|
+
declare function FileUploadTray({ jobs, labels: labelOverrides, onPause, onResume, onCancel, className, }: FileUploadTrayProps): react.JSX.Element | null;
|
|
821
915
|
|
|
822
916
|
type FileUploadMenuProps = {
|
|
823
917
|
jobs: UploadJob[];
|
|
@@ -830,7 +924,7 @@ type FileUploadMenuProps = {
|
|
|
830
924
|
align?: "start" | "end";
|
|
831
925
|
className?: string;
|
|
832
926
|
};
|
|
833
|
-
declare function FileUploadMenu({ jobs, labels: labelOverrides, onPause, onResume, onCancel, open, onOpenChange, align, className, }: FileUploadMenuProps):
|
|
927
|
+
declare function FileUploadMenu({ jobs, labels: labelOverrides, onPause, onResume, onCancel, open, onOpenChange, align, className, }: FileUploadMenuProps): react.JSX.Element | null;
|
|
834
928
|
|
|
835
929
|
type CreateMultipartUploadControllerOptions = {
|
|
836
930
|
file: Blob;
|
|
@@ -869,30 +963,30 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
869
963
|
|
|
870
964
|
type StatHighlightCardProps = {
|
|
871
965
|
label: string;
|
|
872
|
-
value:
|
|
966
|
+
value: react.ReactNode;
|
|
873
967
|
hint?: string;
|
|
874
968
|
delta?: string;
|
|
875
969
|
deltaTone?: "up" | "down" | "neutral";
|
|
876
970
|
className?: string;
|
|
877
971
|
};
|
|
878
|
-
declare function StatHighlightCard({ label, value, hint, delta, deltaTone, className, }: StatHighlightCardProps):
|
|
972
|
+
declare function StatHighlightCard({ label, value, hint, delta, deltaTone, className, }: StatHighlightCardProps): react.JSX.Element;
|
|
879
973
|
|
|
880
974
|
type MetricChartCardProps = {
|
|
881
975
|
title: string;
|
|
882
976
|
description?: string;
|
|
883
|
-
action?:
|
|
884
|
-
children:
|
|
977
|
+
action?: react.ReactNode;
|
|
978
|
+
children: react.ReactNode;
|
|
885
979
|
className?: string;
|
|
886
980
|
};
|
|
887
|
-
declare function MetricChartCard({ title, description, action, children, className, }: MetricChartCardProps):
|
|
981
|
+
declare function MetricChartCard({ title, description, action, children, className, }: MetricChartCardProps): react.JSX.Element;
|
|
888
982
|
|
|
889
983
|
type SparklineStatProps = {
|
|
890
984
|
label: string;
|
|
891
|
-
value:
|
|
985
|
+
value: react.ReactNode;
|
|
892
986
|
points: number[];
|
|
893
987
|
className?: string;
|
|
894
988
|
};
|
|
895
|
-
declare function SparklineStat({ label, value, points, className, }: SparklineStatProps):
|
|
989
|
+
declare function SparklineStat({ label, value, points, className, }: SparklineStatProps): react.JSX.Element;
|
|
896
990
|
|
|
897
991
|
declare const TIME_RANGE_OPTIONS: readonly ["day", "week", "month", "year"];
|
|
898
992
|
type TimeRange = (typeof TIME_RANGE_OPTIONS)[number];
|
|
@@ -903,50 +997,50 @@ type TimeRangePickerProps = {
|
|
|
903
997
|
labels?: TimeRangePickerLabels;
|
|
904
998
|
className?: string;
|
|
905
999
|
};
|
|
906
|
-
declare function TimeRangePicker({ value, onChange, labels, className, }: TimeRangePickerProps):
|
|
1000
|
+
declare function TimeRangePicker({ value, onChange, labels, className, }: TimeRangePickerProps): react.JSX.Element;
|
|
907
1001
|
|
|
908
1002
|
type DimensionBreakdownRow = {
|
|
909
1003
|
id: string;
|
|
910
1004
|
label: string;
|
|
911
|
-
value:
|
|
1005
|
+
value: react.ReactNode;
|
|
912
1006
|
share?: string;
|
|
913
1007
|
};
|
|
914
1008
|
type DimensionBreakdownTableProps = {
|
|
915
1009
|
title?: string;
|
|
916
1010
|
rows: DimensionBreakdownRow[];
|
|
917
|
-
empty?:
|
|
1011
|
+
empty?: react.ReactNode;
|
|
918
1012
|
className?: string;
|
|
919
1013
|
};
|
|
920
|
-
declare function DimensionBreakdownTable({ title, rows, empty, className, }: DimensionBreakdownTableProps):
|
|
1014
|
+
declare function DimensionBreakdownTable({ title, rows, empty, className, }: DimensionBreakdownTableProps): react.JSX.Element;
|
|
921
1015
|
|
|
922
1016
|
type CostBreakdownItem = {
|
|
923
1017
|
id: string;
|
|
924
1018
|
label: string;
|
|
925
|
-
amount:
|
|
1019
|
+
amount: react.ReactNode;
|
|
926
1020
|
basis?: string;
|
|
927
1021
|
};
|
|
928
1022
|
type CostBreakdownCardProps = {
|
|
929
1023
|
title: string;
|
|
930
|
-
total?:
|
|
1024
|
+
total?: react.ReactNode;
|
|
931
1025
|
items: CostBreakdownItem[];
|
|
932
1026
|
className?: string;
|
|
933
1027
|
};
|
|
934
|
-
declare function CostBreakdownCard({ title, total, items, className, }: CostBreakdownCardProps):
|
|
1028
|
+
declare function CostBreakdownCard({ title, total, items, className, }: CostBreakdownCardProps): react.JSX.Element;
|
|
935
1029
|
|
|
936
1030
|
type MetricEmptyStateProps = {
|
|
937
1031
|
title: string;
|
|
938
1032
|
description?: string;
|
|
939
|
-
action?:
|
|
1033
|
+
action?: react.ReactNode;
|
|
940
1034
|
icon?: EmptyStateIcon;
|
|
941
1035
|
className?: string;
|
|
942
1036
|
};
|
|
943
|
-
declare function MetricEmptyState({ title, description, action, icon, className, }: MetricEmptyStateProps):
|
|
1037
|
+
declare function MetricEmptyState({ title, description, action, icon, className, }: MetricEmptyStateProps): react.JSX.Element;
|
|
944
1038
|
|
|
945
1039
|
type MetricSkeletonProps = {
|
|
946
1040
|
className?: string;
|
|
947
1041
|
bars?: number;
|
|
948
1042
|
};
|
|
949
|
-
declare function MetricSkeleton({ className, bars }: MetricSkeletonProps):
|
|
1043
|
+
declare function MetricSkeleton({ className, bars }: MetricSkeletonProps): react.JSX.Element;
|
|
950
1044
|
|
|
951
1045
|
type CookieConsentBannerLabels = {
|
|
952
1046
|
message: string;
|
|
@@ -963,7 +1057,7 @@ type CookieConsentBannerProps = {
|
|
|
963
1057
|
variant?: "default" | "embed";
|
|
964
1058
|
className?: string;
|
|
965
1059
|
};
|
|
966
|
-
declare function CookieConsentBanner({ domain, policyHref, labels, onChoice, variant, className, }: CookieConsentBannerProps):
|
|
1060
|
+
declare function CookieConsentBanner({ domain, policyHref, labels, onChoice, variant, className, }: CookieConsentBannerProps): react.JSX.Element | null;
|
|
967
1061
|
|
|
968
1062
|
type LegalAcceptDialogLabels = {
|
|
969
1063
|
title: string;
|
|
@@ -982,7 +1076,7 @@ type LegalAcceptDialogProps = {
|
|
|
982
1076
|
labels?: Partial<LegalAcceptDialogLabels>;
|
|
983
1077
|
onAccept: () => void;
|
|
984
1078
|
};
|
|
985
|
-
declare function LegalAcceptDialog({ open, termsHref, privacyHref, summary, accepting, labels, onAccept, }: LegalAcceptDialogProps):
|
|
1079
|
+
declare function LegalAcceptDialog({ open, termsHref, privacyHref, summary, accepting, labels, onAccept, }: LegalAcceptDialogProps): react.JSX.Element;
|
|
986
1080
|
|
|
987
1081
|
type LegalAcceptCheckboxLabels = {
|
|
988
1082
|
label: string;
|
|
@@ -1000,13 +1094,231 @@ type LegalAcceptCheckboxProps = {
|
|
|
1000
1094
|
disabled?: boolean;
|
|
1001
1095
|
className?: string;
|
|
1002
1096
|
};
|
|
1003
|
-
declare function LegalAcceptCheckbox({ id, checked, onCheckedChange, termsHref, privacyHref, labels, disabled, className, }: LegalAcceptCheckboxProps):
|
|
1097
|
+
declare function LegalAcceptCheckbox({ id, checked, onCheckedChange, termsHref, privacyHref, labels, disabled, className, }: LegalAcceptCheckboxProps): react.JSX.Element;
|
|
1098
|
+
|
|
1099
|
+
type StepProgressSegment = {
|
|
1100
|
+
id: string;
|
|
1101
|
+
label: string;
|
|
1102
|
+
};
|
|
1103
|
+
type StepProgressProps = {
|
|
1104
|
+
segments: readonly StepProgressSegment[];
|
|
1105
|
+
/** Zero-based index of the active segment. */
|
|
1106
|
+
current: number;
|
|
1107
|
+
className?: string;
|
|
1108
|
+
/** Accessible name for the progress region. */
|
|
1109
|
+
"aria-label"?: string;
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* Segmented wizard progress (filled bars + current label).
|
|
1113
|
+
* Labels stay visible for the active segment only on narrow screens.
|
|
1114
|
+
*/
|
|
1115
|
+
declare function StepProgress({ segments, current, className, "aria-label": ariaLabel, }: StepProgressProps): react.JSX.Element;
|
|
1116
|
+
|
|
1117
|
+
type OptionRowProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
1118
|
+
icon?: ReactNode;
|
|
1119
|
+
title: string;
|
|
1120
|
+
description?: string;
|
|
1121
|
+
badge?: string;
|
|
1122
|
+
badgeVariant?: "default" | "secondary" | "outline" | "success" | "warning";
|
|
1123
|
+
showChevron?: boolean;
|
|
1124
|
+
};
|
|
1125
|
+
/** List row with icon, title, description, optional badge, and chevron. */
|
|
1126
|
+
declare function OptionRow({ icon, title, description, badge, badgeVariant, showChevron, className, type, ...props }: OptionRowProps): react.JSX.Element;
|
|
1127
|
+
|
|
1128
|
+
type StickyActionBarProps = HTMLAttributes<HTMLDivElement> & {
|
|
1129
|
+
children: ReactNode;
|
|
1130
|
+
/** Optional secondary action on the left (e.g. decline / skip). */
|
|
1131
|
+
secondary?: ReactNode;
|
|
1132
|
+
};
|
|
1133
|
+
/**
|
|
1134
|
+
* Bottom-pinned action strip for mobile wizard steps.
|
|
1135
|
+
* Use inside a full-height flex column so it stays at the foot of the viewport.
|
|
1136
|
+
*/
|
|
1137
|
+
declare function StickyActionBar({ children, secondary, className, ...props }: StickyActionBarProps): react.JSX.Element;
|
|
1138
|
+
|
|
1139
|
+
type StatusTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
1140
|
+
type StatusBadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
1141
|
+
label: string;
|
|
1142
|
+
tone?: StatusTone;
|
|
1143
|
+
};
|
|
1144
|
+
/** Shared status chip for list cells and detail headers. */
|
|
1145
|
+
declare function StatusBadge({ label, tone, className, ...props }: StatusBadgeProps): react.JSX.Element;
|
|
1146
|
+
|
|
1147
|
+
type DetailFact = {
|
|
1148
|
+
label: string;
|
|
1149
|
+
value?: ReactNode;
|
|
1150
|
+
};
|
|
1151
|
+
type DetailHeaderProps = {
|
|
1152
|
+
title: string;
|
|
1153
|
+
badge?: ReactNode;
|
|
1154
|
+
subtitle?: ReactNode;
|
|
1155
|
+
/** Key facts rendered as a DataList under the title row. */
|
|
1156
|
+
facts?: DetailFact[];
|
|
1157
|
+
/** Empty placeholder for fact values. Default: "—" */
|
|
1158
|
+
factsEmpty?: ReactNode;
|
|
1159
|
+
primaryAction?: ReactNode;
|
|
1160
|
+
/** Secondary actions beside the primary (callers typically pass ≤2). */
|
|
1161
|
+
secondaryActions?: ReactNode[];
|
|
1162
|
+
/** Overflow menu items (DropdownMenuItem children). */
|
|
1163
|
+
moreMenu?: ReactNode;
|
|
1164
|
+
moreLabel?: string;
|
|
1165
|
+
/** Optional tab strip (caller usually passes NavTabs). */
|
|
1166
|
+
tabs?: ReactNode;
|
|
1167
|
+
className?: string;
|
|
1168
|
+
};
|
|
1169
|
+
/**
|
|
1170
|
+
* Shared detail page chrome: title, status, facts, and action hierarchy.
|
|
1171
|
+
*/
|
|
1172
|
+
declare function DetailHeader({ title, badge, subtitle, facts, factsEmpty, primaryAction, secondaryActions, moreMenu, moreLabel, tabs, className, }: DetailHeaderProps): react.JSX.Element;
|
|
1173
|
+
|
|
1174
|
+
type FormSectionProps = HTMLAttributes<HTMLElement> & {
|
|
1175
|
+
title: string;
|
|
1176
|
+
description?: string;
|
|
1177
|
+
children: ReactNode;
|
|
1178
|
+
/** Extra content beside the title (e.g. a counter). */
|
|
1179
|
+
aside?: ReactNode;
|
|
1180
|
+
};
|
|
1181
|
+
/**
|
|
1182
|
+
* Labeled form section with a short reason and a one→two column field grid.
|
|
1183
|
+
*/
|
|
1184
|
+
declare function FormSection({ title, description, children, aside, className, ...props }: FormSectionProps): react.JSX.Element;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Registers `beforeunload` while `dirty` is true.
|
|
1188
|
+
* App Router cannot block in-app navigation; pair with confirms on controlled links.
|
|
1189
|
+
*/
|
|
1190
|
+
declare function useDirtyGuard(dirty: boolean): void;
|
|
1191
|
+
|
|
1192
|
+
type WizardLayoutProps = {
|
|
1193
|
+
steps: readonly StepProgressSegment[];
|
|
1194
|
+
current: number;
|
|
1195
|
+
children: ReactNode;
|
|
1196
|
+
onBack?: () => void;
|
|
1197
|
+
onNext?: () => void;
|
|
1198
|
+
backLabel?: string;
|
|
1199
|
+
nextLabel?: string;
|
|
1200
|
+
nextDisabled?: boolean;
|
|
1201
|
+
pending?: boolean;
|
|
1202
|
+
/** Replaces the default Back button. */
|
|
1203
|
+
secondary?: ReactNode;
|
|
1204
|
+
/** Replaces the default Continue button. */
|
|
1205
|
+
primary?: ReactNode;
|
|
1206
|
+
progressLabel?: string;
|
|
1207
|
+
className?: string;
|
|
1208
|
+
};
|
|
1209
|
+
/**
|
|
1210
|
+
* Composes StepProgress + content + StickyActionBar for multi-step flows.
|
|
1211
|
+
*/
|
|
1212
|
+
declare function WizardLayout({ steps, current, children, onBack, onNext, backLabel, nextLabel, nextDisabled, pending, secondary, primary, progressLabel, className, }: WizardLayoutProps): react.JSX.Element;
|
|
1213
|
+
type SectionSummaryProps = {
|
|
1214
|
+
title: string;
|
|
1215
|
+
children: ReactNode;
|
|
1216
|
+
editLabel?: string;
|
|
1217
|
+
onEdit?: () => void;
|
|
1218
|
+
className?: string;
|
|
1219
|
+
};
|
|
1220
|
+
/** Review-step card with an Edit affordance that jumps back to a prior step. */
|
|
1221
|
+
declare function SectionSummary({ title, children, editLabel, onEdit, className, }: SectionSummaryProps): react.JSX.Element;
|
|
1222
|
+
|
|
1223
|
+
type QueueLayoutProps = {
|
|
1224
|
+
list: ReactNode;
|
|
1225
|
+
review: ReactNode;
|
|
1226
|
+
/** Shown in the review pane when nothing is selected. */
|
|
1227
|
+
emptyReview?: ReactNode;
|
|
1228
|
+
selectedId?: string | null;
|
|
1229
|
+
/** Accessible name for the split region. */
|
|
1230
|
+
"aria-label"?: string;
|
|
1231
|
+
className?: string;
|
|
1232
|
+
/** Optional shortcut hint under the list (e.g. "j / k to move"). */
|
|
1233
|
+
shortcutHint?: string;
|
|
1234
|
+
};
|
|
1235
|
+
/**
|
|
1236
|
+
* Split review queue: list left, review right. Stacks below `lg`.
|
|
1237
|
+
*/
|
|
1238
|
+
declare function QueueLayout({ list, review, emptyReview, selectedId, "aria-label": ariaLabel, className, shortcutHint, }: QueueLayoutProps): react.JSX.Element;
|
|
1239
|
+
type UseQueueKeysOptions = {
|
|
1240
|
+
enabled?: boolean;
|
|
1241
|
+
ids: readonly string[];
|
|
1242
|
+
selectedId: string | null | undefined;
|
|
1243
|
+
onSelect: (id: string | null) => void;
|
|
1244
|
+
};
|
|
1245
|
+
/**
|
|
1246
|
+
* `j` / `k` move selection, `Enter` keeps selection (focus review), `Esc` clears.
|
|
1247
|
+
* Ignored while typing in inputs or when a dialog is focused.
|
|
1248
|
+
*/
|
|
1249
|
+
declare function useQueueKeys({ enabled, ids, selectedId, onSelect, }: UseQueueKeysOptions): void;
|
|
1250
|
+
/** Optional helper for list rows that should advance with Enter. */
|
|
1251
|
+
declare function queueRowKeyDown(event: KeyboardEvent, onOpen: () => void): void;
|
|
1252
|
+
|
|
1253
|
+
type SectionCardTone = "default" | "danger";
|
|
1254
|
+
type SectionCardProps = {
|
|
1255
|
+
id: string;
|
|
1256
|
+
title: string;
|
|
1257
|
+
description?: string;
|
|
1258
|
+
badge?: ReactNode;
|
|
1259
|
+
headerAction?: ReactNode;
|
|
1260
|
+
footer?: ReactNode;
|
|
1261
|
+
children: ReactNode;
|
|
1262
|
+
tone?: SectionCardTone;
|
|
1263
|
+
className?: string;
|
|
1264
|
+
/** Skip entrance motion (useful in tests). */
|
|
1265
|
+
animate?: boolean;
|
|
1266
|
+
};
|
|
1267
|
+
/**
|
|
1268
|
+
* Settings / account section card with optional danger tone.
|
|
1269
|
+
* Motion honors prefers-reduced-motion via framer-motion.
|
|
1270
|
+
*/
|
|
1271
|
+
declare function SectionCard({ id, title, description, badge, headerAction, footer, children, tone, className, animate, }: SectionCardProps): react.JSX.Element;
|
|
1272
|
+
|
|
1273
|
+
type SectionNavItem = {
|
|
1274
|
+
id: string;
|
|
1275
|
+
label: string;
|
|
1276
|
+
};
|
|
1277
|
+
type UseSectionNavResult = {
|
|
1278
|
+
active: string;
|
|
1279
|
+
scrollToSection: (id: string) => void;
|
|
1280
|
+
};
|
|
1281
|
+
/**
|
|
1282
|
+
* IntersectionObserver-backed active section for a long settings page.
|
|
1283
|
+
*/
|
|
1284
|
+
declare function useSectionNav(sections: readonly SectionNavItem[]): UseSectionNavResult;
|
|
1285
|
+
type SectionNavListProps = {
|
|
1286
|
+
sections: readonly SectionNavItem[];
|
|
1287
|
+
active: string;
|
|
1288
|
+
onSelect: (id: string) => void;
|
|
1289
|
+
/** Localized accessible name for the nav landmark. */
|
|
1290
|
+
ariaLabel: string;
|
|
1291
|
+
className?: string;
|
|
1292
|
+
layout: "mobile" | "desktop";
|
|
1293
|
+
};
|
|
1294
|
+
declare function SectionNavList({ sections, active, onSelect, ariaLabel, className, layout, }: SectionNavListProps): react.JSX.Element;
|
|
1295
|
+
type SectionNavProps = {
|
|
1296
|
+
sections: readonly SectionNavItem[];
|
|
1297
|
+
ariaLabel: string;
|
|
1298
|
+
className?: string;
|
|
1299
|
+
};
|
|
1300
|
+
/**
|
|
1301
|
+
* Responsive settings section nav: chip strip on small screens, sticky list on md+.
|
|
1302
|
+
*/
|
|
1303
|
+
declare function SectionNav({ sections, ariaLabel, className, }: SectionNavProps): react.JSX.Element;
|
|
1304
|
+
|
|
1305
|
+
type SettingRowProps = {
|
|
1306
|
+
label: string;
|
|
1307
|
+
description?: string;
|
|
1308
|
+
control: ReactNode;
|
|
1309
|
+
className?: string;
|
|
1310
|
+
htmlFor?: string;
|
|
1311
|
+
};
|
|
1312
|
+
/**
|
|
1313
|
+
* Settings row: label + description on the left, control on the right.
|
|
1314
|
+
*/
|
|
1315
|
+
declare function SettingRow({ label, description, control, className, htmlFor, }: SettingRowProps): react.JSX.Element;
|
|
1004
1316
|
|
|
1005
1317
|
type LegalMarkdownProps = {
|
|
1006
1318
|
markdown: string;
|
|
1007
1319
|
className?: string;
|
|
1008
1320
|
};
|
|
1009
|
-
declare function LegalMarkdown({ markdown, className }: LegalMarkdownProps):
|
|
1321
|
+
declare function LegalMarkdown({ markdown, className }: LegalMarkdownProps): react.JSX.Element;
|
|
1010
1322
|
|
|
1011
1323
|
type AuditActor = {
|
|
1012
1324
|
kind: string;
|
|
@@ -1038,9 +1350,11 @@ type AuditTimelineProps = {
|
|
|
1038
1350
|
/** Single primary action shown only when the timeline is empty. */
|
|
1039
1351
|
emptyAction?: ReactNode;
|
|
1040
1352
|
className?: string;
|
|
1353
|
+
/** BCP 47 locale for the default formatter (next-intl). Default: `en`. */
|
|
1354
|
+
locale?: string;
|
|
1041
1355
|
formatOccurredAt?: (occurredAt: number) => string;
|
|
1042
1356
|
};
|
|
1043
|
-
declare function AuditTimeline({ items, labels, emptyAction, className, formatOccurredAt: format, }: AuditTimelineProps):
|
|
1357
|
+
declare function AuditTimeline({ items, labels, emptyAction, className, locale, formatOccurredAt: format, }: AuditTimelineProps): react.JSX.Element;
|
|
1044
1358
|
|
|
1045
1359
|
type RiskSeverity = "low" | "medium" | "high";
|
|
1046
1360
|
type RiskBadgeLabels = {
|
|
@@ -1057,7 +1371,7 @@ type RiskBadgeProps = {
|
|
|
1057
1371
|
labels?: Partial<RiskBadgeLabels>;
|
|
1058
1372
|
className?: string;
|
|
1059
1373
|
};
|
|
1060
|
-
declare function RiskBadge({ severity, smeVerified, labels, className, }: RiskBadgeProps):
|
|
1374
|
+
declare function RiskBadge({ severity, smeVerified, labels, className, }: RiskBadgeProps): react.JSX.Element;
|
|
1061
1375
|
|
|
1062
1376
|
type EntityGraphNode = {
|
|
1063
1377
|
id: string;
|
|
@@ -1086,7 +1400,7 @@ type EntityGraphProps = {
|
|
|
1086
1400
|
emptyAction?: ReactNode;
|
|
1087
1401
|
className?: string;
|
|
1088
1402
|
};
|
|
1089
|
-
declare function EntityGraph({ nodes, edges, labels, emptyAction, className, }: EntityGraphProps):
|
|
1403
|
+
declare function EntityGraph({ nodes, edges, labels, emptyAction, className, }: EntityGraphProps): react.JSX.Element;
|
|
1090
1404
|
|
|
1091
1405
|
type MatchReviewSource = {
|
|
1092
1406
|
url: string;
|
|
@@ -1127,6 +1441,6 @@ type MatchReviewProps = {
|
|
|
1127
1441
|
};
|
|
1128
1442
|
declare function sourceUrlIsHttps(url: string): boolean;
|
|
1129
1443
|
declare function matchClaimIsUnverified(hit: MatchReviewHit): boolean;
|
|
1130
|
-
declare function MatchReview({ hit, onResolve, labels, sourceLabels, emptyAction, className, }: MatchReviewProps):
|
|
1444
|
+
declare function MatchReview({ hit, onResolve, labels, sourceLabels, emptyAction, className, }: MatchReviewProps): react.JSX.Element;
|
|
1131
1445
|
|
|
1132
|
-
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, 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, 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, PaginatedCombobox, type PaginatedComboboxItem, type PaginatedComboboxLabels, type PaginatedComboboxProps, 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, countryLabel, countryPickerItems, createMultipartUploadController, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, isKnownCountryCode, matchClaimIsUnverified, partRanges, progressFromBytes, renderShellLink, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useEditableSection, useLanguageContext, useMediaQuery };
|
|
1446
|
+
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_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, 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 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 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, type PersonKindForRfc, QueueLayout, type QueueLayoutProps, RfcInput, type RfcInputProps, type RfcValidationError, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, 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, 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, type UseQueueKeysOptions, type UseSectionNavResult, WizardLayout, type WizardLayoutProps, cn, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, partRanges, progressFromBytes, queueRowKeyDown, renderShellLink, rfcMaxLengthForPersonKind, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind };
|