@q1travel/design-system 0.7.0 → 0.7.2

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.
@@ -520,7 +520,7 @@ export declare type ContextMenuEntry = {
520
520
  type: 'separator';
521
521
  };
522
522
 
523
- export declare function ContextSwitcher({ currentContext, groups, open, defaultOpen, onOpenChange, onSelect, pendingId, errorMessage, footerActions, onFooterAction, label, }: ContextSwitcherProps): JSX.Element;
523
+ export declare function ContextSwitcher({ currentContext, groups, open, defaultOpen, onOpenChange, onSelect, pendingId, errorMessage, footerActions, onFooterAction, label, presentation, }: ContextSwitcherProps): JSX.Element;
524
524
 
525
525
  export declare type ContextSwitcherAction = {
526
526
  id: string;
@@ -537,35 +537,58 @@ export declare type ContextSwitcherCurrent = {
537
537
  textValue: string;
538
538
  };
539
539
 
540
+ export declare type ContextSwitcherEmptyState = {
541
+ title: ReactNode;
542
+ description?: ReactNode;
543
+ };
544
+
540
545
  export declare type ContextSwitcherGroup = {
541
546
  id: string;
542
547
  label: ReactNode;
543
548
  textValue: string;
544
549
  selectedId?: string;
545
550
  items: ContextSwitcherItem[];
551
+ search?: ContextSwitcherSearch;
552
+ emptyState?: ContextSwitcherEmptyState;
546
553
  };
547
554
 
548
555
  export declare type ContextSwitcherItem = {
549
556
  id: string;
550
557
  label: ReactNode;
551
558
  textValue: string;
559
+ keywords?: string[];
552
560
  description?: ReactNode;
553
561
  avatar?: ReactNode;
554
562
  disabled?: boolean;
555
563
  };
556
564
 
565
+ export declare type ContextSwitcherPresentation = {
566
+ type?: 'grouped';
567
+ } | {
568
+ type: 'drilldown';
569
+ primaryGroupId: string;
570
+ scopeGroupId: string;
571
+ };
572
+
557
573
  export declare type ContextSwitcherProps = {
558
574
  currentContext: ContextSwitcherCurrent;
559
575
  groups: ContextSwitcherGroup[];
560
576
  open?: boolean;
561
577
  defaultOpen?: boolean;
562
578
  onOpenChange?: (open: boolean) => void;
563
- onSelect: (item: ContextSwitcherItem) => void;
579
+ onSelect: (item: ContextSwitcherItem, group: ContextSwitcherGroup) => void;
564
580
  pendingId?: string;
565
581
  errorMessage?: ReactNode;
566
582
  footerActions?: ContextSwitcherAction[];
567
583
  onFooterAction?: (action: ContextSwitcherAction) => void;
568
584
  label?: string;
585
+ presentation?: ContextSwitcherPresentation;
586
+ };
587
+
588
+ export declare type ContextSwitcherSearch = {
589
+ label: string;
590
+ placeholder?: string;
591
+ noResults: ContextSwitcherEmptyState;
569
592
  };
570
593
 
571
594
  export declare function ControlOption({ id, label, description, error, indeterminate, ref, type, ...rest }: ControlOptionOwnProps & (FieldShellProps | FieldBareProps) & CheckboxOnlyProps & {