@commercetools-frontend/application-components 22.17.2 → 22.19.0

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.
@@ -18,6 +18,7 @@ var Text = require('@commercetools-uikit/text');
18
18
  var utils = require('@commercetools-uikit/utils');
19
19
  var react = require('@emotion/react');
20
20
  var designSystem = require('@commercetools-uikit/design-system');
21
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
21
22
  var jsxRuntime = require('@emotion/react/jsx-runtime');
22
23
  var react$1 = require('react');
23
24
  var _styled = require('@emotion/styled/base');
@@ -37,17 +38,21 @@ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instan
37
38
  var sentry = require('@commercetools-frontend/sentry');
38
39
  var AccessibleButton = require('@commercetools-uikit/accessible-button');
39
40
  var Constraints = require('@commercetools-uikit/constraints');
40
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
41
+ var reactBroadcast = require('@flopflip/react-broadcast');
41
42
  var actionsGlobal = require('@commercetools-frontend/actions-global');
42
43
  var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
43
44
  var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
44
45
  var FlatButton = require('@commercetools-uikit/flat-button');
45
- var reactBroadcast = require('@flopflip/react-broadcast');
46
46
  var IconButton = require('@commercetools-uikit/icon-button');
47
47
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
48
48
  var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
49
+ var PageNotFoundSVGRebranding = require('@commercetools-frontend/assets/images/page-not-found-rebranding.svg');
49
50
  var PageNotFoundSVG = require('@commercetools-frontend/assets/images/page-not-found.svg');
51
+ var FailedAuthorizationSVGRebranding = require('@commercetools-frontend/assets/images/doors-closed-rebranding.svg');
50
52
  var FailedAuthorizationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
53
+ var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
54
+ var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
55
+ var Stamp = require('@commercetools-uikit/stamp');
51
56
  var useResizeObserver = require('@react-hook/resize-observer');
52
57
  var hooks = require('@commercetools-uikit/hooks');
53
58
 
@@ -62,6 +67,7 @@ var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_O
62
67
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
63
68
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
64
69
  var Text__default = /*#__PURE__*/_interopDefault(Text);
70
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
65
71
  var _styled__default = /*#__PURE__*/_interopDefault(_styled);
66
72
  var Modal__default = /*#__PURE__*/_interopDefault(Modal);
67
73
  var Card__default = /*#__PURE__*/_interopDefault(Card);
@@ -74,28 +80,85 @@ var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
74
80
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
75
81
  var AccessibleButton__default = /*#__PURE__*/_interopDefault(AccessibleButton);
76
82
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
77
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
78
83
  var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
79
84
  var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
80
85
  var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
81
86
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
82
87
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
88
+ var PageNotFoundSVGRebranding__default = /*#__PURE__*/_interopDefault(PageNotFoundSVGRebranding);
83
89
  var PageNotFoundSVG__default = /*#__PURE__*/_interopDefault(PageNotFoundSVG);
90
+ var FailedAuthorizationSVGRebranding__default = /*#__PURE__*/_interopDefault(FailedAuthorizationSVGRebranding);
84
91
  var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthorizationSVG);
92
+ var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
93
+ var Stamp__default = /*#__PURE__*/_interopDefault(Stamp);
85
94
  var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
86
95
 
87
96
  // NOTE: This string will be replaced on build time with the package version.
88
- var version = "22.17.2";
97
+ var version = "22.19.0";
98
+
99
+ var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11;
100
+
101
+ // We keep these tokens as they are related to page layout components which should have
102
+ // a slightly different layout (margins/paddings) when used within a Custom View panel.
103
+ // https://github.com/commercetools/merchant-center-application-kit/pull/3353
104
+ const themesOverrides = {
105
+ default: {
106
+ marginForCustomViewsSelectorAsTabular: "0 ".concat(designSystem.designTokens.spacing55),
107
+ marginForPageContent: _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing50, " ")).call(_context, designSystem.designTokens.spacing55),
108
+ paddingForDetailPageHeader: _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context3, designSystem.designTokens.spacing55, " ")).call(_context2, designSystem.designTokens.spacing40),
109
+ paddingForMainPageHeader: _concatInstanceProperty__default["default"](_context4 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context4, designSystem.designTokens.spacing55, " 0"),
110
+ paddingForTabularPageHeader: _concatInstanceProperty__default["default"](_context5 = "".concat(designSystem.designTokens.spacing40, " ")).call(_context5, designSystem.designTokens.spacing55, " 0"),
111
+ // recolouring rollout
112
+ backgroundColorForNavbar: designSystem.designTokens.colorPrimary,
113
+ backgroundColorForNavbarExpander: _concatInstanceProperty__default["default"](_context6 = "linear-gradient(180deg, ".concat(designSystem.designTokens.colorPrimary, " 0%, ")).call(_context6, designSystem.designTokens.colorPrimary25, " 100%)"),
114
+ backgroundColorForNavbarExpanderWhenHovered: designSystem.designTokens.colorPrimary40,
115
+ backgroundColorForNavbarHeader: designSystem.designTokens.colorAccent10,
116
+ backgroundColorForNavbarMenuItemWhenActive: designSystem.designTokens.colorAccent30,
117
+ backgroundColorForNavbarSubmenuItemWhenActive: designSystem.designTokens.colorAccent30,
118
+ backgroundColorForNavbarMenuItemWhenHovered: designSystem.designTokens.colorPrimary40,
119
+ backgroundColorForNavbarSkeleton: '#009987',
120
+ backgroundColorForNavbarSkeletonFooter: 'linear-gradient(180deg, #009987 0%, #004d44 100%)',
121
+ borderColorForNotificationWhenSuccess: designSystem.designTokens.colorPrimary85,
122
+ fontColorForNotificationWhenSuccess: designSystem.designTokens.colorPrimary,
123
+ fontColorForNotificationWhenWarning: designSystem.designTokens.colorWarning,
124
+ fontColorForTabLabelWhenActive: designSystem.designTokens.colorSolid,
125
+ visibilityForNavbarFaded: 'visible'
126
+ },
127
+ recolouring: {
128
+ marginForCustomViewsSelectorAsTabular: "0 ".concat(designSystem.designTokens.spacing55),
129
+ marginForPageContent: _concatInstanceProperty__default["default"](_context7 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context7, designSystem.designTokens.spacing55),
130
+ paddingForDetailPageHeader: _concatInstanceProperty__default["default"](_context8 = _concatInstanceProperty__default["default"](_context9 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context9, designSystem.designTokens.spacing55, " ")).call(_context8, designSystem.designTokens.spacing40),
131
+ paddingForMainPageHeader: _concatInstanceProperty__default["default"](_context10 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context10, designSystem.designTokens.spacing55, " 0"),
132
+ paddingForTabularPageHeader: _concatInstanceProperty__default["default"](_context11 = "".concat(designSystem.designTokens.spacing40, " ")).call(_context11, designSystem.designTokens.spacing55, " 0"),
133
+ backgroundColorForNavbar: designSystem.designTokens.colorPrimary10,
134
+ backgroundColorForNavbarExpander: designSystem.designTokens.colorPrimary10,
135
+ backgroundColorForNavbarExpanderWhenHovered: designSystem.designTokens.colorPrimary10,
136
+ backgroundColorForNavbarHeader: designSystem.designTokens.colorPrimary10,
137
+ backgroundColorForNavbarMenuItemWhenActive: designSystem.designTokens.colorPrimary25,
138
+ backgroundColorForNavbarSubmenuItemWhenActive: designSystem.designTokens.colorPrimary40,
139
+ backgroundColorForNavbarMenuItemWhenHovered: designSystem.designTokens.colorPrimary20,
140
+ backgroundColorForNavbarSkeleton: designSystem.designTokens.colorPrimary10,
141
+ backgroundColorForNavbarSkeletonFooter: designSystem.designTokens.colorPrimary10,
142
+ borderColorForNotificationWhenSuccess: designSystem.designTokens.colorSuccess85,
143
+ fontColorForNotificationWhenSuccess: designSystem.designTokens.colorSuccess,
144
+ fontColorForNotificationWhenWarning: designSystem.designTokens.colorWarning60,
145
+ fontColorForTabLabelWhenActive: designSystem.designTokens.colorPrimary,
146
+ visibilityForNavbarFaded: 'hidden'
147
+ }
148
+ };
149
+ const designTokens = designSystem.transformTokensToCssVarsReferences(themesOverrides.default, {
150
+ includeDefaultValue: false
151
+ });
89
152
 
90
153
  const getBottomBorderStyles = background => /*#__PURE__*/react.css(":after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;border-radius:", designSystem.designTokens.borderRadius2, ";background-color:", background, ";transition:background-color ", designSystem.designTokens.transitionEaseinout150Ms, ";}" + ("" ), "" );
91
- var _ref$7 = {
154
+ var _ref$8 = {
92
155
  name: "1u0tiat",
93
156
  styles: "&[aria-disabled='true']{cursor:not-allowed;opacity:0.5;&:active{pointer-events:none;}}"
94
157
  } ;
95
- const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-size:", designSystem.designTokens.fontSize30, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";position:relative;text-align:center;display:inline-block;color:inherit;text-decoration:inherit;&:first-of-type{padding-left:", designSystem.designTokens.spacing30, ";}", getBottomBorderStyles('transparent'), ";" + ("" ), "" ), isActive && /*#__PURE__*/react.css(getBottomBorderStyles(designSystem.designTokens.colorPrimary), " & h4{color:", designSystem.designTokens.colorPrimary, "!important;}" + ("" ), "" ), isDisabled && _ref$7, !isActive && !isDisabled && /*#__PURE__*/react.css(":hover,:focus,:active{& h4{color:", designSystem.designTokens.colorPrimary, "!important;}}" + ("" ), "" )];
158
+ const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-size:", designSystem.designTokens.fontSize30, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";position:relative;text-align:center;display:inline-block;color:inherit;text-decoration:inherit;&:first-of-type{padding-left:", designSystem.designTokens.spacing30, ";}", getBottomBorderStyles('transparent'), ";" + ("" ), "" ), isActive && /*#__PURE__*/react.css(getBottomBorderStyles(designSystem.designTokens.colorPrimary), " & h3{color:", designTokens.fontColorForTabLabelWhenActive, "!important;}" + ("" ), "" ), isDisabled && _ref$8, !isActive && !isDisabled && /*#__PURE__*/react.css(":hover,:focus,:active{& h3{color:", designTokens.fontColorForTabLabelWhenActive, "!important;}}" + ("" ), "" )];
96
159
 
97
- function ownKeys$7(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; }
98
- function _objectSpread$7(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$7(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$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
160
+ function ownKeys$8(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; }
161
+ function _objectSpread$8(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$8(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$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
99
162
  const pathWithoutSearch$1 = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
100
163
  const warnIfMissingContent = props => {
101
164
  Boolean(props.intlMessage) || Boolean(props.label);
@@ -127,7 +190,7 @@ const TabHeader = props => {
127
190
  label = intl.formatMessage(props.intlMessage);
128
191
  }
129
192
  warnIfMissingContent(props);
130
- return jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$7(_objectSpread$7({
193
+ return jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$8(_objectSpread$8({
131
194
  role: "tab",
132
195
  "aria-selected": isActive,
133
196
  to: props.to,
@@ -184,13 +247,13 @@ const getModalContentStyles = props => {
184
247
  const getOverlayStyles$1 = props => /*#__PURE__*/react.css("display:flex;position:absolute;z-index:", typeof props.zIndex === 'number' ? // Use `!important` to overwrite the default value assigned by the Stacking Layer System.
185
248
  "".concat(props.zIndex, " !important") : 'auto', ";top:0;width:100%;height:100%;background-color:rgba(32, 62, 72, 0.5);opacity:1;" + ("" ), "" );
186
249
 
187
- function ownKeys$6(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; }
188
- function _objectSpread$6(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$6(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$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
250
+ function ownKeys$7(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; }
251
+ function _objectSpread$7(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$7(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$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
189
252
  const getDefaultParentSelector$1 = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
190
253
  const getOverlayElement$1 = (props, contentElement) =>
191
254
  // Assign the `data-role` to the overlay container, which is used as
192
255
  // the CSS selector in the `<PortalsContainer>`.
193
- jsxRuntime.jsx("div", _objectSpread$6(_objectSpread$6({}, props), {}, {
256
+ jsxRuntime.jsx("div", _objectSpread$7(_objectSpread$7({}, props), {}, {
194
257
  "data-role": "dialog-overlay",
195
258
  children: contentElement
196
259
  }));
@@ -205,7 +268,7 @@ const defaultProps$i = {
205
268
  const GridArea = /*#__PURE__*/_styled__default["default"]("div", {
206
269
  target: "elx55gk0"
207
270
  } )("grid-area:", props => props.name, ";" + ("" ));
208
- var _ref$6 = {
271
+ var _ref$7 = {
209
272
  name: "1daj17f",
210
273
  styles: "display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:0"
211
274
  } ;
@@ -213,45 +276,48 @@ var _ref2$3 = {
213
276
  name: "1187q51",
214
277
  styles: "display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden"
215
278
  } ;
216
- const DialogContainer = props => jsxRuntime.jsx(react.ClassNames, {
217
- children: _ref3 => {
218
- let makeClassName = _ref3.css;
219
- return jsxRuntime.jsxs(Modal__default["default"], {
220
- isOpen: props.isOpen,
221
- onRequestClose: props.onClose,
222
- shouldCloseOnOverlayClick: Boolean(props.onClose),
223
- shouldCloseOnEsc: Boolean(props.onClose),
224
- overlayElement: getOverlayElement$1,
225
- overlayClassName: makeClassName(getOverlayStyles$1(props)),
226
- className: makeClassName(getModalContentStyles(props)),
227
- contentLabel: props.title,
228
- parentSelector: props.getParentSelector,
229
- ariaHideApp: false,
230
- children: [jsxRuntime.jsx(GridArea, {
231
- name: "top"
232
- }), jsxRuntime.jsx(GridArea, {
233
- name: "left"
234
- }), jsxRuntime.jsx(GridArea, {
235
- name: "right"
236
- }), jsxRuntime.jsx(GridArea, {
237
- name: "bottom"
238
- }), jsxRuntime.jsx(GridArea, {
239
- name: "main",
240
- css: _ref2$3,
241
- children: jsxRuntime.jsx(Card__default["default"]
242
- // 1. For the min-height: https://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox/28639686#28639686
243
- // 2. For the actual "> div" container with the content, we need to use normal pointer events so that clicking on it does not close the dialog.
244
- , {
245
- css: /*#__PURE__*/react.css("min-height:0;padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing30, ";>div{display:flex;flex-direction:column;height:100%;pointer-events:auto;min-height:0;}" + ("" ), "" ),
246
- children: jsxRuntime.jsx("div", {
247
- css: _ref$6,
248
- children: props.children
279
+ const DialogContainer = props => {
280
+ utils.useWarning(typeof props.title === 'string' || typeof props.title !== 'string' && Boolean(props['aria-label']), 'app-kit/DialogHeader: "aria-label" prop is required when the "title" prop is not a string.');
281
+ return jsxRuntime.jsx(react.ClassNames, {
282
+ children: _ref3 => {
283
+ let makeClassName = _ref3.css;
284
+ return jsxRuntime.jsxs(Modal__default["default"], {
285
+ isOpen: props.isOpen,
286
+ onRequestClose: props.onClose,
287
+ shouldCloseOnOverlayClick: Boolean(props.onClose),
288
+ shouldCloseOnEsc: Boolean(props.onClose),
289
+ overlayElement: getOverlayElement$1,
290
+ overlayClassName: makeClassName(getOverlayStyles$1(props)),
291
+ className: makeClassName(getModalContentStyles(props)),
292
+ contentLabel: typeof props.title === 'string' ? props.title : props['aria-label'],
293
+ parentSelector: props.getParentSelector,
294
+ ariaHideApp: false,
295
+ children: [jsxRuntime.jsx(GridArea, {
296
+ name: "top"
297
+ }), jsxRuntime.jsx(GridArea, {
298
+ name: "left"
299
+ }), jsxRuntime.jsx(GridArea, {
300
+ name: "right"
301
+ }), jsxRuntime.jsx(GridArea, {
302
+ name: "bottom"
303
+ }), jsxRuntime.jsx(GridArea, {
304
+ name: "main",
305
+ css: _ref2$3,
306
+ children: jsxRuntime.jsx(Card__default["default"]
307
+ // 1. For the min-height: https://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox/28639686#28639686
308
+ // 2. For the actual "> div" container with the content, we need to use normal pointer events so that clicking on it does not close the dialog.
309
+ , {
310
+ css: /*#__PURE__*/react.css("min-height:0;padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing30, ";>div{display:flex;flex-direction:column;height:100%;pointer-events:auto;min-height:0;}" + ("" ), "" ),
311
+ children: jsxRuntime.jsx("div", {
312
+ css: _ref$7,
313
+ children: props.children
314
+ })
249
315
  })
250
- })
251
- })]
252
- });
253
- }
254
- });
316
+ })]
317
+ });
318
+ }
319
+ });
320
+ };
255
321
  DialogContainer.propTypes = {};
256
322
  DialogContainer.displayName = 'DialogContainer';
257
323
  DialogContainer.defaultProps = defaultProps$i;
@@ -261,13 +327,23 @@ const DialogContent = /*#__PURE__*/_styled__default["default"]("div", {
261
327
  target: "eo6zkz80"
262
328
  } )("border-top:1px solid ", designSystem.designTokens.colorNeutral90, ";padding:", designSystem.designTokens.spacing40, " 0 0;flex:1;overflow:auto;" + ("" ));
263
329
 
330
+ const TextTitle = props => jsxRuntime.jsx(Text__default["default"].Headline, {
331
+ as: "h3",
332
+ title: props.title,
333
+ truncate: true,
334
+ children: props.title
335
+ });
336
+ TextTitle.propTypes = {};
264
337
  const Title$1 = props => {
265
- return jsxRuntime.jsx(Text__default["default"].Headline, {
266
- as: "h3",
267
- title: props.title,
268
- truncate: true,
269
- children: props.title
270
- });
338
+ if (typeof props.title === 'string') {
339
+ return jsxRuntime.jsx(TextTitle, {
340
+ title: props.title
341
+ });
342
+ } else {
343
+ return jsxRuntime.jsx(jsxRuntime.Fragment, {
344
+ children: props.title
345
+ });
346
+ }
271
347
  };
272
348
  const DialogHeader = props => jsxRuntime.jsx("div", {
273
349
  css: /*#__PURE__*/react.css("flex:0 1 auto;display:flex;flex-direction:column;margin-bottom:", designSystem.designTokens.spacing30, ";" + ("" ), "" ),
@@ -294,6 +370,7 @@ const InfoDialog = props => jsxRuntime.jsxs(DialogContainer, {
294
370
  size: props.size,
295
371
  zIndex: props.zIndex,
296
372
  title: props.title,
373
+ "aria-label": props['aria-label'],
297
374
  getParentSelector: props.getParentSelector,
298
375
  children: [jsxRuntime.jsx(DialogHeader, {
299
376
  title: props.title,
@@ -305,12 +382,16 @@ const InfoDialog = props => jsxRuntime.jsxs(DialogContainer, {
305
382
  InfoDialog.propTypes = {};
306
383
  InfoDialog.displayName = 'InfoDialog';
307
384
 
385
+ // Allow consumers who want to use a custom title to reuse the same title styles
386
+ // as the default dialog title.
387
+ InfoDialog.TextTitle = TextTitle;
388
+
308
389
  function filterDataAttributes(obj) {
309
390
  return omitBy__default["default"](obj, (_value, key) => !_startsWithInstanceProperty__default["default"](key).call(key, 'data-'));
310
391
  }
311
392
 
312
- function ownKeys$5(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; }
313
- function _objectSpread$5(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$5(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$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
393
+ function ownKeys$6(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; }
394
+ function _objectSpread$6(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$6(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$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
314
395
  const defaultProps$h = {
315
396
  isPrimaryButtonDisabled: false,
316
397
  dataAttributesPrimaryButton: {},
@@ -325,11 +406,11 @@ const DialogFooter = props => {
325
406
  scale: "m",
326
407
  alignItems: "center",
327
408
  justifyContent: "flex-end",
328
- children: [jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$5({
409
+ children: [jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$6({
329
410
  label: getFormattedLabel(props.labelSecondary, intl),
330
411
  onClick: props.onCancel,
331
412
  iconLeft: props.iconLeftSecondaryButton
332
- }, filterDataAttributes(props.dataAttributesSecondaryButton))), jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$5({
413
+ }, filterDataAttributes(props.dataAttributesSecondaryButton))), jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$6({
333
414
  label: getFormattedLabel(props.labelPrimary, intl),
334
415
  onClick: props.onConfirm,
335
416
  isDisabled: props.isPrimaryButtonDisabled
@@ -351,6 +432,7 @@ const ConfirmationDialog = props => jsxRuntime.jsxs(DialogContainer, {
351
432
  size: props.size,
352
433
  zIndex: props.zIndex,
353
434
  title: props.title,
435
+ "aria-label": props['aria-label'],
354
436
  getParentSelector: props.getParentSelector,
355
437
  children: [jsxRuntime.jsx(DialogHeader, {
356
438
  title: props.title,
@@ -373,6 +455,9 @@ ConfirmationDialog.defaultProps = defaultProps$g;
373
455
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
374
456
  // The Intl messages can be used for button labels.
375
457
  ConfirmationDialog.Intl = i18n.sharedMessages;
458
+ // Allow consumers who want to use a custom title to reuse the same title styles
459
+ // as the default dialog title.
460
+ ConfirmationDialog.TextTitle = TextTitle;
376
461
 
377
462
  const defaultProps$f = {
378
463
  labelSecondary: i18n.sharedMessages.cancel,
@@ -384,6 +469,7 @@ const FormDialog = props => jsxRuntime.jsxs(DialogContainer, {
384
469
  size: props.size,
385
470
  zIndex: props.zIndex,
386
471
  title: props.title,
472
+ "aria-label": props['aria-label'],
387
473
  getParentSelector: props.getParentSelector,
388
474
  children: [jsxRuntime.jsx(DialogHeader, {
389
475
  title: props.title,
@@ -407,8 +493,11 @@ FormDialog.defaultProps = defaultProps$f;
407
493
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
408
494
  // The Intl messages can be used for button labels.
409
495
  FormDialog.Intl = i18n.sharedMessages;
496
+ // Allow consumers who want to use a custom title to reuse the same title styles
497
+ // as the default dialog title.
498
+ FormDialog.TextTitle = TextTitle;
410
499
 
411
- const messages$4 = reactIntl.defineMessages({
500
+ const messages$5 = reactIntl.defineMessages({
412
501
  back: {
413
502
  id: 'Components.ModalPage.TopBar.Back',
414
503
  defaultMessage: 'Go Back'
@@ -437,10 +526,10 @@ const LargeIconWrapper = props => jsxRuntime.jsx("span", {
437
526
  LargeIconWrapper.propTypes = {};
438
527
  const defaultProps$e = {
439
528
  color: 'surface',
440
- previousPathLabel: messages$4.back,
529
+ previousPathLabel: messages$5.back,
441
530
  hidePathLabel: false
442
531
  };
443
- var _ref$5 = {
532
+ var _ref$6 = {
444
533
  name: "uvw8rn",
445
534
  styles: "display:flex;overflow:hidden;button:first-of-type svg{height:12px!important;width:12px!important;}"
446
535
  } ;
@@ -449,7 +538,7 @@ const ModalPageTopBar = props => {
449
538
  return jsxRuntime.jsxs("div", {
450
539
  css: /*#__PURE__*/react.css("position:relative;display:flex;align-items:center;justify-content:space-between;padding:", designSystem.designTokens.spacing40, " ", designSystem.designTokens.spacing55, " 0;background-color:", designSystem.designTokens.colorSurface, ";border-bottom:1px solid ", designSystem.designTokens.colorSurface, ";& *+*{margin-left:", designSystem.designTokens.spacingS, ";}p{font-size:12px!important;}" + ("" ), "" ),
451
540
  children: [jsxRuntime.jsxs("div", {
452
- css: _ref$5,
541
+ css: _ref$6,
453
542
  children: [!props.hidePathLabel && jsxRuntime.jsx(FlatButton__default["default"], {
454
543
  tone: "primary",
455
544
  label: typeof props.previousPathLabel === 'string' ? props.previousPathLabel : intl.formatMessage(props.previousPathLabel),
@@ -470,7 +559,7 @@ const ModalPageTopBar = props => {
470
559
  })]
471
560
  })]
472
561
  }), props.onClose && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
473
- label: intl.formatMessage(messages$4.close),
562
+ label: intl.formatMessage(messages$5.close),
474
563
  onClick: props.onClose,
475
564
  icon: jsxRuntime.jsx(LargeIconWrapper, {
476
565
  children: jsxRuntime.jsx(icons.CloseIcon, {})
@@ -520,19 +609,19 @@ var _ref2$1 = {
520
609
  } ;
521
610
  const getAfterOpenOverlayAnimation = () => _ref2$1;
522
611
  const getBeforeCloseContainerAnimation = props => /*#__PURE__*/react.css("transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n ,\n 0,\n 0\n )!important;" + ("" ), "" );
523
- var _ref$4 = {
612
+ var _ref$5 = {
524
613
  name: "728dx5",
525
614
  styles: "opacity:0!important"
526
615
  } ;
527
- const getBeforeCloseOverlayAnimation = () => _ref$4;
616
+ const getBeforeCloseOverlayAnimation = () => _ref$5;
528
617
 
529
- 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; }
530
- 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; }
618
+ function ownKeys$5(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; }
619
+ function _objectSpread$5(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$5(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$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
531
620
  const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
532
621
  const getOverlayElement = (props, contentElement) =>
533
622
  // Assign the `data-role` to the overlay container, which is used as
534
623
  // the CSS selector in the `<PortalsContainer>`.
535
- jsxRuntime.jsx("div", _objectSpread$4(_objectSpread$4({}, props), {}, {
624
+ jsxRuntime.jsx("div", _objectSpread$5(_objectSpread$5({}, props), {}, {
536
625
  "data-role": "modal-overlay",
537
626
  children: contentElement
538
627
  }));
@@ -621,7 +710,7 @@ ModalPage.propTypes = {};
621
710
  ModalPage.displayName = 'ModalPage';
622
711
  ModalPage.defaultProps = defaultProps$d;
623
712
 
624
- const messages$3 = reactIntl.defineMessages({
713
+ const messages$4 = reactIntl.defineMessages({
625
714
  loadError: {
626
715
  id: 'CustomViewLoader.error.load',
627
716
  defaultMessage: 'We could not load the Custom View. Please contact your administrator to check its configuration.'
@@ -659,6 +748,7 @@ function CustomViewLoader(props) {
659
748
  var _context$project;
660
749
  return (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key;
661
750
  });
751
+ const featureFlags = reactBroadcast.useAllFeatureToggles();
662
752
  const iFrameCommunicationChannel = react$1.useRef(new MessageChannel());
663
753
  const showNotification = actionsGlobal.useShowNotification();
664
754
  const intl = reactIntl.useIntl();
@@ -682,7 +772,7 @@ function CustomViewLoader(props) {
682
772
  showNotification({
683
773
  domain: constants.DOMAINS.PAGE,
684
774
  kind: constants.NOTIFICATION_KINDS_PAGE.error,
685
- text: intl.formatMessage(messages$3.loadError)
775
+ text: intl.formatMessage(messages$4.loadError)
686
776
  });
687
777
  return;
688
778
  }
@@ -702,6 +792,7 @@ function CustomViewLoader(props) {
702
792
  context: {
703
793
  dataLocale,
704
794
  projectKey,
795
+ featureFlags,
705
796
  customViewConfig: props.customView,
706
797
  hostUrl: props.hostUrl || window.location.href
707
798
  }
@@ -745,7 +836,7 @@ function CustomViewLoader(props) {
745
836
  }
746
837
  CustomViewLoader.propTypes = {};
747
838
 
748
- var messages$2 = reactIntl.defineMessages({
839
+ var messages$3 = reactIntl.defineMessages({
749
840
  title: {
750
841
  id: 'CustomViewsSelector.title',
751
842
  defaultMessage: 'Custom Views:'
@@ -776,8 +867,8 @@ const useCustomViewsConnector = _ref => {
776
867
  };
777
868
  };
778
869
 
779
- 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; }
780
- 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; }
870
+ 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; }
871
+ 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; }
781
872
  const COMPONENT_HEIGHT = '52px';
782
873
  const Wrapper = /*#__PURE__*/_styled__default["default"]("div", {
783
874
  target: "e16cb3zv3"
@@ -852,7 +943,7 @@ function CustomViewSelector(props) {
852
943
  color: "neutral60"
853
944
  }), jsxRuntime.jsx(Text__default["default"].Detail, {
854
945
  tone: "secondary",
855
- intlMessage: messages$2.title
946
+ intlMessage: messages$3.title
856
947
  })]
857
948
  }), _mapInstanceProperty__default["default"](customViews).call(customViews, (customView, index) => {
858
949
  const isNotLastItem = index !== customViews.length - 1;
@@ -882,7 +973,7 @@ const CustomViewSelectorOrNothing = props => {
882
973
  if (!props.customViewLocatorCode) {
883
974
  return null;
884
975
  }
885
- return jsxRuntime.jsx(CustomViewSelector, _objectSpread$3(_objectSpread$3({}, props), {}, {
976
+ return jsxRuntime.jsx(CustomViewSelector, _objectSpread$4(_objectSpread$4({}, props), {}, {
886
977
  customViewLocatorCode: props.customViewLocatorCode
887
978
  }));
888
979
  };
@@ -942,12 +1033,12 @@ Subtitle.propTypes = {};
942
1033
  Subtitle.defaultProps = {
943
1034
  truncate: false
944
1035
  };
945
- var _ref$3 = {
1036
+ var _ref$4 = {
946
1037
  name: "d3v9zr",
947
1038
  styles: "overflow:hidden"
948
1039
  } ;
949
1040
  const PageHeaderTitle = props => jsxRuntime.jsxs("div", {
950
- css: _ref$3,
1041
+ css: _ref$4,
951
1042
  children: [jsxRuntime.jsx(Title, {
952
1043
  title: props.title,
953
1044
  titleSize: props.titleSize,
@@ -981,24 +1072,6 @@ const PageHeader = props => {
981
1072
  PageHeader.propTypes = {};
982
1073
  PageHeader.displayName = 'PageHeader';
983
1074
 
984
- var _context, _context2, _context3, _context4, _context5;
985
-
986
- // We keep these tokens as they are related to page layout components which should have
987
- // a slightly different layout (margins/paddings) when used within a Custom View panel.
988
- // https://github.com/commercetools/merchant-center-application-kit/pull/3353
989
- const themesOverrides = {
990
- default: {
991
- marginForCustomViewsSelectorAsTabular: "0 ".concat(designSystem.designTokens.spacing55),
992
- marginForPageContent: _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing50, " ")).call(_context, designSystem.designTokens.spacing55),
993
- paddingForDetailPageHeader: _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context3, designSystem.designTokens.spacing55, " ")).call(_context2, designSystem.designTokens.spacing40),
994
- paddingForMainPageHeader: _concatInstanceProperty__default["default"](_context4 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context4, designSystem.designTokens.spacing55, " 0"),
995
- paddingForTabularPageHeader: _concatInstanceProperty__default["default"](_context5 = "".concat(designSystem.designTokens.spacing40, " ")).call(_context5, designSystem.designTokens.spacing55, " 0")
996
- }
997
- };
998
- const designTokens = designSystem.transformTokensToCssVarsReferences(themesOverrides.default, {
999
- includeDefaultValue: false
1000
- });
1001
-
1002
1075
  const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
1003
1076
  target: "e1b7jwn02"
1004
1077
  } )("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.marginForPageContent, ";" + ("" ));
@@ -1033,8 +1106,8 @@ const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
1033
1106
  InfoModalPage.propTypes = {};
1034
1107
  InfoModalPage.displayName = 'InfoModalPage';
1035
1108
 
1036
- 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; }
1037
- 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; }
1109
+ 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; }
1110
+ 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; }
1038
1111
  const primaryDefaultProps = {
1039
1112
  label: i18n.sharedMessages.confirm,
1040
1113
  isDisabled: false,
@@ -1046,7 +1119,7 @@ const useFormattedLabel = label => {
1046
1119
  };
1047
1120
  const FormPrimaryButton = props => {
1048
1121
  const label = useFormattedLabel(props.label);
1049
- return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$2({
1122
+ return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$3({
1050
1123
  label: label,
1051
1124
  onClick: props.onClick,
1052
1125
  isDisabled: props.isDisabled
@@ -1062,7 +1135,7 @@ const secondaryDefaultProps = {
1062
1135
  };
1063
1136
  const FormSecondaryButton = props => {
1064
1137
  const label = useFormattedLabel(props.label);
1065
- return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$2({
1138
+ return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$3({
1066
1139
  label: label,
1067
1140
  onClick: props.onClick,
1068
1141
  isDisabled: props.isDisabled,
@@ -1079,7 +1152,7 @@ const deleteDefaultProps = {
1079
1152
  };
1080
1153
  const FormDeleteButton = props => {
1081
1154
  const label = useFormattedLabel(props.label);
1082
- return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$2({
1155
+ return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$3({
1083
1156
  icon: jsxRuntime.jsx(icons.BinLinearIcon, {}),
1084
1157
  label: label,
1085
1158
  onClick: props.onClick,
@@ -1268,7 +1341,7 @@ TabularModalPage.Intl = i18n.sharedMessages;
1268
1341
 
1269
1342
  const defaultProps$8 = {
1270
1343
  color: 'surface',
1271
- previousPathLabel: messages$4.back
1344
+ previousPathLabel: messages$5.back
1272
1345
  };
1273
1346
  const PageTopBar = props => {
1274
1347
  const intl = reactIntl.useIntl();
@@ -1618,7 +1691,7 @@ TabularMainPage.PageHeaderTitle = PageHeaderTitle;
1618
1691
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1619
1692
  TabularMainPage.Intl = i18n.sharedMessages;
1620
1693
 
1621
- var _ref$2 = {
1694
+ var _ref$3 = {
1622
1695
  name: "zl1inp",
1623
1696
  styles: "display:flex;justify-content:center"
1624
1697
  } ;
@@ -1646,7 +1719,7 @@ const MaintenancePageLayout = props => jsxRuntime.jsx("div", {
1646
1719
  }), jsxRuntime.jsx(Text__default["default"].Body, {
1647
1720
  children: props.paragraph1
1648
1721
  }), props.bodyContent && jsxRuntime.jsx("div", {
1649
- css: _ref$2,
1722
+ css: _ref$3,
1650
1723
  children: props.bodyContent
1651
1724
  }), props.paragraph2 && jsxRuntime.jsx(Text__default["default"].Body, {
1652
1725
  children: props.paragraph2
@@ -1657,7 +1730,7 @@ const MaintenancePageLayout = props => jsxRuntime.jsx("div", {
1657
1730
  MaintenancePageLayout.propTypes = {};
1658
1731
  MaintenancePageLayout.displayName = 'MaintenancePageLayout';
1659
1732
 
1660
- var messages$1 = reactIntl.defineMessages({
1733
+ var messages$2 = reactIntl.defineMessages({
1661
1734
  title: {
1662
1735
  id: 'PageNotFound.title',
1663
1736
  defaultMessage: 'We could not find what you are looking for'
@@ -1668,8 +1741,8 @@ var messages$1 = reactIntl.defineMessages({
1668
1741
  }
1669
1742
  });
1670
1743
 
1671
- function ownKeys$1(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; }
1672
- function _objectSpread$1(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$1(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$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1744
+ 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; }
1745
+ 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; }
1673
1746
  const getLink = msg => jsxRuntime.jsx("a", {
1674
1747
  href: constants.SUPPORT_PORTAL_URL,
1675
1748
  target: "_blank",
@@ -1678,11 +1751,13 @@ const getLink = msg => jsxRuntime.jsx("a", {
1678
1751
  });
1679
1752
  const PageNotFound = () => {
1680
1753
  const intl = reactIntl.useIntl();
1754
+ const _useTheme = designSystem.useTheme(),
1755
+ themedValue = _useTheme.themedValue;
1681
1756
  return jsxRuntime.jsx(MaintenancePageLayout, {
1682
- imageSrc: PageNotFoundSVG__default["default"],
1683
- title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages$1.title)),
1684
- label: intl.formatMessage(messages$1.title),
1685
- paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1(_objectSpread$1({}, messages$1.paragraph1), {}, {
1757
+ imageSrc: themedValue(PageNotFoundSVG__default["default"], PageNotFoundSVGRebranding__default["default"]),
1758
+ title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages$2.title)),
1759
+ label: intl.formatMessage(messages$2.title),
1760
+ paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2(_objectSpread$2({}, messages$2.paragraph1), {}, {
1686
1761
  values: {
1687
1762
  a: getLink
1688
1763
  }
@@ -1691,7 +1766,7 @@ const PageNotFound = () => {
1691
1766
  };
1692
1767
  PageNotFound.displayName = 'PageNotFound';
1693
1768
 
1694
- var messages = reactIntl.defineMessages({
1769
+ var messages$1 = reactIntl.defineMessages({
1695
1770
  title: {
1696
1771
  id: 'PageUnauthorized.title',
1697
1772
  defaultMessage: 'We could not find what you are looking for'
@@ -1706,8 +1781,8 @@ var messages = reactIntl.defineMessages({
1706
1781
  }
1707
1782
  });
1708
1783
 
1709
- function ownKeys(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; }
1710
- function _objectSpread(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(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(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1784
+ function ownKeys$1(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; }
1785
+ function _objectSpread$1(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$1(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$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1711
1786
  const getSupportUrlLink = msg => jsxRuntime.jsx("a", {
1712
1787
  href: constants.SUPPORT_PORTAL_URL,
1713
1788
  target: "_blank",
@@ -1716,12 +1791,14 @@ const getSupportUrlLink = msg => jsxRuntime.jsx("a", {
1716
1791
  });
1717
1792
  const PageUnauthorized = () => {
1718
1793
  const intl = reactIntl.useIntl();
1794
+ const _useTheme = designSystem.useTheme(),
1795
+ themedValue = _useTheme.themedValue;
1719
1796
  return jsxRuntime.jsx(MaintenancePageLayout, {
1720
- imageSrc: FailedAuthorizationSVG__default["default"],
1721
- title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread({}, messages.title)),
1722
- label: intl.formatMessage(messages.title),
1723
- paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread({}, messages.paragraph1)),
1724
- paragraph2: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread(_objectSpread({}, messages.paragraph2), {}, {
1797
+ imageSrc: themedValue(FailedAuthorizationSVG__default["default"], FailedAuthorizationSVGRebranding__default["default"]),
1798
+ title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages$1.title)),
1799
+ label: intl.formatMessage(messages$1.title),
1800
+ paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages$1.paragraph1)),
1801
+ paragraph2: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1(_objectSpread$1({}, messages$1.paragraph2), {}, {
1725
1802
  values: {
1726
1803
  a: getSupportUrlLink
1727
1804
  }
@@ -1820,13 +1897,13 @@ const defaultProps$1 = {
1820
1897
  };
1821
1898
  PageContentWide.defaultProps = defaultProps$1;
1822
1899
 
1823
- var _ref$1 = {
1900
+ var _ref$2 = {
1824
1901
  name: "1d3w5wq",
1825
1902
  styles: "width:100%"
1826
1903
  } ;
1827
1904
  function PageContentFull(props) {
1828
1905
  return jsxRuntime.jsx("div", {
1829
- css: _ref$1,
1906
+ css: _ref$2,
1830
1907
  children: jsxRuntime.jsx("section", {
1831
1908
  children: props.children
1832
1909
  })
@@ -1871,7 +1948,7 @@ function Drawer(props) {
1871
1948
  children: props.subtitle
1872
1949
  })
1873
1950
  }), props.onClose && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
1874
- label: intl.formatMessage(messages$4.close),
1951
+ label: intl.formatMessage(messages$5.close),
1875
1952
  onClick: props.onClose,
1876
1953
  icon: jsxRuntime.jsx(LargeIconWrapper, {
1877
1954
  children: jsxRuntime.jsx(icons.CloseIcon, {})
@@ -1912,6 +1989,78 @@ Drawer.FormSecondaryButton = FormSecondaryButton;
1912
1989
  // The Intl messages can be used for button labels.
1913
1990
  Drawer.Intl = i18n.sharedMessages;
1914
1991
 
1992
+ var messages = reactIntl.defineMessages({
1993
+ ProjectProduction: {
1994
+ id: 'ProjectStamp.production',
1995
+ defaultMessage: 'Production'
1996
+ },
1997
+ ProjectSuspended: {
1998
+ id: 'ProjectStamp.suspended',
1999
+ defaultMessage: 'Suspended'
2000
+ },
2001
+ ProjectExpired: {
2002
+ id: 'ProjectStamp.expired',
2003
+ defaultMessage: 'Trial expired'
2004
+ },
2005
+ ProjectWillExpire: {
2006
+ id: 'ProjectStamp.willExpire',
2007
+ defaultMessage: '{daysLeft, select, 0 {Trial ends today} 1 {Trial ends in 1 day} other {Trial ends in {daysLeft} days}}'
2008
+ }
2009
+ });
2010
+
2011
+ const _excluded = ["values"];
2012
+ function ownKeys(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; }
2013
+ function _objectSpread(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(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(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2014
+ function CustomStamp(props) {
2015
+ const intl = reactIntl.useIntl();
2016
+ const _props$label = props.label,
2017
+ values = _valuesInstanceProperty__default["default"](_props$label),
2018
+ message = _objectWithoutProperties(_props$label, _excluded);
2019
+ return jsxRuntime.jsx(Stamp__default["default"], {
2020
+ tone: props.tone,
2021
+ isCondensed: true,
2022
+ label: intl.formatMessage(message, values || {}),
2023
+ icon: props.icon
2024
+ });
2025
+ }
2026
+ CustomStamp.propTypes = {};
2027
+ var _ref$1 = {
2028
+ name: "ph6b5m",
2029
+ styles: "height:18px;svg{height:18px;width:12px;}"
2030
+ } ;
2031
+ const IsProduction = () => jsxRuntime.jsx(CustomStamp, {
2032
+ tone: "positive",
2033
+ label: messages.ProjectProduction,
2034
+ icon: jsxRuntime.jsx("div", {
2035
+ css: _ref$1,
2036
+ children: jsxRuntime.jsx(icons.DotIcon, {
2037
+ color: "primary"
2038
+ })
2039
+ })
2040
+ });
2041
+ const IsSuspended = () => jsxRuntime.jsx(CustomStamp, {
2042
+ tone: "critical",
2043
+ label: messages.ProjectSuspended
2044
+ });
2045
+ const IsExpired = () => jsxRuntime.jsx(CustomStamp, {
2046
+ tone: "critical",
2047
+ label: messages.ProjectExpired
2048
+ });
2049
+ const WillExpire = props => jsxRuntime.jsx(CustomStamp, {
2050
+ tone: "information",
2051
+ label: _objectSpread(_objectSpread({}, messages.ProjectWillExpire), {}, {
2052
+ values: {
2053
+ daysLeft: props.daysLeft
2054
+ }
2055
+ })
2056
+ });
2057
+ const ProjectStamp = {
2058
+ IsProduction,
2059
+ IsSuspended,
2060
+ IsExpired,
2061
+ WillExpire
2062
+ };
2063
+
1915
2064
  const useObserverElementDimensions = element => {
1916
2065
  const _useState = react$1.useState({
1917
2066
  height: 0,
@@ -2048,6 +2197,7 @@ exports.PageContentWide = PageContentWide;
2048
2197
  exports.PageNotFound = PageNotFound;
2049
2198
  exports.PageUnauthorized = PageUnauthorized;
2050
2199
  exports.PortalsContainer = PortalsContainer;
2200
+ exports.ProjectStamp = ProjectStamp;
2051
2201
  exports.PublicPageLayout = PublicPageLayout;
2052
2202
  exports.TabHeader = TabHeader;
2053
2203
  exports.TabularDetailPage = TabularDetailPage;