@czi-sds/components 22.3.3 → 22.4.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.
@@ -1490,13 +1490,29 @@ interface FooterLinkProps {
1490
1490
  hasInvertedStyle?: boolean;
1491
1491
  }
1492
1492
  declare function NavigationFooter({ hasInvertedStyle, images, logo, logoUrl, logoComponent, logoLinkProps, navItems, navLinks, tag, tagColor, title, ...rest }: NavigationFooterProps): import("react/jsx-runtime").JSX.Element;
1493
- interface NavigationHeaderPrimaryNavItem<T extends string> extends Record<string, unknown> {
1493
+ interface BaseNavigationHeaderPrimaryNavItem<T extends string> extends Record<string, unknown> {
1494
1494
  key: T;
1495
1495
  label: ReactNode;
1496
+ }
1497
+ interface TextNavigationHeaderPrimaryNavItem<T extends string> extends BaseNavigationHeaderPrimaryNavItem<T> {
1498
+ itemType: "text";
1496
1499
  tag?: string;
1497
1500
  tagColor?: SdsTagColorType;
1498
1501
  onClick?: (e: React.SyntheticEvent) => void;
1499
1502
  }
1503
+ interface DropdownItem {
1504
+ label: ReactNode;
1505
+ onClick?: () => void;
1506
+ component?: React.ElementType;
1507
+ href?: string;
1508
+ rel?: string;
1509
+ target?: string;
1510
+ }
1511
+ interface DropdownNavigationHeaderPrimaryNavItem<T extends string> extends BaseNavigationHeaderPrimaryNavItem<T> {
1512
+ itemType: "dropdown";
1513
+ items: DropdownItem[];
1514
+ }
1515
+ type NavigationHeaderPrimaryNavItem<T extends string> = TextNavigationHeaderPrimaryNavItem<T> | DropdownNavigationHeaderPrimaryNavItem<T>;
1500
1516
  interface NavigationHeaderPrimaryNavProps<T extends string> {
1501
1517
  hasInvertedStyle?: boolean;
1502
1518
  isNarrow?: boolean;
@@ -1504,16 +1520,22 @@ interface NavigationHeaderPrimaryNavProps<T extends string> {
1504
1520
  onChange(value: T): void;
1505
1521
  value: T;
1506
1522
  }
1507
- interface BaseHeaderSecondaryNavItem extends Partial<SdsMinimalButtonProps> {
1523
+ interface TextHeaderSecondaryNavItem extends Partial<SdsMinimalButtonProps> {
1508
1524
  label: string;
1509
- }
1510
- interface TextHeaderSecondaryNavItem extends BaseHeaderSecondaryNavItem {
1511
- onClick?(): void;
1512
1525
  itemType: "text";
1513
1526
  }
1514
- interface DropdownHeaderSecondaryNavItem extends BaseHeaderSecondaryNavItem {
1527
+ interface DropdownItem$0 {
1528
+ label: ReactNode;
1529
+ onClick?: (event: React.MouseEvent) => void;
1530
+ component?: React.ElementType;
1531
+ href?: string;
1532
+ rel?: string;
1533
+ target?: string;
1534
+ }
1535
+ interface DropdownHeaderSecondaryNavItem extends Partial<SdsMinimalButtonProps> {
1536
+ label: string;
1515
1537
  itemType: "dropdown";
1516
- items: Pick<TextHeaderSecondaryNavItem, "label" | "onClick" | "component" | "href" | "rel" | "target">[];
1538
+ items: DropdownItem$0[];
1517
1539
  }
1518
1540
  type NavigationHeaderSecondaryNavItem = TextHeaderSecondaryNavItem | DropdownHeaderSecondaryNavItem;
1519
1541
  interface NavigationHeaderSecondaryNavProps {