@atlaskit/navigation-system 8.0.0 → 8.1.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/components/skip-links/skip-link.compiled.css +2 -1
  3. package/dist/cjs/components/skip-links/skip-link.js +4 -2
  4. package/dist/cjs/components/skip-links/skip-links-container.compiled.css +7 -2
  5. package/dist/cjs/components/skip-links/skip-links-container.js +14 -6
  6. package/dist/cjs/ui/page-layout/aside.js +4 -1
  7. package/dist/cjs/ui/page-layout/banner.js +4 -1
  8. package/dist/cjs/ui/page-layout/main/main.js +2 -1
  9. package/dist/cjs/ui/page-layout/panel.js +4 -1
  10. package/dist/cjs/ui/page-layout/root.js +4 -3
  11. package/dist/cjs/ui/page-layout/top-nav/top-nav.js +11 -3
  12. package/dist/es2019/components/skip-links/skip-link.compiled.css +2 -1
  13. package/dist/es2019/components/skip-links/skip-link.js +4 -2
  14. package/dist/es2019/components/skip-links/skip-links-container.compiled.css +7 -2
  15. package/dist/es2019/components/skip-links/skip-links-container.js +14 -6
  16. package/dist/es2019/ui/page-layout/aside.js +4 -1
  17. package/dist/es2019/ui/page-layout/banner.js +4 -1
  18. package/dist/es2019/ui/page-layout/main/main.js +2 -1
  19. package/dist/es2019/ui/page-layout/panel.js +4 -1
  20. package/dist/es2019/ui/page-layout/root.js +4 -2
  21. package/dist/es2019/ui/page-layout/top-nav/top-nav.js +11 -3
  22. package/dist/esm/components/skip-links/skip-link.compiled.css +2 -1
  23. package/dist/esm/components/skip-links/skip-link.js +4 -2
  24. package/dist/esm/components/skip-links/skip-links-container.compiled.css +7 -2
  25. package/dist/esm/components/skip-links/skip-links-container.js +14 -6
  26. package/dist/esm/ui/page-layout/aside.js +4 -1
  27. package/dist/esm/ui/page-layout/banner.js +4 -1
  28. package/dist/esm/ui/page-layout/main/main.js +2 -1
  29. package/dist/esm/ui/page-layout/panel.js +4 -1
  30. package/dist/esm/ui/page-layout/root.js +4 -3
  31. package/dist/esm/ui/page-layout/top-nav/top-nav.js +11 -3
  32. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 8.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`6a19433e19f86`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a19433e19f86) -
8
+ Changes to skip links behind the `platform_dst_nav4_skip_link_a11y_1` feature gate:
9
+ - Visual improvements
10
+ - Removes skip links for `Banner`, `TopNav`, `Aside` and `Panel` slots
11
+ - Renames default skip link label for `Main` to 'Main content' (from 'Main Content')
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 8.0.0
4
18
 
5
19
  ### Major Changes
@@ -1 +1,2 @@
1
- ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
1
+
2
+ ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
@@ -10,11 +10,13 @@ require("./skip-link.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _bindEventListener = require("bind-event-listener");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _compiled = require("@atlaskit/primitives/compiled");
14
15
  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
16
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
16
17
  var styles = {
17
- skipLinkListItem: "_1pfhze3t"
18
+ skipLinkListItem: "_1pfhze3t",
19
+ skipLinkListItemNew: "_1rjcu2gc"
18
20
  };
19
21
 
20
22
  /**
@@ -107,7 +109,7 @@ var SkipLink = exports.SkipLink = function SkipLink(_ref) {
107
109
  window.scrollTo(0, 0);
108
110
  }, [id, onBeforeNavigate]);
109
111
  return /*#__PURE__*/_react.default.createElement("li", {
110
- className: (0, _runtime.ax)([styles.skipLinkListItem])
112
+ className: (0, _runtime.ax)([styles.skipLinkListItem, (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1') && styles.skipLinkListItemNew])
111
113
  }, /*#__PURE__*/_react.default.createElement(_compiled.Anchor
112
114
  /**
113
115
  * It looks like Safari handles link clicks during `pointerdown` unless it has an explicit `tabIndex={0}` :/
@@ -1,8 +1,12 @@
1
-
1
+ ._11c8i4vh{font:var(--ds-font-heading-xxsmall,normal 653 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
+ ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
4
  ._zulp1b66{gap:var(--ds-space-050,4px)}
5
+ ._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
4
6
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
5
- ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}._152tv47k{inset-block-start:var(--ds-space-250,20px)}
7
+ ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
8
+ ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
9
+ ._152tv47k{inset-block-start:var(--ds-space-250,20px)}
6
10
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
7
11
  ._1e02v47k{inset-inline-start:var(--ds-space-250,20px)}
8
12
  ._1e0c1txw{display:flex}
@@ -15,6 +19,7 @@
15
19
  ._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
16
20
  ._kqsw1n9t{position:fixed}
17
21
  ._lcxvglyw{pointer-events:none}
22
+ ._syazazsu{color:var(--ds-text-subtle,#505258)}
18
23
  ._tzy4idpf{opacity:0}
19
24
  ._18eu1wug:focus-within{pointer-events:auto}
20
25
  ._1digjh3g:focus-within{z-index:calc(infinity)}
@@ -13,14 +13,19 @@ var React = _react;
13
13
  var _runtime = require("@compiled/react/runtime");
14
14
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _compiled = require("@atlaskit/primitives/compiled");
17
18
  var _skipLink = require("./skip-link");
18
19
  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); }
19
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
22
  var styles = {
22
- root: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp _1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
23
- skipLinkList: "_zulp1b66 _1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t"
23
+ root: "_1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
24
+ rootOld: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp",
25
+ rootNew: "_2rko1mok _1rjcu2gc _18zrpxbi",
26
+ label: "_11c8i4vh _1rjcu2gc _syazazsu",
27
+ skipLinkList: "_1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t",
28
+ skipLinkListOld: "_zulp1b66"
24
29
  };
25
30
 
26
31
  /**
@@ -107,12 +112,15 @@ function SkipLinksContainer(_ref) {
107
112
  return /*#__PURE__*/React.createElement("div", {
108
113
  onKeyDown: closeOnEscape,
109
114
  "data-testid": testId ? "".concat(testId, "--skip-links-container") : undefined,
110
- className: (0, _runtime.ax)([styles.root])
111
- }, !isEmptyLabel && /*#__PURE__*/React.createElement(_compiled.Text, {
115
+ className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1') ? styles.rootNew : styles.rootOld])
116
+ }, !isEmptyLabel && ((0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1') ? /*#__PURE__*/React.createElement("div", {
117
+ "data-testid": testId ? "".concat(testId, "--skip-links-container--label") : undefined,
118
+ className: (0, _runtime.ax)([styles.label])
119
+ }, label) : /*#__PURE__*/React.createElement(_compiled.Text, {
112
120
  weight: "bold",
113
121
  testId: testId ? "".concat(testId, "--skip-links-container--label") : undefined
114
- }, label), /*#__PURE__*/React.createElement("ol", {
115
- className: (0, _runtime.ax)([styles.skipLinkList])
122
+ }, label)), /*#__PURE__*/React.createElement("ol", {
123
+ className: (0, _runtime.ax)([styles.skipLinkList, !(0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1') && styles.skipLinkListOld])
116
124
  }, sortedLinks.map(function (_ref2) {
117
125
  var id = _ref2.id,
118
126
  label = _ref2.label,
@@ -14,6 +14,7 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
16
  var _usePreviousValue = _interopRequireDefault(require("@atlaskit/ds-lib/use-previous-value"));
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _responsive = require("@atlaskit/primitives/responsive");
18
19
  var _useSkipLinkInternal = require("../../context/skip-links/use-skip-link-internal");
19
20
  var _constants = require("./constants");
@@ -89,11 +90,13 @@ function Aside(_ref) {
89
90
  * Don't show the skip link if the slot has 0 width.
90
91
  *
91
92
  * Remove `isHidden` usage after https://jplat.atlassian.net/browse/BLU-3951
93
+ *
94
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
92
95
  */
93
96
  (0, _useSkipLinkInternal.useSkipLinkInternal)({
94
97
  id: id,
95
98
  label: skipLinkLabel,
96
- isHidden: defaultWidth === 0
99
+ isHidden: defaultWidth === 0 || (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
97
100
  });
98
101
  var ref = (0, _react.useRef)(null);
99
102
  var _useState = (0, _react.useState)(defaultWidth),
@@ -10,6 +10,7 @@ require("./banner.compiled.css");
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var React = _react;
12
12
  var _runtime = require("@compiled/react/runtime");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _useSkipLinkInternal = require("../../context/skip-links/use-skip-link-internal");
14
15
  var _useIsFhsEnabled = require("../fhs-rollout/use-is-fhs-enabled");
15
16
  var _constants = require("./constants");
@@ -45,11 +46,13 @@ function Banner(_ref) {
45
46
 
46
47
  /**
47
48
  * Don't show the skip link if the slot has 0 height.
49
+ *
50
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
48
51
  */
49
52
  (0, _useSkipLinkInternal.useSkipLinkInternal)({
50
53
  id: id,
51
54
  label: skipLinkLabel,
52
- isHidden: height === 0
55
+ isHidden: height === 0 || (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
53
56
  });
54
57
  return /*#__PURE__*/React.createElement("div", {
55
58
  id: id,
@@ -10,6 +10,7 @@ require("./main.compiled.css");
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var React = _react;
12
12
  var _runtime = require("@compiled/react/runtime");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _useSkipLink = require("../../../context/skip-links/use-skip-link");
14
15
  var _constants = require("../constants");
15
16
  var _useLayoutId = require("../use-layout-id");
@@ -25,7 +26,7 @@ function Main(_ref) {
25
26
  var children = _ref.children,
26
27
  xcss = _ref.xcss,
27
28
  _ref$skipLinkLabel = _ref.skipLinkLabel,
28
- skipLinkLabel = _ref$skipLinkLabel === void 0 ? 'Main Content' : _ref$skipLinkLabel,
29
+ skipLinkLabel = _ref$skipLinkLabel === void 0 ? (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1') ? 'Main content' : 'Main Content' : _ref$skipLinkLabel,
29
30
  testId = _ref.testId,
30
31
  providedId = _ref.id;
31
32
  var id = (0, _useLayoutId.useLayoutId)({
@@ -13,6 +13,7 @@ var React = _react;
13
13
  var _runtime = require("@compiled/react/runtime");
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _responsive = require("@atlaskit/primitives/responsive");
17
18
  var _useSkipLinkInternal = require("../../context/skip-links/use-skip-link-internal");
18
19
  var _constants = require("./constants");
@@ -75,11 +76,13 @@ function Panel(_ref) {
75
76
  * Don't show the skip link if the slot has 0 width.
76
77
  *
77
78
  * Remove `isHidden` usage after https://jplat.atlassian.net/browse/BLU-3951
79
+ *
80
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
78
81
  */
79
82
  (0, _useSkipLinkInternal.useSkipLinkInternal)({
80
83
  id: id,
81
84
  label: skipLinkLabel,
82
- isHidden: defaultWidth === 0
85
+ isHidden: defaultWidth === 0 || (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
83
86
  });
84
87
  var ref = (0, _react.useRef)(null);
85
88
  var _useState = (0, _react.useState)(defaultWidth),
@@ -11,6 +11,7 @@ require("./root.compiled.css");
11
11
  var _runtime = require("@compiled/react/runtime");
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _skipLinksProvider = require("../../context/skip-links/skip-links-provider");
15
16
  var _topNavStartContextProvider = require("../../context/top-nav-start/top-nav-start-context-provider");
16
17
  var _hoistSlotSizesContext = require("./hoist-slot-sizes-context");
@@ -34,12 +35,12 @@ function Root(_ref) {
34
35
  xcss = _ref.xcss,
35
36
  _ref$UNSAFE_dangerous = _ref.UNSAFE_dangerouslyHoistSlotSizes,
36
37
  UNSAFE_dangerouslyHoistSlotSizes = _ref$UNSAFE_dangerous === void 0 ? false : _ref$UNSAFE_dangerous,
37
- _ref$skipLinksLabel = _ref.skipLinksLabel,
38
- skipLinksLabel = _ref$skipLinksLabel === void 0 ? 'Skip to:' : _ref$skipLinksLabel,
38
+ skipLinksLabel = _ref.skipLinksLabel,
39
39
  testId = _ref.testId,
40
40
  defaultSideNavCollapsed = _ref.defaultSideNavCollapsed,
41
41
  _ref$isSideNavShortcu = _ref.isSideNavShortcutEnabled,
42
42
  isSideNavShortcutEnabled = _ref$isSideNavShortcu === void 0 ? false : _ref$isSideNavShortcu;
43
+ var resolvedSkipLinksLabel = skipLinksLabel !== null && skipLinksLabel !== void 0 ? skipLinksLabel : (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1') ? 'Skip to' : 'Skip to:';
43
44
  var ref = (0, _react.useRef)(null);
44
45
  (0, _react.useEffect)(function () {
45
46
  if (process.env.NODE_ENV !== 'production') {
@@ -61,7 +62,7 @@ function Root(_ref) {
61
62
  }, /*#__PURE__*/_react.default.createElement(_topNavStartContextProvider.TopNavStartProvider, null, /*#__PURE__*/_react.default.createElement(_openLayerObserver.OpenLayerObserver, null, /*#__PURE__*/_react.default.createElement(_hoistSlotSizesContext.DangerouslyHoistSlotSizes.Provider, {
62
63
  value: UNSAFE_dangerouslyHoistSlotSizes
63
64
  }, /*#__PURE__*/_react.default.createElement(_skipLinksProvider.SkipLinksProvider, {
64
- label: skipLinksLabel,
65
+ label: resolvedSkipLinksLabel,
65
66
  testId: testId
66
67
  }, /*#__PURE__*/_react.default.createElement("div", {
67
68
  ref: ref,
@@ -12,7 +12,7 @@ var React = _react;
12
12
  var _runtime = require("@compiled/react/runtime");
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
14
  var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
15
- var _useSkipLink = require("../../../context/skip-links/use-skip-link");
15
+ var _useSkipLinkInternal = require("../../../context/skip-links/use-skip-link-internal");
16
16
  var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
17
17
  var _hasCustomThemeContext = require("../../top-nav-items/themed/has-custom-theme-context");
18
18
  var _hasDefaultBackgroundColorContext = require("../../top-nav-items/themed/has-default-background-color-context");
@@ -56,7 +56,11 @@ function TopNavOld(_ref) {
56
56
  var id = (0, _useLayoutId.useLayoutId)({
57
57
  providedId: providedId
58
58
  });
59
- (0, _useSkipLink.useSkipLink)(id, skipLinkLabel);
59
+ (0, _useSkipLinkInternal.useSkipLinkInternal)({
60
+ id: id,
61
+ label: skipLinkLabel,
62
+ isHidden: (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
63
+ });
60
64
  var hasIncreasedDefaultHeight = isFhsEnabled && (0, _platformFeatureFlags.fg)('platform_dst_nav4_top_nav_increase_height');
61
65
  var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
62
66
  var customTheme = (0, _useCustomTheme.useCustomTheme)(customThemeConfig);
@@ -105,7 +109,11 @@ function TopNavNew(_ref2) {
105
109
  var id = (0, _useLayoutId.useLayoutId)({
106
110
  providedId: providedId
107
111
  });
108
- (0, _useSkipLink.useSkipLink)(id, skipLinkLabel);
112
+ (0, _useSkipLinkInternal.useSkipLinkInternal)({
113
+ id: id,
114
+ label: skipLinkLabel,
115
+ isHidden: (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
116
+ });
109
117
  var hasIncreasedDefaultHeight = isFhsEnabled && (0, _platformFeatureFlags.fg)('platform_dst_nav4_top_nav_increase_height');
110
118
  var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
111
119
  var customTheme = (0, _useCustomThemeNew.useCustomThemeNew)(customThemeConfig);
@@ -1 +1,2 @@
1
- ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
1
+
2
+ ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
@@ -3,10 +3,12 @@ import "./skip-link.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
5
  import { bind } from 'bind-event-listener';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
7
8
  import { Anchor } from '@atlaskit/primitives/compiled';
8
9
  const styles = {
9
- skipLinkListItem: "_1pfhze3t"
10
+ skipLinkListItem: "_1pfhze3t",
11
+ skipLinkListItemNew: "_1rjcu2gc"
10
12
  };
11
13
 
12
14
  /**
@@ -100,7 +102,7 @@ export const SkipLink = ({
100
102
  window.scrollTo(0, 0);
101
103
  }, [id, onBeforeNavigate]);
102
104
  return /*#__PURE__*/React.createElement("li", {
103
- className: ax([styles.skipLinkListItem])
105
+ className: ax([styles.skipLinkListItem, fg('platform_dst_nav4_skip_link_a11y_1') && styles.skipLinkListItemNew])
104
106
  }, /*#__PURE__*/React.createElement(Anchor
105
107
  /**
106
108
  * It looks like Safari handles link clicks during `pointerdown` unless it has an explicit `tabIndex={0}` :/
@@ -1,8 +1,12 @@
1
-
1
+ ._11c8i4vh{font:var(--ds-font-heading-xxsmall,normal 653 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
+ ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
4
  ._zulp1b66{gap:var(--ds-space-050,4px)}
5
+ ._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
4
6
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
5
- ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}._152tv47k{inset-block-start:var(--ds-space-250,20px)}
7
+ ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
8
+ ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
9
+ ._152tv47k{inset-block-start:var(--ds-space-250,20px)}
6
10
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
7
11
  ._1e02v47k{inset-inline-start:var(--ds-space-250,20px)}
8
12
  ._1e0c1txw{display:flex}
@@ -15,6 +19,7 @@
15
19
  ._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
16
20
  ._kqsw1n9t{position:fixed}
17
21
  ._lcxvglyw{pointer-events:none}
22
+ ._syazazsu{color:var(--ds-text-subtle,#505258)}
18
23
  ._tzy4idpf{opacity:0}
19
24
  ._18eu1wug:focus-within{pointer-events:auto}
20
25
  ._1digjh3g:focus-within{z-index:calc(infinity)}
@@ -3,11 +3,16 @@ import "./skip-links-container.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useMemo } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { Text } from '@atlaskit/primitives/compiled';
7
8
  import { SkipLink } from './skip-link';
8
9
  const styles = {
9
- root: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp _1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
10
- skipLinkList: "_zulp1b66 _1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t"
10
+ root: "_1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
11
+ rootOld: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp",
12
+ rootNew: "_2rko1mok _1rjcu2gc _18zrpxbi",
13
+ label: "_11c8i4vh _1rjcu2gc _syazazsu",
14
+ skipLinkList: "_1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t",
15
+ skipLinkListOld: "_zulp1b66"
11
16
  };
12
17
 
13
18
  /**
@@ -88,12 +93,15 @@ export function SkipLinksContainer({
88
93
  return /*#__PURE__*/React.createElement("div", {
89
94
  onKeyDown: closeOnEscape,
90
95
  "data-testid": testId ? `${testId}--skip-links-container` : undefined,
91
- className: ax([styles.root])
92
- }, !isEmptyLabel && /*#__PURE__*/React.createElement(Text, {
96
+ className: ax([styles.root, fg('platform_dst_nav4_skip_link_a11y_1') ? styles.rootNew : styles.rootOld])
97
+ }, !isEmptyLabel && (fg('platform_dst_nav4_skip_link_a11y_1') ? /*#__PURE__*/React.createElement("div", {
98
+ "data-testid": testId ? `${testId}--skip-links-container--label` : undefined,
99
+ className: ax([styles.label])
100
+ }, label) : /*#__PURE__*/React.createElement(Text, {
93
101
  weight: "bold",
94
102
  testId: testId ? `${testId}--skip-links-container--label` : undefined
95
- }, label), /*#__PURE__*/React.createElement("ol", {
96
- className: ax([styles.skipLinkList])
103
+ }, label)), /*#__PURE__*/React.createElement("ol", {
104
+ className: ax([styles.skipLinkList, !fg('platform_dst_nav4_skip_link_a11y_1') && styles.skipLinkListOld])
97
105
  }, sortedLinks.map(({
98
106
  id,
99
107
  label,
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useContext, useEffect, useRef, useState } from 'react';
6
6
  import usePreviousValue from '@atlaskit/ds-lib/use-previous-value';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { media } from '@atlaskit/primitives/responsive';
8
9
  import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
9
10
  import { asidePanelSplitterId, asideVar, contentHeightWhenFixed, contentInsetBlockStart, UNSAFE_asideLayoutVar } from './constants';
@@ -76,11 +77,13 @@ export function Aside({
76
77
  * Don't show the skip link if the slot has 0 width.
77
78
  *
78
79
  * Remove `isHidden` usage after https://jplat.atlassian.net/browse/BLU-3951
80
+ *
81
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
79
82
  */
80
83
  useSkipLinkInternal({
81
84
  id,
82
85
  label: skipLinkLabel,
83
- isHidden: defaultWidth === 0
86
+ isHidden: defaultWidth === 0 || fg('platform_dst_nav4_skip_link_a11y_1')
84
87
  });
85
88
  const ref = useRef(null);
86
89
  const [width, setWidth] = useState(defaultWidth);
@@ -3,6 +3,7 @@ import "./banner.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 { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
7
8
  import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
8
9
  import { bannerMountedVar, localSlotLayers, UNSAFE_bannerVar } from './constants';
@@ -37,11 +38,13 @@ export function Banner({
37
38
 
38
39
  /**
39
40
  * Don't show the skip link if the slot has 0 height.
41
+ *
42
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
40
43
  */
41
44
  useSkipLinkInternal({
42
45
  id,
43
46
  label: skipLinkLabel,
44
- isHidden: height === 0
47
+ isHidden: height === 0 || fg('platform_dst_nav4_skip_link_a11y_1')
45
48
  });
46
49
  return /*#__PURE__*/React.createElement("div", {
47
50
  id: id,
@@ -3,6 +3,7 @@ import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Fragment } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { useSkipLink } from '../../../context/skip-links/use-skip-link';
7
8
  import { contentHeightWhenFixed, contentInsetBlockStart } from '../constants';
8
9
  import { useLayoutId } from '../use-layout-id';
@@ -16,7 +17,7 @@ const mainElementStyles = {
16
17
  export function Main({
17
18
  children,
18
19
  xcss,
19
- skipLinkLabel = 'Main Content',
20
+ skipLinkLabel = fg('platform_dst_nav4_skip_link_a11y_1') ? 'Main content' : 'Main Content',
20
21
  testId,
21
22
  id: providedId
22
23
  }) {
@@ -3,6 +3,7 @@ import "./panel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useCallback, useContext, useEffect, useRef, useState } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { media } from '@atlaskit/primitives/responsive';
7
8
  import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
8
9
  import { contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, panelPanelSplitterId, panelVar, sideNavLiveWidthVar, UNSAFE_panelLayoutVar } from './constants';
@@ -61,11 +62,13 @@ export function Panel({
61
62
  * Don't show the skip link if the slot has 0 width.
62
63
  *
63
64
  * Remove `isHidden` usage after https://jplat.atlassian.net/browse/BLU-3951
65
+ *
66
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
64
67
  */
65
68
  useSkipLinkInternal({
66
69
  id,
67
70
  label: skipLinkLabel,
68
- isHidden: defaultWidth === 0
71
+ isHidden: defaultWidth === 0 || fg('platform_dst_nav4_skip_link_a11y_1')
69
72
  });
70
73
  const ref = useRef(null);
71
74
  const [width, setWidth] = useState(defaultWidth);
@@ -3,6 +3,7 @@ import "./root.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useEffect, useRef } from 'react';
5
5
  import { OpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { SkipLinksProvider } from '../../context/skip-links/skip-links-provider';
7
8
  import { TopNavStartProvider } from '../../context/top-nav-start/top-nav-start-context-provider';
8
9
  import { DangerouslyHoistSlotSizes } from './hoist-slot-sizes-context';
@@ -25,11 +26,12 @@ export function Root({
25
26
  children,
26
27
  xcss,
27
28
  UNSAFE_dangerouslyHoistSlotSizes = false,
28
- skipLinksLabel = 'Skip to:',
29
+ skipLinksLabel,
29
30
  testId,
30
31
  defaultSideNavCollapsed,
31
32
  isSideNavShortcutEnabled = false
32
33
  }) {
34
+ const resolvedSkipLinksLabel = skipLinksLabel !== null && skipLinksLabel !== void 0 ? skipLinksLabel : fg('platform_dst_nav4_skip_link_a11y_1') ? 'Skip to' : 'Skip to:';
33
35
  const ref = useRef(null);
34
36
  useEffect(() => {
35
37
  if (process.env.NODE_ENV !== 'production') {
@@ -60,7 +62,7 @@ This message will not be displayed in production.
60
62
  }, /*#__PURE__*/React.createElement(TopNavStartProvider, null, /*#__PURE__*/React.createElement(OpenLayerObserver, null, /*#__PURE__*/React.createElement(DangerouslyHoistSlotSizes.Provider, {
61
63
  value: UNSAFE_dangerouslyHoistSlotSizes
62
64
  }, /*#__PURE__*/React.createElement(SkipLinksProvider, {
63
- label: skipLinksLabel,
65
+ label: resolvedSkipLinksLabel,
64
66
  testId: testId
65
67
  }, /*#__PURE__*/React.createElement("div", {
66
68
  ref: ref,
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useContext } from 'react';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
8
- import { useSkipLink } from '../../../context/skip-links/use-skip-link';
8
+ import { useSkipLinkInternal } from '../../../context/skip-links/use-skip-link-internal';
9
9
  import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
10
10
  import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
11
11
  import { HasDefaultBackgroundColorContext } from '../../top-nav-items/themed/has-default-background-color-context';
@@ -49,7 +49,11 @@ function TopNavOld({
49
49
  const id = useLayoutId({
50
50
  providedId
51
51
  });
52
- useSkipLink(id, skipLinkLabel);
52
+ useSkipLinkInternal({
53
+ id,
54
+ label: skipLinkLabel,
55
+ isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
56
+ });
53
57
  const hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
54
58
  const height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
55
59
  const customTheme = useCustomTheme(customThemeConfig);
@@ -99,7 +103,11 @@ function TopNavNew({
99
103
  const id = useLayoutId({
100
104
  providedId
101
105
  });
102
- useSkipLink(id, skipLinkLabel);
106
+ useSkipLinkInternal({
107
+ id,
108
+ label: skipLinkLabel,
109
+ isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
110
+ });
103
111
  const hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
104
112
  const height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
105
113
  const customTheme = useCustomThemeNew(customThemeConfig);
@@ -1 +1,2 @@
1
- ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
1
+
2
+ ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
@@ -3,10 +3,12 @@ import "./skip-link.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
5
  import { bind } from 'bind-event-listener';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
7
8
  import { Anchor } from '@atlaskit/primitives/compiled';
8
9
  var styles = {
9
- skipLinkListItem: "_1pfhze3t"
10
+ skipLinkListItem: "_1pfhze3t",
11
+ skipLinkListItemNew: "_1rjcu2gc"
10
12
  };
11
13
 
12
14
  /**
@@ -99,7 +101,7 @@ export var SkipLink = function SkipLink(_ref) {
99
101
  window.scrollTo(0, 0);
100
102
  }, [id, onBeforeNavigate]);
101
103
  return /*#__PURE__*/React.createElement("li", {
102
- className: ax([styles.skipLinkListItem])
104
+ className: ax([styles.skipLinkListItem, fg('platform_dst_nav4_skip_link_a11y_1') && styles.skipLinkListItemNew])
103
105
  }, /*#__PURE__*/React.createElement(Anchor
104
106
  /**
105
107
  * It looks like Safari handles link clicks during `pointerdown` unless it has an explicit `tabIndex={0}` :/
@@ -1,8 +1,12 @@
1
-
1
+ ._11c8i4vh{font:var(--ds-font-heading-xxsmall,normal 653 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
+ ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
4
  ._zulp1b66{gap:var(--ds-space-050,4px)}
5
+ ._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
4
6
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
5
- ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}._152tv47k{inset-block-start:var(--ds-space-250,20px)}
7
+ ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
8
+ ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
9
+ ._152tv47k{inset-block-start:var(--ds-space-250,20px)}
6
10
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
7
11
  ._1e02v47k{inset-inline-start:var(--ds-space-250,20px)}
8
12
  ._1e0c1txw{display:flex}
@@ -15,6 +19,7 @@
15
19
  ._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
16
20
  ._kqsw1n9t{position:fixed}
17
21
  ._lcxvglyw{pointer-events:none}
22
+ ._syazazsu{color:var(--ds-text-subtle,#505258)}
18
23
  ._tzy4idpf{opacity:0}
19
24
  ._18eu1wug:focus-within{pointer-events:auto}
20
25
  ._1digjh3g:focus-within{z-index:calc(infinity)}
@@ -7,11 +7,16 @@ import { ax, ix } from "@compiled/react/runtime";
7
7
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
8
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
9
  import { useMemo } from 'react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { Text } from '@atlaskit/primitives/compiled';
11
12
  import { SkipLink } from './skip-link';
12
13
  var styles = {
13
- root: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp _1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
14
- skipLinkList: "_zulp1b66 _1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t"
14
+ root: "_1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
15
+ rootOld: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp",
16
+ rootNew: "_2rko1mok _1rjcu2gc _18zrpxbi",
17
+ label: "_11c8i4vh _1rjcu2gc _syazazsu",
18
+ skipLinkList: "_1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t",
19
+ skipLinkListOld: "_zulp1b66"
15
20
  };
16
21
 
17
22
  /**
@@ -98,12 +103,15 @@ export function SkipLinksContainer(_ref) {
98
103
  return /*#__PURE__*/React.createElement("div", {
99
104
  onKeyDown: closeOnEscape,
100
105
  "data-testid": testId ? "".concat(testId, "--skip-links-container") : undefined,
101
- className: ax([styles.root])
102
- }, !isEmptyLabel && /*#__PURE__*/React.createElement(Text, {
106
+ className: ax([styles.root, fg('platform_dst_nav4_skip_link_a11y_1') ? styles.rootNew : styles.rootOld])
107
+ }, !isEmptyLabel && (fg('platform_dst_nav4_skip_link_a11y_1') ? /*#__PURE__*/React.createElement("div", {
108
+ "data-testid": testId ? "".concat(testId, "--skip-links-container--label") : undefined,
109
+ className: ax([styles.label])
110
+ }, label) : /*#__PURE__*/React.createElement(Text, {
103
111
  weight: "bold",
104
112
  testId: testId ? "".concat(testId, "--skip-links-container--label") : undefined
105
- }, label), /*#__PURE__*/React.createElement("ol", {
106
- className: ax([styles.skipLinkList])
113
+ }, label)), /*#__PURE__*/React.createElement("ol", {
114
+ className: ax([styles.skipLinkList, !fg('platform_dst_nav4_skip_link_a11y_1') && styles.skipLinkListOld])
107
115
  }, sortedLinks.map(function (_ref2) {
108
116
  var id = _ref2.id,
109
117
  label = _ref2.label,
@@ -6,6 +6,7 @@ import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  import { useContext, useEffect, useRef, useState } from 'react';
8
8
  import usePreviousValue from '@atlaskit/ds-lib/use-previous-value';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { media } from '@atlaskit/primitives/responsive';
10
11
  import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
11
12
  import { asidePanelSplitterId, asideVar, contentHeightWhenFixed, contentInsetBlockStart, UNSAFE_asideLayoutVar } from './constants';
@@ -80,11 +81,13 @@ export function Aside(_ref) {
80
81
  * Don't show the skip link if the slot has 0 width.
81
82
  *
82
83
  * Remove `isHidden` usage after https://jplat.atlassian.net/browse/BLU-3951
84
+ *
85
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
83
86
  */
84
87
  useSkipLinkInternal({
85
88
  id: id,
86
89
  label: skipLinkLabel,
87
- isHidden: defaultWidth === 0
90
+ isHidden: defaultWidth === 0 || fg('platform_dst_nav4_skip_link_a11y_1')
88
91
  });
89
92
  var ref = useRef(null);
90
93
  var _useState = useState(defaultWidth),
@@ -3,6 +3,7 @@ import "./banner.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 { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
7
8
  import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
8
9
  import { bannerMountedVar, localSlotLayers, UNSAFE_bannerVar } from './constants';
@@ -37,11 +38,13 @@ export function Banner(_ref) {
37
38
 
38
39
  /**
39
40
  * Don't show the skip link if the slot has 0 height.
41
+ *
42
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
40
43
  */
41
44
  useSkipLinkInternal({
42
45
  id: id,
43
46
  label: skipLinkLabel,
44
- isHidden: height === 0
47
+ isHidden: height === 0 || fg('platform_dst_nav4_skip_link_a11y_1')
45
48
  });
46
49
  return /*#__PURE__*/React.createElement("div", {
47
50
  id: id,
@@ -3,6 +3,7 @@ import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Fragment } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { useSkipLink } from '../../../context/skip-links/use-skip-link';
7
8
  import { contentHeightWhenFixed, contentInsetBlockStart } from '../constants';
8
9
  import { useLayoutId } from '../use-layout-id';
@@ -17,7 +18,7 @@ export function Main(_ref) {
17
18
  var children = _ref.children,
18
19
  xcss = _ref.xcss,
19
20
  _ref$skipLinkLabel = _ref.skipLinkLabel,
20
- skipLinkLabel = _ref$skipLinkLabel === void 0 ? 'Main Content' : _ref$skipLinkLabel,
21
+ skipLinkLabel = _ref$skipLinkLabel === void 0 ? fg('platform_dst_nav4_skip_link_a11y_1') ? 'Main content' : 'Main Content' : _ref$skipLinkLabel,
21
22
  testId = _ref.testId,
22
23
  providedId = _ref.id;
23
24
  var id = useLayoutId({
@@ -5,6 +5,7 @@ import "./panel.compiled.css";
5
5
  import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  import { useCallback, useContext, useEffect, useRef, useState } from 'react';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { media } from '@atlaskit/primitives/responsive';
9
10
  import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
10
11
  import { contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, panelPanelSplitterId, panelVar, sideNavLiveWidthVar, UNSAFE_panelLayoutVar } from './constants';
@@ -66,11 +67,13 @@ export function Panel(_ref) {
66
67
  * Don't show the skip link if the slot has 0 width.
67
68
  *
68
69
  * Remove `isHidden` usage after https://jplat.atlassian.net/browse/BLU-3951
70
+ *
71
+ * TODO: when cleaning up 'platform_dst_nav4_skip_link_a11y_1' remove this call entirely
69
72
  */
70
73
  useSkipLinkInternal({
71
74
  id: id,
72
75
  label: skipLinkLabel,
73
- isHidden: defaultWidth === 0
76
+ isHidden: defaultWidth === 0 || fg('platform_dst_nav4_skip_link_a11y_1')
74
77
  });
75
78
  var ref = useRef(null);
76
79
  var _useState = useState(defaultWidth),
@@ -3,6 +3,7 @@ import "./root.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useEffect, useRef } from 'react';
5
5
  import { OpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { SkipLinksProvider } from '../../context/skip-links/skip-links-provider';
7
8
  import { TopNavStartProvider } from '../../context/top-nav-start/top-nav-start-context-provider';
8
9
  import { DangerouslyHoistSlotSizes } from './hoist-slot-sizes-context';
@@ -26,12 +27,12 @@ export function Root(_ref) {
26
27
  xcss = _ref.xcss,
27
28
  _ref$UNSAFE_dangerous = _ref.UNSAFE_dangerouslyHoistSlotSizes,
28
29
  UNSAFE_dangerouslyHoistSlotSizes = _ref$UNSAFE_dangerous === void 0 ? false : _ref$UNSAFE_dangerous,
29
- _ref$skipLinksLabel = _ref.skipLinksLabel,
30
- skipLinksLabel = _ref$skipLinksLabel === void 0 ? 'Skip to:' : _ref$skipLinksLabel,
30
+ skipLinksLabel = _ref.skipLinksLabel,
31
31
  testId = _ref.testId,
32
32
  defaultSideNavCollapsed = _ref.defaultSideNavCollapsed,
33
33
  _ref$isSideNavShortcu = _ref.isSideNavShortcutEnabled,
34
34
  isSideNavShortcutEnabled = _ref$isSideNavShortcu === void 0 ? false : _ref$isSideNavShortcu;
35
+ var resolvedSkipLinksLabel = skipLinksLabel !== null && skipLinksLabel !== void 0 ? skipLinksLabel : fg('platform_dst_nav4_skip_link_a11y_1') ? 'Skip to' : 'Skip to:';
35
36
  var ref = useRef(null);
36
37
  useEffect(function () {
37
38
  if (process.env.NODE_ENV !== 'production') {
@@ -53,7 +54,7 @@ export function Root(_ref) {
53
54
  }, /*#__PURE__*/React.createElement(TopNavStartProvider, null, /*#__PURE__*/React.createElement(OpenLayerObserver, null, /*#__PURE__*/React.createElement(DangerouslyHoistSlotSizes.Provider, {
54
55
  value: UNSAFE_dangerouslyHoistSlotSizes
55
56
  }, /*#__PURE__*/React.createElement(SkipLinksProvider, {
56
- label: skipLinksLabel,
57
+ label: resolvedSkipLinksLabel,
57
58
  testId: testId
58
59
  }, /*#__PURE__*/React.createElement("div", {
59
60
  ref: ref,
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useContext } from 'react';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
8
- import { useSkipLink } from '../../../context/skip-links/use-skip-link';
8
+ import { useSkipLinkInternal } from '../../../context/skip-links/use-skip-link-internal';
9
9
  import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
10
10
  import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
11
11
  import { HasDefaultBackgroundColorContext } from '../../top-nav-items/themed/has-default-background-color-context';
@@ -49,7 +49,11 @@ function TopNavOld(_ref) {
49
49
  var id = useLayoutId({
50
50
  providedId: providedId
51
51
  });
52
- useSkipLink(id, skipLinkLabel);
52
+ useSkipLinkInternal({
53
+ id: id,
54
+ label: skipLinkLabel,
55
+ isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
56
+ });
53
57
  var hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
54
58
  var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
55
59
  var customTheme = useCustomTheme(customThemeConfig);
@@ -98,7 +102,11 @@ function TopNavNew(_ref2) {
98
102
  var id = useLayoutId({
99
103
  providedId: providedId
100
104
  });
101
- useSkipLink(id, skipLinkLabel);
105
+ useSkipLinkInternal({
106
+ id: id,
107
+ label: skipLinkLabel,
108
+ isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
109
+ });
102
110
  var hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
103
111
  var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
104
112
  var customTheme = useCustomThemeNew(customThemeConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "The latest navigation system for Atlassian apps.",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
6
6
  "author": "Atlassian Pty Ltd",
@@ -72,12 +72,12 @@
72
72
  "dependencies": {
73
73
  "@atlaskit/analytics-next": "^11.2.0",
74
74
  "@atlaskit/app-provider": "^4.3.0",
75
- "@atlaskit/avatar": "^25.11.0",
75
+ "@atlaskit/avatar": "^25.13.0",
76
76
  "@atlaskit/button": "^23.11.0",
77
77
  "@atlaskit/css": "^0.19.0",
78
78
  "@atlaskit/ds-lib": "^7.0.0",
79
- "@atlaskit/icon": "^34.2.0",
80
- "@atlaskit/layering": "^3.6.0",
79
+ "@atlaskit/icon": "^34.3.0",
80
+ "@atlaskit/layering": "^3.7.0",
81
81
  "@atlaskit/logo": "^20.0.0",
82
82
  "@atlaskit/platform-feature-flags": "^1.1.0",
83
83
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
@@ -111,7 +111,7 @@
111
111
  "@atlaskit/link": "^3.4.0",
112
112
  "@atlaskit/lozenge": "^13.7.0",
113
113
  "@atlaskit/menu": "^8.5.0",
114
- "@atlaskit/modal-dialog": "^14.15.0",
114
+ "@atlaskit/modal-dialog": "^14.17.0",
115
115
  "@atlaskit/onboarding": "^14.6.0",
116
116
  "@atlaskit/page-header": "^12.1.0",
117
117
  "@atlaskit/page-layout": "^4.3.0",
@@ -183,6 +183,9 @@
183
183
  },
184
184
  "platform_dst_nav4_custom_theming_fhs_1": {
185
185
  "type": "boolean"
186
+ },
187
+ "platform_dst_nav4_skip_link_a11y_1": {
188
+ "type": "boolean"
186
189
  }
187
190
  },
188
191
  "homepage": "https://atlassian.design/components/navigation-system"