@atlaskit/page-layout 3.4.3 → 3.4.5

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 3.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#116999](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116999)
8
+ [`797e07674ed7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/797e07674ed7c) -
9
+ Remove it has been rolled out platform.remove-newline-in-style-tag-in-platform-page-layout_7gts1
10
+
11
+ ## 3.4.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [`4709c6e8fcd8a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4709c6e8fcd8a) -
16
+ Bump version to remove extra html comment in style tag in React SSR
17
+
3
18
  ## 3.4.3
4
19
 
5
20
  ### Patch Changes
@@ -11,9 +11,24 @@ var _default = exports.default = function _default(_ref) {
11
11
  var variableName = _ref.variableName,
12
12
  value = _ref.value,
13
13
  mobileValue = _ref.mobileValue;
14
+ /**
15
+ * Note don't put multiple variables in multiple lines. eg
16
+ * <style>
17
+ * {css1}
18
+ * {css2}
19
+ * </style>
20
+ *
21
+ * React will insert an empty HTML comment in between the text in SSR.
22
+ * This is not a valid tag and will break the page.
23
+ * <style>foo<!-- -->bar</style>
24
+ */
25
+ var style = ":root{--".concat(variableName, ":").concat(value, "px;}");
26
+ if (mobileValue) {
27
+ style += " ".concat(_responsive.UNSAFE_media.below.sm, " { :root{--").concat(variableName, ":").concat(mobileValue, "px;} }");
28
+ }
14
29
  return (
15
30
  /*#__PURE__*/
16
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Ignored via go/DSP-18766
17
- _react.default.createElement("style", null, ":root{--".concat(variableName, ":").concat(value, "px;}"), mobileValue && "".concat(_responsive.UNSAFE_media.below.sm, " { :root{--").concat(variableName, ":").concat(mobileValue, "px;} }"))
32
+ _react.default.createElement("style", null, style)
18
33
  );
19
34
  };
@@ -4,7 +4,25 @@ export default (({
4
4
  variableName,
5
5
  value,
6
6
  mobileValue
7
- }) =>
8
- /*#__PURE__*/
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Ignored via go/DSP-18766
10
- React.createElement("style", null, `:root{--${variableName}:${value}px;}`, mobileValue && `${UNSAFE_media.below.sm} { :root{--${variableName}:${mobileValue}px;} }`));
7
+ }) => {
8
+ /**
9
+ * Note don't put multiple variables in multiple lines. eg
10
+ * <style>
11
+ * {css1}
12
+ * {css2}
13
+ * </style>
14
+ *
15
+ * React will insert an empty HTML comment in between the text in SSR.
16
+ * This is not a valid tag and will break the page.
17
+ * <style>foo<!-- -->bar</style>
18
+ */
19
+ let style = `:root{--${variableName}:${value}px;}`;
20
+ if (mobileValue) {
21
+ style += ` ${UNSAFE_media.below.sm} { :root{--${variableName}:${mobileValue}px;} }`;
22
+ }
23
+ return (
24
+ /*#__PURE__*/
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Ignored via go/DSP-18766
26
+ React.createElement("style", null, style)
27
+ );
28
+ });
@@ -4,9 +4,24 @@ export default (function (_ref) {
4
4
  var variableName = _ref.variableName,
5
5
  value = _ref.value,
6
6
  mobileValue = _ref.mobileValue;
7
+ /**
8
+ * Note don't put multiple variables in multiple lines. eg
9
+ * <style>
10
+ * {css1}
11
+ * {css2}
12
+ * </style>
13
+ *
14
+ * React will insert an empty HTML comment in between the text in SSR.
15
+ * This is not a valid tag and will break the page.
16
+ * <style>foo<!-- -->bar</style>
17
+ */
18
+ var style = ":root{--".concat(variableName, ":").concat(value, "px;}");
19
+ if (mobileValue) {
20
+ style += " ".concat(UNSAFE_media.below.sm, " { :root{--").concat(variableName, ":").concat(mobileValue, "px;} }");
21
+ }
7
22
  return (
8
23
  /*#__PURE__*/
9
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Ignored via go/DSP-18766
10
- React.createElement("style", null, ":root{--".concat(variableName, ":").concat(value, "px;}"), mobileValue && "".concat(UNSAFE_media.below.sm, " { :root{--").concat(variableName, ":").concat(mobileValue, "px;} }"))
25
+ React.createElement("style", null, style)
11
26
  );
12
27
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "3.4.3",
3
+ "version": "3.4.5",
4
4
  "description": "A collection of components which let you compose an application's page layout.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,18 +61,18 @@
61
61
  "@af/integration-testing": "*",
62
62
  "@atlaskit/atlassian-navigation": "^4.2.0",
63
63
  "@atlaskit/atlassian-notifications": "^0.4.0",
64
- "@atlaskit/drawer": "^7.12.0",
64
+ "@atlaskit/drawer": "^7.13.0",
65
65
  "@atlaskit/logo": "^14.1.0",
66
- "@atlaskit/menu": "^2.6.0",
66
+ "@atlaskit/menu": "^2.7.0",
67
67
  "@atlaskit/notification-indicator": "^9.2.0",
68
68
  "@atlaskit/notification-log-client": "^6.1.0",
69
- "@atlaskit/popup": "^1.19.0",
69
+ "@atlaskit/popup": "^1.20.0",
70
70
  "@atlaskit/side-navigation": "^3.3.0",
71
71
  "@atlaskit/ssr": "*",
72
72
  "@atlaskit/toggle": "^13.2.0",
73
73
  "@atlaskit/tooltip": "^18.5.0",
74
74
  "@atlaskit/visual-regression": "*",
75
- "@testing-library/dom": "^8.17.1",
75
+ "@testing-library/dom": "^10.1.0",
76
76
  "@testing-library/react": "^12.1.5",
77
77
  "@testing-library/react-hooks": "^8.0.1",
78
78
  "@types/raf-schd": "^4.0.1",