@atlaskit/navigation-system 8.0.0 → 8.2.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 +26 -0
- package/dist/cjs/components/skip-links/skip-link.compiled.css +2 -1
- package/dist/cjs/components/skip-links/skip-link.js +4 -2
- package/dist/cjs/components/skip-links/skip-links-container.compiled.css +7 -2
- package/dist/cjs/components/skip-links/skip-links-container.js +14 -6
- package/dist/cjs/ui/page-layout/aside.js +4 -1
- package/dist/cjs/ui/page-layout/banner.js +4 -1
- package/dist/cjs/ui/page-layout/main/main.js +2 -1
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -7
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +8 -11
- package/dist/cjs/ui/page-layout/panel.js +4 -1
- package/dist/cjs/ui/page-layout/root.js +4 -3
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +11 -3
- package/dist/es2019/components/skip-links/skip-link.compiled.css +2 -1
- package/dist/es2019/components/skip-links/skip-link.js +4 -2
- package/dist/es2019/components/skip-links/skip-links-container.compiled.css +7 -2
- package/dist/es2019/components/skip-links/skip-links-container.js +14 -6
- package/dist/es2019/ui/page-layout/aside.js +4 -1
- package/dist/es2019/ui/page-layout/banner.js +4 -1
- package/dist/es2019/ui/page-layout/main/main.js +2 -1
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -7
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +8 -11
- package/dist/es2019/ui/page-layout/panel.js +4 -1
- package/dist/es2019/ui/page-layout/root.js +4 -2
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +11 -3
- package/dist/esm/components/skip-links/skip-link.compiled.css +2 -1
- package/dist/esm/components/skip-links/skip-link.js +4 -2
- package/dist/esm/components/skip-links/skip-links-container.compiled.css +7 -2
- package/dist/esm/components/skip-links/skip-links-container.js +14 -6
- package/dist/esm/ui/page-layout/aside.js +4 -1
- package/dist/esm/ui/page-layout/banner.js +4 -1
- package/dist/esm/ui/page-layout/main/main.js +2 -1
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -7
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +8 -11
- package/dist/esm/ui/page-layout/panel.js +4 -1
- package/dist/esm/ui/page-layout/root.js +4 -3
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +11 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 8.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`0535fe6d19c87`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0535fe6d19c87) -
|
|
8
|
+
Cleans up the `platform_dst_nav4_side_nav_resize_tooltip_feedback` feature gate. The
|
|
9
|
+
`SideNavPanelSplitter` tooltip now has improved visuals.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 8.1.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`6a19433e19f86`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a19433e19f86) -
|
|
20
|
+
Changes to skip links behind the `platform_dst_nav4_skip_link_a11y_1` feature gate:
|
|
21
|
+
- Visual improvements
|
|
22
|
+
- Removes skip links for `Banner`, `TopNav`, `Aside` and `Panel` slots
|
|
23
|
+
- Renames default skip link label for `Main` to 'Main content' (from 'Main Content')
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 8.0.0
|
|
4
30
|
|
|
5
31
|
### Major Changes
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
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
|
-
.
|
|
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: "
|
|
23
|
-
|
|
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(
|
|
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)({
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
._1e0c1ule{display:block}
|
|
10
10
|
._1e0cglyw{display:none}
|
|
11
11
|
._1lww188d{transition-delay:.3s}
|
|
12
|
-
._1lww5cps{transition-delay:0ms}
|
|
13
|
-
._1oec1yx9{transition-duration:.1s}
|
|
14
12
|
._1oec6ebc{transition-duration:.15s}
|
|
15
13
|
._1pbykb7n{z-index:1}
|
|
16
14
|
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
@@ -29,15 +27,10 @@
|
|
|
29
27
|
._syaz1kw7{color:inherit}
|
|
30
28
|
._u7coidpf{inset-block-end:0}
|
|
31
29
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
32
|
-
._1cg4fnf5:focus-within{transition-duration:.2s}
|
|
33
|
-
._1dr21ylx:focus-within{transition-property:color}
|
|
34
30
|
._vp7g6x5g:focus-within{color:var(--ds-text-selected,#1868db)}
|
|
35
|
-
._1gavfnf5:hover{transition-delay:.2s}
|
|
36
|
-
._1s5z1ylx:hover{transition-property:color}
|
|
37
31
|
._30l36x5g:hover{color:var(--ds-text-selected,#1868db)}
|
|
38
32
|
._d0al11mm:hover{cursor:col-resize}
|
|
39
33
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
40
|
-
._le1bfnf5:hover{transition-duration:.2s}
|
|
41
34
|
._1gglglyw:active{transition:none}
|
|
42
35
|
._9h8h12zz:active{color:var(--ds-link-pressed,#1558bc)}
|
|
43
36
|
@media (min-width:48rem){._181n1ule{display:block}}
|
|
@@ -21,7 +21,6 @@ var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
|
21
21
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
22
22
|
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
23
23
|
var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
|
|
24
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
24
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
26
25
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
27
26
|
var _blockDraggingToIframes = require("@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes");
|
|
@@ -54,10 +53,8 @@ var containerStyles = {
|
|
|
54
53
|
positionStart: "_1e02zeo2"
|
|
55
54
|
};
|
|
56
55
|
var grabAreaStyles = {
|
|
57
|
-
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
58
|
-
fullHeightSidebar: "_d0al11mm"
|
|
59
|
-
oldTransition: "_1oec1yx9 _1lww5cps _1gavfnf5 _1dr21ylx _1s5z1ylx _1cg4fnf5 _le1bfnf5",
|
|
60
|
-
newTransition: "_1oec6ebc _1lww188d _6fl41ytf"
|
|
56
|
+
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _1oec6ebc _1lww188d _6fl41ytf _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
57
|
+
fullHeightSidebar: "_d0al11mm"
|
|
61
58
|
};
|
|
62
59
|
var lineStyles = {
|
|
63
60
|
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
@@ -124,12 +121,12 @@ var MaybeTooltip = function MaybeTooltip(_ref2) {
|
|
|
124
121
|
testId: testId,
|
|
125
122
|
content: tooltipContent,
|
|
126
123
|
shortcut: shortcut,
|
|
127
|
-
position:
|
|
124
|
+
position: "mouse-y",
|
|
128
125
|
mousePosition: "right",
|
|
129
126
|
isScreenReaderAnnouncementDisabled: true,
|
|
130
|
-
component:
|
|
131
|
-
UNSAFE_shouldAlwaysFadeIn:
|
|
132
|
-
UNSAFE_shouldRenderToParent:
|
|
127
|
+
component: PanelSplitterTooltip,
|
|
128
|
+
UNSAFE_shouldAlwaysFadeIn: true,
|
|
129
|
+
UNSAFE_shouldRenderToParent: true
|
|
133
130
|
}, children);
|
|
134
131
|
}
|
|
135
132
|
return children;
|
|
@@ -402,12 +399,12 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
402
399
|
}, /*#__PURE__*/React.createElement(MaybeTooltip, {
|
|
403
400
|
tooltipContent: tooltipContent,
|
|
404
401
|
shortcut: shortcut,
|
|
405
|
-
testId: testId
|
|
402
|
+
testId: testId ? "".concat(testId, "-tooltip") : undefined
|
|
406
403
|
}, /*#__PURE__*/React.createElement("div", {
|
|
407
404
|
ref: splitterRef,
|
|
408
405
|
"data-testid": testId,
|
|
409
406
|
onDoubleClick: onDoubleClick,
|
|
410
|
-
className: (0, _runtime.ax)([grabAreaStyles.root, isFhsEnabled && grabAreaStyles.fullHeightSidebar
|
|
407
|
+
className: (0, _runtime.ax)([grabAreaStyles.root, isFhsEnabled && grabAreaStyles.fullHeightSidebar])
|
|
411
408
|
}, /*#__PURE__*/React.createElement(_visuallyHidden.default, null, /*#__PURE__*/React.createElement("input", {
|
|
412
409
|
type: "range",
|
|
413
410
|
value: rangeInputValue,
|
|
@@ -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
|
-
|
|
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:
|
|
65
|
+
label: resolvedSkipLinksLabel,
|
|
65
66
|
testId: testId
|
|
66
67
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
67
68
|
ref: ref,
|
|
@@ -227,7 +227,7 @@ function SideNavInternal(_ref) {
|
|
|
227
227
|
if (openLayerObserver && openLayerObserver.getCount({
|
|
228
228
|
namespace: _constants.openLayerObserverTopNavStartNamespace,
|
|
229
229
|
type: 'popup'
|
|
230
|
-
}) > 0
|
|
230
|
+
}) > 0) {
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
233
|
var prevFlyoutState = flyoutStateRef.current;
|
|
@@ -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
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
-
.
|
|
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: "
|
|
10
|
-
|
|
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(
|
|
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
|
}) {
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
._1e0c1ule{display:block}
|
|
10
10
|
._1e0cglyw{display:none}
|
|
11
11
|
._1lww188d{transition-delay:.3s}
|
|
12
|
-
._1lww5cps{transition-delay:0ms}
|
|
13
|
-
._1oec1yx9{transition-duration:.1s}
|
|
14
12
|
._1oec6ebc{transition-duration:.15s}
|
|
15
13
|
._1pbykb7n{z-index:1}
|
|
16
14
|
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
@@ -29,15 +27,10 @@
|
|
|
29
27
|
._syaz1kw7{color:inherit}
|
|
30
28
|
._u7coidpf{inset-block-end:0}
|
|
31
29
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
32
|
-
._1cg4fnf5:focus-within{transition-duration:.2s}
|
|
33
|
-
._1dr21ylx:focus-within{transition-property:color}
|
|
34
30
|
._vp7g6x5g:focus-within{color:var(--ds-text-selected,#1868db)}
|
|
35
|
-
._1gavfnf5:hover{transition-delay:.2s}
|
|
36
|
-
._1s5z1ylx:hover{transition-property:color}
|
|
37
31
|
._30l36x5g:hover{color:var(--ds-text-selected,#1868db)}
|
|
38
32
|
._d0al11mm:hover{cursor:col-resize}
|
|
39
33
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
40
|
-
._le1bfnf5:hover{transition-duration:.2s}
|
|
41
34
|
._1gglglyw:active{transition:none}
|
|
42
35
|
._9h8h12zz:active{color:var(--ds-link-pressed,#1558bc)}
|
|
43
36
|
@media (min-width:48rem){._181n1ule{display:block}}
|
|
@@ -10,7 +10,6 @@ import invariant from 'tiny-invariant';
|
|
|
10
10
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
11
11
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
12
12
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
15
14
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
16
15
|
import { blockDraggingToIFrames } from '@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes';
|
|
@@ -42,10 +41,8 @@ const containerStyles = {
|
|
|
42
41
|
positionStart: "_1e02zeo2"
|
|
43
42
|
};
|
|
44
43
|
const grabAreaStyles = {
|
|
45
|
-
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
46
|
-
fullHeightSidebar: "_d0al11mm"
|
|
47
|
-
oldTransition: "_1oec1yx9 _1lww5cps _1gavfnf5 _1dr21ylx _1s5z1ylx _1cg4fnf5 _le1bfnf5",
|
|
48
|
-
newTransition: "_1oec6ebc _1lww188d _6fl41ytf"
|
|
44
|
+
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _1oec6ebc _1lww188d _6fl41ytf _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
45
|
+
fullHeightSidebar: "_d0al11mm"
|
|
49
46
|
};
|
|
50
47
|
const lineStyles = {
|
|
51
48
|
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
@@ -112,12 +109,12 @@ const MaybeTooltip = ({
|
|
|
112
109
|
testId: testId,
|
|
113
110
|
content: tooltipContent,
|
|
114
111
|
shortcut: shortcut,
|
|
115
|
-
position:
|
|
112
|
+
position: "mouse-y",
|
|
116
113
|
mousePosition: "right",
|
|
117
114
|
isScreenReaderAnnouncementDisabled: true,
|
|
118
|
-
component:
|
|
119
|
-
UNSAFE_shouldAlwaysFadeIn:
|
|
120
|
-
UNSAFE_shouldRenderToParent:
|
|
115
|
+
component: PanelSplitterTooltip,
|
|
116
|
+
UNSAFE_shouldAlwaysFadeIn: true,
|
|
117
|
+
UNSAFE_shouldRenderToParent: true
|
|
121
118
|
}, children);
|
|
122
119
|
}
|
|
123
120
|
return children;
|
|
@@ -379,12 +376,12 @@ const PortaledPanelSplitter = ({
|
|
|
379
376
|
}, /*#__PURE__*/React.createElement(MaybeTooltip, {
|
|
380
377
|
tooltipContent: tooltipContent,
|
|
381
378
|
shortcut: shortcut,
|
|
382
|
-
testId: testId
|
|
379
|
+
testId: testId ? `${testId}-tooltip` : undefined
|
|
383
380
|
}, /*#__PURE__*/React.createElement("div", {
|
|
384
381
|
ref: splitterRef,
|
|
385
382
|
"data-testid": testId,
|
|
386
383
|
onDoubleClick: onDoubleClick,
|
|
387
|
-
className: ax([grabAreaStyles.root, isFhsEnabled && grabAreaStyles.fullHeightSidebar
|
|
384
|
+
className: ax([grabAreaStyles.root, isFhsEnabled && grabAreaStyles.fullHeightSidebar])
|
|
388
385
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement("input", {
|
|
389
386
|
type: "range",
|
|
390
387
|
value: rangeInputValue,
|
|
@@ -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
|
|
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:
|
|
65
|
+
label: resolvedSkipLinksLabel,
|
|
64
66
|
testId: testId
|
|
65
67
|
}, /*#__PURE__*/React.createElement("div", {
|
|
66
68
|
ref: ref,
|
|
@@ -206,7 +206,7 @@ function SideNavInternal({
|
|
|
206
206
|
if (openLayerObserver && openLayerObserver.getCount({
|
|
207
207
|
namespace: openLayerObserverTopNavStartNamespace,
|
|
208
208
|
type: 'popup'
|
|
209
|
-
}) > 0
|
|
209
|
+
}) > 0) {
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
const prevFlyoutState = flyoutStateRef.current;
|
|
@@ -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 {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
.
|
|
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: "
|
|
14
|
-
|
|
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(
|
|
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({
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
._1e0c1ule{display:block}
|
|
10
10
|
._1e0cglyw{display:none}
|
|
11
11
|
._1lww188d{transition-delay:.3s}
|
|
12
|
-
._1lww5cps{transition-delay:0ms}
|
|
13
|
-
._1oec1yx9{transition-duration:.1s}
|
|
14
12
|
._1oec6ebc{transition-duration:.15s}
|
|
15
13
|
._1pbykb7n{z-index:1}
|
|
16
14
|
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
@@ -29,15 +27,10 @@
|
|
|
29
27
|
._syaz1kw7{color:inherit}
|
|
30
28
|
._u7coidpf{inset-block-end:0}
|
|
31
29
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
32
|
-
._1cg4fnf5:focus-within{transition-duration:.2s}
|
|
33
|
-
._1dr21ylx:focus-within{transition-property:color}
|
|
34
30
|
._vp7g6x5g:focus-within{color:var(--ds-text-selected,#1868db)}
|
|
35
|
-
._1gavfnf5:hover{transition-delay:.2s}
|
|
36
|
-
._1s5z1ylx:hover{transition-property:color}
|
|
37
31
|
._30l36x5g:hover{color:var(--ds-text-selected,#1868db)}
|
|
38
32
|
._d0al11mm:hover{cursor:col-resize}
|
|
39
33
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
40
|
-
._le1bfnf5:hover{transition-duration:.2s}
|
|
41
34
|
._1gglglyw:active{transition:none}
|
|
42
35
|
._9h8h12zz:active{color:var(--ds-link-pressed,#1558bc)}
|
|
43
36
|
@media (min-width:48rem){._181n1ule{display:block}}
|
|
@@ -16,7 +16,6 @@ import invariant from 'tiny-invariant';
|
|
|
16
16
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
17
17
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
18
18
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
19
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
21
20
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
22
21
|
import { blockDraggingToIFrames } from '@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes';
|
|
@@ -45,10 +44,8 @@ var containerStyles = {
|
|
|
45
44
|
positionStart: "_1e02zeo2"
|
|
46
45
|
};
|
|
47
46
|
var grabAreaStyles = {
|
|
48
|
-
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
49
|
-
fullHeightSidebar: "_d0al11mm"
|
|
50
|
-
oldTransition: "_1oec1yx9 _1lww5cps _1gavfnf5 _1dr21ylx _1s5z1ylx _1cg4fnf5 _le1bfnf5",
|
|
51
|
-
newTransition: "_1oec6ebc _1lww188d _6fl41ytf"
|
|
47
|
+
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _1oec6ebc _1lww188d _6fl41ytf _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
48
|
+
fullHeightSidebar: "_d0al11mm"
|
|
52
49
|
};
|
|
53
50
|
var lineStyles = {
|
|
54
51
|
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
@@ -115,12 +112,12 @@ var MaybeTooltip = function MaybeTooltip(_ref2) {
|
|
|
115
112
|
testId: testId,
|
|
116
113
|
content: tooltipContent,
|
|
117
114
|
shortcut: shortcut,
|
|
118
|
-
position:
|
|
115
|
+
position: "mouse-y",
|
|
119
116
|
mousePosition: "right",
|
|
120
117
|
isScreenReaderAnnouncementDisabled: true,
|
|
121
|
-
component:
|
|
122
|
-
UNSAFE_shouldAlwaysFadeIn:
|
|
123
|
-
UNSAFE_shouldRenderToParent:
|
|
118
|
+
component: PanelSplitterTooltip,
|
|
119
|
+
UNSAFE_shouldAlwaysFadeIn: true,
|
|
120
|
+
UNSAFE_shouldRenderToParent: true
|
|
124
121
|
}, children);
|
|
125
122
|
}
|
|
126
123
|
return children;
|
|
@@ -393,12 +390,12 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
393
390
|
}, /*#__PURE__*/React.createElement(MaybeTooltip, {
|
|
394
391
|
tooltipContent: tooltipContent,
|
|
395
392
|
shortcut: shortcut,
|
|
396
|
-
testId: testId
|
|
393
|
+
testId: testId ? "".concat(testId, "-tooltip") : undefined
|
|
397
394
|
}, /*#__PURE__*/React.createElement("div", {
|
|
398
395
|
ref: splitterRef,
|
|
399
396
|
"data-testid": testId,
|
|
400
397
|
onDoubleClick: onDoubleClick,
|
|
401
|
-
className: ax([grabAreaStyles.root, isFhsEnabled && grabAreaStyles.fullHeightSidebar
|
|
398
|
+
className: ax([grabAreaStyles.root, isFhsEnabled && grabAreaStyles.fullHeightSidebar])
|
|
402
399
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement("input", {
|
|
403
400
|
type: "range",
|
|
404
401
|
value: rangeInputValue,
|
|
@@ -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
|
-
|
|
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:
|
|
57
|
+
label: resolvedSkipLinksLabel,
|
|
57
58
|
testId: testId
|
|
58
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
59
60
|
ref: ref,
|
|
@@ -217,7 +217,7 @@ function SideNavInternal(_ref) {
|
|
|
217
217
|
if (openLayerObserver && openLayerObserver.getCount({
|
|
218
218
|
namespace: openLayerObserverTopNavStartNamespace,
|
|
219
219
|
type: 'popup'
|
|
220
|
-
}) > 0
|
|
220
|
+
}) > 0) {
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
var prevFlyoutState = flyoutStateRef.current;
|
|
@@ -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 {
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "8.2.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.
|
|
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.
|
|
80
|
-
"@atlaskit/layering": "^3.
|
|
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",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@atlaskit/primitives": "^19.0.0",
|
|
87
87
|
"@atlaskit/side-nav-items": "^1.13.0",
|
|
88
88
|
"@atlaskit/tokens": "^13.0.0",
|
|
89
|
-
"@atlaskit/tooltip": "^21.
|
|
89
|
+
"@atlaskit/tooltip": "^21.2.0",
|
|
90
90
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
91
91
|
"@babel/runtime": "^7.0.0",
|
|
92
92
|
"@compiled/react": "^0.20.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.
|
|
114
|
+
"@atlaskit/modal-dialog": "^14.18.0",
|
|
115
115
|
"@atlaskit/onboarding": "^14.6.0",
|
|
116
116
|
"@atlaskit/page-header": "^12.1.0",
|
|
117
117
|
"@atlaskit/page-layout": "^4.3.0",
|
|
@@ -156,9 +156,6 @@
|
|
|
156
156
|
"platform_dst_nav4_top_nav_increase_height": {
|
|
157
157
|
"type": "boolean"
|
|
158
158
|
},
|
|
159
|
-
"platform_dst_nav4_side_nav_resize_tooltip_feedback": {
|
|
160
|
-
"type": "boolean"
|
|
161
|
-
},
|
|
162
159
|
"platform-component-visual-refresh": {
|
|
163
160
|
"type": "boolean",
|
|
164
161
|
"referenceOnly": true
|
|
@@ -183,6 +180,9 @@
|
|
|
183
180
|
},
|
|
184
181
|
"platform_dst_nav4_custom_theming_fhs_1": {
|
|
185
182
|
"type": "boolean"
|
|
183
|
+
},
|
|
184
|
+
"platform_dst_nav4_skip_link_a11y_1": {
|
|
185
|
+
"type": "boolean"
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
"homepage": "https://atlassian.design/components/navigation-system"
|