aefis-core-ui 2.1.20 → 2.1.22

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.
@@ -5286,7 +5286,8 @@ const useStyles$y = makeStyles(theme => ({
5286
5286
  root: {
5287
5287
  margin: 0,
5288
5288
  padding: theme.spacing(2),
5289
- position: "relative"
5289
+ position: "relative",
5290
+ minHeight: 60
5290
5291
  },
5291
5292
  closeButton: {
5292
5293
  position: "absolute",
@@ -9952,13 +9953,13 @@ const Drawer = props => {
9952
9953
  };
9953
9954
  const theme = useTheme$1();
9954
9955
  const appBarStyle = {
9955
- primary: {
9956
+ primary: _extends({
9956
9957
  color: "#ffffff"
9957
- },
9958
- secondary: {
9958
+ }, props.appBarStyle),
9959
+ secondary: _extends({
9959
9960
  backgroundColor: "#ffffff",
9960
9961
  color: "#333333"
9961
- }
9962
+ }, props.appBarStyle)
9962
9963
  };
9963
9964
  const closeDrawerIconStyle = {
9964
9965
  color: props.headerColor === "secondary" ? "rgba(0, 0, 0, 0.54)" : "#ffffff",
@@ -10166,6 +10167,8 @@ Drawer.propTypes = {
10166
10167
  menuPositionOffset: PropTypes.oneOf(["none", "primaryMenu", "secondaryMenu"]),
10167
10168
  /** Additional styles to apply to the drawer paper. */
10168
10169
  paperStyle: PropTypes.any,
10170
+ /** Additional styles to apply to the appbar. */
10171
+ appBarStyle: PropTypes.any,
10169
10172
  /** Whether or not to show the header divider */
10170
10173
  headerDivider: PropTypes.bool,
10171
10174
  /** The component to use while rendering the drawer title */
@@ -14632,36 +14635,7 @@ Header.propTypes = {
14632
14635
  allStepsCompleted: PropTypes.bool
14633
14636
  };
14634
14637
 
14635
- // Copyright (c) 2022 HelioCampus Inc., all rights reserved.
14636
14638
  const useStyles$5 = makeStyles(theme => ({
14637
- container: {
14638
- position: "absolute",
14639
- overflowY: "auto",
14640
- left: 0,
14641
- right: 0,
14642
- bottom: 64,
14643
- top: 178
14644
- },
14645
- tabBar: {
14646
- borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
14647
- zIndex: 1,
14648
- background: "#ffffff",
14649
- padding: theme.spacing(2)
14650
- },
14651
- scrolledTabBar: {
14652
- zIndex: 1,
14653
- borderBottom: "none",
14654
- background: "#ffffff",
14655
- padding: theme.spacing(2),
14656
- boxShadow: "0px 2px 4px -4px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px -10px rgba(0,0,0,0.12)"
14657
- },
14658
- bottomBar: {
14659
- borderTop: "1px solid rgba(0, 0, 0, 0.12)"
14660
- },
14661
- scrolledBottomBar: {
14662
- borderTop: "none",
14663
- boxShadow: "0px -4px 8px -4px rgba(0,0,0,0.12)"
14664
- },
14665
14639
  buttonContainer: {
14666
14640
  marginLeft: "auto",
14667
14641
  display: "flex"
@@ -14674,7 +14648,7 @@ const useStyles$5 = makeStyles(theme => ({
14674
14648
  marginRight: 8
14675
14649
  }
14676
14650
  }));
14677
- const bottomBarStyle = {
14651
+ const bottomBarDefaultStyle = {
14678
14652
  background: "#ffffff",
14679
14653
  display: "flex",
14680
14654
  minHeight: 64,
@@ -14690,7 +14664,7 @@ const bottomBarStyle = {
14690
14664
  right: 0
14691
14665
  };
14692
14666
 
14693
- /** Component to display a "stepper" wizard panel for multiple step proceses with swipeable tabs. Designed to be display within a Drawer component. */
14667
+ /** Component to display a "stepper" wizard panel for multiple step processes with swipeable tabs. Designed to be display within a Drawer component. */
14694
14668
 
14695
14669
  const WizardPanel = props => {
14696
14670
  var _props$panels;
@@ -14722,9 +14696,34 @@ const WizardPanel = props => {
14722
14696
  props.onComplete && props.onComplete();
14723
14697
  };
14724
14698
  const theme = useTheme$1();
14699
+ const stepsContainer = {
14700
+ position: "absolute",
14701
+ overflowY: "auto",
14702
+ left: 0,
14703
+ right: 0,
14704
+ bottom: 64,
14705
+ top: 178
14706
+ };
14725
14707
  const containerStyle = {
14726
14708
  backgroundColor: props.cardContent ? "rgb(239, 242, 246)" : "rgb(255,255,255)"
14727
14709
  };
14710
+ const tabBarStyle = {
14711
+ borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
14712
+ zIndex: 1,
14713
+ background: "#ffffff",
14714
+ padding: props.display === "drawer" ? 2 : "0px 0px 16px 0px"
14715
+ };
14716
+ const scrolledTabBarStyle = {
14717
+ zIndex: 1,
14718
+ borderBottom: "none",
14719
+ background: "#ffffff",
14720
+ padding: props.display === "drawer" ? 2 : "0px 0px 16px 0px",
14721
+ boxShadow: "0px 2px 4px -4px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px -10px rgba(0,0,0,0.12)"
14722
+ };
14723
+ const bottomBarStyle = _extends({}, bottomBarDefaultStyle, {
14724
+ borderTop: "none",
14725
+ boxShadow: props.display === "drawer" ? "0px -4px 8px -4px rgba(0,0,0,0.12)" : "none"
14726
+ });
14728
14727
  useEffect(() => {
14729
14728
  var _containerRef$current;
14730
14729
  (_containerRef$current = containerRef.current) == null ? void 0 : _containerRef$current.scrollTo == null ? void 0 : _containerRef$current.scrollTo({
@@ -14738,9 +14737,9 @@ const WizardPanel = props => {
14738
14737
  }, [props.completed]);
14739
14738
  return /*#__PURE__*/jsxs(Fragment, {
14740
14739
  children: [/*#__PURE__*/jsx(AppBar$1, {
14741
- position: "sticky",
14740
+ position: props.display === "drawer" ? "sticky" : "relative",
14742
14741
  component: "div",
14743
- className: scrollTrigger ? classes.scrolledTabBar : classes.tabBar,
14742
+ sx: scrollTrigger ? scrolledTabBarStyle : tabBarStyle,
14744
14743
  elevation: 0,
14745
14744
  color: "default",
14746
14745
  children: /*#__PURE__*/jsx(Header, {
@@ -14751,7 +14750,7 @@ const WizardPanel = props => {
14751
14750
  }), /*#__PURE__*/jsx(Box$1, {
14752
14751
  ref: containerRef,
14753
14752
  sx: containerStyle,
14754
- className: classes.container,
14753
+ style: props.display === "drawer" ? stepsContainer : undefined,
14755
14754
  children: /*#__PURE__*/jsx(SwipeableViews, {
14756
14755
  axis: theme.direction === "rtl" ? "x-reverse" : "x",
14757
14756
  index: activeStep,
@@ -14768,7 +14767,6 @@ const WizardPanel = props => {
14768
14767
  })
14769
14768
  }), /*#__PURE__*/jsx(Box$1, {
14770
14769
  style: bottomBarStyle,
14771
- className: classes.scrolledBottomBar,
14772
14770
  children: /*#__PURE__*/jsxs(Box$1, {
14773
14771
  className: classes.buttonContainer,
14774
14772
  children: [/*#__PURE__*/jsx(Button, {
@@ -14829,9 +14827,12 @@ WizardPanel.defaultProps = {
14829
14827
  completed: false,
14830
14828
  completeButtonText: "Finish",
14831
14829
  disableComplete: false,
14832
- completing: false
14830
+ completing: false,
14831
+ display: "drawer"
14833
14832
  };
14834
14833
  WizardPanel.propTypes = {
14834
+ /** Where to display the panel, a dialog or drawer. */
14835
+ display: PropTypes.oneOf(["drawer"], ["dialog"]),
14835
14836
  /** The data defining the wizard steps and content. */
14836
14837
  panels: PropTypes.arrayOf(PropTypes.shape({
14837
14838
  id: PropTypes.any.isRequired,