@cloudscape-design/components 3.0.895 → 3.0.897

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/annotation-context/annotation/styles.css.js +24 -24
  2. package/annotation-context/annotation/styles.scoped.css +36 -30
  3. package/annotation-context/annotation/styles.selectors.js +24 -24
  4. package/app-layout/visual-refresh-toolbar/index.d.ts +2 -16
  5. package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  6. package/app-layout/visual-refresh-toolbar/index.js +3 -3
  7. package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  8. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -0
  9. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  10. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  11. package/app-layout/visual-refresh-toolbar/multi-layout.d.ts +1 -1
  12. package/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +1 -1
  13. package/app-layout/visual-refresh-toolbar/multi-layout.js +7 -5
  14. package/app-layout/visual-refresh-toolbar/multi-layout.js.map +1 -1
  15. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  16. package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -24
  17. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  18. package/hotspot/styles.css.js +7 -7
  19. package/hotspot/styles.scoped.css +8 -8
  20. package/hotspot/styles.selectors.js +7 -7
  21. package/internal/components/option/highlight-match.js +1 -1
  22. package/internal/components/option/highlight-match.js.map +1 -1
  23. package/internal/environment.js +1 -1
  24. package/internal/environment.json +1 -1
  25. package/internal/manifest.json +1 -1
  26. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "arrow": "awsui_arrow_1hpp3_n3v7s_193",
5
- "arrow-outer": "awsui_arrow-outer_1hpp3_n3v7s_197",
6
- "arrow-inner": "awsui_arrow-inner_1hpp3_n3v7s_197",
7
- "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_n3v7s_239",
8
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_n3v7s_239",
9
- "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_n3v7s_242",
10
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_n3v7s_242",
11
- "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_n3v7s_245",
12
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_n3v7s_245",
13
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_n3v7s_248",
14
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_n3v7s_248",
15
- "annotation": "awsui_annotation_1hpp3_n3v7s_252",
16
- "next-button": "awsui_next-button_1hpp3_n3v7s_253",
17
- "previous-button": "awsui_previous-button_1hpp3_n3v7s_254",
18
- "finish-button": "awsui_finish-button_1hpp3_n3v7s_255",
19
- "header": "awsui_header_1hpp3_n3v7s_256",
20
- "step-counter-content": "awsui_step-counter-content_1hpp3_n3v7s_257",
21
- "content": "awsui_content_1hpp3_n3v7s_258",
22
- "description": "awsui_description_1hpp3_n3v7s_262",
23
- "actionBar": "awsui_actionBar_1hpp3_n3v7s_267",
24
- "stepCounter": "awsui_stepCounter_1hpp3_n3v7s_274",
25
- "divider": "awsui_divider_1hpp3_n3v7s_278",
26
- "hotspot": "awsui_hotspot_1hpp3_n3v7s_282",
27
- "icon": "awsui_icon_1hpp3_n3v7s_346"
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
- .awsui_arrow_1hpp3_n3v7s_193:not(#\9) {
193
+ .awsui_arrow_1hpp3_1nl1n_193:not(#\9) {
194
194
  inline-size: 20px;
195
195
  block-size: 10px;
196
196
  }
197
- .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9), .awsui_arrow-inner_1hpp3_n3v7s_197:not(#\9) {
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-outer_1hpp3_n3v7s_197:not(#\9)::after, .awsui_arrow-inner_1hpp3_n3v7s_197:not(#\9)::after {
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-outer_1hpp3_n3v7s_197:not(#\9):dir(rtl)::after, .awsui_arrow-inner_1hpp3_n3v7s_197:not(#\9):dir(rtl)::after {
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-outer_1hpp3_n3v7s_197:not(#\9)::after {
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-inner_1hpp3_n3v7s_197:not(#\9) {
229
+ .awsui_arrow-inner_1hpp3_1nl1n_197:not(#\9) {
230
230
  inset-block-start: 2px;
231
231
  }
232
- .awsui_arrow-inner_1hpp3_n3v7s_197:not(#\9)::after {
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-top_1hpp3_n3v7s_239 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_n3v7s_239 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after {
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-top_1hpp3_n3v7s_242 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_n3v7s_242 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after {
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-center_1hpp3_n3v7s_245 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_n3v7s_245 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after {
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-center_1hpp3_n3v7s_248 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_n3v7s_248 > .awsui_arrow-outer_1hpp3_n3v7s_197:not(#\9)::after {
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
- .awsui_annotation_1hpp3_n3v7s_252:not(#\9),
253
- .awsui_next-button_1hpp3_n3v7s_253:not(#\9),
254
- .awsui_previous-button_1hpp3_n3v7s_254:not(#\9),
255
- .awsui_finish-button_1hpp3_n3v7s_255:not(#\9),
256
- .awsui_header_1hpp3_n3v7s_256:not(#\9),
257
- .awsui_step-counter-content_1hpp3_n3v7s_257:not(#\9),
258
- .awsui_content_1hpp3_n3v7s_258:not(#\9) {
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
- .awsui_description_1hpp3_n3v7s_262:not(#\9) {
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
- .awsui_actionBar_1hpp3_n3v7s_267:not(#\9) {
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
- .awsui_stepCounter_1hpp3_n3v7s_274:not(#\9) {
274
+ .awsui_stepCounter_1hpp3_1nl1n_274:not(#\9) {
275
275
  margin-inline-end: 20px;
276
276
  }
277
277
 
278
- .awsui_divider_1hpp3_n3v7s_278:not(#\9) {
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
- .awsui_hotspot_1hpp3_n3v7s_282:not(#\9) {
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
- .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):focus {
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] .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):focus {
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] .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):focus {
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] .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):focus::before {
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
- .awsui_hotspot_1hpp3_n3v7s_282 > .awsui_icon_1hpp3_n3v7s_346:not(#\9) {
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
- .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):hover > .awsui_icon_1hpp3_n3v7s_346 {
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
- .awsui_hotspot_1hpp3_n3v7s_282:not(#\9):active > .awsui_icon_1hpp3_n3v7s_346 {
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": "awsui_arrow_1hpp3_n3v7s_193",
6
- "arrow-outer": "awsui_arrow-outer_1hpp3_n3v7s_197",
7
- "arrow-inner": "awsui_arrow-inner_1hpp3_n3v7s_197",
8
- "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_n3v7s_239",
9
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_n3v7s_239",
10
- "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_n3v7s_242",
11
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_n3v7s_242",
12
- "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_n3v7s_245",
13
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_n3v7s_245",
14
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_n3v7s_248",
15
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_n3v7s_248",
16
- "annotation": "awsui_annotation_1hpp3_n3v7s_252",
17
- "next-button": "awsui_next-button_1hpp3_n3v7s_253",
18
- "previous-button": "awsui_previous-button_1hpp3_n3v7s_254",
19
- "finish-button": "awsui_finish-button_1hpp3_n3v7s_255",
20
- "header": "awsui_header_1hpp3_n3v7s_256",
21
- "step-counter-content": "awsui_step-counter-content_1hpp3_n3v7s_257",
22
- "content": "awsui_content_1hpp3_n3v7s_258",
23
- "description": "awsui_description_1hpp3_n3v7s_262",
24
- "actionBar": "awsui_actionBar_1hpp3_n3v7s_267",
25
- "stepCounter": "awsui_stepCounter_1hpp3_n3v7s_274",
26
- "divider": "awsui_divider_1hpp3_n3v7s_278",
27
- "hotspot": "awsui_hotspot_1hpp3_n3v7s_282",
28
- "icon": "awsui_icon_1hpp3_n3v7s_346"
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
- declare const AppLayoutVisualRefreshToolbar: React.ForwardRefExoticComponent<Omit<AppLayoutProps, "headerSelector" | "footerSelector"> & {
4
- contentType: AppLayoutProps.ContentType;
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,EAA8B,MAAM,eAAe,CAAC;AA0B3E,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;4CAyflC,CAAC;AAEF,eAAe,6BAA6B,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,E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YAC9E,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EACpC,UAAU,EAAE,kBAAkB,IAAI,oBAAC,mBAAmB,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EACjG,cAAc,EAAE,sBAAsB,EACtC,eAAe,EAAE,eAAe,EAChC,2BAA2B,EAAE,2BAA2B,EACxD,KAAK,EAAE,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,eAAe,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EACnG,WAAW,EACT,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,sBAAsB;gBAC1D,oBAAC,sBAAsB,IAAC,kBAAkB,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, 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,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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,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM,GAAG;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAIjF,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC;IACrD,aAAa,EAAE,0BAA0B,CAAC,eAAe,CAAC,CAAC;IAC3D,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;IAC7D,sBAAsB,EAAE,iBAAiB,CAAC;IAC1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,kBAAkB,EAAE,cAAc,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACrE,cAAc,EAAE,OAAO,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,2BAA2B,CAAC;IACpD,sB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IAClD,eAAe,EAAE,oBAAoB,CAAC;IACtC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACnF,oBAAoB,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,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;AAC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M,GAAG,IAAI,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC9F,eAAe,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAClD,yBAAyB,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjE,sBAAsB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACnD,2BAA2B,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAClG,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACzD,kBAAkB,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IACrD,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC;AAaD,wBAAgB,UAAU,CACxB,QAAQ,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 && !checkAlreadyExists(!!toolbar.drawers, 'tools or 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 && !checkAlreadyExists(!!toolbar.hasSplitPanel, '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;
@@ -1 +1 @@
1
- {"version":3,"file":"multi-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/multi-layout.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AA6BlE,SAAS,kBAAkB,CAAC,KAAc,EAAE,QAAgB;IAC1D,IAAI,KAAK,EAAE;QACT,QAAQ,CACN,WAAW,EAC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,IAAI,sBAAsB,KAAK,KAAK,EAAE;YACpC,eAAe,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;YAC1D,OAAO;SACR;QACD,OAAO,oBAAoB,CAAC,eAAe,CAAC,QAAQ,CAAC,sBAAsB,EAAE,KAAK,CAAC,EAAE,CACnF,eAAe,CAAC,KAAuC,CAAC,CACzD,CAAC;IACJ,CAAC,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAC;IAExC,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,MAAK,WAAW,EAAE;YACtC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,UAAU,EAAE,CAAC,CAAC,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,CAAA;QAChC,YAAY,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,MAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI;KACxG,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useState } from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { RegistrationState } from '../../internal/plugins/controllers/app-layout-widget';\nimport { AppLayoutProps } from '../interfaces';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../utils/use-focus-control';\nimport { SplitPanelToggleProps, ToolbarProps } from './toolbar';\n\nexport interface SharedProps {\n forceDeduplicationType?: 'primary' | 'secondary' | 'suspended' | 'off';\n ariaLabels: AppLayoutProps.Labels | undefined;\n navigation: React.ReactNode;\n navigationOpen: boolean;\n onNavigationToggle: (open: boolean) => void;\n navigationFocusRef: React.Ref<Focusable> | undefined;\n breadcrumbs: React.ReactNode;\n activeDrawerId: string | null;\n drawers: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n onActiveDrawerChange: ((drawerId: string | null, params: OnChangeParams) => void) | undefined;\n drawersFocusRef: React.Ref<Focusable> | undefined;\n globalDrawersFocusControl?: FocusControlMultipleStates | undefined;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: Array<string> | undefined;\n onActiveGlobalDrawersChange?: ((newDrawerId: string, params: OnChangeParams) => void) | undefined;\n splitPanel: React.ReactNode;\n splitPanelToggleProps: SplitPanelToggleProps;\n splitPanelFocusRef: React.Ref<Focusable> | undefined;\n onSplitPanelToggle: () => void;\n}\n\nfunction checkAlreadyExists(value: boolean, propName: string) {\n if (value) {\n warnOnce(\n 'AppLayout',\n `Another app layout instance on this page already defines ${propName} property. This instance will be ignored.`\n );\n return true;\n }\n return false;\n}\n\nexport function mergeProps(\n ownProps: SharedProps,\n additionalProps: ReadonlyArray<Partial<SharedProps>>\n): ToolbarProps | null {\n const toolbar: ToolbarProps = {};\n for (const props of [ownProps, ...additionalProps]) {\n toolbar.ariaLabels = Object.assign(toolbar.ariaLabels ?? {}, props.ariaLabels);\n if (props.drawers && !checkAlreadyExists(!!toolbar.drawers, 'tools or drawers')) {\n toolbar.drawers = props.drawers;\n toolbar.activeDrawerId = props.activeDrawerId;\n toolbar.drawersFocusRef = props.drawersFocusRef;\n toolbar.onActiveDrawerChange = props.onActiveDrawerChange;\n }\n if (props.globalDrawers && !checkAlreadyExists(!!toolbar.globalDrawers, 'globalDrawers')) {\n toolbar.globalDrawersFocusControl = props.globalDrawersFocusControl;\n toolbar.globalDrawers = props.globalDrawers;\n toolbar.activeGlobalDrawersIds = props.activeGlobalDrawersIds;\n toolbar.onActiveGlobalDrawersChange = props.onActiveGlobalDrawersChange;\n }\n if (props.navigation && !checkAlreadyExists(!!toolbar.hasNavigation, 'navigation')) {\n // there is never a case where navigation will exist and a toggle will not so toolbar\n // can use the hasNavigation here to conditionally render the navigationToggle button\n toolbar.hasNavigation = true;\n toolbar.navigationOpen = props.navigationOpen;\n toolbar.navigationFocusRef = props.navigationFocusRef;\n toolbar.onNavigationToggle = props.onNavigationToggle;\n }\n if (props.splitPanel && !checkAlreadyExists(!!toolbar.hasSplitPanel, 'splitPanel')) {\n toolbar.hasSplitPanel = true;\n toolbar.splitPanelFocusRef = props.splitPanelFocusRef;\n toolbar.splitPanelToggleProps = props.splitPanelToggleProps;\n toolbar.onSplitPanelToggle = props.onSplitPanelToggle;\n }\n if (props.breadcrumbs && !checkAlreadyExists(!!toolbar.hasBreadcrumbsPortal, 'hasBreadcrumbsPortal')) {\n toolbar.hasBreadcrumbsPortal = true;\n }\n }\n // do not render toolbar if no fields are defined, except ariaLabels, which are always there\n return Object.keys(toolbar).filter(key => key !== 'ariaLabels').length > 0 ? toolbar : null;\n}\n\nexport function useMultiAppLayout(props: SharedProps, isEnabled: boolean) {\n const [registration, setRegistration] = useState<RegistrationState<SharedProps> | null>(null);\n const { forceDeduplicationType } = props;\n\n useLayoutEffect(() => {\n if (!isEnabled || forceDeduplicationType === 'suspended') {\n return;\n }\n if (forceDeduplicationType === 'off') {\n setRegistration({ type: 'primary', discoveredProps: [] });\n return;\n }\n return awsuiPluginsInternal.appLayoutWidget.register(forceDeduplicationType, props =>\n setRegistration(props as RegistrationState<SharedProps>)\n );\n }, [forceDeduplicationType, isEnabled]);\n\n useLayoutEffect(() => {\n if (registration?.type === 'secondary') {\n registration.update(props);\n }\n });\n\n return {\n registered: !!registration?.type,\n toolbarProps: registration?.type === 'primary' ? mergeProps(props, registration.discoveredProps) : null,\n };\n}\n"]}
1
+ {"version":3,"file":"multi-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/multi-lay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AC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useState } from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { RegistrationState } from '../../internal/plugins/controllers/app-layout-widget';\nimport { AppLayoutProps } from '../interfaces';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../utils/use-focus-control';\nimport { SplitPanelToggleProps, ToolbarProps } from './toolbar';\n\nexport interface SharedProps {\n forceDeduplicationType?: 'primary' | 'secondary' | 'suspended' | 'off';\n ariaLabels: AppLayoutProps.Labels | undefined;\n navigation: React.ReactNode;\n navigationOpen: boolean;\n onNavigationToggle: (open: boolean) => void;\n navigationFocusRef: React.Ref<Focusable> | undefined;\n breadcrumbs: React.ReactNode;\n activeDrawerId: string | null;\n drawers: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n onActiveDrawerChange: ((drawerId: string | null, params: OnChangeParams) => void) | undefined;\n drawersFocusRef: React.Ref<Focusable> | undefined;\n globalDrawersFocusControl?: FocusControlMultipleStates | undefined;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: Array<string> | undefined;\n onActiveGlobalDrawersChange?: ((newDrawerId: string, params: OnChangeParams) => void) | undefined;\n splitPanel: React.ReactNode;\n splitPanelToggleProps: SplitPanelToggleProps | undefined;\n splitPanelFocusRef: React.Ref<Focusable> | undefined;\n onSplitPanelToggle: () => void;\n}\n\nfunction checkAlreadyExists(value: boolean, propName: string) {\n if (value) {\n warnOnce(\n 'AppLayout',\n `Another app layout instance on this page already defines ${propName} property. This instance will be ignored.`\n );\n return true;\n }\n return false;\n}\n\nexport function mergeProps(\n ownProps: SharedProps,\n additionalProps: ReadonlyArray<Partial<SharedProps>>\n): ToolbarProps | null {\n const toolbar: ToolbarProps = {};\n for (const props of [ownProps, ...additionalProps]) {\n toolbar.ariaLabels = Object.assign(toolbar.ariaLabels ?? {}, props.ariaLabels);\n if (\n props.drawers &&\n props.drawers.some(drawer => drawer.trigger) &&\n !checkAlreadyExists(!!toolbar.drawers, 'tools or drawers')\n ) {\n toolbar.drawers = props.drawers;\n toolbar.activeDrawerId = props.activeDrawerId;\n toolbar.drawersFocusRef = props.drawersFocusRef;\n toolbar.onActiveDrawerChange = props.onActiveDrawerChange;\n }\n if (props.globalDrawers && !checkAlreadyExists(!!toolbar.globalDrawers, 'globalDrawers')) {\n toolbar.globalDrawersFocusControl = props.globalDrawersFocusControl;\n toolbar.globalDrawers = props.globalDrawers;\n toolbar.activeGlobalDrawersIds = props.activeGlobalDrawersIds;\n toolbar.onActiveGlobalDrawersChange = props.onActiveGlobalDrawersChange;\n }\n if (props.navigation && !checkAlreadyExists(!!toolbar.hasNavigation, 'navigation')) {\n toolbar.hasNavigation = true;\n toolbar.navigationOpen = props.navigationOpen;\n toolbar.navigationFocusRef = props.navigationFocusRef;\n toolbar.onNavigationToggle = props.onNavigationToggle;\n }\n if (\n props.splitPanel &&\n props.splitPanelToggleProps?.displayed &&\n !checkAlreadyExists(!!toolbar.hasSplitPanel, 'splitPanel')\n ) {\n toolbar.hasSplitPanel = true;\n toolbar.splitPanelFocusRef = props.splitPanelFocusRef;\n toolbar.splitPanelToggleProps = props.splitPanelToggleProps;\n toolbar.onSplitPanelToggle = props.onSplitPanelToggle;\n }\n if (props.breadcrumbs && !checkAlreadyExists(!!toolbar.hasBreadcrumbsPortal, 'hasBreadcrumbsPortal')) {\n toolbar.hasBreadcrumbsPortal = true;\n }\n }\n // do not render toolbar if no fields are defined, except ariaLabels, which are always there\n return Object.keys(toolbar).filter(key => key !== 'ariaLabels').length > 0 ? toolbar : null;\n}\n\nexport function useMultiAppLayout(props: SharedProps, isEnabled: boolean) {\n const [registration, setRegistration] = useState<RegistrationState<SharedProps> | null>(null);\n const { forceDeduplicationType } = props;\n\n useLayoutEffect(() => {\n if (!isEnabled || forceDeduplicationType === 'suspended') {\n return;\n }\n if (forceDeduplicationType === 'off') {\n setRegistration({ type: 'primary', discoveredProps: [] });\n return;\n }\n return awsuiPluginsInternal.appLayoutWidget.register(forceDeduplicationType, props =>\n setRegistration(props as RegistrationState<SharedProps>)\n );\n }, [forceDeduplicationType, isEnabled]);\n\n useLayoutEffect(() => {\n if (registration?.type === 'secondary') {\n registration.update(props);\n }\n });\n\n return {\n registered: !!registration?.type,\n toolbarProps: registration?.type === 'primary' ? mergeProps(props, registration.discoveredProps) : null,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAInD,OAAO,EAAkB,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAM1E,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;IAEnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAG1C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAG/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC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GAAG,SAAS,CAAC;CAChG;AAED,MAAM,WAAW,mCAAmC;IAClD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,kBAAkB,EAGlB,YAAiB,GAClB,EAAE,mCAAmC,eA2IrC;AAED,eAAO,MAAM,gCAAgC,uGAG5C,CAAC"}
@@ -11,36 +11,13 @@ import { DrawerTriggers } from './drawer-triggers';
11
11
  import TriggerButton from './trigger-button';
12
12
  import testutilStyles from '../../test-classes/styles.css.js';
13
13
  import styles from './styles.css.js';
14
- // support compatibility with changes before this commit: cf0f2b0755af1a28ac7c3c9476418a7ea807d0fd
15
- function convertLegacyProps(toolbarProps, legacyProps) {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
17
- return {
18
- ariaLabels: (_a = toolbarProps.ariaLabels) !== null && _a !== void 0 ? _a : legacyProps.ariaLabels,
19
- activeDrawerId: (_b = toolbarProps.activeDrawerId) !== null && _b !== void 0 ? _b : (_c = legacyProps.activeDrawer) === null || _c === void 0 ? void 0 : _c.id,
20
- drawers: (_d = toolbarProps.drawers) !== null && _d !== void 0 ? _d : legacyProps.drawers,
21
- drawersFocusRef: (_e = toolbarProps.drawersFocusRef) !== null && _e !== void 0 ? _e : (_f = legacyProps.drawersFocusControl) === null || _f === void 0 ? void 0 : _f.refs.toggle,
22
- globalDrawersFocusControl: toolbarProps.globalDrawersFocusControl,
23
- onActiveDrawerChange: (_g = toolbarProps.onActiveDrawerChange) !== null && _g !== void 0 ? _g : legacyProps.onActiveDrawerChange,
24
- globalDrawers: (_h = toolbarProps.globalDrawers) !== null && _h !== void 0 ? _h : legacyProps.globalDrawers,
25
- activeGlobalDrawersIds: (_j = toolbarProps.activeGlobalDrawersIds) !== null && _j !== void 0 ? _j : legacyProps.activeGlobalDrawersIds,
26
- onActiveGlobalDrawersChange: (_k = toolbarProps.onActiveGlobalDrawersChange) !== null && _k !== void 0 ? _k : legacyProps.onActiveGlobalDrawersChange,
27
- hasNavigation: (_l = toolbarProps.hasNavigation) !== null && _l !== void 0 ? _l : !!legacyProps.navigation,
28
- navigationOpen: (_m = toolbarProps.navigationOpen) !== null && _m !== void 0 ? _m : legacyProps.navigationOpen,
29
- navigationFocusRef: (_o = toolbarProps.navigationFocusRef) !== null && _o !== void 0 ? _o : (_p = legacyProps.navigationFocusControl) === null || _p === void 0 ? void 0 : _p.refs.toggle,
30
- onNavigationToggle: (_q = toolbarProps.onNavigationToggle) !== null && _q !== void 0 ? _q : legacyProps.onNavigationToggle,
31
- hasSplitPanel: (_r = toolbarProps.hasSplitPanel) !== null && _r !== void 0 ? _r : true,
32
- splitPanelFocusRef: (_s = legacyProps.splitPanelFocusControl) === null || _s === void 0 ? void 0 : _s.refs.toggle,
33
- splitPanelToggleProps: (_t = toolbarProps.splitPanelToggleProps) !== null && _t !== void 0 ? _t : Object.assign(Object.assign({}, legacyProps.splitPanelToggleConfig), { active: legacyProps.splitPanelOpen, controlId: legacyProps.splitPanelControlId, position: legacyProps.splitPanelPosition }),
34
- onSplitPanelToggle: (_u = toolbarProps.onSplitPanelToggle) !== null && _u !== void 0 ? _u : legacyProps.onSplitPanelToggle,
35
- };
36
- }
37
14
  export function AppLayoutToolbarImplementation({ appLayoutInternals,
38
15
  // the value could be undefined if this component is loaded as a widget by a different app layout version
39
16
  // not testable in a single-version setup
40
17
  toolbarProps = {}, }) {
41
18
  var _a, _b, _c;
42
19
  const { breadcrumbs, discoveredBreadcrumbs, verticalOffsets, isMobile, toolbarState, setToolbarState, setToolbarHeight, } = appLayoutInternals;
43
- const { ariaLabels, activeDrawerId, drawers, drawersFocusRef, onActiveDrawerChange, globalDrawersFocusControl, globalDrawers, activeGlobalDrawersIds, onActiveGlobalDrawersChange, hasNavigation, navigationOpen, navigationFocusRef, onNavigationToggle, hasSplitPanel, splitPanelFocusRef, splitPanelToggleProps, onSplitPanelToggle, } = convertLegacyProps(toolbarProps, appLayoutInternals);
20
+ const { ariaLabels, activeDrawerId, drawers, drawersFocusRef, onActiveDrawerChange, globalDrawersFocusControl, globalDrawers, activeGlobalDrawersIds, onActiveGlobalDrawersChange, hasNavigation, navigationOpen, navigationFocusRef, onNavigationToggle, hasSplitPanel, splitPanelFocusRef, splitPanelToggleProps, onSplitPanelToggle, } = toolbarProps;
44
21
  // TODO: expose configuration property
45
22
  const pinnedToolbar = true;
46
23
  const ref = useRef(null);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAKtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqCrC,kGAAkG;AAClG,SAAS,kBAAkB,CAAC,YAA0B,EAAE,WAA+B;;IACrF,OAAO;QACL,UAAU,EAAE,MAAA,YAAY,CAAC,UAAU,mCAAI,WAAW,CAAC,UAAU;QAC7D,cAAc,EAAE,MAAA,YAAY,CAAC,cAAc,mCAAI,MAAA,WAAW,CAAC,YAAY,0CAAE,EAAE;QAC3E,OAAO,EAAE,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EAAE,EACpD,2BAA2B,EAAE,2BAA2B,GACxD,CACE,CACP,CACG,CACM,CACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CACvE,8BAA8B,EAC9B,eAAe,CAChB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { BreadcrumbsSlot } from '../skeleton/breadcrumbs';\nimport { ToolbarSkeleton } from '../skeleton/slot-skeletons';\nimport { ToolbarSlot } from '../skeleton/slot-wrappers';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n}\n\n// support compatibility with changes before this commit: cf0f2b0755af1a28ac7c3c9476418a7ea807d0fd\nfunction convertLegacyProps(toolbarProps: ToolbarProps, legacyProps: AppLayoutInternals): ToolbarProps {\n return {\n ariaLabels: toolbarProps.ariaLabels ?? legacyProps.ariaLabels,\n activeDrawerId: toolbarProps.activeDrawerId ?? legacyProps.activeDrawer?.id,\n drawers: toolbarProps.drawers ?? legacyProps.drawers,\n drawersFocusRef: toolbarProps.drawersFocusRef ?? legacyProps.drawersFocusControl?.refs.toggle,\n globalDrawersFocusControl: toolbarProps.globalDrawersFocusControl,\n onActiveDrawerChange: toolbarProps.onActiveDrawerChange ?? legacyProps.onActiveDrawerChange,\n globalDrawers: toolbarProps.globalDrawers ?? legacyProps.globalDrawers,\n activeGlobalDrawersIds: toolbarProps.activeGlobalDrawersIds ?? legacyProps.activeGlobalDrawersIds,\n onActiveGlobalDrawersChange: toolbarProps.onActiveGlobalDrawersChange ?? legacyProps.onActiveGlobalDrawersChange,\n hasNavigation: toolbarProps.hasNavigation ?? !!legacyProps.navigation,\n navigationOpen: toolbarProps.navigationOpen ?? legacyProps.navigationOpen,\n navigationFocusRef: toolbarProps.navigationFocusRef ?? legacyProps.navigationFocusControl?.refs.toggle,\n onNavigationToggle: toolbarProps.onNavigationToggle ?? legacyProps.onNavigationToggle,\n hasSplitPanel: toolbarProps.hasSplitPanel ?? true,\n splitPanelFocusRef: legacyProps.splitPanelFocusControl?.refs.toggle,\n splitPanelToggleProps: toolbarProps.splitPanelToggleProps ?? {\n ...legacyProps.splitPanelToggleConfig,\n active: legacyProps.splitPanelOpen,\n controlId: legacyProps.splitPanelControlId,\n position: legacyProps.splitPanelPosition,\n },\n onSplitPanelToggle: toolbarProps.onSplitPanelToggle ?? legacyProps.onSplitPanelToggle,\n };\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n}: AppLayoutToolbarImplementationProps) {\n const {\n breadcrumbs,\n discoveredBreadcrumbs,\n verticalOffsets,\n isMobile,\n toolbarState,\n setToolbarState,\n setToolbarHeight,\n } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n } = convertLegacyProps(toolbarProps, appLayoutInternals);\n // TODO: expose configuration property\n const pinnedToolbar = true;\n const ref = useRef<HTMLElement>(null);\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n let lastScrollY = window.scrollY;\n\n /* istanbul ignore next not testable in JSDOM */\n const updateScrollDirection = () => {\n if (pinnedToolbar) {\n setToolbarState('show');\n return;\n }\n const scrollY = window.scrollY;\n // 80 is an arbitrary number to have a pause before the toolbar scrolls out of view at the top of the page\n const direction = scrollY > lastScrollY && scrollY > 80 ? 'hide' : 'show';\n // 2 as a buffer to avoid mistaking minor accidental mouse moves as scroll\n if (direction !== toolbarState && (scrollY - lastScrollY > 2 || scrollY - lastScrollY < -2)) {\n setToolbarState(direction);\n }\n lastScrollY = scrollY > 0 ? scrollY : 0;\n };\n\n window.addEventListener('scroll', updateScrollDirection);\n return () => {\n window.removeEventListener('scroll', updateScrollDirection);\n };\n }, [pinnedToolbar, setToolbarState, toolbarState]);\n\n const anyPanelOpenInMobile = !!isMobile && (!!activeDrawerId || (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const toolbarHidden = toolbarState === 'hide' && !pinnedToolbar;\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx(styles['universal-toolbar'], testutilStyles.toolbar, {\n [testutilStyles['mobile-bar']]: isMobile,\n [styles['toolbar-hidden']]: toolbarHidden,\n })}\n style={{\n insetBlockStart: toolbarHidden ? '-60px' : verticalOffsets.toolbar,\n }}\n >\n <div className={styles['toolbar-container']}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={false}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => onNavigationToggle?.(!navigationOpen)}\n ref={navigationFocusRef}\n selected={navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <div className={clsx(styles['universal-toolbar-breadcrumbs'], testutilStyles.breadcrumbs)}>\n <BreadcrumbsSlot\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n />\n </div>\n )}\n {(drawers?.length || globalDrawers?.length || (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n />\n </div>\n )}\n </div>\n </ToolbarSlot>\n );\n}\n\nexport const createWidgetizedAppLayoutToolbar = createWidgetizedComponent(\n AppLayoutToolbarImplementation,\n ToolbarSkeleton\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAKtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqCrC,MAAM,UAAU,8BAA8B,CAAC,EAC7C,kBAAkB;AAClB,yGAAyG;AACzG,yCAAyC;AACzC,YAA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BAAyB,CACvE,8BAA8B,EAC9B,eAAe,CAChB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { BreadcrumbsSlot } from '../skeleton/breadcrumbs';\nimport { ToolbarSkeleton } from '../skeleton/slot-skeletons';\nimport { ToolbarSlot } from '../skeleton/slot-wrappers';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n}: AppLayoutToolbarImplementationProps) {\n const {\n breadcrumbs,\n discoveredBreadcrumbs,\n verticalOffsets,\n isMobile,\n toolbarState,\n setToolbarState,\n setToolbarHeight,\n } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n } = toolbarProps;\n // TODO: expose configuration property\n const pinnedToolbar = true;\n const ref = useRef<HTMLElement>(null);\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n let lastScrollY = window.scrollY;\n\n /* istanbul ignore next not testable in JSDOM */\n const updateScrollDirection = () => {\n if (pinnedToolbar) {\n setToolbarState('show');\n return;\n }\n const scrollY = window.scrollY;\n // 80 is an arbitrary number to have a pause before the toolbar scrolls out of view at the top of the page\n const direction = scrollY > lastScrollY && scrollY > 80 ? 'hide' : 'show';\n // 2 as a buffer to avoid mistaking minor accidental mouse moves as scroll\n if (direction !== toolbarState && (scrollY - lastScrollY > 2 || scrollY - lastScrollY < -2)) {\n setToolbarState(direction);\n }\n lastScrollY = scrollY > 0 ? scrollY : 0;\n };\n\n window.addEventListener('scroll', updateScrollDirection);\n return () => {\n window.removeEventListener('scroll', updateScrollDirection);\n };\n }, [pinnedToolbar, setToolbarState, toolbarState]);\n\n const anyPanelOpenInMobile = !!isMobile && (!!activeDrawerId || (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const toolbarHidden = toolbarState === 'hide' && !pinnedToolbar;\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx(styles['universal-toolbar'], testutilStyles.toolbar, {\n [testutilStyles['mobile-bar']]: isMobile,\n [styles['toolbar-hidden']]: toolbarHidden,\n })}\n style={{\n insetBlockStart: toolbarHidden ? '-60px' : verticalOffsets.toolbar,\n }}\n >\n <div className={styles['toolbar-container']}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={false}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => onNavigationToggle?.(!navigationOpen)}\n ref={navigationFocusRef}\n selected={navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <div className={clsx(styles['universal-toolbar-breadcrumbs'], testutilStyles.breadcrumbs)}>\n <BreadcrumbsSlot\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n />\n </div>\n )}\n {(drawers?.length || globalDrawers?.length || (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n />\n </div>\n )}\n </div>\n </ToolbarSlot>\n );\n}\n\nexport const createWidgetizedAppLayoutToolbar = createWidgetizedComponent(\n AppLayoutToolbarImplementation,\n ToolbarSkeleton\n);\n"]}
@@ -1,12 +1,12 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_cqcqk_1n5r7_181",
5
- "wrapper": "awsui_wrapper_cqcqk_1n5r7_185",
6
- "elementWrapper": "awsui_elementWrapper_cqcqk_1n5r7_189",
7
- "markerWrapper": "awsui_markerWrapper_cqcqk_1n5r7_193",
8
- "placement-right": "awsui_placement-right_cqcqk_1n5r7_198",
9
- "placement-left": "awsui_placement-left_cqcqk_1n5r7_203",
10
- "inlineWrapper": "awsui_inlineWrapper_cqcqk_1n5r7_208"
4
+ "root": "awsui_root_cqcqk_18zdt_181",
5
+ "wrapper": "awsui_wrapper_cqcqk_18zdt_185",
6
+ "elementWrapper": "awsui_elementWrapper_cqcqk_18zdt_189",
7
+ "markerWrapper": "awsui_markerWrapper_cqcqk_18zdt_193",
8
+ "placement-right": "awsui_placement-right_cqcqk_18zdt_198",
9
+ "placement-left": "awsui_placement-left_cqcqk_18zdt_203",
10
+ "inlineWrapper": "awsui_inlineWrapper_cqcqk_18zdt_208"
11
11
  };
12
12
 
@@ -178,33 +178,33 @@
178
178
  */
179
179
  /* Style used for links in slots/components that are text heavy, to help links stand out among
180
180
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
181
- .awsui_root_cqcqk_1n5r7_181:not(#\9) {
181
+ .awsui_root_cqcqk_18zdt_181:not(#\9) {
182
182
  /* used in test-utils */
183
183
  }
184
184
 
185
- .awsui_wrapper_cqcqk_1n5r7_185:not(#\9) {
185
+ .awsui_wrapper_cqcqk_18zdt_185:not(#\9) {
186
186
  position: relative;
187
187
  }
188
188
 
189
- .awsui_elementWrapper_cqcqk_1n5r7_189:not(#\9) {
189
+ .awsui_elementWrapper_cqcqk_18zdt_189:not(#\9) {
190
190
  flex: 1;
191
191
  }
192
192
 
193
- .awsui_markerWrapper_cqcqk_1n5r7_193:not(#\9) {
193
+ .awsui_markerWrapper_cqcqk_18zdt_193:not(#\9) {
194
194
  position: absolute;
195
195
  inset-block-start: 0;
196
196
  }
197
197
 
198
- .awsui_placement-right_cqcqk_1n5r7_198:not(#\9) {
198
+ .awsui_placement-right_cqcqk_18zdt_198:not(#\9) {
199
199
  inset-inline-start: 100%;
200
200
  margin-inline-start: var(--space-xxs-p8yyaw, 4px);
201
201
  }
202
202
 
203
- .awsui_placement-left_cqcqk_1n5r7_203:not(#\9) {
203
+ .awsui_placement-left_cqcqk_18zdt_203:not(#\9) {
204
204
  inset-inline-end: 100%;
205
205
  margin-inline-end: var(--space-xxs-p8yyaw, 4px);
206
206
  }
207
207
 
208
- .awsui_inlineWrapper_cqcqk_1n5r7_208:not(#\9) {
209
- margin-inline-start: var(--space-xxs-p8yyaw, 4px);
208
+ .awsui_inlineWrapper_cqcqk_18zdt_208:not(#\9) {
209
+ margin-inline: var(--space-xxs-p8yyaw, 4px);
210
210
  }
@@ -2,12 +2,12 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_cqcqk_1n5r7_181",
6
- "wrapper": "awsui_wrapper_cqcqk_1n5r7_185",
7
- "elementWrapper": "awsui_elementWrapper_cqcqk_1n5r7_189",
8
- "markerWrapper": "awsui_markerWrapper_cqcqk_1n5r7_193",
9
- "placement-right": "awsui_placement-right_cqcqk_1n5r7_198",
10
- "placement-left": "awsui_placement-left_cqcqk_1n5r7_203",
11
- "inlineWrapper": "awsui_inlineWrapper_cqcqk_1n5r7_208"
5
+ "root": "awsui_root_cqcqk_18zdt_181",
6
+ "wrapper": "awsui_wrapper_cqcqk_18zdt_185",
7
+ "elementWrapper": "awsui_elementWrapper_cqcqk_18zdt_189",
8
+ "markerWrapper": "awsui_markerWrapper_cqcqk_18zdt_193",
9
+ "placement-right": "awsui_placement-right_cqcqk_18zdt_198",
10
+ "placement-left": "awsui_placement-left_cqcqk_18zdt_203",
11
+ "inlineWrapper": "awsui_inlineWrapper_cqcqk_18zdt_208"
12
12
  };
13
13
 
@@ -5,7 +5,7 @@ import styles from './styles.css.js';
5
5
  const splitOnFiltering = (str, highlightText) => {
6
6
  // We match by creating a regex using user-provided strings, so we skip
7
7
  // highlighting if the generated regex would be too memory intensive.
8
- if (highlightText.length > 100000) {
8
+ if (highlightText.length > 10000) {
9
9
  return { noMatches: [str], matches: null };
10
10
  }
11
11
  // Filtering needs to be case insensitive
@@ -1 +1 @@
1
- {"version":3,"file":"highlight-match.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/highlight-match.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,aAAqB,EAAE,EAAE;IAC9D,uEAAuE;IACvE,qEAAqE;IACrE,IAAI,aAAa,CAAC,MAAM,GAAG,MAAM,EAAE;QACjC,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;KAC5C;IAED,yCAAyC;IACzC,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,C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CAAC;SACzE;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,kCAAO,WAAW,CAAQ,CAAC;AACpC,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 styles from './styles.css.js';\n\nconst splitOnFiltering = (str: string, highlightText: string) => {\n // We match by creating a regex using user-provided strings, so we skip\n // highlighting if the generated regex would be too memory intensive.\n if (highlightText.length > 100000) {\n return { noMatches: [str], matches: null };\n }\n\n // Filtering needs to be case insensitive\n const filteringPattern = highlightText.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n const regexp = new RegExp(filteringPattern, 'gi');\n const noMatches = str.split(regexp);\n const matches = str.match(regexp);\n\n return { noMatches, matches };\n};\n\ninterface HighlightMatchProps {\n str?: string;\n highlightText?: string;\n}\n\nfunction Highlight({ str }: HighlightMatchProps) {\n return str ? <mark className={styles['filtering-match-highlight']}>{str}</mark> : null;\n}\n\nexport default function HighlightMatch({ str, highlightText }: HighlightMatchProps) {\n if (!str || !highlightText) {\n return <span>{str}</span>;\n }\n\n if (str === highlightText) {\n return <Highlight str={str} />;\n }\n\n const { noMatches, matches } = splitOnFiltering(str, highlightText);\n\n const highlighted: (string | JSX.Element)[] = [];\n\n noMatches.forEach((noMatch, idx) => {\n highlighted.push(<span key={`noMatch-${idx}`}>{noMatch}</span>);\n\n if (matches && idx < matches.length) {\n highlighted.push(<Highlight key={`match-${idx}`} str={matches[idx]} />);\n }\n });\n\n return <span>{highlighted}</span>;\n}\n"]}
1
+ {"version":3,"file":"highlight-match.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/highlight-match.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,aAAqB,EAAE,EAAE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GAAG,EAAE,WAAW,GAAG,EAAE,IAAG,OAAO,CAAQ,CAAC,CAAC;QAEhE,IAAI,OAAO,IAAI,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE;YACnC,WAAW,CAAC,IAAI,CAAC,oBAAC,SAAS,IAAC,GAAG,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC;SACzE;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,kCAAO,WAAW,CAAQ,CAAC;AACpC,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 styles from './styles.css.js';\n\nconst splitOnFiltering = (str: string, highlightText: string) => {\n // We match by creating a regex using user-provided strings, so we skip\n // highlighting if the generated regex would be too memory intensive.\n if (highlightText.length > 10_000) {\n return { noMatches: [str], matches: null };\n }\n\n // Filtering needs to be case insensitive\n const filteringPattern = highlightText.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n const regexp = new RegExp(filteringPattern, 'gi');\n const noMatches = str.split(regexp);\n const matches = str.match(regexp);\n\n return { noMatches, matches };\n};\n\ninterface HighlightMatchProps {\n str?: string;\n highlightText?: string;\n}\n\nfunction Highlight({ str }: HighlightMatchProps) {\n return str ? <mark className={styles['filtering-match-highlight']}>{str}</mark> : null;\n}\n\nexport default function HighlightMatch({ str, highlightText }: HighlightMatchProps) {\n if (!str || !highlightText) {\n return <span>{str}</span>;\n }\n\n if (str === highlightText) {\n return <Highlight str={str} />;\n }\n\n const { noMatches, matches } = splitOnFiltering(str, highlightText);\n\n const highlighted: (string | JSX.Element)[] = [];\n\n noMatches.forEach((noMatch, idx) => {\n highlighted.push(<span key={`noMatch-${idx}`}>{noMatch}</span>);\n\n if (matches && idx < matches.length) {\n highlighted.push(<Highlight key={`match-${idx}`} str={matches[idx]} />);\n }\n });\n\n return <span>{highlighted}</span>;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (7c8f26d3)";
2
+ export var PACKAGE_VERSION = "3.0.0 (2966baaa)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (7c8f26d3)",
3
+ "PACKAGE_VERSION": "3.0.0 (2966baaa)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "7c8f26d3835af10759cea475c882ccca334379dd"
2
+ "commit": "2966baaa03866aae6476b31015a2d75332400bef"
3
3
  }
package/package.json CHANGED
@@ -132,7 +132,7 @@
132
132
  "./internal/base-component/index.js",
133
133
  "./internal/base-component/styles.css.js"
134
134
  ],
135
- "version": "3.0.895",
135
+ "version": "3.0.897",
136
136
  "repository": {
137
137
  "type": "git",
138
138
  "url": "https://github.com/cloudscape-design/components.git"