@cmgfi/clear-ds 1.2.1 → 1.2.3
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 +43 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +244 -45
- package/dist/index.mjs +4245 -4208
- package/dist/index.mjs.map +1 -1
- package/dist/tokens/tokens.css +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ import { RefAttributes } from 'react';
|
|
|
13
13
|
* (all three use a light gray header).
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
|
+
*
|
|
17
|
+
* ```tsx
|
|
16
18
|
* const [open, setOpen] = useState(['item1']);
|
|
17
19
|
* <Accordion
|
|
18
20
|
* variant="page"
|
|
@@ -23,6 +25,7 @@ import { RefAttributes } from 'react';
|
|
|
23
25
|
* openIds={open}
|
|
24
26
|
* onChange={setOpen}
|
|
25
27
|
* />
|
|
28
|
+
* ```
|
|
26
29
|
*/
|
|
27
30
|
export declare const Accordion: ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>>;
|
|
28
31
|
|
|
@@ -179,8 +182,11 @@ export declare interface BannerTabItem {
|
|
|
179
182
|
* Fully controlled — the parent owns which tab is active.
|
|
180
183
|
*
|
|
181
184
|
* @example
|
|
185
|
+
*
|
|
186
|
+
* ```tsx
|
|
182
187
|
* const [active, setActive] = useState('loan-summary');
|
|
183
188
|
* <BannerTabs items={loanStages} activeId={active} onChange={setActive} />
|
|
189
|
+
* ```
|
|
184
190
|
*/
|
|
185
191
|
export declare const BannerTabs: ForwardRefExoticComponent<BannerTabsProps & RefAttributes<HTMLDivElement>>;
|
|
186
192
|
|
|
@@ -207,16 +213,25 @@ export declare interface BannerTabStatus {
|
|
|
207
213
|
* leading/trailing icons, and an optional notification badge.
|
|
208
214
|
*
|
|
209
215
|
* @example
|
|
210
|
-
* <Button>Submit</Button>
|
|
211
216
|
*
|
|
217
|
+
* ```tsx
|
|
218
|
+
* <Button>Submit</Button>
|
|
219
|
+
* ```
|
|
212
220
|
* @example
|
|
213
|
-
* <Button variant="secondary" size="sm">Cancel</Button>
|
|
214
221
|
*
|
|
222
|
+
* ```tsx
|
|
223
|
+
* <Button variant="secondary" size="sm">Cancel</Button>
|
|
224
|
+
* ```
|
|
215
225
|
* @example
|
|
216
|
-
* <Button variant="danger" leadingIcon={<i className="pi pi-trash" />}>Delete</Button>
|
|
217
226
|
*
|
|
227
|
+
* ```tsx
|
|
228
|
+
* <Button variant="danger" leadingIcon={<i className="pi pi-trash" />}>Delete</Button>
|
|
229
|
+
* ```
|
|
218
230
|
* @example
|
|
231
|
+
*
|
|
232
|
+
* ```tsx
|
|
219
233
|
* <Button badge={3} trailingIcon={<i className="pi pi-chevron-down" />}>Actions</Button>
|
|
234
|
+
* ```
|
|
220
235
|
*/
|
|
221
236
|
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
222
237
|
|
|
@@ -254,10 +269,15 @@ export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger'
|
|
|
254
269
|
* inside DatePicker, extracted for use on its own.
|
|
255
270
|
*
|
|
256
271
|
* @example
|
|
257
|
-
* <Calendar value={date} onChange={setDate} />
|
|
258
272
|
*
|
|
273
|
+
* ```tsx
|
|
274
|
+
* <Calendar value={date} onChange={setDate} />
|
|
275
|
+
* ```
|
|
259
276
|
* @example
|
|
277
|
+
*
|
|
278
|
+
* ```tsx
|
|
260
279
|
* <Calendar value={date} onChange={setDate} minDate={new Date()} showFooter />
|
|
280
|
+
* ```
|
|
261
281
|
*/
|
|
262
282
|
export declare const Calendar: ForwardRefExoticComponent<CalendarProps & RefAttributes<HTMLDivElement>>;
|
|
263
283
|
|
|
@@ -292,20 +312,27 @@ export declare interface CalendarProps {
|
|
|
292
312
|
* All sections are optional — use what you need.
|
|
293
313
|
*
|
|
294
314
|
* @example
|
|
315
|
+
*
|
|
316
|
+
* ```tsx
|
|
295
317
|
* // Standard card
|
|
296
318
|
* <Card title="Loan Summary" subTitle="Application #12345" footer={<Button>View</Button>}>
|
|
297
319
|
* <p>Body content goes here.</p>
|
|
298
320
|
* </Card>
|
|
299
|
-
*
|
|
321
|
+
* ```
|
|
300
322
|
* @example
|
|
323
|
+
*
|
|
324
|
+
* ```tsx
|
|
301
325
|
* // Content-only container (no header or footer)
|
|
302
326
|
* <Card><DataTable ... /></Card>
|
|
303
|
-
*
|
|
327
|
+
* ```
|
|
304
328
|
* @example
|
|
329
|
+
*
|
|
330
|
+
* ```tsx
|
|
305
331
|
* // Interactive / clickable card
|
|
306
332
|
* <Card title="Open Application" onClick={() => navigate('/app/123')}>
|
|
307
333
|
* <p>Click anywhere to open.</p>
|
|
308
334
|
* </Card>
|
|
335
|
+
* ```
|
|
309
336
|
*/
|
|
310
337
|
export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
|
|
311
338
|
|
|
@@ -337,19 +364,30 @@ export declare interface CardProps {
|
|
|
337
364
|
* Three sizes (sm, md, lg) follow the type scale.
|
|
338
365
|
*
|
|
339
366
|
* @example
|
|
340
|
-
* <Checkbox label="Remember me" />
|
|
341
367
|
*
|
|
368
|
+
* ```tsx
|
|
369
|
+
* <Checkbox label="Remember me" />
|
|
370
|
+
* ```
|
|
342
371
|
* @example
|
|
343
|
-
* <Checkbox label="Agree to terms" checked={agreed} onChange={(e) => setAgreed(e.target.checked)} />
|
|
344
372
|
*
|
|
373
|
+
* ```tsx
|
|
374
|
+
* <Checkbox label="Agree to terms" checked={agreed} onChange={(e) => setAgreed(e.target.checked)} />
|
|
375
|
+
* ```
|
|
345
376
|
* @example
|
|
346
|
-
* <Checkbox label="Select all" indeterminate />
|
|
347
377
|
*
|
|
378
|
+
* ```tsx
|
|
379
|
+
* <Checkbox label="Select all" indeterminate />
|
|
380
|
+
* ```
|
|
348
381
|
* @example
|
|
349
|
-
* <Checkbox label="Accept terms" invalid helperText="You must accept the terms to continue." />
|
|
350
382
|
*
|
|
383
|
+
* ```tsx
|
|
384
|
+
* <Checkbox label="Accept terms" invalid helperText="You must accept the terms to continue." />
|
|
385
|
+
* ```
|
|
351
386
|
* @example
|
|
387
|
+
*
|
|
388
|
+
* ```tsx
|
|
352
389
|
* <Checkbox label="Dense option" size="sm" />
|
|
390
|
+
* ```
|
|
353
391
|
*/
|
|
354
392
|
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
355
393
|
|
|
@@ -376,10 +414,15 @@ export declare interface CheckboxProps extends Omit<React.InputHTMLAttributes<HT
|
|
|
376
414
|
* A `Tooltip` showing the `aria-label` is rendered automatically on hover.
|
|
377
415
|
*
|
|
378
416
|
* @example
|
|
379
|
-
* <CloseButton onClick={onClose} />
|
|
380
417
|
*
|
|
418
|
+
* ```tsx
|
|
419
|
+
* <CloseButton onClick={onClose} />
|
|
420
|
+
* ```
|
|
381
421
|
* @example
|
|
422
|
+
*
|
|
423
|
+
* ```tsx
|
|
382
424
|
* <CloseButton aria-label="Close dialog" size="md" onClick={onClose} />
|
|
425
|
+
* ```
|
|
383
426
|
*/
|
|
384
427
|
export declare const CloseButton: ForwardRefExoticComponent<CloseButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
385
428
|
|
|
@@ -418,6 +461,8 @@ export declare interface ColumnFilter {
|
|
|
418
461
|
* expandable row groups, nested row expansion, and inline row/cell editing.
|
|
419
462
|
*
|
|
420
463
|
* @example
|
|
464
|
+
*
|
|
465
|
+
* ```tsx
|
|
421
466
|
* <DataTable
|
|
422
467
|
* data={loans}
|
|
423
468
|
* dataKey="id"
|
|
@@ -426,6 +471,7 @@ export declare interface ColumnFilter {
|
|
|
426
471
|
* { field: 'amount', header: 'Amount', body: (row) => formatCurrency(row.amount) },
|
|
427
472
|
* ]}
|
|
428
473
|
* />
|
|
474
|
+
* ```
|
|
429
475
|
*/
|
|
430
476
|
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;
|
|
431
477
|
|
|
@@ -527,13 +573,20 @@ export declare interface DataTableProps<T extends object = Record<string, unknow
|
|
|
527
573
|
* or pick one from the calendar. Three views: day, month, and year.
|
|
528
574
|
*
|
|
529
575
|
* @example
|
|
530
|
-
* <DatePicker label="Closing date" value={date} onChange={setDate} />
|
|
531
576
|
*
|
|
577
|
+
* ```tsx
|
|
578
|
+
* <DatePicker label="Closing date" value={date} onChange={setDate} />
|
|
579
|
+
* ```
|
|
532
580
|
* @example
|
|
533
|
-
* <DatePicker label="Start date" value={date} onChange={setDate} minDate={new Date()} />
|
|
534
581
|
*
|
|
582
|
+
* ```tsx
|
|
583
|
+
* <DatePicker label="Start date" value={date} onChange={setDate} minDate={new Date()} />
|
|
584
|
+
* ```
|
|
535
585
|
* @example
|
|
586
|
+
*
|
|
587
|
+
* ```tsx
|
|
536
588
|
* <DatePicker label="Date" value={date} onChange={setDate} required invalid helperText="Required." />
|
|
589
|
+
* ```
|
|
537
590
|
*/
|
|
538
591
|
export declare const DatePicker: ForwardRefExoticComponent<DatePickerProps & RefAttributes<HTMLDivElement>>;
|
|
539
592
|
|
|
@@ -582,6 +635,8 @@ export declare const DEFAULT_DOC_TYPES: string[];
|
|
|
582
635
|
* click, or Escape key.
|
|
583
636
|
*
|
|
584
637
|
* @example
|
|
638
|
+
*
|
|
639
|
+
* ```tsx
|
|
585
640
|
* const [open, setOpen] = useState(false);
|
|
586
641
|
* <Drawer
|
|
587
642
|
* isOpen={open}
|
|
@@ -592,6 +647,7 @@ export declare const DEFAULT_DOC_TYPES: string[];
|
|
|
592
647
|
* >
|
|
593
648
|
* <p>Drawer content here…</p>
|
|
594
649
|
* </Drawer>
|
|
650
|
+
* ```
|
|
595
651
|
*/
|
|
596
652
|
export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDivElement>>;
|
|
597
653
|
|
|
@@ -648,6 +704,8 @@ export declare interface DrawerProps {
|
|
|
648
704
|
* variant and size system as Button, with a built-in trailing chevron icon.
|
|
649
705
|
*
|
|
650
706
|
* @example
|
|
707
|
+
*
|
|
708
|
+
* ```tsx
|
|
651
709
|
* <DropdownButton
|
|
652
710
|
* label="Actions"
|
|
653
711
|
* items={[
|
|
@@ -657,9 +715,12 @@ export declare interface DrawerProps {
|
|
|
657
715
|
* ]}
|
|
658
716
|
* onSelect={handleAction}
|
|
659
717
|
* />
|
|
660
|
-
*
|
|
718
|
+
* ```
|
|
661
719
|
* @example
|
|
720
|
+
*
|
|
721
|
+
* ```tsx
|
|
662
722
|
* <DropdownButton label="Export" variant="secondary" size="sm" items={exportItems} onSelect={onExport} />
|
|
723
|
+
* ```
|
|
663
724
|
*/
|
|
664
725
|
export declare const DropdownButton: ForwardRefExoticComponent<DropdownButtonProps & RefAttributes<HTMLDivElement>>;
|
|
665
726
|
|
|
@@ -707,10 +768,13 @@ export declare type EditMode = 'row' | 'cell';
|
|
|
707
768
|
* Invalid file types show an error message below the drop zone.
|
|
708
769
|
*
|
|
709
770
|
* @example
|
|
771
|
+
*
|
|
772
|
+
* ```tsx
|
|
710
773
|
* <FileUpload
|
|
711
774
|
* onFilesAdded={files => myApi.upload(files)}
|
|
712
775
|
* onUpload={results => myApi.classify(results)}
|
|
713
776
|
* />
|
|
777
|
+
* ```
|
|
714
778
|
*/
|
|
715
779
|
export declare function FileUpload({ onFilesAdded, onUpload, docTypes, accept, initialFiles, className, style, }: FileUploadProps): JSX_2.Element;
|
|
716
780
|
|
|
@@ -810,13 +874,20 @@ export declare interface FullNavProps {
|
|
|
810
874
|
* mouse users — no extra prop needed.
|
|
811
875
|
*
|
|
812
876
|
* @example
|
|
813
|
-
* <IconButton icon={<i className="pi pi-search" />} aria-label="Search" />
|
|
814
877
|
*
|
|
878
|
+
* ```tsx
|
|
879
|
+
* <IconButton icon={<i className="pi pi-search" />} aria-label="Search" />
|
|
880
|
+
* ```
|
|
815
881
|
* @example
|
|
816
|
-
* <IconButton icon={<i className="pi pi-trash" />} aria-label="Delete" variant="danger" />
|
|
817
882
|
*
|
|
883
|
+
* ```tsx
|
|
884
|
+
* <IconButton icon={<i className="pi pi-trash" />} aria-label="Delete" variant="danger" />
|
|
885
|
+
* ```
|
|
818
886
|
* @example
|
|
887
|
+
*
|
|
888
|
+
* ```tsx
|
|
819
889
|
* <IconButton icon={<i className="pi pi-plus" />} aria-label="Add" size="sm" />
|
|
890
|
+
* ```
|
|
820
891
|
*/
|
|
821
892
|
export declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
822
893
|
|
|
@@ -837,6 +908,8 @@ export declare interface IconButtonProps extends React.ButtonHTMLAttributes<HTML
|
|
|
837
908
|
* since there is no visible text.
|
|
838
909
|
*/
|
|
839
910
|
'aria-label': string;
|
|
911
|
+
/** Which side the auto-tooltip appears on. Defaults to `'top'`. */
|
|
912
|
+
tooltipPlacement?: TooltipPlacement;
|
|
840
913
|
}
|
|
841
914
|
|
|
842
915
|
export declare function InlineAlert({ severity, message }: InlineAlertProps): JSX_2.Element;
|
|
@@ -874,28 +947,39 @@ export declare interface InlineContainedAlertProps {
|
|
|
874
947
|
* Sizes follow the type scale (sm=10px, md=12px, lg=14px).
|
|
875
948
|
*
|
|
876
949
|
* @example
|
|
950
|
+
*
|
|
951
|
+
* ```tsx
|
|
877
952
|
* // Basic
|
|
878
953
|
* <InputText label="Search" placeholder="Enter a keyword" />
|
|
879
|
-
*
|
|
954
|
+
* ```
|
|
880
955
|
* @example
|
|
956
|
+
*
|
|
957
|
+
* ```tsx
|
|
881
958
|
* // Required with helper text
|
|
882
959
|
* <InputText label="Email" required helperText="We'll never share your email." />
|
|
883
|
-
*
|
|
960
|
+
* ```
|
|
884
961
|
* @example
|
|
962
|
+
*
|
|
963
|
+
* ```tsx
|
|
885
964
|
* // Invalid / error state
|
|
886
965
|
* <InputText label="Email" invalid helperText="Please enter a valid email address." />
|
|
887
|
-
*
|
|
966
|
+
* ```
|
|
888
967
|
* @example
|
|
968
|
+
*
|
|
969
|
+
* ```tsx
|
|
889
970
|
* // With icons
|
|
890
971
|
* <InputText
|
|
891
972
|
* label="Search"
|
|
892
973
|
* prefixIcon={<i className="pi pi-search" />}
|
|
893
974
|
* suffixIcon={<i className="pi pi-times" />}
|
|
894
975
|
* />
|
|
895
|
-
*
|
|
976
|
+
* ```
|
|
896
977
|
* @example
|
|
978
|
+
*
|
|
979
|
+
* ```tsx
|
|
897
980
|
* // Large size
|
|
898
981
|
* <InputText label="Full name" size="lg" placeholder="Jane Smith" />
|
|
982
|
+
* ```
|
|
899
983
|
*/
|
|
900
984
|
export declare const InputText: ForwardRefExoticComponent<InputTextProps & RefAttributes<HTMLInputElement>>;
|
|
901
985
|
|
|
@@ -931,12 +1015,15 @@ export declare interface InputTextProps extends Omit<React.InputHTMLAttributes<H
|
|
|
931
1015
|
* A `Tooltip` showing the `aria-label` is rendered automatically on hover.
|
|
932
1016
|
*
|
|
933
1017
|
* @example
|
|
1018
|
+
*
|
|
1019
|
+
* ```tsx
|
|
934
1020
|
* <LightningButton
|
|
935
1021
|
* variant="basic"
|
|
936
1022
|
* items={[{ label: 'Copy Loan', value: 'copy' }]}
|
|
937
1023
|
* onSelect={(v) => console.log(v)}
|
|
938
1024
|
* aria-label="Quick actions"
|
|
939
1025
|
* />
|
|
1026
|
+
* ```
|
|
940
1027
|
*/
|
|
941
1028
|
export declare const LightningButton: ForwardRefExoticComponent<LightningButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
942
1029
|
|
|
@@ -982,16 +1069,25 @@ export declare interface LightningButtonProps {
|
|
|
982
1069
|
* grouped option sets with bold group headers.
|
|
983
1070
|
*
|
|
984
1071
|
* @example
|
|
985
|
-
* <ListBox options={items} value={val} onChange={setVal} />
|
|
986
1072
|
*
|
|
1073
|
+
* ```tsx
|
|
1074
|
+
* <ListBox options={items} value={val} onChange={setVal} />
|
|
1075
|
+
* ```
|
|
987
1076
|
* @example
|
|
988
|
-
* <ListBox multiple options={items} value={vals} onChange={setVals} />
|
|
989
1077
|
*
|
|
1078
|
+
* ```tsx
|
|
1079
|
+
* <ListBox multiple options={items} value={vals} onChange={setVals} />
|
|
1080
|
+
* ```
|
|
990
1081
|
* @example
|
|
991
|
-
* <ListBox multiple filter label="Loan Type" options={items} value={vals} onChange={setVals} />
|
|
992
1082
|
*
|
|
1083
|
+
* ```tsx
|
|
1084
|
+
* <ListBox multiple filter label="Loan Type" options={items} value={vals} onChange={setVals} />
|
|
1085
|
+
* ```
|
|
993
1086
|
* @example
|
|
1087
|
+
*
|
|
1088
|
+
* ```tsx
|
|
994
1089
|
* <ListBox multiple options={groupedItems} value={vals} onChange={setVals} />
|
|
1090
|
+
* ```
|
|
995
1091
|
*/
|
|
996
1092
|
export declare const ListBox: ForwardRefExoticComponent<ListBoxProps & RefAttributes<HTMLDivElement>>;
|
|
997
1093
|
|
|
@@ -1055,6 +1151,8 @@ export declare interface ListBoxProps {
|
|
|
1055
1151
|
* a `BannerAlert` strip below.
|
|
1056
1152
|
*
|
|
1057
1153
|
* @example
|
|
1154
|
+
*
|
|
1155
|
+
* ```tsx
|
|
1058
1156
|
* <LoanBannerNav
|
|
1059
1157
|
* tabs={tabs}
|
|
1060
1158
|
* activeTabId="urla"
|
|
@@ -1062,6 +1160,7 @@ export declare interface ListBoxProps {
|
|
|
1062
1160
|
* onRefresh={handleRefresh}
|
|
1063
1161
|
* onPrimary={handleSave}
|
|
1064
1162
|
* />
|
|
1163
|
+
* ```
|
|
1065
1164
|
*/
|
|
1066
1165
|
export declare const LoanBannerNav: ForwardRefExoticComponent<LoanBannerNavProps & RefAttributes<HTMLElement>>;
|
|
1067
1166
|
|
|
@@ -1197,13 +1296,13 @@ export declare interface MentionItem {
|
|
|
1197
1296
|
label: string;
|
|
1198
1297
|
}
|
|
1199
1298
|
|
|
1200
|
-
export declare function MiscChip({ label, color, dismissible, onDismiss }: MiscChipProps): JSX_2.Element;
|
|
1299
|
+
export declare function MiscChip({ label, color, dismissible, onDismiss, style, forceFocus }: MiscChipProps): JSX_2.Element;
|
|
1201
1300
|
|
|
1202
1301
|
export declare namespace MiscChip {
|
|
1203
1302
|
var displayName: string;
|
|
1204
1303
|
}
|
|
1205
1304
|
|
|
1206
|
-
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';
|
|
1305
|
+
export declare type MiscChipColor = 'red-darkest' | 'red-dark' | 'red-light' | 'yellow-darkest' | 'yellow-dark' | 'yellow-light' | 'green-darkest' | 'green-dark' | 'green-light' | 'blue-darkest' | 'blue-dark' | 'blue-light' | 'navy-darkest' | 'navy-dark' | 'navy-light';
|
|
1207
1306
|
|
|
1208
1307
|
export declare interface MiscChipProps {
|
|
1209
1308
|
label: string;
|
|
@@ -1214,6 +1313,9 @@ export declare interface MiscChipProps {
|
|
|
1214
1313
|
*/
|
|
1215
1314
|
dismissible?: boolean;
|
|
1216
1315
|
onDismiss?: () => void;
|
|
1316
|
+
style?: React.CSSProperties;
|
|
1317
|
+
/** Forces the dismiss button to render with a visible focus ring — for Storybook focus-state stories. */
|
|
1318
|
+
forceFocus?: boolean;
|
|
1217
1319
|
}
|
|
1218
1320
|
|
|
1219
1321
|
/**
|
|
@@ -1226,6 +1328,8 @@ export declare interface MiscChipProps {
|
|
|
1226
1328
|
* Fully controlled — pass `isOpen` + `onClose`.
|
|
1227
1329
|
*
|
|
1228
1330
|
* @example
|
|
1331
|
+
*
|
|
1332
|
+
* ```tsx
|
|
1229
1333
|
* const [open, setOpen] = useState(false);
|
|
1230
1334
|
* <Modal
|
|
1231
1335
|
* isOpen={open}
|
|
@@ -1240,6 +1344,7 @@ export declare interface MiscChipProps {
|
|
|
1240
1344
|
* >
|
|
1241
1345
|
* <p>Are you sure you want to leave without saving?</p>
|
|
1242
1346
|
* </Modal>
|
|
1347
|
+
* ```
|
|
1243
1348
|
*/
|
|
1244
1349
|
export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDivElement>>;
|
|
1245
1350
|
|
|
@@ -1276,13 +1381,20 @@ export declare interface ModalProps {
|
|
|
1276
1381
|
* and a "Select all" toggle. Three sizes follow the type scale.
|
|
1277
1382
|
*
|
|
1278
1383
|
* @example
|
|
1279
|
-
* <MultiSelect options={items} value={vals} onChange={setVals} label="Loan types" />
|
|
1280
1384
|
*
|
|
1385
|
+
* ```tsx
|
|
1386
|
+
* <MultiSelect options={items} value={vals} onChange={setVals} label="Loan types" />
|
|
1387
|
+
* ```
|
|
1281
1388
|
* @example
|
|
1282
|
-
* <MultiSelect options={items} value={vals} onChange={setVals} required invalid helperText="Select at least one." />
|
|
1283
1389
|
*
|
|
1390
|
+
* ```tsx
|
|
1391
|
+
* <MultiSelect options={items} value={vals} onChange={setVals} required invalid helperText="Select at least one." />
|
|
1392
|
+
* ```
|
|
1284
1393
|
* @example
|
|
1394
|
+
*
|
|
1395
|
+
* ```tsx
|
|
1285
1396
|
* <MultiSelect options={items} value={vals} onChange={setVals} filter={false} showSelectAll={false} />
|
|
1397
|
+
* ```
|
|
1286
1398
|
*/
|
|
1287
1399
|
export declare const MultiSelect: ForwardRefExoticComponent<MultiSelectProps & RefAttributes<HTMLDivElement>>;
|
|
1288
1400
|
|
|
@@ -1361,17 +1473,24 @@ export declare interface PageChangeEvent {
|
|
|
1361
1473
|
* paginated list. Three layout templates: `pages`, `report`, and `full`.
|
|
1362
1474
|
*
|
|
1363
1475
|
* @example
|
|
1476
|
+
*
|
|
1477
|
+
* ```tsx
|
|
1364
1478
|
* // Basic page navigation
|
|
1365
1479
|
* <Paginator totalRecords={200} first={0} rows={10} onPageChange={setPage} />
|
|
1366
|
-
*
|
|
1480
|
+
* ```
|
|
1367
1481
|
* @example
|
|
1482
|
+
*
|
|
1483
|
+
* ```tsx
|
|
1368
1484
|
* // Text summary instead of page numbers
|
|
1369
1485
|
* <Paginator totalRecords={200} first={0} rows={10} onPageChange={setPage} template="report" />
|
|
1370
|
-
*
|
|
1486
|
+
* ```
|
|
1371
1487
|
* @example
|
|
1488
|
+
*
|
|
1489
|
+
* ```tsx
|
|
1372
1490
|
* // Full layout with rows-per-page selector
|
|
1373
1491
|
* <Paginator totalRecords={200} first={0} rows={10} onPageChange={setPage}
|
|
1374
1492
|
* template="full" rowsPerPageOptions={[10, 25, 50]} />
|
|
1493
|
+
* ```
|
|
1375
1494
|
*/
|
|
1376
1495
|
export declare const Paginator: ForwardRefExoticComponent<PaginatorProps & RefAttributes<HTMLDivElement>>;
|
|
1377
1496
|
|
|
@@ -1410,6 +1529,8 @@ export declare interface PaginatorProps {
|
|
|
1410
1529
|
* and `onChange` fires with the updated arrays on every move action.
|
|
1411
1530
|
*
|
|
1412
1531
|
* @example
|
|
1532
|
+
*
|
|
1533
|
+
* ```tsx
|
|
1413
1534
|
* // Simple string list
|
|
1414
1535
|
* <Picklist
|
|
1415
1536
|
* sourceItems={source}
|
|
@@ -1418,8 +1539,10 @@ export declare interface PaginatorProps {
|
|
|
1418
1539
|
* sourceHeader="Available"
|
|
1419
1540
|
* targetHeader="Selected"
|
|
1420
1541
|
* />
|
|
1421
|
-
*
|
|
1542
|
+
* ```
|
|
1422
1543
|
* @example
|
|
1544
|
+
*
|
|
1545
|
+
* ```tsx
|
|
1423
1546
|
* // Table-style rows
|
|
1424
1547
|
* <Picklist
|
|
1425
1548
|
* sourceItems={source}
|
|
@@ -1429,6 +1552,7 @@ export declare interface PaginatorProps {
|
|
|
1429
1552
|
* targetHeader={<MyTableHeader />}
|
|
1430
1553
|
* itemTemplate={(item) => <MyTableRow item={item} />}
|
|
1431
1554
|
* />
|
|
1555
|
+
* ```
|
|
1432
1556
|
*/
|
|
1433
1557
|
export declare const Picklist: ForwardRefExoticComponent<PicklistProps & RefAttributes<HTMLDivElement>>;
|
|
1434
1558
|
|
|
@@ -1500,16 +1624,19 @@ export declare interface PicklistProps {
|
|
|
1500
1624
|
* screen position to place itself; the trigger is responsible for toggling state.
|
|
1501
1625
|
*
|
|
1502
1626
|
* @example
|
|
1627
|
+
*
|
|
1628
|
+
* ```tsx
|
|
1503
1629
|
* const [open, setOpen] = useState(false);
|
|
1504
1630
|
* <Popup
|
|
1505
1631
|
* trigger={<Button onClick={() => setOpen(true)}>Details</Button>}
|
|
1506
1632
|
* isOpen={open}
|
|
1507
1633
|
* onClose={() => setOpen(false)}
|
|
1508
1634
|
* title="Loan Details"
|
|
1509
|
-
* footer={<Button size="
|
|
1635
|
+
* footer={<Button size="md" onClick={() => setOpen(false)}>Close</Button>}
|
|
1510
1636
|
* >
|
|
1511
1637
|
* <p>…content…</p>
|
|
1512
1638
|
* </Popup>
|
|
1639
|
+
* ```
|
|
1513
1640
|
*/
|
|
1514
1641
|
export declare const Popup: ForwardRefExoticComponent<PopupProps & RefAttributes<HTMLDivElement>>;
|
|
1515
1642
|
|
|
@@ -1527,7 +1654,7 @@ export declare interface PopupProps {
|
|
|
1527
1654
|
title?: string;
|
|
1528
1655
|
/** Popup body content — any ReactNode */
|
|
1529
1656
|
children: React.ReactNode;
|
|
1530
|
-
/** Footer slot — typically action buttons, right-aligned
|
|
1657
|
+
/** Footer slot — typically action buttons, right-aligned */
|
|
1531
1658
|
footer?: React.ReactNode;
|
|
1532
1659
|
/**
|
|
1533
1660
|
* Which side of the trigger the popup opens on.
|
|
@@ -1641,16 +1768,25 @@ export declare interface ProgressSpinnerProps {
|
|
|
1641
1768
|
* under a shared `name` prop so the browser enforces single selection.
|
|
1642
1769
|
*
|
|
1643
1770
|
* @example
|
|
1644
|
-
* <RadioButton name="plan" value="basic" label="Basic" />
|
|
1645
1771
|
*
|
|
1772
|
+
* ```tsx
|
|
1773
|
+
* <RadioButton name="plan" value="basic" label="Basic" />
|
|
1774
|
+
* ```
|
|
1646
1775
|
* @example
|
|
1647
|
-
* <RadioButton name="plan" value="pro" label="Pro" checked onChange={handleChange} />
|
|
1648
1776
|
*
|
|
1777
|
+
* ```tsx
|
|
1778
|
+
* <RadioButton name="plan" value="pro" label="Pro" checked onChange={handleChange} />
|
|
1779
|
+
* ```
|
|
1649
1780
|
* @example
|
|
1650
|
-
* <RadioButton name="plan" value="enterprise" label="Enterprise" invalid helperText="Contact sales first." />
|
|
1651
1781
|
*
|
|
1782
|
+
* ```tsx
|
|
1783
|
+
* <RadioButton name="plan" value="enterprise" label="Enterprise" invalid helperText="Contact sales first." />
|
|
1784
|
+
* ```
|
|
1652
1785
|
* @example
|
|
1786
|
+
*
|
|
1787
|
+
* ```tsx
|
|
1653
1788
|
* <RadioButton name="plan" value="basic" label="Small" size="sm" />
|
|
1789
|
+
* ```
|
|
1654
1790
|
*/
|
|
1655
1791
|
export declare const RadioButton: ForwardRefExoticComponent<RadioButtonProps & RefAttributes<HTMLInputElement>>;
|
|
1656
1792
|
|
|
@@ -1763,13 +1899,20 @@ export declare interface RuleFilterValue {
|
|
|
1763
1899
|
* idle, hover, active/open, filled, invalid, and disabled.
|
|
1764
1900
|
*
|
|
1765
1901
|
* @example
|
|
1766
|
-
* <Select options={opts} value={val} onChange={setVal} label="Loan type" />
|
|
1767
1902
|
*
|
|
1903
|
+
* ```tsx
|
|
1904
|
+
* <Select options={opts} value={val} onChange={setVal} label="Loan type" />
|
|
1905
|
+
* ```
|
|
1768
1906
|
* @example
|
|
1769
|
-
* <Select options={opts} value={val} onChange={setVal} required invalid helperText="Required." />
|
|
1770
1907
|
*
|
|
1908
|
+
* ```tsx
|
|
1909
|
+
* <Select options={opts} value={val} onChange={setVal} required invalid helperText="Required." />
|
|
1910
|
+
* ```
|
|
1771
1911
|
* @example
|
|
1912
|
+
*
|
|
1913
|
+
* ```tsx
|
|
1772
1914
|
* <Select options={opts} value={val} onChange={setVal} filter size="lg" />
|
|
1915
|
+
* ```
|
|
1773
1916
|
*/
|
|
1774
1917
|
export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLDivElement>>;
|
|
1775
1918
|
|
|
@@ -1783,6 +1926,8 @@ export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttribut
|
|
|
1783
1926
|
* Each option can carry an optional count number and a colored badge indicator.
|
|
1784
1927
|
*
|
|
1785
1928
|
* @example
|
|
1929
|
+
*
|
|
1930
|
+
* ```tsx
|
|
1786
1931
|
* // Toggle group
|
|
1787
1932
|
* <SelectButton
|
|
1788
1933
|
* options={[
|
|
@@ -1793,8 +1938,10 @@ export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttribut
|
|
|
1793
1938
|
* value={view}
|
|
1794
1939
|
* onChange={setView}
|
|
1795
1940
|
* />
|
|
1796
|
-
*
|
|
1941
|
+
* ```
|
|
1797
1942
|
* @example
|
|
1943
|
+
*
|
|
1944
|
+
* ```tsx
|
|
1798
1945
|
* // Dropdown options variant
|
|
1799
1946
|
* <SelectButton
|
|
1800
1947
|
* variant="options"
|
|
@@ -1803,6 +1950,7 @@ export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttribut
|
|
|
1803
1950
|
* onChange={setStatus}
|
|
1804
1951
|
* label="Status"
|
|
1805
1952
|
* />
|
|
1953
|
+
* ```
|
|
1806
1954
|
*/
|
|
1807
1955
|
export declare const SelectButton: ForwardRefExoticComponent<SelectButtonProps & RefAttributes<HTMLDivElement>>;
|
|
1808
1956
|
|
|
@@ -1925,12 +2073,15 @@ export declare type SeverityChipVariant = 'plain' | 'contrast' | 'error' | 'warn
|
|
|
1925
2073
|
* content left when the panel opens.
|
|
1926
2074
|
*
|
|
1927
2075
|
* @example
|
|
2076
|
+
*
|
|
2077
|
+
* ```tsx
|
|
1928
2078
|
* <SidePanelLayout open={open} panelWidth={470}>
|
|
1929
2079
|
* <main>…page content…</main>
|
|
1930
2080
|
* </SidePanelLayout>
|
|
1931
2081
|
* <SidePanel isOpen={open} onClose={() => setOpen(false)} title="Ryan Smith">
|
|
1932
2082
|
* …panel body…
|
|
1933
2083
|
* </SidePanel>
|
|
2084
|
+
* ```
|
|
1934
2085
|
*/
|
|
1935
2086
|
export declare const SidePanel: ForwardRefExoticComponent<SidePanelProps & RefAttributes<HTMLDivElement>>;
|
|
1936
2087
|
|
|
@@ -1942,10 +2093,13 @@ export declare const SidePanel: ForwardRefExoticComponent<SidePanelProps & RefAt
|
|
|
1942
2093
|
* `SidePanel` alongside it (outside this wrapper).
|
|
1943
2094
|
*
|
|
1944
2095
|
* @example
|
|
2096
|
+
*
|
|
2097
|
+
* ```tsx
|
|
1945
2098
|
* <SidePanelLayout open={panelOpen} panelWidth={470}>
|
|
1946
2099
|
* <main>…page content…</main>
|
|
1947
2100
|
* </SidePanelLayout>
|
|
1948
2101
|
* <SidePanel isOpen={panelOpen} onClose={close} title="Details">…</SidePanel>
|
|
2102
|
+
* ```
|
|
1949
2103
|
*/
|
|
1950
2104
|
export declare const SidePanelLayout: ForwardRefExoticComponent<SidePanelLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
1951
2105
|
|
|
@@ -2005,6 +2159,8 @@ export declare type SortOrder = 1 | -1;
|
|
|
2005
2159
|
* (defaults to `"More options"`) since it has no visible text label.
|
|
2006
2160
|
*
|
|
2007
2161
|
* @example
|
|
2162
|
+
*
|
|
2163
|
+
* ```tsx
|
|
2008
2164
|
* <SplitButton
|
|
2009
2165
|
* label="Import"
|
|
2010
2166
|
* onAction={handleImport}
|
|
@@ -2015,9 +2171,12 @@ export declare type SortOrder = 1 | -1;
|
|
|
2015
2171
|
* ]}
|
|
2016
2172
|
* onSelect={handleSelect}
|
|
2017
2173
|
* />
|
|
2018
|
-
*
|
|
2174
|
+
* ```
|
|
2019
2175
|
* @example
|
|
2176
|
+
*
|
|
2177
|
+
* ```tsx
|
|
2020
2178
|
* <SplitButton label="Save" variant="secondary" onAction={onSave} items={moreActions} onSelect={onSelect} />
|
|
2179
|
+
* ```
|
|
2021
2180
|
*/
|
|
2022
2181
|
export declare const SplitButton: ForwardRefExoticComponent<SplitButtonProps & RefAttributes<HTMLDivElement>>;
|
|
2023
2182
|
|
|
@@ -2104,6 +2263,8 @@ export declare interface TabItem {
|
|
|
2104
2263
|
* as `<nav>` for the right semantics.
|
|
2105
2264
|
*
|
|
2106
2265
|
* @example
|
|
2266
|
+
*
|
|
2267
|
+
* ```tsx
|
|
2107
2268
|
* // Panel variant (default) — sub-section switcher with content below.
|
|
2108
2269
|
* const [active, setActive] = useState('tab1');
|
|
2109
2270
|
* <Tabs
|
|
@@ -2114,8 +2275,10 @@ export declare interface TabItem {
|
|
|
2114
2275
|
* activeTab={active}
|
|
2115
2276
|
* onChange={setActive}
|
|
2116
2277
|
* />
|
|
2117
|
-
*
|
|
2278
|
+
* ```
|
|
2118
2279
|
* @example
|
|
2280
|
+
*
|
|
2281
|
+
* ```tsx
|
|
2119
2282
|
* // Nav variant — top-level page navigation, no content panel.
|
|
2120
2283
|
* <Tabs
|
|
2121
2284
|
* variant="nav"
|
|
@@ -2127,6 +2290,7 @@ export declare interface TabItem {
|
|
|
2127
2290
|
* activeTab={page}
|
|
2128
2291
|
* onChange={setPage}
|
|
2129
2292
|
* />
|
|
2293
|
+
* ```
|
|
2130
2294
|
*/
|
|
2131
2295
|
export declare const Tabs: ForwardRefExoticComponent<TabsProps & RefAttributes<HTMLDivElement>>;
|
|
2132
2296
|
|
|
@@ -2157,16 +2321,25 @@ export declare interface TabsProps {
|
|
|
2157
2321
|
* invalid, and disabled. Supports optional auto-grow behaviour.
|
|
2158
2322
|
*
|
|
2159
2323
|
* @example
|
|
2160
|
-
* <TextArea label="Loan notes" placeholder="Enter notes…" rows={4} />
|
|
2161
2324
|
*
|
|
2325
|
+
* ```tsx
|
|
2326
|
+
* <TextArea label="Loan notes" placeholder="Enter notes…" rows={4} />
|
|
2327
|
+
* ```
|
|
2162
2328
|
* @example
|
|
2163
|
-
* <TextArea label="Comments" maxLength={500} />
|
|
2164
2329
|
*
|
|
2330
|
+
* ```tsx
|
|
2331
|
+
* <TextArea label="Comments" maxLength={500} />
|
|
2332
|
+
* ```
|
|
2165
2333
|
* @example
|
|
2166
|
-
* <TextArea label="Description" autoGrow />
|
|
2167
2334
|
*
|
|
2335
|
+
* ```tsx
|
|
2336
|
+
* <TextArea label="Description" autoGrow />
|
|
2337
|
+
* ```
|
|
2168
2338
|
* @example
|
|
2339
|
+
*
|
|
2340
|
+
* ```tsx
|
|
2169
2341
|
* <TextArea label="Notes" invalid helperText="This field is required." />
|
|
2342
|
+
* ```
|
|
2170
2343
|
*/
|
|
2171
2344
|
export declare const TextArea: ForwardRefExoticComponent<TextAreaProps & RefAttributes<HTMLTextAreaElement>>;
|
|
2172
2345
|
|
|
@@ -2206,8 +2379,11 @@ export declare namespace Toast {
|
|
|
2206
2379
|
* Imperative toast API. Requires `<Toaster />` to be mounted in the app.
|
|
2207
2380
|
*
|
|
2208
2381
|
* @example
|
|
2382
|
+
*
|
|
2383
|
+
* ```tsx
|
|
2209
2384
|
* toast.success('Saved', 'Loan application saved successfully.');
|
|
2210
2385
|
* toast.error('Failed', 'Unable to update loan. Please try again.');
|
|
2386
|
+
* ```
|
|
2211
2387
|
*/
|
|
2212
2388
|
export declare const toast: {
|
|
2213
2389
|
success: (title: string, detail?: string, opts?: ToastOptions) => void;
|
|
@@ -2220,11 +2396,14 @@ export declare const toast: {
|
|
|
2220
2396
|
* Toaster — mount once in your app root to enable toast notifications.
|
|
2221
2397
|
*
|
|
2222
2398
|
* @example
|
|
2399
|
+
*
|
|
2400
|
+
* ```tsx
|
|
2223
2401
|
* // In App.tsx or layout root:
|
|
2224
2402
|
* <Toaster />
|
|
2225
2403
|
*
|
|
2226
2404
|
* // Anywhere else:
|
|
2227
2405
|
* toast.success('Saved', 'Your changes have been saved.');
|
|
2406
|
+
* ```
|
|
2228
2407
|
*/
|
|
2229
2408
|
export declare function Toaster(): ReactPortal | null;
|
|
2230
2409
|
|
|
@@ -2258,13 +2437,20 @@ export declare type ToastSeverity = 'success' | 'info' | 'warn' | 'error';
|
|
|
2258
2437
|
* and controlled/uncontrolled usage.
|
|
2259
2438
|
*
|
|
2260
2439
|
* @example
|
|
2261
|
-
* <ToggleSwitch label="Enable notifications" checked={on} onChange={e => setOn(e.target.checked)} />
|
|
2262
2440
|
*
|
|
2441
|
+
* ```tsx
|
|
2442
|
+
* <ToggleSwitch label="Enable notifications" checked={on} onChange={e => setOn(e.target.checked)} />
|
|
2443
|
+
* ```
|
|
2263
2444
|
* @example
|
|
2264
|
-
* <ToggleSwitch label="Auto-lock" defaultChecked />
|
|
2265
2445
|
*
|
|
2446
|
+
* ```tsx
|
|
2447
|
+
* <ToggleSwitch label="Auto-lock" defaultChecked />
|
|
2448
|
+
* ```
|
|
2266
2449
|
* @example
|
|
2450
|
+
*
|
|
2451
|
+
* ```tsx
|
|
2267
2452
|
* <ToggleSwitch label="Feature locked" disabled />
|
|
2453
|
+
* ```
|
|
2268
2454
|
*/
|
|
2269
2455
|
export declare const ToggleSwitch: ForwardRefExoticComponent<ToggleSwitchProps & RefAttributes<HTMLInputElement>>;
|
|
2270
2456
|
|
|
@@ -2281,14 +2467,24 @@ export declare interface ToggleSwitchProps extends Omit<React.InputHTMLAttribute
|
|
|
2281
2467
|
* A small informational bubble anchored to a trigger element. Appears on
|
|
2282
2468
|
* hover and keyboard focus; hides on mouse leave and blur.
|
|
2283
2469
|
*
|
|
2470
|
+
* The bubble is rendered through a portal to `document.body` and positioned
|
|
2471
|
+
* with `position: fixed` coordinates measured from the trigger, so it is never
|
|
2472
|
+
* clipped by an ancestor with `overflow: hidden | auto | scroll` (e.g. a
|
|
2473
|
+
* scrollable table or data grid). It tracks the trigger on scroll and resize
|
|
2474
|
+
* while visible, and flips to the opposite side when the preferred side would
|
|
2475
|
+
* run off-screen. (Same portal + fixed-position approach as Popup/Drawer.)
|
|
2476
|
+
*
|
|
2284
2477
|
* Wraps its child in an inline container — the child itself is not modified.
|
|
2285
2478
|
* Uses `aria-describedby` to associate the tooltip text with the trigger for
|
|
2286
2479
|
* screen readers.
|
|
2287
2480
|
*
|
|
2288
2481
|
* @example
|
|
2482
|
+
*
|
|
2483
|
+
* ```tsx
|
|
2289
2484
|
* <Tooltip content="Delete this record" placement="top">
|
|
2290
2485
|
* <IconButton icon={<i className="pi pi-trash" />} aria-label="Delete" />
|
|
2291
2486
|
* </Tooltip>
|
|
2487
|
+
* ```
|
|
2292
2488
|
*/
|
|
2293
2489
|
export declare function Tooltip({ content, children, placement, delay, disabled, maxWidth, className, }: TooltipProps): JSX_2.Element;
|
|
2294
2490
|
|
|
@@ -2390,6 +2586,8 @@ export declare interface TopBarUserProfile {
|
|
|
2390
2586
|
* - **Right section**: optional AUS action buttons + scrollable tab strip
|
|
2391
2587
|
*
|
|
2392
2588
|
* @example
|
|
2589
|
+
*
|
|
2590
|
+
* ```tsx
|
|
2393
2591
|
* <URLATabsNav
|
|
2394
2592
|
* applicants={[{ id: 'joint', label: 'Ryan Smith | Laura Smith' }]}
|
|
2395
2593
|
* selectedApplicantId="joint"
|
|
@@ -2398,6 +2596,7 @@ export declare interface TopBarUserProfile {
|
|
|
2398
2596
|
* activeTabId={activeTab}
|
|
2399
2597
|
* onTabChange={setActiveTab}
|
|
2400
2598
|
* />
|
|
2599
|
+
* ```
|
|
2401
2600
|
*/
|
|
2402
2601
|
export declare const URLATabsNav: ForwardRefExoticComponent<URLATabsNavProps & RefAttributes<HTMLDivElement>>;
|
|
2403
2602
|
|