@atlaskit/page-layout 1.7.8 → 1.7.10
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 +12 -0
- package/__perf__/utils/perf-example.tsx +1 -1
- package/dist/cjs/components/resize-control/grab-area.js +1 -0
- package/dist/cjs/components/resize-control/index.js +3 -3
- package/dist/cjs/components/resize-control/resize-button.js +1 -1
- package/dist/cjs/components/slots/internal/left-sidebar-inner.js +2 -2
- package/dist/cjs/components/slots/internal/left-sidebar-outer.js +2 -2
- package/dist/cjs/components/slots/internal/slot-focus-ring.js +2 -2
- package/dist/cjs/components/slots/left-sidebar.js +2 -2
- package/dist/cjs/components/slots/page-layout.js +1 -1
- package/dist/cjs/components/slots/slot-dimensions.js +1 -1
- package/dist/cjs/controllers/sidebar-resize-controller.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/resize-control/grab-area.js +1 -0
- package/dist/es2019/components/resize-control/index.js +3 -3
- package/dist/es2019/components/resize-control/resize-button.js +2 -2
- package/dist/es2019/components/slots/internal/left-sidebar-inner.js +4 -4
- package/dist/es2019/components/slots/internal/left-sidebar-outer.js +4 -4
- package/dist/es2019/components/slots/internal/slot-focus-ring.js +2 -2
- package/dist/es2019/components/slots/left-sidebar.js +2 -2
- package/dist/es2019/components/slots/page-layout.js +2 -2
- package/dist/es2019/components/slots/slot-dimensions.js +1 -1
- package/dist/es2019/controllers/sidebar-resize-controller.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/resize-control/grab-area.js +1 -0
- package/dist/esm/components/resize-control/index.js +3 -3
- package/dist/esm/components/resize-control/resize-button.js +1 -1
- package/dist/esm/components/slots/internal/left-sidebar-inner.js +2 -2
- package/dist/esm/components/slots/internal/left-sidebar-outer.js +2 -2
- package/dist/esm/components/slots/internal/slot-focus-ring.js +2 -2
- package/dist/esm/components/slots/left-sidebar.js +2 -2
- package/dist/esm/components/slots/page-layout.js +1 -1
- package/dist/esm/components/slots/slot-dimensions.js +1 -1
- package/dist/esm/controllers/sidebar-resize-controller.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
- package/tmp/api-report-tmp.d.ts +174 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/page-layout
|
|
2
2
|
|
|
3
|
+
## 1.7.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6263a07010c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6263a07010c) - Still behind a feature flag, reduces the breakpoint at which the new mobile functionality for our left sidebar "flyout mode" in mobile is applied (reduced from ~1024px to ~768px).
|
|
8
|
+
|
|
9
|
+
## 1.7.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`55c42f7ce9d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/55c42f7ce9d) - [ux] Add proper orientation to grab area.
|
|
14
|
+
|
|
3
15
|
## 1.7.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -48,7 +48,7 @@ const Wrapper = ({
|
|
|
48
48
|
|
|
49
49
|
const sidebarWrapperStyles = css({
|
|
50
50
|
height: '100%',
|
|
51
|
-
// eslint-disable-next-line @
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
52
52
|
nav: {
|
|
53
53
|
minWidth: 20,
|
|
54
54
|
overflowX: 'hidden',
|
|
@@ -75,6 +75,7 @@ var GrabArea = function GrabArea(_ref) {
|
|
|
75
75
|
,
|
|
76
76
|
role: "separator",
|
|
77
77
|
css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
|
|
78
|
+
"aria-orientation": "vertical",
|
|
78
79
|
"aria-valuenow": leftSidebarPercentageExpanded,
|
|
79
80
|
"aria-valuemin": 0,
|
|
80
81
|
"aria-valuemax": 100,
|
|
@@ -37,7 +37,7 @@ var showResizeButtonStyles = (0, _react2.css)({
|
|
|
37
37
|
|
|
38
38
|
// @ts-expect-error adding `!important` to style rules is currently a type error
|
|
39
39
|
var globalResizingStyles = (0, _react2.css)({
|
|
40
|
-
// eslint-disable-next-line @
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
41
41
|
'*': {
|
|
42
42
|
// Setting the cursor to be `ew-resize` on all elements so that even if the user
|
|
43
43
|
// pointer slips off the resize handle, the cursor will still be the resize cursor
|
|
@@ -50,7 +50,7 @@ var globalResizingStyles = (0, _react2.css)({
|
|
|
50
50
|
// - The current selection will resume after resizing
|
|
51
51
|
userSelect: 'none !important'
|
|
52
52
|
},
|
|
53
|
-
// eslint-disable-next-line @
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
54
54
|
iframe: {
|
|
55
55
|
// Disabling pointer events on iframes when resizing
|
|
56
56
|
// as iframes will swallower user events when the user is over them
|
|
@@ -87,7 +87,7 @@ var ResizeControl = function ResizeControl(_ref) {
|
|
|
87
87
|
var unbindEvents = (0, _react.useRef)(null);
|
|
88
88
|
var mobileMediaQuery = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
89
89
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- With the feature flag, this does not apply as it should be static.
|
|
90
|
-
(0, _responsive.UNSAFE_useMediaQuery)('below.
|
|
90
|
+
(0, _responsive.UNSAFE_useMediaQuery)('below.sm') : null;
|
|
91
91
|
|
|
92
92
|
// Used in some cases to ensure function references don't have to change
|
|
93
93
|
// TODO: more functions could use `stableSidebarState` rather than `leftSidebarState`
|
|
@@ -27,7 +27,7 @@ var increaseHitAreaStyles = (0, _react.css)({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
30
|
-
var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.
|
|
30
|
+
var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.sm, {
|
|
31
31
|
opacity: 1
|
|
32
32
|
})) : undefined;
|
|
33
33
|
var resizeIconButtonStyles = (0, _react.css)({
|
|
@@ -18,7 +18,7 @@ var _hooks = require("../../../common/hooks");
|
|
|
18
18
|
var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
21
|
-
var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.
|
|
21
|
+
var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.sm, {
|
|
22
22
|
width: "".concat(_constants.MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH, "px"),
|
|
23
23
|
position: 'fixed',
|
|
24
24
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -30,7 +30,7 @@ var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-syst
|
|
|
30
30
|
})) : undefined;
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
33
|
-
var mobileInnerFlyoutStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.
|
|
33
|
+
var mobileInnerFlyoutStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.sm, {
|
|
34
34
|
width: "min(90vw, ".concat(_constants.MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH, "px)"),
|
|
35
35
|
maxWidth: _constants.MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH,
|
|
36
36
|
transition: "width ".concat(_constants.TRANSITION_DURATION, "ms ").concat(_motion.easeOut, " 0s, box-shadow ").concat(_constants.TRANSITION_DURATION, "ms ").concat(_motion.easeOut, " 0s")
|
|
@@ -23,7 +23,7 @@ var _slotFocusRing = _interopRequireDefault(require("./slot-focus-ring"));
|
|
|
23
23
|
var prefersReducedMotionStyles = (0, _react2.css)((0, _motion.prefersReducedMotion)());
|
|
24
24
|
|
|
25
25
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
26
|
-
var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react2.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.
|
|
26
|
+
var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react2.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.sm, {
|
|
27
27
|
width: _constants.MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH,
|
|
28
28
|
cursor: 'pointer',
|
|
29
29
|
opacity: 1,
|
|
@@ -36,7 +36,7 @@ var mobileStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-syst
|
|
|
36
36
|
})) : undefined;
|
|
37
37
|
|
|
38
38
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
39
|
-
var mobileFlyoutStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react2.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.
|
|
39
|
+
var mobileFlyoutStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react2.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.sm, {
|
|
40
40
|
cursor: 'revert'
|
|
41
41
|
})) : undefined;
|
|
42
42
|
var outerStyles = (0, _react2.css)({
|
|
@@ -11,7 +11,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
11
11
|
var focusStyles = (0, _react.css)({
|
|
12
12
|
':focus': {
|
|
13
13
|
outline: 'none',
|
|
14
|
-
// eslint-disable-next-line @
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
15
15
|
'> div': {
|
|
16
16
|
boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
|
|
17
17
|
outline: 'none'
|
|
@@ -26,7 +26,7 @@ var focusStyles = (0, _react.css)({
|
|
|
26
26
|
var sidebarFocusStyles = (0, _react.css)({
|
|
27
27
|
':focus': {
|
|
28
28
|
outline: 'none',
|
|
29
|
-
// eslint-disable-next-line @
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
30
30
|
'> div > div': {
|
|
31
31
|
boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
|
|
32
32
|
outline: 'none'
|
|
@@ -229,7 +229,7 @@ var LeftSidebar = function LeftSidebar(props) {
|
|
|
229
229
|
};
|
|
230
230
|
var mobileMediaQuery = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
231
231
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
232
|
-
(0, _responsive.UNSAFE_useMediaQuery)('below.
|
|
232
|
+
(0, _responsive.UNSAFE_useMediaQuery)('below.sm') : null;
|
|
233
233
|
var openMobileFlyout = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
234
234
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
235
235
|
(0, _react.useCallback)(function () {
|
|
@@ -264,7 +264,7 @@ var LeftSidebar = function LeftSidebar(props) {
|
|
|
264
264
|
}, [setLeftSidebarState, onCollapse, mobileMediaQuery]) : undefined;
|
|
265
265
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g')) {
|
|
266
266
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
267
|
-
(0, _responsive.UNSAFE_useMediaQuery)('below.
|
|
267
|
+
(0, _responsive.UNSAFE_useMediaQuery)('below.sm', function (event) {
|
|
268
268
|
setLeftSidebarState(function (current) {
|
|
269
269
|
if (event.matches && !current.isLeftSidebarCollapsed) {
|
|
270
270
|
// Sidebar was previously open when resizing downwards, convert the sidebar being open to a flyout being open
|
|
@@ -29,7 +29,7 @@ var gridStyles = (0, _react2.css)({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
32
|
-
var gridStylesMobile = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react2.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.
|
|
32
|
+
var gridStylesMobile = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? (0, _react2.css)((0, _defineProperty2.default)({}, _responsive.UNSAFE_media.below.sm, {
|
|
33
33
|
gridTemplateAreas: gridTemplateAreasMobile,
|
|
34
34
|
gridTemplateColumns: "".concat(_constants.LEFT_PANEL_WIDTH, " minmax(0, 1fr)")
|
|
35
35
|
})) : undefined;
|
|
@@ -12,6 +12,6 @@ var _default = function _default(_ref) {
|
|
|
12
12
|
var variableName = _ref.variableName,
|
|
13
13
|
value = _ref.value,
|
|
14
14
|
mobileValue = _ref.mobileValue;
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement("style", null, ":root{--".concat(variableName, ":").concat(value, "px;}"), (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && mobileValue && "".concat(_responsive.UNSAFE_media.below.
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement("style", null, ":root{--".concat(variableName, ":").concat(value, "px;}"), (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && mobileValue && "".concat(_responsive.UNSAFE_media.below.sm, " { :root{--").concat(variableName, ":").concat(mobileValue, "px;} }"));
|
|
16
16
|
};
|
|
17
17
|
exports.default = _default;
|
|
@@ -65,7 +65,7 @@ var SidebarResizeController = function SidebarResizeController(_ref) {
|
|
|
65
65
|
var transition = (0, _react.useRef)(null);
|
|
66
66
|
var mobileMediaQuery = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
67
67
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- With the feature flag, this does not apply as it should be static.
|
|
68
|
-
(0, _responsive.UNSAFE_useMediaQuery)('below.
|
|
68
|
+
(0, _responsive.UNSAFE_useMediaQuery)('below.sm') : null;
|
|
69
69
|
var isOpen = mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches ? isFlyoutOpen : !isLeftSidebarCollapsed;
|
|
70
70
|
var expandLeftSidebar = (0, _react.useCallback)(function () {
|
|
71
71
|
var _transition$current2, _transition$current3;
|
package/dist/cjs/version.json
CHANGED
|
@@ -31,7 +31,7 @@ const showResizeButtonStyles = css({
|
|
|
31
31
|
|
|
32
32
|
// @ts-expect-error adding `!important` to style rules is currently a type error
|
|
33
33
|
const globalResizingStyles = css({
|
|
34
|
-
// eslint-disable-next-line @
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
35
35
|
'*': {
|
|
36
36
|
// Setting the cursor to be `ew-resize` on all elements so that even if the user
|
|
37
37
|
// pointer slips off the resize handle, the cursor will still be the resize cursor
|
|
@@ -44,7 +44,7 @@ const globalResizingStyles = css({
|
|
|
44
44
|
// - The current selection will resume after resizing
|
|
45
45
|
userSelect: 'none !important'
|
|
46
46
|
},
|
|
47
|
-
// eslint-disable-next-line @
|
|
47
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
48
48
|
iframe: {
|
|
49
49
|
// Disabling pointer events on iframes when resizing
|
|
50
50
|
// as iframes will swallower user events when the user is over them
|
|
@@ -80,7 +80,7 @@ const ResizeControl = ({
|
|
|
80
80
|
const unbindEvents = useRef(null);
|
|
81
81
|
const mobileMediaQuery = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
82
82
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- With the feature flag, this does not apply as it should be static.
|
|
83
|
-
useMediaQuery('below.
|
|
83
|
+
useMediaQuery('below.sm') : null;
|
|
84
84
|
|
|
85
85
|
// Used in some cases to ensure function references don't have to change
|
|
86
86
|
// TODO: more functions could use `stableSidebarState` rather than `leftSidebarState`
|
|
@@ -19,8 +19,8 @@ const increaseHitAreaStyles = css({
|
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
21
21
|
const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
|
|
22
|
-
// eslint-disable-next-line @
|
|
23
|
-
[UNSAFE_media.below.
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
23
|
+
[UNSAFE_media.below.sm]: {
|
|
24
24
|
opacity: 1
|
|
25
25
|
}
|
|
26
26
|
}) : undefined;
|
|
@@ -11,8 +11,8 @@ const prefersReducedMotionStyles = css(prefersReducedMotion());
|
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
13
13
|
const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
|
|
14
|
-
// eslint-disable-next-line @
|
|
15
|
-
[UNSAFE_media.below.
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
15
|
+
[UNSAFE_media.below.sm]: {
|
|
16
16
|
width: `${MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH}px`,
|
|
17
17
|
position: 'fixed',
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -26,8 +26,8 @@ const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-l
|
|
|
26
26
|
|
|
27
27
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
28
28
|
const mobileInnerFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
|
|
29
|
-
// eslint-disable-next-line @
|
|
30
|
-
[UNSAFE_media.below.
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
30
|
+
[UNSAFE_media.below.sm]: {
|
|
31
31
|
width: `min(90vw, ${MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH}px)`,
|
|
32
32
|
maxWidth: MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH,
|
|
33
33
|
transition: `width ${TRANSITION_DURATION}ms ${easeOut} 0s, box-shadow ${TRANSITION_DURATION}ms ${easeOut} 0s`
|
|
@@ -15,8 +15,8 @@ const prefersReducedMotionStyles = css(prefersReducedMotion());
|
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
17
17
|
const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
|
|
18
|
-
// eslint-disable-next-line @
|
|
19
|
-
[UNSAFE_media.below.
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
19
|
+
[UNSAFE_media.below.sm]: {
|
|
20
20
|
width: MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH,
|
|
21
21
|
cursor: 'pointer',
|
|
22
22
|
opacity: 1,
|
|
@@ -31,8 +31,8 @@ const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-l
|
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
33
33
|
const mobileFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
|
|
34
|
-
// eslint-disable-next-line @
|
|
35
|
-
[UNSAFE_media.below.
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
35
|
+
[UNSAFE_media.below.sm]: {
|
|
36
36
|
cursor: 'revert'
|
|
37
37
|
}
|
|
38
38
|
}) : undefined;
|
|
@@ -5,7 +5,7 @@ import { B100 } from '@atlaskit/theme/colors';
|
|
|
5
5
|
const focusStyles = css({
|
|
6
6
|
':focus': {
|
|
7
7
|
outline: 'none',
|
|
8
|
-
// eslint-disable-next-line @
|
|
8
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
9
9
|
'> div': {
|
|
10
10
|
boxShadow: `0px 0px 0px 2px inset ${`var(--ds-border-focused, ${B100})`}`,
|
|
11
11
|
outline: 'none'
|
|
@@ -20,7 +20,7 @@ const focusStyles = css({
|
|
|
20
20
|
const sidebarFocusStyles = css({
|
|
21
21
|
':focus': {
|
|
22
22
|
outline: 'none',
|
|
23
|
-
// eslint-disable-next-line @
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
24
24
|
'> div > div': {
|
|
25
25
|
boxShadow: `0px 0px 0px 2px inset ${`var(--ds-border-focused, ${B100})`}`,
|
|
26
26
|
outline: 'none'
|
|
@@ -224,7 +224,7 @@ const LeftSidebar = props => {
|
|
|
224
224
|
};
|
|
225
225
|
const mobileMediaQuery = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
226
226
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
227
|
-
useMediaQuery('below.
|
|
227
|
+
useMediaQuery('below.sm') : null;
|
|
228
228
|
const openMobileFlyout = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
229
229
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
230
230
|
useCallback(() => {
|
|
@@ -261,7 +261,7 @@ const LeftSidebar = props => {
|
|
|
261
261
|
}, [setLeftSidebarState, onCollapse, mobileMediaQuery]) : undefined;
|
|
262
262
|
if (getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g')) {
|
|
263
263
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
264
|
-
useMediaQuery('below.
|
|
264
|
+
useMediaQuery('below.sm', event => {
|
|
265
265
|
setLeftSidebarState(current => {
|
|
266
266
|
if (event.matches && !current.isLeftSidebarCollapsed) {
|
|
267
267
|
// Sidebar was previously open when resizing downwards, convert the sidebar being open to a flyout being open
|
|
@@ -31,8 +31,8 @@ const gridStyles = css({
|
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
33
33
|
const gridStylesMobile = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
|
|
34
|
-
// eslint-disable-next-line @
|
|
35
|
-
[UNSAFE_media.below.
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
35
|
+
[UNSAFE_media.below.sm]: {
|
|
36
36
|
gridTemplateAreas: gridTemplateAreasMobile,
|
|
37
37
|
gridTemplateColumns: `${LEFT_PANEL_WIDTH} minmax(0, 1fr)`
|
|
38
38
|
}
|
|
@@ -5,4 +5,4 @@ export default (({
|
|
|
5
5
|
variableName,
|
|
6
6
|
value,
|
|
7
7
|
mobileValue
|
|
8
|
-
}) => /*#__PURE__*/React.createElement("style", null, `:root{--${variableName}:${value}px;}`, getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && mobileValue && `${UNSAFE_media.below.
|
|
8
|
+
}) => /*#__PURE__*/React.createElement("style", null, `:root{--${variableName}:${value}px;}`, getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && mobileValue && `${UNSAFE_media.below.sm} { :root{--${variableName}:${mobileValue}px;} }`));
|
|
@@ -52,7 +52,7 @@ export const SidebarResizeController = ({
|
|
|
52
52
|
const transition = useRef(null);
|
|
53
53
|
const mobileMediaQuery = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
54
54
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- With the feature flag, this does not apply as it should be static.
|
|
55
|
-
useMediaQuery('below.
|
|
55
|
+
useMediaQuery('below.sm') : null;
|
|
56
56
|
const isOpen = mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches ? isFlyoutOpen : !isLeftSidebarCollapsed;
|
|
57
57
|
const expandLeftSidebar = useCallback(() => {
|
|
58
58
|
var _transition$current2, _transition$current3;
|
package/dist/es2019/version.json
CHANGED
|
@@ -69,6 +69,7 @@ var GrabArea = function GrabArea(_ref) {
|
|
|
69
69
|
,
|
|
70
70
|
role: "separator",
|
|
71
71
|
css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
|
|
72
|
+
"aria-orientation": "vertical",
|
|
72
73
|
"aria-valuenow": leftSidebarPercentageExpanded,
|
|
73
74
|
"aria-valuemin": 0,
|
|
74
75
|
"aria-valuemax": 100,
|
|
@@ -33,7 +33,7 @@ var showResizeButtonStyles = css({
|
|
|
33
33
|
|
|
34
34
|
// @ts-expect-error adding `!important` to style rules is currently a type error
|
|
35
35
|
var globalResizingStyles = css({
|
|
36
|
-
// eslint-disable-next-line @
|
|
36
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
37
37
|
'*': {
|
|
38
38
|
// Setting the cursor to be `ew-resize` on all elements so that even if the user
|
|
39
39
|
// pointer slips off the resize handle, the cursor will still be the resize cursor
|
|
@@ -46,7 +46,7 @@ var globalResizingStyles = css({
|
|
|
46
46
|
// - The current selection will resume after resizing
|
|
47
47
|
userSelect: 'none !important'
|
|
48
48
|
},
|
|
49
|
-
// eslint-disable-next-line @
|
|
49
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
50
50
|
iframe: {
|
|
51
51
|
// Disabling pointer events on iframes when resizing
|
|
52
52
|
// as iframes will swallower user events when the user is over them
|
|
@@ -83,7 +83,7 @@ var ResizeControl = function ResizeControl(_ref) {
|
|
|
83
83
|
var unbindEvents = useRef(null);
|
|
84
84
|
var mobileMediaQuery = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
85
85
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- With the feature flag, this does not apply as it should be static.
|
|
86
|
-
useMediaQuery('below.
|
|
86
|
+
useMediaQuery('below.sm') : null;
|
|
87
87
|
|
|
88
88
|
// Used in some cases to ensure function references don't have to change
|
|
89
89
|
// TODO: more functions could use `stableSidebarState` rather than `leftSidebarState`
|
|
@@ -21,7 +21,7 @@ var increaseHitAreaStyles = css({
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
24
|
-
var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.
|
|
24
|
+
var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.sm, {
|
|
25
25
|
opacity: 1
|
|
26
26
|
})) : undefined;
|
|
27
27
|
var resizeIconButtonStyles = css({
|
|
@@ -11,7 +11,7 @@ import { useIsSidebarDragging } from '../../../common/hooks';
|
|
|
11
11
|
var prefersReducedMotionStyles = css(prefersReducedMotion());
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
14
|
-
var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.
|
|
14
|
+
var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.sm, {
|
|
15
15
|
width: "".concat(MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH, "px"),
|
|
16
16
|
position: 'fixed',
|
|
17
17
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -23,7 +23,7 @@ var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-lay
|
|
|
23
23
|
})) : undefined;
|
|
24
24
|
|
|
25
25
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
26
|
-
var mobileInnerFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.
|
|
26
|
+
var mobileInnerFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.sm, {
|
|
27
27
|
width: "min(90vw, ".concat(MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH, "px)"),
|
|
28
28
|
maxWidth: MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH,
|
|
29
29
|
transition: "width ".concat(TRANSITION_DURATION, "ms ").concat(easeOut, " 0s, box-shadow ").concat(TRANSITION_DURATION, "ms ").concat(easeOut, " 0s")
|
|
@@ -15,7 +15,7 @@ import SlotFocusRing from './slot-focus-ring';
|
|
|
15
15
|
var prefersReducedMotionStyles = css(prefersReducedMotion());
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
18
|
-
var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.
|
|
18
|
+
var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.sm, {
|
|
19
19
|
width: MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH,
|
|
20
20
|
cursor: 'pointer',
|
|
21
21
|
opacity: 1,
|
|
@@ -28,7 +28,7 @@ var mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-lay
|
|
|
28
28
|
})) : undefined;
|
|
29
29
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
31
|
-
var mobileFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.
|
|
31
|
+
var mobileFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.sm, {
|
|
32
32
|
cursor: 'revert'
|
|
33
33
|
})) : undefined;
|
|
34
34
|
var outerStyles = css({
|
|
@@ -5,7 +5,7 @@ import { B100 } from '@atlaskit/theme/colors';
|
|
|
5
5
|
var focusStyles = css({
|
|
6
6
|
':focus': {
|
|
7
7
|
outline: 'none',
|
|
8
|
-
// eslint-disable-next-line @
|
|
8
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
9
9
|
'> div': {
|
|
10
10
|
boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(B100, ")")),
|
|
11
11
|
outline: 'none'
|
|
@@ -20,7 +20,7 @@ var focusStyles = css({
|
|
|
20
20
|
var sidebarFocusStyles = css({
|
|
21
21
|
':focus': {
|
|
22
22
|
outline: 'none',
|
|
23
|
-
// eslint-disable-next-line @
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
24
24
|
'> div > div': {
|
|
25
25
|
boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(B100, ")")),
|
|
26
26
|
outline: 'none'
|
|
@@ -225,7 +225,7 @@ var LeftSidebar = function LeftSidebar(props) {
|
|
|
225
225
|
};
|
|
226
226
|
var mobileMediaQuery = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
227
227
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
228
|
-
useMediaQuery('below.
|
|
228
|
+
useMediaQuery('below.sm') : null;
|
|
229
229
|
var openMobileFlyout = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
230
230
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
231
231
|
useCallback(function () {
|
|
@@ -260,7 +260,7 @@ var LeftSidebar = function LeftSidebar(props) {
|
|
|
260
260
|
}, [setLeftSidebarState, onCollapse, mobileMediaQuery]) : undefined;
|
|
261
261
|
if (getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g')) {
|
|
262
262
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- Does not apply to being feature flagged.
|
|
263
|
-
useMediaQuery('below.
|
|
263
|
+
useMediaQuery('below.sm', function (event) {
|
|
264
264
|
setLeftSidebarState(function (current) {
|
|
265
265
|
if (event.matches && !current.isLeftSidebarCollapsed) {
|
|
266
266
|
// Sidebar was previously open when resizing downwards, convert the sidebar being open to a flyout being open
|
|
@@ -21,7 +21,7 @@ var gridStyles = css({
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
|
|
24
|
-
var gridStylesMobile = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.
|
|
24
|
+
var gridStylesMobile = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css(_defineProperty({}, UNSAFE_media.below.sm, {
|
|
25
25
|
gridTemplateAreas: gridTemplateAreasMobile,
|
|
26
26
|
gridTemplateColumns: "".concat(LEFT_PANEL_WIDTH, " minmax(0, 1fr)")
|
|
27
27
|
})) : undefined;
|
|
@@ -5,5 +5,5 @@ export default (function (_ref) {
|
|
|
5
5
|
var variableName = _ref.variableName,
|
|
6
6
|
value = _ref.value,
|
|
7
7
|
mobileValue = _ref.mobileValue;
|
|
8
|
-
return /*#__PURE__*/React.createElement("style", null, ":root{--".concat(variableName, ":").concat(value, "px;}"), getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && mobileValue && "".concat(UNSAFE_media.below.
|
|
8
|
+
return /*#__PURE__*/React.createElement("style", null, ":root{--".concat(variableName, ":").concat(value, "px;}"), getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && mobileValue && "".concat(UNSAFE_media.below.sm, " { :root{--").concat(variableName, ":").concat(mobileValue, "px;} }"));
|
|
9
9
|
});
|
|
@@ -55,7 +55,7 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
|
|
|
55
55
|
var transition = useRef(null);
|
|
56
56
|
var mobileMediaQuery = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ?
|
|
57
57
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- With the feature flag, this does not apply as it should be static.
|
|
58
|
-
useMediaQuery('below.
|
|
58
|
+
useMediaQuery('below.sm') : null;
|
|
59
59
|
var isOpen = mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches ? isFlyoutOpen : !isLeftSidebarCollapsed;
|
|
60
60
|
var expandLeftSidebar = useCallback(function () {
|
|
61
61
|
var _transition$current2, _transition$current3;
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/page-layout",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.10",
|
|
4
4
|
"description": "A collection of components which let you compose an application's page layout.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/menu": "^1.9.0",
|
|
59
59
|
"@atlaskit/notification-indicator": "^9.1.0",
|
|
60
60
|
"@atlaskit/notification-log-client": "^6.1.0",
|
|
61
|
-
"@atlaskit/popup": "^1.
|
|
61
|
+
"@atlaskit/popup": "^1.9.0",
|
|
62
62
|
"@atlaskit/side-navigation": "^1.10.0",
|
|
63
63
|
"@atlaskit/ssr": "*",
|
|
64
64
|
"@atlaskit/tooltip": "*",
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/page-layout"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
8
|
+
import { ElementType } from 'react';
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
11
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
12
|
+
import { ReactElement } from 'react';
|
|
13
|
+
import { ReactNode } from 'react';
|
|
14
|
+
|
|
15
|
+
// @public
|
|
16
|
+
export const Banner: (props: SlotHeightProps) => jsx.JSX.Element;
|
|
17
|
+
|
|
18
|
+
// @public (undocumented)
|
|
19
|
+
export const BANNER_HEIGHT: string;
|
|
20
|
+
|
|
21
|
+
// @public
|
|
22
|
+
export const Content: (props: ContentProps) => jsx.JSX.Element;
|
|
23
|
+
|
|
24
|
+
// @public (undocumented)
|
|
25
|
+
interface ContentProps {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
testId?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// @public (undocumented)
|
|
31
|
+
type DimensionNames = 'bannerHeight' | 'leftPanelWidth' | 'leftSidebarFlyoutWidth' | 'leftSidebarWidth' | 'rightPanelWidth' | 'rightSidebarWidth' | 'topNavigationHeight';
|
|
32
|
+
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
export type Dimensions = Partial<Record<DimensionNames, number>>;
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
export const LEFT_PANEL_WIDTH: string;
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
export const LEFT_SIDEBAR_WIDTH: string;
|
|
41
|
+
|
|
42
|
+
// @public
|
|
43
|
+
export const LeftPanel: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
44
|
+
|
|
45
|
+
// @public
|
|
46
|
+
export const LeftSidebar: (props: LeftSidebarProps) => jsx.JSX.Element;
|
|
47
|
+
|
|
48
|
+
// @public (undocumented)
|
|
49
|
+
interface LeftSidebarProps extends SlotWidthProps {
|
|
50
|
+
collapsedState?: 'collapsed' | 'expanded';
|
|
51
|
+
onCollapse?: () => void;
|
|
52
|
+
onExpand?: () => void;
|
|
53
|
+
onFlyoutCollapse?: () => void;
|
|
54
|
+
onFlyoutExpand?: () => void;
|
|
55
|
+
onResizeEnd?: (leftSidebarState: LeftSidebarState) => void;
|
|
56
|
+
onResizeStart?: (leftSidebarState: LeftSidebarState) => void;
|
|
57
|
+
overrides?: {
|
|
58
|
+
ResizeButton?: {
|
|
59
|
+
render?: (Component: ElementType<ResizeButtonProps>, props: ResizeButtonProps) => ReactElement;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
resizeButtonLabel?: string;
|
|
63
|
+
resizeGrabAreaLabel?: string;
|
|
64
|
+
testId?: string;
|
|
65
|
+
width?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// @public (undocumented)
|
|
69
|
+
export type LeftSidebarState = {
|
|
70
|
+
isFlyoutOpen: boolean;
|
|
71
|
+
isResizing: boolean;
|
|
72
|
+
isLeftSidebarCollapsed: boolean;
|
|
73
|
+
leftSidebarWidth: number;
|
|
74
|
+
lastLeftSidebarWidth: number;
|
|
75
|
+
flyoutLockCount: number;
|
|
76
|
+
isFixed: boolean;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// @public
|
|
80
|
+
export const LeftSidebarWithoutResize: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
81
|
+
|
|
82
|
+
// @public
|
|
83
|
+
export const Main: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
84
|
+
|
|
85
|
+
// @public
|
|
86
|
+
export const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => jsx.JSX.Element;
|
|
87
|
+
|
|
88
|
+
// @public (undocumented)
|
|
89
|
+
interface PageLayoutProps extends SidebarResizeControllerProps {
|
|
90
|
+
// (undocumented)
|
|
91
|
+
skipLinksLabel?: string;
|
|
92
|
+
testId?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// @public (undocumented)
|
|
96
|
+
type ResizeButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
97
|
+
isLeftSidebarCollapsed: boolean;
|
|
98
|
+
label: string;
|
|
99
|
+
testId?: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// @public (undocumented)
|
|
103
|
+
export const RIGHT_PANEL_WIDTH: string;
|
|
104
|
+
|
|
105
|
+
// @public (undocumented)
|
|
106
|
+
export const RIGHT_SIDEBAR_WIDTH: string;
|
|
107
|
+
|
|
108
|
+
// @public
|
|
109
|
+
export const RightPanel: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
110
|
+
|
|
111
|
+
// @public
|
|
112
|
+
export const RightSidebar: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
113
|
+
|
|
114
|
+
// @public (undocumented)
|
|
115
|
+
type SidebarResizeControllerProps = {
|
|
116
|
+
children: ReactNode;
|
|
117
|
+
onLeftSidebarExpand?: (leftSidebarState: LeftSidebarState) => void;
|
|
118
|
+
onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// @public (undocumented)
|
|
122
|
+
type SkipLinkData = {
|
|
123
|
+
id: string;
|
|
124
|
+
skipLinkTitle: string;
|
|
125
|
+
listIndex?: number;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// @public (undocumented)
|
|
129
|
+
export interface SlotHeightProps extends SlotProps {
|
|
130
|
+
height?: number;
|
|
131
|
+
shouldPersistHeight?: boolean;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// @public (undocumented)
|
|
135
|
+
interface SlotProps {
|
|
136
|
+
children: ReactNode;
|
|
137
|
+
// (undocumented)
|
|
138
|
+
id?: string;
|
|
139
|
+
isFixed?: boolean;
|
|
140
|
+
// (undocumented)
|
|
141
|
+
skipLinkTitle?: string;
|
|
142
|
+
testId?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// @public (undocumented)
|
|
146
|
+
export interface SlotWidthProps extends SlotProps {
|
|
147
|
+
shouldPersistWidth?: boolean;
|
|
148
|
+
width?: number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// @public (undocumented)
|
|
152
|
+
export const TOP_NAVIGATION_HEIGHT: string;
|
|
153
|
+
|
|
154
|
+
// @public
|
|
155
|
+
export const TopNavigation: (props: SlotHeightProps) => jsx.JSX.Element;
|
|
156
|
+
|
|
157
|
+
// @public (undocumented)
|
|
158
|
+
export const useCustomSkipLink: (id: SkipLinkData['id'], skipLinkTitle: SkipLinkData['skipLinkTitle'], listIndex?: SkipLinkData['listIndex']) => void;
|
|
159
|
+
|
|
160
|
+
// @public
|
|
161
|
+
export const useLeftSidebarFlyoutLock: () => void;
|
|
162
|
+
|
|
163
|
+
// @public (undocumented)
|
|
164
|
+
export const usePageLayoutResize: () => {
|
|
165
|
+
isLeftSidebarCollapsed: boolean;
|
|
166
|
+
expandLeftSidebar: () => void;
|
|
167
|
+
collapseLeftSidebar: (event?: KeyboardEvent_2 | MouseEvent_2, collapseWithoutTransition?: boolean) => void;
|
|
168
|
+
toggleLeftSidebar: (event?: KeyboardEvent_2 | MouseEvent_2, collapseWithoutTransition?: boolean) => void;
|
|
169
|
+
leftSidebarState: LeftSidebarState;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// (No @packageDocumentation comment for this package)
|
|
173
|
+
|
|
174
|
+
```
|