@cloudscape-design/components-themeable 3.0.743 → 3.0.745
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/resize/styles.scss +42 -0
- package/lib/internal/scss/app-layout/styles.scss +0 -26
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/navigation/styles.scss +1 -23
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +18 -6
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/toolbar/styles.scss +0 -1
- package/lib/internal/scss/expandable-section/analytics-metadata/styles.scss +8 -0
- package/lib/internal/scss/flashbar/collapsible.motion.scss +2 -2
- package/lib/internal/scss/flashbar/motion.scss +10 -10
- package/lib/internal/scss/split-panel/styles.scss +12 -10
- package/lib/internal/scss/tabs/analytics-metadata/styles.scss +11 -0
- package/lib/internal/template/app-layout/classic.js +1 -1
- package/lib/internal/template/app-layout/classic.js.map +1 -1
- package/lib/internal/template/app-layout/drawer/styles.css.js +13 -13
- package/lib/internal/template/app-layout/drawer/styles.scoped.css +22 -22
- package/lib/internal/template/app-layout/drawer/styles.selectors.js +13 -13
- package/lib/internal/template/app-layout/mobile-toolbar/styles.css.js +8 -8
- package/lib/internal/template/app-layout/mobile-toolbar/styles.scoped.css +10 -10
- package/lib/internal/template/app-layout/mobile-toolbar/styles.selectors.js +8 -8
- package/lib/internal/template/app-layout/resize/styles.css.js +9 -0
- package/lib/internal/template/app-layout/resize/styles.scoped.css +179 -0
- package/lib/internal/template/app-layout/resize/styles.selectors.js +10 -0
- package/lib/internal/template/app-layout/styles.css.js +12 -16
- package/lib/internal/template/app-layout/styles.scoped.css +12 -43
- package/lib/internal/template/app-layout/styles.selectors.js +12 -16
- package/lib/internal/template/app-layout/utils/use-drawers.js +1 -1
- package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
- package/lib/internal/template/app-layout/utils/use-pointer-events.js +1 -1
- package/lib/internal/template/app-layout/utils/use-pointer-events.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +82 -82
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +161 -161
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +82 -82
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts +2 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.js +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +6 -29
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js +4 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +16 -16
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +45 -31
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +16 -16
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +13 -13
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +16 -17
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +13 -13
- package/lib/internal/template/attribute-editor/styles.css.js +14 -14
- package/lib/internal/template/attribute-editor/styles.scoped.css +25 -25
- package/lib/internal/template/attribute-editor/styles.selectors.js +14 -14
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +9 -9
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +18 -18
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +9 -9
- package/lib/internal/template/code-editor/styles.css.js +33 -33
- package/lib/internal/template/code-editor/styles.scoped.css +184 -184
- package/lib/internal/template/code-editor/styles.selectors.js +33 -33
- package/lib/internal/template/expandable-section/analytics-metadata/interfaces.d.ts +17 -0
- package/lib/internal/template/expandable-section/analytics-metadata/interfaces.d.ts.map +1 -0
- package/lib/internal/template/expandable-section/analytics-metadata/interfaces.js +4 -0
- package/lib/internal/template/expandable-section/analytics-metadata/interfaces.js.map +1 -0
- package/lib/internal/template/expandable-section/analytics-metadata/styles.css.js +6 -0
- package/lib/internal/template/expandable-section/analytics-metadata/styles.scoped.css +7 -0
- package/lib/internal/template/expandable-section/analytics-metadata/styles.selectors.js +7 -0
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts +2 -1
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-container.js +13 -3
- package/lib/internal/template/expandable-section/expandable-section-container.js.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +19 -7
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/index.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/index.js +1 -1
- package/lib/internal/template/expandable-section/index.js.map +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts +2 -1
- package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/internal.js +2 -2
- package/lib/internal/template/expandable-section/internal.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +47 -47
- package/lib/internal/template/flashbar/styles.scoped.css +158 -158
- package/lib/internal/template/flashbar/styles.selectors.js +47 -47
- package/lib/internal/template/form-field/styles.css.js +24 -24
- package/lib/internal/template/form-field/styles.scoped.css +38 -38
- package/lib/internal/template/form-field/styles.selectors.js +24 -24
- package/lib/internal/template/help-panel/styles.css.js +5 -5
- package/lib/internal/template/help-panel/styles.scoped.css +69 -69
- package/lib/internal/template/help-panel/styles.selectors.js +5 -5
- package/lib/internal/template/internal/base-component/styles.scoped.css +28 -17
- package/lib/internal/template/internal/components/token-list/styles.css.js +9 -9
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +21 -21
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +9 -9
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +15 -15
- package/lib/internal/template/internal/generated/theming/index.js +15 -15
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +79 -79
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/mixed-line-bar-chart/styles.css.js +11 -11
- package/lib/internal/template/mixed-line-bar-chart/styles.scoped.css +17 -17
- package/lib/internal/template/mixed-line-bar-chart/styles.selectors.js +11 -11
- package/lib/internal/template/modal/styles.css.js +23 -23
- package/lib/internal/template/modal/styles.scoped.css +40 -40
- package/lib/internal/template/modal/styles.selectors.js +23 -23
- package/lib/internal/template/popover/styles.css.js +52 -52
- package/lib/internal/template/popover/styles.scoped.css +69 -69
- package/lib/internal/template/popover/styles.selectors.js +52 -52
- package/lib/internal/template/property-filter/controller.d.ts +10 -7
- package/lib/internal/template/property-filter/controller.d.ts.map +1 -1
- package/lib/internal/template/property-filter/controller.js +16 -30
- package/lib/internal/template/property-filter/controller.js.map +1 -1
- package/lib/internal/template/property-filter/internal.d.ts.map +1 -1
- package/lib/internal/template/property-filter/internal.js +22 -7
- package/lib/internal/template/property-filter/internal.js.map +1 -1
- package/lib/internal/template/property-filter/property-editor.d.ts +2 -2
- package/lib/internal/template/property-filter/property-editor.d.ts.map +1 -1
- package/lib/internal/template/property-filter/property-editor.js +1 -1
- package/lib/internal/template/property-filter/property-editor.js.map +1 -1
- package/lib/internal/template/property-filter/token.d.ts +7 -8
- package/lib/internal/template/property-filter/token.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token.js +6 -5
- package/lib/internal/template/property-filter/token.js.map +1 -1
- package/lib/internal/template/split-panel/bottom.d.ts +1 -4
- package/lib/internal/template/split-panel/bottom.d.ts.map +1 -1
- package/lib/internal/template/split-panel/bottom.js +5 -7
- package/lib/internal/template/split-panel/bottom.js.map +1 -1
- package/lib/internal/template/split-panel/implementation.d.ts.map +1 -1
- package/lib/internal/template/split-panel/implementation.js +5 -5
- package/lib/internal/template/split-panel/implementation.js.map +1 -1
- package/lib/internal/template/split-panel/side.d.ts.map +1 -1
- package/lib/internal/template/split-panel/side.js +5 -3
- package/lib/internal/template/split-panel/side.js.map +1 -1
- package/lib/internal/template/split-panel/styles.css.js +26 -27
- package/lib/internal/template/split-panel/styles.scoped.css +50 -215
- package/lib/internal/template/split-panel/styles.selectors.js +26 -27
- package/lib/internal/template/status-indicator/styles.css.js +23 -23
- package/lib/internal/template/status-indicator/styles.scoped.css +29 -29
- package/lib/internal/template/status-indicator/styles.selectors.js +23 -23
- package/lib/internal/template/tabs/analytics-metadata/interfaces.d.ts +33 -0
- package/lib/internal/template/tabs/analytics-metadata/interfaces.d.ts.map +1 -0
- package/lib/internal/template/tabs/analytics-metadata/interfaces.js +4 -0
- package/lib/internal/template/tabs/analytics-metadata/interfaces.js.map +1 -0
- package/lib/internal/template/tabs/analytics-metadata/styles.css.js +9 -0
- package/lib/internal/template/tabs/analytics-metadata/styles.scoped.css +10 -0
- package/lib/internal/template/tabs/analytics-metadata/styles.selectors.js +10 -0
- package/lib/internal/template/tabs/index.d.ts.map +1 -1
- package/lib/internal/template/tabs/index.js +16 -2
- package/lib/internal/template/tabs/index.js.map +1 -1
- package/lib/internal/template/tabs/styles.css.js +28 -28
- package/lib/internal/template/tabs/styles.scoped.css +50 -50
- package/lib/internal/template/tabs/styles.selectors.js +28 -28
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +36 -9
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +11 -11
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +62 -62
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/wizard/styles.css.js +30 -30
- package/lib/internal/template/wizard/styles.scoped.css +59 -59
- package/lib/internal/template/wizard/styles.selectors.js +30 -30
- package/package.json +1 -1
- package/lib/internal/scss/split-panel/motion.scss +0 -21
|
@@ -2,87 +2,87 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"background": "
|
|
6
|
-
"scrolling-background": "awsui_scrolling-
|
|
7
|
-
"breadcrumbs": "
|
|
8
|
-
"drawers-container": "awsui_drawers-
|
|
9
|
-
"has-open-drawer": "awsui_has-open-
|
|
10
|
-
"disable-body-scroll": "awsui_disable-body-
|
|
11
|
-
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-
|
|
12
|
-
"has-multiple-triggers": "awsui_has-multiple-
|
|
13
|
-
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-
|
|
14
|
-
"drawers-trigger-content": "awsui_drawers-trigger-
|
|
15
|
-
"drawers-trigger-overflow": "awsui_drawers-trigger-
|
|
16
|
-
"drawers-trigger": "awsui_drawers-
|
|
17
|
-
"drawer": "
|
|
18
|
-
"drawer-content-container": "awsui_drawer-content-
|
|
19
|
-
"drawer-close-button": "awsui_drawer-close-
|
|
20
|
-
"drawer-content": "awsui_drawer-
|
|
21
|
-
"drawer-content-hidden": "awsui_drawer-content-
|
|
22
|
-
"drawer-slider": "awsui_drawer-
|
|
23
|
-
"is-drawer-open": "awsui_is-drawer-
|
|
24
|
-
"content": "
|
|
25
|
-
"layout": "
|
|
26
|
-
"has-max-content-width": "awsui_has-max-content-
|
|
27
|
-
"content-type-dashboard": "awsui_content-type-
|
|
28
|
-
"content-type-table": "awsui_content-type-
|
|
29
|
-
"content-type-cards": "awsui_content-type-
|
|
30
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
31
|
-
"is-hide-mobile-toolbar": "awsui_is-hide-mobile-
|
|
32
|
-
"has-content-gap-left": "awsui_has-content-gap-
|
|
33
|
-
"has-content-gap-right": "awsui_has-content-gap-
|
|
34
|
-
"has-breadcrumbs": "awsui_has-
|
|
35
|
-
"content-first-child-header": "awsui_content-first-child-
|
|
36
|
-
"content-first-child-notifications": "awsui_content-first-child-
|
|
37
|
-
"has-header": "awsui_has-
|
|
38
|
-
"content-first-child-main": "awsui_content-first-child-
|
|
39
|
-
"disable-content-paddings": "awsui_disable-content-
|
|
40
|
-
"has-left-toggles-gutter": "awsui_has-left-toggles-
|
|
41
|
-
"has-right-toggles-gutter": "awsui_has-right-toggles-
|
|
42
|
-
"has-split-panel": "awsui_has-split-
|
|
43
|
-
"split-panel-position-bottom": "awsui_split-panel-position-
|
|
44
|
-
"block-body-scroll": "awsui_block-body-
|
|
45
|
-
"unfocusable": "
|
|
46
|
-
"container": "
|
|
47
|
-
"is-navigation-open": "awsui_is-navigation-
|
|
48
|
-
"is-tools-open": "awsui_is-tools-
|
|
49
|
-
"is-split-panel-open": "awsui_is-split-panel-
|
|
50
|
-
"split-panel-position-side": "awsui_split-panel-position-
|
|
51
|
-
"has-active-drawer": "awsui_has-active-
|
|
52
|
-
"mobile-toolbar": "awsui_mobile-
|
|
53
|
-
"remove-high-contrast-header": "awsui_remove-high-contrast-
|
|
54
|
-
"mobile-toolbar-nav": "awsui_mobile-toolbar-
|
|
55
|
-
"mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-
|
|
56
|
-
"mobile-toolbar-tools": "awsui_mobile-toolbar-
|
|
57
|
-
"navigation-container": "awsui_navigation-
|
|
58
|
-
"show-navigation": "awsui_show-
|
|
59
|
-
"animating": "
|
|
60
|
-
"showButtons": "
|
|
61
|
-
"navigation": "
|
|
62
|
-
"openNavigation": "
|
|
63
|
-
"animated-content": "awsui_animated-
|
|
64
|
-
"hide-navigation": "awsui_hide-
|
|
65
|
-
"notifications": "
|
|
66
|
-
"has-notification-content": "awsui_has-notification-
|
|
67
|
-
"sticky-notifications": "awsui_sticky-
|
|
68
|
-
"high-contrast": "awsui_high-
|
|
69
|
-
"split-panel-bottom": "awsui_split-panel-
|
|
70
|
-
"position-bottom": "awsui_position-
|
|
71
|
-
"openSplitPanelBottom": "
|
|
72
|
-
"split-panel-side": "awsui_split-panel-
|
|
73
|
-
"position-side": "awsui_position-
|
|
74
|
-
"tools-container": "awsui_tools-
|
|
75
|
-
"tools": "
|
|
76
|
-
"openTools": "
|
|
77
|
-
"has-tools-form-persistence": "awsui_has-tools-form-
|
|
78
|
-
"hide-tools": "awsui_hide-
|
|
79
|
-
"show-tools": "awsui_show-
|
|
80
|
-
"has-tools-form": "awsui_has-tools-
|
|
81
|
-
"trigger-badge-wrapper": "awsui_trigger-badge-
|
|
82
|
-
"trigger": "
|
|
83
|
-
"selected": "
|
|
84
|
-
"badge": "
|
|
85
|
-
"trigger-wrapper": "awsui_trigger-
|
|
86
|
-
"dot": "
|
|
5
|
+
"background": "awsui_background_hyvsj_1tj26_145",
|
|
6
|
+
"scrolling-background": "awsui_scrolling-background_hyvsj_1tj26_148",
|
|
7
|
+
"breadcrumbs": "awsui_breadcrumbs_hyvsj_1tj26_159",
|
|
8
|
+
"drawers-container": "awsui_drawers-container_hyvsj_1tj26_172",
|
|
9
|
+
"has-open-drawer": "awsui_has-open-drawer_hyvsj_1tj26_183",
|
|
10
|
+
"disable-body-scroll": "awsui_disable-body-scroll_hyvsj_1tj26_204",
|
|
11
|
+
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_1tj26_209",
|
|
12
|
+
"has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_1tj26_250",
|
|
13
|
+
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_1tj26_260",
|
|
14
|
+
"drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_1tj26_265",
|
|
15
|
+
"drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_1tj26_279",
|
|
16
|
+
"drawers-trigger": "awsui_drawers-trigger_hyvsj_1tj26_265",
|
|
17
|
+
"drawer": "awsui_drawer_hyvsj_1tj26_172",
|
|
18
|
+
"drawer-content-container": "awsui_drawer-content-container_hyvsj_1tj26_310",
|
|
19
|
+
"drawer-close-button": "awsui_drawer-close-button_hyvsj_1tj26_319",
|
|
20
|
+
"drawer-content": "awsui_drawer-content_hyvsj_1tj26_310",
|
|
21
|
+
"drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_1tj26_327",
|
|
22
|
+
"drawer-slider": "awsui_drawer-slider_hyvsj_1tj26_330",
|
|
23
|
+
"is-drawer-open": "awsui_is-drawer-open_hyvsj_1tj26_337",
|
|
24
|
+
"content": "awsui_content_hyvsj_1tj26_363",
|
|
25
|
+
"layout": "awsui_layout_hyvsj_1tj26_388",
|
|
26
|
+
"has-max-content-width": "awsui_has-max-content-width_hyvsj_1tj26_460",
|
|
27
|
+
"content-type-dashboard": "awsui_content-type-dashboard_hyvsj_1tj26_475",
|
|
28
|
+
"content-type-table": "awsui_content-type-table_hyvsj_1tj26_489",
|
|
29
|
+
"content-type-cards": "awsui_content-type-cards_hyvsj_1tj26_489",
|
|
30
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_1tj26_495",
|
|
31
|
+
"is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_1tj26_498",
|
|
32
|
+
"has-content-gap-left": "awsui_has-content-gap-left_hyvsj_1tj26_512",
|
|
33
|
+
"has-content-gap-right": "awsui_has-content-gap-right_hyvsj_1tj26_515",
|
|
34
|
+
"has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_1tj26_525",
|
|
35
|
+
"content-first-child-header": "awsui_content-first-child-header_hyvsj_1tj26_528",
|
|
36
|
+
"content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_1tj26_528",
|
|
37
|
+
"has-header": "awsui_has-header_hyvsj_1tj26_528",
|
|
38
|
+
"content-first-child-main": "awsui_content-first-child-main_hyvsj_1tj26_543",
|
|
39
|
+
"disable-content-paddings": "awsui_disable-content-paddings_hyvsj_1tj26_543",
|
|
40
|
+
"has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_1tj26_563",
|
|
41
|
+
"has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_1tj26_566",
|
|
42
|
+
"has-split-panel": "awsui_has-split-panel_hyvsj_1tj26_586",
|
|
43
|
+
"split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_1tj26_586",
|
|
44
|
+
"block-body-scroll": "awsui_block-body-scroll_hyvsj_1tj26_594",
|
|
45
|
+
"unfocusable": "awsui_unfocusable_hyvsj_1tj26_599",
|
|
46
|
+
"container": "awsui_container_hyvsj_1tj26_609",
|
|
47
|
+
"is-navigation-open": "awsui_is-navigation-open_hyvsj_1tj26_635",
|
|
48
|
+
"is-tools-open": "awsui_is-tools-open_hyvsj_1tj26_638",
|
|
49
|
+
"is-split-panel-open": "awsui_is-split-panel-open_hyvsj_1tj26_638",
|
|
50
|
+
"split-panel-position-side": "awsui_split-panel-position-side_hyvsj_1tj26_638",
|
|
51
|
+
"has-active-drawer": "awsui_has-active-drawer_hyvsj_1tj26_638",
|
|
52
|
+
"mobile-toolbar": "awsui_mobile-toolbar_hyvsj_1tj26_647",
|
|
53
|
+
"remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_1tj26_664",
|
|
54
|
+
"mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_1tj26_668",
|
|
55
|
+
"mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_1tj26_672",
|
|
56
|
+
"mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_1tj26_676",
|
|
57
|
+
"navigation-container": "awsui_navigation-container_hyvsj_1tj26_685",
|
|
58
|
+
"show-navigation": "awsui_show-navigation_hyvsj_1tj26_723",
|
|
59
|
+
"animating": "awsui_animating_hyvsj_1tj26_746",
|
|
60
|
+
"showButtons": "awsui_showButtons_hyvsj_1tj26_1",
|
|
61
|
+
"navigation": "awsui_navigation_hyvsj_1tj26_685",
|
|
62
|
+
"openNavigation": "awsui_openNavigation_hyvsj_1tj26_1",
|
|
63
|
+
"animated-content": "awsui_animated-content_hyvsj_1tj26_808",
|
|
64
|
+
"hide-navigation": "awsui_hide-navigation_hyvsj_1tj26_817",
|
|
65
|
+
"notifications": "awsui_notifications_hyvsj_1tj26_827",
|
|
66
|
+
"has-notification-content": "awsui_has-notification-content_hyvsj_1tj26_832",
|
|
67
|
+
"sticky-notifications": "awsui_sticky-notifications_hyvsj_1tj26_836",
|
|
68
|
+
"high-contrast": "awsui_high-contrast_hyvsj_1tj26_841",
|
|
69
|
+
"split-panel-bottom": "awsui_split-panel-bottom_hyvsj_1tj26_859",
|
|
70
|
+
"position-bottom": "awsui_position-bottom_hyvsj_1tj26_906",
|
|
71
|
+
"openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_1tj26_1",
|
|
72
|
+
"split-panel-side": "awsui_split-panel-side_hyvsj_1tj26_935",
|
|
73
|
+
"position-side": "awsui_position-side_hyvsj_1tj26_948",
|
|
74
|
+
"tools-container": "awsui_tools-container_hyvsj_1tj26_970",
|
|
75
|
+
"tools": "awsui_tools_hyvsj_1tj26_970",
|
|
76
|
+
"openTools": "awsui_openTools_hyvsj_1tj26_1",
|
|
77
|
+
"has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_1tj26_1059",
|
|
78
|
+
"hide-tools": "awsui_hide-tools_hyvsj_1tj26_1069",
|
|
79
|
+
"show-tools": "awsui_show-tools_hyvsj_1tj26_1081",
|
|
80
|
+
"has-tools-form": "awsui_has-tools-form_hyvsj_1tj26_1059",
|
|
81
|
+
"trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_1tj26_1164",
|
|
82
|
+
"trigger": "awsui_trigger_hyvsj_1tj26_1164",
|
|
83
|
+
"selected": "awsui_selected_hyvsj_1tj26_1242",
|
|
84
|
+
"badge": "awsui_badge_hyvsj_1tj26_1262",
|
|
85
|
+
"trigger-wrapper": "awsui_trigger-wrapper_hyvsj_1tj26_1266",
|
|
86
|
+
"dot": "awsui_dot_hyvsj_1tj26_1277"
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -8,8 +8,9 @@ interface HorizontalLayoutInput {
|
|
|
8
8
|
splitPanelOpen: boolean;
|
|
9
9
|
splitPanelPosition: 'side' | 'bottom' | undefined;
|
|
10
10
|
splitPanelSize: number;
|
|
11
|
+
isMobile: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, }: HorizontalLayoutInput): {
|
|
13
|
+
export declare function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, isMobile, }: HorizontalLayoutInput): {
|
|
13
14
|
splitPanelPosition: "bottom" | "side";
|
|
14
15
|
splitPanelForcedPosition: boolean;
|
|
15
16
|
sideSplitPanelSize: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,UAAU,qBAAqB;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,UAAU,qBAAqB;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAC,EACtC,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,GACT,EAAE,qBAAqB;;;;;;EAsBvB;AAED,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,mBAAmB,GAAG,oBAAoB,CAY5C"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { SPLIT_PANEL_MIN_WIDTH } from '../split-panel';
|
|
4
|
-
export function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, }) {
|
|
4
|
+
export function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, isMobile, }) {
|
|
5
5
|
const contentPadding = 2 * 24; // space-xl
|
|
6
6
|
const activeNavigationWidth = navigationOpen ? navigationWidth : 0;
|
|
7
7
|
const resizableSpaceAvailable = Math.max(0, placement.inlineSize - minContentWidth - contentPadding - activeNavigationWidth);
|
|
8
|
-
const splitPanelForcedPosition = resizableSpaceAvailable - activeDrawerSize < SPLIT_PANEL_MIN_WIDTH;
|
|
8
|
+
const splitPanelForcedPosition = resizableSpaceAvailable - activeDrawerSize < SPLIT_PANEL_MIN_WIDTH || isMobile;
|
|
9
9
|
const resolvedSplitPanelPosition = splitPanelForcedPosition ? 'bottom' : splitPanelPosition !== null && splitPanelPosition !== void 0 ? splitPanelPosition : 'bottom';
|
|
10
10
|
const sideSplitPanelSize = resolvedSplitPanelPosition === 'side' && splitPanelOpen ? splitPanelSize !== null && splitPanelSize !== void 0 ? splitPanelSize : 0 : 0;
|
|
11
11
|
const maxSplitPanelSize = resizableSpaceAvailable - activeDrawerSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAcvD,MAAM,UAAU,uBAAuB,CAAC,EACtC,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,GACc;IACtB,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW;IAC1C,MAAM,qBAAqB,GAAG,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,uBAAuB,GAAG,IAAI,CAAC,GAAG,CACtC,CAAC,EACD,SAAS,CAAC,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,qBAAqB,CAChF,CAAC;IAEF,MAAM,wBAAwB,GAAG,uBAAuB,GAAG,gBAAgB,GAAG,qBAAqB,IAAI,QAAQ,CAAC;IAChH,MAAM,0BAA0B,GAAG,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAC;IACxG,MAAM,kBAAkB,GAAG,0BAA0B,KAAK,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7G,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,gBAAgB,CAAC;IACrE,MAAM,aAAa,GAAG,uBAAuB,GAAG,kBAAkB,CAAC;IAEnE,OAAO;QACL,kBAAkB,EAAE,0BAA0B;QAC9C,wBAAwB;QACxB,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;KACd,CAAC;AACJ,CAAC;AAgBD,MAAM,UAAU,qBAAqB,CAAC,EACpC,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,GACC;IACpB,MAAM,OAAO,GAAG,SAAS,CAAC;IAC1B,IAAI,aAAa,GAAG,SAAS,CAAC;IAC9B,IAAI,iBAAiB,EAAE;QACrB,aAAa,IAAI,aAAa,CAAC;KAChC;IACD,IAAI,MAAM,GAAG,aAAa,CAAC;IAC3B,IAAI,mBAAmB,EAAE;QACvB,MAAM,IAAI,mBAAmB,CAAC;KAC/B;IAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AppLayoutPropsWithDefaults } from '../interfaces';\nimport { SPLIT_PANEL_MIN_WIDTH } from '../split-panel';\n\ninterface HorizontalLayoutInput {\n navigationOpen: boolean;\n navigationWidth: number;\n placement: AppLayoutPropsWithDefaults['placement'];\n minContentWidth: number;\n activeDrawerSize: number;\n splitPanelOpen: boolean;\n splitPanelPosition: 'side' | 'bottom' | undefined;\n splitPanelSize: number;\n isMobile: boolean;\n}\n\nexport function computeHorizontalLayout({\n navigationOpen,\n navigationWidth,\n placement,\n minContentWidth,\n activeDrawerSize,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelSize,\n isMobile,\n}: HorizontalLayoutInput) {\n const contentPadding = 2 * 24; // space-xl\n const activeNavigationWidth = navigationOpen ? navigationWidth : 0;\n\n const resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - minContentWidth - contentPadding - activeNavigationWidth\n );\n\n const splitPanelForcedPosition = resizableSpaceAvailable - activeDrawerSize < SPLIT_PANEL_MIN_WIDTH || isMobile;\n const resolvedSplitPanelPosition = splitPanelForcedPosition ? 'bottom' : splitPanelPosition ?? 'bottom';\n const sideSplitPanelSize = resolvedSplitPanelPosition === 'side' && splitPanelOpen ? splitPanelSize ?? 0 : 0;\n const maxSplitPanelSize = resizableSpaceAvailable - activeDrawerSize;\n const maxDrawerSize = resizableSpaceAvailable - sideSplitPanelSize;\n\n return {\n splitPanelPosition: resolvedSplitPanelPosition,\n splitPanelForcedPosition,\n sideSplitPanelSize,\n maxSplitPanelSize,\n maxDrawerSize,\n };\n}\n\ninterface VerticalLayoutInput {\n topOffset: number;\n hasVisibleToolbar: boolean;\n toolbarHeight: number;\n stickyNotifications: boolean;\n notificationsHeight: number;\n}\n\nexport interface VerticalLayoutOutput {\n toolbar: number;\n notifications: number;\n header: number;\n}\n\nexport function computeVerticalLayout({\n topOffset,\n hasVisibleToolbar,\n toolbarHeight,\n stickyNotifications,\n notificationsHeight,\n}: VerticalLayoutInput): VerticalLayoutOutput {\n const toolbar = topOffset;\n let notifications = topOffset;\n if (hasVisibleToolbar) {\n notifications += toolbarHeight;\n }\n let header = notifications;\n if (stickyNotifications) {\n header += notificationsHeight;\n }\n\n return { toolbar, notifications, header };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAOnD,UAAU,kCAAkC;IAC1C,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,wBAAgB,6BAA6B,CAAC,EAAE,kBAAkB,EAAE,EAAE,kCAAkC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAOnD,UAAU,kCAAkC;IAC1C,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,wBAAgB,6BAA6B,CAAC,EAAE,kBAAkB,EAAE,EAAE,kCAAkC,eAiGvG;AAED,eAAO,MAAM,+BAA+B,qGAA2D,CAAC"}
|
|
@@ -7,7 +7,7 @@ import PanelResizeHandle from '../../../internal/components/panel-resize-handle'
|
|
|
7
7
|
import { createWidgetizedComponent } from '../../../internal/widgets';
|
|
8
8
|
import { TOOLS_DRAWER_ID } from '../../utils/use-drawers';
|
|
9
9
|
import { useResize } from './use-resize';
|
|
10
|
-
import sharedStyles from '../../styles.css.js';
|
|
10
|
+
import sharedStyles from '../../resize/styles.css.js';
|
|
11
11
|
import testutilStyles from '../../test-classes/styles.css.js';
|
|
12
12
|
import styles from './styles.css.js';
|
|
13
13
|
export function AppLayoutDrawerImplementation({ appLayoutInternals }) {
|
|
@@ -30,7 +30,7 @@ export function AppLayoutDrawerImplementation({ appLayoutInternals }) {
|
|
|
30
30
|
handleRef: drawersFocusControl.refs.slider,
|
|
31
31
|
onResize: size => onActiveDrawerResize({ id: activeDrawerId, size }),
|
|
32
32
|
});
|
|
33
|
-
return (React.createElement("aside", { id: activeDrawerId, "aria-hidden": !activeDrawer, "aria-label": computedAriaLabels.content, className: clsx(styles.drawer,
|
|
33
|
+
return (React.createElement("aside", { id: activeDrawerId, "aria-hidden": !activeDrawer, "aria-label": computedAriaLabels.content, className: clsx(styles.drawer, {
|
|
34
34
|
[testutilStyles['active-drawer']]: !toolsOnlyMode && activeDrawerId,
|
|
35
35
|
[testutilStyles.tools]: isToolsDrawer,
|
|
36
36
|
}), ref: drawerRef, onBlur: e => {
|
|
@@ -43,13 +43,13 @@ export function AppLayoutDrawerImplementation({ appLayoutInternals }) {
|
|
|
43
43
|
} },
|
|
44
44
|
!isMobile && (activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.resizable) && (React.createElement("div", { className: styles['drawer-slider'] },
|
|
45
45
|
React.createElement(PanelResizeHandle, { ref: drawersFocusControl.refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_d = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _d === void 0 ? void 0 : _d.resizeHandle, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onPointerDown: resizeProps.onPointerDown }))),
|
|
46
|
-
React.createElement("div", { className: styles['drawer-content-container'] },
|
|
46
|
+
React.createElement("div", { className: clsx(styles['drawer-content-container'], sharedStyles['with-motion']), style: { width: isMobile ? '100%' : `${activeDrawerSize}px` } },
|
|
47
47
|
React.createElement("div", { className: clsx(styles['drawer-close-button']) },
|
|
48
48
|
React.createElement(InternalButton, { ariaLabel: computedAriaLabels.closeButton, className: clsx({
|
|
49
49
|
[testutilStyles['active-drawer-close-button']]: !isToolsDrawer && activeDrawerId,
|
|
50
50
|
[testutilStyles['tools-close']]: isToolsDrawer,
|
|
51
51
|
}), formAction: "none", iconName: isMobile ? 'close' : 'angle-right', onClick: () => onActiveDrawerChange(null), ref: drawersFocusControl.refs.close, variant: "icon" })),
|
|
52
|
-
|
|
52
|
+
React.createElement("div", { className: clsx(styles['drawer-content'], activeDrawerId !== TOOLS_DRAWER_ID && styles['drawer-content-hidden']) }, toolsContent),
|
|
53
53
|
activeDrawerId !== TOOLS_DRAWER_ID && React.createElement("div", { className: styles['drawer-content'] }, activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.content))));
|
|
54
54
|
}
|
|
55
55
|
export const createWidgetizedAppLayoutDrawer = createWidgetizedComponent(AppLayoutDrawerImplementation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAMrC,MAAM,UAAU,6BAA6B,CAAC,EAAE,kBAAkB,EAAsC;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,MAAM,CAAC,0BAA0B,CAAC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,EAChF,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,gBAAgB,IAAI,EAAE;YAE7D,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBACjD,oBAAC,cAAc,IACb,SAAS,EAAE,kBAAkB,CAAC,WAAW,EACzC,SAAS,EAAE,IAAI,CAAC;wBACd,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC,EAAE,CAAC,aAAa,IAAI,cAAc;wBAChF,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,EAAE,aAAa;qBAC/C,CAAC,EACF,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,EACzC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,EACnC,OAAO,EAAC,MAAM,GACd,CACE;YACN,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,gBAAgB,CAAC,EACxB,cAAc,KAAK,eAAe,IAAI,MAAM,CAAC,uBAAuB,CAAC,CACtE,IAEA,YAAY,CACT;YACL,cAAc,KAAK,eAAe,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAO,CAC1G,CACA,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CAAC,6BAA6B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { TOOLS_DRAWER_ID } from '../../utils/use-drawers';\nimport { AppLayoutInternals } from '../interfaces';\nimport { useResize } from './use-resize';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutDrawerImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n}\n\nexport function AppLayoutDrawerImplementation({ appLayoutInternals }: AppLayoutDrawerImplementationProps) {\n const {\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n maxDrawerSize,\n ariaLabels,\n drawers,\n drawersFocusControl,\n isMobile,\n placement,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = appLayoutInternals;\n const drawerRef = useRef<HTMLDivElement>(null);\n const activeDrawerId = activeDrawer?.id;\n\n const computedAriaLabels = {\n closeButton: activeDrawer ? activeDrawer.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeDrawer ? activeDrawer.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const isToolsDrawer = activeDrawer?.id === TOOLS_DRAWER_ID;\n const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;\n const toolsContent = drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content;\n const resizeProps = useResize({\n currentWidth: activeDrawerSize,\n minWidth: minDrawerSize,\n maxWidth: maxDrawerSize,\n panelRef: drawerRef,\n handleRef: drawersFocusControl.refs.slider,\n onResize: size => onActiveDrawerResize({ id: activeDrawerId!, size }),\n });\n\n return (\n <aside\n id={activeDrawerId}\n aria-hidden={!activeDrawer}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, {\n [testutilStyles['active-drawer']]: !toolsOnlyMode && activeDrawerId,\n [testutilStyles.tools]: isToolsDrawer,\n })}\n ref={drawerRef}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n drawersFocusControl.loseFocus();\n }\n }}\n style={{\n blockSize: `calc(100vh - ${placement.insetBlockStart}px - ${placement.insetBlockEnd}px)`,\n insetBlockStart: placement.insetBlockStart,\n }}\n >\n {!isMobile && activeDrawer?.resizable && (\n <div className={styles['drawer-slider']}>\n <PanelResizeHandle\n ref={drawersFocusControl.refs.slider}\n position=\"side\"\n className={testutilStyles['drawers-slider']}\n ariaLabel={activeDrawer?.ariaLabels?.resizeHandle}\n ariaValuenow={resizeProps.relativeSize}\n onKeyDown={resizeProps.onKeyDown}\n onPointerDown={resizeProps.onPointerDown}\n />\n </div>\n )}\n <div\n className={clsx(styles['drawer-content-container'], sharedStyles['with-motion'])}\n style={{ width: isMobile ? '100%' : `${activeDrawerSize}px` }}\n >\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: !isToolsDrawer && activeDrawerId,\n [testutilStyles['tools-close']]: isToolsDrawer,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => onActiveDrawerChange(null)}\n ref={drawersFocusControl.refs.close}\n variant=\"icon\"\n />\n </div>\n <div\n className={clsx(\n styles['drawer-content'],\n activeDrawerId !== TOOLS_DRAWER_ID && styles['drawer-content-hidden']\n )}\n >\n {toolsContent}\n </div>\n {activeDrawerId !== TOOLS_DRAWER_ID && <div className={styles['drawer-content']}>{activeDrawer?.content}</div>}\n </div>\n </aside>\n );\n}\n\nexport const createWidgetizedAppLayoutDrawer = createWidgetizedComponent(AppLayoutDrawerImplementation);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-resize.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/use-resize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,WAAW;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,SAAS,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,WAAW;;;;
|
|
1
|
+
{"version":3,"file":"use-resize.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/use-resize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,WAAW;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,SAAS,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,WAAW;;;;EAwBzG"}
|
|
@@ -13,6 +13,7 @@ export function useResize({ currentWidth, minWidth, maxWidth, panelRef, handleRe
|
|
|
13
13
|
panelRef,
|
|
14
14
|
handleRef,
|
|
15
15
|
onResize: onResizeHandler,
|
|
16
|
+
hasTransitions: true,
|
|
16
17
|
};
|
|
17
18
|
const clampedWidth = getLimitedValue(minWidth, currentWidth, maxWidth);
|
|
18
19
|
const relativeSize = ((clampedWidth - minWidth) / (maxWidth - minWidth)) * 100;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-resize.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/use-resize.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAWlE,MAAM,UAAU,SAAS,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAe;IACxG,MAAM,eAAe,GAAG,CAAC,QAAgB,EAAE,EAAE;QAC3C,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAE3D,IAAI,QAAQ,IAAI,QAAQ,EAAE;YACxB,QAAQ,CAAC,IAAI,CAAC,CAAC;SAChB;IACH,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,QAAQ,EAAE,MAAM;QAChB,QAAQ;QACR,SAAS;QACT,QAAQ,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"use-resize.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/use-resize.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAWlE,MAAM,UAAU,SAAS,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAe;IACxG,MAAM,eAAe,GAAG,CAAC,QAAgB,EAAE,EAAE;QAC3C,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAE3D,IAAI,QAAQ,IAAI,QAAQ,EAAE;YACxB,QAAQ,CAAC,IAAI,CAAC,CAAC;SAChB;IACH,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,QAAQ,EAAE,MAAM;QAChB,QAAQ;QACR,SAAS;QACT,QAAQ,EAAE,eAAe;QACzB,cAAc,EAAE,IAAI;KACrB,CAAC;IAEF,MAAM,YAAY,GAAG,eAAe,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,GAAG,GAAG,CAAC;IAE/E,MAAM,aAAa,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAEtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AACpD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { SizeControlProps } from '../../utils/interfaces';\nimport { useKeyboardEvents } from '../../utils/use-keyboard-events';\nimport { usePointerEvents } from '../../utils/use-pointer-events';\n\ninterface ResizeProps {\n currentWidth: number;\n minWidth: number;\n maxWidth: number;\n panelRef: React.RefObject<HTMLDivElement>;\n handleRef: React.RefObject<HTMLDivElement>;\n onResize: (newWidth: number) => void;\n}\n\nexport function useResize({ currentWidth, minWidth, maxWidth, panelRef, handleRef, onResize }: ResizeProps) {\n const onResizeHandler = (newWidth: number) => {\n const size = getLimitedValue(minWidth, newWidth, maxWidth);\n\n if (maxWidth >= minWidth) {\n onResize(size);\n }\n };\n\n const sizeControlProps: SizeControlProps = {\n position: 'side',\n panelRef,\n handleRef,\n onResize: onResizeHandler,\n hasTransitions: true,\n };\n\n const clampedWidth = getLimitedValue(minWidth, currentWidth, maxWidth);\n const relativeSize = ((clampedWidth - minWidth) / (maxWidth - minWidth)) * 100;\n\n const onPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n return { onKeyDown, onPointerDown, relativeSize };\n}\n"]}
|
|
@@ -88,7 +88,7 @@ const AppLayoutVisualRefreshToolbar = React.forwardRef((_a, forwardRef) => {
|
|
|
88
88
|
}));
|
|
89
89
|
const resolvedNavigation = navigationHide ? null : navigation !== null && navigation !== void 0 ? navigation : React.createElement(React.Fragment, null);
|
|
90
90
|
const { maxDrawerSize, maxSplitPanelSize, splitPanelForcedPosition, splitPanelPosition } = computeHorizontalLayout({
|
|
91
|
-
activeDrawerSize,
|
|
91
|
+
activeDrawerSize: activeDrawer ? activeDrawerSize : 0,
|
|
92
92
|
splitPanelSize,
|
|
93
93
|
minContentWidth,
|
|
94
94
|
navigationOpen: !!resolvedNavigation && navigationOpen,
|
|
@@ -96,6 +96,7 @@ const AppLayoutVisualRefreshToolbar = React.forwardRef((_a, forwardRef) => {
|
|
|
96
96
|
placement,
|
|
97
97
|
splitPanelOpen,
|
|
98
98
|
splitPanelPosition: splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position,
|
|
99
|
+
isMobile,
|
|
99
100
|
});
|
|
100
101
|
const { registered, toolbarProps } = useMultiAppLayout({
|
|
101
102
|
forceDeduplicationType,
|
|
@@ -189,8 +190,7 @@ const AppLayoutVisualRefreshToolbar = React.forwardRef((_a, forwardRef) => {
|
|
|
189
190
|
paddingBlockEnd: splitPanelOpen && splitPanelPosition === 'bottom' ? splitPanelReportedSize : '',
|
|
190
191
|
}, toolbar: hasToolbar && React.createElement(AppLayoutToolbar, { appLayoutInternals: appLayoutInternals, toolbarProps: toolbarProps }), notifications: notifications && (React.createElement(AppLayoutNotifications, { appLayoutInternals: appLayoutInternals }, notifications)), contentHeader: contentHeader,
|
|
191
192
|
// delay rendering the content until registration of this instance is complete
|
|
192
|
-
content: registered ? content : null, navigation: resolvedNavigation && React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutInternals }), navigationOpen: navigationOpen, navigationWidth: navigationWidth, tools: activeDrawer && React.createElement(AppLayoutDrawer, { appLayoutInternals: appLayoutInternals }), toolsOpen: !!activeDrawer, toolsWidth: activeDrawerSize, sideSplitPanel: splitPanelPosition === 'side' &&
|
|
193
|
-
splitPanel && (React.createElement(AppLayoutSplitPanelSide, { appLayoutInternals: appLayoutInternals, splitPanelInternals: splitPanelInternals }, splitPanel)), bottomSplitPanel: splitPanelPosition === 'bottom' && (React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutInternals, splitPanelInternals: splitPanelInternals }, splitPanel)), splitPanelOpen: splitPanelOpen, placement: placement, contentType: contentType, maxContentWidth: maxContentWidth, disableContentPaddings: disableContentPaddings })));
|
|
193
|
+
content: registered ? content : null, navigation: resolvedNavigation && React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutInternals }), navigationOpen: navigationOpen, navigationWidth: navigationWidth, tools: activeDrawer && React.createElement(AppLayoutDrawer, { appLayoutInternals: appLayoutInternals }), toolsOpen: !!activeDrawer, toolsWidth: activeDrawerSize, sideSplitPanel: splitPanelPosition === 'side' && (React.createElement(AppLayoutSplitPanelSide, { appLayoutInternals: appLayoutInternals, splitPanelInternals: splitPanelInternals }, splitPanel)), bottomSplitPanel: splitPanelPosition === 'bottom' && (React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutInternals, splitPanelInternals: splitPanelInternals }, splitPanel)), splitPanelOpen: splitPanelOpen, placement: placement, contentType: contentType, maxContentWidth: maxContentWidth, disableContentPaddings: disableContentPaddings })));
|
|
194
194
|
});
|
|
195
195
|
export default AppLayoutVisualRefreshToolbar;
|
|
196
196
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAG9E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,6BAA6B,GAAG,KAAK,CAAC,UAAU,CACpD,CACE,EA+BC,EACD,UAAU,EACV,EAAE;;QAjCF,EACE,UAAU,EACV,aAAa,EACb,OAAO,EACP,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,KAAK,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AAa,CAA0B,CACzG,EAEH,aAAa,EAAE,aAAa;YAC5B,8EAA8E;YAC9E,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EACpC,UAAU,EAAE,kBAAkB,IAAI,oBAAC,mBAAmB,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EACjG,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,YAAY,IAAI,oBAAC,eAAe,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EAClF,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,UAAU,EAAE,gBAAgB,EAC5B,cAAc,EACZ,kBAAkB,KAAK,MAAM;gBAC7B,UAAU,IAAI,CACZ,oBAAC,uBAAuB,IACtB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,IAEvC,UAAU,CACa,CAC3B,EAEH,gBAAgB,EACd,kBAAkB,KAAK,QAAQ,IAAI,CACjC,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,IAEvC,UAAU,CACe,CAC7B,EAEH,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,GAC9C,CACD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,6BAA6B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useImperativeHandle, useState } from 'react';\n\nimport ScreenreaderOnly from '../../internal/components/screenreader-only';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { useMobile } from '../../internal/hooks/use-mobile';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport { useGetGlobalBreadcrumbs } from '../../internal/plugins/helpers/use-global-breadcrumbs';\nimport globalVars from '../../internal/styles/global-vars';\nimport { getSplitPanelDefaultSize } from '../../split-panel/utils/size-utils';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';\nimport { SplitPanelProviderProps } from '../split-panel';\nimport { useDrawers } from '../utils/use-drawers';\nimport { useFocusControl } from '../utils/use-focus-control';\nimport { useSplitPanelFocusControl } from '../utils/use-split-panel-focus-control';\nimport { computeHorizontalLayout, computeVerticalLayout } from './compute-layout';\nimport { AppLayoutInternals } from './interfaces';\nimport {\n AppLayoutDrawer,\n AppLayoutNavigation,\n AppLayoutNotifications,\n AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelSide,\n AppLayoutToolbar,\n} from './internal';\nimport { useMultiAppLayout } from './multi-layout';\nimport { SkeletonLayout } from './skeleton';\n\nconst AppLayoutVisualRefreshToolbar = React.forwardRef<AppLayoutProps.Ref, AppLayoutPropsWithDefaults>(\n (\n {\n ariaLabels,\n contentHeader,\n content,\n navigationOpen,\n navigationWidth,\n navigation,\n navigationHide,\n onNavigationChange,\n tools,\n toolsOpen: controlledToolsOpen,\n onToolsChange,\n toolsHide,\n toolsWidth,\n contentType,\n headerVariant,\n breadcrumbs,\n notifications,\n stickyNotifications,\n splitPanelPreferences: controlledSplitPanelPreferences,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n onSplitPanelToggle,\n onSplitPanelResize,\n onSplitPanelPreferencesChange,\n disableContentPaddings,\n minContentWidth,\n maxContentWidth,\n placement,\n ...rest\n },\n forwardRef\n ) => {\n const isMobile = useMobile();\n const { __embeddedViewMode: embeddedViewMode, __forceDeduplicationType: forceDeduplicationType } = rest as any;\n const splitPanelControlId = useUniqueId('split-panel');\n const [toolbarState, setToolbarState] = useState<'show' | 'hide'>('show');\n const [toolbarHeight, setToolbarHeight] = useState(0);\n const [notificationsHeight, setNotificationsHeight] = useState(0);\n\n const onNavigationToggle = (open: boolean) => {\n fireNonCancelableEvent(onNavigationChange, { open });\n };\n\n const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, false, {\n componentName: 'AppLayout',\n controlledProp: 'toolsOpen',\n changeHandler: 'onToolsChange',\n });\n const onToolsToggle = (open: boolean) => {\n setToolsOpen(open);\n drawersFocusControl.setFocus();\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n ariaLabelsWithDrawers,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = useDrawers(rest, ariaLabels, {\n ariaLabels,\n toolsHide,\n toolsOpen,\n tools,\n toolsWidth,\n onToolsToggle,\n });\n\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n\n const onSplitPanelToggleHandler = () => {\n setSplitPanelOpen(!splitPanelOpen);\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n };\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n\n const onSplitPanelPreferencesChangeHandler = (detail: AppLayoutProps.SplitPanelPreferences) => {\n setSplitPanelPreferences(detail);\n splitPanelFocusControl.setLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n };\n\n const [splitPanelSize = 0, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n getSplitPanelDefaultSize(splitPanelPreferences?.position ?? 'bottom'),\n { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' }\n );\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n\n const onSplitPanelResizeHandler = (size: number) => {\n setSplitPanelSize(size);\n fireNonCancelableEvent(onSplitPanelResize, { size });\n };\n\n const [splitPanelToggleConfig, setSplitPanelToggleConfig] = useState<SplitPanelSideToggleProps>({\n ariaLabel: undefined,\n displayed: false,\n });\n\n const drawersFocusControl = useFocusControl(!!activeDrawer?.id);\n const navigationFocusControl = useFocusControl(navigationOpen);\n const splitPanelFocusControl = useSplitPanelFocusControl([splitPanelPreferences, splitPanelOpen]);\n\n useImperativeHandle(forwardRef, () => ({\n closeNavigationIfNecessary: () => isMobile && onNavigationToggle(false),\n openTools: () => onToolsToggle(true),\n focusToolsClose: () => drawersFocusControl.setFocus(true),\n focusActiveDrawer: () => drawersFocusControl.setFocus(true),\n focusSplitPanel: () => splitPanelFocusControl.refs.slider.current?.focus(),\n }));\n\n const resolvedNavigation = navigationHide ? null : navigation ?? <></>;\n const { maxDrawerSize, maxSplitPanelSize, splitPanelForcedPosition, splitPanelPosition } = computeHorizontalLayout({\n activeDrawerSize,\n splitPanelSize,\n minContentWidth,\n navigationOpen: !!resolvedNavigation && navigationOpen,\n navigationWidth,\n placement,\n splitPanelOpen,\n splitPanelPosition: splitPanelPreferences?.position,\n });\n\n const { registered, toolbarProps } = useMultiAppLayout({\n forceDeduplicationType,\n ariaLabels: ariaLabelsWithDrawers,\n navigation: resolvedNavigation,\n navigationOpen,\n onNavigationToggle,\n navigationFocusRef: navigationFocusControl.refs.toggle,\n breadcrumbs,\n activeDrawerId: activeDrawer?.id ?? null,\n // only pass it down if there are non-empty drawers or tools\n drawers: drawers?.length || !toolsHide ? drawers : undefined,\n onActiveDrawerChange,\n drawersFocusRef: drawersFocusControl.refs.toggle,\n splitPanel,\n splitPanelToggleProps: {\n ...splitPanelToggleConfig,\n active: splitPanelOpen,\n controlId: splitPanelControlId,\n position: splitPanelPosition,\n },\n splitPanelFocusRef: splitPanelFocusControl.refs.toggle,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n });\n\n const hasToolbar = !embeddedViewMode && !!toolbarProps;\n const discoveredBreadcrumbs = useGetGlobalBreadcrumbs(hasToolbar);\n\n const verticalOffsets = computeVerticalLayout({\n topOffset: placement.insetBlockStart,\n hasVisibleToolbar: hasToolbar && toolbarState !== 'hide',\n notificationsHeight: notificationsHeight ?? 0,\n toolbarHeight: toolbarHeight ?? 0,\n stickyNotifications: !!stickyNotifications,\n });\n\n const appLayoutInternals: AppLayoutInternals = {\n ariaLabels: ariaLabelsWithDrawers,\n headerVariant,\n isMobile,\n breadcrumbs,\n discoveredBreadcrumbs,\n stickyNotifications,\n navigationOpen,\n navigation: resolvedNavigation,\n navigationFocusControl,\n activeDrawer,\n activeDrawerSize,\n minDrawerSize,\n maxDrawerSize,\n drawers: drawers!,\n drawersFocusControl,\n splitPanelPosition,\n splitPanelToggleConfig,\n splitPanelOpen,\n splitPanelControlId,\n splitPanelFocusControl,\n placement,\n toolbarState,\n setToolbarState,\n verticalOffsets,\n setToolbarHeight,\n setNotificationsHeight,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n onNavigationToggle,\n onActiveDrawerChange,\n onActiveDrawerResize,\n };\n\n const splitPanelInternals: SplitPanelProviderProps = {\n bottomOffset: 0,\n getMaxHeight: () => {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n // If the page is likely zoomed in at 200%, allow the split panel to fill the content area.\n return availableHeight < 400 ? availableHeight - 40 : availableHeight - 250;\n },\n maxWidth: maxSplitPanelSize,\n isForcedPosition: splitPanelForcedPosition,\n isOpen: splitPanelOpen,\n leftOffset: 0,\n onPreferencesChange: onSplitPanelPreferencesChangeHandler,\n onResize: onSplitPanelResizeHandler,\n onToggle: onSplitPanelToggleHandler,\n position: splitPanelPosition,\n reportSize: size => setSplitPanelReportedSize(size),\n reportHeaderHeight: () => {\n /*unused in this design*/\n },\n rightOffset: 0,\n size: splitPanelSize,\n topOffset: 0,\n setSplitPanelToggle: setSplitPanelToggleConfig,\n refs: splitPanelFocusControl.refs,\n };\n\n return (\n <>\n {/* Rendering a hidden copy of breadcrumbs to trigger their deduplication */}\n {!hasToolbar && breadcrumbs ? <ScreenreaderOnly>{breadcrumbs}</ScreenreaderOnly> : null}\n <SkeletonLayout\n style={{\n [globalVars.stickyVerticalTopOffset]: `${verticalOffsets.header}px`,\n [globalVars.stickyVerticalBottomOffset]: `${placement.insetBlockEnd}px`,\n paddingBlockEnd: splitPanelOpen && splitPanelPosition === 'bottom' ? splitPanelReportedSize : '',\n }}\n toolbar={\n hasToolbar && <AppLayoutToolbar appLayoutInternals={appLayoutInternals} toolbarProps={toolbarProps} />\n }\n notifications={\n notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutInternals}>{notifications}</AppLayoutNotifications>\n )\n }\n contentHeader={contentHeader}\n // delay rendering the content until registration of this instance is complete\n content={registered ? content : null}\n navigation={resolvedNavigation && <AppLayoutNavigation appLayoutInternals={appLayoutInternals} />}\n navigationOpen={navigationOpen}\n navigationWidth={navigationWidth}\n tools={activeDrawer && <AppLayoutDrawer appLayoutInternals={appLayoutInternals} />}\n toolsOpen={!!activeDrawer}\n toolsWidth={activeDrawerSize}\n sideSplitPanel={\n splitPanelPosition === 'side' &&\n splitPanel && (\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutInternals}\n splitPanelInternals={splitPanelInternals}\n >\n {splitPanel}\n </AppLayoutSplitPanelSide>\n )\n }\n bottomSplitPanel={\n splitPanelPosition === 'bottom' && (\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutInternals}\n splitPanelInternals={splitPanelInternals}\n >\n {splitPanel}\n </AppLayoutSplitPanelBottom>\n )\n }\n splitPanelOpen={splitPanelOpen}\n placement={placement}\n contentType={contentType}\n maxContentWidth={maxContentWidth}\n disableContentPaddings={disableContentPaddings}\n />\n </>\n );\n }\n);\n\nexport default AppLayoutVisualRefreshToolbar;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAG9E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,6BAA6B,GAAG,KAAK,CAAC,UAAU,CACpD,CACE,EA+BC,EACD,UAAU,EACV,EAAE;;QAjCF,EACE,UAAU,EACV,aAAa,EACb,OAAO,EACP,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,SAAS,E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IAAI,CACf,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,kBAAkB,IAAG,aAAa,CAA0B,CACzG,EAEH,aAAa,EAAE,aAAa;YAC5B,8EAA8E;YAC9E,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EACpC,UAAU,EAAE,kBAAkB,IAAI,oBAAC,mBAAmB,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EACjG,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,YAAY,IAAI,oBAAC,eAAe,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EAClF,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,UAAU,EAAE,gBAAgB,EAC5B,cAAc,EACZ,kBAAkB,KAAK,MAAM,IAAI,CAC/B,oBAAC,uBAAuB,IACtB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,IAEvC,UAAU,CACa,CAC3B,EAEH,gBAAgB,EACd,kBAAkB,KAAK,QAAQ,IAAI,CACjC,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,IAEvC,UAAU,CACe,CAC7B,EAEH,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,GAC9C,CACD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,6BAA6B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useImperativeHandle, useState } from 'react';\n\nimport ScreenreaderOnly from '../../internal/components/screenreader-only';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { useMobile } from '../../internal/hooks/use-mobile';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport { useGetGlobalBreadcrumbs } from '../../internal/plugins/helpers/use-global-breadcrumbs';\nimport globalVars from '../../internal/styles/global-vars';\nimport { getSplitPanelDefaultSize } from '../../split-panel/utils/size-utils';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';\nimport { SplitPanelProviderProps } from '../split-panel';\nimport { useDrawers } from '../utils/use-drawers';\nimport { useFocusControl } from '../utils/use-focus-control';\nimport { useSplitPanelFocusControl } from '../utils/use-split-panel-focus-control';\nimport { computeHorizontalLayout, computeVerticalLayout } from './compute-layout';\nimport { AppLayoutInternals } from './interfaces';\nimport {\n AppLayoutDrawer,\n AppLayoutNavigation,\n AppLayoutNotifications,\n AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelSide,\n AppLayoutToolbar,\n} from './internal';\nimport { useMultiAppLayout } from './multi-layout';\nimport { SkeletonLayout } from './skeleton';\n\nconst AppLayoutVisualRefreshToolbar = React.forwardRef<AppLayoutProps.Ref, AppLayoutPropsWithDefaults>(\n (\n {\n ariaLabels,\n contentHeader,\n content,\n navigationOpen,\n navigationWidth,\n navigation,\n navigationHide,\n onNavigationChange,\n tools,\n toolsOpen: controlledToolsOpen,\n onToolsChange,\n toolsHide,\n toolsWidth,\n contentType,\n headerVariant,\n breadcrumbs,\n notifications,\n stickyNotifications,\n splitPanelPreferences: controlledSplitPanelPreferences,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n onSplitPanelToggle,\n onSplitPanelResize,\n onSplitPanelPreferencesChange,\n disableContentPaddings,\n minContentWidth,\n maxContentWidth,\n placement,\n ...rest\n },\n forwardRef\n ) => {\n const isMobile = useMobile();\n const { __embeddedViewMode: embeddedViewMode, __forceDeduplicationType: forceDeduplicationType } = rest as any;\n const splitPanelControlId = useUniqueId('split-panel');\n const [toolbarState, setToolbarState] = useState<'show' | 'hide'>('show');\n const [toolbarHeight, setToolbarHeight] = useState(0);\n const [notificationsHeight, setNotificationsHeight] = useState(0);\n\n const onNavigationToggle = (open: boolean) => {\n fireNonCancelableEvent(onNavigationChange, { open });\n };\n\n const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, false, {\n componentName: 'AppLayout',\n controlledProp: 'toolsOpen',\n changeHandler: 'onToolsChange',\n });\n const onToolsToggle = (open: boolean) => {\n setToolsOpen(open);\n drawersFocusControl.setFocus();\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n ariaLabelsWithDrawers,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = useDrawers(rest, ariaLabels, {\n ariaLabels,\n toolsHide,\n toolsOpen,\n tools,\n toolsWidth,\n onToolsToggle,\n });\n\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n\n const onSplitPanelToggleHandler = () => {\n setSplitPanelOpen(!splitPanelOpen);\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n };\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n\n const onSplitPanelPreferencesChangeHandler = (detail: AppLayoutProps.SplitPanelPreferences) => {\n setSplitPanelPreferences(detail);\n splitPanelFocusControl.setLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n };\n\n const [splitPanelSize = 0, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n getSplitPanelDefaultSize(splitPanelPreferences?.position ?? 'bottom'),\n { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' }\n );\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n\n const onSplitPanelResizeHandler = (size: number) => {\n setSplitPanelSize(size);\n fireNonCancelableEvent(onSplitPanelResize, { size });\n };\n\n const [splitPanelToggleConfig, setSplitPanelToggleConfig] = useState<SplitPanelSideToggleProps>({\n ariaLabel: undefined,\n displayed: false,\n });\n\n const drawersFocusControl = useFocusControl(!!activeDrawer?.id);\n const navigationFocusControl = useFocusControl(navigationOpen);\n const splitPanelFocusControl = useSplitPanelFocusControl([splitPanelPreferences, splitPanelOpen]);\n\n useImperativeHandle(forwardRef, () => ({\n closeNavigationIfNecessary: () => isMobile && onNavigationToggle(false),\n openTools: () => onToolsToggle(true),\n focusToolsClose: () => drawersFocusControl.setFocus(true),\n focusActiveDrawer: () => drawersFocusControl.setFocus(true),\n focusSplitPanel: () => splitPanelFocusControl.refs.slider.current?.focus(),\n }));\n\n const resolvedNavigation = navigationHide ? null : navigation ?? <></>;\n const { maxDrawerSize, maxSplitPanelSize, splitPanelForcedPosition, splitPanelPosition } = computeHorizontalLayout({\n activeDrawerSize: activeDrawer ? activeDrawerSize : 0,\n splitPanelSize,\n minContentWidth,\n navigationOpen: !!resolvedNavigation && navigationOpen,\n navigationWidth,\n placement,\n splitPanelOpen,\n splitPanelPosition: splitPanelPreferences?.position,\n isMobile,\n });\n\n const { registered, toolbarProps } = useMultiAppLayout({\n forceDeduplicationType,\n ariaLabels: ariaLabelsWithDrawers,\n navigation: resolvedNavigation,\n navigationOpen,\n onNavigationToggle,\n navigationFocusRef: navigationFocusControl.refs.toggle,\n breadcrumbs,\n activeDrawerId: activeDrawer?.id ?? null,\n // only pass it down if there are non-empty drawers or tools\n drawers: drawers?.length || !toolsHide ? drawers : undefined,\n onActiveDrawerChange,\n drawersFocusRef: drawersFocusControl.refs.toggle,\n splitPanel,\n splitPanelToggleProps: {\n ...splitPanelToggleConfig,\n active: splitPanelOpen,\n controlId: splitPanelControlId,\n position: splitPanelPosition,\n },\n splitPanelFocusRef: splitPanelFocusControl.refs.toggle,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n });\n\n const hasToolbar = !embeddedViewMode && !!toolbarProps;\n const discoveredBreadcrumbs = useGetGlobalBreadcrumbs(hasToolbar);\n\n const verticalOffsets = computeVerticalLayout({\n topOffset: placement.insetBlockStart,\n hasVisibleToolbar: hasToolbar && toolbarState !== 'hide',\n notificationsHeight: notificationsHeight ?? 0,\n toolbarHeight: toolbarHeight ?? 0,\n stickyNotifications: !!stickyNotifications,\n });\n\n const appLayoutInternals: AppLayoutInternals = {\n ariaLabels: ariaLabelsWithDrawers,\n headerVariant,\n isMobile,\n breadcrumbs,\n discoveredBreadcrumbs,\n stickyNotifications,\n navigationOpen,\n navigation: resolvedNavigation,\n navigationFocusControl,\n activeDrawer,\n activeDrawerSize,\n minDrawerSize,\n maxDrawerSize,\n drawers: drawers!,\n drawersFocusControl,\n splitPanelPosition,\n splitPanelToggleConfig,\n splitPanelOpen,\n splitPanelControlId,\n splitPanelFocusControl,\n placement,\n toolbarState,\n setToolbarState,\n verticalOffsets,\n setToolbarHeight,\n setNotificationsHeight,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n onNavigationToggle,\n onActiveDrawerChange,\n onActiveDrawerResize,\n };\n\n const splitPanelInternals: SplitPanelProviderProps = {\n bottomOffset: 0,\n getMaxHeight: () => {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n // If the page is likely zoomed in at 200%, allow the split panel to fill the content area.\n return availableHeight < 400 ? availableHeight - 40 : availableHeight - 250;\n },\n maxWidth: maxSplitPanelSize,\n isForcedPosition: splitPanelForcedPosition,\n isOpen: splitPanelOpen,\n leftOffset: 0,\n onPreferencesChange: onSplitPanelPreferencesChangeHandler,\n onResize: onSplitPanelResizeHandler,\n onToggle: onSplitPanelToggleHandler,\n position: splitPanelPosition,\n reportSize: size => setSplitPanelReportedSize(size),\n reportHeaderHeight: () => {\n /*unused in this design*/\n },\n rightOffset: 0,\n size: splitPanelSize,\n topOffset: 0,\n setSplitPanelToggle: setSplitPanelToggleConfig,\n refs: splitPanelFocusControl.refs,\n };\n\n return (\n <>\n {/* Rendering a hidden copy of breadcrumbs to trigger their deduplication */}\n {!hasToolbar && breadcrumbs ? <ScreenreaderOnly>{breadcrumbs}</ScreenreaderOnly> : null}\n <SkeletonLayout\n style={{\n [globalVars.stickyVerticalTopOffset]: `${verticalOffsets.header}px`,\n [globalVars.stickyVerticalBottomOffset]: `${placement.insetBlockEnd}px`,\n paddingBlockEnd: splitPanelOpen && splitPanelPosition === 'bottom' ? splitPanelReportedSize : '',\n }}\n toolbar={\n hasToolbar && <AppLayoutToolbar appLayoutInternals={appLayoutInternals} toolbarProps={toolbarProps} />\n }\n notifications={\n notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutInternals}>{notifications}</AppLayoutNotifications>\n )\n }\n contentHeader={contentHeader}\n // delay rendering the content until registration of this instance is complete\n content={registered ? content : null}\n navigation={resolvedNavigation && <AppLayoutNavigation appLayoutInternals={appLayoutInternals} />}\n navigationOpen={navigationOpen}\n navigationWidth={navigationWidth}\n tools={activeDrawer && <AppLayoutDrawer appLayoutInternals={appLayoutInternals} />}\n toolsOpen={!!activeDrawer}\n toolsWidth={activeDrawerSize}\n sideSplitPanel={\n splitPanelPosition === 'side' && (\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutInternals}\n splitPanelInternals={splitPanelInternals}\n >\n {splitPanel}\n </AppLayoutSplitPanelSide>\n )\n }\n bottomSplitPanel={\n splitPanelPosition === 'bottom' && (\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutInternals}\n splitPanelInternals={splitPanelInternals}\n >\n {splitPanel}\n </AppLayoutSplitPanelBottom>\n )\n }\n splitPanelOpen={splitPanelOpen}\n placement={placement}\n contentType={contentType}\n maxContentWidth={maxContentWidth}\n disableContentPaddings={disableContentPaddings}\n />\n </>\n );\n }\n);\n\nexport default AppLayoutVisualRefreshToolbar;\n"]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"navigation": "
|
|
5
|
-
"is-navigation-open": "awsui_is-navigation-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"animated-content": "awsui_animated-content_2p2ab_19363_194",
|
|
9
|
-
"hide-navigation": "awsui_hide-navigation_2p2ab_19363_203"
|
|
4
|
+
"navigation": "awsui_navigation_2p2ab_1f02a_149",
|
|
5
|
+
"is-navigation-open": "awsui_is-navigation-open_2p2ab_1f02a_167",
|
|
6
|
+
"animated-content": "awsui_animated-content_2p2ab_1f02a_171",
|
|
7
|
+
"hide-navigation": "awsui_hide-navigation_2p2ab_1f02a_180"
|
|
10
8
|
};
|
|
11
9
|
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css
CHANGED
|
@@ -146,7 +146,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
147
147
|
SPDX-License-Identifier: Apache-2.0
|
|
148
148
|
*/
|
|
149
|
-
.
|
|
149
|
+
.awsui_navigation_2p2ab_1f02a_149:not(#\9) {
|
|
150
150
|
position: sticky;
|
|
151
151
|
background-color: var(--color-background-container-content-il2pe5, #ffffff);
|
|
152
152
|
inset-block-end: 0;
|
|
@@ -164,43 +164,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
164
164
|
prevent unwanted text wrapping.
|
|
165
165
|
*/
|
|
166
166
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
opacity: 0;
|
|
170
|
-
inline-size: calc(var(--space-layout-toggle-padding-k1jpy8, 12px) * 2 + var(--space-layout-toggle-diameter-ugv12v, 36px));
|
|
171
|
-
}
|
|
172
|
-
to {
|
|
173
|
-
opacity: 1;
|
|
174
|
-
inline-size: var(--awsui-navigation-width-g964ok);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
.awsui_navigation_2p2ab_19363_149:not(#\9):not(.awsui_is-navigation-open_2p2ab_19363_177) {
|
|
178
|
-
inline-size: 0;
|
|
167
|
+
.awsui_navigation_2p2ab_1f02a_149:not(#\9):not(.awsui_is-navigation-open_2p2ab_1f02a_167) {
|
|
168
|
+
inline-size: 0px;
|
|
179
169
|
display: none;
|
|
180
170
|
}
|
|
181
|
-
.
|
|
182
|
-
animation: awsui_openNavigation_2p2ab_19363_1 var(--motion-duration-refresh-only-fast-y7h37k, 115ms);
|
|
183
|
-
}
|
|
184
|
-
@media (prefers-reduced-motion: reduce) {
|
|
185
|
-
.awsui_navigation_2p2ab_19363_149.awsui_is-navigation-open_2p2ab_19363_177.awsui_animating_2p2ab_19363_181:not(#\9) {
|
|
186
|
-
animation: none;
|
|
187
|
-
transition: none;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
.awsui-motion-disabled .awsui_navigation_2p2ab_19363_149.awsui_is-navigation-open_2p2ab_19363_177.awsui_animating_2p2ab_19363_181:not(#\9), .awsui-mode-entering .awsui_navigation_2p2ab_19363_149.awsui_is-navigation-open_2p2ab_19363_177.awsui_animating_2p2ab_19363_181:not(#\9) {
|
|
191
|
-
animation: none;
|
|
192
|
-
transition: none;
|
|
193
|
-
}
|
|
194
|
-
.awsui_navigation_2p2ab_19363_149 > .awsui_animated-content_2p2ab_19363_194:not(#\9) {
|
|
171
|
+
.awsui_navigation_2p2ab_1f02a_149 > .awsui_animated-content_2p2ab_1f02a_171:not(#\9) {
|
|
195
172
|
inline-size: var(--awsui-navigation-width-g964ok);
|
|
196
173
|
}
|
|
197
174
|
@media (max-width: 688px) {
|
|
198
|
-
.
|
|
175
|
+
.awsui_navigation_2p2ab_1f02a_149:not(#\9) {
|
|
199
176
|
--awsui-navigation-width-g964ok: 100vw;
|
|
200
177
|
}
|
|
201
178
|
}
|
|
202
179
|
|
|
203
|
-
.awsui_hide-
|
|
180
|
+
.awsui_hide-navigation_2p2ab_1f02a_180:not(#\9) {
|
|
204
181
|
position: absolute;
|
|
205
182
|
inset-inline-end: var(--space-m-kpg8id, 16px);
|
|
206
183
|
inset-block-start: 10px;
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"navigation": "
|
|
6
|
-
"is-navigation-open": "awsui_is-navigation-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"animated-content": "awsui_animated-content_2p2ab_19363_194",
|
|
10
|
-
"hide-navigation": "awsui_hide-navigation_2p2ab_19363_203"
|
|
5
|
+
"navigation": "awsui_navigation_2p2ab_1f02a_149",
|
|
6
|
+
"is-navigation-open": "awsui_is-navigation-open_2p2ab_1f02a_167",
|
|
7
|
+
"animated-content": "awsui_animated-content_2p2ab_1f02a_171",
|
|
8
|
+
"hide-navigation": "awsui_hide-navigation_2p2ab_1f02a_180"
|
|
11
9
|
};
|
|
12
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAQ9D,UAAU,mBACR,SAAQ,IAAI,CACV,0BAA0B,EACxB,eAAe,GACf,eAAe,GACf,SAAS,GACT,aAAa,GACb,iBAAiB,GACjB,wBAAwB,GACxB,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,OAAO,GACP,WAAW,GACX,YAAY,GACZ,WAAW,CACd;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,UAAU,EACV,cAAc,EACd,eAAe,EACf,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,sBAAsB,GACvB,EAAE,mBAAmB,eAmDrB"}
|