@commercetools-frontend/application-components 22.14.0 → 22.14.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.
@@ -85,7 +85,7 @@ var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthori
85
85
  var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
86
86
 
87
87
  // NOTE: This string will be replaced on build time with the package version.
88
- var version = "22.14.0";
88
+ var version = "22.14.2";
89
89
 
90
90
  var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
91
91
  const appKitSpacing55 = '40px';
@@ -574,7 +574,12 @@ const stylesBySize = {
574
574
  transitionTime: 300
575
575
  }
576
576
  };
577
- const getContainerStyles = props => /*#__PURE__*/react.css("position:absolute;top:0;right:0;height:100%;width:", props.size !== 'scale' ? "".concat(stylesBySize[props.size].width, " !important") : stylesBySize.scale.width, ";display:flex;flex-direction:column;background-color:", designSystem.customProperties.colorSurface, ";box-shadow:0px 0px 40px 0px rgba(0, 0, 0, 0.1);outline:0;transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n 0,\n 0\n );transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
577
+ const getContainerStyles = props => {
578
+ var _context;
579
+ return /*#__PURE__*/react.css("position:absolute;top:0;right:0;height:100%;width:", props.size !== 'scale' ? // In case we're using a specific size, we want it to be used until there's no space left.
580
+ // In such scenario, we want the modal to be as wide as possible, but using the shared indentation width size.
581
+ _concatInstanceProperty__default["default"](_context = "min(".concat(stylesBySize[props.size].width, ", calc(100% - ")).call(_context, constants.PORTALS_CONTAINER_INDENTATION_SIZE, ")) !important") : stylesBySize.scale.width, ";display:flex;flex-direction:column;background-color:", designSystem.customProperties.colorSurface, ";box-shadow:0px 0px 40px 0px rgba(0, 0, 0, 0.1);outline:0;transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n 0,\n 0\n );transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
582
+ };
578
583
  const getOverlayStyles = props => /*#__PURE__*/react.css("position:absolute;z-index:", typeof props.zIndex === 'number' ? // Use `!important` to overwrite the default value assigned by the Stacking Layer System.
579
584
  "".concat(props.zIndex, " !important") : 'auto', ";top:0;left:0;width:100%;height:100%;background-color:hsla(195, 35%, 20%, 0.05);opacity:0;transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
580
585
  var _ref3 = {
@@ -1044,7 +1049,7 @@ PageHeader.displayName = 'PageHeader';
1044
1049
 
1045
1050
  const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
1046
1051
  target: "e1b7jwn01"
1047
- } )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
1052
+ } )("flex:1;flex-basis:0%;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
1048
1053
  const PageWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1049
1054
  target: "e1b7jwn00"
1050
1055
  } )({
@@ -1492,7 +1497,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
1492
1497
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1493
1498
  TabularDetailPage.Intl = i18n.sharedMessages;
1494
1499
 
1495
- const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-ef7101c4.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
1500
+ const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-9a989ce1.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
1496
1501
 
1497
1502
  const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
1498
1503
  target: "ev8m2jf2"
@@ -1502,7 +1507,7 @@ const Divider = /*#__PURE__*/_styled__default["default"]("hr", {
1502
1507
  } )("background-color:", designTokens.backgroundColorForMainPageDivider, ";height:1px;border:0;" + ("" ));
1503
1508
  const MainPageContent = /*#__PURE__*/_styled__default["default"]("div", {
1504
1509
  target: "ev8m2jf0"
1505
- } )("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.marginForPageContent, ";" + ("" ));
1510
+ } )("flex:1;flex-basis:0%;overflow:auto;margin:", designTokens.marginForPageContent, ";" + ("" ));
1506
1511
 
1507
1512
  const headerRowMargin = "".concat(designSystem.designTokens.spacing40, " 0 0 0");
1508
1513
  const CustomFormMainPage = props => {
@@ -1880,7 +1885,7 @@ const defaultProps = {
1880
1885
  };
1881
1886
  const ContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1882
1887
  target: "e18jo6y41"
1883
- } )("height:100%;padding:", designSystem.designTokens.spacing50, ";" + ("" ));
1888
+ } )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
1884
1889
  const HeaderWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1885
1890
  target: "e18jo6y40"
1886
1891
  } )("padding:", designSystem.designTokens.spacing40, " 40px;border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";" + ("" ));
@@ -1950,8 +1955,6 @@ Drawer.FormSecondaryButton = FormSecondaryButton;
1950
1955
  // The Intl messages can be used for button labels.
1951
1956
  Drawer.Intl = i18n.sharedMessages;
1952
1957
 
1953
- // The width of each indentation level.
1954
- const indentationSize = '48px';
1955
1958
  const useObserverElementDimensions = element => {
1956
1959
  const _useState = react$1.useState({
1957
1960
  height: 0,
@@ -2038,7 +2041,7 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
2038
2041
  * Furthermore, the "modal overlay" containers (not "dialog") get assigned
2039
2042
  * the correct indentation level width.
2040
2043
  */
2041
- stackingLayer => /*#__PURE__*/react.css("#", constants.PORTALS_CONTAINER_ID, " .ReactModalPortal[data-level='", stackingLayer.stackingLevel, "'] [data-role$='overlay']{z-index:calc(\n ", baseModalZIndex, " + ", stackingLayer.stackingLevel, "\n );}#", constants.PORTALS_CONTAINER_ID, " .ReactModalPortal[data-level='", stackingLayer.stackingLevel, "'] [data-role='modal-overlay'] [role='dialog']{width:calc(\n 100% -\n (", indentationSize, " * ", stackingLayer.indentationLevel, ")\n );}" + ("" ), "" )), "" ]
2044
+ stackingLayer => /*#__PURE__*/react.css("#", constants.PORTALS_CONTAINER_ID, " .ReactModalPortal[data-level='", stackingLayer.stackingLevel, "'] [data-role$='overlay']{z-index:calc(\n ", baseModalZIndex, " + ", stackingLayer.stackingLevel, "\n );}#", constants.PORTALS_CONTAINER_ID, " .ReactModalPortal[data-level='", stackingLayer.stackingLevel, "'] [data-role='modal-overlay'] [role='dialog']{width:calc(\n 100% -\n (\n ", constants.PORTALS_CONTAINER_INDENTATION_SIZE, " *\n ", stackingLayer.indentationLevel, "\n )\n );}" + ("" ), "" )), "" ]
2042
2045
  }), jsxRuntime.jsx("div", {
2043
2046
  id: constants.PORTALS_CONTAINER_ID,
2044
2047
  ref: portalsContainerRef