cozy-bar 35.4.6 → 35.4.8

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.
@@ -148,7 +148,7 @@ var BarComponent = function BarComponent(_ref2) {
148
148
  barLeft: barLeft,
149
149
  barCenter: barCenter,
150
150
  barRight: barRight
151
- })))), !options.isPublic && /*#__PURE__*/_react.default.createElement(_PlatformBanners.PlatformBanners, null));
151
+ })))), !options.isPublic && /*#__PURE__*/_react.default.createElement(_CozyTheme.default, cozyThemeProps, /*#__PURE__*/_react.default.createElement(_PlatformBanners.PlatformBanners, null)));
152
152
  };
153
153
 
154
154
  exports.BarComponent = BarComponent;
@@ -9,12 +9,18 @@ exports.PlatformBannersPortal = void 0;
9
9
 
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
 
12
- var _react = require("react");
12
+ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _reactDom = require("react-dom");
15
15
 
16
+ var _CozyTheme = require("cozy-ui/transpiled/react/providers/CozyTheme");
17
+
16
18
  var _dom = require("../../dom");
17
19
 
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
18
24
  var CONTAINER_ID = 'cozy-platform-banners';
19
25
  var ACTIVE_CLASS = 'has-platform-banners';
20
26
  /**
@@ -34,6 +40,9 @@ var PlatformBannersPortal = function PlatformBannersPortal(_ref) {
34
40
  container = _useState2[0],
35
41
  setContainer = _useState2[1];
36
42
 
43
+ var _useCozyTheme = (0, _CozyTheme.useCozyTheme)(),
44
+ type = _useCozyTheme.type;
45
+
37
46
  (0, _react.useLayoutEffect)(function () {
38
47
  var appNode = document.querySelector(_dom.APP_SELECTOR);
39
48
 
@@ -61,7 +70,9 @@ var PlatformBannersPortal = function PlatformBannersPortal(_ref) {
61
70
  };
62
71
  }, []);
63
72
  if (!container) return null;
64
- return /*#__PURE__*/(0, _reactDom.createPortal)(children, container);
73
+ return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement("div", {
74
+ className: "coz-platform-banners TwakeTheme--".concat(type)
75
+ }, children), container);
65
76
  };
66
77
 
67
78
  exports.PlatformBannersPortal = PlatformBannersPortal;
@@ -79,15 +79,19 @@
79
79
  min-height: 0;
80
80
  }
81
81
 
82
- /* Inset and stacked per the design. Fixed basis, or a tall application
83
- squashes the stack into a sliver. */
82
+ /* Fixed basis, or a tall application squashes the stack into a sliver. */
84
83
  #cozy-platform-banners {
85
84
  flex: 0 0 auto;
86
85
  min-height: auto;
86
+ }
87
+
88
+ /* Inset and stacked per the design. */
89
+ .coz-platform-banners {
87
90
  display: flex;
88
91
  flex-direction: column;
89
92
  gap: 1rem;
90
- padding: 1rem 1rem 0;
93
+ padding: 1rem;
94
+ background-color: var(--defaultBackgroundColor);
91
95
  }
92
96
 
93
97
  #cozy-platform-banners:empty {
@@ -300,15 +300,19 @@
300
300
  min-height: 0;
301
301
  }
302
302
 
303
- /* Inset and stacked per the design. Fixed basis, or a tall application
304
- squashes the stack into a sliver. */
303
+ /* Fixed basis, or a tall application squashes the stack into a sliver. */
305
304
  #cozy-platform-banners {
306
305
  flex: 0 0 auto;
307
306
  min-height: auto;
307
+ }
308
+
309
+ /* Inset and stacked per the design. */
310
+ .coz-platform-banners {
308
311
  display: flex;
309
312
  flex-direction: column;
310
313
  gap: 1rem;
311
- padding: 1rem 1rem 0;
314
+ padding: 1rem;
315
+ background-color: var(--defaultBackgroundColor);
312
316
  }
313
317
 
314
318
  #cozy-platform-banners:empty {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-bar",
3
- "version": "35.4.6",
3
+ "version": "35.4.8",
4
4
  "description": "cozy-bar.js library, a small lib provided by cozy-stack to inject the Cozy-bar component into each app",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy Cloud <contact@cozycloud.cc> (https://cozy.io/)",
@@ -75,5 +75,5 @@
75
75
  "react-router-dom": ">=6.14.2",
76
76
  "twake-i18n": ">=0.3.0"
77
77
  },
78
- "gitHead": "368b1e85eb1f6a6a0731681ef2a38a7bbc3fe779"
78
+ "gitHead": "1b5c0b7f6f75b50c086dde33674de65d859e6f05"
79
79
  }