@czi-sds/components 22.4.0 → 22.5.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.
@@ -364,10 +364,65 @@ declare const Theme$0: (t: PaletteMode) => import("@mui/material").Theme;
364
364
  * Use the `theme` export to get a flexible light/dark mode theme function
365
365
  */
366
366
  declare const defaultTheme: import("@mui/material").Theme;
367
+ declare const createAppThemeBorders: (colors: Colors, isDarkMode: boolean) => {
368
+ accent: {
369
+ default: string;
370
+ focused: string;
371
+ hover: string;
372
+ open: string;
373
+ pressed: string;
374
+ selected: string;
375
+ };
376
+ base: {
377
+ default: string;
378
+ disabled: string;
379
+ divider: string;
380
+ dividerInverse: string;
381
+ hover: string;
382
+ inverse: string;
383
+ pressed: string;
384
+ table: string;
385
+ };
386
+ beta: {
387
+ default: string;
388
+ extraThick: string;
389
+ thick: string;
390
+ };
391
+ info: {
392
+ default: string;
393
+ extraThick: string;
394
+ thick: string;
395
+ };
396
+ link: {
397
+ dashed: string;
398
+ solid: string;
399
+ };
400
+ negative: {
401
+ default: string;
402
+ extraThick: string;
403
+ thick: string;
404
+ };
405
+ neutral: {
406
+ default: string;
407
+ extraThick: string;
408
+ thick: string;
409
+ };
410
+ none: string;
411
+ notice: {
412
+ default: string;
413
+ extraThick: string;
414
+ thick: string;
415
+ };
416
+ positive: {
417
+ default: string;
418
+ extraThick: string;
419
+ thick: string;
420
+ };
421
+ };
367
422
  /**
368
423
  * Create a SDS App Theme with custom colors that follows the SDS color model.
369
424
  */
370
- declare const makeSdsSemanticAppTheme: (colors: Colors) => AppTheme;
425
+ declare const makeSdsSemanticAppTheme: (colors: Colors, isDarkTheme?: boolean) => AppTheme;
371
426
  declare const SDSLightAppTheme: AppTheme;
372
427
  declare const SDSDarkAppTheme: AppTheme;
373
428
  /**
@@ -811,6 +866,9 @@ declare const Button: React.ForwardRefExoticComponent<(Omit<SdsIconButtonProps,
811
866
  interface BannerExtraProps extends CommonThemeProps {
812
867
  sdsType: "primary" | "secondary";
813
868
  }
869
+ type ButtonType$0 = ButtonProps & {
870
+ bannerType: string;
871
+ } & CommonThemeProps;
814
872
  interface BannerProps extends BannerExtraProps {
815
873
  children: React.ReactNode;
816
874
  icon?: keyof IconNameToSizes | React.ReactElement<CustomSVGProps>;
@@ -820,19 +878,18 @@ interface BannerProps extends BannerExtraProps {
820
878
  onClose?: (e: React.MouseEvent) => void;
821
879
  }
822
880
  declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement | null>>;
823
- type SDSButtonDropdownSizes = "small" | "medium" | "large";
824
881
  type SdsProps$0 = {
825
882
  sdsStyle: "icon";
826
- sdsType?: "primary" | "secondary" | "tertiary";
883
+ sdsType?: ButtonTypeMap["icon"];
827
884
  icon: keyof IconNameToSizes | React.ReactElement<CustomSVGProps>;
828
885
  sdsIconProps?: Partial<IconProps<keyof IconNameToSizes>>;
829
- sdsSize?: SDSButtonDropdownSizes;
886
+ sdsSize?: ButtonSize;
830
887
  } | {
831
888
  sdsStyle: "rounded" | "square";
832
- sdsType?: "primary" | "secondary" | "destructive";
889
+ sdsType?: ButtonTypeMap["rounded"];
833
890
  icon?: keyof IconNameToSizes | React.ReactElement<CustomSVGProps>;
834
891
  sdsIconProps?: Partial<IconProps<keyof IconNameToSizes>>;
835
- sdsSize?: SDSButtonDropdownSizes;
892
+ sdsSize?: ButtonSize;
836
893
  };
837
894
  type ButtonDropdownProps = ButtonProps & SdsProps$0;
838
895
  /**
@@ -843,13 +900,13 @@ declare const ButtonDropdown: React.ForwardRefExoticComponent<(Omit<SdsIconButto
843
900
  sdsType?: "primary" | "secondary" | "tertiary" | undefined;
844
901
  icon: keyof IconNameToSizes | React.ReactElement<CustomSVGProps>;
845
902
  sdsIconProps?: Partial<IconProps<keyof IconNameToSizes>> | undefined;
846
- sdsSize?: SDSButtonDropdownSizes | undefined;
903
+ sdsSize?: ButtonSize | undefined;
847
904
  }, "ref"> | Omit<SdsButtonProps & {
848
905
  sdsStyle: "rounded" | "square";
849
906
  sdsType?: "primary" | "secondary" | "destructive" | undefined;
850
907
  icon?: keyof IconNameToSizes | React.ReactElement<CustomSVGProps, string | React.JSXElementConstructor<any>> | undefined;
851
908
  sdsIconProps?: Partial<IconProps<keyof IconNameToSizes>> | undefined;
852
- sdsSize?: SDSButtonDropdownSizes | undefined;
909
+ sdsSize?: ButtonSize | undefined;
853
910
  }, "ref">) & React.RefAttributes<HTMLButtonElement>>;
854
911
  interface ButtonIconExtraProps extends CommonThemeProps {
855
912
  disabled?: boolean;
@@ -1108,40 +1165,15 @@ declare const StyledContentCardBody: import("@emotion/styled").StyledComponent<i
1108
1165
  }, "className" | "style" | "classes" | "children" | "sx"> & {
1109
1166
  theme?: import("@emotion/react").Theme | undefined;
1110
1167
  } & CardExtraProps, {}, {}>;
1111
- interface ContentCardTitleProps {
1112
- overlineText?: string;
1113
- titleText?: string;
1114
- subtitleText?: string;
1115
- metadataText?: string;
1116
- classes?: {
1117
- cardHeader?: string;
1118
- cardOverline?: string;
1119
- cardTitle?: string;
1120
- cardSubtitle?: string;
1121
- cardMetadata?: string;
1122
- };
1123
- }
1124
- interface ContentCardActionsProps {
1125
- buttonsPosition?: "left" | "right";
1126
- clickableCard?: ContentCardProps["clickableCard"];
1127
- classes?: {
1128
- cardActions?: string;
1129
- };
1130
- children: React.ReactElement<ButtonProps> | Array<React.ReactElement<ButtonProps>>;
1131
- }
1132
- /**
1133
- * @see https://mui.com/material-ui/api/card-actions/
1134
- */
1135
- declare const ContentCardActions: React.ForwardRefExoticComponent<ContentCardActionsProps & React.RefAttributes<HTMLDivElement>>;
1136
1168
  interface BaseContentCardProps extends CardProps {
1137
1169
  sdsType?: "wide" | "narrow";
1138
- overlineText?: string;
1139
- titleText?: string;
1140
- subtitleText?: string;
1141
- metadataText?: string;
1170
+ overlineText?: ReactNode;
1171
+ titleText?: ReactNode;
1172
+ subtitleText?: ReactNode;
1173
+ metadataText?: ReactNode;
1142
1174
  boundingBox?: boolean;
1143
1175
  decorativeBorder?: boolean;
1144
- children?: React.ReactNode;
1176
+ children?: ReactNode;
1145
1177
  clickableCard?: boolean;
1146
1178
  clickableCardProps?: Partial<SdsMinimalButtonProps>;
1147
1179
  buttonsPosition?: "left" | "right";
@@ -1160,7 +1192,7 @@ interface BaseContentCardProps extends CardProps {
1160
1192
  }
1161
1193
  interface ImageContentCardProps extends BaseContentCardProps {
1162
1194
  visualElementType: "image";
1163
- image?: React.ReactNode;
1195
+ image?: ReactNode;
1164
1196
  imagePosition?: "left" | "right";
1165
1197
  imagePadding?: boolean;
1166
1198
  imageSize?: number;
@@ -1168,7 +1200,7 @@ interface ImageContentCardProps extends BaseContentCardProps {
1168
1200
  }
1169
1201
  interface IconContentCardProps extends BaseContentCardProps {
1170
1202
  visualElementType: "icon";
1171
- icon?: React.ReactNode;
1203
+ icon?: ReactNode;
1172
1204
  image?: never;
1173
1205
  imageSize?: never;
1174
1206
  imagePosition?: never;
@@ -1183,6 +1215,31 @@ interface NoneContentCardProps extends BaseContentCardProps {
1183
1215
  imageSize?: never;
1184
1216
  }
1185
1217
  type ContentCardProps = ImageContentCardProps | IconContentCardProps | NoneContentCardProps;
1218
+ interface ContentCardTitleProps extends Pick<BaseContentCardProps, "overlineText" | "titleText" | "subtitleText" | "metadataText"> {
1219
+ classes?: {
1220
+ cardHeader?: string;
1221
+ cardOverline?: string;
1222
+ cardTitle?: string;
1223
+ cardSubtitle?: string;
1224
+ cardMetadata?: string;
1225
+ };
1226
+ }
1227
+ interface ContentCardActionsProps {
1228
+ buttonsPosition?: "left" | "right";
1229
+ clickableCard?: ContentCardProps["clickableCard"];
1230
+ classes?: {
1231
+ cardActions?: string;
1232
+ };
1233
+ children: React.ReactElement<ButtonProps> | Array<React.ReactElement<ButtonProps>>;
1234
+ }
1235
+ /**
1236
+ * @see https://mui.com/material-ui/api/card-actions/
1237
+ */
1238
+ declare const ContentCardActions: React.ForwardRefExoticComponent<ContentCardActionsProps & React.RefAttributes<HTMLDivElement>>;
1239
+ declare const StyledOverlineText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
1240
+ declare const StyledTitleText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
1241
+ declare const StyledSubtitleText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
1242
+ declare const StyledMetadataText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
1186
1243
  /**
1187
1244
  * @see https://mui.com/material-ui/react-card/
1188
1245
  */
@@ -1731,5 +1788,5 @@ type TooltipTableContentProps = TooltipTableExtraProps;
1731
1788
  * @see https://mui.com/material-ui/react-table/
1732
1789
  */
1733
1790
  declare const TooltipTableContent: (props: TooltipTableContentProps) => JSX.Element;
1734
- 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, 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 };
1791
+ 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, ButtonType$0 as ButtonType, ButtonTypeMap, ButtonSize, 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, StyledTitleText as ContentCardTitle, StyledSubtitleText as ContentCardSubtitle, StyledMetadataText as ContentCardMetadata, StyledOverlineText as ContentCardOverline, 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, 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, createAppThemeBorders, 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 };
1735
1792
  export type { AutocompleteBaseProps, AutocompleteMultiColumnProps, AutocompleteOptionBasic, AutocompleteOptionComponent, DefaultAutocompleteOption, ChipProps, ContentCardProps, CardMediaProps as ContentCardMediaProps, ContentCardActionsProps, ContentCardTitleProps, IconNameToSizes, InputToggleExtraProps as InputToggleProps, NavigationHeaderProps, IconButtonProps, NavigationHeaderPrimaryNavItem, NavigationHeaderPrimaryNavProps, NavigationHeaderSecondaryNavItem, NavigationHeaderSecondaryNavProps, PanelProps, BasicPanelProps, OverlayPanelProps, TabsProps$0 as TabsProps, SdsTagColorType, TooltipProps, TooltipTableContentProps };
package/dist/index.cjs.js CHANGED
@@ -815,12 +815,6 @@ var sharedAppTheme = {
815
815
  },
816
816
  },
817
817
  };
818
- /**
819
- * Create a SDS App Theme with custom colors that follows the SDS color model.
820
- */
821
- var makeSdsSemanticAppTheme = function (colors) { return (__assign(__assign({}, sharedAppTheme), { colors: colors })); };
822
- var SDSLightAppTheme = makeSdsSemanticAppTheme(SDSLightThemeColors);
823
- var SDSDarkAppTheme = makeSdsSemanticAppTheme(SDSDarkThemeColors);
824
818
  // (mlila) whenever our theme uses colors, we need to make sure we allow consuming
825
819
  // applications to override those colors using their own custom theme.
826
820
  // By defining borders using SDSAppTheme.colors instead of defaultThemeColors,
@@ -830,116 +824,79 @@ var SDSDarkAppTheme = makeSdsSemanticAppTheme(SDSDarkThemeColors);
830
824
  //
831
825
  // (masoudmanson): We need to define borders separately for light and dark themes
832
826
  // because the border colors are different for each theme.
833
- SDSLightAppTheme.borders = {
834
- accent: {
835
- default: "1px solid ".concat(SDSLightThemeColors.blue[500]),
836
- focused: "1px solid ".concat(SDSLightThemeColors.blue[500]),
837
- hover: "1px solid ".concat(SDSLightThemeColors.blue[600]),
838
- open: "1px solid ".concat(SDSLightThemeColors.blue[500]),
839
- pressed: "1px solid ".concat(SDSLightThemeColors.blue[700]),
840
- selected: "1px solid ".concat(SDSLightThemeColors.blue[500]),
841
- },
842
- base: {
843
- default: "1px solid ".concat(SDSLightThemeColors.gray[500]),
844
- disabled: "1px solid ".concat(SDSLightThemeColors.gray[300]),
845
- divider: "1px solid ".concat(SDSLightThemeColors.gray[200]),
846
- dividerInverse: "1px solid ".concat(SDSLightThemeColors.gray[600]),
847
- hover: "1px solid ".concat(SDSLightThemeColors.gray[900]),
848
- inverse: "1px solid ".concat(SDSLightThemeColors.gray[50]),
849
- pressed: "1px solid ".concat(SDSLightThemeColors.gray[900]),
850
- table: "1px solid ".concat(SDSLightThemeColors.gray[300]),
851
- },
852
- beta: {
853
- default: "1px solid ".concat(SDSLightThemeColors.purple[600]),
854
- extraThick: "4px solid ".concat(SDSLightThemeColors.purple[600]),
855
- thick: "2px solid ".concat(SDSLightThemeColors.purple[600]),
856
- },
857
- info: {
858
- default: "1px solid ".concat(SDSLightThemeColors.blue[600]),
859
- extraThick: "4px solid ".concat(SDSLightThemeColors.blue[600]),
860
- thick: "2px solid ".concat(SDSLightThemeColors.blue[600]),
861
- },
862
- link: {
863
- dashed: "1px dashed",
864
- solid: "1px solid",
865
- },
866
- negative: {
867
- default: "1px solid ".concat(SDSLightThemeColors.red[600]),
868
- extraThick: "4px solid ".concat(SDSLightThemeColors.red[600]),
869
- thick: "2px solid ".concat(SDSLightThemeColors.red[600]),
870
- },
871
- neutral: {
872
- default: "1px solid ".concat(SDSLightThemeColors.gray[500]),
873
- extraThick: "4px solid ".concat(SDSLightThemeColors.gray[500]),
874
- thick: "2px solid ".concat(SDSLightThemeColors.gray[500]),
875
- },
876
- none: "none",
877
- notice: {
878
- default: "1px solid ".concat(SDSLightThemeColors.yellow[600]),
879
- extraThick: "4px solid ".concat(SDSLightThemeColors.yellow[600]),
880
- thick: "2px solid ".concat(SDSLightThemeColors.yellow[600]),
881
- },
882
- positive: {
883
- default: "1px solid ".concat(SDSLightThemeColors.green[600]),
884
- extraThick: "4px solid ".concat(SDSLightThemeColors.green[600]),
885
- thick: "2px solid ".concat(SDSLightThemeColors.green[600]),
886
- },
887
- };
888
- SDSDarkAppTheme.borders = {
889
- accent: {
890
- default: "1px solid ".concat(SDSDarkThemeColors.blue[600]),
891
- focused: "1px solid ".concat(SDSDarkThemeColors.blue[600]),
892
- hover: "1px solid ".concat(SDSDarkThemeColors.blue[700]),
893
- open: "1px solid ".concat(SDSDarkThemeColors.blue[600]),
894
- pressed: "1px solid ".concat(SDSDarkThemeColors.blue[800]),
895
- selected: "1px solid ".concat(SDSDarkThemeColors.blue[600]),
896
- },
897
- base: {
898
- default: "1px solid ".concat(SDSDarkThemeColors.gray[500]),
899
- disabled: "1px solid ".concat(SDSDarkThemeColors.gray[300]),
900
- divider: "1px solid ".concat(SDSDarkThemeColors.gray[200]),
901
- dividerInverse: "1px solid ".concat(SDSDarkThemeColors.gray[600]),
902
- hover: "1px solid ".concat(SDSDarkThemeColors.gray[900]),
903
- inverse: "1px solid ".concat(SDSDarkThemeColors.gray[50]),
904
- pressed: "1px solid ".concat(SDSDarkThemeColors.gray[900]),
905
- table: "1px solid ".concat(SDSDarkThemeColors.gray[300]),
906
- },
907
- beta: {
908
- default: "1px solid ".concat(SDSDarkThemeColors.purple[600]),
909
- extraThick: "4px solid ".concat(SDSDarkThemeColors.purple[600]),
910
- thick: "2px solid ".concat(SDSDarkThemeColors.purple[600]),
911
- },
912
- info: {
913
- default: "1px solid ".concat(SDSDarkThemeColors.blue[600]),
914
- extraThick: "4px solid ".concat(SDSDarkThemeColors.blue[600]),
915
- thick: "2px solid ".concat(SDSDarkThemeColors.blue[600]),
916
- },
917
- link: {
918
- dashed: "1px dashed",
919
- solid: "1px solid",
920
- },
921
- negative: {
922
- default: "1px solid ".concat(SDSDarkThemeColors.red[600]),
923
- extraThick: "4px solid ".concat(SDSDarkThemeColors.red[600]),
924
- thick: "2px solid ".concat(SDSDarkThemeColors.red[600]),
925
- },
926
- neutral: {
927
- default: "1px solid ".concat(SDSDarkThemeColors.gray[500]),
928
- extraThick: "4px solid ".concat(SDSDarkThemeColors.gray[500]),
929
- thick: "2px solid ".concat(SDSDarkThemeColors.gray[500]),
930
- },
931
- none: "none",
932
- notice: {
933
- default: "1px solid ".concat(SDSDarkThemeColors.yellow[600]),
934
- extraThick: "4px solid ".concat(SDSDarkThemeColors.yellow[600]),
935
- thick: "2px solid ".concat(SDSDarkThemeColors.yellow[600]),
936
- },
937
- positive: {
938
- default: "1px solid ".concat(SDSDarkThemeColors.green[600]),
939
- extraThick: "4px solid ".concat(SDSDarkThemeColors.green[600]),
940
- thick: "2px solid ".concat(SDSDarkThemeColors.green[600]),
941
- },
827
+ var BorderThickness = {
828
+ default: 1,
829
+ extraThick: 4,
830
+ thick: 2,
831
+ };
832
+ var createAppThemeBorders = function (colors, isDarkMode) {
833
+ var createSolidBorder = function (color, level, thickness) { return "".concat(BorderThickness[thickness], "px solid ").concat(colors[color][level]); };
834
+ var createDashedBorder = function () { return "1px dashed"; };
835
+ return {
836
+ accent: {
837
+ default: createSolidBorder("blue", isDarkMode ? 600 : 500, "default"),
838
+ focused: createSolidBorder("blue", isDarkMode ? 600 : 500, "default"),
839
+ hover: createSolidBorder("blue", isDarkMode ? 700 : 600, "default"),
840
+ open: createSolidBorder("blue", isDarkMode ? 600 : 500, "default"),
841
+ pressed: createSolidBorder("blue", isDarkMode ? 800 : 700, "default"),
842
+ selected: createSolidBorder("blue", isDarkMode ? 600 : 500, "default"),
843
+ },
844
+ base: {
845
+ default: createSolidBorder("gray", 500, "default"),
846
+ disabled: createSolidBorder("gray", 300, "default"),
847
+ divider: createSolidBorder("gray", 200, "default"),
848
+ dividerInverse: createSolidBorder("gray", 600, "default"),
849
+ hover: createSolidBorder("gray", 900, "default"),
850
+ inverse: createSolidBorder("gray", 50, "default"),
851
+ pressed: createSolidBorder("gray", 900, "default"),
852
+ table: createSolidBorder("gray", 300, "default"),
853
+ },
854
+ beta: {
855
+ default: createSolidBorder("purple", 600, "default"),
856
+ extraThick: createSolidBorder("purple", 600, "extraThick"),
857
+ thick: createSolidBorder("purple", 600, "thick"),
858
+ },
859
+ info: {
860
+ default: createSolidBorder("blue", 600, "default"),
861
+ extraThick: createSolidBorder("blue", 600, "extraThick"),
862
+ thick: createSolidBorder("blue", 600, "thick"),
863
+ },
864
+ link: {
865
+ dashed: createDashedBorder(),
866
+ solid: createSolidBorder("blue", 500, "default"),
867
+ },
868
+ negative: {
869
+ default: createSolidBorder("red", 600, "default"),
870
+ extraThick: createSolidBorder("red", 600, "extraThick"),
871
+ thick: createSolidBorder("red", 600, "thick"),
872
+ },
873
+ neutral: {
874
+ default: createSolidBorder("gray", 500, "default"),
875
+ extraThick: createSolidBorder("gray", 500, "extraThick"),
876
+ thick: createSolidBorder("gray", 500, "thick"),
877
+ },
878
+ none: "none",
879
+ notice: {
880
+ default: createSolidBorder("yellow", 600, "default"),
881
+ extraThick: createSolidBorder("yellow", 600, "extraThick"),
882
+ thick: createSolidBorder("yellow", 600, "thick"),
883
+ },
884
+ positive: {
885
+ default: createSolidBorder("green", 600, "default"),
886
+ extraThick: createSolidBorder("green", 600, "extraThick"),
887
+ thick: createSolidBorder("green", 600, "thick"),
888
+ },
889
+ };
890
+ };
891
+ /**
892
+ * Create a SDS App Theme with custom colors that follows the SDS color model.
893
+ */
894
+ var makeSdsSemanticAppTheme = function (colors, isDarkTheme) {
895
+ if (isDarkTheme === void 0) { isDarkTheme = false; }
896
+ return (__assign(__assign({}, sharedAppTheme), { borders: createAppThemeBorders(colors, isDarkTheme), colors: colors }));
942
897
  };
898
+ var SDSLightAppTheme = makeSdsSemanticAppTheme(SDSLightThemeColors);
899
+ var SDSDarkAppTheme = makeSdsSemanticAppTheme(SDSDarkThemeColors, true);
943
900
  /**
944
901
  * Helper function to select the appropriate theme settings.
945
902
  *
@@ -7018,13 +6975,22 @@ var StyledMetadataText = material.styled("p", {
7018
6975
  });
7019
6976
  var templateObject_1$I, templateObject_2$q, templateObject_3$j, templateObject_4$g, templateObject_5$b;
7020
6977
 
7021
- /**
7022
- * @see https://mui.com/material-ui/react-dialog/
7023
- */
6978
+ var createTextComponent = function (StyledComponent) {
6979
+ return function (_a) {
6980
+ var text = _a.text, className = _a.className;
6981
+ if (!text)
6982
+ return null;
6983
+ return typeof text === "string" ? (jsxRuntime.jsx(StyledComponent, { className: className, children: text })) : (text);
6984
+ };
6985
+ };
6986
+ var OverlineText = createTextComponent(StyledOverlineText);
6987
+ var TitleText = createTextComponent(StyledTitleText);
6988
+ var SubtitleText = createTextComponent(StyledSubtitleText);
6989
+ var MetadataText = createTextComponent(StyledMetadataText);
7024
6990
  var ContentCardTitle = React.forwardRef(function ContentCardTitle(props, ref) {
7025
6991
  var overlineText = props.overlineText, titleText = props.titleText, subtitleText = props.subtitleText, metadataText = props.metadataText, _a = props.classes, classes = _a === void 0 ? EMPTY_OBJECT : _a;
7026
6992
  var cardHeader = classes.cardHeader, cardOverline = classes.cardOverline, cardTitle = classes.cardTitle, cardSubtitle = classes.cardSubtitle, cardMetadata = classes.cardMetadata;
7027
- 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 }))] }));
6993
+ return (jsxRuntime.jsxs("div", { ref: ref, children: [jsxRuntime.jsxs(StyledTitleWrapper, { className: cardHeader, children: [jsxRuntime.jsx(OverlineText, { text: overlineText, className: cardOverline }), jsxRuntime.jsx(TitleText, { text: titleText, className: cardTitle }), jsxRuntime.jsx(SubtitleText, { text: subtitleText, className: cardSubtitle })] }), jsxRuntime.jsx(MetadataText, { text: metadataText, className: cardMetadata })] }));
7028
6994
  });
7029
6995
 
7030
6996
  var doNotForwardProps$m = ["buttonsPosition"];
@@ -15921,6 +15887,10 @@ exports.ComplexFilterPopper = StyledPopper;
15921
15887
  exports.ContentCard = ContentCard;
15922
15888
  exports.ContentCardActions = ContentCardActions;
15923
15889
  exports.ContentCardBody = StyledContentCardBody;
15890
+ exports.ContentCardMetadata = StyledMetadataText;
15891
+ exports.ContentCardOverline = StyledOverlineText;
15892
+ exports.ContentCardSubtitle = StyledSubtitleText;
15893
+ exports.ContentCardTitle = StyledTitleText;
15924
15894
  exports.Dialog = Dialog;
15925
15895
  exports.DialogActions = DialogActions;
15926
15896
  exports.DialogContent = index;
@@ -15976,6 +15946,7 @@ exports.Theme = Theme;
15976
15946
  exports.Tooltip = Tooltip;
15977
15947
  exports.TooltipCondensed = TooltipCondensed;
15978
15948
  exports.TooltipTable = TooltipTableContent;
15949
+ exports.createAppThemeBorders = createAppThemeBorders;
15979
15950
  exports.defaultAppTheme = defaultAppTheme;
15980
15951
  exports.defaultTheme = defaultTheme$4;
15981
15952
  exports.focusVisibleA11yStyle = focusVisibleA11yStyle;