@cloudscape-design/components-themeable 3.0.109 → 3.0.110

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 (65) hide show
  1. package/lib/internal/scss/app-layout/visual-refresh/app-bar.scss +11 -2
  2. package/lib/internal/scss/app-layout/visual-refresh/background.scss +6 -9
  3. package/lib/internal/scss/app-layout/visual-refresh/navigation.scss +13 -0
  4. package/lib/internal/scss/app-layout/visual-refresh/split-panel.scss +1 -0
  5. package/lib/internal/scss/app-layout/visual-refresh/tools.scss +4 -0
  6. package/lib/internal/scss/app-layout/visual-refresh/trigger-button.scss +2 -0
  7. package/lib/internal/scss/container/styles.scss +15 -1
  8. package/lib/internal/scss/split-panel/icons/icons-styles.scss +4 -1
  9. package/lib/internal/scss/table/header-cell/styles.scss +3 -3
  10. package/lib/internal/scss/table/styles.scss +11 -3
  11. package/lib/internal/template/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
  12. package/lib/internal/template/app-layout/visual-refresh/app-bar.js +2 -1
  13. package/lib/internal/template/app-layout/visual-refresh/app-bar.js.map +1 -1
  14. package/lib/internal/template/app-layout/visual-refresh/background.d.ts.map +1 -1
  15. package/lib/internal/template/app-layout/visual-refresh/background.js +7 -4
  16. package/lib/internal/template/app-layout/visual-refresh/background.js.map +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh/context.d.ts +2 -0
  18. package/lib/internal/template/app-layout/visual-refresh/context.d.ts.map +1 -1
  19. package/lib/internal/template/app-layout/visual-refresh/context.js +23 -18
  20. package/lib/internal/template/app-layout/visual-refresh/context.js.map +1 -1
  21. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +60 -59
  22. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +175 -152
  23. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +60 -59
  24. package/lib/internal/template/cards/index.d.ts.map +1 -1
  25. package/lib/internal/template/cards/index.js +1 -1
  26. package/lib/internal/template/cards/index.js.map +1 -1
  27. package/lib/internal/template/container/internal.d.ts +2 -1
  28. package/lib/internal/template/container/internal.d.ts.map +1 -1
  29. package/lib/internal/template/container/internal.js +21 -6
  30. package/lib/internal/template/container/internal.js.map +1 -1
  31. package/lib/internal/template/container/styles.css.js +16 -16
  32. package/lib/internal/template/container/styles.scoped.css +36 -26
  33. package/lib/internal/template/container/styles.selectors.js +16 -16
  34. package/lib/internal/template/internal/environment.js +1 -1
  35. package/lib/internal/template/split-panel/icons/bottom-icon-refresh.d.ts.map +1 -1
  36. package/lib/internal/template/split-panel/icons/bottom-icon-refresh.js +6 -9
  37. package/lib/internal/template/split-panel/icons/bottom-icon-refresh.js.map +1 -1
  38. package/lib/internal/template/split-panel/icons/side-position-refresh.d.ts +1 -0
  39. package/lib/internal/template/split-panel/icons/side-position-refresh.d.ts.map +1 -1
  40. package/lib/internal/template/split-panel/icons/side-position-refresh.js +6 -9
  41. package/lib/internal/template/split-panel/icons/side-position-refresh.js.map +1 -1
  42. package/lib/internal/template/split-panel/styles.css.js +59 -58
  43. package/lib/internal/template/split-panel/styles.scoped.css +84 -81
  44. package/lib/internal/template/split-panel/styles.selectors.js +59 -58
  45. package/lib/internal/template/table/header-cell/index.d.ts +2 -1
  46. package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
  47. package/lib/internal/template/table/header-cell/index.js +2 -1
  48. package/lib/internal/template/table/header-cell/index.js.map +1 -1
  49. package/lib/internal/template/table/header-cell/styles.css.js +16 -15
  50. package/lib/internal/template/table/header-cell/styles.scoped.css +26 -26
  51. package/lib/internal/template/table/header-cell/styles.selectors.js +16 -15
  52. package/lib/internal/template/table/internal.d.ts.map +1 -1
  53. package/lib/internal/template/table/internal.js +7 -3
  54. package/lib/internal/template/table/internal.js.map +1 -1
  55. package/lib/internal/template/table/sticky-header.d.ts +1 -0
  56. package/lib/internal/template/table/sticky-header.d.ts.map +1 -1
  57. package/lib/internal/template/table/sticky-header.js +2 -1
  58. package/lib/internal/template/table/sticky-header.js.map +1 -1
  59. package/lib/internal/template/table/styles.css.js +34 -32
  60. package/lib/internal/template/table/styles.scoped.css +47 -39
  61. package/lib/internal/template/table/styles.selectors.js +34 -32
  62. package/lib/internal/template/table/thead.d.ts.map +1 -1
  63. package/lib/internal/template/table/thead.js +3 -3
  64. package/lib/internal/template/table/thead.js.map +1 -1
  65. package/package.json +1 -1
@@ -89,13 +89,22 @@ section.appbar {
89
89
  }
90
90
 
91
91
  /*
92
- If the content type supports a dark sticky header then
93
- minimal bottom padding should be on the breadcrumbs to
92
+ Table and cards content types implement a custom dark header.
93
+ Minimal bottom padding should be on the breadcrumbs to
94
94
  reduce the the vertical distance from the main content.
95
95
  */
96
96
  > .breadcrumbs.content-type-cards,
97
97
  > .breadcrumbs.content-type-table {
98
98
  padding-bottom: awsui.$space-xxs;
99
+ }
100
+
101
+ /*
102
+ If a child component tells the AppLayout to have a sticky
103
+ background (typically because of a stickyHeader with a
104
+ full-page variant) the z-index of the breadcrumbs needs to
105
+ be lifted so it doesn't render behind the background element.
106
+ */
107
+ > .breadcrumbs.has-sticky-background {
99
108
  z-index: 799;
100
109
  }
101
110
  }
@@ -21,8 +21,7 @@ div.background {
21
21
  behind the notifications above the content dark header.
22
22
  */
23
23
  @include styles.media-breakpoint-up(styles.$breakpoint-x-small) {
24
- &.content-type-cards.has-notifications-content.sticky-notifications,
25
- &.content-type-table.has-notifications-content.sticky-notifications {
24
+ &.has-sticky-background.has-notifications-content.sticky-notifications {
26
25
  position: sticky;
27
26
  top: var(#{custom-props.$offsetTop});
28
27
  z-index: 799;
@@ -36,15 +35,13 @@ div.background {
36
35
  grid-row: 4;
37
36
 
38
37
  /*
39
- The cards and table content types have sticky header content that
40
- will retain position on viewport scroll. They are setting the
41
- dynamicOverlapHeight property in the AppLayout context with a container query
42
- that observes the content height. The background needs to be sticky in
43
- desktop viewports without overlapping notification content if it exists.
38
+ The cards and table content types can have sticky header content that
39
+ will retain position on viewport scroll. The overlap background needs to
40
+ be sticky in desktop viewports to prevent light background gutters with
41
+ the high contrast header background only in the content area.
44
42
  */
45
43
  @include styles.media-breakpoint-up(styles.$breakpoint-x-small) {
46
- &.content-type-cards,
47
- &.content-type-table {
44
+ &.has-sticky-background {
48
45
  position: sticky;
49
46
  top: var(#{custom-props.$offsetTopWithNotifications});
50
47
  z-index: 799;
@@ -17,6 +17,18 @@
17
17
  top: var(#{custom-props.$offsetTop});
18
18
  z-index: 850;
19
19
 
20
+ /*
21
+ The navigation and tools containers (that contain the toggle buttons)
22
+ stretch the full height of the app layout. Normally, this wouldn't be an
23
+ issue because they sit above the app layout's content padding.
24
+
25
+ But if disableContentPaddings is set to true and there are buttons on the
26
+ left/right edges of the screen, they will be covered by the containers. So
27
+ we need to disable pointer events in the container and re-enable them in
28
+ the panels and toggle buttons.
29
+ */
30
+ pointer-events: none;
31
+
20
32
  @include styles.media-breakpoint-up(styles.$breakpoint-xx-large) {
21
33
  #{custom-props.$navigationWidth}: 320px;
22
34
  }
@@ -73,6 +85,7 @@ nav.navigation {
73
85
  overscroll-behavior-y: contain;
74
86
  position: relative;
75
87
  word-wrap: break-word;
88
+ pointer-events: auto;
76
89
 
77
90
  // Animation for the Navigation opacity and width when it is added to the DOM
78
91
  @keyframes openNavigation {
@@ -84,6 +84,7 @@ section.split-panel-bottom {
84
84
  section.split-panel-side {
85
85
  height: 100%;
86
86
  overflow-x: hidden;
87
+ pointer-events: auto;
87
88
 
88
89
  // Animation for opacity and width when pening the Split Panel
89
90
  @keyframes openSplitPanelSide {
@@ -33,6 +33,8 @@ viewport size and state of the Tools drawer.
33
33
  top: var(#{custom-props.$offsetTop});
34
34
  z-index: 850;
35
35
 
36
+ pointer-events: none;
37
+
36
38
  @include styles.media-breakpoint-up(styles.$breakpoint-xx-large) {
37
39
  #{custom-props.$toolsWidth}: 360px;
38
40
  }
@@ -58,6 +60,8 @@ viewport size and state of the Tools drawer.
58
60
  position: relative;
59
61
  word-wrap: break-word;
60
62
 
63
+ pointer-events: auto;
64
+
61
65
  // Animation for the Tools opacity and width when it is added to the DOM
62
66
  @keyframes openTools {
63
67
  from {
@@ -23,6 +23,8 @@ handleSplitPanelMaxWidth function in the context.
23
23
  padding: 0 awsui.$space-s;
24
24
  width: awsui.$space-layout-toggle-diameter;
25
25
 
26
+ pointer-events: auto;
27
+
26
28
  @include focus-visible.when-visible {
27
29
  @include styles.focus-highlight(3px);
28
30
  }
@@ -99,7 +99,21 @@
99
99
  }
100
100
 
101
101
  &-variant-full-page.header-stuck {
102
- box-shadow: awsui.$shadow-sticky;
102
+ box-shadow: none;
103
+
104
+ &::after {
105
+ content: '';
106
+
107
+ position: absolute;
108
+ right: 0;
109
+ left: 0;
110
+ bottom: 0;
111
+ top: 0;
112
+
113
+ box-shadow: awsui.$shadow-sticky;
114
+ // This polygon only shows the part of the shadow that is lower than the element itself.
115
+ clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
116
+ }
103
117
  }
104
118
  }
105
119
 
@@ -54,6 +54,9 @@
54
54
  &--disabled {
55
55
  fill: awsui.$color-background-control-disabled;
56
56
  }
57
+ &--column-header {
58
+ fill: awsui.$color-text-input-disabled;
59
+ }
57
60
  &--window {
58
61
  stroke: awsui.$color-background-home-header;
59
62
  fill: awsui.$color-background-container-content;
@@ -65,7 +68,7 @@
65
68
  fill: awsui.$color-text-body-default;
66
69
  }
67
70
  &--separator {
68
- stroke: awsui.$color-border-button-primary-disabled;
71
+ stroke: awsui.$color-border-divider-default;
69
72
  }
70
73
  &--input-default {
71
74
  fill: awsui.$color-border-input-default;
@@ -19,11 +19,11 @@
19
19
  &-sticky {
20
20
  border-bottom: awsui.$border-table-sticky-width solid awsui.$color-border-divider-default;
21
21
  }
22
- &-stuck {
22
+ &-stuck:not(.header-cell-variant-full-page) {
23
23
  border-bottom-color: transparent;
24
24
  }
25
- &-variant-full-page {
26
- border-bottom: awsui.$space-scaled-xxs solid transparent;
25
+ &-variant-full-page.header-cell-hidden {
26
+ border-bottom-color: transparent;
27
27
  }
28
28
  &:first-child {
29
29
  padding-left: awsui.$space-xs;
@@ -141,6 +141,14 @@
141
141
  }
142
142
  }
143
143
 
144
+ /*
145
+ The dynamic height dark header needs a background that will cover
146
+ the default white background of the container component.
147
+ */
148
+ .dark-header {
149
+ background-color: awsui.$color-background-layout-main;
150
+ }
151
+
144
152
  .header-secondary {
145
153
  overflow: auto;
146
154
  -ms-overflow-style: none; /* Internet Explorer 10+ */
@@ -159,6 +167,9 @@
159
167
  &::-webkit-scrollbar {
160
168
  display: none; /* Safari and Chrome */
161
169
  }
170
+ &.table-has-header {
171
+ border-top: awsui.$border-divider-list-width solid awsui.$color-border-container-divider;
172
+ }
162
173
  }
163
174
 
164
175
  .header-controls {
@@ -174,9 +185,6 @@
174
185
  padding-right: awsui.$space-table-header-horizontal;
175
186
  padding-top: awsui.$space-table-embedded-header-top;
176
187
  }
177
- & + .header-secondary {
178
- border-top: awsui.$border-divider-list-width solid awsui.$color-border-container-divider;
179
- }
180
188
  }
181
189
 
182
190
  .divider {
@@ -1 +1 @@
1
- {"version":3,"file":"app-bar.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/app-bar.tsx"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,uBA2F7B"}
1
+ {"version":3,"file":"app-bar.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/app-bar.tsx"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,uBA6F7B"}
@@ -14,7 +14,7 @@ import { useFocusControl } from '../utils/use-focus-control';
14
14
  export default function AppBar() {
15
15
  var _a, _b, _c, _d;
16
16
  var _e, _f, _g;
17
- var _h = useContext(AppLayoutContext), ariaLabels = _h.ariaLabels, breadcrumbs = _h.breadcrumbs, contentHeader = _h.contentHeader, contentType = _h.contentType, dynamicOverlapHeight = _h.dynamicOverlapHeight, handleNavigationClick = _h.handleNavigationClick, handleToolsClick = _h.handleToolsClick, hasNotificationsContent = _h.hasNotificationsContent, isMobile = _h.isMobile, navigationHide = _h.navigationHide, isNavigationOpen = _h.isNavigationOpen, isToolsOpen = _h.isToolsOpen, toolsHide = _h.toolsHide, isAnyPanelOpen = _h.isAnyPanelOpen;
17
+ var _h = useContext(AppLayoutContext), ariaLabels = _h.ariaLabels, breadcrumbs = _h.breadcrumbs, contentHeader = _h.contentHeader, contentType = _h.contentType, dynamicOverlapHeight = _h.dynamicOverlapHeight, handleNavigationClick = _h.handleNavigationClick, handleToolsClick = _h.handleToolsClick, hasNotificationsContent = _h.hasNotificationsContent, hasStickyBackground = _h.hasStickyBackground, isMobile = _h.isMobile, navigationHide = _h.navigationHide, isNavigationOpen = _h.isNavigationOpen, isToolsOpen = _h.isToolsOpen, toolsHide = _h.toolsHide, isAnyPanelOpen = _h.isAnyPanelOpen;
18
18
  var focusRefsNav = useFocusControl(isNavigationOpen).refs;
19
19
  var focusRefsTools = useFocusControl(isToolsOpen, true).refs;
20
20
  if (navigationHide && !breadcrumbs && toolsHide) {
@@ -31,6 +31,7 @@ export default function AppBar() {
31
31
  _c[styles['has-dynamic-overlap-height']] = dynamicOverlapHeight > 0,
32
32
  _c[styles['has-header']] = contentHeader,
33
33
  _c[styles['has-notifications-content']] = hasNotificationsContent,
34
+ _c[styles['has-sticky-background']] = hasStickyBackground,
34
35
  _c)) }, breadcrumbs)),
35
36
  !toolsHide && isMobile && (React.createElement("aside", { className: clsx(styles['appbar-tools'], (_d = {}, _d[testutilStyles['drawer-closed']] = !isToolsOpen, _d)), "aria-hidden": isToolsOpen, "aria-label": (_f = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.tools) !== null && _f !== void 0 ? _f : undefined },
36
37
  React.createElement(InternalButton, { className: testutilStyles['tools-toggle'], ariaExpanded: isToolsOpen, disabled: isAnyPanelOpen, ariaLabel: (_g = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.toolsToggle) !== null && _g !== void 0 ? _g : undefined, iconName: "status-info", formAction: "none", onClick: function () { return handleToolsClick(true); }, variant: "icon", ref: focusRefsTools.toggle, __nativeAttributes: { 'aria-haspopup': true } })))));
@@ -1 +1 @@
1
- {"version":3,"file":"app-bar.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/app-bar.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM;;;IACtB,IAAA,KAeF,UAAU,CAAC,gBAAgB,CAAC,EAd9B,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,oBAAoB,0BAAA,EACpB,qBAAqB,2BAAA,EACrB,gBAAgB,sBAAA,EAChB,uBAAuB,6BAAA,EACvB,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,gBAAgB,sBAAA,EAChB,WAAW,iBAAA,EACX,SAAS,eAAA,EACT,cAAc,oBACgB,CAAC;IACzB,IAAM,YAAY,GAAK,eAAe,CAAC,gBAAgB,CAAC,KAAtC,CAAuC;IACzD,IAAM,cAAc,GAAK,eAAe,CAAC,WAAW,EAAE,IAAI,CAAC,KAAvC,CAAwC;IAEpE,IAAI,cAAc,IAAI,CAAC,WAAW,IAAI,SAAS,EAAE;QAC/C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,gDACe,CAAC,QAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC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,IAAI,CACzB,+BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,YAAI,GAAC,cAAc,CAAC,eAAe,CAAC,IAAG,CAAC,WAAW,MAAG,iBAC/E,WAAW,gBACZ,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,mCAAI,SAAS;YAE1C,oBAAC,cAAc,IACb,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC,EACzC,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,mCAAI,SAAS,EAC/C,QAAQ,EAAC,aAAa,EACtB,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,cAAM,OAAA,gBAAgB,CAAC,IAAI,CAAC,EAAtB,CAAsB,EACrC,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,cAAc,CAAC,MAAM,EAC1B,kBAAkB,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,GAC7C,CACI,CACT,CACO,CACX,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext } from 'react';\nimport clsx from 'clsx';\nimport { AppLayoutContext } from './context';\nimport { InternalButton } from '../../button/internal';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport { useFocusControl } from '../utils/use-focus-control';\n\n/**\n * The CSS class 'awsui-context-content-header' needs to be added to the root element so\n * that the design tokens used are overridden with the appropriate values.\n */\nexport default function AppBar() {\n const {\n ariaLabels,\n breadcrumbs,\n contentHeader,\n contentType,\n dynamicOverlapHeight,\n handleNavigationClick,\n handleToolsClick,\n hasNotificationsContent,\n isMobile,\n navigationHide,\n isNavigationOpen,\n isToolsOpen,\n toolsHide,\n isAnyPanelOpen,\n } = useContext(AppLayoutContext);\n const { refs: focusRefsNav } = useFocusControl(isNavigationOpen);\n const { refs: focusRefsTools } = useFocusControl(isToolsOpen, true);\n\n if (navigationHide && !breadcrumbs && toolsHide) {\n return null;\n }\n\n return (\n <section\n aria-hidden={!isMobile && !breadcrumbs ? true : undefined}\n className={clsx(\n styles.appbar,\n {\n [styles['has-breadcrumbs']]: breadcrumbs,\n [styles.unfocusable]: isMobile && isAnyPanelOpen,\n [testutilStyles['mobile-bar']]: isMobile,\n },\n 'awsui-context-content-header'\n )}\n >\n {!navigationHide && isMobile && (\n <nav\n className={clsx(styles['appbar-nav'], { [testutilStyles['drawer-closed']]: !isNavigationOpen })}\n aria-hidden={isNavigationOpen}\n >\n <InternalButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={isNavigationOpen}\n iconName=\"menu\"\n formAction=\"none\"\n onClick={() => handleNavigationClick(true)}\n variant=\"icon\"\n className={testutilStyles['navigation-toggle']}\n ref={focusRefsNav.toggle}\n disabled={isAnyPanelOpen}\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n </nav>\n )}\n\n {breadcrumbs && (\n <div\n className={clsx(styles.breadcrumbs, styles[`content-type-${contentType}`], testutilStyles.breadcrumbs, {\n [styles['has-dynamic-overlap-height']]: dynamicOverlapHeight > 0,\n [styles['has-header']]: contentHeader,\n [styles['has-notifications-content']]: hasNotificationsContent,\n })}\n >\n {breadcrumbs}\n </div>\n )}\n\n {!toolsHide && isMobile && (\n <aside\n className={clsx(styles['appbar-tools'], { [testutilStyles['drawer-closed']]: !isToolsOpen })}\n aria-hidden={isToolsOpen}\n aria-label={ariaLabels?.tools ?? undefined}\n >\n <InternalButton\n className={testutilStyles['tools-toggle']}\n ariaExpanded={isToolsOpen}\n disabled={isAnyPanelOpen}\n ariaLabel={ariaLabels?.toolsToggle ?? undefined}\n iconName=\"status-info\"\n formAction=\"none\"\n onClick={() => handleToolsClick(true)}\n variant=\"icon\"\n ref={focusRefsTools.toggle}\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n </aside>\n )}\n </section>\n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zB,+BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,YAAI,GAAC,cAAc,CAAC,eAAe,CAAC,IAAG,CAAC,WAAW,MAAG,iBAC/E,WAAW,gBACZ,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,mCAAI,SAAS;YAE1C,oBAAC,cAAc,IACb,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC,EACzC,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,mCAAI,SAAS,EAC/C,QAAQ,EAAC,aAAa,EACtB,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,cAAM,OAAA,gBAAgB,CAAC,IAAI,CAAC,EAAtB,CAAsB,EACrC,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,cAAc,CAAC,MAAM,EAC1B,kBAAkB,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,GAC7C,CACI,CACT,CACO,CACX,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext } from 'react';\nimport clsx from 'clsx';\nimport { AppLayoutContext } from './context';\nimport { InternalButton } from '../../button/internal';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport { useFocusControl } from '../utils/use-focus-control';\n\n/**\n * The CSS class 'awsui-context-content-header' needs to be added to the root element so\n * that the design tokens used are overridden with the appropriate values.\n */\nexport default function AppBar() {\n const {\n ariaLabels,\n breadcrumbs,\n contentHeader,\n contentType,\n dynamicOverlapHeight,\n handleNavigationClick,\n handleToolsClick,\n hasNotificationsContent,\n hasStickyBackground,\n isMobile,\n navigationHide,\n isNavigationOpen,\n isToolsOpen,\n toolsHide,\n isAnyPanelOpen,\n } = useContext(AppLayoutContext);\n const { refs: focusRefsNav } = useFocusControl(isNavigationOpen);\n const { refs: focusRefsTools } = useFocusControl(isToolsOpen, true);\n\n if (navigationHide && !breadcrumbs && toolsHide) {\n return null;\n }\n\n return (\n <section\n aria-hidden={!isMobile && !breadcrumbs ? true : undefined}\n className={clsx(\n styles.appbar,\n {\n [styles['has-breadcrumbs']]: breadcrumbs,\n [styles.unfocusable]: isMobile && isAnyPanelOpen,\n [testutilStyles['mobile-bar']]: isMobile,\n },\n 'awsui-context-content-header'\n )}\n >\n {!navigationHide && isMobile && (\n <nav\n className={clsx(styles['appbar-nav'], { [testutilStyles['drawer-closed']]: !isNavigationOpen })}\n aria-hidden={isNavigationOpen}\n >\n <InternalButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={isNavigationOpen}\n iconName=\"menu\"\n formAction=\"none\"\n onClick={() => handleNavigationClick(true)}\n variant=\"icon\"\n className={testutilStyles['navigation-toggle']}\n ref={focusRefsNav.toggle}\n disabled={isAnyPanelOpen}\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n </nav>\n )}\n\n {breadcrumbs && (\n <div\n className={clsx(styles.breadcrumbs, styles[`content-type-${contentType}`], testutilStyles.breadcrumbs, {\n [styles['has-dynamic-overlap-height']]: dynamicOverlapHeight > 0,\n [styles['has-header']]: contentHeader,\n [styles['has-notifications-content']]: hasNotificationsContent,\n [styles['has-sticky-background']]: hasStickyBackground,\n })}\n >\n {breadcrumbs}\n </div>\n )}\n\n {!toolsHide && isMobile && (\n <aside\n className={clsx(styles['appbar-tools'], { [testutilStyles['drawer-closed']]: !isToolsOpen })}\n aria-hidden={isToolsOpen}\n aria-label={ariaLabels?.tools ?? undefined}\n >\n <InternalButton\n className={testutilStyles['tools-toggle']}\n ariaExpanded={isToolsOpen}\n disabled={isAnyPanelOpen}\n ariaLabel={ariaLabels?.toolsToggle ?? undefined}\n iconName=\"status-info\"\n formAction=\"none\"\n onClick={() => handleToolsClick(true)}\n variant=\"icon\"\n ref={focusRefsTools.toggle}\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n </aside>\n )}\n </section>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/background.tsx"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,gBAejC"}
1
+ {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/background.tsx"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,gBAoBjC"}
@@ -9,13 +9,16 @@ import styles from './styles.css.js';
9
9
  * that the design tokens used are overridden with the appropriate values.
10
10
  */
11
11
  export default function Background() {
12
- var _a;
13
- var _b = useContext(AppLayoutContext), contentType = _b.contentType, hasNotificationsContent = _b.hasNotificationsContent, stickyNotifications = _b.stickyNotifications;
12
+ var _a, _b;
13
+ var _c = useContext(AppLayoutContext), hasNotificationsContent = _c.hasNotificationsContent, hasStickyBackground = _c.hasStickyBackground, stickyNotifications = _c.stickyNotifications;
14
14
  return (React.createElement("div", { className: clsx(styles.background, 'awsui-context-content-header') },
15
- React.createElement("div", { className: clsx(styles['notifications-appbar-header'], styles["content-type-".concat(contentType)], (_a = {},
15
+ React.createElement("div", { className: clsx(styles['notifications-appbar-header'], (_a = {},
16
16
  _a[styles['has-notifications-content']] = hasNotificationsContent,
17
+ _a[styles['has-sticky-background']] = hasStickyBackground,
17
18
  _a[styles['sticky-notifications']] = stickyNotifications,
18
19
  _a)) }),
19
- React.createElement("div", { className: clsx(styles.overlap, styles["content-type-".concat(contentType)]) })));
20
+ React.createElement("div", { className: clsx(styles.overlap, (_b = {},
21
+ _b[styles['has-sticky-background']] = hasStickyBackground,
22
+ _b)) })));
20
23
  }
21
24
  //# sourceMappingURL=background.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"background.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/background.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;;IAC1B,IAAA,KAAgE,UAAU,CAAC,gBAAgB,CAAC,EAA1F,WAAW,iBAAA,EAAE,uBAAuB,6BAAA,EAAE,mBAAmB,yBAAiC,CAAC;IAEnG,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,8BAA8B,CAAC;QACrE,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,6BAA6B,CAAC,EAAE,MAAM,CAAC,uBAAgB,WAAW,CAAE,CAAC;gBAC1F,GAAC,MAAM,CAAC,2BAA2B,CAAC,IAAG,uBAAuB;gBAC9D,GAAC,MAAM,CAAC,sBAAsB,CAAC,IAAG,mBAAmB;oBACrD,GACF;QAEF,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,uBAAgB,WAAW,CAAE,CAAC,CAAC,GAAI,CAC3E,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext } from 'react';\nimport clsx from 'clsx';\nimport { AppLayoutContext } from './context';\nimport styles from './styles.css.js';\n\n/**\n * The CSS class 'awsui-context-content-header' needs to be added to the root element so\n * that the design tokens used are overridden with the appropriate values.\n */\nexport default function Background() {\n const { contentType, hasNotificationsContent, stickyNotifications } = useContext(AppLayoutContext);\n\n return (\n <div className={clsx(styles.background, 'awsui-context-content-header')}>\n <div\n className={clsx(styles['notifications-appbar-header'], styles[`content-type-${contentType}`], {\n [styles['has-notifications-content']]: hasNotificationsContent,\n [styles['sticky-notifications']]: stickyNotifications,\n })}\n />\n\n <div className={clsx(styles.overlap, styles[`content-type-${contentType}`])} />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"background.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/background.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;;IAC1B,IAAA,KAAwE,UAAU,CAAC,gBAAgB,CAAC,EAAlG,uBAAuB,6BAAA,EAAE,mBAAmB,yBAAA,EAAE,mBAAmB,yBAAiC,CAAC;IAE3G,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,8BAA8B,CAAC;QACrE,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,6BAA6B,CAAC;gBACnD,GAAC,MAAM,CAAC,2BAA2B,CAAC,IAAG,uBAAuB;gBAC9D,GAAC,MAAM,CAAC,uBAAuB,CAAC,IAAG,mBAAmB;gBACtD,GAAC,MAAM,CAAC,sBAAsB,CAAC,IAAG,mBAAmB;oBACrD,GACF;QAEF,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;gBAC5B,GAAC,MAAM,CAAC,uBAAuB,CAAC,IAAG,mBAAmB;oBACtD,GACF,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext } from 'react';\nimport clsx from 'clsx';\nimport { AppLayoutContext } from './context';\nimport styles from './styles.css.js';\n\n/**\n * The CSS class 'awsui-context-content-header' needs to be added to the root element so\n * that the design tokens used are overridden with the appropriate values.\n */\nexport default function Background() {\n const { hasNotificationsContent, hasStickyBackground, stickyNotifications } = useContext(AppLayoutContext);\n\n return (\n <div className={clsx(styles.background, 'awsui-context-content-header')}>\n <div\n className={clsx(styles['notifications-appbar-header'], {\n [styles['has-notifications-content']]: hasNotificationsContent,\n [styles['has-sticky-background']]: hasStickyBackground,\n [styles['sticky-notifications']]: stickyNotifications,\n })}\n />\n\n <div\n className={clsx(styles.overlap, {\n [styles['has-sticky-background']]: hasStickyBackground,\n })}\n />\n </div>\n );\n}\n"]}
@@ -17,6 +17,7 @@ export declare const AppLayoutContext: React.Context<{
17
17
  handleToolsClick: (value: boolean) => void;
18
18
  hasDefaultToolsWidth: boolean;
19
19
  hasNotificationsContent: boolean;
20
+ hasStickyBackground: boolean;
20
21
  isAnyPanelOpen: boolean;
21
22
  isMobile: boolean;
22
23
  isNavigationOpen: boolean;
@@ -31,6 +32,7 @@ export declare const AppLayoutContext: React.Context<{
31
32
  notificationsHeight: number;
32
33
  offsetBottom: number;
33
34
  setDynamicOverlapHeight: (value: number) => void;
35
+ setHasStickyBackground: (value: boolean) => void;
34
36
  setIsNavigationOpen: (value: boolean) => void;
35
37
  setIsToolsOpen: (value: boolean) => void;
36
38
  setOffsetBottom: (value: number) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAW/C,OAAO,EAAE,iBAAiB,EAAmB,MAAM,4BAA4B,CAAC;AAkGhF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;0BApGL,MAAM;2BACL,MAAM,IAAI;oCACD,OAAO,KAAK,IAAI;gDACJ,eAAe,qBAAqB,KAAK,IAAI;qCACxD;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;8BAChC,OAAO,KAAK,IAAI;0BACpB,OAAO;6BACJ,OAAO;oBAChB,OAAO;cACb,OAAO;sBACC,OAAO;gCACG,OAAO;;iBAEtB,OAAO;mBACL,MAAM,GAAG,CAAC,WAAW,CAAC;iBACxB,MAAM;iBACN,MAAM,GAAG,CAAC,cAAc,CAAC;oBACtB,MAAM;0BACA,MAAM,GAAG,CAAC,cAAc,CAAC;yBAC1B,MAAM;kBACb,MAAM;qCACa,MAAM,KAAK,IAAI;iCACnB,OAAO,KAAK,IAAI;4BACrB,OAAO,KAAK,IAAI;6BACf,MAAM,KAAK,IAAI;uCACL,MAAM,KAAK,IAAI;kBACpC,MAAM;kBACN,MAAM;wBACA,MAAM;wBACN,MAAM;wBACN,eAAe,kBAAkB;4BAC7B,MAAM;uBACX,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEwB,CAAC;AAM/D,eAAO,MAAM,iBAAiB;cAHlB,MAAM,SAAS;4CA8a1B,CAAC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAW/C,OAAO,EAAE,iBAAiB,EAAmB,MAAM,4BAA4B,CAAC;AAsGhF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;0BAxGL,MAAM;2BACL,MAAM,IAAI;oCACD,OAAO,KAAK,IAAI;gDACJ,eAAe,qBAAqB,KAAK,IAAI;qCACxD;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;8BAChC,OAAO,KAAK,IAAI;0BACpB,OAAO;6BACJ,OAAO;yBACX,OAAO;oBACZ,OAAO;cACb,OAAO;sBACC,OAAO;gCACG,OAAO;;iBAEtB,OAAO;mBACL,MAAM,GAAG,CAAC,WAAW,CAAC;iBACxB,MAAM;iBACN,MAAM,GAAG,CAAC,cAAc,CAAC;oBACtB,MAAM;0BACA,MAAM,GAAG,CAAC,cAAc,CAAC;yBAC1B,MAAM;kBACb,MAAM;qCACa,MAAM,KAAK,IAAI;oCAChB,OAAO,KAAK,IAAI;iCACnB,OAAO,KAAK,IAAI;4BACrB,OAAO,KAAK,IAAI;6BACf,MAAM,KAAK,IAAI;uCACL,MAAM,KAAK,IAAI;kBACpC,MAAM;kBACN,MAAM;wBACA,MAAM;wBACN,MAAM;wBACN,eAAe,kBAAkB;4BAC7B,MAAM;uBACX,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsEwB,CAAC;AAM/D,eAAO,MAAM,iBAAiB;cAHlB,MAAM,SAAS;4CAmb1B,CAAC"}
@@ -32,6 +32,7 @@ var defaults = {
32
32
  handleToolsClick: function (value) { return value; },
33
33
  hasDefaultToolsWidth: true,
34
34
  hasNotificationsContent: false,
35
+ hasStickyBackground: false,
35
36
  isAnyPanelOpen: false,
36
37
  isMobile: false,
37
38
  isNavigationOpen: false,
@@ -57,6 +58,7 @@ var defaults = {
57
58
  onSplitPanelToggle: function () { },
58
59
  onSplitPanelPreferencesChange: function () { },
59
60
  setDynamicOverlapHeight: function (value) { return void value; },
61
+ setHasStickyBackground: function (value) { return value; },
60
62
  setIsNavigationOpen: function (value) { return value; },
61
63
  setIsToolsOpen: function (value) { return value; },
62
64
  setOffsetBottom: function (value) { return void value; },
@@ -90,8 +92,11 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
90
92
  /**
91
93
  * The overlap height has a default set in CSS but can also be dynamically overridden
92
94
  * for content types (such as Table and Wizard) that have variable size content in the overlap.
95
+ * If a child component utilizes a sticky header the hasStickyBackground property will determine
96
+ * if the background remains in the same vertical position.
93
97
  */
94
98
  var _h = useState(0), dynamicOverlapHeight = _h[0], setDynamicOverlapHeight = _h[1];
99
+ var _j = useState(false), hasStickyBackground = _j[0], setHasStickyBackground = _j[1];
95
100
  /**
96
101
  * Set the default values for minimum and maximum content width.
97
102
  */
@@ -122,7 +127,7 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
122
127
  * useControllable hook and also fire the onNavigationChange function to
123
128
  * emit the state change.
124
129
  */
125
- var _j = useControllable(controlledNavigationOpen, props.onNavigationChange, isMobile ? false : contentTypeDefaults.navigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }), _k = _j[0], isNavigationOpen = _k === void 0 ? false : _k, setIsNavigationOpen = _j[1];
130
+ var _k = useControllable(controlledNavigationOpen, props.onNavigationChange, isMobile ? false : contentTypeDefaults.navigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }), _l = _k[0], isNavigationOpen = _l === void 0 ? false : _l, setIsNavigationOpen = _k[1];
126
131
  var handleNavigationClick = useCallback(function handleNavigationChange(isOpen) {
127
132
  setIsNavigationOpen(isOpen);
128
133
  fireNonCancelableEvent(props.onNavigationChange, { open: isOpen });
@@ -140,7 +145,7 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
140
145
  */
141
146
  var toolsWidth = (_d = props.toolsWidth) !== null && _d !== void 0 ? _d : 290;
142
147
  var hasDefaultToolsWidth = props.toolsWidth === undefined;
143
- var _l = useControllable(controlledToolsOpen, props.onToolsChange, isMobile ? false : contentTypeDefaults.toolsOpen, { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }), _m = _l[0], isToolsOpen = _m === void 0 ? false : _m, setIsToolsOpen = _l[1];
148
+ var _m = useControllable(controlledToolsOpen, props.onToolsChange, isMobile ? false : contentTypeDefaults.toolsOpen, { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }), _o = _m[0], isToolsOpen = _o === void 0 ? false : _o, setIsToolsOpen = _m[1];
144
149
  var toolsFocusControl = useFocusControl(isToolsOpen, true);
145
150
  var handleToolsClick = useCallback(function handleToolsChange(isOpen) {
146
151
  setIsToolsOpen(isOpen);
@@ -188,10 +193,10 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
188
193
  * Query the DOM for the header and footer elements based on the selectors provided
189
194
  * by the properties and pass the heights to the custom property definitions.
190
195
  */
191
- var _o = useState(0), headerHeight = _o[0], setHeaderHeight = _o[1];
196
+ var _p = useState(0), headerHeight = _p[0], setHeaderHeight = _p[1];
192
197
  var getHeader = useCallback(function () { return document.querySelector(headerSelector); }, [headerSelector]);
193
198
  useResizeObserver(getHeader, function (entry) { return setHeaderHeight(entry.borderBoxHeight); });
194
- var _p = useState(0), footerHeight = _p[0], setFooterHeight = _p[1];
199
+ var _q = useState(0), footerHeight = _q[0], setFooterHeight = _q[1];
195
200
  var getFooter = useCallback(function () { return document.querySelector(footerSelector); }, [footerSelector]);
196
201
  useResizeObserver(getFooter, function (entry) { return setFooterHeight(entry.borderBoxHeight); });
197
202
  /**
@@ -202,7 +207,7 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
202
207
  * a forced position on the bottom.
203
208
  */
204
209
  var splitPanelMinWidth = 280;
205
- var _q = useState(splitPanelMinWidth), splitPanelMaxWidth = _q[0], setSplitPanelMaxWidth = _q[1];
210
+ var _r = useState(splitPanelMinWidth), splitPanelMaxWidth = _r[0], setSplitPanelMaxWidth = _r[1];
206
211
  /**
207
212
  * The useControllable hook will set the default value and manage either
208
213
  * the controlled or uncontrolled state of the Split Panel. By default
@@ -213,7 +218,7 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
213
218
  * to open or closed given the current state. It will set the isSplitPanelOpen
214
219
  * controlled state and fire the onSplitPanelToggle event.
215
220
  */
216
- var _r = useControllable(props.splitPanelOpen, props.onSplitPanelToggle, false, { componentName: 'AppLayout', controlledProp: 'splitPanelOpen', changeHandler: 'onSplitPanelToggle' }), isSplitPanelOpen = _r[0], setIsSplitPanelOpen = _r[1];
221
+ var _s = useControllable(props.splitPanelOpen, props.onSplitPanelToggle, false, { componentName: 'AppLayout', controlledProp: 'splitPanelOpen', changeHandler: 'onSplitPanelToggle' }), isSplitPanelOpen = _s[0], setIsSplitPanelOpen = _s[1];
217
222
  var handleSplitPanelClick = useCallback(function handleSplitPanelChange() {
218
223
  setIsSplitPanelOpen(!isSplitPanelOpen);
219
224
  fireNonCancelableEvent(props.onSplitPanelToggle, { open: !isSplitPanelOpen });
@@ -228,11 +233,11 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
228
233
  * object that will determine if the SplitPanel is rendered either on the
229
234
  * bottom of the viewport or within the Tools container.
230
235
  */
231
- var _s = useControllable(props.splitPanelPreferences, props.onSplitPanelPreferencesChange, undefined, {
236
+ var _t = useControllable(props.splitPanelPreferences, props.onSplitPanelPreferencesChange, undefined, {
232
237
  componentName: 'AppLayout',
233
238
  controlledProp: 'splitPanelPreferences',
234
239
  changeHandler: 'onSplitPanelPreferencesChange'
235
- }), splitPanelPreferences = _s[0], setSplitPanelPreferences = _s[1];
240
+ }), splitPanelPreferences = _t[0], setSplitPanelPreferences = _t[1];
236
241
  /**
237
242
  * The Split Panel will be in forced (bottom) position if the defined minimum width is
238
243
  * greater than the maximum width. In other words, the maximum width is the currently
@@ -240,7 +245,7 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
240
245
  * minimum width exceeds this value then there is not enough horizontal space and we must
241
246
  * force it to the bottom position.
242
247
  */
243
- var _t = useState(false), isSplitPanelForcedPosition = _t[0], setSplitPanelForcedPosition = _t[1];
248
+ var _u = useState(false), isSplitPanelForcedPosition = _u[0], setSplitPanelForcedPosition = _u[1];
244
249
  var splitPanelPosition = getSplitPanelPosition(isSplitPanelForcedPosition, splitPanelPreferences);
245
250
  useLayoutEffect(function handleSplitPanelForcePosition() {
246
251
  setSplitPanelForcedPosition(splitPanelMinWidth > splitPanelMaxWidth);
@@ -256,8 +261,8 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
256
261
  * It will set the splitPanelControlledSize controlled state and fire the
257
262
  * onSplitPanelResize event.
258
263
  */
259
- var _u = useState(0), splitPanelReportedSize = _u[0], setSplitPanelReportedSize = _u[1];
260
- var _v = useControllable(props.splitPanelSize, props.onSplitPanelResize, getSplitPanelDefaultSize(splitPanelPosition), { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' }), splitPanelSize = _v[0], setSplitPanelSize = _v[1];
264
+ var _v = useState(0), splitPanelReportedSize = _v[0], setSplitPanelReportedSize = _v[1];
265
+ var _w = useControllable(props.splitPanelSize, props.onSplitPanelResize, getSplitPanelDefaultSize(splitPanelPosition), { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' }), splitPanelSize = _w[0], setSplitPanelSize = _w[1];
261
266
  var handleSplitPanelResize = useCallback(function handleSplitPanelChange(detail) {
262
267
  setSplitPanelSize(detail.size);
263
268
  fireNonCancelableEvent(props.onSplitPanelResize, detail);
@@ -281,10 +286,10 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
281
286
  * This value is used to determine the max width constraint calculation
282
287
  * for the Tools container.
283
288
  */
284
- var _w = useContainerQuery(function (rect) { return rect.width; }), layoutContainerQuery = _w[0], layoutElement = _w[1];
289
+ var _x = useContainerQuery(function (rect) { return rect.width; }), layoutContainerQuery = _x[0], layoutElement = _x[1];
285
290
  var layoutWidth = layoutContainerQuery !== null && layoutContainerQuery !== void 0 ? layoutContainerQuery : 0;
286
291
  var mainElement = useRef(null);
287
- var _x = useState(0), mainOffsetLeft = _x[0], setMainOffsetLeft = _x[1];
292
+ var _y = useState(0), mainOffsetLeft = _y[0], setMainOffsetLeft = _y[1];
288
293
  useLayoutEffect(function handleMainOffsetLeft() {
289
294
  var _a, _b;
290
295
  setMainOffsetLeft((_b = (_a = mainElement === null || mainElement === void 0 ? void 0 : mainElement.current) === null || _a === void 0 ? void 0 : _a.offsetLeft) !== null && _b !== void 0 ? _b : 0);
@@ -330,9 +335,9 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
330
335
  * that it is not repeated in various components (such as AppBar) that need to
331
336
  * know if the notifications slot is empty.
332
337
  */
333
- var _y = useContainerQuery(function (rect) { return rect.height; }), notificationsContainerQuery = _y[0], notificationsElement = _y[1];
334
- var _z = useState(0), notificationsHeight = _z[0], setNotificationsHeight = _z[1];
335
- var _0 = useState(false), hasNotificationsContent = _0[0], setHasNotificationsContent = _0[1];
338
+ var _z = useContainerQuery(function (rect) { return rect.height; }), notificationsContainerQuery = _z[0], notificationsElement = _z[1];
339
+ var _0 = useState(0), notificationsHeight = _0[0], setNotificationsHeight = _0[1];
340
+ var _1 = useState(false), hasNotificationsContent = _1[0], setHasNotificationsContent = _1[1];
336
341
  useEffect(function handleNotificationsContent() {
337
342
  setNotificationsHeight(notificationsContainerQuery !== null && notificationsContainerQuery !== void 0 ? notificationsContainerQuery : 0);
338
343
  setHasNotificationsContent(notificationsContainerQuery && notificationsContainerQuery > 0 ? true : false);
@@ -343,7 +348,7 @@ export var AppLayoutProvider = React.forwardRef(function (_a, forwardRef) {
343
348
  * is either a footer outside of the AppLayout, a SplitPanel in the bottom position
344
349
  * within the AppLayout, or both.
345
350
  */
346
- var _1 = useState(0), offsetBottom = _1[0], setOffsetBottom = _1[1];
347
- return (React.createElement(AppLayoutContext.Provider, { value: __assign(__assign(__assign({}, defaults), props), { contentType: contentType, dynamicOverlapHeight: dynamicOverlapHeight, headerHeight: headerHeight, footerHeight: footerHeight, hasDefaultToolsWidth: hasDefaultToolsWidth, handleNavigationClick: handleNavigationClick, handleSplitPanelClick: handleSplitPanelClick, handleSplitPanelPreferencesChange: handleSplitPanelPreferencesChange, handleSplitPanelResize: handleSplitPanelResize, handleToolsClick: handleToolsClick, hasNotificationsContent: hasNotificationsContent, isAnyPanelOpen: isAnyPanelOpen, isMobile: isMobile, isNavigationOpen: isNavigationOpen !== null && isNavigationOpen !== void 0 ? isNavigationOpen : false, isSplitPanelForcedPosition: isSplitPanelForcedPosition, isSplitPanelOpen: isSplitPanelOpen, isToolsOpen: isToolsOpen, layoutElement: layoutElement, layoutWidth: layoutWidth, mainElement: mainElement, mainOffsetLeft: mainOffsetLeft, maxContentWidth: maxContentWidth, minContentWidth: minContentWidth, navigationHide: navigationHide, notificationsElement: notificationsElement, notificationsHeight: notificationsHeight, offsetBottom: offsetBottom, setDynamicOverlapHeight: setDynamicOverlapHeight, setOffsetBottom: setOffsetBottom, setSplitPanelReportedSize: setSplitPanelReportedSize, splitPanelMaxWidth: splitPanelMaxWidth, splitPanelMinWidth: splitPanelMinWidth, splitPanelPosition: splitPanelPosition, splitPanelPreferences: splitPanelPreferences, splitPanelReportedSize: splitPanelReportedSize, splitPanelSize: splitPanelSize, toolsHide: toolsHide, toolsOpen: isToolsOpen, toolsWidth: toolsWidth, toolsFocusControl: toolsFocusControl }) }, children));
351
+ var _2 = useState(0), offsetBottom = _2[0], setOffsetBottom = _2[1];
352
+ return (React.createElement(AppLayoutContext.Provider, { value: __assign(__assign(__assign({}, defaults), props), { contentType: contentType, dynamicOverlapHeight: dynamicOverlapHeight, headerHeight: headerHeight, footerHeight: footerHeight, hasDefaultToolsWidth: hasDefaultToolsWidth, handleNavigationClick: handleNavigationClick, handleSplitPanelClick: handleSplitPanelClick, handleSplitPanelPreferencesChange: handleSplitPanelPreferencesChange, handleSplitPanelResize: handleSplitPanelResize, handleToolsClick: handleToolsClick, hasNotificationsContent: hasNotificationsContent, hasStickyBackground: hasStickyBackground, isAnyPanelOpen: isAnyPanelOpen, isMobile: isMobile, isNavigationOpen: isNavigationOpen !== null && isNavigationOpen !== void 0 ? isNavigationOpen : false, isSplitPanelForcedPosition: isSplitPanelForcedPosition, isSplitPanelOpen: isSplitPanelOpen, isToolsOpen: isToolsOpen, layoutElement: layoutElement, layoutWidth: layoutWidth, mainElement: mainElement, mainOffsetLeft: mainOffsetLeft, maxContentWidth: maxContentWidth, minContentWidth: minContentWidth, navigationHide: navigationHide, notificationsElement: notificationsElement, notificationsHeight: notificationsHeight, offsetBottom: offsetBottom, setDynamicOverlapHeight: setDynamicOverlapHeight, setHasStickyBackground: setHasStickyBackground, setOffsetBottom: setOffsetBottom, setSplitPanelReportedSize: setSplitPanelReportedSize, splitPanelMaxWidth: splitPanelMaxWidth, splitPanelMinWidth: splitPanelMinWidth, splitPanelPosition: splitPanelPosition, splitPanelPreferences: splitPanelPreferences, splitPanelReportedSize: splitPanelReportedSize, splitPanelSize: splitPanelSize, toolsHide: toolsHide, toolsOpen: isToolsOpen, toolsWidth: toolsWidth, toolsFocusControl: toolsFocusControl }) }, children));
348
353
  });
349
354
  //# sourceMappingURL=context.js.map