@atlaskit/page 13.0.0 → 14.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/page
2
2
 
3
+ ## 14.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#179127](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/179127)
8
+ [`9375392f70d77`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9375392f70d77) -
9
+ Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
10
+ the rest of the Atlaskit techstack, and support React 18 Streaming SSR.
11
+
12
+ Please note, in order to use this version of `@atlaskit/page`, you will need to ensure that your
13
+ bundler is configured to handle `.css` imports correctly. Most bundlers come with built-in support
14
+ for `.css` imports, so you may not need to do anything. If you are using a different bundler,
15
+ please refer to the documentation for that bundler to understand how to handle `.css` imports.
16
+
17
+ For more information on the migration, please refer to
18
+ [RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953).
19
+
3
20
  ## 13.0.0
4
21
 
5
22
  ### Major Changes
@@ -0,0 +1,12 @@
1
+ ._16jlkb7n{flex-grow:1}
2
+ ._18u0wx3y{margin-left:calc(var(--ds-grid-spacing)/2)}
3
+ ._19pkidpf{margin-top:0}
4
+ ._1o9zidpf{flex-shrink:0}
5
+ ._1ul9hrtj{min-width:calc(99.9999%/var(--ds-columns-num) - var(--ds-grid-spacing))}
6
+ ._2hwxwx3y{margin-right:calc(var(--ds-grid-spacing)/2)}
7
+ ._i0dl1osq{flex-basis:100%}
8
+ ._i0dl1wug{flex-basis:auto}
9
+ ._otyridpf{margin-bottom:0}
10
+ ._p12f1ho1{max-width:calc(100% - var(--ds-grid-spacing))}
11
+ ._p12fpg3g{max-width:calc((99.9999%/var(--ds-columns-num))*var(--ds-column-span) - var(--ds-grid-spacing))}
12
+ ._slp31hna{word-wrap:break-word}
@@ -1,29 +1,69 @@
1
+ /* grid-column.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.default = exports.GridColumnContext = void 0;
10
+ require("./grid-column.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = require("react");
10
- var _react2 = require("@emotion/react");
11
15
  var _constants = require("./constants");
12
16
  var _gridContext = require("./grid-context");
13
- /**
14
- * @jsxRuntime classic
15
- * @jsx jsx
16
- */
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
18
  /**
19
19
  * Determines the method by which column width is calculated.
20
20
  */
21
21
  var ColumnVariant = /*#__PURE__*/function (ColumnVariant) {
22
+ /**
23
+ * Column occupies available space.
24
+ *
25
+ * Used when `medium` is 0 (the default).
26
+ */
22
27
  ColumnVariant["Auto"] = "auto";
28
+ /**
29
+ * Column occupies specified space.
30
+ *
31
+ * Used when 0 < `medium` < `columns`.
32
+ */
23
33
  ColumnVariant["Bounded"] = "bounded";
34
+ /**
35
+ * Column occupies entire row.
36
+ *
37
+ * Used when `medium` >= `columns`.
38
+ *
39
+ * This case is handled separately because of rounding.
40
+ */
24
41
  ColumnVariant["FullWidth"] = "fullWidth";
25
42
  return ColumnVariant;
26
43
  }(ColumnVariant || {});
44
+ /**
45
+ * The spacing (in `px`) between each column.
46
+ */
47
+ var varGridSpacing = '--ds-grid-spacing';
48
+
49
+ /**
50
+ * The number of columns that a `GridColumn` covers.
51
+ */
52
+ var varColumnSpan = '--ds-column-span';
53
+
54
+ /**
55
+ * IE11 and Edge both have rounding issues for flexbox which is why a width of
56
+ * 99.9999% is used. Using 100% here causes columns to wrap prematurely.
57
+ */
58
+ var singleColumnWidth = "(99.9999% / var(--ds-columns-num))";
59
+ var styles = {
60
+ gridColumn: "_19pkidpf _2hwxwx3y _otyridpf _18u0wx3y _1ul9hrtj _16jlkb7n _1o9zidpf _slp31hna"
61
+ };
62
+ var gridColumnWidthMapStyles = {
63
+ auto: "_p12f1ho1 _i0dl1wug",
64
+ bounded: "_p12fpg3g _i0dl1osq",
65
+ fullWidth: "_p12f1ho1 _i0dl1osq"
66
+ };
27
67
  var getVariant = function getVariant(_ref) {
28
68
  var medium = _ref.medium,
29
69
  columns = _ref.columns;
@@ -35,36 +75,6 @@ var getVariant = function getVariant(_ref) {
35
75
  return ColumnVariant.FullWidth;
36
76
  };
37
77
 
38
- /**
39
- * IE11 and Edge both have rounding issues for flexbox which is why a width of
40
- * 99.9999% is used. Using 100% here causes columns to wrap prematurely.
41
- */
42
- var availableWidth = '99.9999%';
43
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
- var singleColumnWidth = "(".concat(availableWidth, " / var(").concat(_constants.varColumnsNum, "))");
45
- var gridColumnStyles = (0, _react2.css)({
46
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
47
- minWidth: "calc(".concat(singleColumnWidth, " - var(").concat(_constants.varGridSpacing, "))"),
48
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
49
- margin: "0 calc(var(".concat(_constants.varGridSpacing, ") / 2)"),
50
- flexGrow: 1,
51
- flexShrink: 0,
52
- wordWrap: 'break-word'
53
- });
54
- var gridColumnWidthStyles = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ColumnVariant.Auto, (0, _react2.css)({
55
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
56
- maxWidth: "calc(100% - var(".concat(_constants.varGridSpacing, "))"),
57
- flexBasis: "auto"
58
- })), ColumnVariant.Bounded, (0, _react2.css)({
59
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
60
- maxWidth: "calc(".concat(singleColumnWidth, " * var(").concat(_constants.varColumnSpan, ") - var(").concat(_constants.varGridSpacing, "))"),
61
- flexBasis: "100%"
62
- })), ColumnVariant.FullWidth, (0, _react2.css)({
63
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
64
- maxWidth: "calc(100% - var(".concat(_constants.varGridSpacing, "))"),
65
- flexBasis: "100%"
66
- }));
67
-
68
78
  /**
69
79
  * __Grid column context__
70
80
  *
@@ -107,14 +117,12 @@ var GridColumn = function GridColumn(_ref2) {
107
117
  medium: medium,
108
118
  columns: columns
109
119
  });
110
- return (0, _react2.jsx)(GridColumnContext.Provider, {
120
+ return /*#__PURE__*/React.createElement(GridColumnContext.Provider, {
111
121
  value: contextValue
112
- }, (0, _react2.jsx)("div", {
113
- css: [gridColumnStyles, gridColumnWidthStyles[variant]]
114
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
115
- ,
116
- style: (0, _defineProperty2.default)({}, _constants.varColumnSpan, variant === ColumnVariant.Auto ? 'auto' : colSpan),
117
- "data-testid": testId
122
+ }, /*#__PURE__*/React.createElement("div", {
123
+ style: (0, _defineProperty2.default)({}, varColumnSpan, variant === ColumnVariant.Auto ? 'auto' : colSpan),
124
+ "data-testid": testId,
125
+ className: (0, _runtime.ax)([styles.gridColumn, gridColumnWidthMapStyles[variant]])
118
126
  }, children));
119
127
  };
120
128
  var _default = exports.default = GridColumn;
@@ -10,8 +10,7 @@ var _constants = require("./constants");
10
10
  var _grid = require("./grid");
11
11
  var _gridColumn = require("./grid-column");
12
12
  var _gridContext = require("./grid-context");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
14
  /**
16
15
  * __Grid__
17
16
  *
@@ -0,0 +1,16 @@
1
+ ._18u01un2{margin-left:calc(var(--ds-grid-spacing)*-1)}
2
+ ._18u01wug{margin-left:auto}
3
+ ._19bvwx3y{padding-left:calc(var(--ds-grid-spacing)/2)}
4
+ ._19pkidpf{margin-top:0}
5
+ ._1e0c1txw{display:flex}
6
+ ._1n261g80{flex-wrap:wrap}
7
+ ._2hwx1un2{margin-right:calc(var(--ds-grid-spacing)*-1)}
8
+ ._2hwx1wug{margin-right:auto}
9
+ ._4cvr1y6m{align-items:flex-start}
10
+ ._ca0qidpf{padding-top:0}
11
+ ._kqswh2mm{position:relative}
12
+ ._n3tdidpf{padding-bottom:0}
13
+ ._otyridpf{margin-bottom:0}
14
+ ._p12f1osq{max-width:100%}
15
+ ._p12fgkkb{max-width:calc(var(--ds-columns-num)*5pc)}
16
+ ._u5f3wx3y{padding-right:calc(var(--ds-grid-spacing)/2)}
package/dist/cjs/grid.js CHANGED
@@ -1,44 +1,39 @@
1
+ /* grid.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.Grid = void 0;
10
+ require("./grid.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = require("react");
10
- var _react2 = require("@emotion/react");
11
15
  var _constants = require("./constants");
12
16
  var _gridContext = require("./grid-context");
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
+ var defaultGridColumnWidth = 80;
19
+
13
20
  /**
14
- * @jsxRuntime classic
15
- * @jsx jsx
21
+ * The number of available columns in each row.
16
22
  */
23
+ var varColumnsNum = '--ds-columns-num';
17
24
 
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
-
20
- var gridStyles = (0, _react2.css)({
21
- display: 'flex',
22
- margin: '0 auto',
23
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
24
- padding: "0 calc(var(".concat(_constants.varGridSpacing, ") / 2)"),
25
- position: 'relative',
26
- alignItems: 'flex-start',
27
- flexWrap: 'wrap'
28
- });
29
- var gridLayoutStyles = {
30
- fixed: (0, _react2.css)({
31
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
- maxWidth: "calc(var(".concat(_constants.varColumnsNum, ") * ").concat(_constants.defaultGridColumnWidth, "px)")
33
- }),
34
- fluid: (0, _react2.css)({
35
- maxWidth: '100%'
36
- })
25
+ /**
26
+ * The spacing (in `px`) between each column.
27
+ */
28
+ var varGridSpacing = '--ds-grid-spacing';
29
+ var styles = {
30
+ grid: "_19pkidpf _2hwx1wug _otyridpf _18u01wug _ca0qidpf _u5f3wx3y _n3tdidpf _19bvwx3y _1e0c1txw _kqswh2mm _4cvr1y6m _1n261g80",
31
+ nestedGrid: "_19pkidpf _2hwx1un2 _otyridpf _18u01un2"
32
+ };
33
+ var gridLayoutMapStyles = {
34
+ fixed: "_p12fgkkb",
35
+ fluid: "_p12f1osq"
37
36
  };
38
- var nestedGridStyles = (0, _react2.css)({
39
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
- margin: "0 calc(-1 * var(".concat(_constants.varGridSpacing, "))")
41
- });
42
37
 
43
38
  /**
44
39
  * __Grid__
@@ -59,11 +54,9 @@ var Grid = exports.Grid = function Grid(_ref) {
59
54
  isNested = _useContext.isNested,
60
55
  columns = _useContext.columns,
61
56
  spacing = _useContext.spacing;
62
- return (0, _react2.jsx)("div", {
63
- css: [gridStyles, gridLayoutStyles[layout], isNested && nestedGridStyles]
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
65
- ,
66
- style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.varColumnsNum, columns), _constants.varGridSpacing, "".concat(_constants.spacingMapping[spacing], "px")),
67
- "data-testid": testId
57
+ return /*#__PURE__*/React.createElement("div", {
58
+ style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, varColumnsNum, columns), varGridSpacing, "".concat(_constants.spacingMapping[spacing], "px")),
59
+ "data-testid": testId,
60
+ className: (0, _runtime.ax)([styles.grid, gridLayoutMapStyles[layout], isNested && styles.nestedGrid])
68
61
  }, children);
69
62
  };
@@ -0,0 +1,15 @@
1
+
2
+ ._v564evma{transition:height .25s ease-in-out}._16jlkb7n{flex-grow:1}
3
+ ._1bsb1osq{width:100%}
4
+ ._1e0c1txw{display:flex}
5
+ ._1o9zidpf{flex-shrink:0}
6
+ ._1o9zkb7n{flex-shrink:1}
7
+ ._1pby11wp{z-index:3}
8
+ ._1pbycs5v{z-index:2}
9
+ ._1pbykb7n{z-index:1}
10
+ ._1tke1osq{min-height:100%}
11
+ ._1ul9idpf{min-width:0}
12
+ ._2lx21bp4{flex-direction:column}
13
+ ._i0dl1wug{flex-basis:auto}
14
+ ._kqsw1n9t{position:fixed}
15
+ ._kqswh2mm{position:relative}
package/dist/cjs/page.js CHANGED
@@ -1,48 +1,24 @@
1
+ /* page.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = void 0;
7
- var _react = require("@emotion/react");
9
+ require("./page.compiled.css");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _runtime = require("@compiled/react/runtime");
8
12
  var _constants = require("./constants");
9
- /**
10
- * @jsxRuntime classic
11
- * @jsx jsx
12
- */
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
-
15
- var bannerStyles = (0, _react.css)({
16
- width: '100%',
17
- position: 'fixed'
18
- });
19
- var bannerContainerStyles = (0, _react.css)({
20
- width: '100%',
21
- position: 'relative',
22
- zIndex: 3,
23
- flex: '1 0 auto',
24
- transition: 'height 0.25s ease-in-out'
25
- });
26
- var pageContentStyles = (0, _react.css)({
27
- minWidth: 0,
28
- position: 'relative',
29
- zIndex: 1,
30
- flex: '1 1 auto'
31
- });
32
- var wrapperStyles = (0, _react.css)({
33
- display: 'flex',
34
- width: '100%',
35
- minHeight: '100%',
36
- flexDirection: 'column'
37
- });
38
- var mainContainerStyles = (0, _react.css)({
39
- display: 'flex',
40
- flex: '1 1 auto'
41
- });
42
- var navigationStyles = (0, _react.css)({
43
- position: 'relative',
44
- zIndex: 2
45
- });
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
+ var styles = {
15
+ banner: "_1bsb1osq _kqsw1n9t",
16
+ bannerContainer: "_16jlkb7n _1o9zidpf _i0dl1wug _v564evma _1bsb1osq _kqswh2mm _1pby11wp",
17
+ pageContent: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _kqswh2mm _1pbykb7n",
18
+ wrapper: "_1e0c1txw _1bsb1osq _1tke1osq _2lx21bp4",
19
+ mainContainer: "_16jlkb7n _1o9zkb7n _i0dl1wug _1e0c1txw",
20
+ navigation: "_kqswh2mm _1pbycs5v"
21
+ };
46
22
 
47
23
  /**
48
24
  * __Page__
@@ -63,24 +39,24 @@ var Page = function Page(_ref) {
63
39
  navigation = _ref.navigation,
64
40
  children = _ref.children,
65
41
  testId = _ref.testId;
66
- return (0, _react.jsx)("div", {
67
- css: wrapperStyles,
68
- "data-testid": testId
69
- }, banner ? (0, _react.jsx)("div", {
70
- css: bannerContainerStyles,
42
+ return /*#__PURE__*/React.createElement("div", {
43
+ "data-testid": testId,
44
+ className: (0, _runtime.ax)([styles.wrapper])
45
+ }, banner ? /*#__PURE__*/React.createElement("div", {
71
46
  style: {
72
47
  height: isBannerOpen ? "".concat(bannerHeight, "px") : '0'
73
48
  },
74
49
  "aria-hidden": !isBannerOpen,
75
- "data-testid": testId ? "".concat(testId, "--banner-container") : undefined
76
- }, (0, _react.jsx)("div", {
77
- css: bannerStyles
78
- }, banner)) : null, (0, _react.jsx)("div", {
79
- css: mainContainerStyles
80
- }, (0, _react.jsx)("div", {
81
- css: navigationStyles
82
- }, navigation), (0, _react.jsx)("div", {
83
- css: pageContentStyles
50
+ "data-testid": testId ? "".concat(testId, "--banner-container") : undefined,
51
+ className: (0, _runtime.ax)([styles.bannerContainer])
52
+ }, /*#__PURE__*/React.createElement("div", {
53
+ className: (0, _runtime.ax)([styles.banner])
54
+ }, banner)) : null, /*#__PURE__*/React.createElement("div", {
55
+ className: (0, _runtime.ax)([styles.mainContainer])
56
+ }, /*#__PURE__*/React.createElement("div", {
57
+ className: (0, _runtime.ax)([styles.navigation])
58
+ }, navigation), /*#__PURE__*/React.createElement("div", {
59
+ className: (0, _runtime.ax)([styles.pageContent])
84
60
  }, children)));
85
61
  };
86
62
  var _default = exports.default = Page;
@@ -0,0 +1,12 @@
1
+ ._16jlkb7n{flex-grow:1}
2
+ ._18u0wx3y{margin-left:calc(var(--ds-grid-spacing)/2)}
3
+ ._19pkidpf{margin-top:0}
4
+ ._1o9zidpf{flex-shrink:0}
5
+ ._1ul9hrtj{min-width:calc(99.9999%/var(--ds-columns-num) - var(--ds-grid-spacing))}
6
+ ._2hwxwx3y{margin-right:calc(var(--ds-grid-spacing)/2)}
7
+ ._i0dl1osq{flex-basis:100%}
8
+ ._i0dl1wug{flex-basis:auto}
9
+ ._otyridpf{margin-bottom:0}
10
+ ._p12f1ho1{max-width:calc(100% - var(--ds-grid-spacing))}
11
+ ._p12fpg3g{max-width:calc((99.9999%/var(--ds-columns-num))*var(--ds-column-span) - var(--ds-grid-spacing))}
12
+ ._slp31hna{word-wrap:break-word}
@@ -1,22 +1,59 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* grid-column.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./grid-column.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { createContext, useContext, useMemo } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
- import { defaultMedium, varColumnsNum, varColumnSpan, varGridSpacing } from './constants';
6
+ import { defaultMedium } from './constants';
10
7
  import { GridContext } from './grid-context';
11
8
  /**
12
9
  * Determines the method by which column width is calculated.
13
10
  */
14
11
  var ColumnVariant = /*#__PURE__*/function (ColumnVariant) {
12
+ /**
13
+ * Column occupies available space.
14
+ *
15
+ * Used when `medium` is 0 (the default).
16
+ */
15
17
  ColumnVariant["Auto"] = "auto";
18
+ /**
19
+ * Column occupies specified space.
20
+ *
21
+ * Used when 0 < `medium` < `columns`.
22
+ */
16
23
  ColumnVariant["Bounded"] = "bounded";
24
+ /**
25
+ * Column occupies entire row.
26
+ *
27
+ * Used when `medium` >= `columns`.
28
+ *
29
+ * This case is handled separately because of rounding.
30
+ */
17
31
  ColumnVariant["FullWidth"] = "fullWidth";
18
32
  return ColumnVariant;
19
33
  }(ColumnVariant || {});
34
+ /**
35
+ * The spacing (in `px`) between each column.
36
+ */
37
+ const varGridSpacing = '--ds-grid-spacing';
38
+
39
+ /**
40
+ * The number of columns that a `GridColumn` covers.
41
+ */
42
+ const varColumnSpan = '--ds-column-span';
43
+
44
+ /**
45
+ * IE11 and Edge both have rounding issues for flexbox which is why a width of
46
+ * 99.9999% is used. Using 100% here causes columns to wrap prematurely.
47
+ */
48
+ const singleColumnWidth = `(99.9999% / var(--ds-columns-num))`;
49
+ const styles = {
50
+ gridColumn: "_19pkidpf _2hwxwx3y _otyridpf _18u0wx3y _1ul9hrtj _16jlkb7n _1o9zidpf _slp31hna"
51
+ };
52
+ const gridColumnWidthMapStyles = {
53
+ auto: "_p12f1ho1 _i0dl1wug",
54
+ bounded: "_p12fpg3g _i0dl1osq",
55
+ fullWidth: "_p12f1ho1 _i0dl1osq"
56
+ };
20
57
  const getVariant = ({
21
58
  medium,
22
59
  columns
@@ -29,40 +66,6 @@ const getVariant = ({
29
66
  return ColumnVariant.FullWidth;
30
67
  };
31
68
 
32
- /**
33
- * IE11 and Edge both have rounding issues for flexbox which is why a width of
34
- * 99.9999% is used. Using 100% here causes columns to wrap prematurely.
35
- */
36
- const availableWidth = '99.9999%';
37
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
- const singleColumnWidth = `(${availableWidth} / var(${varColumnsNum}))`;
39
- const gridColumnStyles = css({
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
- minWidth: `calc(${singleColumnWidth} - var(${varGridSpacing}))`,
42
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
43
- margin: `0 calc(var(${varGridSpacing}) / 2)`,
44
- flexGrow: 1,
45
- flexShrink: 0,
46
- wordWrap: 'break-word'
47
- });
48
- const gridColumnWidthStyles = {
49
- [ColumnVariant.Auto]: css({
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
51
- maxWidth: `calc(100% - var(${varGridSpacing}))`,
52
- flexBasis: `auto`
53
- }),
54
- [ColumnVariant.Bounded]: css({
55
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
56
- maxWidth: `calc(${singleColumnWidth} * var(${varColumnSpan}) - var(${varGridSpacing}))`,
57
- flexBasis: `100%`
58
- }),
59
- [ColumnVariant.FullWidth]: css({
60
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
61
- maxWidth: `calc(100% - var(${varGridSpacing}))`,
62
- flexBasis: `100%`
63
- })
64
- };
65
-
66
69
  /**
67
70
  * __Grid column context__
68
71
  *
@@ -104,21 +107,18 @@ const GridColumn = ({
104
107
  medium,
105
108
  columns
106
109
  });
107
- return jsx(GridColumnContext.Provider, {
110
+ return /*#__PURE__*/React.createElement(GridColumnContext.Provider, {
108
111
  value: contextValue
109
- }, jsx("div", {
110
- css: [gridColumnStyles, gridColumnWidthStyles[variant]]
111
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
112
- ,
112
+ }, /*#__PURE__*/React.createElement("div", {
113
113
  style: {
114
114
  /**
115
115
  * The 'auto' value here isn't actually consumed anywhere and is
116
116
  * just to better reflect what is happening when inspecting CSS.
117
117
  */
118
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
119
118
  [varColumnSpan]: variant === ColumnVariant.Auto ? 'auto' : colSpan
120
119
  },
121
- "data-testid": testId
120
+ "data-testid": testId,
121
+ className: ax([styles.gridColumn, gridColumnWidthMapStyles[variant]])
122
122
  }, children));
123
123
  };
124
124
  export default GridColumn;
@@ -0,0 +1,16 @@
1
+ ._18u01un2{margin-left:calc(var(--ds-grid-spacing)*-1)}
2
+ ._18u01wug{margin-left:auto}
3
+ ._19bvwx3y{padding-left:calc(var(--ds-grid-spacing)/2)}
4
+ ._19pkidpf{margin-top:0}
5
+ ._1e0c1txw{display:flex}
6
+ ._1n261g80{flex-wrap:wrap}
7
+ ._2hwx1un2{margin-right:calc(var(--ds-grid-spacing)*-1)}
8
+ ._2hwx1wug{margin-right:auto}
9
+ ._4cvr1y6m{align-items:flex-start}
10
+ ._ca0qidpf{padding-top:0}
11
+ ._kqswh2mm{position:relative}
12
+ ._n3tdidpf{padding-bottom:0}
13
+ ._otyridpf{margin-bottom:0}
14
+ ._p12f1osq{max-width:100%}
15
+ ._p12fgkkb{max-width:calc(var(--ds-columns-num)*5pc)}
16
+ ._u5f3wx3y{padding-right:calc(var(--ds-grid-spacing)/2)}
@@ -1,35 +1,29 @@
1
+ /* grid.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./grid.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { useContext } from 'react';
6
+ import { defaultLayout, spacingMapping } from './constants';
7
+ import { GridContext } from './grid-context';
8
+ const defaultGridColumnWidth = 80;
9
+
1
10
  /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
11
+ * The number of available columns in each row.
4
12
  */
5
- import { useContext } from 'react';
13
+ const varColumnsNum = '--ds-columns-num';
6
14
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
- import { defaultGridColumnWidth, defaultLayout, spacingMapping, varColumnsNum, varGridSpacing } from './constants';
10
- import { GridContext } from './grid-context';
11
- const gridStyles = css({
12
- display: 'flex',
13
- margin: '0 auto',
14
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
- padding: `0 calc(var(${varGridSpacing}) / 2)`,
16
- position: 'relative',
17
- alignItems: 'flex-start',
18
- flexWrap: 'wrap'
19
- });
20
- const gridLayoutStyles = {
21
- fixed: css({
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
23
- maxWidth: `calc(var(${varColumnsNum}) * ${defaultGridColumnWidth}px)`
24
- }),
25
- fluid: css({
26
- maxWidth: '100%'
27
- })
15
+ /**
16
+ * The spacing (in `px`) between each column.
17
+ */
18
+ const varGridSpacing = '--ds-grid-spacing';
19
+ const styles = {
20
+ grid: "_19pkidpf _2hwx1wug _otyridpf _18u01wug _ca0qidpf _u5f3wx3y _n3tdidpf _19bvwx3y _1e0c1txw _kqswh2mm _4cvr1y6m _1n261g80",
21
+ nestedGrid: "_19pkidpf _2hwx1un2 _otyridpf _18u01un2"
22
+ };
23
+ const gridLayoutMapStyles = {
24
+ fixed: "_p12fgkkb",
25
+ fluid: "_p12f1osq"
28
26
  };
29
- const nestedGridStyles = css({
30
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
31
- margin: `0 calc(-1 * var(${varGridSpacing}))`
32
- });
33
27
 
34
28
  /**
35
29
  * __Grid__
@@ -51,16 +45,13 @@ export const Grid = ({
51
45
  columns,
52
46
  spacing
53
47
  } = useContext(GridContext);
54
- return jsx("div", {
55
- css: [gridStyles, gridLayoutStyles[layout], isNested && nestedGridStyles]
56
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
57
- ,
48
+ return /*#__PURE__*/React.createElement("div", {
58
49
  style: {
59
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
60
50
  [varColumnsNum]: columns,
61
51
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
62
52
  [varGridSpacing]: `${spacingMapping[spacing]}px`
63
53
  },
64
- "data-testid": testId
54
+ "data-testid": testId,
55
+ className: ax([styles.grid, gridLayoutMapStyles[layout], isNested && styles.nestedGrid])
65
56
  }, children);
66
57
  };
@@ -0,0 +1,15 @@
1
+
2
+ ._v564evma{transition:height .25s ease-in-out}._16jlkb7n{flex-grow:1}
3
+ ._1bsb1osq{width:100%}
4
+ ._1e0c1txw{display:flex}
5
+ ._1o9zidpf{flex-shrink:0}
6
+ ._1o9zkb7n{flex-shrink:1}
7
+ ._1pby11wp{z-index:3}
8
+ ._1pbycs5v{z-index:2}
9
+ ._1pbykb7n{z-index:1}
10
+ ._1tke1osq{min-height:100%}
11
+ ._1ul9idpf{min-width:0}
12
+ ._2lx21bp4{flex-direction:column}
13
+ ._i0dl1wug{flex-basis:auto}
14
+ ._kqsw1n9t{position:fixed}
15
+ ._kqswh2mm{position:relative}
@@ -1,41 +1,16 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
1
+ /* page.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./page.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
7
5
  import { defaultBannerHeight } from './constants';
8
- const bannerStyles = css({
9
- width: '100%',
10
- position: 'fixed'
11
- });
12
- const bannerContainerStyles = css({
13
- width: '100%',
14
- position: 'relative',
15
- zIndex: 3,
16
- flex: '1 0 auto',
17
- transition: 'height 0.25s ease-in-out'
18
- });
19
- const pageContentStyles = css({
20
- minWidth: 0,
21
- position: 'relative',
22
- zIndex: 1,
23
- flex: '1 1 auto'
24
- });
25
- const wrapperStyles = css({
26
- display: 'flex',
27
- width: '100%',
28
- minHeight: '100%',
29
- flexDirection: 'column'
30
- });
31
- const mainContainerStyles = css({
32
- display: 'flex',
33
- flex: '1 1 auto'
34
- });
35
- const navigationStyles = css({
36
- position: 'relative',
37
- zIndex: 2
38
- });
6
+ const styles = {
7
+ banner: "_1bsb1osq _kqsw1n9t",
8
+ bannerContainer: "_16jlkb7n _1o9zidpf _i0dl1wug _v564evma _1bsb1osq _kqswh2mm _1pby11wp",
9
+ pageContent: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _kqswh2mm _1pbykb7n",
10
+ wrapper: "_1e0c1txw _1bsb1osq _1tke1osq _2lx21bp4",
11
+ mainContainer: "_16jlkb7n _1o9zkb7n _i0dl1wug _1e0c1txw",
12
+ navigation: "_kqswh2mm _1pbycs5v"
13
+ };
39
14
 
40
15
  /**
41
16
  * __Page__
@@ -55,24 +30,24 @@ const Page = ({
55
30
  children,
56
31
  testId
57
32
  }) => {
58
- return jsx("div", {
59
- css: wrapperStyles,
60
- "data-testid": testId
61
- }, banner ? jsx("div", {
62
- css: bannerContainerStyles,
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ "data-testid": testId,
35
+ className: ax([styles.wrapper])
36
+ }, banner ? /*#__PURE__*/React.createElement("div", {
63
37
  style: {
64
38
  height: isBannerOpen ? `${bannerHeight}px` : '0'
65
39
  },
66
40
  "aria-hidden": !isBannerOpen,
67
- "data-testid": testId ? `${testId}--banner-container` : undefined
68
- }, jsx("div", {
69
- css: bannerStyles
70
- }, banner)) : null, jsx("div", {
71
- css: mainContainerStyles
72
- }, jsx("div", {
73
- css: navigationStyles
74
- }, navigation), jsx("div", {
75
- css: pageContentStyles
41
+ "data-testid": testId ? `${testId}--banner-container` : undefined,
42
+ className: ax([styles.bannerContainer])
43
+ }, /*#__PURE__*/React.createElement("div", {
44
+ className: ax([styles.banner])
45
+ }, banner)) : null, /*#__PURE__*/React.createElement("div", {
46
+ className: ax([styles.mainContainer])
47
+ }, /*#__PURE__*/React.createElement("div", {
48
+ className: ax([styles.navigation])
49
+ }, navigation), /*#__PURE__*/React.createElement("div", {
50
+ className: ax([styles.pageContent])
76
51
  }, children)));
77
52
  };
78
53
  export default Page;
@@ -0,0 +1,12 @@
1
+ ._16jlkb7n{flex-grow:1}
2
+ ._18u0wx3y{margin-left:calc(var(--ds-grid-spacing)/2)}
3
+ ._19pkidpf{margin-top:0}
4
+ ._1o9zidpf{flex-shrink:0}
5
+ ._1ul9hrtj{min-width:calc(99.9999%/var(--ds-columns-num) - var(--ds-grid-spacing))}
6
+ ._2hwxwx3y{margin-right:calc(var(--ds-grid-spacing)/2)}
7
+ ._i0dl1osq{flex-basis:100%}
8
+ ._i0dl1wug{flex-basis:auto}
9
+ ._otyridpf{margin-bottom:0}
10
+ ._p12f1ho1{max-width:calc(100% - var(--ds-grid-spacing))}
11
+ ._p12fpg3g{max-width:calc((99.9999%/var(--ds-columns-num))*var(--ds-column-span) - var(--ds-grid-spacing))}
12
+ ._slp31hna{word-wrap:break-word}
@@ -1,23 +1,60 @@
1
+ /* grid-column.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
3
+ import "./grid-column.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
6
  import { createContext, useContext, useMemo } from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { css, jsx } from '@emotion/react';
10
- import { defaultMedium, varColumnsNum, varColumnSpan, varGridSpacing } from './constants';
7
+ import { defaultMedium } from './constants';
11
8
  import { GridContext } from './grid-context';
12
9
  /**
13
10
  * Determines the method by which column width is calculated.
14
11
  */
15
12
  var ColumnVariant = /*#__PURE__*/function (ColumnVariant) {
13
+ /**
14
+ * Column occupies available space.
15
+ *
16
+ * Used when `medium` is 0 (the default).
17
+ */
16
18
  ColumnVariant["Auto"] = "auto";
19
+ /**
20
+ * Column occupies specified space.
21
+ *
22
+ * Used when 0 < `medium` < `columns`.
23
+ */
17
24
  ColumnVariant["Bounded"] = "bounded";
25
+ /**
26
+ * Column occupies entire row.
27
+ *
28
+ * Used when `medium` >= `columns`.
29
+ *
30
+ * This case is handled separately because of rounding.
31
+ */
18
32
  ColumnVariant["FullWidth"] = "fullWidth";
19
33
  return ColumnVariant;
20
34
  }(ColumnVariant || {});
35
+ /**
36
+ * The spacing (in `px`) between each column.
37
+ */
38
+ var varGridSpacing = '--ds-grid-spacing';
39
+
40
+ /**
41
+ * The number of columns that a `GridColumn` covers.
42
+ */
43
+ var varColumnSpan = '--ds-column-span';
44
+
45
+ /**
46
+ * IE11 and Edge both have rounding issues for flexbox which is why a width of
47
+ * 99.9999% is used. Using 100% here causes columns to wrap prematurely.
48
+ */
49
+ var singleColumnWidth = "(99.9999% / var(--ds-columns-num))";
50
+ var styles = {
51
+ gridColumn: "_19pkidpf _2hwxwx3y _otyridpf _18u0wx3y _1ul9hrtj _16jlkb7n _1o9zidpf _slp31hna"
52
+ };
53
+ var gridColumnWidthMapStyles = {
54
+ auto: "_p12f1ho1 _i0dl1wug",
55
+ bounded: "_p12fpg3g _i0dl1osq",
56
+ fullWidth: "_p12f1ho1 _i0dl1osq"
57
+ };
21
58
  var getVariant = function getVariant(_ref) {
22
59
  var medium = _ref.medium,
23
60
  columns = _ref.columns;
@@ -29,36 +66,6 @@ var getVariant = function getVariant(_ref) {
29
66
  return ColumnVariant.FullWidth;
30
67
  };
31
68
 
32
- /**
33
- * IE11 and Edge both have rounding issues for flexbox which is why a width of
34
- * 99.9999% is used. Using 100% here causes columns to wrap prematurely.
35
- */
36
- var availableWidth = '99.9999%';
37
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
- var singleColumnWidth = "(".concat(availableWidth, " / var(").concat(varColumnsNum, "))");
39
- var gridColumnStyles = css({
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
- minWidth: "calc(".concat(singleColumnWidth, " - var(").concat(varGridSpacing, "))"),
42
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
43
- margin: "0 calc(var(".concat(varGridSpacing, ") / 2)"),
44
- flexGrow: 1,
45
- flexShrink: 0,
46
- wordWrap: 'break-word'
47
- });
48
- var gridColumnWidthStyles = _defineProperty(_defineProperty(_defineProperty({}, ColumnVariant.Auto, css({
49
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
- maxWidth: "calc(100% - var(".concat(varGridSpacing, "))"),
51
- flexBasis: "auto"
52
- })), ColumnVariant.Bounded, css({
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
54
- maxWidth: "calc(".concat(singleColumnWidth, " * var(").concat(varColumnSpan, ") - var(").concat(varGridSpacing, "))"),
55
- flexBasis: "100%"
56
- })), ColumnVariant.FullWidth, css({
57
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
58
- maxWidth: "calc(100% - var(".concat(varGridSpacing, "))"),
59
- flexBasis: "100%"
60
- }));
61
-
62
69
  /**
63
70
  * __Grid column context__
64
71
  *
@@ -101,14 +108,12 @@ var GridColumn = function GridColumn(_ref2) {
101
108
  medium: medium,
102
109
  columns: columns
103
110
  });
104
- return jsx(GridColumnContext.Provider, {
111
+ return /*#__PURE__*/React.createElement(GridColumnContext.Provider, {
105
112
  value: contextValue
106
- }, jsx("div", {
107
- css: [gridColumnStyles, gridColumnWidthStyles[variant]]
108
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
109
- ,
113
+ }, /*#__PURE__*/React.createElement("div", {
110
114
  style: _defineProperty({}, varColumnSpan, variant === ColumnVariant.Auto ? 'auto' : colSpan),
111
- "data-testid": testId
115
+ "data-testid": testId,
116
+ className: ax([styles.gridColumn, gridColumnWidthMapStyles[variant]])
112
117
  }, children));
113
118
  };
114
119
  export default GridColumn;
@@ -0,0 +1,16 @@
1
+ ._18u01un2{margin-left:calc(var(--ds-grid-spacing)*-1)}
2
+ ._18u01wug{margin-left:auto}
3
+ ._19bvwx3y{padding-left:calc(var(--ds-grid-spacing)/2)}
4
+ ._19pkidpf{margin-top:0}
5
+ ._1e0c1txw{display:flex}
6
+ ._1n261g80{flex-wrap:wrap}
7
+ ._2hwx1un2{margin-right:calc(var(--ds-grid-spacing)*-1)}
8
+ ._2hwx1wug{margin-right:auto}
9
+ ._4cvr1y6m{align-items:flex-start}
10
+ ._ca0qidpf{padding-top:0}
11
+ ._kqswh2mm{position:relative}
12
+ ._n3tdidpf{padding-bottom:0}
13
+ ._otyridpf{margin-bottom:0}
14
+ ._p12f1osq{max-width:100%}
15
+ ._p12fgkkb{max-width:calc(var(--ds-columns-num)*5pc)}
16
+ ._u5f3wx3y{padding-right:calc(var(--ds-grid-spacing)/2)}
package/dist/esm/grid.js CHANGED
@@ -1,36 +1,30 @@
1
+ /* grid.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import "./grid.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ import { useContext } from 'react';
7
+ import { defaultLayout, spacingMapping } from './constants';
8
+ import { GridContext } from './grid-context';
9
+ var defaultGridColumnWidth = 80;
10
+
2
11
  /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
12
+ * The number of available columns in each row.
5
13
  */
6
- import { useContext } from 'react';
14
+ var varColumnsNum = '--ds-columns-num';
7
15
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { css, jsx } from '@emotion/react';
10
- import { defaultGridColumnWidth, defaultLayout, spacingMapping, varColumnsNum, varGridSpacing } from './constants';
11
- import { GridContext } from './grid-context';
12
- var gridStyles = css({
13
- display: 'flex',
14
- margin: '0 auto',
15
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
16
- padding: "0 calc(var(".concat(varGridSpacing, ") / 2)"),
17
- position: 'relative',
18
- alignItems: 'flex-start',
19
- flexWrap: 'wrap'
20
- });
21
- var gridLayoutStyles = {
22
- fixed: css({
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
24
- maxWidth: "calc(var(".concat(varColumnsNum, ") * ").concat(defaultGridColumnWidth, "px)")
25
- }),
26
- fluid: css({
27
- maxWidth: '100%'
28
- })
16
+ /**
17
+ * The spacing (in `px`) between each column.
18
+ */
19
+ var varGridSpacing = '--ds-grid-spacing';
20
+ var styles = {
21
+ grid: "_19pkidpf _2hwx1wug _otyridpf _18u01wug _ca0qidpf _u5f3wx3y _n3tdidpf _19bvwx3y _1e0c1txw _kqswh2mm _4cvr1y6m _1n261g80",
22
+ nestedGrid: "_19pkidpf _2hwx1un2 _otyridpf _18u01un2"
23
+ };
24
+ var gridLayoutMapStyles = {
25
+ fixed: "_p12fgkkb",
26
+ fluid: "_p12f1osq"
29
27
  };
30
- var nestedGridStyles = css({
31
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
- margin: "0 calc(-1 * var(".concat(varGridSpacing, "))")
33
- });
34
28
 
35
29
  /**
36
30
  * __Grid__
@@ -51,11 +45,9 @@ export var Grid = function Grid(_ref) {
51
45
  isNested = _useContext.isNested,
52
46
  columns = _useContext.columns,
53
47
  spacing = _useContext.spacing;
54
- return jsx("div", {
55
- css: [gridStyles, gridLayoutStyles[layout], isNested && nestedGridStyles]
56
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
57
- ,
48
+ return /*#__PURE__*/React.createElement("div", {
58
49
  style: _defineProperty(_defineProperty({}, varColumnsNum, columns), varGridSpacing, "".concat(spacingMapping[spacing], "px")),
59
- "data-testid": testId
50
+ "data-testid": testId,
51
+ className: ax([styles.grid, gridLayoutMapStyles[layout], isNested && styles.nestedGrid])
60
52
  }, children);
61
53
  };
@@ -0,0 +1,15 @@
1
+
2
+ ._v564evma{transition:height .25s ease-in-out}._16jlkb7n{flex-grow:1}
3
+ ._1bsb1osq{width:100%}
4
+ ._1e0c1txw{display:flex}
5
+ ._1o9zidpf{flex-shrink:0}
6
+ ._1o9zkb7n{flex-shrink:1}
7
+ ._1pby11wp{z-index:3}
8
+ ._1pbycs5v{z-index:2}
9
+ ._1pbykb7n{z-index:1}
10
+ ._1tke1osq{min-height:100%}
11
+ ._1ul9idpf{min-width:0}
12
+ ._2lx21bp4{flex-direction:column}
13
+ ._i0dl1wug{flex-basis:auto}
14
+ ._kqsw1n9t{position:fixed}
15
+ ._kqswh2mm{position:relative}
package/dist/esm/page.js CHANGED
@@ -1,41 +1,16 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
1
+ /* page.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./page.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
7
5
  import { defaultBannerHeight } from './constants';
8
- var bannerStyles = css({
9
- width: '100%',
10
- position: 'fixed'
11
- });
12
- var bannerContainerStyles = css({
13
- width: '100%',
14
- position: 'relative',
15
- zIndex: 3,
16
- flex: '1 0 auto',
17
- transition: 'height 0.25s ease-in-out'
18
- });
19
- var pageContentStyles = css({
20
- minWidth: 0,
21
- position: 'relative',
22
- zIndex: 1,
23
- flex: '1 1 auto'
24
- });
25
- var wrapperStyles = css({
26
- display: 'flex',
27
- width: '100%',
28
- minHeight: '100%',
29
- flexDirection: 'column'
30
- });
31
- var mainContainerStyles = css({
32
- display: 'flex',
33
- flex: '1 1 auto'
34
- });
35
- var navigationStyles = css({
36
- position: 'relative',
37
- zIndex: 2
38
- });
6
+ var styles = {
7
+ banner: "_1bsb1osq _kqsw1n9t",
8
+ bannerContainer: "_16jlkb7n _1o9zidpf _i0dl1wug _v564evma _1bsb1osq _kqswh2mm _1pby11wp",
9
+ pageContent: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _kqswh2mm _1pbykb7n",
10
+ wrapper: "_1e0c1txw _1bsb1osq _1tke1osq _2lx21bp4",
11
+ mainContainer: "_16jlkb7n _1o9zkb7n _i0dl1wug _1e0c1txw",
12
+ navigation: "_kqswh2mm _1pbycs5v"
13
+ };
39
14
 
40
15
  /**
41
16
  * __Page__
@@ -56,24 +31,24 @@ var Page = function Page(_ref) {
56
31
  navigation = _ref.navigation,
57
32
  children = _ref.children,
58
33
  testId = _ref.testId;
59
- return jsx("div", {
60
- css: wrapperStyles,
61
- "data-testid": testId
62
- }, banner ? jsx("div", {
63
- css: bannerContainerStyles,
34
+ return /*#__PURE__*/React.createElement("div", {
35
+ "data-testid": testId,
36
+ className: ax([styles.wrapper])
37
+ }, banner ? /*#__PURE__*/React.createElement("div", {
64
38
  style: {
65
39
  height: isBannerOpen ? "".concat(bannerHeight, "px") : '0'
66
40
  },
67
41
  "aria-hidden": !isBannerOpen,
68
- "data-testid": testId ? "".concat(testId, "--banner-container") : undefined
69
- }, jsx("div", {
70
- css: bannerStyles
71
- }, banner)) : null, jsx("div", {
72
- css: mainContainerStyles
73
- }, jsx("div", {
74
- css: navigationStyles
75
- }, navigation), jsx("div", {
76
- css: pageContentStyles
42
+ "data-testid": testId ? "".concat(testId, "--banner-container") : undefined,
43
+ className: ax([styles.bannerContainer])
44
+ }, /*#__PURE__*/React.createElement("div", {
45
+ className: ax([styles.banner])
46
+ }, banner)) : null, /*#__PURE__*/React.createElement("div", {
47
+ className: ax([styles.mainContainer])
48
+ }, /*#__PURE__*/React.createElement("div", {
49
+ className: ax([styles.navigation])
50
+ }, navigation), /*#__PURE__*/React.createElement("div", {
51
+ className: ax([styles.pageContent])
77
52
  }, children)));
78
53
  };
79
54
  export default Page;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
2
  import type { GridColumnProps } from './types';
4
3
  /**
5
4
  * __Grid column context__
@@ -16,5 +15,5 @@ export declare const GridColumnContext: import("react").Context<{
16
15
  *
17
16
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
18
17
  */
19
- declare const GridColumn: ({ medium, children, testId }: GridColumnProps) => jsx.JSX.Element;
18
+ declare const GridColumn: ({ medium, children, testId }: GridColumnProps) => JSX.Element;
20
19
  export default GridColumn;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import type { GridProps } from './types';
3
3
  /**
4
4
  * __Grid__
@@ -10,4 +10,4 @@ import type { GridProps } from './types';
10
10
  *
11
11
  * @internal
12
12
  */
13
- export declare const Grid: ({ layout, testId, children }: GridProps) => jsx.JSX.Element;
13
+ export declare const Grid: ({ layout, testId, children }: GridProps) => JSX.Element;
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import type { PageProps } from './types';
7
3
  /**
8
4
  * __Page__
@@ -14,5 +10,5 @@ import type { PageProps } from './types';
14
10
  *
15
11
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
16
12
  */
17
- declare const Page: ({ isBannerOpen, bannerHeight, banner, navigation, children, testId, }: PageProps) => jsx.JSX.Element;
13
+ declare const Page: ({ isBannerOpen, bannerHeight, banner, navigation, children, testId, }: PageProps) => JSX.Element;
18
14
  export default Page;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
2
  import type { GridColumnProps } from './types';
4
3
  /**
5
4
  * __Grid column context__
@@ -16,5 +15,5 @@ export declare const GridColumnContext: import("react").Context<{
16
15
  *
17
16
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
18
17
  */
19
- declare const GridColumn: ({ medium, children, testId }: GridColumnProps) => jsx.JSX.Element;
18
+ declare const GridColumn: ({ medium, children, testId }: GridColumnProps) => JSX.Element;
20
19
  export default GridColumn;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import type { GridProps } from './types';
3
3
  /**
4
4
  * __Grid__
@@ -10,4 +10,4 @@ import type { GridProps } from './types';
10
10
  *
11
11
  * @internal
12
12
  */
13
- export declare const Grid: ({ layout, testId, children }: GridProps) => jsx.JSX.Element;
13
+ export declare const Grid: ({ layout, testId, children }: GridProps) => JSX.Element;
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import type { PageProps } from './types';
7
3
  /**
8
4
  * __Page__
@@ -14,5 +10,5 @@ import type { PageProps } from './types';
14
10
  *
15
11
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
16
12
  */
17
- declare const Page: ({ isBannerOpen, bannerHeight, banner, navigation, children, testId, }: PageProps) => jsx.JSX.Element;
13
+ declare const Page: ({ isBannerOpen, bannerHeight, banner, navigation, children, testId, }: PageProps) => JSX.Element;
18
14
  export default Page;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page",
3
- "version": "13.0.0",
3
+ "version": "14.0.0",
4
4
  "description": "A page layout organizes sections on a page using a grid and grid columns.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -40,8 +40,7 @@
40
40
  }
41
41
  ]
42
42
  }
43
- },
44
- "runReact18": true
43
+ }
45
44
  },
46
45
  "af:exports": {
47
46
  "./types": "./src/types.tsx",
@@ -52,25 +51,25 @@
52
51
  },
53
52
  "dependencies": {
54
53
  "@babel/runtime": "^7.0.0",
55
- "@emotion/react": "^11.7.1"
54
+ "@compiled/react": "^0.18.3"
56
55
  },
57
56
  "peerDependencies": {
58
57
  "react": "^18.2.0"
59
58
  },
60
59
  "devDependencies": {
61
- "@af/accessibility-testing": "*",
62
- "@af/integration-testing": "*",
63
- "@atlaskit/banner": "^13.0.0",
64
- "@atlaskit/code": "^16.0.0",
65
- "@atlaskit/docs": "*",
60
+ "@af/accessibility-testing": "workspace:^",
61
+ "@af/integration-testing": "workspace:^",
62
+ "@atlaskit/banner": "^14.0.0",
63
+ "@atlaskit/code": "^17.2.0",
64
+ "@atlaskit/docs": "^11.0.0",
66
65
  "@atlaskit/ds-lib": "^4.0.0",
67
- "@atlaskit/icon": "^24.0.0",
68
- "@atlaskit/link": "^3.0.0",
69
- "@atlaskit/primitives": "^14.0.0",
70
- "@atlaskit/section-message": "*",
71
- "@atlaskit/ssr": "*",
72
- "@atlaskit/tokens": "^4.0.0",
73
- "@atlaskit/visual-regression": "*",
66
+ "@atlaskit/icon": "^27.2.0",
67
+ "@atlaskit/link": "^3.2.0",
68
+ "@atlaskit/primitives": "^14.10.0",
69
+ "@atlaskit/section-message": "^8.2.0",
70
+ "@atlaskit/tokens": "^5.4.0",
71
+ "@atlaskit/visual-regression": "workspace:^",
72
+ "@atlassian/ssr-tests": "^0.2.0",
74
73
  "@testing-library/react": "^13.4.0",
75
74
  "react-dom": "^18.2.0",
76
75
  "typescript": "~5.4.2"
@@ -93,7 +92,7 @@
93
92
  "analytics": "analytics-next",
94
93
  "styling": [
95
94
  "static",
96
- "emotion"
95
+ "compiled"
97
96
  ],
98
97
  "deprecation": "no-deprecated-imports",
99
98
  "design-system": "v1"