@cloudscape-design/components 3.0.365 → 3.0.367

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.
Files changed (100) hide show
  1. package/app-layout/defaults.d.ts +1 -2
  2. package/app-layout/defaults.d.ts.map +1 -1
  3. package/app-layout/defaults.js.map +1 -1
  4. package/app-layout/drawer/drawers-helpers.d.ts +7 -0
  5. package/app-layout/drawer/drawers-helpers.d.ts.map +1 -0
  6. package/app-layout/drawer/drawers-helpers.js +24 -0
  7. package/app-layout/drawer/drawers-helpers.js.map +1 -0
  8. package/app-layout/drawer/index.d.ts +1 -1
  9. package/app-layout/drawer/index.d.ts.map +1 -1
  10. package/app-layout/drawer/index.js +41 -18
  11. package/app-layout/drawer/index.js.map +1 -1
  12. package/app-layout/drawer/interfaces.d.ts +8 -3
  13. package/app-layout/drawer/interfaces.d.ts.map +1 -1
  14. package/app-layout/drawer/interfaces.js.map +1 -1
  15. package/app-layout/drawer/overflow-menu.d.ts +13 -0
  16. package/app-layout/drawer/overflow-menu.d.ts.map +1 -0
  17. package/app-layout/drawer/overflow-menu.js +17 -0
  18. package/app-layout/drawer/overflow-menu.js.map +1 -0
  19. package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  20. package/app-layout/drawer/resizable-drawer.js +6 -2
  21. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  22. package/app-layout/index.d.ts.map +1 -1
  23. package/app-layout/index.js +46 -124
  24. package/app-layout/index.js.map +1 -1
  25. package/app-layout/mobile-toolbar/index.d.ts +1 -0
  26. package/app-layout/mobile-toolbar/index.d.ts.map +1 -1
  27. package/app-layout/mobile-toolbar/index.js +15 -5
  28. package/app-layout/mobile-toolbar/index.js.map +1 -1
  29. package/app-layout/toggles/index.js +2 -2
  30. package/app-layout/toggles/index.js.map +1 -1
  31. package/app-layout/toggles/interfaces.d.ts +1 -0
  32. package/app-layout/toggles/interfaces.d.ts.map +1 -1
  33. package/app-layout/toggles/interfaces.js.map +1 -1
  34. package/app-layout/utils/use-drawers.d.ts +29 -0
  35. package/app-layout/utils/use-drawers.d.ts.map +1 -0
  36. package/app-layout/utils/use-drawers.js +87 -0
  37. package/app-layout/utils/use-drawers.js.map +1 -0
  38. package/app-layout/utils/use-resize.d.ts +8 -4
  39. package/app-layout/utils/use-resize.d.ts.map +1 -1
  40. package/app-layout/utils/use-resize.js +5 -37
  41. package/app-layout/utils/use-resize.js.map +1 -1
  42. package/app-layout/visual-refresh/context.d.ts +6 -4
  43. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  44. package/app-layout/visual-refresh/context.js +20 -38
  45. package/app-layout/visual-refresh/context.js.map +1 -1
  46. package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  47. package/app-layout/visual-refresh/drawers.js +50 -25
  48. package/app-layout/visual-refresh/drawers.js.map +1 -1
  49. package/app-layout/visual-refresh/mobile-toolbar.js +2 -2
  50. package/app-layout/visual-refresh/mobile-toolbar.js.map +1 -1
  51. package/app-layout/visual-refresh/split-panel.js +1 -1
  52. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  53. package/app-layout/visual-refresh/styles.css.js +74 -69
  54. package/app-layout/visual-refresh/styles.scoped.css +197 -167
  55. package/app-layout/visual-refresh/styles.selectors.js +74 -69
  56. package/app-layout/visual-refresh/tools.js +1 -1
  57. package/app-layout/visual-refresh/tools.js.map +1 -1
  58. package/app-layout/visual-refresh/trigger-button.d.ts +1 -0
  59. package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
  60. package/app-layout/visual-refresh/trigger-button.js +8 -5
  61. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  62. package/button/icon-helper.d.ts +1 -0
  63. package/button/icon-helper.d.ts.map +1 -1
  64. package/button/icon-helper.js +2 -2
  65. package/button/icon-helper.js.map +1 -1
  66. package/button/internal.d.ts +2 -0
  67. package/button/internal.d.ts.map +1 -1
  68. package/button/internal.js +2 -1
  69. package/button/internal.js.map +1 -1
  70. package/button-dropdown/interfaces.d.ts +10 -1
  71. package/button-dropdown/interfaces.d.ts.map +1 -1
  72. package/button-dropdown/interfaces.js.map +1 -1
  73. package/button-dropdown/internal.d.ts.map +1 -1
  74. package/button-dropdown/internal.js +15 -1
  75. package/button-dropdown/internal.js.map +1 -1
  76. package/button-dropdown/item-element/index.d.ts +4 -0
  77. package/button-dropdown/item-element/index.d.ts.map +1 -1
  78. package/button-dropdown/item-element/index.js +1 -1
  79. package/button-dropdown/item-element/index.js.map +1 -1
  80. package/icon/styles.css.js +21 -21
  81. package/icon/styles.scoped.css +54 -54
  82. package/icon/styles.selectors.js +21 -21
  83. package/internal/base-component/styles.scoped.css +5 -0
  84. package/internal/environment.js +1 -1
  85. package/internal/environment.json +1 -1
  86. package/internal/generated/theming/index.cjs +31 -0
  87. package/internal/generated/theming/index.js +31 -0
  88. package/internal/manifest.json +1 -1
  89. package/package.json +1 -1
  90. package/popover/interfaces.d.ts +4 -0
  91. package/popover/interfaces.d.ts.map +1 -1
  92. package/popover/interfaces.js.map +1 -1
  93. package/popover/internal.js +2 -2
  94. package/popover/internal.js.map +1 -1
  95. package/property-filter/index.d.ts.map +1 -1
  96. package/property-filter/index.js +2 -1
  97. package/property-filter/index.js.map +1 -1
  98. package/property-filter/styles.css.js +30 -29
  99. package/property-filter/styles.scoped.css +38 -32
  100. package/property-filter/styles.selectors.js +30 -29
@@ -2,7 +2,7 @@ import { __rest } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import clsx from 'clsx';
5
- import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
5
+ import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
6
6
  import { getBaseProps } from '../internal/base-component';
7
7
  import { useControllable } from '../internal/hooks/use-controllable';
8
8
  import { useMobile } from '../internal/hooks/use-mobile';
@@ -25,7 +25,6 @@ import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
25
25
  import ContentWrapper from './content-wrapper';
26
26
  import { Drawer, DrawerTriggersBar } from './drawer';
27
27
  import { ResizableDrawer } from './drawer/resizable-drawer';
28
- import { togglesConfig } from './toggles';
29
28
  import { SideSplitPanelDrawer } from './split-panel-drawer';
30
29
  import useAppLayoutOffsets from './utils/use-content-width';
31
30
  import { isDevelopment } from '../internal/is-development';
@@ -34,14 +33,12 @@ import RefreshedAppLayout from './visual-refresh';
34
33
  import { useInternalI18n } from '../i18n/context';
35
34
  import { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';
36
35
  import { useDrawerFocusControl } from './utils/use-drawer-focus-control';
37
- import { awsuiPluginsInternal } from '../internal/plugins/api';
38
- import { convertRuntimeDrawers } from './runtime-api';
36
+ import { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';
39
37
  import { useContainerQuery } from '@cloudscape-design/component-toolkit';
40
38
  const AppLayout = React.forwardRef((_a, ref) => {
41
- var _b, _c, _d, _e, _f, _g, _h, _j;
39
+ var _b, _c, _d, _e, _f, _g, _h;
42
40
  var { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f' } = _a, rest = __rest(_a, ["contentType", "headerSelector", "footerSelector"]);
43
41
  const { __internalRootRef } = useBaseComponent('AppLayout');
44
- const [runtimeDrawers, setRuntimeDrawers] = useState({ before: [], after: [] });
45
42
  const isRefresh = useVisualRefresh();
46
43
  const i18n = useInternalI18n('app-layout');
47
44
  const ariaLabels = {
@@ -56,71 +53,26 @@ const AppLayout = React.forwardRef((_a, ref) => {
56
53
  // This re-builds the props including the default values
57
54
  const props = Object.assign(Object.assign({ contentType, headerSelector, footerSelector }, rest), { ariaLabels });
58
55
  const baseProps = getBaseProps(rest);
59
- const ownDrawers = props.drawers;
60
- const disableRuntimeDrawers = props.__disableRuntimeDrawers;
61
- const combinedDrawers = [...runtimeDrawers.before, ...((_j = ownDrawers === null || ownDrawers === void 0 ? void 0 : ownDrawers.items) !== null && _j !== void 0 ? _j : []), ...runtimeDrawers.after];
62
- const finalDrawers = combinedDrawers.length > 0 ? Object.assign(Object.assign({}, ownDrawers), { items: combinedDrawers }) : ownDrawers;
63
- useEffect(() => {
64
- if (disableRuntimeDrawers) {
65
- return;
66
- }
67
- const unsubscribe = awsuiPluginsInternal.appLayout.onDrawersRegistered(drawers => setRuntimeDrawers(convertRuntimeDrawers(drawers)));
68
- return () => {
69
- unsubscribe();
70
- setRuntimeDrawers({ before: [], after: [] });
71
- };
72
- }, [disableRuntimeDrawers]);
73
- return (React.createElement("div", Object.assign({ ref: __internalRootRef }, baseProps), isRefresh ? (React.createElement(RefreshedAppLayout, Object.assign({}, props, { drawers: finalDrawers }, { ref: ref }))) : (React.createElement(OldAppLayout, Object.assign({}, props, { drawers: finalDrawers }, { ref: ref })))));
56
+ return (React.createElement("div", Object.assign({ ref: __internalRootRef }, baseProps), isRefresh ? React.createElement(RefreshedAppLayout, Object.assign({}, props, { ref: ref })) : React.createElement(OldAppLayout, Object.assign({}, props, { ref: ref }))));
74
57
  });
75
58
  const OldAppLayout = React.forwardRef((_a, ref) => {
76
- var _b, _c;
59
+ var _b;
77
60
  var { navigation, navigationWidth = 280, navigationHide, navigationOpen: controlledNavigationOpen, tools, toolsWidth = 290, toolsHide, toolsOpen: controlledToolsOpen, breadcrumbs, notifications, stickyNotifications, contentHeader, disableContentHeaderOverlap, content, contentType = 'default', disableContentPaddings, disableBodyScroll, maxContentWidth, minContentWidth, headerSelector = '#b #h', footerSelector = '#b #f', ariaLabels, splitPanel, splitPanelSize: controlledSplitPanelSize, splitPanelOpen: controlledSplitPanelOpen, splitPanelPreferences: controlledSplitPanelPreferences, onSplitPanelPreferencesChange, onSplitPanelResize, onSplitPanelToggle, onNavigationChange, onToolsChange } = _a, props = __rest(_a, ["navigation", "navigationWidth", "navigationHide", "navigationOpen", "tools", "toolsWidth", "toolsHide", "toolsOpen", "breadcrumbs", "notifications", "stickyNotifications", "contentHeader", "disableContentHeaderOverlap", "content", "contentType", "disableContentPaddings", "disableBodyScroll", "maxContentWidth", "minContentWidth", "headerSelector", "footerSelector", "ariaLabels", "splitPanel", "splitPanelSize", "splitPanelOpen", "splitPanelPreferences", "onSplitPanelPreferencesChange", "onSplitPanelResize", "onSplitPanelToggle", "onNavigationChange", "onToolsChange"]);
78
61
  if (isDevelopment) {
79
62
  if (controlledToolsOpen && toolsHide) {
80
63
  warnOnce('AppLayout', `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\`.`);
81
64
  }
82
65
  }
83
- const drawers = props.drawers;
84
- const hasDrawers = drawers && drawers.items.length > 0;
85
66
  const rootRef = useRef(null);
86
67
  const isMobile = useMobile();
87
68
  const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);
88
69
  const [navigationOpen = false, setNavigationOpen] = useControllable(controlledNavigationOpen, onNavigationChange, isMobile ? false : defaults.navigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' });
89
70
  const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, isMobile ? false : defaults.toolsOpen, { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' });
90
- const [activeDrawerId, setActiveDrawerId] = useControllable(drawers === null || drawers === void 0 ? void 0 : drawers.activeDrawerId, drawers === null || drawers === void 0 ? void 0 : drawers.onChange, isMobile ? false : tools ? defaults.toolsOpen : '', {
91
- componentName: 'AppLayout',
92
- controlledProp: 'activeDrawerId',
93
- changeHandler: 'onChange',
94
- });
95
- const { iconName, getLabels } = togglesConfig.tools;
96
- const { mainLabel, closeLabel, openLabel } = getLabels(ariaLabels);
97
- const toolsItem = {
98
- id: 'tools',
99
- content: tools,
100
- resizable: false,
101
- ariaLabels: {
102
- triggerButton: openLabel,
103
- closeButton: closeLabel,
104
- content: mainLabel,
105
- },
106
- trigger: {
107
- iconName: iconName,
108
- },
109
- };
110
- const getAllDrawerItems = () => {
111
- if (!hasDrawers) {
112
- return;
113
- }
114
- return tools ? [toolsItem, ...drawers.items] : drawers.items;
115
- };
116
- const selectedDrawer = tools && toolsOpen
117
- ? toolsItem
118
- : hasDrawers
119
- ? (_b = getAllDrawerItems()) === null || _b === void 0 ? void 0 : _b.filter((drawerItem) => drawerItem.id === activeDrawerId)[0]
120
- : undefined;
71
+ const _c = useDrawers(props, { ariaLabels, tools, toolsOpen, toolsHide, toolsWidth }, defaults), { drawers, activeDrawer, activeDrawerSize, activeDrawerId, onActiveDrawerChange, onActiveDrawerResize } = _c, drawersProps = __rest(_c, ["drawers", "activeDrawer", "activeDrawerSize", "activeDrawerId", "onActiveDrawerChange", "onActiveDrawerResize"]);
72
+ const hasDrawers = drawers.length > 0;
121
73
  const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);
122
- const { refs: toolsRefs, setFocus: focusToolsButtons, loseFocus: loseToolsFocus, } = useFocusControl(toolsOpen || selectedDrawer !== undefined, true);
123
- const { refs: drawerRefs, setFocus: focusDrawersButtons, loseFocus: loseDrawersFocus, setLastInteraction: setDrawerLastInteraction, } = useDrawerFocusControl([selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.resizable], toolsOpen || selectedDrawer !== undefined, true);
74
+ const { refs: toolsRefs, setFocus: focusToolsButtons, loseFocus: loseToolsFocus, } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);
75
+ const { refs: drawerRefs, setFocus: focusDrawersButtons, loseFocus: loseDrawersFocus, setLastInteraction: setDrawerLastInteraction, } = useDrawerFocusControl([activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.resizable], toolsOpen || activeDrawer !== undefined, true);
124
76
  const onNavigationToggle = useCallback((open) => {
125
77
  setNavigationOpen(open);
126
78
  focusNavButtons();
@@ -141,7 +93,6 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
141
93
  const toolsVisible = !toolsHide && toolsOpen;
142
94
  const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(headerSelector, footerSelector, disableBodyScroll);
143
95
  const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);
144
- const [isResizeInvalid, setIsResizeInvalid] = useState(false);
145
96
  const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);
146
97
  const anyPanelOpen = navigationVisible || toolsVisible;
147
98
  const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;
@@ -156,26 +107,6 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
156
107
  controlledProp: 'splitPanelOpen',
157
108
  changeHandler: 'onSplitPanelToggle',
158
109
  });
159
- const drawerItems = useMemo(() => (drawers === null || drawers === void 0 ? void 0 : drawers.items) || [], [drawers === null || drawers === void 0 ? void 0 : drawers.items]);
160
- const getDrawerItemSizes = useCallback(() => {
161
- const sizes = {};
162
- if (!drawerItems) {
163
- return {};
164
- }
165
- for (const item of drawerItems) {
166
- if (item.defaultSize) {
167
- sizes[item.id] = item.defaultSize || toolsWidth;
168
- }
169
- }
170
- return sizes;
171
- }, [drawerItems, toolsWidth]);
172
- const [drawerSizes, setDrawerSizes] = useState(() => getDrawerItemSizes());
173
- useEffect(() => {
174
- // Ensure we only set new drawer items by performing a shallow merge
175
- // of the latest drawer item sizes, and previous drawer item sizes.
176
- setDrawerSizes(prev => (Object.assign(Object.assign({}, getDrawerItemSizes()), prev)));
177
- }, [getDrawerItemSizes]);
178
- const drawerSize = (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) && drawerSizes[selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id] ? drawerSizes[selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id] : toolsWidth;
179
110
  const splitPanelPosition = (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) || 'bottom';
180
111
  const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState({
181
112
  displayed: false,
@@ -185,13 +116,13 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
185
116
  const closedDrawerWidth = 40;
186
117
  const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;
187
118
  const getEffectiveToolsWidth = () => {
188
- if (toolsHide && (!splitPanelDisplayed || (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) !== 'side') && !drawers) {
119
+ if (toolsHide && (!splitPanelDisplayed || (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) !== 'side') && drawers.length === 0) {
189
120
  return 0;
190
121
  }
191
- if (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.resizable) {
192
- return drawerSize;
122
+ if (activeDrawer && activeDrawerSize) {
123
+ return activeDrawerSize;
193
124
  }
194
- if (toolsOpen || activeDrawerId) {
125
+ if (toolsOpen) {
195
126
  return toolsWidth;
196
127
  }
197
128
  return closedDrawerWidth;
@@ -240,13 +171,12 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
240
171
  return NaN;
241
172
  }
242
173
  // Either use the computed width of the drawer or the drawerSize as defined.
243
- const width = parseInt(getComputedStyle(mainContentRef.current).width || `${drawerSize}`);
174
+ const width = parseInt(getComputedStyle(mainContentRef.current).width || `${activeDrawerSize}`);
244
175
  // when disableContentPaddings is true there is less available space,
245
176
  // so we subtract space-scaled-2x-xxxl * 2 for left and right padding
246
177
  const contentPadding = disableContentPaddings ? 80 : 0;
247
178
  const spaceAvailable = width - defaults.minContentWidth - contentPadding;
248
- const spaceTaken = drawerSize;
249
- return Math.max(0, spaceTaken + spaceAvailable);
179
+ return Math.max(0, activeDrawerSize + spaceAvailable);
250
180
  });
251
181
  const getSplitPanelMaxHeight = useStableCallback(() => {
252
182
  if (typeof document === 'undefined') {
@@ -275,14 +205,14 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
275
205
  effectiveToolsWidth -
276
206
  effectiveNavigationWidth -
277
207
  (disableContentPaddings ? 0 : toggleButtonsBarWidth);
208
+ const isResizeInvalid = isMobile || (defaults.minContentWidth || 0) > contentWidthWithSplitPanel;
278
209
  useEffect(() => {
279
210
  const contentWidth = contentWidthWithSplitPanel - splitPanelSize;
280
211
  setIsSplitpanelForcedPosition(isMobile || (defaults.minContentWidth || 0) > contentWidth);
281
- setIsResizeInvalid(isMobile || (defaults.minContentWidth || 0) > contentWidthWithSplitPanel);
282
212
  // This is a workaround to avoid a forced position due to splitPanelSize, which is
283
213
  // user controlled variable.
284
214
  // eslint-disable-next-line react-hooks/exhaustive-deps
285
- }, [contentWidthWithSplitPanel, drawerSize, defaults.minContentWidth, isMobile]);
215
+ }, [contentWidthWithSplitPanel, activeDrawerSize, defaults.minContentWidth, isMobile]);
286
216
  const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;
287
217
  const toolsClosedWidth = toolsHide || isMobile || (!hasDrawers && toolsHide) ? 0 : closedDrawerWidth;
288
218
  const contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;
@@ -293,9 +223,9 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
293
223
  return 0;
294
224
  }
295
225
  if (hasDrawers) {
296
- if (activeDrawerId) {
297
- if (!isResizeInvalid && drawerSize) {
298
- return drawerSize + closedDrawerWidth;
226
+ if (activeDrawer) {
227
+ if (!isResizeInvalid && activeDrawerSize) {
228
+ return activeDrawerSize + closedDrawerWidth;
299
229
  }
300
230
  return toolsWidth + closedDrawerWidth;
301
231
  }
@@ -339,7 +269,7 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
339
269
  // tools padding is displayed in one of the three cases
340
270
  // 1. Nothing on the that screen edge (no tools panel and no split panel)
341
271
  toolsHide ||
342
- (hasDrawers && !activeDrawerId && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||
272
+ (hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||
343
273
  // 2. Tools panel is present and open
344
274
  toolsVisible ||
345
275
  // 3. Split panel is open in side position
@@ -355,28 +285,28 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
355
285
  },
356
286
  focusToolsClose: () => focusToolsButtons(true),
357
287
  }), [isMobile, onNavigationToggle, onToolsToggle, focusToolsButtons]);
358
- const splitPanelBottomOffset = (_c = (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'
288
+ const splitPanelBottomOffset = (_b = (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'
359
289
  ? undefined
360
290
  : splitPanelOpen
361
291
  ? splitPanelReportedSize
362
- : splitPanelReportedHeaderHeight)) !== null && _c !== void 0 ? _c : undefined;
292
+ : splitPanelReportedHeaderHeight)) !== null && _b !== void 0 ? _b : undefined;
363
293
  const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);
364
294
  return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef },
365
295
  React.createElement("div", { className: styles['layout-wrapper'], style: contentHeightStyle },
366
- isMobile && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: headerHeight, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle(true), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: drawers
296
+ isMobile && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: headerHeight, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle(true), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: hasDrawers
367
297
  ? {
368
- items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,
369
- activeDrawerId: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id,
298
+ items: drawers,
299
+ activeDrawerId: activeDrawerId,
370
300
  onChange: changeDetail => {
371
- if ((selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) !== changeDetail.activeDrawerId) {
372
- onToolsToggle(changeDetail.activeDrawerId === 'tools');
301
+ onActiveDrawerChange(changeDetail.activeDrawerId);
302
+ if (changeDetail.activeDrawerId !== activeDrawerId) {
303
+ onToolsToggle(changeDetail.activeDrawerId === TOOLS_DRAWER_ID);
373
304
  focusDrawersButtons();
374
- setActiveDrawerId(changeDetail.activeDrawerId);
375
305
  setDrawerLastInteraction({ type: 'open' });
376
- fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);
377
306
  }
378
307
  },
379
- ariaLabel: drawers.ariaLabel,
308
+ ariaLabel: drawersProps.ariaLabel,
309
+ overflowAriaLabel: drawersProps.overflowAriaLabel,
380
310
  }
381
311
  : undefined }, breadcrumbs)),
382
312
  React.createElement("div", { className: clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll']) },
@@ -416,39 +346,31 @@ const OldAppLayout = React.forwardRef((_a, ref) => {
416
346
  } }, content))),
417
347
  finalSplitPanePosition === 'bottom' && splitPanelWrapped),
418
348
  finalSplitPanePosition === 'side' && (React.createElement(SideSplitPanelDrawer, { topOffset: headerHeight, bottomOffset: footerHeight, displayed: splitPanelDisplayed, width: splitPanelOpen && splitPanel ? splitPanelSize : undefined }, splitPanelWrapped)),
419
- ((hasDrawers && (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id)) || (!hasDrawers && !toolsHide)) &&
420
- (hasDrawers ? (React.createElement(ResizableDrawer, { contentClassName: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) === 'tools' ? testutilStyles.tools : testutilStyles['active-drawer'], toggleClassName: testutilStyles['tools-toggle'], closeClassName: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) === 'tools'
349
+ ((hasDrawers && activeDrawerId) || (!hasDrawers && !toolsHide)) &&
350
+ (hasDrawers ? (React.createElement(ResizableDrawer, { contentClassName: activeDrawerId === TOOLS_DRAWER_ID ? testutilStyles.tools : testutilStyles['active-drawer'], toggleClassName: testutilStyles['tools-toggle'], closeClassName: activeDrawerId === TOOLS_DRAWER_ID
421
351
  ? testutilStyles['tools-close']
422
- : testutilStyles['active-drawer-close-button'], ariaLabels: ariaLabels, drawersAriaLabels: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.ariaLabels, width: !isResizeInvalid ? drawerSize : toolsWidth, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen || activeDrawerId !== undefined, toggleRefs: toolsRefs, type: "tools", onLoseFocus: hasDrawers ? loseDrawersFocus : loseToolsFocus, activeDrawer: selectedDrawer, drawers: {
423
- items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,
424
- activeDrawerId: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id,
352
+ : testutilStyles['active-drawer-close-button'], ariaLabels: ariaLabels, width: !isResizeInvalid ? activeDrawerSize : toolsWidth, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen || activeDrawerId !== undefined, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseDrawersFocus, activeDrawer: activeDrawer, drawers: {
353
+ items: drawers,
354
+ activeDrawerId: activeDrawerId,
425
355
  onChange: changeDetail => {
426
356
  onToolsToggle(false);
427
357
  setDrawerLastInteraction({ type: 'close' });
428
- setActiveDrawerId(changeDetail.activeDrawerId);
429
- fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);
358
+ onActiveDrawerChange(changeDetail.activeDrawerId);
430
359
  },
431
- }, size: !isResizeInvalid ? drawerSize : toolsWidth, onResize: changeDetail => {
432
- fireNonCancelableEvent(drawers.onResize, changeDetail);
433
- const drawerItem = drawerItems.find(({ id }) => id === changeDetail.id);
434
- if (drawerItem === null || drawerItem === void 0 ? void 0 : drawerItem.onResize) {
435
- fireNonCancelableEvent(drawerItem.onResize, changeDetail);
436
- }
437
- setDrawerSizes(Object.assign(Object.assign({}, drawerSizes), { [changeDetail.id]: changeDetail.size }));
438
- }, refs: drawerRefs, getMaxWidth: getDrawerMaxWidth }, selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.content)) : (React.createElement(Drawer, { contentClassName: testutilStyles.tools, toggleClassName: testutilStyles['tools-toggle'], closeClassName: testutilStyles['tools-close'], ariaLabels: ariaLabels, width: effectiveToolsWidth, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseToolsFocus }, tools))),
439
- hasDrawers && (React.createElement(DrawerTriggersBar, { contentClassName: testutilStyles['drawers-desktop-triggers-container'], toggleClassName: testutilStyles['drawers-trigger'], bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, drawers: {
440
- items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,
441
- activeDrawerId: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id,
360
+ }, size: !isResizeInvalid ? activeDrawerSize : toolsWidth, onResize: changeDetail => onActiveDrawerResize(changeDetail), refs: drawerRefs, getMaxWidth: getDrawerMaxWidth }, activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.content)) : (React.createElement(Drawer, { contentClassName: testutilStyles.tools, toggleClassName: testutilStyles['tools-toggle'], closeClassName: testutilStyles['tools-close'], ariaLabels: ariaLabels, width: effectiveToolsWidth, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseToolsFocus }, tools))),
361
+ hasDrawers && (React.createElement(DrawerTriggersBar, { bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, drawers: {
362
+ items: drawers,
363
+ activeDrawerId: activeDrawerId,
442
364
  onChange: changeDetail => {
443
- if ((selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) !== changeDetail.activeDrawerId) {
444
- onToolsToggle(changeDetail.activeDrawerId === 'tools');
365
+ if (activeDrawerId !== changeDetail.activeDrawerId) {
366
+ onToolsToggle(changeDetail.activeDrawerId === TOOLS_DRAWER_ID);
445
367
  focusDrawersButtons();
446
- setActiveDrawerId(changeDetail.activeDrawerId);
447
368
  setDrawerLastInteraction({ type: 'open' });
448
- fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);
449
369
  }
370
+ onActiveDrawerChange(changeDetail.activeDrawerId);
450
371
  },
451
- ariaLabel: drawers.ariaLabel,
372
+ ariaLabel: drawersProps.ariaLabel,
373
+ overflowAriaLabel: drawersProps.overflowAriaLabel,
452
374
  } }))))));
453
375
  });
454
376
  applyDisplayName(AppLayout, 'AppLayout');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["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,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtG,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;AA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AAwB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;gCAC3C,sBAAsB,CAAC,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;6BACvE;wBACH,CAAC;wBACD,SAAS,EAAE,OAAO,CAAC,SAAS;qBAC7B,GACD,CACH,CACG,CACF,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useCallback, useEffect, useImperativeHandle, useMemo, 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 { applyDisplayName } from '../internal/utils/apply-display-name';\nimport {\n SplitPanelContextProvider,\n SplitPanelContextProps,\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 { Drawer, DrawerTriggersBar } from './drawer';\nimport { ResizableDrawer } from './drawer/resizable-drawer';\nimport { DrawerItem, InternalDrawerProps } from './drawer/interfaces';\nimport { togglesConfig } from './toggles';\nimport { SideSplitPanelDrawer } from './split-panel-drawer';\nimport useAppLayoutOffsets from './utils/use-content-width';\nimport { isDevelopment } from '../internal/is-development';\nimport { useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport RefreshedAppLayout from './visual-refresh';\nimport { useInternalI18n } from '../i18n/context';\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\nimport { useDrawerFocusControl } from './utils/use-drawer-focus-control';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { DrawersLayout, convertRuntimeDrawers } from './runtime-api';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\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 [runtimeDrawers, setRuntimeDrawers] = useState<DrawersLayout>({ before: [], after: [] });\n const isRefresh = useVisualRefresh();\n\n const i18n = useInternalI18n('app-layout');\n const ariaLabels = {\n navigation: i18n('ariaLabels.navigation', rest.ariaLabels?.navigation),\n navigationClose: i18n('ariaLabels.navigationClose', rest.ariaLabels?.navigationClose),\n navigationToggle: i18n('ariaLabels.navigationToggle', rest.ariaLabels?.navigationToggle),\n notifications: i18n('ariaLabels.notifications', rest.ariaLabels?.notifications),\n tools: i18n('ariaLabels.tools', rest.ariaLabels?.tools),\n toolsClose: i18n('ariaLabels.toolsClose', rest.ariaLabels?.toolsClose),\n toolsToggle: i18n('ariaLabels.toolsToggle', rest.ariaLabels?.toolsToggle),\n };\n\n // This re-builds the props including the default values\n const props = { contentType, headerSelector, footerSelector, ...rest, ariaLabels };\n\n const baseProps = getBaseProps(rest);\n const ownDrawers = (props as any).drawers;\n const disableRuntimeDrawers = (props as any).__disableRuntimeDrawers;\n const combinedDrawers = [...runtimeDrawers.before, ...(ownDrawers?.items ?? []), ...runtimeDrawers.after];\n const finalDrawers = combinedDrawers.length > 0 ? { ...ownDrawers, items: combinedDrawers } : ownDrawers;\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawersRegistered(drawers =>\n setRuntimeDrawers(convertRuntimeDrawers(drawers))\n );\n return () => {\n unsubscribe();\n setRuntimeDrawers({ before: [], after: [] });\n };\n }, [disableRuntimeDrawers]);\n\n return (\n <div ref={__internalRootRef} {...baseProps}>\n {isRefresh ? (\n <RefreshedAppLayout {...props} {...{ drawers: finalDrawers }} ref={ref} />\n ) : (\n <OldAppLayout {...props} {...{ drawers: finalDrawers }} ref={ref} />\n )}\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 ...props\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\n const drawers = (props as InternalDrawerProps).drawers;\n const hasDrawers = drawers && drawers.items.length > 0;\n\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\n\n const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n onNavigationChange,\n isMobile ? false : defaults.navigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n\n const [toolsOpen = false, setToolsOpen] = useControllable(\n controlledToolsOpen,\n onToolsChange,\n isMobile ? false : defaults.toolsOpen,\n { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }\n );\n\n const [activeDrawerId, setActiveDrawerId] = useControllable(\n drawers?.activeDrawerId,\n drawers?.onChange,\n isMobile ? false : tools ? defaults.toolsOpen : '',\n {\n componentName: 'AppLayout',\n controlledProp: 'activeDrawerId',\n changeHandler: 'onChange',\n }\n );\n\n const { iconName, getLabels } = togglesConfig.tools;\n const { mainLabel, closeLabel, openLabel } = getLabels(ariaLabels);\n\n const toolsItem = {\n id: 'tools',\n content: tools,\n resizable: false,\n ariaLabels: {\n triggerButton: openLabel,\n closeButton: closeLabel,\n content: mainLabel,\n },\n trigger: {\n iconName: iconName,\n },\n };\n\n const getAllDrawerItems = () => {\n if (!hasDrawers) {\n return;\n }\n return tools ? [toolsItem, ...drawers.items] : drawers.items;\n };\n\n const selectedDrawer =\n tools && toolsOpen\n ? toolsItem\n : hasDrawers\n ? getAllDrawerItems()?.filter((drawerItem: DrawerItem) => drawerItem.id === activeDrawerId)[0]\n : undefined;\n\n const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);\n const {\n refs: toolsRefs,\n setFocus: focusToolsButtons,\n loseFocus: loseToolsFocus,\n } = useFocusControl(toolsOpen || selectedDrawer !== undefined, true);\n const {\n refs: drawerRefs,\n setFocus: focusDrawersButtons,\n loseFocus: loseDrawersFocus,\n setLastInteraction: setDrawerLastInteraction,\n } = useDrawerFocusControl([selectedDrawer?.resizable], toolsOpen || selectedDrawer !== undefined, true);\n\n const onNavigationToggle = useCallback(\n (open: boolean) => {\n setNavigationOpen(open);\n focusNavButtons();\n fireNonCancelableEvent(onNavigationChange, { open });\n },\n [setNavigationOpen, onNavigationChange, focusNavButtons]\n );\n const onToolsToggle = useCallback(\n (open: boolean) => {\n setToolsOpen(open);\n focusToolsButtons();\n fireNonCancelableEvent(onToolsChange, { open });\n },\n [setToolsOpen, onToolsChange, focusToolsButtons]\n );\n\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink) {\n onNavigationToggle(false);\n }\n };\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(\n headerSelector,\n footerSelector,\n disableBodyScroll\n );\n const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);\n const [isResizeInvalid, setIsResizeInvalid] = useState(false);\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);\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\n const drawerItems = useMemo(() => drawers?.items || [], [drawers?.items]);\n\n const getDrawerItemSizes = useCallback(() => {\n const sizes: { [id: string]: number } = {};\n if (!drawerItems) {\n return {};\n }\n\n for (const item of drawerItems) {\n if (item.defaultSize) {\n sizes[item.id] = item.defaultSize || toolsWidth;\n }\n }\n return sizes;\n }, [drawerItems, toolsWidth]);\n\n const [drawerSizes, setDrawerSizes] = useState(() => getDrawerItemSizes());\n\n useEffect(() => {\n // Ensure we only set new drawer items by performing a shallow merge\n // of the latest drawer item sizes, and previous drawer item sizes.\n setDrawerSizes(prev => ({ ...getDrawerItemSizes(), ...prev }));\n }, [getDrawerItemSizes]);\n\n const drawerSize =\n selectedDrawer?.id && drawerSizes[selectedDrawer?.id] ? drawerSizes[selectedDrawer?.id] : toolsWidth;\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\n const getEffectiveToolsWidth = () => {\n if (toolsHide && (!splitPanelDisplayed || splitPanelPreferences?.position !== 'side') && !drawers) {\n return 0;\n }\n\n if (selectedDrawer?.resizable) {\n return drawerSize;\n }\n\n if (toolsOpen || activeDrawerId) {\n return toolsWidth;\n }\n\n return closedDrawerWidth;\n };\n\n const effectiveToolsWidth = getEffectiveToolsWidth();\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 { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([\n splitPanelPreferences,\n splitPanelOpen,\n ]);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n setSplitPanelLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]\n );\n const onSplitPanelSizeSet = useCallback(\n (detail: { size: number }) => {\n setSplitPanelSize(detail.size);\n fireNonCancelableEvent(onSplitPanelResize, detail);\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n\n const onSplitPanelToggleHandler = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);\n\n const getSplitPanelMaxWidth = useStableCallback(() => {\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\n const spaceTaken = finalSplitPanePosition === 'side' ? splitPanelSize : 0;\n return Math.max(0, spaceTaken + spaceAvailable);\n });\n\n const getDrawerMaxWidth = useStableCallback(() => {\n if (!mainContentRef.current || !defaults.minContentWidth) {\n return NaN;\n }\n\n // Either use the computed width of the drawer or the drawerSize as defined.\n const width = parseInt(getComputedStyle(mainContentRef.current).width || `${drawerSize}`);\n\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 = drawerSize;\n\n return Math.max(0, spaceTaken + spaceAvailable);\n });\n\n const getSplitPanelMaxHeight = useStableCallback(() => {\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\n setIsSplitpanelForcedPosition(isMobile || (defaults.minContentWidth || 0) > contentWidth);\n setIsResizeInvalid(isMobile || (defaults.minContentWidth || 0) > contentWidthWithSplitPanel);\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, drawerSize, defaults.minContentWidth, isMobile]);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n const toolsClosedWidth = toolsHide || isMobile || (!hasDrawers && toolsHide) ? 0 : closedDrawerWidth;\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 getSplitPanelRightOffset = () => {\n if (isMobile) {\n return 0;\n }\n\n if (hasDrawers) {\n if (activeDrawerId) {\n if (!isResizeInvalid && drawerSize) {\n return drawerSize + closedDrawerWidth;\n }\n\n return toolsWidth + closedDrawerWidth;\n }\n return closedDrawerWidth;\n }\n\n if (!toolsHide && toolsOpen) {\n return toolsWidth;\n }\n return toolsClosedWidth;\n };\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 + getSplitPanelRightOffset(),\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 onResize: onSplitPanelSizeSet,\n onToggle: onSplitPanelToggleHandler,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n refs: splitPanelRefs,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelContextProvider value={splitPanelContext}>{splitPanel}</SplitPanelContextProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n toolsHide ||\n (hasDrawers && !activeDrawerId && (!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 useImperativeHandle(\n ref,\n () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle(false);\n }\n },\n focusToolsClose: () => focusToolsButtons(true),\n }),\n [isMobile, onNavigationToggle, onToolsToggle, focusToolsButtons]\n );\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);\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 mobileBarRef={mobileBarRef}\n drawers={\n drawers\n ? {\n items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,\n activeDrawerId: selectedDrawer?.id,\n onChange: changeDetail => {\n if (selectedDrawer?.id !== changeDetail.activeDrawerId) {\n onToolsToggle(changeDetail.activeDrawerId === 'tools');\n focusDrawersButtons();\n setActiveDrawerId(changeDetail.activeDrawerId);\n setDrawerLastInteraction({ type: 'open' });\n fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);\n }\n },\n ariaLabel: drawers.ariaLabel,\n }\n : undefined\n }\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={ariaLabels}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={onNavigationToggle}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : headerHeight}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>\n {breadcrumbs}\n </div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications &&\n (isMobile || !breadcrumbs) &&\n styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n // eslint-disable-next-line react/forbid-component-props\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n >\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop:\n // We don't support the table header being sticky in case the deprecated disableBodyScroll is enabled,\n // therefore we ensure the table header scrolls out of view by offseting a large enough value (9999px)\n (disableBodyScroll ? (isMobile ? -9999 : 0) : headerHeight) +\n (isMobile ? 0 : stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),\n stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),\n mobileBarHeight: mobileBarHeight ?? 0,\n }}\n >\n {content}\n </AppLayoutContext.Provider>\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && (\n <SideSplitPanelDrawer\n topOffset={headerHeight}\n bottomOffset={footerHeight}\n displayed={splitPanelDisplayed}\n width={splitPanelOpen && splitPanel ? splitPanelSize : undefined}\n >\n {splitPanelWrapped}\n </SideSplitPanelDrawer>\n )}\n\n {((hasDrawers && selectedDrawer?.id) || (!hasDrawers && !toolsHide)) &&\n (hasDrawers ? (\n <ResizableDrawer\n contentClassName={\n selectedDrawer?.id === 'tools' ? testutilStyles.tools : testutilStyles['active-drawer']\n }\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={\n selectedDrawer?.id === 'tools'\n ? testutilStyles['tools-close']\n : testutilStyles['active-drawer-close-button']\n }\n ariaLabels={ariaLabels}\n drawersAriaLabels={selectedDrawer?.ariaLabels}\n width={!isResizeInvalid ? drawerSize : toolsWidth}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen || activeDrawerId !== undefined}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={hasDrawers ? loseDrawersFocus : loseToolsFocus}\n activeDrawer={selectedDrawer}\n drawers={{\n items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,\n activeDrawerId: selectedDrawer?.id,\n onChange: changeDetail => {\n onToolsToggle(false);\n setDrawerLastInteraction({ type: 'close' });\n setActiveDrawerId(changeDetail.activeDrawerId);\n fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);\n },\n }}\n size={!isResizeInvalid ? drawerSize : toolsWidth}\n onResize={changeDetail => {\n fireNonCancelableEvent(drawers.onResize, changeDetail);\n const drawerItem = drawerItems.find(({ id }) => id === changeDetail.id);\n if (drawerItem?.onResize) {\n fireNonCancelableEvent(drawerItem.onResize, changeDetail);\n }\n setDrawerSizes({ ...drawerSizes, [changeDetail.id]: changeDetail.size });\n }}\n refs={drawerRefs}\n getMaxWidth={getDrawerMaxWidth}\n >\n {selectedDrawer?.content}\n </ResizableDrawer>\n ) : (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={ariaLabels}\n width={effectiveToolsWidth}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n ))}\n {hasDrawers && (\n <DrawerTriggersBar\n contentClassName={testutilStyles['drawers-desktop-triggers-container']}\n toggleClassName={testutilStyles['drawers-trigger']}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n drawers={{\n items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,\n activeDrawerId: selectedDrawer?.id,\n onChange: changeDetail => {\n if (selectedDrawer?.id !== changeDetail.activeDrawerId) {\n onToolsToggle(changeDetail.activeDrawerId === 'tools');\n focusDrawersButtons();\n setActiveDrawerId(changeDetail.activeDrawerId);\n setDrawerLastInteraction({ type: 'open' });\n fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);\n }\n },\n ariaLabel: drawers.ariaLabel,\n }}\n />\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":"lib/default/","sources":["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,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,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 { applyDisplayName } from '../internal/utils/apply-display-name';\nimport {\n SplitPanelContextProvider,\n SplitPanelContextProps,\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 { Drawer, DrawerTriggersBar } from './drawer';\nimport { ResizableDrawer } from './drawer/resizable-drawer';\nimport { SideSplitPanelDrawer } from './split-panel-drawer';\nimport useAppLayoutOffsets from './utils/use-content-width';\nimport { isDevelopment } from '../internal/is-development';\nimport { useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport RefreshedAppLayout from './visual-refresh';\nimport { useInternalI18n } from '../i18n/context';\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\nimport { useDrawerFocusControl } from './utils/use-drawer-focus-control';\nimport { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';\nimport { InternalDrawerProps } from './drawer/interfaces';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\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 const i18n = useInternalI18n('app-layout');\n const ariaLabels = {\n navigation: i18n('ariaLabels.navigation', rest.ariaLabels?.navigation),\n navigationClose: i18n('ariaLabels.navigationClose', rest.ariaLabels?.navigationClose),\n navigationToggle: i18n('ariaLabels.navigationToggle', rest.ariaLabels?.navigationToggle),\n notifications: i18n('ariaLabels.notifications', rest.ariaLabels?.notifications),\n tools: i18n('ariaLabels.tools', rest.ariaLabels?.tools),\n toolsClose: i18n('ariaLabels.toolsClose', rest.ariaLabels?.toolsClose),\n toolsToggle: i18n('ariaLabels.toolsToggle', rest.ariaLabels?.toolsToggle),\n };\n\n // This re-builds the props including the default values\n const props = { contentType, headerSelector, footerSelector, ...rest, ariaLabels };\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 ...props\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\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\n\n const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n onNavigationChange,\n isMobile ? false : defaults.navigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n\n const [toolsOpen = false, setToolsOpen] = useControllable(\n controlledToolsOpen,\n onToolsChange,\n isMobile ? false : defaults.toolsOpen,\n { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }\n );\n\n const {\n drawers,\n activeDrawer,\n activeDrawerSize,\n activeDrawerId,\n onActiveDrawerChange,\n onActiveDrawerResize,\n ...drawersProps\n } = useDrawers(props as InternalDrawerProps, { ariaLabels, tools, toolsOpen, toolsHide, toolsWidth }, defaults);\n const hasDrawers = drawers.length > 0;\n\n const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);\n const {\n refs: toolsRefs,\n setFocus: focusToolsButtons,\n loseFocus: loseToolsFocus,\n } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);\n const {\n refs: drawerRefs,\n setFocus: focusDrawersButtons,\n loseFocus: loseDrawersFocus,\n setLastInteraction: setDrawerLastInteraction,\n } = useDrawerFocusControl([activeDrawer?.resizable], toolsOpen || activeDrawer !== undefined, true);\n\n const onNavigationToggle = useCallback(\n (open: boolean) => {\n setNavigationOpen(open);\n focusNavButtons();\n fireNonCancelableEvent(onNavigationChange, { open });\n },\n [setNavigationOpen, onNavigationChange, focusNavButtons]\n );\n const onToolsToggle = useCallback(\n (open: boolean) => {\n setToolsOpen(open);\n focusToolsButtons();\n fireNonCancelableEvent(onToolsChange, { open });\n },\n [setToolsOpen, onToolsChange, focusToolsButtons]\n );\n\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink) {\n onNavigationToggle(false);\n }\n };\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(\n headerSelector,\n footerSelector,\n disableBodyScroll\n );\n const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);\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\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\n const getEffectiveToolsWidth = () => {\n if (toolsHide && (!splitPanelDisplayed || splitPanelPreferences?.position !== 'side') && drawers.length === 0) {\n return 0;\n }\n\n if (activeDrawer && activeDrawerSize) {\n return activeDrawerSize;\n }\n\n if (toolsOpen) {\n return toolsWidth;\n }\n\n return closedDrawerWidth;\n };\n\n const effectiveToolsWidth = getEffectiveToolsWidth();\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 { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([\n splitPanelPreferences,\n splitPanelOpen,\n ]);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n setSplitPanelLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]\n );\n const onSplitPanelSizeSet = useCallback(\n (detail: { size: number }) => {\n setSplitPanelSize(detail.size);\n fireNonCancelableEvent(onSplitPanelResize, detail);\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n\n const onSplitPanelToggleHandler = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);\n\n const getSplitPanelMaxWidth = useStableCallback(() => {\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\n const spaceTaken = finalSplitPanePosition === 'side' ? splitPanelSize : 0;\n return Math.max(0, spaceTaken + spaceAvailable);\n });\n\n const getDrawerMaxWidth = useStableCallback(() => {\n if (!mainContentRef.current || !defaults.minContentWidth) {\n return NaN;\n }\n\n // Either use the computed width of the drawer or the drawerSize as defined.\n const width = parseInt(getComputedStyle(mainContentRef.current).width || `${activeDrawerSize}`);\n\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\n return Math.max(0, activeDrawerSize + spaceAvailable);\n });\n\n const getSplitPanelMaxHeight = useStableCallback(() => {\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 const isResizeInvalid = isMobile || (defaults.minContentWidth || 0) > contentWidthWithSplitPanel;\n\n useEffect(() => {\n const contentWidth = contentWidthWithSplitPanel - splitPanelSize;\n\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, activeDrawerSize, defaults.minContentWidth, isMobile]);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n const toolsClosedWidth = toolsHide || isMobile || (!hasDrawers && toolsHide) ? 0 : closedDrawerWidth;\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 getSplitPanelRightOffset = () => {\n if (isMobile) {\n return 0;\n }\n\n if (hasDrawers) {\n if (activeDrawer) {\n if (!isResizeInvalid && activeDrawerSize) {\n return activeDrawerSize + closedDrawerWidth;\n }\n\n return toolsWidth + closedDrawerWidth;\n }\n return closedDrawerWidth;\n }\n\n if (!toolsHide && toolsOpen) {\n return toolsWidth;\n }\n return toolsClosedWidth;\n };\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 + getSplitPanelRightOffset(),\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 onResize: onSplitPanelSizeSet,\n onToggle: onSplitPanelToggleHandler,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n refs: splitPanelRefs,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelContextProvider value={splitPanelContext}>{splitPanel}</SplitPanelContextProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n toolsHide ||\n (hasDrawers && !activeDrawer && (!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 useImperativeHandle(\n ref,\n () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle(false);\n }\n },\n focusToolsClose: () => focusToolsButtons(true),\n }),\n [isMobile, onNavigationToggle, onToolsToggle, focusToolsButtons]\n );\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);\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 mobileBarRef={mobileBarRef}\n drawers={\n hasDrawers\n ? {\n items: drawers,\n activeDrawerId: activeDrawerId,\n onChange: changeDetail => {\n onActiveDrawerChange(changeDetail.activeDrawerId);\n if (changeDetail.activeDrawerId !== activeDrawerId) {\n onToolsToggle(changeDetail.activeDrawerId === TOOLS_DRAWER_ID);\n focusDrawersButtons();\n setDrawerLastInteraction({ type: 'open' });\n }\n },\n ariaLabel: drawersProps.ariaLabel,\n overflowAriaLabel: drawersProps.overflowAriaLabel,\n }\n : undefined\n }\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={ariaLabels}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={onNavigationToggle}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : headerHeight}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>\n {breadcrumbs}\n </div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications &&\n (isMobile || !breadcrumbs) &&\n styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n // eslint-disable-next-line react/forbid-component-props\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n >\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop:\n // We don't support the table header being sticky in case the deprecated disableBodyScroll is enabled,\n // therefore we ensure the table header scrolls out of view by offseting a large enough value (9999px)\n (disableBodyScroll ? (isMobile ? -9999 : 0) : headerHeight) +\n (isMobile ? 0 : stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),\n stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),\n mobileBarHeight: mobileBarHeight ?? 0,\n }}\n >\n {content}\n </AppLayoutContext.Provider>\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && (\n <SideSplitPanelDrawer\n topOffset={headerHeight}\n bottomOffset={footerHeight}\n displayed={splitPanelDisplayed}\n width={splitPanelOpen && splitPanel ? splitPanelSize : undefined}\n >\n {splitPanelWrapped}\n </SideSplitPanelDrawer>\n )}\n\n {((hasDrawers && activeDrawerId) || (!hasDrawers && !toolsHide)) &&\n (hasDrawers ? (\n <ResizableDrawer\n contentClassName={\n activeDrawerId === TOOLS_DRAWER_ID ? testutilStyles.tools : testutilStyles['active-drawer']\n }\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={\n activeDrawerId === TOOLS_DRAWER_ID\n ? testutilStyles['tools-close']\n : testutilStyles['active-drawer-close-button']\n }\n ariaLabels={ariaLabels}\n width={!isResizeInvalid ? activeDrawerSize : toolsWidth}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen || activeDrawerId !== undefined}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseDrawersFocus}\n activeDrawer={activeDrawer}\n drawers={{\n items: drawers,\n activeDrawerId: activeDrawerId,\n onChange: changeDetail => {\n onToolsToggle(false);\n setDrawerLastInteraction({ type: 'close' });\n onActiveDrawerChange(changeDetail.activeDrawerId);\n },\n }}\n size={!isResizeInvalid ? activeDrawerSize : toolsWidth}\n onResize={changeDetail => onActiveDrawerResize(changeDetail)}\n refs={drawerRefs}\n getMaxWidth={getDrawerMaxWidth}\n >\n {activeDrawer?.content}\n </ResizableDrawer>\n ) : (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={ariaLabels}\n width={effectiveToolsWidth}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n ))}\n {hasDrawers && (\n <DrawerTriggersBar\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n drawers={{\n items: drawers,\n activeDrawerId: activeDrawerId,\n onChange: changeDetail => {\n if (activeDrawerId !== changeDetail.activeDrawerId) {\n onToolsToggle(changeDetail.activeDrawerId === TOOLS_DRAWER_ID);\n focusDrawersButtons();\n setDrawerLastInteraction({ type: 'open' });\n }\n onActiveDrawerChange(changeDetail.activeDrawerId);\n },\n ariaLabel: drawersProps.ariaLabel,\n overflowAriaLabel: drawersProps.overflowAriaLabel,\n }}\n />\n )}\n </div>\n </div>\n </div>\n );\n }\n);\n\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
@@ -24,6 +24,7 @@ interface MobileToolbarProps {
24
24
  activeDrawerId: string | undefined;
25
25
  }) => void;
26
26
  ariaLabel?: string;
27
+ overflowAriaLabel?: string;
27
28
  };
28
29
  }
29
30
  export declare function MobileToolbar({ ariaLabels, toggleRefs, topOffset, navigationHide, toolsHide, anyPanelOpen, unfocusable, children, onNavigationOpen, onToolsOpen, drawers, mobileBarRef, }: MobileToolbarProps): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["app-layout/mobile-toolbar/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACt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