@q1travel/design-system 0.5.1 → 0.6.0
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-pkg/design-system.d.ts +137 -0
- package/dist-pkg/design-system.js +1644 -1286
- package/dist-pkg/style.css +432 -0
- package/dist-pkg/tokens.css +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
3
|
import { FocusEventHandler } from 'react';
|
|
3
4
|
import { HTMLAttributes } from 'react';
|
|
4
5
|
import { InputHTMLAttributes } from 'react';
|
|
@@ -521,6 +522,54 @@ export declare type ContextMenuEntry = {
|
|
|
521
522
|
type: 'separator';
|
|
522
523
|
};
|
|
523
524
|
|
|
525
|
+
export declare function ContextSwitcher({ currentContext, groups, open, defaultOpen, onOpenChange, onSelect, pendingId, errorMessage, footerActions, onFooterAction, label, }: ContextSwitcherProps): JSX.Element;
|
|
526
|
+
|
|
527
|
+
export declare type ContextSwitcherAction = {
|
|
528
|
+
id: string;
|
|
529
|
+
label: ReactNode;
|
|
530
|
+
textValue: string;
|
|
531
|
+
icon?: ReactNode;
|
|
532
|
+
disabled?: boolean;
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
export declare type ContextSwitcherCurrent = {
|
|
536
|
+
label: ReactNode;
|
|
537
|
+
description?: ReactNode;
|
|
538
|
+
avatar?: ReactNode;
|
|
539
|
+
textValue: string;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
export declare type ContextSwitcherGroup = {
|
|
543
|
+
id: string;
|
|
544
|
+
label: ReactNode;
|
|
545
|
+
textValue: string;
|
|
546
|
+
selectedId?: string;
|
|
547
|
+
items: ContextSwitcherItem[];
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
export declare type ContextSwitcherItem = {
|
|
551
|
+
id: string;
|
|
552
|
+
label: ReactNode;
|
|
553
|
+
textValue: string;
|
|
554
|
+
description?: ReactNode;
|
|
555
|
+
avatar?: ReactNode;
|
|
556
|
+
disabled?: boolean;
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
export declare type ContextSwitcherProps = {
|
|
560
|
+
currentContext: ContextSwitcherCurrent;
|
|
561
|
+
groups: ContextSwitcherGroup[];
|
|
562
|
+
open?: boolean;
|
|
563
|
+
defaultOpen?: boolean;
|
|
564
|
+
onOpenChange?: (open: boolean) => void;
|
|
565
|
+
onSelect: (item: ContextSwitcherItem) => void;
|
|
566
|
+
pendingId?: string;
|
|
567
|
+
errorMessage?: ReactNode;
|
|
568
|
+
footerActions?: ContextSwitcherAction[];
|
|
569
|
+
onFooterAction?: (action: ContextSwitcherAction) => void;
|
|
570
|
+
label?: string;
|
|
571
|
+
};
|
|
572
|
+
|
|
524
573
|
export declare function ControlOption({ id, label, description, error, indeterminate, ref, type, ...rest }: ControlOptionOwnProps & (FieldShellProps | FieldBareProps) & CheckboxOnlyProps & {
|
|
525
574
|
type: 'checkbox' | 'radio';
|
|
526
575
|
} & NativeInputProps): JSX.Element;
|
|
@@ -840,6 +889,74 @@ declare type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'
|
|
|
840
889
|
|
|
841
890
|
declare type NativeInputProps_2 = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'>;
|
|
842
891
|
|
|
892
|
+
export declare function Navigation({ className, ...props }: NavigationProps): JSX.Element;
|
|
893
|
+
|
|
894
|
+
export declare function NavigationGroup({ label, icon, expanded, defaultExpanded, onExpandedChange, children, }: NavigationGroupProps): JSX.Element;
|
|
895
|
+
|
|
896
|
+
export declare type NavigationGroupProps = {
|
|
897
|
+
label: ReactNode;
|
|
898
|
+
icon?: ReactNode;
|
|
899
|
+
expanded?: boolean;
|
|
900
|
+
defaultExpanded?: boolean;
|
|
901
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
902
|
+
children: ReactNode;
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
export declare function NavigationItem(props: NavigationItemProps): JSX.Element;
|
|
906
|
+
|
|
907
|
+
export declare type NavigationItemAsButton = NavigationItemOwnProps & {
|
|
908
|
+
href?: undefined;
|
|
909
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof NavigationItemOwnProps>;
|
|
910
|
+
|
|
911
|
+
export declare type NavigationItemAsLink = NavigationItemOwnProps & {
|
|
912
|
+
href: string;
|
|
913
|
+
} & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof NavigationItemOwnProps | 'href'>;
|
|
914
|
+
|
|
915
|
+
declare type NavigationItemOwnProps = {
|
|
916
|
+
active?: boolean;
|
|
917
|
+
disabled?: boolean;
|
|
918
|
+
icon?: ReactNode;
|
|
919
|
+
badge?: ReactNode;
|
|
920
|
+
description?: ReactNode;
|
|
921
|
+
action?: ReactNode;
|
|
922
|
+
children: ReactNode;
|
|
923
|
+
className?: string;
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
export declare type NavigationItemProps = NavigationItemAsLink | NavigationItemAsButton;
|
|
927
|
+
|
|
928
|
+
export declare type NavigationProps = HTMLAttributes<HTMLElement> & {
|
|
929
|
+
'aria-label': string;
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
export declare function NavigationSection({ label, action, children, className, ...props }: NavigationSectionProps): JSX.Element;
|
|
933
|
+
|
|
934
|
+
declare type NavigationSectionLabel = Exclude<ReactNode, boolean | null | undefined>;
|
|
935
|
+
|
|
936
|
+
declare type NavigationSectionNativeProps = Omit<HTMLAttributes<HTMLElement>, keyof NavigationSectionOwnProps>;
|
|
937
|
+
|
|
938
|
+
declare type NavigationSectionOwnProps = {
|
|
939
|
+
label?: ReactNode;
|
|
940
|
+
action?: ReactNode;
|
|
941
|
+
children: ReactNode;
|
|
942
|
+
className?: string;
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
export declare type NavigationSectionProps = NavigationSectionWithLabel | NavigationSectionWithAccessibleName;
|
|
946
|
+
|
|
947
|
+
declare type NavigationSectionWithAccessibleName = NavigationSectionNativeProps & Omit<NavigationSectionOwnProps, 'action'> & {
|
|
948
|
+
label?: undefined;
|
|
949
|
+
action?: never;
|
|
950
|
+
} & ({
|
|
951
|
+
'aria-label': string;
|
|
952
|
+
} | {
|
|
953
|
+
'aria-labelledby': string;
|
|
954
|
+
});
|
|
955
|
+
|
|
956
|
+
declare type NavigationSectionWithLabel = NavigationSectionNativeProps & Omit<NavigationSectionOwnProps, 'label'> & {
|
|
957
|
+
label: NavigationSectionLabel;
|
|
958
|
+
};
|
|
959
|
+
|
|
843
960
|
export declare function Note({ tone, size, filled, disabled, label, action, children, }: {
|
|
844
961
|
tone?: NoteTone;
|
|
845
962
|
size?: NoteSize;
|
|
@@ -1015,6 +1132,26 @@ export declare function ShowMore({ items, initial, noBorder, initialExpanded, }:
|
|
|
1015
1132
|
initialExpanded?: boolean;
|
|
1016
1133
|
}): JSX.Element;
|
|
1017
1134
|
|
|
1135
|
+
export declare const Sidebar: typeof SidebarRoot & {
|
|
1136
|
+
Header: typeof SidebarHeader;
|
|
1137
|
+
Content: typeof SidebarContent;
|
|
1138
|
+
Footer: typeof SidebarFooter;
|
|
1139
|
+
};
|
|
1140
|
+
|
|
1141
|
+
declare function SidebarContent({ className, ...props }: SidebarSlotProps): JSX.Element;
|
|
1142
|
+
|
|
1143
|
+
declare function SidebarFooter({ className, ...props }: SidebarSlotProps): JSX.Element;
|
|
1144
|
+
|
|
1145
|
+
declare function SidebarHeader({ className, ...props }: SidebarSlotProps): JSX.Element;
|
|
1146
|
+
|
|
1147
|
+
export declare type SidebarProps = HTMLAttributes<HTMLElement> & {
|
|
1148
|
+
'aria-label': string;
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
declare function SidebarRoot({ className, ...props }: SidebarProps): JSX.Element;
|
|
1152
|
+
|
|
1153
|
+
export declare type SidebarSlotProps = HTMLAttributes<HTMLDivElement>;
|
|
1154
|
+
|
|
1018
1155
|
export declare function Skeleton({ shape, animated, show, className, children, }: {
|
|
1019
1156
|
shape?: SkeletonShape;
|
|
1020
1157
|
animated?: boolean;
|