@cmgfi/clear-ds 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2296 -0
- package/dist/index.mjs +6065 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +58 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2296 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
3
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { ReactPortal } from 'react';
|
|
6
|
+
import { RefAttributes } from 'react';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Accordion — Clear Design System
|
|
10
|
+
*
|
|
11
|
+
* Collapsible content panels. Fully controlled — pass `openIds` + `onChange`.
|
|
12
|
+
* Four visual variants: `simple` (teal underline), `page`, `panel`, `flyout`
|
|
13
|
+
* (all three use a light gray header).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const [open, setOpen] = useState(['item1']);
|
|
17
|
+
* <Accordion
|
|
18
|
+
* variant="page"
|
|
19
|
+
* items={[
|
|
20
|
+
* { id: 'item1', title: 'Borrower', content: <BorrowerForm /> },
|
|
21
|
+
* { id: 'item2', title: 'Property', content: <PropertyForm /> },
|
|
22
|
+
* ]}
|
|
23
|
+
* openIds={open}
|
|
24
|
+
* onChange={setOpen}
|
|
25
|
+
* />
|
|
26
|
+
*/
|
|
27
|
+
export declare const Accordion: ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>>;
|
|
28
|
+
|
|
29
|
+
export declare interface AccordionItem {
|
|
30
|
+
/** Unique identifier. */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Header title text. */
|
|
33
|
+
title: string;
|
|
34
|
+
/** Panel body — any ReactNode, including tables, forms, etc. */
|
|
35
|
+
content: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Optional count badge shown next to the title.
|
|
38
|
+
* Visible in `panel` and `flyout` variants only.
|
|
39
|
+
*/
|
|
40
|
+
badge?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Optional action slot rendered between the title and the chevron.
|
|
43
|
+
* Primarily used in the `simple` variant (e.g. a checkbox + label).
|
|
44
|
+
*/
|
|
45
|
+
headerAction?: React.ReactNode;
|
|
46
|
+
/** Prevents toggling when true. */
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare interface AccordionProps {
|
|
51
|
+
/** Array of accordion items. */
|
|
52
|
+
items: AccordionItem[];
|
|
53
|
+
/**
|
|
54
|
+
* Visual variant.
|
|
55
|
+
* - `simple` — transparent header, teal-700 bottom border + title
|
|
56
|
+
* - `page` — full-width section, gray `#e4e4e4` bg, top-rounded header
|
|
57
|
+
* - `panel` — compact gray `#f4f4f5` header, 32px height, optional badge
|
|
58
|
+
* - `flyout` — medium gray `#f4f4f5` header, 44px height, optional badge
|
|
59
|
+
* @default 'page'
|
|
60
|
+
*/
|
|
61
|
+
variant?: AccordionVariant;
|
|
62
|
+
/**
|
|
63
|
+
* IDs of currently open items (controlled).
|
|
64
|
+
* When `multiple` is false, at most one ID should be present.
|
|
65
|
+
*/
|
|
66
|
+
openIds: string[];
|
|
67
|
+
/** Called with the new set of open IDs when the user toggles an item. */
|
|
68
|
+
onChange: (ids: string[]) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Allow multiple panels open simultaneously.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
multiple?: boolean;
|
|
74
|
+
className?: string;
|
|
75
|
+
style?: React.CSSProperties;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare type AccordionVariant = 'simple' | 'page' | 'panel' | 'flyout';
|
|
79
|
+
|
|
80
|
+
export declare type AlertSeverity = 'success' | 'info' | 'warn' | 'error';
|
|
81
|
+
|
|
82
|
+
export declare function AUSChip({ label, color }: AUSChipProps): JSX_2.Element;
|
|
83
|
+
|
|
84
|
+
export declare namespace AUSChip {
|
|
85
|
+
var displayName: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare type AUSChipColor = 'green' | 'red' | 'yellow' | 'grey';
|
|
89
|
+
|
|
90
|
+
export declare interface AUSChipProps {
|
|
91
|
+
label: string;
|
|
92
|
+
/** AUS finding color — maps to standard severity tokens. */
|
|
93
|
+
color: AUSChipColor;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare type BadgeShape = 'square' | 'diamond' | 'circle';
|
|
97
|
+
|
|
98
|
+
export declare function BannerAlert({ severity, title, detail, closable, onClose }: BannerAlertProps): JSX_2.Element;
|
|
99
|
+
|
|
100
|
+
export declare namespace BannerAlert {
|
|
101
|
+
var displayName: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export declare interface BannerAlertProps {
|
|
105
|
+
severity: BannerAlertSeverity;
|
|
106
|
+
/** Bold heading text */
|
|
107
|
+
title: string;
|
|
108
|
+
/** Optional supporting detail shown after the title */
|
|
109
|
+
detail?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Whether a dismiss (✕) button is shown.
|
|
112
|
+
* @default true
|
|
113
|
+
*/
|
|
114
|
+
closable?: boolean;
|
|
115
|
+
onClose?: () => void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export declare type BannerAlertSeverity = 'success' | 'info' | 'warn' | 'error' | 'neutral';
|
|
119
|
+
|
|
120
|
+
export declare interface BannerTabBadge {
|
|
121
|
+
/** The number shown inside the badge. */
|
|
122
|
+
count: number;
|
|
123
|
+
/** Tooltip text revealed on hover. */
|
|
124
|
+
tooltip: string;
|
|
125
|
+
/**
|
|
126
|
+
* Shape of the badge.
|
|
127
|
+
* Defaults per position: 0 → square, 1 → diamond, 2 → circle.
|
|
128
|
+
*/
|
|
129
|
+
shape?: BadgeShape;
|
|
130
|
+
/**
|
|
131
|
+
* CSS color value for the badge fill.
|
|
132
|
+
* Defaults per position: 0 → --red-500, 1 → --yellow-500, 2 → --green-300.
|
|
133
|
+
* When count is 0, always renders in muted gray regardless of this value.
|
|
134
|
+
*/
|
|
135
|
+
color?: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export declare interface BannerTabBadgeGroup {
|
|
139
|
+
/** Ordered list of badge definitions within this group. */
|
|
140
|
+
badges: BannerTabBadge[];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare interface BannerTabItem {
|
|
144
|
+
/** Unique identifier. */
|
|
145
|
+
id: string;
|
|
146
|
+
/** Primary label ("DU", "Loan Summary"). */
|
|
147
|
+
label: string;
|
|
148
|
+
/** Secondary label after "/" ("LPA" in "DU / LPA"). */
|
|
149
|
+
subLabel?: string;
|
|
150
|
+
/** Muted status line ("Not Complete", "Rep. Score 732"). */
|
|
151
|
+
subtitle: string;
|
|
152
|
+
/** Primary status indicator shape + color. */
|
|
153
|
+
status: BannerTabStatus;
|
|
154
|
+
/** Secondary status indicator (used alongside subLabel). */
|
|
155
|
+
subStatus?: BannerTabStatus;
|
|
156
|
+
/** Shows a lock icon after the label. */
|
|
157
|
+
locked?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* One or more groups of count badges rendered below the subtitle.
|
|
160
|
+
* Multiple groups are separated by a pipe ( | ).
|
|
161
|
+
* Each badge defaults to square/diamond/circle with red/yellow/green fills
|
|
162
|
+
* by position — override per badge with `shape` and `color`.
|
|
163
|
+
*/
|
|
164
|
+
badgeGroups?: BannerTabBadgeGroup[];
|
|
165
|
+
/** Custom docs/badge row rendered at the bottom of the card. */
|
|
166
|
+
docs?: React.ReactNode;
|
|
167
|
+
/** Prevents interaction when true. */
|
|
168
|
+
disabled?: boolean;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* BannerTabs — Clear Design System
|
|
173
|
+
*
|
|
174
|
+
* Scrollable horizontal strip of card-shaped navigation tabs. Each card shows
|
|
175
|
+
* a status indicator, primary label, optional secondary label, a muted
|
|
176
|
+
* subtitle, and optional count badge groups. Overflow is handled with
|
|
177
|
+
* left/right arrow buttons and a fade gradient on the right edge.
|
|
178
|
+
*
|
|
179
|
+
* Fully controlled — the parent owns which tab is active.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* const [active, setActive] = useState('loan-summary');
|
|
183
|
+
* <BannerTabs items={loanStages} activeId={active} onChange={setActive} />
|
|
184
|
+
*/
|
|
185
|
+
export declare const BannerTabs: ForwardRefExoticComponent<BannerTabsProps & RefAttributes<HTMLDivElement>>;
|
|
186
|
+
|
|
187
|
+
export declare interface BannerTabsProps {
|
|
188
|
+
/** Array of banner tab definitions. */
|
|
189
|
+
items: BannerTabItem[];
|
|
190
|
+
/** Controlled: id of the active item, or null for none. */
|
|
191
|
+
activeId: string | null;
|
|
192
|
+
/** Called with the id when the user selects a tab. */
|
|
193
|
+
onChange: (id: string) => void;
|
|
194
|
+
className?: string;
|
|
195
|
+
style?: React.CSSProperties;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare interface BannerTabStatus {
|
|
199
|
+
shape: StatusShape;
|
|
200
|
+
color: StatusColor;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Button — Clear Design System
|
|
205
|
+
*
|
|
206
|
+
* A versatile action button with five visual variants, two sizes, optional
|
|
207
|
+
* leading/trailing icons, and an optional notification badge.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* <Button>Submit</Button>
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* <Button variant="secondary" size="sm">Cancel</Button>
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* <Button variant="danger" leadingIcon={<i className="pi pi-trash" />}>Delete</Button>
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* <Button badge={3} trailingIcon={<i className="pi pi-chevron-down" />}>Actions</Button>
|
|
220
|
+
*/
|
|
221
|
+
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
222
|
+
|
|
223
|
+
export declare interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
224
|
+
/** Visual style. Defaults to `'primary'`. */
|
|
225
|
+
variant?: ButtonVariant;
|
|
226
|
+
/** Size. `md` = 40px height / 15px font (default). `sm` = 24px height / 10px font. */
|
|
227
|
+
size?: ButtonSize;
|
|
228
|
+
/** Icon rendered before the label. Pass any React node (e.g. a PrimeIcon). */
|
|
229
|
+
leadingIcon?: React.ReactNode;
|
|
230
|
+
/** Icon rendered after the label. */
|
|
231
|
+
trailingIcon?: React.ReactNode;
|
|
232
|
+
/**
|
|
233
|
+
* Red notification badge shown after the label.
|
|
234
|
+
* Pass a number or short string (e.g. `5` or `"99+"`).
|
|
235
|
+
*/
|
|
236
|
+
badge?: string | number;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export declare type ButtonSize = 'md' | 'sm';
|
|
240
|
+
|
|
241
|
+
export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'link';
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Card — Clear Design System
|
|
245
|
+
*
|
|
246
|
+
* A surface container with consistent border, radius, and padding. Optionally
|
|
247
|
+
* renders a title, subtitle, body content, and a footer action area.
|
|
248
|
+
* All sections are optional — use what you need.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* // Standard card
|
|
252
|
+
* <Card title="Loan Summary" subTitle="Application #12345" footer={<Button>View</Button>}>
|
|
253
|
+
* <p>Body content goes here.</p>
|
|
254
|
+
* </Card>
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* // Content-only container (no header or footer)
|
|
258
|
+
* <Card><DataTable ... /></Card>
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* // Interactive / clickable card
|
|
262
|
+
* <Card title="Open Application" onClick={() => navigate('/app/123')}>
|
|
263
|
+
* <p>Click anywhere to open.</p>
|
|
264
|
+
* </Card>
|
|
265
|
+
*/
|
|
266
|
+
export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
|
|
267
|
+
|
|
268
|
+
export declare interface CardProps {
|
|
269
|
+
/** Bold primary title rendered at the top of the card. */
|
|
270
|
+
title?: React.ReactNode;
|
|
271
|
+
/** Muted subtitle rendered below the title. */
|
|
272
|
+
subTitle?: React.ReactNode;
|
|
273
|
+
/**
|
|
274
|
+
* Action area rendered at the bottom of the card.
|
|
275
|
+
* Typically contains buttons or links.
|
|
276
|
+
*/
|
|
277
|
+
footer?: React.ReactNode;
|
|
278
|
+
/** Card body content. Accepts any ReactNode. */
|
|
279
|
+
children?: React.ReactNode;
|
|
280
|
+
/**
|
|
281
|
+
* Makes the entire card interactive — adds a pointer cursor and a subtle
|
|
282
|
+
* shadow lift on hover. Pass a handler to opt into this mode.
|
|
283
|
+
*/
|
|
284
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
285
|
+
className?: string;
|
|
286
|
+
style?: React.CSSProperties;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Checkbox — Clear Design System
|
|
291
|
+
*
|
|
292
|
+
* A fully accessible checkbox with label, indeterminate, invalid, and disabled states.
|
|
293
|
+
* Three sizes (sm, md, lg) follow the type scale.
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* <Checkbox label="Remember me" />
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* <Checkbox label="Agree to terms" checked={agreed} onChange={(e) => setAgreed(e.target.checked)} />
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* <Checkbox label="Select all" indeterminate />
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* <Checkbox label="Accept terms" invalid helperText="You must accept the terms to continue." />
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* <Checkbox label="Dense option" size="sm" />
|
|
309
|
+
*/
|
|
310
|
+
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
311
|
+
|
|
312
|
+
export declare interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'children' | 'size'> {
|
|
313
|
+
/** The visible label next to the checkbox. */
|
|
314
|
+
label?: React.ReactNode;
|
|
315
|
+
/** When true, renders a dash instead of a checkmark (useful for "select all" patterns). */
|
|
316
|
+
indeterminate?: boolean;
|
|
317
|
+
/** Shows the invalid/error state with red border and label. */
|
|
318
|
+
invalid?: boolean;
|
|
319
|
+
/** Helper text shown below the checkbox. Shown in red when `invalid` is true. */
|
|
320
|
+
helperText?: string;
|
|
321
|
+
/** Size variant. sm = 14px box / 10px label, md = 18px box / 12px label (default), lg = 22px box / 14px label. */
|
|
322
|
+
size?: 'sm' | 'md' | 'lg';
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* CloseButton — Clear Design System
|
|
327
|
+
*
|
|
328
|
+
* A circular ghost button with a built-in ✕ icon. Use to dismiss modals,
|
|
329
|
+
* panels, toasts, tags, or any overlay. Requires an `aria-label` for
|
|
330
|
+
* screen-reader context (defaults to `"Close"`).
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* <CloseButton onClick={onClose} />
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* <CloseButton aria-label="Close dialog" size="md" onClick={onClose} />
|
|
337
|
+
*/
|
|
338
|
+
export declare const CloseButton: ForwardRefExoticComponent<CloseButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
339
|
+
|
|
340
|
+
export declare interface CloseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
341
|
+
/**
|
|
342
|
+
* Accessible label. Defaults to `"Close"`. Override when the button
|
|
343
|
+
* closes something specific, e.g. `aria-label="Close dialog"`.
|
|
344
|
+
*/
|
|
345
|
+
'aria-label'?: string;
|
|
346
|
+
/** Size variant. `sm` = 24×24px (default). `md` = 40×40px. */
|
|
347
|
+
size?: 'sm' | 'md';
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export declare interface ColumnFilter {
|
|
351
|
+
/** Determines which filter UI to render. */
|
|
352
|
+
type: FilterType;
|
|
353
|
+
/** Options for `'checklist'` type. */
|
|
354
|
+
options?: FilterOption[];
|
|
355
|
+
/** Grouped options for `'grouped-checklist'` type. */
|
|
356
|
+
groups?: FilterGroup[];
|
|
357
|
+
/** Controlled filter value. Format depends on type. */
|
|
358
|
+
value?: unknown;
|
|
359
|
+
/** Called with the new value when the user clicks Apply. */
|
|
360
|
+
onChange?: (value: unknown) => void;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* DataTable — Clear Design System
|
|
365
|
+
*
|
|
366
|
+
* A full-featured data grid with sortable/filterable columns, row selection,
|
|
367
|
+
* expandable row groups, nested row expansion, and inline row/cell editing.
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* <DataTable
|
|
371
|
+
* data={loans}
|
|
372
|
+
* dataKey="id"
|
|
373
|
+
* columns={[
|
|
374
|
+
* { field: 'borrower', header: 'Borrower', sortable: true },
|
|
375
|
+
* { field: 'amount', header: 'Amount', body: (row) => formatCurrency(row.amount) },
|
|
376
|
+
* ]}
|
|
377
|
+
* />
|
|
378
|
+
*/
|
|
379
|
+
export declare function DataTable<T extends object = Record<string, unknown>>({ data, columns, dataKey, selectionMode, selection, onSelectionChange, sortMode, sortField, sortOrder, multiSortMeta, onSort, expansion, editMode, onRowEditSave, onRowEditCancel, onCellEdit, stripedRows, size, showFooter, loading, emptyMessage, scrollable, scrollHeight, className, style, }: DataTableProps<T>): JSX_2.Element;
|
|
380
|
+
|
|
381
|
+
export declare namespace DataTable {
|
|
382
|
+
var displayName: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export declare interface DataTableColumn<T extends object = Record<string, unknown>> {
|
|
386
|
+
/** Data field key. */
|
|
387
|
+
field: string;
|
|
388
|
+
/** Column header content. */
|
|
389
|
+
header: React.ReactNode;
|
|
390
|
+
/** Show sort icons and make column sortable. */
|
|
391
|
+
sortable?: boolean;
|
|
392
|
+
/** Attach a filter popover to this column's header. */
|
|
393
|
+
filter?: ColumnFilter;
|
|
394
|
+
/** Custom cell renderer. Return any ReactNode. */
|
|
395
|
+
body?: (row: T, index: number) => React.ReactNode;
|
|
396
|
+
/**
|
|
397
|
+
* Editor rendered when a row/cell enters edit mode.
|
|
398
|
+
* `onChange` should be called with the new value.
|
|
399
|
+
*/
|
|
400
|
+
editor?: (row: T, field: string, onChange: (val: unknown) => void) => React.ReactNode;
|
|
401
|
+
/** Footer cell content. Pass a function to receive all data. */
|
|
402
|
+
footer?: React.ReactNode | ((data: T[]) => React.ReactNode);
|
|
403
|
+
/** Column width (px number or CSS string). */
|
|
404
|
+
width?: number | string;
|
|
405
|
+
/** Text alignment for header and cells. */
|
|
406
|
+
align?: 'left' | 'center' | 'right';
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/** Row expansion (nested rows) configuration. */
|
|
410
|
+
export declare interface DataTableExpansion<T extends object = Record<string, unknown>> {
|
|
411
|
+
/** Field used as the unique row key for tracking expanded state. */
|
|
412
|
+
dataKey: string;
|
|
413
|
+
/**
|
|
414
|
+
* Field on each row that contains an array of child rows.
|
|
415
|
+
* If provided, the expanded section renders a nested DataTable
|
|
416
|
+
* using the same columns (or `columns` if specified).
|
|
417
|
+
*/
|
|
418
|
+
childKey?: string;
|
|
419
|
+
/** Custom expansion template. Overrides the default nested table. */
|
|
420
|
+
template?: (row: T) => React.ReactNode;
|
|
421
|
+
/** Custom column set for the nested table. Defaults to parent columns. */
|
|
422
|
+
columns?: DataTableColumn<T>[];
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/** Pre-grouped data structure. */
|
|
426
|
+
export declare interface DataTableGroup<T extends object = Record<string, unknown>> {
|
|
427
|
+
/** Group header label. */
|
|
428
|
+
label: string;
|
|
429
|
+
/** Rows in this group. */
|
|
430
|
+
data: T[];
|
|
431
|
+
/** Whether the group starts expanded. Defaults to true. */
|
|
432
|
+
defaultExpanded?: boolean;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export declare interface DataTableProps<T extends object = Record<string, unknown>> {
|
|
436
|
+
/** Flat row array or pre-grouped array (`DataTableGroup<T>[]`). */
|
|
437
|
+
data: T[] | DataTableGroup<T>[];
|
|
438
|
+
/** Column definitions. */
|
|
439
|
+
columns: DataTableColumn<T>[];
|
|
440
|
+
/** Field name used as unique row identifier. Defaults to `'id'`. */
|
|
441
|
+
dataKey?: string;
|
|
442
|
+
selectionMode?: SelectionMode_2;
|
|
443
|
+
/** Controlled selection. `T` for single, `T[]` for multiple. */
|
|
444
|
+
selection?: T | T[] | null;
|
|
445
|
+
onSelectionChange?: (sel: T | T[] | null) => void;
|
|
446
|
+
sortMode?: 'single' | 'multiple';
|
|
447
|
+
sortField?: string;
|
|
448
|
+
sortOrder?: SortOrder;
|
|
449
|
+
multiSortMeta?: SortMeta[];
|
|
450
|
+
onSort?: (e: {
|
|
451
|
+
field: string;
|
|
452
|
+
order: SortOrder;
|
|
453
|
+
multiSortMeta?: SortMeta[];
|
|
454
|
+
}) => void;
|
|
455
|
+
expansion?: DataTableExpansion<T>;
|
|
456
|
+
editMode?: EditMode;
|
|
457
|
+
onRowEditSave?: (updated: T, original: T) => void;
|
|
458
|
+
onRowEditCancel?: () => void;
|
|
459
|
+
onCellEdit?: (row: T, field: string, value: unknown) => void;
|
|
460
|
+
stripedRows?: boolean;
|
|
461
|
+
/** `'sm'` = compact (6px padding). `'md'` = default (8px). */
|
|
462
|
+
size?: 'sm' | 'md';
|
|
463
|
+
showFooter?: boolean;
|
|
464
|
+
loading?: boolean;
|
|
465
|
+
emptyMessage?: React.ReactNode;
|
|
466
|
+
scrollable?: boolean;
|
|
467
|
+
scrollHeight?: string;
|
|
468
|
+
className?: string;
|
|
469
|
+
style?: React.CSSProperties;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* DatePicker — Clear Design System
|
|
474
|
+
*
|
|
475
|
+
* A date input with a popup calendar. Users can type a date directly (MM/DD/YYYY)
|
|
476
|
+
* or pick one from the calendar. Three views: day, month, and year.
|
|
477
|
+
*
|
|
478
|
+
* @example
|
|
479
|
+
* <DatePicker label="Closing date" value={date} onChange={setDate} />
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* <DatePicker label="Start date" value={date} onChange={setDate} minDate={new Date()} />
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* <DatePicker label="Date" value={date} onChange={setDate} required invalid helperText="Required." />
|
|
486
|
+
*/
|
|
487
|
+
export declare const DatePicker: ForwardRefExoticComponent<DatePickerProps & RefAttributes<HTMLDivElement>>;
|
|
488
|
+
|
|
489
|
+
export declare interface DatePickerProps {
|
|
490
|
+
/** Controlled selected date. Pass `null` to clear. */
|
|
491
|
+
value?: Date | null;
|
|
492
|
+
/** Called when the user selects or clears a date. */
|
|
493
|
+
onChange?: (date: Date | null) => void;
|
|
494
|
+
/** Label shown above the input. */
|
|
495
|
+
label?: string;
|
|
496
|
+
/** Adds a red asterisk to the label. */
|
|
497
|
+
required?: boolean;
|
|
498
|
+
/** Helper text shown below the input. Turns red when `invalid` is true. */
|
|
499
|
+
helperText?: string;
|
|
500
|
+
/** Renders the input in error state with red border and red helper text. */
|
|
501
|
+
invalid?: boolean;
|
|
502
|
+
/** Disables the entire component. */
|
|
503
|
+
disabled?: boolean;
|
|
504
|
+
/** Placeholder for the text input. Defaults to "MM/DD/YYYY". */
|
|
505
|
+
placeholder?: string;
|
|
506
|
+
/** Dates before this date are disabled in the calendar. */
|
|
507
|
+
minDate?: Date;
|
|
508
|
+
/** Dates after this date are disabled in the calendar. */
|
|
509
|
+
maxDate?: Date;
|
|
510
|
+
/** When true (default), shows ISO week numbers as the first calendar column. */
|
|
511
|
+
showWeekNumbers?: boolean;
|
|
512
|
+
id?: string;
|
|
513
|
+
className?: string;
|
|
514
|
+
style?: React.CSSProperties;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export declare const DEFAULT_DOC_TYPES: string[];
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Drawer — Clear Design System
|
|
521
|
+
*
|
|
522
|
+
* A full-height panel that slides in from the left or right edge, sitting on
|
|
523
|
+
* top of page content with a dark scrim behind it. Unlike SidePanel, Drawer
|
|
524
|
+
* does not push page content — it overlays it like a modal.
|
|
525
|
+
*
|
|
526
|
+
* The footer is always present with structured action buttons. A gradient
|
|
527
|
+
* shadow appears above the footer when the body content overflows (indicating
|
|
528
|
+
* more scrollable content below).
|
|
529
|
+
*
|
|
530
|
+
* Fully controlled — pass `isOpen` + `onClose`. Closes on ✕ click, scrim
|
|
531
|
+
* click, or Escape key.
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* const [open, setOpen] = useState(false);
|
|
535
|
+
* <Drawer
|
|
536
|
+
* isOpen={open}
|
|
537
|
+
* onClose={() => setOpen(false)}
|
|
538
|
+
* title="Review Documents"
|
|
539
|
+
* primaryAction={{ label: 'Save', onClick: handleSave }}
|
|
540
|
+
* secondaryAction={{ label: 'Cancel', onClick: () => setOpen(false) }}
|
|
541
|
+
* >
|
|
542
|
+
* <p>Drawer content here…</p>
|
|
543
|
+
* </Drawer>
|
|
544
|
+
*/
|
|
545
|
+
export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDivElement>>;
|
|
546
|
+
|
|
547
|
+
export declare interface DrawerAction {
|
|
548
|
+
/** Button label */
|
|
549
|
+
label: string;
|
|
550
|
+
/** Called when the button is clicked */
|
|
551
|
+
onClick: () => void;
|
|
552
|
+
/** Disables the button */
|
|
553
|
+
disabled?: boolean;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export declare interface DrawerProps {
|
|
557
|
+
/** Controls open/closed state */
|
|
558
|
+
isOpen: boolean;
|
|
559
|
+
/** Called when ✕ is clicked, scrim is clicked, or Escape is pressed */
|
|
560
|
+
onClose: () => void;
|
|
561
|
+
/** Panel heading */
|
|
562
|
+
title?: string;
|
|
563
|
+
/** Optional subtitle rendered below the title — any ReactNode */
|
|
564
|
+
subtitle?: React.ReactNode;
|
|
565
|
+
/** Scrollable body content */
|
|
566
|
+
children: React.ReactNode;
|
|
567
|
+
/**
|
|
568
|
+
* Required primary action (right-aligned, primary variant).
|
|
569
|
+
* Always rendered.
|
|
570
|
+
*/
|
|
571
|
+
primaryAction: DrawerAction;
|
|
572
|
+
/** Optional secondary action (right-aligned, secondary variant, left of primary) */
|
|
573
|
+
secondaryAction?: DrawerAction;
|
|
574
|
+
/**
|
|
575
|
+
* Optional tertiary actions (left-aligned, ghost variant).
|
|
576
|
+
* Multiple are supported — they appear to the left of the footer.
|
|
577
|
+
*/
|
|
578
|
+
tertiaryActions?: DrawerAction[];
|
|
579
|
+
/**
|
|
580
|
+
* Which edge the drawer slides in from.
|
|
581
|
+
* @default 'right'
|
|
582
|
+
*/
|
|
583
|
+
side?: 'left' | 'right';
|
|
584
|
+
/**
|
|
585
|
+
* Panel width in px.
|
|
586
|
+
* @default 800
|
|
587
|
+
*/
|
|
588
|
+
width?: number;
|
|
589
|
+
className?: string;
|
|
590
|
+
style?: React.CSSProperties;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* DropdownButton — Clear Design System
|
|
595
|
+
*
|
|
596
|
+
* A button that opens an action menu dropdown when clicked. Uses the same
|
|
597
|
+
* variant and size system as Button, with a built-in trailing chevron icon.
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* <DropdownButton
|
|
601
|
+
* label="Actions"
|
|
602
|
+
* items={[
|
|
603
|
+
* { label: 'Edit', value: 'edit' },
|
|
604
|
+
* { label: 'Duplicate', value: 'duplicate' },
|
|
605
|
+
* { label: 'Delete', value: 'delete' },
|
|
606
|
+
* ]}
|
|
607
|
+
* onSelect={handleAction}
|
|
608
|
+
* />
|
|
609
|
+
*
|
|
610
|
+
* @example
|
|
611
|
+
* <DropdownButton label="Export" variant="secondary" size="sm" items={exportItems} onSelect={onExport} />
|
|
612
|
+
*/
|
|
613
|
+
export declare const DropdownButton: ForwardRefExoticComponent<DropdownButtonProps & RefAttributes<HTMLDivElement>>;
|
|
614
|
+
|
|
615
|
+
export declare interface DropdownButtonItem {
|
|
616
|
+
/** Displayed label. */
|
|
617
|
+
label: string;
|
|
618
|
+
/** Unique identifier passed to `onSelect`. */
|
|
619
|
+
value: string;
|
|
620
|
+
/** Optional icon rendered before the label. */
|
|
621
|
+
icon?: React.ReactNode;
|
|
622
|
+
/** When true, the item is non-interactive and visually muted. */
|
|
623
|
+
disabled?: boolean;
|
|
624
|
+
/** When true, renders a divider line above this item. */
|
|
625
|
+
divider?: boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export declare interface DropdownButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onSelect'> {
|
|
629
|
+
/** The button label. */
|
|
630
|
+
label: string;
|
|
631
|
+
/** Menu items shown in the dropdown. */
|
|
632
|
+
items: DropdownButtonItem[];
|
|
633
|
+
/** Called when the user selects an item. */
|
|
634
|
+
onSelect?: (value: string) => void;
|
|
635
|
+
/** Visual style. Defaults to `'primary'`. */
|
|
636
|
+
variant?: ButtonVariant;
|
|
637
|
+
/** Size. Defaults to `'md'`. */
|
|
638
|
+
size?: ButtonSize;
|
|
639
|
+
/** Optional icon rendered before the label. */
|
|
640
|
+
leadingIcon?: React.ReactNode;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export declare type EditMode = 'row' | 'cell';
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* FileUpload — Clear Design System
|
|
647
|
+
*
|
|
648
|
+
* A two-step document upload widget for the mortgage workflow:
|
|
649
|
+
*
|
|
650
|
+
* 1. User drops or browses for files → `onFilesAdded` fires (consumer uploads
|
|
651
|
+
* to server); each file appears in the classification list below.
|
|
652
|
+
* 2. User selects a document type for each file (searchable dropdown).
|
|
653
|
+
* 3. When all files are classified, the Upload button activates. Clicking it
|
|
654
|
+
* calls `onUpload` with the full list and resets the component.
|
|
655
|
+
*
|
|
656
|
+
* Invalid file types show an error message below the drop zone.
|
|
657
|
+
*
|
|
658
|
+
* @example
|
|
659
|
+
* <FileUpload
|
|
660
|
+
* onFilesAdded={files => myApi.upload(files)}
|
|
661
|
+
* onUpload={results => myApi.classify(results)}
|
|
662
|
+
* />
|
|
663
|
+
*/
|
|
664
|
+
export declare function FileUpload({ onFilesAdded, onUpload, docTypes, accept, initialFiles, className, style, }: FileUploadProps): JSX_2.Element;
|
|
665
|
+
|
|
666
|
+
export declare namespace FileUpload {
|
|
667
|
+
var displayName: string;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export declare interface FileUploadProps {
|
|
671
|
+
/**
|
|
672
|
+
* Called as soon as files are dropped or selected (before classification).
|
|
673
|
+
* Use this to trigger the actual upload to your server.
|
|
674
|
+
*/
|
|
675
|
+
onFilesAdded?: (files: File[]) => void;
|
|
676
|
+
/**
|
|
677
|
+
* Called when the Upload button is clicked with all classified files.
|
|
678
|
+
* The component resets its internal list after calling this.
|
|
679
|
+
*/
|
|
680
|
+
onUpload: (files: FileUploadResult[]) => void;
|
|
681
|
+
/**
|
|
682
|
+
* Document type options shown in the per-file dropdown.
|
|
683
|
+
* @default DEFAULT_DOC_TYPES (standard mortgage document types)
|
|
684
|
+
*/
|
|
685
|
+
docTypes?: string[];
|
|
686
|
+
/**
|
|
687
|
+
* Accepted file extensions passed to the native file input.
|
|
688
|
+
* Files dropped via drag-and-drop are validated against this list too.
|
|
689
|
+
* @default '.html,.heic,.jpeg,.jpg,.png,.gif,.bmp,.tiff,.tif,.pdf,.doc,.docx,.xls,.xlsx'
|
|
690
|
+
*/
|
|
691
|
+
accept?: string;
|
|
692
|
+
/**
|
|
693
|
+
* Pre-populate the staged file list — useful for Storybook / testing.
|
|
694
|
+
* These files are added to the queue on mount without triggering `onFilesAdded`.
|
|
695
|
+
*/
|
|
696
|
+
initialFiles?: File[];
|
|
697
|
+
className?: string;
|
|
698
|
+
style?: React.CSSProperties;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export declare interface FileUploadResult {
|
|
702
|
+
file: File;
|
|
703
|
+
docType: string;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export declare interface FilterGroup {
|
|
707
|
+
label: string;
|
|
708
|
+
options: FilterOption[];
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export declare interface FilterOption {
|
|
712
|
+
label: string;
|
|
713
|
+
value: unknown;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
declare interface FilterRule {
|
|
717
|
+
matchMode: string;
|
|
718
|
+
value: string;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export declare type FilterType = 'rule' | 'checklist' | 'grouped-checklist';
|
|
722
|
+
|
|
723
|
+
export declare function FullNav({ topBar, loanBannerNav, urlATabsNav, className, style }: FullNavProps): JSX_2.Element;
|
|
724
|
+
|
|
725
|
+
export declare function FullNavMobile({ topBar, urlATabsNavMobile, className, style }: FullNavMobileProps): JSX_2.Element;
|
|
726
|
+
|
|
727
|
+
export declare interface FullNavMobileProps {
|
|
728
|
+
topBar: TopBarMobileProps;
|
|
729
|
+
/** URLA sub-nav — only renders when topBar.borrower is also set */
|
|
730
|
+
urlATabsNavMobile?: URLATabsNavMobileProps;
|
|
731
|
+
className?: string;
|
|
732
|
+
style?: default_2.CSSProperties;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
export declare interface FullNavProps {
|
|
736
|
+
topBar: TopBarProps;
|
|
737
|
+
/** When provided → loan-file context: LoanBannerNav renders below TopBar */
|
|
738
|
+
loanBannerNav?: LoanBannerNavProps;
|
|
739
|
+
/** When provided → URLA section: URLATabsNav renders below LoanBannerNav */
|
|
740
|
+
urlATabsNav?: URLATabsNavProps;
|
|
741
|
+
className?: string;
|
|
742
|
+
style?: default_2.CSSProperties;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* IconButton — Clear Design System
|
|
747
|
+
*
|
|
748
|
+
* A circular icon-only button. Shares the same variants and sizes as Button.
|
|
749
|
+
* Always requires an `aria-label` since there is no visible text.
|
|
750
|
+
*
|
|
751
|
+
* @example
|
|
752
|
+
* <IconButton icon={<i className="pi pi-search" />} aria-label="Search" />
|
|
753
|
+
*
|
|
754
|
+
* @example
|
|
755
|
+
* <IconButton icon={<i className="pi pi-trash" />} aria-label="Delete" variant="danger" />
|
|
756
|
+
*
|
|
757
|
+
* @example
|
|
758
|
+
* <IconButton icon={<i className="pi pi-plus" />} aria-label="Add" size="sm" />
|
|
759
|
+
*/
|
|
760
|
+
export declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
761
|
+
|
|
762
|
+
export declare interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
763
|
+
/** The icon to display. Pass any React node (e.g. a PrimeIcon `<i className="pi pi-search" />`). */
|
|
764
|
+
icon: React.ReactNode;
|
|
765
|
+
/** Visual style. Defaults to `'primary'`. */
|
|
766
|
+
variant?: ButtonVariant;
|
|
767
|
+
/** Size. `md` = 40×40px (default). `sm` = 24×24px. */
|
|
768
|
+
size?: ButtonSize;
|
|
769
|
+
/**
|
|
770
|
+
* Accessible label describing the button's action. Required for screen-reader support
|
|
771
|
+
* since there is no visible text.
|
|
772
|
+
*/
|
|
773
|
+
'aria-label': string;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export declare function InlineAlert({ severity, message }: InlineAlertProps): JSX_2.Element;
|
|
777
|
+
|
|
778
|
+
export declare namespace InlineAlert {
|
|
779
|
+
var displayName: string;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export declare interface InlineAlertProps {
|
|
783
|
+
severity: AlertSeverity;
|
|
784
|
+
message: string;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
export declare function InlineContainedAlert({ severity, message, closable, onClose }: InlineContainedAlertProps): JSX_2.Element;
|
|
788
|
+
|
|
789
|
+
export declare namespace InlineContainedAlert {
|
|
790
|
+
var displayName: string;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export declare interface InlineContainedAlertProps {
|
|
794
|
+
severity: AlertSeverity;
|
|
795
|
+
message: string;
|
|
796
|
+
/**
|
|
797
|
+
* Whether a dismiss (✕) button is shown.
|
|
798
|
+
* @default true
|
|
799
|
+
*/
|
|
800
|
+
closable?: boolean;
|
|
801
|
+
onClose?: () => void;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* InputText — Clear Design System
|
|
806
|
+
*
|
|
807
|
+
* A text input with label, helper text, prefix/suffix icon slots, and full state support.
|
|
808
|
+
* Sizes follow the type scale (sm=10px, md=12px, lg=14px).
|
|
809
|
+
*
|
|
810
|
+
* @example
|
|
811
|
+
* // Basic
|
|
812
|
+
* <InputText label="Search" placeholder="Enter a keyword" />
|
|
813
|
+
*
|
|
814
|
+
* @example
|
|
815
|
+
* // Required with helper text
|
|
816
|
+
* <InputText label="Email" required helperText="We'll never share your email." />
|
|
817
|
+
*
|
|
818
|
+
* @example
|
|
819
|
+
* // Invalid / error state
|
|
820
|
+
* <InputText label="Email" invalid helperText="Please enter a valid email address." />
|
|
821
|
+
*
|
|
822
|
+
* @example
|
|
823
|
+
* // With icons
|
|
824
|
+
* <InputText
|
|
825
|
+
* label="Search"
|
|
826
|
+
* prefixIcon={<i className="pi pi-search" />}
|
|
827
|
+
* suffixIcon={<i className="pi pi-times" />}
|
|
828
|
+
* />
|
|
829
|
+
*
|
|
830
|
+
* @example
|
|
831
|
+
* // Large size
|
|
832
|
+
* <InputText label="Full name" size="lg" placeholder="Jane Smith" />
|
|
833
|
+
*/
|
|
834
|
+
export declare const InputText: ForwardRefExoticComponent<InputTextProps & RefAttributes<HTMLInputElement>>;
|
|
835
|
+
|
|
836
|
+
export declare interface InputTextProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
837
|
+
/** Field label displayed above the input. */
|
|
838
|
+
label?: string;
|
|
839
|
+
/** Appends a red asterisk to the label and sets `aria-required`. */
|
|
840
|
+
required?: boolean;
|
|
841
|
+
/** Helper or error text shown below the input. */
|
|
842
|
+
helperText?: string;
|
|
843
|
+
/** Triggers the error/invalid visual state with red styling. */
|
|
844
|
+
invalid?: boolean;
|
|
845
|
+
/** Size variant. Affects label size, input font size, and padding. */
|
|
846
|
+
size?: 'sm' | 'md' | 'lg';
|
|
847
|
+
/** Icon or element rendered to the left of the input text. */
|
|
848
|
+
prefixIcon?: React.ReactNode;
|
|
849
|
+
/** Icon or element rendered to the right of the input text. */
|
|
850
|
+
suffixIcon?: React.ReactNode;
|
|
851
|
+
/** Associates the label `htmlFor` and input `id`. Auto-generated if not provided. */
|
|
852
|
+
id?: string;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* LightningButton — Clear Design System
|
|
857
|
+
*
|
|
858
|
+
* A pill-shaped icon-only dropdown button with a lightning bolt icon.
|
|
859
|
+
* Used as the "Quick Actions" trigger in navigation bars and toolbars.
|
|
860
|
+
*
|
|
861
|
+
* Two variants:
|
|
862
|
+
* - `basic` — no visible container, teal icon (default)
|
|
863
|
+
* - `filled` — solid teal-700 background
|
|
864
|
+
*
|
|
865
|
+
* @example
|
|
866
|
+
* <LightningButton
|
|
867
|
+
* variant="outline"
|
|
868
|
+
* items={[{ label: 'Copy Loan', value: 'copy' }]}
|
|
869
|
+
* onSelect={(v) => console.log(v)}
|
|
870
|
+
* aria-label="Quick actions"
|
|
871
|
+
* />
|
|
872
|
+
*/
|
|
873
|
+
export declare const LightningButton: ForwardRefExoticComponent<LightningButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
874
|
+
|
|
875
|
+
export declare interface LightningButtonItem {
|
|
876
|
+
label: string;
|
|
877
|
+
value: string;
|
|
878
|
+
icon?: React.ReactNode;
|
|
879
|
+
disabled?: boolean;
|
|
880
|
+
divider?: boolean;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export declare interface LightningButtonProps {
|
|
884
|
+
/**
|
|
885
|
+
* Visual variant.
|
|
886
|
+
* - `'basic'` — no visible container, teal icon (default)
|
|
887
|
+
* - `'filled'` — teal-50 bg / teal-200 border idle; teal-700 bg on hover/active
|
|
888
|
+
*/
|
|
889
|
+
variant?: 'basic' | 'filled';
|
|
890
|
+
/**
|
|
891
|
+
* Button size. Only meaningful for the `filled` variant.
|
|
892
|
+
* - `'md'` — 36px tall (default)
|
|
893
|
+
* - `'sm'` — 24px tall
|
|
894
|
+
*/
|
|
895
|
+
size?: 'md' | 'sm';
|
|
896
|
+
/** Dropdown items. */
|
|
897
|
+
items: LightningButtonItem[];
|
|
898
|
+
/** Called when the user selects a dropdown item. */
|
|
899
|
+
onSelect: (value: string) => void;
|
|
900
|
+
/** Disables the button and blocks dropdown. */
|
|
901
|
+
disabled?: boolean;
|
|
902
|
+
/** Accessible label — required since there is no visible text. */
|
|
903
|
+
'aria-label'?: string;
|
|
904
|
+
className?: string;
|
|
905
|
+
style?: React.CSSProperties;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* ListBox — Clear Design System
|
|
910
|
+
*
|
|
911
|
+
* A scrollable list that lets users select one or more values. Supports
|
|
912
|
+
* single-select, multi-select (checkboxes), a filter/search header, and
|
|
913
|
+
* grouped option sets with bold group headers.
|
|
914
|
+
*
|
|
915
|
+
* @example
|
|
916
|
+
* <ListBox options={items} value={val} onChange={setVal} />
|
|
917
|
+
*
|
|
918
|
+
* @example
|
|
919
|
+
* <ListBox multiple options={items} value={vals} onChange={setVals} />
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
* <ListBox multiple filter label="Loan Type" options={items} value={vals} onChange={setVals} />
|
|
923
|
+
*
|
|
924
|
+
* @example
|
|
925
|
+
* <ListBox multiple options={groupedItems} value={vals} onChange={setVals} />
|
|
926
|
+
*/
|
|
927
|
+
export declare const ListBox: ForwardRefExoticComponent<ListBoxProps & RefAttributes<HTMLDivElement>>;
|
|
928
|
+
|
|
929
|
+
export declare interface ListBoxOption {
|
|
930
|
+
/** Displayed text. */
|
|
931
|
+
label: string;
|
|
932
|
+
/** Unique identifier used for selection state. */
|
|
933
|
+
value: string;
|
|
934
|
+
/** When true, this individual option is non-interactive. */
|
|
935
|
+
disabled?: boolean;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
export declare interface ListBoxOptionGroup {
|
|
939
|
+
/** Bold, non-selectable group header. */
|
|
940
|
+
label: string;
|
|
941
|
+
/** Selectable options nested under this group. */
|
|
942
|
+
items: ListBoxOption[];
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
export declare interface ListBoxProps {
|
|
946
|
+
/**
|
|
947
|
+
* Flat list of options or grouped option sets.
|
|
948
|
+
* Groups are detected automatically when each entry contains an `items` array.
|
|
949
|
+
*/
|
|
950
|
+
options: ListBoxOption[] | ListBoxOptionGroup[];
|
|
951
|
+
/**
|
|
952
|
+
* Controlled selection. Pass a `string` for single-select or `string[]` for
|
|
953
|
+
* multi-select. Pass `null` / `[]` to clear.
|
|
954
|
+
*/
|
|
955
|
+
value?: string | string[] | null;
|
|
956
|
+
/** Called when the user clicks an option. */
|
|
957
|
+
onChange?: (value: string | string[] | null) => void;
|
|
958
|
+
/** When true, renders a checkbox per option and allows multiple selection. */
|
|
959
|
+
multiple?: boolean;
|
|
960
|
+
/** When true, shows a search input above the option list. */
|
|
961
|
+
filter?: boolean;
|
|
962
|
+
/** Placeholder text for the search input. Defaults to "Search…". */
|
|
963
|
+
filterPlaceholder?: string;
|
|
964
|
+
/** Label rendered above the filter input. Only visible when `filter` is true or a label/helperText is provided. */
|
|
965
|
+
label?: string;
|
|
966
|
+
/** Adds a red asterisk to the label and sets `aria-required` on the filter input. */
|
|
967
|
+
required?: boolean;
|
|
968
|
+
/** Helper text rendered below the filter input. Turns red when `invalid` is true. */
|
|
969
|
+
helperText?: string;
|
|
970
|
+
/** Renders a red border to signal a validation error. */
|
|
971
|
+
invalid?: boolean;
|
|
972
|
+
/** Disables the entire component — no interaction, muted colours. */
|
|
973
|
+
disabled?: boolean;
|
|
974
|
+
className?: string;
|
|
975
|
+
style?: React.CSSProperties;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* LoanBannerNav — Clear Design System
|
|
980
|
+
*
|
|
981
|
+
* Primary navigation bar for the loan origination application.
|
|
982
|
+
* Wraps `BannerTabs` in a full-width bar with a menu toggle on the left and
|
|
983
|
+
* a flexible action zone on the right.
|
|
984
|
+
*
|
|
985
|
+
* Optionally renders a secondary toolbar row (left/center/right slots) and/or
|
|
986
|
+
* a `BannerAlert` strip below.
|
|
987
|
+
*
|
|
988
|
+
* @example
|
|
989
|
+
* <LoanBannerNav
|
|
990
|
+
* tabs={tabs}
|
|
991
|
+
* activeTabId="urla"
|
|
992
|
+
* onTabChange={setActiveTab}
|
|
993
|
+
* onRefresh={handleRefresh}
|
|
994
|
+
* onPrimary={handleSave}
|
|
995
|
+
* />
|
|
996
|
+
*/
|
|
997
|
+
export declare const LoanBannerNav: ForwardRefExoticComponent<LoanBannerNavProps & RefAttributes<HTMLElement>>;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* A single action rendered in the right-side action zone.
|
|
1001
|
+
*
|
|
1002
|
+
* Rendering rules (in priority order):
|
|
1003
|
+
* 1. No `label` + `items` → small secondary icon-only DropdownButton (⚡▼)
|
|
1004
|
+
* 2. No `label` + no `items` → small secondary IconButton (💬, 🔄)
|
|
1005
|
+
* 3. `label` + `items` → small secondary DropdownButton with text (+ optional badge)
|
|
1006
|
+
* 4. `label` only → small secondary Button with optional leading icon
|
|
1007
|
+
*/
|
|
1008
|
+
export declare interface LoanBannerNavAction {
|
|
1009
|
+
/** Unique key. */
|
|
1010
|
+
value: string;
|
|
1011
|
+
/** Button label. Omit for icon-only rendering. */
|
|
1012
|
+
label?: string;
|
|
1013
|
+
/** Click handler (used for non-dropdown buttons). */
|
|
1014
|
+
onClick?: () => void;
|
|
1015
|
+
/** Visual variant for text buttons. Defaults to `'secondary'`. */
|
|
1016
|
+
variant?: ButtonVariant;
|
|
1017
|
+
/** Leading icon (or the sole icon when label is omitted). */
|
|
1018
|
+
icon?: React.ReactNode;
|
|
1019
|
+
/** Red count badge shown on the button. */
|
|
1020
|
+
badge?: string | number;
|
|
1021
|
+
/** If provided, the button opens a dropdown menu. */
|
|
1022
|
+
items?: DropdownButtonItem[];
|
|
1023
|
+
/** Called when the user selects a dropdown item. */
|
|
1024
|
+
onSelect?: (value: string) => void;
|
|
1025
|
+
/** Renders a pipe `|` divider immediately before this action. */
|
|
1026
|
+
dividerBefore?: boolean;
|
|
1027
|
+
/** Aria label — required when `label` is omitted. */
|
|
1028
|
+
ariaLabel?: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* When `true`, renders as a `LightningButton` pill (bolt icon + chevron).
|
|
1031
|
+
* Requires `items` and `onSelect`. `variant` controls outline vs filled.
|
|
1032
|
+
*/
|
|
1033
|
+
lightning?: boolean;
|
|
1034
|
+
/** LightningButton variant when `lightning` is true. Defaults to `'basic'`. */
|
|
1035
|
+
lightningVariant?: 'basic' | 'filled';
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export declare interface LoanBannerNavBanner {
|
|
1039
|
+
/** Bold heading text shown in the alert strip. */
|
|
1040
|
+
title: string;
|
|
1041
|
+
/** Optional detail text shown after the title. */
|
|
1042
|
+
detail?: string;
|
|
1043
|
+
/** Visual severity. Defaults to `'warn'`. */
|
|
1044
|
+
severity?: BannerAlertSeverity;
|
|
1045
|
+
/** Whether the dismiss (✕) button is shown. Defaults to `true`. */
|
|
1046
|
+
closable?: boolean;
|
|
1047
|
+
/** Called when the user dismisses the banner. */
|
|
1048
|
+
onClose?: () => void;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
export declare interface LoanBannerNavCollapsedSection {
|
|
1052
|
+
/** Section label (e.g. "Loan Summary"). */
|
|
1053
|
+
label: string;
|
|
1054
|
+
/** Muted sub-label (e.g. "LE Pending for 2 Days"). */
|
|
1055
|
+
subLabel?: string;
|
|
1056
|
+
/** Status dot color. */
|
|
1057
|
+
status?: StatusColor;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
export declare interface LoanBannerNavCondition {
|
|
1061
|
+
/** Label text shown in the condition badge (e.g. "Dunning Delete Org"). */
|
|
1062
|
+
label: string;
|
|
1063
|
+
/** Called when the user dismisses the condition. */
|
|
1064
|
+
onDismiss?: () => void;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export declare interface LoanBannerNavProps {
|
|
1068
|
+
/** Tab definitions — reuses `BannerTabItem` from BannerTabs. */
|
|
1069
|
+
tabs: BannerTabItem[];
|
|
1070
|
+
/** Controlled active tab id. */
|
|
1071
|
+
activeTabId: string;
|
|
1072
|
+
/** Called when the user selects a different tab. */
|
|
1073
|
+
onTabChange: (id: string) => void;
|
|
1074
|
+
/** Hamburger / menu-toggle handler. */
|
|
1075
|
+
onMenuToggle?: () => void;
|
|
1076
|
+
/**
|
|
1077
|
+
* Actions rendered left-to-right before the primary button.
|
|
1078
|
+
* Order is exactly as provided — consumers control placement.
|
|
1079
|
+
*/
|
|
1080
|
+
secondaryActions?: LoanBannerNavAction[];
|
|
1081
|
+
/** Dedicated refresh icon button (sm secondary). */
|
|
1082
|
+
onRefresh?: () => void;
|
|
1083
|
+
/** Primary button label. Defaults to `'Save Loan'`. */
|
|
1084
|
+
primaryLabel?: string;
|
|
1085
|
+
/** Primary button click handler. */
|
|
1086
|
+
onPrimary?: () => void;
|
|
1087
|
+
/** When provided, primary renders as a `SplitButton`. */
|
|
1088
|
+
primaryItems?: SplitButtonItem[];
|
|
1089
|
+
/** Called when the user selects a SplitButton dropdown item. */
|
|
1090
|
+
onPrimarySelect?: (value: string) => void;
|
|
1091
|
+
/** When provided, renders a dismissible condition badge before the primary. */
|
|
1092
|
+
condition?: LoanBannerNavCondition;
|
|
1093
|
+
/**
|
|
1094
|
+
* When provided, renders a secondary toolbar row below the main bar.
|
|
1095
|
+
* Three layout slots: left (compact), center (flex-1), right (compact).
|
|
1096
|
+
*/
|
|
1097
|
+
toolbar?: LoanBannerNavToolbar;
|
|
1098
|
+
/**
|
|
1099
|
+
* When provided, renders a `BannerAlert` strip below the main bar
|
|
1100
|
+
* (or below the toolbar if both are present).
|
|
1101
|
+
*/
|
|
1102
|
+
banner?: LoanBannerNavBanner;
|
|
1103
|
+
/** Switches to compact single-row mode (hides BannerTabs, shows breadcrumb pills). */
|
|
1104
|
+
collapsed?: boolean;
|
|
1105
|
+
/** Parent section breadcrumb pill shown in collapsed mode. */
|
|
1106
|
+
collapsedSection?: LoanBannerNavCollapsedSection;
|
|
1107
|
+
/** When provided, renders a back-arrow before the breadcrumb pills. */
|
|
1108
|
+
onCollapsedBack?: () => void;
|
|
1109
|
+
/** When provided, renders a ">" expand button to reveal all tabs. */
|
|
1110
|
+
onExpandTabs?: () => void;
|
|
1111
|
+
/** Items for the ⚡▼ quick-actions dropdown in collapsed mode. */
|
|
1112
|
+
collapsedQuickItems?: DropdownButtonItem[];
|
|
1113
|
+
/** Called when the user picks a collapsed quick action. */
|
|
1114
|
+
onCollapsedQuickAction?: (value: string) => void;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export declare interface LoanBannerNavToolbar {
|
|
1118
|
+
/** Left slot — e.g. a compact section-navigation dropdown. */
|
|
1119
|
+
left?: React.ReactNode;
|
|
1120
|
+
/** Center slot — fills remaining width. e.g. a wide Select. */
|
|
1121
|
+
center?: React.ReactNode;
|
|
1122
|
+
/** Right slot — e.g. the ⚡▼ quick-actions dropdown. */
|
|
1123
|
+
right?: React.ReactNode;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export declare function MiscChip({ label, color, dismissible, onDismiss }: MiscChipProps): JSX_2.Element;
|
|
1127
|
+
|
|
1128
|
+
export declare namespace MiscChip {
|
|
1129
|
+
var displayName: string;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
export declare type MiscChipColor = 'red-darkest' | 'red-light' | 'yellow-darkest' | 'yellow-dark' | 'yellow-light' | 'green-darkest' | 'green-dark' | 'green-light' | 'blue-darkest' | 'blue-dark' | 'blue-light' | 'navy';
|
|
1133
|
+
|
|
1134
|
+
export declare interface MiscChipProps {
|
|
1135
|
+
label: string;
|
|
1136
|
+
color: MiscChipColor;
|
|
1137
|
+
/**
|
|
1138
|
+
* Whether the dismiss (✕) button is shown.
|
|
1139
|
+
* @default true
|
|
1140
|
+
*/
|
|
1141
|
+
dismissible?: boolean;
|
|
1142
|
+
onDismiss?: () => void;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Modal — Clear Design System
|
|
1147
|
+
*
|
|
1148
|
+
* A centered overlay dialog. Always rendered via a portal into `document.body`.
|
|
1149
|
+
* Supports a dark scrim (default) or no scrim for inline-style alerts.
|
|
1150
|
+
* Closes on ✕ click, scrim click, or Escape key.
|
|
1151
|
+
*
|
|
1152
|
+
* Fully controlled — pass `isOpen` + `onClose`.
|
|
1153
|
+
*
|
|
1154
|
+
* @example
|
|
1155
|
+
* const [open, setOpen] = useState(false);
|
|
1156
|
+
* <Modal
|
|
1157
|
+
* isOpen={open}
|
|
1158
|
+
* onClose={() => setOpen(false)}
|
|
1159
|
+
* title="Unsaved Changes"
|
|
1160
|
+
* footer={
|
|
1161
|
+
* <>
|
|
1162
|
+
* <Button variant="secondary" size="sm" onClick={() => setOpen(false)}>No</Button>
|
|
1163
|
+
* <Button variant="primary" size="sm" onClick={() => setOpen(false)}>Yes</Button>
|
|
1164
|
+
* </>
|
|
1165
|
+
* }
|
|
1166
|
+
* >
|
|
1167
|
+
* <p>Are you sure you want to leave without saving?</p>
|
|
1168
|
+
* </Modal>
|
|
1169
|
+
*/
|
|
1170
|
+
export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDivElement>>;
|
|
1171
|
+
|
|
1172
|
+
export declare interface ModalProps {
|
|
1173
|
+
/** Controls visibility */
|
|
1174
|
+
isOpen: boolean;
|
|
1175
|
+
/** Called when ✕ is clicked, scrim is clicked, or Escape is pressed */
|
|
1176
|
+
onClose: () => void;
|
|
1177
|
+
/** Modal title — renders in the header */
|
|
1178
|
+
title?: string;
|
|
1179
|
+
/** Modal body content — any ReactNode */
|
|
1180
|
+
children: React.ReactNode;
|
|
1181
|
+
/** Footer slot — typically right-aligned action buttons */
|
|
1182
|
+
footer?: React.ReactNode;
|
|
1183
|
+
/**
|
|
1184
|
+
* Render a dark scrim behind the modal.
|
|
1185
|
+
* @default true
|
|
1186
|
+
*/
|
|
1187
|
+
scrim?: boolean;
|
|
1188
|
+
/**
|
|
1189
|
+
* Modal width in px.
|
|
1190
|
+
* @default 510
|
|
1191
|
+
*/
|
|
1192
|
+
width?: number;
|
|
1193
|
+
className?: string;
|
|
1194
|
+
style?: React.CSSProperties;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* MultiSelect — Clear Design System
|
|
1199
|
+
*
|
|
1200
|
+
* A dropdown that lets users select multiple values via checkboxes.
|
|
1201
|
+
* Selected items appear as chips in the trigger. Supports live search/filter
|
|
1202
|
+
* and a "Select all" toggle. Three sizes follow the type scale.
|
|
1203
|
+
*
|
|
1204
|
+
* @example
|
|
1205
|
+
* <MultiSelect options={items} value={vals} onChange={setVals} label="Loan types" />
|
|
1206
|
+
*
|
|
1207
|
+
* @example
|
|
1208
|
+
* <MultiSelect options={items} value={vals} onChange={setVals} required invalid helperText="Select at least one." />
|
|
1209
|
+
*
|
|
1210
|
+
* @example
|
|
1211
|
+
* <MultiSelect options={items} value={vals} onChange={setVals} filter={false} showSelectAll={false} />
|
|
1212
|
+
*/
|
|
1213
|
+
export declare const MultiSelect: ForwardRefExoticComponent<MultiSelectProps & RefAttributes<HTMLDivElement>>;
|
|
1214
|
+
|
|
1215
|
+
export declare interface MultiSelectOption {
|
|
1216
|
+
/** Displayed text. */
|
|
1217
|
+
label: string;
|
|
1218
|
+
/** Unique identifier used in the value array. */
|
|
1219
|
+
value: string;
|
|
1220
|
+
/** When true, this option cannot be toggled. */
|
|
1221
|
+
disabled?: boolean;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
export declare interface MultiSelectProps {
|
|
1225
|
+
/** List of options to display in the dropdown. */
|
|
1226
|
+
options: MultiSelectOption[];
|
|
1227
|
+
/** Controlled array of selected values. */
|
|
1228
|
+
value?: string[];
|
|
1229
|
+
/** Called when the selection changes. */
|
|
1230
|
+
onChange?: (value: string[]) => void;
|
|
1231
|
+
/** Placeholder shown in the trigger when nothing is selected. */
|
|
1232
|
+
placeholder?: string;
|
|
1233
|
+
/** Label shown above the trigger input. */
|
|
1234
|
+
label?: string;
|
|
1235
|
+
/** Adds a red asterisk to the label and sets aria-required. */
|
|
1236
|
+
required?: boolean;
|
|
1237
|
+
/** Helper text shown below the trigger input. Turns red when `invalid` is true. */
|
|
1238
|
+
helperText?: string;
|
|
1239
|
+
/** Renders the trigger with a red border and turns the helper text red. */
|
|
1240
|
+
invalid?: boolean;
|
|
1241
|
+
/** Disables the entire component — trigger and dropdown are non-interactive. */
|
|
1242
|
+
disabled?: boolean;
|
|
1243
|
+
/**
|
|
1244
|
+
* When true (default), shows a search input in the dropdown header
|
|
1245
|
+
* that filters the option list in real time.
|
|
1246
|
+
*/
|
|
1247
|
+
filter?: boolean;
|
|
1248
|
+
/** Placeholder for the search input. Defaults to "Search…". */
|
|
1249
|
+
filterPlaceholder?: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* When true (default), shows a "Select all" checkbox in the dropdown header.
|
|
1252
|
+
* The checkbox is indeterminate when some (but not all) options are selected.
|
|
1253
|
+
*/
|
|
1254
|
+
showSelectAll?: boolean;
|
|
1255
|
+
/** Size variant that controls font size and trigger padding. sm = 10px / md = 12px (default) / lg = 14px. */
|
|
1256
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1257
|
+
className?: string;
|
|
1258
|
+
style?: React.CSSProperties;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
export declare interface PageChangeEvent {
|
|
1262
|
+
/** 0-based index of the first record on the new page. */
|
|
1263
|
+
first: number;
|
|
1264
|
+
/** Records per page. */
|
|
1265
|
+
rows: number;
|
|
1266
|
+
/** 0-based page number. */
|
|
1267
|
+
page: number;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Paginator — Clear Design System
|
|
1272
|
+
*
|
|
1273
|
+
* Navigation control for paginated content. Works with DataTable or any
|
|
1274
|
+
* paginated list. Three layout templates: `pages`, `report`, and `full`.
|
|
1275
|
+
*
|
|
1276
|
+
* @example
|
|
1277
|
+
* // Basic page navigation
|
|
1278
|
+
* <Paginator totalRecords={200} first={0} rows={10} onPageChange={setPage} />
|
|
1279
|
+
*
|
|
1280
|
+
* @example
|
|
1281
|
+
* // Text summary instead of page numbers
|
|
1282
|
+
* <Paginator totalRecords={200} first={0} rows={10} onPageChange={setPage} template="report" />
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* // Full layout with rows-per-page selector
|
|
1286
|
+
* <Paginator totalRecords={200} first={0} rows={10} onPageChange={setPage}
|
|
1287
|
+
* template="full" rowsPerPageOptions={[10, 25, 50]} />
|
|
1288
|
+
*/
|
|
1289
|
+
export declare const Paginator: ForwardRefExoticComponent<PaginatorProps & RefAttributes<HTMLDivElement>>;
|
|
1290
|
+
|
|
1291
|
+
export declare interface PaginatorProps {
|
|
1292
|
+
/** Total number of records across all pages. */
|
|
1293
|
+
totalRecords: number;
|
|
1294
|
+
/** 0-based index of the first record on the current page. */
|
|
1295
|
+
first: number;
|
|
1296
|
+
/** Number of records per page. */
|
|
1297
|
+
rows: number;
|
|
1298
|
+
/** Called when the user changes the page or rows-per-page. */
|
|
1299
|
+
onPageChange: (e: PageChangeEvent) => void;
|
|
1300
|
+
/**
|
|
1301
|
+
* Layout template.
|
|
1302
|
+
* - `'pages'` (default): page-number buttons + rows-per-page select.
|
|
1303
|
+
* - `'report'`: "Showing X to Y of Z entries" text instead of page buttons.
|
|
1304
|
+
* - `'full'`: "Results per page" label + select + entry count on the left; page buttons on the right.
|
|
1305
|
+
*/
|
|
1306
|
+
template?: 'pages' | 'report' | 'full';
|
|
1307
|
+
/** Options shown in the rows-per-page dropdown. Defaults to `[10, 25, 50, 100]`. */
|
|
1308
|
+
rowsPerPageOptions?: number[];
|
|
1309
|
+
/** Number of page-number buttons visible at once. Defaults to 5. */
|
|
1310
|
+
pageLinkSize?: number;
|
|
1311
|
+
className?: string;
|
|
1312
|
+
style?: React.CSSProperties;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Picklist — Clear Design System
|
|
1317
|
+
*
|
|
1318
|
+
* Two-panel component for moving items between a source list and a target list.
|
|
1319
|
+
* Supports checkbox multi-selection, custom item templates (table rows, etc.),
|
|
1320
|
+
* optional filter inputs per panel, and optional move-all buttons.
|
|
1321
|
+
*
|
|
1322
|
+
* The component is fully controlled — `sourceItems` and `targetItems` are props,
|
|
1323
|
+
* and `onChange` fires with the updated arrays on every move action.
|
|
1324
|
+
*
|
|
1325
|
+
* @example
|
|
1326
|
+
* // Simple string list
|
|
1327
|
+
* <Picklist
|
|
1328
|
+
* sourceItems={source}
|
|
1329
|
+
* targetItems={target}
|
|
1330
|
+
* onChange={({ source, target }) => { setSource(source); setTarget(target); }}
|
|
1331
|
+
* sourceHeader="Available"
|
|
1332
|
+
* targetHeader="Selected"
|
|
1333
|
+
* />
|
|
1334
|
+
*
|
|
1335
|
+
* @example
|
|
1336
|
+
* // Table-style rows
|
|
1337
|
+
* <Picklist
|
|
1338
|
+
* sourceItems={source}
|
|
1339
|
+
* targetItems={target}
|
|
1340
|
+
* onChange={...}
|
|
1341
|
+
* sourceHeader={<MyTableHeader />}
|
|
1342
|
+
* targetHeader={<MyTableHeader />}
|
|
1343
|
+
* itemTemplate={(item) => <MyTableRow item={item} />}
|
|
1344
|
+
* />
|
|
1345
|
+
*/
|
|
1346
|
+
export declare const Picklist: ForwardRefExoticComponent<PicklistProps & RefAttributes<HTMLDivElement>>;
|
|
1347
|
+
|
|
1348
|
+
export declare interface PicklistChangeEvent {
|
|
1349
|
+
source: PicklistItem[];
|
|
1350
|
+
target: PicklistItem[];
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
export declare interface PicklistItem {
|
|
1354
|
+
/** Unique identifier for the item. */
|
|
1355
|
+
id: string | number;
|
|
1356
|
+
/** Default label shown when no itemTemplate is provided. */
|
|
1357
|
+
label?: string;
|
|
1358
|
+
/** PrimeIcons class name for the item icon (default rendering only). */
|
|
1359
|
+
icon?: string;
|
|
1360
|
+
/** Prevents this item from being selected or moved. */
|
|
1361
|
+
disabled?: boolean;
|
|
1362
|
+
/** Any additional data fields (available in itemTemplate). */
|
|
1363
|
+
[key: string]: unknown;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
export declare interface PicklistProps {
|
|
1367
|
+
/** Items available in the source (left) list. */
|
|
1368
|
+
sourceItems: PicklistItem[];
|
|
1369
|
+
/** Items in the target (right) list. */
|
|
1370
|
+
targetItems: PicklistItem[];
|
|
1371
|
+
/** Called when items are moved between lists. Receives updated source and target arrays. */
|
|
1372
|
+
onChange: (e: PicklistChangeEvent) => void;
|
|
1373
|
+
/** Optional header for the source panel. Accepts any ReactNode — string, table header row, etc. */
|
|
1374
|
+
sourceHeader?: React.ReactNode;
|
|
1375
|
+
/** Optional header for the target panel. Accepts any ReactNode — string, table header row, etc. */
|
|
1376
|
+
targetHeader?: React.ReactNode;
|
|
1377
|
+
/**
|
|
1378
|
+
* Custom render function for each item row content.
|
|
1379
|
+
* The Picklist always prepends its own checkbox; this controls everything after it.
|
|
1380
|
+
* Defaults to rendering `[icon?] label`.
|
|
1381
|
+
*/
|
|
1382
|
+
itemTemplate?: (item: PicklistItem) => React.ReactNode;
|
|
1383
|
+
/** Show a filter/search input at the top of each panel. */
|
|
1384
|
+
filter?: boolean;
|
|
1385
|
+
/** Placeholder for the source panel filter input. */
|
|
1386
|
+
sourceFilterPlaceholder?: string;
|
|
1387
|
+
/** Placeholder for the target panel filter input. */
|
|
1388
|
+
targetFilterPlaceholder?: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* Show move-all buttons (>> and <<).
|
|
1391
|
+
* @default true
|
|
1392
|
+
*/
|
|
1393
|
+
showMoveAll?: boolean;
|
|
1394
|
+
/**
|
|
1395
|
+
* Show checkboxes on each item row.
|
|
1396
|
+
* Set to `false` when items have icons that serve as the visual indicator —
|
|
1397
|
+
* selection is then shown via row highlight only.
|
|
1398
|
+
* @default true
|
|
1399
|
+
*/
|
|
1400
|
+
showCheckbox?: boolean;
|
|
1401
|
+
className?: string;
|
|
1402
|
+
style?: React.CSSProperties;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Popup — Clear Design System
|
|
1407
|
+
*
|
|
1408
|
+
* A positioned overlay anchored to a trigger element. Opens above or below the
|
|
1409
|
+
* trigger with a small triangle arrow pointing at it. Renders a scrim behind it
|
|
1410
|
+
* to keep focus on the popup.
|
|
1411
|
+
*
|
|
1412
|
+
* Fully controlled — pass `isOpen` + `onClose`. The popup measures the trigger's
|
|
1413
|
+
* screen position to place itself; the trigger is responsible for toggling state.
|
|
1414
|
+
*
|
|
1415
|
+
* @example
|
|
1416
|
+
* const [open, setOpen] = useState(false);
|
|
1417
|
+
* <Popup
|
|
1418
|
+
* trigger={<Button onClick={() => setOpen(true)}>Details</Button>}
|
|
1419
|
+
* isOpen={open}
|
|
1420
|
+
* onClose={() => setOpen(false)}
|
|
1421
|
+
* title="Loan Details"
|
|
1422
|
+
* footer={<Button size="sm" onClick={() => setOpen(false)}>Close</Button>}
|
|
1423
|
+
* >
|
|
1424
|
+
* <p>…content…</p>
|
|
1425
|
+
* </Popup>
|
|
1426
|
+
*/
|
|
1427
|
+
export declare const Popup: ForwardRefExoticComponent<PopupProps & RefAttributes<HTMLDivElement>>;
|
|
1428
|
+
|
|
1429
|
+
export declare interface PopupProps {
|
|
1430
|
+
/** Controls popup visibility */
|
|
1431
|
+
isOpen: boolean;
|
|
1432
|
+
/** Called when ✕ is clicked or the scrim is clicked */
|
|
1433
|
+
onClose: () => void;
|
|
1434
|
+
/**
|
|
1435
|
+
* The element the popup is anchored to.
|
|
1436
|
+
* The popup measures this element's position to place itself.
|
|
1437
|
+
*/
|
|
1438
|
+
trigger: React.ReactNode;
|
|
1439
|
+
/** Optional header title */
|
|
1440
|
+
title?: string;
|
|
1441
|
+
/** Popup body content — any ReactNode */
|
|
1442
|
+
children: React.ReactNode;
|
|
1443
|
+
/** Footer slot — typically action buttons, right-aligned with a separator border */
|
|
1444
|
+
footer?: React.ReactNode;
|
|
1445
|
+
/**
|
|
1446
|
+
* Which side of the trigger the popup opens on.
|
|
1447
|
+
* @default 'bottom'
|
|
1448
|
+
*/
|
|
1449
|
+
placement?: 'top' | 'bottom';
|
|
1450
|
+
/**
|
|
1451
|
+
* Horizontal alignment relative to the trigger.
|
|
1452
|
+
* - 'right': popup extends to the right; its left edge anchors near the trigger's left edge.
|
|
1453
|
+
* - 'left': popup extends to the left; its right edge anchors near the trigger's right edge.
|
|
1454
|
+
* The arrow always points at the exact trigger center.
|
|
1455
|
+
* @default 'right'
|
|
1456
|
+
*/
|
|
1457
|
+
align?: 'left' | 'right';
|
|
1458
|
+
/**
|
|
1459
|
+
* Popup width in px.
|
|
1460
|
+
* @default 360
|
|
1461
|
+
*/
|
|
1462
|
+
width?: number;
|
|
1463
|
+
className?: string;
|
|
1464
|
+
style?: React.CSSProperties;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
export declare function ProfileChip({ label, leading, trailing, dismissible, onDismiss }: ProfileChipProps): JSX_2.Element;
|
|
1468
|
+
|
|
1469
|
+
export declare namespace ProfileChip {
|
|
1470
|
+
var displayName: string;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
export declare interface ProfileChipProps {
|
|
1474
|
+
label: string;
|
|
1475
|
+
/**
|
|
1476
|
+
* Content shown to the left of the label (avatar, icon, initials, etc.).
|
|
1477
|
+
* Rendered in a 18×18px circular clip.
|
|
1478
|
+
*/
|
|
1479
|
+
leading?: ReactNode;
|
|
1480
|
+
/**
|
|
1481
|
+
* Content shown to the right of the label (avatar, icon, initials, etc.).
|
|
1482
|
+
* Rendered in a 18×18px circular clip.
|
|
1483
|
+
*/
|
|
1484
|
+
trailing?: ReactNode;
|
|
1485
|
+
/**
|
|
1486
|
+
* Whether the dismiss (✕) button is shown.
|
|
1487
|
+
* @default true
|
|
1488
|
+
*/
|
|
1489
|
+
dismissible?: boolean;
|
|
1490
|
+
onDismiss?: () => void;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
export declare function ProgressBar({ value, max, error, errorMessage, 'aria-label': ariaLabel, }: ProgressBarProps): JSX_2.Element;
|
|
1494
|
+
|
|
1495
|
+
export declare namespace ProgressBar {
|
|
1496
|
+
var displayName: string;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
export declare interface ProgressBarProps {
|
|
1500
|
+
/**
|
|
1501
|
+
* Current progress value. Clamped to [0, max].
|
|
1502
|
+
*/
|
|
1503
|
+
value: number;
|
|
1504
|
+
/**
|
|
1505
|
+
* Maximum value. Defaults to 100.
|
|
1506
|
+
* @default 100
|
|
1507
|
+
*/
|
|
1508
|
+
max?: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* Puts the bar into an error state — hides the fill and shows `errorMessage` in red.
|
|
1511
|
+
*/
|
|
1512
|
+
error?: boolean;
|
|
1513
|
+
/**
|
|
1514
|
+
* Error message shown below the track when `error` is true.
|
|
1515
|
+
*/
|
|
1516
|
+
errorMessage?: string;
|
|
1517
|
+
/** Accessible label describing what is being measured. */
|
|
1518
|
+
'aria-label'?: string;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
export declare function ProgressSpinner({ size, label, theme, 'aria-label': ariaLabel, }: ProgressSpinnerProps): JSX_2.Element;
|
|
1522
|
+
|
|
1523
|
+
export declare namespace ProgressSpinner {
|
|
1524
|
+
var displayName: string;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
export declare interface ProgressSpinnerProps {
|
|
1528
|
+
/**
|
|
1529
|
+
* Spinner size.
|
|
1530
|
+
* - `sm` — 20px ring
|
|
1531
|
+
* - `md` — 32px ring (default)
|
|
1532
|
+
* - `lg` — 36px ring with the CLEAR logo centered inside
|
|
1533
|
+
* @default 'md'
|
|
1534
|
+
*/
|
|
1535
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1536
|
+
/**
|
|
1537
|
+
* Text label displayed below the spinner. Primarily designed for the `lg` variant.
|
|
1538
|
+
*/
|
|
1539
|
+
label?: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* Adjusts the label text color for placement on light or dark backgrounds.
|
|
1542
|
+
* @default 'light'
|
|
1543
|
+
*/
|
|
1544
|
+
theme?: 'light' | 'dark';
|
|
1545
|
+
/** Accessible label describing the loading state. */
|
|
1546
|
+
'aria-label'?: string;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* RadioButton — Clear Design System
|
|
1551
|
+
*
|
|
1552
|
+
* A fully accessible radio button with label, invalid, and disabled states.
|
|
1553
|
+
* Three sizes (sm, md, lg) follow the type scale. Group multiple RadioButtons
|
|
1554
|
+
* under a shared `name` prop so the browser enforces single selection.
|
|
1555
|
+
*
|
|
1556
|
+
* @example
|
|
1557
|
+
* <RadioButton name="plan" value="basic" label="Basic" />
|
|
1558
|
+
*
|
|
1559
|
+
* @example
|
|
1560
|
+
* <RadioButton name="plan" value="pro" label="Pro" checked onChange={handleChange} />
|
|
1561
|
+
*
|
|
1562
|
+
* @example
|
|
1563
|
+
* <RadioButton name="plan" value="enterprise" label="Enterprise" invalid helperText="Contact sales first." />
|
|
1564
|
+
*
|
|
1565
|
+
* @example
|
|
1566
|
+
* <RadioButton name="plan" value="basic" label="Small" size="sm" />
|
|
1567
|
+
*/
|
|
1568
|
+
export declare const RadioButton: ForwardRefExoticComponent<RadioButtonProps & RefAttributes<HTMLInputElement>>;
|
|
1569
|
+
|
|
1570
|
+
export declare interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'children' | 'size'> {
|
|
1571
|
+
/** The visible label next to the radio button. */
|
|
1572
|
+
label?: React.ReactNode;
|
|
1573
|
+
/** Shows the invalid/error state with red border and label. */
|
|
1574
|
+
invalid?: boolean;
|
|
1575
|
+
/** Helper text shown below the radio button. Shown in red when `invalid` is true. */
|
|
1576
|
+
helperText?: string;
|
|
1577
|
+
/** Size variant. sm = 14px / md = 18px (default) / lg = 22px. */
|
|
1578
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
export declare interface RuleFilterValue {
|
|
1582
|
+
operator: 'and' | 'or';
|
|
1583
|
+
rules: FilterRule[];
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* Select — Clear Design System
|
|
1588
|
+
*
|
|
1589
|
+
* A single-value dropdown. Selecting an option closes the dropdown immediately.
|
|
1590
|
+
* Supports an optional live-search filter, three sizes, and full state coverage:
|
|
1591
|
+
* idle, hover, active/open, filled, invalid, and disabled.
|
|
1592
|
+
*
|
|
1593
|
+
* @example
|
|
1594
|
+
* <Select options={opts} value={val} onChange={setVal} label="Loan type" />
|
|
1595
|
+
*
|
|
1596
|
+
* @example
|
|
1597
|
+
* <Select options={opts} value={val} onChange={setVal} required invalid helperText="Required." />
|
|
1598
|
+
*
|
|
1599
|
+
* @example
|
|
1600
|
+
* <Select options={opts} value={val} onChange={setVal} filter size="lg" />
|
|
1601
|
+
*/
|
|
1602
|
+
export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLDivElement>>;
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* SelectButton — Clear Design System
|
|
1606
|
+
*
|
|
1607
|
+
* A single-select toggle control with two variants:
|
|
1608
|
+
* - `group`: options displayed as a joined row of toggle buttons (use for view/filter switching).
|
|
1609
|
+
* - `options`: a split button showing the active selection; clicking opens a dropdown picker.
|
|
1610
|
+
*
|
|
1611
|
+
* Each option can carry an optional count number and a colored badge indicator.
|
|
1612
|
+
*
|
|
1613
|
+
* @example
|
|
1614
|
+
* // Toggle group
|
|
1615
|
+
* <SelectButton
|
|
1616
|
+
* options={[
|
|
1617
|
+
* { label: 'All', value: 'all', count: 42 },
|
|
1618
|
+
* { label: 'In Review', value: 'review', count: 5, badge: { value: 3, color: '#D60F00' } },
|
|
1619
|
+
* { label: 'Approved', value: 'approved', count: 12 },
|
|
1620
|
+
* ]}
|
|
1621
|
+
* value={view}
|
|
1622
|
+
* onChange={setView}
|
|
1623
|
+
* />
|
|
1624
|
+
*
|
|
1625
|
+
* @example
|
|
1626
|
+
* // Dropdown options variant
|
|
1627
|
+
* <SelectButton
|
|
1628
|
+
* variant="options"
|
|
1629
|
+
* options={statusOptions}
|
|
1630
|
+
* value={status}
|
|
1631
|
+
* onChange={setStatus}
|
|
1632
|
+
* label="Status"
|
|
1633
|
+
* />
|
|
1634
|
+
*/
|
|
1635
|
+
export declare const SelectButton: ForwardRefExoticComponent<SelectButtonProps & RefAttributes<HTMLDivElement>>;
|
|
1636
|
+
|
|
1637
|
+
export declare interface SelectButtonBadge {
|
|
1638
|
+
/** Displayed inside the badge circle. */
|
|
1639
|
+
value: string | number;
|
|
1640
|
+
/** Background color of the badge (hex or CSS color). */
|
|
1641
|
+
color: string;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
export declare interface SelectButtonOption {
|
|
1645
|
+
/** Option display label. */
|
|
1646
|
+
label: string;
|
|
1647
|
+
/** Unique identifier used as the value. */
|
|
1648
|
+
value: string;
|
|
1649
|
+
/** Plain count shown next to the label in bold. */
|
|
1650
|
+
count?: number;
|
|
1651
|
+
/** Colored circular badge (e.g., teal for info, red for alerts). */
|
|
1652
|
+
badge?: SelectButtonBadge;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
export declare interface SelectButtonProps {
|
|
1656
|
+
/** Options to display. */
|
|
1657
|
+
options: SelectButtonOption[];
|
|
1658
|
+
/** Currently selected value. */
|
|
1659
|
+
value?: string | null;
|
|
1660
|
+
/** Called when the user selects an option. */
|
|
1661
|
+
onChange?: (value: string) => void;
|
|
1662
|
+
/**
|
|
1663
|
+
* - `'group'` (default): all options rendered as a joined toggle-button row.
|
|
1664
|
+
* Use for view switching or filter toggling.
|
|
1665
|
+
* - `'options'`: renders a split button showing the current selection;
|
|
1666
|
+
* clicking opens a dropdown to pick a different option.
|
|
1667
|
+
*/
|
|
1668
|
+
variant?: 'group' | 'options';
|
|
1669
|
+
/** Optional field label rendered above the button. */
|
|
1670
|
+
label?: string;
|
|
1671
|
+
/** Adds a red asterisk next to the label. */
|
|
1672
|
+
required?: boolean;
|
|
1673
|
+
/** Disables the entire component. */
|
|
1674
|
+
disabled?: boolean;
|
|
1675
|
+
/** Placeholder for the `options` variant when nothing is selected. */
|
|
1676
|
+
placeholder?: string;
|
|
1677
|
+
className?: string;
|
|
1678
|
+
style?: React.CSSProperties;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
declare type SelectionMode_2 = 'none' | 'single' | 'multiple';
|
|
1682
|
+
export { SelectionMode_2 as SelectionMode }
|
|
1683
|
+
|
|
1684
|
+
export declare interface SelectOption {
|
|
1685
|
+
/** Displayed text. */
|
|
1686
|
+
label: string;
|
|
1687
|
+
/** Unique identifier used for the value. */
|
|
1688
|
+
value: string;
|
|
1689
|
+
/** When true, this option cannot be selected. */
|
|
1690
|
+
disabled?: boolean;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
export declare interface SelectProps {
|
|
1694
|
+
/** List of options to display in the dropdown. */
|
|
1695
|
+
options: SelectOption[];
|
|
1696
|
+
/** Controlled selected value. Pass `null` to clear. */
|
|
1697
|
+
value?: string | null;
|
|
1698
|
+
/** Called when the user selects an option. Receives `null` when cleared. */
|
|
1699
|
+
onChange?: (value: string | null) => void;
|
|
1700
|
+
/** Placeholder shown in the trigger when nothing is selected. */
|
|
1701
|
+
placeholder?: string;
|
|
1702
|
+
/** Label shown above the trigger input. */
|
|
1703
|
+
label?: string;
|
|
1704
|
+
/** Adds a red asterisk to the label and sets aria-required. */
|
|
1705
|
+
required?: boolean;
|
|
1706
|
+
/** Helper text shown below the trigger input. Turns red when `invalid` is true. */
|
|
1707
|
+
helperText?: string;
|
|
1708
|
+
/** Renders the trigger with a red border, red text, and red helper text. */
|
|
1709
|
+
invalid?: boolean;
|
|
1710
|
+
/** Disables the entire component — non-interactive and visually muted. */
|
|
1711
|
+
disabled?: boolean;
|
|
1712
|
+
/**
|
|
1713
|
+
* When true, shows a search input at the top of the dropdown
|
|
1714
|
+
* that filters the option list in real time.
|
|
1715
|
+
*/
|
|
1716
|
+
filter?: boolean;
|
|
1717
|
+
/** Placeholder for the search input. Defaults to "Search…". */
|
|
1718
|
+
filterPlaceholder?: string;
|
|
1719
|
+
/** Size variant. sm = 10px / md = 12px (default) / lg = 14px. */
|
|
1720
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1721
|
+
className?: string;
|
|
1722
|
+
style?: React.CSSProperties;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
export declare function SeverityChip({ label, severity, dismissible, onDismiss }: SeverityChipProps): JSX_2.Element;
|
|
1726
|
+
|
|
1727
|
+
export declare namespace SeverityChip {
|
|
1728
|
+
var displayName: string;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
export declare interface SeverityChipProps {
|
|
1732
|
+
label: string;
|
|
1733
|
+
severity: SeverityChipVariant;
|
|
1734
|
+
/**
|
|
1735
|
+
* Whether the dismiss (✕) button is shown.
|
|
1736
|
+
* @default true
|
|
1737
|
+
*/
|
|
1738
|
+
dismissible?: boolean;
|
|
1739
|
+
onDismiss?: () => void;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
export declare type SeverityChipVariant = 'plain' | 'contrast' | 'error' | 'warning' | 'informative' | 'success';
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* SidePanel — Clear Design System
|
|
1746
|
+
*
|
|
1747
|
+
* A fixed-position drawer that slides in from the right edge. It **pushes**
|
|
1748
|
+
* main content (no overlay). Use with `SidePanelLayout` to shift the page
|
|
1749
|
+
* content left when the panel opens.
|
|
1750
|
+
*
|
|
1751
|
+
* @example
|
|
1752
|
+
* <SidePanelLayout open={open} panelWidth={470}>
|
|
1753
|
+
* <main>…page content…</main>
|
|
1754
|
+
* </SidePanelLayout>
|
|
1755
|
+
* <SidePanel isOpen={open} onClose={() => setOpen(false)} title="Ryan Smith">
|
|
1756
|
+
* …panel body…
|
|
1757
|
+
* </SidePanel>
|
|
1758
|
+
*/
|
|
1759
|
+
export declare const SidePanel: ForwardRefExoticComponent<SidePanelProps & RefAttributes<HTMLDivElement>>;
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* SidePanelLayout — Clear Design System
|
|
1763
|
+
*
|
|
1764
|
+
* A thin layout wrapper that pushes the main content left when a `SidePanel`
|
|
1765
|
+
* is open. Place this around the page's main content area, then render a
|
|
1766
|
+
* `SidePanel` alongside it (outside this wrapper).
|
|
1767
|
+
*
|
|
1768
|
+
* @example
|
|
1769
|
+
* <SidePanelLayout open={panelOpen} panelWidth={470}>
|
|
1770
|
+
* <main>…page content…</main>
|
|
1771
|
+
* </SidePanelLayout>
|
|
1772
|
+
* <SidePanel isOpen={panelOpen} onClose={close} title="Details">…</SidePanel>
|
|
1773
|
+
*/
|
|
1774
|
+
export declare const SidePanelLayout: ForwardRefExoticComponent<SidePanelLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
1775
|
+
|
|
1776
|
+
export declare interface SidePanelLayoutProps {
|
|
1777
|
+
/** Should match SidePanel's `isOpen` */
|
|
1778
|
+
open: boolean;
|
|
1779
|
+
/** Should match SidePanel's `width`. @default 470 */
|
|
1780
|
+
panelWidth?: number;
|
|
1781
|
+
/** The main page content that gets pushed left */
|
|
1782
|
+
children: React.ReactNode;
|
|
1783
|
+
className?: string;
|
|
1784
|
+
style?: React.CSSProperties;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
export declare interface SidePanelProps {
|
|
1788
|
+
/** Controls open/closed state */
|
|
1789
|
+
isOpen: boolean;
|
|
1790
|
+
/** Called when the ✕ button is pressed */
|
|
1791
|
+
onClose: () => void;
|
|
1792
|
+
/** Primary heading (e.g. borrower name). When omitted, the title row is hidden. */
|
|
1793
|
+
title?: string;
|
|
1794
|
+
/** Subtitle row below the title (e.g. phone + loan# link as ReactNode) */
|
|
1795
|
+
subtitle?: React.ReactNode;
|
|
1796
|
+
/**
|
|
1797
|
+
* When provided, renders a Save button in the header (teal, sm).
|
|
1798
|
+
* Called on Save click.
|
|
1799
|
+
*/
|
|
1800
|
+
onSave?: () => void;
|
|
1801
|
+
/**
|
|
1802
|
+
* Slot below the title row — intended for the future BoltDropdown
|
|
1803
|
+
* section navigator. Accepts any ReactNode.
|
|
1804
|
+
*/
|
|
1805
|
+
headerContent?: React.ReactNode;
|
|
1806
|
+
/** Panel width in px. @default 470 */
|
|
1807
|
+
width?: number;
|
|
1808
|
+
/** Panel body content (scrollable). */
|
|
1809
|
+
children: React.ReactNode;
|
|
1810
|
+
className?: string;
|
|
1811
|
+
style?: React.CSSProperties;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
export declare interface SortMeta {
|
|
1815
|
+
field: string;
|
|
1816
|
+
order: SortOrder;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
export declare type SortOrder = 1 | -1;
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* SplitButton — Clear Design System
|
|
1823
|
+
*
|
|
1824
|
+
* Two joined buttons in a single pill:
|
|
1825
|
+
* - **Left** (main): executes the primary action when clicked.
|
|
1826
|
+
* - **Right** (trigger): opens a dropdown of secondary actions.
|
|
1827
|
+
*
|
|
1828
|
+
* @example
|
|
1829
|
+
* <SplitButton
|
|
1830
|
+
* label="Import"
|
|
1831
|
+
* onAction={handleImport}
|
|
1832
|
+
* items={[
|
|
1833
|
+
* { label: 'Import Liabilities', value: 'liabilities' },
|
|
1834
|
+
* { label: 'View Report', value: 'report' },
|
|
1835
|
+
* { label: 'Get MI Quote', value: 'mi' },
|
|
1836
|
+
* ]}
|
|
1837
|
+
* onSelect={handleSelect}
|
|
1838
|
+
* />
|
|
1839
|
+
*
|
|
1840
|
+
* @example
|
|
1841
|
+
* <SplitButton label="Save" variant="secondary" onAction={onSave} items={moreActions} onSelect={onSelect} />
|
|
1842
|
+
*/
|
|
1843
|
+
export declare const SplitButton: ForwardRefExoticComponent<SplitButtonProps & RefAttributes<HTMLDivElement>>;
|
|
1844
|
+
|
|
1845
|
+
export declare interface SplitButtonItem {
|
|
1846
|
+
/** Displayed label. */
|
|
1847
|
+
label: string;
|
|
1848
|
+
/** Unique identifier passed to `onSelect`. */
|
|
1849
|
+
value: string;
|
|
1850
|
+
/** Optional icon before the label. */
|
|
1851
|
+
icon?: React.ReactNode;
|
|
1852
|
+
/** When true, the item is non-interactive and visually muted. */
|
|
1853
|
+
disabled?: boolean;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
export declare interface SplitButtonProps {
|
|
1857
|
+
/** Label shown in the main action area. */
|
|
1858
|
+
label: string;
|
|
1859
|
+
/** Called when the user clicks the main action button (left side). */
|
|
1860
|
+
onAction?: () => void;
|
|
1861
|
+
/** Items shown in the dropdown, opened by clicking the right trigger. */
|
|
1862
|
+
items: SplitButtonItem[];
|
|
1863
|
+
/** Called when the user picks an item from the dropdown. */
|
|
1864
|
+
onSelect?: (value: string) => void;
|
|
1865
|
+
/**
|
|
1866
|
+
* Visual style.
|
|
1867
|
+
* - `'primary'` — both sides teal-700, forming a seamless pill.
|
|
1868
|
+
* - `'secondary'` — left side teal-50 (secondary), right trigger teal-700 (primary). Use when the button needs less visual weight.
|
|
1869
|
+
* Defaults to `'primary'`.
|
|
1870
|
+
*/
|
|
1871
|
+
variant?: 'primary' | 'secondary';
|
|
1872
|
+
/** Size. `'md'` = 36px height (default). `'sm'` = 24px height. */
|
|
1873
|
+
size?: 'md' | 'sm';
|
|
1874
|
+
/** Optional icon rendered before the label in the main action area. */
|
|
1875
|
+
leadingIcon?: React.ReactNode;
|
|
1876
|
+
/** Disables the entire component. */
|
|
1877
|
+
disabled?: boolean;
|
|
1878
|
+
/** Accessible label for the dropdown trigger. Defaults to `"More options"`. */
|
|
1879
|
+
triggerAriaLabel?: string;
|
|
1880
|
+
className?: string;
|
|
1881
|
+
style?: React.CSSProperties;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
export declare interface StaticToastProps {
|
|
1885
|
+
severity: ToastSeverity;
|
|
1886
|
+
title: string;
|
|
1887
|
+
detail?: string;
|
|
1888
|
+
layout?: ToastLayout;
|
|
1889
|
+
onClose?: () => void;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
export declare type StatusColor = 'green' | 'yellow' | 'red' | 'gray';
|
|
1893
|
+
|
|
1894
|
+
export declare type StatusShape = 'dot' | 'diamond' | 'square' | 'none';
|
|
1895
|
+
|
|
1896
|
+
export declare interface TabItem {
|
|
1897
|
+
/** Unique identifier for this tab. */
|
|
1898
|
+
id: string;
|
|
1899
|
+
/** Display label. */
|
|
1900
|
+
label: string;
|
|
1901
|
+
/** Optional leading icon (any ReactNode). */
|
|
1902
|
+
icon?: React.ReactNode;
|
|
1903
|
+
/** Optional trailing count badge. */
|
|
1904
|
+
count?: number;
|
|
1905
|
+
/**
|
|
1906
|
+
* Second icon rendered after the label, before the count.
|
|
1907
|
+
* When present a `|` pipe separator is inserted between the label and this icon.
|
|
1908
|
+
*/
|
|
1909
|
+
icon2?: React.ReactNode;
|
|
1910
|
+
/** Panel content rendered when this tab is active. */
|
|
1911
|
+
content?: React.ReactNode;
|
|
1912
|
+
/** Prevents interaction when true. */
|
|
1913
|
+
disabled?: boolean;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
/**
|
|
1917
|
+
* Tabs — Clear Design System
|
|
1918
|
+
*
|
|
1919
|
+
* Standard underline-style tab strip. Fully controlled — the parent owns
|
|
1920
|
+
* which tab is active. Renders the active tab's `content` below the strip.
|
|
1921
|
+
*
|
|
1922
|
+
* @example
|
|
1923
|
+
* const [active, setActive] = useState('tab1');
|
|
1924
|
+
* <Tabs
|
|
1925
|
+
* tabs={[
|
|
1926
|
+
* { id: 'tab1', label: 'Overview', content: <p>Overview content</p> },
|
|
1927
|
+
* { id: 'tab2', label: 'Details', content: <p>Details content</p> },
|
|
1928
|
+
* ]}
|
|
1929
|
+
* activeTab={active}
|
|
1930
|
+
* onChange={setActive}
|
|
1931
|
+
* />
|
|
1932
|
+
*/
|
|
1933
|
+
export declare const Tabs: ForwardRefExoticComponent<TabsProps & RefAttributes<HTMLDivElement>>;
|
|
1934
|
+
|
|
1935
|
+
export declare interface TabsProps {
|
|
1936
|
+
/** Array of tab definitions. */
|
|
1937
|
+
tabs: TabItem[];
|
|
1938
|
+
/** Controlled: id of the currently active tab. */
|
|
1939
|
+
activeTab: string;
|
|
1940
|
+
/** Called with the id of the tab the user selected. */
|
|
1941
|
+
onChange: (id: string) => void;
|
|
1942
|
+
className?: string;
|
|
1943
|
+
style?: React.CSSProperties;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* TextArea — Clear Design System
|
|
1948
|
+
*
|
|
1949
|
+
* A multi-line text input with label, helper text, character counter (when
|
|
1950
|
+
* `maxLength` is set), and full state coverage: default, hover, focus, filled,
|
|
1951
|
+
* invalid, and disabled. Supports optional auto-grow behaviour.
|
|
1952
|
+
*
|
|
1953
|
+
* @example
|
|
1954
|
+
* <TextArea label="Loan notes" placeholder="Enter notes…" rows={4} />
|
|
1955
|
+
*
|
|
1956
|
+
* @example
|
|
1957
|
+
* <TextArea label="Comments" maxLength={500} />
|
|
1958
|
+
*
|
|
1959
|
+
* @example
|
|
1960
|
+
* <TextArea label="Description" autoGrow />
|
|
1961
|
+
*
|
|
1962
|
+
* @example
|
|
1963
|
+
* <TextArea label="Notes" invalid helperText="This field is required." />
|
|
1964
|
+
*/
|
|
1965
|
+
export declare const TextArea: ForwardRefExoticComponent<TextAreaProps & RefAttributes<HTMLTextAreaElement>>;
|
|
1966
|
+
|
|
1967
|
+
export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
|
|
1968
|
+
/** Label shown above the textarea. */
|
|
1969
|
+
label?: string;
|
|
1970
|
+
/** Adds a red asterisk to the label and sets aria-required. */
|
|
1971
|
+
required?: boolean;
|
|
1972
|
+
/** Helper text shown below the textarea. Turns red when `invalid` is true. */
|
|
1973
|
+
helperText?: string;
|
|
1974
|
+
/** Renders the invalid/error state with red border, red-50 background, and red helper text. */
|
|
1975
|
+
invalid?: boolean;
|
|
1976
|
+
/** Number of visible text rows. Defaults to 3. */
|
|
1977
|
+
rows?: number;
|
|
1978
|
+
/**
|
|
1979
|
+
* When true, the textarea grows in height automatically as the user types,
|
|
1980
|
+
* instead of showing a scrollbar.
|
|
1981
|
+
*/
|
|
1982
|
+
autoGrow?: boolean;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* A static, non-dismissing version of a single toast — useful for Storybook
|
|
1987
|
+
* and visual testing without needing the imperative API.
|
|
1988
|
+
*/
|
|
1989
|
+
export declare function Toast({ severity, title, detail, layout, onClose }: StaticToastProps): JSX_2.Element;
|
|
1990
|
+
|
|
1991
|
+
export declare namespace Toast {
|
|
1992
|
+
var displayName: string;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Imperative toast API. Requires `<Toaster />` to be mounted in the app.
|
|
1997
|
+
*
|
|
1998
|
+
* @example
|
|
1999
|
+
* toast.success('Saved', 'Loan application saved successfully.');
|
|
2000
|
+
* toast.error('Failed', 'Unable to update loan. Please try again.');
|
|
2001
|
+
*/
|
|
2002
|
+
export declare const toast: {
|
|
2003
|
+
success: (title: string, detail?: string, opts?: ToastOptions) => void;
|
|
2004
|
+
info: (title: string, detail?: string, opts?: ToastOptions) => void;
|
|
2005
|
+
warn: (title: string, detail?: string, opts?: ToastOptions) => void;
|
|
2006
|
+
error: (title: string, detail?: string, opts?: ToastOptions) => void;
|
|
2007
|
+
};
|
|
2008
|
+
|
|
2009
|
+
/**
|
|
2010
|
+
* Toaster — mount once in your app root to enable toast notifications.
|
|
2011
|
+
*
|
|
2012
|
+
* @example
|
|
2013
|
+
* // In App.tsx or layout root:
|
|
2014
|
+
* <Toaster />
|
|
2015
|
+
*
|
|
2016
|
+
* // Anywhere else:
|
|
2017
|
+
* toast.success('Saved', 'Your changes have been saved.');
|
|
2018
|
+
*/
|
|
2019
|
+
export declare function Toaster(): ReactPortal | null;
|
|
2020
|
+
|
|
2021
|
+
export declare namespace Toaster {
|
|
2022
|
+
var displayName: string;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
export declare type ToastLayout = 'horizontal' | 'vertical';
|
|
2026
|
+
|
|
2027
|
+
export declare interface ToastOptions {
|
|
2028
|
+
/**
|
|
2029
|
+
* How the title and detail are arranged.
|
|
2030
|
+
* - `horizontal` (default): title and detail on one line — for short messages.
|
|
2031
|
+
* - `vertical`: title on top, detail below — for longer descriptions.
|
|
2032
|
+
*/
|
|
2033
|
+
layout?: ToastLayout;
|
|
2034
|
+
/**
|
|
2035
|
+
* Auto-dismiss delay in ms. Set to `0` to disable auto-dismiss.
|
|
2036
|
+
* @default 5000
|
|
2037
|
+
*/
|
|
2038
|
+
duration?: number;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
export declare type ToastSeverity = 'success' | 'info' | 'warn' | 'error';
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* ToggleSwitch — Clear Design System
|
|
2045
|
+
*
|
|
2046
|
+
* A binary on/off toggle. Use when an action takes immediate effect
|
|
2047
|
+
* (no Save/Submit required). Supports label, helper text, disabled,
|
|
2048
|
+
* and controlled/uncontrolled usage.
|
|
2049
|
+
*
|
|
2050
|
+
* @example
|
|
2051
|
+
* <ToggleSwitch label="Enable notifications" checked={on} onChange={e => setOn(e.target.checked)} />
|
|
2052
|
+
*
|
|
2053
|
+
* @example
|
|
2054
|
+
* <ToggleSwitch label="Auto-lock" defaultChecked />
|
|
2055
|
+
*
|
|
2056
|
+
* @example
|
|
2057
|
+
* <ToggleSwitch label="Feature locked" disabled />
|
|
2058
|
+
*/
|
|
2059
|
+
export declare const ToggleSwitch: ForwardRefExoticComponent<ToggleSwitchProps & RefAttributes<HTMLInputElement>>;
|
|
2060
|
+
|
|
2061
|
+
export declare interface ToggleSwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'children' | 'size'> {
|
|
2062
|
+
/** Label shown to the right of the switch. */
|
|
2063
|
+
label?: React.ReactNode;
|
|
2064
|
+
/** Helper text shown below the switch row. */
|
|
2065
|
+
helperText?: string;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* Tooltip — Clear Design System
|
|
2070
|
+
*
|
|
2071
|
+
* A small informational bubble anchored to a trigger element. Appears on
|
|
2072
|
+
* hover and keyboard focus; hides on mouse leave and blur.
|
|
2073
|
+
*
|
|
2074
|
+
* Wraps its child in an inline container — the child itself is not modified.
|
|
2075
|
+
* Uses `aria-describedby` to associate the tooltip text with the trigger for
|
|
2076
|
+
* screen readers.
|
|
2077
|
+
*
|
|
2078
|
+
* @example
|
|
2079
|
+
* <Tooltip content="Delete this record" placement="top">
|
|
2080
|
+
* <IconButton icon={<i className="pi pi-trash" />} aria-label="Delete" />
|
|
2081
|
+
* </Tooltip>
|
|
2082
|
+
*/
|
|
2083
|
+
export declare function Tooltip({ content, children, placement, delay, disabled, maxWidth, className, }: TooltipProps): JSX_2.Element;
|
|
2084
|
+
|
|
2085
|
+
export declare namespace Tooltip {
|
|
2086
|
+
var displayName: string;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
2090
|
+
|
|
2091
|
+
export declare interface TooltipProps {
|
|
2092
|
+
/** Content displayed inside the tooltip bubble */
|
|
2093
|
+
content: React.ReactNode;
|
|
2094
|
+
/** The element the tooltip is anchored to */
|
|
2095
|
+
children: React.ReactNode;
|
|
2096
|
+
/**
|
|
2097
|
+
* Which side the tooltip appears on relative to the trigger.
|
|
2098
|
+
* @default 'top'
|
|
2099
|
+
*/
|
|
2100
|
+
placement?: TooltipPlacement;
|
|
2101
|
+
/**
|
|
2102
|
+
* Delay in ms before the tooltip appears on hover.
|
|
2103
|
+
* @default 200
|
|
2104
|
+
*/
|
|
2105
|
+
delay?: number;
|
|
2106
|
+
/** When true, the tooltip will not appear */
|
|
2107
|
+
disabled?: boolean;
|
|
2108
|
+
/**
|
|
2109
|
+
* Maximum width of the tooltip bubble in px. Content wraps when exceeded.
|
|
2110
|
+
* @default 140
|
|
2111
|
+
*/
|
|
2112
|
+
maxWidth?: number;
|
|
2113
|
+
className?: string;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
export declare const TopBar: default_2.ForwardRefExoticComponent<TopBarProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2117
|
+
|
|
2118
|
+
export declare interface TopBarMenuItem {
|
|
2119
|
+
label: string;
|
|
2120
|
+
value: string;
|
|
2121
|
+
icon?: default_2.ReactNode;
|
|
2122
|
+
disabled?: boolean;
|
|
2123
|
+
divider?: boolean;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
export declare function TopBarMobile({ borrower, onMenuOpen, onSearchOpen, profile, className, style, }: TopBarMobileProps): JSX_2.Element;
|
|
2127
|
+
|
|
2128
|
+
export declare interface TopBarMobileBorrower {
|
|
2129
|
+
name: string;
|
|
2130
|
+
onInfoClick?: () => void;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
export declare interface TopBarMobileProps {
|
|
2134
|
+
/** When provided → URLA mode: small C logo left + borrower name center */
|
|
2135
|
+
borrower?: TopBarMobileBorrower;
|
|
2136
|
+
onMenuOpen?: () => void;
|
|
2137
|
+
onSearchOpen?: () => void;
|
|
2138
|
+
profile: TopBarUserProfile;
|
|
2139
|
+
className?: string;
|
|
2140
|
+
style?: default_2.CSSProperties;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
export declare interface TopBarNavItem {
|
|
2144
|
+
id: string;
|
|
2145
|
+
label: string;
|
|
2146
|
+
items?: TopBarMenuItem[];
|
|
2147
|
+
onSelect?: (value: string) => void;
|
|
2148
|
+
/** Teal color + plus-circle icon (for the Create CTA) */
|
|
2149
|
+
isPrimary?: boolean;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
export declare interface TopBarProps {
|
|
2153
|
+
/** e.g. "v.1.88.3459" — shown in small text next to logo */
|
|
2154
|
+
version?: string;
|
|
2155
|
+
navItems: TopBarNavItem[];
|
|
2156
|
+
onSearch?: (query: string) => void;
|
|
2157
|
+
searchPlaceholder?: string;
|
|
2158
|
+
profile: TopBarUserProfile;
|
|
2159
|
+
className?: string;
|
|
2160
|
+
style?: default_2.CSSProperties;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
export declare interface TopBarUserProfile {
|
|
2164
|
+
name: string;
|
|
2165
|
+
/** Shown above the avatar. E.g. "Loan Officer" */
|
|
2166
|
+
role?: string;
|
|
2167
|
+
/** 1–2 char initials. Defaults to first letters of name words. */
|
|
2168
|
+
initials?: string;
|
|
2169
|
+
menuItems?: TopBarMenuItem[];
|
|
2170
|
+
onMenuSelect?: (value: string) => void;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
* URLATabsNav — Clear Design System
|
|
2175
|
+
*
|
|
2176
|
+
* Single-row sub-navigation bar for the URLA section of the loan origination app.
|
|
2177
|
+
*
|
|
2178
|
+
* - **Left section**: applicant selector (245px) + optional sort button (47px)
|
|
2179
|
+
* - **Divider**: 1px vertical rule (35px tall)
|
|
2180
|
+
* - **Right section**: optional AUS action buttons + scrollable tab strip
|
|
2181
|
+
*
|
|
2182
|
+
* @example
|
|
2183
|
+
* <URLATabsNav
|
|
2184
|
+
* applicants={[{ id: 'joint', label: 'Ryan Smith | Laura Smith' }]}
|
|
2185
|
+
* selectedApplicantId="joint"
|
|
2186
|
+
* onApplicantChange={setApplicant}
|
|
2187
|
+
* tabs={tabs}
|
|
2188
|
+
* activeTabId={activeTab}
|
|
2189
|
+
* onTabChange={setActiveTab}
|
|
2190
|
+
* />
|
|
2191
|
+
*/
|
|
2192
|
+
export declare const URLATabsNav: ForwardRefExoticComponent<URLATabsNavProps & RefAttributes<HTMLDivElement>>;
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* An option in the applicant selector.
|
|
2196
|
+
* A single option may represent one borrower or a combined group (e.g. spouses).
|
|
2197
|
+
*/
|
|
2198
|
+
export declare interface URLATabsNavApplicantOption {
|
|
2199
|
+
id: string;
|
|
2200
|
+
label: string;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
/** An item in a dropdown menu (sort, section, actions, etc.). */
|
|
2204
|
+
export declare interface URLATabsNavMenuItem {
|
|
2205
|
+
label: string;
|
|
2206
|
+
value: string;
|
|
2207
|
+
disabled?: boolean;
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
/**
|
|
2211
|
+
* URLATabsNavMobile — two-row touch-optimised variant for mobile viewports (~768px).
|
|
2212
|
+
*
|
|
2213
|
+
* Row 1: borrower name + "Loan Details ⓘ" | section dropdown | sort pill | Actions | Save
|
|
2214
|
+
* Row 2: AUS pills | applicant selector (44px) | sort button (62×44) | tab dropdown (fill)
|
|
2215
|
+
*/
|
|
2216
|
+
export declare const URLATabsNavMobile: ForwardRefExoticComponent<URLATabsNavMobileProps & RefAttributes<HTMLDivElement>>;
|
|
2217
|
+
|
|
2218
|
+
export declare interface URLATabsNavMobileProps {
|
|
2219
|
+
borrowerName: string;
|
|
2220
|
+
onLoanDetailsClick?: () => void;
|
|
2221
|
+
sectionLabel: string;
|
|
2222
|
+
sectionItems?: URLATabsNavMenuItem[];
|
|
2223
|
+
onSectionSelect?: (value: string) => void;
|
|
2224
|
+
onSectionSort?: () => void;
|
|
2225
|
+
actionItems?: URLATabsNavMenuItem[];
|
|
2226
|
+
onActionSelect?: (value: string) => void;
|
|
2227
|
+
onSave?: () => void;
|
|
2228
|
+
applicants: URLATabsNavApplicantOption[];
|
|
2229
|
+
selectedApplicantId: string;
|
|
2230
|
+
onApplicantChange: (id: string) => void;
|
|
2231
|
+
onAddApplicant?: () => void;
|
|
2232
|
+
sortItems?: URLATabsNavMenuItem[];
|
|
2233
|
+
onSortSelect?: (value: string) => void;
|
|
2234
|
+
onNextValidation?: () => void;
|
|
2235
|
+
nextValidationBadge?: number;
|
|
2236
|
+
onBackToAUS?: () => void;
|
|
2237
|
+
tabs: URLATabsNavTab[];
|
|
2238
|
+
activeTabId: string;
|
|
2239
|
+
onTabChange: (id: string) => void;
|
|
2240
|
+
className?: string;
|
|
2241
|
+
style?: React.CSSProperties;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
export declare interface URLATabsNavProps {
|
|
2245
|
+
applicants: URLATabsNavApplicantOption[];
|
|
2246
|
+
selectedApplicantId: string;
|
|
2247
|
+
onApplicantChange: (id: string) => void;
|
|
2248
|
+
onAddApplicant?: () => void;
|
|
2249
|
+
sortItems?: URLATabsNavMenuItem[];
|
|
2250
|
+
onSortSelect?: (value: string) => void;
|
|
2251
|
+
tabs: URLATabsNavTab[];
|
|
2252
|
+
activeTabId: string;
|
|
2253
|
+
onTabChange: (id: string) => void;
|
|
2254
|
+
onNextValidation?: () => void;
|
|
2255
|
+
nextValidationBadge?: number;
|
|
2256
|
+
onBackToAUS?: () => void;
|
|
2257
|
+
className?: string;
|
|
2258
|
+
style?: React.CSSProperties;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
/** A single tab item. */
|
|
2262
|
+
export declare interface URLATabsNavTab {
|
|
2263
|
+
id: string;
|
|
2264
|
+
label: string;
|
|
2265
|
+
disabled?: boolean;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
/**
|
|
2269
|
+
* URLATabsNavTablet — two-row variant of URLATabsNav for tablet viewports (~992px).
|
|
2270
|
+
*
|
|
2271
|
+
* Row 1: borrower name + "Loan Details ⓘ" | divider | applicant selector + sort | divider | AUS buttons
|
|
2272
|
+
* Row 2: scrollable tab strip + optional red count badge
|
|
2273
|
+
*/
|
|
2274
|
+
export declare const URLATabsNavTablet: ForwardRefExoticComponent<URLATabsNavTabletProps & RefAttributes<HTMLDivElement>>;
|
|
2275
|
+
|
|
2276
|
+
export declare interface URLATabsNavTabletProps {
|
|
2277
|
+
borrowerName: string;
|
|
2278
|
+
onLoanDetailsClick?: () => void;
|
|
2279
|
+
applicants: URLATabsNavApplicantOption[];
|
|
2280
|
+
selectedApplicantId: string;
|
|
2281
|
+
onApplicantChange: (id: string) => void;
|
|
2282
|
+
onAddApplicant?: () => void;
|
|
2283
|
+
sortItems?: URLATabsNavMenuItem[];
|
|
2284
|
+
onSortSelect?: (value: string) => void;
|
|
2285
|
+
onNextValidation?: () => void;
|
|
2286
|
+
nextValidationBadge?: number;
|
|
2287
|
+
onBackToAUS?: () => void;
|
|
2288
|
+
tabs: URLATabsNavTab[];
|
|
2289
|
+
activeTabId: string;
|
|
2290
|
+
onTabChange: (id: string) => void;
|
|
2291
|
+
tabStripBadge?: number;
|
|
2292
|
+
className?: string;
|
|
2293
|
+
style?: React.CSSProperties;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
export { }
|