@cloudscape-design/components 3.0.173 → 3.0.175
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/content-wrapper/index.d.ts +2 -0
- package/app-layout/content-wrapper/index.d.ts.map +1 -1
- package/app-layout/content-wrapper/index.js +2 -2
- package/app-layout/content-wrapper/index.js.map +1 -1
- package/app-layout/content-wrapper/styles.css.js +3 -2
- package/app-layout/content-wrapper/styles.scoped.css +26 -2
- package/app-layout/content-wrapper/styles.selectors.js +3 -2
- package/app-layout/defaults.d.ts.map +1 -1
- package/app-layout/defaults.js +1 -0
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/drawer.d.ts +0 -1
- package/app-layout/drawer.d.ts.map +1 -1
- package/app-layout/drawer.js.map +1 -1
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +24 -17
- package/app-layout/index.js.map +1 -1
- package/app-layout/interfaces.d.ts +1 -1
- package/app-layout/interfaces.d.ts.map +1 -1
- package/app-layout/interfaces.js.map +1 -1
- package/app-layout/tools-and-split-panel.d.ts.map +1 -1
- package/app-layout/tools-and-split-panel.js +1 -1
- package/app-layout/tools-and-split-panel.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts +4 -0
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +13 -8
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/layout.js +8 -8
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.js +2 -2
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/split-panel.d.ts.map +1 -1
- package/app-layout/visual-refresh/split-panel.js +3 -5
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +60 -60
- package/app-layout/visual-refresh/styles.scoped.css +164 -160
- package/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/app-layout/visual-refresh/tools.d.ts.map +1 -1
- package/app-layout/visual-refresh/tools.js +5 -7
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/input/internal.js +1 -1
- package/input/internal.js.map +1 -1
- package/internal/context/split-panel-context.d.ts +5 -2
- package/internal/context/split-panel-context.d.ts.map +1 -1
- package/internal/context/split-panel-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/split-panel/index.d.ts +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +11 -8
- package/split-panel/index.js.map +1 -1
- package/split-panel/interfaces.d.ts +4 -0
- package/split-panel/interfaces.d.ts.map +1 -1
- package/split-panel/interfaces.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/content-wrapper/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/content-wrapper/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,cAAc,CAAC,WAAW,CAAC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC1C;AAED,QAAA,MAAM,cAAc,4FAsCnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -4,11 +4,11 @@ import clsx from 'clsx';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styles from './styles.css.js';
|
|
6
6
|
var ContentWrapper = React.forwardRef(function (_a, ref) {
|
|
7
|
-
var className = _a.className, children = _a.children, toolsPadding = _a.toolsPadding, disablePaddings = _a.disablePaddings, navigationPadding = _a.navigationPadding, isMobile = _a.isMobile, contentWidthStyles = _a.contentWidthStyles;
|
|
7
|
+
var className = _a.className, contentType = _a.contentType, children = _a.children, toolsPadding = _a.toolsPadding, disablePaddings = _a.disablePaddings, navigationPadding = _a.navigationPadding, isMobile = _a.isMobile, contentWidthStyles = _a.contentWidthStyles;
|
|
8
8
|
if (disablePaddings) {
|
|
9
9
|
return (React.createElement("div", { className: className, ref: ref }, children));
|
|
10
10
|
}
|
|
11
|
-
return (React.createElement("div", { ref: ref, className: clsx(className, styles['content-wrapper'], !navigationPadding && styles['content-wrapper-no-navigation-padding'], !toolsPadding && styles['content-wrapper-no-tools-padding'], isMobile && styles['content-wrapper-mobile']), style: contentWidthStyles }, children));
|
|
11
|
+
return (React.createElement("div", { ref: ref, className: clsx(className, styles['content-wrapper'], styles["content-type-".concat(contentType)], !navigationPadding && styles['content-wrapper-no-navigation-padding'], !toolsPadding && styles['content-wrapper-no-tools-padding'], isMobile && styles['content-wrapper-mobile']), style: contentWidthStyles }, children));
|
|
12
12
|
});
|
|
13
13
|
export default ContentWrapper;
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/content-wrapper/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;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/content-wrapper/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;AAcrC,IAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CACrC,UACE,EASsB,EACtB,GAA8B;QAT5B,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,eAAe,qBAAA,EACf,iBAAiB,uBAAA,EACjB,QAAQ,cAAA,EACR,kBAAkB,wBAAA;IAIpB,IAAI,eAAe,EAAE;QACnB,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAChC,QAAQ,CACL,CACP,CAAC;KACH;IACD,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,iBAAiB,CAAC,EACzB,MAAM,CAAC,uBAAgB,WAAW,CAAE,CAAC,EACrC,CAAC,iBAAiB,IAAI,MAAM,CAAC,uCAAuC,CAAC,EACrE,CAAC,YAAY,IAAI,MAAM,CAAC,kCAAkC,CAAC,EAC3D,QAAQ,IAAI,MAAM,CAAC,wBAAwB,CAAC,CAC7C,EACD,KAAK,EAAE,kBAAkB,IAExB,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,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';\nimport { AppLayoutProps } from '../interfaces';\n\nexport interface ContentWrapperProps {\n className?: string;\n contentType: AppLayoutProps.ContentType;\n children?: React.ReactNode;\n isMobile: boolean;\n navigationPadding: boolean;\n toolsPadding: boolean;\n disablePaddings?: boolean;\n contentWidthStyles?: React.CSSProperties;\n}\n\nconst ContentWrapper = React.forwardRef(\n (\n {\n className,\n contentType,\n children,\n toolsPadding,\n disablePaddings,\n navigationPadding,\n isMobile,\n contentWidthStyles,\n }: ContentWrapperProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (disablePaddings) {\n return (\n <div className={className} ref={ref}>\n {children}\n </div>\n );\n }\n return (\n <div\n ref={ref}\n className={clsx(\n className,\n styles['content-wrapper'],\n styles[`content-type-${contentType}`],\n !navigationPadding && styles['content-wrapper-no-navigation-padding'],\n !toolsPadding && styles['content-wrapper-no-tools-padding'],\n isMobile && styles['content-wrapper-mobile']\n )}\n style={contentWidthStyles}\n >\n {children}\n </div>\n );\n }\n);\n\nexport default ContentWrapper;\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content-wrapper": "awsui_content-
|
|
5
|
-
"content-wrapper-mobile": "awsui_content-wrapper-
|
|
4
|
+
"content-wrapper": "awsui_content-wrapper_zycdx_19ivr_97",
|
|
5
|
+
"content-wrapper-mobile": "awsui_content-wrapper-mobile_zycdx_19ivr_101",
|
|
6
|
+
"content-type-dashboard": "awsui_content-type-dashboard_zycdx_19ivr_106"
|
|
6
7
|
};
|
|
7
8
|
|
|
@@ -90,11 +90,35 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
/*
|
|
94
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
|
+
SPDX-License-Identifier: Apache-2.0
|
|
96
|
+
*/
|
|
97
|
+
.awsui_content-wrapper_zycdx_19ivr_97:not(#\9) {
|
|
94
98
|
padding-left: var(--space-scaled-2x-xxxl-lbp35j, 40px);
|
|
95
99
|
padding-right: var(--space-scaled-2x-xxxl-lbp35j, 40px);
|
|
96
100
|
}
|
|
97
|
-
.awsui_content-wrapper-
|
|
101
|
+
.awsui_content-wrapper-mobile_zycdx_19ivr_101:not(#\9) {
|
|
98
102
|
padding-left: var(--space-l-4vl6xu, 20px);
|
|
99
103
|
padding-right: var(--space-l-4vl6xu, 20px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.awsui_content-type-dashboard_zycdx_19ivr_106:not(#\9) {
|
|
107
|
+
margin-left: auto;
|
|
108
|
+
margin-right: auto;
|
|
109
|
+
}
|
|
110
|
+
@media (min-width: 1401px) {
|
|
111
|
+
.awsui_content-type-dashboard_zycdx_19ivr_106:not(#\9) {
|
|
112
|
+
max-width: 1280px;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
@media (min-width: 1921px) {
|
|
116
|
+
.awsui_content-type-dashboard_zycdx_19ivr_106:not(#\9) {
|
|
117
|
+
max-width: 1440px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
@media (min-width: 2541px) {
|
|
121
|
+
.awsui_content-type-dashboard_zycdx_19ivr_106:not(#\9) {
|
|
122
|
+
max-width: 1620px;
|
|
123
|
+
}
|
|
100
124
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-wrapper": "awsui_content-
|
|
6
|
-
"content-wrapper-mobile": "awsui_content-wrapper-
|
|
5
|
+
"content-wrapper": "awsui_content-wrapper_zycdx_19ivr_97",
|
|
6
|
+
"content-wrapper-mobile": "awsui_content-wrapper-mobile_zycdx_19ivr_101",
|
|
7
|
+
"content-type-dashboard": "awsui_content-type-dashboard_zycdx_19ivr_106"
|
|
7
8
|
};
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/app-layout/defaults.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/app-layout/defaults.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqC9C,UAAU,cAAc;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,wBAAgB,aAAa,CAC3B,WAAW,EAAE,cAAc,CAAC,WAAW,EACvC,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,OAAO,GACjB,cAAc,CAWhB"}
|
package/app-layout/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/app-layout/defaults.ts"],"names":[],"mappings":";AAIA,IAAM,uBAAuB,GAAmB;IAC9C,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,GAAG;IACpB,eAAe,EAAE,SAAS;CAC3B,CAAC;AAEF,IAAM,QAAQ,GAAuD;IACnE,SAAO,eACF,uBAAuB,CAC3B;IACD,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE;QACJ,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,GAAG;KACrB;IACD,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,MAAM,EAAE;QACN,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,IAAI;KACtB;CACF,CAAC;AASF,MAAM,UAAU,aAAa,CAC3B,WAAuC,EACvC,cAA8B,EAC9B,SAAkB;;IAElB,IAAM,mBAAmB,GAAG,SAAS;QACnC,CAAC,uBAAM,QAAQ,CAAC,WAAW,CAAC,KAAE,eAAe,EAAE,SAAS,IACxD,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE1B,OAAO;QACL,eAAe,EAAE,MAAA,cAAc,CAAC,eAAe,mCAAI,mBAAmB,CAAC,eAAe;QACtF,eAAe,EAAE,MAAA,cAAc,CAAC,eAAe,mCAAI,mBAAmB,CAAC,eAAe;QACtF,cAAc,EAAE,MAAA,cAAc,CAAC,cAAc,mCAAI,mBAAmB,CAAC,cAAc;QACnF,SAAS,EAAE,MAAA,cAAc,CAAC,SAAS,mCAAI,mBAAmB,CAAC,SAAS;KACrE,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AppLayoutProps } from './interfaces';\n\nconst defaultContentTypeState: AppLayoutState = {\n navigationOpen: true,\n minContentWidth: 280,\n maxContentWidth: undefined,\n};\n\nconst defaults: Record<AppLayoutProps.ContentType, AppLayoutState> = {\n default: {\n ...defaultContentTypeState,\n },\n cards: {\n navigationOpen: true,\n minContentWidth: 280,\n maxContentWidth: undefined,\n },\n form: {\n navigationOpen: false,\n minContentWidth: 280,\n maxContentWidth: 800,\n },\n table: {\n navigationOpen: true,\n minContentWidth: 280,\n maxContentWidth: undefined,\n },\n wizard: {\n navigationOpen: false,\n minContentWidth: 280,\n maxContentWidth: 1080,\n },\n};\n\ninterface AppLayoutState {\n navigationOpen?: boolean;\n toolsOpen?: boolean;\n minContentWidth?: number;\n maxContentWidth?: number | undefined;\n}\n\nexport function applyDefaults(\n contentType: AppLayoutProps.ContentType,\n stateFromProps: AppLayoutState,\n isRefresh: boolean\n): AppLayoutState {\n const contentTypeDefaults = isRefresh\n ? { ...defaults[contentType], maxContentWidth: undefined }\n : defaults[contentType];\n\n return {\n maxContentWidth: stateFromProps.maxContentWidth ?? contentTypeDefaults.maxContentWidth,\n minContentWidth: stateFromProps.minContentWidth ?? contentTypeDefaults.minContentWidth,\n navigationOpen: stateFromProps.navigationOpen ?? contentTypeDefaults.navigationOpen,\n toolsOpen: stateFromProps.toolsOpen ?? contentTypeDefaults.toolsOpen,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/app-layout/defaults.ts"],"names":[],"mappings":";AAIA,IAAM,uBAAuB,GAAmB;IAC9C,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,GAAG;IACpB,eAAe,EAAE,SAAS;CAC3B,CAAC;AAEF,IAAM,QAAQ,GAAuD;IACnE,SAAO,eACF,uBAAuB,CAC3B;IACD,SAAS,eACJ,uBAAuB,CAC3B;IACD,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE;QACJ,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,GAAG;KACrB;IACD,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,MAAM,EAAE;QACN,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,IAAI;KACtB;CACF,CAAC;AASF,MAAM,UAAU,aAAa,CAC3B,WAAuC,EACvC,cAA8B,EAC9B,SAAkB;;IAElB,IAAM,mBAAmB,GAAG,SAAS;QACnC,CAAC,uBAAM,QAAQ,CAAC,WAAW,CAAC,KAAE,eAAe,EAAE,SAAS,IACxD,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE1B,OAAO;QACL,eAAe,EAAE,MAAA,cAAc,CAAC,eAAe,mCAAI,mBAAmB,CAAC,eAAe;QACtF,eAAe,EAAE,MAAA,cAAc,CAAC,eAAe,mCAAI,mBAAmB,CAAC,eAAe;QACtF,cAAc,EAAE,MAAA,cAAc,CAAC,cAAc,mCAAI,mBAAmB,CAAC,cAAc;QACnF,SAAS,EAAE,MAAA,cAAc,CAAC,SAAS,mCAAI,mBAAmB,CAAC,SAAS;KACrE,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AppLayoutProps } from './interfaces';\n\nconst defaultContentTypeState: AppLayoutState = {\n navigationOpen: true,\n minContentWidth: 280,\n maxContentWidth: undefined,\n};\n\nconst defaults: Record<AppLayoutProps.ContentType, AppLayoutState> = {\n default: {\n ...defaultContentTypeState,\n },\n dashboard: {\n ...defaultContentTypeState,\n },\n cards: {\n navigationOpen: true,\n minContentWidth: 280,\n maxContentWidth: undefined,\n },\n form: {\n navigationOpen: false,\n minContentWidth: 280,\n maxContentWidth: 800,\n },\n table: {\n navigationOpen: true,\n minContentWidth: 280,\n maxContentWidth: undefined,\n },\n wizard: {\n navigationOpen: false,\n minContentWidth: 280,\n maxContentWidth: 1080,\n },\n};\n\ninterface AppLayoutState {\n navigationOpen?: boolean;\n toolsOpen?: boolean;\n minContentWidth?: number;\n maxContentWidth?: number | undefined;\n}\n\nexport function applyDefaults(\n contentType: AppLayoutProps.ContentType,\n stateFromProps: AppLayoutState,\n isRefresh: boolean\n): AppLayoutState {\n const contentTypeDefaults = isRefresh\n ? { ...defaults[contentType], maxContentWidth: undefined }\n : defaults[contentType];\n\n return {\n maxContentWidth: stateFromProps.maxContentWidth ?? contentTypeDefaults.maxContentWidth,\n minContentWidth: stateFromProps.minContentWidth ?? contentTypeDefaults.minContentWidth,\n navigationOpen: stateFromProps.navigationOpen ?? contentTypeDefaults.navigationOpen,\n toolsOpen: stateFromProps.toolsOpen ?? contentTypeDefaults.toolsOpen,\n };\n}\n"]}
|
package/app-layout/drawer.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/app-layout/drawer.tsx"],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CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,OAAO,aAAa,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,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;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;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,wBAAwB,EACxB,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAe,GAChB,EAAE,kBAAkB,eAgFpB"}
|
package/app-layout/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/app-layout/drawer.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,WAAW,CAAC;AAExE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,sFAAsF;AACtF,IAAM,YAAY,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/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C,CAAC,UAAA,CAAC;gBACC,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,UAAA,KAAK;YACZ,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,cAAM,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe,EAC9B,QAAQ,EAAE,aAAa,GACvB;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 styles from './styles.css.js';\n\n// This matches the design token awsui.$border-divider-section-width in Visual Refresh\nconst BORDER_WIDTH = 2;\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;\n bottomOffset?: number;\n ariaLabels?: AppLayoutProps.Labels;\n children: React.ReactNode;\n type: keyof typeof togglesConfig;\n isMobile?: boolean;\n isOpen?: boolean;\n isHidden?: boolean;\n hasDividerWithSplitPanel?: boolean;\n onToggle: (isOpen: boolean) => void;\n onClick?: (event: React.MouseEvent) => void;\n onLoseFocus?: (event: React.FocusEvent) => void;\n extendRight?: number;\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 isHidden,\n isMobile,\n hasDividerWithSplitPanel,\n onToggle,\n onClick,\n onLoseFocus,\n extendRight = 0,\n}: DesktopDrawerProps) {\n const { TagName, iconName, getLabels } = togglesConfig[type];\n const { mainLabel, closeLabel, openLabel } = getLabels(ariaLabels);\n const hasDividerWithButtonBar = isOpen && extendRight !== 0;\n\n const drawerContentWidthOpen = isMobile ? undefined : width;\n const drawerContentWidth = isOpen ? drawerContentWidthOpen : undefined;\n\n const drawerWidth =\n hasDividerWithButtonBar && drawerContentWidth ? drawerContentWidth + BORDER_WIDTH : drawerContentWidth;\n\n const closeIconName = 'close';\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 [styles['drawer-hidden']]: isHidden,\n [styles['drawer-mobile']]: isMobile,\n [styles['has-divider-with-splitpanel']]: hasDividerWithSplitPanel,\n [styles['opaque-background']]: hasDividerWithButtonBar,\n })}\n style={{\n width: drawerWidth,\n marginRight: isOpen ? -1 * extendRight : 0,\n paddingRight: isOpen ? extendRight : 0,\n }}\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 iconName={closeIconName}\n />\n {children}\n </TagName>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -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;
|
|
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;AAuC9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FAmBd,CAAC;AAogBF,eAAe,SAAS,CAAC"}
|
package/app-layout/index.js
CHANGED
|
@@ -85,25 +85,30 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
85
85
|
controlledProp: 'splitPanelPreferences',
|
|
86
86
|
changeHandler: 'onSplitPanelPreferencesChange'
|
|
87
87
|
}), splitPanelPreferences = _r[0], setSplitPanelPreferences = _r[1];
|
|
88
|
+
var _s = useControllable(controlledSplitPanelOpen, onSplitPanelToggle, false, {
|
|
89
|
+
componentName: 'AppLayout',
|
|
90
|
+
controlledProp: 'splitPanelOpen',
|
|
91
|
+
changeHandler: 'onSplitPanelToggle'
|
|
92
|
+
}), _t = _s[0], splitPanelOpen = _t === void 0 ? false : _t, setSplitPanelOpen = _s[1];
|
|
88
93
|
var splitPanelPosition = (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) || 'bottom';
|
|
94
|
+
var _u = useState({
|
|
95
|
+
displayed: false,
|
|
96
|
+
ariaLabel: undefined
|
|
97
|
+
}), splitPanelReportedToggle = _u[0], setSplitPanelReportedToggle = _u[1];
|
|
98
|
+
var splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));
|
|
89
99
|
var closedDrawerWidth = 40;
|
|
90
100
|
var effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;
|
|
91
|
-
var effectiveToolsWidth = toolsHide && (!
|
|
101
|
+
var effectiveToolsWidth = toolsHide && (!splitPanelDisplayed || (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) !== 'side')
|
|
92
102
|
? 0
|
|
93
103
|
: toolsOpen
|
|
94
104
|
? toolsWidth
|
|
95
105
|
: closedDrawerWidth;
|
|
96
106
|
var defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);
|
|
97
|
-
var
|
|
107
|
+
var _v = useControllable(controlledSplitPanelSize, onSplitPanelResize, defaultSplitPanelSize, {
|
|
98
108
|
componentName: 'AppLayout',
|
|
99
109
|
controlledProp: 'splitPanelSize',
|
|
100
110
|
changeHandler: 'onSplitPanelResize'
|
|
101
|
-
}),
|
|
102
|
-
var _u = useControllable(controlledSplitPanelOpen, onSplitPanelToggle, false, {
|
|
103
|
-
componentName: 'AppLayout',
|
|
104
|
-
controlledProp: 'splitPanelOpen',
|
|
105
|
-
changeHandler: 'onSplitPanelToggle'
|
|
106
|
-
}), _v = _u[0], splitPanelOpen = _v === void 0 ? false : _v, setSplitPanelOpen = _u[1];
|
|
111
|
+
}), _w = _v[0], splitPanelSize = _w === void 0 ? defaultSplitPanelSize : _w, setSplitPanelSize = _v[1];
|
|
107
112
|
var mainContentRef = useRef(null);
|
|
108
113
|
var legacyScrollRootRef = useRef(null);
|
|
109
114
|
var onSplitPanelPreferencesSet = useCallback(function (detail) {
|
|
@@ -146,11 +151,11 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
146
151
|
}
|
|
147
152
|
});
|
|
148
153
|
var finalSplitPanePosition = isSplitpanelForcedPosition ? 'bottom' : splitPanelPosition;
|
|
149
|
-
var splitPaneAvailableOnTheSide =
|
|
154
|
+
var splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';
|
|
150
155
|
var splitPanelOpenOnTheSide = splitPaneAvailableOnTheSide && splitPanelOpen;
|
|
151
156
|
var toggleButtonsBarWidth = 0;
|
|
152
157
|
var windowWidth = useWindowWidth();
|
|
153
|
-
var
|
|
158
|
+
var _x = useAppLayoutOffsets(rootRef.current), leftOffset = _x.left, rightOffset = _x.right;
|
|
154
159
|
var contentWidthWithSplitPanel = windowWidth -
|
|
155
160
|
leftOffset -
|
|
156
161
|
rightOffset -
|
|
@@ -166,12 +171,12 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
166
171
|
}, [contentWidthWithSplitPanel, defaults.minContentWidth, isMobile]);
|
|
167
172
|
var navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;
|
|
168
173
|
var toolsClosedWidth = toolsHide || isMobile ? 0 : closedDrawerWidth;
|
|
169
|
-
var
|
|
174
|
+
var _y = useState(), splitPanelLastInteraction = _y[0], setSplitPanelLastInteraction = _y[1];
|
|
170
175
|
useEffectOnUpdate(function () { return setSplitPanelLastInteraction(splitPanelOpen ? { type: 'open' } : { type: 'close' }); }, [splitPanelOpen]);
|
|
171
176
|
useEffectOnUpdate(function () { return setSplitPanelLastInteraction({ type: 'position' }); }, [splitPanelPosition]);
|
|
172
177
|
var contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;
|
|
173
|
-
var
|
|
174
|
-
var
|
|
178
|
+
var _z = useState(0), splitPanelReportedSize = _z[0], setSplitPanelReportedSize = _z[1];
|
|
179
|
+
var _0 = useState(0), splitPanelReportedHeaderHeight = _0[0], setSplitPanelReportedHeaderHeight = _0[1];
|
|
175
180
|
var splitPanelContext = {
|
|
176
181
|
topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),
|
|
177
182
|
bottomOffset: footerHeight,
|
|
@@ -190,16 +195,18 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
190
195
|
onResize: onSplitPanelSizeSet,
|
|
191
196
|
onToggle: onToggle,
|
|
192
197
|
onPreferencesChange: onSplitPanelPreferencesSet,
|
|
198
|
+
setSplitPanelToggle: setSplitPanelReportedToggle,
|
|
193
199
|
reportSize: setSplitPanelReportedSize,
|
|
194
200
|
reportHeaderHeight: setSplitPanelReportedHeaderHeight
|
|
195
201
|
};
|
|
196
202
|
var splitPanelWrapped = splitPanel && (React.createElement(SplitPanelContextProvider, { value: splitPanelContext }, splitPanel));
|
|
197
203
|
var contentWrapperProps = {
|
|
204
|
+
contentType: contentType,
|
|
198
205
|
navigationPadding: navigationHide || !!navigationOpen,
|
|
199
206
|
toolsPadding:
|
|
200
207
|
// tools padding is displayed in one of the three cases
|
|
201
208
|
// 1. Nothing on the that screen edge (no tools panel and no split panel)
|
|
202
|
-
(toolsHide && (!
|
|
209
|
+
(toolsHide && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||
|
|
203
210
|
// 2. Tools panel is present and open
|
|
204
211
|
toolsVisible ||
|
|
205
212
|
// 3. Split panel is open in side position
|
|
@@ -207,7 +214,7 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
207
214
|
isMobile: isMobile
|
|
208
215
|
};
|
|
209
216
|
var navigationRefs = useFocusControl(navigationOpen).refs;
|
|
210
|
-
var
|
|
217
|
+
var _1 = useFocusControl(toolsOpen, true), toolsRefs = _1.refs, focusToolsClose = _1.setFocus, loseToolsFocus = _1.loseFocus;
|
|
211
218
|
useImperativeHandle(ref, function () { return ({
|
|
212
219
|
openTools: function () { return onToolsToggle(true); },
|
|
213
220
|
closeNavigationIfNecessary: function () {
|
|
@@ -217,7 +224,7 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
217
224
|
},
|
|
218
225
|
focusToolsClose: focusToolsClose
|
|
219
226
|
}); }, [isMobile, onNavigationToggle, onToolsToggle, focusToolsClose]);
|
|
220
|
-
var splitPanelBottomOffset = (_c = (!
|
|
227
|
+
var splitPanelBottomOffset = (_c = (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'
|
|
221
228
|
? undefined
|
|
222
229
|
: splitPanelOpen
|
|
223
230
|
? splitPanelReportedSize
|
|
@@ -231,7 +238,7 @@ var OldAppLayout = React.forwardRef(function (_a, ref) {
|
|
|
231
238
|
return 0;
|
|
232
239
|
}
|
|
233
240
|
var toolsPanelWidth = toolsHide ? 0 : toolsOpen ? toolsWidth : closedDrawerWidth;
|
|
234
|
-
var splitPanelWidth = !
|
|
241
|
+
var splitPanelWidth = !splitPanelDisplayed || finalSplitPanePosition !== 'side'
|
|
235
242
|
? 0
|
|
236
243
|
: splitPanelOpen
|
|
237
244
|
? splitPanelReportedSize
|
package/app-layout/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,EA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;gBAEP,oBAAC,kBAAkB,IACjB,UAAU,EAAE,sBAAsB,KAAK,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,EAC7E,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAkB,EACtC,sBAAsB,EAAE,sBAAsB,EAC9C,WAAW,EAAE,gBAAgB,EAC7B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,mBAAmB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,uBAAuB,EACvC,sBAAsB,EAAE,sBAAsB,EAC9C,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} 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 { isMotionDisabled } from '../internal/motion';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { NavigationPanel } from './navigation-panel';\nimport { ToolsAndSplitPanel } from './tools-and-split-panel';\nimport { usePreviousFrameValue } from '../internal/hooks/use-previous-frame';\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 const isMotionEnabled = rootRef.current ? !isMotionDisabled(rootRef.current) : false;\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 splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n const effectiveToolsWidth =\n toolsHide && (!splitPanel || 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 [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\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 = Boolean(splitPanel) && 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 reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelContextProvider value={splitPanelContext}>{splitPanel}</SplitPanelContextProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n navigationPadding: navigationHide || !!navigationOpen,\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 && (!splitPanel || 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 (!splitPanel || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const contentWidthStyles = !isMobile\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : undefined;\n\n const isToolsDrawerHidden = disableContentPaddings;\n\n const toolsDrawerWidth = (() => {\n if (isMobile) {\n return 0;\n }\n\n const toolsPanelWidth = toolsHide ? 0 : toolsOpen ? toolsWidth : closedDrawerWidth;\n const splitPanelWidth =\n !splitPanel || 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 const previousContentWidth = usePreviousFrameValue(\n contentWidthWithSplitPanel - (splitPanelOpenOnTheSide ? splitPanelReportedSize : 0)\n );\n\n const contentScaleX = (() => {\n if (isMobile || !isMotionEnabled || !disableContentPaddings || !previousContentWidth) {\n return undefined;\n }\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 isHidden={disableContentPaddings}\n isMobile={isMobile}\n isMotionEnabled={isMotionEnabled}\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 transform: contentScaleX ? `scaleX(${contentScaleX})` : undefined,\n }}\n >\n {notifications && (\n <Notifications\n testUtilsClassName={clsx(styles.notifications, testutilStyles.notifications)}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : headerHeight}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n isMobile={isMobile}\n navigationPadding={contentWrapperProps.navigationPadding}\n toolsPadding={contentWrapperProps.toolsPadding}\n contentWidthStyles={contentWidthStyles}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps} contentWidthStyles={contentWidthStyles}>\n {!isMobile && breadcrumbs && (\n <div\n className={clsx(styles.breadcrumbs, testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}\n >\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 !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n >\n <div\n className={clsx(\n styles.content,\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped']\n )}\n style={contentWidthStyles}\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 </div>\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n <ToolsAndSplitPanel\n splitPanel={finalSplitPanePosition === 'side' ? splitPanelWrapped : undefined}\n ariaLabels={ariaLabels}\n closedDrawerWidth={closedDrawerWidth}\n contentHeightStyle={contentHeightStyle}\n disableContentPaddings={disableContentPaddings}\n drawerWidth={toolsDrawerWidth}\n footerHeight={footerHeight}\n headerHeight={headerHeight}\n isHidden={isToolsDrawerHidden}\n isMobile={isMobile}\n isMotionEnabled={isMotionEnabled}\n onToolsToggle={onToolsToggle}\n panelHeightStyle={panelHeightStyle}\n splitPanelOpen={splitPanelOpenOnTheSide}\n splitPanelReportedSize={splitPanelReportedSize}\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":"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,CAAC,CAAC,CAAC,SAAS,EAC7E,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAkB,EACtC,sBAAsB,EAAE,sBAAsB,EAC9C,WAAW,EAAE,gBAAgB,EAC7B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,mBAAmB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,uBAAuB,EACvC,sBAAsB,EAAE,sBAAsB,EAC9C,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 { isMotionDisabled } from '../internal/motion';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { NavigationPanel } from './navigation-panel';\nimport { ToolsAndSplitPanel } from './tools-and-split-panel';\nimport { usePreviousFrameValue } from '../internal/hooks/use-previous-frame';\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 const isMotionEnabled = rootRef.current ? !isMotionDisabled(rootRef.current) : false;\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 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 contentWidthStyles = !isMobile\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : undefined;\n\n const isToolsDrawerHidden = disableContentPaddings;\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 const previousContentWidth = usePreviousFrameValue(\n contentWidthWithSplitPanel - (splitPanelOpenOnTheSide ? splitPanelReportedSize : 0)\n );\n\n const contentScaleX = (() => {\n if (isMobile || !isMotionEnabled || !disableContentPaddings || !previousContentWidth) {\n return undefined;\n }\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 isHidden={disableContentPaddings}\n isMobile={isMobile}\n isMotionEnabled={isMotionEnabled}\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 transform: contentScaleX ? `scaleX(${contentScaleX})` : undefined,\n }}\n >\n {notifications && (\n <Notifications\n testUtilsClassName={clsx(styles.notifications, testutilStyles.notifications)}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : headerHeight}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n isMobile={isMobile}\n navigationPadding={contentWrapperProps.navigationPadding}\n toolsPadding={contentWrapperProps.toolsPadding}\n contentWidthStyles={contentWidthStyles}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps} contentWidthStyles={contentWidthStyles}>\n {!isMobile && breadcrumbs && (\n <div\n className={clsx(styles.breadcrumbs, testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}\n >\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 !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n >\n <div\n className={clsx(\n styles.content,\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped']\n )}\n style={contentWidthStyles}\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 </div>\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n <ToolsAndSplitPanel\n splitPanel={finalSplitPanePosition === 'side' ? splitPanelWrapped : undefined}\n ariaLabels={ariaLabels}\n closedDrawerWidth={closedDrawerWidth}\n contentHeightStyle={contentHeightStyle}\n disableContentPaddings={disableContentPaddings}\n drawerWidth={toolsDrawerWidth}\n footerHeight={footerHeight}\n headerHeight={headerHeight}\n isHidden={isToolsDrawerHidden}\n isMobile={isMobile}\n isMotionEnabled={isMotionEnabled}\n onToolsToggle={onToolsToggle}\n panelHeightStyle={panelHeightStyle}\n splitPanelOpen={splitPanelOpenOnTheSide}\n splitPanelReportedSize={splitPanelReportedSize}\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"]}
|
|
@@ -164,7 +164,7 @@ export interface AppLayoutProps extends BaseComponentProps {
|
|
|
164
164
|
onSplitPanelPreferencesChange?: NonCancelableEventHandler<AppLayoutProps.SplitPanelPreferences>;
|
|
165
165
|
}
|
|
166
166
|
export declare namespace AppLayoutProps {
|
|
167
|
-
type ContentType = 'default' | 'form' | 'table' | 'cards' | 'wizard';
|
|
167
|
+
type ContentType = 'default' | 'form' | 'table' | 'cards' | 'wizard' | 'dashboard';
|
|
168
168
|
interface Ref {
|
|
169
169
|
/**
|
|
170
170
|
* Manually closes the navigation drawer if it is necessary for the current
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/app-layout/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC;IAEzC;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OA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C;IAC9B,KAAY,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAE1F,UAAiB,GAAG;QAClB;;;WAGG;QACH,0BAA0B,IAAI,IAAI,CAAC;QAEnC;;;WAGG;QACH,SAAS,IAAI,IAAI,CAAC;QAElB;;;;WAIG;QACH,eAAe,IAAI,IAAI,CAAC;KACzB;IAED,UAAiB,MAAM;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC;QAEvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,UAAiB,YAAY;QAC3B,IAAI,EAAE,OAAO,CAAC;KACf;IAED,UAAiB,sBAAsB;QACrC,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,qBAAqB;QACpC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;KAC7B;IAGD,KAAY,kBAAkB,GAAG,MAAM,GAAG,QAAQ,CAAC;CACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/app-layout/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface AppLayoutProps extends BaseComponentProps {\n /**\n * Determines the default behavior of the component based on some predefined page layouts.\n * Individual properties will always take precedence over the default coming from the content type.\n */\n contentType?: AppLayoutProps.ContentType;\n\n /**\n * If `true`, disables outer paddings for the content slot.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Activates a backwards-compatibility mode for applications with non-fixed headers and footers.\n * @deprecated This layout is being phased out and may miss some features.\n */\n disableBodyScroll?: boolean;\n\n /**\n * State of the navigation drawer.\n */\n navigationOpen?: boolean;\n\n /**\n * Navigation drawer width in pixels.\n */\n navigationWidth?: number;\n\n /**\n * If `true`, the navigation drawer is not displayed at all.\n */\n navigationHide?: boolean;\n\n /**\n * State of the tools drawer.\n */\n toolsOpen?: boolean;\n\n /**\n * If `true`, the tools drawer is not displayed at all.\n */\n toolsHide?: boolean;\n\n /**\n * Tools drawer width in pixels.\n */\n toolsWidth?: number;\n\n /**\n * Maximum main content panel width in pixels.\n *\n * If set to `Number.MAX_VALUE`, the main content panel will occupy the full available width.\n */\n maxContentWidth?: number;\n\n /**\n * Minimum main content panel width in pixels.\n */\n minContentWidth?: number;\n\n /**\n * If true, the notification slot is rendered above the scrollable\n * content area so it is always visible.\n *\n * Note that sticky notifications are not supported in Internet Explorer.\n */\n stickyNotifications?: boolean;\n\n /**\n * CSS selector for the application header.\n */\n headerSelector?: string;\n\n /**\n * CSS selector for the application footer.\n */\n footerSelector?: string;\n\n /**\n * Aria labels for the drawer operating buttons. Use this property to ensure accessibility.\n *\n * * `navigation` (string) - Label for the landmark that wraps the navigation drawer.\n * * `navigationClose` (string) - Label for the button that closes the navigation drawer.\n * * `navigationToggle` (string) - Label for the button that opens the navigation drawer.\n * * `notification` (string) - Label for the region that contains notification messages.\n * * `tools` (string) - Label for the landmark that wraps the tools drawer.\n * * `toolsClose` (string) - Label for the button that closes the tools drawer.\n * * `toolsToggle` (string) - Label for the button that opens the tools drawer.\n *\n * Example:\n * ```\n * {\n * navigation: \"Navigation drawer\",\n * navigationClose: \"Close navigation drawer\",\n * navigationToggle: \"Open navigation drawer\",\n * notifications: \"Notifications\",\n * tools: \"Help panel\",\n * toolsClose: \"Close help panel\",\n * toolsToggle: \"Open help panel\"\n * }\n * ```\n */\n ariaLabels?: AppLayoutProps.Labels;\n\n /**\n * Navigation drawer.\n */\n navigation?: React.ReactNode;\n\n /**\n * Top area of the page content.\n * @deprecated Replaced by the `header` slot of the [content layout](/components/content-layout/) component.\n * @visualrefresh\n */\n contentHeader?: React.ReactNode;\n\n /**\n * Disables overlap between `contentHeader` and `content` slots.\n * @deprecated Replaced by the `disableOverlap` property of the [content layout](/components/content-layout/) component.\n * @visualrefresh\n */\n disableContentHeaderOverlap?: boolean;\n\n /**\n * Main content.\n */\n content?: React.ReactNode;\n\n /**\n * Tools drawer.\n */\n tools?: React.ReactNode;\n\n /**\n * Displayed on top of the main content in the scrollable area.\n *\n * Conceived to contain notifications (flash messages).\n */\n notifications?: React.ReactNode;\n\n /**\n * Use this slot to add the [breadcrumb group component](/components/breadcrumb-group/) to the app layout.\n */\n breadcrumbs?: React.ReactNode;\n\n /**\n * Fired when the navigation drawer is toggled.\n */\n onNavigationChange?: NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;\n\n /**\n * Fired when the tools drawer is toggled.\n */\n onToolsChange?: NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;\n /**\n * Use this slot to add the [split panel component](/components/split-panel/) to the app layout.\n */\n splitPanel?: React.ReactNode;\n\n /**\n * The size of the split panel in pixels.\n */\n splitPanelSize?: number;\n\n /**\n * State of the split panel.\n */\n splitPanelOpen?: boolean;\n /**\n * Controls the split panel preferences.\n *\n * By default, the preference is `{ position: 'bottom' }`\n */\n splitPanelPreferences?: AppLayoutProps.SplitPanelPreferences;\n /**\n * Fired when the split panel is resized.\n */\n onSplitPanelResize?: NonCancelableEventHandler<AppLayoutProps.SplitPanelResizeDetail>;\n /**\n * Fired when the split panel is toggled.\n */\n onSplitPanelToggle?: NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;\n /**\n * Fired when the split panel preferences change.\n */\n onSplitPanelPreferencesChange?: NonCancelableEventHandler<AppLayoutProps.SplitPanelPreferences>;\n}\n\nexport namespace AppLayoutProps {\n export type ContentType = 'default' | 'form' | 'table' | 'cards' | 'wizard';\n\n export interface Ref {\n /**\n * Manually closes the navigation drawer if it is necessary for the current\n * viewport size.\n */\n closeNavigationIfNecessary(): void;\n\n /**\n * Opens the tools panel if it is not already open. Note that it is preferable\n * to control the state by listening to `toolsChange` and providing `toolsOpen`.\n */\n openTools(): void;\n\n /**\n * Focuses the tools panel if it is open. Use this to focus the tools panel\n * after changing the content, for example when clicking on an 'info' link while\n * the panel is already open.\n */\n focusToolsClose(): void;\n }\n\n export interface Labels {\n notifications?: string;\n\n navigation?: string;\n navigationToggle?: string;\n navigationClose?: string;\n\n tools?: string;\n toolsToggle?: string;\n toolsClose?: string;\n }\n\n export interface ChangeDetail {\n open: boolean;\n }\n\n export interface SplitPanelResizeDetail {\n size: number;\n }\n\n export interface SplitPanelPreferences {\n position: 'side' | 'bottom';\n }\n // Duplicated the positions because using this definition in SplitPanelPreferences would display\n // 'AppLayoutProps.SplitPanelPosition' on the API docs instead of the string values.\n export type SplitPanelPosition = 'side' | 'bottom';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/app-layout/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface AppLayoutProps extends BaseComponentProps {\n /**\n * Determines the default behavior of the component based on some predefined page layouts.\n * Individual properties will always take precedence over the default coming from the content type.\n */\n contentType?: AppLayoutProps.ContentType;\n\n /**\n * If `true`, disables outer paddings for the content slot.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Activates a backwards-compatibility mode for applications with non-fixed headers and footers.\n * @deprecated This layout is being phased out and may miss some features.\n */\n disableBodyScroll?: boolean;\n\n /**\n * State of the navigation drawer.\n */\n navigationOpen?: boolean;\n\n /**\n * Navigation drawer width in pixels.\n */\n navigationWidth?: number;\n\n /**\n * If `true`, the navigation drawer is not displayed at all.\n */\n navigationHide?: boolean;\n\n /**\n * State of the tools drawer.\n */\n toolsOpen?: boolean;\n\n /**\n * If `true`, the tools drawer is not displayed at all.\n */\n toolsHide?: boolean;\n\n /**\n * Tools drawer width in pixels.\n */\n toolsWidth?: number;\n\n /**\n * Maximum main content panel width in pixels.\n *\n * If set to `Number.MAX_VALUE`, the main content panel will occupy the full available width.\n */\n maxContentWidth?: number;\n\n /**\n * Minimum main content panel width in pixels.\n */\n minContentWidth?: number;\n\n /**\n * If true, the notification slot is rendered above the scrollable\n * content area so it is always visible.\n *\n * Note that sticky notifications are not supported in Internet Explorer.\n */\n stickyNotifications?: boolean;\n\n /**\n * CSS selector for the application header.\n */\n headerSelector?: string;\n\n /**\n * CSS selector for the application footer.\n */\n footerSelector?: string;\n\n /**\n * Aria labels for the drawer operating buttons. Use this property to ensure accessibility.\n *\n * * `navigation` (string) - Label for the landmark that wraps the navigation drawer.\n * * `navigationClose` (string) - Label for the button that closes the navigation drawer.\n * * `navigationToggle` (string) - Label for the button that opens the navigation drawer.\n * * `notification` (string) - Label for the region that contains notification messages.\n * * `tools` (string) - Label for the landmark that wraps the tools drawer.\n * * `toolsClose` (string) - Label for the button that closes the tools drawer.\n * * `toolsToggle` (string) - Label for the button that opens the tools drawer.\n *\n * Example:\n * ```\n * {\n * navigation: \"Navigation drawer\",\n * navigationClose: \"Close navigation drawer\",\n * navigationToggle: \"Open navigation drawer\",\n * notifications: \"Notifications\",\n * tools: \"Help panel\",\n * toolsClose: \"Close help panel\",\n * toolsToggle: \"Open help panel\"\n * }\n * ```\n */\n ariaLabels?: AppLayoutProps.Labels;\n\n /**\n * Navigation drawer.\n */\n navigation?: React.ReactNode;\n\n /**\n * Top area of the page content.\n * @deprecated Replaced by the `header` slot of the [content layout](/components/content-layout/) component.\n * @visualrefresh\n */\n contentHeader?: React.ReactNode;\n\n /**\n * Disables overlap between `contentHeader` and `content` slots.\n * @deprecated Replaced by the `disableOverlap` property of the [content layout](/components/content-layout/) component.\n * @visualrefresh\n */\n disableContentHeaderOverlap?: boolean;\n\n /**\n * Main content.\n */\n content?: React.ReactNode;\n\n /**\n * Tools drawer.\n */\n tools?: React.ReactNode;\n\n /**\n * Displayed on top of the main content in the scrollable area.\n *\n * Conceived to contain notifications (flash messages).\n */\n notifications?: React.ReactNode;\n\n /**\n * Use this slot to add the [breadcrumb group component](/components/breadcrumb-group/) to the app layout.\n */\n breadcrumbs?: React.ReactNode;\n\n /**\n * Fired when the navigation drawer is toggled.\n */\n onNavigationChange?: NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;\n\n /**\n * Fired when the tools drawer is toggled.\n */\n onToolsChange?: NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;\n /**\n * Use this slot to add the [split panel component](/components/split-panel/) to the app layout.\n */\n splitPanel?: React.ReactNode;\n\n /**\n * The size of the split panel in pixels.\n */\n splitPanelSize?: number;\n\n /**\n * State of the split panel.\n */\n splitPanelOpen?: boolean;\n /**\n * Controls the split panel preferences.\n *\n * By default, the preference is `{ position: 'bottom' }`\n */\n splitPanelPreferences?: AppLayoutProps.SplitPanelPreferences;\n /**\n * Fired when the split panel is resized.\n */\n onSplitPanelResize?: NonCancelableEventHandler<AppLayoutProps.SplitPanelResizeDetail>;\n /**\n * Fired when the split panel is toggled.\n */\n onSplitPanelToggle?: NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;\n /**\n * Fired when the split panel preferences change.\n */\n onSplitPanelPreferencesChange?: NonCancelableEventHandler<AppLayoutProps.SplitPanelPreferences>;\n}\n\nexport namespace AppLayoutProps {\n export type ContentType = 'default' | 'form' | 'table' | 'cards' | 'wizard' | 'dashboard';\n\n export interface Ref {\n /**\n * Manually closes the navigation drawer if it is necessary for the current\n * viewport size.\n */\n closeNavigationIfNecessary(): void;\n\n /**\n * Opens the tools panel if it is not already open. Note that it is preferable\n * to control the state by listening to `toolsChange` and providing `toolsOpen`.\n */\n openTools(): void;\n\n /**\n * Focuses the tools panel if it is open. Use this to focus the tools panel\n * after changing the content, for example when clicking on an 'info' link while\n * the panel is already open.\n */\n focusToolsClose(): void;\n }\n\n export interface Labels {\n notifications?: string;\n\n navigation?: string;\n navigationToggle?: string;\n navigationClose?: string;\n\n tools?: string;\n toolsToggle?: string;\n toolsClose?: string;\n }\n\n export interface ChangeDetail {\n open: boolean;\n }\n\n export interface SplitPanelResizeDetail {\n size: number;\n }\n\n export interface SplitPanelPreferences {\n position: 'side' | 'bottom';\n }\n // Duplicated the positions because using this definition in SplitPanelPreferences would display\n // 'AppLayoutProps.SplitPanelPosition' on the API docs instead of the string values.\n export type SplitPanelPosition = 'side' | 'bottom';\n}\n"]}
|