@galaxy-ds/core 1.1.47 → 1.1.48

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/index.js CHANGED
@@ -35685,7 +35685,8 @@ var Dialog = function (props) {
35685
35685
  React__default["default"].createElement(DialogActions$1, null, children)))));
35686
35686
  };
35687
35687
 
35688
- var useStyles$a = makeStyles(function () {
35688
+ // Use theme.shape.borderRadius to detect if it's Desktop or not
35689
+ var useStyles$a = makeStyles(function (theme) {
35689
35690
  return createStyles({
35690
35691
  bgWrapper: function (props) { return ({
35691
35692
  background: "url(" + props.bgImageURL + ") no-repeat",
@@ -35693,18 +35694,37 @@ var useStyles$a = makeStyles(function () {
35693
35694
  backgroundPosition: props.bgPosition + " center",
35694
35695
  backgroundColor: props.bgColor ? props.bgColor + " !important" : '',
35695
35696
  }); },
35697
+ titleVis: function (props) { return ({
35698
+ display: props.titleVisibility === undefined
35699
+ ? theme.shape.borderRadius === 0
35700
+ ? ''
35701
+ : 'none'
35702
+ : props.titleVisibility
35703
+ ? ''
35704
+ : 'none',
35705
+ }); },
35706
+ containerDivider: function (props) { return ({
35707
+ borderLeft: props.divider === undefined
35708
+ ? theme.shape.borderRadius === 0
35709
+ ? "1px solid " + common.brand.utility.border
35710
+ : 'none'
35711
+ : props.divider
35712
+ ? "1px solid " + common.brand.utility.border
35713
+ : 'none',
35714
+ }); },
35696
35715
  });
35697
35716
  });
35698
35717
  var HeaderToolbar = function (_a) {
35699
- var title = _a.title, left = _a.left, right = _a.right, bgColor = _a.bgColor, bgImageURL = _a.bgImageURL, _b = _a.bgPosition, bgPosition = _b === void 0 ? 'center' : _b, bgSize = _a.bgSize; __rest(_a, ["title", "left", "right", "bgColor", "bgImageURL", "bgPosition", "bgSize"]);
35700
- var classes = useStyles$a({ bgColor: bgColor, bgImageURL: bgImageURL, bgPosition: bgPosition, bgSize: bgSize });
35701
- return (React__default["default"].createElement(Toolbar$2, { className: clsx('gds-header-toolbar', classes.bgWrapper) },
35702
- React__default["default"].createElement(Box$2, { display: "flex", justifyContent: "space-between", style: { width: '100%' } },
35718
+ var _b;
35719
+ var title = _a.title, titleVisibility = _a.titleVisibility, left = _a.left, right = _a.right, bgColor = _a.bgColor, bgImageURL = _a.bgImageURL, _c = _a.bgPosition, bgPosition = _c === void 0 ? 'center' : _c, bgSize = _a.bgSize, divider = _a.divider; __rest(_a, ["title", "titleVisibility", "left", "right", "bgColor", "bgImageURL", "bgPosition", "bgSize", "divider"]);
35720
+ var classes = useStyles$a({ bgColor: bgColor, bgImageURL: bgImageURL, bgPosition: bgPosition, bgSize: bgSize, titleVisibility: titleVisibility, divider: divider });
35721
+ return (React__default["default"].createElement(Toolbar$2, { className: clsx('gds-header-toolbar', classes.bgWrapper, (_b = {}, _b['with-title'] = titleVisibility, _b)) },
35722
+ React__default["default"].createElement(Box$2, { display: "flex", justifyContent: "space-between", alignItems: "flex-end", style: { width: '100%' } },
35703
35723
  React__default["default"].createElement(Box$2, { display: "flex", flexDirection: "column", justifyContent: "stretch" },
35704
- title && (React__default["default"].createElement(Box$2, { className: "gds-header-toolbar-title", mb: 3 },
35724
+ title && (React__default["default"].createElement(Box$2, { className: clsx("gds-header-toolbar-title", classes.titleVis), mb: 3 },
35705
35725
  React__default["default"].createElement(Typography, { variant: "h1", color: "primary" }, title))),
35706
35726
  left),
35707
- right && (React__default["default"].createElement(Box$2, { className: "gds-buttons-w-divider", borderLeft: "1px solid " + common.brand.utility.border }, right)))));
35727
+ right && (React__default["default"].createElement(Box$2, { className: clsx("gds-buttons-w-divider", classes.containerDivider) }, right)))));
35708
35728
  };
35709
35729
 
35710
35730
  function LoaderIcon(props) {
@@ -47807,15 +47827,15 @@ var themeWeb = createTheme({
47807
47827
  minHeight: 50,
47808
47828
  paddingLeft: 16,
47809
47829
  paddingRight: 16,
47810
- '& .gds-header-toolbar-title': {
47811
- display: 'none',
47812
- },
47813
47830
  '& .gds-buttons-w-divider': {
47814
- borderLeft: 'none',
47831
+ paddingLeft: 16,
47815
47832
  },
47816
47833
  '& .MuiInputBase-root, & .MuiButtonBase-root': {
47817
47834
  maxHeight: 32,
47818
47835
  },
47836
+ '&.with-title': {
47837
+ padding: 16,
47838
+ }
47819
47839
  },
47820
47840
  },
47821
47841
  },