@cloudscape-design/components-themeable 3.0.177 → 3.0.178
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/constants.scss +6 -0
- package/lib/internal/scss/app-layout/content-wrapper/styles.scss +11 -0
- package/lib/internal/scss/app-layout/visual-refresh/layout.scss +20 -23
- package/lib/internal/template/app-layout/content-wrapper/index.d.ts +2 -0
- package/lib/internal/template/app-layout/content-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/content-wrapper/index.js +2 -2
- package/lib/internal/template/app-layout/content-wrapper/index.js.map +1 -1
- package/lib/internal/template/app-layout/content-wrapper/styles.css.js +3 -2
- package/lib/internal/template/app-layout/content-wrapper/styles.scoped.css +26 -2
- package/lib/internal/template/app-layout/content-wrapper/styles.selectors.js +3 -2
- package/lib/internal/template/app-layout/defaults.d.ts.map +1 -1
- package/lib/internal/template/app-layout/defaults.js +1 -0
- package/lib/internal/template/app-layout/defaults.js.map +1 -1
- package/lib/internal/template/app-layout/drawer.d.ts +0 -1
- package/lib/internal/template/app-layout/drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/drawer.js.map +1 -1
- package/lib/internal/template/app-layout/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/index.js +24 -17
- package/lib/internal/template/app-layout/index.js.map +1 -1
- package/lib/internal/template/app-layout/interfaces.d.ts +1 -1
- package/lib/internal/template/app-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/tools-and-split-panel.d.ts.map +1 -1
- package/lib/internal/template/app-layout/tools-and-split-panel.js +1 -1
- package/lib/internal/template/app-layout/tools-and-split-panel.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/context.d.ts +4 -0
- package/lib/internal/template/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/context.js +13 -8
- package/lib/internal/template/app-layout/visual-refresh/context.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/layout.js +8 -8
- package/lib/internal/template/app-layout/visual-refresh/layout.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/main.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh/main.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/split-panel.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/split-panel.js +3 -5
- package/lib/internal/template/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +60 -60
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +164 -160
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/lib/internal/template/app-layout/visual-refresh/tools.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/tools.js +5 -7
- package/lib/internal/template/app-layout/visual-refresh/tools.js.map +1 -1
- package/lib/internal/template/internal/context/split-panel-context.d.ts +5 -2
- package/lib/internal/template/internal/context/split-panel-context.d.ts.map +1 -1
- package/lib/internal/template/internal/context/split-panel-context.js.map +1 -1
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/split-panel/index.d.ts +1 -1
- package/lib/internal/template/split-panel/index.d.ts.map +1 -1
- package/lib/internal/template/split-panel/index.js +11 -8
- package/lib/internal/template/split-panel/index.js.map +1 -1
- package/lib/internal/template/split-panel/interfaces.d.ts +4 -0
- package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/split-panel/interfaces.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,18 +16,18 @@ import customCssProps from '../../internal/generated/custom-css-properties';
|
|
|
16
16
|
export default function Layout(_a) {
|
|
17
17
|
var _b, _c, _d, _e, _f, _g;
|
|
18
18
|
var children = _a.children;
|
|
19
|
-
var _h = useAppLayoutInternals(), contentHeader = _h.contentHeader, contentType = _h.contentType, disableBodyScroll = _h.disableBodyScroll, disableContentHeaderOverlap = _h.disableContentHeaderOverlap, dynamicOverlapHeight = _h.dynamicOverlapHeight, footerHeight = _h.footerHeight, hasNotificationsContent = _h.hasNotificationsContent, headerHeight = _h.headerHeight, isNavigationOpen = _h.isNavigationOpen, isSplitPanelOpen = _h.isSplitPanelOpen, isToolsOpen = _h.isToolsOpen, layoutElement = _h.layoutElement, layoutWidth = _h.layoutWidth, mainOffsetLeft = _h.mainOffsetLeft, maxContentWidth = _h.maxContentWidth, minContentWidth = _h.minContentWidth, navigationHide = _h.navigationHide, notificationsHeight = _h.notificationsHeight,
|
|
19
|
+
var _h = useAppLayoutInternals(), contentHeader = _h.contentHeader, contentType = _h.contentType, disableBodyScroll = _h.disableBodyScroll, disableContentHeaderOverlap = _h.disableContentHeaderOverlap, dynamicOverlapHeight = _h.dynamicOverlapHeight, footerHeight = _h.footerHeight, hasNotificationsContent = _h.hasNotificationsContent, headerHeight = _h.headerHeight, isNavigationOpen = _h.isNavigationOpen, isSplitPanelOpen = _h.isSplitPanelOpen, isToolsOpen = _h.isToolsOpen, layoutElement = _h.layoutElement, layoutWidth = _h.layoutWidth, mainOffsetLeft = _h.mainOffsetLeft, maxContentWidth = _h.maxContentWidth, minContentWidth = _h.minContentWidth, navigationHide = _h.navigationHide, notificationsHeight = _h.notificationsHeight, splitPanelPosition = _h.splitPanelPosition, stickyNotifications = _h.stickyNotifications, splitPanelDisplayed = _h.splitPanelDisplayed, toolsHide = _h.toolsHide;
|
|
20
20
|
var isOverlapDisabled = getOverlapDisabled(dynamicOverlapHeight, contentHeader, disableContentHeaderOverlap);
|
|
21
21
|
// Content gaps on the left and right are used with the minmax function in the CSS grid column definition
|
|
22
22
|
var hasContentGapLeft = getContentGapLeft(isNavigationOpen, navigationHide);
|
|
23
|
-
var hasContentGapRight = getContentGapRight(splitPanelPosition, isSplitPanelOpen, isToolsOpen,
|
|
23
|
+
var hasContentGapRight = getContentGapRight(splitPanelPosition, isSplitPanelOpen, isToolsOpen, splitPanelDisplayed, toolsHide);
|
|
24
24
|
return (React.createElement("main", { className: clsx(styles.layout, styles["content-type-".concat(contentType)], styles["split-panel-position-".concat(splitPanelPosition !== null && splitPanelPosition !== void 0 ? splitPanelPosition : 'bottom')], (_b = {},
|
|
25
25
|
_b[styles['disable-body-scroll']] = disableBodyScroll,
|
|
26
26
|
_b[testutilStyles['disable-body-scroll-root']] = disableBodyScroll,
|
|
27
27
|
_b[styles['has-content-gap-left']] = hasContentGapLeft,
|
|
28
28
|
_b[styles['has-content-gap-right']] = hasContentGapRight,
|
|
29
29
|
_b[styles['has-max-content-width']] = maxContentWidth && maxContentWidth > 0,
|
|
30
|
-
_b[styles['has-split-panel']] =
|
|
30
|
+
_b[styles['has-split-panel']] = splitPanelDisplayed,
|
|
31
31
|
_b[styles['has-sticky-notifications']] = stickyNotifications && hasNotificationsContent,
|
|
32
32
|
_b[styles['is-overlap-disabled']] = isOverlapDisabled,
|
|
33
33
|
_b), testutilStyles.root), ref: layoutElement, style: __assign(__assign(__assign(__assign((_c = {}, _c[customCssProps.headerHeight] = "".concat(headerHeight, "px"), _c[customCssProps.footerHeight] = "".concat(footerHeight, "px"), _c[customCssProps.layoutWidth] = "".concat(layoutWidth, "px"), _c[customCssProps.mainOffsetLeft] = "".concat(mainOffsetLeft, "px"), _c), (maxContentWidth && (_d = {}, _d[customCssProps.maxContentWidth] = "".concat(maxContentWidth, "px"), _d))), (minContentWidth && (_e = {}, _e[customCssProps.minContentWidth] = "".concat(minContentWidth, "px"), _e))), (_f = {}, _f[customCssProps.notificationsHeight] = "".concat(notificationsHeight, "px"), _f)), (!isOverlapDisabled &&
|
|
@@ -41,22 +41,22 @@ export default function Layout(_a) {
|
|
|
41
41
|
* determine the necessity of utilizing the content gap left property to create
|
|
42
42
|
* horizontal space between the center column and its adjacent siblings.
|
|
43
43
|
*/
|
|
44
|
-
function getContentGapRight(splitPanelPosition, isSplitPanelOpen, isToolsOpen,
|
|
44
|
+
function getContentGapRight(splitPanelPosition, isSplitPanelOpen, isToolsOpen, splitPanelDisplayed, toolsHide) {
|
|
45
45
|
var hasContentGapRight = false;
|
|
46
46
|
// Main is touching the edge of the Layout and needs a content gap
|
|
47
|
-
if (!
|
|
47
|
+
if (!splitPanelDisplayed && toolsHide) {
|
|
48
48
|
hasContentGapRight = true;
|
|
49
49
|
}
|
|
50
50
|
// Main is touching the Tools drawer and needs a content gap
|
|
51
|
-
if ((!
|
|
51
|
+
if ((!splitPanelDisplayed || !isSplitPanelOpen) && !toolsHide && isToolsOpen) {
|
|
52
52
|
hasContentGapRight = true;
|
|
53
53
|
}
|
|
54
54
|
// Main is touching the edge of the Layout and needs a content gap
|
|
55
|
-
if (
|
|
55
|
+
if (splitPanelDisplayed && splitPanelPosition === 'bottom' && (isToolsOpen || toolsHide)) {
|
|
56
56
|
hasContentGapRight = true;
|
|
57
57
|
}
|
|
58
58
|
// Main is touching the Split Panel drawer and needs a content gap
|
|
59
|
-
if (
|
|
59
|
+
if (splitPanelDisplayed && isSplitPanelOpen && splitPanelPosition === 'side') {
|
|
60
60
|
hasContentGapRight = true;
|
|
61
61
|
}
|
|
62
62
|
return hasContentGapRight;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/layout.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAM5E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAyB;;QAAvB,QAAQ,cAAA;IACjC,IAAA,KAuBF,qBAAqB,EAAE,EAtBzB,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,iBAAiB,uBAAA,EACjB,2BAA2B,iCAAA,EAC3B,oBAAoB,0BAAA,EACpB,YAAY,kBAAA,EACZ,uBAAuB,6BAAA,EACvB,YAAY,kBAAA,EACZ,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,eAAe,qBAAA,EACf,cAAc,oBAAA,EACd,mBAAmB,yBAAA,EACnB,
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/layout.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAM5E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAyB;;QAAvB,QAAQ,cAAA;IACjC,IAAA,KAuBF,qBAAqB,EAAE,EAtBzB,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,iBAAiB,uBAAA,EACjB,2BAA2B,iCAAA,EAC3B,oBAAoB,0BAAA,EACpB,YAAY,kBAAA,EACZ,uBAAuB,6BAAA,EACvB,YAAY,kBAAA,EACZ,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,eAAe,qBAAA,EACf,cAAc,oBAAA,EACd,mBAAmB,yBAAA,EACnB,kBAAkB,wBAAA,EAClB,mBAAmB,yBAAA,EACnB,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CAAC,CAAC,CAAC,KAAK,CAAC;AAC3D,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,kBAAkB,CACzB,oBAA4B,EAC5B,aAA+B,EAC/B,2BAAqC;IAErC,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAE9B,IAAI,2BAA2B,EAAE;QAC/B,iBAAiB,GAAG,IAAI,CAAC;KAC1B;SAAM,IAAI,CAAC,aAAa,IAAI,oBAAoB,IAAI,CAAC,EAAE;QACtD,iBAAiB,GAAG,IAAI,CAAC;KAC1B;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport { useAppLayoutInternals } from './context';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport { AppLayoutProps } from '../interfaces';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\ninterface LayoutProps {\n children: React.ReactNode;\n}\n\n/**\n * The layoutElement ref will be used by the resize observers to calculate the offset from\n * the top and bottom of the viewport based on the header and footer elements. This is to\n * ensure the Layout component minimum height will fill 100% of the viewport less those\n * cumulative heights.\n */\nexport default function Layout({ children }: LayoutProps) {\n const {\n contentHeader,\n contentType,\n disableBodyScroll,\n disableContentHeaderOverlap,\n dynamicOverlapHeight,\n footerHeight,\n hasNotificationsContent,\n headerHeight,\n isNavigationOpen,\n isSplitPanelOpen,\n isToolsOpen,\n layoutElement,\n layoutWidth,\n mainOffsetLeft,\n maxContentWidth,\n minContentWidth,\n navigationHide,\n notificationsHeight,\n splitPanelPosition,\n stickyNotifications,\n splitPanelDisplayed,\n toolsHide,\n } = useAppLayoutInternals();\n\n const isOverlapDisabled = getOverlapDisabled(dynamicOverlapHeight, contentHeader, disableContentHeaderOverlap);\n\n // Content gaps on the left and right are used with the minmax function in the CSS grid column definition\n const hasContentGapLeft = getContentGapLeft(isNavigationOpen, navigationHide);\n const hasContentGapRight = getContentGapRight(\n splitPanelPosition,\n isSplitPanelOpen,\n isToolsOpen,\n splitPanelDisplayed,\n toolsHide\n );\n\n return (\n <main\n className={clsx(\n styles.layout,\n styles[`content-type-${contentType}`],\n styles[`split-panel-position-${splitPanelPosition ?? 'bottom'}`],\n {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles['has-content-gap-left']]: hasContentGapLeft,\n [styles['has-content-gap-right']]: hasContentGapRight,\n [styles['has-max-content-width']]: maxContentWidth && maxContentWidth > 0,\n [styles['has-split-panel']]: splitPanelDisplayed,\n [styles['has-sticky-notifications']]: stickyNotifications && hasNotificationsContent,\n [styles['is-overlap-disabled']]: isOverlapDisabled,\n },\n testutilStyles.root\n )}\n ref={layoutElement}\n style={{\n [customCssProps.headerHeight]: `${headerHeight}px`,\n [customCssProps.footerHeight]: `${footerHeight}px`,\n [customCssProps.layoutWidth]: `${layoutWidth}px`,\n [customCssProps.mainOffsetLeft]: `${mainOffsetLeft}px`,\n ...(maxContentWidth && { [customCssProps.maxContentWidth]: `${maxContentWidth}px` }),\n ...(minContentWidth && { [customCssProps.minContentWidth]: `${minContentWidth}px` }),\n [customCssProps.notificationsHeight]: `${notificationsHeight}px`,\n ...(!isOverlapDisabled &&\n dynamicOverlapHeight > 0 && { [customCssProps.overlapHeight]: `${dynamicOverlapHeight}px` }),\n }}\n >\n {children}\n </main>\n );\n}\n\n/**\n * When the Navigation and Tools are present the grid definition has the center column\n * touch the first and last columns with no gap. The forms with the circular buttons\n * for Navigation and Tools have internal padding which creates the necessary\n * horizontal space when the drawers are closed. The remaining conditions below\n * determine the necessity of utilizing the content gap left property to create\n * horizontal space between the center column and its adjacent siblings.\n */\nfunction getContentGapRight(\n splitPanelPosition: AppLayoutProps.SplitPanelPosition,\n isSplitPanelOpen: boolean | undefined,\n isToolsOpen: boolean,\n splitPanelDisplayed: boolean,\n toolsHide?: boolean\n) {\n let hasContentGapRight = false;\n\n // Main is touching the edge of the Layout and needs a content gap\n if (!splitPanelDisplayed && toolsHide) {\n hasContentGapRight = true;\n }\n\n // Main is touching the Tools drawer and needs a content gap\n if ((!splitPanelDisplayed || !isSplitPanelOpen) && !toolsHide && isToolsOpen) {\n hasContentGapRight = true;\n }\n\n // Main is touching the edge of the Layout and needs a content gap\n if (splitPanelDisplayed && splitPanelPosition === 'bottom' && (isToolsOpen || toolsHide)) {\n hasContentGapRight = true;\n }\n\n // Main is touching the Split Panel drawer and needs a content gap\n if (splitPanelDisplayed && isSplitPanelOpen && splitPanelPosition === 'side') {\n hasContentGapRight = true;\n }\n\n return hasContentGapRight;\n}\n\n/**\n * Additional function to determine whether or not a content gap is needed\n * on the left (see the getContentGapRight function). The same render logic applies\n * regarding the center column touching an adjacent sibling but the only\n * component state that needs to be tracked is the Navigation.\n */\nfunction getContentGapLeft(isNavigationOpen: boolean, navigationHide?: boolean) {\n return isNavigationOpen || navigationHide ? true : false;\n}\n\n/**\n * Determine whether the overlap between the contentHeader and content slots should be disabled.\n * The disableContentHeaderOverlap property is absolute and will always disable the overlap\n * if it is set to true. If there is no contentHeader then the overlap should be disabled\n * unless there is a dynamicOverlapHeight. The dynamicOverlapHeight property is set by a\n * component in the content slot that needs to manually control the overlap height. Components\n * such as the Table (full page variant), Wizard, ContentLayout use this property and will\n * retain the overlap even if there is nothing rendered in the contentHeader slot.\n */\nfunction getOverlapDisabled(\n dynamicOverlapHeight: number,\n contentHeader?: React.ReactNode,\n disableContentHeaderOverlap?: boolean\n) {\n let isOverlapDisabled = false;\n\n if (disableContentHeaderOverlap) {\n isOverlapDisabled = true;\n } else if (!contentHeader && dynamicOverlapHeight <= 0) {\n isOverlapDisabled = true;\n }\n\n return isOverlapDisabled;\n}\n"]}
|
|
@@ -8,7 +8,7 @@ import styles from './styles.css.js';
|
|
|
8
8
|
import testutilStyles from '../test-classes/styles.css.js';
|
|
9
9
|
export default function Main() {
|
|
10
10
|
var _a, _b;
|
|
11
|
-
var _c = useAppLayoutInternals(), breadcrumbs = _c.breadcrumbs, content = _c.content, contentHeader = _c.contentHeader, contentType = _c.contentType, disableContentPaddings = _c.disableContentPaddings, dynamicOverlapHeight = _c.dynamicOverlapHeight, hasNotificationsContent = _c.hasNotificationsContent, isNavigationOpen = _c.isNavigationOpen, isSplitPanelOpen = _c.isSplitPanelOpen, isToolsOpen = _c.isToolsOpen, isMobile = _c.isMobile, isAnyPanelOpen = _c.isAnyPanelOpen, mainElement = _c.mainElement,
|
|
11
|
+
var _c = useAppLayoutInternals(), breadcrumbs = _c.breadcrumbs, content = _c.content, contentHeader = _c.contentHeader, contentType = _c.contentType, disableContentPaddings = _c.disableContentPaddings, dynamicOverlapHeight = _c.dynamicOverlapHeight, hasNotificationsContent = _c.hasNotificationsContent, isNavigationOpen = _c.isNavigationOpen, isSplitPanelOpen = _c.isSplitPanelOpen, isToolsOpen = _c.isToolsOpen, isMobile = _c.isMobile, isAnyPanelOpen = _c.isAnyPanelOpen, mainElement = _c.mainElement, splitPanelDisplayed = _c.splitPanelDisplayed, offsetBottom = _c.offsetBottom, footerHeight = _c.footerHeight, splitPanelPosition = _c.splitPanelPosition;
|
|
12
12
|
var isUnfocusable = isMobile && isAnyPanelOpen;
|
|
13
13
|
var splitPanelHeight = offsetBottom - footerHeight;
|
|
14
14
|
return (React.createElement("div", { className: clsx(styles.container, styles["content-type-".concat(contentType)], styles["split-panel-position-".concat(splitPanelPosition !== null && splitPanelPosition !== void 0 ? splitPanelPosition : 'bottom')], (_a = {},
|
|
@@ -17,7 +17,7 @@ export default function Main() {
|
|
|
17
17
|
_a[styles['has-dynamic-overlap-height']] = dynamicOverlapHeight > 0,
|
|
18
18
|
_a[styles['has-header']] = contentHeader,
|
|
19
19
|
_a[styles['has-notifications-content']] = hasNotificationsContent,
|
|
20
|
-
_a[styles['has-split-panel']] =
|
|
20
|
+
_a[styles['has-split-panel']] = splitPanelDisplayed,
|
|
21
21
|
_a[styles['is-navigation-open']] = isNavigationOpen,
|
|
22
22
|
_a[styles['is-tools-open']] = isToolsOpen,
|
|
23
23
|
_a[styles['is-split-panel-open']] = isSplitPanelOpen,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/main.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,IAAI;;IACpB,IAAA,KAkBF,qBAAqB,EAAE,EAjBzB,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,sBAAsB,4BAAA,EACtB,oBAAoB,0BAAA,EACpB,uBAAuB,6BAAA,EACvB,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,WAAW,iBAAA,EACX,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,WAAW,iBAAA,EACX,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/main.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,IAAI;;IACpB,IAAA,KAkBF,qBAAqB,EAAE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ACH,GAAC,cAAc,CAAC,gBAAgB,IAAG,UAAG,gBAAgB,OAAI;mBAG3D,OAAO,CACJ,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport { useAppLayoutInternals } from './context';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\nexport default function Main() {\n const {\n breadcrumbs,\n content,\n contentHeader,\n contentType,\n disableContentPaddings,\n dynamicOverlapHeight,\n hasNotificationsContent,\n isNavigationOpen,\n isSplitPanelOpen,\n isToolsOpen,\n isMobile,\n isAnyPanelOpen,\n mainElement,\n splitPanelDisplayed,\n offsetBottom,\n footerHeight,\n splitPanelPosition,\n } = useAppLayoutInternals();\n\n const isUnfocusable = isMobile && isAnyPanelOpen;\n const splitPanelHeight = offsetBottom - footerHeight;\n\n return (\n <div\n className={clsx(\n styles.container,\n styles[`content-type-${contentType}`],\n styles[`split-panel-position-${splitPanelPosition ?? 'bottom'}`],\n {\n [styles['disable-content-paddings']]: disableContentPaddings,\n [styles['has-breadcrumbs']]: breadcrumbs,\n [styles['has-dynamic-overlap-height']]: dynamicOverlapHeight > 0,\n [styles['has-header']]: contentHeader,\n [styles['has-notifications-content']]: hasNotificationsContent,\n [styles['has-split-panel']]: splitPanelDisplayed,\n [styles['is-navigation-open']]: isNavigationOpen,\n [styles['is-tools-open']]: isToolsOpen,\n [styles['is-split-panel-open']]: isSplitPanelOpen,\n [styles.unfocusable]: isUnfocusable,\n },\n testutilStyles.content\n )}\n ref={mainElement}\n style={{\n [customCssProps.splitPanelHeight]: `${splitPanelHeight}px`,\n }}\n >\n {content}\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-panel.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/split-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAK/C;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"split-panel.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/split-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAK/C;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,eAkDjE;kBAlDQ,UAAU;;;;AAoDnB;;;;;GAKG;AACH,iBAAS,gBAAgB,uBAuCxB;AAED;;;;;GAKG;AACH,iBAAS,cAAc,uBAmCtB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,0BAA0B,EAAE,OAAO,EACnC,qBAAqB,EAAE,cAAc,CAAC,qBAAqB,GAAG,SAAS,qCASxE;AAID,eAAe,UAAU,CAAC"}
|
|
@@ -14,9 +14,8 @@ import customCssProps from '../../internal/generated/custom-css-properties';
|
|
|
14
14
|
*/
|
|
15
15
|
function SplitPanel(_a) {
|
|
16
16
|
var children = _a.children;
|
|
17
|
-
var _b = useAppLayoutInternals(), handleSplitPanelClick = _b.handleSplitPanelClick, handleSplitPanelPreferencesChange = _b.handleSplitPanelPreferencesChange, handleSplitPanelResize = _b.handleSplitPanelResize, isMobile = _b.isMobile, isSplitPanelForcedPosition = _b.isSplitPanelForcedPosition, isSplitPanelOpen = _b.isSplitPanelOpen, setSplitPanelReportedSize = _b.setSplitPanelReportedSize, setSplitPanelReportedHeaderHeight = _b.setSplitPanelReportedHeaderHeight, splitPanelPosition = _b.splitPanelPosition, splitPanelSize = _b.splitPanelSize, headerHeight = _b.headerHeight, footerHeight = _b.footerHeight;
|
|
18
|
-
var _c = useState(
|
|
19
|
-
var _d = useState(), splitPanelLastInteraction = _d[0], setSplitPanelLastInteraction = _d[1];
|
|
17
|
+
var _b = useAppLayoutInternals(), handleSplitPanelClick = _b.handleSplitPanelClick, handleSplitPanelPreferencesChange = _b.handleSplitPanelPreferencesChange, handleSplitPanelResize = _b.handleSplitPanelResize, isMobile = _b.isMobile, isSplitPanelForcedPosition = _b.isSplitPanelForcedPosition, isSplitPanelOpen = _b.isSplitPanelOpen, setSplitPanelReportedSize = _b.setSplitPanelReportedSize, setSplitPanelReportedHeaderHeight = _b.setSplitPanelReportedHeaderHeight, splitPanelPosition = _b.splitPanelPosition, splitPanelSize = _b.splitPanelSize, setSplitPanelToggle = _b.setSplitPanelToggle, headerHeight = _b.headerHeight, footerHeight = _b.footerHeight;
|
|
18
|
+
var _c = useState(), splitPanelLastInteraction = _c[0], setSplitPanelLastInteraction = _c[1];
|
|
20
19
|
useEffectOnUpdate(function () { return setSplitPanelLastInteraction(isSplitPanelOpen ? { type: 'open' } : { type: 'close' }); }, [isSplitPanelOpen]);
|
|
21
20
|
useEffectOnUpdate(function () { return setSplitPanelLastInteraction({ type: 'position' }); }, [splitPanelPosition]);
|
|
22
21
|
var context = {
|
|
@@ -40,8 +39,7 @@ function SplitPanel(_a) {
|
|
|
40
39
|
rightOffset: 0,
|
|
41
40
|
size: splitPanelSize || 0,
|
|
42
41
|
topOffset: 0,
|
|
43
|
-
|
|
44
|
-
setOpenButtonAriaLabel: setOpenButtonAriaLabel,
|
|
42
|
+
setSplitPanelToggle: setSplitPanelToggle,
|
|
45
43
|
lastInteraction: splitPanelLastInteraction
|
|
46
44
|
};
|
|
47
45
|
return React.createElement(SplitPanelContextProvider, { value: context }, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-panel.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/split-panel.tsx"],"names":[],"mappings":"AAAA,q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,mBAAmB;;QAAK,OAAA,CAC/B,gDACe,CAAC,gBAAgB,IAAI,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAChF,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,mBAAY,kBAAkB,CAAE,CAAC;gBAClF,GAAC,MAAM,CAAC,SAAS,IAAG,KAAK,KAAK,UAAU;gBACxC,GAAC,MAAM,CAAC,qBAAqB,CAAC,IAAG,gBAAgB;oBACjD,EACF,GAAG,EAAE,mBAAmB,EACxB,KAAK;gBACH,GAAC,cAAc,CAAC,kBAAkB,IAAG,UAAG,kBAAkB,OAAI;gBAC9D,GAAC,cAAc,CAAC,kBAAkB,IAAG,UAAG,kBAAkB,OAAI;gBAC9D,GAAC,cAAc,CAAC,4BAA4B,IAAG,UAAG,sBAAsB,OAAI;;YAG9E,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAG,kBAAkB,KAAK,MAAM,IAAI,UAAU,CAAO,CAC7F,CACX;IAhBgC,CAgBhC,CACU,CACd,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,0BAAmC,EACnC,qBAAuE;IAEvE,IAAI,kBAAkB,GAAsC,QAAQ,CAAC;IAErE,IAAI,CAAC,0BAA0B,IAAI,CAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,QAAQ,MAAK,MAAM,EAAE;QAC7E,kBAAkB,GAAG,MAAM,CAAC;KAC7B;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AACD,UAAU,CAAC,MAAM,GAAG,gBAAgB,CAAC;AACrC,UAAU,CAAC,IAAI,GAAG,cAAc,CAAC;AAEjC,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState } from 'react';\nimport clsx from 'clsx';\nimport { useAppLayoutInternals } from './context';\nimport {\n SplitPanelContextProvider,\n SplitPanelContextProps,\n SplitPanelLastInteraction,\n} from '../../internal/context/split-panel-context';\nimport styles from './styles.css.js';\nimport { AppLayoutProps } from '../interfaces';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport { Transition } from '../../internal/components/transition';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\n/**\n * If there is no Split Panel in the AppLayout context then the SplitPanel\n * will pass through the AppLayout children without the context.\n */\nfunction SplitPanel({ children }: React.PropsWithChildren<unknown>) {\n const {\n handleSplitPanelClick,\n handleSplitPanelPreferencesChange,\n handleSplitPanelResize,\n isMobile,\n isSplitPanelForcedPosition,\n isSplitPanelOpen,\n setSplitPanelReportedSize,\n setSplitPanelReportedHeaderHeight,\n splitPanelPosition,\n splitPanelSize,\n headerHeight,\n footerHeight,\n } = useAppLayoutInternals();\n\n const [openButtonAriaLabel, setOpenButtonAriaLabel] = useState<undefined | string>(undefined);\n\n const [splitPanelLastInteraction, setSplitPanelLastInteraction] = useState<undefined | SplitPanelLastInteraction>();\n useEffectOnUpdate(\n () => setSplitPanelLastInteraction(isSplitPanelOpen ? { type: 'open' } : { type: 'close' }),\n [isSplitPanelOpen]\n );\n useEffectOnUpdate(() => setSplitPanelLastInteraction({ type: 'position' }), [splitPanelPosition]);\n\n const context: SplitPanelContextProps = {\n bottomOffset: 0,\n getMaxHeight: () => {\n const availableHeight = document.documentElement.clientHeight - headerHeight - footerHeight;\n // If the page is likely zoomed in at 200%, allow the split panel to fill the content area.\n return availableHeight < 400 ? availableHeight - 40 : availableHeight - 250;\n },\n getMaxWidth: () => document.documentElement.clientWidth,\n isForcedPosition: isSplitPanelForcedPosition,\n isMobile,\n isOpen: isSplitPanelOpen,\n leftOffset: 0,\n onPreferencesChange: handleSplitPanelPreferencesChange,\n onResize: handleSplitPanelResize,\n onToggle: handleSplitPanelClick,\n position: splitPanelPosition,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n rightOffset: 0,\n size: splitPanelSize || 0,\n topOffset: 0,\n openButtonAriaLabel,\n setOpenButtonAriaLabel,\n lastInteraction: splitPanelLastInteraction,\n };\n\n return <SplitPanelContextProvider value={context}>{children}</SplitPanelContextProvider>;\n}\n\n/**\n * This is the render function for the SplitPanel when it is in bottom position.\n * The Split Panel container will be another row entry in the grid definition in\n * the Layout component. The start and finish columns will be variable based\n * on the presence and state of the Navigation and Tools components.\n */\nfunction SplitPanelBottom() {\n const {\n disableBodyScroll,\n isNavigationOpen,\n isSplitPanelOpen,\n isToolsOpen,\n splitPanel,\n splitPanelPosition,\n splitPanelReportedSize,\n splitPanelReportedHeaderHeight,\n } = useAppLayoutInternals();\n\n if (!splitPanel) {\n return null;\n }\n\n return (\n <Transition in={isSplitPanelOpen ?? false} exit={false}>\n {(state, transitionEventsRef) => (\n <section\n className={clsx(styles['split-panel-bottom'], styles[`position-${splitPanelPosition}`], {\n [styles.animating]: state === 'entering',\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles['is-navigation-open']]: isNavigationOpen,\n [styles['is-split-panel-open']]: isSplitPanelOpen,\n [styles['is-tools-open']]: isToolsOpen,\n })}\n ref={transitionEventsRef}\n style={{\n [customCssProps.splitPanelReportedSize]: `${splitPanelReportedSize}px`,\n [customCssProps.splitPanelReportedHeaderSize]: `${splitPanelReportedHeaderHeight}px`,\n }}\n >\n <SplitPanel></SplitPanel>\n {splitPanelPosition === 'bottom' && splitPanel}\n </section>\n )}\n </Transition>\n );\n}\n\n/**\n * This is the render function for the SplitPanel when it is side position.\n * The Split Panel will not be within the grid defined in the Layout component\n * but instead a direct child of the Tools component. The width constraints\n * for this position are computed in the Tools component.\n */\nfunction SplitPanelSide() {\n const {\n isSplitPanelOpen,\n splitPanel,\n splitPanelPosition,\n splitPanelMaxWidth,\n splitPanelMinWidth,\n splitPanelReportedSize,\n } = useAppLayoutInternals();\n\n if (!splitPanel) {\n return null;\n }\n\n return (\n <Transition in={isSplitPanelOpen ?? false} exit={false}>\n {(state, transitionEventsRef) => (\n <section\n aria-hidden={!isSplitPanelOpen || splitPanelPosition === 'bottom' ? true : false}\n className={clsx(styles['split-panel-side'], styles[`position-${splitPanelPosition}`], {\n [styles.animating]: state === 'entering',\n [styles['is-split-panel-open']]: isSplitPanelOpen,\n })}\n ref={transitionEventsRef}\n style={{\n [customCssProps.splitPanelMaxWidth]: `${splitPanelMaxWidth}px`,\n [customCssProps.splitPanelMinWidth]: `${splitPanelMinWidth}px`,\n [customCssProps.splitPanelReportedHeaderSize]: `${splitPanelReportedSize}px`,\n }}\n >\n <div className={clsx(styles['animated-content'])}>{splitPanelPosition === 'side' && splitPanel}</div>\n </section>\n )}\n </Transition>\n );\n}\n\n/**\n * This logic will determine what the Split Panel position should be. It reconciles the possibility\n * of being in forced position with the current selected position in the settings.\n */\nexport function getSplitPanelPosition(\n isSplitPanelForcedPosition: boolean,\n splitPanelPreferences: AppLayoutProps.SplitPanelPreferences | undefined\n) {\n let splitPanelPosition: AppLayoutProps.SplitPanelPosition = 'bottom';\n\n if (!isSplitPanelForcedPosition && splitPanelPreferences?.position === 'side') {\n splitPanelPosition = 'side';\n }\n\n return splitPanelPosition;\n}\nSplitPanel.Bottom = SplitPanelBottom;\nSplitPanel.Side = SplitPanelSide;\n\nexport default SplitPanel;\n"]}
|
|
1
|
+
{"version":3,"file":"split-panel.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/split-panel.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,yBAAyB,GAG1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAEr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E,mBAAmB,EACxB,KAAK;gBACH,GAAC,cAAc,CAAC,kBAAkB,IAAG,UAAG,kBAAkB,OAAI;gBAC9D,GAAC,cAAc,CAAC,kBAAkB,IAAG,UAAG,kBAAkB,OAAI;gBAC9D,GAAC,cAAc,CAAC,4BAA4B,IAAG,UAAG,sBAAsB,OAAI;;YAG9E,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAG,kBAAkB,KAAK,MAAM,IAAI,UAAU,CAAO,CAC7F,CACX;IAhBgC,CAgBhC,CACU,CACd,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,0BAAmC,EACnC,qBAAuE;IAEvE,IAAI,kBAAkB,GAAsC,QAAQ,CAAC;IAErE,IAAI,CAAC,0BAA0B,IAAI,CAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,QAAQ,MAAK,MAAM,EAAE;QAC7E,kBAAkB,GAAG,MAAM,CAAC;KAC7B;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AACD,UAAU,CAAC,MAAM,GAAG,gBAAgB,CAAC;AACrC,UAAU,CAAC,IAAI,GAAG,cAAc,CAAC;AAEjC,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState } from 'react';\nimport clsx from 'clsx';\nimport { useAppLayoutInternals } from './context';\nimport {\n SplitPanelContextProvider,\n SplitPanelContextProps,\n SplitPanelLastInteraction,\n} from '../../internal/context/split-panel-context';\nimport styles from './styles.css.js';\nimport { AppLayoutProps } from '../interfaces';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport { Transition } from '../../internal/components/transition';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\n/**\n * If there is no Split Panel in the AppLayout context then the SplitPanel\n * will pass through the AppLayout children without the context.\n */\nfunction SplitPanel({ children }: React.PropsWithChildren<unknown>) {\n const {\n handleSplitPanelClick,\n handleSplitPanelPreferencesChange,\n handleSplitPanelResize,\n isMobile,\n isSplitPanelForcedPosition,\n isSplitPanelOpen,\n setSplitPanelReportedSize,\n setSplitPanelReportedHeaderHeight,\n splitPanelPosition,\n splitPanelSize,\n setSplitPanelToggle,\n headerHeight,\n footerHeight,\n } = useAppLayoutInternals();\n\n const [splitPanelLastInteraction, setSplitPanelLastInteraction] = useState<undefined | SplitPanelLastInteraction>();\n useEffectOnUpdate(\n () => setSplitPanelLastInteraction(isSplitPanelOpen ? { type: 'open' } : { type: 'close' }),\n [isSplitPanelOpen]\n );\n useEffectOnUpdate(() => setSplitPanelLastInteraction({ type: 'position' }), [splitPanelPosition]);\n\n const context: SplitPanelContextProps = {\n bottomOffset: 0,\n getMaxHeight: () => {\n const availableHeight = document.documentElement.clientHeight - headerHeight - footerHeight;\n // If the page is likely zoomed in at 200%, allow the split panel to fill the content area.\n return availableHeight < 400 ? availableHeight - 40 : availableHeight - 250;\n },\n getMaxWidth: () => document.documentElement.clientWidth,\n isForcedPosition: isSplitPanelForcedPosition,\n isMobile,\n isOpen: isSplitPanelOpen,\n leftOffset: 0,\n onPreferencesChange: handleSplitPanelPreferencesChange,\n onResize: handleSplitPanelResize,\n onToggle: handleSplitPanelClick,\n position: splitPanelPosition,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n rightOffset: 0,\n size: splitPanelSize || 0,\n topOffset: 0,\n setSplitPanelToggle,\n lastInteraction: splitPanelLastInteraction,\n };\n\n return <SplitPanelContextProvider value={context}>{children}</SplitPanelContextProvider>;\n}\n\n/**\n * This is the render function for the SplitPanel when it is in bottom position.\n * The Split Panel container will be another row entry in the grid definition in\n * the Layout component. The start and finish columns will be variable based\n * on the presence and state of the Navigation and Tools components.\n */\nfunction SplitPanelBottom() {\n const {\n disableBodyScroll,\n isNavigationOpen,\n isSplitPanelOpen,\n isToolsOpen,\n splitPanel,\n splitPanelPosition,\n splitPanelReportedSize,\n splitPanelReportedHeaderHeight,\n } = useAppLayoutInternals();\n\n if (!splitPanel) {\n return null;\n }\n\n return (\n <Transition in={isSplitPanelOpen ?? false} exit={false}>\n {(state, transitionEventsRef) => (\n <section\n className={clsx(styles['split-panel-bottom'], styles[`position-${splitPanelPosition}`], {\n [styles.animating]: state === 'entering',\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles['is-navigation-open']]: isNavigationOpen,\n [styles['is-split-panel-open']]: isSplitPanelOpen,\n [styles['is-tools-open']]: isToolsOpen,\n })}\n ref={transitionEventsRef}\n style={{\n [customCssProps.splitPanelReportedSize]: `${splitPanelReportedSize}px`,\n [customCssProps.splitPanelReportedHeaderSize]: `${splitPanelReportedHeaderHeight}px`,\n }}\n >\n <SplitPanel></SplitPanel>\n {splitPanelPosition === 'bottom' && splitPanel}\n </section>\n )}\n </Transition>\n );\n}\n\n/**\n * This is the render function for the SplitPanel when it is side position.\n * The Split Panel will not be within the grid defined in the Layout component\n * but instead a direct child of the Tools component. The width constraints\n * for this position are computed in the Tools component.\n */\nfunction SplitPanelSide() {\n const {\n isSplitPanelOpen,\n splitPanel,\n splitPanelPosition,\n splitPanelMaxWidth,\n splitPanelMinWidth,\n splitPanelReportedSize,\n } = useAppLayoutInternals();\n\n if (!splitPanel) {\n return null;\n }\n\n return (\n <Transition in={isSplitPanelOpen ?? false} exit={false}>\n {(state, transitionEventsRef) => (\n <section\n aria-hidden={!isSplitPanelOpen || splitPanelPosition === 'bottom' ? true : false}\n className={clsx(styles['split-panel-side'], styles[`position-${splitPanelPosition}`], {\n [styles.animating]: state === 'entering',\n [styles['is-split-panel-open']]: isSplitPanelOpen,\n })}\n ref={transitionEventsRef}\n style={{\n [customCssProps.splitPanelMaxWidth]: `${splitPanelMaxWidth}px`,\n [customCssProps.splitPanelMinWidth]: `${splitPanelMinWidth}px`,\n [customCssProps.splitPanelReportedHeaderSize]: `${splitPanelReportedSize}px`,\n }}\n >\n <div className={clsx(styles['animated-content'])}>{splitPanelPosition === 'side' && splitPanel}</div>\n </section>\n )}\n </Transition>\n );\n}\n\n/**\n * This logic will determine what the Split Panel position should be. It reconciles the possibility\n * of being in forced position with the current selected position in the settings.\n */\nexport function getSplitPanelPosition(\n isSplitPanelForcedPosition: boolean,\n splitPanelPreferences: AppLayoutProps.SplitPanelPreferences | undefined\n) {\n let splitPanelPosition: AppLayoutProps.SplitPanelPosition = 'bottom';\n\n if (!isSplitPanelForcedPosition && splitPanelPreferences?.position === 'side') {\n splitPanelPosition = 'side';\n }\n\n return splitPanelPosition;\n}\nSplitPanel.Bottom = SplitPanelBottom;\nSplitPanel.Side = SplitPanelSide;\n\nexport default SplitPanel;\n"]}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"appbar": "
|
|
5
|
-
"appbar-nav": "awsui_appbar-
|
|
6
|
-
"breadcrumbs": "
|
|
7
|
-
"appbar-tools": "awsui_appbar-
|
|
8
|
-
"has-breadcrumbs": "awsui_has-
|
|
9
|
-
"has-notifications-content": "awsui_has-notifications-
|
|
10
|
-
"has-header": "awsui_has-
|
|
11
|
-
"has-dynamic-overlap-height": "awsui_has-dynamic-overlap-
|
|
12
|
-
"content-type-wizard": "awsui_content-type-
|
|
13
|
-
"content-type-cards": "awsui_content-type-
|
|
14
|
-
"content-type-table": "awsui_content-type-
|
|
15
|
-
"has-sticky-background": "awsui_has-sticky-
|
|
16
|
-
"background": "
|
|
17
|
-
"notifications-appbar-header": "awsui_notifications-appbar-
|
|
18
|
-
"sticky-notifications": "awsui_sticky-
|
|
19
|
-
"overlap": "
|
|
20
|
-
"content": "
|
|
21
|
-
"layout": "
|
|
22
|
-
"has-max-content-width": "awsui_has-max-content-
|
|
23
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
24
|
-
"disable-body-scroll": "awsui_disable-body-
|
|
25
|
-
"has-sticky-notifications": "awsui_has-sticky-
|
|
26
|
-
"has-split-panel": "awsui_has-split-
|
|
27
|
-
"split-panel-position-bottom": "awsui_split-panel-position-
|
|
28
|
-
"has-content-gap-left": "awsui_has-content-gap-
|
|
29
|
-
"has-content-gap-right": "awsui_has-content-gap-
|
|
30
|
-
"block-body-scroll": "awsui_block-body-
|
|
31
|
-
"container": "
|
|
32
|
-
"disable-content-paddings": "awsui_disable-content-
|
|
33
|
-
"is-navigation-open": "awsui_is-navigation-
|
|
34
|
-
"is-tools-open": "awsui_is-tools-
|
|
35
|
-
"is-split-panel-open": "awsui_is-split-panel-
|
|
36
|
-
"split-panel-position-side": "awsui_split-panel-position-
|
|
37
|
-
"content-type-default": "awsui_content-type-
|
|
38
|
-
"content-type-form": "awsui_content-type-
|
|
39
|
-
"unfocusable": "
|
|
40
|
-
"navigation-container": "awsui_navigation-
|
|
41
|
-
"show-navigation": "awsui_show-
|
|
42
|
-
"animating": "
|
|
43
|
-
"showButtons": "
|
|
44
|
-
"navigation": "
|
|
45
|
-
"openNavigation": "
|
|
46
|
-
"animated-content": "awsui_animated-
|
|
47
|
-
"hide-navigation": "awsui_hide-
|
|
48
|
-
"notifications": "
|
|
49
|
-
"split-panel-bottom": "awsui_split-panel-
|
|
50
|
-
"position-bottom": "awsui_position-
|
|
51
|
-
"openSplitPanelBottom": "
|
|
52
|
-
"split-panel-side": "awsui_split-panel-
|
|
53
|
-
"position-side": "awsui_position-
|
|
54
|
-
"openSplitPanelSide": "
|
|
55
|
-
"tools-container": "awsui_tools-
|
|
56
|
-
"tools": "
|
|
57
|
-
"openTools": "
|
|
58
|
-
"has-tools-form-persistence": "awsui_has-tools-form-
|
|
59
|
-
"hide-tools": "awsui_hide-
|
|
60
|
-
"show-tools": "awsui_show-
|
|
61
|
-
"has-tools-form": "awsui_has-tools-
|
|
62
|
-
"trigger": "
|
|
63
|
-
"selected": "
|
|
4
|
+
"appbar": "awsui_appbar_hyvsj_12mno_93",
|
|
5
|
+
"appbar-nav": "awsui_appbar-nav_hyvsj_12mno_117",
|
|
6
|
+
"breadcrumbs": "awsui_breadcrumbs_hyvsj_12mno_121",
|
|
7
|
+
"appbar-tools": "awsui_appbar-tools_hyvsj_12mno_125",
|
|
8
|
+
"has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_12mno_166",
|
|
9
|
+
"has-notifications-content": "awsui_has-notifications-content_hyvsj_12mno_173",
|
|
10
|
+
"has-header": "awsui_has-header_hyvsj_12mno_179",
|
|
11
|
+
"has-dynamic-overlap-height": "awsui_has-dynamic-overlap-height_hyvsj_12mno_179",
|
|
12
|
+
"content-type-wizard": "awsui_content-type-wizard_hyvsj_12mno_180",
|
|
13
|
+
"content-type-cards": "awsui_content-type-cards_hyvsj_12mno_183",
|
|
14
|
+
"content-type-table": "awsui_content-type-table_hyvsj_12mno_184",
|
|
15
|
+
"has-sticky-background": "awsui_has-sticky-background_hyvsj_12mno_187",
|
|
16
|
+
"background": "awsui_background_hyvsj_12mno_221",
|
|
17
|
+
"notifications-appbar-header": "awsui_notifications-appbar-header_hyvsj_12mno_224",
|
|
18
|
+
"sticky-notifications": "awsui_sticky-notifications_hyvsj_12mno_236",
|
|
19
|
+
"overlap": "awsui_overlap_hyvsj_12mno_242",
|
|
20
|
+
"content": "awsui_content_hyvsj_12mno_180",
|
|
21
|
+
"layout": "awsui_layout_hyvsj_12mno_333",
|
|
22
|
+
"has-max-content-width": "awsui_has-max-content-width_hyvsj_12mno_415",
|
|
23
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_12mno_442",
|
|
24
|
+
"disable-body-scroll": "awsui_disable-body-scroll_hyvsj_12mno_445",
|
|
25
|
+
"has-sticky-notifications": "awsui_has-sticky-notifications_hyvsj_12mno_449",
|
|
26
|
+
"has-split-panel": "awsui_has-split-panel_hyvsj_12mno_463",
|
|
27
|
+
"split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_12mno_463",
|
|
28
|
+
"has-content-gap-left": "awsui_has-content-gap-left_hyvsj_12mno_475",
|
|
29
|
+
"has-content-gap-right": "awsui_has-content-gap-right_hyvsj_12mno_478",
|
|
30
|
+
"block-body-scroll": "awsui_block-body-scroll_hyvsj_12mno_493",
|
|
31
|
+
"container": "awsui_container_hyvsj_12mno_501",
|
|
32
|
+
"disable-content-paddings": "awsui_disable-content-paddings_hyvsj_12mno_527",
|
|
33
|
+
"is-navigation-open": "awsui_is-navigation-open_hyvsj_12mno_532",
|
|
34
|
+
"is-tools-open": "awsui_is-tools-open_hyvsj_12mno_535",
|
|
35
|
+
"is-split-panel-open": "awsui_is-split-panel-open_hyvsj_12mno_535",
|
|
36
|
+
"split-panel-position-side": "awsui_split-panel-position-side_hyvsj_12mno_535",
|
|
37
|
+
"content-type-default": "awsui_content-type-default_hyvsj_12mno_555",
|
|
38
|
+
"content-type-form": "awsui_content-type-form_hyvsj_12mno_555",
|
|
39
|
+
"unfocusable": "awsui_unfocusable_hyvsj_12mno_596",
|
|
40
|
+
"navigation-container": "awsui_navigation-container_hyvsj_12mno_604",
|
|
41
|
+
"show-navigation": "awsui_show-navigation_hyvsj_12mno_639",
|
|
42
|
+
"animating": "awsui_animating_hyvsj_12mno_661",
|
|
43
|
+
"showButtons": "awsui_showButtons_hyvsj_12mno_1",
|
|
44
|
+
"navigation": "awsui_navigation_hyvsj_12mno_604",
|
|
45
|
+
"openNavigation": "awsui_openNavigation_hyvsj_12mno_1",
|
|
46
|
+
"animated-content": "awsui_animated-content_hyvsj_12mno_722",
|
|
47
|
+
"hide-navigation": "awsui_hide-navigation_hyvsj_12mno_731",
|
|
48
|
+
"notifications": "awsui_notifications_hyvsj_12mno_224",
|
|
49
|
+
"split-panel-bottom": "awsui_split-panel-bottom_hyvsj_12mno_796",
|
|
50
|
+
"position-bottom": "awsui_position-bottom_hyvsj_12mno_842",
|
|
51
|
+
"openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_12mno_1",
|
|
52
|
+
"split-panel-side": "awsui_split-panel-side_hyvsj_12mno_871",
|
|
53
|
+
"position-side": "awsui_position-side_hyvsj_12mno_899",
|
|
54
|
+
"openSplitPanelSide": "awsui_openSplitPanelSide_hyvsj_12mno_1",
|
|
55
|
+
"tools-container": "awsui_tools-container_hyvsj_12mno_936",
|
|
56
|
+
"tools": "awsui_tools_hyvsj_12mno_936",
|
|
57
|
+
"openTools": "awsui_openTools_hyvsj_12mno_1",
|
|
58
|
+
"has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_12mno_1021",
|
|
59
|
+
"hide-tools": "awsui_hide-tools_hyvsj_12mno_1031",
|
|
60
|
+
"show-tools": "awsui_show-tools_hyvsj_12mno_1043",
|
|
61
|
+
"has-tools-form": "awsui_has-tools-form_hyvsj_12mno_1021",
|
|
62
|
+
"trigger": "awsui_trigger_hyvsj_12mno_1100",
|
|
63
|
+
"selected": "awsui_selected_hyvsj_12mno_1139"
|
|
64
64
|
};
|
|
65
65
|
|