@czi-sds/components 22.3.0 → 22.3.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.
@@ -29,10 +29,11 @@ import { ListItemProps as RawListItemProps } from "@mui/material";
29
29
  import { ListSubheaderProps as RawListSubheaderProps } from "@mui/material";
30
30
  import { MenuProps as RawMenuProps } from "@mui/material";
31
31
  import { ChipProps as ChipProps$0 } from "@mui/material";
32
+ import { LinkProps as LinkProps$1 } from "@mui/material";
32
33
  import { TabProps as RawTabProps } from "@mui/material";
33
34
  import { TabsProps as RawTabsProps } from "@mui/material";
34
35
  import React from "react";
35
- import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, ComponentType, ElementType } from "react";
36
+ import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, HTMLAttributeAnchorTarget, ComponentType, ElementType } from "react";
36
37
  import { Theme, ThemeOptions, TypographyStyle, Breakpoints, PaletteOptions } from "@mui/material/styles";
37
38
  import { SerializedStyles } from "@emotion/react";
38
39
  import { AlertProps } from "@mui/lab";
@@ -776,9 +777,10 @@ type ButtonTypeMap = {
776
777
  square: "primary" | "secondary" | "destructive";
777
778
  };
778
779
  type ButtonSize = "small" | "medium" | "large";
779
- interface BaseButtonProps {
780
+ interface BaseButtonProps extends RawButtonProps {
780
781
  children?: React.ReactNode;
781
782
  isAllCaps?: boolean;
783
+ target?: HTMLAttributeAnchorTarget;
782
784
  }
783
785
  interface SdsIconButtonProps extends BaseButtonProps {
784
786
  sdsStyle: "icon";
@@ -799,23 +801,11 @@ interface SdsButtonProps extends BaseButtonProps {
799
801
  children: React.ReactNode;
800
802
  }
801
803
  type SdsProps = SdsIconButtonProps | SdsMinimalButtonProps | SdsButtonProps;
802
- type ButtonProps = RawButtonProps & SdsProps;
804
+ type ButtonProps = SdsProps;
803
805
  /**
804
806
  * @see https://mui.com/material-ui/react-button/
805
807
  */
806
- declare const Button: React.ForwardRefExoticComponent<(Omit<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
807
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
808
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & {
809
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
810
- } & SdsIconButtonProps, "ref"> | Omit<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
811
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
812
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & {
813
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
814
- } & SdsMinimalButtonProps, "ref"> | Omit<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
815
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
816
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & {
817
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
818
- } & SdsButtonProps, "ref">) & React.RefAttributes<HTMLButtonElement>>;
808
+ declare const Button: React.ForwardRefExoticComponent<(Omit<SdsIconButtonProps, "ref"> | Omit<SdsMinimalButtonProps, "ref"> | Omit<SdsButtonProps, "ref">) & React.RefAttributes<HTMLButtonElement>>;
819
809
  interface BannerExtraProps extends CommonThemeProps {
820
810
  sdsType: "primary" | "secondary";
821
811
  }
@@ -846,21 +836,13 @@ type ButtonDropdownProps = ButtonProps & SdsProps$0;
846
836
  /**
847
837
  * @see https://mui.com/material-ui/react-button/
848
838
  */
849
- declare const ButtonDropdown: React.ForwardRefExoticComponent<(Omit<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
850
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
851
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & {
852
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
853
- } & SdsIconButtonProps & {
839
+ declare const ButtonDropdown: React.ForwardRefExoticComponent<(Omit<SdsIconButtonProps & {
854
840
  sdsStyle: "icon";
855
841
  sdsType?: "primary" | "secondary" | "tertiary" | undefined;
856
842
  icon: keyof IconNameToSizes | React.ReactElement<CustomSVGProps>;
857
843
  sdsIconProps?: Partial<IconProps<keyof IconNameToSizes>> | undefined;
858
844
  sdsSize?: SDSButtonDropdownSizes | undefined;
859
- }, "ref"> | Omit<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
860
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
861
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & {
862
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
863
- } & SdsButtonProps & {
845
+ }, "ref"> | Omit<SdsButtonProps & {
864
846
  sdsStyle: "rounded" | "square";
865
847
  sdsType?: "primary" | "secondary" | "destructive" | undefined;
866
848
  icon?: keyof IconNameToSizes | React.ReactElement<CustomSVGProps, string | React.JSXElementConstructor<any>> | undefined;
@@ -1129,10 +1111,20 @@ interface ContentCardTitleProps {
1129
1111
  titleText?: string;
1130
1112
  subtitleText?: string;
1131
1113
  metadataText?: string;
1114
+ classes?: {
1115
+ cardHeader?: string;
1116
+ cardOverline?: string;
1117
+ cardTitle?: string;
1118
+ cardSubtitle?: string;
1119
+ cardMetadata?: string;
1120
+ };
1132
1121
  }
1133
1122
  interface ContentCardActionsProps {
1134
1123
  buttonsPosition?: "left" | "right";
1135
1124
  clickableCard?: ContentCardProps["clickableCard"];
1125
+ classes?: {
1126
+ cardActions?: string;
1127
+ };
1136
1128
  children: React.ReactElement<ButtonProps> | Array<React.ReactElement<ButtonProps>>;
1137
1129
  }
1138
1130
  /**
@@ -1149,7 +1141,20 @@ interface BaseContentCardProps extends CardProps {
1149
1141
  decorativeBorder?: boolean;
1150
1142
  children?: React.ReactNode;
1151
1143
  clickableCard?: boolean;
1144
+ clickableCardProps?: Partial<SdsMinimalButtonProps>;
1152
1145
  buttonsPosition?: "left" | "right";
1146
+ classes?: {
1147
+ cardPaper?: string;
1148
+ cardContent?: string;
1149
+ cardHeader?: string;
1150
+ cardMedia?: string;
1151
+ cardOverline?: string;
1152
+ cardTitle?: string;
1153
+ cardSubtitle?: string;
1154
+ cardMetadata?: string;
1155
+ cardActions?: string;
1156
+ clickableCardButton?: string;
1157
+ };
1153
1158
  }
1154
1159
  interface ImageContentCardProps extends BaseContentCardProps {
1155
1160
  visualElementType: "image";
@@ -1486,16 +1491,16 @@ interface NavigationHeaderPrimaryNavItem<T extends string> extends Record<string
1486
1491
  tagColor?: SdsTagColorType;
1487
1492
  onClick?: (e: React.SyntheticEvent) => void;
1488
1493
  }
1489
- interface BaseHeaderSecondaryNavItem {
1494
+ interface BaseHeaderSecondaryNavItem extends Partial<SdsMinimalButtonProps> {
1490
1495
  label: string;
1491
1496
  }
1492
1497
  interface TextHeaderSecondaryNavItem extends BaseHeaderSecondaryNavItem {
1493
1498
  onClick?(): void;
1494
- type: "text";
1499
+ itemType: "text";
1495
1500
  }
1496
1501
  interface DropdownHeaderSecondaryNavItem extends BaseHeaderSecondaryNavItem {
1497
- type: "dropdown";
1498
- items: Pick<TextHeaderSecondaryNavItem, "label" | "onClick">[];
1502
+ itemType: "dropdown";
1503
+ items: Pick<TextHeaderSecondaryNavItem, "label" | "onClick" | "component" | "href">[];
1499
1504
  }
1500
1505
  type NavigationHeaderSecondaryNavItem = TextHeaderSecondaryNavItem | DropdownHeaderSecondaryNavItem;
1501
1506
  interface NavigationHeaderProps<T extends string = string> {
@@ -1504,6 +1509,8 @@ interface NavigationHeaderProps<T extends string = string> {
1504
1509
  hasInvertedStyle?: boolean;
1505
1510
  logo?: ReactNode;
1506
1511
  logoUrl?: string;
1512
+ logoLinkComponent?: ElementType;
1513
+ logoLinkProps?: LinkProps$1;
1507
1514
  primaryNavItems?: NavigationHeaderPrimaryNavItem<T>[];
1508
1515
  primaryNavPosition?: "left" | "right";
1509
1516
  searchProps?: Partial<InputSearchProps>;
@@ -1682,4 +1689,4 @@ type TooltipTableContentProps = TooltipTableExtraProps;
1682
1689
  */
1683
1690
  declare const TooltipTableContent: (props: TooltipTableContentProps) => JSX.Element;
1684
1691
  export { AccordionDetails, AccordionHeader, AccordionProps, Accordion, Alert, AutocompleteSingleColumnOption, AutocompleteMultiColumnOption, SDSAutocompleteOptions, AutocompleteMultiColumnValue, AutocompleteSingleColumnValue, SDSAutocompleteValue, AutocompleteSingleColumnOnChange, AutocompleteMultiColumnOnChange, SDSAutocompleteOnChange, AutocompleteProps, StyledPopper as AutocompleteMultiColumnStyledPopper, StyledPaper$0 as AutocompleteSingleColumnStyledPaper, Autocomplete$0 as Autocomplete, BannerProps, Banner, SdsIconButtonProps, SdsMinimalButtonProps, SdsButtonProps, SdsProps, ButtonProps, Button, ButtonDropdownProps, ButtonDropdown, ButtonIconInternalProps, ButtonIconProps, ButtonIcon, ButtonToggleProps, ButtonToggle, CalloutIntentType, CalloutSdsStyleType, CalloutProps, ExposedCalloutProps, Callout, CalloutTitle, CellBasicRawProps, CellBasicProps, CellBasic, CellComponentProps, CellComponent, CellHeaderDirection, CellHeaderProps, CellHeader, Chip, InputDropdown as ComplexFilterInputDropdown, InputDropdown as DropdownInputDropdown, InputDropdown, StyledPopper$1 as ComplexFilterPopper, StyledPopper$1 as DropdownPopper, ComplexFilterProps, ComplexFilter, ContentCardActions, StyledContentCardBody as ContentCardBody, CardMedia as ContentCardMedia, ContentCard, DialogContext, DialogProps, Dialog, DialogActionsProps, DialogActions, DialogContentProps, _default, _default as DialogContent, DialogPaperProps, DialogPaper, Subtitle$0 as DialogTitleSubtitle, Title as DialogTitleTitle, Overline as DialogTitleOverline, DialogTitleProps, DialogTitle, StyledPaper$1 as DropdownPaper, ExtraDropdownProps, DropdownProps, Dropdown, DefaultDropdownMenuOption, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, DropdownMenuProps, DropdownMenu, SdsIconWithColor$0 as SdsIconWithColor, IconProps, Icon, CheckboxProps, InputCheckbox, InputDropdownProps$0 as InputDropdownProps, RadioContentProps, RadioProps, InputRadio, AccessibleInputSearchProps, InputSearchProps, InputSearch, InputSliderProps, InputSlider, InputTextProps, InputText, InputToggle, LinkProps$0 as LinkProps, Link, ListProps, List, ListItemLabel, ListItemProps, ListItem, ListSubheaderProps, ListSubheader, LoadingIndicatorProps$0 as LoadingIndicatorProps, LoadingIndicator, MenuProps, Menu, IconNameToSmallSizes, MenuItemExtraProps, MenuItemProps, MenuItem, DefaultMenuSelectOption, MenuSelectProps, MenuSelect, NavigationFooterNavItem, FooterImage, NavigationFooterProps, NavItemProps, FooterLinkProps, NavigationFooter, NavigationHeaderProps, IconButtonProps, NavigationHeader, NavigationJumpToProps, NavigationJumpTo, NotificationIntentType, NotificationProps, ExposedNotificationProps, Notification, PaginationInternalProps, PaginationProps, Pagination, Panel, SingleButtonDefinition, SegmentedControlProps, SegmentedControl, SdsTableProps, TableProps, Table, TableHeaderProps, TableHeader, TableRowProps, TableRow, Tabs, TabProps$0 as TabProps, Tab, SdsTagProps, TagProps, Tag, SdsTagFilterProps, TagFilterProps, TagFilter, Tooltip, TooltipCondensedProps, TooltipCondensed, TooltipTableContent, TooltipTableContent as TooltipTable, AccentColor, BaseColor, IntentColor, SDSPalette, SDSTheme, SDSThemeOptions, AppTheme, Shadows, TypographyStyles, Typography, FontWeights, Corners, Spaces, Spacings, Color, Colors, IconSize, IconSizes, Border, Borders, Theme$0 as Theme, defaultTheme, makeSdsSemanticAppTheme, SDSLightAppTheme, SDSDarkAppTheme, SDSChooseTheme, defaultAppTheme, SDSPaletteLight, SDSPaletteDark, makeThemeOptions, focusVisibleA11yStyle, fontBody, fontBodyL, fontBodyM, fontBodyS, fontBodyXs, fontBodyXxs, fontBodyXxxs, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontHeader, fontHeaderXxl, fontHeaderXl, fontHeaderL, fontHeaderM, fontHeaderS, fontHeaderXs, fontHeaderXxs, fontHeaderXxxs, fontCode, fontCodeXs, fontCodeS, fontCodeSemiboldXs, fontCodeSemiboldS, fontTabular, fontTabularXs, fontTabularS, fontTabularSemiboldXs, fontTabularSemiboldS, CommonThemeProps, getSpaces, getSpacings, getTypography, getMode, getPalette, getColors, getSemanticColors, getShadows, getCorners, getFontWeights, getIconSizes, getBorders, getBreakpoints };
1685
- export type { AutocompleteBaseProps, AutocompleteMultiColumnProps, AutocompleteOptionBasic, AutocompleteOptionComponent, DefaultAutocompleteOption, ChipProps, ContentCardProps, CardMediaProps as ContentCardMediaProps, ContentCardActionsProps, ContentCardTitleProps, IconNameToSizes, InputToggleExtraProps as InputToggleProps, PanelProps, BasicPanelProps, OverlayPanelProps, TabsProps$0 as TabsProps, SdsTagColorType, TooltipProps, TooltipTableContentProps };
1692
+ export type { AutocompleteBaseProps, AutocompleteMultiColumnProps, AutocompleteOptionBasic, AutocompleteOptionComponent, DefaultAutocompleteOption, ChipProps, ContentCardProps, CardMediaProps as ContentCardMediaProps, ContentCardActionsProps, ContentCardTitleProps, IconNameToSizes, InputToggleExtraProps as InputToggleProps, NavigationHeaderSecondaryNavItem, PanelProps, BasicPanelProps, OverlayPanelProps, TabsProps$0 as TabsProps, SdsTagColorType, TooltipProps, TooltipTableContentProps };
package/dist/index.cjs.js CHANGED
@@ -6901,6 +6901,9 @@ var doNotForwardProps$o = [
6901
6901
  "buttonsPosition",
6902
6902
  "clickableCard",
6903
6903
  "imageSize",
6904
+ "clickableCardProps",
6905
+ "cardSdsType",
6906
+ "classes",
6904
6907
  ];
6905
6908
  var StyledCard = styled__default.default(material.Card, {
6906
6909
  shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
@@ -6918,24 +6921,25 @@ var StyledCard = styled__default.default(material.Card, {
6918
6921
  var showDecorativeBorder = visualElementType === "image"
6919
6922
  ? boundingBox && decorativeBorder && imagePadding
6920
6923
  : boundingBox && decorativeBorder;
6921
- return react.css(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n display: flex;\n background-color: ", ";\n flex-direction: ", ";\n box-shadow: none;\n\n .MuiCardActionArea-focusHighlight {\n background: transparent;\n }\n\n ", "\n\n ", "\n\n ", "\n "], ["\n display: flex;\n background-color: ", ";\n flex-direction: ", ";\n box-shadow: none;\n\n .MuiCardActionArea-focusHighlight {\n background: transparent;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), (_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.backgroundPrimary, flexDirection, boundingBox && react.css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n border: 1px solid ", ";\n "], ["\n border: 1px solid ", ";\n "])), (_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.borderSecondary), sdsType === "wide" &&
6924
+ return react.css(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n display: flex;\n background-color: ", ";\n flex-direction: ", ";\n box-shadow: none;\n overflow: visible;\n\n .MuiCardActionArea-focusHighlight {\n background: transparent;\n }\n\n ", "\n\n ", "\n\n ", "\n "], ["\n display: flex;\n background-color: ", ";\n flex-direction: ", ";\n box-shadow: none;\n overflow: visible;\n\n .MuiCardActionArea-focusHighlight {\n background: transparent;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), (_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.backgroundPrimary, flexDirection, boundingBox && react.css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n border: 1px solid ", ";\n "], ["\n border: 1px solid ", ";\n "])), (_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.borderSecondary), sdsType === "wide" &&
6922
6925
  showDecorativeBorder && react.css(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n border-left: 4px solid ", ";\n "], ["\n border-left: 4px solid ", ";\n "])), (_c = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _c === void 0 ? void 0 : _c.border), sdsType === "narrow" &&
6923
6926
  showDecorativeBorder && react.css(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n border-top: 4px solid ", ";\n "], ["\n border-top: 4px solid ", ";\n "])), (_d = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _d === void 0 ? void 0 : _d.border));
6924
6927
  });
6925
- var StyledCardActionArea = styled__default.default(material.CardActionArea, {
6928
+ var StyledCardActionArea = styled__default.default(Button, {
6926
6929
  shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
6927
6930
  })(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
6928
6931
  var _a, _b;
6929
- var _c = props.imagePosition, imagePosition = _c === void 0 ? "left" : _c, _d = props.sdsType, sdsType = _d === void 0 ? "wide" : _d, visualElementType = props.visualElementType;
6932
+ var _c = props.imagePosition, imagePosition = _c === void 0 ? "left" : _c, _d = props.cardSdsType, cardSdsType = _d === void 0 ? "wide" : _d, visualElementType = props.visualElementType;
6930
6933
  var semanticColors = getSemanticColors(props);
6931
- var flexDirection = sdsType === "wide"
6934
+ var shadows = getShadows(props);
6935
+ var flexDirection = cardSdsType === "wide"
6932
6936
  ? imagePosition === "left"
6933
6937
  ? "row"
6934
6938
  : "row-reverse"
6935
6939
  : visualElementType === "image"
6936
6940
  ? "column"
6937
6941
  : "row";
6938
- return "\n display: flex;\n flex-direction: ".concat(flexDirection, ";\n align-items: unset;\n\n background-color: ").concat((_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.backgroundPrimary, ";\n\n &:hover,\n &:active {\n background-color: ").concat((_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.backgroundSecondary, ";\n }\n ");
6942
+ return "\n display: flex;\n flex-direction: ".concat(flexDirection, ";\n align-items: unset;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: auto;\n text-align: unset;\n\n background-color: ").concat((_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.backgroundPrimary, ";\n\n &:hover,\n &:active {\n background-color: ").concat((_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.surface, ";\n box-shadow: ").concat(shadows === null || shadows === void 0 ? void 0 : shadows.l, " !important;\n }\n ");
6939
6943
  });
6940
6944
  var StyledIconMediaWrapper = styled__default.default("div", {
6941
6945
  shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
@@ -6948,9 +6952,9 @@ var StyledIconMediaWrapper = styled__default.default("div", {
6948
6952
  var StyledCardContent = styled__default.default("div", {
6949
6953
  shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
6950
6954
  })(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
6951
- var _a = props.boundingBox, boundingBox = _a === void 0 ? true : _a, _b = props.clickableCard, clickableCard = _b === void 0 ? false : _b;
6955
+ var _a = props.boundingBox, boundingBox = _a === void 0 ? true : _a;
6952
6956
  var spaces = getSpaces(props);
6953
- return react.css(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n height: ", ";\n min-width: 100px;\n width: 100%;\n\n ", "\n "], ["\n display: flex;\n flex-direction: column;\n height: ", ";\n min-width: 100px;\n width: 100%;\n\n ", "\n "])), clickableCard ? "100%" : "auto", boundingBox && react.css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n padding: ", "px;\n "], ["\n padding: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.xl));
6957
+ return react.css(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n height: 100%;\n\n ", "\n "], ["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n height: 100%;\n\n ", "\n "])), boundingBox && react.css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n padding: ", "px;\n "], ["\n padding: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.xl));
6954
6958
  });
6955
6959
  var StyledContentCardBody = styled__default.default(material.CardContent, {
6956
6960
  shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
@@ -7015,8 +7019,9 @@ var templateObject_1$H, templateObject_2$q, templateObject_3$i, templateObject_4
7015
7019
  * @see https://mui.com/material-ui/react-dialog/
7016
7020
  */
7017
7021
  var ContentCardTitle = React.forwardRef(function ContentCardTitle(props, ref) {
7018
- var overlineText = props.overlineText, titleText = props.titleText, subtitleText = props.subtitleText, metadataText = props.metadataText;
7019
- return (jsxRuntime.jsxs("div", { ref: ref, children: [jsxRuntime.jsxs(StyledTitleWrapper, { children: [overlineText && (jsxRuntime.jsx(StyledOverlineText, { children: overlineText })), titleText && jsxRuntime.jsx(StyledTitleText, { children: titleText }), subtitleText && (jsxRuntime.jsx(StyledSubtitleText, { children: subtitleText }))] }), metadataText && (jsxRuntime.jsx(StyledMetadataText, { children: metadataText }))] }));
7022
+ var overlineText = props.overlineText, titleText = props.titleText, subtitleText = props.subtitleText, metadataText = props.metadataText, _a = props.classes, classes = _a === void 0 ? EMPTY_OBJECT : _a;
7023
+ var cardHeader = classes.cardHeader, cardOverline = classes.cardOverline, cardTitle = classes.cardTitle, cardSubtitle = classes.cardSubtitle, cardMetadata = classes.cardMetadata;
7024
+ return (jsxRuntime.jsxs("div", { ref: ref, children: [jsxRuntime.jsxs(StyledTitleWrapper, { className: cardHeader, children: [overlineText && (jsxRuntime.jsx(StyledOverlineText, { className: cardOverline, children: overlineText })), titleText && (jsxRuntime.jsx(StyledTitleText, { className: cardTitle, children: titleText })), subtitleText && (jsxRuntime.jsx(StyledSubtitleText, { className: cardSubtitle, children: subtitleText }))] }), metadataText && (jsxRuntime.jsx(StyledMetadataText, { className: cardMetadata, children: metadataText }))] }));
7020
7025
  });
7021
7026
 
7022
7027
  var doNotForwardProps$m = ["buttonsPosition"];
@@ -7042,7 +7047,8 @@ var isButtonElement = function (child) {
7042
7047
  * @see https://mui.com/material-ui/api/card-actions/
7043
7048
  */
7044
7049
  var ContentCardActions = React.forwardRef(function ContentCardActions(props, ref) {
7045
- var buttonsPosition = props.buttonsPosition, clickableCard = props.clickableCard, children = props.children;
7050
+ var buttonsPosition = props.buttonsPosition, clickableCard = props.clickableCard, children = props.children, _a = props.classes, classes = _a === void 0 ? EMPTY_OBJECT : _a;
7051
+ var cardActions = classes.cardActions;
7046
7052
  /**
7047
7053
  * (masoudmanson):
7048
7054
  * We need to ensure that only SDS buttons are used within the
@@ -7070,11 +7076,11 @@ var ContentCardActions = React.forwardRef(function ContentCardActions(props, ref
7070
7076
  if (!clickableCardButton) {
7071
7077
  return null;
7072
7078
  }
7073
- return (jsxRuntime.jsx(StyledCardActions, { ref: ref, buttonsPosition: buttonsPosition, children: [
7074
- React__namespace.default.cloneElement(clickableCardButton, __assign({ component: "a" }, clickableCardButton === null || clickableCardButton === void 0 ? void 0 : clickableCardButton.props)),
7079
+ return (jsxRuntime.jsx(StyledCardActions, { ref: ref, buttonsPosition: buttonsPosition, className: cardActions, children: [
7080
+ React__namespace.default.cloneElement(clickableCardButton, __assign({ component: "div" }, clickableCardButton === null || clickableCardButton === void 0 ? void 0 : clickableCardButton.props)),
7075
7081
  ] }));
7076
7082
  }
7077
- return (jsxRuntime.jsx(StyledCardActions, { ref: ref, buttonsPosition: buttonsPosition, children: validChildren }));
7083
+ return (jsxRuntime.jsx(StyledCardActions, { ref: ref, buttonsPosition: buttonsPosition, className: cardActions, children: validChildren }));
7078
7084
  });
7079
7085
 
7080
7086
  var doNotForwardProps$l = [
@@ -7108,7 +7114,7 @@ var templateObject_1$F, templateObject_2$p, templateObject_3$h, templateObject_4
7108
7114
  * @see https://mui.com/material-ui/api/card-media/
7109
7115
  */
7110
7116
  var ContentCardImageMedia = React.forwardRef(function ContentCardImageMedia(props, ref) {
7111
- var image = props.image, imageSize = props.imageSize, sdsType = props.sdsType;
7117
+ var image = props.image, imageSize = props.imageSize, sdsType = props.sdsType, className = props.className;
7112
7118
  /**
7113
7119
  * (masoudmanson): These styles makes the image responsive and
7114
7120
  * ensures the image is the right aspect ratio in different card sizes.
@@ -7125,12 +7131,16 @@ var ContentCardImageMedia = React.forwardRef(function ContentCardImageMedia(prop
7125
7131
  * (masoudmanson): We need to make sure the image is wrapped in a CardMedia component.
7126
7132
  * - If it's a string, wrap it in CardMedia with proper styles.
7127
7133
  * - If it's already a CardMedia component, clone it and apply the styles.
7134
+ * - If it's a valid element, clone it and apply the styles.
7135
+ * - If it's null, return null.
7128
7136
  */
7129
7137
  var imageElement = typeof image === "string" ? (jsxRuntime.jsx(material.CardMedia, { component: "img", src: image, alt: "Content Card Media", sx: __assign({}, imageMediaStyles) })) : React__namespace.default.isValidElement(image) && image.type === material.CardMedia ? (React__namespace.default.cloneElement(image, {
7130
7138
  component: "img",
7131
7139
  sx: __assign(__assign({}, image.props.sx), imageMediaStyles),
7140
+ })) : React__namespace.default.isValidElement(image) ? (React__namespace.default.cloneElement(image, {
7141
+ style: __assign(__assign({}, imageMediaStyles), { objectFit: "cover", objectPosition: "center" }),
7132
7142
  })) : null;
7133
- return (jsxRuntime.jsx(StyledImageMediaWrapper, __assign({ ref: ref }, props, { children: imageElement })));
7143
+ return (jsxRuntime.jsx(StyledImageMediaWrapper, __assign({ ref: ref }, props, { className: className, children: imageElement })));
7134
7144
  });
7135
7145
 
7136
7146
  var CONTENT_CARD_DEFAULT_IMAGE_MEDIA_SIZE = 300;
@@ -7158,10 +7168,10 @@ var useResponsiveWidth = function (initialSdsType) {
7158
7168
  * (masoudmanson): This function is used to add the clickableCard and
7159
7169
  * buttonsPosition props to the ContentCardActions sub-component.
7160
7170
  */
7161
- var enhanceChildrenWithCardActionsProps = function (children, clickableCard, buttonsPosition) {
7171
+ var enhanceChildrenWithCardActionsProps = function (children, clickableCard, buttonsPosition, classes) {
7162
7172
  return React__namespace.default.Children.map(children, function (child) {
7163
7173
  if (React__namespace.default.isValidElement(child) && child.type === ContentCardActions) {
7164
- return React__namespace.default.cloneElement(child, __assign(__assign({}, child.props), { buttonsPosition: buttonsPosition, clickableCard: clickableCard }));
7174
+ return React__namespace.default.cloneElement(child, __assign(__assign({}, child.props), { buttonsPosition: buttonsPosition, classes: classes, clickableCard: clickableCard }));
7165
7175
  }
7166
7176
  return child;
7167
7177
  });
@@ -7170,11 +7180,12 @@ var enhanceChildrenWithCardActionsProps = function (children, clickableCard, but
7170
7180
  * @see https://mui.com/material-ui/react-card/
7171
7181
  */
7172
7182
  var ContentCard = React__namespace.default.forwardRef(function (props, ref) {
7173
- var _a = props.visualElementType, visualElementType = _a === void 0 ? "none" : _a, image = props.image, icon = props.icon, _b = props.imagePadding, imagePadding = _b === void 0 ? false : _b, _c = props.imageSize, imageSize = _c === void 0 ? CONTENT_CARD_DEFAULT_IMAGE_MEDIA_SIZE : _c, overlineText = props.overlineText, titleText = props.titleText, subtitleText = props.subtitleText, metadataText = props.metadataText, _d = props.boundingBox, propsBoundingBox = _d === void 0 ? true : _d, children = props.children, _e = props.sdsType, sdsType = _e === void 0 ? "wide" : _e, _f = props.clickableCard, clickableCard = _f === void 0 ? false : _f, _g = props.imagePosition, imagePosition = _g === void 0 ? "left" : _g, _h = props.buttonsPosition, buttonsPosition = _h === void 0 ? "left" : _h;
7183
+ var _a = props.visualElementType, visualElementType = _a === void 0 ? "none" : _a, image = props.image, icon = props.icon, _b = props.imagePadding, imagePadding = _b === void 0 ? false : _b, _c = props.imageSize, imageSize = _c === void 0 ? CONTENT_CARD_DEFAULT_IMAGE_MEDIA_SIZE : _c, overlineText = props.overlineText, titleText = props.titleText, subtitleText = props.subtitleText, metadataText = props.metadataText, _d = props.boundingBox, propsBoundingBox = _d === void 0 ? true : _d, children = props.children, _e = props.sdsType, sdsType = _e === void 0 ? "wide" : _e, _f = props.clickableCard, clickableCard = _f === void 0 ? false : _f, _g = props.imagePosition, imagePosition = _g === void 0 ? "left" : _g, _h = props.buttonsPosition, buttonsPosition = _h === void 0 ? "left" : _h, clickableCardProps = props.clickableCardProps, _j = props.classes, classes = _j === void 0 ? EMPTY_OBJECT : _j;
7184
+ var cardMedia = classes.cardMedia, cardContent = classes.cardContent, cardHeader = classes.cardHeader, cardMetadata = classes.cardMetadata, cardOverline = classes.cardOverline, cardSubtitle = classes.cardSubtitle, cardTitle = classes.cardTitle, cardActions = classes.cardActions, cardPaper = classes.cardPaper, clickableCardButton = classes.clickableCardButton;
7174
7185
  // Force boundingBox to be true when clickableCard is true
7175
7186
  var boundingBox = clickableCard ? true : propsBoundingBox;
7176
7187
  var cardRef = React.useRef(null);
7177
- var _j = useResponsiveWidth(sdsType), handleResize = _j.handleResize, dynamicSdsType = _j.dynamicSdsType;
7188
+ var _k = useResponsiveWidth(sdsType), handleResize = _k.handleResize, dynamicSdsType = _k.dynamicSdsType;
7178
7189
  React.useEffect(function () {
7179
7190
  var element = cardRef.current;
7180
7191
  if (!element)
@@ -7190,9 +7201,21 @@ var ContentCard = React__namespace.default.forwardRef(function (props, ref) {
7190
7201
  resizeObserver.disconnect();
7191
7202
  };
7192
7203
  }, [handleResize]);
7193
- var visualElement = visualElementType === "image" && image ? (jsxRuntime.jsx(ContentCardImageMedia, { imagePadding: imagePadding, boundingBox: boundingBox, sdsType: dynamicSdsType, imageSize: imageSize, image: image, imagePosition: imagePosition })) : visualElementType === "icon" && icon ? (jsxRuntime.jsx(StyledIconMediaWrapper, { boundingBox: boundingBox, children: icon })) : null;
7194
- var cardInnerContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [visualElement, jsxRuntime.jsxs(StyledCardContent, { boundingBox: boundingBox, clickableCard: clickableCard, children: [jsxRuntime.jsx(ContentCardTitle, { overlineText: overlineText, titleText: titleText, subtitleText: subtitleText, metadataText: metadataText }), jsxRuntime.jsx(StyledCardContentAligner, { children: enhanceChildrenWithCardActionsProps(children, clickableCard, buttonsPosition) })] })] }));
7195
- return (jsxRuntime.jsx(StyledCard, __assign({ ref: mergeRefs([ref, cardRef]) }, props, { sdsType: dynamicSdsType, boundingBox: boundingBox, children: clickableCard ? (jsxRuntime.jsx(StyledCardActionArea, { sdsType: dynamicSdsType, visualElementType: visualElementType, imagePosition: imagePosition, children: cardInnerContent })) : (cardInnerContent) })));
7204
+ var visualElement = visualElementType === "image" && image ? (jsxRuntime.jsx(ContentCardImageMedia, { imagePadding: imagePadding, boundingBox: boundingBox, sdsType: dynamicSdsType, imageSize: imageSize, image: image, imagePosition: imagePosition, className: cardMedia })) : visualElementType === "icon" && icon ? (jsxRuntime.jsx(StyledIconMediaWrapper, { boundingBox: boundingBox, className: cardMedia, children: icon })) : null;
7205
+ var cardInnerContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [visualElement, jsxRuntime.jsxs(StyledCardContent, { boundingBox: boundingBox, clickableCard: clickableCard, className: cardContent, children: [jsxRuntime.jsx(ContentCardTitle, { overlineText: overlineText, titleText: titleText, subtitleText: subtitleText, metadataText: metadataText, classes: {
7206
+ cardHeader: cardHeader,
7207
+ cardMetadata: cardMetadata,
7208
+ cardOverline: cardOverline,
7209
+ cardSubtitle: cardSubtitle,
7210
+ cardTitle: cardTitle,
7211
+ } }), jsxRuntime.jsx(StyledCardContentAligner, { children: enhanceChildrenWithCardActionsProps(children, clickableCard, buttonsPosition, {
7212
+ cardActions: cardActions,
7213
+ }) })] })] }));
7214
+ return (jsxRuntime.jsx(StyledCard, __assign({ ref: mergeRefs([ref, cardRef]) }, props, { sdsType: dynamicSdsType, boundingBox: boundingBox, className: cardPaper, children: clickableCard ? (jsxRuntime.jsx(StyledCardActionArea, __assign({}, clickableCardProps, {
7215
+ // (masoudmanson): The following props are for internal use only and should not be user editable.
7216
+ // To prevent users from overriding them, we use the spread operator to pass user provided props
7217
+ // to the StyledCardActionArea component on top while hardcoding the rest after it.
7218
+ sdsStyle: "minimal", cardSdsType: dynamicSdsType, visualElementType: visualElementType, imagePosition: imagePosition, className: clickableCardButton, children: cardInnerContent }))) : (cardInnerContent) })));
7196
7219
  });
7197
7220
 
7198
7221
  var DialogContext = React.createContext({ sdsSize: "m" });
@@ -14296,6 +14319,8 @@ var doNotForwardProps$9 = [
14296
14319
  "isNarrow",
14297
14320
  "primaryNavPosition",
14298
14321
  "showSearch",
14322
+ "logoLinkComponent",
14323
+ "logoLinkProps",
14299
14324
  ];
14300
14325
  var StyledHeader = styled__default.default(material.AppBar, {
14301
14326
  shouldForwardProp: function (prop) { return !doNotForwardProps$9.includes(prop); },
@@ -14542,7 +14567,7 @@ var NarrowStyledTextItem = function (props) {
14542
14567
  };
14543
14568
  var StyledTextItem = styled__default.default(Button, {
14544
14569
  shouldForwardProp: function (prop) { return !ButtonDoNotForwardProps.includes(prop); },
14545
- })(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n ", "\n\n background: none;\n justify-content: flex-start;\n min-height: 44px;\n width: 100%;\n\n ", "\n"], ["\n ", "\n\n background: none;\n justify-content: flex-start;\n min-height: 44px;\n width: 100%;\n\n ", "\n"])), fontHeaderS, function (props) {
14570
+ })(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n ", "\n\n background: none;\n justify-content: flex-start;\n min-height: 44px;\n width: fit-content;\n min-width: unset;\n\n ", "\n"], ["\n ", "\n\n background: none;\n justify-content: flex-start;\n min-height: 44px;\n width: fit-content;\n min-width: unset;\n\n ", "\n"])), fontHeaderS, function (props) {
14546
14571
  var _a, _b;
14547
14572
  var hasInvertedStyle = props.hasInvertedStyle, open = props.open, isNarrow = props.isNarrow;
14548
14573
  var semanticColors = getSemanticColors(props);
@@ -14568,7 +14593,7 @@ var StyledTextItem = styled__default.default(Button, {
14568
14593
  var doNotForwardProps$6 = ["hasInvertedStyle", "isNarrow"];
14569
14594
  var StyledAccordion = styled__default.default(Accordion, {
14570
14595
  shouldForwardProp: function (prop) { return !doNotForwardProps$6.includes(prop); },
14571
- })(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n width: 100%;\n\n .MuiAccordionDetails-root .MuiButtonBase-root .primary-text {\n ", "\n }\n\n ", "\n"], ["\n width: 100%;\n\n .MuiAccordionDetails-root .MuiButtonBase-root .primary-text {\n ", "\n }\n\n ", "\n"])), fontBodyS$1, function (props) {
14596
+ })(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n width: fit-content;\n min-width: unset;\n\n .MuiAccordionDetails-root .MuiButtonBase-root .primary-text {\n ", "\n }\n\n ", "\n"], ["\n width: fit-content;\n min-width: unset;\n\n .MuiAccordionDetails-root .MuiButtonBase-root .primary-text {\n ", "\n }\n\n ", "\n"])), fontBodyS$1, function (props) {
14572
14597
  var _a, _b;
14573
14598
  var hasInvertedStyle = props.hasInvertedStyle, isNarrow = props.isNarrow;
14574
14599
  var spaces = getSpaces(props);
@@ -14602,7 +14627,7 @@ var StyledSubItem = styled__default.default(MenuItem)(templateObject_7 || (templ
14602
14627
  var templateObject_1$g, templateObject_2$9, templateObject_3$4, templateObject_4$3, templateObject_5$2, templateObject_6$1, templateObject_7;
14603
14628
 
14604
14629
  function SecondaryNavItem(_a) {
14605
- var item = _a.item, hasInvertedStyle = _a.hasInvertedStyle, isNarrow = _a.isNarrow;
14630
+ var item = _a.item, hasInvertedStyle = _a.hasInvertedStyle, isNarrow = _a.isNarrow, rest = __rest(_a, ["item", "hasInvertedStyle", "isNarrow"]);
14606
14631
  var _b = React.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
14607
14632
  var open = Boolean(anchorEl);
14608
14633
  function onClose() {
@@ -14617,32 +14642,39 @@ function SecondaryNavItem(_a) {
14617
14642
  }
14618
14643
  setMenuWidth(button.offsetWidth);
14619
14644
  }, []);
14620
- return (jsxRuntime.jsxs(React.Fragment, { children: [item.type === "text" && (jsxRuntime.jsx(StyledTextItem, { sdsStyle: "minimal", onClick: item.onClick, hasInvertedStyle: hasInvertedStyle, open: open, isNarrow: isNarrow, children: item.label })), item.type === "dropdown" && !isNarrow && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledTextItem, { sdsStyle: "minimal", ref: buttonRef, onClick: function (event) { return setAnchorEl(event.currentTarget); }, hasInvertedStyle: hasInvertedStyle, open: open, isNarrow: isNarrow, children: [jsxRuntime.jsx("span", { children: item.label }), jsxRuntime.jsx(Icon, { sdsIcon: open ? "ChevronUp" : "ChevronDown", sdsSize: "xs" })] }), jsxRuntime.jsx(Menu, { anchorEl: anchorEl, open: open, onClose: onClose, children: item.items.map(function (subItem) { return (jsxRuntime.jsx(MenuItem, { onClick: function () {
14621
- var _a;
14622
- (_a = subItem.onClick) === null || _a === void 0 ? void 0 : _a.call(subItem);
14623
- onClose();
14624
- }, sx: { background: "red", width: menuWidth }, children: subItem.label }, subItem.label)); }) })] })), item.type === "dropdown" && isNarrow && (jsxRuntime.jsxs(StyledAccordion, { id: "".concat(item.label, "-dropdown"), hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: [jsxRuntime.jsx(AccordionHeader, { children: item.label }), jsxRuntime.jsx(AccordionDetails, { children: item.items.map(function (subItem) { return (jsxRuntime.jsx(StyledSubItem, { onClick: function () {
14625
- var _a;
14626
- (_a = subItem.onClick) === null || _a === void 0 ? void 0 : _a.call(subItem);
14627
- onClose();
14628
- }, sx: { width: menuWidth }, children: subItem.label }, subItem.label)); }) })] }))] }, item.label));
14645
+ return (jsxRuntime.jsxs(React.Fragment, { children: [item.itemType === "text" && (jsxRuntime.jsx(StyledTextItem, __assign({ sdsStyle: "minimal", onClick: item.onClick, hasInvertedStyle: hasInvertedStyle, open: open, isNarrow: isNarrow }, rest, { children: item.label }))), item.itemType === "dropdown" && !isNarrow && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledTextItem, { sdsStyle: "minimal", ref: buttonRef, onClick: function (event) { return setAnchorEl(event.currentTarget); }, hasInvertedStyle: hasInvertedStyle, open: open, isNarrow: isNarrow, children: [jsxRuntime.jsx("span", { children: item.label }), jsxRuntime.jsx(Icon, { sdsIcon: open ? "ChevronUp" : "ChevronDown", sdsSize: "xs" })] }), jsxRuntime.jsx(Menu, { anchorEl: anchorEl, open: open, onClose: onClose, children: item.items.map(function (subItem) {
14646
+ var label = subItem.label, onClick = subItem.onClick, subItemRest = __rest(subItem, ["label", "onClick"]);
14647
+ return (jsxRuntime.jsx(MenuItem, __assign({ onClick: function () {
14648
+ onClick === null || onClick === void 0 ? void 0 : onClick();
14649
+ onClose();
14650
+ } }, subItemRest, { children: label }), label));
14651
+ }) })] })), item.itemType === "dropdown" && isNarrow && (jsxRuntime.jsxs(StyledAccordion, { id: "".concat(item.label, "-dropdown"), hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: [jsxRuntime.jsx(AccordionHeader, { children: item.label }), jsxRuntime.jsx(AccordionDetails, { children: item.items.map(function (subItem) {
14652
+ var label = subItem.label, onClick = subItem.onClick, accordionSubItemRest = __rest(subItem, ["label", "onClick"]);
14653
+ return (jsxRuntime.jsx(StyledSubItem, __assign({ onClick: function () {
14654
+ onClick === null || onClick === void 0 ? void 0 : onClick();
14655
+ onClose();
14656
+ }, sx: { width: menuWidth } }, accordionSubItemRest, { children: label }), label));
14657
+ }) })] }))] }, item.label));
14629
14658
  }
14630
14659
  function NavigationHeaderSecondaryNav(_a) {
14631
14660
  var items = _a.items, hasInvertedStyle = _a.hasInvertedStyle, isNarrow = _a.isNarrow;
14632
- return (jsxRuntime.jsx(StyledSection, { gap: "l", isNarrow: isNarrow, children: items.map(function (item) { return (jsxRuntime.jsx(SecondaryNavItem, { item: item, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow }, "".concat(item.label, "-").concat(item.type))); }) }));
14661
+ return (jsxRuntime.jsx(StyledSection, { gap: "l", isNarrow: isNarrow, children: items.map(function (item) {
14662
+ var itemType = item.itemType, label = item.label, rest = __rest(item, ["itemType", "label"]);
14663
+ return (jsxRuntime.jsx(SecondaryNavItem, __assign({ item: item, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow }, rest), "".concat(label, "-").concat(itemType)));
14664
+ }) }));
14633
14665
  }
14634
14666
 
14635
14667
  var NavigationHeader = React.forwardRef(function (props, ref) {
14636
- var activePrimaryNavKey = props.activePrimaryNavKey, buttons = props.buttons, hasInvertedStyle = props.hasInvertedStyle, logo = props.logo, logoUrl = props.logoUrl, primaryNavItems = props.primaryNavItems, _a = props.primaryNavPosition, primaryNavPosition = _a === void 0 ? "left" : _a, searchProps = props.searchProps, secondaryNavItems = props.secondaryNavItems, setActivePrimaryNavKey = props.setActivePrimaryNavKey, _b = props.showSearch, showSearch = _b === void 0 ? true : _b, tag = props.tag, tagColor = props.tagColor, title = props.title, rest = __rest(props, ["activePrimaryNavKey", "buttons", "hasInvertedStyle", "logo", "logoUrl", "primaryNavItems", "primaryNavPosition", "searchProps", "secondaryNavItems", "setActivePrimaryNavKey", "showSearch", "tag", "tagColor", "title"]);
14668
+ var activePrimaryNavKey = props.activePrimaryNavKey, buttons = props.buttons, hasInvertedStyle = props.hasInvertedStyle, logo = props.logo, logoUrl = props.logoUrl, _a = props.logoLinkComponent, logoLinkComponent = _a === void 0 ? "a" : _a, logoLinkProps = props.logoLinkProps, primaryNavItems = props.primaryNavItems, _b = props.primaryNavPosition, primaryNavPosition = _b === void 0 ? "left" : _b, searchProps = props.searchProps, secondaryNavItems = props.secondaryNavItems, setActivePrimaryNavKey = props.setActivePrimaryNavKey, _c = props.showSearch, showSearch = _c === void 0 ? true : _c, tag = props.tag, tagColor = props.tagColor, title = props.title, rest = __rest(props, ["activePrimaryNavKey", "buttons", "hasInvertedStyle", "logo", "logoUrl", "logoLinkComponent", "logoLinkProps", "primaryNavItems", "primaryNavPosition", "searchProps", "secondaryNavItems", "setActivePrimaryNavKey", "showSearch", "tag", "tagColor", "title"]);
14637
14669
  var navRef = React.useRef(null);
14638
14670
  var theme = useTheme();
14639
14671
  var isMdScreen = material.useMediaQuery(theme.breakpoints.down("md"));
14640
14672
  React.useEffect(function () {
14641
14673
  setIsNarrow(isMdScreen);
14642
14674
  }, [isMdScreen]);
14643
- var _c = React.useState(true), drawerOpen = _c[0], setDrawerOpen = _c[1];
14644
- var _d = React.useState(isMdScreen), isNarrow = _d[0], setIsNarrow = _d[1];
14645
- var _e = React.useState(0), breakpoint = _e[0], setBreakpoint = _e[1];
14675
+ var _d = React.useState(true), drawerOpen = _d[0], setDrawerOpen = _d[1];
14676
+ var _e = React.useState(isMdScreen), isNarrow = _e[0], setIsNarrow = _e[1];
14677
+ var _f = React.useState(0), breakpoint = _f[0], setBreakpoint = _f[1];
14646
14678
  var checkScrollable = React.useCallback(function () {
14647
14679
  if (!navRef.current)
14648
14680
  return;
@@ -14667,8 +14699,8 @@ var NavigationHeader = React.forwardRef(function (props, ref) {
14667
14699
  };
14668
14700
  var renderLogoNode = function () {
14669
14701
  var logoNode = (jsxRuntime.jsxs(StyledTitleContainer, { hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: [jsxRuntime.jsx(StyledLogoWrapper, { children: logo }), jsxRuntime.jsx("p", { children: title }), tag && jsxRuntime.jsx(StyledTag, { color: tagColor, label: tag, hover: false })] }));
14670
- if (logoUrl) {
14671
- logoNode = (jsxRuntime.jsx(StyledLogoLinkWrapper, { href: logoUrl, isNarrow: isNarrow, children: logoNode }));
14702
+ if (logoLinkComponent || logoUrl) {
14703
+ logoNode = (jsxRuntime.jsx(StyledLogoLinkWrapper, __assign({ component: logoLinkComponent, href: logoUrl }, logoLinkProps, { isNarrow: isNarrow, children: logoNode })));
14672
14704
  }
14673
14705
  return logoNode;
14674
14706
  };