@atlaskit/menu 6.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/cjs/menu-item/heading-item.compiled.css +4 -0
- package/dist/cjs/menu-item/heading-item.js +17 -29
- package/dist/cjs/menu-section/menu-group.compiled.css +5 -0
- package/dist/cjs/menu-section/menu-group.js +12 -17
- package/dist/cjs/menu-section/popup-menu-group.js +9 -8
- package/dist/cjs/menu-section/section.compiled.css +17 -0
- package/dist/cjs/menu-section/section.js +30 -86
- package/dist/es2019/menu-item/heading-item.compiled.css +4 -0
- package/dist/es2019/menu-item/heading-item.js +7 -26
- package/dist/es2019/menu-section/menu-group.compiled.css +5 -0
- package/dist/es2019/menu-section/menu-group.js +9 -17
- package/dist/es2019/menu-section/popup-menu-group.js +6 -6
- package/dist/es2019/menu-section/section.compiled.css +17 -0
- package/dist/es2019/menu-section/section.js +26 -86
- package/dist/esm/menu-item/heading-item.compiled.css +4 -0
- package/dist/esm/menu-item/heading-item.js +13 -29
- package/dist/esm/menu-section/menu-group.compiled.css +5 -0
- package/dist/esm/menu-section/menu-group.js +9 -17
- package/dist/esm/menu-section/popup-menu-group.js +6 -6
- package/dist/esm/menu-section/section.compiled.css +17 -0
- package/dist/esm/menu-section/section.js +26 -86
- package/dist/types/menu-item/heading-item.d.ts +1 -2
- package/dist/types/menu-section/menu-group.d.ts +2 -6
- package/dist/types/menu-section/popup-menu-group.d.ts +2 -6
- package/dist/types/types.d.ts +0 -7
- package/dist/types-ts4.5/menu-item/heading-item.d.ts +1 -2
- package/dist/types-ts4.5/menu-section/menu-group.d.ts +2 -6
- package/dist/types-ts4.5/menu-section/popup-menu-group.d.ts +2 -6
- package/dist/types-ts4.5/types.d.ts +0 -7
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 7.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157071](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157071)
|
|
8
|
+
[`a149a0b1559ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a149a0b1559ec) -
|
|
9
|
+
We are testing the migration to the ADS Link component behind a feature flag. If this fix is
|
|
10
|
+
successful it will be available in a later release.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 7.0.0
|
|
17
|
+
|
|
18
|
+
### Major Changes
|
|
19
|
+
|
|
20
|
+
- [#156707](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/156707)
|
|
21
|
+
[`84d702274b2dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/84d702274b2dd) -
|
|
22
|
+
Migrated `HeadingItem` and `Section` components from @emotion/react to @compiled/react in order to
|
|
23
|
+
improve performance, align with the rest of the Atlaskit techstack, and support React 18 Streaming
|
|
24
|
+
SSR.
|
|
25
|
+
|
|
26
|
+
Removed the deprecated `cssFn` prop from the `HeadingItem` component, as this is not supported
|
|
27
|
+
with @compiled/react.
|
|
28
|
+
|
|
3
29
|
## 6.0.0
|
|
4
30
|
|
|
5
31
|
### Major Changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
._11c81vhk{font:var(--ds-font-heading-xxsmall,normal 600 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
3
|
+
._1rjcze3t{padding-block:var(--ds-space-0,0)}
|
|
4
|
+
._syaz1vvm{color:var(--_bbz764)}
|
|
@@ -1,29 +1,23 @@
|
|
|
1
|
+
/* heading-item.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./heading-item.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
var _deprecationWarning = require("@atlaskit/ds-lib/deprecation-warning");
|
|
13
|
-
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
14
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
|
-
var _excluded = ["children", "testId", "headingLevel", "id", "
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
|
-
var headingStyles = (0, _react2.css)({
|
|
22
|
-
color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
|
|
23
|
-
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
24
|
-
paddingBlock: "var(--ds-space-0, 0px)",
|
|
25
|
-
paddingInline: "var(--ds-space-200, 16px)"
|
|
26
|
-
});
|
|
17
|
+
var _excluded = ["children", "testId", "headingLevel", "id", "className"];
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
var headingStyles = null;
|
|
27
21
|
|
|
28
22
|
/**
|
|
29
23
|
* __Heading item__
|
|
@@ -39,19 +33,9 @@ var HeadingItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
39
33
|
_ref$headingLevel = _ref.headingLevel,
|
|
40
34
|
headingLevel = _ref$headingLevel === void 0 ? 2 : _ref$headingLevel,
|
|
41
35
|
id = _ref.id,
|
|
42
|
-
_ref$cssFn = _ref.cssFn,
|
|
43
|
-
cssFn = _ref$cssFn === void 0 ? _noop.default : _ref$cssFn,
|
|
44
36
|
UNSAFE_className = _ref.className,
|
|
45
37
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
|
-
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
|
-
var UNSAFE_overrides = (0, _react2.css)(cssFn(undefined));
|
|
51
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
52
|
-
css: [headingStyles,
|
|
53
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
54
|
-
UNSAFE_overrides],
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
55
39
|
role: "heading",
|
|
56
40
|
"aria-level": headingLevel,
|
|
57
41
|
"data-testid": testId,
|
|
@@ -59,7 +43,11 @@ var HeadingItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
59
43
|
id: id
|
|
60
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
61
45
|
,
|
|
62
|
-
className: UNSAFE_className
|
|
63
|
-
}, rest
|
|
46
|
+
className: (0, _runtime.ax)(["_11c81vhk _1rjcze3t _18zrpxbi _syaz1vvm", UNSAFE_className])
|
|
47
|
+
}, rest, {
|
|
48
|
+
style: {
|
|
49
|
+
"--_bbz764": (0, _runtime.ix)("var(--ds-text-subtle, ".concat(_colors.N300, ")"))
|
|
50
|
+
}
|
|
51
|
+
}), children);
|
|
64
52
|
});
|
|
65
53
|
var _default = exports.default = HeadingItem;
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
+
/* menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./menu-group.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = require("@emotion/react");
|
|
11
15
|
var _menuContext = require("../internal/components/menu-context");
|
|
12
16
|
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
|
-
var baseStyles = (0, _react.css)({
|
|
19
|
-
display: 'flex',
|
|
20
|
-
position: 'static',
|
|
21
|
-
flexDirection: 'column',
|
|
22
|
-
overflow: 'auto'
|
|
23
|
-
});
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
var baseStyles = null;
|
|
24
20
|
|
|
25
21
|
/**
|
|
26
22
|
* __Menu group__
|
|
@@ -42,11 +38,11 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
42
38
|
spacing = _ref$spacing === void 0 ? 'cozy' : _ref$spacing,
|
|
43
39
|
UNSAFE_className = _ref.className,
|
|
44
40
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
45
|
-
return
|
|
41
|
+
return /*#__PURE__*/React.createElement(_menuContext.SpacingContext.Provider, {
|
|
46
42
|
value: spacing
|
|
47
|
-
},
|
|
43
|
+
}, /*#__PURE__*/React.createElement(_menuContext.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
48
44
|
value: "border"
|
|
49
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
50
46
|
"aria-busy": isLoading,
|
|
51
47
|
style: {
|
|
52
48
|
minWidth: minWidth,
|
|
@@ -54,12 +50,11 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
54
50
|
minHeight: minHeight,
|
|
55
51
|
maxHeight: maxHeight
|
|
56
52
|
},
|
|
57
|
-
css: baseStyles,
|
|
58
53
|
"data-testid": testId,
|
|
59
54
|
role: role
|
|
60
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
61
56
|
,
|
|
62
|
-
className: UNSAFE_className
|
|
57
|
+
className: (0, _runtime.ax)(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className])
|
|
63
58
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
64
59
|
}, rest))));
|
|
65
60
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
/* popup-menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = require("@emotion/react");
|
|
11
14
|
var _menuGroup = _interopRequireDefault(require("./menu-group"));
|
|
12
|
-
var _excluded = ["maxWidth", "minWidth"];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @jsx jsx
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
+
var _excluded = ["maxWidth", "minWidth"]; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated refer to MenuGroup, explicitly set maxWidth and minWidth
|
|
20
20
|
*/
|
|
@@ -25,8 +25,9 @@ var PopupMenuGroup = function PopupMenuGroup(_ref) {
|
|
|
25
25
|
minWidth = _ref$minWidth === void 0 ? 320 : _ref$minWidth,
|
|
26
26
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
27
27
|
return (
|
|
28
|
+
/*#__PURE__*/
|
|
28
29
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
29
|
-
|
|
30
|
+
React.createElement(_menuGroup.default, (0, _extends2.default)({
|
|
30
31
|
maxWidth: maxWidth,
|
|
31
32
|
minWidth: minWidth
|
|
32
33
|
}, rest))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
._18zru2gc{padding-inline:var(--ds-space-100,8px)}
|
|
3
|
+
._mqm21imm{border-block-start:1px solid var(--ds-menu-seperator-color,var(--ds-border,rgba(9,30,66,.08)))}._18m91wug{overflow-y:auto}
|
|
4
|
+
._1l6bgktf [data-ds--menu--heading-item]{margin-block-start:20px}
|
|
5
|
+
._1mfv8jkm [data-ds--menu--skeleton-heading-item]:first-of-type{margin-block-start:19px}
|
|
6
|
+
._1o9zidpf{flex-shrink:0}
|
|
7
|
+
._1o9zkb7n{flex-shrink:1}
|
|
8
|
+
._1p3hi2wt [data-ds--menu--heading-item]{margin-block-end:6px}
|
|
9
|
+
._1qdgi2wt:after, ._kfgti2wt:before{height:6px}
|
|
10
|
+
._1reo1wug{overflow-x:auto}
|
|
11
|
+
._1ywu1ule:after, ._cfu11ule:before{display:block}
|
|
12
|
+
._aetrb3bt:after, ._1kt9b3bt:before{content:""}
|
|
13
|
+
._auo4rdoj [data-ds--menu--skeleton-heading-item]{margin-block-end:9px}
|
|
14
|
+
._hp2110yn [data-ds--menu--skeleton-heading-item]{margin-block-start:25px}
|
|
15
|
+
._osbldlk8 [data-ds--menu--heading-item]:first-of-type{margin-block-start:14px}
|
|
16
|
+
[data-section]+._n7cnyjp0{margin-block-start:-6px}
|
|
17
|
+
._1bg41n1a:focus{outline-offset:-1px}
|
|
@@ -1,96 +1,39 @@
|
|
|
1
|
+
/* section.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./section.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
13
16
|
var _headingItem = _interopRequireDefault(require("../menu-item/heading-item"));
|
|
14
17
|
var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "className"];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
|
-
var gridSize = 8;
|
|
21
|
-
var itemHeadingTopMargin = gridSize * 2.5;
|
|
22
|
-
var itemHeadingBottomMargin = gridSize * 0.75;
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
var itemHeadingTopMargin = 20;
|
|
21
|
+
var itemHeadingBottomMargin = 6;
|
|
23
22
|
// Skeleton content is slightly shorter than the real content.
|
|
24
23
|
// Because of that we slightly increase the top margin to offset this so the
|
|
25
24
|
// containing size both real and skeleton always equal approx 30px.
|
|
26
25
|
var itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
|
|
27
|
-
var skeletonHeadingHeight =
|
|
26
|
+
var skeletonHeadingHeight = 8;
|
|
28
27
|
var skeletonHeadingMarginOffset = 3;
|
|
29
28
|
var skeletonHeadingTopMargin = itemHeadingTopMargin + (itemHeadingContentHeight - skeletonHeadingHeight) - skeletonHeadingMarginOffset;
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
height: sectionPaddingTopBottom,
|
|
39
|
-
content: '""'
|
|
40
|
-
},
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
-
'& [data-ds--menu--heading-item]': {
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
|
-
marginBlockEnd: itemHeadingBottomMargin,
|
|
45
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
46
|
-
marginBlockStart: itemHeadingTopMargin,
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
48
|
-
'&:first-of-type': {
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
|
-
marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
54
|
-
'& [data-ds--menu--skeleton-heading-item]': {
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
|
-
marginBlockEnd: skeletonHeadingBottomMargin,
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
|
-
marginBlockStart: skeletonHeadingTopMargin,
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
|
-
'&:first-of-type': {
|
|
61
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
62
|
-
marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
'&:focus': {
|
|
66
|
-
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
67
|
-
// We have made a deliberate choice to leave this behaviour as is.
|
|
68
|
-
// This makes the outline go inside by 1px so it can actually be displayed
|
|
69
|
-
// else it gets cut off from the overflow: scroll from the parent menu group.
|
|
70
|
-
outlineOffset: -1
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
var scrollableStyles = (0, _react2.css)({
|
|
74
|
-
flexShrink: 1,
|
|
75
|
-
overflow: 'auto'
|
|
76
|
-
});
|
|
77
|
-
var unscrollableStyles = (0, _react2.css)({
|
|
78
|
-
flexShrink: 0
|
|
79
|
-
});
|
|
80
|
-
var thinSeparatorStyles = (0, _react2.css)({
|
|
81
|
-
borderBlockStart: "1px solid var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30A, ")"), ")")
|
|
82
|
-
});
|
|
83
|
-
var noSeparatorStyles = (0, _react2.css)({
|
|
84
|
-
// this is to ensure that adjacent sections without separators don't get additional margins.
|
|
85
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
86
|
-
'[data-section] + &': {
|
|
87
|
-
marginBlockStart: -6
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
var sideNavSectionHeadingStyles = function sideNavSectionHeadingStyles() {
|
|
91
|
-
return {
|
|
92
|
-
paddingInline: "var(--ds-space-100, 8px)"
|
|
93
|
-
};
|
|
29
|
+
var sectionPaddingTopBottom = 6;
|
|
30
|
+
var styles = {
|
|
31
|
+
root: "_1ywu1ule _cfu11ule _1qdgi2wt _kfgti2wt _aetrb3bt _1kt9b3bt _1p3hi2wt _1l6bgktf _osbldlk8 _auo4rdoj _hp2110yn _1mfv8jkm _1bg41n1a",
|
|
32
|
+
scrollable: "_1reo1wug _18m91wug _1o9zkb7n",
|
|
33
|
+
unscrollable: "_1o9zidpf",
|
|
34
|
+
thinSeparator: "_mqm21imm",
|
|
35
|
+
noSeparator: "_n7cnyjp0",
|
|
36
|
+
sideNavSectionHeading: "_18zru2gc"
|
|
94
37
|
};
|
|
95
38
|
|
|
96
39
|
/**
|
|
@@ -115,7 +58,7 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
115
58
|
isSideNavSection = _ref$isSideNavSection === void 0 ? false : _ref$isSideNavSection,
|
|
116
59
|
UNSAFE_className = _ref.className,
|
|
117
60
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
118
|
-
var content = isList ?
|
|
61
|
+
var content = isList ? /*#__PURE__*/React.createElement("ul", {
|
|
119
62
|
style: {
|
|
120
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
121
64
|
margin: 0,
|
|
@@ -123,7 +66,7 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
123
66
|
padding: 0
|
|
124
67
|
}
|
|
125
68
|
}, _react.Children.map(_react.Children.toArray(children), function (child, index) {
|
|
126
|
-
return
|
|
69
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
127
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
128
71
|
style: {
|
|
129
72
|
listStyleType: 'none',
|
|
@@ -133,21 +76,22 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
133
76
|
key: index
|
|
134
77
|
}, child);
|
|
135
78
|
})) : children;
|
|
136
|
-
var childrenMarkup = title !== undefined ?
|
|
137
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
138
|
-
, {
|
|
139
|
-
cssFn: isSideNavSection ? sideNavSectionHeadingStyles : undefined,
|
|
79
|
+
var childrenMarkup = title !== undefined ? /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement(_headingItem.default, {
|
|
140
80
|
testId: testId && "".concat(testId, "--heading"),
|
|
141
81
|
"aria-hidden": true
|
|
142
|
-
|
|
143
|
-
|
|
82
|
+
// @ts-expect-error
|
|
83
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
84
|
+
,
|
|
85
|
+
className: (0, _runtime.ax)([isSideNavSection && styles.sideNavSectionHeading])
|
|
86
|
+
}, title), content) : /*#__PURE__*/React.createElement(_react.Fragment, null, content);
|
|
87
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, rest, {
|
|
144
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
145
|
-
className: UNSAFE_className,
|
|
89
|
+
className: (0, _runtime.ax)([styles.root, isScrollable ? styles.scrollable : styles.unscrollable, hasSeparator ? styles.thinSeparator : styles.noSeparator, UNSAFE_className]),
|
|
146
90
|
id: id
|
|
147
91
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
148
92
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
149
93
|
,
|
|
150
|
-
|
|
94
|
+
|
|
151
95
|
"aria-label": title,
|
|
152
96
|
"aria-labelledby": titleId,
|
|
153
97
|
"data-testid": testId,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
._11c81vhk{font:var(--ds-font-heading-xxsmall,normal 600 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
3
|
+
._1rjcze3t{padding-block:var(--ds-space-0,0)}
|
|
4
|
+
._syaz1n3s{color:var(--ds-text-subtle,#5e6c84)}
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
+
/* heading-item.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
3
|
+
import "./heading-item.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { memo } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
11
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
12
7
|
import { N300 } from '@atlaskit/theme/colors';
|
|
13
|
-
const headingStyles =
|
|
14
|
-
color: `var(--ds-text-subtle, ${N300})`,
|
|
15
|
-
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
16
|
-
paddingBlock: "var(--ds-space-0, 0px)",
|
|
17
|
-
paddingInline: "var(--ds-space-200, 16px)"
|
|
18
|
-
});
|
|
8
|
+
const headingStyles = null;
|
|
19
9
|
|
|
20
10
|
/**
|
|
21
11
|
* __Heading item__
|
|
@@ -30,7 +20,6 @@ const HeadingItem = /*#__PURE__*/memo(({
|
|
|
30
20
|
testId,
|
|
31
21
|
headingLevel = 2,
|
|
32
22
|
id,
|
|
33
|
-
cssFn = noop,
|
|
34
23
|
// Although this isn't defined on props it is available because we've used
|
|
35
24
|
// Spread props below and on the jsx element. To forcibly block usage I've
|
|
36
25
|
// picked it out and supressed the expected type error.
|
|
@@ -38,15 +27,7 @@ const HeadingItem = /*#__PURE__*/memo(({
|
|
|
38
27
|
className: UNSAFE_className,
|
|
39
28
|
...rest
|
|
40
29
|
}) => {
|
|
41
|
-
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
45
|
-
const UNSAFE_overrides = css(cssFn(undefined));
|
|
46
|
-
return jsx("div", _extends({
|
|
47
|
-
css: [headingStyles,
|
|
48
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
49
|
-
UNSAFE_overrides],
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
50
31
|
role: "heading",
|
|
51
32
|
"aria-level": headingLevel,
|
|
52
33
|
"data-testid": testId,
|
|
@@ -54,7 +35,7 @@ const HeadingItem = /*#__PURE__*/memo(({
|
|
|
54
35
|
id: id
|
|
55
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
56
37
|
,
|
|
57
|
-
className: UNSAFE_className
|
|
38
|
+
className: ax(["_11c81vhk _1rjcze3t _18zrpxbi _syaz1n3s", UNSAFE_className])
|
|
58
39
|
}, rest), children);
|
|
59
40
|
});
|
|
60
41
|
export default HeadingItem;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
+
/* menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import "./menu-group.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
6
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context';
|
|
9
|
-
const baseStyles =
|
|
10
|
-
display: 'flex',
|
|
11
|
-
position: 'static',
|
|
12
|
-
flexDirection: 'column',
|
|
13
|
-
overflow: 'auto'
|
|
14
|
-
});
|
|
7
|
+
const baseStyles = null;
|
|
15
8
|
|
|
16
9
|
/**
|
|
17
10
|
* __Menu group__
|
|
@@ -36,11 +29,11 @@ const MenuGroup = ({
|
|
|
36
29
|
// @ts-expect-error
|
|
37
30
|
className: UNSAFE_className,
|
|
38
31
|
...rest
|
|
39
|
-
}) =>
|
|
32
|
+
}) => /*#__PURE__*/React.createElement(SpacingContext.Provider, {
|
|
40
33
|
value: spacing
|
|
41
|
-
},
|
|
34
|
+
}, /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
42
35
|
value: "border"
|
|
43
|
-
},
|
|
36
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
44
37
|
"aria-busy": isLoading,
|
|
45
38
|
style: {
|
|
46
39
|
minWidth,
|
|
@@ -48,12 +41,11 @@ const MenuGroup = ({
|
|
|
48
41
|
minHeight,
|
|
49
42
|
maxHeight
|
|
50
43
|
},
|
|
51
|
-
css: baseStyles,
|
|
52
44
|
"data-testid": testId,
|
|
53
45
|
role: role
|
|
54
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
47
|
,
|
|
56
|
-
className: UNSAFE_className
|
|
48
|
+
className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className])
|
|
57
49
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
58
50
|
}, rest))));
|
|
59
51
|
export default MenuGroup;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
/* popup-menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
|
|
6
|
+
|
|
8
7
|
import MenuGroup from './menu-group';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -15,8 +14,9 @@ const PopupMenuGroup = ({
|
|
|
15
14
|
minWidth = 320,
|
|
16
15
|
...rest
|
|
17
16
|
}) =>
|
|
17
|
+
/*#__PURE__*/
|
|
18
18
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
19
|
-
|
|
19
|
+
React.createElement(MenuGroup, _extends({
|
|
20
20
|
maxWidth: maxWidth,
|
|
21
21
|
minWidth: minWidth
|
|
22
22
|
}, rest));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
._18zru2gc{padding-inline:var(--ds-space-100,8px)}
|
|
3
|
+
._mqm21imm{border-block-start:1px solid var(--ds-menu-seperator-color,var(--ds-border,rgba(9,30,66,.08)))}._18m91wug{overflow-y:auto}
|
|
4
|
+
._1l6bgktf [data-ds--menu--heading-item]{margin-block-start:20px}
|
|
5
|
+
._1mfv8jkm [data-ds--menu--skeleton-heading-item]:first-of-type{margin-block-start:19px}
|
|
6
|
+
._1o9zidpf{flex-shrink:0}
|
|
7
|
+
._1o9zkb7n{flex-shrink:1}
|
|
8
|
+
._1p3hi2wt [data-ds--menu--heading-item]{margin-block-end:6px}
|
|
9
|
+
._1qdgi2wt:after, ._kfgti2wt:before{height:6px}
|
|
10
|
+
._1reo1wug{overflow-x:auto}
|
|
11
|
+
._1ywu1ule:after, ._cfu11ule:before{display:block}
|
|
12
|
+
._aetrb3bt:after, ._1kt9b3bt:before{content:""}
|
|
13
|
+
._auo4rdoj [data-ds--menu--skeleton-heading-item]{margin-block-end:9px}
|
|
14
|
+
._hp2110yn [data-ds--menu--skeleton-heading-item]{margin-block-start:25px}
|
|
15
|
+
._osbldlk8 [data-ds--menu--heading-item]:first-of-type{margin-block-start:14px}
|
|
16
|
+
[data-section]+._n7cnyjp0{margin-block-start:-6px}
|
|
17
|
+
._1bg41n1a:focus{outline-offset:-1px}
|
|
@@ -1,88 +1,27 @@
|
|
|
1
|
+
/* section.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
3
|
+
import "./section.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { Children, forwardRef, Fragment } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { N30A } from '@atlaskit/theme/colors';
|
|
11
7
|
import HeadingItem from '../menu-item/heading-item';
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const itemHeadingBottomMargin = gridSize * 0.75;
|
|
8
|
+
const itemHeadingTopMargin = 20;
|
|
9
|
+
const itemHeadingBottomMargin = 6;
|
|
15
10
|
// Skeleton content is slightly shorter than the real content.
|
|
16
11
|
// Because of that we slightly increase the top margin to offset this so the
|
|
17
12
|
// containing size both real and skeleton always equal approx 30px.
|
|
18
13
|
const itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
|
|
19
|
-
const skeletonHeadingHeight =
|
|
14
|
+
const skeletonHeadingHeight = 8;
|
|
20
15
|
const skeletonHeadingMarginOffset = 3;
|
|
21
16
|
const skeletonHeadingTopMargin = itemHeadingTopMargin + (itemHeadingContentHeight - skeletonHeadingHeight) - skeletonHeadingMarginOffset;
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
height: sectionPaddingTopBottom,
|
|
31
|
-
content: '""'
|
|
32
|
-
},
|
|
33
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
|
-
'& [data-ds--menu--heading-item]': {
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
|
-
marginBlockEnd: itemHeadingBottomMargin,
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
|
-
marginBlockStart: itemHeadingTopMargin,
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
40
|
-
'&:first-of-type': {
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
|
-
marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
46
|
-
'& [data-ds--menu--skeleton-heading-item]': {
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
|
-
marginBlockEnd: skeletonHeadingBottomMargin,
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
|
-
marginBlockStart: skeletonHeadingTopMargin,
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
52
|
-
'&:first-of-type': {
|
|
53
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
54
|
-
marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
'&:focus': {
|
|
58
|
-
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
59
|
-
// We have made a deliberate choice to leave this behaviour as is.
|
|
60
|
-
// This makes the outline go inside by 1px so it can actually be displayed
|
|
61
|
-
// else it gets cut off from the overflow: scroll from the parent menu group.
|
|
62
|
-
outlineOffset: -1
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
const scrollableStyles = css({
|
|
66
|
-
flexShrink: 1,
|
|
67
|
-
overflow: 'auto'
|
|
68
|
-
});
|
|
69
|
-
const unscrollableStyles = css({
|
|
70
|
-
flexShrink: 0
|
|
71
|
-
});
|
|
72
|
-
const thinSeparatorStyles = css({
|
|
73
|
-
borderBlockStart: `1px solid var(${VAR_SEPARATOR_COLOR}, ${`var(--ds-border, ${N30A})`})`
|
|
74
|
-
});
|
|
75
|
-
const noSeparatorStyles = css({
|
|
76
|
-
// this is to ensure that adjacent sections without separators don't get additional margins.
|
|
77
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
78
|
-
'[data-section] + &': {
|
|
79
|
-
marginBlockStart: -6
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
const sideNavSectionHeadingStyles = () => {
|
|
83
|
-
return {
|
|
84
|
-
paddingInline: "var(--ds-space-100, 8px)"
|
|
85
|
-
};
|
|
17
|
+
const sectionPaddingTopBottom = 6;
|
|
18
|
+
const styles = {
|
|
19
|
+
root: "_1ywu1ule _cfu11ule _1qdgi2wt _kfgti2wt _aetrb3bt _1kt9b3bt _1p3hi2wt _1l6bgktf _osbldlk8 _auo4rdoj _hp2110yn _1mfv8jkm _1bg41n1a",
|
|
20
|
+
scrollable: "_1reo1wug _18m91wug _1o9zkb7n",
|
|
21
|
+
unscrollable: "_1o9zidpf",
|
|
22
|
+
thinSeparator: "_mqm21imm",
|
|
23
|
+
noSeparator: "_n7cnyjp0",
|
|
24
|
+
sideNavSectionHeading: "_18zru2gc"
|
|
86
25
|
};
|
|
87
26
|
|
|
88
27
|
/**
|
|
@@ -110,14 +49,14 @@ const Section = /*#__PURE__*/forwardRef(({
|
|
|
110
49
|
className: UNSAFE_className,
|
|
111
50
|
...rest
|
|
112
51
|
}, ref) => {
|
|
113
|
-
const content = isList ?
|
|
52
|
+
const content = isList ? /*#__PURE__*/React.createElement("ul", {
|
|
114
53
|
style: {
|
|
115
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
116
55
|
margin: 0,
|
|
117
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
118
57
|
padding: 0
|
|
119
58
|
}
|
|
120
|
-
}, Children.map(Children.toArray(children), (child, index) =>
|
|
59
|
+
}, Children.map(Children.toArray(children), (child, index) => /*#__PURE__*/React.createElement("li", {
|
|
121
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
122
61
|
style: {
|
|
123
62
|
listStyleType: 'none',
|
|
@@ -126,21 +65,22 @@ const Section = /*#__PURE__*/forwardRef(({
|
|
|
126
65
|
},
|
|
127
66
|
key: index
|
|
128
67
|
}, child))) : children;
|
|
129
|
-
const childrenMarkup = title !== undefined ?
|
|
130
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
131
|
-
, {
|
|
132
|
-
cssFn: isSideNavSection ? sideNavSectionHeadingStyles : undefined,
|
|
68
|
+
const childrenMarkup = title !== undefined ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(HeadingItem, {
|
|
133
69
|
testId: testId && `${testId}--heading`,
|
|
134
70
|
"aria-hidden": true
|
|
135
|
-
|
|
136
|
-
|
|
71
|
+
// @ts-expect-error
|
|
72
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
73
|
+
,
|
|
74
|
+
className: ax([isSideNavSection && styles.sideNavSectionHeading])
|
|
75
|
+
}, title), content) : /*#__PURE__*/React.createElement(Fragment, null, content);
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
137
77
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
138
|
-
className: UNSAFE_className,
|
|
78
|
+
className: ax([styles.root, isScrollable ? styles.scrollable : styles.unscrollable, hasSeparator ? styles.thinSeparator : styles.noSeparator, UNSAFE_className]),
|
|
139
79
|
id: id
|
|
140
80
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
141
81
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
142
82
|
,
|
|
143
|
-
|
|
83
|
+
|
|
144
84
|
"aria-label": title,
|
|
145
85
|
"aria-labelledby": titleId,
|
|
146
86
|
"data-testid": testId,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
._11c81vhk{font:var(--ds-font-heading-xxsmall,normal 600 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
3
|
+
._1rjcze3t{padding-block:var(--ds-space-0,0)}
|
|
4
|
+
._syaz1vvm{color:var(--_bbz764)}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
+
/* heading-item.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "testId", "headingLevel", "id", "
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
4
|
+
var _excluded = ["children", "testId", "headingLevel", "id", "className"];
|
|
5
|
+
import "./heading-item.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { memo } from 'react';
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { css, jsx } from '@emotion/react';
|
|
12
|
-
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
13
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
14
9
|
import { N300 } from '@atlaskit/theme/colors';
|
|
15
|
-
var headingStyles =
|
|
16
|
-
color: "var(--ds-text-subtle, ".concat(N300, ")"),
|
|
17
|
-
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
18
|
-
paddingBlock: "var(--ds-space-0, 0px)",
|
|
19
|
-
paddingInline: "var(--ds-space-200, 16px)"
|
|
20
|
-
});
|
|
10
|
+
var headingStyles = null;
|
|
21
11
|
|
|
22
12
|
/**
|
|
23
13
|
* __Heading item__
|
|
@@ -33,19 +23,9 @@ var HeadingItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
33
23
|
_ref$headingLevel = _ref.headingLevel,
|
|
34
24
|
headingLevel = _ref$headingLevel === void 0 ? 2 : _ref$headingLevel,
|
|
35
25
|
id = _ref.id,
|
|
36
|
-
_ref$cssFn = _ref.cssFn,
|
|
37
|
-
cssFn = _ref$cssFn === void 0 ? noop : _ref$cssFn,
|
|
38
26
|
UNSAFE_className = _ref.className,
|
|
39
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
|
-
var UNSAFE_overrides = css(cssFn(undefined));
|
|
45
|
-
return jsx("div", _extends({
|
|
46
|
-
css: [headingStyles,
|
|
47
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
48
|
-
UNSAFE_overrides],
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
49
29
|
role: "heading",
|
|
50
30
|
"aria-level": headingLevel,
|
|
51
31
|
"data-testid": testId,
|
|
@@ -53,7 +33,11 @@ var HeadingItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
53
33
|
id: id
|
|
54
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
35
|
,
|
|
56
|
-
className: UNSAFE_className
|
|
57
|
-
}, rest
|
|
36
|
+
className: ax(["_11c81vhk _1rjcze3t _18zrpxbi _syaz1vvm", UNSAFE_className])
|
|
37
|
+
}, rest, {
|
|
38
|
+
style: {
|
|
39
|
+
"--_bbz764": ix("var(--ds-text-subtle, ".concat(N300, ")"))
|
|
40
|
+
}
|
|
41
|
+
}), children);
|
|
58
42
|
});
|
|
59
43
|
export default HeadingItem;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
/* menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
+
import "./menu-group.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
10
8
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context';
|
|
11
|
-
var baseStyles =
|
|
12
|
-
display: 'flex',
|
|
13
|
-
position: 'static',
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
overflow: 'auto'
|
|
16
|
-
});
|
|
9
|
+
var baseStyles = null;
|
|
17
10
|
|
|
18
11
|
/**
|
|
19
12
|
* __Menu group__
|
|
@@ -35,11 +28,11 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
35
28
|
spacing = _ref$spacing === void 0 ? 'cozy' : _ref$spacing,
|
|
36
29
|
UNSAFE_className = _ref.className,
|
|
37
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
|
-
return
|
|
31
|
+
return /*#__PURE__*/React.createElement(SpacingContext.Provider, {
|
|
39
32
|
value: spacing
|
|
40
|
-
},
|
|
33
|
+
}, /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
41
34
|
value: "border"
|
|
42
|
-
},
|
|
35
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
43
36
|
"aria-busy": isLoading,
|
|
44
37
|
style: {
|
|
45
38
|
minWidth: minWidth,
|
|
@@ -47,12 +40,11 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
47
40
|
minHeight: minHeight,
|
|
48
41
|
maxHeight: maxHeight
|
|
49
42
|
},
|
|
50
|
-
css: baseStyles,
|
|
51
43
|
"data-testid": testId,
|
|
52
44
|
role: role
|
|
53
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
54
46
|
,
|
|
55
|
-
className: UNSAFE_className
|
|
47
|
+
className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className])
|
|
56
48
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
57
49
|
}, rest))));
|
|
58
50
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
/* popup-menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["maxWidth", "minWidth"];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
|
|
8
|
+
|
|
10
9
|
import MenuGroup from './menu-group';
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -19,8 +18,9 @@ var PopupMenuGroup = function PopupMenuGroup(_ref) {
|
|
|
19
18
|
minWidth = _ref$minWidth === void 0 ? 320 : _ref$minWidth,
|
|
20
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
20
|
return (
|
|
21
|
+
/*#__PURE__*/
|
|
22
22
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
23
|
-
|
|
23
|
+
React.createElement(MenuGroup, _extends({
|
|
24
24
|
maxWidth: maxWidth,
|
|
25
25
|
minWidth: minWidth
|
|
26
26
|
}, rest))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
._18zru2gc{padding-inline:var(--ds-space-100,8px)}
|
|
3
|
+
._mqm21imm{border-block-start:1px solid var(--ds-menu-seperator-color,var(--ds-border,rgba(9,30,66,.08)))}._18m91wug{overflow-y:auto}
|
|
4
|
+
._1l6bgktf [data-ds--menu--heading-item]{margin-block-start:20px}
|
|
5
|
+
._1mfv8jkm [data-ds--menu--skeleton-heading-item]:first-of-type{margin-block-start:19px}
|
|
6
|
+
._1o9zidpf{flex-shrink:0}
|
|
7
|
+
._1o9zkb7n{flex-shrink:1}
|
|
8
|
+
._1p3hi2wt [data-ds--menu--heading-item]{margin-block-end:6px}
|
|
9
|
+
._1qdgi2wt:after, ._kfgti2wt:before{height:6px}
|
|
10
|
+
._1reo1wug{overflow-x:auto}
|
|
11
|
+
._1ywu1ule:after, ._cfu11ule:before{display:block}
|
|
12
|
+
._aetrb3bt:after, ._1kt9b3bt:before{content:""}
|
|
13
|
+
._auo4rdoj [data-ds--menu--skeleton-heading-item]{margin-block-end:9px}
|
|
14
|
+
._hp2110yn [data-ds--menu--skeleton-heading-item]{margin-block-start:25px}
|
|
15
|
+
._osbldlk8 [data-ds--menu--heading-item]:first-of-type{margin-block-start:14px}
|
|
16
|
+
[data-section]+._n7cnyjp0{margin-block-start:-6px}
|
|
17
|
+
._1bg41n1a:focus{outline-offset:-1px}
|
|
@@ -1,90 +1,29 @@
|
|
|
1
|
+
/* section.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "className"];
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
5
|
+
import "./section.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { Children, forwardRef, Fragment } from 'react';
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { css, jsx } from '@emotion/react';
|
|
12
|
-
import { N30A } from '@atlaskit/theme/colors';
|
|
13
9
|
import HeadingItem from '../menu-item/heading-item';
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var itemHeadingBottomMargin = gridSize * 0.75;
|
|
10
|
+
var itemHeadingTopMargin = 20;
|
|
11
|
+
var itemHeadingBottomMargin = 6;
|
|
17
12
|
// Skeleton content is slightly shorter than the real content.
|
|
18
13
|
// Because of that we slightly increase the top margin to offset this so the
|
|
19
14
|
// containing size both real and skeleton always equal approx 30px.
|
|
20
15
|
var itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
|
|
21
|
-
var skeletonHeadingHeight =
|
|
16
|
+
var skeletonHeadingHeight = 8;
|
|
22
17
|
var skeletonHeadingMarginOffset = 3;
|
|
23
18
|
var skeletonHeadingTopMargin = itemHeadingTopMargin + (itemHeadingContentHeight - skeletonHeadingHeight) - skeletonHeadingMarginOffset;
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
height: sectionPaddingTopBottom,
|
|
33
|
-
content: '""'
|
|
34
|
-
},
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
36
|
-
'& [data-ds--menu--heading-item]': {
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
|
-
marginBlockEnd: itemHeadingBottomMargin,
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
|
-
marginBlockStart: itemHeadingTopMargin,
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
42
|
-
'&:first-of-type': {
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
|
-
marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
48
|
-
'& [data-ds--menu--skeleton-heading-item]': {
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
|
-
marginBlockEnd: skeletonHeadingBottomMargin,
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
-
marginBlockStart: skeletonHeadingTopMargin,
|
|
53
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
54
|
-
'&:first-of-type': {
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
|
-
marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
'&:focus': {
|
|
60
|
-
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
61
|
-
// We have made a deliberate choice to leave this behaviour as is.
|
|
62
|
-
// This makes the outline go inside by 1px so it can actually be displayed
|
|
63
|
-
// else it gets cut off from the overflow: scroll from the parent menu group.
|
|
64
|
-
outlineOffset: -1
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
var scrollableStyles = css({
|
|
68
|
-
flexShrink: 1,
|
|
69
|
-
overflow: 'auto'
|
|
70
|
-
});
|
|
71
|
-
var unscrollableStyles = css({
|
|
72
|
-
flexShrink: 0
|
|
73
|
-
});
|
|
74
|
-
var thinSeparatorStyles = css({
|
|
75
|
-
borderBlockStart: "1px solid var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(N30A, ")"), ")")
|
|
76
|
-
});
|
|
77
|
-
var noSeparatorStyles = css({
|
|
78
|
-
// this is to ensure that adjacent sections without separators don't get additional margins.
|
|
79
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
80
|
-
'[data-section] + &': {
|
|
81
|
-
marginBlockStart: -6
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
var sideNavSectionHeadingStyles = function sideNavSectionHeadingStyles() {
|
|
85
|
-
return {
|
|
86
|
-
paddingInline: "var(--ds-space-100, 8px)"
|
|
87
|
-
};
|
|
19
|
+
var sectionPaddingTopBottom = 6;
|
|
20
|
+
var styles = {
|
|
21
|
+
root: "_1ywu1ule _cfu11ule _1qdgi2wt _kfgti2wt _aetrb3bt _1kt9b3bt _1p3hi2wt _1l6bgktf _osbldlk8 _auo4rdoj _hp2110yn _1mfv8jkm _1bg41n1a",
|
|
22
|
+
scrollable: "_1reo1wug _18m91wug _1o9zkb7n",
|
|
23
|
+
unscrollable: "_1o9zidpf",
|
|
24
|
+
thinSeparator: "_mqm21imm",
|
|
25
|
+
noSeparator: "_n7cnyjp0",
|
|
26
|
+
sideNavSectionHeading: "_18zru2gc"
|
|
88
27
|
};
|
|
89
28
|
|
|
90
29
|
/**
|
|
@@ -109,7 +48,7 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
109
48
|
isSideNavSection = _ref$isSideNavSection === void 0 ? false : _ref$isSideNavSection,
|
|
110
49
|
UNSAFE_className = _ref.className,
|
|
111
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
112
|
-
var content = isList ?
|
|
51
|
+
var content = isList ? /*#__PURE__*/React.createElement("ul", {
|
|
113
52
|
style: {
|
|
114
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
115
54
|
margin: 0,
|
|
@@ -117,7 +56,7 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
117
56
|
padding: 0
|
|
118
57
|
}
|
|
119
58
|
}, Children.map(Children.toArray(children), function (child, index) {
|
|
120
|
-
return
|
|
59
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
121
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
122
61
|
style: {
|
|
123
62
|
listStyleType: 'none',
|
|
@@ -127,21 +66,22 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
127
66
|
key: index
|
|
128
67
|
}, child);
|
|
129
68
|
})) : children;
|
|
130
|
-
var childrenMarkup = title !== undefined ?
|
|
131
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
132
|
-
, {
|
|
133
|
-
cssFn: isSideNavSection ? sideNavSectionHeadingStyles : undefined,
|
|
69
|
+
var childrenMarkup = title !== undefined ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(HeadingItem, {
|
|
134
70
|
testId: testId && "".concat(testId, "--heading"),
|
|
135
71
|
"aria-hidden": true
|
|
136
|
-
|
|
137
|
-
|
|
72
|
+
// @ts-expect-error
|
|
73
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
74
|
+
,
|
|
75
|
+
className: ax([isSideNavSection && styles.sideNavSectionHeading])
|
|
76
|
+
}, title), content) : /*#__PURE__*/React.createElement(Fragment, null, content);
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
138
78
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
139
|
-
className: UNSAFE_className,
|
|
79
|
+
className: ax([styles.root, isScrollable ? styles.scrollable : styles.unscrollable, hasSeparator ? styles.thinSeparator : styles.noSeparator, UNSAFE_className]),
|
|
140
80
|
id: id
|
|
141
81
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
142
82
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
143
83
|
,
|
|
144
|
-
|
|
84
|
+
|
|
145
85
|
"aria-label": title,
|
|
146
86
|
"aria-labelledby": titleId,
|
|
147
87
|
"data-testid": testId,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
import type { HeadingItemProps } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* __Heading item__
|
|
@@ -9,5 +8,5 @@ import type { HeadingItemProps } from '../types';
|
|
|
9
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item)
|
|
10
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
11
10
|
*/
|
|
12
|
-
declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id,
|
|
11
|
+
declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
|
|
13
12
|
export default HeadingItem;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import type { MenuGroupProps } from '../types';
|
|
7
3
|
/**
|
|
8
4
|
* __Menu group__
|
|
@@ -12,5 +8,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
12
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
13
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
14
10
|
*/
|
|
15
|
-
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) =>
|
|
11
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
16
12
|
export default MenuGroup;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import type { MenuGroupProps } from '../types';
|
|
7
3
|
/**
|
|
8
4
|
* @deprecated refer to MenuGroup, explicitly set maxWidth and minWidth
|
|
9
5
|
*/
|
|
10
|
-
declare const PopupMenuGroup: ({ maxWidth, minWidth, ...rest }: MenuGroupProps) =>
|
|
6
|
+
declare const PopupMenuGroup: ({ maxWidth, minWidth, ...rest }: MenuGroupProps) => JSX.Element;
|
|
11
7
|
export default PopupMenuGroup;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -324,13 +324,6 @@ export interface SkeletonItemProps {
|
|
|
324
324
|
cssFn?: StatelessCSSFn;
|
|
325
325
|
}
|
|
326
326
|
export interface HeadingItemProps {
|
|
327
|
-
/**
|
|
328
|
-
* A function that overrides the styles.
|
|
329
|
-
* It receives the current styles and returns a customized styles object.
|
|
330
|
-
*
|
|
331
|
-
* @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
332
|
-
*/
|
|
333
|
-
cssFn?: StatelessCSSFn;
|
|
334
327
|
/**
|
|
335
328
|
* The text of the heading.
|
|
336
329
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
import type { HeadingItemProps } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* __Heading item__
|
|
@@ -9,5 +8,5 @@ import type { HeadingItemProps } from '../types';
|
|
|
9
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item)
|
|
10
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
11
10
|
*/
|
|
12
|
-
declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id,
|
|
11
|
+
declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
|
|
13
12
|
export default HeadingItem;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import type { MenuGroupProps } from '../types';
|
|
7
3
|
/**
|
|
8
4
|
* __Menu group__
|
|
@@ -12,5 +8,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
12
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
13
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
14
10
|
*/
|
|
15
|
-
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) =>
|
|
11
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
16
12
|
export default MenuGroup;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import type { MenuGroupProps } from '../types';
|
|
7
3
|
/**
|
|
8
4
|
* @deprecated refer to MenuGroup, explicitly set maxWidth and minWidth
|
|
9
5
|
*/
|
|
10
|
-
declare const PopupMenuGroup: ({ maxWidth, minWidth, ...rest }: MenuGroupProps) =>
|
|
6
|
+
declare const PopupMenuGroup: ({ maxWidth, minWidth, ...rest }: MenuGroupProps) => JSX.Element;
|
|
11
7
|
export default PopupMenuGroup;
|
|
@@ -324,13 +324,6 @@ export interface SkeletonItemProps {
|
|
|
324
324
|
cssFn?: StatelessCSSFn;
|
|
325
325
|
}
|
|
326
326
|
export interface HeadingItemProps {
|
|
327
|
-
/**
|
|
328
|
-
* A function that overrides the styles.
|
|
329
|
-
* It receives the current styles and returns a customized styles object.
|
|
330
|
-
*
|
|
331
|
-
* @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
332
|
-
*/
|
|
333
|
-
cssFn?: StatelessCSSFn;
|
|
334
327
|
/**
|
|
335
328
|
* The text of the heading.
|
|
336
329
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "A list of options to help users navigate, or perform actions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,14 +41,15 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@atlaskit/app-provider": "^2.
|
|
44
|
+
"@atlaskit/app-provider": "^2.2.0",
|
|
45
|
+
"@atlaskit/css": "^0.10.0",
|
|
45
46
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
46
47
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
47
48
|
"@atlaskit/interaction-context": "^3.0.0",
|
|
48
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
|
-
"@atlaskit/primitives": "^14.
|
|
50
|
+
"@atlaskit/primitives": "^14.8.0",
|
|
50
51
|
"@atlaskit/theme": "^18.0.0",
|
|
51
|
-
"@atlaskit/tokens": "^4.
|
|
52
|
+
"@atlaskit/tokens": "^4.9.0",
|
|
52
53
|
"@babel/runtime": "^7.0.0",
|
|
53
54
|
"@compiled/react": "^0.18.3",
|
|
54
55
|
"@emotion/react": "^11.7.1"
|
|
@@ -61,12 +62,12 @@
|
|
|
61
62
|
"@af/accessibility-testing": "workspace:^",
|
|
62
63
|
"@af/integration-testing": "workspace:^",
|
|
63
64
|
"@af/visual-regression": "workspace:^",
|
|
64
|
-
"@atlaskit/button": "^23.
|
|
65
|
+
"@atlaskit/button": "^23.2.0",
|
|
65
66
|
"@atlaskit/docs": "^10.0.0",
|
|
66
|
-
"@atlaskit/icon": "^26.
|
|
67
|
+
"@atlaskit/icon": "^26.1.0",
|
|
67
68
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
68
69
|
"@atlaskit/icon-object": "^7.1.0",
|
|
69
|
-
"@atlaskit/link": "^3.
|
|
70
|
+
"@atlaskit/link": "^3.2.0",
|
|
70
71
|
"@atlaskit/section-message": "^8.2.0",
|
|
71
72
|
"@atlaskit/visual-regression": "workspace:^",
|
|
72
73
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|