@commercetools-frontend/application-components 22.13.0 → 22.13.1

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.
@@ -34,13 +34,14 @@ var SecondaryButton = require('@commercetools-uikit/secondary-button');
34
34
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
35
35
  var omitBy = require('lodash/omitBy');
36
36
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
37
- var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
38
37
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
39
38
  var sentry = require('@commercetools-frontend/sentry');
39
+ var AccessibleButton = require('@commercetools-uikit/accessible-button');
40
40
  var Constraints = require('@commercetools-uikit/constraints');
41
41
  var actionsGlobal = require('@commercetools-frontend/actions-global');
42
42
  var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
43
43
  var IconButton = require('@commercetools-uikit/icon-button');
44
+ var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
44
45
  var FlatButton = require('@commercetools-uikit/flat-button');
45
46
  var reactBroadcast = require('@flopflip/react-broadcast');
46
47
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
@@ -71,10 +72,11 @@ var PrimaryButton__default = /*#__PURE__*/_interopDefault(PrimaryButton);
71
72
  var SecondaryButton__default = /*#__PURE__*/_interopDefault(SecondaryButton);
72
73
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
73
74
  var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
74
- var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
75
75
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
76
+ var AccessibleButton__default = /*#__PURE__*/_interopDefault(AccessibleButton);
76
77
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
77
78
  var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
79
+ var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
78
80
  var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
79
81
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
80
82
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
@@ -83,7 +85,7 @@ var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthori
83
85
  var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
84
86
 
85
87
  // NOTE: This string will be replaced on build time with the package version.
86
- var version = "22.13.0";
88
+ var version = "22.13.1";
87
89
 
88
90
  var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
89
91
  const appKitSpacing55 = '40px';
@@ -118,6 +120,7 @@ const themesOverrides = {
118
120
  heightForTab: '2px',
119
121
  lineHeightForNavbarLink: designSystem.designTokens.lineHeight20,
120
122
  marginBottomForPageTopBar: designSystem.designTokens.spacing40,
123
+ marginForCustomViewsSelectorAsTabular: "0 ".concat(appKitSpacing55),
121
124
  marginForDialogContainerContents: _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing30, " 0 ")).call(_context, designSystem.designTokens.spacing50, " 0"),
122
125
  marginForModalPageHeader: "0 ".concat(appKitSpacing55),
123
126
  marginForUserMenuItem: "".concat(designSystem.designTokens.spacing10, " 0"),
@@ -478,6 +481,74 @@ FormDialog.defaultProps = defaultProps$f;
478
481
  // The Intl messages can be used for button labels.
479
482
  FormDialog.Intl = i18n.sharedMessages;
480
483
 
484
+ function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
485
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
486
+ const primaryDefaultProps = {
487
+ label: i18n.sharedMessages.confirm,
488
+ isDisabled: false,
489
+ dataAttributes: {}
490
+ };
491
+ const useFormattedLabel = label => {
492
+ const intl = reactIntl.useIntl();
493
+ return typeof label === 'string' ? label : intl.formatMessage(label);
494
+ };
495
+ const FormPrimaryButton = props => {
496
+ const label = useFormattedLabel(props.label);
497
+ return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$4({
498
+ label: label,
499
+ onClick: props.onClick,
500
+ isDisabled: props.isDisabled
501
+ }, filterDataAttributes(props.dataAttributes)));
502
+ };
503
+ FormPrimaryButton.propTypes = {};
504
+ FormPrimaryButton.displayName = 'FormPrimaryButton';
505
+ FormPrimaryButton.defaultProps = primaryDefaultProps;
506
+ const secondaryDefaultProps = {
507
+ label: i18n.sharedMessages.cancel,
508
+ isDisabled: false,
509
+ dataAttributes: {}
510
+ };
511
+ const FormSecondaryButton = props => {
512
+ const label = useFormattedLabel(props.label);
513
+ return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$4({
514
+ label: label,
515
+ onClick: props.onClick,
516
+ isDisabled: props.isDisabled,
517
+ iconLeft: props.iconLeft
518
+ }, filterDataAttributes(props.dataAttributes)));
519
+ };
520
+ FormSecondaryButton.propTypes = {};
521
+ FormSecondaryButton.displayName = 'FormSecondaryButton';
522
+ FormSecondaryButton.defaultProps = secondaryDefaultProps;
523
+ const deleteDefaultProps = {
524
+ label: i18n.sharedMessages.delete,
525
+ isDisabled: false,
526
+ dataAttributes: {}
527
+ };
528
+ const FormDeleteButton = props => {
529
+ const label = useFormattedLabel(props.label);
530
+ return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$4({
531
+ icon: jsxRuntime.jsx(icons.BinLinearIcon, {}),
532
+ label: label,
533
+ onClick: props.onClick,
534
+ isDisabled: props.isDisabled
535
+ }, filterDataAttributes(props.dataAttributes)));
536
+ };
537
+ FormDeleteButton.propTypes = {};
538
+ FormDeleteButton.displayName = 'FormDeleteButton';
539
+ FormDeleteButton.defaultProps = deleteDefaultProps;
540
+
541
+ const messages$4 = reactIntl.defineMessages({
542
+ back: {
543
+ id: 'Components.ModalPage.TopBar.Back',
544
+ defaultMessage: 'Go Back'
545
+ },
546
+ close: {
547
+ id: 'Components.ModalPage.TopBar.Close',
548
+ defaultMessage: 'Close Modal Page'
549
+ }
550
+ });
551
+
481
552
  const defaultProps$e = {
482
553
  titleSize: 'small',
483
554
  truncate: false
@@ -551,98 +622,6 @@ PageHeaderTitle.propTypes = {};
551
622
  PageHeaderTitle.displayName = 'PageHeaderTitle';
552
623
  PageHeaderTitle.defaultProps = defaultProps$e;
553
624
 
554
- const PageHeader = props => {
555
- return jsxRuntime.jsxs("div", {
556
- css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin:", designTokens.marginForModalPageHeader, ";padding:", designTokens.paddingForModalPageHeader, ";border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";&>*+*{margin-left:", designTokens.marginLeftForModalPageHeaderControls, ";}" + ("" ), "" ),
557
- children: [jsxRuntime.jsx(PageHeaderTitle, {
558
- title: props.title,
559
- titleSize: "big",
560
- subtitle: props.subtitle,
561
- truncate: true
562
- }), props.children]
563
- });
564
- };
565
- PageHeader.propTypes = {};
566
- PageHeader.displayName = 'PageHeader';
567
-
568
- const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
569
- target: "e1b7jwn01"
570
- } )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
571
- const PageWrapper = /*#__PURE__*/_styled__default["default"]("div", {
572
- target: "e1b7jwn00"
573
- } )({
574
- name: "kdbhus",
575
- styles: "height:100%;display:flex;flex-direction:column"
576
- } );
577
-
578
- function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
579
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
580
- const primaryDefaultProps = {
581
- label: i18n.sharedMessages.confirm,
582
- isDisabled: false,
583
- dataAttributes: {}
584
- };
585
- const useFormattedLabel = label => {
586
- const intl = reactIntl.useIntl();
587
- return typeof label === 'string' ? label : intl.formatMessage(label);
588
- };
589
- const FormPrimaryButton = props => {
590
- const label = useFormattedLabel(props.label);
591
- return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$4({
592
- label: label,
593
- onClick: props.onClick,
594
- isDisabled: props.isDisabled
595
- }, filterDataAttributes(props.dataAttributes)));
596
- };
597
- FormPrimaryButton.propTypes = {};
598
- FormPrimaryButton.displayName = 'FormPrimaryButton';
599
- FormPrimaryButton.defaultProps = primaryDefaultProps;
600
- const secondaryDefaultProps = {
601
- label: i18n.sharedMessages.cancel,
602
- isDisabled: false,
603
- dataAttributes: {}
604
- };
605
- const FormSecondaryButton = props => {
606
- const label = useFormattedLabel(props.label);
607
- return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$4({
608
- label: label,
609
- onClick: props.onClick,
610
- isDisabled: props.isDisabled,
611
- iconLeft: props.iconLeft
612
- }, filterDataAttributes(props.dataAttributes)));
613
- };
614
- FormSecondaryButton.propTypes = {};
615
- FormSecondaryButton.displayName = 'FormSecondaryButton';
616
- FormSecondaryButton.defaultProps = secondaryDefaultProps;
617
- const deleteDefaultProps = {
618
- label: i18n.sharedMessages.delete,
619
- isDisabled: false,
620
- dataAttributes: {}
621
- };
622
- const FormDeleteButton = props => {
623
- const label = useFormattedLabel(props.label);
624
- return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$4({
625
- icon: jsxRuntime.jsx(icons.BinLinearIcon, {}),
626
- label: label,
627
- onClick: props.onClick,
628
- isDisabled: props.isDisabled
629
- }, filterDataAttributes(props.dataAttributes)));
630
- };
631
- FormDeleteButton.propTypes = {};
632
- FormDeleteButton.displayName = 'FormDeleteButton';
633
- FormDeleteButton.defaultProps = deleteDefaultProps;
634
-
635
- const messages$4 = reactIntl.defineMessages({
636
- back: {
637
- id: 'Components.ModalPage.TopBar.Back',
638
- defaultMessage: 'Go Back'
639
- },
640
- close: {
641
- id: 'Components.ModalPage.TopBar.Close',
642
- defaultMessage: 'Close Modal Page'
643
- }
644
- });
645
-
646
625
  // Component to have a larger clickable surface
647
626
  var _ref2$2 = {
648
627
  name: "1rxhroq",
@@ -707,13 +686,146 @@ ModalPageTopBar.propTypes = {};
707
686
  ModalPageTopBar.displayName = 'ModalPageTopBar';
708
687
  ModalPageTopBar.defaultProps = defaultProps$d;
709
688
 
689
+ const stylesBySize = {
690
+ '10': {
691
+ width: '600px',
692
+ transitionTime: 200
693
+ },
694
+ '20': {
695
+ width: '900px',
696
+ transitionTime: 200
697
+ },
698
+ '30': {
699
+ width: '1200px',
700
+ transitionTime: 200
701
+ },
702
+ scale: {
703
+ width: '100%',
704
+ transitionTime: 300
705
+ }
706
+ };
707
+ 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;" + ("" ), "" );
708
+ 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.
709
+ "".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;" + ("" ), "" );
710
+ var _ref3 = {
711
+ name: "1ffv7m4",
712
+ styles: "transform:translate3d(0, 0, 0)!important"
713
+ } ;
714
+ const getAfterOpenContainerAnimation = () => _ref3;
715
+ var _ref2$1 = {
716
+ name: "1d9ftqx",
717
+ styles: "opacity:1!important"
718
+ } ;
719
+ const getAfterOpenOverlayAnimation = () => _ref2$1;
720
+ const getBeforeCloseContainerAnimation = props => /*#__PURE__*/react.css("transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n ,\n 0,\n 0\n )!important;" + ("" ), "" );
721
+ var _ref$3 = {
722
+ name: "728dx5",
723
+ styles: "opacity:0!important"
724
+ } ;
725
+ const getBeforeCloseOverlayAnimation = () => _ref$3;
726
+
727
+ function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
728
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
729
+ const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
730
+ const getOverlayElement = (props, contentElement) =>
731
+ // Assign the `data-role` to the overlay container, which is used as
732
+ // the CSS selector in the `<PortalsContainer>`.
733
+ jsxRuntime.jsx("div", _objectSpread$3(_objectSpread$3({}, props), {}, {
734
+ "data-role": "modal-overlay",
735
+ children: contentElement
736
+ }));
737
+
738
+ // NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
739
+ // However, we need to explicitly define this otherwise the prop-types babel plugin
740
+ // does not recognize the object shape.
710
741
  const defaultProps$c = {
742
+ size: 'scale',
743
+ getParentSelector: getDefaultParentSelector,
744
+ shouldDelayOnClose: true
745
+ };
746
+ const ModalPage = props => {
747
+ const _useState = react$1.useState(false),
748
+ _useState2 = _slicedToArray(_useState, 2),
749
+ forceClose = _useState2[0],
750
+ setForceClose = _useState2[1];
751
+ const closingTimer = react$1.useRef();
752
+ react$1.useEffect(() => {
753
+ if (props.isOpen === true) setForceClose(false);
754
+ return () => {
755
+ if (closingTimer.current) {
756
+ clearTimeout(closingTimer.current);
757
+ }
758
+ };
759
+ }, [props.isOpen]);
760
+ const onClose = props.onClose;
761
+ const TRANSITION_DURATION = stylesBySize[props.size].transitionTime;
762
+ const handleClose = react$1.useCallback(event => {
763
+ if (props.shouldDelayOnClose) {
764
+ // In this case we want the closing animation to be shown
765
+ // and therefore we need wait for it to be completed
766
+ // before calling `onClose`.
767
+ setForceClose(true);
768
+ closingTimer.current = _setTimeout__default["default"](() => {
769
+ onClose && onClose(event);
770
+ }, TRANSITION_DURATION);
771
+ return;
772
+ }
773
+ onClose && onClose(event);
774
+ }, [onClose, props.shouldDelayOnClose, TRANSITION_DURATION]);
775
+ return jsxRuntime.jsx(react.ClassNames, {
776
+ children: _ref => {
777
+ var _props$afterOpenStyle;
778
+ let makeClassName = _ref.css;
779
+ return jsxRuntime.jsxs(Modal__default["default"], {
780
+ isOpen: forceClose === true ? false : props.isOpen,
781
+ onRequestClose: handleClose,
782
+ shouldCloseOnOverlayClick: Boolean(props.onClose),
783
+ shouldCloseOnEsc: Boolean(props.onClose),
784
+ overlayElement: getOverlayElement,
785
+ overlayClassName: {
786
+ base: makeClassName(getOverlayStyles(props)),
787
+ afterOpen: makeClassName(getAfterOpenOverlayAnimation()),
788
+ beforeClose: makeClassName(getBeforeCloseOverlayAnimation())
789
+ },
790
+ className: {
791
+ base: makeClassName(getContainerStyles(props)),
792
+ afterOpen: typeof props.afterOpenStyles === 'string' ? props.afterOpenStyles : makeClassName((_props$afterOpenStyle = props.afterOpenStyles) !== null && _props$afterOpenStyle !== void 0 ? _props$afterOpenStyle : getAfterOpenContainerAnimation()),
793
+ beforeClose: makeClassName(getBeforeCloseContainerAnimation(props))
794
+ },
795
+ contentLabel: props.title,
796
+ parentSelector: props.getParentSelector,
797
+ ariaHideApp: false
798
+ // Adjust this value if the (beforeClose) animation duration is changed
799
+ ,
800
+ closeTimeoutMS: TRANSITION_DURATION,
801
+ style: {
802
+ // stylelint-disable-next-line selector-type-no-unknown
803
+ overlay: {
804
+ zIndex: props.zIndex
805
+ }
806
+ },
807
+ children: [!props.hideTopBar && jsxRuntime.jsx(ModalPageTopBar, {
808
+ color: props.topBarColor,
809
+ onClose: handleClose,
810
+ currentPathLabel: props.currentPathLabel,
811
+ previousPathLabel: props.previousPathLabel,
812
+ hidePathLabel: props.hidePathLabel
813
+ }), props.children]
814
+ });
815
+ }
816
+ });
817
+ };
818
+ ModalPage.propTypes = {};
819
+ ModalPage.displayName = 'ModalPage';
820
+ ModalPage.defaultProps = defaultProps$c;
821
+
822
+ const defaultProps$b = {
711
823
  size: 10,
712
824
  hideControls: false,
713
825
  onPrimaryButtonClick: () => {},
714
826
  onSecondaryButtonClick: () => {}
715
827
  };
716
- const ContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
828
+ const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
717
829
  target: "e18jo6y41"
718
830
  } )("height:100%;padding:", designSystem.designTokens.spacing50, ";" + ("" ));
719
831
  const HeaderWrapper = /*#__PURE__*/_styled__default["default"]("div", {
@@ -729,7 +841,6 @@ function Drawer(props) {
729
841
  size: props.size,
730
842
  title: props.title,
731
843
  afterOpenStyles: props.afterOpenStyles,
732
- customViewLocatorCode: props.customViewLocatorCode,
733
844
  getParentSelector: props.getParentSelector,
734
845
  shouldDelayOnClose: props.shouldDelayOnClose,
735
846
  topBarColor: props.topBarColor,
@@ -770,14 +881,14 @@ function Drawer(props) {
770
881
  })]
771
882
  })]
772
883
  })
773
- }), jsxRuntime.jsx(ContentWrapper, {
884
+ }), jsxRuntime.jsx(ContentWrapper$1, {
774
885
  children: props.children
775
886
  })]
776
887
  });
777
888
  }
778
889
  Drawer.propTypes = {};
779
890
  Drawer.displayName = 'Drawer';
780
- Drawer.defaultProps = defaultProps$c;
891
+ Drawer.defaultProps = defaultProps$b;
781
892
  // Static export of pre-configured form control buttons to easily re-use
782
893
  // them in the custom controls.
783
894
  Drawer.FormPrimaryButton = FormPrimaryButton;
@@ -928,15 +1039,41 @@ const useCustomViewsConnector = _ref => {
928
1039
  };
929
1040
  };
930
1041
 
931
- function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
932
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
933
- const COMPONENT_HEIGHT = '56px';
1042
+ function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
1043
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1044
+ const COMPONENT_HEIGHT = '52px';
934
1045
  const Wrapper = /*#__PURE__*/_styled__default["default"]("div", {
935
- target: "e16cb3zv1"
936
- } )("height:", props => props.shouldRender ? COMPONENT_HEIGHT : '0', ";overflow:hidden;transition:height 0.3s ease-in-out;" + ("" ));
1046
+ target: "e16cb3zv3"
1047
+ } )("height:", props => props.shouldRender ? COMPONENT_HEIGHT : '0', ";overflow:hidden;transition:margin 0.3s ease-in-out,height 0.3s ease-in-out;margin:", props => props.shouldRender ? props.margin : '0', ";" + ("" ));
937
1048
  const Container$2 = /*#__PURE__*/_styled__default["default"]("div", {
1049
+ target: "e16cb3zv2"
1050
+ } )("background-color:", designSystem.designTokens.colorNeutral98, ";padding:10px ", designSystem.designTokens.spacing30, ";border:1px solid ", designSystem.designTokens.colorNeutral95, ";border-radius:", designSystem.designTokens.borderRadius8, ";" + ("" ));
1051
+ const hoverAndSelectedStateStyles = /*#__PURE__*/react.css("box-shadow:", designSystem.designTokens.shadow1, ";background-color:", designSystem.designTokens.colorSurface, ";color:", designSystem.designTokens.colorPrimary30, ";" + ("" ), "" );
1052
+ const CustomViewSelectorItem = props => {
1053
+ return jsxRuntime.jsx(AccessibleButton__default["default"], {
1054
+ css: /*#__PURE__*/react.css("display:flex;align-items:center;padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing25, ";height:30px;border-radius:", designSystem.designTokens.borderRadius6, ";color:", designSystem.designTokens.colorPrimary, ";", props.selected && hoverAndSelectedStateStyles, " :hover{", hoverAndSelectedStateStyles, ";}" + ("" ), "" ),
1055
+ onClick: props.onClick,
1056
+ label: props.label,
1057
+ children: jsxRuntime.jsx(Text__default["default"].Detail, {
1058
+ tone: "inherit",
1059
+ fontWeight: props.selected ? 'bold' : 'regular',
1060
+ children: props.label
1061
+ })
1062
+ });
1063
+ };
1064
+ CustomViewSelectorItem.propTypes = {};
1065
+ const SelectorLabel = /*#__PURE__*/_styled__default["default"]("div", {
1066
+ target: "e16cb3zv1"
1067
+ } )({
1068
+ name: "1i68o0s",
1069
+ styles: "display:flex;align-items:center;gap:6px;div{font-weight:300;}"
1070
+ } );
1071
+ const Separator = /*#__PURE__*/_styled__default["default"]("span", {
938
1072
  target: "e16cb3zv0"
939
- } )("background-color:", designSystem.designTokens.colorAccent98, ";padding:", designSystem.designTokens.spacing25, " ", designSystem.designTokens.spacing60, ";" + ("" ));
1073
+ } )({
1074
+ name: "1lsblg0",
1075
+ styles: "width:1px;height:18px;background-color:#cccccc"
1076
+ } );
940
1077
  function CustomViewSelector(props) {
941
1078
  const _useState = react$1.useState(null),
942
1079
  _useState2 = _slicedToArray(_useState, 2),
@@ -964,30 +1101,34 @@ function CustomViewSelector(props) {
964
1101
  }
965
1102
  return jsxRuntime.jsx(Wrapper, {
966
1103
  shouldRender: customViews.length > 0,
1104
+ margin: props.margin || '0',
967
1105
  children: jsxRuntime.jsx(Container$2, {
968
1106
  children: jsxRuntime.jsxs(Constraints__default["default"].Horizontal, {
969
1107
  max: "scale",
970
1108
  children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
971
- scale: "m",
972
- justifyContent: "flex-end",
1109
+ scale: "s",
1110
+ justifyContent: "flex-start",
973
1111
  alignItems: "center",
974
- children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
975
- scale: "xs",
976
- alignItems: "center",
977
- children: [jsxRuntime.jsx(icons.SidebarCollapseIcon, {
1112
+ children: [jsxRuntime.jsxs(SelectorLabel, {
1113
+ children: [jsxRuntime.jsx(icons.WindowEyeIcon, {
978
1114
  size: "medium",
979
1115
  color: "neutral60"
980
1116
  }), jsxRuntime.jsx(Text__default["default"].Detail, {
981
1117
  tone: "secondary",
982
1118
  intlMessage: messages$2.title
983
1119
  })]
984
- }), _mapInstanceProperty__default["default"](customViews).call(customViews, customView => jsxRuntime.jsx(SecondaryButton__default["default"], {
985
- label: customView.defaultLabel,
986
- size: "medium",
987
- onClick: () => {
988
- setSelectedCustomView(customView);
989
- }
990
- }, customView.id))]
1120
+ }), _mapInstanceProperty__default["default"](customViews).call(customViews, (customView, index) => {
1121
+ const isNotLastItem = index !== customViews.length - 1;
1122
+ return jsxRuntime.jsxs(react$1.Fragment, {
1123
+ children: [jsxRuntime.jsx(CustomViewSelectorItem, {
1124
+ selected: (selectedCustomView === null || selectedCustomView === void 0 ? void 0 : selectedCustomView.id) === customView.id,
1125
+ onClick: () => {
1126
+ setSelectedCustomView(customView);
1127
+ },
1128
+ label: customView.defaultLabel
1129
+ }), isNotLastItem && jsxRuntime.jsx(Separator, {})]
1130
+ }, customView.id);
1131
+ })]
991
1132
  }), selectedCustomView && jsxRuntime.jsx(CustomViewLoader, {
992
1133
  customView: selectedCustomView,
993
1134
  onClose: () => {
@@ -999,150 +1140,46 @@ function CustomViewSelector(props) {
999
1140
  });
1000
1141
  }
1001
1142
  CustomViewSelector.propTypes = {};
1143
+ CustomViewSelector.displayName = 'CustomViewSelector';
1002
1144
  const CustomViewSelectorOrNothing = props => {
1003
1145
  if (!props.customViewLocatorCode) {
1004
1146
  return null;
1005
1147
  }
1006
- return jsxRuntime.jsx(CustomViewSelector, _objectSpread$3(_objectSpread$3({}, props), {}, {
1148
+ return jsxRuntime.jsx(CustomViewSelector, _objectSpread$2(_objectSpread$2({}, props), {}, {
1007
1149
  customViewLocatorCode: props.customViewLocatorCode
1008
1150
  }));
1009
1151
  };
1010
1152
  CustomViewSelectorOrNothing.propTypes = {};
1011
1153
 
1012
- const stylesBySize = {
1013
- '10': {
1014
- width: '600px',
1015
- transitionTime: 200
1016
- },
1017
- '20': {
1018
- width: '900px',
1019
- transitionTime: 200
1020
- },
1021
- '30': {
1022
- width: '1200px',
1023
- transitionTime: 200
1024
- },
1025
- scale: {
1026
- width: '100%',
1027
- transitionTime: 300
1028
- }
1029
- };
1030
- 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;" + ("" ), "" );
1031
- 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.
1032
- "".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;" + ("" ), "" );
1033
- var _ref3 = {
1034
- name: "1ffv7m4",
1035
- styles: "transform:translate3d(0, 0, 0)!important"
1036
- } ;
1037
- const getAfterOpenContainerAnimation = () => _ref3;
1038
- var _ref2$1 = {
1039
- name: "1d9ftqx",
1040
- styles: "opacity:1!important"
1041
- } ;
1042
- const getAfterOpenOverlayAnimation = () => _ref2$1;
1043
- const getBeforeCloseContainerAnimation = props => /*#__PURE__*/react.css("transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n ,\n 0,\n 0\n )!important;" + ("" ), "" );
1044
- var _ref$3 = {
1045
- name: "728dx5",
1046
- styles: "opacity:0!important"
1047
- } ;
1048
- const getBeforeCloseOverlayAnimation = () => _ref$3;
1049
-
1050
- function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
1051
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1052
- const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
1053
- const getOverlayElement = (props, contentElement) =>
1054
- // Assign the `data-role` to the overlay container, which is used as
1055
- // the CSS selector in the `<PortalsContainer>`.
1056
- jsxRuntime.jsx("div", _objectSpread$2(_objectSpread$2({}, props), {}, {
1057
- "data-role": "modal-overlay",
1058
- children: contentElement
1059
- }));
1060
-
1061
- // NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
1062
- // However, we need to explicitly define this otherwise the prop-types babel plugin
1063
- // does not recognize the object shape.
1064
- const defaultProps$b = {
1065
- size: 'scale',
1066
- getParentSelector: getDefaultParentSelector,
1067
- shouldDelayOnClose: true
1068
- };
1069
- const ModalPage = props => {
1070
- const _useState = react$1.useState(false),
1071
- _useState2 = _slicedToArray(_useState, 2),
1072
- forceClose = _useState2[0],
1073
- setForceClose = _useState2[1];
1074
- const closingTimer = react$1.useRef();
1075
- react$1.useEffect(() => {
1076
- if (props.isOpen === true) setForceClose(false);
1077
- return () => {
1078
- if (closingTimer.current) {
1079
- clearTimeout(closingTimer.current);
1080
- }
1081
- };
1082
- }, [props.isOpen]);
1083
- const onClose = props.onClose;
1084
- const TRANSITION_DURATION = stylesBySize[props.size].transitionTime;
1085
- const handleClose = react$1.useCallback(event => {
1086
- if (props.shouldDelayOnClose) {
1087
- // In this case we want the closing animation to be shown
1088
- // and therefore we need wait for it to be completed
1089
- // before calling `onClose`.
1090
- setForceClose(true);
1091
- closingTimer.current = _setTimeout__default["default"](() => {
1092
- onClose && onClose(event);
1093
- }, TRANSITION_DURATION);
1094
- return;
1095
- }
1096
- onClose && onClose(event);
1097
- }, [onClose, props.shouldDelayOnClose, TRANSITION_DURATION]);
1098
- return jsxRuntime.jsx(react.ClassNames, {
1099
- children: _ref => {
1100
- var _props$afterOpenStyle;
1101
- let makeClassName = _ref.css;
1102
- return jsxRuntime.jsxs(Modal__default["default"], {
1103
- isOpen: forceClose === true ? false : props.isOpen,
1104
- onRequestClose: handleClose,
1105
- shouldCloseOnOverlayClick: Boolean(props.onClose),
1106
- shouldCloseOnEsc: Boolean(props.onClose),
1107
- overlayElement: getOverlayElement,
1108
- overlayClassName: {
1109
- base: makeClassName(getOverlayStyles(props)),
1110
- afterOpen: makeClassName(getAfterOpenOverlayAnimation()),
1111
- beforeClose: makeClassName(getBeforeCloseOverlayAnimation())
1112
- },
1113
- className: {
1114
- base: makeClassName(getContainerStyles(props)),
1115
- afterOpen: typeof props.afterOpenStyles === 'string' ? props.afterOpenStyles : makeClassName((_props$afterOpenStyle = props.afterOpenStyles) !== null && _props$afterOpenStyle !== void 0 ? _props$afterOpenStyle : getAfterOpenContainerAnimation()),
1116
- beforeClose: makeClassName(getBeforeCloseContainerAnimation(props))
1117
- },
1118
- contentLabel: props.title,
1119
- parentSelector: props.getParentSelector,
1120
- ariaHideApp: false
1121
- // Adjust this value if the (beforeClose) animation duration is changed
1122
- ,
1123
- closeTimeoutMS: TRANSITION_DURATION,
1124
- style: {
1125
- // stylelint-disable-next-line selector-type-no-unknown
1126
- overlay: {
1127
- zIndex: props.zIndex
1128
- }
1129
- },
1130
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1131
- customViewLocatorCode: props.customViewLocatorCode
1132
- }), !props.hideTopBar && jsxRuntime.jsx(ModalPageTopBar, {
1133
- color: props.topBarColor,
1134
- onClose: handleClose,
1135
- currentPathLabel: props.currentPathLabel,
1136
- previousPathLabel: props.previousPathLabel,
1137
- hidePathLabel: props.hidePathLabel
1138
- }), props.children]
1139
- });
1140
- }
1154
+ const PageHeader = props => {
1155
+ return jsxRuntime.jsxs("div", {
1156
+ css: /*#__PURE__*/react.css("margin:", designTokens.marginForModalPageHeader, ";padding:", designTokens.paddingForModalPageHeader, ";border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";" + ("" ), "" ),
1157
+ children: [jsxRuntime.jsxs("div", {
1158
+ css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;&>*+*{margin-left:", designTokens.marginLeftForModalPageHeaderControls, ";}" + ("" ), "" ),
1159
+ children: [jsxRuntime.jsx(PageHeaderTitle, {
1160
+ title: props.title,
1161
+ titleSize: "big",
1162
+ subtitle: props.subtitle,
1163
+ truncate: true
1164
+ }), props.children]
1165
+ }), jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1166
+ margin: "".concat(designSystem.designTokens.spacing40, " 0 0 0"),
1167
+ customViewLocatorCode: props.customViewLocatorCode
1168
+ })]
1141
1169
  });
1142
1170
  };
1143
- ModalPage.propTypes = {};
1144
- ModalPage.displayName = 'ModalPage';
1145
- ModalPage.defaultProps = defaultProps$b;
1171
+ PageHeader.propTypes = {};
1172
+ PageHeader.displayName = 'PageHeader';
1173
+
1174
+ const ContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1175
+ target: "e1b7jwn01"
1176
+ } )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
1177
+ const PageWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1178
+ target: "e1b7jwn00"
1179
+ } )({
1180
+ name: "kdbhus",
1181
+ styles: "height:100%;display:flex;flex-direction:column"
1182
+ } );
1146
1183
 
1147
1184
  const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
1148
1185
  title: props.title,
@@ -1154,11 +1191,11 @@ const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
1154
1191
  shouldDelayOnClose: props.shouldDelayOnClose,
1155
1192
  getParentSelector: props.getParentSelector,
1156
1193
  afterOpenStyles: props.afterOpenStyles,
1157
- customViewLocatorCode: props.customViewLocatorCode,
1158
1194
  children: [jsxRuntime.jsx(PageHeader, {
1159
1195
  title: props.title,
1160
- subtitle: props.subtitle
1161
- }), jsxRuntime.jsx(ContentWrapper$1, {
1196
+ subtitle: props.subtitle,
1197
+ customViewLocatorCode: props.customViewLocatorCode
1198
+ }), jsxRuntime.jsx(ContentWrapper, {
1162
1199
  children: props.children
1163
1200
  })]
1164
1201
  });
@@ -1175,15 +1212,15 @@ const CustomFormModalPage = props => jsxRuntime.jsxs(ModalPage, {
1175
1212
  getParentSelector: props.getParentSelector,
1176
1213
  shouldDelayOnClose: props.shouldDelayOnClose,
1177
1214
  afterOpenStyles: props.afterOpenStyles,
1178
- customViewLocatorCode: props.customViewLocatorCode,
1179
1215
  children: [jsxRuntime.jsx(PageHeader, {
1180
1216
  title: props.title,
1181
1217
  subtitle: props.subtitle,
1218
+ customViewLocatorCode: props.customViewLocatorCode,
1182
1219
  children: !props.hideControls && props.formControls && jsxRuntime.jsx(Spacings__default["default"].Inline, {
1183
1220
  alignItems: "flex-end",
1184
1221
  children: props.formControls
1185
1222
  })
1186
- }), jsxRuntime.jsx(ContentWrapper$1, {
1223
+ }), jsxRuntime.jsx(ContentWrapper, {
1187
1224
  children: props.children
1188
1225
  })]
1189
1226
  });
@@ -1258,7 +1295,7 @@ const useCustomViewLocatorSelector = function () {
1258
1295
  };
1259
1296
 
1260
1297
  const TabControls = /*#__PURE__*/_styled__default["default"]("div", {
1261
- target: "elpldre1"
1298
+ target: "elpldre2"
1262
1299
  } )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
1263
1300
  const ControlsContainter = props => jsxRuntime.jsxs("div", {
1264
1301
  css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin-top:", designTokens.marginTopForTabControls, ";" + ("" ), "" ),
@@ -1280,8 +1317,11 @@ const defaultProps$9 = {
1280
1317
  };
1281
1318
  TabularPageContainer.defaultProps = defaultProps$9;
1282
1319
  const FormControlsContainer = /*#__PURE__*/_styled__default["default"]("div", {
1283
- target: "elpldre0"
1320
+ target: "elpldre1"
1284
1321
  } )("margin-bottom:", designSystem.designTokens.spacingM, ";" + ("" ));
1322
+ const CustomViewsSelectorWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1323
+ target: "elpldre0"
1324
+ } )("margin:", designTokens.marginForCustomViewsSelectorAsTabular, ";" + ("" ));
1285
1325
 
1286
1326
  const defaultProps$8 = {
1287
1327
  hideControls: false
@@ -1300,7 +1340,6 @@ const TabularModalPage = props => {
1300
1340
  getParentSelector: props.getParentSelector,
1301
1341
  shouldDelayOnClose: props.shouldDelayOnClose,
1302
1342
  afterOpenStyles: props.afterOpenStyles,
1303
- customViewLocatorCode: currentCustomViewLocatorCode,
1304
1343
  children: [jsxRuntime.jsxs(TabularPageContainer, {
1305
1344
  color: "neutral",
1306
1345
  children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
@@ -1317,7 +1356,12 @@ const TabularModalPage = props => {
1317
1356
  })
1318
1357
  })
1319
1358
  })]
1320
- }), jsxRuntime.jsx(ContentWrapper$1, {
1359
+ }), jsxRuntime.jsx(CustomViewsSelectorWrapper, {
1360
+ children: jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1361
+ margin: "".concat(designSystem.designTokens.spacing30, " 0 0 0"),
1362
+ customViewLocatorCode: currentCustomViewLocatorCode
1363
+ })
1364
+ }), jsxRuntime.jsx(ContentWrapper, {
1321
1365
  children: props.children
1322
1366
  })]
1323
1367
  });
@@ -1363,6 +1407,10 @@ const DetailPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
1363
1407
  const HeaderControlsWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1364
1408
  target: "etkdonc0"
1365
1409
  } )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
1410
+ const getCustomViewsSelectorMargin = hasContentBelow => {
1411
+ var _context;
1412
+ return _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing40, " 0 ")).call(_context, hasContentBelow ? designSystem.designTokens.spacing40 : '0', " 0");
1413
+ };
1366
1414
 
1367
1415
  // NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
1368
1416
  // However, we need to explicitly define this otherwise the prop-types babel plugin
@@ -1373,9 +1421,7 @@ const defaultProps$6 = {
1373
1421
  const CustomFormDetailPage = props => {
1374
1422
  var _props$title;
1375
1423
  return jsxRuntime.jsxs(PageWrapper, {
1376
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1377
- customViewLocatorCode: props.customViewLocatorCode
1378
- }), jsxRuntime.jsxs(DetailPageContainer, {
1424
+ children: [jsxRuntime.jsxs(DetailPageContainer, {
1379
1425
  children: [jsxRuntime.jsx(PageTopBar, {
1380
1426
  color: "neutral",
1381
1427
  previousPathLabel: props.previousPathLabel,
@@ -1384,13 +1430,16 @@ const CustomFormDetailPage = props => {
1384
1430
  title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
1385
1431
  subtitle: props.subtitle,
1386
1432
  titleSize: "big"
1433
+ }), jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1434
+ margin: getCustomViewsSelectorMargin(!props.hideControls && !!props.formControls),
1435
+ customViewLocatorCode: props.customViewLocatorCode
1387
1436
  }), !props.hideControls && props.formControls && jsxRuntime.jsx(HeaderControlsWrapper, {
1388
1437
  children: jsxRuntime.jsx(Spacings__default["default"].Inline, {
1389
1438
  justifyContent: "flex-end",
1390
1439
  children: props.formControls
1391
1440
  })
1392
1441
  })]
1393
- }), jsxRuntime.jsx(ContentWrapper$1, {
1442
+ }), jsxRuntime.jsx(ContentWrapper, {
1394
1443
  children: props.children
1395
1444
  })]
1396
1445
  });
@@ -1472,9 +1521,7 @@ const TabularDetailPage = props => {
1472
1521
  const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
1473
1522
  currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
1474
1523
  return jsxRuntime.jsxs(PageWrapper, {
1475
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1476
- customViewLocatorCode: currentCustomViewLocatorCode
1477
- }), jsxRuntime.jsxs(TabularPageContainer, {
1524
+ children: [jsxRuntime.jsxs(TabularPageContainer, {
1478
1525
  color: "neutral",
1479
1526
  children: [jsxRuntime.jsx(PageTopBar, {
1480
1527
  color: "neutral",
@@ -1493,7 +1540,12 @@ const TabularDetailPage = props => {
1493
1540
  })
1494
1541
  })
1495
1542
  })]
1496
- }), jsxRuntime.jsx(ContentWrapper$1, {
1543
+ }), jsxRuntime.jsx(CustomViewsSelectorWrapper, {
1544
+ children: jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1545
+ margin: "".concat(designSystem.designTokens.spacing30, " 0 0 0"),
1546
+ customViewLocatorCode: currentCustomViewLocatorCode
1547
+ })
1548
+ }), jsxRuntime.jsx(ContentWrapper, {
1497
1549
  children: props.children
1498
1550
  })]
1499
1551
  });
@@ -1512,7 +1564,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
1512
1564
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1513
1565
  TabularDetailPage.Intl = i18n.sharedMessages;
1514
1566
 
1515
- const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-295bf2b5.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
1567
+ const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-609304bf.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
1516
1568
 
1517
1569
  const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
1518
1570
  target: "ev8m2jf2"
@@ -1524,33 +1576,38 @@ const MainPageContent = /*#__PURE__*/_styled__default["default"]("div", {
1524
1576
  target: "ev8m2jf0"
1525
1577
  } )("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.marginForPageContent, ";" + ("" ));
1526
1578
 
1527
- const defaultProps$3 = {
1528
- hideControls: false,
1529
- hideDivider: false
1530
- };
1579
+ const headerRowMargin = "".concat(designSystem.designTokens.spacing40, " 0 0 0");
1531
1580
  const CustomFormMainPage = props => {
1532
1581
  var _props$title;
1533
1582
  return jsxRuntime.jsxs(PageWrapper, {
1534
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1535
- customViewLocatorCode: props.customViewLocatorCode
1536
- }), jsxRuntime.jsx(MainPageContainer, {
1537
- children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
1538
- scale: "l",
1539
- children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
1540
- title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
1541
- subtitle: props.subtitle,
1542
- titleSize: "big"
1543
- }), !props.hideControls && props.formControls && jsxRuntime.jsx(Spacings__default["default"].Inline, {
1583
+ children: [jsxRuntime.jsxs(MainPageContainer, {
1584
+ children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
1585
+ title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
1586
+ subtitle: props.subtitle,
1587
+ titleSize: "big"
1588
+ }), jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1589
+ margin: headerRowMargin,
1590
+ customViewLocatorCode: props.customViewLocatorCode
1591
+ }), !props.hideControls && props.formControls && jsxRuntime.jsx("div", {
1592
+ css: /*#__PURE__*/react.css("margin:", headerRowMargin, ";" + ("" ), "" ),
1593
+ children: jsxRuntime.jsx(Spacings__default["default"].Inline, {
1544
1594
  justifyContent: "flex-end",
1545
1595
  children: props.formControls
1546
- }), !props.hideDivider && jsxRuntime.jsx(Divider, {})]
1547
- })
1596
+ })
1597
+ }), !props.hideDivider && jsxRuntime.jsx("div", {
1598
+ css: /*#__PURE__*/react.css("&>", Divider, "{margin:", headerRowMargin, ";}" + ("" ), "" ),
1599
+ children: jsxRuntime.jsx(Divider, {})
1600
+ })]
1548
1601
  }), jsxRuntime.jsx(MainPageContent, {
1549
1602
  children: props.children
1550
1603
  })]
1551
1604
  });
1552
1605
  };
1553
1606
  CustomFormMainPage.propTypes = {};
1607
+ const defaultProps$3 = {
1608
+ hideControls: false,
1609
+ hideDivider: false
1610
+ };
1554
1611
  CustomFormMainPage.displayName = 'CustomFormMainPage';
1555
1612
  CustomFormMainPage.defaultProps = defaultProps$3;
1556
1613
 
@@ -1631,9 +1688,7 @@ const TabularMainPage = props => {
1631
1688
  const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
1632
1689
  currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
1633
1690
  return jsxRuntime.jsxs(PageWrapper, {
1634
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1635
- customViewLocatorCode: currentCustomViewLocatorCode
1636
- }), jsxRuntime.jsxs(TabularPageContainer, {
1691
+ children: [jsxRuntime.jsxs(TabularPageContainer, {
1637
1692
  color: "surface",
1638
1693
  children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
1639
1694
  title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
@@ -1648,7 +1703,12 @@ const TabularMainPage = props => {
1648
1703
  })
1649
1704
  })
1650
1705
  })]
1651
- }), jsxRuntime.jsx(ContentWrapper$1, {
1706
+ }), jsxRuntime.jsx(CustomViewsSelectorWrapper, {
1707
+ children: jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1708
+ margin: "".concat(designSystem.designTokens.spacing30, " 0 0 0"),
1709
+ customViewLocatorCode: currentCustomViewLocatorCode
1710
+ })
1711
+ }), jsxRuntime.jsx(ContentWrapper, {
1652
1712
  css: /*#__PURE__*/react.css("background-color:", designTokens.backgroundColorForTabularMainPageContent, ";" + ("" ), "" ),
1653
1713
  children: props.children
1654
1714
  })]
@@ -1920,6 +1980,7 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
1920
1980
  const containerSelectorToPreventScrollingOnOpen = (_props$containerSelec = props.containerSelectorToPreventScrollingOnOpen) !== null && _props$containerSelec !== void 0 ? _props$containerSelec : 'main';
1921
1981
  const zIndex = (_props$zIndex = props.zIndex) !== null && _props$zIndex !== void 0 ? _props$zIndex : 10000;
1922
1982
  const baseModalZIndex = (_props$baseModalZInde = props.baseModalZIndex) !== null && _props$baseModalZInde !== void 0 ? _props$baseModalZInde : 1000;
1983
+ const modalWidthTransition = 'width 150ms cubic-bezier(1, 0, 0.58, 1)';
1923
1984
  const portalsContainerRef = react$1.useRef(null);
1924
1985
  const globalNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.notificationsGlobalRef);
1925
1986
  const pageNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 || (_current2 = ref.current) === null || _current2 === void 0 ? void 0 : _current2.notificationsPageRef);
@@ -1963,7 +2024,7 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
1963
2024
  children: [jsxRuntime.jsx(react.Global
1964
2025
  // Apply some global styles, based on the `.ReactModal__Body--open` class.
1965
2026
  , {
1966
- styles: [/*#__PURE__*/react.css(".ReactModal__Body--open ", containerSelectorToPreventScrollingOnOpen, "{overflow:hidden;}.ReactModal__Body--open #", constants.PORTALS_CONTAINER_ID, "{position:fixed;height:calc(\n 100% - ", offsetTop, " -\n ", globalNotificationsElementDimensions.height, "px -\n ", pageNotificationsElementDimensions.height, "px\n );width:calc(100% - ", offsetLeft, ");top:calc(\n ", offsetTop, " +\n ", globalNotificationsElementDimensions.height, "px +\n ", pageNotificationsElementDimensions.height, "px\n );right:0;bottom:0;z-index:", zIndex, ";}.ReactModal__Body--open.body__menu-open #", constants.PORTALS_CONTAINER_ID, "{width:calc(100% - ", offsetLeftOnExpandedMenu, ");}" + ("" ), "" ),
2027
+ styles: [/*#__PURE__*/react.css(".ReactModal__Body--open ", containerSelectorToPreventScrollingOnOpen, "{overflow:hidden;}.ReactModal__Body--open #", constants.PORTALS_CONTAINER_ID, "{position:fixed;height:calc(\n 100% - ", offsetTop, " -\n ", globalNotificationsElementDimensions.height, "px -\n ", pageNotificationsElementDimensions.height, "px\n );width:calc(100% - ", offsetLeft, ");top:calc(\n ", offsetTop, " +\n ", globalNotificationsElementDimensions.height, "px +\n ", pageNotificationsElementDimensions.height, "px\n );right:0;bottom:0;z-index:", zIndex, ";transition:", modalWidthTransition, ";}.ReactModal__Body--open.body__menu-open #", constants.PORTALS_CONTAINER_ID, "{width:calc(100% - ", offsetLeftOnExpandedMenu, ");transition:", modalWidthTransition, ";}" + ("" ), "" ),
1967
2028
  // Apply styles for stacking layers.
1968
2029
  ..._mapInstanceProperty__default["default"](stackingLayers).call(stackingLayers,
1969
2030
  /**