@bug-on/m3-expressive 1.2.4 → 1.2.6

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 (51) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +128 -41
  3. package/dist/buttons.d.mts +1 -1
  4. package/dist/buttons.d.ts +1 -1
  5. package/dist/buttons.js +59 -45
  6. package/dist/buttons.js.map +1 -1
  7. package/dist/buttons.mjs +59 -45
  8. package/dist/buttons.mjs.map +1 -1
  9. package/dist/core.js +54 -40
  10. package/dist/core.js.map +1 -1
  11. package/dist/core.mjs +54 -40
  12. package/dist/core.mjs.map +1 -1
  13. package/dist/feedback.js +53 -39
  14. package/dist/feedback.js.map +1 -1
  15. package/dist/feedback.mjs +53 -39
  16. package/dist/feedback.mjs.map +1 -1
  17. package/dist/forms.d.mts +2 -2
  18. package/dist/forms.d.ts +2 -2
  19. package/dist/index.d.mts +77 -6
  20. package/dist/index.d.ts +77 -6
  21. package/dist/index.js +5607 -5429
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +5506 -5329
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/layout.js +60 -46
  26. package/dist/layout.js.map +1 -1
  27. package/dist/layout.mjs +60 -46
  28. package/dist/layout.mjs.map +1 -1
  29. package/dist/navigation.d.mts +27 -7
  30. package/dist/navigation.d.ts +27 -7
  31. package/dist/navigation.js +481 -474
  32. package/dist/navigation.js.map +1 -1
  33. package/dist/navigation.mjs +473 -466
  34. package/dist/navigation.mjs.map +1 -1
  35. package/dist/overlays.d.mts +2 -2
  36. package/dist/overlays.d.ts +2 -2
  37. package/dist/overlays.js +53 -39
  38. package/dist/overlays.js.map +1 -1
  39. package/dist/overlays.mjs +53 -39
  40. package/dist/overlays.mjs.map +1 -1
  41. package/dist/pickers.js +53 -39
  42. package/dist/pickers.js.map +1 -1
  43. package/dist/pickers.mjs +53 -39
  44. package/dist/pickers.mjs.map +1 -1
  45. package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-DdEZR6Vl.d.ts} +1 -1
  46. package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-Dgjt739k.d.mts} +1 -1
  47. package/dist/{split-button-trailing-uncheckable-DtxrcLxH.d.ts → split-button-trailing-uncheckable--BhNTEJw.d.ts} +5 -5
  48. package/dist/{split-button-trailing-uncheckable-BTWfIN2k.d.mts → split-button-trailing-uncheckable-DPJL3bO6.d.mts} +5 -5
  49. package/dist/{text-field-T4Rg-9Bw.d.mts → text-field-DWC7qOvp.d.mts} +128 -128
  50. package/dist/{text-field-T4Rg-9Bw.d.ts → text-field-DWC7qOvp.d.ts} +128 -128
  51. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React36 = require('react');
4
+ var React37 = require('react');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
31
31
  return Object.freeze(n);
32
32
  }
33
33
 
34
- var React36__namespace = /*#__PURE__*/_interopNamespace(React36);
34
+ var React37__namespace = /*#__PURE__*/_interopNamespace(React37);
35
35
  var RxContextMenu__namespace = /*#__PURE__*/_interopNamespace(RxContextMenu);
36
36
  var DropdownMenu__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu);
37
37
 
@@ -328,9 +328,10 @@ var SUBMENU_CONTAINER_VARIANTS = {
328
328
  transition: FAST_EFFECTS_TRANSITION
329
329
  }
330
330
  };
331
- var MenuContext = React36__namespace.createContext({
331
+ var MenuContext = React37__namespace.createContext({
332
332
  variant: "baseline",
333
333
  colorVariant: "standard",
334
+ density: 0,
334
335
  menuPrimitive: "dropdown",
335
336
  open: false,
336
337
  onOpenChange: () => {
@@ -339,29 +340,46 @@ var MenuContext = React36__namespace.createContext({
339
340
  function MenuProvider({
340
341
  variant = "baseline",
341
342
  colorVariant = "standard",
343
+ density = 0,
342
344
  menuPrimitive = "dropdown",
343
345
  open,
344
346
  onOpenChange,
345
347
  children
346
348
  }) {
347
- const value = React36__namespace.useMemo(
348
- () => ({ variant, colorVariant, menuPrimitive, open, onOpenChange }),
349
- [variant, colorVariant, menuPrimitive, open, onOpenChange]
349
+ const value = React37__namespace.useMemo(
350
+ () => ({
351
+ variant,
352
+ colorVariant,
353
+ density,
354
+ menuPrimitive,
355
+ open,
356
+ onOpenChange
357
+ }),
358
+ [variant, colorVariant, density, menuPrimitive, open, onOpenChange]
350
359
  );
351
360
  return /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children });
352
361
  }
353
362
  function useMenuContext() {
354
- const ctx = React36__namespace.useContext(MenuContext);
355
- return React36__namespace.useMemo(
356
- () => __spreadProps(__spreadValues({}, ctx), {
357
- isStatic: ctx.menuPrimitive === "static",
358
- menuVariant: ctx.variant
363
+ const ctx = React37__namespace.useContext(MenuContext);
364
+ return React37__namespace.useMemo(
365
+ () => Object.assign(ctx, {
366
+ get isStatic() {
367
+ return ctx.menuPrimitive === "static";
368
+ },
369
+ get menuVariant() {
370
+ return ctx.variant;
371
+ }
359
372
  }),
360
373
  [ctx]
361
374
  );
362
375
  }
363
376
  var MENU_BASELINE_ITEM_HORIZONTAL_PADDING = "px-3";
364
377
  var MENU_ITEM_MIN_HEIGHT = "min-h-11";
378
+ var DENSITY_MIN_HEIGHT = {
379
+ 0: "min-h-12",
380
+ "-2": "min-h-10",
381
+ "-4": "min-h-8"
382
+ };
365
383
  var MENU_MIN_WIDTH = "min-w-28";
366
384
  var MENU_MAX_WIDTH = "max-w-70";
367
385
  var MENU_GROUP_GAP = "gap-0.5";
@@ -394,7 +412,7 @@ var ITEM_SHAPE_CLASSES = {
394
412
  leading: "rounded-t-[12px] rounded-b-[4px]",
395
413
  middle: "rounded-[4px]",
396
414
  trailing: "rounded-t-[4px] rounded-b-[12px]",
397
- standalone: "rounded-[4px]",
415
+ standalone: "rounded-[12px]",
398
416
  selected: "rounded-[12px]"
399
417
  };
400
418
  var STANDARD_COLORS = {
@@ -411,9 +429,9 @@ var STANDARD_COLORS = {
411
429
  /** Trailing icon color (StandardMenuTokens.ItemTrailingIconColor) */
412
430
  trailingIconColor: "text-m3-on-surface-variant",
413
431
  /** Hover state layer (OnSurface @ 8% opacity) */
414
- hoverLayer: "hover:bg-m3-on-surface/8",
432
+ hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8",
415
433
  /** Focus state layer (OnSurface @ 12% opacity) */
416
- focusLayer: "focus:bg-m3-on-surface/12",
434
+ focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8",
417
435
  /** Selected item background (StandardMenuTokens.ItemSelectedContainerColor) */
418
436
  selectedBg: "bg-m3-tertiary-container",
419
437
  /** Selected item text (StandardMenuTokens.ItemSelectedLabelTextColor) */
@@ -429,8 +447,8 @@ var BASELINE_COLORS = {
429
447
  iconColor: "text-m3-on-surface-variant",
430
448
  supportingTextColor: "text-m3-on-surface-variant",
431
449
  trailingIconColor: "text-m3-on-surface-variant",
432
- hoverLayer: "hover:bg-m3-on-surface/8",
433
- focusLayer: "focus:bg-m3-on-surface/12",
450
+ hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8",
451
+ focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8",
434
452
  selectedBg: "bg-m3-secondary-container",
435
453
  selectedText: "text-m3-on-secondary-container",
436
454
  selectedIcon: "text-m3-on-secondary-container"};
@@ -448,9 +466,9 @@ var VIBRANT_COLORS = {
448
466
  /** Trailing icon color (VibrantMenuTokens.ItemTrailingIconColor) */
449
467
  trailingIconColor: "text-m3-on-tertiary-container",
450
468
  /** Hover state layer (OnTertiaryContainer @ 8% opacity) */
451
- hoverLayer: "hover:bg-m3-on-tertiary-container/8",
469
+ hoverLayer: "hover:bg-m3-on-tertiary-container/8 data-[highlighted]:bg-m3-on-tertiary-container/8",
452
470
  /** Focus state layer (OnTertiaryContainer @ 12% opacity) */
453
- focusLayer: "focus:bg-m3-on-tertiary-container/12",
471
+ focusLayer: "focus:bg-m3-on-tertiary-container/12 data-[highlighted]:bg-m3-on-tertiary-container/8",
454
472
  /** Selected item background (VibrantMenuTokens.ItemSelectedContainerColor = Tertiary) */
455
473
  selectedBg: "bg-m3-tertiary",
456
474
  /** Selected item text (VibrantMenuTokens.ItemSelectedLabelTextColor = OnTertiary) */
@@ -462,12 +480,29 @@ var VIBRANT_COLORS = {
462
480
  };
463
481
  var DIVIDER_PADDING = "mx-3 my-0.5";
464
482
  var DIVIDER_COLOR = "bg-m3-outline-variant";
483
+ function flattenChildren(nodes) {
484
+ return React37__namespace.Children.toArray(nodes).reduce(
485
+ (acc, child) => {
486
+ if (!React37__namespace.isValidElement(child)) return acc;
487
+ if (child.type === React37__namespace.Fragment) {
488
+ return acc.concat(
489
+ flattenChildren(
490
+ child.props.children
491
+ )
492
+ );
493
+ }
494
+ acc.push(child);
495
+ return acc;
496
+ },
497
+ []
498
+ );
499
+ }
465
500
  function ContextMenu({
466
501
  children,
467
502
  variant = "baseline",
468
503
  colorVariant = "standard"
469
504
  }) {
470
- const [open, setOpen] = React36__namespace.useState(false);
505
+ const [open, setOpen] = React37__namespace.useState(false);
471
506
  return /* @__PURE__ */ jsxRuntime.jsx(
472
507
  MenuProvider,
473
508
  {
@@ -481,12 +516,12 @@ function ContextMenu({
481
516
  );
482
517
  }
483
518
  ContextMenu.displayName = "ContextMenu";
484
- var ContextMenuTrigger = React36__namespace.forwardRef((_a, ref) => {
519
+ var ContextMenuTrigger = React37__namespace.forwardRef((_a, ref) => {
485
520
  var _b = _a, { children, asChild = true } = _b, props = __objRest(_b, ["children", "asChild"]);
486
521
  return /* @__PURE__ */ jsxRuntime.jsx(RxContextMenu__namespace.Trigger, __spreadProps(__spreadValues({ ref, asChild }, props), { children }));
487
522
  });
488
523
  ContextMenuTrigger.displayName = "ContextMenuTrigger";
489
- var ContextMenuContent = React36__namespace.forwardRef(
524
+ var ContextMenuContent = React37__namespace.forwardRef(
490
525
  (_a, ref) => {
491
526
  var _b = _a, {
492
527
  children,
@@ -509,71 +544,51 @@ var ContextMenuContent = React36__namespace.forwardRef(
509
544
  const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
510
545
  const colors = variant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
511
546
  const isExpressiveGap = variant === "expressive" && separatorStyle === "gap";
512
- const containerClassName = variant === "expressive" ? cn(
513
- "z-50 flex flex-col w-full",
514
- MENU_MIN_WIDTH,
515
- MENU_MAX_WIDTH,
516
- isExpressiveGap ? MENU_GROUP_GAP : "",
517
- isExpressiveGap ? "bg-transparent" : colors.containerBg,
518
- isExpressiveGap ? "" : "rounded-2xl",
519
- isExpressiveGap ? "" : "elevation-2",
520
- hasOverflow || isExpressiveGap ? "overflow-visible" : "overflow-hidden",
521
- "outline-none",
522
- className
523
- ) : cn(
524
- "z-50 flex flex-col",
525
- MENU_MIN_WIDTH,
526
- MENU_MAX_WIDTH,
527
- MENU_POPUP_PADDING_Y,
528
- MENU_GROUP_GAP,
529
- colors.containerBg,
530
- MENU_CONTAINER_SHAPE,
531
- "elevation-2",
532
- hasOverflow ? "overflow-visible" : "overflow-hidden",
533
- "outline-none",
534
- className
547
+ const containerClassName = React37__namespace.useMemo(
548
+ () => variant === "expressive" ? cn(
549
+ "z-50 flex flex-col w-full",
550
+ MENU_MIN_WIDTH,
551
+ MENU_MAX_WIDTH,
552
+ isExpressiveGap ? MENU_GROUP_GAP : "",
553
+ isExpressiveGap ? "bg-transparent" : colors.containerBg,
554
+ isExpressiveGap ? "" : "rounded-2xl",
555
+ isExpressiveGap ? "" : "elevation-2",
556
+ hasOverflow || isExpressiveGap ? "overflow-visible" : "overflow-hidden",
557
+ "outline-none",
558
+ className
559
+ ) : cn(
560
+ "z-50 flex flex-col",
561
+ MENU_MIN_WIDTH,
562
+ MENU_MAX_WIDTH,
563
+ MENU_POPUP_PADDING_Y,
564
+ MENU_GROUP_GAP,
565
+ colors.containerBg,
566
+ MENU_CONTAINER_SHAPE,
567
+ "elevation-2",
568
+ hasOverflow ? "overflow-visible" : "overflow-hidden",
569
+ "outline-none",
570
+ className
571
+ ),
572
+ [variant, isExpressiveGap, hasOverflow, className, colors.containerBg]
535
573
  );
536
- const flattenChildren = (nodes) => {
537
- return React36__namespace.Children.toArray(nodes).reduce(
538
- (acc, child) => {
539
- if (React36__namespace.isValidElement(child)) {
540
- if (child.type === React36__namespace.Fragment) {
541
- return acc.concat(
542
- flattenChildren(
543
- child.props.children
544
- )
545
- );
546
- }
547
- acc.push(child);
548
- }
549
- return acc;
550
- },
551
- []
552
- );
553
- };
554
- let renderedChildren = children;
555
- if (variant === "expressive") {
574
+ const renderedChildren = React37__namespace.useMemo(() => {
575
+ if (variant !== "expressive") return children;
556
576
  const validChildren = flattenChildren(children);
557
577
  const groupCount = validChildren.length;
558
- const enhancedChildren = validChildren.map(
559
- (child, i) => React36__namespace.cloneElement(
578
+ const enhanced = validChildren.map(
579
+ (child, i) => React37__namespace.cloneElement(
560
580
  child,
561
- {
562
- index: i,
563
- count: groupCount,
564
- isGapVariant: isExpressiveGap
565
- }
581
+ { index: i, count: groupCount, isGapVariant: isExpressiveGap }
566
582
  )
567
583
  );
568
- renderedChildren = separatorStyle === "divider" ? enhancedChildren.reduce((acc, child, i) => {
584
+ if (separatorStyle !== "divider") return enhanced;
585
+ return enhanced.reduce((acc, child, i) => {
569
586
  if (i > 0) {
570
587
  acc.push(
571
588
  /* @__PURE__ */ jsxRuntime.jsx(
572
589
  "hr",
573
590
  {
574
- className: cn(
575
- "mx-3 my-0.5 h-px border-0 bg-m3-outline-variant"
576
- )
591
+ className: cn("mx-3 my-0.5 h-px border-0 bg-m3-outline-variant")
577
592
  },
578
593
  `divider-${child.key || i}`
579
594
  )
@@ -581,8 +596,8 @@ var ContextMenuContent = React36__namespace.forwardRef(
581
596
  }
582
597
  acc.push(child);
583
598
  return acc;
584
- }, []) : enhancedChildren;
585
- }
599
+ }, []);
600
+ }, [children, variant, isExpressiveGap, separatorStyle]);
586
601
  return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(RxContextMenu__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(RxContextMenu__namespace.Content, __spreadProps(__spreadValues({ ref, asChild: true, forceMount: true }, props), { children: /* @__PURE__ */ jsxRuntime.jsx(
587
602
  react.m.div,
588
603
  {
@@ -606,6 +621,7 @@ function Menu(_a) {
606
621
  variant,
607
622
  menuVariant,
608
623
  colorVariant = "standard",
624
+ density = 0,
609
625
  open: controlledOpen,
610
626
  onOpenChange: controlledOnOpenChange,
611
627
  defaultOpen
@@ -614,18 +630,19 @@ function Menu(_a) {
614
630
  "variant",
615
631
  "menuVariant",
616
632
  "colorVariant",
633
+ "density",
617
634
  "open",
618
635
  "onOpenChange",
619
636
  "defaultOpen"
620
637
  ]);
621
638
  var _a2;
622
639
  const resolvedVariant = (_a2 = variant != null ? variant : menuVariant) != null ? _a2 : "baseline";
623
- const [internalOpen, setInternalOpen] = React36__namespace.useState(
640
+ const [internalOpen, setInternalOpen] = React37__namespace.useState(
624
641
  () => defaultOpen != null ? defaultOpen : false
625
642
  );
626
643
  const isControlled = controlledOpen !== void 0;
627
644
  const open = isControlled ? controlledOpen : internalOpen;
628
- const handleOpenChange = React36__namespace.useCallback(
645
+ const handleOpenChange = React37__namespace.useCallback(
629
646
  (next) => {
630
647
  if (!isControlled) setInternalOpen(next);
631
648
  controlledOnOpenChange == null ? void 0 : controlledOnOpenChange(next);
@@ -637,6 +654,7 @@ function Menu(_a) {
637
654
  {
638
655
  variant: resolvedVariant,
639
656
  colorVariant,
657
+ density,
640
658
  open,
641
659
  onOpenChange: handleOpenChange,
642
660
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -652,12 +670,12 @@ function Menu(_a) {
652
670
  );
653
671
  }
654
672
  Menu.displayName = "Menu";
655
- var MenuTrigger = React36__namespace.forwardRef((_a, ref) => {
673
+ var MenuTrigger = React37__namespace.forwardRef((_a, ref) => {
656
674
  var _b = _a, { children, asChild = true } = _b, props = __objRest(_b, ["children", "asChild"]);
657
675
  return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, __spreadProps(__spreadValues({ ref, asChild }, props), { children }));
658
676
  });
659
677
  MenuTrigger.displayName = "MenuTrigger";
660
- var MenuContent = React36__namespace.forwardRef(
678
+ var MenuContent = React37__namespace.forwardRef(
661
679
  (_a, ref) => {
662
680
  var _b = _a, {
663
681
  children,
@@ -667,6 +685,7 @@ var MenuContent = React36__namespace.forwardRef(
667
685
  hasOverflow = false,
668
686
  colorVariant: propColorVariant,
669
687
  separatorStyle = "gap",
688
+ matchTriggerWidth = false,
670
689
  className
671
690
  } = _b, props = __objRest(_b, [
672
691
  "children",
@@ -676,6 +695,7 @@ var MenuContent = React36__namespace.forwardRef(
676
695
  "hasOverflow",
677
696
  "colorVariant",
678
697
  "separatorStyle",
698
+ "matchTriggerWidth",
679
699
  "className"
680
700
  ]);
681
701
  const {
@@ -686,68 +706,66 @@ var MenuContent = React36__namespace.forwardRef(
686
706
  const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
687
707
  const colors = variant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
688
708
  const isExpressiveGap = variant === "expressive" && separatorStyle === "gap";
689
- const containerClassName = variant === "expressive" ? cn(
690
- "z-50 flex flex-col",
691
- MENU_MIN_WIDTH,
692
- MENU_MAX_WIDTH,
693
- isExpressiveGap ? MENU_GROUP_GAP : "",
694
- isExpressiveGap ? "bg-transparent" : colors.containerBg,
695
- isExpressiveGap ? "" : "rounded-2xl",
696
- isExpressiveGap ? "" : "elevation-2",
697
- hasOverflow || isExpressiveGap ? "overflow-visible" : "overflow-hidden",
698
- "outline-none",
699
- className
700
- ) : cn(
701
- "z-50 flex flex-col",
702
- MENU_MIN_WIDTH,
703
- MENU_MAX_WIDTH,
704
- MENU_POPUP_PADDING_Y,
705
- MENU_GROUP_GAP,
706
- colors.containerBg,
707
- MENU_CONTAINER_SHAPE,
708
- "elevation-2",
709
- hasOverflow ? "overflow-visible" : "overflow-hidden",
710
- "outline-none",
711
- className
712
- );
713
- const flattenChildren = (nodes) => {
714
- return React36__namespace.Children.toArray(nodes).reduce(
715
- (acc, child) => {
716
- if (React36__namespace.isValidElement(child)) {
717
- if (child.type === React36__namespace.Fragment) {
718
- return acc.concat(
719
- flattenChildren(
720
- child.props.children
721
- )
722
- );
723
- }
724
- acc.push(child);
725
- }
726
- return acc;
727
- },
728
- []
709
+ const containerClassName = React37__namespace.useMemo(() => {
710
+ const widthClass = matchTriggerWidth ? "w-[var(--radix-dropdown-menu-trigger-width)]" : cn(MENU_MIN_WIDTH, MENU_MAX_WIDTH);
711
+ return variant === "expressive" ? cn(
712
+ "z-50 flex flex-col",
713
+ widthClass,
714
+ isExpressiveGap ? MENU_GROUP_GAP : "",
715
+ isExpressiveGap ? "bg-transparent" : colors.containerBg,
716
+ isExpressiveGap ? "" : "p-1",
717
+ isExpressiveGap ? "" : "rounded-2xl",
718
+ isExpressiveGap ? "" : "elevation-2",
719
+ hasOverflow || isExpressiveGap ? "overflow-visible" : "overflow-hidden",
720
+ "outline-none",
721
+ className
722
+ ) : cn(
723
+ "z-50 flex flex-col",
724
+ widthClass,
725
+ MENU_POPUP_PADDING_Y,
726
+ MENU_GROUP_GAP,
727
+ colors.containerBg,
728
+ MENU_CONTAINER_SHAPE,
729
+ "elevation-2",
730
+ hasOverflow ? "overflow-visible" : "overflow-hidden",
731
+ "outline-none",
732
+ className
729
733
  );
730
- };
731
- let renderedChildren = children;
732
- if (variant === "expressive") {
734
+ }, [
735
+ variant,
736
+ isExpressiveGap,
737
+ hasOverflow,
738
+ matchTriggerWidth,
739
+ className,
740
+ colors.containerBg
741
+ ]);
742
+ const renderedChildren = React37__namespace.useMemo(() => {
743
+ if (variant !== "expressive") return children;
733
744
  const validChildren = flattenChildren(children);
734
745
  const groupCount = validChildren.length;
735
- const enhancedChildren = validChildren.map(
736
- (child, i) => React36__namespace.cloneElement(child, {
737
- index: i,
738
- count: groupCount,
739
- isGapVariant: isExpressiveGap
740
- })
741
- );
742
- renderedChildren = separatorStyle === "divider" ? enhancedChildren.reduce((acc, child, i) => {
746
+ const enhanced = validChildren.map((child, i) => {
747
+ var _a2;
748
+ if (typeof child.type === "string") return child;
749
+ const defaultItemPosition = groupCount === 1 ? "standalone" : i === 0 ? "leading" : i === groupCount - 1 ? "trailing" : "middle";
750
+ const itemPosition = (_a2 = child.props.itemPosition) != null ? _a2 : defaultItemPosition;
751
+ return React37__namespace.cloneElement(
752
+ child,
753
+ {
754
+ index: i,
755
+ count: groupCount,
756
+ itemPosition,
757
+ isGapVariant: isExpressiveGap
758
+ }
759
+ );
760
+ });
761
+ if (separatorStyle !== "divider") return enhanced;
762
+ return enhanced.reduce((acc, child, i) => {
743
763
  if (i > 0) {
744
764
  acc.push(
745
765
  /* @__PURE__ */ jsxRuntime.jsx(
746
766
  "hr",
747
767
  {
748
- className: cn(
749
- "mx-3 my-0.5 h-px border-0 bg-m3-outline-variant"
750
- )
768
+ className: cn("mx-3 my-0.5 h-px border-0 bg-m3-outline-variant")
751
769
  },
752
770
  `divider-${child.key || i}`
753
771
  )
@@ -755,8 +773,8 @@ var MenuContent = React36__namespace.forwardRef(
755
773
  }
756
774
  acc.push(child);
757
775
  return acc;
758
- }, []) : enhancedChildren;
759
- }
776
+ }, []);
777
+ }, [children, variant, isExpressiveGap, separatorStyle]);
760
778
  return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(
761
779
  DropdownMenu__namespace.Content,
762
780
  __spreadProps(__spreadValues({
@@ -788,9 +806,9 @@ var MenuContent = React36__namespace.forwardRef(
788
806
  }
789
807
  );
790
808
  MenuContent.displayName = "MenuContent";
791
- var MenuDivider = React36__namespace.forwardRef(
809
+ var MenuDivider = React37__namespace.forwardRef(
792
810
  (_a, ref) => {
793
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
811
+ var _b = _a, { className, isGapVariant: _isGapVariant } = _b, props = __objRest(_b, ["className", "isGapVariant"]);
794
812
  const { menuVariant } = useMenuContext();
795
813
  return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Separator, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
796
814
  "hr",
@@ -819,7 +837,7 @@ function getGroupPosition(index, count) {
819
837
  function getGroupActiveShape(position) {
820
838
  return GROUP_SHAPES[`${position}Active`];
821
839
  }
822
- var MenuGroup = React36__namespace.forwardRef(
840
+ var MenuGroup = React37__namespace.forwardRef(
823
841
  (_a, ref) => {
824
842
  var _b = _a, {
825
843
  children,
@@ -840,46 +858,25 @@ var MenuGroup = React36__namespace.forwardRef(
840
858
  "itemPosition",
841
859
  "className"
842
860
  ]);
843
- const {
844
- menuVariant,
845
- colorVariant: contextColorVariant,
846
- isStatic
847
- } = useMenuContext();
861
+ const { menuVariant, colorVariant: contextColorVariant } = useMenuContext();
848
862
  const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
849
863
  const colors = menuVariant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
850
864
  const position = getGroupPosition(index, count);
851
- const activeShape = getGroupActiveShape(position);
852
- const [isHovered, setIsHovered] = React36__namespace.useState(false);
853
- const currentShape = isStatic || isHovered ? activeShape : GROUP_SHAPES.inactive;
854
- const handlePointerEnter = React36__namespace.useCallback(() => setIsHovered(true), []);
855
- const handlePointerLeave = React36__namespace.useCallback(() => setIsHovered(false), []);
856
- const flattenChildren = (children2) => {
857
- return React36__namespace.Children.toArray(children2).reduce(
858
- (acc, child) => {
859
- if (React36__namespace.isValidElement(child)) {
860
- if (child.type === React36__namespace.Fragment) {
861
- return acc.concat(
862
- flattenChildren(
863
- child.props.children
864
- )
865
- );
866
- }
867
- acc.push(child);
868
- }
869
- return acc;
870
- },
871
- []
872
- );
873
- };
874
- const validChildren = flattenChildren(children);
875
- const itemCount = validChildren.length;
876
- const enhancedChildren = validChildren.map((child, i) => {
877
- const itemPosition2 = itemCount === 1 ? "standalone" : i === 0 ? "leading" : i === itemCount - 1 ? "trailing" : "middle";
878
- return React36__namespace.cloneElement(child, {
879
- itemPosition: itemPosition2,
880
- colorVariant
865
+ const currentShape = getGroupActiveShape(position);
866
+ const enhancedChildren = React37__namespace.useMemo(() => {
867
+ const valid = flattenChildren(children);
868
+ const itemCount = valid.length;
869
+ return valid.map((child, i) => {
870
+ var _a2;
871
+ if (typeof child.type === "string") return child;
872
+ const defaultItemPosition = itemCount === 1 ? "standalone" : i === 0 ? "leading" : i === itemCount - 1 ? "trailing" : "middle";
873
+ const itemPosition2 = (_a2 = child.props.itemPosition) != null ? _a2 : defaultItemPosition;
874
+ return React37__namespace.cloneElement(child, {
875
+ itemPosition: itemPosition2,
876
+ colorVariant
877
+ });
881
878
  });
882
- });
879
+ }, [children, colorVariant]);
883
880
  return /* @__PURE__ */ jsxRuntime.jsxs(
884
881
  react.m.div,
885
882
  __spreadProps(__spreadValues({
@@ -891,10 +888,8 @@ var MenuGroup = React36__namespace.forwardRef(
891
888
  // In baseline variant, MenuGroup is transparent so it shouldn't clip.
892
889
  // In expressive variant, it needs overflow-hidden to clip hover states to its morphing shape.
893
890
  menuVariant === "baseline" ? "" : "overflow-hidden",
894
- // Vertical padding: 2dp for gap variant (to match Figma), 4dp for baseline
895
- isGapVariant ? "py-0.5" : MENU_GROUP_PADDING_Y,
896
- // Horizontal padding: 4dp for expressive menus (both static and popup), 0 for baseline
897
- menuVariant === "expressive" ? "px-1" : "",
891
+ // Padding: uniform 4dp (p-1) for expressive menus (matches 12px inner item corners inside 16px outer corners)
892
+ menuVariant === "expressive" ? "p-1" : MENU_GROUP_PADDING_Y,
898
893
  // Gap variant has floating segments, so each group manages its own shadow
899
894
  isGapVariant ? "elevation-2" : "",
900
895
  // Background based on color variant (transparent for baseline to avoid double-layering)
@@ -902,9 +897,7 @@ var MenuGroup = React36__namespace.forwardRef(
902
897
  className
903
898
  ),
904
899
  animate: { borderRadius: currentShape },
905
- transition: FAST_SPATIAL_SPRING,
906
- onPointerEnter: handlePointerEnter,
907
- onPointerLeave: handlePointerLeave
900
+ transition: FAST_SPATIAL_SPRING
908
901
  }, rest), {
909
902
  children: [
910
903
  label && /* @__PURE__ */ jsxRuntime.jsx(
@@ -941,7 +934,7 @@ var VARIANT_FONT = {
941
934
  rounded: "'Material Symbols Rounded'",
942
935
  sharp: "'Material Symbols Sharp'"
943
936
  };
944
- var IconComponent = React36__namespace.forwardRef(
937
+ var IconComponent = React37__namespace.forwardRef(
945
938
  (_a, ref) => {
946
939
  var _b = _a, {
947
940
  name,
@@ -1007,14 +1000,14 @@ var IconComponent = React36__namespace.forwardRef(
1007
1000
  }
1008
1001
  );
1009
1002
  IconComponent.displayName = "Icon";
1010
- var Icon = React36__namespace.memo(IconComponent);
1003
+ var Icon = React37__namespace.memo(IconComponent);
1011
1004
  function getItemShapeClass(position, selected, isStatic = false, menuVariant = "expressive") {
1012
1005
  if (menuVariant === "baseline") return BASELINE_ITEM_SHAPE;
1013
1006
  if (selected) return ITEM_SHAPE_CLASSES.selected;
1014
1007
  if (isStatic && position === "standalone") return "rounded-[12px]";
1015
1008
  return ITEM_SHAPE_CLASSES[position];
1016
1009
  }
1017
- var MenuItem = React36__namespace.forwardRef(
1010
+ var MenuItem = React37__namespace.forwardRef(
1018
1011
  (_a, ref) => {
1019
1012
  var _b = _a, {
1020
1013
  children,
@@ -1027,11 +1020,13 @@ var MenuItem = React36__namespace.forwardRef(
1027
1020
  disabled = false,
1028
1021
  itemPosition = "standalone",
1029
1022
  colorVariant: propColorVariant,
1023
+ density: propDensity,
1030
1024
  keepOpen = false,
1031
1025
  className,
1032
1026
  isSubTrigger,
1033
1027
  value,
1034
- role
1028
+ role,
1029
+ isGapVariant: _isGapVariant
1035
1030
  } = _b, rest = __objRest(_b, [
1036
1031
  "children",
1037
1032
  "onClick",
@@ -1043,18 +1038,24 @@ var MenuItem = React36__namespace.forwardRef(
1043
1038
  "disabled",
1044
1039
  "itemPosition",
1045
1040
  "colorVariant",
1041
+ "density",
1046
1042
  "keepOpen",
1047
1043
  "className",
1048
1044
  "isSubTrigger",
1049
1045
  "value",
1050
- "role"
1046
+ "role",
1047
+ "isGapVariant"
1051
1048
  ]);
1049
+ var _a2;
1052
1050
  const {
1053
1051
  menuVariant,
1054
1052
  colorVariant: contextColorVariant,
1053
+ density: contextDensity,
1055
1054
  menuPrimitive
1056
1055
  } = useMenuContext();
1057
1056
  const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
1057
+ const density = (_a2 = propDensity != null ? propDensity : contextDensity) != null ? _a2 : 0;
1058
+ const minHeightClass = DENSITY_MIN_HEIGHT[density];
1058
1059
  const colors = menuVariant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
1059
1060
  const isStaticMenu = menuPrimitive === "static";
1060
1061
  const shapeClass = getItemShapeClass(
@@ -1096,12 +1097,11 @@ var MenuItem = React36__namespace.forwardRef(
1096
1097
  className: cn(
1097
1098
  // Layout
1098
1099
  "relative flex w-full cursor-pointer select-none items-center outline-none",
1099
- // Sizing: min-h 48dp, min-w 112dp, max-w 280dp
1100
- "min-h-12 min-w-28 max-w-70",
1100
+ // Sizing: min-h based on density (48dp, 40dp, 32dp), min-w 112dp
1101
+ minHeightClass,
1102
+ "min-w-28",
1101
1103
  // Horizontal padding
1102
1104
  menuVariant === "baseline" ? MENU_BASELINE_ITEM_HORIZONTAL_PADDING : "px-4",
1103
- // Spacing between items
1104
- isStaticMenu ? "my-0.5" : "",
1105
1105
  // Shape morphing (position-based + selected override)
1106
1106
  shapeClass,
1107
1107
  // Animate border-radius AND background-color together (FastEffects: 150ms)
@@ -1113,7 +1113,7 @@ var MenuItem = React36__namespace.forwardRef(
1113
1113
  !selected && colors.focusLayer,
1114
1114
  // Focus visible ring (WCAG 2.4.11 — visible focus indicator)
1115
1115
  // Uses ring-inset so the ring doesn't overflow the item bounds.
1116
- "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-m3-primary",
1116
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-m3-secondary data-highlighted:ring-0",
1117
1117
  // Disabled
1118
1118
  disabled && "pointer-events-none opacity-[0.38]",
1119
1119
  className
@@ -1216,31 +1216,31 @@ function SubMenu({
1216
1216
  }) {
1217
1217
  const { colorVariant: contextColorVariant, menuPrimitive } = useMenuContext();
1218
1218
  const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
1219
- const [open, setOpen] = React36__namespace.useState(false);
1220
- const openTimerRef = React36__namespace.useRef(null);
1221
- const closeTimerRef = React36__namespace.useRef(
1219
+ const [open, setOpen] = React37__namespace.useState(false);
1220
+ const openTimerRef = React37__namespace.useRef(null);
1221
+ const closeTimerRef = React37__namespace.useRef(
1222
1222
  null
1223
1223
  );
1224
- const clearTimers = React36__namespace.useCallback(() => {
1224
+ const clearTimers = React37__namespace.useCallback(() => {
1225
1225
  if (openTimerRef.current) clearTimeout(openTimerRef.current);
1226
1226
  if (closeTimerRef.current) clearTimeout(closeTimerRef.current);
1227
1227
  }, []);
1228
- const handleTriggerPointerEnter = React36__namespace.useCallback(() => {
1228
+ const handleTriggerPointerEnter = React37__namespace.useCallback(() => {
1229
1229
  clearTimers();
1230
1230
  openTimerRef.current = setTimeout(() => setOpen(true), hoverOpenDelay);
1231
1231
  }, [hoverOpenDelay, clearTimers]);
1232
- const handleTriggerPointerLeave = React36__namespace.useCallback(() => {
1232
+ const handleTriggerPointerLeave = React37__namespace.useCallback(() => {
1233
1233
  clearTimers();
1234
1234
  closeTimerRef.current = setTimeout(() => setOpen(false), hoverCloseDelay);
1235
1235
  }, [hoverCloseDelay, clearTimers]);
1236
- const handleContentPointerEnter = React36__namespace.useCallback(() => {
1236
+ const handleContentPointerEnter = React37__namespace.useCallback(() => {
1237
1237
  clearTimers();
1238
1238
  }, [clearTimers]);
1239
- const handleContentPointerLeave = React36__namespace.useCallback(() => {
1239
+ const handleContentPointerLeave = React37__namespace.useCallback(() => {
1240
1240
  clearTimers();
1241
1241
  closeTimerRef.current = setTimeout(() => setOpen(false), hoverCloseDelay);
1242
1242
  }, [hoverCloseDelay, clearTimers]);
1243
- React36__namespace.useEffect(() => () => clearTimers(), [clearTimers]);
1243
+ React37__namespace.useEffect(() => () => clearTimers(), [clearTimers]);
1244
1244
  const Sub3 = menuPrimitive === "context" ? RxContextMenu__namespace.Sub : DropdownMenu__namespace.Sub;
1245
1245
  const SubTrigger3 = menuPrimitive === "context" ? RxContextMenu__namespace.SubTrigger : DropdownMenu__namespace.SubTrigger;
1246
1246
  const SubContent3 = menuPrimitive === "context" ? RxContextMenu__namespace.SubContent : DropdownMenu__namespace.SubContent;
@@ -1252,7 +1252,7 @@ function SubMenu({
1252
1252
  className: "w-full outline-none",
1253
1253
  onPointerEnter: handleTriggerPointerEnter,
1254
1254
  onPointerLeave: handleTriggerPointerLeave,
1255
- children: React36__namespace.isValidElement(trigger) ? React36__namespace.cloneElement(trigger, {
1255
+ children: React37__namespace.isValidElement(trigger) ? React37__namespace.cloneElement(trigger, {
1256
1256
  isSubTrigger: true,
1257
1257
  // Auto-add chevron if missing
1258
1258
  trailingIcon: trigger.props.trailingIcon || /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron_right", size: 20 })
@@ -1329,7 +1329,7 @@ function SubMenuContent({
1329
1329
  );
1330
1330
  }
1331
1331
  SubMenuContent.displayName = "SubMenuContent";
1332
- var VerticalMenuDivider = React36__namespace.forwardRef((_a, ref) => {
1332
+ var VerticalMenuDivider = React37__namespace.forwardRef((_a, ref) => {
1333
1333
  var _b = _a, { className, index, count, isGapVariant } = _b, props = __objRest(_b, ["className", "index", "count", "isGapVariant"]);
1334
1334
  return /* @__PURE__ */ jsxRuntime.jsx(
1335
1335
  "hr",
@@ -1349,7 +1349,7 @@ var VerticalMenuDivider = React36__namespace.forwardRef((_a, ref) => {
1349
1349
  });
1350
1350
  VerticalMenuDivider.displayName = "VerticalMenuDivider";
1351
1351
  var VerticalMenuGroup = MenuGroup;
1352
- var VerticalMenuContent = React36__namespace.forwardRef(
1352
+ var VerticalMenuContent = React37__namespace.forwardRef(
1353
1353
  (_a, ref) => {
1354
1354
  var _b = _a, {
1355
1355
  children,
@@ -1365,46 +1365,39 @@ var VerticalMenuContent = React36__namespace.forwardRef(
1365
1365
  const { colorVariant: contextColorVariant } = useMenuContext();
1366
1366
  const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
1367
1367
  const colors = colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
1368
- const flattenChildren = (children2) => {
1369
- return React36__namespace.Children.toArray(children2).reduce(
1370
- (acc, child) => {
1371
- if (React36__namespace.isValidElement(child)) {
1372
- if (child.type === React36__namespace.Fragment) {
1373
- return acc.concat(
1374
- flattenChildren(
1375
- child.props.children
1376
- )
1377
- );
1378
- }
1379
- acc.push(child);
1368
+ const renderedChildren = React37__namespace.useMemo(() => {
1369
+ const valid = flattenChildren(children);
1370
+ const groupCount = valid.length;
1371
+ const enhanced = valid.map((child, i) => {
1372
+ var _a2;
1373
+ if (typeof child.type === "string") return child;
1374
+ const defaultItemPosition = groupCount === 1 ? "standalone" : i === 0 ? "leading" : i === groupCount - 1 ? "trailing" : "middle";
1375
+ const itemPosition = (_a2 = child.props.itemPosition) != null ? _a2 : defaultItemPosition;
1376
+ return React37__namespace.cloneElement(
1377
+ child,
1378
+ {
1379
+ index: i,
1380
+ count: groupCount,
1381
+ itemPosition,
1382
+ isGapVariant: separatorStyle === "gap"
1380
1383
  }
1381
- return acc;
1382
- },
1383
- []
1384
- );
1385
- };
1386
- const validChildren = flattenChildren(children);
1387
- const groupCount = validChildren.length;
1388
- const enhancedChildren = validChildren.map(
1389
- (child, i) => React36__namespace.cloneElement(child, {
1390
- index: i,
1391
- count: groupCount,
1392
- isGapVariant: separatorStyle === "gap"
1393
- })
1394
- );
1395
- const renderedChildren = separatorStyle === "divider" ? enhancedChildren.reduce((acc, child, i) => {
1396
- if (i > 0) {
1397
- acc.push(
1398
- /* @__PURE__ */ jsxRuntime.jsx(
1399
- VerticalMenuDivider,
1400
- {},
1401
- `divider-${child.key || i}`
1402
- )
1403
1384
  );
1404
- }
1405
- acc.push(child);
1406
- return acc;
1407
- }, []) : enhancedChildren;
1385
+ });
1386
+ if (separatorStyle !== "divider") return enhanced;
1387
+ return enhanced.reduce((acc, child, i) => {
1388
+ if (i > 0) {
1389
+ acc.push(
1390
+ /* @__PURE__ */ jsxRuntime.jsx(
1391
+ VerticalMenuDivider,
1392
+ {},
1393
+ `divider-${child.key || i}`
1394
+ )
1395
+ );
1396
+ }
1397
+ acc.push(child);
1398
+ return acc;
1399
+ }, []);
1400
+ }, [children, separatorStyle]);
1408
1401
  return /* @__PURE__ */ jsxRuntime.jsx(
1409
1402
  "div",
1410
1403
  __spreadProps(__spreadValues({
@@ -1423,13 +1416,13 @@ var VerticalMenuContent = React36__namespace.forwardRef(
1423
1416
  }
1424
1417
  );
1425
1418
  VerticalMenuContent.displayName = "VerticalMenuContent";
1426
- var VerticalMenu = React36__namespace.forwardRef((_a, ref) => {
1419
+ var VerticalMenu = React37__namespace.forwardRef((_a, ref) => {
1427
1420
  var _b = _a, { children, colorVariant = "standard", className } = _b, props = __objRest(_b, ["children", "colorVariant", "className"]);
1428
- const noop = React36__namespace.useCallback(() => {
1421
+ const noop = React37__namespace.useCallback(() => {
1429
1422
  }, []);
1430
1423
  const colors = colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
1431
- const containerRef = React36__namespace.useRef(null);
1432
- const mergedRef = React36__namespace.useCallback(
1424
+ const containerRef = React37__namespace.useRef(null);
1425
+ const mergedRef = React37__namespace.useCallback(
1433
1426
  (node) => {
1434
1427
  containerRef.current = node;
1435
1428
  if (typeof ref === "function") ref(node);
@@ -1438,7 +1431,7 @@ var VerticalMenu = React36__namespace.forwardRef((_a, ref) => {
1438
1431
  },
1439
1432
  [ref]
1440
1433
  );
1441
- const handleKeyDown = React36__namespace.useCallback(
1434
+ const handleKeyDown = React37__namespace.useCallback(
1442
1435
  (e) => {
1443
1436
  var _a2;
1444
1437
  if (!containerRef.current) return;
@@ -1521,7 +1514,7 @@ var VerticalMenu = React36__namespace.forwardRef((_a, ref) => {
1521
1514
  });
1522
1515
  VerticalMenu.displayName = "VerticalMenu";
1523
1516
  function detectSeparatorStyle(children) {
1524
- const child = React36__namespace.Children.toArray(children).find(React36__namespace.isValidElement);
1517
+ const child = React37__namespace.Children.toArray(children).find(React37__namespace.isValidElement);
1525
1518
  if (child) {
1526
1519
  const style = child.props.separatorStyle;
1527
1520
  if (style) return style;
@@ -1602,11 +1595,11 @@ function AppBarColumn({
1602
1595
  maxItemCount,
1603
1596
  className
1604
1597
  }) {
1605
- const containerRef = React36__namespace.useRef(null);
1606
- const [visibleCount, setVisibleCount] = React36__namespace.useState(
1598
+ const containerRef = React37__namespace.useRef(null);
1599
+ const [visibleCount, setVisibleCount] = React37__namespace.useState(
1607
1600
  maxItemCount != null ? maxItemCount : items.length
1608
1601
  );
1609
- React36__namespace.useEffect(() => {
1602
+ React37__namespace.useEffect(() => {
1610
1603
  if (maxItemCount !== void 0) {
1611
1604
  setVisibleCount(Math.min(maxItemCount, items.length));
1612
1605
  return;
@@ -1654,11 +1647,11 @@ function AppBarColumn({
1654
1647
  );
1655
1648
  }
1656
1649
  function AppBarRow({ items, maxItemCount, className }) {
1657
- const containerRef = React36__namespace.useRef(null);
1658
- const [visibleCount, setVisibleCount] = React36__namespace.useState(
1650
+ const containerRef = React37__namespace.useRef(null);
1651
+ const [visibleCount, setVisibleCount] = React37__namespace.useState(
1659
1652
  maxItemCount != null ? maxItemCount : items.length
1660
1653
  );
1661
- React36__namespace.useEffect(() => {
1654
+ React37__namespace.useEffect(() => {
1662
1655
  if (maxItemCount !== void 0) {
1663
1656
  setVisibleCount(Math.min(maxItemCount, items.length));
1664
1657
  return;
@@ -1712,12 +1705,12 @@ function useAppBarScroll({
1712
1705
  collapsedHeight = 64,
1713
1706
  expandedHeight = 112
1714
1707
  } = {}) {
1715
- const [isScrolled, setIsScrolled] = React36__namespace.useState(false);
1716
- const [collapsedFraction, setCollapsedFraction] = React36__namespace.useState(0);
1717
- const [isHidden, setIsHidden] = React36__namespace.useState(false);
1718
- const prevScrollYRef = React36__namespace.useRef(0);
1708
+ const [isScrolled, setIsScrolled] = React37__namespace.useState(false);
1709
+ const [collapsedFraction, setCollapsedFraction] = React37__namespace.useState(0);
1710
+ const [isHidden, setIsHidden] = React37__namespace.useState(false);
1711
+ const prevScrollYRef = React37__namespace.useRef(0);
1719
1712
  const hideThreshold = 64;
1720
- React36__namespace.useEffect(() => {
1713
+ React37__namespace.useEffect(() => {
1721
1714
  var _a;
1722
1715
  const scrollDistance = expandedHeight - collapsedHeight;
1723
1716
  const getScrollY = () => {
@@ -1838,7 +1831,7 @@ function useFlexibleAppBar({
1838
1831
  expandedHeight
1839
1832
  });
1840
1833
  const scrollProgress = react.useMotionValue(0);
1841
- React36__namespace.useEffect(() => {
1834
+ React37__namespace.useEffect(() => {
1842
1835
  scrollProgress.set(
1843
1836
  shouldReduceMotion ? collapsedFraction > 0.5 ? 1 : 0 : collapsedFraction
1844
1837
  );
@@ -2179,7 +2172,7 @@ function SearchAppBar({
2179
2172
  }) {
2180
2173
  var _a, _b;
2181
2174
  const shouldReduceMotion = react.useReducedMotion();
2182
- const [isSearchOpen, setIsSearchOpen] = React36__namespace.useState(false);
2175
+ const [isSearchOpen, setIsSearchOpen] = React37__namespace.useState(false);
2183
2176
  const { isScrolled } = useAppBarScroll({
2184
2177
  scrollElement,
2185
2178
  behavior: scrollBehavior === "exitUntilCollapsed" ? "pinned" : scrollBehavior
@@ -2293,8 +2286,8 @@ function SearchView({
2293
2286
  className
2294
2287
  }) {
2295
2288
  const shouldReduceMotion = react.useReducedMotion();
2296
- const inputRef = React36__namespace.useRef(null);
2297
- React36__namespace.useEffect(() => {
2289
+ const inputRef = React37__namespace.useRef(null);
2290
+ React37__namespace.useEffect(() => {
2298
2291
  const timer = window.setTimeout(() => {
2299
2292
  var _a;
2300
2293
  (_a = inputRef.current) == null ? void 0 : _a.focus();
@@ -2550,7 +2543,7 @@ function SmallAppBar({
2550
2543
  "small-app-bar"
2551
2544
  ) });
2552
2545
  }
2553
- var RippleItem = React36__namespace.memo(function RippleItem2({
2546
+ var RippleItem = React37__namespace.memo(function RippleItem2({
2554
2547
  ripple,
2555
2548
  onDone
2556
2549
  }) {
@@ -2594,8 +2587,8 @@ function Ripple({
2594
2587
  }
2595
2588
  function useRippleState(options = {}) {
2596
2589
  const { disabled = false } = options;
2597
- const [ripples, setRipples] = React36__namespace.useState([]);
2598
- const onPointerDown = React36__namespace.useCallback(
2590
+ const [ripples, setRipples] = React37__namespace.useState([]);
2591
+ const onPointerDown = React37__namespace.useCallback(
2599
2592
  (e) => {
2600
2593
  if (disabled) return;
2601
2594
  const rect = e.currentTarget.getBoundingClientRect();
@@ -2612,7 +2605,7 @@ function useRippleState(options = {}) {
2612
2605
  },
2613
2606
  [disabled]
2614
2607
  );
2615
- const removeRipple = React36__namespace.useCallback((id) => {
2608
+ const removeRipple = React37__namespace.useCallback((id) => {
2616
2609
  setRipples((prev) => prev.filter((r) => r.id !== id));
2617
2610
  }, []);
2618
2611
  return { ripples, onPointerDown, removeRipple };
@@ -4542,11 +4535,11 @@ function getNavigationShapeStyle(shape, width = 56, height = 56) {
4542
4535
  function isSquareShape(shape) {
4543
4536
  return Boolean(shape && shape !== "pill");
4544
4537
  }
4545
- var NavigationBarContext = React36__namespace.createContext({ variant: "flexible" });
4538
+ var NavigationBarContext = React37__namespace.createContext({ variant: "flexible" });
4546
4539
  function cloneIconWithFill(icon, selected) {
4547
- if (!React36__namespace.isValidElement(icon)) return icon;
4540
+ if (!React37__namespace.isValidElement(icon)) return icon;
4548
4541
  if (icon.type === Icon) {
4549
- return React36__namespace.cloneElement(
4542
+ return React37__namespace.cloneElement(
4550
4543
  icon,
4551
4544
  { fill: selected ? 1 : 0, animateFill: true }
4552
4545
  );
@@ -4558,7 +4551,7 @@ function ActivePill({
4558
4551
  width = 56,
4559
4552
  height = 32
4560
4553
  }) {
4561
- const { activeIndicatorTransition } = React36__namespace.useContext(NavigationBarContext);
4554
+ const { activeIndicatorTransition } = React37__namespace.useContext(NavigationBarContext);
4562
4555
  const shapeStyle = getNavigationShapeStyle(shape, width, height);
4563
4556
  return /* @__PURE__ */ jsxRuntime.jsx(
4564
4557
  react.m.div,
@@ -4630,7 +4623,7 @@ function IconContainer({ selected, badge, children }) {
4630
4623
  }
4631
4624
  );
4632
4625
  }
4633
- var NavigationBarItemComponent = React36__namespace.forwardRef(
4626
+ var NavigationBarItemComponent = React37__namespace.forwardRef(
4634
4627
  ({
4635
4628
  selected,
4636
4629
  icon,
@@ -4654,7 +4647,7 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
4654
4647
  labelVisibility: contextLabelVisibility,
4655
4648
  shapeSize: contextShapeSize,
4656
4649
  itemClassName: contextItemClassName
4657
- } = React36__namespace.useContext(NavigationBarContext);
4650
+ } = React37__namespace.useContext(NavigationBarContext);
4658
4651
  const activeShape = (_a = shapeProp != null ? shapeProp : contextShape) != null ? _a : "pill";
4659
4652
  const isSquare = isSquareShape(activeShape);
4660
4653
  const resolvedShapeSize = (_b = shapeSizeProp != null ? shapeSizeProp : contextShapeSize) != null ? _b : 56;
@@ -4668,7 +4661,7 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
4668
4661
  const { ripples, onPointerDown, removeRipple } = useRippleState({
4669
4662
  disabled
4670
4663
  });
4671
- const handleClick = React36__namespace.useCallback(
4664
+ const handleClick = React37__namespace.useCallback(
4672
4665
  (e) => {
4673
4666
  if (disabled) {
4674
4667
  e.preventDefault();
@@ -4695,7 +4688,7 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
4695
4688
  const iconPillWidth = isSquare ? resolvedShapeSize : 56;
4696
4689
  const iconPillHeight = isSquare ? resolvedShapeSize : 32;
4697
4690
  if (asChild && children) {
4698
- const child = React36__namespace.Children.only(children);
4691
+ const child = React37__namespace.Children.only(children);
4699
4692
  const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4700
4693
  /* @__PURE__ */ jsxRuntime.jsxs(
4701
4694
  "div",
@@ -4820,7 +4813,7 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
4820
4813
  onClick: handleClick,
4821
4814
  onPointerDown,
4822
4815
  className: itemClassName,
4823
- children: React36__namespace.cloneElement(child, { children: innerContent })
4816
+ children: React37__namespace.cloneElement(child, { children: innerContent })
4824
4817
  }
4825
4818
  );
4826
4819
  }
@@ -4954,7 +4947,7 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
4954
4947
  }
4955
4948
  );
4956
4949
  NavigationBarItemComponent.displayName = "NavigationBarItem";
4957
- var NavigationBarItem = React36__namespace.memo(NavigationBarItemComponent);
4950
+ var NavigationBarItem = React37__namespace.memo(NavigationBarItemComponent);
4958
4951
  var navContainerVariants = classVarianceAuthority.cva(
4959
4952
  "flex items-center justify-center select-none transition-transform duration-300 z-50",
4960
4953
  {
@@ -4980,7 +4973,7 @@ var navContainerVariants = classVarianceAuthority.cva(
4980
4973
  }
4981
4974
  }
4982
4975
  );
4983
- var NavigationBarComponent = React36__namespace.forwardRef(
4976
+ var NavigationBarComponent = React37__namespace.forwardRef(
4984
4977
  ({
4985
4978
  variant = "flexible",
4986
4979
  itemLayout,
@@ -4997,18 +4990,18 @@ var NavigationBarComponent = React36__namespace.forwardRef(
4997
4990
  className,
4998
4991
  style
4999
4992
  }, ref) => {
5000
- const [isVisible, setIsVisible] = React36__namespace.useState(true);
5001
- const lastScrollY = React36__namespace.useRef(
4993
+ const [isVisible, setIsVisible] = React37__namespace.useState(true);
4994
+ const lastScrollY = React37__namespace.useRef(
5002
4995
  typeof window !== "undefined" ? window.scrollY : 0
5003
4996
  );
5004
4997
  const isSquare = isSquareShape(shape);
5005
4998
  const effectiveShapeSize = shapeSize != null ? shapeSize : isSquare ? 56 : 32;
5006
- const computedMinHeight = React36__namespace.useMemo(() => {
4999
+ const computedMinHeight = React37__namespace.useMemo(() => {
5007
5000
  const baseHeight = variant === "baseline" ? 80 : 64;
5008
5001
  const requiredHeight = itemLayout === "horizontal" || labelVisibility === "unlabeled" ? effectiveShapeSize + 16 : effectiveShapeSize + 32;
5009
5002
  return Math.max(baseHeight, requiredHeight);
5010
5003
  }, [variant, itemLayout, labelVisibility, effectiveShapeSize]);
5011
- React36__namespace.useEffect(() => {
5004
+ React37__namespace.useEffect(() => {
5012
5005
  if (typeof window === "undefined" || !hideOnScroll) {
5013
5006
  setIsVisible(true);
5014
5007
  return;
@@ -5092,8 +5085,8 @@ var NavigationBarComponent = React36__namespace.forwardRef(
5092
5085
  }
5093
5086
  );
5094
5087
  NavigationBarComponent.displayName = "NavigationBar";
5095
- var NavigationBar = React36__namespace.memo(NavigationBarComponent);
5096
- var NavigationRailContext = React36__namespace.createContext({
5088
+ var NavigationBar = React37__namespace.memo(NavigationBarComponent);
5089
+ var NavigationRailContext = React37__namespace.createContext({
5097
5090
  variant: "collapsed",
5098
5091
  labelVisibility: "labeled",
5099
5092
  activeIndicatorWidth: "hug"
@@ -5129,9 +5122,9 @@ var railContainerVariants = classVarianceAuthority.cva(
5129
5122
  }
5130
5123
  );
5131
5124
  function cloneIconWithFill2(icon, selected) {
5132
- if (!React36__namespace.isValidElement(icon)) return icon;
5125
+ if (!React37__namespace.isValidElement(icon)) return icon;
5133
5126
  if (icon.type === Icon) {
5134
- return React36__namespace.cloneElement(
5127
+ return React37__namespace.cloneElement(
5135
5128
  icon,
5136
5129
  { fill: selected ? 1 : 0, animateFill: true }
5137
5130
  );
@@ -5160,7 +5153,7 @@ function ActivePill2({
5160
5153
  width = 56,
5161
5154
  height = 32
5162
5155
  }) {
5163
- const { activeIndicatorTransition } = React36__namespace.useContext(NavigationRailContext);
5156
+ const { activeIndicatorTransition } = React37__namespace.useContext(NavigationRailContext);
5164
5157
  const shapeStyle = getNavigationShapeStyle(shape, width, height);
5165
5158
  return /* @__PURE__ */ jsxRuntime.jsx(
5166
5159
  react.m.div,
@@ -5235,7 +5228,7 @@ function IconContainer2({ selected, badge, children }) {
5235
5228
  }
5236
5229
  );
5237
5230
  }
5238
- var NavigationRailItemComponent = React36__namespace.forwardRef(
5231
+ var NavigationRailItemComponent = React37__namespace.forwardRef(
5239
5232
  ({
5240
5233
  selected,
5241
5234
  icon,
@@ -5258,7 +5251,7 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
5258
5251
  shape: contextShape,
5259
5252
  shapeSize: contextShapeSize,
5260
5253
  activeIndicatorWidth: contextActiveIndicatorWidth
5261
- } = React36__namespace.useContext(NavigationRailContext);
5254
+ } = React37__namespace.useContext(NavigationRailContext);
5262
5255
  const activeShape = (_a = shapeProp != null ? shapeProp : contextShape) != null ? _a : "pill";
5263
5256
  const isSquare = isSquareShape(activeShape);
5264
5257
  const resolvedShapeSize = (_b = shapeSizeProp != null ? shapeSizeProp : contextShapeSize) != null ? _b : 56;
@@ -5268,12 +5261,12 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
5268
5261
  const enableLayout = !isModal;
5269
5262
  const isExpandedPill = isExpanded && !isSquare;
5270
5263
  const expandedPillWidthClass = activeIndicatorWidth === "fill" ? "w-full" : "w-fit";
5271
- const activePillId = `rail-pill-${React36__namespace.useId()}`;
5264
+ const activePillId = `rail-pill-${React37__namespace.useId()}`;
5272
5265
  const { ripples, onPointerDown, removeRipple } = useRippleState({
5273
5266
  disabled
5274
5267
  });
5275
5268
  const showLabel = isExpanded || labelVisibility === "labeled" || labelVisibility === "auto" && selected;
5276
- const handleClick = React36__namespace.useCallback(
5269
+ const handleClick = React37__namespace.useCallback(
5277
5270
  (e) => {
5278
5271
  if (disabled) {
5279
5272
  e.preventDefault();
@@ -5295,7 +5288,7 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
5295
5288
  const iconPillWidth = isSquare ? resolvedShapeSize : 56;
5296
5289
  const iconPillHeight = isSquare ? resolvedShapeSize : 32;
5297
5290
  if (asChild && children) {
5298
- const child = React36__namespace.Children.only(children);
5291
+ const child = React37__namespace.Children.only(children);
5299
5292
  const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5300
5293
  /* @__PURE__ */ jsxRuntime.jsxs(
5301
5294
  react.m.div,
@@ -5413,7 +5406,7 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
5413
5406
  onPointerDown,
5414
5407
  className: itemClassName,
5415
5408
  tabIndex: -1,
5416
- children: React36__namespace.cloneElement(child, { children: innerContent })
5409
+ children: React37__namespace.cloneElement(child, { children: innerContent })
5417
5410
  }
5418
5411
  ) });
5419
5412
  }
@@ -5541,9 +5534,9 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
5541
5534
  }
5542
5535
  );
5543
5536
  NavigationRailItemComponent.displayName = "NavigationRailItem";
5544
- var NavigationRailItem = React36__namespace.memo(NavigationRailItemComponent);
5537
+ var NavigationRailItem = React37__namespace.memo(NavigationRailItemComponent);
5545
5538
  function useRoving(navRef) {
5546
- React36__namespace.useEffect(() => {
5539
+ React37__namespace.useEffect(() => {
5547
5540
  if (!navRef.current) return;
5548
5541
  const items = getMenuItems(navRef.current);
5549
5542
  const selected = items.find(
@@ -5553,7 +5546,7 @@ function useRoving(navRef) {
5553
5546
  const firstFocusable = selected != null ? selected : items[0];
5554
5547
  if (firstFocusable) firstFocusable.tabIndex = 0;
5555
5548
  }, [navRef]);
5556
- return React36__namespace.useCallback(
5549
+ return React37__namespace.useCallback(
5557
5550
  (e) => {
5558
5551
  if (!navRef.current) return;
5559
5552
  const items = getMenuItems(navRef.current);
@@ -5581,7 +5574,7 @@ function useRoving(navRef) {
5581
5574
  [navRef]
5582
5575
  );
5583
5576
  }
5584
- var NavigationRailComponent = React36__namespace.forwardRef(
5577
+ var NavigationRailComponent = React37__namespace.forwardRef(
5585
5578
  ({
5586
5579
  variant = "collapsed",
5587
5580
  labelVisibility = "labeled",
@@ -5605,9 +5598,9 @@ var NavigationRailComponent = React36__namespace.forwardRef(
5605
5598
  const isXr = variant === "xr";
5606
5599
  const isSpatial = isXr && fabPlacement === "spatialized";
5607
5600
  const applyAnimation = !isXr || !isSpatial;
5608
- const navRef = React36__namespace.useRef(null);
5601
+ const navRef = React37__namespace.useRef(null);
5609
5602
  const handleKeyDown = useRoving(navRef);
5610
- const setRefs = React36__namespace.useCallback(
5603
+ const setRefs = React37__namespace.useCallback(
5611
5604
  (node) => {
5612
5605
  navRef.current = node;
5613
5606
  if (typeof ref === "function") ref(node);
@@ -5700,7 +5693,7 @@ var NavigationRailComponent = React36__namespace.forwardRef(
5700
5693
  children: fab
5701
5694
  }
5702
5695
  ),
5703
- React36__namespace.cloneElement(
5696
+ React37__namespace.cloneElement(
5704
5697
  navElement,
5705
5698
  {
5706
5699
  className: cn(navBaseClasses, "pointer-events-auto")
@@ -5745,7 +5738,7 @@ var NavigationRailComponent = React36__namespace.forwardRef(
5745
5738
  }
5746
5739
  );
5747
5740
  NavigationRailComponent.displayName = "NavigationRail";
5748
- var NavigationRail = React36__namespace.memo(NavigationRailComponent);
5741
+ var NavigationRail = React37__namespace.memo(NavigationRailComponent);
5749
5742
  function useSearchKeyboard({
5750
5743
  active,
5751
5744
  onActiveChange,
@@ -5754,14 +5747,14 @@ function useSearchKeyboard({
5754
5747
  itemCount,
5755
5748
  onSelectSuggestion
5756
5749
  }) {
5757
- const [activeIndex, setActiveIndex] = React36__namespace.useState(-1);
5758
- const resetKeyRef = React36__namespace.useRef(`${active}:${query}`);
5750
+ const [activeIndex, setActiveIndex] = React37__namespace.useState(-1);
5751
+ const resetKeyRef = React37__namespace.useRef(`${active}:${query}`);
5759
5752
  const currentKey = `${active}:${query}`;
5760
5753
  if (resetKeyRef.current !== currentKey) {
5761
5754
  resetKeyRef.current = currentKey;
5762
5755
  setActiveIndex(-1);
5763
5756
  }
5764
- const handleKeyDown = React36__namespace.useCallback(
5757
+ const handleKeyDown = React37__namespace.useCallback(
5765
5758
  (e) => {
5766
5759
  if (!active) return;
5767
5760
  switch (e.key) {
@@ -5801,7 +5794,7 @@ function useSearchKeyboard({
5801
5794
  query
5802
5795
  ]
5803
5796
  );
5804
- const resetActiveIndex = React36__namespace.useCallback(() => {
5797
+ const resetActiveIndex = React37__namespace.useCallback(() => {
5805
5798
  setActiveIndex(-1);
5806
5799
  }, []);
5807
5800
  return { activeIndex, handleKeyDown, resetActiveIndex };
@@ -5869,10 +5862,10 @@ function AnimatedPlaceholder({
5869
5862
  className
5870
5863
  }) {
5871
5864
  const shouldReduceMotion = react.useReducedMotion();
5872
- const containerRef = React36__namespace.useRef(null);
5873
- const spanRef = React36__namespace.useRef(null);
5874
- const [xOffset, setXOffset] = React36__namespace.useState(0);
5875
- const recalculate = React36__namespace.useCallback(() => {
5865
+ const containerRef = React37__namespace.useRef(null);
5866
+ const spanRef = React37__namespace.useRef(null);
5867
+ const [xOffset, setXOffset] = React37__namespace.useState(0);
5868
+ const recalculate = React37__namespace.useCallback(() => {
5876
5869
  const container = containerRef.current;
5877
5870
  const span = spanRef.current;
5878
5871
  if (!container || !span || textAlign === "left") {
@@ -5887,10 +5880,10 @@ function AnimatedPlaceholder({
5887
5880
  setXOffset(Math.max(0, containerWidth - textWidth));
5888
5881
  }
5889
5882
  }, [textAlign]);
5890
- React36__namespace.useLayoutEffect(() => {
5883
+ React37__namespace.useLayoutEffect(() => {
5891
5884
  recalculate();
5892
5885
  }, [recalculate]);
5893
- React36__namespace.useEffect(() => {
5886
+ React37__namespace.useEffect(() => {
5894
5887
  const container = containerRef.current;
5895
5888
  if (!container) return;
5896
5889
  const observer = new ResizeObserver(recalculate);
@@ -5959,10 +5952,10 @@ function SearchBar({
5959
5952
  activeIndex
5960
5953
  }) {
5961
5954
  const shouldReduceMotion = react.useReducedMotion();
5962
- const inputRef = React36__namespace.useRef(null);
5963
- const prevActiveRef = React36__namespace.useRef(active);
5964
- const isRestoringFocusRef = React36__namespace.useRef(false);
5965
- React36__namespace.useEffect(() => {
5955
+ const inputRef = React37__namespace.useRef(null);
5956
+ const prevActiveRef = React37__namespace.useRef(active);
5957
+ const isRestoringFocusRef = React37__namespace.useRef(false);
5958
+ React37__namespace.useEffect(() => {
5966
5959
  var _a;
5967
5960
  let rafId;
5968
5961
  if (prevActiveRef.current === true && active === false) {
@@ -6081,7 +6074,7 @@ function SearchBar({
6081
6074
  ) })
6082
6075
  );
6083
6076
  }
6084
- var SearchContext = React36__namespace.createContext(null);
6077
+ var SearchContext = React37__namespace.createContext(null);
6085
6078
  function SearchProvider({
6086
6079
  children,
6087
6080
  value
@@ -6089,15 +6082,15 @@ function SearchProvider({
6089
6082
  return /* @__PURE__ */ jsxRuntime.jsx(SearchContext.Provider, { value, children });
6090
6083
  }
6091
6084
  function useSearch() {
6092
- const context = React36__namespace.useContext(SearchContext);
6085
+ const context = React37__namespace.useContext(SearchContext);
6093
6086
  if (!context) {
6094
6087
  return { listboxId: "", activeIndex: -1 };
6095
6088
  }
6096
6089
  return context;
6097
6090
  }
6098
6091
  function useClickOutside(handler, enabled = true) {
6099
- const ref = React36.useRef(null);
6100
- React36.useEffect(() => {
6092
+ const ref = React37.useRef(null);
6093
+ React37.useEffect(() => {
6101
6094
  if (!enabled) return;
6102
6095
  const listener = (event) => {
6103
6096
  const el = ref.current;
@@ -6116,7 +6109,7 @@ function useClickOutside(handler, enabled = true) {
6116
6109
  return ref;
6117
6110
  }
6118
6111
  function useSearchViewFocus(inputRef, active) {
6119
- React36__namespace.useEffect(() => {
6112
+ React37__namespace.useEffect(() => {
6120
6113
  if (!active) return;
6121
6114
  let raf2;
6122
6115
  const raf1 = requestAnimationFrame(() => {
@@ -6176,11 +6169,11 @@ var ROTATE_KEY_SPLINES = [
6176
6169
  var ROTATE_VALUES = "0 24 24; 154 24 24; 309 24 24; 463 24 24; 617 24 24; 771 24 24; 926 24 24; 1080 24 24";
6177
6170
  var DETERMINATE_CIRCLE = "M24 7 C34.49 7 41 13.51 41 24 C41 34.49 34.49 41 24 41 C13.51 41 7 34.49 7 24 C7 13.51 13.51 7 24 7 Z";
6178
6171
  var DETERMINATE_SOFT_BURST = "M20.9 10.4 21.4 9.5 21.9 8.7 22.5 7.8 23.2 7.2 24.2 7 25.1 7.4 25.7 8.1 26.2 9 26.8 9.8 27.3 10.6 28.1 11.2 29 11.3 30 11 30.9 10.6 31.8 10.3 32.8 9.9 33.7 10 34.5 10.6 34.9 11.5 34.8 12.5 34.8 13.5 34.7 14.5 34.7 15.5 35.2 16.3 36 16.8 37 17.1 37.9 17.3 38.9 17.5 39.8 17.9 40.4 18.7 40.5 19.7 40 20.5 39.4 21.3 38.7 22 38.1 22.8 37.6 23.7 37.7 24.6 38.3 25.5 38.9 26.2 39.6 27 40.2 27.7 40.5 28.7 40.3 29.6 39.5 30.3 38.6 30.6 37.6 30.8 36.7 31 35.7 31.3 35 31.9 34.6 32.8 34.7 33.8 34.8 34.8 34.9 35.8 34.8 36.8 34.3 37.6 33.4 38.1 32.4 38 31.5 37.6 30.6 37.2 29.7 36.9 28.7 36.6 27.8 36.9 27.1 37.6 26.6 38.5 26.1 39.3 25.5 40.2 24.8 40.8 23.8 41 22.9 40.6 22.3 39.9 21.8 39 21.2 38.2 20.7 37.4 19.9 36.8 19 36.7 18 37 17.1 37.4 16.2 37.7 15.2 38.1 14.3 38 13.5 37.4 13.1 36.5 13.2 35.5 13.2 34.5 13.3 33.5 13.3 32.5 12.8 31.7 12 31.2 11 31 10.1 30.7 9.1 30.5 8.2 30.1 7.6 29.3 7.5 28.3 8 27.5 8.7 26.7 9.3 26 9.9 25.2 10.4 24.3 10.3 23.4 9.7 22.5 9.1 21.8 8.4 21 7.8 20.3 7.5 19.3 7.7 18.4 8.5 17.7 9.4 17.4 10.4 17.2 11.3 17 12.3 16.7 13 16.1 13.4 15.2 13.3 14.2 13.2 13.2 13.1 12.2 13.2 11.2 13.7 10.4 14.6 9.9 15.6 10 16.5 10.4 17.4 10.8 18.3 11.1 19.3 11.4 20.2 11.1Z";
6179
- var IndeterminateSvg = React36__namespace.memo(function IndeterminateSvg2({
6172
+ var IndeterminateSvg = React37__namespace.memo(function IndeterminateSvg2({
6180
6173
  size
6181
6174
  }) {
6182
- const [ready, setReady] = React36__namespace.useState(false);
6183
- React36__namespace.useEffect(() => {
6175
+ const [ready, setReady] = React37__namespace.useState(false);
6176
+ React37__namespace.useEffect(() => {
6184
6177
  const raf = requestAnimationFrame(() => setReady(true));
6185
6178
  return () => cancelAnimationFrame(raf);
6186
6179
  }, []);
@@ -6225,7 +6218,7 @@ var IndeterminateSvg = React36__namespace.memo(function IndeterminateSvg2({
6225
6218
  }
6226
6219
  );
6227
6220
  });
6228
- var DeterminateSvg = React36__namespace.memo(function DeterminateSvg2({
6221
+ var DeterminateSvg = React37__namespace.memo(function DeterminateSvg2({
6229
6222
  size,
6230
6223
  progress
6231
6224
  }) {
@@ -6250,7 +6243,7 @@ var DeterminateSvg = React36__namespace.memo(function DeterminateSvg2({
6250
6243
  }
6251
6244
  );
6252
6245
  });
6253
- var LoadingIndicator = React36__namespace.forwardRef(
6246
+ var LoadingIndicator = React37__namespace.forwardRef(
6254
6247
  (_a, ref) => {
6255
6248
  var _b = _a, {
6256
6249
  variant = "uncontained",
@@ -6345,27 +6338,39 @@ function generateWavyCircularPath(center, radius, amplitude, wavelength) {
6345
6338
  if (i === 0) d += `M ${xAt(t0).toFixed(2)} ${yAt(t0).toFixed(2)}`;
6346
6339
  d += ` C ${cp1x.toFixed(2)} ${cp1y.toFixed(2)}, ${cp2x.toFixed(2)} ${cp2y.toFixed(2)}, ${xAt(t1).toFixed(2)} ${yAt(t1).toFixed(2)}`;
6347
6340
  }
6348
- d += " Z";
6349
6341
  return d;
6350
6342
  }
6351
6343
  function getSinePath(startX, endX, phase, wl, amp) {
6352
6344
  if (startX >= endX) return "";
6353
- let d = "";
6354
- const step = amp === 0 ? Math.max(10, endX - startX) : 1;
6355
- const yStart = Math.sin((startX + phase) / wl * 2 * Math.PI) * amp;
6356
- d += `M ${startX.toFixed(2)} ${yStart.toFixed(2)}`;
6357
- let nextX = Math.ceil(startX / step) * step;
6358
- if (nextX === startX) nextX += step;
6359
- while (nextX < endX) {
6360
- const y = Math.sin((nextX + phase) / wl * 2 * Math.PI) * amp;
6361
- d += ` L ${nextX.toFixed(2)} ${y.toFixed(2)}`;
6362
- nextX += step;
6345
+ if (amp <= 0.01) {
6346
+ return `M ${startX.toFixed(2)} 0 L ${endX.toFixed(2)} 0`;
6347
+ }
6348
+ const safeWl = Math.max(1, wl);
6349
+ const k = 2 * Math.PI / safeWl;
6350
+ const phi = phase / safeWl * 2 * Math.PI;
6351
+ const yAt = (x) => amp * Math.sin(k * x + phi);
6352
+ const dyAt = (x) => amp * k * Math.cos(k * x + phi);
6353
+ const step = safeWl / 4;
6354
+ let d = `M ${startX.toFixed(2)} ${yAt(startX).toFixed(2)}`;
6355
+ let currentX = startX;
6356
+ while (currentX < endX) {
6357
+ const nextX = Math.min(endX, currentX + step);
6358
+ const dx = nextX - currentX;
6359
+ const scale = dx / 3;
6360
+ const y0 = yAt(currentX);
6361
+ const dy0 = dyAt(currentX);
6362
+ const y1 = yAt(nextX);
6363
+ const dy1 = dyAt(nextX);
6364
+ const cp1x = currentX + scale;
6365
+ const cp1y = y0 + scale * dy0;
6366
+ const cp2x = nextX - scale;
6367
+ const cp2y = y1 - scale * dy1;
6368
+ d += ` C ${cp1x.toFixed(2)} ${cp1y.toFixed(2)}, ${cp2x.toFixed(2)} ${cp2y.toFixed(2)}, ${nextX.toFixed(2)} ${y1.toFixed(2)}`;
6369
+ currentX = nextX;
6363
6370
  }
6364
- const yEnd = Math.sin((endX + phase) / wl * 2 * Math.PI) * amp;
6365
- d += ` L ${endX.toFixed(2)} ${yEnd.toFixed(2)}`;
6366
6371
  return d;
6367
6372
  }
6368
- var CircularProgress = React36__namespace.forwardRef(
6373
+ var CircularProgress = React37__namespace.forwardRef(
6369
6374
  (_a, ref) => {
6370
6375
  var _b = _a, {
6371
6376
  value,
@@ -6403,15 +6408,15 @@ var CircularProgress = React36__namespace.forwardRef(
6403
6408
  const isWavy = shape === "wavy";
6404
6409
  const BASELINE_SIZE = 48;
6405
6410
  const scaleFactor = size / BASELINE_SIZE;
6406
- const effectiveAmplitude = React36__namespace.useMemo(
6411
+ const effectiveAmplitude = React37__namespace.useMemo(
6407
6412
  () => amplitude != null ? amplitude : 1.6 * scaleFactor,
6408
6413
  [amplitude, scaleFactor]
6409
6414
  );
6410
- const effectiveWavelength = React36__namespace.useMemo(
6415
+ const effectiveWavelength = React37__namespace.useMemo(
6411
6416
  () => wavelength != null ? wavelength : 15 * scaleFactor,
6412
6417
  [wavelength, scaleFactor]
6413
6418
  );
6414
- const wavyActivePath = React36__namespace.useMemo(
6419
+ const wavyActivePath = React37__namespace.useMemo(
6415
6420
  () => isWavy ? generateWavyCircularPath(
6416
6421
  center,
6417
6422
  radius,
@@ -6420,8 +6425,8 @@ var CircularProgress = React36__namespace.forwardRef(
6420
6425
  ) : null,
6421
6426
  [isWavy, center, radius, effectiveAmplitude, effectiveWavelength]
6422
6427
  );
6423
- const circumference = React36__namespace.useMemo(() => 2 * Math.PI * radius, [radius]);
6424
- const gapForTrack = React36__namespace.useMemo(
6428
+ const circumference = React37__namespace.useMemo(() => 2 * Math.PI * radius, [radius]);
6429
+ const gapForTrack = React37__namespace.useMemo(
6425
6430
  () => (gapSize + trackHeight) / circumference,
6426
6431
  [gapSize, trackHeight, circumference]
6427
6432
  );
@@ -6517,16 +6522,13 @@ var CircularProgress = React36__namespace.forwardRef(
6517
6522
  position: "absolute",
6518
6523
  inset: 0,
6519
6524
  overflow: "visible",
6520
- rotate: "-90deg",
6521
6525
  transformOrigin: "center"
6522
6526
  },
6523
- animate: { rotate: ["-90deg", "270deg"] },
6527
+ animate: { rotate: [0, 360] },
6524
6528
  transition: {
6525
- rotate: {
6526
- duration: 2 / Math.max(0.1, crawlerSpeed),
6527
- repeat: Number.POSITIVE_INFINITY,
6528
- ease: "linear"
6529
- }
6529
+ duration: 2 / Math.max(0.1, crawlerSpeed),
6530
+ repeat: Number.POSITIVE_INFINITY,
6531
+ ease: "linear"
6530
6532
  },
6531
6533
  children: [
6532
6534
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -6539,17 +6541,16 @@ var CircularProgress = React36__namespace.forwardRef(
6539
6541
  stroke: bgTrackColor,
6540
6542
  strokeWidth: trackHeight,
6541
6543
  strokeLinecap: "round",
6542
- style: { originX: "50%", originY: "50%" },
6543
6544
  animate: {
6544
6545
  pathLength: [
6545
- Math.max(1e-3, 1 - 0.1 - 2 * gapForTrack),
6546
- Math.max(1e-3, 1 - 0.75 - 2 * gapForTrack),
6547
- Math.max(1e-3, 1 - 0.1 - 2 * gapForTrack)
6546
+ Math.max(1e-3, 0.9 - 2 * gapForTrack),
6547
+ Math.max(1e-3, 0.25 - 2 * gapForTrack),
6548
+ Math.max(1e-3, 0.9 - 2 * gapForTrack)
6548
6549
  ],
6549
- rotate: [
6550
- `${(0.1 + gapForTrack) * 360}deg`,
6551
- `${(1 + gapForTrack) * 360}deg`,
6552
- `${(1.1 + gapForTrack) * 360}deg`
6550
+ pathOffset: [
6551
+ 0.1 + gapForTrack,
6552
+ 0.75 + gapForTrack,
6553
+ 0.1 + gapForTrack
6553
6554
  ]
6554
6555
  },
6555
6556
  transition: {
@@ -6567,10 +6568,9 @@ var CircularProgress = React36__namespace.forwardRef(
6567
6568
  stroke: activeColor,
6568
6569
  strokeWidth: trackHeight,
6569
6570
  strokeLinecap: "round",
6570
- style: { originX: "50%", originY: "50%" },
6571
6571
  animate: {
6572
6572
  pathLength: [0.1, 0.75, 0.1],
6573
- rotate: ["0deg", "90deg", "360deg"]
6573
+ pathOffset: [0, 0.65, 1]
6574
6574
  },
6575
6575
  transition: {
6576
6576
  duration: 2 / Math.max(0.1, crawlerSpeed),
@@ -6588,10 +6588,9 @@ var CircularProgress = React36__namespace.forwardRef(
6588
6588
  stroke: activeColor,
6589
6589
  strokeWidth: trackHeight,
6590
6590
  strokeLinecap: "round",
6591
- style: { originX: "50%", originY: "50%" },
6592
6591
  animate: {
6593
6592
  pathLength: [0.1, 0.75, 0.1],
6594
- rotate: ["0deg", "90deg", "360deg"]
6593
+ pathOffset: [0, 0.65, 1]
6595
6594
  },
6596
6595
  transition: {
6597
6596
  duration: 2 / Math.max(0.1, crawlerSpeed),
@@ -6610,9 +6609,9 @@ var CircularProgress = React36__namespace.forwardRef(
6610
6609
  );
6611
6610
  CircularProgress.displayName = "CircularProgress";
6612
6611
  function useContainerWidth() {
6613
- const [width, setWidth] = React36__namespace.useState(0);
6614
- const observerRef = React36__namespace.useRef(null);
6615
- const ref = React36__namespace.useCallback((node) => {
6612
+ const [width, setWidth] = React37__namespace.useState(0);
6613
+ const observerRef = React37__namespace.useRef(null);
6614
+ const ref = React37__namespace.useCallback((node) => {
6616
6615
  if (observerRef.current) {
6617
6616
  observerRef.current.disconnect();
6618
6617
  observerRef.current = null;
@@ -6626,7 +6625,7 @@ function useContainerWidth() {
6626
6625
  observerRef.current = obs;
6627
6626
  }
6628
6627
  }, []);
6629
- React36__namespace.useEffect(() => {
6628
+ React37__namespace.useEffect(() => {
6630
6629
  return () => {
6631
6630
  if (observerRef.current) {
6632
6631
  observerRef.current.disconnect();
@@ -6636,7 +6635,7 @@ function useContainerWidth() {
6636
6635
  return [ref, width];
6637
6636
  }
6638
6637
  function useMergedRef(...refs) {
6639
- return React36__namespace.useCallback(
6638
+ return React37__namespace.useCallback(
6640
6639
  (node) => {
6641
6640
  for (const ref of refs) {
6642
6641
  if (typeof ref === "function") {
@@ -6650,7 +6649,7 @@ function useMergedRef(...refs) {
6650
6649
  [refs]
6651
6650
  );
6652
6651
  }
6653
- var FlatLinearTrack = React36__namespace.memo(function FlatLinearTrack2({
6652
+ var FlatLinearTrack = React37__namespace.memo(function FlatLinearTrack2({
6654
6653
  trackHeight,
6655
6654
  activeColor,
6656
6655
  trackColor,
@@ -6726,7 +6725,7 @@ var FlatLinearTrack = React36__namespace.memo(function FlatLinearTrack2({
6726
6725
  }
6727
6726
  );
6728
6727
  });
6729
- var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
6728
+ var WavyLinearTrack = React37__namespace.memo(function WavyLinearTrack2({
6730
6729
  trackHeight,
6731
6730
  svgHeight,
6732
6731
  amplitude,
@@ -6745,13 +6744,13 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
6745
6744
  }) {
6746
6745
  const isDeterminate = typeof value === "number";
6747
6746
  const clampedValue = isDeterminate ? Math.max(0, Math.min(100, value)) : 100;
6748
- const titleId = React36__namespace.useId();
6747
+ const titleId = React37__namespace.useId();
6749
6748
  const [containerRef, width] = useContainerWidth();
6750
- const activePathRef = React36__namespace.useRef(null);
6751
- const trackPathRef = React36__namespace.useRef(null);
6749
+ const activePathRef = React37__namespace.useRef(null);
6750
+ const trackPathRef = React37__namespace.useRef(null);
6752
6751
  const amplitudeMV = react.useMotionValue(amplitude);
6753
6752
  const fractionMV = react.useMotionValue(isDeterminate ? clampedValue / 100 : 1);
6754
- React36__namespace.useEffect(() => {
6753
+ React37__namespace.useEffect(() => {
6755
6754
  if (isDeterminate) {
6756
6755
  const fraction = clampedValue / 100;
6757
6756
  let targetAmp = amplitude;
@@ -6764,6 +6763,12 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
6764
6763
  duration: 0.5
6765
6764
  });
6766
6765
  react.animate(fractionMV, fraction, { duration: 0.4, ease: [0.2, 0, 0, 1] });
6766
+ } else {
6767
+ react.animate(amplitudeMV, amplitude, {
6768
+ type: "spring",
6769
+ bounce: 0,
6770
+ duration: 0.5
6771
+ });
6767
6772
  }
6768
6773
  }, [
6769
6774
  clampedValue,
@@ -6777,10 +6782,10 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
6777
6782
  1,
6778
6783
  isDeterminate ? wavelength : indeterminateWavelength
6779
6784
  );
6780
- const trackAmp = trackShape === "wavy" ? amplitude : 0;
6781
6785
  react.useAnimationFrame((time) => {
6782
6786
  if (width === 0) return;
6783
6787
  const currentAmp = amplitudeMV.get();
6788
+ const trackAmp = trackShape === "wavy" ? amplitude : 0;
6784
6789
  const phase = time / 1e3 * waveSpeed * activeWavelength;
6785
6790
  const capWidth = trackHeight / 2;
6786
6791
  let activePathD = "";
@@ -6881,7 +6886,7 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
6881
6886
  "div",
6882
6887
  {
6883
6888
  ref: containerRef,
6884
- className: "relative w-full overflow-hidden",
6889
+ className: "relative w-full",
6885
6890
  style: { height: svgHeight },
6886
6891
  children: width > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
6887
6892
  "svg",
@@ -6922,7 +6927,7 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
6922
6927
  }
6923
6928
  );
6924
6929
  });
6925
- var LinearProgress = React36__namespace.forwardRef(
6930
+ var LinearProgress = React37__namespace.forwardRef(
6926
6931
  (_a, ref) => {
6927
6932
  var _b = _a, {
6928
6933
  value,
@@ -6935,7 +6940,7 @@ var LinearProgress = React36__namespace.forwardRef(
6935
6940
  waveSpeed = 1,
6936
6941
  crawlerSpeed = 1,
6937
6942
  determinateAnimation = "md3",
6938
- indeterminateAnimation = "continuous",
6943
+ indeterminateAnimation = "md3",
6939
6944
  gapSize = 4,
6940
6945
  showStopIndicator = "auto",
6941
6946
  color,
@@ -6963,33 +6968,35 @@ var LinearProgress = React36__namespace.forwardRef(
6963
6968
  ]);
6964
6969
  const isDeterminate = value !== void 0;
6965
6970
  const clampedValue = isDeterminate ? Math.min(100, Math.max(0, value)) : 0;
6966
- const containerRef = React36__namespace.useRef(null);
6971
+ const containerRef = React37__namespace.useRef(null);
6967
6972
  const mergedRef = useMergedRef(ref, containerRef);
6968
- const [isRtl, setIsRtl] = React36__namespace.useState(false);
6969
- React36__namespace.useEffect(() => {
6973
+ const [isRtl, setIsRtl] = React37__namespace.useState(false);
6974
+ React37__namespace.useEffect(() => {
6970
6975
  if (containerRef.current) {
6971
6976
  const dir = getComputedStyle(containerRef.current).direction;
6972
6977
  setIsRtl(dir === "rtl");
6973
6978
  }
6974
6979
  }, []);
6975
- const isWavy = shape === "wavy";
6976
6980
  const resolvedTrackShape = trackShape != null ? trackShape : shape;
6977
- const effectiveAmplitude = React36__namespace.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
6978
- const svgHeight = React36__namespace.useMemo(
6981
+ const isWavy = shape === "wavy" || resolvedTrackShape === "wavy";
6982
+ const effectiveAmplitude = React37__namespace.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
6983
+ const svgHeight = React37__namespace.useMemo(
6979
6984
  () => isWavy ? trackHeight + effectiveAmplitude * 2 : trackHeight,
6980
6985
  [isWavy, trackHeight, effectiveAmplitude]
6981
6986
  );
6982
- const shouldShowStop = React36__namespace.useMemo(
6983
- () => isDeterminate && resolvedTrackShape === "flat" && (showStopIndicator === true || showStopIndicator === "auto" && isDeterminate),
6987
+ const shouldShowStop = React37__namespace.useMemo(
6988
+ () => isDeterminate && resolvedTrackShape === "flat" && showStopIndicator !== false,
6984
6989
  [isDeterminate, resolvedTrackShape, showStopIndicator]
6985
6990
  );
6986
- const stopSize = React36__namespace.useMemo(
6991
+ const stopSize = React37__namespace.useMemo(
6987
6992
  () => Math.max(2, trackHeight > 4 ? 4 : trackHeight / 2),
6988
6993
  [trackHeight]
6989
6994
  );
6990
6995
  const stopOffset = (trackHeight - stopSize) / 2;
6991
6996
  const activeColor = color || "var(--md-sys-color-indicator-active)";
6992
6997
  const bgTrackColor = trackColor || "var(--md-sys-color-indicator-track)";
6998
+ const useWavyTrack = isWavy || !isDeterminate;
6999
+ const trackAmp = isWavy ? effectiveAmplitude : 0;
6993
7000
  return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
6994
7001
  "div",
6995
7002
  __spreadProps(__spreadValues({
@@ -7006,12 +7013,12 @@ var LinearProgress = React36__namespace.forwardRef(
7006
7013
  style: { height: svgHeight }
7007
7014
  }, restProps), {
7008
7015
  children: [
7009
- isWavy ? /* @__PURE__ */ jsxRuntime.jsx(
7016
+ useWavyTrack ? /* @__PURE__ */ jsxRuntime.jsx(
7010
7017
  WavyLinearTrack,
7011
7018
  {
7012
7019
  trackHeight,
7013
7020
  svgHeight,
7014
- amplitude: effectiveAmplitude,
7021
+ amplitude: trackAmp,
7015
7022
  wavelength,
7016
7023
  indeterminateWavelength,
7017
7024
  activeColor,
@@ -7056,7 +7063,7 @@ var LinearProgress = React36__namespace.forwardRef(
7056
7063
  }
7057
7064
  );
7058
7065
  LinearProgress.displayName = "LinearProgress";
7059
- var ProgressIndicator = React36__namespace.forwardRef((props, ref) => {
7066
+ var ProgressIndicator = React37__namespace.forwardRef((props, ref) => {
7060
7067
  if (props.variant === "circular") {
7061
7068
  return /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, __spreadValues({ ref }, props));
7062
7069
  }
@@ -7188,7 +7195,7 @@ function resolveDisabledBgClass(colorStyle) {
7188
7195
  }
7189
7196
  return "disabled:text-m3-on-surface/[0.38]";
7190
7197
  }
7191
- var IconButtonComponent = React36__namespace.forwardRef(
7198
+ var IconButtonComponent = React37__namespace.forwardRef(
7192
7199
  (_a, ref) => {
7193
7200
  var _b = _a, {
7194
7201
  className,
@@ -7230,18 +7237,18 @@ var IconButtonComponent = React36__namespace.forwardRef(
7230
7237
  var _a2, _b2, _c, _d, _e;
7231
7238
  const isToggle = variant === "toggle";
7232
7239
  const isSelected = isToggle && !!selected;
7233
- const resolvedColorClass = React36__namespace.useMemo(
7240
+ const resolvedColorClass = React37__namespace.useMemo(
7234
7241
  () => isSelected ? colorStyles[colorStyle].selected : colorStyles[colorStyle].default,
7235
7242
  [isSelected, colorStyle]
7236
7243
  );
7237
- const outlineWidthClass = React36__namespace.useMemo(
7244
+ const outlineWidthClass = React37__namespace.useMemo(
7238
7245
  () => {
7239
7246
  var _a3;
7240
7247
  return colorStyle === "outlined" && !isSelected ? (_a3 = SIZE_OUTLINE_WIDTH[size]) != null ? _a3 : "border" : "";
7241
7248
  },
7242
7249
  [colorStyle, isSelected, size]
7243
7250
  );
7244
- const disabledBgClass = React36__namespace.useMemo(
7251
+ const disabledBgClass = React37__namespace.useMemo(
7245
7252
  () => resolveDisabledBgClass(colorStyle),
7246
7253
  [colorStyle]
7247
7254
  );
@@ -7264,7 +7271,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
7264
7271
  const { ripples, onPointerDown, removeRipple } = useRippleState({
7265
7272
  disabled: loading
7266
7273
  });
7267
- const handleClick = React36__namespace.useCallback(
7274
+ const handleClick = React37__namespace.useCallback(
7268
7275
  (e) => {
7269
7276
  if (loading) {
7270
7277
  e.preventDefault();
@@ -7274,7 +7281,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
7274
7281
  },
7275
7282
  [loading, onClick]
7276
7283
  );
7277
- const handleKeyDown = React36__namespace.useCallback(
7284
+ const handleKeyDown = React37__namespace.useCallback(
7278
7285
  (e) => {
7279
7286
  if (loading) return;
7280
7287
  if ((e.key === "Enter" || e.key === " ") && onClick) {
@@ -7330,7 +7337,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
7330
7337
  width: isCustomSize ? `${iconSize}px` : void 0,
7331
7338
  height: isCustomSize ? `${iconSize}px` : void 0
7332
7339
  },
7333
- children: isSelected && selectedIcon ? selectedIcon : asChild ? React36__namespace.Children.only(children).props.children : children
7340
+ children: isSelected && selectedIcon ? selectedIcon : asChild ? React37__namespace.Children.only(children).props.children : children
7334
7341
  }),
7335
7342
  isSelected && selectedIcon ? "selected-content" : "content"
7336
7343
  ) })
@@ -7347,7 +7354,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
7347
7354
  className
7348
7355
  );
7349
7356
  if (asChild) {
7350
- const child = React36__namespace.Children.only(children);
7357
+ const child = React37__namespace.Children.only(children);
7351
7358
  return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
7352
7359
  reactSlot.Slot,
7353
7360
  __spreadProps(__spreadValues({
@@ -7364,7 +7371,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
7364
7371
  }),
7365
7372
  className: containerClassName
7366
7373
  }, restProps), {
7367
- children: React36__namespace.cloneElement(child, { children: innerContent })
7374
+ children: React37__namespace.cloneElement(child, { children: innerContent })
7368
7375
  })
7369
7376
  ) });
7370
7377
  }
@@ -7392,7 +7399,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
7392
7399
  }
7393
7400
  );
7394
7401
  IconButtonComponent.displayName = "IconButton";
7395
- var IconButton = React36__namespace.memo(IconButtonComponent);
7402
+ var IconButton = React37__namespace.memo(IconButtonComponent);
7396
7403
  function TrailingAction({
7397
7404
  query,
7398
7405
  trailingIcon,
@@ -7452,7 +7459,7 @@ function SearchViewDocked({
7452
7459
  activeIndex
7453
7460
  }) {
7454
7461
  const shouldReduceMotion = react.useReducedMotion();
7455
- const inputRef = React36__namespace.useRef(null);
7462
+ const inputRef = React37__namespace.useRef(null);
7456
7463
  useSearchViewFocus(inputRef, active);
7457
7464
  const dropdownRef = useClickOutside(() => {
7458
7465
  onActiveChange(false);
@@ -7598,10 +7605,10 @@ function SearchViewFullScreen({
7598
7605
  activeIndex
7599
7606
  }) {
7600
7607
  const shouldReduceMotion = react.useReducedMotion();
7601
- const inputRef = React36__namespace.useRef(null);
7608
+ const inputRef = React37__namespace.useRef(null);
7602
7609
  useSearchViewFocus(inputRef, active);
7603
- const [mounted, setMounted] = React36__namespace.useState(false);
7604
- React36__namespace.useEffect(() => {
7610
+ const [mounted, setMounted] = React37__namespace.useState(false);
7611
+ React37__namespace.useEffect(() => {
7605
7612
  setMounted(true);
7606
7613
  }, []);
7607
7614
  const handleFormSubmit = (e) => {
@@ -7759,10 +7766,10 @@ function SearchComponent({
7759
7766
  className,
7760
7767
  viewClassName
7761
7768
  }) {
7762
- const generatedId = React36__namespace.useId();
7769
+ const generatedId = React37__namespace.useId();
7763
7770
  const searchId = id != null ? id : generatedId;
7764
7771
  const listboxId = `${searchId}-listbox`;
7765
- const itemCount = React36__namespace.Children.count(children);
7772
+ const itemCount = React37__namespace.Children.count(children);
7766
7773
  const { activeIndex, handleKeyDown } = useSearchKeyboard({
7767
7774
  active,
7768
7775
  onActiveChange,
@@ -7821,9 +7828,9 @@ function formatBadgeLabel(children, max) {
7821
7828
  return "";
7822
7829
  }
7823
7830
  function detectBadgeHasContent(badge) {
7824
- return React36__namespace.isValidElement(badge) && badge.props.children != null;
7831
+ return React37__namespace.isValidElement(badge) && badge.props.children != null;
7825
7832
  }
7826
- var BadgeImpl = React36__namespace.forwardRef(
7833
+ var BadgeImpl = React37__namespace.forwardRef(
7827
7834
  (_a, ref) => {
7828
7835
  var _b = _a, {
7829
7836
  children,
@@ -7877,7 +7884,7 @@ var BadgeImpl = React36__namespace.forwardRef(
7877
7884
  }
7878
7885
  );
7879
7886
  BadgeImpl.displayName = "Badge";
7880
- React36__namespace.memo(BadgeImpl);
7887
+ React37__namespace.memo(BadgeImpl);
7881
7888
  function BadgedBox({
7882
7889
  badge,
7883
7890
  children,
@@ -7898,9 +7905,9 @@ function BadgedBox({
7898
7905
  )
7899
7906
  ] });
7900
7907
  }
7901
- var TabsContext = React36__namespace.createContext(null);
7908
+ var TabsContext = React37__namespace.createContext(null);
7902
7909
  function useTabsContext() {
7903
- const ctx = React36__namespace.useContext(TabsContext);
7910
+ const ctx = React37__namespace.useContext(TabsContext);
7904
7911
  if (!ctx) {
7905
7912
  throw new Error(
7906
7913
  "[MD3 Tabs] Component must be used within a <Tabs> root. Ensure <TabsList>, <Tab>, and <TabsContent> are descendants of <Tabs>."
@@ -7908,7 +7915,7 @@ function useTabsContext() {
7908
7915
  }
7909
7916
  return ctx;
7910
7917
  }
7911
- var TabsComponent = React36__namespace.forwardRef(
7918
+ var TabsComponent = React37__namespace.forwardRef(
7912
7919
  ({
7913
7920
  value: controlledValue,
7914
7921
  defaultValue = "",
@@ -7917,35 +7924,35 @@ var TabsComponent = React36__namespace.forwardRef(
7917
7924
  children,
7918
7925
  className
7919
7926
  }, ref) => {
7920
- const [internalValue, setInternalValue] = React36__namespace.useState(defaultValue);
7927
+ const [internalValue, setInternalValue] = React37__namespace.useState(defaultValue);
7921
7928
  const isControlled = controlledValue !== void 0;
7922
7929
  const value = isControlled ? controlledValue : internalValue;
7923
- const handleValueChange = React36__namespace.useCallback(
7930
+ const handleValueChange = React37__namespace.useCallback(
7924
7931
  (newValue) => {
7925
7932
  if (!isControlled) setInternalValue(newValue);
7926
7933
  onValueChange == null ? void 0 : onValueChange(newValue);
7927
7934
  },
7928
7935
  [isControlled, onValueChange]
7929
7936
  );
7930
- const [focusedValue, setFocusedValue] = React36__namespace.useState(value);
7931
- React36__namespace.useEffect(() => {
7937
+ const [focusedValue, setFocusedValue] = React37__namespace.useState(value);
7938
+ React37__namespace.useEffect(() => {
7932
7939
  setFocusedValue(value);
7933
7940
  }, [value]);
7934
- const [tabValues, setTabValues] = React36__namespace.useState([]);
7935
- const registerTab = React36__namespace.useCallback((tabValue) => {
7941
+ const [tabValues, setTabValues] = React37__namespace.useState([]);
7942
+ const registerTab = React37__namespace.useCallback((tabValue) => {
7936
7943
  setTabValues((prev) => {
7937
7944
  if (prev.includes(tabValue)) return prev;
7938
7945
  return [...prev, tabValue];
7939
7946
  });
7940
7947
  }, []);
7941
- const unregisterTab = React36__namespace.useCallback((tabValue) => {
7948
+ const unregisterTab = React37__namespace.useCallback((tabValue) => {
7942
7949
  setTabValues((prev) => prev.filter((v) => v !== tabValue));
7943
7950
  }, []);
7944
- const hasAutoSelected = React36__namespace.useRef(false);
7945
- const [disabledValues, setDisabledValues] = React36__namespace.useState(
7951
+ const hasAutoSelected = React37__namespace.useRef(false);
7952
+ const [disabledValues, setDisabledValues] = React37__namespace.useState(
7946
7953
  /* @__PURE__ */ new Set()
7947
7954
  );
7948
- const markTabDisabled = React36__namespace.useCallback(
7955
+ const markTabDisabled = React37__namespace.useCallback(
7949
7956
  (tabValue, disabled) => {
7950
7957
  setDisabledValues((prev) => {
7951
7958
  const next = new Set(prev);
@@ -7959,7 +7966,7 @@ var TabsComponent = React36__namespace.forwardRef(
7959
7966
  },
7960
7967
  []
7961
7968
  );
7962
- React36__namespace.useEffect(() => {
7969
+ React37__namespace.useEffect(() => {
7963
7970
  if (isControlled || hasAutoSelected.current || tabValues.length === 0) {
7964
7971
  return;
7965
7972
  }
@@ -7974,9 +7981,9 @@ var TabsComponent = React36__namespace.forwardRef(
7974
7981
  setFocusedValue(firstEnabled);
7975
7982
  }
7976
7983
  }, [tabValues, disabledValues, isControlled, value]);
7977
- const id = React36__namespace.useId();
7984
+ const id = React37__namespace.useId();
7978
7985
  const layoutGroupId = `tabs-${id}`;
7979
- const contextValue = React36__namespace.useMemo(
7986
+ const contextValue = React37__namespace.useMemo(
7980
7987
  () => ({
7981
7988
  value,
7982
7989
  onValueChange: handleValueChange,
@@ -8007,12 +8014,12 @@ var TabsComponent = React36__namespace.forwardRef(
8007
8014
  }
8008
8015
  );
8009
8016
  TabsComponent.displayName = "Tabs";
8010
- var Tabs = React36__namespace.memo(TabsComponent);
8011
- var TabsListContext = React36__namespace.createContext(
8017
+ var Tabs = React37__namespace.memo(TabsComponent);
8018
+ var TabsListContext = React37__namespace.createContext(
8012
8019
  null
8013
8020
  );
8014
8021
  function useTabsListContext() {
8015
- const ctx = React36__namespace.useContext(TabsListContext);
8022
+ const ctx = React37__namespace.useContext(TabsListContext);
8016
8023
  return ctx != null ? ctx : { variant: "primary", scrollable: false };
8017
8024
  }
8018
8025
 
@@ -8096,7 +8103,7 @@ var TABS_CONTENT_TRANSITION = {
8096
8103
  ease: "easeInOut"
8097
8104
  };
8098
8105
  var INDICATOR_MIN_WIDTH = 24;
8099
- var TabComponent = React36__namespace.forwardRef(
8106
+ var TabComponent = React37__namespace.forwardRef(
8100
8107
  ({
8101
8108
  value,
8102
8109
  icon,
@@ -8126,9 +8133,9 @@ var TabComponent = React36__namespace.forwardRef(
8126
8133
  const isFocused = focusedValue === value;
8127
8134
  const hasIcon = icon != null;
8128
8135
  const isStackedIcon = hasIcon && !inlineIcon;
8129
- const buttonRef = React36__namespace.useRef(null);
8130
- const isFirstMount = React36__namespace.useRef(true);
8131
- const mergedRef = React36__namespace.useCallback(
8136
+ const buttonRef = React37__namespace.useRef(null);
8137
+ const isFirstMount = React37__namespace.useRef(true);
8138
+ const mergedRef = React37__namespace.useCallback(
8132
8139
  (node) => {
8133
8140
  buttonRef.current = node;
8134
8141
  if (typeof ref === "function") ref(node);
@@ -8136,15 +8143,15 @@ var TabComponent = React36__namespace.forwardRef(
8136
8143
  },
8137
8144
  [ref]
8138
8145
  );
8139
- React36__namespace.useEffect(() => {
8146
+ React37__namespace.useEffect(() => {
8140
8147
  registerTab(value);
8141
8148
  return () => unregisterTab(value);
8142
8149
  }, [value, registerTab, unregisterTab]);
8143
- React36__namespace.useEffect(() => {
8150
+ React37__namespace.useEffect(() => {
8144
8151
  markTabDisabled(value, disabled);
8145
8152
  return () => markTabDisabled(value, false);
8146
8153
  }, [value, disabled, markTabDisabled]);
8147
- const handleKeyDown = React36__namespace.useCallback(
8154
+ const handleKeyDown = React37__namespace.useCallback(
8148
8155
  (e) => {
8149
8156
  const isRtl = buttonRef.current ? getComputedStyle(buttonRef.current).direction === "rtl" : false;
8150
8157
  const enabledValues = tabValues.filter((v) => !disabledValues.has(v));
@@ -8198,7 +8205,7 @@ var TabComponent = React36__namespace.forwardRef(
8198
8205
  autoActivate
8199
8206
  ]
8200
8207
  );
8201
- React36__namespace.useEffect(() => {
8208
+ React37__namespace.useEffect(() => {
8202
8209
  if (isFirstMount.current) {
8203
8210
  isFirstMount.current = false;
8204
8211
  return;
@@ -8207,7 +8214,7 @@ var TabComponent = React36__namespace.forwardRef(
8207
8214
  buttonRef.current.focus({ preventScroll: true });
8208
8215
  }
8209
8216
  }, [isFocused]);
8210
- React36__namespace.useEffect(() => {
8217
+ React37__namespace.useEffect(() => {
8211
8218
  if (!isActive || !scrollable || !buttonRef.current) return;
8212
8219
  const btn = buttonRef.current;
8213
8220
  let container = btn.parentElement;
@@ -8344,8 +8351,8 @@ var TabComponent = React36__namespace.forwardRef(
8344
8351
  }
8345
8352
  );
8346
8353
  TabComponent.displayName = "Tab";
8347
- var Tab = React36__namespace.memo(TabComponent);
8348
- var TabsContentComponent = React36__namespace.forwardRef(
8354
+ var Tab = React37__namespace.memo(TabComponent);
8355
+ var TabsContentComponent = React37__namespace.forwardRef(
8349
8356
  ({ value, className, children }, ref) => {
8350
8357
  var _a;
8351
8358
  const { value: selectedValue, layoutGroupId } = useTabsContext();
@@ -8379,8 +8386,8 @@ var TabsContentComponent = React36__namespace.forwardRef(
8379
8386
  }
8380
8387
  );
8381
8388
  TabsContentComponent.displayName = "TabsContent";
8382
- var TabsContent = React36__namespace.memo(TabsContentComponent);
8383
- var TabsListComponent = React36__namespace.forwardRef(
8389
+ var TabsContent = React37__namespace.memo(TabsContentComponent);
8390
+ var TabsListComponent = React37__namespace.forwardRef(
8384
8391
  ({
8385
8392
  variant,
8386
8393
  scrollable = false,
@@ -8391,12 +8398,12 @@ var TabsListComponent = React36__namespace.forwardRef(
8391
8398
  }, ref) => {
8392
8399
  const { layoutGroupId, value, setFocusedValue } = useTabsContext();
8393
8400
  const listLayoutId = `${layoutGroupId}-list`;
8394
- const listContextValue = React36__namespace.useMemo(
8401
+ const listContextValue = React37__namespace.useMemo(
8395
8402
  () => ({ variant, scrollable }),
8396
8403
  [variant, scrollable]
8397
8404
  );
8398
8405
  const bgColor = backgroundColor != null ? backgroundColor : "var(--md-sys-color-surface)";
8399
- const handleBlur = React36__namespace.useCallback(
8406
+ const handleBlur = React37__namespace.useCallback(
8400
8407
  (e) => {
8401
8408
  const listEl = e.currentTarget;
8402
8409
  if (listEl.contains(e.relatedTarget)) return;
@@ -8445,7 +8452,7 @@ var TabsListComponent = React36__namespace.forwardRef(
8445
8452
  }
8446
8453
  );
8447
8454
  TabsListComponent.displayName = "TabsList";
8448
- var TabsList = React36__namespace.memo(TabsListComponent);
8455
+ var TabsList = React37__namespace.memo(TabsListComponent);
8449
8456
 
8450
8457
  // src/ui/toolbar/toolbar-colors.ts
8451
8458
  var standardFloatingToolbarColors = {
@@ -8501,13 +8508,13 @@ function getToolbarColors(variant = "standard", customColors) {
8501
8508
  return standardFloatingToolbarColors;
8502
8509
  }
8503
8510
  }
8504
- var ToolbarContext = React36__namespace.createContext(
8511
+ var ToolbarContext = React37__namespace.createContext(
8505
8512
  null
8506
8513
  );
8507
8514
  function useToolbarContext() {
8508
- return React36__namespace.useContext(ToolbarContext);
8515
+ return React37__namespace.useContext(ToolbarContext);
8509
8516
  }
8510
- var BottomDockedToolbar = React36__namespace.forwardRef(
8517
+ var BottomDockedToolbar = React37__namespace.forwardRef(
8511
8518
  (_a, ref) => {
8512
8519
  var _b = _a, {
8513
8520
  variant = "standard",
@@ -8540,8 +8547,8 @@ var BottomDockedToolbar = React36__namespace.forwardRef(
8540
8547
  const { scrollY } = react.useScroll(
8541
8548
  scrollContainerRef ? { container: scrollContainerRef } : void 0
8542
8549
  );
8543
- const [isHidden, setIsHidden] = React36__namespace.useState(false);
8544
- const lastScrollY = React36__namespace.useRef(0);
8550
+ const [isHidden, setIsHidden] = React37__namespace.useState(false);
8551
+ const lastScrollY = React37__namespace.useRef(0);
8545
8552
  react.useMotionValueEvent(scrollY, "change", (latest) => {
8546
8553
  if (!hideOnScroll) return;
8547
8554
  const diff = latest - lastScrollY.current;
@@ -8700,15 +8707,15 @@ function buildSlotVariants(xHidden, yHidden, isHorizontal) {
8700
8707
  };
8701
8708
  }
8702
8709
  function applyItemClassName(nodes, itemClassName) {
8703
- return React36__namespace.Children.map(nodes, (child) => {
8704
- if (!React36__namespace.isValidElement(child)) return child;
8710
+ return React37__namespace.Children.map(nodes, (child) => {
8711
+ if (!React37__namespace.isValidElement(child)) return child;
8705
8712
  const element = child;
8706
- return React36__namespace.cloneElement(element, {
8713
+ return React37__namespace.cloneElement(element, {
8707
8714
  className: cn(element.props.className, itemClassName)
8708
8715
  });
8709
8716
  });
8710
8717
  }
8711
- var FloatingToolbarBase = React36__namespace.forwardRef(
8718
+ var FloatingToolbarBase = React37__namespace.forwardRef(
8712
8719
  (_a, ref) => {
8713
8720
  var _b = _a, {
8714
8721
  expanded,
@@ -8880,11 +8887,11 @@ var FloatingToolbarBase = React36__namespace.forwardRef(
8880
8887
  }
8881
8888
  );
8882
8889
  FloatingToolbarBase.displayName = "FloatingToolbarBase";
8883
- var HorizontalFloatingToolbar = React36__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarBase, __spreadValues({ ref, orientation: "horizontal" }, props)));
8890
+ var HorizontalFloatingToolbar = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarBase, __spreadValues({ ref, orientation: "horizontal" }, props)));
8884
8891
  HorizontalFloatingToolbar.displayName = "HorizontalFloatingToolbar";
8885
- var VerticalFloatingToolbar = React36__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarBase, __spreadValues({ ref, orientation: "vertical" }, props)));
8892
+ var VerticalFloatingToolbar = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarBase, __spreadValues({ ref, orientation: "vertical" }, props)));
8886
8893
  VerticalFloatingToolbar.displayName = "VerticalFloatingToolbar";
8887
- var FloatingToolbarWithFabBase = React36__namespace.forwardRef(
8894
+ var FloatingToolbarWithFabBase = React37__namespace.forwardRef(
8888
8895
  (_a, ref) => {
8889
8896
  var _b = _a, {
8890
8897
  expanded,
@@ -9012,9 +9019,9 @@ var FloatingToolbarWithFabBase = React36__namespace.forwardRef(
9012
9019
  }
9013
9020
  );
9014
9021
  FloatingToolbarWithFabBase.displayName = "FloatingToolbarWithFabBase";
9015
- var HorizontalFloatingToolbarWithFab = React36__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarWithFabBase, __spreadValues({ ref, orientation: "horizontal" }, props)));
9022
+ var HorizontalFloatingToolbarWithFab = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarWithFabBase, __spreadValues({ ref, orientation: "horizontal" }, props)));
9016
9023
  HorizontalFloatingToolbarWithFab.displayName = "HorizontalFloatingToolbarWithFab";
9017
- var VerticalFloatingToolbarWithFab = React36__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarWithFabBase, __spreadValues({ ref, orientation: "vertical" }, props)));
9024
+ var VerticalFloatingToolbarWithFab = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarWithFabBase, __spreadValues({ ref, orientation: "vertical" }, props)));
9018
9025
  VerticalFloatingToolbarWithFab.displayName = "VerticalFloatingToolbarWithFab";
9019
9026
  var ToolbarDivider = ({
9020
9027
  orientation: propsOrientation,
@@ -9050,7 +9057,7 @@ var VARIANT_TO_COLOR_STYLE = {
9050
9057
  tonal: "tonal",
9051
9058
  filled: "filled"
9052
9059
  };
9053
- var ToolbarIconButton = React36__namespace.forwardRef(
9060
+ var ToolbarIconButton = React37__namespace.forwardRef(
9054
9061
  (_a, ref) => {
9055
9062
  var _b = _a, {
9056
9063
  emphasis = "standard",
@@ -9112,13 +9119,13 @@ function useFloatingToolbarScrollBehavior(options = {}) {
9112
9119
  expandThreshold = 10,
9113
9120
  scrollContainerRef
9114
9121
  } = options;
9115
- const [isExpanded, setIsExpanded] = React36.useState(true);
9116
- const [offset, setOffset] = React36.useState(0);
9122
+ const [isExpanded, setIsExpanded] = React37.useState(true);
9123
+ const [offset, setOffset] = React37.useState(0);
9117
9124
  const { scrollY } = react.useScroll({
9118
9125
  container: scrollContainerRef
9119
9126
  });
9120
- const lastScrollY = React36.useRef(0);
9121
- const accumulatedScroll = React36.useRef(0);
9127
+ const lastScrollY = React37.useRef(0);
9128
+ const accumulatedScroll = React37.useRef(0);
9122
9129
  react.useMotionValueEvent(scrollY, "change", (currentScrollY) => {
9123
9130
  const deltaY = currentScrollY - lastScrollY.current;
9124
9131
  if (currentScrollY < 0) return;
@@ -9140,7 +9147,7 @@ function useFloatingToolbarScrollBehavior(options = {}) {
9140
9147
  }
9141
9148
  }
9142
9149
  });
9143
- React36.useEffect(() => {
9150
+ React37.useEffect(() => {
9144
9151
  if (typeof window !== "undefined") {
9145
9152
  const matchMedia = window.matchMedia("(forced-colors: active)");
9146
9153
  if (matchMedia.matches) {
@@ -9222,7 +9229,7 @@ var MOTION_PROP_KEYS = [
9222
9229
  "layoutId",
9223
9230
  "onLayoutAnimationComplete"
9224
9231
  ];
9225
- var ToolbarToggleButton = React36__namespace.forwardRef(
9232
+ var ToolbarToggleButton = React37__namespace.forwardRef(
9226
9233
  (_a, ref) => {
9227
9234
  var _b = _a, {
9228
9235
  emphasis = "standard",
@@ -9256,7 +9263,7 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
9256
9263
  "onPointerLeave"
9257
9264
  ]);
9258
9265
  const context = useToolbarContext();
9259
- const [isPressed, setIsPressed] = React36__namespace.useState(false);
9266
+ const [isPressed, setIsPressed] = React37__namespace.useState(false);
9260
9267
  const {
9261
9268
  ripples,
9262
9269
  onPointerDown: handleRipplePointerDown,
@@ -9264,7 +9271,7 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
9264
9271
  } = useRippleState({
9265
9272
  disabled: Boolean(disabled) || !ripple
9266
9273
  });
9267
- const handlePointerDown = React36__namespace.useCallback(
9274
+ const handlePointerDown = React37__namespace.useCallback(
9268
9275
  (e) => {
9269
9276
  setIsPressed(true);
9270
9277
  if (!disabled && ripple) {
@@ -9274,14 +9281,14 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
9274
9281
  },
9275
9282
  [disabled, ripple, handleRipplePointerDown, onPointerDownProp]
9276
9283
  );
9277
- const handlePointerUp = React36__namespace.useCallback(
9284
+ const handlePointerUp = React37__namespace.useCallback(
9278
9285
  (e) => {
9279
9286
  setIsPressed(false);
9280
9287
  onPointerUpProp == null ? void 0 : onPointerUpProp(e);
9281
9288
  },
9282
9289
  [onPointerUpProp]
9283
9290
  );
9284
- const handlePointerLeave = React36__namespace.useCallback(
9291
+ const handlePointerLeave = React37__namespace.useCallback(
9285
9292
  (e) => {
9286
9293
  setIsPressed(false);
9287
9294
  onPointerLeaveProp == null ? void 0 : onPointerLeaveProp(e);
@@ -9300,14 +9307,14 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
9300
9307
  context == null ? void 0 : context.itemClassName,
9301
9308
  className
9302
9309
  );
9303
- const animateConfig = React36__namespace.useMemo(
9310
+ const animateConfig = React37__namespace.useMemo(
9304
9311
  () => ({
9305
9312
  scaleX: pressExpand && isPressed ? 1 + pressExpandRatio : 1,
9306
9313
  borderRadius: isPressed ? ToolbarToggleButtonRadiusTokens.pressedRadius : ToolbarToggleButtonRadiusTokens.pillRadius
9307
9314
  }),
9308
9315
  [pressExpand, pressExpandRatio, isPressed]
9309
9316
  );
9310
- const transitionConfig = React36__namespace.useMemo(
9317
+ const transitionConfig = React37__namespace.useMemo(
9311
9318
  () => ({
9312
9319
  scaleX: FAST_SPATIAL_SPRING,
9313
9320
  borderRadius: BUTTON_RADIUS_SPRING
@@ -9329,7 +9336,7 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
9329
9336
  children && (typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children }) : children)
9330
9337
  ] });
9331
9338
  if (asChild) {
9332
- const child = React36__namespace.Children.only(children);
9339
+ const child = React37__namespace.Children.only(children);
9333
9340
  const childContent = child.props.children;
9334
9341
  const innerChildContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9335
9342
  ripple && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9368,7 +9375,7 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
9368
9375
  onPointerUp: handlePointerUp,
9369
9376
  onPointerLeave: handlePointerLeave
9370
9377
  }, strippedProps), {
9371
- children: React36__namespace.cloneElement(child, { children: innerChildContent })
9378
+ children: React37__namespace.cloneElement(child, { children: innerChildContent })
9372
9379
  })
9373
9380
  ) });
9374
9381
  }