@atlaskit/navigation-system 11.7.5 → 11.7.7
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 +25 -0
- package/dist/cjs/components/skip-links/skip-links-container.compiled.css +8 -1
- package/dist/cjs/components/skip-links/skip-links-container.js +22 -14
- package/dist/cjs/components/skip-links/skip-links-content.compiled.css +11 -0
- package/dist/cjs/components/skip-links/skip-links-content.js +32 -0
- package/dist/cjs/components/skip-links/skip-links-popup.compiled.css +1 -13
- package/dist/cjs/components/skip-links/skip-links-popup.js +9 -17
- package/dist/cjs/ui/page-layout/chat-panel.js +3 -3
- package/dist/cjs/ui/page-layout/local-panel-surface.compiled.css +3 -1
- package/dist/cjs/ui/page-layout/local-panel-surface.js +4 -3
- package/dist/cjs/ui/page-layout/panel-layout-shell.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/panel-layout-shell.js +7 -1
- package/dist/cjs/ui/page-layout/panel-splitter/chat-panel-panel-splitter-id.js +7 -0
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +4 -2
- package/dist/es2019/components/skip-links/skip-links-container.compiled.css +8 -1
- package/dist/es2019/components/skip-links/skip-links-container.js +22 -14
- package/dist/es2019/components/skip-links/skip-links-content.compiled.css +11 -0
- package/dist/es2019/components/skip-links/skip-links-content.js +25 -0
- package/dist/es2019/components/skip-links/skip-links-popup.compiled.css +1 -13
- package/dist/es2019/components/skip-links/skip-links-popup.js +9 -17
- package/dist/es2019/ui/page-layout/chat-panel.js +1 -1
- package/dist/es2019/ui/page-layout/local-panel-surface.compiled.css +3 -1
- package/dist/es2019/ui/page-layout/local-panel-surface.js +4 -3
- package/dist/es2019/ui/page-layout/panel-layout-shell.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/panel-layout-shell.js +7 -1
- package/dist/es2019/ui/page-layout/panel-splitter/chat-panel-panel-splitter-id.js +1 -0
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +4 -2
- package/dist/esm/components/skip-links/skip-links-container.compiled.css +8 -1
- package/dist/esm/components/skip-links/skip-links-container.js +23 -15
- package/dist/esm/components/skip-links/skip-links-content.compiled.css +11 -0
- package/dist/esm/components/skip-links/skip-links-content.js +24 -0
- package/dist/esm/components/skip-links/skip-links-popup.compiled.css +1 -13
- package/dist/esm/components/skip-links/skip-links-popup.js +9 -17
- package/dist/esm/ui/page-layout/chat-panel.js +1 -1
- package/dist/esm/ui/page-layout/local-panel-surface.compiled.css +3 -1
- package/dist/esm/ui/page-layout/local-panel-surface.js +4 -3
- package/dist/esm/ui/page-layout/panel-layout-shell.compiled.css +1 -0
- package/dist/esm/ui/page-layout/panel-layout-shell.js +7 -1
- package/dist/esm/ui/page-layout/panel-splitter/chat-panel-panel-splitter-id.js +1 -0
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.compiled.css +1 -0
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +4 -2
- package/dist/types/components/skip-links/skip-links-container.d.ts +1 -1
- package/dist/types/components/skip-links/skip-links-content.d.ts +11 -0
- package/dist/types/components/skip-links/skip-links-popup.d.ts +1 -1
- package/dist/types/ui/page-layout/panel-splitter/chat-panel-panel-splitter-id.d.ts +1 -0
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 11.7.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`edb112dded7d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edb112dded7d1) -
|
|
8
|
+
Keep direct skip links when platform_dst_nav4_skip_link_a11y_1 is enabled. Require
|
|
9
|
+
platform_dst_nav4_skip_link_menu_placeholder as well to enable the Skip to popup, while preserving
|
|
10
|
+
the new menu appearance, accessibility improvements and navigation callbacks.
|
|
11
|
+
- [`b7671c4d66a16`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7671c4d66a16) -
|
|
12
|
+
Fix the local panel enter and exit motion overlapping the top navigation. The panel now overlays
|
|
13
|
+
within the Main grid area, and on enter the inline panel track is only reserved after the overlay
|
|
14
|
+
phase so Main no longer resizes immediately. Before the panel is first measured, it now enters and
|
|
15
|
+
exits at its viewport-aware width (compact below 64rem), instead of animating at the default width
|
|
16
|
+
and snapping to the correct one.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 11.7.6
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`0194dc608ff8e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0194dc608ff8e) -
|
|
24
|
+
Keep the full ChatPanel resize line inside its boundary so adjacent TopNav content cannot obscure
|
|
25
|
+
it. The styling is internal to ChatPanel and does not change the drag target or the public
|
|
26
|
+
splitter API.
|
|
27
|
+
|
|
3
28
|
## 11.7.5
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
|
+
._2rko1mok{border-radius:var(--ds-radius-large,8px)}
|
|
2
3
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
4
|
+
._zulpze3t{gap:var(--ds-space-0,0)}
|
|
3
5
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
4
|
-
.
|
|
6
|
+
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
7
|
+
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
|
|
8
|
+
._1rjcze3t{padding-block:var(--ds-space-0,0)}._152tutpp{inset-block-start:var(--ds-space-150,9pt)}
|
|
9
|
+
._152tv47k{inset-block-start:var(--ds-space-250,20px)}
|
|
5
10
|
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
11
|
+
._1e02utpp{inset-inline-start:var(--ds-space-150,9pt)}
|
|
6
12
|
._1e02v47k{inset-inline-start:var(--ds-space-250,20px)}
|
|
7
13
|
._1e0c1txw{display:flex}
|
|
8
14
|
._1pby1mrw{z-index:-1}
|
|
@@ -14,6 +20,7 @@
|
|
|
14
20
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
15
21
|
._kqsw1n9t{position:fixed}
|
|
16
22
|
._lcxvglyw{pointer-events:none}
|
|
23
|
+
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
17
24
|
._tzy4idpf{opacity:0}
|
|
18
25
|
._18eu1wug:focus-within{pointer-events:auto}
|
|
19
26
|
._1digjh3g:focus-within{z-index:calc(infinity)}
|
|
@@ -16,12 +16,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
16
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
17
|
var _text = require("@atlaskit/primitives/compiled/text");
|
|
18
18
|
var _skipLink = require("./skip-link");
|
|
19
|
+
var _skipLinksContent = require("./skip-links-content");
|
|
19
20
|
var _skipLinksPopup = require("./skip-links-popup");
|
|
20
21
|
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); }
|
|
21
22
|
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; }
|
|
22
23
|
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; }
|
|
23
24
|
var styles = {
|
|
24
25
|
root: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp _1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
|
|
26
|
+
menuAppearance: "_zulpze3t _2rko1mok _1rjcze3t _18zrze3t _syazi7uo _1e02utpp _152tutpp",
|
|
25
27
|
skipLinkList: "_zulp1b66 _1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t"
|
|
26
28
|
};
|
|
27
29
|
|
|
@@ -93,7 +95,7 @@ var isOnlyWhitespaceRegex = /^\s*$/;
|
|
|
93
95
|
* The label is used as the heading of the skip links container. If the provided label is a string
|
|
94
96
|
* comprised only of only whitespace (e.g. '' or ' '), the skip link heading element will be removed.
|
|
95
97
|
*
|
|
96
|
-
*
|
|
98
|
+
* The popup interaction requires both the skip-link accessibility gate and the menu placeholder gate.
|
|
97
99
|
*/
|
|
98
100
|
function SkipLinksContainer(_ref) {
|
|
99
101
|
var label = _ref.label,
|
|
@@ -107,7 +109,7 @@ function SkipLinksContainer(_ref) {
|
|
|
107
109
|
return null;
|
|
108
110
|
}
|
|
109
111
|
var isEmptyLabel = isOnlyWhitespaceRegex.test(label);
|
|
110
|
-
if ((0, _fg.fg)('platform_dst_nav4_skip_link_a11y_1')) {
|
|
112
|
+
if ((0, _fg.fg)('platform_dst_nav4_skip_link_menu_placeholder') && (0, _fg.fg)('platform_dst_nav4_skip_link_a11y_1')) {
|
|
111
113
|
return /*#__PURE__*/React.createElement(_skipLinksPopup.SkipLinksPopup, {
|
|
112
114
|
label: label,
|
|
113
115
|
triggerLabel: triggerLabel,
|
|
@@ -115,23 +117,29 @@ function SkipLinksContainer(_ref) {
|
|
|
115
117
|
links: sortedLinks
|
|
116
118
|
});
|
|
117
119
|
}
|
|
120
|
+
var skipLinks = sortedLinks.map(function (_ref2) {
|
|
121
|
+
var id = _ref2.id,
|
|
122
|
+
label = _ref2.label,
|
|
123
|
+
onBeforeNavigate = _ref2.onBeforeNavigate,
|
|
124
|
+
navigate = _ref2.navigate;
|
|
125
|
+
return /*#__PURE__*/React.createElement(_skipLink.SkipLink, {
|
|
126
|
+
key: id,
|
|
127
|
+
id: id,
|
|
128
|
+
onBeforeNavigate: onBeforeNavigate,
|
|
129
|
+
navigate: navigate
|
|
130
|
+
}, label);
|
|
131
|
+
});
|
|
118
132
|
return /*#__PURE__*/React.createElement("div", {
|
|
119
133
|
onKeyDown: closeOnEscape,
|
|
120
134
|
"data-testid": testId ? "".concat(testId, "--skip-links-container") : undefined,
|
|
121
|
-
className: (0, _runtime.ax)([styles.root])
|
|
122
|
-
},
|
|
135
|
+
className: (0, _runtime.ax)([styles.root, (0, _fg.fg)('platform_dst_nav4_skip_link_a11y_1') && styles.menuAppearance])
|
|
136
|
+
}, (0, _fg.fg)('platform_dst_nav4_skip_link_a11y_1') ? /*#__PURE__*/React.createElement(_skipLinksContent.SkipLinksContent, {
|
|
137
|
+
label: isEmptyLabel ? undefined : label,
|
|
138
|
+
testId: testId
|
|
139
|
+
}, skipLinks) : /*#__PURE__*/React.createElement(_react.Fragment, null, !isEmptyLabel && /*#__PURE__*/React.createElement(_text.Text, {
|
|
123
140
|
weight: "bold",
|
|
124
141
|
testId: testId ? "".concat(testId, "--skip-links-container--label") : undefined
|
|
125
142
|
}, label), /*#__PURE__*/React.createElement("ol", {
|
|
126
143
|
className: (0, _runtime.ax)([styles.skipLinkList])
|
|
127
|
-
},
|
|
128
|
-
var id = _ref2.id,
|
|
129
|
-
label = _ref2.label,
|
|
130
|
-
onBeforeNavigate = _ref2.onBeforeNavigate;
|
|
131
|
-
return /*#__PURE__*/React.createElement(_skipLink.SkipLink, {
|
|
132
|
-
key: id,
|
|
133
|
-
id: id,
|
|
134
|
-
onBeforeNavigate: onBeforeNavigate
|
|
135
|
-
}, label);
|
|
136
|
-
})));
|
|
144
|
+
}, skipLinks)));
|
|
137
145
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
3
|
+
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._1pbyjh3g{z-index:calc(infinity)}
|
|
6
|
+
._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
|
|
7
|
+
._1x8w11lx{list-style-position:outside}
|
|
8
|
+
._2lx21bp4{flex-direction:column}
|
|
9
|
+
._2mzuglyw{list-style-type:none}
|
|
10
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
11
|
+
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* skip-links-content.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SkipLinksContent = SkipLinksContent;
|
|
9
|
+
require("./skip-links-content.compiled.css");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
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); }
|
|
13
|
+
var contentStyles = {
|
|
14
|
+
root: "_1rjcu2gc _18zrpxbi _1e0c1txw _2lx21bp4 _1pbyjh3g",
|
|
15
|
+
skipLinkList: "_1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t",
|
|
16
|
+
label: "_11c8i4vh _1rjcu2gc _syazazsu"
|
|
17
|
+
};
|
|
18
|
+
function SkipLinksContent(_ref) {
|
|
19
|
+
var label = _ref.label,
|
|
20
|
+
titleId = _ref.titleId,
|
|
21
|
+
testId = _ref.testId,
|
|
22
|
+
children = _ref.children;
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: (0, _runtime.ax)([contentStyles.root])
|
|
25
|
+
}, label !== undefined && /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
"data-testid": testId ? "".concat(testId, "--skip-links-container--label") : undefined,
|
|
27
|
+
id: titleId,
|
|
28
|
+
className: (0, _runtime.ax)([contentStyles.label])
|
|
29
|
+
}, label), /*#__PURE__*/React.createElement("ol", {
|
|
30
|
+
className: (0, _runtime.ax)([contentStyles.skipLinkList])
|
|
31
|
+
}, children));
|
|
32
|
+
}
|
|
@@ -1,22 +1,10 @@
|
|
|
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
1
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
|
-
.
|
|
4
|
-
._1dqoglyw{border-style:none}
|
|
5
|
-
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
|
|
6
|
-
._152tutpp{inset-block-start:var(--ds-space-150,9pt)}
|
|
2
|
+
._1dqoglyw{border-style:none}._152tutpp{inset-block-start:var(--ds-space-150,9pt)}
|
|
7
3
|
._1e02utpp{inset-inline-start:var(--ds-space-150,9pt)}
|
|
8
|
-
._1e0c1txw{display:flex}
|
|
9
4
|
._1pby1mrw{z-index:-1}
|
|
10
|
-
._1pbyjh3g{z-index:calc(infinity)}
|
|
11
|
-
._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
|
|
12
|
-
._1x8w11lx{list-style-position:outside}
|
|
13
|
-
._2lx21bp4{flex-direction:column}
|
|
14
|
-
._2mzuglyw{list-style-type:none}
|
|
15
5
|
._4ojojh3g:has(:focus-visible){z-index:calc(infinity)}
|
|
16
6
|
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
17
|
-
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
18
7
|
._c8j0kb7n:has(:focus-visible){opacity:1}
|
|
19
8
|
._kqsw1n9t{position:fixed}
|
|
20
|
-
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
21
9
|
._t9ecz6y5{transform:translateY(-100%)}
|
|
22
10
|
._tzy4idpf{opacity:0}
|
|
@@ -19,12 +19,8 @@ var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
|
19
19
|
var _popup = require("@atlaskit/popup/popup");
|
|
20
20
|
var _focusElement = require("./focus-element");
|
|
21
21
|
var _skipLink = require("./skip-link");
|
|
22
|
+
var _skipLinksContent = require("./skip-links-content");
|
|
22
23
|
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); }
|
|
23
|
-
var contentStyles = {
|
|
24
|
-
root: "_1rjcu2gc _18zrpxbi _1e0c1txw _2lx21bp4 _1pbyjh3g",
|
|
25
|
-
skipLinkList: "_1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t",
|
|
26
|
-
label: "_11c8i4vh _1rjcu2gc _syazazsu"
|
|
27
|
-
};
|
|
28
24
|
var triggerStyles = {
|
|
29
25
|
root: "_2rko12b0 _1dqoglyw _kqsw1n9t _1e02utpp _152tutpp _1pby1mrw _tzy4idpf _bfhk1bhr _4ojojh3g _c8j0kb7n",
|
|
30
26
|
isOpen: "_tzy4idpf _t9ecz6y5"
|
|
@@ -32,7 +28,7 @@ var triggerStyles = {
|
|
|
32
28
|
var popupOffset = [0, 0];
|
|
33
29
|
|
|
34
30
|
/**
|
|
35
|
-
* Skip links shown behind `
|
|
31
|
+
* Skip links shown behind `platform_dst_nav4_skip_link_menu_placeholder`: a single focus-revealed
|
|
36
32
|
* control opens a dialog listing skip targets.
|
|
37
33
|
*/
|
|
38
34
|
function SkipLinksPopup(_ref) {
|
|
@@ -88,14 +84,10 @@ function SkipLinksPopup(_ref) {
|
|
|
88
84
|
testId: testId ? "".concat(testId, "--skip-links-container") : undefined,
|
|
89
85
|
offset: popupOffset,
|
|
90
86
|
content: function content() {
|
|
91
|
-
return /*#__PURE__*/React.createElement(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
id: titleId,
|
|
96
|
-
className: (0, _runtime.ax)([contentStyles.label])
|
|
97
|
-
}, title), /*#__PURE__*/React.createElement("ol", {
|
|
98
|
-
className: (0, _runtime.ax)([contentStyles.skipLinkList])
|
|
87
|
+
return /*#__PURE__*/React.createElement(_skipLinksContent.SkipLinksContent, {
|
|
88
|
+
label: title,
|
|
89
|
+
titleId: titleId,
|
|
90
|
+
testId: testId
|
|
99
91
|
}, links.map(function (_ref2) {
|
|
100
92
|
var id = _ref2.id,
|
|
101
93
|
label = _ref2.label,
|
|
@@ -105,8 +97,8 @@ function SkipLinksPopup(_ref) {
|
|
|
105
97
|
id: id
|
|
106
98
|
/**
|
|
107
99
|
* The popup always owns the navigation effect under the
|
|
108
|
-
* `platform_dst_nav4_skip_link_a11y_1` gate
|
|
109
|
-
*
|
|
100
|
+
* `platform_dst_nav4_skip_link_a11y_1` gate, enabled
|
|
101
|
+
* alongside the menu placeholder gate. It first closes itself
|
|
110
102
|
* synchronously so its focus lock is released, then either:
|
|
111
103
|
*
|
|
112
104
|
* - delegates to the consumer's `navigate` (e.g. SideNav
|
|
@@ -129,7 +121,7 @@ function SkipLinksPopup(_ref) {
|
|
|
129
121
|
}
|
|
130
122
|
}
|
|
131
123
|
}, label);
|
|
132
|
-
}))
|
|
124
|
+
}));
|
|
133
125
|
},
|
|
134
126
|
trigger: function trigger(triggerProps) {
|
|
135
127
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -17,6 +17,7 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
17
17
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
18
18
|
var _useSkipLinkInternal = require("../../context/skip-links/use-skip-link-internal");
|
|
19
19
|
var _constants = require("./constants");
|
|
20
|
+
var _chatPanelPanelSplitterId = require("./panel-splitter/chat-panel-panel-splitter-id");
|
|
20
21
|
var _convertResizeBoundToPixels = require("./panel-splitter/convert-resize-bound-to-pixels");
|
|
21
22
|
var _provider = require("./panel-splitter/provider");
|
|
22
23
|
var _resolveLayoutWidth = require("./resolve-layout-width");
|
|
@@ -26,7 +27,6 @@ var _useLayoutId = require("./use-layout-id");
|
|
|
26
27
|
var _useResizingWidthCssVarOnRootElement = require("./use-resizing-width-css-var-on-root-element");
|
|
27
28
|
var _useSafeDefaultWidth = require("./use-safe-default-width");
|
|
28
29
|
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); }
|
|
29
|
-
var chatPanelPanelSplitterId = Symbol('ChatPanel PanelSplitter');
|
|
30
30
|
var panelSplitterResizingVar = '--n_cPnlRsz';
|
|
31
31
|
var chatPanelOverlayWidthVar = '--n_cPnlOverlayW';
|
|
32
32
|
var fallbackDefaultWidth = 400;
|
|
@@ -151,7 +151,7 @@ function ChatPanel(_ref) {
|
|
|
151
151
|
(0, _useResizingWidthCssVarOnRootElement.useResizingWidthCssVarOnRootElement)({
|
|
152
152
|
isEnabled: !managedSizing,
|
|
153
153
|
cssVar: panelSplitterResizingVar,
|
|
154
|
-
panelId: chatPanelPanelSplitterId
|
|
154
|
+
panelId: _chatPanelPanelSplitterId.chatPanelPanelSplitterId
|
|
155
155
|
});
|
|
156
156
|
var getResizeBounds = (0, _react.useCallback)(function () {
|
|
157
157
|
var managedBounds = getManagedResizeBounds();
|
|
@@ -224,7 +224,7 @@ function ChatPanel(_ref) {
|
|
|
224
224
|
// space to ChatPanel without allowing the page layout to overflow.
|
|
225
225
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles
|
|
226
226
|
React.createElement("style", null, managedSizing ? "\n#".concat(_root.gridRootId, " { --n_chatTrack: ").concat(mode === 'inline' ? "".concat(renderedWidth, "px") : '0px', "; ").concat(_constants.chatPanelLiveWidthVar, ": var(--n_chatTrack); }\n") : "\n#".concat(_root.gridRootFitId, " { --n_chatDefaultW: ").concat(compactDefaultWidth, "px; --n_chatPreferredW: ").concat((0, _fg.fg)('platform-dst-chat-panel-layout') && !hasInlinePreference ? "clamp(".concat(minWidth, ", ").concat(compactDefaultWidth, "px, ").concat(configuredMaxWidth, ")") : chatPanelVariableWidth, "; --n_clearanceChatMin: ").concat(minWidth, "; --n_clearanceChatTarget: var(--n_chatPreferredW); }\n@media (min-width: 64rem) {\n #").concat(_root.gridRootFitId, " { --n_chatDefaultW: ").concat(defaultWidth, "px; --n_chatPreferredW: ").concat(chatPanelVariableWidth, "; }\n}\n#").concat(_root.gridRootId, " { --n_chatTrack: 0px; ").concat(_constants.chatPanelLiveWidthVar, ": 0px; }\n#").concat(_root.gridRootId, " [data-layout-chat-panel] {\n grid-area: 2 / 1 / -1 / -1;\n width: ").concat((0, _fg.fg)('platform-dst-chat-panel-layout') ? chatPanelOverlayVariableWidth : "min(calc(var(--n_layoutW) * 0.9), ".concat(chatPanelOverlayVariableWidth, ")"), ";\n ").concat((0, _fg.fg)('platform-dst-chat-panel-layout') ? 'max-width: none;' : '', "\n z-index: ").concat(_constants.localSlotLayers.chatPanelOverlay, ";\n background-color: ", "var(--ds-surface-overlay, #FFFFFF)", ";\n ").concat(hasBorder ? "box-shadow: ".concat("var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)", "; border-inline-start: none;") : '', "\n}\n@media (min-width: 40rem) {\n @container navigation-chat-space (min-width: ").concat(minWidth, ") {\n #").concat(_root.gridRootId, " { --n_chatTrack: min(100cqw, var(").concat(panelSplitterResizingVar, ", var(--n_chatPreferredW))); ").concat(_constants.chatPanelLiveWidthVar, ": var(--n_chatTrack); }\n #").concat(_root.gridRootId, " [data-layout-chat-panel] {\n grid-area: chat-panel;\n width: min(100cqw, var(").concat(panelSplitterResizingVar, ", var(--n_chatPreferredW)));\n max-width: 100%;\n z-index: auto;\n background-color: ", "var(--ds-surface, #FFFFFF)", ";\n ").concat(hasBorder ? "box-shadow: initial; border-inline-start: ".concat("var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #0B120E24)", ";") : '', "\n }\n }\n}\n")), /*#__PURE__*/React.createElement(_provider.PanelSplitterProvider, {
|
|
227
|
-
panelId: chatPanelPanelSplitterId,
|
|
227
|
+
panelId: _chatPanelPanelSplitterId.chatPanelPanelSplitterId,
|
|
228
228
|
panelRef: ref,
|
|
229
229
|
panelWidth: renderedWidth,
|
|
230
230
|
onCompleteResize: onCompleteResize,
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
22
22
|
._bfhk1g1j{background-color:var(--p_lclPnlSsrBackground,var(--ds-surface-overlay,#fff))}
|
|
23
23
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
24
|
+
._ifwb1uuk{--p_lclPnlMotionW:var(--p_lclPnlCompactW)}
|
|
24
25
|
._ju25dn4k{animation-delay:var(--ds-duration-xshort,.1s)}
|
|
25
26
|
._kqsw1if8{position:sticky}
|
|
26
27
|
._vchhusvi{box-sizing:border-box}
|
|
27
|
-
@media (prefers-reduced-motion:no-preference){._k1af14vv{animation:var(--ds-panel-exit-right,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentRight)}[dir=rtl] ._105aeydr{animation:var(--ds-panel-exit-left,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentLeft)}.
|
|
28
|
+
@media (prefers-reduced-motion:no-preference){._15etqc86{width:min(90cqw,var(--p_lclPnlMotionW))}._k1af14vv{animation:var(--ds-panel-exit-right,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentRight)}._1lh81gzg{grid-area:main}[dir=rtl] ._105aeydr{animation:var(--ds-panel-exit-left,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentLeft)}._15et1c5w{width:var(--p_lclPnlRsz,var(--p_lclPnlW))}@starting-style{._12d81gzg{grid-area:main}}._k1af1nn1{animation:var(--ds-panel-enter-right,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentRight)}[dir=rtl] ._105abamb{animation:var(--ds-panel-enter-left,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentLeft)}._10t81q8v{transition-property:grid-area}._xrrp147i{transition-duration:var(--ds-duration-instant,0ms)}._1wsa1ign{transition-delay:var(--ds-duration-short,.15s)}._1vrh1a5r{transition-behavior:allow-discrete}}
|
|
29
|
+
@media (min-width:64rem){._1c23i77x{--p_lclPnlMotionW:var(--p_lclPnlTrackW)}}
|
|
@@ -41,8 +41,9 @@ var styles = {
|
|
|
41
41
|
panelScrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
42
42
|
border: "_191wglyw _16qs130s",
|
|
43
43
|
managedInlineBorder: "_191wia51 _16qsglyw",
|
|
44
|
-
entering: "_k1af1nn1
|
|
45
|
-
|
|
44
|
+
entering: "_k1af1nn1 _12d81gzg _10t81q8v _xrrp147i _1wsa1ign _1vrh1a5r _15et1c5w _105abamb",
|
|
45
|
+
motionUnmeasured: "_ifwb1uuk _15etqc86 _1c23i77x",
|
|
46
|
+
exiting: "_k1af14vv _1lh81gzg _15et1c5w _105aeydr",
|
|
46
47
|
contentEntering: "_y44v1mph",
|
|
47
48
|
contentExiting: "_y44vf1qi",
|
|
48
49
|
contentChangeContainer: "_4t3i1osq"
|
|
@@ -177,7 +178,7 @@ function LocalPanelSurface(_ref2) {
|
|
|
177
178
|
"data-layout-with-panel-slot": "",
|
|
178
179
|
style: (0, _defineProperty2.default)({}, localPanelVar, "".concat(renderedWidth, "px")),
|
|
179
180
|
ref: mergedRef,
|
|
180
|
-
className: (0, _runtime.ax)([isMotionUpliftEnabled && state === 'entering' && styles.entering, isMotionUpliftEnabled && state === 'exiting' && styles.exiting, styles.panelWrapper, styles.border, !managedSizing && styles.unmeasured, !managedSizing && (0, _fg.fg)('platform-dst-chat-panel-layout') && styles.refinedUnmeasured, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder])
|
|
181
|
+
className: (0, _runtime.ax)([isMotionUpliftEnabled && state === 'entering' && styles.entering, isMotionUpliftEnabled && state === 'exiting' && styles.exiting, isMotionUpliftEnabled && (state === 'entering' || state === 'exiting') && !managedSizing && styles.motionUnmeasured, styles.panelWrapper, styles.border, !managedSizing && styles.unmeasured, !managedSizing && (0, _fg.fg)('platform-dst-chat-panel-layout') && styles.refinedUnmeasured, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder])
|
|
181
182
|
}, /*#__PURE__*/React.createElement(_provider.PanelSplitterProvider, {
|
|
182
183
|
panelId: localPanelSplitterId,
|
|
183
184
|
panelRef: ref,
|
|
@@ -25,4 +25,5 @@
|
|
|
25
25
|
._vlegi47z._vlegi47z{grid-template-columns:minmax(0,1fr)}
|
|
26
26
|
._yv0eggl6{grid-template-columns:var(--p_lclPnlSsrColumns,minmax(0,1fr))}
|
|
27
27
|
._yv0ei47z{grid-template-columns:minmax(0,1fr)}
|
|
28
|
+
@media (prefers-reduced-motion:no-preference){._1croukkr{animation-name:k1p4v4gh}._wqfn147i{animation-duration:var(--ds-duration-instant,0ms)}._sl5p1ign{animation-delay:var(--ds-duration-short,.15s)}._dqw8eoah{animation-fill-mode:backwards}@keyframes k1p4v4gh{0%{grid-template-areas:"main";grid-template-columns:minmax(0,1fr);grid-template-rows:1fr}}}
|
|
28
29
|
@media (min-width:64rem){._peezi77x{--p_lclPnlSsrPreferredW:var(--p_lclPnlTrackW)}._1tg31owj{--p_lclPnlSsrDefaultW:var(--p_lclPnlDefaultW)}}
|
|
@@ -20,7 +20,13 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
20
20
|
var localPanelTrackWidthVar = '--p_lclPnlTrackW';
|
|
21
21
|
var localPanelResizingVar = '--p_lclPnlRsz';
|
|
22
22
|
var localPanelMinWidthVar = '--p_lclPnlMinW';
|
|
23
|
+
|
|
24
|
+
// Holds the single-column (closed) grid while the entering panel overlays `main`. With `backwards` fill
|
|
25
|
+
// the `from` frame applies for the animation delay, then the real inline grid takes over. An animation
|
|
26
|
+
// (rather than a transition) only starts when the class is added, so live resizing is never delayed.
|
|
27
|
+
var holdClosedGrid = null;
|
|
23
28
|
var styles = {
|
|
29
|
+
panelEntering: "_1croukkr _wqfn147i _sl5p1ign _dqw8eoah",
|
|
24
30
|
container: "_1f38177r _7cca15wb _4t3i1osq _1bsb1osq",
|
|
25
31
|
layout: "_1reo1wug _18m91wug _1e0c11p5 _7cca15wb _1lmc1m6a _yv0ei47z _2z05hkll _4t3i1osq _1bsb1osq",
|
|
26
32
|
mainContent: "_nd5l1gzg _1reo1wug _18m91wug _1e0c1txw _4t3i1osq _19121cl4",
|
|
@@ -67,7 +73,7 @@ function PanelLayoutShell(_ref) {
|
|
|
67
73
|
"data-testid": testId,
|
|
68
74
|
ref: layoutRef,
|
|
69
75
|
style: (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, localPanelTrackWidthVar, "".concat(panelWidth, "px")), localPanelMinWidthVar, "".concat(panelMinWidth, "px")), '--p_lclPnlCompactW', "".concat(compactPanelWidth, "px")), '--p_lclPnlDefaultW', "".concat(defaultPanelWidth, "px")), '--p_lclPnlCompactDefaultW', "".concat(compactDefaultPanelWidth, "px")),
|
|
70
|
-
className: (0, _runtime.ax)([styles.layout, mode === undefined && isPanelOpen && styles.unmeasured, shouldClipOverflow && styles.panelUplift, mode === 'inline' && styles.managedInline, mode === 'overlay' && styles.managedOverlay, !isPanelOpen && styles.panelClosed])
|
|
76
|
+
className: (0, _runtime.ax)([styles.layout, mode === undefined && isPanelOpen && styles.unmeasured, shouldClipOverflow && styles.panelUplift, mode === 'inline' && styles.managedInline, shouldClipOverflow && isPanelOpen && (mode === undefined || mode === 'inline') && styles.panelEntering, mode === 'overlay' && styles.managedOverlay, !isPanelOpen && styles.panelClosed])
|
|
71
77
|
}, /*#__PURE__*/React.createElement("div", {
|
|
72
78
|
className: (0, _runtime.ax)([styles.mainContent])
|
|
73
79
|
}, children), panel));
|
|
@@ -35,6 +35,7 @@ var _requestClosePopovers = require("@atlaskit/top-layer/page-surface/request-cl
|
|
|
35
35
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden/visually-hidden"));
|
|
36
36
|
var _constants = require("../constants");
|
|
37
37
|
var _layoutAreaSizingContext = require("../layout-area-sizing-context");
|
|
38
|
+
var _chatPanelPanelSplitterId = require("./chat-panel-panel-splitter-id");
|
|
38
39
|
var _convertResizeBoundToPixels = require("./convert-resize-bound-to-pixels");
|
|
39
40
|
var _getPanelGrowthSide = require("./get-panel-growth-side");
|
|
40
41
|
var _getPercentageWithinPixelBounds = require("./get-percentage-within-pixel-bounds");
|
|
@@ -63,7 +64,8 @@ var grabAreaStyles = {
|
|
|
63
64
|
rootFinesse: "_vp7g1ihb _30l31ihb _9h8hq98m"
|
|
64
65
|
};
|
|
65
66
|
var lineStyles = {
|
|
66
|
-
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
67
|
+
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z",
|
|
68
|
+
chatPanel: "_1e02rdoj"
|
|
67
69
|
};
|
|
68
70
|
var tooltipStyles = {
|
|
69
71
|
root: "_ahbq196n _1bsb1ris",
|
|
@@ -660,7 +662,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
660
662
|
}), /*#__PURE__*/React.createElement("span", {
|
|
661
663
|
id: labelId
|
|
662
664
|
}, label)), /*#__PURE__*/React.createElement("span", {
|
|
663
|
-
className: (0, _runtime.ax)([lineStyles.root])
|
|
665
|
+
className: (0, _runtime.ax)([lineStyles.root, panelId === _chatPanelPanelSplitterId.chatPanelPanelSplitterId && lineStyles.chatPanel])
|
|
664
666
|
})))), portal);
|
|
665
667
|
};
|
|
666
668
|
/**
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
|
+
._2rko1mok{border-radius:var(--ds-radius-large,8px)}
|
|
2
3
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
4
|
+
._zulpze3t{gap:var(--ds-space-0,0)}
|
|
3
5
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
4
|
-
.
|
|
6
|
+
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
7
|
+
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
|
|
8
|
+
._1rjcze3t{padding-block:var(--ds-space-0,0)}._152tutpp{inset-block-start:var(--ds-space-150,9pt)}
|
|
9
|
+
._152tv47k{inset-block-start:var(--ds-space-250,20px)}
|
|
5
10
|
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
11
|
+
._1e02utpp{inset-inline-start:var(--ds-space-150,9pt)}
|
|
6
12
|
._1e02v47k{inset-inline-start:var(--ds-space-250,20px)}
|
|
7
13
|
._1e0c1txw{display:flex}
|
|
8
14
|
._1pby1mrw{z-index:-1}
|
|
@@ -14,6 +20,7 @@
|
|
|
14
20
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
15
21
|
._kqsw1n9t{position:fixed}
|
|
16
22
|
._lcxvglyw{pointer-events:none}
|
|
23
|
+
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
17
24
|
._tzy4idpf{opacity:0}
|
|
18
25
|
._18eu1wug:focus-within{pointer-events:auto}
|
|
19
26
|
._1digjh3g:focus-within{z-index:calc(infinity)}
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import "./skip-links-container.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useMemo } from 'react';
|
|
5
|
+
import { Fragment, useMemo } from 'react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
8
8
|
import { SkipLink } from './skip-link';
|
|
9
|
+
import { SkipLinksContent } from './skip-links-content';
|
|
9
10
|
import { SkipLinksPopup } from './skip-links-popup';
|
|
10
11
|
const styles = {
|
|
11
12
|
root: "_zulp1b66 _2rko12b0 _1rjcutpp _18zrutpp _1e0c1txw _2lx21bp4 _kqsw1n9t _1e02v47k _152tv47k _bfhk1bhr _16qs130s _1pby1mrw _tzy4idpf _lcxvglyw _1digjh3g _1mygkb7n _18eu1wug",
|
|
13
|
+
menuAppearance: "_zulpze3t _2rko1mok _1rjcze3t _18zrze3t _syazi7uo _1e02utpp _152tutpp",
|
|
12
14
|
skipLinkList: "_zulp1b66 _1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t"
|
|
13
15
|
};
|
|
14
16
|
|
|
@@ -73,7 +75,7 @@ const isOnlyWhitespaceRegex = /^\s*$/;
|
|
|
73
75
|
* The label is used as the heading of the skip links container. If the provided label is a string
|
|
74
76
|
* comprised only of only whitespace (e.g. '' or ' '), the skip link heading element will be removed.
|
|
75
77
|
*
|
|
76
|
-
*
|
|
78
|
+
* The popup interaction requires both the skip-link accessibility gate and the menu placeholder gate.
|
|
77
79
|
*/
|
|
78
80
|
export function SkipLinksContainer({
|
|
79
81
|
label,
|
|
@@ -88,7 +90,7 @@ export function SkipLinksContainer({
|
|
|
88
90
|
return null;
|
|
89
91
|
}
|
|
90
92
|
const isEmptyLabel = isOnlyWhitespaceRegex.test(label);
|
|
91
|
-
if (fg('platform_dst_nav4_skip_link_a11y_1')) {
|
|
93
|
+
if (fg('platform_dst_nav4_skip_link_menu_placeholder') && fg('platform_dst_nav4_skip_link_a11y_1')) {
|
|
92
94
|
return /*#__PURE__*/React.createElement(SkipLinksPopup, {
|
|
93
95
|
label: label,
|
|
94
96
|
triggerLabel: triggerLabel,
|
|
@@ -96,22 +98,28 @@ export function SkipLinksContainer({
|
|
|
96
98
|
links: sortedLinks
|
|
97
99
|
});
|
|
98
100
|
}
|
|
101
|
+
const skipLinks = sortedLinks.map(({
|
|
102
|
+
id,
|
|
103
|
+
label,
|
|
104
|
+
onBeforeNavigate,
|
|
105
|
+
navigate
|
|
106
|
+
}) => /*#__PURE__*/React.createElement(SkipLink, {
|
|
107
|
+
key: id,
|
|
108
|
+
id: id,
|
|
109
|
+
onBeforeNavigate: onBeforeNavigate,
|
|
110
|
+
navigate: navigate
|
|
111
|
+
}, label));
|
|
99
112
|
return /*#__PURE__*/React.createElement("div", {
|
|
100
113
|
onKeyDown: closeOnEscape,
|
|
101
114
|
"data-testid": testId ? `${testId}--skip-links-container` : undefined,
|
|
102
|
-
className: ax([styles.root])
|
|
103
|
-
},
|
|
115
|
+
className: ax([styles.root, fg('platform_dst_nav4_skip_link_a11y_1') && styles.menuAppearance])
|
|
116
|
+
}, fg('platform_dst_nav4_skip_link_a11y_1') ? /*#__PURE__*/React.createElement(SkipLinksContent, {
|
|
117
|
+
label: isEmptyLabel ? undefined : label,
|
|
118
|
+
testId: testId
|
|
119
|
+
}, skipLinks) : /*#__PURE__*/React.createElement(Fragment, null, !isEmptyLabel && /*#__PURE__*/React.createElement(Text, {
|
|
104
120
|
weight: "bold",
|
|
105
121
|
testId: testId ? `${testId}--skip-links-container--label` : undefined
|
|
106
122
|
}, label), /*#__PURE__*/React.createElement("ol", {
|
|
107
123
|
className: ax([styles.skipLinkList])
|
|
108
|
-
},
|
|
109
|
-
id,
|
|
110
|
-
label,
|
|
111
|
-
onBeforeNavigate
|
|
112
|
-
}) => /*#__PURE__*/React.createElement(SkipLink, {
|
|
113
|
-
key: id,
|
|
114
|
-
id: id,
|
|
115
|
-
onBeforeNavigate: onBeforeNavigate
|
|
116
|
-
}, label))));
|
|
124
|
+
}, skipLinks)));
|
|
117
125
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
3
|
+
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._1pbyjh3g{z-index:calc(infinity)}
|
|
6
|
+
._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
|
|
7
|
+
._1x8w11lx{list-style-position:outside}
|
|
8
|
+
._2lx21bp4{flex-direction:column}
|
|
9
|
+
._2mzuglyw{list-style-type:none}
|
|
10
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
11
|
+
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* skip-links-content.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
|
+
import "./skip-links-content.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
const contentStyles = {
|
|
6
|
+
root: "_1rjcu2gc _18zrpxbi _1e0c1txw _2lx21bp4 _1pbyjh3g",
|
|
7
|
+
skipLinkList: "_1e0c1txw _2lx21bp4 _1x8w11lx _2mzuglyw _1pfhze3t _bozgze3t",
|
|
8
|
+
label: "_11c8i4vh _1rjcu2gc _syazazsu"
|
|
9
|
+
};
|
|
10
|
+
export function SkipLinksContent({
|
|
11
|
+
label,
|
|
12
|
+
titleId,
|
|
13
|
+
testId,
|
|
14
|
+
children
|
|
15
|
+
}) {
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: ax([contentStyles.root])
|
|
18
|
+
}, label !== undefined && /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
"data-testid": testId ? `${testId}--skip-links-container--label` : undefined,
|
|
20
|
+
id: titleId,
|
|
21
|
+
className: ax([contentStyles.label])
|
|
22
|
+
}, label), /*#__PURE__*/React.createElement("ol", {
|
|
23
|
+
className: ax([contentStyles.skipLinkList])
|
|
24
|
+
}, children));
|
|
25
|
+
}
|
|
@@ -1,22 +1,10 @@
|
|
|
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
1
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
|
-
.
|
|
4
|
-
._1dqoglyw{border-style:none}
|
|
5
|
-
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
|
|
6
|
-
._152tutpp{inset-block-start:var(--ds-space-150,9pt)}
|
|
2
|
+
._1dqoglyw{border-style:none}._152tutpp{inset-block-start:var(--ds-space-150,9pt)}
|
|
7
3
|
._1e02utpp{inset-inline-start:var(--ds-space-150,9pt)}
|
|
8
|
-
._1e0c1txw{display:flex}
|
|
9
4
|
._1pby1mrw{z-index:-1}
|
|
10
|
-
._1pbyjh3g{z-index:calc(infinity)}
|
|
11
|
-
._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
|
|
12
|
-
._1x8w11lx{list-style-position:outside}
|
|
13
|
-
._2lx21bp4{flex-direction:column}
|
|
14
|
-
._2mzuglyw{list-style-type:none}
|
|
15
5
|
._4ojojh3g:has(:focus-visible){z-index:calc(infinity)}
|
|
16
6
|
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
17
|
-
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
18
7
|
._c8j0kb7n:has(:focus-visible){opacity:1}
|
|
19
8
|
._kqsw1n9t{position:fixed}
|
|
20
|
-
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
21
9
|
._t9ecz6y5{transform:translateY(-100%)}
|
|
22
10
|
._tzy4idpf{opacity:0}
|