@cloudscape-design/components 3.0.245 → 3.0.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js +1 -3
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/drawer/index.d.ts +3 -21
- package/app-layout/drawer/index.d.ts.map +1 -1
- package/app-layout/drawer/index.js +25 -5
- package/app-layout/drawer/index.js.map +1 -1
- package/app-layout/drawer/interfaces.d.ts +84 -0
- package/app-layout/drawer/interfaces.d.ts.map +1 -0
- package/app-layout/drawer/interfaces.js +2 -0
- package/app-layout/drawer/interfaces.js.map +1 -0
- package/app-layout/drawer/resizable-drawer.d.ts +4 -0
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -0
- package/app-layout/drawer/resizable-drawer.js +51 -0
- package/app-layout/drawer/resizable-drawer.js.map +1 -0
- package/app-layout/drawer/styles.css.js +10 -5
- package/app-layout/drawer/styles.scoped.css +46 -10
- package/app-layout/drawer/styles.selectors.js +10 -5
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +142 -17
- package/app-layout/index.js.map +1 -1
- package/app-layout/mobile-toolbar/index.d.ts +10 -1
- package/app-layout/mobile-toolbar/index.d.ts.map +1 -1
- package/app-layout/mobile-toolbar/index.js +3 -2
- package/app-layout/mobile-toolbar/index.js.map +1 -1
- package/app-layout/mobile-toolbar/styles.css.js +5 -4
- package/app-layout/mobile-toolbar/styles.scoped.css +11 -7
- package/app-layout/mobile-toolbar/styles.selectors.js +5 -4
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/test-classes/styles.css.js +18 -13
- package/app-layout/test-classes/styles.scoped.css +33 -13
- package/app-layout/test-classes/styles.selectors.js +18 -13
- package/app-layout/toggles/index.d.ts.map +1 -1
- package/app-layout/toggles/index.js +2 -2
- package/app-layout/toggles/index.js.map +1 -1
- package/app-layout/toggles/interfaces.d.ts +3 -1
- package/app-layout/toggles/interfaces.d.ts.map +1 -1
- package/app-layout/toggles/interfaces.js.map +1 -1
- package/app-layout/utils/use-drawer-focus-control.d.ts +21 -0
- package/app-layout/utils/use-drawer-focus-control.d.ts.map +1 -0
- package/app-layout/utils/use-drawer-focus-control.js +65 -0
- package/app-layout/utils/use-drawer-focus-control.js.map +1 -0
- package/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
- package/app-layout/visual-refresh/app-bar.js +8 -6
- package/app-layout/visual-refresh/app-bar.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts +13 -5
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +104 -49
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.d.ts +47 -0
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -0
- package/app-layout/visual-refresh/drawers.js +127 -0
- package/app-layout/visual-refresh/drawers.js.map +1 -0
- package/app-layout/visual-refresh/header.js +2 -2
- package/app-layout/visual-refresh/header.js.map +1 -1
- package/app-layout/visual-refresh/index.d.ts.map +1 -1
- package/app-layout/visual-refresh/index.js +3 -1
- package/app-layout/visual-refresh/index.js.map +1 -1
- package/app-layout/visual-refresh/layout.d.ts.map +1 -1
- package/app-layout/visual-refresh/layout.js +5 -42
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.js +2 -3
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/navigation.js +2 -2
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh/notifications.js +2 -2
- package/app-layout/visual-refresh/notifications.js.map +1 -1
- package/app-layout/visual-refresh/split-panel.js +2 -2
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +71 -61
- package/app-layout/visual-refresh/styles.scoped.css +437 -229
- package/app-layout/visual-refresh/styles.selectors.js +71 -61
- package/app-layout/visual-refresh/tools.d.ts.map +1 -1
- package/app-layout/visual-refresh/tools.js +7 -3
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.d.ts +4 -3
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +5 -6
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/area-chart/internal.js +1 -1
- package/area-chart/internal.js.map +1 -1
- package/breadcrumb-group/item/item.d.ts.map +1 -1
- package/breadcrumb-group/item/item.js +2 -5
- package/breadcrumb-group/item/item.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +9 -9
- package/breadcrumb-group/item/styles.scoped.css +17 -17
- package/breadcrumb-group/item/styles.selectors.js +9 -9
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -3
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +19 -18
- package/button/styles.scoped.css +136 -136
- package/button/styles.selectors.js +19 -18
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/grid/index.js +2 -4
- package/calendar/grid/index.js.map +1 -1
- package/calendar/styles.css.js +18 -18
- package/calendar/styles.scoped.css +38 -38
- package/calendar/styles.selectors.js +18 -18
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +109 -109
- package/code-editor/styles.selectors.js +32 -32
- package/code-editor/tab-button.d.ts.map +1 -1
- package/code-editor/tab-button.js +2 -4
- package/code-editor/tab-button.js.map +1 -1
- package/date-picker/index.d.ts.map +1 -1
- package/date-picker/index.js +1 -3
- package/date-picker/index.js.map +1 -1
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +9 -9
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +1 -3
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +1 -3
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +25 -25
- package/date-range-picker/calendar/grids/styles.scoped.css +42 -42
- package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +1 -3
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +45 -45
- package/date-range-picker/styles.selectors.js +38 -38
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +3 -7
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +23 -23
- package/expandable-section/styles.scoped.css +44 -44
- package/expandable-section/styles.selectors.js +23 -23
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +1 -3
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js +1 -3
- package/flashbar/flash.js.map +1 -1
- package/flashbar/styles.css.js +45 -45
- package/flashbar/styles.scoped.css +169 -169
- package/flashbar/styles.selectors.js +45 -45
- package/internal/base-component/styles.scoped.css +24 -0
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +8 -4
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +13 -13
- package/internal/components/abstract-switch/styles.scoped.css +19 -19
- package/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +1 -3
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +9 -9
- package/internal/components/button-trigger/styles.scoped.css +23 -23
- package/internal/components/button-trigger/styles.selectors.js +9 -9
- package/internal/components/chart-legend/index.d.ts.map +1 -1
- package/internal/components/chart-legend/index.js +2 -4
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +15 -15
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
- package/internal/components/chart-plot/focus-outline.js +25 -3
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/filtering-token/index.d.ts +2 -1
- package/internal/components/filtering-token/index.d.ts.map +1 -1
- package/internal/components/filtering-token/index.js +3 -5
- package/internal/components/filtering-token/index.js.map +1 -1
- package/internal/components/filtering-token/styles.css.js +7 -7
- package/internal/components/filtering-token/styles.scoped.css +13 -13
- package/internal/components/filtering-token/styles.selectors.js +7 -7
- package/internal/components/menu-dropdown/index.d.ts.map +1 -1
- package/internal/components/menu-dropdown/index.js +2 -4
- package/internal/components/menu-dropdown/index.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +13 -13
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/token-list/index.d.ts +1 -1
- package/internal/components/token-list/index.d.ts.map +1 -1
- package/internal/components/token-list/index.js +3 -3
- package/internal/components/token-list/index.js.map +1 -1
- package/internal/components/token-list/interfaces.d.ts +0 -1
- package/internal/components/token-list/interfaces.d.ts.map +1 -1
- package/internal/components/token-list/interfaces.js.map +1 -1
- package/internal/components/token-list/styles.css.js +9 -9
- package/internal/components/token-list/styles.scoped.css +20 -20
- package/internal/components/token-list/styles.selectors.js +9 -9
- package/internal/components/token-list/token-focus-controller.js +1 -1
- package/internal/components/token-list/token-focus-controller.js.map +1 -1
- package/internal/components/token-list/token-limit-toggle.d.ts.map +1 -1
- package/internal/components/token-list/token-limit-toggle.js +1 -3
- package/internal/components/token-list/token-limit-toggle.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +31 -30
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/generated/styles/tokens.d.ts +2 -0
- package/internal/generated/styles/tokens.js +2 -0
- package/internal/generated/theming/index.cjs +140 -0
- package/internal/generated/theming/index.js +140 -0
- package/internal/hooks/focus-visible/index.d.ts +2 -5
- package/internal/hooks/focus-visible/index.d.ts.map +1 -1
- package/internal/hooks/focus-visible/index.js +42 -22
- package/internal/hooks/focus-visible/index.js.map +1 -1
- package/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/internal/hooks/use-base-component/index.js +2 -0
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +1 -3
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +71 -71
- package/link/styles.selectors.js +20 -20
- package/mixed-line-bar-chart/internal.js +1 -1
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/package.json +1 -1
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +1 -3
- package/pagination/internal.js.map +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +23 -23
- package/pagination/styles.selectors.js +9 -9
- package/pie-chart/index.js +1 -1
- package/pie-chart/index.js.map +1 -1
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +1 -3
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +63 -63
- package/popover/styles.selectors.js +50 -50
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +2 -2
- package/property-filter/index.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +1 -1
- package/property-filter/token.js.map +1 -1
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +1 -3
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +33 -33
- package/segmented-control/styles.selectors.js +14 -14
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +2 -5
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/styles.css.js +27 -27
- package/side-navigation/styles.scoped.css +37 -37
- package/side-navigation/styles.selectors.js +27 -27
- package/space-between/internal.js +1 -1
- package/space-between/internal.js.map +1 -1
- package/space-between/styles.css.js +20 -28
- package/space-between/styles.scoped.css +37 -101
- package/space-between/styles.selectors.js +20 -28
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +1 -3
- package/split-panel/index.js.map +1 -1
- package/split-panel/styles.css.js +59 -59
- package/split-panel/styles.scoped.css +81 -81
- package/split-panel/styles.selectors.js +59 -59
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +3 -3
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/styles.css.js +18 -18
- package/table/body-cell/styles.scoped.css +57 -55
- package/table/body-cell/styles.selectors.js +18 -18
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +11 -9
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +19 -19
- package/table/header-cell/styles.scoped.css +32 -32
- package/table/header-cell/styles.selectors.js +19 -19
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +1 -3
- package/table/internal.js.map +1 -1
- package/table/resizer/styles.css.js +6 -6
- package/table/resizer/styles.scoped.css +11 -11
- package/table/resizer/styles.selectors.js +6 -6
- package/table/styles.css.js +33 -33
- package/table/styles.scoped.css +41 -41
- package/table/styles.selectors.js +33 -33
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +8 -3
- package/tabs/index.js.map +1 -1
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +38 -38
- package/tabs/styles.selectors.js +21 -21
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +9 -3
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js +2 -4
- package/tag-editor/internal.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +10 -10
- package/tag-editor/styles.selectors.js +3 -3
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/dismiss-button.js +1 -3
- package/token-group/dismiss-button.js.map +1 -1
- package/token-group/internal.js +2 -2
- package/token-group/internal.js.map +1 -1
- package/token-group/styles.css.js +5 -5
- package/token-group/styles.scoped.css +12 -12
- package/token-group/styles.selectors.js +5 -5
- package/token-group/token.d.ts +3 -5
- package/token-group/token.d.ts.map +1 -1
- package/token-group/token.js +2 -2
- package/token-group/token.js.map +1 -1
- package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/top-navigation/1.0-beta/internal.js +1 -3
- package/top-navigation/1.0-beta/internal.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +42 -42
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/internal.js +1 -3
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +3 -7
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +66 -66
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +1 -3
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +27 -27
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/wizard/styles.css.js +32 -32
- package/wizard/styles.scoped.css +63 -63
- package/wizard/styles.selectors.js +32 -32
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -3
- package/wizard/wizard-form.js.map +1 -1
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"toggle": "
|
|
5
|
-
"drawer": "
|
|
6
|
-
"drawer
|
|
7
|
-
"drawer-
|
|
8
|
-
"drawer-
|
|
4
|
+
"toggle": "awsui_toggle_1uo6m_y69q2_97",
|
|
5
|
+
"drawer-triggers": "awsui_drawer-triggers_1uo6m_y69q2_102",
|
|
6
|
+
"drawer": "awsui_drawer_1uo6m_y69q2_102",
|
|
7
|
+
"drawer-mobile": "awsui_drawer-mobile_1uo6m_y69q2_112",
|
|
8
|
+
"drawer-closed": "awsui_drawer-closed_1uo6m_y69q2_115",
|
|
9
|
+
"drawer-content": "awsui_drawer-content_1uo6m_y69q2_123",
|
|
10
|
+
"non-interactive": "awsui_non-interactive_1uo6m_y69q2_141",
|
|
11
|
+
"trigger": "awsui_trigger_1uo6m_y69q2_149",
|
|
12
|
+
"trigger-drawer": "awsui_trigger-drawer_1uo6m_y69q2_158",
|
|
13
|
+
"selected": "awsui_selected_1uo6m_y69q2_158"
|
|
9
14
|
};
|
|
10
15
|
|
|
@@ -94,46 +94,82 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
97
|
+
.awsui_toggle_1uo6m_y69q2_97:not(#\9) {
|
|
98
98
|
box-sizing: border-box;
|
|
99
99
|
padding: var(--space-xxs-ynfts5, 4px) 7px;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102:not(#\9) {
|
|
103
|
+
box-sizing: border-box;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.awsui_drawer_1uo6m_y69q2_102:not(#\9) {
|
|
103
107
|
flex-shrink: 0;
|
|
104
108
|
position: relative;
|
|
105
109
|
word-wrap: break-word;
|
|
106
110
|
box-shadow: var(--shadow-panel-gp3bf2, 0px 1px 1px 1px #e9ebed, 0px 6px 36px rgba(0, 7, 22, 0.1));
|
|
107
111
|
}
|
|
108
|
-
.
|
|
112
|
+
.awsui_drawer_1uo6m_y69q2_102:not(#\9):not(.awsui_drawer-mobile_1uo6m_y69q2_112) {
|
|
109
113
|
z-index: 830;
|
|
110
114
|
}
|
|
111
|
-
.awsui_drawer-
|
|
115
|
+
.awsui_drawer-closed_1uo6m_y69q2_115:not(#\9) {
|
|
112
116
|
min-width: 40px;
|
|
113
117
|
cursor: pointer;
|
|
114
118
|
}
|
|
115
|
-
.awsui_drawer-
|
|
119
|
+
.awsui_drawer-closed_1uo6m_y69q2_115.awsui_drawer-mobile_1uo6m_y69q2_112:not(#\9) {
|
|
116
120
|
display: none;
|
|
117
121
|
}
|
|
118
122
|
|
|
119
|
-
.awsui_drawer-
|
|
123
|
+
.awsui_drawer-content_1uo6m_y69q2_123:not(#\9) {
|
|
120
124
|
position: fixed;
|
|
121
125
|
overflow: auto;
|
|
122
126
|
background-color: var(--color-background-layout-panel-content-808qum, #ffffff);
|
|
123
127
|
}
|
|
124
|
-
.awsui_drawer-
|
|
128
|
+
.awsui_drawer-mobile_1uo6m_y69q2_112 > .awsui_drawer-content_1uo6m_y69q2_123:not(#\9) {
|
|
125
129
|
z-index: 1001;
|
|
126
130
|
top: 0;
|
|
127
131
|
bottom: 0;
|
|
128
132
|
left: 0;
|
|
129
133
|
right: 0;
|
|
130
134
|
}
|
|
131
|
-
.awsui_drawer-
|
|
135
|
+
.awsui_drawer-closed_1uo6m_y69q2_115 > .awsui_drawer-content_1uo6m_y69q2_123:not(#\9) {
|
|
132
136
|
width: 40px;
|
|
133
137
|
}
|
|
134
|
-
.awsui_drawer-
|
|
138
|
+
.awsui_drawer-closed_1uo6m_y69q2_115 > .awsui_drawer-content_1uo6m_y69q2_123:not(#\9):hover {
|
|
135
139
|
background: var(--color-background-layout-panel-hover-0bg3gq, #e9ebed);
|
|
136
140
|
}
|
|
137
|
-
.awsui_drawer-
|
|
141
|
+
.awsui_drawer-closed_1uo6m_y69q2_115 > .awsui_drawer-content_1uo6m_y69q2_123.awsui_non-interactive_1uo6m_y69q2_141:not(#\9):hover {
|
|
142
|
+
background: var(--color-background-layout-panel-content-808qum, #ffffff);
|
|
143
|
+
cursor: default;
|
|
144
|
+
}
|
|
145
|
+
.awsui_drawer-content_1uo6m_y69q2_123 > [aria-hidden=true]:not(#\9) {
|
|
138
146
|
display: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102 > .awsui_trigger_1uo6m_y69q2_149:not(#\9) {
|
|
150
|
+
padding: var(--space-scaled-xs-6859qs, 8px) 6px;
|
|
151
|
+
margin: 1px 6px;
|
|
152
|
+
border-radius: 0;
|
|
153
|
+
border: 0;
|
|
154
|
+
}
|
|
155
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102 > .awsui_trigger_1uo6m_y69q2_149:not(#\9):not(:last-child) {
|
|
156
|
+
box-shadow: 0px 1px var(--color-shadow-layout-panel-trigger-t4yazw, #d1d5db);
|
|
157
|
+
}
|
|
158
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102 > .awsui_trigger-drawer_1uo6m_y69q2_158:not(#\9):hover:not(.awsui_selected_1uo6m_y69q2_158) {
|
|
159
|
+
color: var(--color-text-layout-panel-trigger-hover-yw2kb4, #0972d3);
|
|
160
|
+
}
|
|
161
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102 > .awsui_trigger-drawer_1uo6m_y69q2_158:not(#\9):hover:not(.awsui_selected_1uo6m_y69q2_158):not(:last-child) {
|
|
162
|
+
box-shadow: 0px 1px var(--color-shadow-layout-panel-trigger-t4yazw, #d1d5db);
|
|
163
|
+
}
|
|
164
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102 > .awsui_trigger_1uo6m_y69q2_149.awsui_selected_1uo6m_y69q2_158:not(#\9) {
|
|
165
|
+
padding: var(--space-scaled-xs-6859qs, 8px) var(--space-s-hv8c1d, 12px);
|
|
166
|
+
margin: 0;
|
|
167
|
+
border-top: 1px solid var(--color-background-layout-panel-trigger-active-uf4o0r, #00142b);
|
|
168
|
+
border-bottom: 1px solid var(--color-background-layout-panel-trigger-active-uf4o0r, #00142b);
|
|
169
|
+
background-color: var(--color-background-layout-panel-trigger-active-uf4o0r, #00142b);
|
|
170
|
+
color: var(--color-text-layout-panel-trigger-active-mt4zu0, #ffffff);
|
|
171
|
+
box-shadow: none;
|
|
172
|
+
}
|
|
173
|
+
.awsui_drawer-triggers_1uo6m_y69q2_102 > .awsui_trigger_1uo6m_y69q2_149.awsui_selected_1uo6m_y69q2_158:not(#\9):hover {
|
|
174
|
+
cursor: default;
|
|
139
175
|
}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"toggle": "
|
|
6
|
-
"drawer": "
|
|
7
|
-
"drawer
|
|
8
|
-
"drawer-
|
|
9
|
-
"drawer-
|
|
5
|
+
"toggle": "awsui_toggle_1uo6m_y69q2_97",
|
|
6
|
+
"drawer-triggers": "awsui_drawer-triggers_1uo6m_y69q2_102",
|
|
7
|
+
"drawer": "awsui_drawer_1uo6m_y69q2_102",
|
|
8
|
+
"drawer-mobile": "awsui_drawer-mobile_1uo6m_y69q2_112",
|
|
9
|
+
"drawer-closed": "awsui_drawer-closed_1uo6m_y69q2_115",
|
|
10
|
+
"drawer-content": "awsui_drawer-content_1uo6m_y69q2_123",
|
|
11
|
+
"non-interactive": "awsui_non-interactive_1uo6m_y69q2_141",
|
|
12
|
+
"trigger": "awsui_trigger_1uo6m_y69q2_149",
|
|
13
|
+
"trigger-drawer": "awsui_trigger-drawer_1uo6m_y69q2_158",
|
|
14
|
+
"selected": "awsui_selected_1uo6m_y69q2_158"
|
|
10
15
|
};
|
|
11
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["app-layout/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["app-layout/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAyC9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FA8Bd,CAAC;AAsqBF,eAAe,SAAS,CAAC"}
|
package/app-layout/index.js
CHANGED
|
@@ -25,7 +25,9 @@ import { CONSTRAINED_MAIN_PANEL_MIN_HEIGHT, CONSTRAINED_PAGE_HEIGHT, getSplitPan
|
|
|
25
25
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
26
26
|
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
27
27
|
import ContentWrapper from './content-wrapper';
|
|
28
|
-
import { Drawer } from './drawer';
|
|
28
|
+
import { Drawer, DrawerTriggersBar } from './drawer';
|
|
29
|
+
import { ResizableDrawer } from './drawer/resizable-drawer';
|
|
30
|
+
import { togglesConfig } from './toggles';
|
|
29
31
|
import { SideSplitPanelDrawer } from './split-panel-drawer';
|
|
30
32
|
import useAppLayoutOffsets from './utils/use-content-width';
|
|
31
33
|
import { isDevelopment } from '../internal/is-development';
|
|
@@ -33,6 +35,7 @@ import { warnOnce } from '../internal/logging';
|
|
|
33
35
|
import RefreshedAppLayout from './visual-refresh';
|
|
34
36
|
import { useInternalI18n } from '../internal/i18n/context';
|
|
35
37
|
import { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';
|
|
38
|
+
import { useDrawerFocusControl } from './utils/use-drawer-focus-control';
|
|
36
39
|
const AppLayout = React.forwardRef((_a, ref) => {
|
|
37
40
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
38
41
|
var { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f' } = _a, rest = __rest(_a, ["contentType", "headerSelector", "footerSelector"]);
|
|
@@ -53,20 +56,52 @@ const AppLayout = React.forwardRef((_a, ref) => {
|
|
|
53
56
|
const baseProps = getBaseProps(rest);
|
|
54
57
|
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 }))));
|
|
55
58
|
});
|
|
56
|
-
const OldAppLayout = React.forwardRef((
|
|
57
|
-
var
|
|
59
|
+
const OldAppLayout = React.forwardRef((_a, ref) => {
|
|
60
|
+
var _b;
|
|
61
|
+
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"]);
|
|
58
62
|
if (isDevelopment) {
|
|
59
63
|
if (controlledToolsOpen && toolsHide) {
|
|
60
64
|
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\`.`);
|
|
61
65
|
}
|
|
62
66
|
}
|
|
67
|
+
const drawers = props.drawers;
|
|
63
68
|
const rootRef = useRef(null);
|
|
64
69
|
const isMobile = useMobile();
|
|
65
70
|
const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);
|
|
66
71
|
const [navigationOpen = false, setNavigationOpen] = useControllable(controlledNavigationOpen, onNavigationChange, isMobile ? false : defaults.navigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' });
|
|
67
72
|
const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, isMobile ? false : defaults.toolsOpen, { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' });
|
|
73
|
+
const [activeDrawerId, setActiveDrawersId] = useControllable(drawers === null || drawers === void 0 ? void 0 : drawers.activeDrawerId, drawers === null || drawers === void 0 ? void 0 : drawers.onChange, isMobile ? false : tools ? defaults.toolsOpen : '', {
|
|
74
|
+
componentName: 'AppLayout',
|
|
75
|
+
controlledProp: 'activeDrawerId',
|
|
76
|
+
changeHandler: 'onChange',
|
|
77
|
+
});
|
|
78
|
+
const { iconName, getLabels } = togglesConfig.tools;
|
|
79
|
+
const { mainLabel, closeLabel, openLabel } = getLabels(ariaLabels);
|
|
80
|
+
const toolsItem = {
|
|
81
|
+
id: 'tools',
|
|
82
|
+
content: tools,
|
|
83
|
+
ariaLabels: {
|
|
84
|
+
triggerButton: openLabel,
|
|
85
|
+
closeButton: closeLabel,
|
|
86
|
+
content: mainLabel,
|
|
87
|
+
},
|
|
88
|
+
trigger: {
|
|
89
|
+
iconName: iconName,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
const getAllDrawerItems = () => {
|
|
93
|
+
if (drawers) {
|
|
94
|
+
return tools ? [toolsItem, ...drawers.items] : drawers.items;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const selectedDrawer = tools && toolsOpen
|
|
98
|
+
? toolsItem
|
|
99
|
+
: drawers &&
|
|
100
|
+
drawers.items &&
|
|
101
|
+
getAllDrawerItems().filter((drawerItem) => drawerItem.id === activeDrawerId)[0];
|
|
68
102
|
const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);
|
|
69
|
-
const { refs: toolsRefs, setFocus: focusToolsButtons, loseFocus: loseToolsFocus, } = useFocusControl(toolsOpen, true);
|
|
103
|
+
const { refs: toolsRefs, setFocus: focusToolsButtons, loseFocus: loseToolsFocus, } = useFocusControl(toolsOpen || activeDrawerId, true);
|
|
104
|
+
const { refs: drawerRefs, setFocus: focusDrawersButtons, loseFocus: loseDrawersFocus, setLastInteraction: setDrawerLastInteraction, } = useDrawerFocusControl([selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.resizable], toolsOpen || activeDrawerId, true);
|
|
70
105
|
const onNavigationToggle = useCallback((open) => {
|
|
71
106
|
setNavigationOpen(open);
|
|
72
107
|
focusNavButtons();
|
|
@@ -87,6 +122,7 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
87
122
|
const toolsVisible = !toolsHide && toolsOpen;
|
|
88
123
|
const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(headerSelector, footerSelector, disableBodyScroll);
|
|
89
124
|
const [isSplitpanelForcedPosition, setIsSplitpanelForcedPosition] = useState(false);
|
|
125
|
+
const [isResizeInvalid, setIsResizeInvalid] = useState(false);
|
|
90
126
|
const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.height);
|
|
91
127
|
const anyPanelOpen = navigationVisible || toolsVisible;
|
|
92
128
|
const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;
|
|
@@ -101,6 +137,12 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
101
137
|
controlledProp: 'splitPanelOpen',
|
|
102
138
|
changeHandler: 'onSplitPanelToggle',
|
|
103
139
|
});
|
|
140
|
+
const defaultDrawerSize = (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.size) || toolsWidth;
|
|
141
|
+
const [drawerSize = defaultDrawerSize, setDrawerSize] = useControllable(selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.size, drawers === null || drawers === void 0 ? void 0 : drawers.onResize, defaultDrawerSize, {
|
|
142
|
+
componentName: 'AppLayout',
|
|
143
|
+
controlledProp: 'drawerSize',
|
|
144
|
+
changeHandler: 'onDrawerSize',
|
|
145
|
+
});
|
|
104
146
|
const splitPanelPosition = (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) || 'bottom';
|
|
105
147
|
const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState({
|
|
106
148
|
displayed: false,
|
|
@@ -109,11 +151,19 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
109
151
|
const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));
|
|
110
152
|
const closedDrawerWidth = 40;
|
|
111
153
|
const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;
|
|
112
|
-
const
|
|
113
|
-
? 0
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
154
|
+
const getEffectiveToolsWidth = () => {
|
|
155
|
+
if (toolsHide && (!splitPanelDisplayed || (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) !== 'side') && !drawers) {
|
|
156
|
+
return 0;
|
|
157
|
+
}
|
|
158
|
+
if (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.resizable) {
|
|
159
|
+
return drawerSize;
|
|
160
|
+
}
|
|
161
|
+
if (toolsOpen || activeDrawerId) {
|
|
162
|
+
return toolsWidth;
|
|
163
|
+
}
|
|
164
|
+
return closedDrawerWidth;
|
|
165
|
+
};
|
|
166
|
+
const effectiveToolsWidth = getEffectiveToolsWidth();
|
|
117
167
|
const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);
|
|
118
168
|
const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(controlledSplitPanelSize, onSplitPanelResize, defaultSplitPanelSize, {
|
|
119
169
|
componentName: 'AppLayout',
|
|
@@ -135,6 +185,10 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
135
185
|
setSplitPanelSize(detail.size);
|
|
136
186
|
fireNonCancelableEvent(onSplitPanelResize, detail);
|
|
137
187
|
}, [setSplitPanelSize, onSplitPanelResize]);
|
|
188
|
+
const onDrawerSizeSet = (detail) => {
|
|
189
|
+
setDrawerSize(detail.size);
|
|
190
|
+
fireNonCancelableEvent(drawers.onResize, detail);
|
|
191
|
+
};
|
|
138
192
|
const onSplitPanelToggleHandler = useCallback(() => {
|
|
139
193
|
setSplitPanelOpen(!splitPanelOpen);
|
|
140
194
|
setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });
|
|
@@ -152,6 +206,18 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
152
206
|
const spaceTaken = finalSplitPanePosition === 'side' ? splitPanelSize : 0;
|
|
153
207
|
return Math.max(0, spaceTaken + spaceAvailable);
|
|
154
208
|
});
|
|
209
|
+
const getDrawerMaxWidth = useStableEventHandler(() => {
|
|
210
|
+
if (!mainContentRef.current || !defaults.minContentWidth) {
|
|
211
|
+
return NaN;
|
|
212
|
+
}
|
|
213
|
+
const width = parseInt(getComputedStyle(mainContentRef.current).width);
|
|
214
|
+
// when disableContentPaddings is true there is less available space,
|
|
215
|
+
// so we subtract space-scaled-2x-xxxl * 2 for left and right padding
|
|
216
|
+
const contentPadding = disableContentPaddings ? 80 : 0;
|
|
217
|
+
const spaceAvailable = width - defaults.minContentWidth - contentPadding;
|
|
218
|
+
const spaceTaken = drawerSize;
|
|
219
|
+
return Math.max(0, spaceTaken + spaceAvailable);
|
|
220
|
+
});
|
|
155
221
|
const getSplitPanelMaxHeight = useStableEventHandler(() => {
|
|
156
222
|
if (typeof document === 'undefined') {
|
|
157
223
|
return 0; // render the split panel in its minimum possible size
|
|
@@ -182,20 +248,39 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
182
248
|
useEffect(() => {
|
|
183
249
|
const contentWidth = contentWidthWithSplitPanel - splitPanelSize;
|
|
184
250
|
setIsSplitpanelForcedPosition(isMobile || (defaults.minContentWidth || 0) > contentWidth);
|
|
251
|
+
setIsResizeInvalid(isMobile || (defaults.minContentWidth || 0) > contentWidthWithSplitPanel);
|
|
185
252
|
// This is a workaround to avoid a forced position due to splitPanelSize, which is
|
|
186
253
|
// user controlled variable.
|
|
187
254
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
188
|
-
}, [contentWidthWithSplitPanel, defaults.minContentWidth, isMobile]);
|
|
255
|
+
}, [contentWidthWithSplitPanel, drawerSize, defaults.minContentWidth, isMobile]);
|
|
189
256
|
const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;
|
|
190
|
-
const toolsClosedWidth = toolsHide || isMobile ? 0 : closedDrawerWidth;
|
|
257
|
+
const toolsClosedWidth = toolsHide || isMobile || (!drawers && toolsHide) ? 0 : closedDrawerWidth;
|
|
191
258
|
const contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;
|
|
192
259
|
const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);
|
|
193
260
|
const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);
|
|
261
|
+
const getSplitPanelRightOffset = () => {
|
|
262
|
+
if (isMobile) {
|
|
263
|
+
return 0;
|
|
264
|
+
}
|
|
265
|
+
if (drawers) {
|
|
266
|
+
if (activeDrawerId) {
|
|
267
|
+
if (selectedDrawer.resizable && !isResizeInvalid) {
|
|
268
|
+
return drawerSize + closedDrawerWidth;
|
|
269
|
+
}
|
|
270
|
+
return toolsWidth + closedDrawerWidth;
|
|
271
|
+
}
|
|
272
|
+
return closedDrawerWidth;
|
|
273
|
+
}
|
|
274
|
+
if (!toolsHide && toolsOpen) {
|
|
275
|
+
return toolsWidth;
|
|
276
|
+
}
|
|
277
|
+
return toolsClosedWidth;
|
|
278
|
+
};
|
|
194
279
|
const splitPanelContext = {
|
|
195
280
|
topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),
|
|
196
281
|
bottomOffset: footerHeight,
|
|
197
282
|
leftOffset: leftOffset + (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),
|
|
198
|
-
rightOffset: rightOffset + (
|
|
283
|
+
rightOffset: rightOffset + getSplitPanelRightOffset(),
|
|
199
284
|
position: finalSplitPanePosition,
|
|
200
285
|
size: splitPanelSize,
|
|
201
286
|
getMaxWidth: getSplitPanelMaxWidth,
|
|
@@ -223,7 +308,8 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
223
308
|
toolsPadding:
|
|
224
309
|
// tools padding is displayed in one of the three cases
|
|
225
310
|
// 1. Nothing on the that screen edge (no tools panel and no split panel)
|
|
226
|
-
|
|
311
|
+
toolsHide ||
|
|
312
|
+
(drawers && !activeDrawerId && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||
|
|
227
313
|
// 2. Tools panel is present and open
|
|
228
314
|
toolsVisible ||
|
|
229
315
|
// 3. Split panel is open in side position
|
|
@@ -239,14 +325,29 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
239
325
|
},
|
|
240
326
|
focusToolsClose: () => focusToolsButtons(true),
|
|
241
327
|
}), [isMobile, onNavigationToggle, onToolsToggle, focusToolsButtons]);
|
|
242
|
-
const splitPanelBottomOffset = (
|
|
328
|
+
const splitPanelBottomOffset = (_b = (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'
|
|
243
329
|
? undefined
|
|
244
330
|
: splitPanelOpen
|
|
245
331
|
? splitPanelReportedSize
|
|
246
|
-
: splitPanelReportedHeaderHeight)) !== null &&
|
|
332
|
+
: splitPanelReportedHeaderHeight)) !== null && _b !== void 0 ? _b : undefined;
|
|
247
333
|
return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef },
|
|
248
334
|
React.createElement("div", { className: styles['layout-wrapper'], style: contentHeightStyle },
|
|
249
|
-
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
|
|
335
|
+
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, drawers: drawers
|
|
336
|
+
? {
|
|
337
|
+
items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,
|
|
338
|
+
activeDrawerId: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id,
|
|
339
|
+
onChange: changeDetail => {
|
|
340
|
+
if ((selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) !== changeDetail.activeDrawerId) {
|
|
341
|
+
onToolsToggle(changeDetail.activeDrawerId === 'tools');
|
|
342
|
+
focusDrawersButtons();
|
|
343
|
+
setActiveDrawersId(changeDetail.activeDrawerId);
|
|
344
|
+
setDrawerLastInteraction({ type: 'open' });
|
|
345
|
+
fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
ariaLabel: drawers.ariaLabel,
|
|
349
|
+
}
|
|
350
|
+
: undefined }, breadcrumbs)),
|
|
250
351
|
React.createElement("div", { className: clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll']) },
|
|
251
352
|
!navigationHide && (React.createElement(Drawer, { contentClassName: testutilStyles.navigation, toggleClassName: testutilStyles['navigation-toggle'], closeClassName: testutilStyles['navigation-close'], ariaLabels: ariaLabels, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, isOpen: navigationOpen, onClick: isMobile ? onNavigationClick : undefined, onToggle: onNavigationToggle, toggleRefs: navigationRefs, type: "navigation", width: navigationWidth }, navigation)),
|
|
252
353
|
React.createElement("main", { ref: legacyScrollRootRef, className: clsx(styles['layout-main'], {
|
|
@@ -281,7 +382,31 @@ const OldAppLayout = React.forwardRef(({ navigation, navigationWidth = 280, navi
|
|
|
281
382
|
} }, content))),
|
|
282
383
|
finalSplitPanePosition === 'bottom' && splitPanelWrapped),
|
|
283
384
|
finalSplitPanePosition === 'side' && (React.createElement(SideSplitPanelDrawer, { topOffset: headerHeight, bottomOffset: footerHeight, displayed: splitPanelDisplayed, width: splitPanelOpen ? splitPanelSize : undefined }, splitPanelWrapped)),
|
|
284
|
-
|
|
385
|
+
((drawers && (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id)) || (!drawers && !toolsHide)) &&
|
|
386
|
+
(drawers ? (React.createElement(ResizableDrawer, { contentClassName: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) === 'tools' ? testutilStyles.tools : '', toggleClassName: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) === 'tools' ? testutilStyles['tools-toggle'] : '', closeClassName: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) === 'tools' ? testutilStyles['tools-close'] : '', ariaLabels: ariaLabels, drawersAriaLabels: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.ariaLabels, width: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.resizable) && !isResizeInvalid ? drawerSize : toolsWidth, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen || activeDrawerId !== undefined, toggleRefs: toolsRefs, type: "tools", onLoseFocus: drawers ? loseDrawersFocus : loseToolsFocus, activeDrawer: selectedDrawer, drawers: {
|
|
387
|
+
items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,
|
|
388
|
+
activeDrawerId: selectedDrawer.id,
|
|
389
|
+
onChange: changeDetail => {
|
|
390
|
+
onToolsToggle(false);
|
|
391
|
+
setDrawerLastInteraction({ type: 'close' });
|
|
392
|
+
setActiveDrawersId(changeDetail.activeDrawerId);
|
|
393
|
+
fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);
|
|
394
|
+
},
|
|
395
|
+
}, size: (selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.resizable) && !isResizeInvalid ? drawerSize : toolsWidth, onResize: onDrawerSizeSet, refs: drawerRefs, getMaxWidth: getDrawerMaxWidth }, 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))),
|
|
396
|
+
drawers && (React.createElement(DrawerTriggersBar, { contentClassName: testutilStyles.tools, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, drawers: {
|
|
397
|
+
items: tools && !toolsHide ? [toolsItem, ...drawers.items] : drawers.items,
|
|
398
|
+
activeDrawerId: selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id,
|
|
399
|
+
onChange: changeDetail => {
|
|
400
|
+
if ((selectedDrawer === null || selectedDrawer === void 0 ? void 0 : selectedDrawer.id) !== changeDetail.activeDrawerId) {
|
|
401
|
+
onToolsToggle(changeDetail.activeDrawerId === 'tools');
|
|
402
|
+
focusDrawersButtons();
|
|
403
|
+
setActiveDrawersId(changeDetail.activeDrawerId);
|
|
404
|
+
setDrawerLastInteraction({ type: 'open' });
|
|
405
|
+
fireNonCancelableEvent(drawers.onChange, changeDetail.activeDrawerId);
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
ariaLabel: drawers.ariaLabel,
|
|
409
|
+
} }))))));
|
|
285
410
|
});
|
|
286
411
|
applyDisplayName(AppLayout, 'AppLayout');
|
|
287
412
|
export default AppLayout;
|