@q1travel/design-system 0.6.1 → 0.7.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.
@@ -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 & {
@@ -886,7 +909,7 @@ declare type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'
886
909
 
887
910
  declare type NativeInputProps_2 = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'>;
888
911
 
889
- export declare function Navigation({ className, ...props }: NavigationProps): JSX.Element;
912
+ export declare function Navigation({ className, orientation, ...props }: NavigationProps): JSX.Element;
890
913
 
891
914
  export declare function NavigationGroup({ label, icon, expanded, defaultExpanded, onExpandedChange, children, }: NavigationGroupProps): JSX.Element;
892
915
 
@@ -924,6 +947,7 @@ export declare type NavigationItemProps = NavigationItemAsLink | NavigationItemA
924
947
 
925
948
  export declare type NavigationProps = HTMLAttributes<HTMLElement> & {
926
949
  'aria-label': string;
950
+ orientation?: 'vertical' | 'horizontal';
927
951
  };
928
952
 
929
953
  export declare function NavigationSection({ label, action, children, className, ...props }: NavigationSectionProps): JSX.Element;
@@ -1078,6 +1102,44 @@ export declare function ScrollerWithButtons({ axis, contentName, label, children
1078
1102
  children: ReactNode;
1079
1103
  }): JSX.Element;
1080
1104
 
1105
+ export declare function SearchDialog({ open, onOpenChange, query, onQueryChange, sections, onSelect, renderTrigger, label, placeholder, emptyTitle, clearQueryLabel, }: SearchDialogProps): JSX.Element;
1106
+
1107
+ export declare type SearchDialogItem = {
1108
+ id: string;
1109
+ label: string;
1110
+ description?: string;
1111
+ disabled?: boolean;
1112
+ };
1113
+
1114
+ export declare type SearchDialogProps = {
1115
+ open: boolean;
1116
+ onOpenChange: (open: boolean) => void;
1117
+ query: string;
1118
+ onQueryChange: (query: string) => void;
1119
+ sections: SearchDialogSection[];
1120
+ onSelect: (item: SearchDialogItem) => void;
1121
+ renderTrigger: (props: SearchDialogTriggerProps) => ReactNode;
1122
+ label: string;
1123
+ placeholder?: string;
1124
+ emptyTitle?: string;
1125
+ clearQueryLabel?: string;
1126
+ };
1127
+
1128
+ export declare type SearchDialogSection = {
1129
+ id: string;
1130
+ heading?: string;
1131
+ items: SearchDialogItem[];
1132
+ };
1133
+
1134
+ export declare type SearchDialogTriggerProps = {
1135
+ ref: (node: HTMLButtonElement | null) => void;
1136
+ type: 'button';
1137
+ onClick: () => void;
1138
+ 'aria-haspopup': 'dialog';
1139
+ 'aria-expanded': boolean;
1140
+ 'aria-controls': string;
1141
+ };
1142
+
1081
1143
  export declare function SearchInput({ id, ariaLabel, placeholder, defaultValue, disabled, loading, kbdHint, icon, }: {
1082
1144
  id: string;
1083
1145
  ariaLabel: string;