@cloudscape-design/components-themeable 3.0.176 → 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/toggles/index.js +1 -1
- package/lib/internal/template/app-layout/toggles/index.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/app-bar.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh/app-bar.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/navigation.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/navigation.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh/navigation.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 +6 -8
- 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
|
@@ -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,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EACL,yBAAyB,GAG1B,MAAM,yCAAyC,CAAC;AACjD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7B,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":"","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,4B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,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;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;;;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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"]}
|
|
@@ -31,7 +31,7 @@ export var togglesConfig = {
|
|
|
31
31
|
};
|
|
32
32
|
export var AppLayoutButton = React.forwardRef(function (_a, ref) {
|
|
33
33
|
var className = _a.className, ariaLabel = _a.ariaLabel, ariaExpanded = _a.ariaExpanded, iconName = _a.iconName, disabled = _a.disabled, onClick = _a.onClick;
|
|
34
|
-
return (React.createElement(InternalButton, { ref: ref, className: className, ariaLabel: ariaLabel, variant: "icon", formAction: "none", onClick: onClick, iconName: iconName, disabled: disabled, ariaExpanded: ariaExpanded, __nativeAttributes: { 'aria-haspopup': true } }));
|
|
34
|
+
return (React.createElement(InternalButton, { ref: ref, className: className, ariaLabel: ariaLabel, variant: "icon", formAction: "none", onClick: onClick, iconName: iconName, disabled: disabled, ariaExpanded: ariaExpanded ? undefined : false, __nativeAttributes: { 'aria-haspopup': ariaExpanded ? undefined : true } }));
|
|
35
35
|
});
|
|
36
36
|
export var CloseButton = React.forwardRef(function (_a, ref) {
|
|
37
37
|
var className = _a.className, ariaLabel = _a.ariaLabel, onClick = _a.onClick, iconName = _a.iconName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/toggles/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,IAAM,aAAa,GAAG;IAC3B,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,UAAC,MAAkC;YAAlC,uBAAA,EAAA,WAAkC;YAAK,OAAA,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AC,EAA6D,EAAE,GAA+B;QAA5F,SAAS,eAAA,EAAE,SAAS,eAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA;IACxC,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;QACrC,oBAAC,eAAe,IACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,IAAI,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GAChB,CACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { ButtonProps } from '../../button/interfaces';\nimport { IconProps } from '../../icon/interfaces';\nimport { InternalButton } from '../../button/internal';\nimport { AppLayoutProps } from '../interfaces';\nimport { AppLayoutButtonProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport const togglesConfig = {\n navigation: {\n TagName: 'nav',\n iconName: 'menu',\n getLabels: (labels: AppLayoutProps.Labels = {}) => ({\n mainLabel: labels.navigation,\n openLabel: labels.navigationToggle,\n closeLabel: labels.navigationClose,\n }),\n },\n tools: {\n TagName: 'aside',\n iconName: 'status-info',\n getLabels: (labels: AppLayoutProps.Labels = {}) => ({\n mainLabel: labels.tools,\n openLabel: labels.toolsToggle,\n closeLabel: labels.toolsClose,\n }),\n },\n} as const;\n\nexport const AppLayoutButton = React.forwardRef(\n (\n { className, ariaLabel, ariaExpanded, iconName, disabled, onClick }: AppLayoutButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n return (\n <InternalButton\n ref={ref}\n className={className}\n ariaLabel={ariaLabel}\n variant=\"icon\"\n formAction=\"none\"\n onClick={onClick}\n iconName={iconName}\n disabled={disabled}\n ariaExpanded={ariaExpanded ? undefined : false}\n __nativeAttributes={{ 'aria-haspopup': ariaExpanded ? undefined : true }}\n />\n );\n }\n);\n\ninterface CloseButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n onClick: () => void;\n iconName: IconProps.Name;\n}\n\nexport const CloseButton = React.forwardRef(\n ({ className, ariaLabel, onClick, iconName }: CloseButtonProps, ref: React.Ref<ButtonProps.Ref>) => {\n return (\n <span className={styles['close-button']}>\n <AppLayoutButton\n ref={ref}\n className={className}\n ariaExpanded={true}\n ariaLabel={ariaLabel}\n iconName={iconName}\n onClick={onClick}\n />\n </span>\n );\n }\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-and-split-panel.d.ts","sourceRoot":"","sources":["../../../src/app-layout/tools-and-split-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAU,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAI1D,UAAU,uBAAuB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAEzC,cAAc,EAAE,OAAO,CAAC;IAExB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAE1B,YAAY,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC9C,YAAY,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACjD,gBAAgB,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC1E,kBAAkB,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAE9E,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,EAAE,KAAK,C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YAAY,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACjD,gBAAgB,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC1E,kBAAkB,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAE9E,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAEzC,sBAAsB,EAAE,cAAc,CAAC,wBAAwB,CAAC,CAAC;IACjE,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IAEzB,aAAa,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAE9C,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAE7C,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACrD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,cAAc,GACf,EAAE,uBAAuB,eA8CzB"}
|
|
@@ -19,6 +19,6 @@ export function ToolsAndSplitPanel(_a) {
|
|
|
19
19
|
_b[styles.open] = toolsOpen,
|
|
20
20
|
_b)), style: __assign({}, (isMobile ? { top: headerHeight, bottom: footerHeight } : panelHeightStyle)) },
|
|
21
21
|
splitPanel,
|
|
22
|
-
!toolsHide && (React.createElement(Drawer, { type: "tools", isMobile: isMobile, width: toolsWidth, isOpen: toolsOpen, onToggle: onToolsToggle, toggleRefs: toggleRefs, onLoseFocus: onLoseToolsFocus, isHidden: isHidden,
|
|
22
|
+
!toolsHide && (React.createElement(Drawer, { type: "tools", isMobile: isMobile, width: toolsWidth, isOpen: toolsOpen, onToggle: onToolsToggle, toggleRefs: toggleRefs, onLoseFocus: onLoseToolsFocus, isHidden: isHidden, contentClassName: clsx(styles.tools, testutilStyles.tools), closeClassName: clsx(styles['tools-close'], testutilStyles['tools-close']), toggleClassName: clsx(styles['tools-toggle'], testutilStyles['tools-toggle']), topOffset: headerHeight, bottomOffset: footerHeight, ariaLabels: ariaLabels, extendRight: 0, hasDividerWithSplitPanel: splitPanelVisible }, tools))))));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=tools-and-split-panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-and-split-panel.js","sourceRoot":"","sources":["../../../src/app-layout/tools-and-split-panel.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAmC1D,MAAM,UAAU,kBAAkB,CAAC,EAiBT;;QAhBxB,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,YAAY,kBAAA,EACZ,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,gBAAgB,sBAAA,EAChB,UAAU,gBAAA,EACV,UAAU,gBAAA,EACV,gBAAgB,sBAAA,EAChB,KAAK,WAAA,EACL,SAAS,eAAA,EACT,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,cAAc,oBAAA;IAEd,IAAM,iBAAiB,GAAG,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAEhE,OAAO,CACL;QACE,6BACE,KAAK,EAAE;gBACL,KAAK,EAAE,WAAW;aACnB;YAED,6BACE,SA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GAAG,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAEhE,OAAO,CACL;QACE,6BACE,KAAK,EAAE;gBACL,KAAK,EAAE,WAAW;aACnB;YAED,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC;oBAC3C,GAAC,MAAM,CAAC,MAAM,IAAG,QAAQ;oBACzB,GAAC,MAAM,CAAC,IAAI,IAAG,SAAS;wBACxB,EACF,KAAK,eACA,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC;gBAG/E,UAAU;gBACV,CAAC,SAAS,IAAI,CACb,oBAAC,MAAM,IACL,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,gBAAgB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,EAC1D,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC,EAC1E,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC,EAC7E,SAAS,EAAE,YAAY,EACvB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,CAAC,EACd,wBAAwB,EAAE,iBAAiB,IAE1C,KAAK,CACC,CACV,CACG,CACF,CACL,CACJ,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 { DesktopDrawerProps, Drawer } from './drawer';\nimport { AppLayoutProps } from './interfaces';\nimport useContentHeight from './utils/use-content-height';\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\ninterface ToolsAndSplitPanelProps {\n toolsHide: boolean;\n toolsOpen: boolean;\n isHidden: DesktopDrawerProps['isHidden'];\n\n splitPanelOpen: boolean;\n\n drawerWidth: number;\n toolsWidth: number;\n splitPanelReportedSize: number;\n closedDrawerWidth: number;\n\n headerHeight: DesktopDrawerProps['topOffset'];\n footerHeight: DesktopDrawerProps['bottomOffset'];\n panelHeightStyle: ReturnType<typeof useContentHeight>['panelHeightStyle'];\n contentHeightStyle: ReturnType<typeof useContentHeight>['contentHeightStyle'];\n\n tools: React.ReactNode;\n splitPanel: React.ReactNode;\n\n ariaLabels: AppLayoutProps['ariaLabels'];\n\n disableContentPaddings: AppLayoutProps['disableContentPaddings'];\n isMobile: boolean;\n isMotionEnabled: boolean;\n\n onToolsToggle: DesktopDrawerProps['onToggle'];\n\n toggleRefs: DesktopDrawerProps['toggleRefs'];\n\n onLoseToolsFocus: (event: React.FocusEvent) => void;\n}\n\nexport function ToolsAndSplitPanel({\n ariaLabels,\n drawerWidth,\n footerHeight,\n headerHeight,\n isHidden,\n isMobile,\n onToolsToggle,\n panelHeightStyle,\n splitPanel,\n toggleRefs,\n onLoseToolsFocus,\n tools,\n toolsHide,\n toolsOpen,\n toolsWidth,\n splitPanelOpen,\n}: ToolsAndSplitPanelProps) {\n const splitPanelVisible = splitPanelOpen && Boolean(splitPanel);\n\n return (\n <>\n <div\n style={{\n width: drawerWidth,\n }}\n >\n <div\n className={clsx(styles['panel-wrapper-outer'], {\n [styles.mobile]: isMobile,\n [styles.open]: toolsOpen,\n })}\n style={{\n ...(isMobile ? { top: headerHeight, bottom: footerHeight } : panelHeightStyle),\n }}\n >\n {splitPanel}\n {!toolsHide && (\n <Drawer\n type=\"tools\"\n isMobile={isMobile}\n width={toolsWidth}\n isOpen={toolsOpen}\n onToggle={onToolsToggle}\n toggleRefs={toggleRefs}\n onLoseFocus={onLoseToolsFocus}\n isHidden={isHidden}\n contentClassName={clsx(styles.tools, testutilStyles.tools)}\n closeClassName={clsx(styles['tools-close'], testutilStyles['tools-close'])}\n toggleClassName={clsx(styles['tools-toggle'], testutilStyles['tools-toggle'])}\n topOffset={headerHeight}\n bottomOffset={footerHeight}\n ariaLabels={ariaLabels}\n extendRight={0}\n hasDividerWithSplitPanel={splitPanelVisible}\n >\n {tools}\n </Drawer>\n )}\n </div>\n </div>\n </>\n );\n}\n"]}
|
|
@@ -26,7 +26,7 @@ export default function AppBar() {
|
|
|
26
26
|
_a[testutilStyles['mobile-bar']] = isMobile,
|
|
27
27
|
_a), 'awsui-context-content-header') },
|
|
28
28
|
!navigationHide && isMobile && (React.createElement("nav", { className: clsx(styles['appbar-nav'], (_b = {}, _b[testutilStyles['drawer-closed']] = !isNavigationOpen, _b)), "aria-hidden": isNavigationOpen },
|
|
29
|
-
React.createElement(InternalButton, { ariaLabel: (_e = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationToggle) !== null && _e !== void 0 ? _e : undefined, ariaExpanded: isNavigationOpen, iconName: "menu", formAction: "none", onClick: function () { return handleNavigationClick(true); }, variant: "icon", className: testutilStyles['navigation-toggle'], ref: focusRefsNav.toggle, disabled: isAnyPanelOpen, __nativeAttributes: { 'aria-haspopup': true } }))),
|
|
29
|
+
React.createElement(InternalButton, { ariaLabel: (_e = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationToggle) !== null && _e !== void 0 ? _e : undefined, ariaExpanded: isNavigationOpen ? undefined : false, iconName: "menu", formAction: "none", onClick: function () { return handleNavigationClick(true); }, variant: "icon", className: testutilStyles['navigation-toggle'], ref: focusRefsNav.toggle, disabled: isAnyPanelOpen, __nativeAttributes: { 'aria-haspopup': isNavigationOpen ? undefined : true } }))),
|
|
30
30
|
breadcrumbs && (React.createElement("div", { className: clsx(styles.breadcrumbs, styles["content-type-".concat(contentType)], testutilStyles.breadcrumbs, (_c = {},
|
|
31
31
|
_c[styles['has-dynamic-overlap-height']] = dynamicOverlapHeight > 0,
|
|
32
32
|
_c[styles['has-header']] = contentHeader,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-bar.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/app-bar.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,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM;;;IACtB,IAAA,KAgBF,qBAAqB,EAAE,EAfzB,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,oBAAoB,0BAAA,EACpB,qBAAqB,2BAAA,EACrB,gBAAgB,sBAAA,EAChB,uBAAuB,6BAAA,EACvB,mBAAmB,yBAAA,EACnB,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,gBAAgB,sBAAA,EAChB,WAAW,iBAAA,EACX,SAAS,eAAA,EACT,cAAc,oBACW,CAAC;IACpB,IAAM,YAAY,GAAK,eAAe,CAAC,gBAAgB,CAAC,KAAtC,CAAuC;IACzD,IAAM,cAAc,GAAK,eAAe,CAAC,WAAW,EAAE,IAAI,CAAC,KAAvC,CAAwC;IAEpE,IAAI,cAAc,IAAI,CAAC,WAAW,IAAI,SAAS,EAAE;QAC/C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,gDACe,CAAC,QAAQ,IAAI,CAA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,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,GAC7C,CACI,CACT,CACO,CACX,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 { InternalButton } from '../../button/internal';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport { useFocusControl } from '../utils/use-focus-control';\n\n/**\n * The CSS class 'awsui-context-content-header' needs to be added to the root element so\n * that the design tokens used are overridden with the appropriate values.\n */\nexport default function AppBar() {\n const {\n ariaLabels,\n breadcrumbs,\n contentHeader,\n contentType,\n dynamicOverlapHeight,\n handleNavigationClick,\n handleToolsClick,\n hasNotificationsContent,\n hasStickyBackground,\n isMobile,\n navigationHide,\n isNavigationOpen,\n isToolsOpen,\n toolsHide,\n isAnyPanelOpen,\n } = useAppLayoutInternals();\n const { refs: focusRefsNav } = useFocusControl(isNavigationOpen);\n const { refs: focusRefsTools } = useFocusControl(isToolsOpen, true);\n\n if (navigationHide && !breadcrumbs && toolsHide) {\n return null;\n }\n\n return (\n <section\n aria-hidden={!isMobile && !breadcrumbs ? true : undefined}\n className={clsx(\n styles.appbar,\n {\n [styles['has-breadcrumbs']]: breadcrumbs,\n [styles.unfocusable]: isMobile && isAnyPanelOpen,\n [testutilStyles['mobile-bar']]: isMobile,\n },\n 'awsui-context-content-header'\n )}\n >\n {!navigationHide && isMobile && (\n <nav\n className={clsx(styles['appbar-nav'], { [testutilStyles['drawer-closed']]: !isNavigationOpen })}\n aria-hidden={isNavigationOpen}\n >\n <InternalButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={isNavigationOpen ? undefined : false}\n iconName=\"menu\"\n formAction=\"none\"\n onClick={() => handleNavigationClick(true)}\n variant=\"icon\"\n className={testutilStyles['navigation-toggle']}\n ref={focusRefsNav.toggle}\n disabled={isAnyPanelOpen}\n __nativeAttributes={{ 'aria-haspopup': isNavigationOpen ? undefined : true }}\n />\n </nav>\n )}\n\n {breadcrumbs && (\n <div\n className={clsx(styles.breadcrumbs, styles[`content-type-${contentType}`], testutilStyles.breadcrumbs, {\n [styles['has-dynamic-overlap-height']]: dynamicOverlapHeight > 0,\n [styles['has-header']]: contentHeader,\n [styles['has-notifications-content']]: hasNotificationsContent,\n [styles['has-sticky-background']]: hasStickyBackground,\n })}\n >\n {breadcrumbs}\n </div>\n )}\n\n {!toolsHide && isMobile && (\n <aside\n className={clsx(styles['appbar-tools'], { [testutilStyles['drawer-closed']]: !isToolsOpen })}\n aria-hidden={isToolsOpen}\n aria-label={ariaLabels?.tools ?? undefined}\n >\n <InternalButton\n className={testutilStyles['tools-toggle']}\n ariaExpanded={isToolsOpen}\n disabled={isAnyPanelOpen}\n ariaLabel={ariaLabels?.toolsToggle ?? undefined}\n iconName=\"status-info\"\n formAction=\"none\"\n onClick={() => handleToolsClick(true)}\n variant=\"icon\"\n ref={focusRefsTools.toggle}\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n </aside>\n )}\n </section>\n );\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AppLayoutProps } from '../interfaces';
|
|
3
3
|
import { FocusControlState } from '../utils/use-focus-control';
|
|
4
|
+
import { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';
|
|
4
5
|
interface AppLayoutInternals extends AppLayoutProps {
|
|
5
6
|
dynamicOverlapHeight: number;
|
|
6
7
|
handleSplitPanelClick: () => void;
|
|
@@ -37,6 +38,9 @@ interface AppLayoutInternals extends AppLayoutProps {
|
|
|
37
38
|
splitPanelPosition: AppLayoutProps.SplitPanelPosition;
|
|
38
39
|
splitPanelReportedSize: number;
|
|
39
40
|
splitPanelReportedHeaderHeight: number;
|
|
41
|
+
splitPanelToggle: SplitPanelSideToggleProps;
|
|
42
|
+
setSplitPanelToggle: (toggle: SplitPanelSideToggleProps) => void;
|
|
43
|
+
splitPanelDisplayed: boolean;
|
|
40
44
|
toolsFocusControl: FocusControlState;
|
|
41
45
|
}
|
|
42
46
|
interface AppLayoutProviderInternalsProps extends AppLayoutProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAW/C,OAAO,EAAE,iBAAiB,EAAmB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAW/C,OAAO,EAAE,iBAAiB,EAAmB,MAAM,4BAA4B,CAAC;AAGhF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,UAAU,kBAAmB,SAAQ,cAAc;IACjD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,iCAAiC,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,qBAAqB,KAAK,IAAI,CAAC;IAC1F,sBAAsB,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3D,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,uBAAuB,EAAE,OAAO,CAAC;IACjC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,C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ED,eAAO,MAAM,0BAA0B,4GAsctC,CAAC"}
|
|
@@ -207,7 +207,12 @@ export var AppLayoutInternalsProvider = React.forwardRef(function (_a, forwardRe
|
|
|
207
207
|
*/
|
|
208
208
|
var _t = useState(0), splitPanelReportedSize = _t[0], setSplitPanelReportedSize = _t[1];
|
|
209
209
|
var _u = useState(0), splitPanelReportedHeaderHeight = _u[0], setSplitPanelReportedHeaderHeight = _u[1];
|
|
210
|
-
var _v =
|
|
210
|
+
var _v = useState({
|
|
211
|
+
displayed: false,
|
|
212
|
+
ariaLabel: undefined
|
|
213
|
+
}), splitPanelToggle = _v[0], setSplitPanelToggle = _v[1];
|
|
214
|
+
var splitPanelDisplayed = !!(splitPanelToggle.displayed || isSplitPanelOpen);
|
|
215
|
+
var _w = useControllable(props.splitPanelSize, props.onSplitPanelResize, getSplitPanelDefaultSize(splitPanelPosition), { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' }), splitPanelSize = _w[0], setSplitPanelSize = _w[1];
|
|
211
216
|
var handleSplitPanelResize = useCallback(function handleSplitPanelChange(detail) {
|
|
212
217
|
setSplitPanelSize(detail.size);
|
|
213
218
|
fireNonCancelableEvent(props.onSplitPanelResize, detail);
|
|
@@ -231,10 +236,10 @@ export var AppLayoutInternalsProvider = React.forwardRef(function (_a, forwardRe
|
|
|
231
236
|
* This value is used to determine the max width constraint calculation
|
|
232
237
|
* for the Tools container.
|
|
233
238
|
*/
|
|
234
|
-
var
|
|
239
|
+
var _x = useContainerQuery(function (rect) { return rect.width; }), layoutContainerQuery = _x[0], layoutElement = _x[1];
|
|
235
240
|
var layoutWidth = layoutContainerQuery !== null && layoutContainerQuery !== void 0 ? layoutContainerQuery : 0;
|
|
236
241
|
var mainElement = useRef(null);
|
|
237
|
-
var
|
|
242
|
+
var _y = useState(0), mainOffsetLeft = _y[0], setMainOffsetLeft = _y[1];
|
|
238
243
|
useLayoutEffect(function handleMainOffsetLeft() {
|
|
239
244
|
var _a, _b;
|
|
240
245
|
setMainOffsetLeft((_b = (_a = mainElement === null || mainElement === void 0 ? void 0 : mainElement.current) === null || _a === void 0 ? void 0 : _a.offsetLeft) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -280,9 +285,9 @@ export var AppLayoutInternalsProvider = React.forwardRef(function (_a, forwardRe
|
|
|
280
285
|
* that it is not repeated in various components (such as AppBar) that need to
|
|
281
286
|
* know if the notifications slot is empty.
|
|
282
287
|
*/
|
|
283
|
-
var
|
|
284
|
-
var
|
|
285
|
-
var
|
|
288
|
+
var _z = useContainerQuery(function (rect) { return rect.height; }), notificationsContainerQuery = _z[0], notificationsElement = _z[1];
|
|
289
|
+
var _0 = useState(0), notificationsHeight = _0[0], setNotificationsHeight = _0[1];
|
|
290
|
+
var _1 = useState(false), hasNotificationsContent = _1[0], setHasNotificationsContent = _1[1];
|
|
286
291
|
useEffect(function handleNotificationsContent() {
|
|
287
292
|
setNotificationsHeight(notificationsContainerQuery !== null && notificationsContainerQuery !== void 0 ? notificationsContainerQuery : 0);
|
|
288
293
|
setHasNotificationsContent(notificationsContainerQuery && notificationsContainerQuery > 0 ? true : false);
|
|
@@ -293,7 +298,7 @@ export var AppLayoutInternalsProvider = React.forwardRef(function (_a, forwardRe
|
|
|
293
298
|
* position. Use the size property if it is open and the header height if it is closed.
|
|
294
299
|
*/
|
|
295
300
|
var offsetBottom = footerHeight;
|
|
296
|
-
if (
|
|
301
|
+
if (splitPanelDisplayed && splitPanelPosition === 'bottom') {
|
|
297
302
|
if (isSplitPanelOpen) {
|
|
298
303
|
offsetBottom += splitPanelReportedSize;
|
|
299
304
|
}
|
|
@@ -301,7 +306,7 @@ export var AppLayoutInternalsProvider = React.forwardRef(function (_a, forwardRe
|
|
|
301
306
|
offsetBottom += splitPanelReportedHeaderHeight;
|
|
302
307
|
}
|
|
303
308
|
}
|
|
304
|
-
return (React.createElement(AppLayoutInternalsContext.Provider, { value: __assign(__assign({}, props), { contentType: contentType, dynamicOverlapHeight: dynamicOverlapHeight, headerHeight: headerHeight, footerHeight: footerHeight, hasDefaultToolsWidth: hasDefaultToolsWidth, handleNavigationClick: handleNavigationClick, handleSplitPanelClick: handleSplitPanelClick, handleSplitPanelPreferencesChange: handleSplitPanelPreferencesChange, handleSplitPanelResize: handleSplitPanelResize, handleToolsClick: handleToolsClick, hasNotificationsContent: hasNotificationsContent, hasStickyBackground: hasStickyBackground, isAnyPanelOpen: isAnyPanelOpen, isMobile: isMobile, isNavigationOpen: isNavigationOpen !== null && isNavigationOpen !== void 0 ? isNavigationOpen : false, isSplitPanelForcedPosition: isSplitPanelForcedPosition, isSplitPanelOpen: isSplitPanelOpen, isToolsOpen: isToolsOpen, layoutElement: layoutElement, layoutWidth: layoutWidth, mainElement: mainElement, mainOffsetLeft: mainOffsetLeft, maxContentWidth: maxContentWidth, minContentWidth: minContentWidth, navigationHide: navigationHide, notificationsElement: notificationsElement, notificationsHeight: notificationsHeight, offsetBottom: offsetBottom, setDynamicOverlapHeight: setDynamicOverlapHeight, setHasStickyBackground: setHasStickyBackground, setSplitPanelReportedSize: setSplitPanelReportedSize, setSplitPanelReportedHeaderHeight: setSplitPanelReportedHeaderHeight, splitPanel: splitPanel, splitPanelMaxWidth: splitPanelMaxWidth, splitPanelMinWidth: splitPanelMinWidth, splitPanelPosition: splitPanelPosition, splitPanelPreferences: splitPanelPreferences, splitPanelReportedSize: splitPanelReportedSize, splitPanelReportedHeaderHeight: splitPanelReportedHeaderHeight, splitPanelSize: splitPanelSize, toolsHide: toolsHide, toolsOpen: isToolsOpen, toolsWidth: toolsWidth, toolsFocusControl: toolsFocusControl }) },
|
|
309
|
+
return (React.createElement(AppLayoutInternalsContext.Provider, { value: __assign(__assign({}, props), { contentType: contentType, dynamicOverlapHeight: dynamicOverlapHeight, headerHeight: headerHeight, footerHeight: footerHeight, hasDefaultToolsWidth: hasDefaultToolsWidth, handleNavigationClick: handleNavigationClick, handleSplitPanelClick: handleSplitPanelClick, handleSplitPanelPreferencesChange: handleSplitPanelPreferencesChange, handleSplitPanelResize: handleSplitPanelResize, handleToolsClick: handleToolsClick, hasNotificationsContent: hasNotificationsContent, hasStickyBackground: hasStickyBackground, isAnyPanelOpen: isAnyPanelOpen, isMobile: isMobile, isNavigationOpen: isNavigationOpen !== null && isNavigationOpen !== void 0 ? isNavigationOpen : false, isSplitPanelForcedPosition: isSplitPanelForcedPosition, isSplitPanelOpen: isSplitPanelOpen, isToolsOpen: isToolsOpen, layoutElement: layoutElement, layoutWidth: layoutWidth, mainElement: mainElement, mainOffsetLeft: mainOffsetLeft, maxContentWidth: maxContentWidth, minContentWidth: minContentWidth, navigationHide: navigationHide, notificationsElement: notificationsElement, notificationsHeight: notificationsHeight, offsetBottom: offsetBottom, setDynamicOverlapHeight: setDynamicOverlapHeight, setHasStickyBackground: setHasStickyBackground, setSplitPanelReportedSize: setSplitPanelReportedSize, setSplitPanelReportedHeaderHeight: setSplitPanelReportedHeaderHeight, splitPanel: splitPanel, splitPanelDisplayed: splitPanelDisplayed, splitPanelMaxWidth: splitPanelMaxWidth, splitPanelMinWidth: splitPanelMinWidth, splitPanelPosition: splitPanelPosition, splitPanelPreferences: splitPanelPreferences, splitPanelReportedSize: splitPanelReportedSize, splitPanelReportedHeaderHeight: splitPanelReportedHeaderHeight, splitPanelSize: splitPanelSize, splitPanelToggle: splitPanelToggle, setSplitPanelToggle: setSplitPanelToggle, toolsHide: toolsHide, toolsOpen: isToolsOpen, toolsWidth: toolsWidth, toolsFocusControl: toolsFocusControl }) },
|
|
305
310
|
React.createElement(AppLayoutContext.Provider, { value: {
|
|
306
311
|
stickyOffsetBottom: offsetBottom,
|
|
307
312
|
stickyOffsetTop: 0,
|