@useinsider/ab-components 0.0.99 → 0.0.101

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