@cloudscape-design/components-themeable 3.0.973 → 3.0.974
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/internal/components/drag-handle-wrapper/motion.scss +53 -161
- package/lib/internal/scss/internal/components/panel-resize-handle/styles.scss +3 -20
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +59 -57
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +32 -32
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/classic.d.ts.map +1 -1
- package/lib/internal/template/app-layout/classic.js +3 -2
- package/lib/internal/template/app-layout/classic.js.map +1 -1
- package/lib/internal/template/app-layout/drawer/interfaces.d.ts +1 -0
- package/lib/internal/template/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/drawer/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/drawer/resizable-drawer.js +6 -6
- package/lib/internal/template/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/interfaces.d.ts +1 -0
- package/lib/internal/template/app-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/utils/use-keyboard-events.d.ts +5 -1
- package/lib/internal/template/app-layout/utils/use-keyboard-events.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-keyboard-events.js +65 -42
- package/lib/internal/template/app-layout/utils/use-keyboard-events.js.map +1 -1
- package/lib/internal/template/app-layout/utils/use-resize.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-resize.js +3 -3
- package/lib/internal/template/app-layout/utils/use-resize.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +10 -10
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +12 -12
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +10 -10
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts +1 -0
- 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 +2 -2
- 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/navigation/styles.css.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +19 -19
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +43 -43
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +19 -19
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +166 -166
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.ar.js +1 -1
- package/lib/internal/template/i18n/messages/all.ar.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +1 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.js +2 -3
- package/lib/internal/template/internal/components/drag-handle/button.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +0 -3
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +8 -6
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +21 -27
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -235
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +21 -27
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +38 -38
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/panel-resize-handle/index.d.ts +3 -0
- package/lib/internal/template/internal/components/panel-resize-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/index.js +11 -4
- package/lib/internal/template/internal/components/panel-resize-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/styles.css.js +2 -5
- package/lib/internal/template/internal/components/panel-resize-handle/styles.scoped.css +9 -26
- package/lib/internal/template/internal/components/panel-resize-handle/styles.selectors.js +2 -5
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +2 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +59 -57
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +1 -0
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +86 -86
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +39 -39
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/split-panel/implementation.d.ts.map +1 -1
- package/lib/internal/template/split-panel/implementation.js +3 -3
- package/lib/internal/template/split-panel/implementation.js.map +1 -1
- package/lib/internal/template/split-panel/index.d.ts.map +1 -1
- package/lib/internal/template/split-panel/index.js +1 -1
- package/lib/internal/template/split-panel/index.js.map +1 -1
- package/lib/internal/template/split-panel/interfaces.d.ts +1 -0
- package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/split-panel/interfaces.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/icon.d.ts +0 -5
- package/lib/internal/template/internal/components/panel-resize-handle/icon.d.ts.map +0 -1
- package/lib/internal/template/internal/components/panel-resize-handle/icon.js +0 -9
- package/lib/internal/template/internal/components/panel-resize-handle/icon.js.map +0 -1
|
@@ -2,91 +2,91 @@
|
|
|
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
|
-
"content-container": "awsui_content-
|
|
65
|
-
"hide-navigation": "awsui_hide-
|
|
66
|
-
"notifications": "
|
|
67
|
-
"has-notification-content": "awsui_has-notification-
|
|
68
|
-
"sticky-notifications": "awsui_sticky-
|
|
69
|
-
"high-contrast": "awsui_high-
|
|
70
|
-
"split-panel-bottom": "awsui_split-panel-
|
|
71
|
-
"position-bottom": "awsui_position-
|
|
72
|
-
"openSplitPanelBottom": "
|
|
73
|
-
"split-panel-side": "awsui_split-panel-
|
|
74
|
-
"position-side": "awsui_position-
|
|
75
|
-
"tools-container": "awsui_tools-
|
|
76
|
-
"tools": "
|
|
77
|
-
"openTools": "
|
|
78
|
-
"has-tools-form-persistence": "awsui_has-tools-form-
|
|
79
|
-
"hide-tools": "awsui_hide-
|
|
80
|
-
"show-tools": "awsui_show-
|
|
81
|
-
"has-tools-form": "awsui_has-tools-
|
|
82
|
-
"trigger-button-styles": "awsui_trigger-button-
|
|
83
|
-
"trigger-badge-wrapper": "awsui_trigger-badge-
|
|
84
|
-
"trigger": "
|
|
85
|
-
"selected": "
|
|
86
|
-
"badge": "
|
|
87
|
-
"trigger-wrapper": "awsui_trigger-
|
|
88
|
-
"trigger-wrapper-tooltip-visible": "awsui_trigger-wrapper-tooltip-
|
|
89
|
-
"dot": "
|
|
90
|
-
"trigger-tooltip": "awsui_trigger-
|
|
5
|
+
"background": "awsui_background_hyvsj_xqllo_149",
|
|
6
|
+
"scrolling-background": "awsui_scrolling-background_hyvsj_xqllo_152",
|
|
7
|
+
"breadcrumbs": "awsui_breadcrumbs_hyvsj_xqllo_163",
|
|
8
|
+
"drawers-container": "awsui_drawers-container_hyvsj_xqllo_176",
|
|
9
|
+
"has-open-drawer": "awsui_has-open-drawer_hyvsj_xqllo_187",
|
|
10
|
+
"disable-body-scroll": "awsui_disable-body-scroll_hyvsj_xqllo_208",
|
|
11
|
+
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_xqllo_213",
|
|
12
|
+
"has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_xqllo_251",
|
|
13
|
+
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_xqllo_261",
|
|
14
|
+
"drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_xqllo_266",
|
|
15
|
+
"drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_xqllo_280",
|
|
16
|
+
"drawers-trigger": "awsui_drawers-trigger_hyvsj_xqllo_266",
|
|
17
|
+
"drawer": "awsui_drawer_hyvsj_xqllo_176",
|
|
18
|
+
"drawer-content-container": "awsui_drawer-content-container_hyvsj_xqllo_311",
|
|
19
|
+
"drawer-close-button": "awsui_drawer-close-button_hyvsj_xqllo_320",
|
|
20
|
+
"drawer-content": "awsui_drawer-content_hyvsj_xqllo_311",
|
|
21
|
+
"drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_xqllo_329",
|
|
22
|
+
"drawer-slider": "awsui_drawer-slider_hyvsj_xqllo_332",
|
|
23
|
+
"is-drawer-open": "awsui_is-drawer-open_hyvsj_xqllo_339",
|
|
24
|
+
"content": "awsui_content_hyvsj_xqllo_365",
|
|
25
|
+
"layout": "awsui_layout_hyvsj_xqllo_390",
|
|
26
|
+
"has-max-content-width": "awsui_has-max-content-width_hyvsj_xqllo_462",
|
|
27
|
+
"content-type-dashboard": "awsui_content-type-dashboard_hyvsj_xqllo_477",
|
|
28
|
+
"content-type-table": "awsui_content-type-table_hyvsj_xqllo_491",
|
|
29
|
+
"content-type-cards": "awsui_content-type-cards_hyvsj_xqllo_491",
|
|
30
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_xqllo_497",
|
|
31
|
+
"is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_xqllo_500",
|
|
32
|
+
"has-content-gap-left": "awsui_has-content-gap-left_hyvsj_xqllo_514",
|
|
33
|
+
"has-content-gap-right": "awsui_has-content-gap-right_hyvsj_xqllo_517",
|
|
34
|
+
"has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_xqllo_527",
|
|
35
|
+
"content-first-child-header": "awsui_content-first-child-header_hyvsj_xqllo_530",
|
|
36
|
+
"content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_xqllo_530",
|
|
37
|
+
"has-header": "awsui_has-header_hyvsj_xqllo_530",
|
|
38
|
+
"content-first-child-main": "awsui_content-first-child-main_hyvsj_xqllo_545",
|
|
39
|
+
"disable-content-paddings": "awsui_disable-content-paddings_hyvsj_xqllo_545",
|
|
40
|
+
"has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_xqllo_565",
|
|
41
|
+
"has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_xqllo_568",
|
|
42
|
+
"has-split-panel": "awsui_has-split-panel_hyvsj_xqllo_588",
|
|
43
|
+
"split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_xqllo_588",
|
|
44
|
+
"block-body-scroll": "awsui_block-body-scroll_hyvsj_xqllo_596",
|
|
45
|
+
"unfocusable": "awsui_unfocusable_hyvsj_xqllo_601",
|
|
46
|
+
"container": "awsui_container_hyvsj_xqllo_611",
|
|
47
|
+
"is-navigation-open": "awsui_is-navigation-open_hyvsj_xqllo_637",
|
|
48
|
+
"is-tools-open": "awsui_is-tools-open_hyvsj_xqllo_640",
|
|
49
|
+
"is-split-panel-open": "awsui_is-split-panel-open_hyvsj_xqllo_640",
|
|
50
|
+
"split-panel-position-side": "awsui_split-panel-position-side_hyvsj_xqllo_640",
|
|
51
|
+
"has-active-drawer": "awsui_has-active-drawer_hyvsj_xqllo_640",
|
|
52
|
+
"mobile-toolbar": "awsui_mobile-toolbar_hyvsj_xqllo_653",
|
|
53
|
+
"remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_xqllo_670",
|
|
54
|
+
"mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_xqllo_674",
|
|
55
|
+
"mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_xqllo_678",
|
|
56
|
+
"mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_xqllo_682",
|
|
57
|
+
"navigation-container": "awsui_navigation-container_hyvsj_xqllo_691",
|
|
58
|
+
"show-navigation": "awsui_show-navigation_hyvsj_xqllo_729",
|
|
59
|
+
"animating": "awsui_animating_hyvsj_xqllo_752",
|
|
60
|
+
"showButtons": "awsui_showButtons_hyvsj_xqllo_1",
|
|
61
|
+
"navigation": "awsui_navigation_hyvsj_xqllo_691",
|
|
62
|
+
"openNavigation": "awsui_openNavigation_hyvsj_xqllo_1",
|
|
63
|
+
"animated-content": "awsui_animated-content_hyvsj_xqllo_816",
|
|
64
|
+
"content-container": "awsui_content-container_hyvsj_xqllo_819",
|
|
65
|
+
"hide-navigation": "awsui_hide-navigation_hyvsj_xqllo_828",
|
|
66
|
+
"notifications": "awsui_notifications_hyvsj_xqllo_838",
|
|
67
|
+
"has-notification-content": "awsui_has-notification-content_hyvsj_xqllo_843",
|
|
68
|
+
"sticky-notifications": "awsui_sticky-notifications_hyvsj_xqllo_847",
|
|
69
|
+
"high-contrast": "awsui_high-contrast_hyvsj_xqllo_852",
|
|
70
|
+
"split-panel-bottom": "awsui_split-panel-bottom_hyvsj_xqllo_870",
|
|
71
|
+
"position-bottom": "awsui_position-bottom_hyvsj_xqllo_917",
|
|
72
|
+
"openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_xqllo_1",
|
|
73
|
+
"split-panel-side": "awsui_split-panel-side_hyvsj_xqllo_946",
|
|
74
|
+
"position-side": "awsui_position-side_hyvsj_xqllo_959",
|
|
75
|
+
"tools-container": "awsui_tools-container_hyvsj_xqllo_981",
|
|
76
|
+
"tools": "awsui_tools_hyvsj_xqllo_981",
|
|
77
|
+
"openTools": "awsui_openTools_hyvsj_xqllo_1",
|
|
78
|
+
"has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_xqllo_1070",
|
|
79
|
+
"hide-tools": "awsui_hide-tools_hyvsj_xqllo_1080",
|
|
80
|
+
"show-tools": "awsui_show-tools_hyvsj_xqllo_1092",
|
|
81
|
+
"has-tools-form": "awsui_has-tools-form_hyvsj_xqllo_1070",
|
|
82
|
+
"trigger-button-styles": "awsui_trigger-button-styles_hyvsj_xqllo_1172",
|
|
83
|
+
"trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_xqllo_1188",
|
|
84
|
+
"trigger": "awsui_trigger_hyvsj_xqllo_1172",
|
|
85
|
+
"selected": "awsui_selected_hyvsj_xqllo_1240",
|
|
86
|
+
"badge": "awsui_badge_hyvsj_xqllo_1260",
|
|
87
|
+
"trigger-wrapper": "awsui_trigger-wrapper_hyvsj_xqllo_1264",
|
|
88
|
+
"trigger-wrapper-tooltip-visible": "awsui_trigger-wrapper-tooltip-visible_hyvsj_xqllo_1275",
|
|
89
|
+
"dot": "awsui_dot_hyvsj_xqllo_1279",
|
|
90
|
+
"trigger-tooltip": "awsui_trigger-tooltip_hyvsj_xqllo_1292"
|
|
91
91
|
};
|
|
92
92
|
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOnE,UAAU,wCAAwC;IAChD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,cAAc,GAAG,SAAS,CAAC;CAChD;AAED,iBAAS,mCAAmC,CAAC,EAC3C,kBAAkB,EAClB,IAAI,EACJ,kBAAkB,GACnB,EAAE,wCAAwC,
|
|
1
|
+
{"version":3,"file":"global-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOnE,UAAU,wCAAwC;IAChD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,cAAc,GAAG,SAAS,CAAC;CAChD;AAED,iBAAS,mCAAmC,CAAC,EAC3C,kBAAkB,EAClB,IAAI,EACJ,kBAAkB,GACnB,EAAE,wCAAwC,eA4H1C;AAED,eAAe,mCAAmC,CAAC"}
|
|
@@ -39,7 +39,7 @@ function AppLayoutGlobalDrawerImplementation({ appLayoutInternals, show, activeG
|
|
|
39
39
|
const hasTriggerButton = !!(activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.trigger);
|
|
40
40
|
const animationDisabled = (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.defaultActive) && !drawersOpenQueue.includes(activeGlobalDrawer.id);
|
|
41
41
|
return (React.createElement(Transition, { nodeRef: drawerRef, in: show, appear: show, timeout: 0 }, state => {
|
|
42
|
-
var _a;
|
|
42
|
+
var _a, _b;
|
|
43
43
|
return (React.createElement("aside", { id: activeDrawerId, "aria-hidden": !show, "aria-label": computedAriaLabels.content, className: clsx(styles.drawer, styles['drawer-global'], styles[state], !animationDisabled && sharedStyles['with-motion-horizontal'], {
|
|
44
44
|
[styles['drawer-hidden']]: !show,
|
|
45
45
|
[styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,
|
|
@@ -60,7 +60,7 @@ function AppLayoutGlobalDrawerImplementation({ appLayoutInternals, show, activeG
|
|
|
60
60
|
[customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,
|
|
61
61
|
})), "data-testid": `awsui-app-layout-drawer-${activeDrawerId}` },
|
|
62
62
|
!isMobile && (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.resizable) && (React.createElement("div", { className: styles['drawer-slider'] },
|
|
63
|
-
React.createElement(PanelResizeHandle, { ref: refs === null || refs === void 0 ? void 0 : refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_a = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _a === void 0 ? void 0 : _a.resizeHandle, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onPointerDown: resizeProps.onPointerDown }))),
|
|
63
|
+
React.createElement(PanelResizeHandle, { ref: refs === null || refs === void 0 ? void 0 : refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_a = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _a === void 0 ? void 0 : _a.resizeHandle, tooltipText: (_b = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _b === void 0 ? void 0 : _b.resizeHandleTooltipText, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onDirectionClick: resizeProps.onDirectionClick, onPointerDown: resizeProps.onPointerDown }))),
|
|
64
64
|
React.createElement("div", { className: clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal']), "data-testid": `awsui-app-layout-drawer-content-${activeDrawerId}` },
|
|
65
65
|
React.createElement("div", { className: clsx(styles['drawer-close-button']) },
|
|
66
66
|
React.createElement(InternalButton, { ariaLabel: computedAriaLabels.closeButton, className: clsx({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-drawer.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,YAAY,MAA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com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals, InternalDrawer } 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 AppLayoutGlobalDrawerImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n show: boolean;\n activeGlobalDrawer: InternalDrawer | undefined;\n}\n\nfunction AppLayoutGlobalDrawerImplementation({\n appLayoutInternals,\n show,\n activeGlobalDrawer,\n}: AppLayoutGlobalDrawerImplementationProps) {\n const {\n ariaLabels,\n globalDrawersFocusControl,\n isMobile,\n placement,\n onActiveGlobalDrawersChange,\n onActiveDrawerResize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n activeGlobalDrawersSizes,\n verticalOffsets,\n drawersOpenQueue,\n } = appLayoutInternals;\n const drawerRef = useRef<HTMLDivElement>(null);\n const activeDrawerId = activeGlobalDrawer?.id ?? '';\n\n const computedAriaLabels = {\n closeButton: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n const activeDrawerSize = (activeDrawerId ? activeGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const minDrawerSize = (activeDrawerId ? minGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const maxDrawerSize = (activeDrawerId ? maxGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const refs = globalDrawersFocusControl.refs[activeDrawerId];\n const resizeProps = useResize({\n currentWidth: activeDrawerSize,\n minWidth: minDrawerSize,\n maxWidth: maxDrawerSize,\n panelRef: drawerRef,\n handleRef: refs?.slider,\n onResize: size => onActiveDrawerResize({ id: activeDrawerId!, size }),\n });\n const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);\n const lastOpenedDrawerId = drawersOpenQueue.length ? drawersOpenQueue[0] : null;\n const hasTriggerButton = !!activeGlobalDrawer?.trigger;\n const animationDisabled = activeGlobalDrawer?.defaultActive && !drawersOpenQueue.includes(activeGlobalDrawer.id);\n\n return (\n <Transition nodeRef={drawerRef} in={show} appear={show} timeout={0}>\n {state => {\n return (\n <aside\n id={activeDrawerId}\n aria-hidden={!show}\n aria-label={computedAriaLabels.content}\n className={clsx(\n styles.drawer,\n styles['drawer-global'],\n styles[state],\n !animationDisabled && sharedStyles['with-motion-horizontal'],\n {\n [styles['drawer-hidden']]: !show,\n [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,\n [testutilStyles['active-drawer']]: show,\n }\n )}\n ref={drawerRef}\n onBlur={e => {\n // Drawers with trigger buttons follow this restore focus logic:\n // If a previously focused element exists, restore focus on it; otherwise, focus on the associated trigger button.\n // This function resets the previously focused element.\n // If the drawer has no trigger button and loses focus on the previously focused element, it defaults to document.body,\n // which ideally should never happen.\n if (!hasTriggerButton) {\n return;\n }\n\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n globalDrawersFocusControl.loseFocus();\n }\n }}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n ...(!isMobile && {\n [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,\n }),\n }}\n data-testid={`awsui-app-layout-drawer-${activeDrawerId}`}\n >\n {!isMobile && activeGlobalDrawer?.resizable && (\n <div className={styles['drawer-slider']}>\n <PanelResizeHandle\n ref={refs?.slider}\n position=\"side\"\n className={testutilStyles['drawers-slider']}\n ariaLabel={activeGlobalDrawer?.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-horizontal'])}\n data-testid={`awsui-app-layout-drawer-content-${activeDrawerId}`}\n >\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => onActiveGlobalDrawersChange(activeDrawerId, { initiatedByUserAction: true })}\n ref={refs?.close}\n variant=\"icon\"\n />\n </div>\n <div className={styles['drawer-content']} style={{ blockSize: drawerHeight }}>\n {activeGlobalDrawer?.content}\n </div>\n </div>\n </aside>\n );\n }}\n </Transition>\n );\n}\n\nexport default AppLayoutGlobalDrawerImplementation;\n"]}
|
|
1
|
+
{"version":3,"file":"global-drawer.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE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lB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CACxB,CACF,CACA,CACT,CAAC;IACJ,CAAC,CACU,CACd,CAAC;AACJ,CAAC;AAED,eAAe,mCAAmC,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 { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals, InternalDrawer } 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 AppLayoutGlobalDrawerImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n show: boolean;\n activeGlobalDrawer: InternalDrawer | undefined;\n}\n\nfunction AppLayoutGlobalDrawerImplementation({\n appLayoutInternals,\n show,\n activeGlobalDrawer,\n}: AppLayoutGlobalDrawerImplementationProps) {\n const {\n ariaLabels,\n globalDrawersFocusControl,\n isMobile,\n placement,\n onActiveGlobalDrawersChange,\n onActiveDrawerResize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n activeGlobalDrawersSizes,\n verticalOffsets,\n drawersOpenQueue,\n } = appLayoutInternals;\n const drawerRef = useRef<HTMLDivElement>(null);\n const activeDrawerId = activeGlobalDrawer?.id ?? '';\n\n const computedAriaLabels = {\n closeButton: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n const activeDrawerSize = (activeDrawerId ? activeGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const minDrawerSize = (activeDrawerId ? minGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const maxDrawerSize = (activeDrawerId ? maxGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const refs = globalDrawersFocusControl.refs[activeDrawerId];\n const resizeProps = useResize({\n currentWidth: activeDrawerSize,\n minWidth: minDrawerSize,\n maxWidth: maxDrawerSize,\n panelRef: drawerRef,\n handleRef: refs?.slider,\n onResize: size => onActiveDrawerResize({ id: activeDrawerId!, size }),\n });\n const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);\n const lastOpenedDrawerId = drawersOpenQueue.length ? drawersOpenQueue[0] : null;\n const hasTriggerButton = !!activeGlobalDrawer?.trigger;\n const animationDisabled = activeGlobalDrawer?.defaultActive && !drawersOpenQueue.includes(activeGlobalDrawer.id);\n\n return (\n <Transition nodeRef={drawerRef} in={show} appear={show} timeout={0}>\n {state => {\n return (\n <aside\n id={activeDrawerId}\n aria-hidden={!show}\n aria-label={computedAriaLabels.content}\n className={clsx(\n styles.drawer,\n styles['drawer-global'],\n styles[state],\n !animationDisabled && sharedStyles['with-motion-horizontal'],\n {\n [styles['drawer-hidden']]: !show,\n [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,\n [testutilStyles['active-drawer']]: show,\n }\n )}\n ref={drawerRef}\n onBlur={e => {\n // Drawers with trigger buttons follow this restore focus logic:\n // If a previously focused element exists, restore focus on it; otherwise, focus on the associated trigger button.\n // This function resets the previously focused element.\n // If the drawer has no trigger button and loses focus on the previously focused element, it defaults to document.body,\n // which ideally should never happen.\n if (!hasTriggerButton) {\n return;\n }\n\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n globalDrawersFocusControl.loseFocus();\n }\n }}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n ...(!isMobile && {\n [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,\n }),\n }}\n data-testid={`awsui-app-layout-drawer-${activeDrawerId}`}\n >\n {!isMobile && activeGlobalDrawer?.resizable && (\n <div className={styles['drawer-slider']}>\n <PanelResizeHandle\n ref={refs?.slider}\n position=\"side\"\n className={testutilStyles['drawers-slider']}\n ariaLabel={activeGlobalDrawer?.ariaLabels?.resizeHandle}\n tooltipText={activeGlobalDrawer?.ariaLabels?.resizeHandleTooltipText}\n ariaValuenow={resizeProps.relativeSize}\n onKeyDown={resizeProps.onKeyDown}\n onDirectionClick={resizeProps.onDirectionClick}\n onPointerDown={resizeProps.onPointerDown}\n />\n </div>\n )}\n <div\n className={clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal'])}\n data-testid={`awsui-app-layout-drawer-content-${activeDrawerId}`}\n >\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => onActiveGlobalDrawersChange(activeDrawerId, { initiatedByUserAction: true })}\n ref={refs?.close}\n variant=\"icon\"\n />\n </div>\n <div className={styles['drawer-content']} style={{ blockSize: drawerHeight }}>\n {activeGlobalDrawer?.content}\n </div>\n </div>\n </aside>\n );\n }}\n </Transition>\n );\n}\n\nexport default AppLayoutGlobalDrawerImplementation;\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/local-drawer.tsx"],"names":[],"mappings":";AAaA,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":"local-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/local-drawer.tsx"],"names":[],"mappings":";AAaA,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,eA2HvG;AAED,eAAO,MAAM,+BAA+B,qGAA2D,CAAC"}
|
|
@@ -41,7 +41,7 @@ export function AppLayoutDrawerImplementation({ appLayoutInternals }) {
|
|
|
41
41
|
const lastOpenedDrawerId = (drawersOpenQueue === null || drawersOpenQueue === void 0 ? void 0 : drawersOpenQueue.length) ? drawersOpenQueue[0] : activeDrawerId;
|
|
42
42
|
const animationDisabled = (activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.defaultActive) && !drawersOpenQueue.includes(activeDrawer.id);
|
|
43
43
|
return (React.createElement(Transition, { nodeRef: drawerRef, in: !!activeDrawer, appear: true, timeout: 0 }, state => {
|
|
44
|
-
var _a;
|
|
44
|
+
var _a, _b;
|
|
45
45
|
return (React.createElement("aside", { id: activeDrawerId, "aria-hidden": !activeDrawer, "aria-label": computedAriaLabels.content, className: clsx(styles.drawer, {
|
|
46
46
|
[sharedStyles['with-motion-horizontal']]: !animationDisabled,
|
|
47
47
|
[styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,
|
|
@@ -59,7 +59,7 @@ export function AppLayoutDrawerImplementation({ appLayoutInternals }) {
|
|
|
59
59
|
[customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,
|
|
60
60
|
})), "data-testid": activeDrawerId && `awsui-app-layout-drawer-${activeDrawerId}` },
|
|
61
61
|
!isMobile && (activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.resizable) && (React.createElement("div", { className: styles['drawer-slider'] },
|
|
62
|
-
React.createElement(PanelResizeHandle, { ref: drawersFocusControl.refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_a = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _a === void 0 ? void 0 : _a.resizeHandle, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onPointerDown: resizeProps.onPointerDown }))),
|
|
62
|
+
React.createElement(PanelResizeHandle, { ref: drawersFocusControl.refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_a = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _a === void 0 ? void 0 : _a.resizeHandle, tooltipText: (_b = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _b === void 0 ? void 0 : _b.resizeHandleTooltipText, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onPointerDown: resizeProps.onPointerDown, onDirectionClick: resizeProps.onDirectionClick }))),
|
|
63
63
|
React.createElement("div", { className: clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal']) },
|
|
64
64
|
React.createElement("div", { className: clsx(styles['drawer-close-button']) },
|
|
65
65
|
React.createElement(InternalButton, { ariaLabel: computedAriaLabels.closeButton, className: clsx({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-drawer.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/local-drawer.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,cA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e,IAAI,MAAM,CAAC,uBAAuB,CAAC,CACtE,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,IAEjC,YAAY,CACT;gBACL,cAAc,KAAK,eAAe,IAAI,CACrC,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,IACzE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAClB,CACP,CACG,CACA,CACT,CAAA;KAAA,CACU,CACd,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 { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { TOOLS_DRAWER_ID } from '../../utils/use-drawers';\nimport { getDrawerStyles } from '../compute-layout';\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 verticalOffsets,\n drawersOpenQueue,\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 { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;\n const isToolsDrawer = activeDrawer?.id === TOOLS_DRAWER_ID || toolsOnlyMode;\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 // temporary handle a situation when app-layout is old, but this component come as a widget\n const isLegacyDrawer = drawersOpenQueue === undefined;\n const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);\n const lastOpenedDrawerId = drawersOpenQueue?.length ? drawersOpenQueue[0] : activeDrawerId;\n const animationDisabled = activeDrawer?.defaultActive && !drawersOpenQueue.includes(activeDrawer.id);\n\n return (\n <Transition nodeRef={drawerRef} in={!!activeDrawer} appear={true} timeout={0}>\n {state => (\n <aside\n id={activeDrawerId}\n aria-hidden={!activeDrawer}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, {\n [sharedStyles['with-motion-horizontal']]: !animationDisabled,\n [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,\n [styles.legacy]: isLegacyDrawer,\n [testutilStyles['active-drawer']]: !toolsOnlyMode && activeDrawerId,\n [testutilStyles.tools]: isToolsDrawer,\n [styles['drawer-hidden']]: !activeDrawer,\n [testutilStyles['drawer-closed']]: !activeDrawer,\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: drawerHeight,\n insetBlockStart: drawerTopOffset,\n ...(!isMobile &&\n !isLegacyDrawer && {\n [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,\n }),\n }}\n data-testid={activeDrawerId && `awsui-app-layout-drawer-${activeDrawerId}`}\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 className={clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal'])}>\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, { initiatedByUserAction: true })}\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 style={{ blockSize: drawerHeight }}\n >\n {toolsContent}\n </div>\n {activeDrawerId !== TOOLS_DRAWER_ID && (\n <div className={styles['drawer-content']} style={{ blockSize: drawerHeight }}>\n {activeDrawer?.content}\n </div>\n )}\n </div>\n </aside>\n )}\n </Transition>\n );\n}\n\nexport const createWidgetizedAppLayoutDrawer = createWidgetizedComponent(AppLayoutDrawerImplementation);\n"]}
|
|
1
|
+
{"version":3,"file":"local-drawer.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/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4BAChF,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,EAAE,aAAa;yBAC/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,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,EAC1E,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,EACnC,OAAO,EAAC,MAAM,GACd,CACE;gBACN,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,gBAAgB,CAAC,EACxB,cAAc,KAAK,eAAe,IAAI,MAAM,CAAC,uBAAuB,CAAC,CACtE,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,IAEjC,YAAY,CACT;gBACL,cAAc,KAAK,eAAe,IAAI,CACrC,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,IACzE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAClB,CACP,CACG,CACA,CACT,CAAA;KAAA,CACU,CACd,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 { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { TOOLS_DRAWER_ID } from '../../utils/use-drawers';\nimport { getDrawerStyles } from '../compute-layout';\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 verticalOffsets,\n drawersOpenQueue,\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 { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;\n const isToolsDrawer = activeDrawer?.id === TOOLS_DRAWER_ID || toolsOnlyMode;\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 // temporary handle a situation when app-layout is old, but this component come as a widget\n const isLegacyDrawer = drawersOpenQueue === undefined;\n const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);\n const lastOpenedDrawerId = drawersOpenQueue?.length ? drawersOpenQueue[0] : activeDrawerId;\n const animationDisabled = activeDrawer?.defaultActive && !drawersOpenQueue.includes(activeDrawer.id);\n\n return (\n <Transition nodeRef={drawerRef} in={!!activeDrawer} appear={true} timeout={0}>\n {state => (\n <aside\n id={activeDrawerId}\n aria-hidden={!activeDrawer}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, {\n [sharedStyles['with-motion-horizontal']]: !animationDisabled,\n [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,\n [styles.legacy]: isLegacyDrawer,\n [testutilStyles['active-drawer']]: !toolsOnlyMode && activeDrawerId,\n [testutilStyles.tools]: isToolsDrawer,\n [styles['drawer-hidden']]: !activeDrawer,\n [testutilStyles['drawer-closed']]: !activeDrawer,\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: drawerHeight,\n insetBlockStart: drawerTopOffset,\n ...(!isMobile &&\n !isLegacyDrawer && {\n [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,\n }),\n }}\n data-testid={activeDrawerId && `awsui-app-layout-drawer-${activeDrawerId}`}\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 tooltipText={activeDrawer?.ariaLabels?.resizeHandleTooltipText}\n ariaValuenow={resizeProps.relativeSize}\n onKeyDown={resizeProps.onKeyDown}\n onPointerDown={resizeProps.onPointerDown}\n onDirectionClick={resizeProps.onDirectionClick}\n />\n </div>\n )}\n <div className={clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal'])}>\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, { initiatedByUserAction: true })}\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 style={{ blockSize: drawerHeight }}\n >\n {toolsContent}\n </div>\n {activeDrawerId !== TOOLS_DRAWER_ID && (\n <div className={styles['drawer-content']} style={{ blockSize: drawerHeight }}>\n {activeDrawer?.content}\n </div>\n )}\n </div>\n </aside>\n )}\n </Transition>\n );\n}\n\nexport const createWidgetizedAppLayoutDrawer = createWidgetizedComponent(AppLayoutDrawerImplementation);\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"drawer": "
|
|
5
|
-
"legacy": "
|
|
6
|
-
"last-opened": "awsui_last-
|
|
7
|
-
"drawer-global": "awsui_drawer-
|
|
8
|
-
"drawer-hidden": "awsui_drawer-
|
|
9
|
-
"drawer-content-container": "awsui_drawer-content-
|
|
10
|
-
"drawer-close-button": "awsui_drawer-close-
|
|
11
|
-
"drawer-content": "awsui_drawer-
|
|
12
|
-
"drawer-content-hidden": "awsui_drawer-content-
|
|
13
|
-
"drawer-slider": "awsui_drawer-
|
|
4
|
+
"drawer": "awsui_drawer_12i0j_ep6h5_189",
|
|
5
|
+
"legacy": "awsui_legacy_12i0j_ep6h5_204",
|
|
6
|
+
"last-opened": "awsui_last-opened_12i0j_ep6h5_212",
|
|
7
|
+
"drawer-global": "awsui_drawer-global_12i0j_ep6h5_217",
|
|
8
|
+
"drawer-hidden": "awsui_drawer-hidden_12i0j_ep6h5_221",
|
|
9
|
+
"drawer-content-container": "awsui_drawer-content-container_12i0j_ep6h5_224",
|
|
10
|
+
"drawer-close-button": "awsui_drawer-close-button_12i0j_ep6h5_232",
|
|
11
|
+
"drawer-content": "awsui_drawer-content_12i0j_ep6h5_224",
|
|
12
|
+
"drawer-content-hidden": "awsui_drawer-content-hidden_12i0j_ep6h5_242",
|
|
13
|
+
"drawer-slider": "awsui_drawer-slider_12i0j_ep6h5_245"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -186,13 +186,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_drawer_12i0j_ep6h5_189:not(#\9) {
|
|
190
190
|
position: sticky;
|
|
191
191
|
z-index: 830;
|
|
192
192
|
background-color: var(--color-background-container-content-mvmryi, #ffffff);
|
|
193
193
|
display: grid;
|
|
194
194
|
grid-template-columns: var(--space-m-n2lypl, 16px) 1fr;
|
|
195
|
-
inline-size: var(--awsui-drawer-size-
|
|
195
|
+
inline-size: var(--awsui-drawer-size-xgujsu);
|
|
196
196
|
block-size: 100%;
|
|
197
197
|
overflow: hidden;
|
|
198
198
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
@@ -201,27 +201,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
201
201
|
word-wrap: break-word;
|
|
202
202
|
}
|
|
203
203
|
@media (min-width: 689px) {
|
|
204
|
-
.
|
|
204
|
+
.awsui_drawer_12i0j_ep6h5_189:not(#\9):not(.awsui_legacy_12i0j_ep6h5_204) {
|
|
205
205
|
border-inline-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-gb61sp, #d5dbdb);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
@media (max-width: 688px) {
|
|
209
|
-
.
|
|
209
|
+
.awsui_drawer_12i0j_ep6h5_189:not(#\9) {
|
|
210
210
|
inline-size: 100%;
|
|
211
211
|
}
|
|
212
|
-
.
|
|
212
|
+
.awsui_drawer_12i0j_ep6h5_189.awsui_last-opened_12i0j_ep6h5_212:not(#\9) {
|
|
213
213
|
z-index: 1001;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
@media (max-width: 688px) {
|
|
217
|
-
.
|
|
217
|
+
.awsui_drawer_12i0j_ep6h5_189.awsui_drawer-global_12i0j_ep6h5_217:not(#\9):not(.awsui_last-opened_12i0j_ep6h5_212) {
|
|
218
218
|
display: none;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
.
|
|
221
|
+
.awsui_drawer_12i0j_ep6h5_189.awsui_drawer-hidden_12i0j_ep6h5_221:not(#\9) {
|
|
222
222
|
display: none;
|
|
223
223
|
}
|
|
224
|
-
.
|
|
224
|
+
.awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224:not(#\9) {
|
|
225
225
|
grid-column: 1/span 2;
|
|
226
226
|
grid-row: 1;
|
|
227
227
|
display: grid;
|
|
@@ -229,20 +229,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
229
229
|
grid-template-rows: 14px auto 1fr;
|
|
230
230
|
overflow-y: auto;
|
|
231
231
|
}
|
|
232
|
-
.
|
|
232
|
+
.awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224 > .awsui_drawer-close-button_12i0j_ep6h5_232:not(#\9) {
|
|
233
233
|
grid-column: 3;
|
|
234
234
|
grid-row: 2;
|
|
235
235
|
z-index: 1;
|
|
236
236
|
align-self: start;
|
|
237
237
|
}
|
|
238
|
-
.
|
|
238
|
+
.awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224 > .awsui_drawer-content_12i0j_ep6h5_224:not(#\9) {
|
|
239
239
|
grid-column: 1/span 4;
|
|
240
240
|
grid-row: 1/span 2;
|
|
241
241
|
}
|
|
242
|
-
.
|
|
242
|
+
.awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224 > .awsui_drawer-content_12i0j_ep6h5_224.awsui_drawer-content-hidden_12i0j_ep6h5_242:not(#\9) {
|
|
243
243
|
display: none;
|
|
244
244
|
}
|
|
245
|
-
.
|
|
245
|
+
.awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-slider_12i0j_ep6h5_245:not(#\9) {
|
|
246
246
|
grid-column: 1;
|
|
247
247
|
grid-row: 1;
|
|
248
248
|
block-size: 100%;
|
|
@@ -2,15 +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
|
-
"drawer": "
|
|
6
|
-
"legacy": "
|
|
7
|
-
"last-opened": "awsui_last-
|
|
8
|
-
"drawer-global": "awsui_drawer-
|
|
9
|
-
"drawer-hidden": "awsui_drawer-
|
|
10
|
-
"drawer-content-container": "awsui_drawer-content-
|
|
11
|
-
"drawer-close-button": "awsui_drawer-close-
|
|
12
|
-
"drawer-content": "awsui_drawer-
|
|
13
|
-
"drawer-content-hidden": "awsui_drawer-content-
|
|
14
|
-
"drawer-slider": "awsui_drawer-
|
|
5
|
+
"drawer": "awsui_drawer_12i0j_ep6h5_189",
|
|
6
|
+
"legacy": "awsui_legacy_12i0j_ep6h5_204",
|
|
7
|
+
"last-opened": "awsui_last-opened_12i0j_ep6h5_212",
|
|
8
|
+
"drawer-global": "awsui_drawer-global_12i0j_ep6h5_217",
|
|
9
|
+
"drawer-hidden": "awsui_drawer-hidden_12i0j_ep6h5_221",
|
|
10
|
+
"drawer-content-container": "awsui_drawer-content-container_12i0j_ep6h5_224",
|
|
11
|
+
"drawer-close-button": "awsui_drawer-close-button_12i0j_ep6h5_232",
|
|
12
|
+
"drawer-content": "awsui_drawer-content_12i0j_ep6h5_224",
|
|
13
|
+
"drawer-content-hidden": "awsui_drawer-content-hidden_12i0j_ep6h5_242",
|
|
14
|
+
"drawer-slider": "awsui_drawer-slider_12i0j_ep6h5_245"
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -9,6 +9,7 @@ interface ResizeProps {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function useResize({ currentWidth, minWidth, maxWidth, panelRef, handleRef, onResize }: ResizeProps): {
|
|
11
11
|
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
12
|
+
onDirectionClick: (direction: import("../../../internal/components/drag-handle-wrapper/interfaces").Direction) => void;
|
|
12
13
|
onPointerDown: () => void;
|
|
13
14
|
relativeSize: number;
|
|
14
15
|
};
|
|
@@ -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;;;;;EAuBzG"}
|
|
@@ -17,7 +17,7 @@ export function useResize({ currentWidth, minWidth, maxWidth, panelRef, handleRe
|
|
|
17
17
|
const clampedWidth = getLimitedValue(minWidth, currentWidth, maxWidth);
|
|
18
18
|
const relativeSize = ((clampedWidth - minWidth) / (maxWidth - minWidth)) * 100;
|
|
19
19
|
const onPointerDown = usePointerEvents(sizeControlProps);
|
|
20
|
-
const onKeyDown = useKeyboardEvents(sizeControlProps);
|
|
21
|
-
return { onKeyDown, onPointerDown, relativeSize };
|
|
20
|
+
const { onKeyDown, onDirectionClick } = useKeyboardEvents(sizeControlProps);
|
|
21
|
+
return { onKeyDown, onDirectionClick, onPointerDown, relativeSize };
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=use-resize.js.map
|
|
@@ -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,Q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,EAAE,MAAM;QAChB,QAAQ;QACR,SAAS;QACT,QAAQ,EAAE,eAAe;KAC1B,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,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAE5E,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AACtE,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 };\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, onDirectionClick } = useKeyboardEvents(sizeControlProps);\n\n return { onKeyDown, onDirectionClick, onPointerDown, relativeSize };\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"navigation-container": "awsui_navigation-
|
|
5
|
-
"is-navigation-open": "awsui_is-navigation-
|
|
6
|
-
"navigation": "
|
|
7
|
-
"hide-navigation": "awsui_hide-
|
|
4
|
+
"navigation-container": "awsui_navigation-container_2p2ab_114hl_153",
|
|
5
|
+
"is-navigation-open": "awsui_is-navigation-open_2p2ab_114hl_164",
|
|
6
|
+
"navigation": "awsui_navigation_2p2ab_114hl_153",
|
|
7
|
+
"hide-navigation": "awsui_hide-navigation_2p2ab_114hl_184"
|
|
8
8
|
};
|
|
9
9
|
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css
CHANGED
|
@@ -150,7 +150,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
.awsui_navigation-
|
|
153
|
+
.awsui_navigation-container_2p2ab_114hl_153:not(#\9) {
|
|
154
154
|
position: sticky;
|
|
155
155
|
z-index: 830;
|
|
156
156
|
background-color: var(--color-background-container-content-mvmryi, #ffffff);
|
|
@@ -161,27 +161,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
161
161
|
display: flex;
|
|
162
162
|
flex-direction: column;
|
|
163
163
|
}
|
|
164
|
-
.awsui_navigation-
|
|
164
|
+
.awsui_navigation-container_2p2ab_114hl_153:not(#\9):not(.awsui_is-navigation-open_2p2ab_114hl_164) {
|
|
165
165
|
inline-size: 0px;
|
|
166
166
|
display: none;
|
|
167
167
|
}
|
|
168
|
-
.awsui_navigation-
|
|
168
|
+
.awsui_navigation-container_2p2ab_114hl_153 > .awsui_navigation_2p2ab_114hl_153:not(#\9) {
|
|
169
169
|
flex-grow: 1;
|
|
170
170
|
block-size: 100%;
|
|
171
171
|
overflow-y: auto;
|
|
172
172
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
173
173
|
overscroll-behavior-y: contain;
|
|
174
|
-
inline-size: var(--awsui-navigation-width-
|
|
174
|
+
inline-size: var(--awsui-navigation-width-xgujsu);
|
|
175
175
|
position: relative;
|
|
176
176
|
}
|
|
177
177
|
@media (max-width: 688px) {
|
|
178
|
-
.awsui_navigation-
|
|
179
|
-
--awsui-navigation-width-
|
|
178
|
+
.awsui_navigation-container_2p2ab_114hl_153:not(#\9) {
|
|
179
|
+
--awsui-navigation-width-xgujsu: 100vw;
|
|
180
180
|
z-index: 1001;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.awsui_hide-
|
|
184
|
+
.awsui_hide-navigation_2p2ab_114hl_184:not(#\9) {
|
|
185
185
|
position: absolute;
|
|
186
186
|
inset-inline-end: var(--space-m-n2lypl, 16px);
|
|
187
187
|
inset-block-start: 14px;
|