@arc-ui/components 11.8.0 → 11.9.0

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 (42) hide show
  1. package/dist/Badge/Badge.cjs.d.ts +4 -0
  2. package/dist/Badge/Badge.cjs.js +3 -3
  3. package/dist/Badge/Badge.esm.d.ts +4 -0
  4. package/dist/Badge/Badge.esm.js +3 -3
  5. package/dist/ProgressStepper/ProgressStepper.cjs.d.ts +1 -89
  6. package/dist/ProgressStepper/ProgressStepper.cjs.js +10 -144
  7. package/dist/ProgressStepper/ProgressStepper.esm.d.ts +1 -89
  8. package/dist/ProgressStepper/ProgressStepper.esm.js +9 -143
  9. package/dist/Tabs/Tabs.cjs.d.ts +1 -75
  10. package/dist/Tabs/Tabs.cjs.js +11 -505
  11. package/dist/Tabs/Tabs.esm.d.ts +1 -75
  12. package/dist/Tabs/Tabs.esm.js +10 -504
  13. package/dist/TextArea/TextArea.cjs.js +20 -8
  14. package/dist/TextArea/TextArea.esm.js +20 -8
  15. package/dist/Toast/Toast.cjs.d.ts +1 -52
  16. package/dist/Toast/Toast.cjs.js +14 -734
  17. package/dist/Toast/Toast.esm.d.ts +1 -52
  18. package/dist/Toast/Toast.esm.js +13 -733
  19. package/dist/_shared/cjs/MediaCard-9483ad5f.d.ts +60 -0
  20. package/dist/_shared/cjs/ProgressStepper-f740d7bb.d.ts +89 -0
  21. package/dist/_shared/cjs/ProgressStepper-f740d7bb.js +149 -0
  22. package/dist/_shared/cjs/Tabs-fda49692.d.ts +75 -0
  23. package/dist/_shared/cjs/Tabs-fda49692.js +510 -0
  24. package/dist/_shared/cjs/Toast-0cb23cae.d.ts +52 -0
  25. package/dist/_shared/cjs/Toast-0cb23cae.js +739 -0
  26. package/dist/_shared/esm/MediaCard-9483ad5f.d.ts +60 -0
  27. package/dist/_shared/esm/ProgressStepper-7ab88f4c.d.ts +89 -0
  28. package/dist/_shared/esm/ProgressStepper-7ab88f4c.js +143 -0
  29. package/dist/_shared/esm/Tabs-5af0b940.d.ts +75 -0
  30. package/dist/_shared/esm/Tabs-5af0b940.js +504 -0
  31. package/dist/_shared/esm/Toast-43795e91.d.ts +52 -0
  32. package/dist/_shared/esm/Toast-43795e91.js +733 -0
  33. package/dist/index.es.js +2312 -407
  34. package/dist/index.es.js.map +1 -1
  35. package/dist/index.js +2667 -751
  36. package/dist/index.js.map +1 -1
  37. package/dist/styles.css +1 -1
  38. package/dist/types/components/Badge/Badge.d.ts +4 -0
  39. package/dist/types/components/Toast/Toast.d.ts +2 -2
  40. package/dist/types/components/Toast/ToastNotification.d.ts +1 -1
  41. package/dist/types/components/index.d.ts +17 -6
  42. package/package.json +4 -4
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as React$c from 'react';
2
- import React__default, { createContext, useContext, useRef, useState, useEffect, forwardRef, useCallback, useMemo, createElement, useLayoutEffect, Children, isValidElement, cloneElement, Fragment, useReducer, useId } from 'react';
1
+ import * as React$m from 'react';
2
+ import React__default, { createContext, useContext, useState, useRef, useEffect, forwardRef, useCallback, useMemo, createElement, useLayoutEffect, Children, isValidElement, cloneElement, Fragment, useReducer, useId } from 'react';
3
3
 
4
4
  /*! *****************************************************************************
5
5
  Copyright (c) Microsoft Corporation.
@@ -303,6 +303,328 @@ var AlignItem = function (_a) {
303
303
  return React__default.createElement("div", { className: "arc-Align-item" }, children);
304
304
  };
305
305
 
306
+ var defaultContext$3 = { surface: "light" };
307
+ var Context$3 = createContext(defaultContext$3);
308
+ var Provider$4 = Context$3.Provider;
309
+ /**
310
+ * Use `Surface` to compose content using the Arc system.
311
+ */
312
+ var Surface = function (_a) {
313
+ var _b;
314
+ var background = _a.background, children = _a.children, _c = _a.growVertically, growVertically = _c === void 0 ? false : _c, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, props = __rest$2(_a, ["background", "children", "growVertically", "padding", "paddingHorizontal", "paddingVertical"]);
315
+ var surface = "light";
316
+ if (background === "black" ||
317
+ background === "brand" ||
318
+ background === "brand-flat" ||
319
+ background === "dark" ||
320
+ background === "darker") {
321
+ surface = "dark";
322
+ }
323
+ return (React__default.createElement(Provider$4, { value: { surface: surface } },
324
+ React__default.createElement("div", __assign$2({ "data-testid": "arc-surface", className: classNames((_b = {
325
+ "arc-Surface": true
326
+ },
327
+ _b["arc-Surface--".concat(background &&
328
+ camelCase$1(background), "Background")] = background,
329
+ _b["arc-Surface--growVertically"] = growVertically,
330
+ _b["arc-Surface--padding".concat(padding)] = padding,
331
+ _b["arc-Surface--paddingHorizontal".concat(paddingHorizontal)] = paddingHorizontal,
332
+ _b["arc-Surface--paddingVertical".concat(paddingVertical)] = paddingVertical,
333
+ _b)) }, filterDataAttrs(props)), children)));
334
+ };
335
+ var backgroundsShared = [
336
+ "black",
337
+ "brand",
338
+ "brand-flat",
339
+ "dark",
340
+ "darker",
341
+ "coral",
342
+ "turquoise",
343
+ "light",
344
+ "lighter",
345
+ "white"
346
+ ];
347
+ __spreadArray$1([], backgroundsShared, true);
348
+ __spreadArray$1([], backgroundsShared, true);
349
+
350
+ const React$l = React__default;
351
+ const ArcIconArc = props =>
352
+ /*#__PURE__*/ React$l.createElement(
353
+ "svg",
354
+ Object.assign(
355
+ {
356
+ viewBox: "0 0 16 16",
357
+ xmlns: "http://www.w3.org/2000/svg"
358
+ },
359
+ props
360
+ ),
361
+ /*#__PURE__*/ React$l.createElement("path", {
362
+ fill: "none",
363
+ d: "M3.472 11.69a6.5 6.5 0 012.321-6.839A6.5 6.5 0 0113 4.38",
364
+ stroke: "currentColor"
365
+ })
366
+ );
367
+ var ArcIconArc_2 = ArcIconArc;
368
+
369
+ /**
370
+ * Use `Icon` to display brand iconography.
371
+ */
372
+ var Icon = function (_a) {
373
+ var _b;
374
+ var testId = _a.testId, _c = _a.color, color = _c === void 0 ? "auto" : _c, _d = _a.icon, icon = _d === void 0 ? ArcIconArc_2 : _d, _e = _a.isInline, isInline = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = __rest$2(_a, ["testId", "color", "icon", "isInline", "label", "size"]);
375
+ var surface = useContext(Context$3).surface;
376
+ var Icon = icon;
377
+ return (React__default.createElement("span", __assign$2({ "data-testid": testId, "aria-label": label, className: classNames((_b = {},
378
+ _b["arc-Icon"] = true,
379
+ _b[suffixModifier("arc-Icon--color", color)] = color !== "auto",
380
+ _b["arc-Icon--inline"] = isInline,
381
+ _b["arc-Icon--onDarkSurface"] = surface === "dark",
382
+ _b)), role: label ? "img" : undefined, style: {
383
+ height: size,
384
+ width: size
385
+ } }, filterDataAttrs(props)),
386
+ React__default.createElement(Icon, null)));
387
+ };
388
+
389
+ /**
390
+ * Use `Heading` to display heading text.
391
+ */
392
+ var Heading = function (_a) {
393
+ var _b;
394
+ var _c = _a.align, align = _c === void 0 ? "left" : _c, _d = _a.casing, casing = _d === void 0 ? "auto" : _d, children = _a.children, _e = _a.color, color = _e === void 0 ? "auto" : _e, level = _a.level, size = _a.size, id = _a.id, props = __rest$2(_a, ["align", "casing", "children", "color", "level", "size", "id"]);
395
+ var surface = useContext(Context$3).surface;
396
+ var Element = "span";
397
+ if (level) {
398
+ Element = "h".concat(level);
399
+ }
400
+ return (React__default.createElement(Element, __assign$2({ id: id, className: classNames((_b = {
401
+ "arc-Heading": true
402
+ },
403
+ _b[suffixModifier("arc-Heading--align", align)] = align && align !== "left",
404
+ _b["arc-Heading--size".concat(size && size.toUpperCase())] = size,
405
+ _b["arc-Heading--casingNone"] = casing === "none",
406
+ _b["arc-Heading--colorBrand"] = color === "brand",
407
+ _b["arc-Heading--onDarkSurface"] = surface === "dark",
408
+ _b)) }, filterDataAttrs(props)), children));
409
+ };
410
+ var HeadingProposition = function (_a) {
411
+ var children = _a.children;
412
+ return React__default.createElement("span", { className: "arc-Heading-proposition" }, children);
413
+ };
414
+ HeadingProposition.displayName = "Heading.Proposition";
415
+ Heading.Proposition = HeadingProposition;
416
+
417
+ /**
418
+ * Use `Text` to display text.
419
+ */
420
+ var Text = function (_a) {
421
+ var _b;
422
+ var _c = _a.align, align = _c === void 0 ? "left" : _c, children = _a.children, id = _a.id, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isMeasured, isMeasured = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "m" : _f, _g = _a.tone, tone = _g === void 0 ? "default" : _g, props = __rest$2(_a, ["align", "children", "id", "isInline", "isMeasured", "size", "tone"]);
423
+ var surface = useContext(Context$3).surface;
424
+ return (React__default.createElement("span", __assign$2({ id: id, className: classNames((_b = {
425
+ "arc-Text": true
426
+ },
427
+ _b[suffixModifier("arc-Text--align", align)] = align !== "left",
428
+ _b["arc-Text--inline"] = isInline,
429
+ _b["arc-Text--measured"] = isMeasured,
430
+ _b["arc-Text--size".concat(size && size.toUpperCase())] = size && size !== "m",
431
+ _b["arc-Text--".concat(tone)] = tone !== "default",
432
+ _b["arc-Text--onDarkSurface"] = surface === "dark",
433
+ _b)) }, filterDataAttrs(props)), children));
434
+ };
435
+
436
+ const React$k = React__default;
437
+ const BtIconCrossAlt2Px = props =>
438
+ /*#__PURE__*/ React$k.createElement(
439
+ "svg",
440
+ Object.assign(
441
+ {
442
+ xmlns: "http://www.w3.org/2000/svg",
443
+ viewBox: "0 0 32 32"
444
+ },
445
+ props
446
+ ),
447
+ /*#__PURE__*/ React$k.createElement("defs", null),
448
+ /*#__PURE__*/ React$k.createElement("path", {
449
+ d:
450
+ "M17.41406,16l3.793-3.793A.99989.99989,0,0,0,19.793,10.793L16,14.58594l-3.793-3.793A.99989.99989,0,0,0,10.793,12.207L14.58594,16l-3.793,3.793A.99989.99989,0,1,0,12.207,21.207L16,17.41406l3.793,3.793A.99989.99989,0,0,0,21.207,19.793Z",
451
+ fill: "currentColor"
452
+ })
453
+ );
454
+ var BtIconCrossAlt2Px_2 = BtIconCrossAlt2Px;
455
+
456
+ const React$j = React__default;
457
+ const BtIconNotification = props =>
458
+ /*#__PURE__*/ React$j.createElement(
459
+ "svg",
460
+ Object.assign(
461
+ {
462
+ xmlns: "http://www.w3.org/2000/svg",
463
+ viewBox: "0 0 32 32"
464
+ },
465
+ props
466
+ ),
467
+ /*#__PURE__*/ React$j.createElement("defs", null),
468
+ /*#__PURE__*/ React$j.createElement("path", {
469
+ d:
470
+ "M24.50977,21.98867,24,21.99014,23.99414,13.975a7.98466,7.98466,0,0,0-6.66046-7.86011,1.46733,1.46733,0,0,0,.15655-.65063,1.48633,1.48633,0,1,0-2.97265,0,1.46732,1.46732,0,0,0,.15826.65369,7.9849,7.9849,0,0,0-6.63971,7.857v8.0166l-.50781-.00293a1.50464,1.50464,0,1,0,0,3.00928h3.45679a1.997,1.997,0,0,0,3.99365,0h9.532a1.50464,1.50464,0,1,0-.001-3.00928ZM16.00391,4.97793a.48633.48633,0,1,1-.48633.48633A.48668.48668,0,0,1,16.00391,4.97793ZM12.98242,25.97158a.998.998,0,0,1-.99469-.97363h1.98841A.99785.99785,0,0,1,12.98242,25.97158ZM24.51074,23.998H7.52832a.50465.50465,0,0,1-.00488-1.00928l1.51269.00293V13.975a6.979,6.979,0,0,1,13.958.00049L23,22.99209l1.51074-.00342a.50464.50464,0,1,1,0,1.00928Z",
471
+ fill: "currentColor"
472
+ })
473
+ );
474
+ var BtIconNotification_2 = BtIconNotification;
475
+
476
+ const React$i = React__default;
477
+ const BtIconAlertTriangle = props =>
478
+ /*#__PURE__*/ React$i.createElement(
479
+ "svg",
480
+ Object.assign(
481
+ {
482
+ xmlns: "http://www.w3.org/2000/svg",
483
+ viewBox: "0 0 32 32"
484
+ },
485
+ props
486
+ ),
487
+ /*#__PURE__*/ React$i.createElement("defs", null),
488
+ /*#__PURE__*/ React$i.createElement("path", {
489
+ fill: "currentColor",
490
+ d: "M16 21.99335A1 1 0 1 0 16 23.99335 1 1 0 1 0 16 21.99335z"
491
+ }),
492
+ /*#__PURE__*/ React$i.createElement("path", {
493
+ d:
494
+ "M16.00488,20.00977a.49972.49972,0,0,0,.5-.5l.002-9.00977a.5.5,0,0,0-1,0l-.002,9.00977A.5.5,0,0,0,16.00488,20.00977Z",
495
+ fill: "currentColor"
496
+ }),
497
+ /*#__PURE__*/ React$i.createElement("path", {
498
+ d:
499
+ "M29.83691,26.21,17.041,4.5332A1.15617,1.15617,0,0,0,16.03711,3.959h-.001a1.159,1.159,0,0,0-1.00586.57373L2.23535,26.21045a1.16676,1.16676,0,0,0,1.00488,1.76074H28.83105A1.16843,1.16843,0,0,0,29.83691,26.21Zm-.86035.67725a.164.164,0,0,1-.14551.084H3.24023a.16737.16737,0,0,1-.14355-.25244L15.8916,5.0415a.167.167,0,0,1,.28809,0l12.7959,21.67627A.16531.16531,0,0,1,28.97656,26.88721Z",
500
+ fill: "currentColor"
501
+ })
502
+ );
503
+ var BtIconAlertTriangle_2 = BtIconAlertTriangle;
504
+
505
+ const React$h = React__default;
506
+ const BtIconAlert = props =>
507
+ /*#__PURE__*/ React$h.createElement(
508
+ "svg",
509
+ Object.assign(
510
+ {
511
+ xmlns: "http://www.w3.org/2000/svg",
512
+ viewBox: "0 0 32 32"
513
+ },
514
+ props
515
+ ),
516
+ /*#__PURE__*/ React$h.createElement("defs", null),
517
+ /*#__PURE__*/ React$h.createElement("path", {
518
+ d:
519
+ "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
520
+ fill: "currentColor"
521
+ }),
522
+ /*#__PURE__*/ React$h.createElement("path", {
523
+ fill: "currentColor",
524
+ d: "M16 20.99335A1 1 0 1 0 16 22.99335 1 1 0 1 0 16 20.99335z"
525
+ }),
526
+ /*#__PURE__*/ React$h.createElement("path", {
527
+ d:
528
+ "M16.00488,19.00977a.49972.49972,0,0,0,.5-.5L16.50684,9.5a.5.5,0,0,0-1,0l-.002,9.00977A.5.5,0,0,0,16.00488,19.00977Z",
529
+ fill: "currentColor"
530
+ })
531
+ );
532
+ var BtIconAlert_2 = BtIconAlert;
533
+
534
+ const React$g = React__default;
535
+ const BtIconTick = props =>
536
+ /*#__PURE__*/ React$g.createElement(
537
+ "svg",
538
+ Object.assign(
539
+ {
540
+ xmlns: "http://www.w3.org/2000/svg",
541
+ viewBox: "0 0 32 32"
542
+ },
543
+ props
544
+ ),
545
+ /*#__PURE__*/ React$g.createElement("defs", null),
546
+ /*#__PURE__*/ React$g.createElement(
547
+ "g",
548
+ {
549
+ "data-name": "Icons"
550
+ },
551
+ /*#__PURE__*/ React$g.createElement("path", {
552
+ d:
553
+ "M16,3A13,13,0,1,1,3,16,12.9741,12.9741,0,0,1,16,3m0-1A14,14,0,1,0,30,16,14.04116,14.04116,0,0,0,16,2Z",
554
+ fill: "currentColor"
555
+ }),
556
+ /*#__PURE__*/ React$g.createElement("path", {
557
+ d:
558
+ "M13.5,21.2,9.1,16.8a.495.495,0,1,1,.7-.7l3.6,3.6L22,11.1a.495.495,0,1,1,.7.7Z",
559
+ fill: "currentColor"
560
+ })
561
+ )
562
+ );
563
+ var BtIconTick_2 = BtIconTick;
564
+
565
+ /** use `Alert` to display persistent messages, either permanent or dismissible. */
566
+ var Alert = function (_a) {
567
+ var _b;
568
+ var heading = _a.heading, description = _a.description, link = _a.link, linkText = _a.linkText, linkAriaLabel = _a.linkAriaLabel, type = _a.type, _c = _a.status, status = _c === void 0 ? "general" : _c, isDismissable = _a.isDismissable, headingLevel = _a.headingLevel, onDismiss = _a.onDismiss, onLinkClick = _a.onLinkClick, icon = _a.icon, props = __rest$2(_a, ["heading", "description", "link", "linkText", "linkAriaLabel", "type", "status", "isDismissable", "headingLevel", "onDismiss", "onLinkClick", "icon"]);
569
+ var surface = useContext(Context$3).surface;
570
+ var _d = useState(false), isDismissed = _d[0], setIsDismissed = _d[1];
571
+ var onDismissHandler = function () {
572
+ setIsDismissed(true);
573
+ onDismiss && onDismiss();
574
+ };
575
+ var statusIcons = {
576
+ general: BtIconNotification_2,
577
+ error: BtIconAlert_2,
578
+ warning: BtIconAlertTriangle_2,
579
+ success: BtIconTick_2
580
+ };
581
+ var handleLinkClick = function (event) {
582
+ event.preventDefault();
583
+ onLinkClick && onLinkClick();
584
+ };
585
+ if (isDismissed) {
586
+ return null;
587
+ }
588
+ return (React__default.createElement("div", __assign$2({ className: classNames("arc-Alert", (_b = {
589
+ "arc-Alert--onDarkSurface": surface === "dark",
590
+ "arc-Alert--secondary": type === "secondary"
591
+ },
592
+ _b["arc-Alert--".concat(status)] = status !== "general",
593
+ _b)), role: "alert" }, (status === "warning" && { "aria-live": "assertive" }), filterDataAttrs(props)),
594
+ React__default.createElement("div", { className: "arc-Alert-icon" }, icon ? (React__default.createElement(Icon, { size: 24, icon: icon })) : (React__default.createElement(Icon, { size: 24, icon: statusIcons[status] }))),
595
+ React__default.createElement("div", { className: "arc-Alert-content" },
596
+ React__default.createElement("div", { className: "arc-Alert-heading" },
597
+ React__default.createElement(Heading, { size: "xs", level: headingLevel }, heading)),
598
+ description && React__default.createElement(Text, { size: "s" }, description),
599
+ link && (React__default.createElement("div", { className: "arc-Alert-link" },
600
+ React__default.createElement(Text, { size: "s" },
601
+ React__default.createElement("a", __assign$2({ href: link, "aria-label": linkAriaLabel }, (onLinkClick && { onClick: handleLinkClick })), linkText))))),
602
+ isDismissable && (React__default.createElement(React__default.Fragment, null,
603
+ React__default.createElement("button", { "aria-label": "dismiss alert", className: "arc-Alert-dismiss", onClick: onDismissHandler },
604
+ React__default.createElement(Icon, { icon: BtIconCrossAlt2Px_2, size: 24 }))))));
605
+ };
606
+
607
+ /** Use `Badge` component to visually display a small amount of information, such as notification counts or status indicators. */
608
+ var Badge = function (_a) {
609
+ var _b, _c;
610
+ var children = _a.children, _d = _a.state, state = _d === void 0 ? "default" : _d, _e = _a.size, size = _e === void 0 ? "default" : _e, _f = _a.fill, fill = _f === void 0 ? "solid" : _f, ariaLabel = _a.ariaLabel, ariaRole = _a.ariaRole, props = __rest$2(_a, ["children", "state", "size", "fill", "ariaLabel", "ariaRole"]);
611
+ var surface = useContext(Context$3).surface;
612
+ return (React__default.createElement("div", __assign$2({ className: classNames((_b = {
613
+ "arc-Badge": true,
614
+ "arc-Badge--onDarkSurface": surface === "dark",
615
+ "arc-Badge--large": size === "large",
616
+ "arc-Badge--outline": fill === "outlined"
617
+ },
618
+ _b[suffixModifier("arc-Badge--state", state)] = state !== "default",
619
+ _b)) }, (ariaLabel && { "aria-label": ariaLabel }), (ariaRole && { role: ariaRole }), filterDataAttrs(props)),
620
+ React__default.createElement("div", { className: classNames((_c = {
621
+ "arc-Badge-text": true
622
+ },
623
+ _c[suffixModifier("arc-Badge--text", state)] = state !== "default",
624
+ _c)) },
625
+ React__default.createElement(Text, { size: size === "default" ? "xs" : "m" }, children))));
626
+ };
627
+
306
628
  var ArcRootElementContext = createContext(null);
307
629
  /**
308
630
  * Use `Base` as the root component of the arc system.
@@ -314,6 +636,42 @@ var Base = function (_a) {
314
636
  React__default.createElement(ArcRootElementContext.Provider, { value: arcRoot }, children)));
315
637
  };
316
638
 
639
+ // Do equal height boxes story
640
+ /**
641
+ * Use `Box` as a simple way to group bespoke content and interactive elements together.
642
+ */
643
+ var Box = function (_a) {
644
+ var _b;
645
+ var children = _a.children, borderWidth = _a.borderWidth, elevationLevel = _a.elevationLevel, padding = _a.padding, _c = _a.isFullHeight, isFullHeight = _c === void 0 ? false : _c, _d = _a.isBorderRadius, isBorderRadius = _d === void 0 ? false : _d, _e = _a.surface, surface = _e === void 0 ? "white" : _e, props = __rest$2(_a, ["children", "borderWidth", "elevationLevel", "padding", "isFullHeight", "isBorderRadius", "surface"]);
646
+ return (React__default.createElement("div", __assign$2({ className: classNames("arc-Box", (_b = {},
647
+ _b["arc-Box--fullHeight"] = isFullHeight,
648
+ _b["arc-Box--borderRadius"] = isBorderRadius,
649
+ _b["arc-Box--borderThin"] = borderWidth === "thin",
650
+ _b["arc-Box--borderMedium"] = borderWidth === "medium",
651
+ _b["arc-Box--elevation1"] = elevationLevel === "1",
652
+ _b["arc-Box--elevation2"] = elevationLevel === "2",
653
+ _b)) }, filterDataAttrs(props)),
654
+ React__default.createElement(Surface, { padding: padding, background: surface }, children)));
655
+ };
656
+
657
+ /**
658
+ * Use `BrandLogo` to display the brand logo.
659
+ */
660
+ var BrandLogo = function (_a) {
661
+ var _b;
662
+ var _c = _a.color, color = _c === void 0 ? "auto" : _c, label = _a.label, _d = _a.size, size = _d === void 0 ? 34 : _d, subBrand = _a.subBrand, props = __rest$2(_a, ["color", "label", "size", "subBrand"]);
663
+ var surface = useContext(Context$3).surface;
664
+ return (React__default.createElement("div", __assign$2({ className: classNames((_b = {
665
+ "arc-BrandLogo": true,
666
+ "arc-BrandLogo--colorBrand": color === "brand",
667
+ "arc-BrandLogo--onDarkSurface": surface === "dark"
668
+ },
669
+ _b[suffixModifier("arc-BrandLogo--subBrand", subBrand || "")] = subBrand,
670
+ _b)), style: {
671
+ width: size !== 34 ? size : undefined
672
+ } }, filterDataAttrs(props)), label ? React__default.createElement("span", { className: "arc-BrandLogo-text" }, label) : null));
673
+ };
674
+
317
675
  /**
318
676
  * Checks if `value` is the
319
677
  * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
@@ -853,9 +1211,9 @@ function debounce(func, wait, options) {
853
1211
 
854
1212
  var debounce_1 = debounce;
855
1213
 
856
- const React$b = React__default;
1214
+ const React$f = React__default;
857
1215
  const BtIconChevronLeft2Px = props =>
858
- /*#__PURE__*/ React$b.createElement(
1216
+ /*#__PURE__*/ React$f.createElement(
859
1217
  "svg",
860
1218
  Object.assign(
861
1219
  {
@@ -864,8 +1222,8 @@ const BtIconChevronLeft2Px = props =>
864
1222
  },
865
1223
  props
866
1224
  ),
867
- /*#__PURE__*/ React$b.createElement("defs", null),
868
- /*#__PURE__*/ React$b.createElement("path", {
1225
+ /*#__PURE__*/ React$f.createElement("defs", null),
1226
+ /*#__PURE__*/ React$f.createElement("path", {
869
1227
  d:
870
1228
  "M22.5,29.99854a.99676.99676,0,0,1-.707-.293L8.08594,15.99268,21.793,2.294A1.00023,1.00023,0,0,1,23.207,3.709l-12.293,12.28467L23.207,28.2915a1,1,0,0,1-.707,1.707Z",
871
1229
  fill: "currentColor"
@@ -873,9 +1231,9 @@ const BtIconChevronLeft2Px = props =>
873
1231
  );
874
1232
  var BtIconChevronLeft2Px_2 = BtIconChevronLeft2Px;
875
1233
 
876
- const React$a = React__default;
1234
+ const React$e = React__default;
877
1235
  const BtIconChevronRight2Px = props =>
878
- /*#__PURE__*/ React$a.createElement(
1236
+ /*#__PURE__*/ React$e.createElement(
879
1237
  "svg",
880
1238
  Object.assign(
881
1239
  {
@@ -884,8 +1242,8 @@ const BtIconChevronRight2Px = props =>
884
1242
  },
885
1243
  props
886
1244
  ),
887
- /*#__PURE__*/ React$a.createElement("defs", null),
888
- /*#__PURE__*/ React$a.createElement("path", {
1245
+ /*#__PURE__*/ React$e.createElement("defs", null),
1246
+ /*#__PURE__*/ React$e.createElement("path", {
889
1247
  d:
890
1248
  "M9.5,29.99854A1.00025,1.00025,0,0,1,8.793,28.291l12.293-12.28467L8.793,3.7085A.99989.99989,0,0,1,10.207,2.29443l13.707,13.71289L10.207,29.70605A.99827.99827,0,0,1,9.5,29.99854Z",
891
1249
  fill: "currentColor"
@@ -893,89 +1251,6 @@ const BtIconChevronRight2Px = props =>
893
1251
  );
894
1252
  var BtIconChevronRight2Px_2 = BtIconChevronRight2Px;
895
1253
 
896
- const React$9 = React__default;
897
- const ArcIconArc = props =>
898
- /*#__PURE__*/ React$9.createElement(
899
- "svg",
900
- Object.assign(
901
- {
902
- viewBox: "0 0 16 16",
903
- xmlns: "http://www.w3.org/2000/svg"
904
- },
905
- props
906
- ),
907
- /*#__PURE__*/ React$9.createElement("path", {
908
- fill: "none",
909
- d: "M3.472 11.69a6.5 6.5 0 012.321-6.839A6.5 6.5 0 0113 4.38",
910
- stroke: "currentColor"
911
- })
912
- );
913
- var ArcIconArc_2 = ArcIconArc;
914
-
915
- var defaultContext$3 = { surface: "light" };
916
- var Context$3 = createContext(defaultContext$3);
917
- var Provider$4 = Context$3.Provider;
918
- /**
919
- * Use `Surface` to compose content using the Arc system.
920
- */
921
- var Surface = function (_a) {
922
- var _b;
923
- var background = _a.background, children = _a.children, _c = _a.growVertically, growVertically = _c === void 0 ? false : _c, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, props = __rest$2(_a, ["background", "children", "growVertically", "padding", "paddingHorizontal", "paddingVertical"]);
924
- var surface = "light";
925
- if (background === "black" ||
926
- background === "brand" ||
927
- background === "brand-flat" ||
928
- background === "dark" ||
929
- background === "darker") {
930
- surface = "dark";
931
- }
932
- return (React__default.createElement(Provider$4, { value: { surface: surface } },
933
- React__default.createElement("div", __assign$2({ "data-testid": "arc-surface", className: classNames((_b = {
934
- "arc-Surface": true
935
- },
936
- _b["arc-Surface--".concat(background &&
937
- camelCase$1(background), "Background")] = background,
938
- _b["arc-Surface--growVertically"] = growVertically,
939
- _b["arc-Surface--padding".concat(padding)] = padding,
940
- _b["arc-Surface--paddingHorizontal".concat(paddingHorizontal)] = paddingHorizontal,
941
- _b["arc-Surface--paddingVertical".concat(paddingVertical)] = paddingVertical,
942
- _b)) }, filterDataAttrs(props)), children)));
943
- };
944
- var backgroundsShared = [
945
- "black",
946
- "brand",
947
- "brand-flat",
948
- "dark",
949
- "darker",
950
- "coral",
951
- "turquoise",
952
- "light",
953
- "lighter",
954
- "white"
955
- ];
956
- __spreadArray$1([], backgroundsShared, true);
957
- __spreadArray$1([], backgroundsShared, true);
958
-
959
- /**
960
- * Use `Icon` to display brand iconography.
961
- */
962
- var Icon = function (_a) {
963
- var _b;
964
- var testId = _a.testId, _c = _a.color, color = _c === void 0 ? "auto" : _c, _d = _a.icon, icon = _d === void 0 ? ArcIconArc_2 : _d, _e = _a.isInline, isInline = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = __rest$2(_a, ["testId", "color", "icon", "isInline", "label", "size"]);
965
- var surface = useContext(Context$3).surface;
966
- var Icon = icon;
967
- return (React__default.createElement("span", __assign$2({ "data-testid": testId, "aria-label": label, className: classNames((_b = {},
968
- _b["arc-Icon"] = true,
969
- _b[suffixModifier("arc-Icon--color", color)] = color !== "auto",
970
- _b["arc-Icon--inline"] = isInline,
971
- _b["arc-Icon--onDarkSurface"] = surface === "dark",
972
- _b)), role: label ? "img" : undefined, style: {
973
- height: size,
974
- width: size
975
- } }, filterDataAttrs(props)),
976
- React__default.createElement(Icon, null)));
977
- };
978
-
979
1254
  var BreadcrumbsItem = function (_a) {
980
1255
  var spacerIconAfter = _a.spacerIconAfter, spacerIconBefore = _a.spacerIconBefore, children = _a.children, props = __rest$2(_a, ["spacerIconAfter", "spacerIconBefore", "children"]);
981
1256
  return (React__default.createElement("li", __assign$2({ className: "arc-Breadcrumbs-item" }, filterDataAttrs(props)),
@@ -1079,27 +1354,9 @@ BreadcrumbsLink.displayName = "Breadcrumbs.Link";
1079
1354
  Breadcrumbs.Item = BreadcrumbsItem;
1080
1355
  Breadcrumbs.Link = BreadcrumbsLink;
1081
1356
 
1082
- /**
1083
- * Use `BrandLogo` to display the brand logo.
1084
- */
1085
- var BrandLogo = function (_a) {
1086
- var _b;
1087
- var _c = _a.color, color = _c === void 0 ? "auto" : _c, label = _a.label, _d = _a.size, size = _d === void 0 ? 34 : _d, subBrand = _a.subBrand, props = __rest$2(_a, ["color", "label", "size", "subBrand"]);
1088
- var surface = useContext(Context$3).surface;
1089
- return (React__default.createElement("div", __assign$2({ className: classNames((_b = {
1090
- "arc-BrandLogo": true,
1091
- "arc-BrandLogo--colorBrand": color === "brand",
1092
- "arc-BrandLogo--onDarkSurface": surface === "dark"
1093
- },
1094
- _b[suffixModifier("arc-BrandLogo--subBrand", subBrand || "")] = subBrand,
1095
- _b)), style: {
1096
- width: size !== 34 ? size : undefined
1097
- } }, filterDataAttrs(props)), label ? React__default.createElement("span", { className: "arc-BrandLogo-text" }, label) : null));
1098
- };
1099
-
1100
- const React$8 = React__default;
1357
+ const React$d = React__default;
1101
1358
  const BtIconChevronLeftMid = props =>
1102
- /*#__PURE__*/ React$8.createElement(
1359
+ /*#__PURE__*/ React$d.createElement(
1103
1360
  "svg",
1104
1361
  Object.assign(
1105
1362
  {
@@ -1109,7 +1366,7 @@ const BtIconChevronLeftMid = props =>
1109
1366
  },
1110
1367
  props
1111
1368
  ),
1112
- /*#__PURE__*/ React$8.createElement("path", {
1369
+ /*#__PURE__*/ React$d.createElement("path", {
1113
1370
  fillRule: "evenodd",
1114
1371
  clipRule: "evenodd",
1115
1372
  d:
@@ -1119,9 +1376,9 @@ const BtIconChevronLeftMid = props =>
1119
1376
  );
1120
1377
  var BtIconChevronLeftMid_2 = BtIconChevronLeftMid;
1121
1378
 
1122
- const React$7 = React__default;
1379
+ const React$c = React__default;
1123
1380
  const BtIconChevronRightMid = props =>
1124
- /*#__PURE__*/ React$7.createElement(
1381
+ /*#__PURE__*/ React$c.createElement(
1125
1382
  "svg",
1126
1383
  Object.assign(
1127
1384
  {
@@ -1131,7 +1388,7 @@ const BtIconChevronRightMid = props =>
1131
1388
  },
1132
1389
  props
1133
1390
  ),
1134
- /*#__PURE__*/ React$7.createElement("path", {
1391
+ /*#__PURE__*/ React$c.createElement("path", {
1135
1392
  fillRule: "evenodd",
1136
1393
  clipRule: "evenodd",
1137
1394
  d:
@@ -1214,34 +1471,6 @@ var ImageSource = function (_a) {
1214
1471
  ImageSource.displayName = "Image.Source";
1215
1472
  Image.Source = ImageSource;
1216
1473
 
1217
- /**
1218
- * Use `Heading` to display heading text.
1219
- */
1220
- var Heading = function (_a) {
1221
- var _b;
1222
- var _c = _a.align, align = _c === void 0 ? "left" : _c, _d = _a.casing, casing = _d === void 0 ? "auto" : _d, children = _a.children, _e = _a.color, color = _e === void 0 ? "auto" : _e, level = _a.level, size = _a.size, id = _a.id, props = __rest$2(_a, ["align", "casing", "children", "color", "level", "size", "id"]);
1223
- var surface = useContext(Context$3).surface;
1224
- var Element = "span";
1225
- if (level) {
1226
- Element = "h".concat(level);
1227
- }
1228
- return (React__default.createElement(Element, __assign$2({ id: id, className: classNames((_b = {
1229
- "arc-Heading": true
1230
- },
1231
- _b[suffixModifier("arc-Heading--align", align)] = align && align !== "left",
1232
- _b["arc-Heading--size".concat(size && size.toUpperCase())] = size,
1233
- _b["arc-Heading--casingNone"] = casing === "none",
1234
- _b["arc-Heading--colorBrand"] = color === "brand",
1235
- _b["arc-Heading--onDarkSurface"] = surface === "dark",
1236
- _b)) }, filterDataAttrs(props)), children));
1237
- };
1238
- var HeadingProposition = function (_a) {
1239
- var children = _a.children;
1240
- return React__default.createElement("span", { className: "arc-Heading-proposition" }, children);
1241
- };
1242
- HeadingProposition.displayName = "Heading.Proposition";
1243
- Heading.Proposition = HeadingProposition;
1244
-
1245
1474
  /**
1246
1475
  * Optionally define ariaDescribedBy if errorMessage or helper exist.
1247
1476
  */
@@ -1438,9 +1667,9 @@ var CardLink = function (_a) {
1438
1667
  React__default.createElement(Icon, { testId: "cardIcon", icon: BtIconChevronRightMid_2, size: 24 })))));
1439
1668
  };
1440
1669
 
1441
- const React$6 = React__default;
1670
+ const React$b = React__default;
1442
1671
  const BtIconTickAlt2Px = props =>
1443
- /*#__PURE__*/ React$6.createElement(
1672
+ /*#__PURE__*/ React$b.createElement(
1444
1673
  "svg",
1445
1674
  Object.assign(
1446
1675
  {
@@ -1449,8 +1678,8 @@ const BtIconTickAlt2Px = props =>
1449
1678
  },
1450
1679
  props
1451
1680
  ),
1452
- /*#__PURE__*/ React$6.createElement("defs", null),
1453
- /*#__PURE__*/ React$6.createElement("path", {
1681
+ /*#__PURE__*/ React$b.createElement("defs", null),
1682
+ /*#__PURE__*/ React$b.createElement("path", {
1454
1683
  d:
1455
1684
  "M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
1456
1685
  fill: "currentColor"
@@ -1458,38 +1687,9 @@ const BtIconTickAlt2Px = props =>
1458
1687
  );
1459
1688
  var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
1460
1689
 
1461
- const React$5 = React__default;
1462
- const BtIconAlert = props =>
1463
- /*#__PURE__*/ React$5.createElement(
1464
- "svg",
1465
- Object.assign(
1466
- {
1467
- xmlns: "http://www.w3.org/2000/svg",
1468
- viewBox: "0 0 32 32"
1469
- },
1470
- props
1471
- ),
1472
- /*#__PURE__*/ React$5.createElement("defs", null),
1473
- /*#__PURE__*/ React$5.createElement("path", {
1474
- d:
1475
- "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
1476
- fill: "currentColor"
1477
- }),
1478
- /*#__PURE__*/ React$5.createElement("path", {
1479
- fill: "currentColor",
1480
- d: "M16 20.99335A1 1 0 1 0 16 22.99335 1 1 0 1 0 16 20.99335z"
1481
- }),
1482
- /*#__PURE__*/ React$5.createElement("path", {
1483
- d:
1484
- "M16.00488,19.00977a.49972.49972,0,0,0,.5-.5L16.50684,9.5a.5.5,0,0,0-1,0l-.002,9.00977A.5.5,0,0,0,16.00488,19.00977Z",
1485
- fill: "currentColor"
1486
- })
1487
- );
1488
- var BtIconAlert_2 = BtIconAlert;
1489
-
1490
- const React$4 = React__default;
1690
+ const React$a = React__default;
1491
1691
  const BtIconChevronDown2Px = props =>
1492
- /*#__PURE__*/ React$4.createElement(
1692
+ /*#__PURE__*/ React$a.createElement(
1493
1693
  "svg",
1494
1694
  Object.assign(
1495
1695
  {
@@ -1498,8 +1698,8 @@ const BtIconChevronDown2Px = props =>
1498
1698
  },
1499
1699
  props
1500
1700
  ),
1501
- /*#__PURE__*/ React$4.createElement("defs", null),
1502
- /*#__PURE__*/ React$4.createElement("path", {
1701
+ /*#__PURE__*/ React$a.createElement("defs", null),
1702
+ /*#__PURE__*/ React$a.createElement("path", {
1503
1703
  d:
1504
1704
  "M15.99316,23.91406,2.294,10.207A.99989.99989,0,1,1,3.708,8.793l12.28515,12.293L28.292,8.793A.99989.99989,0,1,1,29.70605,10.207Z",
1505
1705
  fill: "currentColor"
@@ -1507,25 +1707,6 @@ const BtIconChevronDown2Px = props =>
1507
1707
  );
1508
1708
  var BtIconChevronDown2Px_2 = BtIconChevronDown2Px;
1509
1709
 
1510
- /**
1511
- * Use `Text` to display text.
1512
- */
1513
- var Text = function (_a) {
1514
- var _b;
1515
- var _c = _a.align, align = _c === void 0 ? "left" : _c, children = _a.children, id = _a.id, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isMeasured, isMeasured = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "m" : _f, _g = _a.tone, tone = _g === void 0 ? "default" : _g, props = __rest$2(_a, ["align", "children", "id", "isInline", "isMeasured", "size", "tone"]);
1516
- var surface = useContext(Context$3).surface;
1517
- return (React__default.createElement("span", __assign$2({ id: id, className: classNames((_b = {
1518
- "arc-Text": true
1519
- },
1520
- _b[suffixModifier("arc-Text--align", align)] = align !== "left",
1521
- _b["arc-Text--inline"] = isInline,
1522
- _b["arc-Text--measured"] = isMeasured,
1523
- _b["arc-Text--size".concat(size && size.toUpperCase())] = size && size !== "m",
1524
- _b["arc-Text--".concat(tone)] = tone !== "default",
1525
- _b["arc-Text--onDarkSurface"] = surface === "dark",
1526
- _b)) }, filterDataAttrs(props)), children));
1527
- };
1528
-
1529
1710
  /**
1530
1711
  * Use `DisclosureMini` to display content that is only visible when toggled into
1531
1712
  * an "open" state.
@@ -1943,25 +2124,19 @@ var Markup = function (_a) {
1943
2124
  }) }, filterDataAttrs(props)), children));
1944
2125
  };
1945
2126
 
1946
- const React$3 = React__default;
1947
- const BtIconCrossAlt2Px = props =>
1948
- /*#__PURE__*/ React$3.createElement(
1949
- "svg",
1950
- Object.assign(
1951
- {
1952
- xmlns: "http://www.w3.org/2000/svg",
1953
- viewBox: "0 0 32 32"
1954
- },
1955
- props
1956
- ),
1957
- /*#__PURE__*/ React$3.createElement("defs", null),
1958
- /*#__PURE__*/ React$3.createElement("path", {
1959
- d:
1960
- "M17.41406,16l3.793-3.793A.99989.99989,0,0,0,19.793,10.793L16,14.58594l-3.793-3.793A.99989.99989,0,0,0,10.793,12.207L14.58594,16l-3.793,3.793A.99989.99989,0,1,0,12.207,21.207L16,17.41406l3.793,3.793A.99989.99989,0,0,0,21.207,19.793Z",
1961
- fill: "currentColor"
1962
- })
1963
- );
1964
- var BtIconCrossAlt2Px_2 = BtIconCrossAlt2Px;
2127
+ // Update tests for box surface
2128
+ /**
2129
+ * Use `MediaCard` to contain content and an image about a single subject.
2130
+ */
2131
+ var MediaCard = function (_a) {
2132
+ var isBorderRadius = _a.isBorderRadius, isFullHeight = _a.isFullHeight, cardFooter = _a.cardFooter, borderWidth = _a.borderWidth, surface = _a.surface, elevationLevel = _a.elevationLevel, imageSrc = _a.imageSrc, imageAlt = _a.imageAlt, imageLoading = _a.imageLoading, imageSizes = _a.imageSizes, imageSrcSet = _a.imageSrcSet, children = _a.children, props = __rest$2(_a, ["isBorderRadius", "isFullHeight", "cardFooter", "borderWidth", "surface", "elevationLevel", "imageSrc", "imageAlt", "imageLoading", "imageSizes", "imageSrcSet", "children"]);
2133
+ return (React__default.createElement(Box, __assign$2({ isFullHeight: isFullHeight, surface: surface, elevationLevel: elevationLevel, isBorderRadius: isBorderRadius, borderWidth: borderWidth }, filterDataAttrs(props)),
2134
+ React__default.createElement("div", { className: "arc-MediaCard-wrapper" },
2135
+ React__default.createElement("div", { className: "arc-MediaCard-imageContainer" },
2136
+ React__default.createElement(Image, { alt: imageAlt, loading: imageLoading, sizes: imageSizes, src: imageSrc, srcSet: imageSrcSet })),
2137
+ React__default.createElement("div", { className: "arc-MediaCard-section" }, children),
2138
+ cardFooter && (React__default.createElement("div", { className: "arc-MediaCard-section" }, cardFooter)))));
2139
+ };
1965
2140
 
1966
2141
  function _extends() {
1967
2142
  _extends = Object.assign || function (target) {
@@ -2114,14 +2289,14 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(originalEventHandler, ourEv
2114
2289
  * We use this safe version which suppresses the warning by replacing it with a noop on the server.
2115
2290
  *
2116
2291
  * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
2117
- */ const $9f79659886946c16$export$e5c5a5f917a5871c$2 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
2292
+ */ const $9f79659886946c16$export$e5c5a5f917a5871c$3 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
2118
2293
 
2119
- const $1746a345f3d73bb7$var$useReactId$1 = React$c['useId'.toString()] || (()=>undefined
2294
+ const $1746a345f3d73bb7$var$useReactId$1 = React$m['useId'.toString()] || (()=>undefined
2120
2295
  );
2121
2296
  let $1746a345f3d73bb7$var$count$1 = 0;
2122
2297
  function $1746a345f3d73bb7$export$f680877a34711e37$1(deterministicId) {
2123
- const [id, setId] = React$c.useState($1746a345f3d73bb7$var$useReactId$1()); // React versions older than 18 will have client-side ids only.
2124
- $9f79659886946c16$export$e5c5a5f917a5871c$2(()=>{
2298
+ const [id, setId] = React$m.useState($1746a345f3d73bb7$var$useReactId$1()); // React versions older than 18 will have client-side ids only.
2299
+ $9f79659886946c16$export$e5c5a5f917a5871c$3(()=>{
2125
2300
  if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count$1++)
2126
2301
  );
2127
2302
  }, [
@@ -33051,10 +33226,10 @@ var $7SXl2$reactdom = reactDom.exports;
33051
33226
 
33052
33227
  /* -------------------------------------------------------------------------------------------------
33053
33228
  * Slot
33054
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$2 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
33229
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$3 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
33055
33230
  const { children: children , ...slotProps } = props;
33056
33231
  const childrenArray = Children.toArray(children);
33057
- const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$2);
33232
+ const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$3);
33058
33233
  if (slottable) {
33059
33234
  // the new element to render is the one passed as a child of `Slottable`
33060
33235
  const newElement = slottable.props.children;
@@ -33066,35 +33241,35 @@ var $7SXl2$reactdom = reactDom.exports;
33066
33241
  return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
33067
33242
  } else return child;
33068
33243
  });
33069
- return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$2, _extends({}, slotProps, {
33244
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$3, _extends({}, slotProps, {
33070
33245
  ref: forwardedRef
33071
33246
  }), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
33072
33247
  }
33073
- return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$2, _extends({}, slotProps, {
33248
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$3, _extends({}, slotProps, {
33074
33249
  ref: forwardedRef
33075
33250
  }), children);
33076
33251
  });
33077
- $5e63c961fc1ce211$export$8c6ed5c666ac1360$2.displayName = 'Slot';
33252
+ $5e63c961fc1ce211$export$8c6ed5c666ac1360$3.displayName = 'Slot';
33078
33253
  /* -------------------------------------------------------------------------------------------------
33079
33254
  * SlotClone
33080
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$2 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
33255
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$3 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
33081
33256
  const { children: children , ...slotProps } = props;
33082
33257
  if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
33083
- ...$5e63c961fc1ce211$var$mergeProps$2(slotProps, children.props),
33258
+ ...$5e63c961fc1ce211$var$mergeProps$3(slotProps, children.props),
33084
33259
  ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af$4(forwardedRef, children.ref) : children.ref
33085
33260
  });
33086
33261
  return Children.count(children) > 1 ? Children.only(null) : null;
33087
33262
  });
33088
- $5e63c961fc1ce211$var$SlotClone$2.displayName = 'SlotClone';
33263
+ $5e63c961fc1ce211$var$SlotClone$3.displayName = 'SlotClone';
33089
33264
  /* -------------------------------------------------------------------------------------------------
33090
33265
  * Slottable
33091
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$2 = ({ children: children })=>{
33266
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$3 = ({ children: children })=>{
33092
33267
  return /*#__PURE__*/ createElement(Fragment, null, children);
33093
33268
  };
33094
- /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$2(child) {
33095
- return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$2;
33269
+ /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$3(child) {
33270
+ return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$3;
33096
33271
  }
33097
- function $5e63c961fc1ce211$var$mergeProps$2(slotProps, childProps) {
33272
+ function $5e63c961fc1ce211$var$mergeProps$3(slotProps, childProps) {
33098
33273
  // all child props should override
33099
33274
  const overrideProps = {
33100
33275
  ...childProps
@@ -33150,7 +33325,7 @@ const $8927f6f2acc4f386$var$NODES$4 = [
33150
33325
  * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$4 = $8927f6f2acc4f386$var$NODES$4.reduce((primitive, node)=>{
33151
33326
  const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
33152
33327
  const { asChild: asChild , ...primitiveProps } = props;
33153
- const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$2 : node;
33328
+ const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$3 : node;
33154
33329
  useEffect(()=>{
33155
33330
  window[Symbol.for('radix-ui')] = true;
33156
33331
  }, []);
@@ -33334,6 +33509,25 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22$1 = /*#__PURE__*/ forwardRef((pr
33334
33509
  onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
33335
33510
  }));
33336
33511
  });
33512
+ const $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
33513
+ const context = useContext($5cb92bef7577960e$var$DismissableLayerContext$1);
33514
+ const ref = useRef(null);
33515
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$3(forwardedRef, ref);
33516
+ useEffect(()=>{
33517
+ const node = ref.current;
33518
+ if (node) {
33519
+ context.branches.add(node);
33520
+ return ()=>{
33521
+ context.branches.delete(node);
33522
+ };
33523
+ }
33524
+ }, [
33525
+ context.branches
33526
+ ]);
33527
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({}, props, {
33528
+ ref: composedRefs
33529
+ }));
33530
+ });
33337
33531
  /* -----------------------------------------------------------------------------------------------*/ /**
33338
33532
  * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
33339
33533
  * to mimic layer dismissing behaviour present in OS.
@@ -33450,6 +33644,8 @@ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent$1(name, handler, det
33450
33644
  if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f$1(target, event);
33451
33645
  else target.dispatchEvent(event);
33452
33646
  }
33647
+ const $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22$1;
33648
+ const $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;
33453
33649
 
33454
33650
  const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT$1 = 'focusScope.autoFocusOnMount';
33455
33651
  const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT$1 = 'focusScope.autoFocusOnUnmount';
@@ -33737,7 +33933,7 @@ const $f1701beae083dbae$export$602eac185826482c$1 = /*#__PURE__*/ forwardRef((pr
33737
33933
  * We use this safe version which suppresses the warning by replacing it with a noop on the server.
33738
33934
  *
33739
33935
  * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
33740
- */ const $9f79659886946c16$export$e5c5a5f917a5871c$1 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
33936
+ */ const $9f79659886946c16$export$e5c5a5f917a5871c$2 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
33741
33937
 
33742
33938
  function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
33743
33939
  return useReducer((state, event)=>{
@@ -33787,7 +33983,7 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
33787
33983
  }, [
33788
33984
  state
33789
33985
  ]);
33790
- $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
33986
+ $9f79659886946c16$export$e5c5a5f917a5871c$2(()=>{
33791
33987
  const styles = stylesRef.current;
33792
33988
  const wasPresent = prevPresentRef.current;
33793
33989
  const hasPresentChanged = wasPresent !== present;
@@ -33814,7 +34010,7 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
33814
34010
  present,
33815
34011
  send
33816
34012
  ]);
33817
- $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
34013
+ $9f79659886946c16$export$e5c5a5f917a5871c$2(()=>{
33818
34014
  if (node1) {
33819
34015
  /**
33820
34016
  * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
@@ -34147,7 +34343,7 @@ var SideCar$1 = function (_a) {
34147
34343
  if (!Target) {
34148
34344
  throw new Error('Sidecar medium not found');
34149
34345
  }
34150
- return React$c.createElement(Target, __assign({}, rest));
34346
+ return React$m.createElement(Target, __assign({}, rest));
34151
34347
  };
34152
34348
  SideCar$1.isSideCarExport = true;
34153
34349
  function exportSidecar(medium, exported) {
@@ -34163,9 +34359,9 @@ var nothing = function () {
34163
34359
  /**
34164
34360
  * Removes scrollbar from the page and contain the scroll within the Lock
34165
34361
  */
34166
- var RemoveScroll = React$c.forwardRef(function (props, parentRef) {
34167
- var ref = React$c.useRef(null);
34168
- var _a = React$c.useState({
34362
+ var RemoveScroll = React$m.forwardRef(function (props, parentRef) {
34363
+ var ref = React$m.useRef(null);
34364
+ var _a = React$m.useState({
34169
34365
  onScrollCapture: nothing,
34170
34366
  onWheelCapture: nothing,
34171
34367
  onTouchMoveCapture: nothing,
@@ -34174,9 +34370,9 @@ var RemoveScroll = React$c.forwardRef(function (props, parentRef) {
34174
34370
  var SideCar = sideCar;
34175
34371
  var containerRef = useMergeRefs([ref, parentRef]);
34176
34372
  var containerProps = __assign$1(__assign$1({}, rest), callbacks);
34177
- return (React$c.createElement(React$c.Fragment, null,
34178
- enabled && (React$c.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
34179
- forwardProps ? (React$c.cloneElement(React$c.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef }))) : (React$c.createElement(Container, __assign$1({}, containerProps, { className: className, ref: containerRef }), children))));
34373
+ return (React$m.createElement(React$m.Fragment, null,
34374
+ enabled && (React$m.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
34375
+ forwardProps ? (React$m.cloneElement(React$m.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef }))) : (React$m.createElement(Container, __assign$1({}, containerProps, { className: className, ref: containerRef }), children))));
34180
34376
  });
34181
34377
  RemoveScroll.defaultProps = {
34182
34378
  enabled: true,
@@ -34255,7 +34451,7 @@ var stylesheetSingleton = function () {
34255
34451
  var styleHookSingleton = function () {
34256
34452
  var sheet = stylesheetSingleton();
34257
34453
  return function (styles, isDynamic) {
34258
- React$c.useEffect(function () {
34454
+ React$m.useEffect(function () {
34259
34455
  sheet.add(styles);
34260
34456
  return function () {
34261
34457
  sheet.remove();
@@ -34336,8 +34532,8 @@ var RemoveScrollBar = function (props) {
34336
34532
  however it will be used only by the "first" invocation
34337
34533
  due to singleton nature of <Style
34338
34534
  */
34339
- var gap = React$c.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
34340
- return React$c.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
34535
+ var gap = React$m.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
34536
+ return React$m.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
34341
34537
  };
34342
34538
 
34343
34539
  var passiveSupported = false;
@@ -34469,16 +34665,16 @@ var generateStyle = function (id) { return "\n .block-interactivity-".concat(id
34469
34665
  var idCounter = 0;
34470
34666
  var lockStack = [];
34471
34667
  function RemoveScrollSideCar(props) {
34472
- var shouldPreventQueue = React$c.useRef([]);
34473
- var touchStartRef = React$c.useRef([0, 0]);
34474
- var activeAxis = React$c.useRef();
34475
- var id = React$c.useState(idCounter++)[0];
34476
- var Style = React$c.useState(function () { return styleSingleton(); })[0];
34477
- var lastProps = React$c.useRef(props);
34478
- React$c.useEffect(function () {
34668
+ var shouldPreventQueue = React$m.useRef([]);
34669
+ var touchStartRef = React$m.useRef([0, 0]);
34670
+ var activeAxis = React$m.useRef();
34671
+ var id = React$m.useState(idCounter++)[0];
34672
+ var Style = React$m.useState(function () { return styleSingleton(); })[0];
34673
+ var lastProps = React$m.useRef(props);
34674
+ React$m.useEffect(function () {
34479
34675
  lastProps.current = props;
34480
34676
  }, [props]);
34481
- React$c.useEffect(function () {
34677
+ React$m.useEffect(function () {
34482
34678
  if (props.inert) {
34483
34679
  document.body.classList.add("block-interactivity-".concat(id));
34484
34680
  var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
@@ -34490,7 +34686,7 @@ function RemoveScrollSideCar(props) {
34490
34686
  }
34491
34687
  return;
34492
34688
  }, [props.inert, props.lockRef.current, props.shards]);
34493
- var shouldCancelEvent = React$c.useCallback(function (event, parent) {
34689
+ var shouldCancelEvent = React$m.useCallback(function (event, parent) {
34494
34690
  if ('touches' in event && event.touches.length === 2) {
34495
34691
  return !lastProps.current.allowPinchZoom;
34496
34692
  }
@@ -34529,7 +34725,7 @@ function RemoveScrollSideCar(props) {
34529
34725
  var cancelingAxis = activeAxis.current || currentAxis;
34530
34726
  return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
34531
34727
  }, []);
34532
- var shouldPrevent = React$c.useCallback(function (_event) {
34728
+ var shouldPrevent = React$m.useCallback(function (_event) {
34533
34729
  var event = _event;
34534
34730
  if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
34535
34731
  // not the last active
@@ -34558,24 +34754,24 @@ function RemoveScrollSideCar(props) {
34558
34754
  }
34559
34755
  }
34560
34756
  }, []);
34561
- var shouldCancel = React$c.useCallback(function (name, delta, target, should) {
34757
+ var shouldCancel = React$m.useCallback(function (name, delta, target, should) {
34562
34758
  var event = { name: name, delta: delta, target: target, should: should };
34563
34759
  shouldPreventQueue.current.push(event);
34564
34760
  setTimeout(function () {
34565
34761
  shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
34566
34762
  }, 1);
34567
34763
  }, []);
34568
- var scrollTouchStart = React$c.useCallback(function (event) {
34764
+ var scrollTouchStart = React$m.useCallback(function (event) {
34569
34765
  touchStartRef.current = getTouchXY(event);
34570
34766
  activeAxis.current = undefined;
34571
34767
  }, []);
34572
- var scrollWheel = React$c.useCallback(function (event) {
34768
+ var scrollWheel = React$m.useCallback(function (event) {
34573
34769
  shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
34574
34770
  }, []);
34575
- var scrollTouchMove = React$c.useCallback(function (event) {
34771
+ var scrollTouchMove = React$m.useCallback(function (event) {
34576
34772
  shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
34577
34773
  }, []);
34578
- React$c.useEffect(function () {
34774
+ React$m.useEffect(function () {
34579
34775
  lockStack.push(Style);
34580
34776
  props.setCallbacks({
34581
34777
  onScrollCapture: scrollWheel,
@@ -34593,14 +34789,14 @@ function RemoveScrollSideCar(props) {
34593
34789
  };
34594
34790
  }, []);
34595
34791
  var removeScrollBar = props.removeScrollBar, inert = props.inert;
34596
- return (React$c.createElement(React$c.Fragment, null,
34597
- inert ? React$c.createElement(Style, { styles: generateStyle(id) }) : null,
34598
- removeScrollBar ? React$c.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
34792
+ return (React$m.createElement(React$m.Fragment, null,
34793
+ inert ? React$m.createElement(Style, { styles: generateStyle(id) }) : null,
34794
+ removeScrollBar ? React$m.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
34599
34795
  }
34600
34796
 
34601
34797
  var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
34602
34798
 
34603
- var ReactRemoveScroll = React$c.forwardRef(function (props, ref) { return (React$c.createElement(RemoveScroll, __assign$1({}, props, { ref: ref, sideCar: SideCar }))); });
34799
+ var ReactRemoveScroll = React$m.forwardRef(function (props, ref) { return (React$m.createElement(RemoveScroll, __assign$1({}, props, { ref: ref, sideCar: SideCar }))); });
34604
34800
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
34605
34801
  var $01b9c$RemoveScroll = ReactRemoveScroll;
34606
34802
 
@@ -34734,10 +34930,10 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
34734
34930
 
34735
34931
  /* -------------------------------------------------------------------------------------------------
34736
34932
  * Slot
34737
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
34933
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$2 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
34738
34934
  const { children: children , ...slotProps } = props;
34739
34935
  const childrenArray = Children.toArray(children);
34740
- const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$1);
34936
+ const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$2);
34741
34937
  if (slottable) {
34742
34938
  // the new element to render is the one passed as a child of `Slottable`
34743
34939
  const newElement = slottable.props.children;
@@ -34749,35 +34945,35 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
34749
34945
  return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
34750
34946
  } else return child;
34751
34947
  });
34752
- return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$1, _extends({}, slotProps, {
34948
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$2, _extends({}, slotProps, {
34753
34949
  ref: forwardedRef
34754
34950
  }), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
34755
34951
  }
34756
- return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$1, _extends({}, slotProps, {
34952
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$2, _extends({}, slotProps, {
34757
34953
  ref: forwardedRef
34758
34954
  }), children);
34759
34955
  });
34760
- $5e63c961fc1ce211$export$8c6ed5c666ac1360$1.displayName = 'Slot';
34956
+ $5e63c961fc1ce211$export$8c6ed5c666ac1360$2.displayName = 'Slot';
34761
34957
  /* -------------------------------------------------------------------------------------------------
34762
34958
  * SlotClone
34763
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$1 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
34959
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$2 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
34764
34960
  const { children: children , ...slotProps } = props;
34765
34961
  if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
34766
- ...$5e63c961fc1ce211$var$mergeProps$1(slotProps, children.props),
34962
+ ...$5e63c961fc1ce211$var$mergeProps$2(slotProps, children.props),
34767
34963
  ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af$4(forwardedRef, children.ref) : children.ref
34768
34964
  });
34769
34965
  return Children.count(children) > 1 ? Children.only(null) : null;
34770
34966
  });
34771
- $5e63c961fc1ce211$var$SlotClone$1.displayName = 'SlotClone';
34967
+ $5e63c961fc1ce211$var$SlotClone$2.displayName = 'SlotClone';
34772
34968
  /* -------------------------------------------------------------------------------------------------
34773
34969
  * Slottable
34774
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1 = ({ children: children })=>{
34970
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$2 = ({ children: children })=>{
34775
34971
  return /*#__PURE__*/ createElement(Fragment, null, children);
34776
34972
  };
34777
- /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$1(child) {
34778
- return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1;
34973
+ /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$2(child) {
34974
+ return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$2;
34779
34975
  }
34780
- function $5e63c961fc1ce211$var$mergeProps$1(slotProps, childProps) {
34976
+ function $5e63c961fc1ce211$var$mergeProps$2(slotProps, childProps) {
34781
34977
  // all child props should override
34782
34978
  const overrideProps = {
34783
34979
  ...childProps
@@ -34878,7 +35074,7 @@ const $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ forwardRef((props,
34878
35074
  return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
34879
35075
  // ie. when `Overlay` and `Content` are siblings
34880
35076
  createElement($01b9c$RemoveScroll, {
34881
- as: $5e63c961fc1ce211$export$8c6ed5c666ac1360$1,
35077
+ as: $5e63c961fc1ce211$export$8c6ed5c666ac1360$2,
34882
35078
  allowPinchZoom: true,
34883
35079
  shards: [
34884
35080
  context.contentRef
@@ -35099,29 +35295,103 @@ var Modal = function (_a) {
35099
35295
  React__default.createElement(Icon, { size: 32, icon: BtIconCrossAlt2Px_2 })))))))));
35100
35296
  };
35101
35297
 
35298
+ var usePagination = function (pageCount, selectedPage) {
35299
+ var formatValues = function (range) {
35300
+ return range.map(function (value) { return value.toString(); });
35301
+ };
35302
+ return useMemo(function () {
35303
+ if (pageCount > 7 && selectedPage < 5) {
35304
+ // show 1 - 5 the right dots are visible.
35305
+ return formatValues(__spreadArray$1(__spreadArray$1([], Array.from({ length: 5 }, function (_value, index) { return index + 1; }), true), [
35306
+ "...",
35307
+ pageCount
35308
+ ], false));
35309
+ }
35310
+ if (pageCount > 7 && selectedPage >= pageCount - 3) {
35311
+ // show numbers to the end but the left dots are visible
35312
+ return formatValues(__spreadArray$1([
35313
+ 1,
35314
+ "..."
35315
+ ], Array.from({ length: 5 }, function (_value, index) { return pageCount - index; }).reverse(), true));
35316
+ }
35317
+ if (pageCount > 7 && selectedPage >= 5 && selectedPage < pageCount - 3) {
35318
+ // show selected page with one number either side and both the left and the right dots are visible.
35319
+ return formatValues([
35320
+ 1,
35321
+ "...",
35322
+ selectedPage - 1,
35323
+ selectedPage,
35324
+ selectedPage + 1,
35325
+ "...",
35326
+ pageCount
35327
+ ]);
35328
+ }
35329
+ // show all pages from pageCount
35330
+ return formatValues(Array.from({ length: pageCount }, function (_value, index) { return index + 1; }));
35331
+ }, [pageCount, selectedPage]);
35332
+ };
35333
+
35102
35334
  /**
35103
- * Use `UniversalHeader` to display a group-level page header.
35335
+ * Use `Pagination` to navigate multiple pages.
35104
35336
  */
35105
- var UniversalHeader = function (_a) {
35106
- var children = _a.children, props = __rest$2(_a, ["children"]);
35107
- useEffect(function () {
35108
- React__default.Children.map(children, function (item) {
35109
- if (item && item.type !== UniversalHeaderItem) {
35110
- throw new Error("Illegal child passed to <UniversalHeader />. Ensure to only use <UniversalHeader.Item />.");
35111
- }
35112
- });
35113
- }, [children]);
35114
- return (React__default.createElement("nav", __assign$2({ className: "arc-UniversalHeader" }, filterDataAttrs(props)),
35115
- React__default.createElement(Surface, { background: "light" },
35116
- React__default.createElement("ul", { className: "arc-UniversalHeader-items" }, children))));
35337
+ var Pagination = function (_a) {
35338
+ var pageCount = _a.pageCount, onPageChange = _a.onPageChange, _b = _a.defaultSelectedPage, defaultSelectedPage = _b === void 0 ? 1 : _b, props = __rest$2(_a, ["pageCount", "onPageChange", "defaultSelectedPage"]);
35339
+ var surface = useContext(Context$3).surface;
35340
+ var _c = useState(defaultSelectedPage), selectedPage = _c[0], setSelectedPage = _c[1];
35341
+ var pageRange = usePagination(pageCount, selectedPage);
35342
+ var handlePagechange = function (pageToSelect) { return function () {
35343
+ setSelectedPage(pageToSelect);
35344
+ onPageChange(pageToSelect);
35345
+ }; };
35346
+ var isPageNumber = function (rangeValue) { return !isNaN(parseInt(rangeValue)); };
35347
+ return (React__default.createElement("nav", __assign$2({ "aria-label": "pagination navigation", className: classNames("arc-Pagination", {
35348
+ "arc-Pagination--onDarkSurface": surface === "dark"
35349
+ }) }, filterDataAttrs(props)),
35350
+ React__default.createElement("button", { "aria-label": "Go to previous page", className: classNames("arc-Pagination-navigationButton", {
35351
+ "arc-Pagination-navigationButton--hidden": selectedPage === 1
35352
+ }), onClick: handlePagechange(selectedPage - 1) },
35353
+ React__default.createElement("div", { className: "arc-Pagination-navigationButtonIcon arc-Pagination-navigationButtonIcon--left" },
35354
+ React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronLeftMid_2 }))),
35355
+ React__default.createElement("div", { className: "arc-Pagination-pageNumberContainer" }, pageRange.map(function (rangeValue, i) {
35356
+ return isPageNumber(rangeValue) ? (React__default.createElement("button", { "aria-current": parseInt(rangeValue) === selectedPage, key: "pagination-range-value-".concat(rangeValue), "aria-label": "Go to page ".concat(rangeValue), className: classNames("arc-Pagination-value arc-Pagination-value--number", {
35357
+ "arc-Pagination-value--selected": parseInt(rangeValue) === selectedPage
35358
+ }), onClick: handlePagechange(parseInt(rangeValue)) }, rangeValue)) : (React__default.createElement("span", { key: "pagination-range-value-dot".concat(i), className: classNames("arc-Pagination-value arc-Pagination-value--dots") }, rangeValue));
35359
+ })),
35360
+ React__default.createElement("button", { "aria-label": "Go to next page", className: classNames("arc-Pagination-navigationButton", {
35361
+ "arc-Pagination-navigationButton--hidden": selectedPage === pageCount
35362
+ }), onClick: handlePagechange(selectedPage + 1) },
35363
+ React__default.createElement("div", { className: "arc-Pagination-navigationButtonIcon arc-Pagination-navigationButtonIcon--right" },
35364
+ React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronRightMid_2 })))));
35117
35365
  };
35118
- var UniversalHeaderItem = function (_a) {
35119
- var children = _a.children, href = _a.href, props = __rest$2(_a, ["children", "href"]);
35120
- return (React__default.createElement("li", __assign$2({}, filterDataAttrs(props)),
35121
- React__default.createElement("a", { className: "arc-UniversalHeader-link", href: href }, children)));
35366
+
35367
+ /**
35368
+ * Use `PaginationSimple` to navigate multiple pages.
35369
+ */
35370
+ var PaginationSimple = function (_a) {
35371
+ var hidePrev = _a.hidePrev, hideNext = _a.hideNext, onPrevPage = _a.onPrevPage, onNextPage = _a.onNextPage, isFluid = _a.isFluid, props = __rest$2(_a, ["hidePrev", "hideNext", "onPrevPage", "onNextPage", "isFluid"]);
35372
+ var surface = useContext(Context$3).surface;
35373
+ return (React__default.createElement("nav", __assign$2({ className: classNames("arc-PaginationSimple", {
35374
+ "arc-PaginationSimple--onDarkSurface": surface === "dark",
35375
+ "arc-PaginationSimple--fluid": isFluid,
35376
+ "arc-PaginationSimple--centered": !isFluid
35377
+ }) }, filterDataAttrs(props)),
35378
+ React__default.createElement("button", { className: classNames("arc-PaginationSimple-navigationButton", {
35379
+ "arc-PaginationSimple-navigationButton--hidden": hidePrev
35380
+ }), onClick: function () {
35381
+ onPrevPage();
35382
+ } },
35383
+ React__default.createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--left" },
35384
+ React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronLeftMid_2 })),
35385
+ React__default.createElement("span", { className: "arc-PaginationSimple-prevText" }, "Prev")),
35386
+ React__default.createElement("button", { className: classNames("arc-PaginationSimple-navigationButton", {
35387
+ "arc-PaginationSimple-navigationButton--hidden": hideNext
35388
+ }), onClick: function () {
35389
+ onNextPage();
35390
+ } },
35391
+ React__default.createElement("span", { className: "arc-PaginationSimple-nextText" }, "Next"),
35392
+ React__default.createElement("div", { className: "arc-PaginationSimple-iconContainer arc-PaginationSimple-iconContainer--right" },
35393
+ React__default.createElement(Icon, { color: "brand", size: 32, icon: BtIconChevronRightMid_2 })))));
35122
35394
  };
35123
- UniversalHeaderItem.displayName = "UniversalHeader.Item";
35124
- UniversalHeader.Item = UniversalHeaderItem;
35125
35395
 
35126
35396
  var PosterImage = function (_a) {
35127
35397
  var alt = _a.alt, _b = _a.anchor, anchor = _b === void 0 ? "C" : _b, loading = _a.loading, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet, props = __rest$2(_a, ["alt", "anchor", "loading", "sizes", "src", "srcSet"]);
@@ -35159,6 +35429,220 @@ Poster.Image = PosterImage;
35159
35429
  PosterVideo.displayName = "Poster.Video";
35160
35430
  Poster.Video = PosterVideo;
35161
35431
 
35432
+ const React$9 = React__default;
35433
+ const BtIconRefresh = props =>
35434
+ /*#__PURE__*/ React$9.createElement(
35435
+ "svg",
35436
+ Object.assign(
35437
+ {
35438
+ xmlns: "http://www.w3.org/2000/svg",
35439
+ viewBox: "0 0 32 32"
35440
+ },
35441
+ props
35442
+ ),
35443
+ /*#__PURE__*/ React$9.createElement("defs", null),
35444
+ /*#__PURE__*/ React$9.createElement("path", {
35445
+ d:
35446
+ "M13.41077,21.99951a.5005.5005,0,0,0-.35743.8501l2.04609,2.08716A8.98732,8.98732,0,0,1,13.15332,7.46631a.50028.50028,0,1,0-.31641-.94922A9.98437,9.98437,0,0,0,15.127,25.93823l.00159.02881c.0011.01.02008.00128.03015.002L13.026,28.16846a.50036.50036,0,0,0,.71875.69629l3.28418-3.38819-3.26074-3.32715A.50106.50106,0,0,0,13.41077,21.99951Z",
35447
+ fill: "currentColor"
35448
+ }),
35449
+ /*#__PURE__*/ React$9.createElement("path", {
35450
+ d:
35451
+ "M16.79028,6.04633,16.79,6.04077c-.0011-.01-.02008-.00128-.03015-.00195l2.13275-2.19946a.50036.50036,0,0,0-.71875-.69629L14.88965,6.53125,18.15039,9.8584a.50106.50106,0,0,0,.35742.1499.5005.5005,0,0,0,.35742-.8501L16.7951,7.04657a8.98484,8.98484,0,0,1,2.05646,17.47589.49982.49982,0,1,0,.31641.94824A9.98244,9.98244,0,0,0,16.79028,6.04633Z",
35452
+ fill: "currentColor"
35453
+ })
35454
+ );
35455
+ var BtIconRefresh_2 = BtIconRefresh;
35456
+
35457
+ var PROGRESS_BAR_ICON_MAP = {
35458
+ refresh: BtIconRefresh_2,
35459
+ tick: BtIconTickAlt2Px_2,
35460
+ cross: BtIconCrossAlt2Px_2
35461
+ };
35462
+
35463
+ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
35464
+ var commonProps = {
35465
+ role: "progressbar",
35466
+ "data-testid": "progressbar",
35467
+ "aria-label": ariaLabel,
35468
+ tabIndex: 0
35469
+ };
35470
+ var indeterminateProps = __assign$2(__assign$2({}, commonProps), { className: classNames("arc-ProgressBar-bar", "arc-ProgressBar-bar--indeterminate") });
35471
+ var determinateProps = __assign$2(__assign$2({}, commonProps), { className: "arc-ProgressBar-bar", "aria-valuenow": progressValue, style: {
35472
+ transform: "translateX(".concat(-100 + progressValue, "%)")
35473
+ } });
35474
+ return isIndeterminate ? indeterminateProps : determinateProps;
35475
+ };
35476
+
35477
+ var ProgressBar = function (_a) {
35478
+ var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue, props = __rest$2(_a, ["state", "value", "isIndeterminate", "headline", "ariaLabel", "action", "title", "description", "displayValue"]);
35479
+ var surface = useContext(Context$3).surface;
35480
+ var progressValue = Math.min(100, Math.max(0, value));
35481
+ return (React__default.createElement("div", __assign$2({ "data-testid": "progress", className: classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state), {
35482
+ "arc-ProgressBar--onDarkSurface": surface === "dark"
35483
+ }) }, filterDataAttrs(props)),
35484
+ React__default.createElement("div", { className: "arc-ProgressBar-titleDisplayValueContainer" },
35485
+ React__default.createElement("div", { className: "arc-ProgressBar-titleContainer" },
35486
+ headline && React__default.createElement(Heading, { size: "s" }, headline),
35487
+ headline && title && React__default.createElement(VerticalSpace, { size: "4" }),
35488
+ title && React__default.createElement(Text, null, title)),
35489
+ displayValue && (React__default.createElement("div", { "data-testid": "display-value", className: "arc-ProgressBar-displayValueContainer" },
35490
+ React__default.createElement(Text, null, displayValue)))),
35491
+ React__default.createElement("div", { className: "arc-ProgressBar-container" },
35492
+ React__default.createElement("div", { className: "arc-ProgressBar-outerBar" },
35493
+ React__default.createElement("div", __assign$2({}, getProgressBarProps(isIndeterminate, progressValue, ariaLabel)))),
35494
+ description && (React__default.createElement("div", { className: "arc-ProgressBar-description" },
35495
+ React__default.createElement(Text, { tone: state !== "error" ? "supporting" : "default" }, description))),
35496
+ action && (React__default.createElement(React__default.Fragment, null,
35497
+ React__default.createElement(VerticalSpace, { size: "8" }),
35498
+ React__default.createElement("button", { className: "arc-ProgressBar-actionButton", onClick: action.action },
35499
+ React__default.createElement("div", { className: "arc-ProgressBar-actionContainer" },
35500
+ React__default.createElement(Text, null, action.text),
35501
+ action.icon && (React__default.createElement("div", { className: "arc-ProgressBar-actionIcon" },
35502
+ React__default.createElement(Icon, { icon: PROGRESS_BAR_ICON_MAP[action.icon], size: 24 }))))))))));
35503
+ };
35504
+
35505
+ const React$8 = React__default;
35506
+ const BtIconTickVariant = props =>
35507
+ /*#__PURE__*/ React$8.createElement(
35508
+ "svg",
35509
+ Object.assign(
35510
+ {
35511
+ xmlns: "http://www.w3.org/2000/svg",
35512
+ viewBox: "0 0 32 32"
35513
+ },
35514
+ props
35515
+ ),
35516
+ /*#__PURE__*/ React$8.createElement("defs", null),
35517
+ /*#__PURE__*/ React$8.createElement("path", {
35518
+ d:
35519
+ "M13.5,21.207,9.14648,16.85352a.5.5,0,0,1,.707-.707L13.5,19.793l8.64648-8.64649a.5.5,0,0,1,.707.707Z",
35520
+ fill: "currentColor"
35521
+ })
35522
+ );
35523
+ var BtIconTickVariant_2 = BtIconTickVariant;
35524
+
35525
+ const React$7 = React__default;
35526
+ const BtIconCrossAlt = props =>
35527
+ /*#__PURE__*/ React$7.createElement(
35528
+ "svg",
35529
+ Object.assign(
35530
+ {
35531
+ xmlns: "http://www.w3.org/2000/svg",
35532
+ viewBox: "0 0 32 32"
35533
+ },
35534
+ props
35535
+ ),
35536
+ /*#__PURE__*/ React$7.createElement("defs", null),
35537
+ /*#__PURE__*/ React$7.createElement("path", {
35538
+ d:
35539
+ "M16.70709,16.02l4.48236-4.49365a.4996.4996,0,1,0-.707-.70606l-4.481,4.49225-4.481-4.49225a.4996.4996,0,1,0-.707.70606L15.29584,16.02l-4.48236,4.49365a.4996.4996,0,1,0,.707.70606l4.481-4.49225,4.481,4.49225a.4996.4996,0,1,0,.707-.70606Z",
35540
+ fill: "currentColor"
35541
+ })
35542
+ );
35543
+ var BtIconCrossAlt_2 = BtIconCrossAlt;
35544
+
35545
+ const React$6 = React__default;
35546
+ const BtIconCircle = props =>
35547
+ /*#__PURE__*/ React$6.createElement(
35548
+ "svg",
35549
+ Object.assign(
35550
+ {
35551
+ viewBox: "0 0 32 32",
35552
+ fill: "none",
35553
+ xmlns: "http://www.w3.org/2000/svg"
35554
+ },
35555
+ props
35556
+ ),
35557
+ /*#__PURE__*/ React$6.createElement("path", {
35558
+ fillRule: "evenodd",
35559
+ clipRule: "evenodd",
35560
+ d:
35561
+ "M9 16C9 19.87 12.13 23 16 23C19.87 23 23 19.87 23 16C23 12.13 19.87 9 16 9C12.13 9 9 12.13 9 16ZM16 7C11.03 7 7 11.03 7 16C7 20.97 11.03 25 16 25C20.97 25 25 20.97 25 16C25 11.03 20.97 7 16 7Z",
35562
+ fill: "currentColor"
35563
+ })
35564
+ );
35565
+ var BtIconCircle_2 = BtIconCircle;
35566
+
35567
+ /**
35568
+ * Provides text for screen readers that is visually hidden.
35569
+ */
35570
+ var VisuallyHidden = function (_a) {
35571
+ var children = _a.children;
35572
+ return (React__default.createElement("span", { "data-testid": "visually-hidden", className: "arc-VisuallyHidden" }, children));
35573
+ };
35574
+
35575
+ var ProgressStepperItem = function (_a) {
35576
+ var _b, _c;
35577
+ var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle, _d = _a.direction, direction = _d === void 0 ? "horizontal" : _d, _e = _a.status, status = _e === void 0 ? "todo" : _e, _f = _a.size, size = _f === void 0 ? "large" : _f, _g = _a.position, position = _g === void 0 ? "middle" : _g, isFluid = _a.isFluid, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, isExpandable = _a.isExpandable, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, props = __rest$2(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "position", "isFluid", "ariaLabel", "onClick", "previousStep", "isExpandable", "stepContent", "isStepContentHidden"]);
35578
+ var surface = useContext(Context$3).surface;
35579
+ var statusIcons = {
35580
+ completed: BtIconTickVariant_2,
35581
+ current: BtIconCircle_2,
35582
+ warning: BtIconAlert_2,
35583
+ error: BtIconCrossAlt_2
35584
+ };
35585
+ var onClickHandler = function (event) {
35586
+ event.preventDefault();
35587
+ onClick && onClick();
35588
+ };
35589
+ var capitaliseFirstLetter = function (word) {
35590
+ return word.charAt(0).toUpperCase() + word.slice(1);
35591
+ };
35592
+ return (React__default.createElement("div", __assign$2({ className: classNames("arc-ProgressStepperItem", (_b = {
35593
+ "arc-ProgressStepperItem--vertical": direction === "vertical",
35594
+ "arc-ProgressStepperItem--isFluid": isFluid,
35595
+ "arc-ProgressStepperItem--onDarkSurface": surface === "dark",
35596
+ "arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
35597
+ },
35598
+ _b["arc-ProgressStepperItem--".concat(status)] = status !== "todo",
35599
+ _b["arc-ProgressStepperItem--".concat(size)] = size === "small",
35600
+ _b)) }, filterDataAttrs(props)),
35601
+ React__default.createElement("div", { className: classNames("arc-ProgressStepperItem-iconSection", (_c = {},
35602
+ _c["arc-ProgressStepperItem-iconSection--".concat(position)] = position !== "middle",
35603
+ _c)) },
35604
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-iconSectionTrailBefore" }),
35605
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-iconWrapper" }, statusIcons[status] === undefined ? (React__default.createElement("div", { style: {
35606
+ width: size === "small" ? "16px" : "32px",
35607
+ height: size === "small" ? "16px" : "32px"
35608
+ } })) : (React__default.createElement(Icon, { size: size === "small" ? 16 : 32, icon: statusIcons[status] }))),
35609
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-iconSectionTrailAfter" })),
35610
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-textSection" },
35611
+ status !== "todo" && (React__default.createElement(VisuallyHidden, null,
35612
+ capitaliseFirstLetter(status),
35613
+ ":")),
35614
+ titleHref ? (React__default.createElement("a", { href: titleHref, "aria-label": ariaLabel, className: "arc-ProgressStepperItem-title", onClick: onClickHandler }, title)) : (React__default.createElement("div", { className: "arc-ProgressStepperItem-title" }, title)),
35615
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
35616
+ isExpandable && direction === "vertical" && (React__default.createElement(React__default.Fragment, null,
35617
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" },
35618
+ React__default.createElement("div", { className: "arc-ProgressStepperItem-keyline" }),
35619
+ stepContent && !isStepContentHidden && (React__default.createElement(React__default.Fragment, null,
35620
+ React__default.createElement(VerticalSpace, { size: "8" }),
35621
+ stepContent))))))));
35622
+ };
35623
+
35624
+ /** Use `ProgressStepper` to illustrate the progress of a specific task within a page, by displaying a step-by-step progress through the user journey. This is commonly used in multi-step processes or wizards. */
35625
+ var ProgressStepper = function (_a) {
35626
+ var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, props = __rest$2(_a, ["children", "size", "isFluid", "direction", "isExpandable"]);
35627
+ var items = React__default.Children.toArray(children);
35628
+ var getStepStatus = function (item) {
35629
+ var _a;
35630
+ return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.status;
35631
+ };
35632
+ return (React__default.createElement("div", __assign$2({ className: classNames("arc-ProgressStepper", {
35633
+ "arc-ProgressStepper--vertical": direction === "vertical"
35634
+ }) }, filterDataAttrs(props)), items.map(function (item, index) {
35635
+ var currentPosition = index === 0
35636
+ ? "first"
35637
+ : index === React__default.Children.count(children) - 1
35638
+ ? "last"
35639
+ : undefined;
35640
+ return (React__default.createElement(React__default.Fragment, { key: "StepperItem-".concat(index) },
35641
+ React__default.createElement(ProgressStepperItem, __assign$2({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, direction: direction, isExpandable: isExpandable, size: size, position: currentPosition, previousStep: getStepStatus(items[index - 1]) }, filterDataAttrs(item.props)))));
35642
+ })));
35643
+ };
35644
+ ProgressStepper.Item = ProgressStepperItem;
35645
+
35162
35646
  var RadioContext = createContext({});
35163
35647
  var Provider$2 = RadioContext.Provider;
35164
35648
  var useRadioContext = function () {
@@ -35227,6 +35711,57 @@ var Rule = function (props) {
35227
35711
  }) }, filterDataAttrs(props))));
35228
35712
  };
35229
35713
 
35714
+ const React$5 = React__default;
35715
+ const BtIconArrowAltUp = props =>
35716
+ /*#__PURE__*/ React$5.createElement(
35717
+ "svg",
35718
+ Object.assign(
35719
+ {
35720
+ xmlns: "http://www.w3.org/2000/svg",
35721
+ viewBox: "0 0 32 32"
35722
+ },
35723
+ props
35724
+ ),
35725
+ /*#__PURE__*/ React$5.createElement("defs", null),
35726
+ /*#__PURE__*/ React$5.createElement("path", {
35727
+ d:
35728
+ "M20.35352,13.14648,16,8.793l-4.35352,4.35352a.49995.49995,0,0,0,.707.707L15.5,10.707V22.5a.5.5,0,0,0,1,0V10.707l3.14648,3.14648a.49995.49995,0,0,0,.707-.707Z",
35729
+ fill: "currentColor"
35730
+ })
35731
+ );
35732
+ var BtIconArrowAltUp_2 = BtIconArrowAltUp;
35733
+
35734
+ /**
35735
+ * Use `ScrollToTop` to allow the user to scroll to the top of the page by clicking a button.
35736
+ */
35737
+ var ScrollToTop = function (_a) {
35738
+ var _b = _a.appear, appear = _b === void 0 ? "always" : _b, _c = _a.isFixed, isFixed = _c === void 0 ? true : _c, _d = _a.fill, fill = _d === void 0 ? "solid" : _d, _e = _a.zIndex, zIndex = _e === void 0 ? 100 : _e, props = __rest$2(_a, ["appear", "isFixed", "fill", "zIndex"]);
35739
+ var _f = useState(false), hasScrolled = _f[0], setHasScrolled = _f[1];
35740
+ useEffect(function () {
35741
+ var handleScroll = debounce_1(function () {
35742
+ setHasScrolled(window.scrollY > 0);
35743
+ }, 100);
35744
+ window.addEventListener("scroll", handleScroll);
35745
+ return function () { return window.removeEventListener("scroll", handleScroll); };
35746
+ });
35747
+ var onClick = function () {
35748
+ window.scrollTo({
35749
+ top: 0,
35750
+ behavior: "smooth"
35751
+ });
35752
+ };
35753
+ return (React__default.createElement("button", __assign$2({ onClick: onClick, style: {
35754
+ zIndex: zIndex
35755
+ }, className: classNames("arc-ScrollToTop", "arc-ScrollToTop--".concat(fill), {
35756
+ "arc-ScrollToTop--fixed": isFixed,
35757
+ "arc-ScrollToTop--visible": appear === "always" || (appear === "afterScroll" && hasScrolled)
35758
+ }) }, filterDataAttrs(props)),
35759
+ React__default.createElement("div", { className: "arc-ScrollToTop-textWrapper" },
35760
+ React__default.createElement("span", { className: "arc-ScrollToTop-text" }, "Scroll to top")),
35761
+ React__default.createElement("span", { className: "arc-ScrollToTop-iconContainer" },
35762
+ React__default.createElement(Icon, { icon: BtIconArrowAltUp_2, size: 44 }))));
35763
+ };
35764
+
35230
35765
  /**
35231
35766
  * Use `Section` to compose content into vertical page layouts.
35232
35767
  */
@@ -35388,10 +35923,10 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(originalEventHandler, ourEv
35388
35923
 
35389
35924
  /* -------------------------------------------------------------------------------------------------
35390
35925
  * Slot
35391
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
35926
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
35392
35927
  const { children: children , ...slotProps } = props;
35393
35928
  const childrenArray = Children.toArray(children);
35394
- const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
35929
+ const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$1);
35395
35930
  if (slottable) {
35396
35931
  // the new element to render is the one passed as a child of `Slottable`
35397
35932
  const newElement = slottable.props.children;
@@ -35403,35 +35938,35 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(originalEventHandler, ourEv
35403
35938
  return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
35404
35939
  } else return child;
35405
35940
  });
35406
- return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
35941
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$1, _extends({}, slotProps, {
35407
35942
  ref: forwardedRef
35408
35943
  }), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
35409
35944
  }
35410
- return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
35945
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone$1, _extends({}, slotProps, {
35411
35946
  ref: forwardedRef
35412
35947
  }), children);
35413
35948
  });
35414
- $5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
35949
+ $5e63c961fc1ce211$export$8c6ed5c666ac1360$1.displayName = 'Slot';
35415
35950
  /* -------------------------------------------------------------------------------------------------
35416
35951
  * SlotClone
35417
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
35952
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$1 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
35418
35953
  const { children: children , ...slotProps } = props;
35419
35954
  if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
35420
- ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
35955
+ ...$5e63c961fc1ce211$var$mergeProps$1(slotProps, children.props),
35421
35956
  ref: $6ed0406888f73fc4$export$43e446d32b3d21af$2(forwardedRef, children.ref)
35422
35957
  });
35423
35958
  return Children.count(children) > 1 ? Children.only(null) : null;
35424
35959
  });
35425
- $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
35960
+ $5e63c961fc1ce211$var$SlotClone$1.displayName = 'SlotClone';
35426
35961
  /* -------------------------------------------------------------------------------------------------
35427
35962
  * Slottable
35428
- * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
35963
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1 = ({ children: children })=>{
35429
35964
  return /*#__PURE__*/ createElement(Fragment, null, children);
35430
35965
  };
35431
- /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
35432
- return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
35966
+ /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$1(child) {
35967
+ return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1;
35433
35968
  }
35434
- function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
35969
+ function $5e63c961fc1ce211$var$mergeProps$1(slotProps, childProps) {
35435
35970
  // all child props should override
35436
35971
  const overrideProps = {
35437
35972
  ...childProps
@@ -35466,7 +36001,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
35466
36001
  // be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
35467
36002
  // This is because we encountered issues with generic types that cannot be statically analysed
35468
36003
  // due to creating them dynamically via createCollection.
35469
- function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
36004
+ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2$1(name) {
35470
36005
  /* -----------------------------------------------------------------------------------------------
35471
36006
  * CollectionProvider
35472
36007
  * ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';
@@ -35494,7 +36029,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
35494
36029
  const { scope: scope , children: children } = props;
35495
36030
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
35496
36031
  const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$2(forwardedRef, context.collectionRef);
35497
- return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
36032
+ return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
35498
36033
  ref: composedRefs
35499
36034
  }, children);
35500
36035
  });
@@ -35515,7 +36050,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
35515
36050
  return ()=>void context.itemMap.delete(ref)
35516
36051
  ;
35517
36052
  });
35518
- return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
36053
+ return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
35519
36054
  [ITEM_DATA_ATTR]: '',
35520
36055
  ref: composedRefs
35521
36056
  }, children);
@@ -35549,9 +36084,9 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
35549
36084
  ];
35550
36085
  }
35551
36086
 
35552
- const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undefined);
35553
- /* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
35554
- const globalDir = useContext($f631663db3294ace$var$DirectionContext);
36087
+ const $f631663db3294ace$var$DirectionContext$1 = /*#__PURE__*/ createContext(undefined);
36088
+ /* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3$1(localDir) {
36089
+ const globalDir = useContext($f631663db3294ace$var$DirectionContext$1);
35555
36090
  return localDir || globalDir || 'ltr';
35556
36091
  }
35557
36092
 
@@ -35578,7 +36113,7 @@ const $8927f6f2acc4f386$var$NODES$3 = [
35578
36113
  * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$3 = $8927f6f2acc4f386$var$NODES$3.reduce((primitive, node)=>{
35579
36114
  const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
35580
36115
  const { asChild: asChild , ...primitiveProps } = props;
35581
- const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
36116
+ const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : node;
35582
36117
  useEffect(()=>{
35583
36118
  window[Symbol.for('radix-ui')] = true;
35584
36119
  }, []);
@@ -35966,7 +36501,7 @@ const $8927f6f2acc4f386$var$NODES$2 = [
35966
36501
  * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$2 = $8927f6f2acc4f386$var$NODES$2.reduce((primitive, node)=>{
35967
36502
  const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
35968
36503
  const { asChild: asChild , ...primitiveProps } = props;
35969
- const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
36504
+ const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : node;
35970
36505
  useEffect(()=>{
35971
36506
  window[Symbol.for('radix-ui')] = true;
35972
36507
  }, []);
@@ -36246,14 +36781,14 @@ function $d3863c46a17e8a28$var$removeLinks(items) {
36246
36781
  * We use this safe version which suppresses the warning by replacing it with a noop on the server.
36247
36782
  *
36248
36783
  * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
36249
- */ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
36784
+ */ const $9f79659886946c16$export$e5c5a5f917a5871c$1 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
36250
36785
 
36251
- const $1746a345f3d73bb7$var$useReactId = React$c['useId'.toString()] || (()=>undefined
36786
+ const $1746a345f3d73bb7$var$useReactId = React$m['useId'.toString()] || (()=>undefined
36252
36787
  );
36253
36788
  let $1746a345f3d73bb7$var$count = 0;
36254
36789
  function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
36255
- const [id, setId] = React$c.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
36256
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
36790
+ const [id, setId] = React$m.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
36791
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
36257
36792
  if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
36258
36793
  );
36259
36794
  }, [
@@ -36354,7 +36889,7 @@ const $8927f6f2acc4f386$var$NODES$1 = [
36354
36889
  * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$1 = $8927f6f2acc4f386$var$NODES$1.reduce((primitive, node)=>{
36355
36890
  const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
36356
36891
  const { asChild: asChild , ...primitiveProps } = props;
36357
- const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
36892
+ const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : node;
36358
36893
  useEffect(()=>{
36359
36894
  window[Symbol.for('radix-ui')] = true;
36360
36895
  }, []);
@@ -36369,7 +36904,7 @@ const $8927f6f2acc4f386$var$NODES$1 = [
36369
36904
  };
36370
36905
  }, {});
36371
36906
 
36372
- const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
36907
+ const $ea1ef594cf570d83$export$439d29a4e110a164$1 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
36373
36908
  return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends({}, props, {
36374
36909
  ref: forwardedRef,
36375
36910
  style: {
@@ -36402,7 +36937,7 @@ const $cc7e05a45900e73f$var$SELECTION_KEYS = [
36402
36937
  /* -------------------------------------------------------------------------------------------------
36403
36938
  * Select
36404
36939
  * -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$SELECT_NAME = 'Select';
36405
- const [$cc7e05a45900e73f$var$Collection, $cc7e05a45900e73f$var$useCollection, $cc7e05a45900e73f$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($cc7e05a45900e73f$var$SELECT_NAME);
36940
+ const [$cc7e05a45900e73f$var$Collection, $cc7e05a45900e73f$var$useCollection, $cc7e05a45900e73f$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2$1($cc7e05a45900e73f$var$SELECT_NAME);
36406
36941
  const [$cc7e05a45900e73f$var$createSelectContext, $cc7e05a45900e73f$export$286727a75dc039bd] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($cc7e05a45900e73f$var$SELECT_NAME, [
36407
36942
  $cc7e05a45900e73f$var$createCollectionScope
36408
36943
  ]);
@@ -36413,7 +36948,7 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
36413
36948
  const [trigger, setTrigger] = useState(null);
36414
36949
  const [valueNode, setValueNode] = useState(null);
36415
36950
  const [valueNodeHasChildren, setValueNodeHasChildren] = useState(false);
36416
- const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
36951
+ const direction = $f631663db3294ace$export$b39126d51d94e6f3$1(dir);
36417
36952
  const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
36418
36953
  prop: openProp,
36419
36954
  defaultProp: defaultOpen,
@@ -36565,7 +37100,7 @@ const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ forwardRef((prop
36565
37100
  const { onValueNodeHasChildrenChange: onValueNodeHasChildrenChange } = context;
36566
37101
  const hasChildren = children !== undefined;
36567
37102
  const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$2(forwardedRef, context.onValueNodeChange);
36568
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37103
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
36569
37104
  onValueNodeHasChildrenChange(hasChildren);
36570
37105
  }, [
36571
37106
  onValueNodeHasChildrenChange,
@@ -36598,7 +37133,7 @@ const $cc7e05a45900e73f$export$b2af6c9944296213 = (props)=>{
36598
37133
  const $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
36599
37134
  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, props.__scopeSelect);
36600
37135
  const [fragment, setFragment] = useState(); // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server
36601
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37136
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
36602
37137
  setFragment(new DocumentFragment());
36603
37138
  }, []);
36604
37139
  return /*#__PURE__*/ createElement(Fragment, null, context.open ? /*#__PURE__*/ createElement($cc7e05a45900e73f$var$SelectContentImpl, _extends({}, props, {
@@ -36634,7 +37169,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ forwardRef((props,
36634
37169
  // the last element in the DOM (because of the `Portal`)
36635
37170
  $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
36636
37171
  const [contentZIndex, setContentZIndex] = useState();
36637
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37172
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
36638
37173
  if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
36639
37174
  }, [
36640
37175
  content
@@ -36750,7 +37285,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ forwardRef((props,
36750
37285
  selectedItemText,
36751
37286
  context.dir
36752
37287
  ]);
36753
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>position()
37288
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>position()
36754
37289
  , [
36755
37290
  position
36756
37291
  ]);
@@ -36886,7 +37421,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ forwardRef((props,
36886
37421
  shouldExpandOnScrollRef: shouldExpandOnScrollRef,
36887
37422
  searchRef: searchRef
36888
37423
  }, /*#__PURE__*/ createElement($01b9c$RemoveScroll, {
36889
- as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
37424
+ as: $5e63c961fc1ce211$export$8c6ed5c666ac1360$1,
36890
37425
  allowPinchZoom: true
36891
37426
  }, /*#__PURE__*/ createElement("div", {
36892
37427
  ref: setContentWrapper,
@@ -37138,7 +37673,7 @@ const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ forwardRef((prop
37138
37673
  textContent
37139
37674
  ]);
37140
37675
  const { onNativeOptionAdd: onNativeOptionAdd , onNativeOptionRemove: onNativeOptionRemove } = nativeOptionsContext;
37141
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37676
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
37142
37677
  onNativeOptionAdd(nativeOption);
37143
37678
  return ()=>onNativeOptionRemove(nativeOption)
37144
37679
  ;
@@ -37172,7 +37707,7 @@ const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ forwardRef((prop
37172
37707
  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
37173
37708
  const [canScrollUp1, setCanScrollUp] = useState(false);
37174
37709
  const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$2(forwardedRef, contentContext.onScrollButtonChange);
37175
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37710
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
37176
37711
  if (contentContext.viewport && contentContext.isPositioned) {
37177
37712
  const viewport = contentContext.viewport;
37178
37713
  function handleScroll() {
@@ -37203,7 +37738,7 @@ const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ forwardRef((props
37203
37738
  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
37204
37739
  const [canScrollDown1, setCanScrollDown] = useState(false);
37205
37740
  const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$2(forwardedRef, contentContext.onScrollButtonChange);
37206
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37741
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
37207
37742
  if (contentContext.viewport && contentContext.isPositioned) {
37208
37743
  const viewport = contentContext.viewport;
37209
37744
  function handleScroll() {
@@ -37249,7 +37784,7 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ forwardRef((p
37249
37784
  // Because it is part of the normal flow, it will push down (top button) or shrink (bottom button)
37250
37785
  // the viewport, potentially causing the active item to now be partially out of view.
37251
37786
  // We re-run the `scrollIntoView` logic to make sure it stays within the viewport.
37252
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
37787
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
37253
37788
  var _activeItem$ref$curre;
37254
37789
  const activeItem = getItems().find((item)=>item.ref.current === document.activeElement
37255
37790
  );
@@ -37309,7 +37844,7 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ forwardRef((p
37309
37844
  *
37310
37845
  * We use `VisuallyHidden` rather than `display: "none"` because Safari autofill
37311
37846
  * won't work otherwise.
37312
- */ return /*#__PURE__*/ createElement($ea1ef594cf570d83$export$439d29a4e110a164, {
37847
+ */ return /*#__PURE__*/ createElement($ea1ef594cf570d83$export$439d29a4e110a164$1, {
37313
37848
  asChild: true
37314
37849
  }, /*#__PURE__*/ createElement("select", _extends({}, selectProps, {
37315
37850
  ref: composedRefs,
@@ -37396,9 +37931,9 @@ const $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b919
37396
37931
  const $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;
37397
37932
  const $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;
37398
37933
 
37399
- const React$2 = React__default;
37934
+ const React$4 = React__default;
37400
37935
  const BtIconChevronUp2Px = props =>
37401
- /*#__PURE__*/ React$2.createElement(
37936
+ /*#__PURE__*/ React$4.createElement(
37402
37937
  "svg",
37403
37938
  Object.assign(
37404
37939
  {
@@ -37407,8 +37942,8 @@ const BtIconChevronUp2Px = props =>
37407
37942
  },
37408
37943
  props
37409
37944
  ),
37410
- /*#__PURE__*/ React$2.createElement("defs", null),
37411
- /*#__PURE__*/ React$2.createElement("path", {
37945
+ /*#__PURE__*/ React$4.createElement("defs", null),
37946
+ /*#__PURE__*/ React$4.createElement("path", {
37412
37947
  d:
37413
37948
  "M28.999,23.5a.99676.99676,0,0,1-.707-.293l-12.28515-12.293L3.708,23.207A.99989.99989,0,0,1,2.294,21.793l13.71289-13.707L29.70605,21.793a.99976.99976,0,0,1-.707,1.707Z",
37414
37949
  fill: "currentColor"
@@ -38383,7 +38918,7 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp ,
38383
38918
 
38384
38919
  function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
38385
38920
  const [size, setSize] = useState(undefined);
38386
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
38921
+ $9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
38387
38922
  if (element) {
38388
38923
  // provide size as early as possible
38389
38924
  setSize({
@@ -38451,7 +38986,7 @@ const $8927f6f2acc4f386$var$NODES = [
38451
38986
  * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
38452
38987
  const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
38453
38988
  const { asChild: asChild , ...primitiveProps } = props;
38454
- const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
38989
+ const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : node;
38455
38990
  useEffect(()=>{
38456
38991
  window[Symbol.for('radix-ui')] = true;
38457
38992
  }, []);
@@ -38607,27 +39142,662 @@ var Switch = function (_a) {
38607
39142
  " ")))));
38608
39143
  };
38609
39144
 
38610
- /** Use `Badge` component to visually display a small amount of information, such as notification counts or status indicators. */
38611
- var Badge = function (_a) {
38612
- var _b, _c;
38613
- var children = _a.children, _d = _a.state, state = _d === void 0 ? "default" : _d, _e = _a.size, size = _e === void 0 ? "default" : _e, _f = _a.fill, fill = _f === void 0 ? "solid" : _f, ariaLabel = _a.ariaLabel, props = __rest$2(_a, ["children", "state", "size", "fill", "ariaLabel"]);
39145
+ /* -------------------------------------------------------------------------------------------------
39146
+ * Slot
39147
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39148
+ const { children: children , ...slotProps } = props;
39149
+ const childrenArray = Children.toArray(children);
39150
+ const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
39151
+ if (slottable) {
39152
+ // the new element to render is the one passed as a child of `Slottable`
39153
+ const newElement = slottable.props.children;
39154
+ const newChildren = childrenArray.map((child)=>{
39155
+ if (child === slottable) {
39156
+ // because the new element will be the one rendered, we are only interested
39157
+ // in grabbing its children (`newElement.props.children`)
39158
+ if (Children.count(newElement) > 1) return Children.only(null);
39159
+ return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
39160
+ } else return child;
39161
+ });
39162
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
39163
+ ref: forwardedRef
39164
+ }), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
39165
+ }
39166
+ return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
39167
+ ref: forwardedRef
39168
+ }), children);
39169
+ });
39170
+ $5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
39171
+ /* -------------------------------------------------------------------------------------------------
39172
+ * SlotClone
39173
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39174
+ const { children: children , ...slotProps } = props;
39175
+ if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
39176
+ ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
39177
+ ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af$4(forwardedRef, children.ref) : children.ref
39178
+ });
39179
+ return Children.count(children) > 1 ? Children.only(null) : null;
39180
+ });
39181
+ $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
39182
+ /* -------------------------------------------------------------------------------------------------
39183
+ * Slottable
39184
+ * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
39185
+ return /*#__PURE__*/ createElement(Fragment, null, children);
39186
+ };
39187
+ /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
39188
+ return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
39189
+ }
39190
+ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
39191
+ // all child props should override
39192
+ const overrideProps = {
39193
+ ...childProps
39194
+ };
39195
+ for(const propName in childProps){
39196
+ const slotPropValue = slotProps[propName];
39197
+ const childPropValue = childProps[propName];
39198
+ const isHandler = /^on[A-Z]/.test(propName);
39199
+ if (isHandler) {
39200
+ // if the handler exists on both, we compose them
39201
+ if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
39202
+ childPropValue(...args);
39203
+ slotPropValue(...args);
39204
+ };
39205
+ else if (slotPropValue) overrideProps[propName] = slotPropValue;
39206
+ } else if (propName === 'style') overrideProps[propName] = {
39207
+ ...slotPropValue,
39208
+ ...childPropValue
39209
+ };
39210
+ else if (propName === 'className') overrideProps[propName] = [
39211
+ slotPropValue,
39212
+ childPropValue
39213
+ ].filter(Boolean).join(' ');
39214
+ }
39215
+ return {
39216
+ ...slotProps,
39217
+ ...overrideProps
39218
+ };
39219
+ }
39220
+
39221
+ // We have resorted to returning slots directly rather than exposing primitives that can then
39222
+ // be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
39223
+ // This is because we encountered issues with generic types that cannot be statically analysed
39224
+ // due to creating them dynamically via createCollection.
39225
+ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
39226
+ /* -----------------------------------------------------------------------------------------------
39227
+ * CollectionProvider
39228
+ * ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';
39229
+ const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$2(PROVIDER_NAME);
39230
+ const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
39231
+ collectionRef: {
39232
+ current: null
39233
+ },
39234
+ itemMap: new Map()
39235
+ });
39236
+ const CollectionProvider = (props)=>{
39237
+ const { scope: scope , children: children } = props;
39238
+ const ref = React__default.useRef(null);
39239
+ const itemMap = React__default.useRef(new Map()).current;
39240
+ return /*#__PURE__*/ React__default.createElement(CollectionProviderImpl, {
39241
+ scope: scope,
39242
+ itemMap: itemMap,
39243
+ collectionRef: ref
39244
+ }, children);
39245
+ };
39246
+ /* -----------------------------------------------------------------------------------------------
39247
+ * CollectionSlot
39248
+ * ---------------------------------------------------------------------------------------------*/ const COLLECTION_SLOT_NAME = name + 'CollectionSlot';
39249
+ const CollectionSlot = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
39250
+ const { scope: scope , children: children } = props;
39251
+ const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
39252
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$3(forwardedRef, context.collectionRef);
39253
+ return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
39254
+ ref: composedRefs
39255
+ }, children);
39256
+ });
39257
+ /* -----------------------------------------------------------------------------------------------
39258
+ * CollectionItem
39259
+ * ---------------------------------------------------------------------------------------------*/ const ITEM_SLOT_NAME = name + 'CollectionItemSlot';
39260
+ const ITEM_DATA_ATTR = 'data-radix-collection-item';
39261
+ const CollectionItemSlot = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
39262
+ const { scope: scope , children: children , ...itemData } = props;
39263
+ const ref = React__default.useRef(null);
39264
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$3(forwardedRef, ref);
39265
+ const context = useCollectionContext(ITEM_SLOT_NAME, scope);
39266
+ React__default.useEffect(()=>{
39267
+ context.itemMap.set(ref, {
39268
+ ref: ref,
39269
+ ...itemData
39270
+ });
39271
+ return ()=>void context.itemMap.delete(ref)
39272
+ ;
39273
+ });
39274
+ return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
39275
+ [ITEM_DATA_ATTR]: '',
39276
+ ref: composedRefs
39277
+ }, children);
39278
+ });
39279
+ /* -----------------------------------------------------------------------------------------------
39280
+ * useCollection
39281
+ * ---------------------------------------------------------------------------------------------*/ function useCollection(scope) {
39282
+ const context = useCollectionContext(name + 'CollectionConsumer', scope);
39283
+ const getItems = React__default.useCallback(()=>{
39284
+ const collectionNode = context.collectionRef.current;
39285
+ if (!collectionNode) return [];
39286
+ const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
39287
+ const items = Array.from(context.itemMap.values());
39288
+ const orderedItems = items.sort((a, b)=>orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
39289
+ );
39290
+ return orderedItems;
39291
+ }, [
39292
+ context.collectionRef,
39293
+ context.itemMap
39294
+ ]);
39295
+ return getItems;
39296
+ }
39297
+ return [
39298
+ {
39299
+ Provider: CollectionProvider,
39300
+ Slot: CollectionSlot,
39301
+ ItemSlot: CollectionItemSlot
39302
+ },
39303
+ useCollection,
39304
+ createCollectionScope
39305
+ ];
39306
+ }
39307
+
39308
+ const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undefined);
39309
+ /* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
39310
+ const globalDir = useContext($f631663db3294ace$var$DirectionContext);
39311
+ return localDir || globalDir || 'ltr';
39312
+ }
39313
+
39314
+ const $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
39315
+ const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
39316
+ bubbles: false,
39317
+ cancelable: true
39318
+ };
39319
+ /* -------------------------------------------------------------------------------------------------
39320
+ * RovingFocusGroup
39321
+ * -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$GROUP_NAME = 'RovingFocusGroup';
39322
+ const [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME);
39323
+ const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$2($d7bdfb9eb0fdf311$var$GROUP_NAME, [
39324
+ $d7bdfb9eb0fdf311$var$createCollectionScope
39325
+ ]);
39326
+ const [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
39327
+ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39328
+ return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$Collection.Provider, {
39329
+ scope: props.__scopeRovingFocusGroup
39330
+ }, /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
39331
+ scope: props.__scopeRovingFocusGroup
39332
+ }, /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
39333
+ ref: forwardedRef
39334
+ }))));
39335
+ });
39336
+ /* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39337
+ const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , orientation: orientation , loop: loop = false , dir: dir , currentTabStopId: currentTabStopIdProp , defaultCurrentTabStopId: defaultCurrentTabStopId , onCurrentTabStopIdChange: onCurrentTabStopIdChange , onEntryFocus: onEntryFocus , ...groupProps } = props;
39338
+ const ref = useRef(null);
39339
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$3(forwardedRef, ref);
39340
+ const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
39341
+ const [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3$2({
39342
+ prop: currentTabStopIdProp,
39343
+ defaultProp: defaultCurrentTabStopId,
39344
+ onChange: onCurrentTabStopIdChange
39345
+ });
39346
+ const [isTabbingBackOut, setIsTabbingBackOut] = useState(false);
39347
+ const handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$3(onEntryFocus);
39348
+ const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
39349
+ const isClickFocusRef = useRef(false);
39350
+ const [focusableItemsCount, setFocusableItemsCount] = useState(0);
39351
+ useEffect(()=>{
39352
+ const node = ref.current;
39353
+ if (node) {
39354
+ node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
39355
+ return ()=>node.removeEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus)
39356
+ ;
39357
+ }
39358
+ }, [
39359
+ handleEntryFocus
39360
+ ]);
39361
+ return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$RovingFocusProvider, {
39362
+ scope: __scopeRovingFocusGroup,
39363
+ orientation: orientation,
39364
+ dir: direction,
39365
+ loop: loop,
39366
+ currentTabStopId: currentTabStopId,
39367
+ onItemFocus: useCallback((tabStopId)=>setCurrentTabStopId(tabStopId)
39368
+ , [
39369
+ setCurrentTabStopId
39370
+ ]),
39371
+ onItemShiftTab: useCallback(()=>setIsTabbingBackOut(true)
39372
+ , []),
39373
+ onFocusableItemAdd: useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount + 1
39374
+ )
39375
+ , []),
39376
+ onFocusableItemRemove: useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount - 1
39377
+ )
39378
+ , [])
39379
+ }, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({
39380
+ tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
39381
+ "data-orientation": orientation
39382
+ }, groupProps, {
39383
+ ref: composedRefs,
39384
+ style: {
39385
+ outline: 'none',
39386
+ ...props.style
39387
+ },
39388
+ onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onMouseDown, ()=>{
39389
+ isClickFocusRef.current = true;
39390
+ }),
39391
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onFocus, (event)=>{
39392
+ // We normally wouldn't need this check, because we already check
39393
+ // that the focus is on the current target and not bubbling to it.
39394
+ // We do this because Safari doesn't focus buttons when clicked, and
39395
+ // instead, the wrapper will get focused and not through a bubbling event.
39396
+ const isKeyboardFocus = !isClickFocusRef.current;
39397
+ if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
39398
+ const entryFocusEvent = new CustomEvent($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, $d7bdfb9eb0fdf311$var$EVENT_OPTIONS);
39399
+ event.currentTarget.dispatchEvent(entryFocusEvent);
39400
+ if (!entryFocusEvent.defaultPrevented) {
39401
+ const items = getItems().filter((item)=>item.focusable
39402
+ );
39403
+ const activeItem = items.find((item)=>item.active
39404
+ );
39405
+ const currentItem = items.find((item)=>item.id === currentTabStopId
39406
+ );
39407
+ const candidateItems = [
39408
+ activeItem,
39409
+ currentItem,
39410
+ ...items
39411
+ ].filter(Boolean);
39412
+ const candidateNodes = candidateItems.map((item)=>item.ref.current
39413
+ );
39414
+ $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);
39415
+ }
39416
+ }
39417
+ isClickFocusRef.current = false;
39418
+ }),
39419
+ onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onBlur, ()=>setIsTabbingBackOut(false)
39420
+ )
39421
+ })));
39422
+ });
39423
+ /* -------------------------------------------------------------------------------------------------
39424
+ * RovingFocusGroupItem
39425
+ * -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$ITEM_NAME = 'RovingFocusGroupItem';
39426
+ const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39427
+ const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , focusable: focusable = true , active: active = false , tabStopId: tabStopId , ...itemProps } = props;
39428
+ const autoId = $1746a345f3d73bb7$export$f680877a34711e37$1();
39429
+ const id = tabStopId || autoId;
39430
+ const context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup);
39431
+ const isCurrentTabStop = context.currentTabStopId === id;
39432
+ const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
39433
+ const { onFocusableItemAdd: onFocusableItemAdd , onFocusableItemRemove: onFocusableItemRemove } = context;
39434
+ useEffect(()=>{
39435
+ if (focusable) {
39436
+ onFocusableItemAdd();
39437
+ return ()=>onFocusableItemRemove()
39438
+ ;
39439
+ }
39440
+ }, [
39441
+ focusable,
39442
+ onFocusableItemAdd,
39443
+ onFocusableItemRemove
39444
+ ]);
39445
+ return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {
39446
+ scope: __scopeRovingFocusGroup,
39447
+ id: id,
39448
+ focusable: focusable,
39449
+ active: active
39450
+ }, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.span, _extends({
39451
+ tabIndex: isCurrentTabStop ? 0 : -1,
39452
+ "data-orientation": context.orientation
39453
+ }, itemProps, {
39454
+ ref: forwardedRef,
39455
+ onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onMouseDown, (event)=>{
39456
+ // We prevent focusing non-focusable items on `mousedown`.
39457
+ // Even though the item has tabIndex={-1}, that only means take it out of the tab order.
39458
+ if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also
39459
+ else context.onItemFocus(id);
39460
+ }),
39461
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onFocus, ()=>context.onItemFocus(id)
39462
+ ),
39463
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onKeyDown, (event)=>{
39464
+ if (event.key === 'Tab' && event.shiftKey) {
39465
+ context.onItemShiftTab();
39466
+ return;
39467
+ }
39468
+ if (event.target !== event.currentTarget) return;
39469
+ const focusIntent = $d7bdfb9eb0fdf311$var$getFocusIntent(event, context.orientation, context.dir);
39470
+ if (focusIntent !== undefined) {
39471
+ event.preventDefault();
39472
+ const items = getItems().filter((item)=>item.focusable
39473
+ );
39474
+ let candidateNodes = items.map((item)=>item.ref.current
39475
+ );
39476
+ if (focusIntent === 'last') candidateNodes.reverse();
39477
+ else if (focusIntent === 'prev' || focusIntent === 'next') {
39478
+ if (focusIntent === 'prev') candidateNodes.reverse();
39479
+ const currentIndex = candidateNodes.indexOf(event.currentTarget);
39480
+ candidateNodes = context.loop ? $d7bdfb9eb0fdf311$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
39481
+ }
39482
+ /**
39483
+ * Imperative focus during keydown is risky so we prevent React's batching updates
39484
+ * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332
39485
+ */ setTimeout(()=>$d7bdfb9eb0fdf311$var$focusFirst(candidateNodes)
39486
+ );
39487
+ }
39488
+ })
39489
+ })));
39490
+ });
39491
+ /* -----------------------------------------------------------------------------------------------*/ // prettier-ignore
39492
+ const $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT = {
39493
+ ArrowLeft: 'prev',
39494
+ ArrowUp: 'prev',
39495
+ ArrowRight: 'next',
39496
+ ArrowDown: 'next',
39497
+ PageUp: 'first',
39498
+ Home: 'first',
39499
+ PageDown: 'last',
39500
+ End: 'last'
39501
+ };
39502
+ function $d7bdfb9eb0fdf311$var$getDirectionAwareKey(key, dir) {
39503
+ if (dir !== 'rtl') return key;
39504
+ return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;
39505
+ }
39506
+ function $d7bdfb9eb0fdf311$var$getFocusIntent(event, orientation, dir) {
39507
+ const key = $d7bdfb9eb0fdf311$var$getDirectionAwareKey(event.key, dir);
39508
+ if (orientation === 'vertical' && [
39509
+ 'ArrowLeft',
39510
+ 'ArrowRight'
39511
+ ].includes(key)) return undefined;
39512
+ if (orientation === 'horizontal' && [
39513
+ 'ArrowUp',
39514
+ 'ArrowDown'
39515
+ ].includes(key)) return undefined;
39516
+ return $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT[key];
39517
+ }
39518
+ function $d7bdfb9eb0fdf311$var$focusFirst(candidates) {
39519
+ const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
39520
+ for (const candidate of candidates){
39521
+ // if focus is already where we want to go, we don't want to keep going through the candidates
39522
+ if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
39523
+ candidate.focus();
39524
+ if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
39525
+ }
39526
+ }
39527
+ /**
39528
+ * Wraps an array around itself at a given start index
39529
+ * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`
39530
+ */ function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {
39531
+ return array.map((_, index)=>array[(startIndex + index) % array.length]
39532
+ );
39533
+ }
39534
+ const $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338;
39535
+ const $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
39536
+
39537
+ /* -------------------------------------------------------------------------------------------------
39538
+ * Tabs
39539
+ * -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TABS_NAME = 'Tabs';
39540
+ const [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$2($69cb30bb0017df05$var$TABS_NAME, [
39541
+ $d7bdfb9eb0fdf311$export$c7109489551a4f4
39542
+ ]);
39543
+ const $69cb30bb0017df05$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
39544
+ const [$69cb30bb0017df05$var$TabsProvider, $69cb30bb0017df05$var$useTabsContext] = $69cb30bb0017df05$var$createTabsContext($69cb30bb0017df05$var$TABS_NAME);
39545
+ const $69cb30bb0017df05$export$b2539bed5023c21c = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39546
+ const { __scopeTabs: __scopeTabs , value: valueProp , onValueChange: onValueChange , defaultValue: defaultValue , orientation: orientation = 'horizontal' , dir: dir , activationMode: activationMode = 'automatic' , ...tabsProps } = props;
39547
+ const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
39548
+ const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3$2({
39549
+ prop: valueProp,
39550
+ onChange: onValueChange,
39551
+ defaultProp: defaultValue
39552
+ });
39553
+ return /*#__PURE__*/ createElement($69cb30bb0017df05$var$TabsProvider, {
39554
+ scope: __scopeTabs,
39555
+ baseId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
39556
+ value: value,
39557
+ onValueChange: setValue,
39558
+ orientation: orientation,
39559
+ dir: direction,
39560
+ activationMode: activationMode
39561
+ }, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({
39562
+ dir: direction,
39563
+ "data-orientation": orientation
39564
+ }, tabsProps, {
39565
+ ref: forwardedRef
39566
+ })));
39567
+ });
39568
+ /* -------------------------------------------------------------------------------------------------
39569
+ * TabsList
39570
+ * -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TAB_LIST_NAME = 'TabsList';
39571
+ const $69cb30bb0017df05$export$9712d22edc0d78c1 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39572
+ const { __scopeTabs: __scopeTabs , loop: loop = true , ...listProps } = props;
39573
+ const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TAB_LIST_NAME, __scopeTabs);
39574
+ const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
39575
+ return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
39576
+ asChild: true
39577
+ }, rovingFocusGroupScope, {
39578
+ orientation: context.orientation,
39579
+ dir: context.dir,
39580
+ loop: loop
39581
+ }), /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({
39582
+ role: "tablist",
39583
+ "aria-orientation": context.orientation
39584
+ }, listProps, {
39585
+ ref: forwardedRef
39586
+ })));
39587
+ });
39588
+ /* -------------------------------------------------------------------------------------------------
39589
+ * TabsTrigger
39590
+ * -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TRIGGER_NAME = 'TabsTrigger';
39591
+ const $69cb30bb0017df05$export$8114b9fdfdf9f3ba = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39592
+ const { __scopeTabs: __scopeTabs , value: value , disabled: disabled = false , ...triggerProps } = props;
39593
+ const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TRIGGER_NAME, __scopeTabs);
39594
+ const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
39595
+ const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
39596
+ const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
39597
+ const isSelected = value === context.value;
39598
+ return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
39599
+ asChild: true
39600
+ }, rovingFocusGroupScope, {
39601
+ focusable: !disabled,
39602
+ active: isSelected
39603
+ }), /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.button, _extends({
39604
+ type: "button",
39605
+ role: "tab",
39606
+ "aria-selected": isSelected,
39607
+ "aria-controls": contentId,
39608
+ "data-state": isSelected ? 'active' : 'inactive',
39609
+ "data-disabled": disabled ? '' : undefined,
39610
+ disabled: disabled,
39611
+ id: triggerId
39612
+ }, triggerProps, {
39613
+ ref: forwardedRef,
39614
+ onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onMouseDown, (event)=>{
39615
+ // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
39616
+ // but not when the control key is pressed (avoiding MacOS right click)
39617
+ if (!disabled && event.button === 0 && event.ctrlKey === false) context.onValueChange(value);
39618
+ else // prevent focus to avoid accidental activation
39619
+ event.preventDefault();
39620
+ }),
39621
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onKeyDown, (event)=>{
39622
+ if ([
39623
+ ' ',
39624
+ 'Enter'
39625
+ ].includes(event.key)) context.onValueChange(value);
39626
+ }),
39627
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onFocus, ()=>{
39628
+ // handle "automatic" activation if necessary
39629
+ // ie. activate tab following focus
39630
+ const isAutomaticActivation = context.activationMode !== 'manual';
39631
+ if (!isSelected && !disabled && isAutomaticActivation) context.onValueChange(value);
39632
+ })
39633
+ })));
39634
+ });
39635
+ /* -------------------------------------------------------------------------------------------------
39636
+ * TabsContent
39637
+ * -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$CONTENT_NAME = 'TabsContent';
39638
+ const $69cb30bb0017df05$export$bd905d70e8fd2ebb = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39639
+ const { __scopeTabs: __scopeTabs , value: value , forceMount: forceMount , children: children , ...contentProps } = props;
39640
+ const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$CONTENT_NAME, __scopeTabs);
39641
+ const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
39642
+ const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
39643
+ const isSelected = value === context.value;
39644
+ const isMountAnimationPreventedRef = useRef(isSelected);
39645
+ useEffect(()=>{
39646
+ const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false
39647
+ );
39648
+ return ()=>cancelAnimationFrame(rAF)
39649
+ ;
39650
+ }, []);
39651
+ return /*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
39652
+ present: forceMount || isSelected
39653
+ }, ({ present: present })=>/*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({
39654
+ "data-state": isSelected ? 'active' : 'inactive',
39655
+ "data-orientation": context.orientation,
39656
+ role: "tabpanel",
39657
+ "aria-labelledby": triggerId,
39658
+ hidden: !present,
39659
+ id: contentId,
39660
+ tabIndex: 0
39661
+ }, contentProps, {
39662
+ ref: forwardedRef,
39663
+ style: {
39664
+ ...props.style,
39665
+ animationDuration: isMountAnimationPreventedRef.current ? '0s' : undefined
39666
+ }
39667
+ }), present && children)
39668
+ );
39669
+ });
39670
+ /* ---------------------------------------------------------------------------------------------- */ function $69cb30bb0017df05$var$makeTriggerId(baseId, value) {
39671
+ return `${baseId}-trigger-${value}`;
39672
+ }
39673
+ function $69cb30bb0017df05$var$makeContentId(baseId, value) {
39674
+ return `${baseId}-content-${value}`;
39675
+ }
39676
+ const $69cb30bb0017df05$export$be92b6f5f03c0fe9 = $69cb30bb0017df05$export$b2539bed5023c21c;
39677
+ const $69cb30bb0017df05$export$54c2e3dc7acea9f5 = $69cb30bb0017df05$export$9712d22edc0d78c1;
39678
+ const $69cb30bb0017df05$export$41fb9f06171c75f4 = $69cb30bb0017df05$export$8114b9fdfdf9f3ba;
39679
+ const $69cb30bb0017df05$export$7c6e2c02157bb7d2 = $69cb30bb0017df05$export$bd905d70e8fd2ebb;
39680
+
39681
+ var Tab = function (_a) {
39682
+ var label = _a.label, value = _a.value, icon = _a.icon, iconActive = _a.iconActive, props = __rest$2(_a, ["label", "value", "icon", "iconActive"]);
38614
39683
  var surface = useContext(Context$3).surface;
38615
- return (React__default.createElement("div", __assign$2({}, (ariaLabel && { "aria-label": ariaLabel }), { className: classNames((_b = {
38616
- "arc-Badge": true,
38617
- "arc-Badge--onDarkSurface": surface === "dark",
38618
- "arc-Badge--large": size === "large",
38619
- "arc-Badge--outline": fill === "outlined"
38620
- },
38621
- _b[suffixModifier("arc-Badge--state", state)] = state !== "default",
38622
- _b)), role: state === "error" ? "alert" : "status" }, filterDataAttrs(props)),
38623
- React__default.createElement("div", { className: classNames((_c = {
38624
- "arc-Badge-text": true
38625
- },
38626
- _c[suffixModifier("arc-Badge--text", state)] = state !== "default",
38627
- _c)) },
38628
- React__default.createElement(Text, { size: size === "default" ? "xs" : "m" }, children))));
39684
+ return (React__default.createElement($69cb30bb0017df05$export$41fb9f06171c75f4, __assign$2({ className: classNames("arc-Tab-trigger", {
39685
+ "arc-Tab-trigger--onDarkSurface": surface === "dark",
39686
+ "arc-Tab-trigger--hasIcon": icon || iconActive
39687
+ }), value: value }, filterDataAttrs(props)),
39688
+ icon && (React__default.createElement("div", { className: "arc-Tab-triggerIcon", "data-testid": "arc-Tab-TriggerIcon" },
39689
+ React__default.createElement(Icon, { icon: icon }))),
39690
+ iconActive && (React__default.createElement("div", { className: "arc-Tab-triggerIcon arc-Tab-triggerIcon--active", "data-testid": "arc-Tab-TriggerIconActive" },
39691
+ React__default.createElement(Icon, { icon: iconActive }))),
39692
+ label));
39693
+ };
39694
+
39695
+ var TabContent = function (_a) {
39696
+ var children = _a.children, value = _a.value;
39697
+ return (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: "arc-Tab-content", value: value }, children));
39698
+ };
39699
+
39700
+ const React$3 = React__default;
39701
+ const BtIconArrowRightFill = props =>
39702
+ /*#__PURE__*/ React$3.createElement(
39703
+ "svg",
39704
+ Object.assign(
39705
+ {
39706
+ xmlns: "http://www.w3.org/2000/svg",
39707
+ viewBox: "0 0 32 32"
39708
+ },
39709
+ props
39710
+ ),
39711
+ /*#__PURE__*/ React$3.createElement("defs", null),
39712
+ /*#__PURE__*/ React$3.createElement("path", {
39713
+ d:
39714
+ "M2,16A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm16.85352-4.35352L23.207,16l-4.35351,4.35352a.5.5,0,0,1-.707-.707L21.293,16.5H9.5a.5.5,0,0,1,0-1H21.293l-3.14649-3.14648a.5.5,0,0,1,.707-.707Z",
39715
+ fill: "currentColor"
39716
+ })
39717
+ );
39718
+ var BtIconArrowRightFill_2 = BtIconArrowRightFill;
39719
+
39720
+ const React$2 = React__default;
39721
+ const BtIconArrowLeftFill = props =>
39722
+ /*#__PURE__*/ React$2.createElement(
39723
+ "svg",
39724
+ Object.assign(
39725
+ {
39726
+ xmlns: "http://www.w3.org/2000/svg",
39727
+ viewBox: "0 0 32 32"
39728
+ },
39729
+ props
39730
+ ),
39731
+ /*#__PURE__*/ React$2.createElement("defs", null),
39732
+ /*#__PURE__*/ React$2.createElement("path", {
39733
+ d:
39734
+ "M30,16A14,14,0,1,0,16,30,14,14,0,0,0,30,16ZM13.14648,20.35352,8.793,16l4.35351-4.35352a.5.5,0,0,1,.707.707L10.707,15.5H22.5a.5.5,0,0,1,0,1H10.707l3.14649,3.14648a.5.5,0,0,1-.707.707Z",
39735
+ fill: "currentColor"
39736
+ })
39737
+ );
39738
+ var BtIconArrowLeftFill_2 = BtIconArrowLeftFill;
39739
+
39740
+ var TabsList = function (_a) {
39741
+ var children = _a.children, type = _a.type, isJustified = _a.isJustified, ariaLabel = _a.ariaLabel, props = __rest$2(_a, ["children", "type", "isJustified", "ariaLabel"]);
39742
+ var surface = useContext(Context$3).surface;
39743
+ var tabsRef = useRef(null);
39744
+ var _b = useState(false), rightOverflow = _b[0], setRightOverflow = _b[1];
39745
+ var _c = useState(false), leftOverflow = _c[0], setLeftOverflow = _c[1];
39746
+ var checkOverflow = function (element) {
39747
+ if (element) {
39748
+ if (element.scrollWidth > element.clientWidth) {
39749
+ setRightOverflow(true);
39750
+ }
39751
+ if (element.scrollLeft + 10 >=
39752
+ element.scrollWidth - element.clientWidth) {
39753
+ setRightOverflow(false);
39754
+ }
39755
+ if (element.scrollLeft >= 1) {
39756
+ setLeftOverflow(true);
39757
+ }
39758
+ else {
39759
+ setLeftOverflow(false);
39760
+ }
39761
+ }
39762
+ };
39763
+ useEffect(function () {
39764
+ checkOverflow(tabsRef.current);
39765
+ }, []);
39766
+ var scrollTabs = function (scrollAmount) {
39767
+ if (tabsRef.current) {
39768
+ tabsRef.current.scrollLeft += scrollAmount;
39769
+ }
39770
+ };
39771
+ var onScroll = function (event) {
39772
+ checkOverflow(event.currentTarget);
39773
+ };
39774
+ return (React__default.createElement(React__default.Fragment, null,
39775
+ React__default.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, __assign$2({ onScroll: onScroll, className: classNames("arc-Tabs", {
39776
+ "arc-Tabs--contained": type === "contained",
39777
+ "arc-Tabs--isJustified": isJustified,
39778
+ "arc-Tabs--onDarkSurface": surface === "dark"
39779
+ }), ref: tabsRef, "aria-label": ariaLabel }, filterDataAttrs(props)), children),
39780
+ leftOverflow && (React__default.createElement("button", { className: classNames("arc-Tabs-overflowIcon arc-Tabs-overflowIcon--left", {
39781
+ "arc-Tabs-overflowIcon--onDarkSurface": surface === "dark"
39782
+ }), onClick: function () { return scrollTabs(-300); }, "aria-label": "Scroll Tabs Left", "data-testid": "arc-Tabs-overflowIconLeft" },
39783
+ React__default.createElement(Icon, { icon: BtIconArrowLeftFill_2, size: 40, color: "brand" }))),
39784
+ rightOverflow && (React__default.createElement("button", { className: classNames("arc-Tabs-overflowIcon", {
39785
+ "arc-Tabs-overflowIcon--onDarkSurface": surface === "dark"
39786
+ }), onClick: function () { return scrollTabs(300); }, "aria-label": "Scroll Tabs Right", "data-testid": "arc-Tabs-overflowIconRight" },
39787
+ React__default.createElement(Icon, { icon: BtIconArrowRightFill_2, size: 40, color: "brand" })))));
38629
39788
  };
38630
39789
 
39790
+ var Tabs = function (_a) {
39791
+ var children = _a.children, defaultValue = _a.defaultValue, onValueChange = _a.onValueChange, activationMode = _a.activationMode, props = __rest$2(_a, ["children", "defaultValue", "onValueChange", "activationMode"]);
39792
+ return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, __assign$2({ className: "arc-Tabs-root", defaultValue: defaultValue, onValueChange: onValueChange, activationMode: activationMode }, filterDataAttrs(props)), children));
39793
+ };
39794
+ Tab.displayName = "Tabs.Tab";
39795
+ TabsList.displayName = "Tabs.List";
39796
+ TabContent.displayName = "Tabs.Content";
39797
+ Tabs.Tab = Tab;
39798
+ Tabs.List = TabsList;
39799
+ Tabs.Content = TabContent;
39800
+
38631
39801
  const React$1 = React__default;
38632
39802
  const BtIconCross = props =>
38633
39803
  /*#__PURE__*/ React$1.createElement(
@@ -38706,13 +39876,45 @@ var Tag = function (_a) {
38706
39876
  React__default.createElement(Icon, { icon: BtIconCrossFill_2, color: "brand", size: 20 })))));
38707
39877
  };
38708
39878
 
38709
- /**
38710
- * Provides text for screen readers that is visually hidden.
38711
- */
38712
- var VisuallyHidden = function (_a) {
38713
- var children = _a.children;
38714
- return (React__default.createElement("span", { "data-testid": "visually-hidden", className: "arc-VisuallyHidden" }, children));
38715
- };
39879
+ /** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
39880
+ var TextArea = forwardRef(function (_a, ref) {
39881
+ var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, props = __rest$2(_a, ["defaultValue", "errorMessage", "helper", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText"]);
39882
+ var surface = useContext(Context$3).surface;
39883
+ var ourRef = useRef(null);
39884
+ var _j = useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
39885
+ var setSmartHeight = function (el) {
39886
+ el.style.height = "auto";
39887
+ el.style.height = "".concat(parseInt(getComputedStyle(el).getPropertyValue("border-width")) *
39888
+ 2 +
39889
+ el.scrollHeight, "px");
39890
+ };
39891
+ var getTextAreaRef = function (elementRef) {
39892
+ ourRef.current = elementRef;
39893
+ if (ref && typeof ref === "object") {
39894
+ ref.current = elementRef;
39895
+ }
39896
+ if (ref && typeof ref === "function") {
39897
+ ref(elementRef);
39898
+ }
39899
+ };
39900
+ var handleOnChange = function (e) {
39901
+ resize === "auto" && ourRef.current && setSmartHeight(ourRef.current);
39902
+ onChange && onChange(e);
39903
+ setCharacterCount(e.target.value.length);
39904
+ };
39905
+ return (React__default.createElement(FormControl, __assign$2({ errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure, supplementaryInfo: maxLength &&
39906
+ showCharacterCount && (React__default.createElement(React__default.Fragment, null,
39907
+ React__default.createElement(Text, { tone: isDisabled ? "muted" : "default" },
39908
+ React__default.createElement("span", { className: "arc-TextArea-characterCount" },
39909
+ characterCount,
39910
+ " / ",
39911
+ maxLength)))) }, filterDataAttrs(props)),
39912
+ React__default.createElement("textarea", { id: id, className: classNames("arc-TextArea", {
39913
+ "arc-TextArea--noResize": resize !== "manual",
39914
+ "arc-TextArea--onDarkSurface": surface === "dark",
39915
+ "arc-TextArea--invalid": errorMessage
39916
+ }), defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, value: value, readOnly: isReadOnly, maxLength: maxLength, name: name, onChange: handleOnChange, onBlur: onBlur, ref: getTextAreaRef })));
39917
+ });
38716
39918
 
38717
39919
  /**
38718
39920
  * Use `TextInput` to allow custom user text entry with a keyboard.
@@ -38751,45 +39953,724 @@ var TextInput = forwardRef(function (_a, ref) {
38751
39953
  : "Your password is hidden")))))))));
38752
39954
  });
38753
39955
 
38754
- /** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
38755
- var TextArea = forwardRef(function (_a, ref) {
38756
- var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, props = __rest$2(_a, ["defaultValue", "errorMessage", "helper", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText"]);
38757
- var surface = useContext(Context$3).surface;
38758
- var ourRef = useRef(null);
38759
- var _j = useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
38760
- var setSmartHeight = function (el) {
38761
- el.style.height = "auto";
38762
- el.style.height = "".concat(parseInt(getComputedStyle(el).getPropertyValue("border-width")) *
38763
- 2 +
38764
- el.scrollHeight, "px");
38765
- };
38766
- var getTextAreaRef = function (elementRef) {
38767
- ourRef.current = elementRef;
38768
- if (ref && typeof ref === "object") {
38769
- ref.current = elementRef;
39956
+ /**
39957
+ * On the server, React emits a warning when calling `useLayoutEffect`.
39958
+ * This is because neither `useLayoutEffect` nor `useEffect` run on the server.
39959
+ * We use this safe version which suppresses the warning by replacing it with a noop on the server.
39960
+ *
39961
+ * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
39962
+ */ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
39963
+
39964
+ const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
39965
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.span, _extends({}, props, {
39966
+ ref: forwardedRef,
39967
+ style: {
39968
+ // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
39969
+ position: 'absolute',
39970
+ border: 0,
39971
+ width: 1,
39972
+ height: 1,
39973
+ padding: 0,
39974
+ margin: -1,
39975
+ overflow: 'hidden',
39976
+ clip: 'rect(0, 0, 0, 0)',
39977
+ whiteSpace: 'nowrap',
39978
+ wordWrap: 'normal',
39979
+ ...props.style
38770
39980
  }
38771
- if (ref && typeof ref === "function") {
38772
- ref(elementRef);
39981
+ }));
39982
+ });
39983
+
39984
+ /* -------------------------------------------------------------------------------------------------
39985
+ * ToastProvider
39986
+ * -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$PROVIDER_NAME = 'ToastProvider';
39987
+ const [$054eb8030ebde76e$var$Collection, $054eb8030ebde76e$var$useCollection, $054eb8030ebde76e$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2('Toast');
39988
+ const [$054eb8030ebde76e$var$createToastContext, $054eb8030ebde76e$export$8a359da18fbc9073] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$2('Toast', [
39989
+ $054eb8030ebde76e$var$createCollectionScope
39990
+ ]);
39991
+ const [$054eb8030ebde76e$var$ToastProviderProvider, $054eb8030ebde76e$var$useToastProviderContext] = $054eb8030ebde76e$var$createToastContext($054eb8030ebde76e$var$PROVIDER_NAME);
39992
+ const $054eb8030ebde76e$export$f5d03d415824e0e = (props)=>{
39993
+ const { __scopeToast: __scopeToast , label: label = 'Notification' , duration: duration = 5000 , swipeDirection: swipeDirection = 'right' , swipeThreshold: swipeThreshold = 50 , children: children } = props;
39994
+ const [viewport, setViewport] = useState(null);
39995
+ const [toastCount, setToastCount] = useState(0);
39996
+ const isFocusedToastEscapeKeyDownRef = useRef(false);
39997
+ const isClosePausedRef = useRef(false);
39998
+ return /*#__PURE__*/ createElement($054eb8030ebde76e$var$Collection.Provider, {
39999
+ scope: __scopeToast
40000
+ }, /*#__PURE__*/ createElement($054eb8030ebde76e$var$ToastProviderProvider, {
40001
+ scope: __scopeToast,
40002
+ label: label,
40003
+ duration: duration,
40004
+ swipeDirection: swipeDirection,
40005
+ swipeThreshold: swipeThreshold,
40006
+ toastCount: toastCount,
40007
+ viewport: viewport,
40008
+ onViewportChange: setViewport,
40009
+ onToastAdd: useCallback(()=>setToastCount((prevCount)=>prevCount + 1
40010
+ )
40011
+ , []),
40012
+ onToastRemove: useCallback(()=>setToastCount((prevCount)=>prevCount - 1
40013
+ )
40014
+ , []),
40015
+ isFocusedToastEscapeKeyDownRef: isFocusedToastEscapeKeyDownRef,
40016
+ isClosePausedRef: isClosePausedRef
40017
+ }, children));
40018
+ };
40019
+ $054eb8030ebde76e$export$f5d03d415824e0e.propTypes = {
40020
+ label (props) {
40021
+ if (props.label && typeof props.label === 'string' && !props.label.trim()) {
40022
+ const error = `Invalid prop \`label\` supplied to \`${$054eb8030ebde76e$var$PROVIDER_NAME}\`. Expected non-empty \`string\`.`;
40023
+ return new Error(error);
38773
40024
  }
38774
- };
38775
- var handleOnChange = function (e) {
38776
- resize === "auto" && ourRef.current && setSmartHeight(ourRef.current);
38777
- onChange && onChange(e);
38778
- setCharacterCount(e.target.value.length);
38779
- };
38780
- return (React__default.createElement(FormControl, __assign$2({ errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure, supplementaryInfo: maxLength &&
38781
- showCharacterCount && (React__default.createElement(React__default.Fragment, null,
38782
- React__default.createElement(Text, { tone: isDisabled ? "muted" : "default" },
38783
- React__default.createElement("span", { className: "arc-TextArea-characterCount" },
38784
- characterCount,
38785
- " / ",
38786
- maxLength)))) }, filterDataAttrs(props)),
38787
- React__default.createElement("textarea", { id: id, className: classNames("arc-TextArea", {
38788
- "arc-TextArea--noResize": resize !== "manual",
38789
- "arc-TextArea--onDarkSurface": surface === "dark",
38790
- "arc-TextArea--invalid": errorMessage
38791
- }), defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, value: value, readOnly: isReadOnly, maxLength: maxLength, name: name, onChange: handleOnChange, onBlur: onBlur, ref: getTextAreaRef })));
40025
+ return null;
40026
+ }
40027
+ };
40028
+ /* -------------------------------------------------------------------------------------------------
40029
+ * ToastViewport
40030
+ * -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$VIEWPORT_NAME = 'ToastViewport';
40031
+ const $054eb8030ebde76e$var$VIEWPORT_DEFAULT_HOTKEY = [
40032
+ 'F8'
40033
+ ];
40034
+ const $054eb8030ebde76e$var$VIEWPORT_PAUSE = 'toast.viewportPause';
40035
+ const $054eb8030ebde76e$var$VIEWPORT_RESUME = 'toast.viewportResume';
40036
+ const $054eb8030ebde76e$export$6192c2425ecfd989 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40037
+ const { __scopeToast: __scopeToast , hotkey: hotkey = $054eb8030ebde76e$var$VIEWPORT_DEFAULT_HOTKEY , label: label = 'Notifications ({hotkey})' , ...viewportProps } = props;
40038
+ const context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$VIEWPORT_NAME, __scopeToast);
40039
+ const getItems = $054eb8030ebde76e$var$useCollection(__scopeToast);
40040
+ const wrapperRef = useRef(null);
40041
+ const headFocusProxyRef = useRef(null);
40042
+ const tailFocusProxyRef = useRef(null);
40043
+ const ref = useRef(null);
40044
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$3(forwardedRef, ref, context.onViewportChange);
40045
+ const hotkeyLabel = hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '');
40046
+ const hasToasts = context.toastCount > 0;
40047
+ useEffect(()=>{
40048
+ const handleKeyDown = (event)=>{
40049
+ var _ref$current;
40050
+ // we use `event.code` as it is consistent regardless of meta keys that were pressed.
40051
+ // for example, `event.key` for `Control+Alt+t` is `†` and `t !== †`
40052
+ const isHotkeyPressed = hotkey.every((key)=>event[key] || event.code === key
40053
+ );
40054
+ if (isHotkeyPressed) (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.focus();
40055
+ };
40056
+ document.addEventListener('keydown', handleKeyDown);
40057
+ return ()=>document.removeEventListener('keydown', handleKeyDown)
40058
+ ;
40059
+ }, [
40060
+ hotkey
40061
+ ]);
40062
+ useEffect(()=>{
40063
+ const wrapper = wrapperRef.current;
40064
+ const viewport = ref.current;
40065
+ if (hasToasts && wrapper && viewport) {
40066
+ const handlePause = ()=>{
40067
+ if (!context.isClosePausedRef.current) {
40068
+ const pauseEvent = new CustomEvent($054eb8030ebde76e$var$VIEWPORT_PAUSE);
40069
+ viewport.dispatchEvent(pauseEvent);
40070
+ context.isClosePausedRef.current = true;
40071
+ }
40072
+ };
40073
+ const handleResume = ()=>{
40074
+ if (context.isClosePausedRef.current) {
40075
+ const resumeEvent = new CustomEvent($054eb8030ebde76e$var$VIEWPORT_RESUME);
40076
+ viewport.dispatchEvent(resumeEvent);
40077
+ context.isClosePausedRef.current = false;
40078
+ }
40079
+ };
40080
+ const handleFocusOutResume = (event)=>{
40081
+ const isFocusMovingOutside = !wrapper.contains(event.relatedTarget);
40082
+ if (isFocusMovingOutside) handleResume();
40083
+ };
40084
+ const handlePointerLeaveResume = ()=>{
40085
+ const isFocusInside = wrapper.contains(document.activeElement);
40086
+ if (!isFocusInside) handleResume();
40087
+ }; // Toasts are not in the viewport React tree so we need to bind DOM events
40088
+ wrapper.addEventListener('focusin', handlePause);
40089
+ wrapper.addEventListener('focusout', handleFocusOutResume);
40090
+ wrapper.addEventListener('pointermove', handlePause);
40091
+ wrapper.addEventListener('pointerleave', handlePointerLeaveResume);
40092
+ window.addEventListener('blur', handlePause);
40093
+ window.addEventListener('focus', handleResume);
40094
+ return ()=>{
40095
+ wrapper.removeEventListener('focusin', handlePause);
40096
+ wrapper.removeEventListener('focusout', handleFocusOutResume);
40097
+ wrapper.removeEventListener('pointermove', handlePause);
40098
+ wrapper.removeEventListener('pointerleave', handlePointerLeaveResume);
40099
+ window.removeEventListener('blur', handlePause);
40100
+ window.removeEventListener('focus', handleResume);
40101
+ };
40102
+ }
40103
+ }, [
40104
+ hasToasts,
40105
+ context.isClosePausedRef
40106
+ ]);
40107
+ const getSortedTabbableCandidates = useCallback(({ tabbingDirection: tabbingDirection })=>{
40108
+ const toastItems = getItems();
40109
+ const tabbableCandidates = toastItems.map((toastItem)=>{
40110
+ const toastNode = toastItem.ref.current;
40111
+ const toastTabbableCandidates = [
40112
+ toastNode,
40113
+ ...$054eb8030ebde76e$var$getTabbableCandidates(toastNode)
40114
+ ];
40115
+ return tabbingDirection === 'forwards' ? toastTabbableCandidates : toastTabbableCandidates.reverse();
40116
+ });
40117
+ return (tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates).flat();
40118
+ }, [
40119
+ getItems
40120
+ ]);
40121
+ useEffect(()=>{
40122
+ const viewport = ref.current; // We programmatically manage tabbing as we are unable to influence
40123
+ // the source order with portals, this allows us to reverse the
40124
+ // tab order so that it runs from most recent toast to least
40125
+ if (viewport) {
40126
+ const handleKeyDown = (event)=>{
40127
+ const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
40128
+ const isTabKey = event.key === 'Tab' && !isMetaKey;
40129
+ if (isTabKey) {
40130
+ const focusedElement = document.activeElement;
40131
+ const isTabbingBackwards = event.shiftKey;
40132
+ const targetIsViewport = event.target === viewport; // If we're back tabbing after jumping to the viewport then we simply
40133
+ // proxy focus out to the preceding document
40134
+ if (targetIsViewport && isTabbingBackwards) {
40135
+ var _headFocusProxyRef$cu;
40136
+ (_headFocusProxyRef$cu = headFocusProxyRef.current) === null || _headFocusProxyRef$cu === void 0 || _headFocusProxyRef$cu.focus();
40137
+ return;
40138
+ }
40139
+ const tabbingDirection = isTabbingBackwards ? 'backwards' : 'forwards';
40140
+ const sortedCandidates = getSortedTabbableCandidates({
40141
+ tabbingDirection: tabbingDirection
40142
+ });
40143
+ const index = sortedCandidates.findIndex((candidate)=>candidate === focusedElement
40144
+ );
40145
+ if ($054eb8030ebde76e$var$focusFirst(sortedCandidates.slice(index + 1))) event.preventDefault();
40146
+ else {
40147
+ var _headFocusProxyRef$cu2, _tailFocusProxyRef$cu;
40148
+ // If we can't focus that means we're at the edges so we
40149
+ // proxy to the corresponding exit point and let the browser handle
40150
+ // tab/shift+tab keypress and implicitly pass focus to the next valid element in the document
40151
+ isTabbingBackwards ? (_headFocusProxyRef$cu2 = headFocusProxyRef.current) === null || _headFocusProxyRef$cu2 === void 0 || _headFocusProxyRef$cu2.focus() : (_tailFocusProxyRef$cu = tailFocusProxyRef.current) === null || _tailFocusProxyRef$cu === void 0 || _tailFocusProxyRef$cu.focus();
40152
+ }
40153
+ }
40154
+ }; // Toasts are not in the viewport React tree so we need to bind DOM events
40155
+ viewport.addEventListener('keydown', handleKeyDown);
40156
+ return ()=>viewport.removeEventListener('keydown', handleKeyDown)
40157
+ ;
40158
+ }
40159
+ }, [
40160
+ getItems,
40161
+ getSortedTabbableCandidates
40162
+ ]);
40163
+ return /*#__PURE__*/ createElement($5cb92bef7577960e$export$aecb2ddcb55c95be, {
40164
+ ref: wrapperRef,
40165
+ role: "region",
40166
+ "aria-label": label.replace('{hotkey}', hotkeyLabel) // Ensure virtual cursor from landmarks menus triggers focus/blur for pause/resume
40167
+ ,
40168
+ tabIndex: -1 // incase list has size when empty (e.g. padding), we remove pointer events so
40169
+ ,
40170
+ style: {
40171
+ pointerEvents: hasToasts ? undefined : 'none'
40172
+ }
40173
+ }, hasToasts && /*#__PURE__*/ createElement($054eb8030ebde76e$var$FocusProxy, {
40174
+ ref: headFocusProxyRef,
40175
+ onFocusFromOutsideViewport: ()=>{
40176
+ const tabbableCandidates = getSortedTabbableCandidates({
40177
+ tabbingDirection: 'forwards'
40178
+ });
40179
+ $054eb8030ebde76e$var$focusFirst(tabbableCandidates);
40180
+ }
40181
+ }), /*#__PURE__*/ createElement($054eb8030ebde76e$var$Collection.Slot, {
40182
+ scope: __scopeToast
40183
+ }, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.ol, _extends({
40184
+ tabIndex: -1
40185
+ }, viewportProps, {
40186
+ ref: composedRefs
40187
+ }))), hasToasts && /*#__PURE__*/ createElement($054eb8030ebde76e$var$FocusProxy, {
40188
+ ref: tailFocusProxyRef,
40189
+ onFocusFromOutsideViewport: ()=>{
40190
+ const tabbableCandidates = getSortedTabbableCandidates({
40191
+ tabbingDirection: 'backwards'
40192
+ });
40193
+ $054eb8030ebde76e$var$focusFirst(tabbableCandidates);
40194
+ }
40195
+ }));
40196
+ });
40197
+ /* -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$FOCUS_PROXY_NAME = 'ToastFocusProxy';
40198
+ const $054eb8030ebde76e$var$FocusProxy = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40199
+ const { __scopeToast: __scopeToast , onFocusFromOutsideViewport: onFocusFromOutsideViewport , ...proxyProps } = props;
40200
+ const context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$FOCUS_PROXY_NAME, __scopeToast);
40201
+ return /*#__PURE__*/ createElement($ea1ef594cf570d83$export$439d29a4e110a164, _extends({
40202
+ "aria-hidden": true,
40203
+ tabIndex: 0
40204
+ }, proxyProps, {
40205
+ ref: forwardedRef // Avoid page scrolling when focus is on the focus proxy
40206
+ ,
40207
+ style: {
40208
+ position: 'fixed'
40209
+ },
40210
+ onFocus: (event)=>{
40211
+ var _context$viewport;
40212
+ const prevFocusedElement = event.relatedTarget;
40213
+ const isFocusFromOutsideViewport = !((_context$viewport = context.viewport) !== null && _context$viewport !== void 0 && _context$viewport.contains(prevFocusedElement));
40214
+ if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();
40215
+ }
40216
+ }));
40217
+ });
40218
+ /* -------------------------------------------------------------------------------------------------
40219
+ * Toast
40220
+ * -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$TOAST_NAME = 'Toast';
40221
+ const $054eb8030ebde76e$var$TOAST_SWIPE_START = 'toast.swipeStart';
40222
+ const $054eb8030ebde76e$var$TOAST_SWIPE_MOVE = 'toast.swipeMove';
40223
+ const $054eb8030ebde76e$var$TOAST_SWIPE_CANCEL = 'toast.swipeCancel';
40224
+ const $054eb8030ebde76e$var$TOAST_SWIPE_END = 'toast.swipeEnd';
40225
+ const $054eb8030ebde76e$export$8d8dc7d5f743331b = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40226
+ const { forceMount: forceMount , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , ...toastProps } = props;
40227
+ const [open = true, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$2({
40228
+ prop: openProp,
40229
+ defaultProp: defaultOpen,
40230
+ onChange: onOpenChange
40231
+ });
40232
+ return /*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
40233
+ present: forceMount || open
40234
+ }, /*#__PURE__*/ createElement($054eb8030ebde76e$var$ToastImpl, _extends({
40235
+ open: open
40236
+ }, toastProps, {
40237
+ ref: forwardedRef,
40238
+ onClose: ()=>setOpen(false)
40239
+ ,
40240
+ onPause: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$3(props.onPause),
40241
+ onResume: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$3(props.onResume),
40242
+ onSwipeStart: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onSwipeStart, (event)=>{
40243
+ event.currentTarget.setAttribute('data-swipe', 'start');
40244
+ }),
40245
+ onSwipeMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onSwipeMove, (event)=>{
40246
+ const { x: x , y: y } = event.detail.delta;
40247
+ event.currentTarget.setAttribute('data-swipe', 'move');
40248
+ event.currentTarget.style.setProperty('--radix-toast-swipe-move-x', `${x}px`);
40249
+ event.currentTarget.style.setProperty('--radix-toast-swipe-move-y', `${y}px`);
40250
+ }),
40251
+ onSwipeCancel: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onSwipeCancel, (event)=>{
40252
+ event.currentTarget.setAttribute('data-swipe', 'cancel');
40253
+ event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');
40254
+ event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');
40255
+ event.currentTarget.style.removeProperty('--radix-toast-swipe-end-x');
40256
+ event.currentTarget.style.removeProperty('--radix-toast-swipe-end-y');
40257
+ }),
40258
+ onSwipeEnd: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onSwipeEnd, (event)=>{
40259
+ const { x: x , y: y } = event.detail.delta;
40260
+ event.currentTarget.setAttribute('data-swipe', 'end');
40261
+ event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');
40262
+ event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');
40263
+ event.currentTarget.style.setProperty('--radix-toast-swipe-end-x', `${x}px`);
40264
+ event.currentTarget.style.setProperty('--radix-toast-swipe-end-y', `${y}px`);
40265
+ setOpen(false);
40266
+ })
40267
+ })));
38792
40268
  });
40269
+ /* -----------------------------------------------------------------------------------------------*/ const [$054eb8030ebde76e$var$ToastInteractiveProvider, $054eb8030ebde76e$var$useToastInteractiveContext] = $054eb8030ebde76e$var$createToastContext($054eb8030ebde76e$var$TOAST_NAME, {
40270
+ onClose () {}
40271
+ });
40272
+ const $054eb8030ebde76e$var$ToastImpl = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40273
+ const { __scopeToast: __scopeToast , type: type = 'foreground' , duration: durationProp , open: open , onClose: onClose , onEscapeKeyDown: onEscapeKeyDown , onPause: onPause , onResume: onResume , onSwipeStart: onSwipeStart , onSwipeMove: onSwipeMove , onSwipeCancel: onSwipeCancel , onSwipeEnd: onSwipeEnd , ...toastProps } = props;
40274
+ const context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$TOAST_NAME, __scopeToast);
40275
+ const [node1, setNode] = useState(null);
40276
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$3(forwardedRef, (node)=>setNode(node)
40277
+ );
40278
+ const pointerStartRef = useRef(null);
40279
+ const swipeDeltaRef = useRef(null);
40280
+ const duration1 = durationProp || context.duration;
40281
+ const closeTimerStartTimeRef = useRef(0);
40282
+ const closeTimerRemainingTimeRef = useRef(duration1);
40283
+ const closeTimerRef = useRef(0);
40284
+ const { onToastAdd: onToastAdd , onToastRemove: onToastRemove } = context;
40285
+ const handleClose = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$3(()=>{
40286
+ var _context$viewport2;
40287
+ // focus viewport if focus is within toast to read the remaining toast
40288
+ // count to SR users and ensure focus isn't lost
40289
+ const isFocusInToast = node1 === null || node1 === void 0 ? void 0 : node1.contains(document.activeElement);
40290
+ if (isFocusInToast) (_context$viewport2 = context.viewport) === null || _context$viewport2 === void 0 || _context$viewport2.focus();
40291
+ onClose();
40292
+ });
40293
+ const startTimer = useCallback((duration)=>{
40294
+ if (!duration || duration === Infinity) return;
40295
+ window.clearTimeout(closeTimerRef.current);
40296
+ closeTimerStartTimeRef.current = new Date().getTime();
40297
+ closeTimerRef.current = window.setTimeout(handleClose, duration);
40298
+ }, [
40299
+ handleClose
40300
+ ]);
40301
+ useEffect(()=>{
40302
+ const viewport = context.viewport;
40303
+ if (viewport) {
40304
+ const handleResume = ()=>{
40305
+ startTimer(closeTimerRemainingTimeRef.current);
40306
+ onResume === null || onResume === void 0 || onResume();
40307
+ };
40308
+ const handlePause = ()=>{
40309
+ const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current;
40310
+ closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;
40311
+ window.clearTimeout(closeTimerRef.current);
40312
+ onPause === null || onPause === void 0 || onPause();
40313
+ };
40314
+ viewport.addEventListener($054eb8030ebde76e$var$VIEWPORT_PAUSE, handlePause);
40315
+ viewport.addEventListener($054eb8030ebde76e$var$VIEWPORT_RESUME, handleResume);
40316
+ return ()=>{
40317
+ viewport.removeEventListener($054eb8030ebde76e$var$VIEWPORT_PAUSE, handlePause);
40318
+ viewport.removeEventListener($054eb8030ebde76e$var$VIEWPORT_RESUME, handleResume);
40319
+ };
40320
+ }
40321
+ }, [
40322
+ context.viewport,
40323
+ duration1,
40324
+ onPause,
40325
+ onResume,
40326
+ startTimer
40327
+ ]); // start timer when toast opens or duration changes.
40328
+ // we include `open` in deps because closed !== unmounted when animating
40329
+ // so it could reopen before being completely unmounted
40330
+ useEffect(()=>{
40331
+ if (open && !context.isClosePausedRef.current) startTimer(duration1);
40332
+ }, [
40333
+ open,
40334
+ duration1,
40335
+ context.isClosePausedRef,
40336
+ startTimer
40337
+ ]);
40338
+ useEffect(()=>{
40339
+ onToastAdd();
40340
+ return ()=>onToastRemove()
40341
+ ;
40342
+ }, [
40343
+ onToastAdd,
40344
+ onToastRemove
40345
+ ]);
40346
+ const announceTextContent = useMemo(()=>{
40347
+ return node1 ? $054eb8030ebde76e$var$getAnnounceTextContent(node1) : null;
40348
+ }, [
40349
+ node1
40350
+ ]);
40351
+ if (!context.viewport) return null;
40352
+ return /*#__PURE__*/ createElement(Fragment, null, announceTextContent && /*#__PURE__*/ createElement($054eb8030ebde76e$var$ToastAnnounce, {
40353
+ __scopeToast: __scopeToast // Toasts are always role=status to avoid stuttering issues with role=alert in SRs.
40354
+ ,
40355
+ role: "status",
40356
+ "aria-live": type === 'foreground' ? 'assertive' : 'polite',
40357
+ "aria-atomic": true
40358
+ }, announceTextContent), /*#__PURE__*/ createElement($054eb8030ebde76e$var$ToastInteractiveProvider, {
40359
+ scope: __scopeToast,
40360
+ onClose: handleClose
40361
+ }, /*#__PURE__*/ reactDom.exports.createPortal(/*#__PURE__*/ createElement($054eb8030ebde76e$var$Collection.ItemSlot, {
40362
+ scope: __scopeToast
40363
+ }, /*#__PURE__*/ createElement($5cb92bef7577960e$export$be92b6f5f03c0fe9, {
40364
+ asChild: true,
40365
+ onEscapeKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(onEscapeKeyDown, ()=>{
40366
+ if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
40367
+ context.isFocusedToastEscapeKeyDownRef.current = false;
40368
+ })
40369
+ }, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.li, _extends({
40370
+ // Ensure toasts are announced as status list or status when focused
40371
+ role: "status",
40372
+ "aria-live": "off",
40373
+ "aria-atomic": true,
40374
+ tabIndex: 0,
40375
+ "data-state": open ? 'open' : 'closed',
40376
+ "data-swipe-direction": context.swipeDirection
40377
+ }, toastProps, {
40378
+ ref: composedRefs,
40379
+ style: {
40380
+ userSelect: 'none',
40381
+ touchAction: 'none',
40382
+ ...props.style
40383
+ },
40384
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onKeyDown, (event)=>{
40385
+ if (event.key !== 'Escape') return;
40386
+ onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event.nativeEvent);
40387
+ if (!event.nativeEvent.defaultPrevented) {
40388
+ context.isFocusedToastEscapeKeyDownRef.current = true;
40389
+ handleClose();
40390
+ }
40391
+ }),
40392
+ onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onPointerDown, (event)=>{
40393
+ if (event.button !== 0) return;
40394
+ pointerStartRef.current = {
40395
+ x: event.clientX,
40396
+ y: event.clientY
40397
+ };
40398
+ }),
40399
+ onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onPointerMove, (event)=>{
40400
+ if (!pointerStartRef.current) return;
40401
+ const x = event.clientX - pointerStartRef.current.x;
40402
+ const y = event.clientY - pointerStartRef.current.y;
40403
+ const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);
40404
+ const isHorizontalSwipe = [
40405
+ 'left',
40406
+ 'right'
40407
+ ].includes(context.swipeDirection);
40408
+ const clamp = [
40409
+ 'left',
40410
+ 'up'
40411
+ ].includes(context.swipeDirection) ? Math.min : Math.max;
40412
+ const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;
40413
+ const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;
40414
+ const moveStartBuffer = event.pointerType === 'touch' ? 10 : 2;
40415
+ const delta = {
40416
+ x: clampedX,
40417
+ y: clampedY
40418
+ };
40419
+ const eventDetail = {
40420
+ originalEvent: event,
40421
+ delta: delta
40422
+ };
40423
+ if (hasSwipeMoveStarted) {
40424
+ swipeDeltaRef.current = delta;
40425
+ $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {
40426
+ discrete: false
40427
+ });
40428
+ } else if ($054eb8030ebde76e$var$isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {
40429
+ swipeDeltaRef.current = delta;
40430
+ $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_START, onSwipeStart, eventDetail, {
40431
+ discrete: false
40432
+ });
40433
+ event.target.setPointerCapture(event.pointerId);
40434
+ } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) // User is swiping in wrong direction so we disable swipe gesture
40435
+ // for the current pointer down interaction
40436
+ pointerStartRef.current = null;
40437
+ }),
40438
+ onPointerUp: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onPointerUp, (event1)=>{
40439
+ const delta = swipeDeltaRef.current;
40440
+ const target = event1.target;
40441
+ if (target.hasPointerCapture(event1.pointerId)) target.releasePointerCapture(event1.pointerId);
40442
+ swipeDeltaRef.current = null;
40443
+ pointerStartRef.current = null;
40444
+ if (delta) {
40445
+ const toast = event1.currentTarget;
40446
+ const eventDetail = {
40447
+ originalEvent: event1,
40448
+ delta: delta
40449
+ };
40450
+ if ($054eb8030ebde76e$var$isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_END, onSwipeEnd, eventDetail, {
40451
+ discrete: true
40452
+ });
40453
+ else $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_CANCEL, onSwipeCancel, eventDetail, {
40454
+ discrete: true
40455
+ });
40456
+ // Prevent click event from triggering on items within the toast when
40457
+ // pointer up is part of a swipe gesture
40458
+ toast.addEventListener('click', (event)=>event.preventDefault()
40459
+ , {
40460
+ once: true
40461
+ });
40462
+ }
40463
+ })
40464
+ })))), context.viewport)));
40465
+ });
40466
+ $054eb8030ebde76e$var$ToastImpl.propTypes = {
40467
+ type (props) {
40468
+ if (props.type && ![
40469
+ 'foreground',
40470
+ 'background'
40471
+ ].includes(props.type)) {
40472
+ const error = `Invalid prop \`type\` supplied to \`${$054eb8030ebde76e$var$TOAST_NAME}\`. Expected \`foreground | background\`.`;
40473
+ return new Error(error);
40474
+ }
40475
+ return null;
40476
+ }
40477
+ };
40478
+ /* -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$ToastAnnounce = (props)=>{
40479
+ const { __scopeToast: __scopeToast , children: children , ...announceProps } = props;
40480
+ const context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$TOAST_NAME, __scopeToast);
40481
+ const [renderAnnounceText, setRenderAnnounceText] = useState(false);
40482
+ const [isAnnounced, setIsAnnounced] = useState(false); // render text content in the next frame to ensure toast is announced in NVDA
40483
+ $054eb8030ebde76e$var$useNextFrame(()=>setRenderAnnounceText(true)
40484
+ ); // cleanup after announcing
40485
+ useEffect(()=>{
40486
+ const timer = window.setTimeout(()=>setIsAnnounced(true)
40487
+ , 1000);
40488
+ return ()=>window.clearTimeout(timer)
40489
+ ;
40490
+ }, []);
40491
+ return isAnnounced ? null : /*#__PURE__*/ createElement($f1701beae083dbae$export$602eac185826482c$1, {
40492
+ asChild: true
40493
+ }, /*#__PURE__*/ createElement($ea1ef594cf570d83$export$439d29a4e110a164, announceProps, renderAnnounceText && /*#__PURE__*/ createElement(Fragment, null, context.label, " ", children)));
40494
+ };
40495
+ const $054eb8030ebde76e$export$16d42d7c29b95a4 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40496
+ const { __scopeToast: __scopeToast , ...titleProps } = props;
40497
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({}, titleProps, {
40498
+ ref: forwardedRef
40499
+ }));
40500
+ });
40501
+ /* -------------------------------------------------------------------------------------------------
40502
+ * ToastAction
40503
+ * -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$ACTION_NAME = 'ToastAction';
40504
+ const $054eb8030ebde76e$export$3019feecfda683d2 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40505
+ const { altText: altText , ...actionProps } = props;
40506
+ if (!altText) return null;
40507
+ return /*#__PURE__*/ createElement($054eb8030ebde76e$var$ToastAnnounceExclude, {
40508
+ altText: altText,
40509
+ asChild: true
40510
+ }, /*#__PURE__*/ createElement($054eb8030ebde76e$export$811e70f61c205839, _extends({}, actionProps, {
40511
+ ref: forwardedRef
40512
+ })));
40513
+ });
40514
+ $054eb8030ebde76e$export$3019feecfda683d2.propTypes = {
40515
+ altText (props) {
40516
+ if (!props.altText) return new Error(`Missing prop \`altText\` expected on \`${$054eb8030ebde76e$var$ACTION_NAME}\``);
40517
+ return null;
40518
+ }
40519
+ };
40520
+ /* -------------------------------------------------------------------------------------------------
40521
+ * ToastClose
40522
+ * -----------------------------------------------------------------------------------------------*/ const $054eb8030ebde76e$var$CLOSE_NAME = 'ToastClose';
40523
+ const $054eb8030ebde76e$export$811e70f61c205839 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40524
+ const { __scopeToast: __scopeToast , ...closeProps } = props;
40525
+ const interactiveContext = $054eb8030ebde76e$var$useToastInteractiveContext($054eb8030ebde76e$var$CLOSE_NAME, __scopeToast);
40526
+ return /*#__PURE__*/ createElement($054eb8030ebde76e$var$ToastAnnounceExclude, {
40527
+ asChild: true
40528
+ }, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.button, _extends({
40529
+ type: "button"
40530
+ }, closeProps, {
40531
+ ref: forwardedRef,
40532
+ onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$2(props.onClick, interactiveContext.onClose)
40533
+ })));
40534
+ });
40535
+ /* ---------------------------------------------------------------------------------------------- */ const $054eb8030ebde76e$var$ToastAnnounceExclude = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
40536
+ const { __scopeToast: __scopeToast , altText: altText , ...announceExcludeProps } = props;
40537
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$4.div, _extends({
40538
+ "data-radix-toast-announce-exclude": "",
40539
+ "data-radix-toast-announce-alt": altText || undefined
40540
+ }, announceExcludeProps, {
40541
+ ref: forwardedRef
40542
+ }));
40543
+ });
40544
+ function $054eb8030ebde76e$var$getAnnounceTextContent(container) {
40545
+ const textContent = [];
40546
+ const childNodes = Array.from(container.childNodes);
40547
+ childNodes.forEach((node)=>{
40548
+ if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
40549
+ if ($054eb8030ebde76e$var$isHTMLElement(node)) {
40550
+ const isHidden = node.ariaHidden || node.hidden || node.style.display === 'none';
40551
+ const isExcluded = node.dataset.radixToastAnnounceExclude === '';
40552
+ if (!isHidden) {
40553
+ if (isExcluded) {
40554
+ const altText = node.dataset.radixToastAnnounceAlt;
40555
+ if (altText) textContent.push(altText);
40556
+ } else textContent.push(...$054eb8030ebde76e$var$getAnnounceTextContent(node));
40557
+ }
40558
+ }
40559
+ }); // We return a collection of text rather than a single concatenated string.
40560
+ // This allows SR VO to naturally pause break between nodes while announcing.
40561
+ return textContent;
40562
+ }
40563
+ /* ---------------------------------------------------------------------------------------------- */ function $054eb8030ebde76e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
40564
+ const currentTarget = detail.originalEvent.currentTarget;
40565
+ const event = new CustomEvent(name, {
40566
+ bubbles: true,
40567
+ cancelable: true,
40568
+ detail: detail
40569
+ });
40570
+ if (handler) currentTarget.addEventListener(name, handler, {
40571
+ once: true
40572
+ });
40573
+ if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f$1(currentTarget, event);
40574
+ else currentTarget.dispatchEvent(event);
40575
+ }
40576
+ const $054eb8030ebde76e$var$isDeltaInDirection = (delta, direction, threshold = 0)=>{
40577
+ const deltaX = Math.abs(delta.x);
40578
+ const deltaY = Math.abs(delta.y);
40579
+ const isDeltaX = deltaX > deltaY;
40580
+ if (direction === 'left' || direction === 'right') return isDeltaX && deltaX > threshold;
40581
+ else return !isDeltaX && deltaY > threshold;
40582
+ };
40583
+ function $054eb8030ebde76e$var$useNextFrame(callback = ()=>{}) {
40584
+ const fn = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$3(callback);
40585
+ $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
40586
+ let raf1 = 0;
40587
+ let raf2 = 0;
40588
+ raf1 = window.requestAnimationFrame(()=>raf2 = window.requestAnimationFrame(fn)
40589
+ );
40590
+ return ()=>{
40591
+ window.cancelAnimationFrame(raf1);
40592
+ window.cancelAnimationFrame(raf2);
40593
+ };
40594
+ }, [
40595
+ fn
40596
+ ]);
40597
+ }
40598
+ function $054eb8030ebde76e$var$isHTMLElement(node) {
40599
+ return node.nodeType === node.ELEMENT_NODE;
40600
+ }
40601
+ /**
40602
+ * Returns a list of potential tabbable candidates.
40603
+ *
40604
+ * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
40605
+ * elements are not visible. This cannot be worked out easily by just reading a property, but rather
40606
+ * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
40607
+ *
40608
+ * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
40609
+ * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
40610
+ */ function $054eb8030ebde76e$var$getTabbableCandidates(container) {
40611
+ const nodes = [];
40612
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
40613
+ acceptNode: (node)=>{
40614
+ const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
40615
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
40616
+ // runtime's understanding of tabbability, so this automatically accounts
40617
+ // for any kind of element that could be tabbed to.
40618
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
40619
+ }
40620
+ });
40621
+ while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
40622
+ // hinders accessibility to have tab order different from visual order.
40623
+ return nodes;
40624
+ }
40625
+ function $054eb8030ebde76e$var$focusFirst(candidates) {
40626
+ const previouslyFocusedElement = document.activeElement;
40627
+ return candidates.some((candidate)=>{
40628
+ // if focus is already where we want to go, we don't want to keep going through the candidates
40629
+ if (candidate === previouslyFocusedElement) return true;
40630
+ candidate.focus();
40631
+ return document.activeElement !== previouslyFocusedElement;
40632
+ });
40633
+ }
40634
+ const $054eb8030ebde76e$export$2881499e37b75b9a = $054eb8030ebde76e$export$f5d03d415824e0e;
40635
+ const $054eb8030ebde76e$export$d5c6c08dc2d3ca7 = $054eb8030ebde76e$export$6192c2425ecfd989;
40636
+ const $054eb8030ebde76e$export$be92b6f5f03c0fe9 = $054eb8030ebde76e$export$8d8dc7d5f743331b;
40637
+ const $054eb8030ebde76e$export$f99233281efd08a0 = $054eb8030ebde76e$export$16d42d7c29b95a4;
40638
+ const $054eb8030ebde76e$export$e19cd5f9376f8cee = $054eb8030ebde76e$export$3019feecfda683d2;
40639
+ const $054eb8030ebde76e$export$f39c2d165cd861fe = $054eb8030ebde76e$export$811e70f61c205839;
40640
+
40641
+ var ToastNotification = function (_a) {
40642
+ var link = _a.link, title = _a.title, isOpen = _a.isOpen, onOpenChange = _a.onOpenChange, _b = _a.isStatusIconVisible, isStatusIconVisible = _b === void 0 ? true : _b, _c = _a.isCloseButtonVisible, isCloseButtonVisible = _c === void 0 ? true : _c, _d = _a.status, status = _d === void 0 ? "general" : _d, props = __rest$2(_a, ["link", "title", "isOpen", "onOpenChange", "isStatusIconVisible", "isCloseButtonVisible", "status"]);
40643
+ var statusIcons = {
40644
+ general: BtIconNotification_2,
40645
+ error: BtIconAlertTriangle_2,
40646
+ warning: BtIconAlert_2,
40647
+ success: BtIconTick_2
40648
+ };
40649
+ var handleLinkClick = function (handler) { return function (event) {
40650
+ event.preventDefault();
40651
+ handler();
40652
+ }; };
40653
+ return (React__default.createElement($054eb8030ebde76e$export$be92b6f5f03c0fe9, __assign$2({ className: "arc-Toast-root", open: isOpen, onOpenChange: onOpenChange }, filterDataAttrs(props)),
40654
+ React__default.createElement("div", { "data-testid": "toast-notification-wrapper", className: classNames("arc-Toast", "arc-Toast-status--".concat(status)) },
40655
+ isStatusIconVisible && (React__default.createElement("div", { "data-testid": "status-icon", className: "arc-Toast-icon" },
40656
+ React__default.createElement(Icon, { size: 24, icon: statusIcons[status] }))),
40657
+ React__default.createElement($054eb8030ebde76e$export$f99233281efd08a0, { className: "arc-Toast-title" },
40658
+ React__default.createElement("span", null, title)),
40659
+ link && (React__default.createElement($054eb8030ebde76e$export$e19cd5f9376f8cee, { className: "arc-Toast-action", asChild: true, altText: link.text },
40660
+ React__default.createElement("a", __assign$2({ className: "arc-Toast-link", href: link.href, "aria-label": link.ariaLabel }, (link.onClick && { onClick: handleLinkClick(link.onClick) })), link.text))),
40661
+ isCloseButtonVisible && !link && (React__default.createElement($054eb8030ebde76e$export$f39c2d165cd861fe, { className: "arc-Toast-dismiss", "aria-label": "Close" },
40662
+ React__default.createElement(Icon, { icon: BtIconCrossAlt2Px_2, size: 24 }))))));
40663
+ };
40664
+
40665
+ /** Use `Toast` to display temporary messages at the bottom of the viewport. */
40666
+ var Toast = function (_a) {
40667
+ var children = _a.children, _b = _a.colorScheme, colorScheme = _b === void 0 ? "default" : _b, props = __rest$2(_a, ["children", "colorScheme"]);
40668
+ return (React__default.createElement($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", duration: 6000 },
40669
+ React__default.createElement($054eb8030ebde76e$export$d5c6c08dc2d3ca7, { asChild: true, className: "arc-Toast-viewport" },
40670
+ React__default.createElement("div", __assign$2({ className: "arc-Toast-pathway--".concat(colorScheme) }, filterDataAttrs(props)), children))));
40671
+ };
40672
+ Toast.Notification = ToastNotification;
40673
+ ToastNotification.displayName = "Toast.Notification";
38793
40674
 
38794
40675
  /** Use `Truncate` component to shorten text with an ellipsis. Add a `title` attribute to the truncated element so the full text remains accessible. */
38795
40676
  var Truncate = function (_a) {
@@ -38797,5 +40678,29 @@ var Truncate = function (_a) {
38797
40678
  return (React__default.createElement("div", __assign$2({ className: "arc-Truncate", style: { maxWidth: "".concat(maxWidth, "%") }, title: title }, filterDataAttrs(props)), children));
38798
40679
  };
38799
40680
 
38800
- export { Align, Badge, Base, BrandLogo, Breadcrumbs, Button, Card, Checkbox, Clock, Clock_rehydrator as ClockRehydrator, Columns, Curve, Disclosure, Elevation, Filter, FormControl, Group, Heading, Icon, Image, Markup, Modal, Poster, RadioGroup, Rule, Section, Select, SiteFooter, SiteFooter_rehydrator as SiteFooterRehydrator, SiteHeader, SiteHeaderRehydrator, Surface, Context$3 as SurfaceContext, Switch, Tag, Text, TextArea, TextInput, Truncate, UniversalHeader, VerticalSpace, VisuallyHidden };
40681
+ /**
40682
+ * Use `UniversalHeader` to display a group-level page header.
40683
+ */
40684
+ var UniversalHeader = function (_a) {
40685
+ var children = _a.children, props = __rest$2(_a, ["children"]);
40686
+ useEffect(function () {
40687
+ React__default.Children.map(children, function (item) {
40688
+ if (item && item.type !== UniversalHeaderItem) {
40689
+ throw new Error("Illegal child passed to <UniversalHeader />. Ensure to only use <UniversalHeader.Item />.");
40690
+ }
40691
+ });
40692
+ }, [children]);
40693
+ return (React__default.createElement("nav", __assign$2({ className: "arc-UniversalHeader" }, filterDataAttrs(props)),
40694
+ React__default.createElement(Surface, { background: "light" },
40695
+ React__default.createElement("ul", { className: "arc-UniversalHeader-items" }, children))));
40696
+ };
40697
+ var UniversalHeaderItem = function (_a) {
40698
+ var children = _a.children, href = _a.href, props = __rest$2(_a, ["children", "href"]);
40699
+ return (React__default.createElement("li", __assign$2({}, filterDataAttrs(props)),
40700
+ React__default.createElement("a", { className: "arc-UniversalHeader-link", href: href }, children)));
40701
+ };
40702
+ UniversalHeaderItem.displayName = "UniversalHeader.Item";
40703
+ UniversalHeader.Item = UniversalHeaderItem;
40704
+
40705
+ export { Alert, Align, Badge, Base, Box, BrandLogo, Breadcrumbs, Button, Card, Checkbox, Clock, Clock_rehydrator as ClockRehydrator, Columns, Curve, Disclosure, DisclosureMini, Elevation, Filter, FormControl, Group, Heading, Icon, Image, Markup, MediaCard, Modal, Pagination, PaginationSimple, Poster, ProgressBar, ProgressStepper, RadioGroup, Rule, ScrollToTop, Section, Select, SiteFooter, SiteFooter_rehydrator as SiteFooterRehydrator, SiteHeader, SiteHeaderRehydrator, Surface, Context$3 as SurfaceContext, Switch, Tabs, Tag, Text, TextArea, TextInput, Toast, Truncate, UniversalHeader, VerticalSpace, VisuallyHidden };
38801
40706
  //# sourceMappingURL=index.es.js.map