@atlaskit/page 14.1.0 → 15.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/Grid/package.json +1 -8
  3. package/GridColumn/package.json +1 -8
  4. package/Page/package.json +1 -8
  5. package/constants/package.json +1 -8
  6. package/dist/cjs/constants.js +1 -6
  7. package/dist/cjs/entry-points/constants.js +3 -2
  8. package/dist/cjs/grid.js +2 -1
  9. package/dist/cjs/spacing-mapping.js +12 -0
  10. package/dist/es2019/constants.js +0 -5
  11. package/dist/es2019/entry-points/constants.js +2 -1
  12. package/dist/es2019/grid.js +2 -1
  13. package/dist/es2019/spacing-mapping.js +6 -0
  14. package/dist/esm/constants.js +0 -5
  15. package/dist/esm/entry-points/constants.js +2 -1
  16. package/dist/esm/grid.js +2 -1
  17. package/dist/esm/spacing-mapping.js +6 -0
  18. package/dist/types/constants.d.ts +1 -5
  19. package/dist/types/entry-points/constants.d.ts +2 -1
  20. package/dist/types/spacing-mapping.d.ts +5 -0
  21. package/grid/package.json +1 -8
  22. package/grid-column/package.json +1 -8
  23. package/package.json +11 -18
  24. package/page/package.json +1 -8
  25. package/types/package.json +1 -8
  26. package/dist/types-ts4.5/constants.d.ts +0 -24
  27. package/dist/types-ts4.5/entry-points/constants.d.ts +0 -2
  28. package/dist/types-ts4.5/entry-points/grid-column.d.ts +0 -1
  29. package/dist/types-ts4.5/entry-points/grid.d.ts +0 -1
  30. package/dist/types-ts4.5/entry-points/page.d.ts +0 -1
  31. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  32. package/dist/types-ts4.5/grid-column-context.d.ts +0 -12
  33. package/dist/types-ts4.5/grid-column.d.ts +0 -10
  34. package/dist/types-ts4.5/grid-context.d.ts +0 -17
  35. package/dist/types-ts4.5/grid-wrapper.d.ts +0 -11
  36. package/dist/types-ts4.5/grid.d.ts +0 -12
  37. package/dist/types-ts4.5/index.d.ts +0 -4
  38. package/dist/types-ts4.5/page.d.ts +0 -13
  39. package/dist/types-ts4.5/types.d.ts +0 -132
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @atlaskit/page
2
2
 
3
+ ## 15.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ee28cf33718b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ee28cf33718b0) -
8
+ Add @atlassian/react-compiler-gating as a runtime dependency to enable React Compiler platform
9
+ gating.
10
+ - Updated dependencies
11
+
12
+ ## 15.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
17
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
18
+
19
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
20
+
21
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
22
+
23
+ ```diff
24
+ - "typesVersions": {
25
+ - ">=4.5 <4.9": {
26
+ - "*": [
27
+ - "dist/types-ts4.5/*",
28
+ - "dist/types-ts4.5/index.d.ts"
29
+ - ]
30
+ - }
31
+ - },
32
+ ```
33
+
3
34
  ## 14.1.0
4
35
 
5
36
  ### Minor Changes
package/Grid/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/grid.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/grid.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/grid.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/grid-column.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/grid-column.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/grid-column.d.ts"
17
10
  }
package/Page/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/page.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/page.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/page.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/constants.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/constants.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/constants.d.ts"
17
10
  }
@@ -3,15 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.varGridSpacing = exports.varColumnsNum = exports.varColumnSpan = exports.spacingMapping = exports.defaultSpacing = exports.defaultMedium = exports.defaultLayout = exports.defaultGridColumns = exports.defaultGridColumnWidth = exports.defaultBannerHeight = void 0;
6
+ exports.varGridSpacing = exports.varColumnsNum = exports.varColumnSpan = exports.defaultSpacing = exports.defaultMedium = exports.defaultLayout = exports.defaultGridColumns = exports.defaultGridColumnWidth = exports.defaultBannerHeight = void 0;
7
7
  var defaultGridSize = 8;
8
8
  var defaultGridColumns = exports.defaultGridColumns = 12;
9
9
  var defaultGridColumnWidth = exports.defaultGridColumnWidth = defaultGridSize * 10;
10
- var spacingMapping = exports.spacingMapping = {
11
- comfortable: defaultGridSize * 5,
12
- cosy: defaultGridSize * 2,
13
- compact: defaultGridSize * 0.5
14
- };
15
10
  var defaultSpacing = exports.defaultSpacing = 'cosy';
16
11
  var defaultBannerHeight = exports.defaultBannerHeight = 52;
17
12
 
@@ -42,7 +42,7 @@ Object.defineProperty(exports, "defaultSpacing", {
42
42
  Object.defineProperty(exports, "spacingMapping", {
43
43
  enumerable: true,
44
44
  get: function get() {
45
- return _constants.spacingMapping;
45
+ return _spacingMapping.spacingMapping;
46
46
  }
47
47
  });
48
48
  Object.defineProperty(exports, "varColumnSpan", {
@@ -63,4 +63,5 @@ Object.defineProperty(exports, "varGridSpacing", {
63
63
  return _constants.varGridSpacing;
64
64
  }
65
65
  });
66
- var _constants = require("../constants");
66
+ var _constants = require("../constants");
67
+ var _spacingMapping = require("../spacing-mapping");
package/dist/cjs/grid.js CHANGED
@@ -14,6 +14,7 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _constants = require("./constants");
16
16
  var _gridContext = require("./grid-context");
17
+ var _spacingMapping = require("./spacing-mapping");
17
18
  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
19
  var defaultGridColumnWidth = 80;
19
20
 
@@ -55,7 +56,7 @@ var Grid = exports.Grid = function Grid(_ref) {
55
56
  columns = _useContext.columns,
56
57
  spacing = _useContext.spacing;
57
58
  return /*#__PURE__*/React.createElement("div", {
58
- style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, varColumnsNum, columns), varGridSpacing, "".concat(_constants.spacingMapping[spacing], "px")),
59
+ style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, varColumnsNum, columns), varGridSpacing, "".concat(_spacingMapping.spacingMapping[spacing], "px")),
59
60
  "data-testid": testId,
60
61
  className: (0, _runtime.ax)([styles.grid, gridLayoutMapStyles[layout], isNested && styles.nestedGrid])
61
62
  }, children);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.spacingMapping = void 0;
7
+ var defaultGridSize = 8;
8
+ var spacingMapping = exports.spacingMapping = {
9
+ comfortable: defaultGridSize * 5,
10
+ cosy: defaultGridSize * 2,
11
+ compact: defaultGridSize * 0.5
12
+ };
@@ -1,11 +1,6 @@
1
1
  const defaultGridSize = 8;
2
2
  export const defaultGridColumns = 12;
3
3
  export const defaultGridColumnWidth = defaultGridSize * 10;
4
- export const spacingMapping = {
5
- comfortable: defaultGridSize * 5,
6
- cosy: defaultGridSize * 2,
7
- compact: defaultGridSize * 0.5
8
- };
9
4
  export const defaultSpacing = 'cosy';
10
5
  export const defaultBannerHeight = 52;
11
6
 
@@ -1 +1,2 @@
1
- export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, spacingMapping, varColumnSpan, varColumnsNum, varGridSpacing } from '../constants';
1
+ export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, varColumnSpan, varColumnsNum, varGridSpacing } from '../constants';
2
+ export { spacingMapping } from '../spacing-mapping';
@@ -3,8 +3,9 @@ import "./grid.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useContext } from 'react';
6
- import { defaultLayout, spacingMapping } from './constants';
6
+ import { defaultLayout } from './constants';
7
7
  import { GridContext } from './grid-context';
8
+ import { spacingMapping } from './spacing-mapping';
8
9
  const defaultGridColumnWidth = 80;
9
10
 
10
11
  /**
@@ -0,0 +1,6 @@
1
+ const defaultGridSize = 8;
2
+ export const spacingMapping = {
3
+ comfortable: defaultGridSize * 5,
4
+ cosy: defaultGridSize * 2,
5
+ compact: defaultGridSize * 0.5
6
+ };
@@ -1,11 +1,6 @@
1
1
  var defaultGridSize = 8;
2
2
  export var defaultGridColumns = 12;
3
3
  export var defaultGridColumnWidth = defaultGridSize * 10;
4
- export var spacingMapping = {
5
- comfortable: defaultGridSize * 5,
6
- cosy: defaultGridSize * 2,
7
- compact: defaultGridSize * 0.5
8
- };
9
4
  export var defaultSpacing = 'cosy';
10
5
  export var defaultBannerHeight = 52;
11
6
 
@@ -1 +1,2 @@
1
- export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, spacingMapping, varColumnSpan, varColumnsNum, varGridSpacing } from '../constants';
1
+ export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, varColumnSpan, varColumnsNum, varGridSpacing } from '../constants';
2
+ export { spacingMapping } from '../spacing-mapping';
package/dist/esm/grid.js CHANGED
@@ -4,8 +4,9 @@ import "./grid.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { useContext } from 'react';
7
- import { defaultLayout, spacingMapping } from './constants';
7
+ import { defaultLayout } from './constants';
8
8
  import { GridContext } from './grid-context';
9
+ import { spacingMapping } from './spacing-mapping';
9
10
  var defaultGridColumnWidth = 80;
10
11
 
11
12
  /**
@@ -0,0 +1,6 @@
1
+ var defaultGridSize = 8;
2
+ export var spacingMapping = {
3
+ comfortable: defaultGridSize * 5,
4
+ cosy: defaultGridSize * 2,
5
+ compact: defaultGridSize * 0.5
6
+ };
@@ -1,10 +1,6 @@
1
+ import type { spacingMapping } from './spacing-mapping';
1
2
  export declare const defaultGridColumns = 12;
2
3
  export declare const defaultGridColumnWidth: number;
3
- export declare const spacingMapping: {
4
- readonly comfortable: number;
5
- readonly cosy: number;
6
- readonly compact: number;
7
- };
8
4
  export type GridSpacing = keyof typeof spacingMapping;
9
5
  export declare const defaultSpacing = "cosy";
10
6
  export declare const defaultBannerHeight = 52;
@@ -1,2 +1,3 @@
1
- export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, spacingMapping, varColumnSpan, varColumnsNum, varGridSpacing, } from '../constants';
1
+ export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, varColumnSpan, varColumnsNum, varGridSpacing, } from '../constants';
2
+ export { spacingMapping } from '../spacing-mapping';
2
3
  export type { GridSpacing } from '../constants';
@@ -0,0 +1,5 @@
1
+ export declare const spacingMapping: {
2
+ readonly comfortable: number;
3
+ readonly cosy: number;
4
+ readonly compact: number;
5
+ };
package/grid/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/grid.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/grid.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/grid.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/grid-column.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/grid-column.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/grid-column.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page",
3
- "version": "14.1.0",
3
+ "version": "15.0.1",
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/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": [
24
16
  "**/*.compiled.css"
25
17
  ],
@@ -50,6 +42,7 @@
50
42
  }
51
43
  },
52
44
  "dependencies": {
45
+ "@atlassian/react-compiler-gating": "^0.2.0",
53
46
  "@babel/runtime": "^7.0.0",
54
47
  "@compiled/react": "^0.20.0"
55
48
  },
@@ -60,17 +53,17 @@
60
53
  "@af/accessibility-testing": "workspace:^",
61
54
  "@af/integration-testing": "workspace:^",
62
55
  "@af/visual-regression": "workspace:^",
63
- "@atlaskit/banner": "^14.1.0",
64
- "@atlaskit/code": "^17.5.0",
65
- "@atlaskit/docs": "^11.8.0",
66
- "@atlaskit/icon": "^34.3.0",
67
- "@atlaskit/link": "^3.4.0",
68
- "@atlaskit/primitives": "^19.0.0",
69
- "@atlaskit/section-message": "^8.12.0",
70
- "@atlaskit/tokens": "^13.0.0",
71
- "@atlassian/react-compiler-gating": "workspace:^",
56
+ "@atlaskit/banner": "^15.0.0",
57
+ "@atlaskit/code": "^18.0.0",
58
+ "@atlaskit/docs": "^12.0.0",
59
+ "@atlaskit/icon": "^36.0.0",
60
+ "@atlaskit/link": "^4.0.0",
61
+ "@atlaskit/primitives": "^20.0.0",
62
+ "@atlaskit/section-message": "^9.1.0",
63
+ "@atlaskit/tokens": "^15.0.0",
72
64
  "@atlassian/ssr-tests": "workspace:^",
73
65
  "@testing-library/react": "^16.3.0",
66
+ "react": "^18.2.0",
74
67
  "react-dom": "^18.2.0"
75
68
  },
76
69
  "keywords": [
package/page/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/page.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/page.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/page.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1,24 +0,0 @@
1
- export declare const defaultGridColumns = 12;
2
- export declare const defaultGridColumnWidth: number;
3
- export declare const spacingMapping: {
4
- readonly comfortable: number;
5
- readonly cosy: number;
6
- readonly compact: number;
7
- };
8
- export type GridSpacing = keyof typeof spacingMapping;
9
- export declare const defaultSpacing = "cosy";
10
- export declare const defaultBannerHeight = 52;
11
- export declare const defaultMedium = 0;
12
- export declare const defaultLayout = "fixed";
13
- /**
14
- * The number of available columns in each row.
15
- */
16
- export declare const varColumnsNum = "--ds-columns-num";
17
- /**
18
- * The number of columns that a `GridColumn` covers.
19
- */
20
- export declare const varColumnSpan = "--ds-column-span";
21
- /**
22
- * The spacing (in `px`) between each column.
23
- */
24
- export declare const varGridSpacing = "--ds-grid-spacing";
@@ -1,2 +0,0 @@
1
- export { defaultBannerHeight, defaultGridColumnWidth, defaultGridColumns, defaultLayout, defaultMedium, defaultSpacing, spacingMapping, varColumnSpan, varColumnsNum, varGridSpacing, } from '../constants';
2
- export type { GridSpacing } from '../constants';
@@ -1 +0,0 @@
1
- export { default as GridColumn } from '../grid-column';
@@ -1 +0,0 @@
1
- export { default } from '../grid-wrapper';
@@ -1 +0,0 @@
1
- export { default } from '../page';
@@ -1 +0,0 @@
1
- export type { BaseGridProps, GridColumnProps, GridLayout, GridProps, GridSpacing, PageProps, ThemeProps, } from '../types';
@@ -1,12 +0,0 @@
1
- /**
2
- * __Grid column context__
3
- *
4
- * A grid column context component for the Page component.
5
- *
6
- * - [Examples](https://atlassian.design/components/page/grid-column-context/examples)
7
- * - [Code](https://atlassian.design/components/page/grid-column-context/code)
8
- * - [Usage](https://atlassian.design/components/page/grid-column-context/usage)
9
- */
10
- export declare const GridColumnContext: import('react').Context<{
11
- medium: number;
12
- }>;
@@ -1,10 +0,0 @@
1
- import type { GridColumnProps } from './types';
2
- /**
3
- * __Grid column__
4
- *
5
- * A grid column can span one or more column positions within a grid.
6
- *
7
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
8
- */
9
- declare const GridColumn: ({ medium, children, testId }: GridColumnProps) => JSX.Element;
10
- export default GridColumn;
@@ -1,17 +0,0 @@
1
- import { type GridSpacing } from './constants';
2
- type GridContextProps = {
3
- isRoot: boolean;
4
- isNested: boolean;
5
- spacing: GridSpacing;
6
- columns: number;
7
- };
8
- /**
9
- * __Grid context__
10
- *
11
- * Provides contextual information which is used by both
12
- * the `Grid` and its `GridColumn` children.
13
- *
14
- * @internal
15
- */
16
- export declare const GridContext: import('react').Context<GridContextProps>;
17
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { GridProps } from './types';
3
- /**
4
- * __Grid__
5
- *
6
- * A grid contains one or more `GridColumn` to provide a grid layout.
7
- *
8
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
9
- */
10
- declare const GridWrapper: ({ spacing: spacingProp, columns: columnsProp, layout, testId, children, theme, }: GridProps) => React.JSX.Element;
11
- export default GridWrapper;
@@ -1,12 +0,0 @@
1
- import type { GridProps } from './types';
2
- /**
3
- * __Grid__
4
- *
5
- * A container for one or more `GridColumn`.
6
- *
7
- * This is the internal component, which relies on the context provided by the
8
- * grid wrapper.
9
- *
10
- * @internal
11
- */
12
- export declare const Grid: ({ layout, testId, children }: GridProps) => JSX.Element;
@@ -1,4 +0,0 @@
1
- import Page from './page';
2
- export default Page;
3
- export { default as Grid } from './grid-wrapper';
4
- export { default as GridColumn } from './grid-column';
@@ -1,13 +0,0 @@
1
- import type { PageProps } from './types';
2
- /**
3
- * __Page__
4
- *
5
- * Used to build page layouts.
6
- *
7
- * Has built in support for positioning [banners](https://atlassian.design/components/banner/examples)
8
- * and the deprecated `@atlaskit/navigation`.
9
- *
10
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/page)
11
- */
12
- declare const Page: ({ isBannerOpen, bannerHeight, banner, navigation, children, testId, }: PageProps) => JSX.Element;
13
- export default Page;
@@ -1,132 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { GridSpacing } from './constants';
3
- export type { GridSpacing } from './constants';
4
- /**
5
- * The props accepted by the internal `Grid` element.
6
- */
7
- export type BaseGridProps = {
8
- /**
9
- * The content of the grid. Direct children should be instances of `GridColumn`.
10
- */
11
- children?: React.ReactNode;
12
- /**
13
- * Controls whether the grid should use a fixed-width layout or expand to fill available space.
14
- *
15
- * Defaults to `"fixed"`.
16
- */
17
- layout?: GridLayout;
18
- /**
19
- * A unique string that appears as a data attribute `data-testid` in the rendered code. Serves as a hook for automated tests.
20
- */
21
- testId?: string;
22
- };
23
- /**
24
- * Values set for the theme.
25
- */
26
- export type ThemeProps = {
27
- /**
28
- * Number of columns in the grid.
29
- */
30
- columns: number;
31
- /**
32
- * The amount of space between each grid column.
33
- * `comfortable` adds 40px of spacing, `cosy` adds 16px and `compact` creates 4px gap between columns.
34
- *
35
- * Defaults to `"cosy"`.
36
- */
37
- spacing: GridSpacing;
38
- /**
39
- * Sets whether the grid is nested or not.
40
- */
41
- isNestedGrid?: boolean;
42
- };
43
- /**
44
- * The props accepted by the external `Grid` element.
45
- *
46
- * @extends BaseGridProps
47
- */
48
- export type GridProps = BaseGridProps & {
49
- /**
50
- * The amount of space between each grid column.
51
- * `comfortable` adds 40px of spacing, `cosy` adds 16px and `compact` creates 4px gap between columns.
52
- *
53
- * Defaults to `"cosy"`.
54
- */
55
- spacing?: GridSpacing;
56
- /**
57
- * The total number of columns available in each row of the grid.
58
- *
59
- * Defaults to `12`.
60
- */
61
- columns?: number;
62
- /**
63
- * For consumers still using the theme prop to set the grid layout.
64
- */
65
- theme?: ThemeProps;
66
- };
67
- export type GridColumnProps = {
68
- /**
69
- * The number of columns in its parent `Grid` that the `GridColumn` should span.
70
- *
71
- * Defaults to `12`.
72
- */
73
- medium?: number;
74
- /**
75
- * The content to display within the column.
76
- */
77
- children?: ReactNode;
78
- /**
79
- * A unique string that appears as a data attribute `data-testid` in the rendered code. Serves as a hook for automated tests.
80
- */
81
- testId?: string;
82
- };
83
- export type GridLayout = 'fluid' | 'fixed';
84
- export type PageProps = {
85
- /**
86
- * If you provide the banner or banners you are to use, page will help you
87
- * coordinate the showing and hiding of them in conjunction with `isBannerOpen`.
88
- * This is designed to take [banner](https://atlassian.design/components/banner/examples) component, and
89
- * matches its animation timing.
90
- *
91
- * The only time that two banners should be rendered are when an announcement
92
- * banner is loaded alongside an error or warning banner.
93
- */
94
- banner?: ReactNode;
95
- /**
96
- * Takes [side navigation component](/components/side-navigation/) and helps
97
- * position it with consideration to rendered banners.
98
- */
99
- navigation?: ReactNode;
100
- /**
101
- * The contents of the page, to be rendered next to navigation. It will be
102
- * correctly position with relation to both any banner, as well as navigation.
103
- */
104
- children?: ReactNode;
105
- /**
106
- * Sets whether to show or hide the banner. This is responsible for moving the
107
- * page contents down, as well as whether to render the banner component.
108
- *
109
- * Defaults to `false`.
110
- */
111
- isBannerOpen?: boolean;
112
- /**
113
- * `52` is line height `(20) + 4 * grid`. This is the height of all banners aside
114
- * from the dynamically heighted announcement banner.
115
- *
116
- * Banner height can be retrieved from banner using its `innerRef`, which always
117
- * returns its height when expanded even when it's collapsed.
118
- *
119
- * In addition to setting the height of the banner's container for dynamically
120
- * heighted banners, you will need to set the `pageOffset` in navigation. Since
121
- * this is a lot to think about, [here](/components/page/examples#announcement-banners)
122
- * is an example that implements displaying both an announcement banner and a
123
- * warning banner on a page, while matching the height of each.
124
- *
125
- * Defaults to `52`.
126
- */
127
- bannerHeight?: number;
128
- /**
129
- * A unique string that appears as a data attribute `data-testid` in the rendered code. Serves as a hook for automated tests.
130
- */
131
- testId?: string;
132
- };