@cloudscape-design/components 3.0.896 → 3.0.898
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +36 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/visual-refresh-toolbar/index.d.ts +2 -16
- package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/index.js +3 -3
- package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -0
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/multi-layout.d.ts +1 -1
- package/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/multi-layout.js +7 -5
- package/app-layout/visual-refresh-toolbar/multi-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -24
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/button-dropdown/item-element/index.d.ts.map +1 -1
- package/button-dropdown/item-element/index.js +1 -1
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +15 -14
- package/button-dropdown/item-element/styles.scoped.css +25 -22
- package/button-dropdown/item-element/styles.selectors.js +15 -14
- package/hotspot/styles.css.js +7 -7
- package/hotspot/styles.scoped.css +8 -8
- package/hotspot/styles.selectors.js +7 -7
- package/internal/components/option/highlight-match.js +1 -1
- package/internal/components/option/highlight-match.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"arrow": "
|
|
5
|
-
"arrow-outer": "awsui_arrow-
|
|
6
|
-
"arrow-inner": "awsui_arrow-
|
|
7
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
8
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
10
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
12
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
14
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
15
|
-
"annotation": "
|
|
16
|
-
"next-button": "awsui_next-
|
|
17
|
-
"previous-button": "awsui_previous-
|
|
18
|
-
"finish-button": "awsui_finish-
|
|
19
|
-
"header": "
|
|
20
|
-
"step-counter-content": "awsui_step-counter-
|
|
21
|
-
"content": "
|
|
22
|
-
"description": "
|
|
23
|
-
"actionBar": "
|
|
24
|
-
"stepCounter": "
|
|
25
|
-
"divider": "
|
|
26
|
-
"hotspot": "
|
|
27
|
-
"icon": "
|
|
4
|
+
"arrow": "awsui_arrow_1hpp3_1nl1n_193",
|
|
5
|
+
"arrow-outer": "awsui_arrow-outer_1hpp3_1nl1n_197",
|
|
6
|
+
"arrow-inner": "awsui_arrow-inner_1hpp3_1nl1n_197",
|
|
7
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_1nl1n_239",
|
|
8
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_1nl1n_239",
|
|
9
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_1nl1n_242",
|
|
10
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_1nl1n_242",
|
|
11
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_1nl1n_245",
|
|
12
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_1nl1n_245",
|
|
13
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_1nl1n_248",
|
|
14
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_1nl1n_248",
|
|
15
|
+
"annotation": "awsui_annotation_1hpp3_1nl1n_252",
|
|
16
|
+
"next-button": "awsui_next-button_1hpp3_1nl1n_253",
|
|
17
|
+
"previous-button": "awsui_previous-button_1hpp3_1nl1n_254",
|
|
18
|
+
"finish-button": "awsui_finish-button_1hpp3_1nl1n_255",
|
|
19
|
+
"header": "awsui_header_1hpp3_1nl1n_256",
|
|
20
|
+
"step-counter-content": "awsui_step-counter-content_1hpp3_1nl1n_257",
|
|
21
|
+
"content": "awsui_content_1hpp3_1nl1n_258",
|
|
22
|
+
"description": "awsui_description_1hpp3_1nl1n_262",
|
|
23
|
+
"actionBar": "awsui_actionBar_1hpp3_1nl1n_267",
|
|
24
|
+
"stepCounter": "awsui_stepCounter_1hpp3_1nl1n_274",
|
|
25
|
+
"divider": "awsui_divider_1hpp3_1nl1n_278",
|
|
26
|
+
"hotspot": "awsui_hotspot_1hpp3_1nl1n_282",
|
|
27
|
+
"icon": "awsui_icon_1hpp3_1nl1n_352"
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -190,11 +190,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
190
190
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
191
191
|
SPDX-License-Identifier: Apache-2.0
|
|
192
192
|
*/
|
|
193
|
-
.
|
|
193
|
+
.awsui_arrow_1hpp3_1nl1n_193:not(#\9) {
|
|
194
194
|
inline-size: 20px;
|
|
195
195
|
block-size: 10px;
|
|
196
196
|
}
|
|
197
|
-
.awsui_arrow-
|
|
197
|
+
.awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9), .awsui_arrow-inner_1hpp3_1nl1n_197:not(#\9) {
|
|
198
198
|
position: absolute;
|
|
199
199
|
overflow: hidden;
|
|
200
200
|
inline-size: 20px;
|
|
@@ -203,7 +203,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
203
203
|
inset-inline-start: 0;
|
|
204
204
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
205
205
|
}
|
|
206
|
-
.awsui_arrow-
|
|
206
|
+
.awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after, .awsui_arrow-inner_1hpp3_1nl1n_197:not(#\9)::after {
|
|
207
207
|
content: "";
|
|
208
208
|
box-sizing: border-box;
|
|
209
209
|
display: inline-block;
|
|
@@ -219,67 +219,67 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
219
219
|
transform: rotate(45deg);
|
|
220
220
|
transform-origin: 0 100%;
|
|
221
221
|
}
|
|
222
|
-
.awsui_arrow-
|
|
222
|
+
.awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9):dir(rtl)::after, .awsui_arrow-inner_1hpp3_1nl1n_197:not(#\9):dir(rtl)::after {
|
|
223
223
|
transform: rotate(-45deg);
|
|
224
224
|
transform-origin: 100% 100%;
|
|
225
225
|
}
|
|
226
|
-
.awsui_arrow-
|
|
226
|
+
.awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after {
|
|
227
227
|
background-color: var(--color-border-status-info-z6pwqy, #006ce0);
|
|
228
228
|
}
|
|
229
|
-
.awsui_arrow-
|
|
229
|
+
.awsui_arrow-inner_1hpp3_1nl1n_197:not(#\9) {
|
|
230
230
|
inset-block-start: 2px;
|
|
231
231
|
}
|
|
232
|
-
.awsui_arrow-
|
|
232
|
+
.awsui_arrow-inner_1hpp3_1nl1n_197:not(#\9)::after {
|
|
233
233
|
border-start-start-radius: 1px;
|
|
234
234
|
border-start-end-radius: 0;
|
|
235
235
|
border-end-start-radius: 0;
|
|
236
236
|
border-end-end-radius: 0;
|
|
237
237
|
background-color: var(--color-background-status-info-gflgo4, #f0fbff);
|
|
238
238
|
}
|
|
239
|
-
.awsui_arrow-position-right-
|
|
239
|
+
.awsui_arrow-position-right-top_1hpp3_1nl1n_239 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_1nl1n_239 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after {
|
|
240
240
|
box-shadow: -0.71px 0.71px 4px -2px var(--color-shadow-default-u7prpu, rgba(15, 20, 26, 0.12));
|
|
241
241
|
}
|
|
242
|
-
.awsui_arrow-position-left-
|
|
242
|
+
.awsui_arrow-position-left-top_1hpp3_1nl1n_242 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_1nl1n_242 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after {
|
|
243
243
|
box-shadow: 0.71px -0.71px 4px -2px var(--color-shadow-default-u7prpu, rgba(15, 20, 26, 0.12));
|
|
244
244
|
}
|
|
245
|
-
.awsui_arrow-position-top-
|
|
245
|
+
.awsui_arrow-position-top-center_1hpp3_1nl1n_245 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_1nl1n_245 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after {
|
|
246
246
|
box-shadow: -0.71px -0.71px 4px -2px var(--color-shadow-default-u7prpu, rgba(15, 20, 26, 0.12));
|
|
247
247
|
}
|
|
248
|
-
.awsui_arrow-position-bottom-
|
|
248
|
+
.awsui_arrow-position-bottom-center_1hpp3_1nl1n_248 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_1nl1n_248 > .awsui_arrow-outer_1hpp3_1nl1n_197:not(#\9)::after {
|
|
249
249
|
box-shadow: 0.71px 0.71px 4px -2px var(--color-shadow-default-u7prpu, rgba(15, 20, 26, 0.12));
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.
|
|
253
|
-
.awsui_next-
|
|
254
|
-
.awsui_previous-
|
|
255
|
-
.awsui_finish-
|
|
256
|
-
.
|
|
257
|
-
.awsui_step-counter-
|
|
258
|
-
.
|
|
252
|
+
.awsui_annotation_1hpp3_1nl1n_252:not(#\9),
|
|
253
|
+
.awsui_next-button_1hpp3_1nl1n_253:not(#\9),
|
|
254
|
+
.awsui_previous-button_1hpp3_1nl1n_254:not(#\9),
|
|
255
|
+
.awsui_finish-button_1hpp3_1nl1n_255:not(#\9),
|
|
256
|
+
.awsui_header_1hpp3_1nl1n_256:not(#\9),
|
|
257
|
+
.awsui_step-counter-content_1hpp3_1nl1n_257:not(#\9),
|
|
258
|
+
.awsui_content_1hpp3_1nl1n_258:not(#\9) {
|
|
259
259
|
/* used in test-utils */
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
.
|
|
262
|
+
.awsui_description_1hpp3_1nl1n_262:not(#\9) {
|
|
263
263
|
overflow: hidden;
|
|
264
264
|
margin-block-start: var(--space-xxs-p8yyaw, 4px);
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
.
|
|
267
|
+
.awsui_actionBar_1hpp3_1nl1n_267:not(#\9) {
|
|
268
268
|
display: flex;
|
|
269
269
|
justify-content: space-between;
|
|
270
270
|
align-items: center;
|
|
271
271
|
position: relative;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
.
|
|
274
|
+
.awsui_stepCounter_1hpp3_1nl1n_274:not(#\9) {
|
|
275
275
|
margin-inline-end: 20px;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
.
|
|
278
|
+
.awsui_divider_1hpp3_1nl1n_278:not(#\9) {
|
|
279
279
|
border-block-end: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
.
|
|
282
|
+
.awsui_hotspot_1hpp3_1nl1n_282:not(#\9) {
|
|
283
283
|
border-collapse: separate;
|
|
284
284
|
border-spacing: 0;
|
|
285
285
|
box-sizing: border-box;
|
|
@@ -317,20 +317,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
317
317
|
padding-inline: 0;
|
|
318
318
|
cursor: pointer;
|
|
319
319
|
scroll-margin: var(--awsui-content-scroll-margin-g964ok, 40px 0 0 0);
|
|
320
|
+
position: relative;
|
|
320
321
|
inline-size: 16px;
|
|
321
322
|
block-size: 16px;
|
|
322
323
|
}
|
|
323
|
-
.
|
|
324
|
+
.awsui_hotspot_1hpp3_1nl1n_282:not(#\9):before {
|
|
325
|
+
content: "";
|
|
326
|
+
position: absolute;
|
|
327
|
+
inset: calc(-1 * var(--space-xxs-p8yyaw, 4px));
|
|
328
|
+
}
|
|
329
|
+
.awsui_hotspot_1hpp3_1nl1n_282:not(#\9):focus {
|
|
324
330
|
outline: none;
|
|
325
331
|
}
|
|
326
|
-
body[data-awsui-focus-visible=true] .
|
|
332
|
+
body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1nl1n_282:not(#\9):focus {
|
|
327
333
|
position: relative;
|
|
328
334
|
}
|
|
329
|
-
body[data-awsui-focus-visible=true] .
|
|
335
|
+
body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1nl1n_282:not(#\9):focus {
|
|
330
336
|
outline: 2px dotted transparent;
|
|
331
337
|
outline-offset: calc(2px - 1px);
|
|
332
338
|
}
|
|
333
|
-
body[data-awsui-focus-visible=true] .
|
|
339
|
+
body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1nl1n_282:not(#\9):focus::before {
|
|
334
340
|
content: " ";
|
|
335
341
|
display: block;
|
|
336
342
|
position: absolute;
|
|
@@ -344,13 +350,13 @@ body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):focu
|
|
|
344
350
|
border-end-end-radius: var(--border-radius-control-circular-focus-ring-w07mub, 4px);
|
|
345
351
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
346
352
|
}
|
|
347
|
-
.
|
|
353
|
+
.awsui_hotspot_1hpp3_1nl1n_282 > .awsui_icon_1hpp3_1nl1n_352:not(#\9) {
|
|
348
354
|
position: relative;
|
|
349
355
|
stroke: var(--color-text-link-default-enwvrt, #006ce0);
|
|
350
356
|
}
|
|
351
|
-
.
|
|
357
|
+
.awsui_hotspot_1hpp3_1nl1n_282:not(#\9):hover > .awsui_icon_1hpp3_1nl1n_352 {
|
|
352
358
|
stroke: var(--color-text-link-hover-49uoe9, #002b66);
|
|
353
359
|
}
|
|
354
|
-
.
|
|
360
|
+
.awsui_hotspot_1hpp3_1nl1n_282:not(#\9):active > .awsui_icon_1hpp3_1nl1n_352 {
|
|
355
361
|
stroke: var(--color-text-link-default-enwvrt, #006ce0);
|
|
356
362
|
}
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"arrow": "
|
|
6
|
-
"arrow-outer": "awsui_arrow-
|
|
7
|
-
"arrow-inner": "awsui_arrow-
|
|
8
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
10
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
12
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
14
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
15
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
16
|
-
"annotation": "
|
|
17
|
-
"next-button": "awsui_next-
|
|
18
|
-
"previous-button": "awsui_previous-
|
|
19
|
-
"finish-button": "awsui_finish-
|
|
20
|
-
"header": "
|
|
21
|
-
"step-counter-content": "awsui_step-counter-
|
|
22
|
-
"content": "
|
|
23
|
-
"description": "
|
|
24
|
-
"actionBar": "
|
|
25
|
-
"stepCounter": "
|
|
26
|
-
"divider": "
|
|
27
|
-
"hotspot": "
|
|
28
|
-
"icon": "
|
|
5
|
+
"arrow": "awsui_arrow_1hpp3_1nl1n_193",
|
|
6
|
+
"arrow-outer": "awsui_arrow-outer_1hpp3_1nl1n_197",
|
|
7
|
+
"arrow-inner": "awsui_arrow-inner_1hpp3_1nl1n_197",
|
|
8
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_1nl1n_239",
|
|
9
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_1nl1n_239",
|
|
10
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_1nl1n_242",
|
|
11
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_1nl1n_242",
|
|
12
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_1nl1n_245",
|
|
13
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_1nl1n_245",
|
|
14
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_1nl1n_248",
|
|
15
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_1nl1n_248",
|
|
16
|
+
"annotation": "awsui_annotation_1hpp3_1nl1n_252",
|
|
17
|
+
"next-button": "awsui_next-button_1hpp3_1nl1n_253",
|
|
18
|
+
"previous-button": "awsui_previous-button_1hpp3_1nl1n_254",
|
|
19
|
+
"finish-button": "awsui_finish-button_1hpp3_1nl1n_255",
|
|
20
|
+
"header": "awsui_header_1hpp3_1nl1n_256",
|
|
21
|
+
"step-counter-content": "awsui_step-counter-content_1hpp3_1nl1n_257",
|
|
22
|
+
"content": "awsui_content_1hpp3_1nl1n_258",
|
|
23
|
+
"description": "awsui_description_1hpp3_1nl1n_262",
|
|
24
|
+
"actionBar": "awsui_actionBar_1hpp3_1nl1n_267",
|
|
25
|
+
"stepCounter": "awsui_stepCounter_1hpp3_1nl1n_274",
|
|
26
|
+
"divider": "awsui_divider_1hpp3_1nl1n_278",
|
|
27
|
+
"hotspot": "awsui_hotspot_1hpp3_1nl1n_282",
|
|
28
|
+
"icon": "awsui_icon_1hpp3_1nl1n_352"
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AppLayoutProps } from '../interfaces';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
navigationOpen: boolean;
|
|
6
|
-
navigationWidth: number;
|
|
7
|
-
toolsWidth: number;
|
|
8
|
-
minContentWidth: number;
|
|
9
|
-
onNavigationChange: import("../../internal/events").NonCancelableEventHandler<AppLayoutProps.ChangeDetail>;
|
|
10
|
-
} & {
|
|
11
|
-
placement: {
|
|
12
|
-
insetBlockStart: number;
|
|
13
|
-
insetBlockEnd: number;
|
|
14
|
-
insetInlineStart: number;
|
|
15
|
-
insetInlineEnd: number;
|
|
16
|
-
inlineSize: number;
|
|
17
|
-
};
|
|
18
|
-
} & React.RefAttributes<AppLayoutProps.Ref>>;
|
|
3
|
+
import { AppLayoutInternalProps } from './interfaces';
|
|
4
|
+
declare const AppLayoutVisualRefreshToolbar: React.ForwardRefExoticComponent<AppLayoutInternalProps & React.RefAttributes<AppLayoutProps.Ref>>;
|
|
19
5
|
export default AppLayoutVisualRefreshToolbar;
|
|
20
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAejG,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAejG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAa/C,OAAO,EAAE,sBAAsB,EAAsB,MAAM,cAAc,CAAC;AAa1E,QAAA,MAAM,6BAA6B,mGA0flC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -24,7 +24,7 @@ import { useMultiAppLayout } from './multi-layout';
|
|
|
24
24
|
import { SkeletonLayout } from './skeleton';
|
|
25
25
|
const AppLayoutVisualRefreshToolbar = React.forwardRef((_a, forwardRef) => {
|
|
26
26
|
var _b, _c;
|
|
27
|
-
var { ariaLabels, contentHeader, content, navigationOpen, navigationWidth, navigation, navigationHide, onNavigationChange, tools, toolsOpen: controlledToolsOpen, onToolsChange, toolsHide, toolsWidth, contentType, headerVariant, breadcrumbs, notifications, stickyNotifications, splitPanelPreferences: controlledSplitPanelPreferences, splitPanelOpen: controlledSplitPanelOpen, splitPanel, splitPanelSize: controlledSplitPanelSize, onSplitPanelToggle, onSplitPanelResize, onSplitPanelPreferencesChange, disableContentPaddings, minContentWidth, maxContentWidth, placement } = _a, rest = __rest(_a, ["ariaLabels", "contentHeader", "content", "navigationOpen", "navigationWidth", "navigation", "navigationHide", "onNavigationChange", "tools", "toolsOpen", "onToolsChange", "toolsHide", "toolsWidth", "contentType", "headerVariant", "breadcrumbs", "notifications", "stickyNotifications", "splitPanelPreferences", "splitPanelOpen", "splitPanel", "splitPanelSize", "onSplitPanelToggle", "onSplitPanelResize", "onSplitPanelPreferencesChange", "disableContentPaddings", "minContentWidth", "maxContentWidth", "placement"]);
|
|
27
|
+
var { ariaLabels, contentHeader, content, navigationOpen, navigationWidth, navigation, navigationHide, onNavigationChange, tools, toolsOpen: controlledToolsOpen, onToolsChange, toolsHide, toolsWidth, contentType, headerVariant, breadcrumbs, notifications, stickyNotifications, splitPanelPreferences: controlledSplitPanelPreferences, splitPanelOpen: controlledSplitPanelOpen, splitPanel, splitPanelSize: controlledSplitPanelSize, onSplitPanelToggle, onSplitPanelResize, onSplitPanelPreferencesChange, disableContentPaddings, minContentWidth, maxContentWidth, placement, navigationTriggerHide } = _a, rest = __rest(_a, ["ariaLabels", "contentHeader", "content", "navigationOpen", "navigationWidth", "navigation", "navigationHide", "onNavigationChange", "tools", "toolsOpen", "onToolsChange", "toolsHide", "toolsWidth", "contentType", "headerVariant", "breadcrumbs", "notifications", "stickyNotifications", "splitPanelPreferences", "splitPanelOpen", "splitPanel", "splitPanelSize", "onSplitPanelToggle", "onSplitPanelResize", "onSplitPanelPreferencesChange", "disableContentPaddings", "minContentWidth", "maxContentWidth", "placement", "navigationTriggerHide"]);
|
|
28
28
|
const isMobile = useMobile();
|
|
29
29
|
const { __embeddedViewMode: embeddedViewMode, __forceDeduplicationType: forceDeduplicationType } = rest;
|
|
30
30
|
const splitPanelControlId = useUniqueId('split-panel');
|
|
@@ -120,7 +120,7 @@ const AppLayoutVisualRefreshToolbar = React.forwardRef((_a, forwardRef) => {
|
|
|
120
120
|
});
|
|
121
121
|
const globalDrawersFocusControl = useMultipleFocusControl(true, activeGlobalDrawersIds);
|
|
122
122
|
const drawersFocusControl = useFocusControl(!!(activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.id), true, activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.id);
|
|
123
|
-
const navigationFocusControl = useFocusControl(navigationOpen);
|
|
123
|
+
const navigationFocusControl = useFocusControl(navigationOpen, navigationTriggerHide);
|
|
124
124
|
const splitPanelFocusControl = useSplitPanelFocusControl([splitPanelPreferences, splitPanelOpen]);
|
|
125
125
|
const onNavigationToggle = useStableCallback((open) => {
|
|
126
126
|
setNavigationAnimationDisabled(false);
|
|
@@ -155,7 +155,7 @@ const AppLayoutVisualRefreshToolbar = React.forwardRef((_a, forwardRef) => {
|
|
|
155
155
|
const { registered, toolbarProps } = useMultiAppLayout({
|
|
156
156
|
forceDeduplicationType,
|
|
157
157
|
ariaLabels: ariaLabelsWithDrawers,
|
|
158
|
-
navigation: resolvedNavigation,
|
|
158
|
+
navigation: resolvedNavigation && !navigationTriggerHide,
|
|
159
159
|
navigationOpen: resolvedNavigationOpen,
|
|
160
160
|
onNavigationToggle,
|
|
161
161
|
navigationFocusRef: navigationFocusControl.refs.toggle,
|
|
@@ -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,SAAS,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,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,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,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,eAAe,EAAkB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAA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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,CACkC,CACvC,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, { useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\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 { useIntersectionObserver } from '../../internal/hooks/use-intersection-observer';\nimport { useMergeRefs } from '../../internal/hooks/use-merge-refs';\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 { MIN_DRAWER_SIZE, OnChangeParams, useDrawers } from '../utils/use-drawers';\nimport { useFocusControl, useMultipleFocusControl } from '../utils/use-focus-control';\nimport { useSplitPanelFocusControl } from '../utils/use-split-panel-focus-control';\nimport { ActiveDrawersContext } from '../utils/visibility-context';\nimport {\n computeHorizontalLayout,\n computeSplitPanelOffsets,\n computeVerticalLayout,\n CONTENT_PADDING,\n} from './compute-layout';\nimport { AppLayoutVisibilityContext } from './contexts';\nimport { AppLayoutInternals } from './interfaces';\nimport {\n AppLayoutDrawer,\n AppLayoutGlobalDrawers,\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 const [navigationAnimationDisabled, setNavigationAnimationDisabled] = useState(true);\n const [splitPanelAnimationDisabled, setSplitPanelAnimationDisabled] = useState(true);\n const [isNested, setIsNested] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\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 onGlobalDrawerFocus = (drawerId: string, open: boolean) => {\n globalDrawersFocusControl.setFocus({ force: true, drawerId, open });\n };\n\n const onAddNewActiveDrawer = (drawerId: string) => {\n // If a local drawer is already open, and we attempt to open a new one,\n // it will replace the existing one instead of opening an additional drawer,\n // since only one local drawer is supported. Therefore, layout calculations are not necessary.\n if (activeDrawer && drawers?.find(drawer => drawer.id === drawerId)) {\n return;\n }\n // get the size of drawerId. it could be either local or global drawer\n const combinedDrawers = [...(drawers || []), ...globalDrawers];\n const newDrawer = combinedDrawers.find(drawer => drawer.id === drawerId);\n if (!newDrawer) {\n return;\n }\n const newDrawerSize = Math.min(\n newDrawer.defaultSize ?? drawerSizes[drawerId] ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n );\n // check if the active drawers could be resized to fit the new drawers\n // to do this, we need to take all active drawers, sum up their min sizes, truncate it from resizableSpaceAvailable\n // and compare a given number with the new drawer id min size\n\n // the total size of all global drawers resized to their min size\n const availableSpaceForNewDrawer = resizableSpaceAvailable - totalActiveDrawersMinSize;\n if (availableSpaceForNewDrawer >= newDrawerSize) {\n return;\n }\n\n // now we made sure we cannot accommodate the new drawer with existing ones\n closeFirstDrawer();\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n minGlobalDrawersSizes,\n activeDrawerSize,\n ariaLabelsWithDrawers,\n globalDrawers,\n activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n drawerSizes,\n drawersOpenQueue,\n onActiveDrawerChange,\n onActiveDrawerResize,\n onActiveGlobalDrawersChange,\n } = useDrawers({ ...rest, onGlobalDrawerFocus, onAddNewActiveDrawer }, ariaLabels, {\n ariaLabels,\n toolsHide,\n toolsOpen,\n tools,\n toolsWidth,\n onToolsToggle,\n });\n\n const onActiveDrawerChangeHandler = (\n drawerId: string | null,\n params: OnChangeParams = { initiatedByUserAction: true }\n ) => {\n onActiveDrawerChange(drawerId, params);\n drawersFocusControl.setFocus();\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 setSplitPanelAnimationDisabled(false);\n setSplitPanelOpen(!splitPanelOpen);\n splitPanelFocusControl.setLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\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 const [splitPanelHeaderBlockSize, setSplitPanelHeaderBlockSize] = 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 globalDrawersFocusControl = useMultipleFocusControl(true, activeGlobalDrawersIds);\n const drawersFocusControl = useFocusControl(!!activeDrawer?.id, true, activeDrawer?.id);\n const navigationFocusControl = useFocusControl(navigationOpen);\n const splitPanelFocusControl = useSplitPanelFocusControl([splitPanelPreferences, splitPanelOpen]);\n\n const onNavigationToggle = useStableCallback((open: boolean) => {\n setNavigationAnimationDisabled(false);\n navigationFocusControl.setFocus();\n fireNonCancelableEvent(onNavigationChange, { open });\n });\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 resolvedStickyNotifications = !!stickyNotifications && !isMobile;\n //navigation must be null if hidden so toolbar knows to hide the toggle button\n const resolvedNavigation = navigationHide ? null : navigation || <></>;\n //navigation must not be open if navigationHide is true\n const resolvedNavigationOpen = !!resolvedNavigation && navigationOpen;\n const {\n maxDrawerSize,\n maxSplitPanelSize,\n splitPanelForcedPosition,\n splitPanelPosition,\n maxGlobalDrawersSizes,\n resizableSpaceAvailable,\n } = computeHorizontalLayout({\n activeDrawerSize: activeDrawer ? activeDrawerSize : 0,\n splitPanelSize,\n minContentWidth,\n navigationOpen: resolvedNavigationOpen,\n navigationWidth,\n placement,\n splitPanelOpen,\n splitPanelPosition: splitPanelPreferences?.position,\n isMobile,\n activeGlobalDrawersSizes,\n });\n\n const { ref: intersectionObserverRef, isIntersecting } = useIntersectionObserver({ initialState: true });\n const { registered, toolbarProps } = useMultiAppLayout(\n {\n forceDeduplicationType,\n ariaLabels: ariaLabelsWithDrawers,\n navigation: resolvedNavigation,\n navigationOpen: resolvedNavigationOpen,\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 globalDrawersFocusControl,\n globalDrawers: globalDrawers?.length ? globalDrawers : undefined,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n onActiveDrawerChange: onActiveDrawerChangeHandler,\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 isIntersecting\n );\n\n const hasToolbar = !embeddedViewMode && !!toolbarProps;\n const discoveredBreadcrumbs = useGetGlobalBreadcrumbs(hasToolbar && !breadcrumbs);\n\n const verticalOffsets = computeVerticalLayout({\n topOffset: placement.insetBlockStart,\n hasVisibleToolbar: hasToolbar && toolbarState !== 'hide',\n notificationsHeight: notificationsHeight ?? 0,\n toolbarHeight: toolbarHeight ?? 0,\n stickyNotifications: resolvedStickyNotifications,\n });\n\n const appLayoutInternals: AppLayoutInternals = {\n ariaLabels: ariaLabelsWithDrawers,\n headerVariant,\n isMobile,\n breadcrumbs,\n discoveredBreadcrumbs,\n stickyNotifications: resolvedStickyNotifications,\n navigationOpen: resolvedNavigationOpen,\n navigation: resolvedNavigation,\n navigationFocusControl,\n activeDrawer,\n activeDrawerSize,\n minDrawerSize,\n maxDrawerSize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n drawers: drawers!,\n globalDrawers,\n activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n onActiveGlobalDrawersChange,\n drawersFocusControl,\n globalDrawersFocusControl,\n splitPanelPosition,\n splitPanelToggleConfig,\n splitPanelOpen,\n splitPanelControlId,\n splitPanelFocusControl,\n placement,\n toolbarState,\n setToolbarState,\n verticalOffsets,\n drawersOpenQueue,\n setToolbarHeight,\n setNotificationsHeight,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n onNavigationToggle,\n onActiveDrawerChange: onActiveDrawerChangeHandler,\n onActiveDrawerResize,\n splitPanelAnimationDisabled,\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: size => setSplitPanelHeaderBlockSize(size),\n headerHeight: splitPanelHeaderBlockSize,\n rightOffset: 0,\n size: splitPanelSize,\n topOffset: 0,\n setSplitPanelToggle: setSplitPanelToggleConfig,\n refs: splitPanelFocusControl.refs,\n };\n\n const closeFirstDrawer = useStableCallback(() => {\n const drawerToClose = drawersOpenQueue[drawersOpenQueue.length - 1];\n if (activeDrawer && activeDrawer?.id === drawerToClose) {\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n } else if (activeGlobalDrawersIds.includes(drawerToClose)) {\n onActiveGlobalDrawersChange(drawerToClose, { initiatedByUserAction: true });\n }\n });\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMobile]);\n\n const getTotalActiveDrawersMinSize = () => {\n const combinedDrawers = [...(drawers || []), ...globalDrawers];\n let result = activeGlobalDrawersIds\n .map(activeDrawerId =>\n Math.min(\n combinedDrawers.find(drawer => drawer.id === activeDrawerId)?.defaultSize ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n )\n )\n .reduce((acc, curr) => acc + curr, 0);\n if (activeDrawer) {\n result += Math.min(activeDrawer?.defaultSize ?? MIN_DRAWER_SIZE, MIN_DRAWER_SIZE);\n }\n\n return result;\n };\n\n const totalActiveDrawersMinSize = getTotalActiveDrawersMinSize();\n\n useEffect(() => {\n if (isMobile) {\n return;\n }\n\n const activeNavigationWidth = !navigationHide && navigationOpen ? navigationWidth : 0;\n const scrollWidth = activeNavigationWidth + CONTENT_PADDING + totalActiveDrawersMinSize;\n const hasHorizontalScroll = scrollWidth > placement.inlineSize;\n if (hasHorizontalScroll) {\n if (!navigationHide && navigationOpen) {\n onNavigationToggle(false);\n return;\n }\n\n closeFirstDrawer();\n }\n }, [\n totalActiveDrawersMinSize,\n closeFirstDrawer,\n isMobile,\n navigationHide,\n navigationOpen,\n navigationWidth,\n onNavigationToggle,\n placement.inlineSize,\n ]);\n\n /**\n * Returns true if the AppLayout is nested\n * Does not apply to iframe\n */\n const getIsNestedInAppLayout = (element: HTMLElement | null): boolean => {\n let currentElement: Element | null = element?.parentElement ?? null;\n\n // this traverse is needed only for JSDOM\n // in real browsers the globalVar will be propagated to all descendants and this loops exits after initial iteration\n while (currentElement) {\n if (getComputedStyle(currentElement).getPropertyValue(globalVars.stickyVerticalTopOffset)) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n\n return false;\n };\n\n useLayoutEffect(() => {\n if (!hasToolbar) {\n setIsNested(getIsNestedInAppLayout(rootRef.current));\n }\n }, [hasToolbar]);\n\n const splitPanelOffsets = computeSplitPanelOffsets({\n placement,\n hasSplitPanel: !!splitPanel,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelFullHeight: splitPanelReportedSize,\n splitPanelHeaderHeight: splitPanelHeaderBlockSize,\n });\n\n return (\n <AppLayoutVisibilityContext.Provider value={isIntersecting}>\n {/* Rendering a hidden copy of breadcrumbs to trigger their deduplication */}\n {!hasToolbar && breadcrumbs ? <ScreenreaderOnly>{breadcrumbs}</ScreenreaderOnly> : null}\n <SkeletonLayout\n ref={useMergeRefs(intersectionObserverRef, rootRef)}\n isNested={isNested}\n style={{\n paddingBlockEnd: splitPanelOffsets.mainContentPaddingBlockEnd,\n ...(hasToolbar || !isNested\n ? {\n [globalVars.stickyVerticalTopOffset]: `${verticalOffsets.header}px`,\n [globalVars.stickyVerticalBottomOffset]: `${splitPanelOffsets.stickyVerticalBottomOffset}px`,\n }\n : {}),\n ...(!isMobile ? { minWidth: `${minContentWidth}px` } : {}),\n }}\n toolbar={\n hasToolbar && <AppLayoutToolbar appLayoutInternals={appLayoutInternals} toolbarProps={toolbarProps} />\n }\n notifications={\n notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutInternals}>{notifications}</AppLayoutNotifications>\n )\n }\n headerVariant={headerVariant}\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={resolvedNavigationOpen}\n navigationWidth={navigationWidth}\n navigationAnimationDisabled={navigationAnimationDisabled}\n tools={drawers && drawers.length > 0 && <AppLayoutDrawer appLayoutInternals={appLayoutInternals} />}\n globalTools={\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n }\n globalToolsOpen={!!activeGlobalDrawersIds.length}\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 </AppLayoutVisibilityContext.Provider>\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,SAAS,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,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,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,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,eAAe,EAAkB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,4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B,EAAE,kBAAkB,GAAI,CACpC,EAElC,eAAe,EAAE,CAAC,CAAC,sBAAsB,CAAC,MAAM,EAChD,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,CACkC,CACvC,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, { useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\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 { useIntersectionObserver } from '../../internal/hooks/use-intersection-observer';\nimport { useMergeRefs } from '../../internal/hooks/use-merge-refs';\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 } from '../interfaces';\nimport { SplitPanelProviderProps } from '../split-panel';\nimport { MIN_DRAWER_SIZE, OnChangeParams, useDrawers } from '../utils/use-drawers';\nimport { useFocusControl, useMultipleFocusControl } from '../utils/use-focus-control';\nimport { useSplitPanelFocusControl } from '../utils/use-split-panel-focus-control';\nimport { ActiveDrawersContext } from '../utils/visibility-context';\nimport {\n computeHorizontalLayout,\n computeSplitPanelOffsets,\n computeVerticalLayout,\n CONTENT_PADDING,\n} from './compute-layout';\nimport { AppLayoutVisibilityContext } from './contexts';\nimport { AppLayoutInternalProps, AppLayoutInternals } from './interfaces';\nimport {\n AppLayoutDrawer,\n AppLayoutGlobalDrawers,\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, AppLayoutInternalProps>(\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 navigationTriggerHide,\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 const [navigationAnimationDisabled, setNavigationAnimationDisabled] = useState(true);\n const [splitPanelAnimationDisabled, setSplitPanelAnimationDisabled] = useState(true);\n const [isNested, setIsNested] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\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 onGlobalDrawerFocus = (drawerId: string, open: boolean) => {\n globalDrawersFocusControl.setFocus({ force: true, drawerId, open });\n };\n\n const onAddNewActiveDrawer = (drawerId: string) => {\n // If a local drawer is already open, and we attempt to open a new one,\n // it will replace the existing one instead of opening an additional drawer,\n // since only one local drawer is supported. Therefore, layout calculations are not necessary.\n if (activeDrawer && drawers?.find(drawer => drawer.id === drawerId)) {\n return;\n }\n // get the size of drawerId. it could be either local or global drawer\n const combinedDrawers = [...(drawers || []), ...globalDrawers];\n const newDrawer = combinedDrawers.find(drawer => drawer.id === drawerId);\n if (!newDrawer) {\n return;\n }\n const newDrawerSize = Math.min(\n newDrawer.defaultSize ?? drawerSizes[drawerId] ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n );\n // check if the active drawers could be resized to fit the new drawers\n // to do this, we need to take all active drawers, sum up their min sizes, truncate it from resizableSpaceAvailable\n // and compare a given number with the new drawer id min size\n\n // the total size of all global drawers resized to their min size\n const availableSpaceForNewDrawer = resizableSpaceAvailable - totalActiveDrawersMinSize;\n if (availableSpaceForNewDrawer >= newDrawerSize) {\n return;\n }\n\n // now we made sure we cannot accommodate the new drawer with existing ones\n closeFirstDrawer();\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n minGlobalDrawersSizes,\n activeDrawerSize,\n ariaLabelsWithDrawers,\n globalDrawers,\n activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n drawerSizes,\n drawersOpenQueue,\n onActiveDrawerChange,\n onActiveDrawerResize,\n onActiveGlobalDrawersChange,\n } = useDrawers({ ...rest, onGlobalDrawerFocus, onAddNewActiveDrawer }, ariaLabels, {\n ariaLabels,\n toolsHide,\n toolsOpen,\n tools,\n toolsWidth,\n onToolsToggle,\n });\n\n const onActiveDrawerChangeHandler = (\n drawerId: string | null,\n params: OnChangeParams = { initiatedByUserAction: true }\n ) => {\n onActiveDrawerChange(drawerId, params);\n drawersFocusControl.setFocus();\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 setSplitPanelAnimationDisabled(false);\n setSplitPanelOpen(!splitPanelOpen);\n splitPanelFocusControl.setLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\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 const [splitPanelHeaderBlockSize, setSplitPanelHeaderBlockSize] = 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 globalDrawersFocusControl = useMultipleFocusControl(true, activeGlobalDrawersIds);\n const drawersFocusControl = useFocusControl(!!activeDrawer?.id, true, activeDrawer?.id);\n const navigationFocusControl = useFocusControl(navigationOpen, navigationTriggerHide);\n const splitPanelFocusControl = useSplitPanelFocusControl([splitPanelPreferences, splitPanelOpen]);\n\n const onNavigationToggle = useStableCallback((open: boolean) => {\n setNavigationAnimationDisabled(false);\n navigationFocusControl.setFocus();\n fireNonCancelableEvent(onNavigationChange, { open });\n });\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 resolvedStickyNotifications = !!stickyNotifications && !isMobile;\n //navigation must be null if hidden so toolbar knows to hide the toggle button\n const resolvedNavigation = navigationHide ? null : navigation || <></>;\n //navigation must not be open if navigationHide is true\n const resolvedNavigationOpen = !!resolvedNavigation && navigationOpen;\n const {\n maxDrawerSize,\n maxSplitPanelSize,\n splitPanelForcedPosition,\n splitPanelPosition,\n maxGlobalDrawersSizes,\n resizableSpaceAvailable,\n } = computeHorizontalLayout({\n activeDrawerSize: activeDrawer ? activeDrawerSize : 0,\n splitPanelSize,\n minContentWidth,\n navigationOpen: resolvedNavigationOpen,\n navigationWidth,\n placement,\n splitPanelOpen,\n splitPanelPosition: splitPanelPreferences?.position,\n isMobile,\n activeGlobalDrawersSizes,\n });\n\n const { ref: intersectionObserverRef, isIntersecting } = useIntersectionObserver({ initialState: true });\n const { registered, toolbarProps } = useMultiAppLayout(\n {\n forceDeduplicationType,\n ariaLabels: ariaLabelsWithDrawers,\n navigation: resolvedNavigation && !navigationTriggerHide,\n navigationOpen: resolvedNavigationOpen,\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 globalDrawersFocusControl,\n globalDrawers: globalDrawers?.length ? globalDrawers : undefined,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n onActiveDrawerChange: onActiveDrawerChangeHandler,\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 isIntersecting\n );\n\n const hasToolbar = !embeddedViewMode && !!toolbarProps;\n const discoveredBreadcrumbs = useGetGlobalBreadcrumbs(hasToolbar && !breadcrumbs);\n\n const verticalOffsets = computeVerticalLayout({\n topOffset: placement.insetBlockStart,\n hasVisibleToolbar: hasToolbar && toolbarState !== 'hide',\n notificationsHeight: notificationsHeight ?? 0,\n toolbarHeight: toolbarHeight ?? 0,\n stickyNotifications: resolvedStickyNotifications,\n });\n\n const appLayoutInternals: AppLayoutInternals = {\n ariaLabels: ariaLabelsWithDrawers,\n headerVariant,\n isMobile,\n breadcrumbs,\n discoveredBreadcrumbs,\n stickyNotifications: resolvedStickyNotifications,\n navigationOpen: resolvedNavigationOpen,\n navigation: resolvedNavigation,\n navigationFocusControl,\n activeDrawer,\n activeDrawerSize,\n minDrawerSize,\n maxDrawerSize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n drawers: drawers!,\n globalDrawers,\n activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n onActiveGlobalDrawersChange,\n drawersFocusControl,\n globalDrawersFocusControl,\n splitPanelPosition,\n splitPanelToggleConfig,\n splitPanelOpen,\n splitPanelControlId,\n splitPanelFocusControl,\n placement,\n toolbarState,\n setToolbarState,\n verticalOffsets,\n drawersOpenQueue,\n setToolbarHeight,\n setNotificationsHeight,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n onNavigationToggle,\n onActiveDrawerChange: onActiveDrawerChangeHandler,\n onActiveDrawerResize,\n splitPanelAnimationDisabled,\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: size => setSplitPanelHeaderBlockSize(size),\n headerHeight: splitPanelHeaderBlockSize,\n rightOffset: 0,\n size: splitPanelSize,\n topOffset: 0,\n setSplitPanelToggle: setSplitPanelToggleConfig,\n refs: splitPanelFocusControl.refs,\n };\n\n const closeFirstDrawer = useStableCallback(() => {\n const drawerToClose = drawersOpenQueue[drawersOpenQueue.length - 1];\n if (activeDrawer && activeDrawer?.id === drawerToClose) {\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n } else if (activeGlobalDrawersIds.includes(drawerToClose)) {\n onActiveGlobalDrawersChange(drawerToClose, { initiatedByUserAction: true });\n }\n });\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMobile]);\n\n const getTotalActiveDrawersMinSize = () => {\n const combinedDrawers = [...(drawers || []), ...globalDrawers];\n let result = activeGlobalDrawersIds\n .map(activeDrawerId =>\n Math.min(\n combinedDrawers.find(drawer => drawer.id === activeDrawerId)?.defaultSize ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n )\n )\n .reduce((acc, curr) => acc + curr, 0);\n if (activeDrawer) {\n result += Math.min(activeDrawer?.defaultSize ?? MIN_DRAWER_SIZE, MIN_DRAWER_SIZE);\n }\n\n return result;\n };\n\n const totalActiveDrawersMinSize = getTotalActiveDrawersMinSize();\n\n useEffect(() => {\n if (isMobile) {\n return;\n }\n\n const activeNavigationWidth = !navigationHide && navigationOpen ? navigationWidth : 0;\n const scrollWidth = activeNavigationWidth + CONTENT_PADDING + totalActiveDrawersMinSize;\n const hasHorizontalScroll = scrollWidth > placement.inlineSize;\n if (hasHorizontalScroll) {\n if (!navigationHide && navigationOpen) {\n onNavigationToggle(false);\n return;\n }\n\n closeFirstDrawer();\n }\n }, [\n totalActiveDrawersMinSize,\n closeFirstDrawer,\n isMobile,\n navigationHide,\n navigationOpen,\n navigationWidth,\n onNavigationToggle,\n placement.inlineSize,\n ]);\n\n /**\n * Returns true if the AppLayout is nested\n * Does not apply to iframe\n */\n const getIsNestedInAppLayout = (element: HTMLElement | null): boolean => {\n let currentElement: Element | null = element?.parentElement ?? null;\n\n // this traverse is needed only for JSDOM\n // in real browsers the globalVar will be propagated to all descendants and this loops exits after initial iteration\n while (currentElement) {\n if (getComputedStyle(currentElement).getPropertyValue(globalVars.stickyVerticalTopOffset)) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n\n return false;\n };\n\n useLayoutEffect(() => {\n if (!hasToolbar) {\n setIsNested(getIsNestedInAppLayout(rootRef.current));\n }\n }, [hasToolbar]);\n\n const splitPanelOffsets = computeSplitPanelOffsets({\n placement,\n hasSplitPanel: !!splitPanel,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelFullHeight: splitPanelReportedSize,\n splitPanelHeaderHeight: splitPanelHeaderBlockSize,\n });\n\n return (\n <AppLayoutVisibilityContext.Provider value={isIntersecting}>\n {/* Rendering a hidden copy of breadcrumbs to trigger their deduplication */}\n {!hasToolbar && breadcrumbs ? <ScreenreaderOnly>{breadcrumbs}</ScreenreaderOnly> : null}\n <SkeletonLayout\n ref={useMergeRefs(intersectionObserverRef, rootRef)}\n isNested={isNested}\n style={{\n paddingBlockEnd: splitPanelOffsets.mainContentPaddingBlockEnd,\n ...(hasToolbar || !isNested\n ? {\n [globalVars.stickyVerticalTopOffset]: `${verticalOffsets.header}px`,\n [globalVars.stickyVerticalBottomOffset]: `${splitPanelOffsets.stickyVerticalBottomOffset}px`,\n }\n : {}),\n ...(!isMobile ? { minWidth: `${minContentWidth}px` } : {}),\n }}\n toolbar={\n hasToolbar && <AppLayoutToolbar appLayoutInternals={appLayoutInternals} toolbarProps={toolbarProps} />\n }\n notifications={\n notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutInternals}>{notifications}</AppLayoutNotifications>\n )\n }\n headerVariant={headerVariant}\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={resolvedNavigationOpen}\n navigationWidth={navigationWidth}\n navigationAnimationDisabled={navigationAnimationDisabled}\n tools={drawers && drawers.length > 0 && <AppLayoutDrawer appLayoutInternals={appLayoutInternals} />}\n globalTools={\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n }\n globalToolsOpen={!!activeGlobalDrawersIds.length}\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 </AppLayoutVisibilityContext.Provider>\n );\n }\n);\n\nexport default AppLayoutVisualRefreshToolbar;\n"]}
|
|
@@ -6,6 +6,9 @@ import { OnChangeParams } from '../utils/use-drawers';
|
|
|
6
6
|
import { FocusControlMultipleStates, FocusControlState } from '../utils/use-focus-control';
|
|
7
7
|
import { SplitPanelFocusControlState } from '../utils/use-split-panel-focus-control';
|
|
8
8
|
import { VerticalLayoutOutput } from './compute-layout';
|
|
9
|
+
export interface AppLayoutInternalProps extends AppLayoutPropsWithDefaults {
|
|
10
|
+
navigationTriggerHide?: boolean;
|
|
11
|
+
}
|
|
9
12
|
export type InternalDrawer = AppLayoutProps.Drawer & {
|
|
10
13
|
defaultActive?: boolean;
|
|
11
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD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,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrE,2BAA2B,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACnF,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nimport { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { FocusControlMultipleStates, FocusControlState } from '../utils/use-focus-control';\nimport { SplitPanelFocusControlState } from '../utils/use-split-panel-focus-control';\nimport { VerticalLayoutOutput } from './compute-layout';\n\nexport type InternalDrawer = AppLayoutProps.Drawer & { defaultActive?: boolean };\n\n// Widgetization notice: structures in this file are shared multiple app layout instances, possibly different minor versions.\n// Treat thsese structures as an API and do not make incompatible changes.\nexport interface AppLayoutInternals {\n ariaLabels: AppLayoutPropsWithDefaults['ariaLabels'];\n headerVariant: AppLayoutPropsWithDefaults['headerVariant'];\n placement: AppLayoutPropsWithDefaults['placement'];\n navigationOpen: AppLayoutPropsWithDefaults['navigationOpen'];\n navigationFocusControl: FocusControlState;\n navigation: React.ReactNode;\n splitPanelPosition: AppLayoutProps.SplitPanelPreferences['position'];\n splitPanelOpen: boolean;\n splitPanelControlId: string;\n splitPanelFocusControl: SplitPanelFocusControlState;\n splitPanelToggleConfig: SplitPanelSideToggleProps;\n isMobile: boolean;\n activeDrawer: InternalDrawer | undefined;\n activeDrawerSize: number;\n minDrawerSize: number;\n maxDrawerSize: number;\n minGlobalDrawersSizes: Record<string, number>;\n maxGlobalDrawersSizes: Record<string, number>;\n drawers: ReadonlyArray<InternalDrawer>;\n drawersFocusControl: FocusControlState;\n globalDrawersFocusControl: FocusControlMultipleStates;\n activeGlobalDrawersIds: ReadonlyArray<string>;\n activeGlobalDrawers: ReadonlyArray<InternalDrawer>;\n globalDrawers: ReadonlyArray<InternalDrawer>;\n activeGlobalDrawersSizes: Record<string, number>;\n stickyNotifications: AppLayoutPropsWithDefaults['stickyNotifications'];\n breadcrumbs: React.ReactNode;\n discoveredBreadcrumbs: BreadcrumbGroupProps | null;\n toolbarState: 'show' | 'hide';\n setToolbarState: (state: 'show' | 'hide') => void;\n verticalOffsets: VerticalLayoutOutput;\n drawersOpenQueue: ReadonlyArray<string>;\n setNotificationsHeight: (height: number) => void;\n setToolbarHeight: (height: number) => void;\n onSplitPanelToggle: () => void;\n onNavigationToggle: (open: boolean) => void;\n onActiveDrawerChange: (newDrawerId: string | null, params: OnChangeParams) => void;\n onActiveDrawerResize: (detail: { id: string; size: number }) => void;\n onActiveGlobalDrawersChange: (newDrawerId: string, params: OnChangeParams) => void;\n splitPanelAnimationDisabled?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nimport { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { FocusControlMultipleStates, FocusControlState } from '../utils/use-focus-control';\nimport { SplitPanelFocusControlState } from '../utils/use-split-panel-focus-control';\nimport { VerticalLayoutOutput } from './compute-layout';\n\nexport interface AppLayoutInternalProps extends AppLayoutPropsWithDefaults {\n navigationTriggerHide?: boolean;\n}\n\nexport type InternalDrawer = AppLayoutProps.Drawer & { defaultActive?: boolean };\n\n// Widgetization notice: structures in this file are shared multiple app layout instances, possibly different minor versions.\n// Treat thsese structures as an API and do not make incompatible changes.\nexport interface AppLayoutInternals {\n ariaLabels: AppLayoutPropsWithDefaults['ariaLabels'];\n headerVariant: AppLayoutPropsWithDefaults['headerVariant'];\n placement: AppLayoutPropsWithDefaults['placement'];\n navigationOpen: AppLayoutPropsWithDefaults['navigationOpen'];\n navigationFocusControl: FocusControlState;\n navigation: React.ReactNode;\n splitPanelPosition: AppLayoutProps.SplitPanelPreferences['position'];\n splitPanelOpen: boolean;\n splitPanelControlId: string;\n splitPanelFocusControl: SplitPanelFocusControlState;\n splitPanelToggleConfig: SplitPanelSideToggleProps;\n isMobile: boolean;\n activeDrawer: InternalDrawer | undefined;\n activeDrawerSize: number;\n minDrawerSize: number;\n maxDrawerSize: number;\n minGlobalDrawersSizes: Record<string, number>;\n maxGlobalDrawersSizes: Record<string, number>;\n drawers: ReadonlyArray<InternalDrawer>;\n drawersFocusControl: FocusControlState;\n globalDrawersFocusControl: FocusControlMultipleStates;\n activeGlobalDrawersIds: ReadonlyArray<string>;\n activeGlobalDrawers: ReadonlyArray<InternalDrawer>;\n globalDrawers: ReadonlyArray<InternalDrawer>;\n activeGlobalDrawersSizes: Record<string, number>;\n stickyNotifications: AppLayoutPropsWithDefaults['stickyNotifications'];\n breadcrumbs: React.ReactNode;\n discoveredBreadcrumbs: BreadcrumbGroupProps | null;\n toolbarState: 'show' | 'hide';\n setToolbarState: (state: 'show' | 'hide') => void;\n verticalOffsets: VerticalLayoutOutput;\n drawersOpenQueue: ReadonlyArray<string>;\n setNotificationsHeight: (height: number) => void;\n setToolbarHeight: (height: number) => void;\n onSplitPanelToggle: () => void;\n onNavigationToggle: (open: boolean) => void;\n onActiveDrawerChange: (newDrawerId: string | null, params: OnChangeParams) => void;\n onActiveDrawerResize: (detail: { id: string; size: number }) => void;\n onActiveGlobalDrawersChange: (newDrawerId: string, params: OnChangeParams) => void;\n splitPanelAnimationDisabled?: boolean;\n}\n"]}
|
|
@@ -20,7 +20,7 @@ export interface SharedProps {
|
|
|
20
20
|
activeGlobalDrawersIds?: Array<string> | undefined;
|
|
21
21
|
onActiveGlobalDrawersChange?: ((newDrawerId: string, params: OnChangeParams) => void) | undefined;
|
|
22
22
|
splitPanel: React.ReactNode;
|
|
23
|
-
splitPanelToggleProps: SplitPanelToggleProps;
|
|
23
|
+
splitPanelToggleProps: SplitPanelToggleProps | undefined;
|
|
24
24
|
splitPanelFocusRef: React.Ref<Focusable> | undefined;
|
|
25
25
|
onSplitPanelToggle: () => void;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/multi-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAMzD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,sBAAsB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,KAAK,CAAC;IACvE,UAAU,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,kBAAkB,E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AQ,EAAE,WAAW,EACrB,eAAe,EAAE,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GACnD,YAAY,GAAG,IAAI,CA0CrB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO;;;EA2BvE"}
|
|
@@ -11,11 +11,13 @@ function checkAlreadyExists(value, propName) {
|
|
|
11
11
|
return false;
|
|
12
12
|
}
|
|
13
13
|
export function mergeProps(ownProps, additionalProps) {
|
|
14
|
-
var _a;
|
|
14
|
+
var _a, _b;
|
|
15
15
|
const toolbar = {};
|
|
16
16
|
for (const props of [ownProps, ...additionalProps]) {
|
|
17
17
|
toolbar.ariaLabels = Object.assign((_a = toolbar.ariaLabels) !== null && _a !== void 0 ? _a : {}, props.ariaLabels);
|
|
18
|
-
if (props.drawers &&
|
|
18
|
+
if (props.drawers &&
|
|
19
|
+
props.drawers.some(drawer => drawer.trigger) &&
|
|
20
|
+
!checkAlreadyExists(!!toolbar.drawers, 'tools or drawers')) {
|
|
19
21
|
toolbar.drawers = props.drawers;
|
|
20
22
|
toolbar.activeDrawerId = props.activeDrawerId;
|
|
21
23
|
toolbar.drawersFocusRef = props.drawersFocusRef;
|
|
@@ -28,14 +30,14 @@ export function mergeProps(ownProps, additionalProps) {
|
|
|
28
30
|
toolbar.onActiveGlobalDrawersChange = props.onActiveGlobalDrawersChange;
|
|
29
31
|
}
|
|
30
32
|
if (props.navigation && !checkAlreadyExists(!!toolbar.hasNavigation, 'navigation')) {
|
|
31
|
-
// there is never a case where navigation will exist and a toggle will not so toolbar
|
|
32
|
-
// can use the hasNavigation here to conditionally render the navigationToggle button
|
|
33
33
|
toolbar.hasNavigation = true;
|
|
34
34
|
toolbar.navigationOpen = props.navigationOpen;
|
|
35
35
|
toolbar.navigationFocusRef = props.navigationFocusRef;
|
|
36
36
|
toolbar.onNavigationToggle = props.onNavigationToggle;
|
|
37
37
|
}
|
|
38
|
-
if (props.splitPanel &&
|
|
38
|
+
if (props.splitPanel &&
|
|
39
|
+
((_b = props.splitPanelToggleProps) === null || _b === void 0 ? void 0 : _b.displayed) &&
|
|
40
|
+
!checkAlreadyExists(!!toolbar.hasSplitPanel, 'splitPanel')) {
|
|
39
41
|
toolbar.hasSplitPanel = true;
|
|
40
42
|
toolbar.splitPanelFocusRef = props.splitPanelFocusRef;
|
|
41
43
|
toolbar.splitPanelToggleProps = props.splitPanelToggleProps;
|