@atlaskit/page-layout 5.1.0 → 5.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 5.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 5.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`015a98b324278`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/015a98b324278) -
14
+ Adopt motion.button.hovered / motion.button.pressed tokens for hover/press background transitions
15
+ in custom button-like components (inline-edit read view, navigation-system top-nav pressable, and
16
+ page-layout resize control grab area), gated behind the platform-dst-motion-uplift-button feature
17
+ flag.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 5.1.0
4
24
 
5
25
  ### Minor Changes
package/compass.yml ADDED
@@ -0,0 +1,47 @@
1
+ configVersion: 1
2
+ id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/42fba4d9-952e-4ec7-a26d-848d15309d80
3
+ name: '@atlaskit/page-layout'
4
+ ownerId: ari:cloud:teams::team/814283d6-8695-4329-b2f8-d78b2645722f # Design System Team (ADS)
5
+ labels:
6
+ - platform-code
7
+ - platform-afm
8
+ typeId: OTHER
9
+ fields:
10
+ tier: 4
11
+ lifecycle: Active
12
+ isMonorepoProject: true
13
+ links:
14
+ - name: Root Repository
15
+ type: REPOSITORY
16
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
17
+ - name: Slack Channel
18
+ type: CHAT_CHANNEL
19
+ url: https://atlassian.enterprise.slack.com/archives/CFJ9DU39U # #help-design-system
20
+ - name: Page Layout
21
+ type: REPOSITORY
22
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/design-system/page-layout
23
+ customFields:
24
+ - name: Department
25
+ type: text
26
+ value: Eng - Design System Fundamentals
27
+ - name: Technical Owner
28
+ type: user
29
+ value: ari:cloud:identity::user/557058:86a9b692-7997-49cb-9984-080801b1de91 # Jared Crowe
30
+ - name: Reviewer Team
31
+ type: text
32
+ value: ari:cloud:teams::team/be19136e-6275-419f-be0c-fcee844b8684 # Design System Engineers
33
+ - name: Required Reviewers Opt In
34
+ type: boolean
35
+ value: true
36
+ - name: Reviewer Selection Mechanism
37
+ type: text
38
+ value: random(3)
39
+ - name: Required Reviewer Approvals
40
+ type: number
41
+ value: 1
42
+ - name: Trusted Committers
43
+ type: text
44
+ value: ari:cloud:teams::team/814283d6-8695-4329-b2f8-d78b2645722f # Design System Team (ADS)
45
+ - name: Trusted Reviewer Teams
46
+ type: text
47
+ value: ari:cloud:teams::team/42f4416b-e028-4daa-b2a5-afe213ac75e1 # Design System Designers
@@ -12,7 +12,9 @@ var isLocalStorageSupported = function isLocalStorageSupported() {
12
12
  // use an random key to test
13
13
  // eslint-disable-next-line @repo/internal/react/disallow-unstable-values
14
14
  var testKey = "__test_".concat(Date.now(), "__");
15
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
15
16
  localStorage.setItem(testKey, testKey);
17
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
16
18
  localStorage.removeItem(testKey);
17
19
  return true;
18
20
  } catch (_unused) {
@@ -21,6 +23,7 @@ var isLocalStorageSupported = function isLocalStorageSupported() {
21
23
  };
22
24
  var safeLocalStorage = function safeLocalStorage() {
23
25
  if (isLocalStorageSupported()) {
26
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
24
27
  return localStorage;
25
28
  }
26
29
 
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _react2 = require("@emotion/react");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _constants = require("../../common/constants");
15
16
  var _excluded = ["testId", "valueTextLabel", "isDisabled", "isLeftSidebarCollapsed", "label", "leftSidebarPercentageExpanded", "onKeyDown", "onMouseDown", "onBlur", "onFocus"];
16
17
  /**
@@ -57,6 +58,9 @@ var lineStyles = (0, _react2.css)({
57
58
  backgroundColor: 'var(--ds-line)',
58
59
  transition: 'background-color 200ms'
59
60
  });
61
+ var lineMotionStyles = (0, _react2.css)({
62
+ transition: "var(--ds-button-hovered, background-color 150ms cubic-bezier(0.4, 1, 0.6, 1))"
63
+ });
60
64
  var grabAreaLineSelector = (0, _defineProperty2.default)({}, _constants.GRAB_AREA_LINE_SELECTOR, true);
61
65
  var grabAreaSelector = (0, _defineProperty2.default)({}, _constants.GRAB_AREA_SELECTOR, true);
62
66
  var GrabArea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -97,7 +101,7 @@ var GrabArea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
97
101
  onFocus: onFocus,
98
102
  onBlur: onBlur
99
103
  }, rest), (0, _react2.jsx)("span", (0, _extends2.default)({
100
- css: lineStyles
104
+ css: [lineStyles, (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-button') && lineMotionStyles]
101
105
  }, grabAreaLineSelector)));
102
106
  });
103
107
 
@@ -6,7 +6,9 @@ const isLocalStorageSupported = () => {
6
6
  // use an random key to test
7
7
  // eslint-disable-next-line @repo/internal/react/disallow-unstable-values
8
8
  const testKey = `__test_${Date.now()}__`;
9
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
9
10
  localStorage.setItem(testKey, testKey);
11
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
10
12
  localStorage.removeItem(testKey);
11
13
  return true;
12
14
  } catch {
@@ -15,6 +17,7 @@ const isLocalStorageSupported = () => {
15
17
  };
16
18
  const safeLocalStorage = () => {
17
19
  if (isLocalStorageSupported()) {
20
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
18
21
  return localStorage;
19
22
  }
20
23
 
@@ -6,6 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  import * as React from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css, jsx } from '@emotion/react';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { GRAB_AREA_LINE_SELECTOR, GRAB_AREA_SELECTOR } from '../../common/constants';
10
11
  /**
11
12
  * Determines the color of the grab line.
@@ -47,6 +48,9 @@ const lineStyles = css({
47
48
  backgroundColor: 'var(--ds-line)',
48
49
  transition: 'background-color 200ms'
49
50
  });
51
+ const lineMotionStyles = css({
52
+ transition: "var(--ds-button-hovered, background-color 150ms cubic-bezier(0.4, 1, 0.6, 1))"
53
+ });
50
54
  const grabAreaLineSelector = {
51
55
  [GRAB_AREA_LINE_SELECTOR]: true
52
56
  };
@@ -91,7 +95,7 @@ const GrabArea = /*#__PURE__*/React.forwardRef(({
91
95
  onFocus: onFocus,
92
96
  onBlur: onBlur
93
97
  }, rest), jsx("span", _extends({
94
- css: lineStyles
98
+ css: [lineStyles, fg('platform-dst-motion-uplift-button') && lineMotionStyles]
95
99
  }, grabAreaLineSelector)));
96
100
  });
97
101
 
@@ -6,7 +6,9 @@ var isLocalStorageSupported = function isLocalStorageSupported() {
6
6
  // use an random key to test
7
7
  // eslint-disable-next-line @repo/internal/react/disallow-unstable-values
8
8
  var testKey = "__test_".concat(Date.now(), "__");
9
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
9
10
  localStorage.setItem(testKey, testKey);
11
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
10
12
  localStorage.removeItem(testKey);
11
13
  return true;
12
14
  } catch (_unused) {
@@ -15,6 +17,7 @@ var isLocalStorageSupported = function isLocalStorageSupported() {
15
17
  };
16
18
  var safeLocalStorage = function safeLocalStorage() {
17
19
  if (isLocalStorageSupported()) {
20
+ // eslint-disable-next-line @atlaskit/platform/no-direct-web-storage-usage -- existing usage
18
21
  return localStorage;
19
22
  }
20
23
 
@@ -9,6 +9,7 @@ var _excluded = ["testId", "valueTextLabel", "isDisabled", "isLeftSidebarCollaps
9
9
  import * as React from 'react';
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { GRAB_AREA_LINE_SELECTOR, GRAB_AREA_SELECTOR } from '../../common/constants';
13
14
  /**
14
15
  * Determines the color of the grab line.
@@ -48,6 +49,9 @@ var lineStyles = css({
48
49
  backgroundColor: 'var(--ds-line)',
49
50
  transition: 'background-color 200ms'
50
51
  });
52
+ var lineMotionStyles = css({
53
+ transition: "var(--ds-button-hovered, background-color 150ms cubic-bezier(0.4, 1, 0.6, 1))"
54
+ });
51
55
  var grabAreaLineSelector = _defineProperty({}, GRAB_AREA_LINE_SELECTOR, true);
52
56
  var grabAreaSelector = _defineProperty({}, GRAB_AREA_SELECTOR, true);
53
57
  var GrabArea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -88,7 +92,7 @@ var GrabArea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
88
92
  onFocus: onFocus,
89
93
  onBlur: onBlur
90
94
  }, rest), jsx("span", _extends({
91
- css: lineStyles
95
+ css: [lineStyles, fg('platform-dst-motion-uplift-button') && lineMotionStyles]
92
96
  }, grabAreaLineSelector)));
93
97
  });
94
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "5.1.0",
3
+ "version": "5.2.1",
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/"
@@ -37,13 +37,13 @@
37
37
  "homepage": "https://atlassian.design/components/page-layout/",
38
38
  "dependencies": {
39
39
  "@atlaskit/ds-lib": "^8.0.0",
40
- "@atlaskit/icon": "^36.1.0",
40
+ "@atlaskit/icon": "^37.0.0",
41
41
  "@atlaskit/link": "^4.1.0",
42
- "@atlaskit/motion": "^7.2.0",
42
+ "@atlaskit/motion": "^7.3.0",
43
43
  "@atlaskit/platform-feature-flags": "^2.0.0",
44
- "@atlaskit/primitives": "^20.1.0",
44
+ "@atlaskit/primitives": "^20.5.0",
45
45
  "@atlaskit/react-compiler-gating": "^0.2.0",
46
- "@atlaskit/tokens": "^15.1.0",
46
+ "@atlaskit/tokens": "^15.5.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "@emotion/react": "^11.7.1",
49
49
  "bind-event-listener": "^3.0.0",
@@ -57,13 +57,13 @@
57
57
  "@af/accessibility-testing": "workspace:^",
58
58
  "@af/integration-testing": "workspace:^",
59
59
  "@atlaskit/atlassian-navigation": "^6.1.0",
60
- "@atlaskit/button": "^24.2.0",
60
+ "@atlaskit/button": "^24.3.0",
61
61
  "@atlaskit/docs": "^12.0.0",
62
- "@atlaskit/logo": "^21.2.0",
63
- "@atlaskit/menu": "^9.1.0",
62
+ "@atlaskit/logo": "^21.4.0",
63
+ "@atlaskit/menu": "^9.2.0",
64
64
  "@atlaskit/popup": "^5.1.0",
65
65
  "@atlaskit/section-message": "^9.2.0",
66
- "@atlaskit/side-navigation": "^12.1.0",
66
+ "@atlaskit/side-navigation": "^12.3.0",
67
67
  "@atlaskit/tooltip": "^23.1.0",
68
68
  "@atlassian/ssr-tests": "workspace:^",
69
69
  "@testing-library/react": "^16.3.0",
@@ -76,6 +76,10 @@
76
76
  "platform_dst_popup-disable-focuslock": {
77
77
  "type": "boolean",
78
78
  "referenceOnly": "true"
79
+ },
80
+ "platform-dst-motion-uplift-button": {
81
+ "type": "boolean",
82
+ "referenceOnly": true
79
83
  }
80
84
  },
81
85
  "keywords": [
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Structured MCP docs for `@atlaskit/page-layout`.
3
+ */
4
+
5
+ import path from 'path';
6
+
7
+ import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
8
+
9
+ import packageJson from './package.json';
10
+
11
+ const packagePath = path.resolve(__dirname);
12
+
13
+ const documentation: StructuredContentSource = {
14
+ package: {
15
+ package: '@atlaskit/page-layout',
16
+ packagePath,
17
+ packageJson,
18
+ overview:
19
+ "A collection of components which let you compose an application's page layout. Note that this package is deprecated in favor of the new navigation system.",
20
+ },
21
+ components: [
22
+ {
23
+ name: 'PageLayout',
24
+ description: 'The main container for composing a page layout.',
25
+ status: 'deprecated',
26
+ import: {
27
+ name: 'PageLayout',
28
+ package: '@atlaskit/page-layout/page-layout',
29
+ type: 'named',
30
+ packagePath,
31
+ packageJson,
32
+ },
33
+ usageGuidelines: [
34
+ 'Use `PageLayout` to define the overall structure of your page.',
35
+ 'Consider migrating to the new navigation system for new implementations.',
36
+ ],
37
+ keywords: ['layout', 'page', 'structure'],
38
+ categories: ['layout'],
39
+ examples: [
40
+ {
41
+ name: 'Basic page layout',
42
+ description: 'Basic usage of PageLayout.',
43
+ source: path.resolve(packagePath, './examples/01-basic-page-layout.tsx'),
44
+ },
45
+ ],
46
+ },
47
+ ],
48
+ };
49
+
50
+ export default documentation;