@yenio-pld/blocks 1.2.0-rc.7 → 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 +3358 -1840
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +364 -12
- package/dist/index.d.ts +364 -12
- package/dist/index.js +3293 -1803
- package/dist/index.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/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.ts
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';
|
|
@@ -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,7 +135,7 @@ 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): react.JSX.Element;
|
|
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;
|
|
@@ -129,6 +144,8 @@ 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[];
|
|
@@ -238,6 +255,7 @@ declare function DashboardSkeleton({ label }: {
|
|
|
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;
|
|
@@ -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): react.JSX.Element;
|
|
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;
|
|
@@ -481,15 +502,18 @@ declare function FieldMessage({ id, children, className, ...props }: FieldMessag
|
|
|
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 */
|
|
@@ -632,6 +656,112 @@ type CountryPickerProps = {
|
|
|
632
656
|
};
|
|
633
657
|
declare function CountryPicker({ value, onValueChange, purpose, locale, id, name, disabled, required, allowEmpty, className, labels: labelsProp, "aria-invalid": ariaInvalid, }: CountryPickerProps): react.JSX.Element;
|
|
634
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;
|
|
690
|
+
|
|
691
|
+
type PaginatedComboboxItem = {
|
|
692
|
+
value: string;
|
|
693
|
+
label: string;
|
|
694
|
+
secondary?: string;
|
|
695
|
+
};
|
|
696
|
+
type PaginatedComboboxLabels = {
|
|
697
|
+
ariaLabel?: string;
|
|
698
|
+
placeholder?: string;
|
|
699
|
+
noResults?: string;
|
|
700
|
+
clear?: string;
|
|
701
|
+
open?: string;
|
|
702
|
+
loadMore?: string;
|
|
703
|
+
loading?: string;
|
|
704
|
+
};
|
|
705
|
+
type PaginatedComboboxProps = {
|
|
706
|
+
value: string;
|
|
707
|
+
onValueChange: (value: string, item: PaginatedComboboxItem | null) => void;
|
|
708
|
+
items: PaginatedComboboxItem[];
|
|
709
|
+
/** Label for the current value when it is not in the loaded page. */
|
|
710
|
+
selectedItem?: PaginatedComboboxItem | null;
|
|
711
|
+
onQueryChange: (query: string) => void;
|
|
712
|
+
loading?: boolean;
|
|
713
|
+
loadingMore?: boolean;
|
|
714
|
+
nextCursor?: string | null;
|
|
715
|
+
onLoadMore?: () => void;
|
|
716
|
+
onOpenChange?: (open: boolean) => void;
|
|
717
|
+
debounceMs?: number;
|
|
718
|
+
id?: string;
|
|
719
|
+
name?: string;
|
|
720
|
+
disabled?: boolean;
|
|
721
|
+
required?: boolean;
|
|
722
|
+
allowEmpty?: boolean;
|
|
723
|
+
className?: string;
|
|
724
|
+
labels?: PaginatedComboboxLabels;
|
|
725
|
+
"aria-invalid"?: boolean;
|
|
726
|
+
};
|
|
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;
|
|
764
|
+
|
|
635
765
|
type AvatarEditorLabels = {
|
|
636
766
|
uploadAria?: string;
|
|
637
767
|
uploadHint?: string;
|
|
@@ -763,13 +893,15 @@ declare const DEFAULT_FILE_UPLOAD_LABELS: {
|
|
|
763
893
|
type FileDropzoneProps = {
|
|
764
894
|
accept?: string;
|
|
765
895
|
maxSize?: number;
|
|
896
|
+
/** When true, drop/browse can accept several files; `onFile` runs once per file. */
|
|
897
|
+
multiple?: boolean;
|
|
766
898
|
disabled?: boolean;
|
|
767
899
|
labels?: Partial<FileDropzoneLabels>;
|
|
768
900
|
onFile: (file: File) => void;
|
|
769
901
|
onReject?: (reason: "type" | "size") => void;
|
|
770
902
|
className?: string;
|
|
771
903
|
};
|
|
772
|
-
declare function FileDropzone({ accept, maxSize, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): react.JSX.Element;
|
|
904
|
+
declare function FileDropzone({ accept, maxSize, multiple, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): react.JSX.Element;
|
|
773
905
|
|
|
774
906
|
type FileUploadTrayProps = {
|
|
775
907
|
jobs: UploadJob[];
|
|
@@ -964,6 +1096,224 @@ type LegalAcceptCheckboxProps = {
|
|
|
964
1096
|
};
|
|
965
1097
|
declare function LegalAcceptCheckbox({ id, checked, onCheckedChange, termsHref, privacyHref, labels, disabled, className, }: LegalAcceptCheckboxProps): react.JSX.Element;
|
|
966
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;
|
|
1316
|
+
|
|
967
1317
|
type LegalMarkdownProps = {
|
|
968
1318
|
markdown: string;
|
|
969
1319
|
className?: string;
|
|
@@ -1000,9 +1350,11 @@ type AuditTimelineProps = {
|
|
|
1000
1350
|
/** Single primary action shown only when the timeline is empty. */
|
|
1001
1351
|
emptyAction?: ReactNode;
|
|
1002
1352
|
className?: string;
|
|
1353
|
+
/** BCP 47 locale for the default formatter (next-intl). Default: `en`. */
|
|
1354
|
+
locale?: string;
|
|
1003
1355
|
formatOccurredAt?: (occurredAt: number) => string;
|
|
1004
1356
|
};
|
|
1005
|
-
declare function AuditTimeline({ items, labels, emptyAction, className, formatOccurredAt: format, }: AuditTimelineProps): react.JSX.Element;
|
|
1357
|
+
declare function AuditTimeline({ items, labels, emptyAction, className, locale, formatOccurredAt: format, }: AuditTimelineProps): react.JSX.Element;
|
|
1006
1358
|
|
|
1007
1359
|
type RiskSeverity = "low" | "medium" | "high";
|
|
1008
1360
|
type RiskBadgeLabels = {
|
|
@@ -1091,4 +1443,4 @@ declare function sourceUrlIsHttps(url: string): boolean;
|
|
|
1091
1443
|
declare function matchClaimIsUnverified(hit: MatchReviewHit): boolean;
|
|
1092
1444
|
declare function MatchReview({ hit, onResolve, labels, sourceLabels, emptyAction, className, }: MatchReviewProps): react.JSX.Element;
|
|
1093
1445
|
|
|
1094
|
-
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, 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 };
|