@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.
@@ -1,10 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  export interface HeaderToolbarProps {
3
3
  title?: string;
4
+ titleVisibility?: boolean;
4
5
  left?: React.ReactNode;
5
6
  right?: React.ReactNode;
6
7
  bgColor?: string;
7
8
  bgImageURL?: string;
8
9
  bgPosition?: string;
9
10
  bgSize?: string;
11
+ divider?: boolean;
10
12
  }
package/dist/index.esm.js CHANGED
@@ -35658,7 +35658,8 @@ var Dialog = function (props) {
35658
35658
  React__default.createElement(DialogActions$1, null, children)))));
35659
35659
  };
35660
35660
 
35661
- var useStyles$a = makeStyles(function () {
35661
+ // Use theme.shape.borderRadius to detect if it's Desktop or not
35662
+ var useStyles$a = makeStyles(function (theme) {
35662
35663
  return createStyles({
35663
35664
  bgWrapper: function (props) { return ({
35664
35665
  background: "url(" + props.bgImageURL + ") no-repeat",
@@ -35666,18 +35667,37 @@ var useStyles$a = makeStyles(function () {
35666
35667
  backgroundPosition: props.bgPosition + " center",
35667
35668
  backgroundColor: props.bgColor ? props.bgColor + " !important" : '',
35668
35669
  }); },
35670
+ titleVis: function (props) { return ({
35671
+ display: props.titleVisibility === undefined
35672
+ ? theme.shape.borderRadius === 0
35673
+ ? ''
35674
+ : 'none'
35675
+ : props.titleVisibility
35676
+ ? ''
35677
+ : 'none',
35678
+ }); },
35679
+ containerDivider: function (props) { return ({
35680
+ borderLeft: props.divider === undefined
35681
+ ? theme.shape.borderRadius === 0
35682
+ ? "1px solid " + common.brand.utility.border
35683
+ : 'none'
35684
+ : props.divider
35685
+ ? "1px solid " + common.brand.utility.border
35686
+ : 'none',
35687
+ }); },
35669
35688
  });
35670
35689
  });
35671
35690
  var HeaderToolbar = function (_a) {
35672
- 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"]);
35673
- var classes = useStyles$a({ bgColor: bgColor, bgImageURL: bgImageURL, bgPosition: bgPosition, bgSize: bgSize });
35674
- return (React__default.createElement(Toolbar$2, { className: clsx('gds-header-toolbar', classes.bgWrapper) },
35675
- React__default.createElement(Box$2, { display: "flex", justifyContent: "space-between", style: { width: '100%' } },
35691
+ var _b;
35692
+ 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"]);
35693
+ var classes = useStyles$a({ bgColor: bgColor, bgImageURL: bgImageURL, bgPosition: bgPosition, bgSize: bgSize, titleVisibility: titleVisibility, divider: divider });
35694
+ return (React__default.createElement(Toolbar$2, { className: clsx('gds-header-toolbar', classes.bgWrapper, (_b = {}, _b['with-title'] = titleVisibility, _b)) },
35695
+ React__default.createElement(Box$2, { display: "flex", justifyContent: "space-between", alignItems: "flex-end", style: { width: '100%' } },
35676
35696
  React__default.createElement(Box$2, { display: "flex", flexDirection: "column", justifyContent: "stretch" },
35677
- title && (React__default.createElement(Box$2, { className: "gds-header-toolbar-title", mb: 3 },
35697
+ title && (React__default.createElement(Box$2, { className: clsx("gds-header-toolbar-title", classes.titleVis), mb: 3 },
35678
35698
  React__default.createElement(Typography, { variant: "h1", color: "primary" }, title))),
35679
35699
  left),
35680
- right && (React__default.createElement(Box$2, { className: "gds-buttons-w-divider", borderLeft: "1px solid " + common.brand.utility.border }, right)))));
35700
+ right && (React__default.createElement(Box$2, { className: clsx("gds-buttons-w-divider", classes.containerDivider) }, right)))));
35681
35701
  };
35682
35702
 
35683
35703
  function LoaderIcon(props) {
@@ -47780,15 +47800,15 @@ var themeWeb = createTheme({
47780
47800
  minHeight: 50,
47781
47801
  paddingLeft: 16,
47782
47802
  paddingRight: 16,
47783
- '& .gds-header-toolbar-title': {
47784
- display: 'none',
47785
- },
47786
47803
  '& .gds-buttons-w-divider': {
47787
- borderLeft: 'none',
47804
+ paddingLeft: 16,
47788
47805
  },
47789
47806
  '& .MuiInputBase-root, & .MuiButtonBase-root': {
47790
47807
  maxHeight: 32,
47791
47808
  },
47809
+ '&.with-title': {
47810
+ padding: 16,
47811
+ }
47792
47812
  },
47793
47813
  },
47794
47814
  },