@cloudscape-design/components 3.0.648 → 3.0.649
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-layout/drawer/index.js +2 -2
- package/app-layout/drawer/index.js.map +1 -1
- package/app-layout/mobile-toolbar/index.js +1 -1
- package/app-layout/mobile-toolbar/index.js.map +1 -1
- package/app-layout/utils/sticky-offsets.d.ts +1 -1
- package/app-layout/utils/sticky-offsets.d.ts.map +1 -1
- package/app-layout/utils/sticky-offsets.js +2 -2
- package/app-layout/utils/sticky-offsets.js.map +1 -1
- package/app-layout/visual-refresh/background.d.ts.map +1 -1
- package/app-layout/visual-refresh/background.js +2 -5
- package/app-layout/visual-refresh/background.js.map +1 -1
- package/app-layout/visual-refresh/breadcrumbs.d.ts.map +1 -1
- package/app-layout/visual-refresh/breadcrumbs.js +1 -2
- package/app-layout/visual-refresh/breadcrumbs.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts +0 -2
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +2 -7
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.js +2 -2
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/layout.d.ts.map +1 -1
- package/app-layout/visual-refresh/layout.js +1 -3
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.js +2 -4
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/navigation.js +2 -2
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh/notifications.js +3 -1
- package/app-layout/visual-refresh/notifications.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +82 -83
- package/app-layout/visual-refresh/styles.scoped.css +168 -190
- package/app-layout/visual-refresh/styles.selectors.js +82 -83
- package/app-layout/visual-refresh/tools.js +2 -2
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +1 -1
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/app-layout/visual-refresh/use-background-overlap.d.ts +0 -6
- package/app-layout/visual-refresh/use-background-overlap.d.ts.map +1 -1
- package/app-layout/visual-refresh/use-background-overlap.js +0 -6
- package/app-layout/visual-refresh/use-background-overlap.js.map +1 -1
- package/button-dropdown/category-elements/category-element.js +1 -1
- package/button-dropdown/category-elements/category-element.js.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +7 -25
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +30 -29
- package/container/styles.scoped.css +60 -53
- package/container/styles.selectors.js +30 -29
- package/container/use-sticky-header.d.ts +3 -2
- package/container/use-sticky-header.d.ts.map +1 -1
- package/container/use-sticky-header.js +5 -3
- package/container/use-sticky-header.js.map +1 -1
- package/content-layout/internal.js +2 -2
- package/content-layout/internal.js.map +1 -1
- package/drawer/implementation.js +2 -2
- package/drawer/implementation.js.map +1 -1
- package/help-panel/implementation.js +2 -2
- package/help-panel/implementation.js.map +1 -1
- package/icon/icons.js +1 -1
- package/icon/interfaces.d.ts +1 -1
- package/icon/interfaces.d.ts.map +1 -1
- package/icon/interfaces.js.map +1 -1
- package/internal/analytics/index.d.ts +7 -1
- package/internal/analytics/index.d.ts.map +1 -1
- package/internal/analytics/index.js +10 -0
- package/internal/analytics/index.js.map +1 -1
- package/internal/analytics/interfaces.d.ts +12 -0
- package/internal/analytics/interfaces.d.ts.map +1 -1
- package/internal/analytics/interfaces.js.map +1 -1
- package/internal/base-component/index.d.ts +5 -3
- package/internal/base-component/index.d.ts.map +1 -1
- package/internal/base-component/index.js.map +1 -1
- package/internal/components/cartesian-chart/inline-start-labels.js +1 -1
- package/internal/components/cartesian-chart/inline-start-labels.js.map +1 -1
- package/internal/components/option/highlight-match.d.ts.map +1 -1
- package/internal/components/option/highlight-match.js +1 -2
- package/internal/components/option/highlight-match.js.map +1 -1
- package/internal/components/option/index.js +2 -2
- package/internal/components/option/index.js.map +1 -1
- package/internal/context/reset-contexts-for-modal.d.ts.map +1 -1
- package/internal/context/reset-contexts-for-modal.js +6 -8
- package/internal/context/reset-contexts-for-modal.js.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.d.ts +16 -2
- package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.js +51 -1
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/hooks/use-table-interaction-metrics/index.d.ts +10 -0
- package/internal/hooks/use-table-interaction-metrics/index.d.ts.map +1 -0
- package/internal/hooks/use-table-interaction-metrics/index.js +47 -0
- package/internal/hooks/use-table-interaction-metrics/index.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/popover/index.d.ts +1 -1
- package/popover/index.d.ts.map +1 -1
- package/popover/index.js +2 -2
- package/popover/index.js.map +1 -1
- package/popover/interfaces.d.ts +5 -0
- package/popover/interfaces.d.ts.map +1 -1
- package/popover/interfaces.js.map +1 -1
- package/popover/internal.js +2 -2
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +50 -49
- package/popover/styles.scoped.css +74 -66
- package/popover/styles.selectors.js +50 -49
- package/slider/internal.js +1 -1
- package/slider/internal.js.map +1 -1
- package/slider/slider-labels.js +1 -1
- package/slider/slider-labels.js.map +1 -1
- package/slider/tick-marks.js +2 -2
- package/slider/tick-marks.js.map +1 -1
- package/split-panel/side.js +3 -3
- package/split-panel/side.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +23 -17
- package/table/internal.js.map +1 -1
- package/table/selection/selection-control.js +1 -1
- package/table/selection/selection-control.js.map +1 -1
- package/table/table-role/grid-navigation.d.ts.map +1 -1
- package/table/table-role/grid-navigation.js +40 -67
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/thead.d.ts +1 -0
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +5 -2
- package/table/thead.js.map +1 -1
- package/table/tools-header.d.ts +2 -1
- package/table/tools-header.d.ts.map +1 -1
- package/table/tools-header.js +4 -4
- package/table/tools-header.js.map +1 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +19 -47
- package/tabs/tab-header-bar.js.map +1 -1
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/dismiss-button.js +1 -2
- package/token-group/dismiss-button.js.map +1 -1
- package/wizard/wizard-form-header.js +1 -1
- package/wizard/wizard-form-header.js.map +1 -1
- package/wizard/wizard-form.js +1 -1
- package/wizard/wizard-form.js.map +1 -1
- package/wizard/wizard-navigation.js +3 -3
- package/wizard/wizard-navigation.js.map +1 -1
- package/internal/context/app-layout-context.d.ts +0 -8
- package/internal/context/app-layout-context.d.ts.map +0 -1
- package/internal/context/app-layout-context.js +0 -9
- package/internal/context/app-layout-context.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawers.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE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CAC9D,EACD,QAAQ,EAAE,wBAAwB,EAClC,GAAG,EAAE,IAAI,CAAC,EAAE,KAAK,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAChF,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,EAC1C,OAAO,EAAC,MAAM,EACd,kBAAkB,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,4BAA4B,IAAI,CAAC,EAAE,EAAE,EAAE,GACnG,CACH,CAAA;aAAA,CAAC;YACD,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,CAC3B,oBAAC,YAAY,IACX,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,wBAAwB,EAC9F,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,GAC1D,CACH,CACG,CACA,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport { InternalButton } from '../../button/internal';\nimport SplitPanel from './split-panel';\nimport TriggerButton from './trigger-button';\nimport { useAppLayoutInternals } from './context';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport splitPanelTestUtilStyles from '../../split-panel/test-classes/styles.css.js';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport OverflowMenu from '../drawer/overflow-menu';\nimport { splitItems } from '../drawer/drawers-helpers';\nimport { TOOLS_DRAWER_ID } from '../utils/use-drawers';\nimport { getLimitedValue } from '../../split-panel/utils/size-utils';\n\n/**\n * The Drawers root component is mounted in the AppLayout index file. It will only\n * render if the drawers are defined, and it will take over the mounting of and\n * rendering of the Tools and SplitPanel (side position) if they exist. If drawers\n * do not exist then the Tools and SplitPanel will be handled by the Tools component.\n */\nexport default function Drawers() {\n const {\n disableBodyScroll,\n drawers,\n drawersTriggerCount,\n hasDrawerViewportOverlay,\n hasOpenDrawer,\n navigationOpen,\n navigationHide,\n isMobile,\n } = useAppLayoutInternals();\n\n const isUnfocusable = hasDrawerViewportOverlay && navigationOpen && !navigationHide;\n\n if (!drawers || drawersTriggerCount === 0) {\n return null;\n }\n\n return (\n <div\n className={clsx(styles['drawers-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles['has-open-drawer']]: hasOpenDrawer,\n [styles.unfocusable]: isUnfocusable,\n })}\n >\n <SplitPanel.Side />\n <ActiveDrawer />\n {!isMobile && <DesktopTriggers />}\n </div>\n );\n}\n\nfunction ActiveDrawer() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n handleDrawersClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n navigationOpen,\n navigationHide,\n loseDrawersFocus,\n resizeHandle,\n drawerSize,\n drawersMinWidth,\n drawersMaxWidth,\n drawerRef,\n } = useAppLayoutInternals();\n\n const activeDrawer = drawers?.find(item => item.id === activeDrawerId) ?? null;\n\n const computedAriaLabels = {\n closeButton: activeDrawerId ? activeDrawer?.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeDrawerId ? activeDrawer?.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const isHidden = !activeDrawerId;\n const isUnfocusable = isHidden || (hasDrawerViewportOverlay && navigationOpen && !navigationHide);\n const isToolsDrawer = activeDrawerId === TOOLS_DRAWER_ID;\n const toolsContent = drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content;\n\n const size = getLimitedValue(drawersMinWidth, drawerSize, drawersMaxWidth);\n\n return (\n <aside\n id={activeDrawerId ?? undefined}\n aria-hidden={isHidden}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, {\n [styles['is-drawer-open']]: activeDrawerId,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['active-drawer']]: activeDrawerId,\n [testutilStyles.tools]: isToolsDrawer,\n })}\n style={{\n ...(!isMobile && drawerSize && { [customCssProps.drawerSize]: `${size}px` }),\n }}\n ref={drawerRef}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n loseDrawersFocus();\n }\n }}\n >\n {!isMobile && activeDrawer?.resizable && <div className={styles['drawer-slider']}>{resizeHandle}</div>}\n <div className={styles['drawer-content-container']}>\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n [testutilStyles['tools-close']]: isToolsDrawer,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => {\n handleDrawersClick(activeDrawerId);\n handleToolsClick(false);\n }}\n ref={drawersRefs.close}\n variant=\"icon\"\n />\n </div>\n {toolsContent && (\n <div\n className={clsx(\n styles['drawer-content'],\n activeDrawerId !== TOOLS_DRAWER_ID && styles['drawer-content-hidden']\n )}\n >\n {toolsContent}\n </div>\n )}\n {activeDrawerId !== TOOLS_DRAWER_ID && (\n <div className={styles['drawer-content']}>{activeDrawerId && activeDrawer?.content}</div>\n )}\n </div>\n </aside>\n );\n}\n\n/**\n * The DesktopTriggers will render the trigger buttons for Tools, Drawers, and the\n * SplitPanel in non mobile viewports. Changes to the activeDrawerId need to be\n * tracked by the previousActiveDrawerId property in order to appropriately apply\n * the ref required to manage focus control.\n */\nfunction DesktopTriggers() {\n const {\n activeDrawerId,\n drawers,\n drawersAriaLabel,\n drawersOverflowAriaLabel,\n drawersOverflowWithBadgeAriaLabel,\n drawersRefs,\n drawersTriggerCount,\n handleDrawersClick,\n handleSplitPanelClick,\n hasOpenDrawer,\n isSplitPanelOpen,\n splitPanel,\n splitPanelControlId,\n splitPanelDisplayed,\n splitPanelPosition,\n splitPanelRefs,\n splitPanelToggle,\n splitPanelReportedHeaderHeight,\n splitPanelReportedSize,\n headerVariant,\n } = useAppLayoutInternals();\n\n const hasMultipleTriggers = drawersTriggerCount > 1;\n const hasSplitPanel = splitPanel && splitPanelDisplayed && splitPanelPosition === 'side';\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n const [containerHeight, triggersContainerRef] = useContainerQuery(rect => rect.contentBoxHeight);\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n const splitPanelHeight =\n isSplitPanelOpen && splitPanelPosition === 'bottom' ? splitPanelReportedSize : splitPanelReportedHeaderHeight;\n\n const getIndexOfOverflowItem = () => {\n if (containerHeight) {\n const ITEM_HEIGHT = 48;\n const overflowSpot =\n activeDrawerId && isSplitPanelOpen\n ? (containerHeight - splitPanelReportedHeaderHeight) / 1.5\n : (containerHeight - splitPanelHeight) / 1.5;\n\n const index = Math.floor(overflowSpot / ITEM_HEIGHT);\n\n let splitPanelItem = 0;\n if (hasSplitPanel && splitPanelToggle.displayed) {\n splitPanelItem = 1;\n }\n return index - splitPanelItem;\n }\n\n return 0;\n };\n\n const { visibleItems, overflowItems } = splitItems(drawers ?? undefined, getIndexOfOverflowItem(), activeDrawerId);\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n\n return (\n <aside\n className={clsx(styles['drawers-desktop-triggers-container'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n })}\n aria-label={drawersAriaLabel}\n ref={triggersContainerRef}\n role=\"region\"\n >\n <div\n className={clsx(styles['drawers-trigger-content'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n })}\n role=\"toolbar\"\n aria-orientation=\"vertical\"\n >\n {visibleItems.map(item => {\n return (\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={item.id === activeDrawerId}\n ariaControls={activeDrawerId === item.id ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => handleDrawersClick(item.id)}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n selected={item.id === activeDrawerId}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n );\n })}\n\n {overflowItems.length > 0 && (\n <OverflowMenu\n items={overflowItems}\n ariaLabel={overflowMenuHasBadge ? drawersOverflowWithBadgeAriaLabel : drawersOverflowAriaLabel}\n customTriggerBuilder={({ onClick, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => (\n <TriggerButton\n ref={triggerRef}\n ariaLabel={ariaLabel}\n ariaExpanded={ariaExpanded}\n badge={overflowMenuHasBadge}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'], testUtilsClass)}\n iconName=\"ellipsis\"\n onClick={onClick}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n onItemClick={({ detail }) => {\n handleDrawersClick(detail.id);\n }}\n />\n )}\n {hasSplitPanel && splitPanelToggle.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggle.ariaLabel}\n ariaControls={splitPanelControlId}\n ariaExpanded={!!isSplitPanelOpen}\n className={clsx(styles['drawers-trigger'], splitPanelTestUtilStyles['open-button'])}\n iconName=\"view-vertical\"\n onClick={() => handleSplitPanelClick()}\n selected={hasSplitPanel && isSplitPanelOpen}\n ref={splitPanelRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n </div>\n </aside>\n );\n}\n\n/**\n * The MobileTriggers will be mounted inside of the AppBar component and\n * only rendered when Drawers are defined in mobile viewports. The same logic\n * will in the AppBar component will suppress the rendering of the legacy\n * trigger button for the Tools drawer.\n */\nexport function MobileTriggers() {\n const {\n activeDrawerId,\n drawers,\n drawersAriaLabel,\n drawersOverflowAriaLabel,\n drawersOverflowWithBadgeAriaLabel,\n drawersRefs,\n handleDrawersClick,\n hasDrawerViewportOverlay,\n } = useAppLayoutInternals();\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n\n if (!drawers) {\n return null;\n }\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n const { visibleItems, overflowItems } = splitItems(drawers, 2, activeDrawerId);\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n\n return (\n <aside\n aria-hidden={hasDrawerViewportOverlay}\n className={clsx({\n [styles.unfocusable]: hasDrawerViewportOverlay,\n })}\n aria-label={drawersAriaLabel}\n role=\"region\"\n >\n <div className={clsx(styles['drawers-mobile-triggers-container'])} role=\"toolbar\" aria-orientation=\"horizontal\">\n {visibleItems.map(item => (\n <InternalButton\n ariaExpanded={item.id === activeDrawerId}\n ariaLabel={item.ariaLabels?.triggerButton}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n disabled={hasDrawerViewportOverlay}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n formAction=\"none\"\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n badge={item.badge}\n key={item.id}\n onClick={() => handleDrawersClick(item.id)}\n variant=\"icon\"\n __nativeAttributes={{ 'aria-haspopup': true, 'data-testid': `awsui-app-layout-trigger-${item.id}` }}\n />\n ))}\n {overflowItems.length > 0 && (\n <OverflowMenu\n items={overflowItems}\n ariaLabel={overflowMenuHasBadge ? drawersOverflowWithBadgeAriaLabel : drawersOverflowAriaLabel}\n onItemClick={({ detail }) => handleDrawersClick(detail.id)}\n />\n )}\n </div>\n </aside>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"drawers.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,wBAAwB,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,MAAM,EACJ,iBAAiB,EACjB,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,cAAc,EACd,QAAQ,GACT,GAAG,qBAAqB,EAAE,CAAC;IAE5B,MAAM,aAAa,GAAG,wBAAwB,IAAI,cAAc,IAAI,CAAC,cAAc,CAAC;IAEpF,IAAI,CAAC,OAAO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AC,CAAC,CAAC,wBAAwB,EAC9F,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,GAC1D,CACH,CACG,CACA,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport { InternalButton } from '../../button/internal';\nimport SplitPanel from './split-panel';\nimport TriggerButton from './trigger-button';\nimport { useAppLayoutInternals } from './context';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport splitPanelTestUtilStyles from '../../split-panel/test-classes/styles.css.js';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport OverflowMenu from '../drawer/overflow-menu';\nimport { splitItems } from '../drawer/drawers-helpers';\nimport { TOOLS_DRAWER_ID } from '../utils/use-drawers';\nimport { getLimitedValue } from '../../split-panel/utils/size-utils';\n\n/**\n * The Drawers root component is mounted in the AppLayout index file. It will only\n * render if the drawers are defined, and it will take over the mounting of and\n * rendering of the Tools and SplitPanel (side position) if they exist. If drawers\n * do not exist then the Tools and SplitPanel will be handled by the Tools component.\n */\nexport default function Drawers() {\n const {\n disableBodyScroll,\n drawers,\n drawersTriggerCount,\n hasDrawerViewportOverlay,\n hasOpenDrawer,\n navigationOpen,\n navigationHide,\n isMobile,\n } = useAppLayoutInternals();\n\n const isUnfocusable = hasDrawerViewportOverlay && navigationOpen && !navigationHide;\n\n if (!drawers || drawersTriggerCount === 0) {\n return null;\n }\n\n return (\n <div\n className={clsx(styles['drawers-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles['has-open-drawer']]: hasOpenDrawer,\n [styles.unfocusable]: isUnfocusable,\n })}\n >\n <SplitPanel.Side />\n <ActiveDrawer />\n {!isMobile && <DesktopTriggers />}\n </div>\n );\n}\n\nfunction ActiveDrawer() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n handleDrawersClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n navigationOpen,\n navigationHide,\n loseDrawersFocus,\n resizeHandle,\n drawerSize,\n drawersMinWidth,\n drawersMaxWidth,\n drawerRef,\n } = useAppLayoutInternals();\n\n const activeDrawer = drawers?.find(item => item.id === activeDrawerId) ?? null;\n\n const computedAriaLabels = {\n closeButton: activeDrawerId ? activeDrawer?.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeDrawerId ? activeDrawer?.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const isHidden = !activeDrawerId;\n const isUnfocusable = isHidden || (hasDrawerViewportOverlay && navigationOpen && !navigationHide);\n const isToolsDrawer = activeDrawerId === TOOLS_DRAWER_ID;\n const toolsContent = drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content;\n\n const size = getLimitedValue(drawersMinWidth, drawerSize, drawersMaxWidth);\n\n return (\n <aside\n id={activeDrawerId ?? undefined}\n aria-hidden={isHidden}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, {\n [styles['is-drawer-open']]: activeDrawerId,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['active-drawer']]: activeDrawerId,\n [testutilStyles.tools]: isToolsDrawer,\n })}\n style={{\n ...(!isMobile && drawerSize && { [customCssProps.drawerSize]: `${size}px` }),\n }}\n ref={drawerRef}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n loseDrawersFocus();\n }\n }}\n >\n {!isMobile && activeDrawer?.resizable && <div className={styles['drawer-slider']}>{resizeHandle}</div>}\n <div className={styles['drawer-content-container']}>\n <div className={styles['drawer-close-button']}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n [testutilStyles['tools-close']]: isToolsDrawer,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => {\n handleDrawersClick(activeDrawerId);\n handleToolsClick(false);\n }}\n ref={drawersRefs.close}\n variant=\"icon\"\n />\n </div>\n {toolsContent && (\n <div\n className={clsx(\n styles['drawer-content'],\n activeDrawerId !== TOOLS_DRAWER_ID && styles['drawer-content-hidden']\n )}\n >\n {toolsContent}\n </div>\n )}\n {activeDrawerId !== TOOLS_DRAWER_ID && (\n <div className={styles['drawer-content']}>{activeDrawerId && activeDrawer?.content}</div>\n )}\n </div>\n </aside>\n );\n}\n\n/**\n * The DesktopTriggers will render the trigger buttons for Tools, Drawers, and the\n * SplitPanel in non mobile viewports. Changes to the activeDrawerId need to be\n * tracked by the previousActiveDrawerId property in order to appropriately apply\n * the ref required to manage focus control.\n */\nfunction DesktopTriggers() {\n const {\n activeDrawerId,\n drawers,\n drawersAriaLabel,\n drawersOverflowAriaLabel,\n drawersOverflowWithBadgeAriaLabel,\n drawersRefs,\n drawersTriggerCount,\n handleDrawersClick,\n handleSplitPanelClick,\n hasOpenDrawer,\n isSplitPanelOpen,\n splitPanel,\n splitPanelControlId,\n splitPanelDisplayed,\n splitPanelPosition,\n splitPanelRefs,\n splitPanelToggle,\n splitPanelReportedHeaderHeight,\n splitPanelReportedSize,\n headerVariant,\n } = useAppLayoutInternals();\n\n const hasMultipleTriggers = drawersTriggerCount > 1;\n const hasSplitPanel = splitPanel && splitPanelDisplayed && splitPanelPosition === 'side';\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n const [containerHeight, triggersContainerRef] = useContainerQuery(rect => rect.contentBoxHeight);\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n const splitPanelHeight =\n isSplitPanelOpen && splitPanelPosition === 'bottom' ? splitPanelReportedSize : splitPanelReportedHeaderHeight;\n\n const getIndexOfOverflowItem = () => {\n if (containerHeight) {\n const ITEM_HEIGHT = 48;\n const overflowSpot =\n activeDrawerId && isSplitPanelOpen\n ? (containerHeight - splitPanelReportedHeaderHeight) / 1.5\n : (containerHeight - splitPanelHeight) / 1.5;\n\n const index = Math.floor(overflowSpot / ITEM_HEIGHT);\n\n let splitPanelItem = 0;\n if (hasSplitPanel && splitPanelToggle.displayed) {\n splitPanelItem = 1;\n }\n return index - splitPanelItem;\n }\n\n return 0;\n };\n\n const { visibleItems, overflowItems } = splitItems(drawers ?? undefined, getIndexOfOverflowItem(), activeDrawerId);\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n\n return (\n <aside\n className={clsx(styles['drawers-desktop-triggers-container'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n })}\n aria-label={drawersAriaLabel}\n ref={triggersContainerRef}\n role=\"region\"\n >\n <div\n className={clsx(styles['drawers-trigger-content'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n })}\n role=\"toolbar\"\n aria-orientation=\"vertical\"\n >\n {visibleItems.map(item => {\n return (\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={item.id === activeDrawerId}\n ariaControls={activeDrawerId === item.id ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => handleDrawersClick(item.id)}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n selected={item.id === activeDrawerId}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n );\n })}\n\n {overflowItems.length > 0 && (\n <OverflowMenu\n items={overflowItems}\n ariaLabel={overflowMenuHasBadge ? drawersOverflowWithBadgeAriaLabel : drawersOverflowAriaLabel}\n customTriggerBuilder={({ onClick, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => (\n <TriggerButton\n ref={triggerRef}\n ariaLabel={ariaLabel}\n ariaExpanded={ariaExpanded}\n badge={overflowMenuHasBadge}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'], testUtilsClass)}\n iconName=\"ellipsis\"\n onClick={onClick}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n onItemClick={({ detail }) => {\n handleDrawersClick(detail.id);\n }}\n />\n )}\n {hasSplitPanel && splitPanelToggle.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggle.ariaLabel}\n ariaControls={splitPanelControlId}\n ariaExpanded={!!isSplitPanelOpen}\n className={clsx(styles['drawers-trigger'], splitPanelTestUtilStyles['open-button'])}\n iconName=\"view-vertical\"\n onClick={() => handleSplitPanelClick()}\n selected={hasSplitPanel && isSplitPanelOpen}\n ref={splitPanelRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n </div>\n </aside>\n );\n}\n\n/**\n * The MobileTriggers will be mounted inside of the AppBar component and\n * only rendered when Drawers are defined in mobile viewports. The same logic\n * will in the AppBar component will suppress the rendering of the legacy\n * trigger button for the Tools drawer.\n */\nexport function MobileTriggers() {\n const {\n activeDrawerId,\n drawers,\n drawersAriaLabel,\n drawersOverflowAriaLabel,\n drawersOverflowWithBadgeAriaLabel,\n drawersRefs,\n handleDrawersClick,\n hasDrawerViewportOverlay,\n } = useAppLayoutInternals();\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n\n if (!drawers) {\n return null;\n }\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n const { visibleItems, overflowItems } = splitItems(drawers, 2, activeDrawerId);\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n\n return (\n <aside\n aria-hidden={hasDrawerViewportOverlay}\n className={clsx({\n [styles.unfocusable]: hasDrawerViewportOverlay,\n })}\n aria-label={drawersAriaLabel}\n role=\"region\"\n >\n <div className={styles['drawers-mobile-triggers-container']} role=\"toolbar\" aria-orientation=\"horizontal\">\n {visibleItems.map(item => (\n <InternalButton\n ariaExpanded={item.id === activeDrawerId}\n ariaLabel={item.ariaLabels?.triggerButton}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n disabled={hasDrawerViewportOverlay}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n formAction=\"none\"\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n badge={item.badge}\n key={item.id}\n onClick={() => handleDrawersClick(item.id)}\n variant=\"icon\"\n __nativeAttributes={{ 'aria-haspopup': true, 'data-testid': `awsui-app-layout-trigger-${item.id}` }}\n />\n ))}\n {overflowItems.length > 0 && (\n <OverflowMenu\n items={overflowItems}\n ariaLabel={overflowMenuHasBadge ? drawersOverflowWithBadgeAriaLabel : drawersOverflowAriaLabel}\n onItemClick={({ detail }) => handleDrawersClick(detail.id)}\n />\n )}\n </div>\n </aside>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,WAAW;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,WAAW;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,eAwEvD"}
|
|
@@ -13,7 +13,7 @@ import testutilStyles from '../test-classes/styles.css.js';
|
|
|
13
13
|
* cumulative heights.
|
|
14
14
|
*/
|
|
15
15
|
export default function Layout({ children }) {
|
|
16
|
-
const { breadcrumbs, contentHeader, contentType, disableBodyScroll, disableContentPaddings, drawersTriggerCount, footerHeight, hasNotificationsContent,
|
|
16
|
+
const { breadcrumbs, contentHeader, contentType, disableBodyScroll, disableContentPaddings, drawersTriggerCount, footerHeight, hasNotificationsContent, hasOpenDrawer, headerHeight, isBackgroundOverlapDisabled, isMobile, navigationOpen, layoutElement, layoutWidth, mainOffsetLeft, maxContentWidth, minContentWidth, navigationHide, notificationsHeight, __embeddedViewMode, splitPanelPosition, splitPanelDisplayed, } = useAppLayoutInternals();
|
|
17
17
|
// Determine the first content child so the gap will vertically align with the trigger buttons
|
|
18
18
|
const contentFirstChild = getContentFirstChild(breadcrumbs, contentHeader, hasNotificationsContent, isMobile);
|
|
19
19
|
// Content gaps on the left and right are used with the minmax function in the CSS grid column definition
|
|
@@ -29,8 +29,6 @@ export default function Layout({ children }) {
|
|
|
29
29
|
[styles['has-header']]: contentHeader,
|
|
30
30
|
[styles['has-max-content-width']]: maxContentWidth && maxContentWidth > 0,
|
|
31
31
|
[styles['has-split-panel']]: splitPanelDisplayed,
|
|
32
|
-
[styles['has-sticky-background']]: hasStickyBackground,
|
|
33
|
-
[styles['has-sticky-notifications']]: stickyNotifications && hasNotificationsContent,
|
|
34
32
|
[styles['is-overlap-disabled']]: isBackgroundOverlapDisabled,
|
|
35
33
|
[styles['is-hide-mobile-toolbar']]: __embeddedViewMode,
|
|
36
34
|
[styles['has-left-toggles-gutter']]: !(isMobile || navigationHide || navigationOpen),
|
|
@@ -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,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAM3D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAe;IACtD,MAAM,EACJ,WAAW,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,EACvB,
|
|
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,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAM3D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAe;IACtD,MAAM,EACJ,WAAW,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,2BAA2B,EAC3B,QAAQ,EACR,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,GAAG,qBAAqB,EAAE,CAAC;IAE5B,8FAA8F;IAC9F,MAAM,iBAAiB,GAAG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AAc,CAAC;YACpF,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC,QAAQ,IAAI,CAAC,kBAAkB;SACvE,EACD,cAAc,CAAC,IAAI,CACpB,EACD,GAAG,EAAE,aAAa,EAClB,KAAK,8CACH,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,IAAI,EAClD,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,IAAI,EAClD,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,IAAI,EAChD,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,GAAG,cAAc,IAAI,IACnD,CAAC,eAAe,IAAI,EAAE,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,GAAG,eAAe,IAAI,EAAE,CAAC,GACjF,CAAC,eAAe,IAAI,EAAE,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,GAAG,eAAe,IAAI,EAAE,CAAC,KACpF,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,GAAG,mBAAmB,IAAI,OAGjE,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC;AAED;;;;;EAKE;AACF,SAAS,oBAAoB,CAC3B,WAA4B,EAC5B,aAA8B,EAC9B,uBAAgC,EAChC,QAAiB;IAEjB,IAAI,iBAAiB,GAAG,MAAM,CAAC;IAE/B,IAAI,uBAAuB,EAAE;QAC3B,iBAAiB,GAAG,eAAe,CAAC;KACrC;SAAM,IAAI,WAAW,IAAI,CAAC,QAAQ,EAAE;QACnC,iBAAiB,GAAG,aAAa,CAAC;KACnC;SAAM,IAAI,aAAa,EAAE;QACxB,iBAAiB,GAAG,QAAQ,CAAC;KAC9B;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 customCssProps from '../../internal/generated/custom-css-properties';\nimport { useAppLayoutInternals } from './context';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\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 breadcrumbs,\n contentHeader,\n contentType,\n disableBodyScroll,\n disableContentPaddings,\n drawersTriggerCount,\n footerHeight,\n hasNotificationsContent,\n hasOpenDrawer,\n headerHeight,\n isBackgroundOverlapDisabled,\n isMobile,\n navigationOpen,\n layoutElement,\n layoutWidth,\n mainOffsetLeft,\n maxContentWidth,\n minContentWidth,\n navigationHide,\n notificationsHeight,\n __embeddedViewMode,\n splitPanelPosition,\n splitPanelDisplayed,\n } = useAppLayoutInternals();\n\n // Determine the first content child so the gap will vertically align with the trigger buttons\n const contentFirstChild = getContentFirstChild(breadcrumbs, contentHeader, hasNotificationsContent, isMobile);\n\n // Content gaps on the left and right are used with the minmax function in the CSS grid column definition\n const hasContentGapLeft = navigationOpen || navigationHide;\n const hasContentGapRight = drawersTriggerCount === 0 || hasOpenDrawer;\n\n return (\n <main\n className={clsx(\n styles.layout,\n styles[`content-first-child-${contentFirstChild}`],\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['disable-content-paddings']]: disableContentPaddings,\n [styles['has-breadcrumbs']]: breadcrumbs && !isMobile,\n [styles['has-content-gap-left']]: hasContentGapLeft,\n [styles['has-content-gap-right']]: hasContentGapRight,\n [styles['has-header']]: contentHeader,\n [styles['has-max-content-width']]: maxContentWidth && maxContentWidth > 0,\n [styles['has-split-panel']]: splitPanelDisplayed,\n [styles['is-overlap-disabled']]: isBackgroundOverlapDisabled,\n [styles['is-hide-mobile-toolbar']]: __embeddedViewMode,\n [styles['has-left-toggles-gutter']]: !(isMobile || navigationHide || navigationOpen),\n [styles['has-right-toggles-gutter']]: !isMobile && !hasContentGapRight,\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 }}\n >\n {children}\n </main>\n );\n}\n\n/*\nThe Notifications, Breadcrumbs, Header, and Main are all rendered in the center\ncolumn of the grid layout. Any of these could be the first child to render in the\ncontent area if the previous siblings do not exist. The grid gap before the first\nchild will be different to ensure vertical alignment with the trigger buttons.\n*/\nfunction getContentFirstChild(\n breadcrumbs: React.ReactNode,\n contentHeader: React.ReactNode,\n hasNotificationsContent: boolean,\n isMobile: boolean\n) {\n let contentFirstChild = 'main';\n\n if (hasNotificationsContent) {\n contentFirstChild = 'notifications';\n } else if (breadcrumbs && !isMobile) {\n contentFirstChild = 'breadcrumbs';\n } else if (contentHeader) {\n contentFirstChild = 'header';\n }\n\n return contentFirstChild;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/main.tsx"],"names":[],"mappings":";AAWA,MAAM,CAAC,OAAO,UAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/main.tsx"],"names":[],"mappings":";AAWA,MAAM,CAAC,OAAO,UAAU,IAAI,gBAuD3B"}
|
|
@@ -9,7 +9,7 @@ import styles from './styles.css.js';
|
|
|
9
9
|
import testutilStyles from '../test-classes/styles.css.js';
|
|
10
10
|
import * as tokens from '../../internal/generated/styles/tokens';
|
|
11
11
|
export default function Main() {
|
|
12
|
-
const { content, disableBodyScroll, disableContentPaddings, footerHeight, hasDrawerViewportOverlay, navigationOpen, placement,
|
|
12
|
+
const { content, disableBodyScroll, disableContentPaddings, footerHeight, hasDrawerViewportOverlay, navigationOpen, placement, isMobile, isSplitPanelOpen, isToolsOpen, mainElement, notificationsHeight, stickyNotifications, offsetBottom, splitPanelDisplayed, splitPanelPosition, activeDrawerId, } = useAppLayoutInternals();
|
|
13
13
|
const splitPanelHeight = offsetBottom - footerHeight;
|
|
14
14
|
return (React.createElement("div", { className: clsx(styles.container, styles[`split-panel-position-${splitPanelPosition !== null && splitPanelPosition !== void 0 ? splitPanelPosition : 'bottom'}`], {
|
|
15
15
|
[styles['disable-content-paddings']]: disableContentPaddings,
|
|
@@ -19,8 +19,6 @@ export default function Main() {
|
|
|
19
19
|
[styles['has-active-drawer']]: !!activeDrawerId,
|
|
20
20
|
[styles['is-split-panel-open']]: isSplitPanelOpen,
|
|
21
21
|
[styles.unfocusable]: hasDrawerViewportOverlay,
|
|
22
|
-
}, testutilStyles.content), ref: mainElement, style: Object.assign({ [customCssProps.splitPanelHeight]: `${splitPanelHeight}px` }, getStickyOffsetVars(placement.insetBlockStart, offsetBottom, stickyNotifications && notificationsHeight > 0
|
|
23
|
-
? `${tokens.spaceXs} + ${notificationsHeight}px + ${!hasBackgroundOverlap ? tokens.spaceXxxs : '0px'}`
|
|
24
|
-
: '0px', `var(${customCssProps.mobileBarHeight})`, !!disableBodyScroll, isMobile, hasBackgroundOverlap && hasStickyBackground && !isMobile ? tokens.spaceScaledS : '0px')) }, content));
|
|
22
|
+
}, testutilStyles.content), ref: mainElement, style: Object.assign({ [customCssProps.splitPanelHeight]: `${splitPanelHeight}px` }, getStickyOffsetVars(placement.insetBlockStart, offsetBottom, stickyNotifications && notificationsHeight > 0 ? `${tokens.spaceXs} + ${notificationsHeight}px` : '0px', `var(${customCssProps.mobileBarHeight})`, !!disableBodyScroll, isMobile)) }, content));
|
|
25
23
|
}
|
|
26
24
|
//# sourceMappingURL=main.js.map
|
|
@@ -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,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,wCAAwC,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,IAAI;IAC1B,MAAM,EACJ,OAAO,EACP,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,wBAAwB,EACxB,cAAc,EACd,SAAS,EACT,
|
|
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,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,wCAAwC,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,IAAI;IAC1B,MAA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AC,CAAC,iBAAiB,EACnB,QAAQ,CACT,KAGF,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 { getStickyOffsetVars } from '../utils/sticky-offsets';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport * as tokens from '../../internal/generated/styles/tokens';\n\nexport default function Main() {\n const {\n content,\n disableBodyScroll,\n disableContentPaddings,\n footerHeight,\n hasDrawerViewportOverlay,\n navigationOpen,\n placement,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n mainElement,\n notificationsHeight,\n stickyNotifications,\n offsetBottom,\n splitPanelDisplayed,\n splitPanelPosition,\n activeDrawerId,\n } = useAppLayoutInternals();\n\n const splitPanelHeight = offsetBottom - footerHeight;\n\n return (\n <div\n className={clsx(\n styles.container,\n styles[`split-panel-position-${splitPanelPosition ?? 'bottom'}`],\n {\n [styles['disable-content-paddings']]: disableContentPaddings,\n [styles['has-split-panel']]: splitPanelDisplayed,\n [styles['is-navigation-open']]: navigationOpen,\n [styles['is-tools-open']]: isToolsOpen,\n [styles['has-active-drawer']]: !!activeDrawerId,\n [styles['is-split-panel-open']]: isSplitPanelOpen,\n [styles.unfocusable]: hasDrawerViewportOverlay,\n },\n testutilStyles.content\n )}\n ref={mainElement}\n style={{\n [customCssProps.splitPanelHeight]: `${splitPanelHeight}px`,\n ...getStickyOffsetVars(\n placement.insetBlockStart,\n offsetBottom,\n stickyNotifications && notificationsHeight > 0 ? `${tokens.spaceXs} + ${notificationsHeight}px` : '0px',\n `var(${customCssProps.mobileBarHeight})`,\n !!disableBodyScroll,\n isMobile\n ),\n }}\n >\n {content}\n </div>\n );\n}\n"]}
|
|
@@ -48,8 +48,8 @@ export default function Navigation() {
|
|
|
48
48
|
}, testutilStyles.navigation), ref: state !== 'exiting' ? transitionEventsRef : undefined, "aria-hidden": !navigationOpen, onClick: event => {
|
|
49
49
|
onNavigationClick && onNavigationClick(event);
|
|
50
50
|
} },
|
|
51
|
-
React.createElement("div", { className:
|
|
52
|
-
React.createElement("div", { className:
|
|
51
|
+
React.createElement("div", { className: styles['animated-content'] },
|
|
52
|
+
React.createElement("div", { className: styles['hide-navigation'] },
|
|
53
53
|
React.createElement(InternalButton, { ariaLabel: (_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationClose) !== null && _c !== void 0 ? _c : undefined, iconName: isMobile ? 'close' : 'angle-left', onClick: () => handleNavigationClick(false), variant: "icon", formAction: "none", className: testutilStyles['navigation-close'], ref: navigationRefs.close })),
|
|
54
54
|
navigation))));
|
|
55
55
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/navigation.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,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,MAAM,EACJ,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,QAAQ,EACR,cAAc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,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,mCAAI,SAAS,EAC/C,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB;oBACE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,KAAK,UAAU;oBACxC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,cAAc;iBAC/C,EACD,cAAc,CAAC,UAAU,CAC1B,EACD,GAAG,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,iBAC7C,CAAC,cAAc,EAC5B,OAAO,EAAE,KAAK,CAAC,EAAE;oBACf,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAChD,CAAC;gBAED,6BAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;oBACxC,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;wBACvC,oBAAC,cAAc,IACb,SAAS,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,mCAAI,SAAS,EACnD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAC3C,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,GAAG,EAAE,cAAc,CAAC,KAAK,GACzB,CACE;oBACL,UAAU,CACP,CACF,CACF,CACP,CAAA;KAAA,CACU,CACd,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 TriggerButton from './trigger-button';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport { Transition } from '../../internal/components/transition';\nimport { findUpUntil } from '../../internal/utils/dom';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\n/**\n * The Navigation component consists of the following elements:\n * the container, or root element, that sits as a direct child to the Layout grid definition;\n * the show navigation form that contains the trigger for the drawer in large viewports;\n * the navigation, or drawer, that contains the hide navigation form and the children\n * passed through the API;\n */\nexport default function Navigation() {\n const {\n ariaLabels,\n disableBodyScroll,\n handleNavigationClick,\n hasDrawerViewportOverlay,\n isMobile,\n navigationOpen,\n isToolsOpen,\n navigation,\n navigationHide,\n navigationRefs,\n navigationWidth,\n toolsHide,\n headerVariant,\n } = useAppLayoutInternals();\n\n if (navigationHide) {\n return null;\n }\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\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 && isMobile) {\n handleNavigationClick(false);\n }\n };\n\n const isUnfocusable = hasDrawerViewportOverlay && (!navigationOpen || (isToolsOpen && !toolsHide));\n\n return (\n <Transition in={navigationOpen}>\n {(state, transitionEventsRef) => (\n <div\n className={clsx(styles['navigation-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['drawer-closed']]: !navigationOpen,\n })}\n style={{ [customCssProps.navigationWidth]: `${navigationWidth}px` }}\n >\n {!isMobile && (\n <nav\n aria-hidden={isMobile || navigationOpen}\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(styles['show-navigation'], {\n [styles.animating]: state === 'exiting',\n [styles['is-navigation-open']]: navigationOpen,\n })}\n ref={state === 'exiting' ? transitionEventsRef : undefined}\n >\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle}\n ariaExpanded={navigationOpen ? undefined : false}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => handleNavigationClick(true)}\n ref={navigationRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n </nav>\n )}\n\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(\n styles.navigation,\n {\n [styles.animating]: state === 'entering',\n [styles['is-navigation-open']]: navigationOpen,\n },\n testutilStyles.navigation\n )}\n ref={state !== 'exiting' ? transitionEventsRef : undefined}\n aria-hidden={!navigationOpen}\n onClick={event => {\n onNavigationClick && onNavigationClick(event);\n }}\n >\n <div className={styles['animated-content']}>\n <div className={styles['hide-navigation']}>\n <InternalButton\n ariaLabel={ariaLabels?.navigationClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-left'}\n onClick={() => handleNavigationClick(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationRefs.close}\n />\n </div>\n {navigation}\n </div>\n </nav>\n </div>\n )}\n </Transition>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/notifications.tsx"],"names":[],"mappings":";AASA,MAAM,CAAC,OAAO,UAAU,aAAa,
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/notifications.tsx"],"names":[],"mappings":";AASA,MAAM,CAAC,OAAO,UAAU,aAAa,uBAsCpC"}
|
|
@@ -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 Notifications() {
|
|
10
10
|
var _a;
|
|
11
|
-
const { ariaLabels, hasDrawerViewportOverlay, notifications, notificationsElement, stickyNotifications, headerVariant, } = useAppLayoutInternals();
|
|
11
|
+
const { ariaLabels, hasDrawerViewportOverlay, notifications, notificationsElement, stickyNotifications, headerVariant, hasNotificationsContent, } = useAppLayoutInternals();
|
|
12
12
|
if (!notifications) {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
@@ -18,8 +18,10 @@ export default function Notifications() {
|
|
|
18
18
|
*/
|
|
19
19
|
return (React.createElement("div", { role: "region", "aria-label": (_a = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.notifications) !== null && _a !== void 0 ? _a : undefined, className: clsx(styles.notifications, {
|
|
20
20
|
[styles['sticky-notifications']]: stickyNotifications,
|
|
21
|
+
[styles['has-notification-content']]: hasNotificationsContent,
|
|
21
22
|
[styles.unfocusable]: hasDrawerViewportOverlay,
|
|
22
23
|
[highContrastHeaderClassName]: headerVariant === 'high-contrast',
|
|
24
|
+
[styles['high-contrast']]: headerVariant === 'high-contrast',
|
|
23
25
|
}, testutilStyles.notifications) },
|
|
24
26
|
React.createElement("div", { ref: notificationsElement }, notifications)));
|
|
25
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/notifications.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,aAAa;;IACnC,MAAM,EACJ,UAAU,EACV,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/notifications.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,aAAa;;IACnC,MAAM,EACJ,UAAU,EACV,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,uBAAuB,GACxB,GAAG,qBAAqB,EAAE,CAAC;IAE5B,IAAI,CAAC,aAAa,EAAE;QAClB,OAAO,IAAI,CAAC;KACb;IAED;;;OAGG;IACH,OAAO,CACL,6BACE,IAAI,EAAC,QAAQ,gBACD,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,mCAAI,SAAS,EAClD,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,aAAa,EACpB;YACE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAAE,mBAAmB;YACrD,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,EAAE,uBAAuB;YAC7D,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,wBAAwB;YAC9C,CAAC,2BAA2B,CAAC,EAAE,aAAa,KAAK,eAAe;YAChE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,aAAa,KAAK,eAAe;SAC7D,EACD,cAAc,CAAC,aAAa,CAC7B;QAED,6BAAK,GAAG,EAAE,oBAAoB,IAAG,aAAa,CAAO,CACjD,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 { highContrastHeaderClassName } from '../../internal/utils/content-header-utils';\nimport { useAppLayoutInternals } from './context';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\nexport default function Notifications() {\n const {\n ariaLabels,\n hasDrawerViewportOverlay,\n notifications,\n notificationsElement,\n stickyNotifications,\n headerVariant,\n hasNotificationsContent,\n } = useAppLayoutInternals();\n\n if (!notifications) {\n return null;\n }\n\n /**\n * The notificationsElement ref is assigned to an inner div to prevent internal bottom margin\n * from affecting the calculated height, which is used for sticky elements below.\n */\n return (\n <div\n role=\"region\"\n aria-label={ariaLabels?.notifications ?? undefined}\n className={clsx(\n styles.notifications,\n {\n [styles['sticky-notifications']]: stickyNotifications,\n [styles['has-notification-content']]: hasNotificationsContent,\n [styles.unfocusable]: hasDrawerViewportOverlay,\n [highContrastHeaderClassName]: headerVariant === 'high-contrast',\n [styles['high-contrast']]: headerVariant === 'high-contrast',\n },\n testutilStyles.notifications\n )}\n >\n <div ref={notificationsElement}>{notifications}</div>\n </div>\n );\n}\n"]}
|
|
@@ -1,88 +1,87 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"background": "
|
|
5
|
-
"scrolling-background": "awsui_scrolling-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"drawers-container": "awsui_drawers-
|
|
11
|
-
"has-
|
|
12
|
-
"
|
|
13
|
-
"drawers-
|
|
14
|
-
"
|
|
15
|
-
"drawers-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"drawer": "
|
|
20
|
-
"drawer-content-
|
|
21
|
-
"drawer-
|
|
22
|
-
"drawer-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"content": "
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"content-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"content-
|
|
39
|
-
"has-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"mobile-toolbar": "awsui_mobile-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"navigation": "
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"tools
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"trigger
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"dot": "awsui_dot_hyvsj_5tvh0_1252"
|
|
4
|
+
"background": "awsui_background_hyvsj_14xql_99",
|
|
5
|
+
"scrolling-background": "awsui_scrolling-background_hyvsj_14xql_102",
|
|
6
|
+
"breadcrumbs": "awsui_breadcrumbs_hyvsj_14xql_113",
|
|
7
|
+
"drawers-container": "awsui_drawers-container_hyvsj_14xql_126",
|
|
8
|
+
"has-open-drawer": "awsui_has-open-drawer_hyvsj_14xql_137",
|
|
9
|
+
"disable-body-scroll": "awsui_disable-body-scroll_hyvsj_14xql_160",
|
|
10
|
+
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_14xql_165",
|
|
11
|
+
"has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_14xql_206",
|
|
12
|
+
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_14xql_216",
|
|
13
|
+
"drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_14xql_220",
|
|
14
|
+
"drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_14xql_234",
|
|
15
|
+
"drawers-trigger": "awsui_drawers-trigger_hyvsj_14xql_220",
|
|
16
|
+
"drawer": "awsui_drawer_hyvsj_14xql_126",
|
|
17
|
+
"drawer-content-container": "awsui_drawer-content-container_hyvsj_14xql_265",
|
|
18
|
+
"drawer-close-button": "awsui_drawer-close-button_hyvsj_14xql_274",
|
|
19
|
+
"drawer-content": "awsui_drawer-content_hyvsj_14xql_265",
|
|
20
|
+
"drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_14xql_282",
|
|
21
|
+
"drawer-slider": "awsui_drawer-slider_hyvsj_14xql_285",
|
|
22
|
+
"is-drawer-open": "awsui_is-drawer-open_hyvsj_14xql_292",
|
|
23
|
+
"content": "awsui_content_hyvsj_14xql_318",
|
|
24
|
+
"layout": "awsui_layout_hyvsj_14xql_339",
|
|
25
|
+
"has-max-content-width": "awsui_has-max-content-width_hyvsj_14xql_412",
|
|
26
|
+
"content-type-dashboard": "awsui_content-type-dashboard_hyvsj_14xql_427",
|
|
27
|
+
"content-type-table": "awsui_content-type-table_hyvsj_14xql_441",
|
|
28
|
+
"content-type-cards": "awsui_content-type-cards_hyvsj_14xql_441",
|
|
29
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_14xql_447",
|
|
30
|
+
"is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_14xql_450",
|
|
31
|
+
"has-content-gap-left": "awsui_has-content-gap-left_hyvsj_14xql_464",
|
|
32
|
+
"has-content-gap-right": "awsui_has-content-gap-right_hyvsj_14xql_467",
|
|
33
|
+
"has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_14xql_477",
|
|
34
|
+
"content-first-child-header": "awsui_content-first-child-header_hyvsj_14xql_480",
|
|
35
|
+
"content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_14xql_480",
|
|
36
|
+
"has-header": "awsui_has-header_hyvsj_14xql_480",
|
|
37
|
+
"content-first-child-main": "awsui_content-first-child-main_hyvsj_14xql_495",
|
|
38
|
+
"disable-content-paddings": "awsui_disable-content-paddings_hyvsj_14xql_495",
|
|
39
|
+
"has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_14xql_515",
|
|
40
|
+
"has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_14xql_518",
|
|
41
|
+
"has-split-panel": "awsui_has-split-panel_hyvsj_14xql_538",
|
|
42
|
+
"split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_14xql_538",
|
|
43
|
+
"block-body-scroll": "awsui_block-body-scroll_hyvsj_14xql_546",
|
|
44
|
+
"unfocusable": "awsui_unfocusable_hyvsj_14xql_551",
|
|
45
|
+
"container": "awsui_container_hyvsj_14xql_561",
|
|
46
|
+
"is-navigation-open": "awsui_is-navigation-open_hyvsj_14xql_587",
|
|
47
|
+
"is-tools-open": "awsui_is-tools-open_hyvsj_14xql_590",
|
|
48
|
+
"is-split-panel-open": "awsui_is-split-panel-open_hyvsj_14xql_590",
|
|
49
|
+
"split-panel-position-side": "awsui_split-panel-position-side_hyvsj_14xql_590",
|
|
50
|
+
"has-active-drawer": "awsui_has-active-drawer_hyvsj_14xql_590",
|
|
51
|
+
"mobile-toolbar": "awsui_mobile-toolbar_hyvsj_14xql_599",
|
|
52
|
+
"remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_14xql_616",
|
|
53
|
+
"mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_14xql_620",
|
|
54
|
+
"mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_14xql_624",
|
|
55
|
+
"mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_14xql_628",
|
|
56
|
+
"navigation-container": "awsui_navigation-container_hyvsj_14xql_637",
|
|
57
|
+
"show-navigation": "awsui_show-navigation_hyvsj_14xql_675",
|
|
58
|
+
"animating": "awsui_animating_hyvsj_14xql_698",
|
|
59
|
+
"showButtons": "awsui_showButtons_hyvsj_14xql_1",
|
|
60
|
+
"navigation": "awsui_navigation_hyvsj_14xql_637",
|
|
61
|
+
"openNavigation": "awsui_openNavigation_hyvsj_14xql_1",
|
|
62
|
+
"animated-content": "awsui_animated-content_hyvsj_14xql_760",
|
|
63
|
+
"hide-navigation": "awsui_hide-navigation_hyvsj_14xql_769",
|
|
64
|
+
"notifications": "awsui_notifications_hyvsj_14xql_779",
|
|
65
|
+
"has-notification-content": "awsui_has-notification-content_hyvsj_14xql_784",
|
|
66
|
+
"sticky-notifications": "awsui_sticky-notifications_hyvsj_14xql_788",
|
|
67
|
+
"high-contrast": "awsui_high-contrast_hyvsj_14xql_793",
|
|
68
|
+
"split-panel-bottom": "awsui_split-panel-bottom_hyvsj_14xql_811",
|
|
69
|
+
"position-bottom": "awsui_position-bottom_hyvsj_14xql_858",
|
|
70
|
+
"openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_14xql_1",
|
|
71
|
+
"split-panel-side": "awsui_split-panel-side_hyvsj_14xql_887",
|
|
72
|
+
"position-side": "awsui_position-side_hyvsj_14xql_900",
|
|
73
|
+
"tools-container": "awsui_tools-container_hyvsj_14xql_922",
|
|
74
|
+
"tools": "awsui_tools_hyvsj_14xql_922",
|
|
75
|
+
"openTools": "awsui_openTools_hyvsj_14xql_1",
|
|
76
|
+
"has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_14xql_1013",
|
|
77
|
+
"hide-tools": "awsui_hide-tools_hyvsj_14xql_1023",
|
|
78
|
+
"show-tools": "awsui_show-tools_hyvsj_14xql_1035",
|
|
79
|
+
"has-tools-form": "awsui_has-tools-form_hyvsj_14xql_1013",
|
|
80
|
+
"trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_14xql_1118",
|
|
81
|
+
"trigger": "awsui_trigger_hyvsj_14xql_1118",
|
|
82
|
+
"selected": "awsui_selected_hyvsj_14xql_1195",
|
|
83
|
+
"badge": "awsui_badge_hyvsj_14xql_1215",
|
|
84
|
+
"trigger-wrapper": "awsui_trigger-wrapper_hyvsj_14xql_1219",
|
|
85
|
+
"dot": "awsui_dot_hyvsj_14xql_1230"
|
|
87
86
|
};
|
|
88
87
|
|