@cloudscape-design/components 3.0.227 → 3.0.228
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/app-layout/{drawer.d.ts → drawer/index.d.ts} +12 -12
- package/app-layout/drawer/index.d.ts.map +1 -0
- package/app-layout/{drawer.js → drawer/index.js} +6 -7
- package/app-layout/drawer/index.js.map +1 -0
- package/app-layout/drawer/styles.css.js +10 -0
- package/app-layout/drawer/styles.scoped.css +139 -0
- package/app-layout/drawer/styles.selectors.js +11 -0
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +6 -23
- package/app-layout/index.js.map +1 -1
- package/app-layout/split-panel-drawer/index.d.ts +11 -0
- package/app-layout/split-panel-drawer/index.d.ts.map +1 -0
- package/app-layout/split-panel-drawer/index.js +10 -0
- package/app-layout/split-panel-drawer/index.js.map +1 -0
- package/app-layout/split-panel-drawer/styles.css.js +7 -0
- package/app-layout/split-panel-drawer/styles.scoped.css +103 -0
- package/app-layout/split-panel-drawer/styles.selectors.js +8 -0
- package/app-layout/styles.css.js +13 -26
- package/app-layout/styles.scoped.css +13 -100
- package/app-layout/styles.selectors.js +13 -26
- package/app-layout/toggles/index.d.ts +0 -2
- package/app-layout/toggles/index.d.ts.map +1 -1
- package/app-layout/toggles/index.js +2 -2
- package/app-layout/toggles/index.js.map +1 -1
- package/app-layout/utils/use-content-height.d.ts +0 -3
- package/app-layout/utils/use-content-height.d.ts.map +1 -1
- package/app-layout/utils/use-content-height.js +0 -3
- package/app-layout/utils/use-content-height.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/events/index.d.ts +2 -1
- package/internal/events/index.d.ts.map +1 -1
- package/internal/events/index.js +4 -6
- package/internal/events/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/tabs/tab-header-bar.js +2 -2
- package/tabs/tab-header-bar.js.map +1 -1
- package/app-layout/drawer.d.ts.map +0 -1
- package/app-layout/drawer.js.map +0 -1
- package/app-layout/navigation-panel.d.ts +0 -21
- package/app-layout/navigation-panel.d.ts.map +0 -1
- package/app-layout/navigation-panel.js +0 -16
- package/app-layout/navigation-panel.js.map +0 -1
- package/app-layout/tools-and-split-panel.d.ts +0 -23
- package/app-layout/tools-and-split-panel.d.ts.map +0 -1
- package/app-layout/tools-and-split-panel.js +0 -20
- package/app-layout/tools-and-split-panel.js.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ButtonProps } from '
|
|
3
|
-
import { togglesConfig } from '
|
|
4
|
-
import { AppLayoutProps } from '
|
|
2
|
+
import { ButtonProps } from '../../button/interfaces';
|
|
3
|
+
import { togglesConfig } from '../toggles';
|
|
4
|
+
import { AppLayoutProps } from '../interfaces';
|
|
5
5
|
export interface DesktopDrawerProps {
|
|
6
|
-
contentClassName
|
|
7
|
-
toggleClassName
|
|
8
|
-
closeClassName
|
|
6
|
+
contentClassName: string;
|
|
7
|
+
toggleClassName: string;
|
|
8
|
+
closeClassName: string;
|
|
9
9
|
toggleRefs: {
|
|
10
10
|
toggle: React.Ref<ButtonProps.Ref>;
|
|
11
11
|
close: React.Ref<ButtonProps.Ref>;
|
|
12
12
|
};
|
|
13
13
|
width: number;
|
|
14
|
-
topOffset
|
|
15
|
-
bottomOffset
|
|
16
|
-
ariaLabels
|
|
14
|
+
topOffset: number | undefined;
|
|
15
|
+
bottomOffset: number | undefined;
|
|
16
|
+
ariaLabels: AppLayoutProps.Labels | undefined;
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
type: keyof typeof togglesConfig;
|
|
19
|
-
isMobile
|
|
20
|
-
isOpen
|
|
19
|
+
isMobile: boolean;
|
|
20
|
+
isOpen: boolean;
|
|
21
21
|
onToggle: (isOpen: boolean) => void;
|
|
22
22
|
onClick?: (event: React.MouseEvent) => void;
|
|
23
23
|
onLoseFocus?: (event: React.FocusEvent) => void;
|
|
24
24
|
}
|
|
25
25
|
export declare function Drawer({ contentClassName, toggleClassName, closeClassName, width, type, toggleRefs, topOffset, bottomOffset, ariaLabels, children, isOpen, isMobile, onToggle, onClick, onLoseFocus, }: DesktopDrawerProps): JSX.Element;
|
|
26
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAgC,aAAa,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAI/C,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE;QACV,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACnC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;KACnC,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,OAAO,aAAa,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACjD;AAmBD,wBAAgB,MAAM,CAAC,EACrB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,KAAK,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE,kBAAkB,eAkEpB"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { AppLayoutButton, CloseButton, togglesConfig } from '
|
|
5
|
+
import { AppLayoutButton, CloseButton, togglesConfig } from '../toggles';
|
|
6
|
+
import testutilStyles from '../test-classes/styles.css.js';
|
|
6
7
|
import styles from './styles.css.js';
|
|
7
8
|
// We are using two landmarks per drawer, i.e. two NAVs and two ASIDEs, because of several
|
|
8
9
|
// known bugs in NVDA that cause focus changes within a container to sometimes not be
|
|
@@ -25,15 +26,13 @@ export function Drawer({ contentClassName, toggleClassName, closeClassName, widt
|
|
|
25
26
|
const { mainLabel, closeLabel, openLabel } = getLabels(ariaLabels);
|
|
26
27
|
const drawerContentWidthOpen = isMobile ? undefined : width;
|
|
27
28
|
const drawerContentWidth = isOpen ? drawerContentWidthOpen : undefined;
|
|
28
|
-
const closeIconName = 'close';
|
|
29
29
|
const regularOpenButton = (React.createElement(TagName, { "aria-label": mainLabel, className: styles.toggle, "aria-hidden": isOpen },
|
|
30
30
|
React.createElement(AppLayoutButton, { ref: toggleRefs.toggle, className: toggleClassName, iconName: iconName, ariaLabel: openLabel, onClick: () => onToggle(true), ariaExpanded: false })));
|
|
31
31
|
return (React.createElement("div", { className: clsx(styles.drawer, {
|
|
32
32
|
[styles['drawer-closed']]: !isOpen,
|
|
33
|
+
[testutilStyles['drawer-closed']]: !isOpen,
|
|
33
34
|
[styles['drawer-mobile']]: isMobile,
|
|
34
|
-
}), style: {
|
|
35
|
-
width: drawerContentWidth,
|
|
36
|
-
}, onBlur: onLoseFocus
|
|
35
|
+
}), style: { width: drawerContentWidth }, onBlur: onLoseFocus
|
|
37
36
|
? e => {
|
|
38
37
|
if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {
|
|
39
38
|
onLoseFocus(e);
|
|
@@ -53,7 +52,7 @@ export function Drawer({ contentClassName, toggleClassName, closeClassName, widt
|
|
|
53
52
|
React.createElement("div", { style: { width: drawerContentWidth, top: topOffset, bottom: bottomOffset }, className: clsx(styles['drawer-content'], contentClassName) },
|
|
54
53
|
!isMobile && regularOpenButton,
|
|
55
54
|
React.createElement(TagName, { "aria-label": mainLabel, "aria-hidden": !isOpen },
|
|
56
|
-
React.createElement(CloseButton, { ref: toggleRefs.close, className: closeClassName, ariaLabel: closeLabel, onClick: () => onToggle(false)
|
|
55
|
+
React.createElement(CloseButton, { ref: toggleRefs.close, className: closeClassName, ariaLabel: closeLabel, onClick: () => onToggle(false) }),
|
|
57
56
|
children))));
|
|
58
57
|
}
|
|
59
|
-
//# sourceMappingURL=
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/drawer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzE,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAuBrC,0FAA0F;AAC1F,qFAAqF;AACrF,uFAAuF;AACvF,4EAA4E;AAC5E,wFAAwF;AACxF,0FAA0F;AAC1F,0FAA0F;AA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C,MAAM;YAC1C,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,QAAQ;SACpC,CAAC,EACF,KAAK,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EACpC,MAAM,EACJ,WAAW;YACT,CAAC,CAAC,CAAC,CAAC,EAAE;gBACF,IAAI,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE;oBAClE,WAAW,CAAC,CAAC,CAAC,CAAC;iBAChB;YACH,CAAC;YACH,CAAC,CAAC,SAAS,EAEf,OAAO,EAAE,KAAK,CAAC,EAAE;YACf,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,KAAK,CAAC,CAAC;aAChB;YAED,IAAI,CAAC,MAAM,EAAE;gBACX,sFAAsF;gBACtF,IAAK,KAAK,CAAC,MAAkB,CAAC,OAAO,KAAK,QAAQ,EAAE;oBAClD,QAAQ,CAAC,IAAI,CAAC,CAAC;iBAChB;aACF;QACH,CAAC;QAED,6BACE,KAAK,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,EAC1E,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;YAE1D,CAAC,QAAQ,IAAI,iBAAiB;YAC/B,oBAAC,OAAO,kBAAa,SAAS,iBAAe,CAAC,MAAM;gBAClD,oBAAC,WAAW,IACV,GAAG,EAAE,UAAU,CAAC,KAAK,EACrB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAC9B;gBACD,QAAQ,CACD,CACN,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { ButtonProps } from '../../button/interfaces';\nimport { AppLayoutButton, CloseButton, togglesConfig } from '../toggles';\nimport { AppLayoutProps } from '../interfaces';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface DesktopDrawerProps {\n contentClassName: string;\n toggleClassName: string;\n closeClassName: string;\n toggleRefs: {\n toggle: React.Ref<ButtonProps.Ref>;\n close: React.Ref<ButtonProps.Ref>;\n };\n width: number;\n topOffset: number | undefined;\n bottomOffset: number | undefined;\n ariaLabels: AppLayoutProps.Labels | undefined;\n children: React.ReactNode;\n type: keyof typeof togglesConfig;\n isMobile: boolean;\n isOpen: boolean;\n onToggle: (isOpen: boolean) => void;\n onClick?: (event: React.MouseEvent) => void;\n onLoseFocus?: (event: React.FocusEvent) => void;\n}\n\n// We are using two landmarks per drawer, i.e. two NAVs and two ASIDEs, because of several\n// known bugs in NVDA that cause focus changes within a container to sometimes not be\n// announced. As a result, we use one region for the open button and one region for the\n// actual drawer content, always hiding the other one when it's not visible.\n// An alternative solution to follow a more classic implementation here to only have one\n// button that triggers the opening/closing of the drawer also did not work due to another\n// series of bugs in NVDA (together with Firefox) which prevent the changed expanded state\n// from being announced.\n// Even with this workaround in place, the announcement of the close button when opening a\n// panel in NVDA is not working correctly. The suspected root cause is one of the bugs below\n// as well.\n// Relevant tickets:\n// * https://github.com/nvaccess/nvda/issues/6606\n// * https://github.com/nvaccess/nvda/issues/5825\n// * https://github.com/nvaccess/nvda/issues/5247\n// * https://github.com/nvaccess/nvda/pull/8869 (reverted PR that was going to fix it)\n\nexport function Drawer({\n contentClassName,\n toggleClassName,\n closeClassName,\n width,\n type,\n toggleRefs,\n topOffset,\n bottomOffset,\n ariaLabels,\n children,\n isOpen,\n isMobile,\n onToggle,\n onClick,\n onLoseFocus,\n}: DesktopDrawerProps) {\n const { TagName, iconName, getLabels } = togglesConfig[type];\n const { mainLabel, closeLabel, openLabel } = getLabels(ariaLabels);\n const drawerContentWidthOpen = isMobile ? undefined : width;\n const drawerContentWidth = isOpen ? drawerContentWidthOpen : undefined;\n\n const regularOpenButton = (\n <TagName aria-label={mainLabel} className={styles.toggle} aria-hidden={isOpen}>\n <AppLayoutButton\n ref={toggleRefs.toggle}\n className={toggleClassName}\n iconName={iconName}\n ariaLabel={openLabel}\n onClick={() => onToggle(true)}\n ariaExpanded={false}\n />\n </TagName>\n );\n\n return (\n <div\n className={clsx(styles.drawer, {\n [styles['drawer-closed']]: !isOpen,\n [testutilStyles['drawer-closed']]: !isOpen,\n [styles['drawer-mobile']]: isMobile,\n })}\n style={{ width: drawerContentWidth }}\n onBlur={\n onLoseFocus\n ? e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n onLoseFocus(e);\n }\n }\n : undefined\n }\n onClick={event => {\n if (onClick) {\n onClick(event);\n }\n\n if (!isOpen) {\n // to prevent calling onToggle from the drawer when it's called from the toggle button\n if ((event.target as Element).tagName !== 'BUTTON') {\n onToggle(true);\n }\n }\n }}\n >\n <div\n style={{ width: drawerContentWidth, top: topOffset, bottom: bottomOffset }}\n className={clsx(styles['drawer-content'], contentClassName)}\n >\n {!isMobile && regularOpenButton}\n <TagName aria-label={mainLabel} aria-hidden={!isOpen}>\n <CloseButton\n ref={toggleRefs.close}\n className={closeClassName}\n ariaLabel={closeLabel}\n onClick={() => onToggle(false)}\n />\n {children}\n </TagName>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import './styles.scoped.css';
|
|
3
|
+
export default {
|
|
4
|
+
"toggle": "awsui_toggle_1uo6m_1edrs_97",
|
|
5
|
+
"drawer": "awsui_drawer_1uo6m_1edrs_102",
|
|
6
|
+
"drawer-mobile": "awsui_drawer-mobile_1uo6m_1edrs_108",
|
|
7
|
+
"drawer-closed": "awsui_drawer-closed_1uo6m_1edrs_111",
|
|
8
|
+
"drawer-content": "awsui_drawer-content_1uo6m_1edrs_119"
|
|
9
|
+
};
|
|
10
|
+
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
*/
|
|
13
|
+
/*
|
|
14
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
*/
|
|
17
|
+
/*
|
|
18
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
SPDX-License-Identifier: Apache-2.0
|
|
20
|
+
*/
|
|
21
|
+
/*
|
|
22
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
23
|
+
SPDX-License-Identifier: Apache-2.0
|
|
24
|
+
*/
|
|
25
|
+
/*
|
|
26
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/
|
|
29
|
+
/*
|
|
30
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
31
|
+
SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
/*
|
|
34
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35
|
+
SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
/*
|
|
38
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/
|
|
41
|
+
/*
|
|
42
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
|
+
SPDX-License-Identifier: Apache-2.0
|
|
44
|
+
*/
|
|
45
|
+
/*
|
|
46
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
47
|
+
SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|
|
49
|
+
/*
|
|
50
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
55
|
+
SPDX-License-Identifier: Apache-2.0
|
|
56
|
+
*/
|
|
57
|
+
/*
|
|
58
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
59
|
+
SPDX-License-Identifier: Apache-2.0
|
|
60
|
+
*/
|
|
61
|
+
/*
|
|
62
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
63
|
+
SPDX-License-Identifier: Apache-2.0
|
|
64
|
+
*/
|
|
65
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
66
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
67
|
+
/*
|
|
68
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
|
+
SPDX-License-Identifier: Apache-2.0
|
|
70
|
+
*/
|
|
71
|
+
/*
|
|
72
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
73
|
+
SPDX-License-Identifier: Apache-2.0
|
|
74
|
+
*/
|
|
75
|
+
/*
|
|
76
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
77
|
+
SPDX-License-Identifier: Apache-2.0
|
|
78
|
+
*/
|
|
79
|
+
/*
|
|
80
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
81
|
+
SPDX-License-Identifier: Apache-2.0
|
|
82
|
+
*/
|
|
83
|
+
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
84
|
+
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
85
|
+
/*
|
|
86
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
87
|
+
SPDX-License-Identifier: Apache-2.0
|
|
88
|
+
*/
|
|
89
|
+
/*
|
|
90
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
+
SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
/*
|
|
94
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
|
+
SPDX-License-Identifier: Apache-2.0
|
|
96
|
+
*/
|
|
97
|
+
.awsui_toggle_1uo6m_1edrs_97:not(#\9) {
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
padding: var(--space-xxs-ynfts5, 4px) 7px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.awsui_drawer_1uo6m_1edrs_102:not(#\9) {
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
position: relative;
|
|
105
|
+
word-wrap: break-word;
|
|
106
|
+
box-shadow: var(--shadow-panel-gp3bf2, 0px 1px 1px 1px #e9ebed, 0px 6px 36px rgba(0, 7, 22, 0.1));
|
|
107
|
+
}
|
|
108
|
+
.awsui_drawer_1uo6m_1edrs_102:not(#\9):not(.awsui_drawer-mobile_1uo6m_1edrs_108) {
|
|
109
|
+
z-index: 830;
|
|
110
|
+
}
|
|
111
|
+
.awsui_drawer-closed_1uo6m_1edrs_111:not(#\9) {
|
|
112
|
+
min-width: 40px;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
}
|
|
115
|
+
.awsui_drawer-closed_1uo6m_1edrs_111.awsui_drawer-mobile_1uo6m_1edrs_108:not(#\9) {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.awsui_drawer-content_1uo6m_1edrs_119:not(#\9) {
|
|
120
|
+
position: fixed;
|
|
121
|
+
overflow: auto;
|
|
122
|
+
background-color: var(--color-background-layout-panel-content-808qum, #ffffff);
|
|
123
|
+
}
|
|
124
|
+
.awsui_drawer-mobile_1uo6m_1edrs_108 > .awsui_drawer-content_1uo6m_1edrs_119:not(#\9) {
|
|
125
|
+
z-index: 1001;
|
|
126
|
+
top: 0;
|
|
127
|
+
bottom: 0;
|
|
128
|
+
left: 0;
|
|
129
|
+
right: 0;
|
|
130
|
+
}
|
|
131
|
+
.awsui_drawer-closed_1uo6m_1edrs_111 > .awsui_drawer-content_1uo6m_1edrs_119:not(#\9) {
|
|
132
|
+
width: 40px;
|
|
133
|
+
}
|
|
134
|
+
.awsui_drawer-closed_1uo6m_1edrs_111 > .awsui_drawer-content_1uo6m_1edrs_119:not(#\9):hover {
|
|
135
|
+
background: var(--color-background-layout-panel-hover-0bg3gq, #e9ebed);
|
|
136
|
+
}
|
|
137
|
+
.awsui_drawer-content_1uo6m_1edrs_119 > [aria-hidden=true]:not(#\9) {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"toggle": "awsui_toggle_1uo6m_1edrs_97",
|
|
6
|
+
"drawer": "awsui_drawer_1uo6m_1edrs_102",
|
|
7
|
+
"drawer-mobile": "awsui_drawer-mobile_1uo6m_1edrs_108",
|
|
8
|
+
"drawer-closed": "awsui_drawer-closed_1uo6m_1edrs_111",
|
|
9
|
+
"drawer-content": "awsui_drawer-content_1uo6m_1edrs_119"
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqC9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FAmBd,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqC9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FAmBd,CAAC;AAydF,eAAe,SAAS,CAAC"}
|
package/app-layout/index.js
CHANGED
|
@@ -26,8 +26,8 @@ import useBaseComponent from '../internal/hooks/use-base-component';
|
|
|
26
26
|
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
27
27
|
import ContentWrapper from './content-wrapper';
|
|
28
28
|
import { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
29
|
+
import { Drawer } from './drawer';
|
|
30
|
+
import { SideSplitPanelDrawer } from './split-panel-drawer';
|
|
31
31
|
import useAppLayoutOffsets from './utils/use-content-width';
|
|
32
32
|
import { isDevelopment } from '../internal/is-development';
|
|
33
33
|
import { warnOnce } from '../internal/logging';
|
|
@@ -69,7 +69,7 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
69
69
|
};
|
|
70
70
|
const navigationVisible = !navigationHide && navigationOpen;
|
|
71
71
|
const toolsVisible = !toolsHide && toolsOpen;
|
|
72
|
-
const { contentHeightStyle, headerHeight, footerHeight
|
|
72
|
+
const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(headerSelector, footerSelector, disableBodyScroll);
|
|
73
73
|
const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);
|
|
74
74
|
const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.height);
|
|
75
75
|
const anyPanelOpen = navigationVisible || toolsVisible;
|
|
@@ -227,29 +227,11 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
227
227
|
: splitPanelOpen
|
|
228
228
|
? splitPanelReportedSize
|
|
229
229
|
: splitPanelReportedHeaderHeight)) !== null && _a !== void 0 ? _a : undefined;
|
|
230
|
-
const toolsDrawerWidth = (() => {
|
|
231
|
-
if (isMobile) {
|
|
232
|
-
return 0;
|
|
233
|
-
}
|
|
234
|
-
const toolsPanelWidth = toolsHide ? 0 : toolsOpen ? toolsWidth : closedDrawerWidth;
|
|
235
|
-
const splitPanelWidth = !splitPanelDisplayed || finalSplitPanePosition !== 'side'
|
|
236
|
-
? 0
|
|
237
|
-
: splitPanelOpen
|
|
238
|
-
? splitPanelReportedSize
|
|
239
|
-
: closedDrawerWidth;
|
|
240
|
-
return toolsPanelWidth + splitPanelWidth;
|
|
241
|
-
})();
|
|
242
|
-
const navigationDrawerWidth = (() => {
|
|
243
|
-
if (isMobile) {
|
|
244
|
-
return 0;
|
|
245
|
-
}
|
|
246
|
-
return effectiveNavigationWidth;
|
|
247
|
-
})();
|
|
248
230
|
return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef },
|
|
249
231
|
React.createElement("div", { className: styles['layout-wrapper'], style: contentHeightStyle },
|
|
250
232
|
isMobile && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: headerHeight, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle(true), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen }, breadcrumbs)),
|
|
251
233
|
React.createElement("div", { className: clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll']) },
|
|
252
|
-
!navigationHide && (React.createElement(
|
|
234
|
+
!navigationHide && (React.createElement(Drawer, { contentClassName: testutilStyles.navigation, toggleClassName: testutilStyles['navigation-toggle'], closeClassName: testutilStyles['navigation-close'], ariaLabels: ariaLabels, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, isOpen: navigationOpen, onClick: isMobile ? onNavigationClick : undefined, onToggle: onNavigationToggle, toggleRefs: navigationRefs, type: "navigation", width: navigationWidth }, navigation)),
|
|
253
235
|
React.createElement("main", { ref: legacyScrollRootRef, className: clsx(styles['layout-main'], {
|
|
254
236
|
[styles['layout-main-scrollable']]: disableBodyScroll,
|
|
255
237
|
[testutilStyles['disable-body-scroll-root']]: disableBodyScroll,
|
|
@@ -281,7 +263,8 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
281
263
|
hasBreadcrumbs: !!breadcrumbs,
|
|
282
264
|
} }, content))),
|
|
283
265
|
finalSplitPanePosition === 'bottom' && splitPanelWrapped),
|
|
284
|
-
|
|
266
|
+
finalSplitPanePosition === 'side' && (React.createElement(SideSplitPanelDrawer, { topOffset: headerHeight, bottomOffset: footerHeight, displayed: splitPanelDisplayed, width: splitPanelOpen ? splitPanelSize : undefined }, splitPanelWrapped)),
|
|
267
|
+
!toolsHide && (React.createElement(Drawer, { contentClassName: testutilStyles.tools, toggleClassName: testutilStyles['tools-toggle'], closeClassName: testutilStyles['tools-close'], ariaLabels: ariaLabels, width: toolsWidth, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseToolsFocus }, tools))))));
|
|
285
268
|
});
|
|
286
269
|
applyDisplayName(AppLayout, 'AppLayout');
|
|
287
270
|
export default AppLayout;
|
package/app-layout/index.js.map
CHAN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Y,EAC1B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,SAAS,EACrB,gBAAgB,EAAE,cAAc,EAChC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,EAC7B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,GACtB,CACE,CACF,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { applyDefaults } from './defaults';\nimport { AppLayoutProps } from './interfaces';\nimport { Notifications } from './notifications';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { useFocusControl } from './utils/use-focus-control';\nimport useWindowWidth from './utils/use-window-width';\nimport useContentHeight from './utils/use-content-height';\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\nimport { findUpUntil } from '../internal/utils/dom';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { useContainerQuery } from '../internal/hooks/container-queries';\nimport { useStableEventHandler } from '../internal/hooks/use-stable-event-handler';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport {\n SplitPanelContextProvider,\n SplitPanelContextProps,\n SplitPanelLastInteraction,\n SplitPanelSideToggleProps,\n} from '../internal/context/split-panel-context';\nimport {\n CONSTRAINED_MAIN_PANEL_MIN_HEIGHT,\n CONSTRAINED_PAGE_HEIGHT,\n getSplitPanelDefaultSize,\n MAIN_PANEL_MIN_HEIGHT,\n} from '../split-panel/utils/size-utils';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport ContentWrapper, { ContentWrapperProps } from './content-wrapper';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { NavigationPanel } from './navigation-panel';\nimport { ToolsAndSplitPanel } from './tools-and-split-panel';\nimport useAppLayoutOffsets from './utils/use-content-width';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '../internal/logging';\n\nimport RefreshedAppLayout from './visual-refresh';\n\nexport { AppLayoutProps };\n\nconst AppLayout = React.forwardRef(\n (\n { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f', ...rest }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent<HTMLDivElement>('AppLayout');\n const isRefresh = useVisualRefresh();\n\n // This re-builds the props including the default values\n const props = { contentType, headerSelector, footerSelector, ...rest };\n\n const baseProps = getBaseProps(rest);\n\n return (\n <div ref={__internalRootRef} {...baseProps}>\n {isRefresh ? <RefreshedAppLayout {...props} ref={ref} /> : <OldAppLayout {...props} ref={ref} />}\n </div>\n );\n }\n);\n\nconst OldAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth = 280,\n navigationHide,\n navigationOpen: controlledNavigationOpen,\n tools,\n toolsWidth = 290,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType = 'default',\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n headerSelector = '#b #h',\n footerSelector = '#b #f',\n ariaLabels,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanelPreferences: controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n onSplitPanelResize,\n onSplitPanelToggle,\n onNavigationChange,\n onToolsChange,\n }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n if (isDevelopment) {\n if (controlledToolsOpen && toolsHide) {\n warnOnce(\n 'AppLayout',\n `You have enabled both the \\`toolsOpen\\` prop and the \\`toolsHide\\` prop. This is not supported. Set \\`toolsOpen\\` to \\`false\\` when you set \\`toolsHide\\` to \\`true\\`.`\n );\n }\n }\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\n\n const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n onNavigationChange,\n isMobile ? false : defaults.navigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n\n const [toolsOpen = false, setToolsOpen] = useControllable(\n controlledToolsOpen,\n onToolsChange,\n isMobile ? false : defaults.toolsOpen,\n { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }\n );\n\n const onNavigationToggle = useCallback(\n (open: boolean) => {\n setNavigationOpen(open);\n fireNonCancelableEvent(onNavigationChange, { open });\n },\n [setNavigationOpen, onNavigationChange]\n );\n const onToolsToggle = useCallback(\n (open: boolean) => {\n setToolsOpen(open);\n fireNonCancelableEvent(onToolsChange, { open });\n },\n [setToolsOpen, onToolsChange]\n );\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink) {\n onNavigationToggle(false);\n }\n };\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const { contentHeightStyle, headerHeight, footerHeight, panelHeightStyle } = useContentHeight(\n headerSelector,\n footerSelector,\n disableBodyScroll\n );\n const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.height);\n const anyPanelOpen = navigationVisible || toolsVisible;\n const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;\n const stickyNotificationsHeight = stickyNotifications ? notificationsHeight : null;\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n const splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState<SplitPanelSideToggleProps>({\n displayed: false,\n ariaLabel: undefined,\n });\n const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n const effectiveToolsWidth =\n toolsHide && (!splitPanelDisplayed || splitPanelPreferences?.position !== 'side')\n ? 0\n : toolsOpen\n ? toolsWidth\n : closedDrawerWidth;\n\n const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);\n const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n defaultSplitPanelSize,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelSize',\n changeHandler: 'onSplitPanelResize',\n }\n );\n\n const mainContentRef = useRef<HTMLDivElement>(null);\n const legacyScrollRootRef = useRef<HTMLElement>(null);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange]\n );\n const onSplitPanelSizeSet = useCallback(\n (detail: { size: number }) => {\n setSplitPanelSize(detail.size);\n fireNonCancelableEvent(onSplitPanelResize, detail);\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n const onToggle = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle]);\n\n const getSplitPanelMaxWidth = useStableEventHandler(() => {\n if (!mainContentRef.current || !defaults.minContentWidth) {\n return NaN;\n }\n\n const width = parseInt(getComputedStyle(mainContentRef.current).width);\n // when disableContentPaddings is true there is less available space,\n // so we subtract space-scaled-2x-xxxl * 2 for left and right padding\n const contentPadding = disableContentPaddings ? 80 : 0;\n const spaceAvailable = width - defaults.minContentWidth - contentPadding;\n const spaceTaken = finalSplitPanePosition === 'side' ? splitPanelSize : 0;\n return Math.max(0, spaceTaken + spaceAvailable);\n });\n\n const getSplitPanelMaxHeight = useStableEventHandler(() => {\n if (typeof document === 'undefined') {\n return 0; // render the split panel in its minimum possible size\n } else if (disableBodyScroll && legacyScrollRootRef.current) {\n const availableHeight = legacyScrollRootRef.current.clientHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n } else {\n const availableHeight = document.documentElement.clientHeight - headerHeight - footerHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n\n const finalSplitPanePosition = isSplitpanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n const splitPanelOpenOnTheSide = splitPaneAvailableOnTheSide && splitPanelOpen;\n\n const toggleButtonsBarWidth = 0;\n\n const windowWidth = useWindowWidth();\n const { left: leftOffset, right: rightOffset } = useAppLayoutOffsets(rootRef.current);\n const contentWidthWithSplitPanel =\n windowWidth -\n leftOffset -\n rightOffset -\n effectiveToolsWidth -\n effectiveNavigationWidth -\n (disableContentPaddings ? 0 : toggleButtonsBarWidth);\n\n useEffect(() => {\n const contentWidth = contentWidthWithSplitPanel - splitPanelSize;\n setIsSplitpanelForcedPosition(isMobile || (defaults.minContentWidth || 0) > contentWidth);\n // This is a workaround to avoid a forced position due to splitPanelSize, which is\n // user controlled variable.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [contentWidthWithSplitPanel, defaults.minContentWidth, isMobile]);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n const toolsClosedWidth = toolsHide || isMobile ? 0 : closedDrawerWidth;\n\n const [splitPanelLastInteraction, setSplitPanelLastInteraction] = useState<undefined | SplitPanelLastInteraction>();\n useEffectOnUpdate(\n () => setSplitPanelLastInteraction(splitPanelOpen ? { type: 'open' } : { type: 'close' }),\n [splitPanelOpen]\n );\n useEffectOnUpdate(() => setSplitPanelLastInteraction({ type: 'position' }), [splitPanelPosition]);\n\n const contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContext: SplitPanelContextProps = {\n topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),\n bottomOffset: footerHeight,\n leftOffset:\n leftOffset + (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: rightOffset + (isMobile ? 0 : !toolsHide && toolsOpen ? toolsWidth : toolsClosedWidth),\n position: finalSplitPanePosition,\n size: splitPanelSize,\n getMaxWidth: getSplitPanelMaxWidth,\n getMaxHeight: getSplitPanelMaxHeight,\n disableContentPaddings,\n contentWidthStyles: contentMaxWidthStyle,\n isOpen: splitPanelOpen,\n isMobile,\n isForcedPosition: isSplitpanelForcedPosition,\n lastInteraction: splitPanelLastInteraction,\n onResize: onSplitPanelSizeSet,\n onToggle,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelContextProvider value={splitPanelContext}>{splitPanel}</SplitPanelContextProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n (toolsHide && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||\n // 2. Tools panel is present and open\n toolsVisible ||\n // 3. Split panel is open in side position\n splitPanelOpenOnTheSide,\n isMobile,\n };\n\n const { refs: navigationRefs } = useFocusControl(navigationOpen);\n const { refs: toolsRefs, setFocus: focusToolsClose, loseFocus: loseToolsFocus } = useFocusControl(toolsOpen, true);\n\n useImperativeHandle(\n ref,\n () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle(false);\n }\n },\n focusToolsClose,\n }),\n [isMobile, onNavigationToggle, onToolsToggle, focusToolsClose]\n );\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const toolsDrawerWidth = (() => {\n if (isMobile) {\n return 0;\n }\n\n const toolsPanelWidth = toolsHide ? 0 : toolsOpen ? toolsWidth : closedDrawerWidth;\n const splitPanelWidth =\n !splitPanelDisplayed || finalSplitPanePosition !== 'side'\n ? 0\n : splitPanelOpen\n ? splitPanelReportedSize\n : closedDrawerWidth;\n\n return toolsPanelWidth + splitPanelWidth;\n })();\n\n const navigationDrawerWidth = (() => {\n if (isMobile) {\n return 0;\n }\n\n return effectiveNavigationWidth;\n })();\n\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll'])}\n ref={rootRef}\n >\n <div className={styles['layout-wrapper']} style={contentHeightStyle}>\n {isMobile && (!toolsHide || !navigationHide || breadcrumbs) && (\n <MobileToolbar\n anyPanelOpen={anyPanelOpen}\n toggleRefs={{ navigation: navigationRefs.toggle, tools: toolsRefs.toggle }}\n topOffset={headerHeight}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle(true)}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <NavigationPanel\n ariaLabels={ariaLabels}\n footerHeight={footerHeight}\n headerHeight={headerHeight}\n isMobile={isMobile}\n navigation={navigation}\n navigationDrawerWidth={navigationDrawerWidth}\n navigationOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onNavigationToggle={onNavigationToggle}\n panelHeightStyle={panelHeightStyle}\n toggleRefs={navigationRefs}\n navigationWidth={navigationWidth}\n />\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : headerHeight}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>\n {breadcrumbs}\n </div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications &&\n (isMobile || !breadcrumbs) &&\n styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n // eslint-disable-next-line react/forbid-component-props\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n >\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop:\n (disableBodyScroll ? 0 : headerHeight) +\n (stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),\n stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),\n hasBreadcrumbs: !!breadcrumbs,\n }}\n >\n {content}\n </AppLayoutContext.Provider>\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n <ToolsAndSplitPanel\n splitPanel={finalSplitPanePosition === 'side' ? splitPanelWrapped : undefined}\n ariaLabels={ariaLabels}\n drawerWidth={toolsDrawerWidth}\n footerHeight={footerHeight}\n headerHeight={headerHeight}\n isMobile={isMobile}\n onToolsToggle={onToolsToggle}\n panelHeightStyle={panelHeightStyle}\n toggleRefs={toolsRefs}\n onLoseToolsFocus={loseToolsFocus}\n tools={tools}\n toolsHide={Boolean(toolsHide)}\n toolsOpen={toolsOpen}\n toolsWidth={toolsWidth}\n />\n </div>\n </div>\n </div>\n );\n }\n);\n\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAA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AAE,SAAS,EACjB,UAAU,EAAE,SAAS,EACrB,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,cAAc,IAE1B,KAAK,CACC,CACV,CACG,CACF,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { applyDefaults } from './defaults';\nimport { AppLayoutProps } from './interfaces';\nimport { Notifications } from './notifications';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { useFocusControl } from './utils/use-focus-control';\nimport useWindowWidth from './utils/use-window-width';\nimport useContentHeight from './utils/use-content-height';\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\nimport { findUpUntil } from '../internal/utils/dom';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { useContainerQuery } from '../internal/hooks/container-queries';\nimport { useStableEventHandler } from '../internal/hooks/use-stable-event-handler';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport {\n SplitPanelContextProvider,\n SplitPanelContextProps,\n SplitPanelLastInteraction,\n SplitPanelSideToggleProps,\n} from '../internal/context/split-panel-context';\nimport {\n CONSTRAINED_MAIN_PANEL_MIN_HEIGHT,\n CONSTRAINED_PAGE_HEIGHT,\n getSplitPanelDefaultSize,\n MAIN_PANEL_MIN_HEIGHT,\n} from '../split-panel/utils/size-utils';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport ContentWrapper, { ContentWrapperProps } from './content-wrapper';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { Drawer } from './drawer';\nimport { SideSplitPanelDrawer } from './split-panel-drawer';\nimport useAppLayoutOffsets from './utils/use-content-width';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '../internal/logging';\n\nimport RefreshedAppLayout from './visual-refresh';\n\nexport { AppLayoutProps };\n\nconst AppLayout = React.forwardRef(\n (\n { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f', ...rest }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent<HTMLDivElement>('AppLayout');\n const isRefresh = useVisualRefresh();\n\n // This re-builds the props including the default values\n const props = { contentType, headerSelector, footerSelector, ...rest };\n\n const baseProps = getBaseProps(rest);\n\n return (\n <div ref={__internalRootRef} {...baseProps}>\n {isRefresh ? <RefreshedAppLayout {...props} ref={ref} /> : <OldAppLayout {...props} ref={ref} />}\n </div>\n );\n }\n);\n\nconst OldAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth = 280,\n navigationHide,\n navigationOpen: controlledNavigationOpen,\n tools,\n toolsWidth = 290,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType = 'default',\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n headerSelector = '#b #h',\n footerSelector = '#b #f',\n ariaLabels,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanelPreferences: controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n onSplitPanelResize,\n onSplitPanelToggle,\n onNavigationChange,\n onToolsChange,\n }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n if (isDevelopment) {\n if (controlledToolsOpen && toolsHide) {\n warnOnce(\n 'AppLayout',\n `You have enabled both the \\`toolsOpen\\` prop and the \\`toolsHide\\` prop. This is not supported. Set \\`toolsOpen\\` to \\`false\\` when you set \\`toolsHide\\` to \\`true\\`.`\n );\n }\n }\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\n\n const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n onNavigationChange,\n isMobile ? false : defaults.navigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n\n const [toolsOpen = false, setToolsOpen] = useControllable(\n controlledToolsOpen,\n onToolsChange,\n isMobile ? false : defaults.toolsOpen,\n { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }\n );\n\n const onNavigationToggle = useCallback(\n (open: boolean) => {\n setNavigationOpen(open);\n fireNonCancelableEvent(onNavigationChange, { open });\n },\n [setNavigationOpen, onNavigationChange]\n );\n const onToolsToggle = useCallback(\n (open: boolean) => {\n setToolsOpen(open);\n fireNonCancelableEvent(onToolsChange, { open });\n },\n [setToolsOpen, onToolsChange]\n );\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink) {\n onNavigationToggle(false);\n }\n };\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(\n headerSelector,\n footerSelector,\n disableBodyScroll\n );\n const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.height);\n const anyPanelOpen = navigationVisible || toolsVisible;\n const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;\n const stickyNotificationsHeight = stickyNotifications ? notificationsHeight : null;\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n const splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState<SplitPanelSideToggleProps>({\n displayed: false,\n ariaLabel: undefined,\n });\n const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n const effectiveToolsWidth =\n toolsHide && (!splitPanelDisplayed || splitPanelPreferences?.position !== 'side')\n ? 0\n : toolsOpen\n ? toolsWidth\n : closedDrawerWidth;\n\n const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);\n const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n defaultSplitPanelSize,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelSize',\n changeHandler: 'onSplitPanelResize',\n }\n );\n\n const mainContentRef = useRef<HTMLDivElement>(null);\n const legacyScrollRootRef = useRef<HTMLElement>(null);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange]\n );\n const onSplitPanelSizeSet = useCallback(\n (detail: { size: number }) => {\n setSplitPanelSize(detail.size);\n fireNonCancelableEvent(onSplitPanelResize, detail);\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n const onToggle = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle]);\n\n const getSplitPanelMaxWidth = useStableEventHandler(() => {\n if (!mainContentRef.current || !defaults.minContentWidth) {\n return NaN;\n }\n\n const width = parseInt(getComputedStyle(mainContentRef.current).width);\n // when disableContentPaddings is true there is less available space,\n // so we subtract space-scaled-2x-xxxl * 2 for left and right padding\n const contentPadding = disableContentPaddings ? 80 : 0;\n const spaceAvailable = width - defaults.minContentWidth - contentPadding;\n const spaceTaken = finalSplitPanePosition === 'side' ? splitPanelSize : 0;\n return Math.max(0, spaceTaken + spaceAvailable);\n });\n\n const getSplitPanelMaxHeight = useStableEventHandler(() => {\n if (typeof document === 'undefined') {\n return 0; // render the split panel in its minimum possible size\n } else if (disableBodyScroll && legacyScrollRootRef.current) {\n const availableHeight = legacyScrollRootRef.current.clientHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n } else {\n const availableHeight = document.documentElement.clientHeight - headerHeight - footerHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n\n const finalSplitPanePosition = isSplitpanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n const splitPanelOpenOnTheSide = splitPaneAvailableOnTheSide && splitPanelOpen;\n\n const toggleButtonsBarWidth = 0;\n\n const windowWidth = useWindowWidth();\n const { left: leftOffset, right: rightOffset } = useAppLayoutOffsets(rootRef.current);\n const contentWidthWithSplitPanel =\n windowWidth -\n leftOffset -\n rightOffset -\n effectiveToolsWidth -\n effectiveNavigationWidth -\n (disableContentPaddings ? 0 : toggleButtonsBarWidth);\n\n useEffect(() => {\n const contentWidth = contentWidthWithSplitPanel - splitPanelSize;\n setIsSplitpanelForcedPosition(isMobile || (defaults.minContentWidth || 0) > contentWidth);\n // This is a workaround to avoid a forced position due to splitPanelSize, which is\n // user controlled variable.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [contentWidthWithSplitPanel, defaults.minContentWidth, isMobile]);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n const toolsClosedWidth = toolsHide || isMobile ? 0 : closedDrawerWidth;\n\n const [splitPanelLastInteraction, setSplitPanelLastInteraction] = useState<undefined | SplitPanelLastInteraction>();\n useEffectOnUpdate(\n () => setSplitPanelLastInteraction(splitPanelOpen ? { type: 'open' } : { type: 'close' }),\n [splitPanelOpen]\n );\n useEffectOnUpdate(() => setSplitPanelLastInteraction({ type: 'position' }), [splitPanelPosition]);\n\n const contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContext: SplitPanelContextProps = {\n topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),\n bottomOffset: footerHeight,\n leftOffset:\n leftOffset + (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: rightOffset + (isMobile ? 0 : !toolsHide && toolsOpen ? toolsWidth : toolsClosedWidth),\n position: finalSplitPanePosition,\n size: splitPanelSize,\n getMaxWidth: getSplitPanelMaxWidth,\n getMaxHeight: getSplitPanelMaxHeight,\n disableContentPaddings,\n contentWidthStyles: contentMaxWidthStyle,\n isOpen: splitPanelOpen,\n isMobile,\n isForcedPosition: isSplitpanelForcedPosition,\n lastInteraction: splitPanelLastInteraction,\n onResize: onSplitPanelSizeSet,\n onToggle,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelContextProvider value={splitPanelContext}>{splitPanel}</SplitPanelContextProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n (toolsHide && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||\n // 2. Tools panel is present and open\n toolsVisible ||\n // 3. Split panel is open in side position\n splitPanelOpenOnTheSide,\n isMobile,\n };\n\n const { refs: navigationRefs } = useFocusControl(navigationOpen);\n const { refs: toolsRefs, setFocus: focusToolsClose, loseFocus: loseToolsFocus } = useFocusControl(toolsOpen, true);\n\n useImperativeHandle(\n ref,\n () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle(false);\n }\n },\n focusToolsClose,\n }),\n [isMobile, onNavigationToggle, onToolsToggle, focusToolsClose]\n );\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll'])}\n ref={rootRef}\n >\n <div className={styles['layout-wrapper']} style={contentHeightStyle}>\n {isMobile && (!toolsHide || !navigationHide || breadcrumbs) && (\n <MobileToolbar\n anyPanelOpen={anyPanelOpen}\n toggleRefs={{ navigation: navigationRefs.toggle, tools: toolsRefs.toggle }}\n topOffset={headerHeight}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle(true)}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={ariaLabels}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={onNavigationToggle}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : headerHeight}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>\n {breadcrumbs}\n </div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications &&\n (isMobile || !breadcrumbs) &&\n styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n // eslint-disable-next-line react/forbid-component-props\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n >\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop:\n (disableBodyScroll ? 0 : headerHeight) +\n (stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),\n stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),\n hasBreadcrumbs: !!breadcrumbs,\n }}\n >\n {content}\n </AppLayoutContext.Provider>\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && (\n <SideSplitPanelDrawer\n topOffset={headerHeight}\n bottomOffset={footerHeight}\n displayed={splitPanelDisplayed}\n width={splitPanelOpen ? splitPanelSize : undefined}\n >\n {splitPanelWrapped}\n </SideSplitPanelDrawer>\n )}\n\n {!toolsHide && (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={ariaLabels}\n width={toolsWidth}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n )}\n </div>\n </div>\n </div>\n );\n }\n);\n\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SideSplitPanelDrawer {
|
|
3
|
+
topOffset: number | undefined;
|
|
4
|
+
bottomOffset: number | undefined;
|
|
5
|
+
width: number | undefined;
|
|
6
|
+
displayed: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function SideSplitPanelDrawer({ topOffset, bottomOffset, width, displayed, children }: SideSplitPanelDrawer): JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/split-panel-drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,oBAAoB,eAQjH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import styles from './styles.css.js';
|
|
6
|
+
export function SideSplitPanelDrawer({ topOffset, bottomOffset, width, displayed, children }) {
|
|
7
|
+
return (React.createElement("div", { className: clsx(displayed && styles['drawer-displayed']), style: { width } },
|
|
8
|
+
React.createElement("div", { className: styles['drawer-content'], style: { width: width, top: topOffset, bottom: bottomOffset } }, children)));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/split-panel-drawer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAUrC,MAAM,UAAU,oBAAoB,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAwB;IAChH,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE;QAC7E,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,IACpG,QAAQ,CACL,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport styles from './styles.css.js';\n\ninterface SideSplitPanelDrawer {\n topOffset: number | undefined;\n bottomOffset: number | undefined;\n width: number | undefined;\n displayed: boolean;\n children: React.ReactNode;\n}\n\nexport function SideSplitPanelDrawer({ topOffset, bottomOffset, width, displayed, children }: SideSplitPanelDrawer) {\n return (\n <div className={clsx(displayed && styles['drawer-displayed'])} style={{ width }}>\n <div className={styles['drawer-content']} style={{ width: width, top: topOffset, bottom: bottomOffset }}>\n {children}\n </div>\n </div>\n );\n}\n"]}
|