@useinsider/ab-components 0.0.99 → 0.0.101-beta.1
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/ab-components.cjs.js +3 -3
- package/dist/ab-components.cjs.js.map +1 -1
- package/dist/ab-components.css +1 -1
- package/dist/ab-components.es.js +2000 -1885
- package/dist/ab-components.es.js.map +1 -1
- package/dist/ab-components.iife.js +3 -3
- package/dist/ab-components.iife.js.map +1 -1
- package/dist/ab-components.umd.js +3 -3
- package/dist/ab-components.umd.js.map +1 -1
- package/dist/index.d.ts +73 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -202,9 +202,12 @@ onOpen?: (() => any) | undefined;
|
|
|
202
202
|
}>, {
|
|
203
203
|
modelValue: boolean;
|
|
204
204
|
position: "bottom" | "top";
|
|
205
|
+
gap: number;
|
|
205
206
|
align: "left" | "center" | "right" | "left-side" | "right-side";
|
|
206
207
|
positionStrategy: "fixed" | "absolute";
|
|
207
208
|
closeOnClickOutside: boolean;
|
|
209
|
+
elevated: boolean;
|
|
210
|
+
fitContent: boolean;
|
|
208
211
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
209
212
|
popoverRef: HTMLDivElement;
|
|
210
213
|
contentRef: HTMLDivElement;
|
|
@@ -460,6 +463,11 @@ export declare interface CascadingListItem {
|
|
|
460
463
|
id: string;
|
|
461
464
|
label: string;
|
|
462
465
|
subtitle?: string;
|
|
466
|
+
/**
|
|
467
|
+
* Trailing metadata rendered on the right side of the row (e.g. a remaining
|
|
468
|
+
* count). Inherits the row text color so it tracks selected/hover states.
|
|
469
|
+
*/
|
|
470
|
+
meta?: string;
|
|
463
471
|
testId?: string;
|
|
464
472
|
disabled?: boolean;
|
|
465
473
|
}
|
|
@@ -472,6 +480,7 @@ subItemId: string;
|
|
|
472
480
|
"update:open": (value: boolean) => any;
|
|
473
481
|
"item-click": (itemId: string) => any;
|
|
474
482
|
"item-expand": (itemId: string) => any;
|
|
483
|
+
"update:search-query": (value: string) => any;
|
|
475
484
|
}, string, PublicProps, Readonly<CascadingMenuProps> & Readonly<{
|
|
476
485
|
onSelect?: ((payload: {
|
|
477
486
|
itemId: string;
|
|
@@ -480,14 +489,26 @@ subItemId: string;
|
|
|
480
489
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
481
490
|
"onItem-click"?: ((itemId: string) => any) | undefined;
|
|
482
491
|
"onItem-expand"?: ((itemId: string) => any) | undefined;
|
|
492
|
+
"onUpdate:search-query"?: ((value: string) => any) | undefined;
|
|
483
493
|
}>, {
|
|
484
494
|
width: number;
|
|
495
|
+
searchable: boolean;
|
|
485
496
|
listStyle: CSSProperties;
|
|
486
497
|
menuStyle: CSSProperties;
|
|
487
498
|
listWidth: number;
|
|
488
499
|
listMaxHeight: number;
|
|
500
|
+
menuMaxHeight: number;
|
|
489
501
|
loadingText: string;
|
|
490
502
|
teleportTarget: string | HTMLElement;
|
|
503
|
+
submenuPlacement: "right" | "left";
|
|
504
|
+
searchPlaceholder: string;
|
|
505
|
+
emptySearchText: string;
|
|
506
|
+
loading: boolean;
|
|
507
|
+
selectedItemId: string | null;
|
|
508
|
+
selectedSubItemId: string | null;
|
|
509
|
+
menuTestId: string;
|
|
510
|
+
listTestId: string;
|
|
511
|
+
searchInputId: string;
|
|
491
512
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
492
513
|
menuRef: HTMLDivElement;
|
|
493
514
|
listRef: HTMLDivElement;
|
|
@@ -517,6 +538,11 @@ export declare interface CascadingMenuProps {
|
|
|
517
538
|
width?: number;
|
|
518
539
|
listWidth?: number;
|
|
519
540
|
listMaxHeight?: number;
|
|
541
|
+
/**
|
|
542
|
+
* Optional max-height (in px) for the parent panel. Useful when the menu
|
|
543
|
+
* shows a long flat search result list and should scroll inside the panel.
|
|
544
|
+
*/
|
|
545
|
+
menuMaxHeight?: number;
|
|
520
546
|
loadingText?: string;
|
|
521
547
|
menuStyle?: CSSProperties;
|
|
522
548
|
listStyle?: CSSProperties;
|
|
@@ -528,6 +554,50 @@ export declare interface CascadingMenuProps {
|
|
|
528
554
|
* instead so the menu's DOM is not a direct child of `body`.
|
|
529
555
|
*/
|
|
530
556
|
teleportTarget?: string | HTMLElement;
|
|
557
|
+
/**
|
|
558
|
+
* Which side the child sub-list panel opens on, relative to the active
|
|
559
|
+
* parent item. Defaults to `'right'`. The opposite side is used as the
|
|
560
|
+
* floating-ui flip fallback so the sub-list still appears when the chosen
|
|
561
|
+
* side has no room.
|
|
562
|
+
*/
|
|
563
|
+
submenuPlacement?: 'right' | 'left';
|
|
564
|
+
/**
|
|
565
|
+
* When true, a search input is rendered at the top of the parent panel
|
|
566
|
+
* and typing produces a flat, parent-grouped result list that filters
|
|
567
|
+
* across ALL sub-lists. The per-sub-list `searchable` flag is ignored
|
|
568
|
+
* while this mode is active.
|
|
569
|
+
*/
|
|
570
|
+
searchable?: boolean;
|
|
571
|
+
searchPlaceholder?: string;
|
|
572
|
+
emptySearchText?: string;
|
|
573
|
+
/**
|
|
574
|
+
* Top-level loading flag — shown in the parent panel (covers async
|
|
575
|
+
* fetches that populate every sub-list at once). Independent from the
|
|
576
|
+
* per-sub-list `loading` flag, which still drives the child panel.
|
|
577
|
+
*/
|
|
578
|
+
loading?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Highlights a parent menu row as the currently-selected category.
|
|
581
|
+
*/
|
|
582
|
+
selectedItemId?: string | null;
|
|
583
|
+
/**
|
|
584
|
+
* Highlights a sub-list row as the currently-selected entry. Applies to
|
|
585
|
+
* both the child panel and the global flat search results.
|
|
586
|
+
*/
|
|
587
|
+
selectedSubItemId?: string | null;
|
|
588
|
+
/**
|
|
589
|
+
* Optional `data-testid` for the parent menu root and the child list root.
|
|
590
|
+
* Use these instead of relying on internal CSS class names from E2E tests.
|
|
591
|
+
*/
|
|
592
|
+
menuTestId?: string;
|
|
593
|
+
listTestId?: string;
|
|
594
|
+
/**
|
|
595
|
+
* Stable id for the parent search `<input>` element. When set, the input's
|
|
596
|
+
* `id` attribute uses this value verbatim — useful when E2E tests need to
|
|
597
|
+
* `fill('#my-stable-id', ...)` the input. The child sub-list search input
|
|
598
|
+
* uses `${searchInputId}-child` if a value is provided.
|
|
599
|
+
*/
|
|
600
|
+
searchInputId?: string;
|
|
531
601
|
}
|
|
532
602
|
|
|
533
603
|
export declare interface CascadingSelectPayload {
|
|
@@ -1037,6 +1107,9 @@ declare interface PopoverProps {
|
|
|
1037
1107
|
width?: number;
|
|
1038
1108
|
positionStrategy?: 'fixed' | 'absolute';
|
|
1039
1109
|
closeOnClickOutside?: boolean;
|
|
1110
|
+
elevated?: boolean;
|
|
1111
|
+
fitContent?: boolean;
|
|
1112
|
+
gap?: number;
|
|
1040
1113
|
}
|
|
1041
1114
|
|
|
1042
1115
|
declare interface Props {
|