@dxos/react-ui 0.7.4 → 0.7.5-labs.071a3e2

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 (101) hide show
  1. package/dist/lib/browser/index.mjs +510 -347
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +766 -614
  5. package/dist/lib/node/index.cjs.map +4 -4
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +510 -347
  8. package/dist/lib/node-esm/index.mjs.map +4 -4
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/Avatars/Avatar.d.ts +5 -9
  11. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  12. package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -2
  13. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  14. package/dist/types/src/components/Buttons/IconButton.d.ts +6 -2
  15. package/dist/types/src/components/Buttons/IconButton.d.ts.map +1 -1
  16. package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +1 -1
  17. package/dist/types/src/components/Dialogs/Dialog.d.ts.map +1 -1
  18. package/dist/types/src/components/Input/Input.d.ts +5 -6
  19. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  20. package/dist/types/src/components/Input/Input.stories.d.ts +1 -3
  21. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  22. package/dist/types/src/components/Lists/List.d.ts +2 -0
  23. package/dist/types/src/components/Lists/List.d.ts.map +1 -1
  24. package/dist/types/src/components/Lists/ListDropIndicator.d.ts +13 -0
  25. package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +1 -0
  26. package/dist/types/src/components/Lists/Tree.d.ts +2 -0
  27. package/dist/types/src/components/Lists/Tree.d.ts.map +1 -1
  28. package/dist/types/src/components/Lists/TreeDropIndicator.d.ts +8 -0
  29. package/dist/types/src/components/Lists/TreeDropIndicator.d.ts.map +1 -0
  30. package/dist/types/src/components/Main/Main.d.ts +35 -24
  31. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  32. package/dist/types/src/components/Main/Main.stories.d.ts +1 -1
  33. package/dist/types/src/components/Menus/ContextMenu.d.ts.map +1 -1
  34. package/dist/types/src/components/Menus/DropdownMenu.d.ts +2 -6
  35. package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
  36. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  37. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  38. package/dist/types/src/components/Separator/Separator.d.ts +3 -1
  39. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  40. package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
  41. package/dist/types/src/components/Tag/Tag.stories.d.ts +12 -5
  42. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  43. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +4 -2
  44. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  45. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -0
  46. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  47. package/dist/types/src/components/Toolbar/Toolbar.d.ts +15 -5
  48. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  49. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +7 -2
  50. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  51. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  52. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +13 -1
  53. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  54. package/dist/types/src/hooks/index.d.ts +1 -0
  55. package/dist/types/src/hooks/index.d.ts.map +1 -1
  56. package/dist/types/src/hooks/useSafeArea.d.ts +9 -0
  57. package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -0
  58. package/dist/types/src/hooks/useSafeCollisionPadding.d.ts +10 -0
  59. package/dist/types/src/hooks/useSafeCollisionPadding.d.ts.map +1 -0
  60. package/dist/types/src/hooks/useVisualViewport.d.ts +1 -1
  61. package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
  62. package/dist/types/src/util/ThemedClassName.d.ts +1 -1
  63. package/dist/types/src/util/ThemedClassName.d.ts.map +1 -1
  64. package/dist/types/tsconfig.tsbuildinfo +1 -0
  65. package/package.json +43 -42
  66. package/src/components/Avatars/Avatar.tsx +3 -6
  67. package/src/components/Buttons/IconButton.tsx +25 -7
  68. package/src/components/Clipboard/CopyButton.tsx +1 -1
  69. package/src/components/Dialogs/AlertDialog.tsx +6 -2
  70. package/src/components/Dialogs/Dialog.tsx +7 -11
  71. package/src/components/Input/Input.stories.tsx +4 -6
  72. package/src/components/Input/Input.tsx +29 -44
  73. package/src/components/Lists/List.stories.tsx +2 -2
  74. package/src/components/Lists/List.tsx +3 -0
  75. package/src/components/Lists/ListDropIndicator.tsx +70 -0
  76. package/src/components/Lists/Tree.tsx +3 -0
  77. package/src/components/Lists/TreeDropIndicator.tsx +70 -0
  78. package/src/components/Main/Main.stories.tsx +1 -1
  79. package/src/components/Main/Main.tsx +79 -110
  80. package/src/components/Menus/ContextMenu.tsx +8 -6
  81. package/src/components/Menus/DropdownMenu.tsx +7 -4
  82. package/src/components/Popover/Popover.tsx +8 -2
  83. package/src/components/ScrollArea/ScrollArea.stories.tsx +2 -2
  84. package/src/components/Select/Select.tsx +7 -3
  85. package/src/components/Separator/Separator.tsx +14 -11
  86. package/src/components/Tag/Tag.stories.tsx +20 -31
  87. package/src/components/Tag/Tag.tsx +15 -6
  88. package/src/components/ThemeProvider/ThemeProvider.tsx +13 -5
  89. package/src/components/Toast/Toast.tsx +1 -1
  90. package/src/components/Toolbar/Toolbar.tsx +40 -10
  91. package/src/components/Tooltip/Tooltip.stories.tsx +13 -2
  92. package/src/components/Tooltip/Tooltip.tsx +18 -13
  93. package/src/hooks/index.ts +1 -0
  94. package/src/hooks/useSafeArea.ts +25 -0
  95. package/src/hooks/useSafeCollisionPadding.ts +39 -0
  96. package/src/hooks/useVisualViewport.ts +11 -12
  97. package/src/testing/decorators/withVariants.tsx +4 -4
  98. package/src/util/ThemedClassName.ts +1 -1
  99. package/dist/types/src/playground/Surfaces.stories.d.ts +0 -21
  100. package/dist/types/src/playground/Surfaces.stories.d.ts.map +0 -1
  101. package/src/playground/Surfaces.stories.tsx +0 -73
@@ -24,13 +24,36 @@ var useElevationContext = (propsElevation) => {
24
24
  return propsElevation ?? elevation;
25
25
  };
26
26
 
27
+ // packages/ui/react-ui/src/hooks/useSafeArea.ts
28
+ import { useCallback, useState } from "react";
29
+ import { useResize } from "@dxos/react-hooks";
30
+ var initialSafeArea = {
31
+ top: NaN,
32
+ right: NaN,
33
+ bottom: NaN,
34
+ left: NaN
35
+ };
36
+ var useSafeArea = () => {
37
+ const [padding, setPadding] = useState(initialSafeArea);
38
+ const handleResize = useCallback(() => {
39
+ setPadding({
40
+ top: parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-top")),
41
+ right: parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-right")),
42
+ bottom: parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-bottom")),
43
+ left: parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-left"))
44
+ });
45
+ }, []);
46
+ useResize(handleResize);
47
+ return padding;
48
+ };
49
+
27
50
  // packages/ui/react-ui/src/hooks/useTranslationsContext.ts
28
51
  import { useContext as useContext4 } from "react";
29
52
 
30
53
  // packages/ui/react-ui/src/components/ThemeProvider/TranslationsProvider.tsx
31
54
  import { enUS as dtLocaleEnUs } from "date-fns/locale";
32
55
  import i18Next from "i18next";
33
- import React, { useEffect, createContext, useState, Suspense, useContext as useContext3 } from "react";
56
+ import React, { useEffect, createContext, useState as useState2, Suspense, useContext as useContext3 } from "react";
34
57
  import { initReactI18next, useTranslation as useI18NextTranslation } from "react-i18next";
35
58
  var initialLng = "en-US";
36
59
  var initialNs = "dxos-common";
@@ -65,7 +88,7 @@ var useTranslation = (...args) => {
65
88
  };
66
89
  };
67
90
  var TranslationsProvider = ({ fallback, resourceExtensions, children, appNs, dtLocale }) => {
68
- const [loaded, setLoaded] = useState(false);
91
+ const [loaded, setLoaded] = useState2(false);
69
92
  useEffect(() => {
70
93
  setLoaded(false);
71
94
  if (resourceExtensions && resourceExtensions.length) {
@@ -100,21 +123,18 @@ import { raise } from "@dxos/debug";
100
123
  var useThemeContext = () => useContext5(ThemeContext) ?? raise(new Error("Missing ThemeContext"));
101
124
 
102
125
  // packages/ui/react-ui/src/hooks/useVisualViewport.ts
103
- import { useEffect as useEffect2, useState as useState2 } from "react";
126
+ import { useCallback as useCallback2, useState as useState3 } from "react";
127
+ import { useResize as useResize2 } from "@dxos/react-hooks";
104
128
  var useVisualViewport = (deps) => {
105
- const [width, setWidth] = useState2(null);
106
- const [height, setHeight] = useState2(null);
107
- useEffect2(() => {
108
- const handleResize = () => {
109
- if (window.visualViewport) {
110
- setWidth(window.visualViewport.width);
111
- setHeight(window.visualViewport.height);
112
- }
113
- };
114
- window.visualViewport?.addEventListener("resize", handleResize);
115
- handleResize();
116
- return () => window.visualViewport?.removeEventListener("resize", handleResize);
117
- }, deps ?? []);
129
+ const [width, setWidth] = useState3(null);
130
+ const [height, setHeight] = useState3(null);
131
+ const handleResize = useCallback2(() => {
132
+ if (window.visualViewport) {
133
+ setWidth(window.visualViewport.width);
134
+ setHeight(window.visualViewport.height);
135
+ }
136
+ }, []);
137
+ useResize2(handleResize);
118
138
  return {
119
139
  width,
120
140
  height
@@ -574,11 +594,33 @@ var ButtonGroup = /* @__PURE__ */ forwardRef7(({ children, elevation: propsEleva
574
594
  ButtonGroup.displayName = BUTTON_GROUP_NAME;
575
595
 
576
596
  // packages/ui/react-ui/src/components/Buttons/IconButton.tsx
577
- import React10, { forwardRef as forwardRef9 } from "react";
597
+ import React10, { forwardRef as forwardRef9, useState as useState4 } from "react";
578
598
 
579
599
  // packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
580
600
  import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
581
601
  import React9, { forwardRef as forwardRef8 } from "react";
602
+
603
+ // packages/ui/react-ui/src/hooks/useSafeCollisionPadding.ts
604
+ import { useMemo } from "react";
605
+ var propIsNumber = (prop) => Number.isFinite(prop);
606
+ var propsIsRecord = (prop) => !!(prop && typeof prop === "object");
607
+ var safePadding = (propsPadding, safePadding2, side) => {
608
+ return (propIsNumber(safePadding2[side]) ? safePadding2[side] : 0) + (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0);
609
+ };
610
+ var useSafeCollisionPadding = (collisionPadding) => {
611
+ const { safeAreaPadding } = useThemeContext();
612
+ return useMemo(() => ({
613
+ top: safePadding(collisionPadding, safeAreaPadding, "top"),
614
+ right: safePadding(collisionPadding, safeAreaPadding, "right"),
615
+ bottom: safePadding(collisionPadding, safeAreaPadding, "bottom"),
616
+ left: safePadding(collisionPadding, safeAreaPadding, "left")
617
+ }), [
618
+ collisionPadding,
619
+ safeAreaPadding
620
+ ]);
621
+ };
622
+
623
+ // packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
582
624
  var TooltipProvider = TooltipProviderPrimitive;
583
625
  var TooltipRoot = TooltipRootPrimitive;
584
626
  var TooltipPortal = TooltipPortalPrimitive;
@@ -591,13 +633,17 @@ var TooltipArrow = /* @__PURE__ */ forwardRef8(({ classNames, ...props }, forwar
591
633
  ref: forwardedRef
592
634
  });
593
635
  });
594
- var TooltipContent = /* @__PURE__ */ forwardRef8(({ classNames, ...props }, forwardedRef) => {
636
+ var TooltipContent = /* @__PURE__ */ forwardRef8(({ classNames, collisionPadding = 8, ...props }, forwardedRef) => {
595
637
  const { tx } = useThemeContext();
638
+ const elevation = useElevationContext();
639
+ const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
596
640
  return /* @__PURE__ */ React9.createElement(TooltipContentPrimitive, {
597
641
  sideOffset: 4,
598
- collisionPadding: 8,
599
642
  ...props,
600
- className: tx("tooltip.content", "tooltip", {}, classNames),
643
+ collisionPadding: safeCollisionPadding,
644
+ className: tx("tooltip.content", "tooltip", {
645
+ elevation
646
+ }, classNames),
601
647
  ref: forwardedRef
602
648
  });
603
649
  });
@@ -611,20 +657,34 @@ var Tooltip = {
611
657
  };
612
658
 
613
659
  // packages/ui/react-ui/src/components/Buttons/IconButton.tsx
614
- var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, ...props }, forwardedRef) => {
615
- const content = /* @__PURE__ */ React10.createElement(Tooltip.Content, zIndex && {
616
- style: {
617
- zIndex
618
- }
660
+ var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, tooltipSide, suppressNextTooltip, ...props }, forwardedRef) => {
661
+ const [triggerTooltipOpen, setTriggerTooltipOpen] = useState4(false);
662
+ const content = /* @__PURE__ */ React10.createElement(Tooltip.Content, {
663
+ ...zIndex && {
664
+ style: {
665
+ zIndex
666
+ }
667
+ },
668
+ side: tooltipSide
619
669
  }, props.label, /* @__PURE__ */ React10.createElement(Tooltip.Arrow, null));
620
- return /* @__PURE__ */ React10.createElement(Tooltip.Root, null, /* @__PURE__ */ React10.createElement(Tooltip.Trigger, {
670
+ return /* @__PURE__ */ React10.createElement(Tooltip.Root, {
671
+ open: triggerTooltipOpen,
672
+ onOpenChange: (nextOpen) => {
673
+ if (suppressNextTooltip?.current) {
674
+ setTriggerTooltipOpen(false);
675
+ suppressNextTooltip.current = false;
676
+ } else {
677
+ setTriggerTooltipOpen(nextOpen);
678
+ }
679
+ }
680
+ }, /* @__PURE__ */ React10.createElement(Tooltip.Trigger, {
621
681
  asChild: true
622
682
  }, /* @__PURE__ */ React10.createElement(LabelledIconButton, {
623
683
  ...props,
624
684
  ref: forwardedRef
625
685
  })), tooltipPortal ? /* @__PURE__ */ React10.createElement(Tooltip.Portal, null, content) : content);
626
686
  });
627
- var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, label, classNames, iconClassNames, ...props }, forwardedRef) => {
687
+ var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, label, classNames, iconClassNames, caretDown, suppressNextTooltip, ...props }, forwardedRef) => {
628
688
  const { tx } = useThemeContext();
629
689
  return /* @__PURE__ */ React10.createElement(Button, {
630
690
  ...props,
@@ -636,7 +696,10 @@ var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, la
636
696
  classNames: iconClassNames
637
697
  }), /* @__PURE__ */ React10.createElement("span", {
638
698
  className: iconOnly ? "sr-only" : void 0
639
- }, label));
699
+ }, label), caretDown && /* @__PURE__ */ React10.createElement(Icon, {
700
+ size: 3,
701
+ icon: "ph--caret-down--bold"
702
+ }));
640
703
  });
641
704
  var IconButton = /* @__PURE__ */ forwardRef9((props, forwardedRef) => props.iconOnly ? /* @__PURE__ */ React10.createElement(IconOnlyButton, {
642
705
  ...props,
@@ -689,7 +752,7 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef11(({ variant, elevation, densit
689
752
  });
690
753
 
691
754
  // packages/ui/react-ui/src/components/Clipboard/ClipboardProvider.tsx
692
- import React13, { createContext as createContext4, useCallback, useContext as useContext6, useState as useState3 } from "react";
755
+ import React13, { createContext as createContext4, useCallback as useCallback3, useContext as useContext6, useState as useState5 } from "react";
693
756
  var ClipboardContext = /* @__PURE__ */ createContext4({
694
757
  textValue: "",
695
758
  setTextValue: async (_) => {
@@ -697,8 +760,8 @@ var ClipboardContext = /* @__PURE__ */ createContext4({
697
760
  });
698
761
  var useClipboard = () => useContext6(ClipboardContext);
699
762
  var ClipboardProvider = ({ children }) => {
700
- const [textValue, setInternalTextValue] = useState3("");
701
- const setTextValue = useCallback(async (nextValue) => {
763
+ const [textValue, setInternalTextValue] = useState5("");
764
+ const setTextValue = useCallback3(async (nextValue) => {
702
765
  await navigator.clipboard.writeText(nextValue);
703
766
  return setInternalTextValue(nextValue);
704
767
  }, []);
@@ -711,12 +774,12 @@ var ClipboardProvider = ({ children }) => {
711
774
  };
712
775
 
713
776
  // packages/ui/react-ui/src/components/Clipboard/CopyButton.tsx
714
- import React17, { useState as useState4 } from "react";
777
+ import React17, { useState as useState6 } from "react";
715
778
  import { mx } from "@dxos/react-ui-theme";
716
779
 
717
780
  // packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
718
781
  import { createKeyborg } from "keyborg";
719
- import React16, { createContext as createContext7, useEffect as useEffect3 } from "react";
782
+ import React16, { createContext as createContext7, useEffect as useEffect2, useMemo as useMemo2 } from "react";
720
783
 
721
784
  // packages/ui/react-ui/src/util/hasIosKeyboard.ts
722
785
  var hasIosKeyboard = () => {
@@ -747,27 +810,35 @@ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React15.cre
747
810
 
748
811
  // packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
749
812
  var ThemeContext = /* @__PURE__ */ createContext7(void 0);
750
- var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", rootElevation = "base", ...rest }) => {
751
- useEffect3(() => {
813
+ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", ...rest }) => {
814
+ useEffect2(() => {
752
815
  if (document.defaultView) {
753
816
  const kb = createKeyborg(document.defaultView);
754
817
  kb.subscribe(handleInputModalityChange);
755
818
  return () => kb.unsubscribe(handleInputModalityChange);
756
819
  }
757
820
  }, []);
821
+ const safeAreaPadding = useSafeArea();
822
+ const contextValue = useMemo2(() => ({
823
+ tx,
824
+ themeMode,
825
+ hasIosKeyboard: hasIosKeyboard(),
826
+ safeAreaPadding,
827
+ ...rest
828
+ }), [
829
+ tx,
830
+ themeMode,
831
+ safeAreaPadding,
832
+ rest
833
+ ]);
758
834
  return /* @__PURE__ */ React16.createElement(ThemeContext.Provider, {
759
- value: {
760
- tx,
761
- themeMode,
762
- hasIosKeyboard: hasIosKeyboard(),
763
- ...rest
764
- }
835
+ value: contextValue
765
836
  }, /* @__PURE__ */ React16.createElement(TranslationsProvider, {
766
837
  fallback,
767
838
  resourceExtensions,
768
839
  appNs
769
840
  }, /* @__PURE__ */ React16.createElement(ElevationProvider, {
770
- elevation: rootElevation
841
+ elevation: "base"
771
842
  }, /* @__PURE__ */ React16.createElement(DensityProvider, {
772
843
  density: rootDensity
773
844
  }, children))));
@@ -819,15 +890,14 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
819
890
  const { textValue, setTextValue } = useClipboard();
820
891
  const isCopied = textValue === value;
821
892
  const label = isCopied ? t("copy success label") : t("copy label");
822
- const [open, setOpen] = useState4(false);
893
+ const [open, setOpen] = useState6(false);
823
894
  return /* @__PURE__ */ React17.createElement(Tooltip.Root, {
824
895
  delayDuration: 1500,
825
896
  open,
826
897
  onOpenChange: setOpen
827
898
  }, /* @__PURE__ */ React17.createElement(Tooltip.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip.Content, {
828
899
  side: "bottom",
829
- sideOffset: 12,
830
- classNames: "z-30"
900
+ sideOffset: 12
831
901
  }, /* @__PURE__ */ React17.createElement("span", null, label), /* @__PURE__ */ React17.createElement(Tooltip.Arrow, null))), /* @__PURE__ */ React17.createElement(Tooltip.Trigger, {
832
902
  "aria-label": label,
833
903
  ...props,
@@ -858,7 +928,9 @@ var Clipboard = {
858
928
  import { createContext as createContext8 } from "@radix-ui/react-context";
859
929
  import { Root as DialogRootPrimitive, DialogTrigger as DialogTriggerPrimitive, DialogPortal as DialogPortalPrimitive, DialogOverlay as DialogOverlayPrimitive, DialogTitle as DialogTitlePrimitive, DialogDescription as DialogDescriptionPrimitive, DialogClose as DialogClosePrimitive, DialogContent as DialogContentPrimitive } from "@radix-ui/react-dialog";
860
930
  import React18, { forwardRef as forwardRef12 } from "react";
861
- var DialogRoot = DialogRootPrimitive;
931
+ var DialogRoot = (props) => /* @__PURE__ */ React18.createElement(ElevationProvider, {
932
+ elevation: "dialog"
933
+ }, /* @__PURE__ */ React18.createElement(DialogRootPrimitive, props));
862
934
  var DialogTrigger = DialogTriggerPrimitive;
863
935
  var DialogPortal = DialogPortalPrimitive;
864
936
  var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
@@ -891,7 +963,7 @@ var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, blockA
891
963
  const { tx } = useThemeContext();
892
964
  return /* @__PURE__ */ React18.createElement(DialogOverlayPrimitive, {
893
965
  ...props,
894
- className: tx("dialog.overlay", "dialog__overlay", {}, classNames, "data-[block-align=start]:justify-center", "data-[block-align=start]:items-start", "data-[block-align=center]:place-content-center"),
966
+ className: tx("dialog.overlay", "dialog__overlay", {}, classNames),
895
967
  ref: forwardedRef,
896
968
  "data-block-align": blockAlign
897
969
  }, /* @__PURE__ */ React18.createElement(OverlayLayoutProvider, {
@@ -908,9 +980,7 @@ var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...pro
908
980
  inOverlayLayout
909
981
  }, classNames),
910
982
  ref: forwardedRef
911
- }, /* @__PURE__ */ React18.createElement(ElevationProvider, {
912
- elevation: "chrome"
913
- }, children));
983
+ }, children);
914
984
  });
915
985
  DialogContent.displayName = DIALOG_CONTENT_NAME;
916
986
  var Dialog = {
@@ -928,7 +998,9 @@ var Dialog = {
928
998
  import { Root as AlertDialogRootPrimitive, AlertDialogTrigger as AlertDialogTriggerPrimitive, AlertDialogPortal as AlertDialogPortalPrimitive, AlertDialogOverlay as AlertDialogOverlayPrimitive, AlertDialogTitle as AlertDialogTitlePrimitive, AlertDialogDescription as AlertDialogDescriptionPrimitive, AlertDialogAction as AlertDialogActionPrimitive, AlertDialogCancel as AlertDialogCancelPrimitive, AlertDialogContent as AlertDialogContentPrimitive } from "@radix-ui/react-alert-dialog";
929
999
  import { createContext as createContext9 } from "@radix-ui/react-context";
930
1000
  import React19, { forwardRef as forwardRef13 } from "react";
931
- var AlertDialogRoot = AlertDialogRootPrimitive;
1001
+ var AlertDialogRoot = (props) => /* @__PURE__ */ React19.createElement(ElevationProvider, {
1002
+ elevation: "dialog"
1003
+ }, /* @__PURE__ */ React19.createElement(AlertDialogRootPrimitive, props));
932
1004
  var AlertDialogTrigger = AlertDialogTriggerPrimitive;
933
1005
  var AlertDialogPortal = AlertDialogPortalPrimitive;
934
1006
  var AlertDialogCancel = AlertDialogCancelPrimitive;
@@ -979,9 +1051,7 @@ var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, .
979
1051
  inOverlayLayout
980
1052
  }, classNames),
981
1053
  ref: forwardedRef
982
- }, /* @__PURE__ */ React19.createElement(ElevationProvider, {
983
- elevation: "chrome"
984
- }, children));
1054
+ }, children);
985
1055
  });
986
1056
  AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
987
1057
  var AlertDialog = {
@@ -1004,16 +1074,18 @@ import React20, { forwardRef as forwardRef14 } from "react";
1004
1074
  var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
1005
1075
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
1006
1076
  var ContextMenuPortal = ContextMenuPrimitive.Portal;
1007
- var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
1077
+ var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
1008
1078
  const { tx } = useThemeContext();
1079
+ const elevation = useElevationContext();
1080
+ const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
1009
1081
  return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Content, {
1010
- collisionPadding: 8,
1011
1082
  ...props,
1012
- className: tx("menu.content", "menu", {}, classNames),
1083
+ collisionPadding: safeCollisionPadding,
1084
+ className: tx("menu.content", "menu", {
1085
+ elevation
1086
+ }, classNames),
1013
1087
  ref: forwardedRef
1014
- }, /* @__PURE__ */ React20.createElement(ElevationProvider, {
1015
- elevation: "chrome"
1016
- }, children));
1088
+ }, children);
1017
1089
  });
1018
1090
  var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
1019
1091
  const { tx } = useThemeContext();
@@ -1091,7 +1163,7 @@ import { createMenuScope } from "@radix-ui/react-menu";
1091
1163
  import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
1092
1164
  import { Slot as Slot7 } from "@radix-ui/react-slot";
1093
1165
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
1094
- import React21, { useRef, useCallback as useCallback2, forwardRef as forwardRef15, useEffect as useEffect4 } from "react";
1166
+ import React21, { useRef, useCallback as useCallback4, forwardRef as forwardRef15, useEffect as useEffect3 } from "react";
1095
1167
  var DROPDOWN_MENU_NAME = "DropdownMenu";
1096
1168
  var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
1097
1169
  createMenuScope
@@ -1114,7 +1186,7 @@ var DropdownMenuRoot = (props) => {
1114
1186
  contentId: useId3(),
1115
1187
  open,
1116
1188
  onOpenChange: setOpen,
1117
- onOpenToggle: useCallback2(() => setOpen((prevOpen) => !prevOpen), [
1189
+ onOpenToggle: useCallback4(() => setOpen((prevOpen) => !prevOpen), [
1118
1190
  setOpen
1119
1191
  ]),
1120
1192
  modal
@@ -1183,7 +1255,7 @@ var DropdownMenuVirtualTrigger = (props) => {
1183
1255
  const { __scopeDropdownMenu, virtualRef } = props;
1184
1256
  const context = useDropdownMenuContext(VIRTUAL_TRIGGER_NAME, __scopeDropdownMenu);
1185
1257
  const menuScope = useMenuScope(__scopeDropdownMenu);
1186
- useEffect4(() => {
1258
+ useEffect3(() => {
1187
1259
  if (virtualRef.current) {
1188
1260
  context.triggerRef.current = virtualRef.current;
1189
1261
  }
@@ -1215,16 +1287,19 @@ var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild,
1215
1287
  });
1216
1288
  var CONTENT_NAME = "DropdownMenuContent";
1217
1289
  var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1218
- const { __scopeDropdownMenu, classNames, ...contentProps } = props;
1290
+ const { __scopeDropdownMenu, classNames, collisionPadding = 8, ...contentProps } = props;
1219
1291
  const { tx } = useThemeContext();
1220
1292
  const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
1293
+ const elevation = useElevationContext();
1221
1294
  const menuScope = useMenuScope(__scopeDropdownMenu);
1222
1295
  const hasInteractedOutsideRef = useRef(false);
1296
+ const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
1223
1297
  return /* @__PURE__ */ React21.createElement(MenuPrimitive.Content, {
1224
1298
  id: context.contentId,
1225
1299
  "aria-labelledby": context.triggerId,
1226
1300
  ...menuScope,
1227
1301
  ...contentProps,
1302
+ collisionPadding: safeCollisionPadding,
1228
1303
  ref: forwardedRef,
1229
1304
  onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
1230
1305
  if (!hasInteractedOutsideRef.current) {
@@ -1241,7 +1316,9 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
1241
1316
  hasInteractedOutsideRef.current = true;
1242
1317
  }
1243
1318
  }),
1244
- className: tx("menu.content", "menu", {}, classNames),
1319
+ className: tx("menu.content", "menu", {
1320
+ elevation
1321
+ }, classNames),
1245
1322
  style: {
1246
1323
  ...props.style,
1247
1324
  // re-namespace exposed content custom properties
@@ -1435,11 +1512,9 @@ var DropdownMenu = {
1435
1512
  var useDropdownMenuMenuScope = useMenuScope;
1436
1513
 
1437
1514
  // packages/ui/react-ui/src/components/Input/Input.tsx
1438
- import { Check, Minus } from "@phosphor-icons/react";
1439
- import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
1440
- import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
1515
+ import { Root as CheckboxPrimitive } from "@radix-ui/react-checkbox";
1441
1516
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
1442
- import React22, { forwardRef as forwardRef16, Fragment, useCallback as useCallback3 } from "react";
1517
+ import React22, { forwardRef as forwardRef16, useCallback as useCallback5 } from "react";
1443
1518
  import { InputRoot, PinInput as PinInputPrimitive, TextInput as TextInputPrimitive, TextArea as TextAreaPrimitive, useInputContext, INPUT_NAME, Description as DescriptionPrimitive, DescriptionAndValidation as DescriptionAndValidationPrimitive, Label as LabelPrimitive, Validation as ValidationPrimitive } from "@dxos/react-input";
1444
1519
  var Label3 = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
1445
1520
  const { tx } = useThemeContext();
@@ -1488,7 +1563,7 @@ var PinInput = /* @__PURE__ */ forwardRef16(({ density: propsDensity, elevation:
1488
1563
  const { tx } = useThemeContext();
1489
1564
  const density = useDensityContext(propsDensity);
1490
1565
  const elevation = useElevationContext(propsElevation);
1491
- const segmentClassName = useCallback3(({ focused, validationValence }) => tx("input.input", "input--pin-segment", {
1566
+ const segmentClassName = useCallback5(({ focused, validationValence }) => tx("input.input", "input--pin-segment", {
1492
1567
  variant: "static",
1493
1568
  focused,
1494
1569
  disabled: props.disabled,
@@ -1565,7 +1640,6 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
1565
1640
  });
1566
1641
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
1567
1642
  const { tx } = useThemeContext();
1568
- const Icon3 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
1569
1643
  return /* @__PURE__ */ React22.createElement(CheckboxPrimitive, {
1570
1644
  ...props,
1571
1645
  checked,
@@ -1580,42 +1654,37 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
1580
1654
  size
1581
1655
  }, "shrink-0", classNames),
1582
1656
  ref: forwardedRef
1583
- }, /* @__PURE__ */ React22.createElement(CheckboxIndicatorPrimitive, {
1584
- asChild: true
1585
- }, /* @__PURE__ */ React22.createElement(Icon3, checked && {
1586
- weight,
1587
- className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
1588
- size
1657
+ }, /* @__PURE__ */ React22.createElement(Icon, {
1658
+ icon: checked === "indeterminate" ? "ph--minus--regular" : "ph--check--regular",
1659
+ classNames: tx("input.checkboxIndicator", "input--checkbox__indicator", {
1660
+ size,
1661
+ checked
1589
1662
  })
1590
- })));
1663
+ }));
1591
1664
  });
1592
- var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
1593
- const { tx } = useThemeContext();
1665
+ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, classNames, ...props }, forwardedRef) => {
1594
1666
  const [checked, onCheckedChange] = useControllableState2({
1595
1667
  prop: propsChecked,
1596
- defaultProp: propsDefaultChecked,
1668
+ defaultProp: propsDefaultChecked ?? false,
1597
1669
  onChange: propsOnCheckedChange
1598
1670
  });
1599
1671
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
1600
- return /* @__PURE__ */ React22.createElement(SwitchPrimitive, {
1601
- ...props,
1672
+ return /* @__PURE__ */ React22.createElement("input", {
1673
+ type: "checkbox",
1674
+ className: "dx-checkbox--switch dx-focus-ring",
1602
1675
  checked,
1603
- onCheckedChange,
1676
+ onChange: (event) => {
1677
+ onCheckedChange(event.target.checked);
1678
+ },
1604
1679
  id,
1605
1680
  "aria-describedby": descriptionId,
1681
+ ...props,
1606
1682
  ...validationValence === "error" && {
1607
1683
  "aria-invalid": "true",
1608
1684
  "aria-errormessage": errorMessageId
1609
1685
  },
1610
- className: tx("input.switch", "input--switch", {
1611
- size
1612
- }, classNames),
1613
1686
  ref: forwardedRef
1614
- }, /* @__PURE__ */ React22.createElement(SwitchThumbPrimitive, {
1615
- className: tx("input.switchThumb", "input--switch__thumb", {
1616
- size
1617
- })
1618
- }));
1687
+ });
1619
1688
  });
1620
1689
  var Input = {
1621
1690
  Root: InputRoot,
@@ -1633,14 +1702,54 @@ var Input = {
1633
1702
  // packages/ui/react-ui/src/components/Lists/List.tsx
1634
1703
  import { CaretDown, CaretRight } from "@phosphor-icons/react";
1635
1704
  import { Slot as Slot8 } from "@radix-ui/react-slot";
1636
- import React23, { forwardRef as forwardRef17 } from "react";
1705
+ import React24, { forwardRef as forwardRef17 } from "react";
1637
1706
  import { List as ListPrimitive, ListItemHeading as ListPrimitiveItemHeading, ListItemOpenTrigger as ListPrimitiveItemOpenTrigger, ListItemCollapsibleContent, ListItem as ListPrimitiveItem, LIST_NAME, LIST_ITEM_NAME, useListContext, useListItemContext } from "@dxos/react-list";
1707
+
1708
+ // packages/ui/react-ui/src/components/Lists/ListDropIndicator.tsx
1709
+ import React23 from "react";
1710
+ var edgeToOrientationMap = {
1711
+ top: "horizontal",
1712
+ bottom: "horizontal",
1713
+ left: "vertical",
1714
+ right: "vertical"
1715
+ };
1716
+ var orientationStyles = {
1717
+ horizontal: "h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]",
1718
+ vertical: "w-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]"
1719
+ };
1720
+ var edgeStyles = {
1721
+ top: "top-[--line-offset] before:top-[--offset-terminal]",
1722
+ right: "right-[--line-offset] before:right-[--offset-terminal]",
1723
+ bottom: "bottom-[--line-offset] before:bottom-[--offset-terminal]",
1724
+ left: "left-[--line-offset] before:left-[--offset-terminal]"
1725
+ };
1726
+ var strokeSize = 2;
1727
+ var terminalSize = 8;
1728
+ var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
1729
+ var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
1730
+ const orientation = edgeToOrientationMap[edge];
1731
+ return /* @__PURE__ */ React23.createElement("div", {
1732
+ role: "none",
1733
+ style: {
1734
+ "--line-thickness": `${strokeSize}px`,
1735
+ "--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
1736
+ "--line-inset": `${lineInset}px`,
1737
+ "--terminal-size": `${terminalSize}px`,
1738
+ "--terminal-radius": `${terminalSize / 2}px`,
1739
+ "--terminal-inset": `${terminalInset}px`,
1740
+ "--offset-terminal": `${offsetToAlignTerminalWithLine}px`
1741
+ },
1742
+ className: `absolute z-10 pointer-events-none bg-accentSurface before:content-[''] before:w-[--terminal-size] before:h-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles[orientation]} ${edgeStyles[edge]}`
1743
+ });
1744
+ };
1745
+
1746
+ // packages/ui/react-ui/src/components/Lists/List.tsx
1638
1747
  var List = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
1639
1748
  const { tx } = useThemeContext();
1640
1749
  const density = useDensityContext(props.density);
1641
- return /* @__PURE__ */ React23.createElement(DensityProvider, {
1750
+ return /* @__PURE__ */ React24.createElement(DensityProvider, {
1642
1751
  density
1643
- }, /* @__PURE__ */ React23.createElement(ListPrimitive, {
1752
+ }, /* @__PURE__ */ React24.createElement(ListPrimitive, {
1644
1753
  ...props,
1645
1754
  className: tx("list.root", "list", {}, classNames),
1646
1755
  ref: forwardedRef
@@ -1650,7 +1759,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
1650
1759
  const Root5 = asChild ? Slot8 : "div";
1651
1760
  const density = useDensityContext();
1652
1761
  const { tx } = useThemeContext();
1653
- return /* @__PURE__ */ React23.createElement(Root5, {
1762
+ return /* @__PURE__ */ React24.createElement(Root5, {
1654
1763
  ...!asChild && {
1655
1764
  role: "none"
1656
1765
  },
@@ -1664,7 +1773,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
1664
1773
  var MockListItemOpenTrigger = ({ classNames, ...props }) => {
1665
1774
  const density = useDensityContext();
1666
1775
  const { tx } = useThemeContext();
1667
- return /* @__PURE__ */ React23.createElement("div", {
1776
+ return /* @__PURE__ */ React24.createElement("div", {
1668
1777
  role: "none",
1669
1778
  ...props,
1670
1779
  className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
@@ -1675,7 +1784,7 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
1675
1784
  var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
1676
1785
  const { tx } = useThemeContext();
1677
1786
  const density = useDensityContext();
1678
- return /* @__PURE__ */ React23.createElement(ListPrimitiveItemHeading, {
1787
+ return /* @__PURE__ */ React24.createElement(ListPrimitiveItemHeading, {
1679
1788
  ...props,
1680
1789
  className: tx("list.item.heading", "list__listItem__heading", {
1681
1790
  density
@@ -1688,13 +1797,13 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
1688
1797
  const density = useDensityContext();
1689
1798
  const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
1690
1799
  const Icon3 = open ? CaretDown : CaretRight;
1691
- return /* @__PURE__ */ React23.createElement(ListPrimitiveItemOpenTrigger, {
1800
+ return /* @__PURE__ */ React24.createElement(ListPrimitiveItemOpenTrigger, {
1692
1801
  ...props,
1693
1802
  className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
1694
1803
  density
1695
1804
  }, classNames),
1696
1805
  ref: forwardedRef
1697
- }, children || /* @__PURE__ */ React23.createElement(Icon3, {
1806
+ }, children || /* @__PURE__ */ React24.createElement(Icon3, {
1698
1807
  weight: "bold",
1699
1808
  className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
1700
1809
  }));
@@ -1702,7 +1811,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
1702
1811
  var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
1703
1812
  const { tx } = useThemeContext();
1704
1813
  const density = useDensityContext();
1705
- return /* @__PURE__ */ React23.createElement(ListPrimitiveItem, {
1814
+ return /* @__PURE__ */ React24.createElement(ListPrimitiveItem, {
1706
1815
  ...props,
1707
1816
  className: tx("list.item.root", "list__listItem", {
1708
1817
  density,
@@ -1717,27 +1826,75 @@ var ListItem = {
1717
1826
  Heading: ListItemHeading,
1718
1827
  OpenTrigger: ListItemOpenTrigger,
1719
1828
  CollapsibleContent: ListItemCollapsibleContent,
1720
- MockOpenTrigger: MockListItemOpenTrigger
1829
+ MockOpenTrigger: MockListItemOpenTrigger,
1830
+ DropIndicator: ListDropIndicator
1831
+ };
1832
+
1833
+ // packages/ui/react-ui/src/components/Lists/Tree.tsx
1834
+ import React26, { forwardRef as forwardRef18 } from "react";
1835
+
1836
+ // packages/ui/react-ui/src/components/Lists/TreeDropIndicator.tsx
1837
+ import React25 from "react";
1838
+ var edgeToOrientationMap2 = {
1839
+ "reorder-above": "sibling",
1840
+ "reorder-below": "sibling",
1841
+ "make-child": "child",
1842
+ reparent: "child"
1843
+ };
1844
+ var orientationStyles2 = {
1845
+ // TODO(wittjosiah): Stop using left/right here.
1846
+ sibling: "bs-[--line-thickness] left-[--horizontal-indent] right-0 bg-accentSurface before:left-[--negative-terminal-size]",
1847
+ child: "is-full block-start-0 block-end-0 border-[length:--line-thickness] before:invisible"
1848
+ };
1849
+ var instructionStyles = {
1850
+ "reorder-above": "block-start-[--line-offset] before:block-start-[--offset-terminal]",
1851
+ "reorder-below": "block-end-[--line-offset] before:block-end-[--offset-terminal]",
1852
+ "make-child": "border-accentSurface",
1853
+ // TODO(wittjosiah): This is not occurring in the current implementation.
1854
+ reparent: ""
1855
+ };
1856
+ var strokeSize2 = 2;
1857
+ var terminalSize2 = 8;
1858
+ var offsetToAlignTerminalWithLine2 = (strokeSize2 - terminalSize2) / 2;
1859
+ var TreeDropIndicator = ({ instruction, gap = 0 }) => {
1860
+ const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize2}px))`;
1861
+ const isBlocked = instruction.type === "instruction-blocked";
1862
+ const desiredInstruction = isBlocked ? instruction.desired : instruction;
1863
+ const orientation = edgeToOrientationMap2[desiredInstruction.type];
1864
+ if (isBlocked) {
1865
+ return null;
1866
+ }
1867
+ return /* @__PURE__ */ React25.createElement("div", {
1868
+ style: {
1869
+ "--line-thickness": `${strokeSize2}px`,
1870
+ "--line-offset": `${lineOffset}`,
1871
+ "--terminal-size": `${terminalSize2}px`,
1872
+ "--terminal-radius": `${terminalSize2 / 2}px`,
1873
+ "--negative-terminal-size": `-${terminalSize2}px`,
1874
+ "--offset-terminal": `${offsetToAlignTerminalWithLine2}px`,
1875
+ "--horizontal-indent": `${desiredInstruction.currentLevel * desiredInstruction.indentPerLevel + 4}px`
1876
+ },
1877
+ className: `absolute z-10 pointer-events-none before:is-[--terminal-size] before:bs-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles2[orientation]} ${instructionStyles[desiredInstruction.type]}`
1878
+ });
1721
1879
  };
1722
1880
 
1723
1881
  // packages/ui/react-ui/src/components/Lists/Tree.tsx
1724
- import React24, { forwardRef as forwardRef18 } from "react";
1725
1882
  var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
1726
- return /* @__PURE__ */ React24.createElement(List, {
1883
+ return /* @__PURE__ */ React26.createElement(List, {
1727
1884
  ...props,
1728
1885
  ref: forwardedRef
1729
1886
  });
1730
1887
  });
1731
1888
  var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
1732
1889
  const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
1733
- return /* @__PURE__ */ React24.createElement(List, {
1890
+ return /* @__PURE__ */ React26.createElement(List, {
1734
1891
  ...props,
1735
1892
  "aria-labelledby": headingId,
1736
1893
  ref: forwardedRef
1737
1894
  });
1738
1895
  });
1739
1896
  var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
1740
- return /* @__PURE__ */ React24.createElement(ListItem.Root, {
1897
+ return /* @__PURE__ */ React26.createElement(ListItem.Root, {
1741
1898
  role: "treeitem",
1742
1899
  ...props,
1743
1900
  ref: forwardedRef
@@ -1756,7 +1913,8 @@ var TreeItem = {
1756
1913
  Heading: TreeItemHeading,
1757
1914
  Body: TreeItemBody,
1758
1915
  OpenTrigger: TreeItemOpenTrigger,
1759
- MockOpenTrigger: MockTreeItemOpenTrigger
1916
+ MockOpenTrigger: MockTreeItemOpenTrigger,
1917
+ DropIndicator: TreeDropIndicator
1760
1918
  };
1761
1919
 
1762
1920
  // packages/ui/react-ui/src/components/Lists/Treegrid.tsx
@@ -1765,7 +1923,7 @@ import { createContextScope as createContextScope2 } from "@radix-ui/react-conte
1765
1923
  import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
1766
1924
  import { Slot as Slot9 } from "@radix-ui/react-slot";
1767
1925
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
1768
- import React25, { forwardRef as forwardRef19 } from "react";
1926
+ import React27, { forwardRef as forwardRef19 } from "react";
1769
1927
  var TREEGRID_ROW_NAME = "TreegridRow";
1770
1928
  var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
1771
1929
  var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
@@ -1779,7 +1937,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef19(({ asChild, classNames, children
1779
1937
  tabbable: false,
1780
1938
  circular: true
1781
1939
  });
1782
- return /* @__PURE__ */ React25.createElement(Root5, {
1940
+ return /* @__PURE__ */ React27.createElement(Root5, {
1783
1941
  role: "treegrid",
1784
1942
  ...arrowNavigationAttrs,
1785
1943
  ...props,
@@ -1810,11 +1968,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
1810
1968
  circular: false,
1811
1969
  memorizeCurrent: false
1812
1970
  });
1813
- return /* @__PURE__ */ React25.createElement(TreegridRowProvider, {
1971
+ return /* @__PURE__ */ React27.createElement(TreegridRowProvider, {
1814
1972
  open,
1815
1973
  onOpenChange,
1816
1974
  scope: __treegridRowScope
1817
- }, /* @__PURE__ */ React25.createElement(Root5, {
1975
+ }, /* @__PURE__ */ React27.createElement(Root5, {
1818
1976
  role: "row",
1819
1977
  "aria-level": level,
1820
1978
  className: tx("treegrid.row", "treegrid__row", {
@@ -1829,7 +1987,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
1829
1987
  ...props,
1830
1988
  id,
1831
1989
  ref: forwardedRef
1832
- }, /* @__PURE__ */ React25.createElement("div", {
1990
+ }, /* @__PURE__ */ React27.createElement("div", {
1833
1991
  role: "none",
1834
1992
  className: "contents",
1835
1993
  ...arrowGroupAttrs
@@ -1837,7 +1995,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
1837
1995
  });
1838
1996
  var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
1839
1997
  const { tx } = useThemeContext();
1840
- return /* @__PURE__ */ React25.createElement("div", {
1998
+ return /* @__PURE__ */ React27.createElement("div", {
1841
1999
  role: "gridcell",
1842
2000
  className: tx("treegrid.cell", "treegrid__cell", {
1843
2001
  indent
@@ -1858,18 +2016,17 @@ var Treegrid = {
1858
2016
 
1859
2017
  // packages/ui/react-ui/src/components/Main/Main.tsx
1860
2018
  import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
1861
- import { useComposedRefs } from "@radix-ui/react-compose-refs";
1862
2019
  import { createContext as createContext10 } from "@radix-ui/react-context";
1863
2020
  import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/react-dialog";
1864
2021
  import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
1865
2022
  import { Slot as Slot10 } from "@radix-ui/react-slot";
1866
2023
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
1867
- import React26, { forwardRef as forwardRef20, useCallback as useCallback5, useEffect as useEffect6, useRef as useRef2, useState as useState6 } from "react";
2024
+ import React28, { forwardRef as forwardRef20, useCallback as useCallback7, useEffect as useEffect5, useRef as useRef2, useState as useState8 } from "react";
1868
2025
  import { log } from "@dxos/log";
1869
2026
  import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
1870
2027
 
1871
2028
  // packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
1872
- import { useCallback as useCallback4, useEffect as useEffect5, useState as useState5 } from "react";
2029
+ import { useCallback as useCallback6, useEffect as useEffect4, useState as useState7 } from "react";
1873
2030
  var MotionState;
1874
2031
  (function(MotionState2) {
1875
2032
  MotionState2[MotionState2["IDLE"] = 0] = "IDLE";
@@ -1884,22 +2041,22 @@ var useSwipeToDismiss = (ref, {
1884
2041
  /* side = 'inline-start' */
1885
2042
  }) => {
1886
2043
  const $root = ref.current;
1887
- const [motionState, setMotionState] = useState5(0);
1888
- const [gestureStartX, setGestureStartX] = useState5(0);
1889
- const setIdle = useCallback4(() => {
2044
+ const [motionState, setMotionState] = useState7(0);
2045
+ const [gestureStartX, setGestureStartX] = useState7(0);
2046
+ const setIdle = useCallback6(() => {
1890
2047
  setMotionState(0);
1891
2048
  $root?.style.removeProperty("inset-inline-start");
1892
2049
  $root?.style.setProperty("transition-duration", "200ms");
1893
2050
  }, [
1894
2051
  $root
1895
2052
  ]);
1896
- const setFollowing = useCallback4(() => {
2053
+ const setFollowing = useCallback6(() => {
1897
2054
  setMotionState(2);
1898
2055
  $root?.style.setProperty("transition-duration", "0ms");
1899
2056
  }, [
1900
2057
  $root
1901
2058
  ]);
1902
- const handlePointerDown = useCallback4(({ screenX }) => {
2059
+ const handlePointerDown = useCallback6(({ screenX }) => {
1903
2060
  if (motionState === 0) {
1904
2061
  setMotionState(1);
1905
2062
  setGestureStartX(screenX);
@@ -1907,7 +2064,7 @@ var useSwipeToDismiss = (ref, {
1907
2064
  }, [
1908
2065
  motionState
1909
2066
  ]);
1910
- const handlePointerMove = useCallback4(({ screenX }) => {
2067
+ const handlePointerMove = useCallback6(({ screenX }) => {
1911
2068
  if ($root) {
1912
2069
  const delta = Math.min(screenX - gestureStartX, 0);
1913
2070
  switch (motionState) {
@@ -1931,12 +2088,12 @@ var useSwipeToDismiss = (ref, {
1931
2088
  motionState,
1932
2089
  gestureStartX
1933
2090
  ]);
1934
- const handlePointerUp = useCallback4(() => {
2091
+ const handlePointerUp = useCallback6(() => {
1935
2092
  setIdle();
1936
2093
  }, [
1937
2094
  setIdle
1938
2095
  ]);
1939
- useEffect5(() => {
2096
+ useEffect4(() => {
1940
2097
  $root?.addEventListener("pointerdown", handlePointerDown);
1941
2098
  return () => {
1942
2099
  $root?.removeEventListener("pointerdown", handlePointerDown);
@@ -1945,7 +2102,7 @@ var useSwipeToDismiss = (ref, {
1945
2102
  $root,
1946
2103
  handlePointerDown
1947
2104
  ]);
1948
- useEffect5(() => {
2105
+ useEffect4(() => {
1949
2106
  $root && document.documentElement.addEventListener("pointermove", handlePointerMove);
1950
2107
  return () => {
1951
2108
  document.documentElement.removeEventListener("pointermove", handlePointerMove);
@@ -1954,7 +2111,7 @@ var useSwipeToDismiss = (ref, {
1954
2111
  $root,
1955
2112
  handlePointerMove
1956
2113
  ]);
1957
- useEffect5(() => {
2114
+ useEffect4(() => {
1958
2115
  $root && document.documentElement.addEventListener("pointerup", handlePointerUp);
1959
2116
  return () => {
1960
2117
  document.documentElement.removeEventListener("pointerup", handlePointerUp);
@@ -1974,7 +2131,7 @@ var MAIN_NAME = "Main";
1974
2131
  var GENERIC_CONSUMER_NAME = "GenericConsumer";
1975
2132
  var landmarkAttr = "data-main-landmark";
1976
2133
  var useLandmarkMover = (propsOnKeyDown, landmark) => {
1977
- const handleKeyDown = useCallback5((event) => {
2134
+ const handleKeyDown = useCallback7((event) => {
1978
2135
  const target = event.target;
1979
2136
  if (event.target === event.currentTarget && event.key === "Tab" && target.hasAttribute(landmarkAttr)) {
1980
2137
  event.preventDefault();
@@ -2003,8 +2160,8 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
2003
2160
  };
2004
2161
  var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
2005
2162
  resizing: false,
2006
- navigationSidebarOpen: false,
2007
- setNavigationSidebarOpen: (nextOpen) => {
2163
+ navigationSidebarState: "closed",
2164
+ setNavigationSidebarState: (nextState) => {
2008
2165
  log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
2009
2166
  F: __dxlog_file,
2010
2167
  L: 81,
@@ -2012,8 +2169,8 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
2012
2169
  C: (f, a) => f(...a)
2013
2170
  });
2014
2171
  },
2015
- complementarySidebarOpen: false,
2016
- setComplementarySidebarOpen: (nextOpen) => {
2172
+ complementarySidebarState: "closed",
2173
+ setComplementarySidebarState: (nextState) => {
2017
2174
  log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
2018
2175
  F: __dxlog_file,
2019
2176
  L: 86,
@@ -2023,52 +2180,46 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
2023
2180
  }
2024
2181
  });
2025
2182
  var useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {
2026
- const { setNavigationSidebarOpen, navigationSidebarOpen, setComplementarySidebarOpen, complementarySidebarOpen } = useMainContext(consumerName);
2183
+ const { setNavigationSidebarState, navigationSidebarState, setComplementarySidebarState, complementarySidebarState } = useMainContext(consumerName);
2027
2184
  return {
2028
- navigationSidebarOpen,
2029
- setNavigationSidebarOpen,
2030
- toggleNavigationSidebar: useCallback5(() => setNavigationSidebarOpen(!navigationSidebarOpen), [
2031
- navigationSidebarOpen,
2032
- setNavigationSidebarOpen
2033
- ]),
2034
- openNavigationSidebar: useCallback5(() => setNavigationSidebarOpen(true), [
2035
- setNavigationSidebarOpen
2036
- ]),
2037
- closeNavigationSidebar: useCallback5(() => setNavigationSidebarOpen(false), [
2038
- setNavigationSidebarOpen
2185
+ navigationSidebarState,
2186
+ setNavigationSidebarState,
2187
+ toggleNavigationSidebar: useCallback7(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
2188
+ navigationSidebarState,
2189
+ setNavigationSidebarState
2039
2190
  ]),
2040
- complementarySidebarOpen,
2041
- setComplementarySidebarOpen,
2042
- toggleComplementarySidebar: useCallback5(() => setComplementarySidebarOpen(!complementarySidebarOpen), [
2043
- complementarySidebarOpen,
2044
- setComplementarySidebarOpen
2191
+ openNavigationSidebar: useCallback7(() => setNavigationSidebarState("expanded"), []),
2192
+ collapseNavigationSidebar: useCallback7(() => setNavigationSidebarState("collapsed"), []),
2193
+ closeNavigationSidebar: useCallback7(() => setNavigationSidebarState("closed"), []),
2194
+ complementarySidebarState,
2195
+ setComplementarySidebarState,
2196
+ toggleComplementarySidebar: useCallback7(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
2197
+ complementarySidebarState,
2198
+ setComplementarySidebarState
2045
2199
  ]),
2046
- openComplementarySidebar: useCallback5(() => setComplementarySidebarOpen(true), [
2047
- setComplementarySidebarOpen
2048
- ]),
2049
- closeComplementarySidebar: useCallback5(() => setComplementarySidebarOpen(false), [
2050
- setComplementarySidebarOpen
2051
- ])
2200
+ openComplementarySidebar: useCallback7(() => setComplementarySidebarState("expanded"), []),
2201
+ collapseComplementarySidebar: useCallback7(() => setComplementarySidebarState("collapsed"), []),
2202
+ closeComplementarySidebar: useCallback7(() => setComplementarySidebarState("closed"), [])
2052
2203
  };
2053
2204
  };
2054
2205
  var resizeDebounce = 3e3;
2055
- var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavigationSidebarOpen, onNavigationSidebarOpenChange, complementarySidebarOpen: propsComplementarySidebarOpen, defaultComplementarySidebarOpen, onComplementarySidebarOpenChange, children, ...props }) => {
2206
+ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState, onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState, onComplementarySidebarStateChange, children, ...props }) => {
2056
2207
  const [isLg] = useMediaQuery("lg", {
2057
2208
  ssr: false
2058
2209
  });
2059
- const [navigationSidebarOpen = isLg, setNavigationSidebarOpen] = useControllableState4({
2060
- prop: propsNavigationSidebarOpen,
2061
- defaultProp: defaultNavigationSidebarOpen,
2062
- onChange: onNavigationSidebarOpenChange
2210
+ const [navigationSidebarState = isLg ? "expanded" : "collapsed", setNavigationSidebarState] = useControllableState4({
2211
+ prop: propsNavigationSidebarState,
2212
+ defaultProp: defaultNavigationSidebarState,
2213
+ onChange: onNavigationSidebarStateChange
2063
2214
  });
2064
- const [complementarySidebarOpen = false, setComplementarySidebarOpen] = useControllableState4({
2065
- prop: propsComplementarySidebarOpen,
2066
- defaultProp: defaultComplementarySidebarOpen,
2067
- onChange: onComplementarySidebarOpenChange
2215
+ const [complementarySidebarState = isLg ? "expanded" : "collapsed", setComplementarySidebarState] = useControllableState4({
2216
+ prop: propsComplementarySidebarState,
2217
+ defaultProp: defaultComplementarySidebarState,
2218
+ onChange: onComplementarySidebarStateChange
2068
2219
  });
2069
- const [resizing, setResizing] = useState6(false);
2220
+ const [resizing, setResizing] = useState8(false);
2070
2221
  const resizeInterval = useRef2(null);
2071
- const handleResize = useCallback5(() => {
2222
+ const handleResize = useCallback7(() => {
2072
2223
  setResizing(true);
2073
2224
  if (resizeInterval.current) {
2074
2225
  clearTimeout(resizeInterval.current);
@@ -2078,18 +2229,18 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
2078
2229
  resizeInterval.current = null;
2079
2230
  }, resizeDebounce);
2080
2231
  }, []);
2081
- useEffect6(() => {
2232
+ useEffect5(() => {
2082
2233
  window.addEventListener("resize", handleResize);
2083
2234
  return () => window.removeEventListener("resize", handleResize);
2084
2235
  }, [
2085
2236
  handleResize
2086
2237
  ]);
2087
- return /* @__PURE__ */ React26.createElement(MainProvider, {
2238
+ return /* @__PURE__ */ React28.createElement(MainProvider, {
2088
2239
  ...props,
2089
- navigationSidebarOpen,
2090
- setNavigationSidebarOpen,
2091
- complementarySidebarOpen,
2092
- setComplementarySidebarOpen,
2240
+ navigationSidebarState,
2241
+ setNavigationSidebarState,
2242
+ complementarySidebarState,
2243
+ setComplementarySidebarState,
2093
2244
  resizing
2094
2245
  }, children);
2095
2246
  };
@@ -2097,7 +2248,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
2097
2248
  var handleOpenAutoFocus = (event) => {
2098
2249
  !document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
2099
2250
  };
2100
- var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, resizing, setOpen, side, ...props }, forwardedRef) => {
2251
+ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, ...props }, forwardedRef) => {
2101
2252
  const [isLg] = useMediaQuery("lg", {
2102
2253
  ssr: false
2103
2254
  });
@@ -2105,9 +2256,9 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
2105
2256
  const ref = useForwardedRef(forwardedRef);
2106
2257
  const noopRef = useRef2(null);
2107
2258
  useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
2108
- onDismiss: () => setOpen(false)
2259
+ onDismiss: () => onStateChange?.("closed")
2109
2260
  });
2110
- const handleKeyDown = useCallback5((event) => {
2261
+ const handleKeyDown = useCallback7((event) => {
2111
2262
  if (event.key === "Escape") {
2112
2263
  event.target.closest("[data-tabster]")?.focus();
2113
2264
  }
@@ -2116,10 +2267,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
2116
2267
  props.onKeyDown
2117
2268
  ]);
2118
2269
  const Root5 = isLg ? Primitive9.div : DialogContent2;
2119
- return /* @__PURE__ */ React26.createElement(DialogRoot2, {
2120
- open,
2270
+ return /* @__PURE__ */ React28.createElement(DialogRoot2, {
2271
+ open: state !== "closed",
2121
2272
  modal: false
2122
- }, /* @__PURE__ */ React26.createElement(Root5, {
2273
+ }, /* @__PURE__ */ React28.createElement(Root5, {
2123
2274
  ...!isLg && {
2124
2275
  forceMount: true,
2125
2276
  tabIndex: -1,
@@ -2127,26 +2278,24 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
2127
2278
  },
2128
2279
  ...props,
2129
2280
  "data-side": side === "inline-end" ? "ie" : "is",
2130
- "data-state": open ? "open" : "closed",
2281
+ "data-state": state,
2131
2282
  "data-resizing": resizing ? "true" : "false",
2132
2283
  className: tx("main.sidebar", "main__sidebar", {}, classNames),
2133
2284
  onKeyDown: handleKeyDown,
2134
- ...!open && {
2285
+ ...state === "closed" && {
2135
2286
  inert: "true"
2136
2287
  },
2137
2288
  ref
2138
- }, /* @__PURE__ */ React26.createElement(ElevationProvider, {
2139
- elevation: "group"
2140
- }, children)));
2289
+ }, children));
2141
2290
  });
2142
2291
  var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2143
- const { navigationSidebarOpen, setNavigationSidebarOpen, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
2292
+ const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
2144
2293
  const mover = useLandmarkMover(props.onKeyDown, "0");
2145
- return /* @__PURE__ */ React26.createElement(MainSidebar, {
2294
+ return /* @__PURE__ */ React28.createElement(MainSidebar, {
2146
2295
  ...mover,
2147
2296
  ...props,
2148
- open: navigationSidebarOpen,
2149
- setOpen: setNavigationSidebarOpen,
2297
+ state: navigationSidebarState,
2298
+ onStateChange: setNavigationSidebarState,
2150
2299
  resizing,
2151
2300
  side: "inline-start",
2152
2301
  ref: forwardedRef
@@ -2154,13 +2303,13 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) =
2154
2303
  });
2155
2304
  MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
2156
2305
  var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2157
- const { complementarySidebarOpen, setComplementarySidebarOpen, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
2306
+ const { complementarySidebarState, setComplementarySidebarState, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
2158
2307
  const mover = useLandmarkMover(props.onKeyDown, "2");
2159
- return /* @__PURE__ */ React26.createElement(MainSidebar, {
2308
+ return /* @__PURE__ */ React28.createElement(MainSidebar, {
2160
2309
  ...mover,
2161
2310
  ...props,
2162
- open: complementarySidebarOpen,
2163
- setOpen: setComplementarySidebarOpen,
2311
+ state: complementarySidebarState,
2312
+ onStateChange: setComplementarySidebarState,
2164
2313
  resizing,
2165
2314
  side: "inline-end",
2166
2315
  ref: forwardedRef
@@ -2168,18 +2317,18 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef
2168
2317
  });
2169
2318
  MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
2170
2319
  var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
2171
- const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
2320
+ const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);
2172
2321
  const { tx } = useThemeContext();
2173
2322
  const Root5 = asChild ? Slot10 : role ? "div" : "main";
2174
2323
  const mover = useLandmarkMover(props.onKeyDown, "1");
2175
- return /* @__PURE__ */ React26.createElement(Root5, {
2324
+ return /* @__PURE__ */ React28.createElement(Root5, {
2176
2325
  role,
2177
2326
  ...handlesFocus && {
2178
2327
  ...mover
2179
2328
  },
2180
2329
  ...props,
2181
- "data-sidebar-inline-start-state": navigationSidebarOpen ? "open" : "closed",
2182
- "data-sidebar-inline-end-state": complementarySidebarOpen ? "open" : "closed",
2330
+ "data-sidebar-inline-start-state": navigationSidebarState,
2331
+ "data-sidebar-inline-end-state": complementarySidebarState,
2183
2332
  className: tx("main.content", "main", {
2184
2333
  bounce,
2185
2334
  handlesFocus
@@ -2192,62 +2341,37 @@ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwar
2192
2341
  const [isLg] = useMediaQuery("lg", {
2193
2342
  ssr: false
2194
2343
  });
2195
- const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
2344
+ const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_NAME);
2196
2345
  const { tx } = useThemeContext();
2197
- return /* @__PURE__ */ React26.createElement("div", {
2346
+ return /* @__PURE__ */ React28.createElement("div", {
2198
2347
  onClick: () => {
2199
- setNavigationSidebarOpen(false);
2200
- setComplementarySidebarOpen(false);
2348
+ setNavigationSidebarState("collapsed");
2349
+ setComplementarySidebarState("collapsed");
2201
2350
  },
2202
2351
  ...props,
2203
2352
  className: tx("main.overlay", "main__overlay", {
2204
2353
  isLg,
2205
- inlineStartSidebarOpen: navigationSidebarOpen,
2206
- inlineEndSidebarOpen: complementarySidebarOpen
2354
+ inlineStartSidebarOpen: navigationSidebarState,
2355
+ inlineEndSidebarOpen: complementarySidebarState
2207
2356
  }, classNames),
2208
- "data-state": navigationSidebarOpen || complementarySidebarOpen ? "open" : "closed",
2357
+ "data-state": navigationSidebarState === "expanded" || complementarySidebarState === "expanded" ? "open" : "closed",
2209
2358
  "aria-hidden": "true",
2210
2359
  ref: forwardedRef
2211
2360
  });
2212
2361
  });
2213
- var MainNotch = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
2214
- const { tx } = useThemeContext();
2215
- const { navigationSidebarOpen } = useMainContext(MAIN_NAME);
2216
- const notchElement = useRef2(null);
2217
- const ref = useComposedRefs(forwardedRef, notchElement);
2218
- const handleKeyDown = useCallback5((event) => {
2219
- switch (event.key) {
2220
- case "Escape":
2221
- props?.onKeyDown?.(event);
2222
- notchElement.current?.focus();
2223
- }
2224
- }, [
2225
- props?.onKeyDown
2226
- ]);
2227
- const mover = useLandmarkMover(handleKeyDown, "3");
2228
- return /* @__PURE__ */ React26.createElement("div", {
2229
- role: "toolbar",
2230
- ...mover,
2231
- ...props,
2232
- "data-nav-sidebar-state": navigationSidebarOpen ? "open" : "closed",
2233
- className: tx("main.notch", "main__notch", {}, classNames),
2234
- ref
2235
- });
2236
- });
2237
2362
  var Main = {
2238
2363
  Root: MainRoot,
2239
2364
  Content: MainContent,
2240
2365
  Overlay: MainOverlay,
2241
2366
  NavigationSidebar: MainNavigationSidebar,
2242
- ComplementarySidebar: MainComplementarySidebar,
2243
- Notch: MainNotch
2367
+ ComplementarySidebar: MainComplementarySidebar
2244
2368
  };
2245
2369
 
2246
2370
  // packages/ui/react-ui/src/components/Message/Message.tsx
2247
2371
  import { createContext as createContext11 } from "@radix-ui/react-context";
2248
2372
  import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
2249
2373
  import { Slot as Slot11 } from "@radix-ui/react-slot";
2250
- import React27, { forwardRef as forwardRef21 } from "react";
2374
+ import React29, { forwardRef as forwardRef21 } from "react";
2251
2375
  import { useId as useId4 } from "@dxos/react-hooks";
2252
2376
  var MESSAGE_NAME = "Message";
2253
2377
  var [MessageProvider, useMessageContext] = createContext11(MESSAGE_NAME);
@@ -2257,10 +2381,10 @@ var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence, elevation: p
2257
2381
  const descriptionId = useId4("message__description", propsDescriptionId);
2258
2382
  const elevation = useElevationContext(propsElevation);
2259
2383
  const Root5 = asChild ? Slot11 : Primitive10.div;
2260
- return /* @__PURE__ */ React27.createElement(MessageProvider, {
2384
+ return /* @__PURE__ */ React29.createElement(MessageProvider, {
2261
2385
  titleId,
2262
2386
  descriptionId
2263
- }, /* @__PURE__ */ React27.createElement(Root5, {
2387
+ }, /* @__PURE__ */ React29.createElement(Root5, {
2264
2388
  ...props,
2265
2389
  className: tx("message.root", "message", {
2266
2390
  valence,
@@ -2277,7 +2401,7 @@ var MessageTitle = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
2277
2401
  const { tx } = useThemeContext();
2278
2402
  const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
2279
2403
  const Root5 = asChild ? Slot11 : Primitive10.h2;
2280
- return /* @__PURE__ */ React27.createElement(Root5, {
2404
+ return /* @__PURE__ */ React29.createElement(Root5, {
2281
2405
  ...props,
2282
2406
  className: tx("message.title", "message__title", {}, className),
2283
2407
  id: titleId,
@@ -2290,7 +2414,7 @@ var MessageBody = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
2290
2414
  const { tx } = useThemeContext();
2291
2415
  const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
2292
2416
  const Root5 = asChild ? Slot11 : Primitive10.p;
2293
- return /* @__PURE__ */ React27.createElement(Root5, {
2417
+ return /* @__PURE__ */ React29.createElement(Root5, {
2294
2418
  ...props,
2295
2419
  className: tx("message.body", "message__body", {}, className),
2296
2420
  id: descriptionId,
@@ -2306,7 +2430,7 @@ var Message = {
2306
2430
 
2307
2431
  // packages/ui/react-ui/src/components/Popover/Popover.tsx
2308
2432
  import { composeEventHandlers as composeEventHandlers2 } from "@radix-ui/primitive";
2309
- import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs";
2433
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
2310
2434
  import { createContextScope as createContextScope3 } from "@radix-ui/react-context";
2311
2435
  import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
2312
2436
  import { useFocusGuards } from "@radix-ui/react-focus-guards";
@@ -2320,7 +2444,7 @@ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
2320
2444
  import { Slot as Slot12 } from "@radix-ui/react-slot";
2321
2445
  import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
2322
2446
  import { hideOthers } from "aria-hidden";
2323
- import React28, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback6, useState as useState7, useEffect as useEffect7 } from "react";
2447
+ import React30, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback8, useState as useState9, useEffect as useEffect6 } from "react";
2324
2448
  import { RemoveScroll } from "react-remove-scroll";
2325
2449
  var POPOVER_NAME = "Popover";
2326
2450
  var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
@@ -2332,24 +2456,24 @@ var PopoverRoot = (props) => {
2332
2456
  const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
2333
2457
  const popperScope = usePopperScope(__scopePopover);
2334
2458
  const triggerRef = useRef3(null);
2335
- const [hasCustomAnchor, setHasCustomAnchor] = useState7(false);
2459
+ const [hasCustomAnchor, setHasCustomAnchor] = useState9(false);
2336
2460
  const [open = false, setOpen] = useControllableState5({
2337
2461
  prop: openProp,
2338
2462
  defaultProp: defaultOpen,
2339
2463
  onChange: onOpenChange
2340
2464
  });
2341
- return /* @__PURE__ */ React28.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React28.createElement(PopoverProvider, {
2465
+ return /* @__PURE__ */ React30.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React30.createElement(PopoverProvider, {
2342
2466
  scope: __scopePopover,
2343
2467
  contentId: useId5(),
2344
2468
  triggerRef,
2345
2469
  open,
2346
2470
  onOpenChange: setOpen,
2347
- onOpenToggle: useCallback6(() => setOpen((prevOpen) => !prevOpen), [
2471
+ onOpenToggle: useCallback8(() => setOpen((prevOpen) => !prevOpen), [
2348
2472
  setOpen
2349
2473
  ]),
2350
2474
  hasCustomAnchor,
2351
- onCustomAnchorAdd: useCallback6(() => setHasCustomAnchor(true), []),
2352
- onCustomAnchorRemove: useCallback6(() => setHasCustomAnchor(false), []),
2475
+ onCustomAnchorAdd: useCallback8(() => setHasCustomAnchor(true), []),
2476
+ onCustomAnchorRemove: useCallback8(() => setHasCustomAnchor(false), []),
2353
2477
  modal
2354
2478
  }, children));
2355
2479
  };
@@ -2360,14 +2484,14 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2360
2484
  const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
2361
2485
  const popperScope = usePopperScope(__scopePopover);
2362
2486
  const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
2363
- useEffect7(() => {
2487
+ useEffect6(() => {
2364
2488
  onCustomAnchorAdd();
2365
2489
  return () => onCustomAnchorRemove();
2366
2490
  }, [
2367
2491
  onCustomAnchorAdd,
2368
2492
  onCustomAnchorRemove
2369
2493
  ]);
2370
- return /* @__PURE__ */ React28.createElement(PopperPrimitive.Anchor, {
2494
+ return /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
2371
2495
  ...popperScope,
2372
2496
  ...anchorProps,
2373
2497
  ref: forwardedRef
@@ -2379,8 +2503,8 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2379
2503
  const { __scopePopover, ...triggerProps } = props;
2380
2504
  const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
2381
2505
  const popperScope = usePopperScope(__scopePopover);
2382
- const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
2383
- const trigger = /* @__PURE__ */ React28.createElement(Primitive11.button, {
2506
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
2507
+ const trigger = /* @__PURE__ */ React30.createElement(Primitive11.button, {
2384
2508
  type: "button",
2385
2509
  "aria-haspopup": "dialog",
2386
2510
  "aria-expanded": context.open,
@@ -2390,7 +2514,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2390
2514
  ref: composedTriggerRef,
2391
2515
  onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
2392
2516
  });
2393
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React28.createElement(PopperPrimitive.Anchor, {
2517
+ return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
2394
2518
  asChild: true,
2395
2519
  ...popperScope
2396
2520
  }, trigger);
@@ -2401,12 +2525,12 @@ var PopoverVirtualTrigger = (props) => {
2401
2525
  const { __scopePopover, virtualRef } = props;
2402
2526
  const context = usePopoverContext(VIRTUAL_TRIGGER_NAME2, __scopePopover);
2403
2527
  const popperScope = usePopperScope(__scopePopover);
2404
- useEffect7(() => {
2528
+ useEffect6(() => {
2405
2529
  if (virtualRef.current) {
2406
2530
  context.triggerRef.current = virtualRef.current;
2407
2531
  }
2408
2532
  });
2409
- return /* @__PURE__ */ React28.createElement(PopperPrimitive.Anchor, {
2533
+ return /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
2410
2534
  ...popperScope,
2411
2535
  virtualRef
2412
2536
  });
@@ -2419,12 +2543,12 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
2419
2543
  var PopoverPortal = (props) => {
2420
2544
  const { __scopePopover, forceMount, children, container } = props;
2421
2545
  const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
2422
- return /* @__PURE__ */ React28.createElement(PortalProvider, {
2546
+ return /* @__PURE__ */ React30.createElement(PortalProvider, {
2423
2547
  scope: __scopePopover,
2424
2548
  forceMount
2425
- }, /* @__PURE__ */ React28.createElement(Presence, {
2549
+ }, /* @__PURE__ */ React30.createElement(Presence, {
2426
2550
  present: forceMount || context.open
2427
- }, /* @__PURE__ */ React28.createElement(PortalPrimitive, {
2551
+ }, /* @__PURE__ */ React30.createElement(PortalPrimitive, {
2428
2552
  asChild: true,
2429
2553
  container
2430
2554
  }, children)));
@@ -2435,12 +2559,12 @@ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2435
2559
  const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
2436
2560
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
2437
2561
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
2438
- return /* @__PURE__ */ React28.createElement(Presence, {
2562
+ return /* @__PURE__ */ React30.createElement(Presence, {
2439
2563
  present: forceMount || context.open
2440
- }, context.modal ? /* @__PURE__ */ React28.createElement(PopoverContentModal, {
2564
+ }, context.modal ? /* @__PURE__ */ React30.createElement(PopoverContentModal, {
2441
2565
  ...contentProps,
2442
2566
  ref: forwardedRef
2443
- }) : /* @__PURE__ */ React28.createElement(PopoverContentNonModal, {
2567
+ }) : /* @__PURE__ */ React30.createElement(PopoverContentNonModal, {
2444
2568
  ...contentProps,
2445
2569
  ref: forwardedRef
2446
2570
  }));
@@ -2449,18 +2573,18 @@ PopoverContent.displayName = CONTENT_NAME2;
2449
2573
  var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2450
2574
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
2451
2575
  const contentRef = useRef3(null);
2452
- const composedRefs = useComposedRefs2(forwardedRef, contentRef);
2576
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
2453
2577
  const isRightClickOutsideRef = useRef3(false);
2454
- useEffect7(() => {
2578
+ useEffect6(() => {
2455
2579
  const content = contentRef.current;
2456
2580
  if (content) {
2457
2581
  return hideOthers(content);
2458
2582
  }
2459
2583
  }, []);
2460
- return /* @__PURE__ */ React28.createElement(RemoveScroll, {
2584
+ return /* @__PURE__ */ React30.createElement(RemoveScroll, {
2461
2585
  as: Slot12,
2462
2586
  allowPinchZoom: true
2463
- }, /* @__PURE__ */ React28.createElement(PopoverContentImpl, {
2587
+ }, /* @__PURE__ */ React30.createElement(PopoverContentImpl, {
2464
2588
  ...props,
2465
2589
  ref: composedRefs,
2466
2590
  // we make sure we're not trapping once it's been closed
@@ -2492,7 +2616,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef)
2492
2616
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
2493
2617
  const hasInteractedOutsideRef = useRef3(false);
2494
2618
  const hasPointerDownOutsideRef = useRef3(false);
2495
- return /* @__PURE__ */ React28.createElement(PopoverContentImpl, {
2619
+ return /* @__PURE__ */ React30.createElement(PopoverContentImpl, {
2496
2620
  ...props,
2497
2621
  ref: forwardedRef,
2498
2622
  trapFocus: false,
@@ -2528,18 +2652,20 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef)
2528
2652
  });
2529
2653
  });
2530
2654
  var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2531
- const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, classNames, ...contentProps } = props;
2655
+ const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, collisionPadding = 8, classNames, ...contentProps } = props;
2532
2656
  const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
2533
2657
  const popperScope = usePopperScope(__scopePopover);
2534
2658
  const { tx } = useThemeContext();
2659
+ const elevation = useElevationContext();
2660
+ const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
2535
2661
  useFocusGuards();
2536
- return /* @__PURE__ */ React28.createElement(FocusScope, {
2662
+ return /* @__PURE__ */ React30.createElement(FocusScope, {
2537
2663
  asChild: true,
2538
2664
  loop: true,
2539
2665
  trapped: trapFocus,
2540
2666
  onMountAutoFocus: onOpenAutoFocus,
2541
2667
  onUnmountAutoFocus: onCloseAutoFocus
2542
- }, /* @__PURE__ */ React28.createElement(DismissableLayer, {
2668
+ }, /* @__PURE__ */ React30.createElement(DismissableLayer, {
2543
2669
  asChild: true,
2544
2670
  disableOutsidePointerEvents,
2545
2671
  onInteractOutside,
@@ -2547,13 +2673,16 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2547
2673
  onPointerDownOutside,
2548
2674
  onFocusOutside,
2549
2675
  onDismiss: () => context.onOpenChange(false)
2550
- }, /* @__PURE__ */ React28.createElement(PopperPrimitive.Content, {
2676
+ }, /* @__PURE__ */ React30.createElement(PopperPrimitive.Content, {
2551
2677
  "data-state": getState(context.open),
2552
2678
  role: "dialog",
2553
2679
  id: context.contentId,
2554
2680
  ...popperScope,
2555
2681
  ...contentProps,
2556
- className: tx("popover.content", "popover", {}, classNames),
2682
+ collisionPadding: safeCollisionPadding,
2683
+ className: tx("popover.content", "popover", {
2684
+ elevation
2685
+ }, classNames),
2557
2686
  ref: forwardedRef,
2558
2687
  style: {
2559
2688
  ...contentProps.style,
@@ -2572,7 +2701,7 @@ var CLOSE_NAME = "PopoverClose";
2572
2701
  var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2573
2702
  const { __scopePopover, ...closeProps } = props;
2574
2703
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
2575
- return /* @__PURE__ */ React28.createElement(Primitive11.button, {
2704
+ return /* @__PURE__ */ React30.createElement(Primitive11.button, {
2576
2705
  type: "button",
2577
2706
  ...closeProps,
2578
2707
  ref: forwardedRef,
@@ -2585,7 +2714,7 @@ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2585
2714
  const { __scopePopover, classNames, ...arrowProps } = props;
2586
2715
  const popperScope = usePopperScope(__scopePopover);
2587
2716
  const { tx } = useThemeContext();
2588
- return /* @__PURE__ */ React28.createElement(PopperPrimitive.Arrow, {
2717
+ return /* @__PURE__ */ React30.createElement(PopperPrimitive.Arrow, {
2589
2718
  ...popperScope,
2590
2719
  ...arrowProps,
2591
2720
  className: tx("popover.arrow", "popover__arrow", {}, classNames),
@@ -2596,7 +2725,7 @@ PopoverArrow.displayName = ARROW_NAME2;
2596
2725
  var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
2597
2726
  const { tx } = useThemeContext();
2598
2727
  const Root5 = asChild ? Slot12 : Primitive11.div;
2599
- return /* @__PURE__ */ React28.createElement(Root5, {
2728
+ return /* @__PURE__ */ React30.createElement(Root5, {
2600
2729
  ...props,
2601
2730
  className: tx("popover.viewport", "popover__viewport", {
2602
2731
  constrainInline,
@@ -2619,10 +2748,10 @@ var Popover = {
2619
2748
  };
2620
2749
 
2621
2750
  // packages/ui/react-ui/src/components/Status/Status.tsx
2622
- import React29, { forwardRef as forwardRef23 } from "react";
2751
+ import React31, { forwardRef as forwardRef23 } from "react";
2623
2752
  var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
2624
2753
  const { tx } = useThemeContext();
2625
- return /* @__PURE__ */ React29.createElement("span", {
2754
+ return /* @__PURE__ */ React31.createElement("span", {
2626
2755
  role: "status",
2627
2756
  ...props,
2628
2757
  className: tx("status.root", "status", {
@@ -2630,7 +2759,7 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
2630
2759
  variant
2631
2760
  }, classNames),
2632
2761
  ref: forwardedRef
2633
- }, /* @__PURE__ */ React29.createElement("span", {
2762
+ }, /* @__PURE__ */ React31.createElement("span", {
2634
2763
  role: "none",
2635
2764
  className: tx("status.bar", "status__bar", {
2636
2765
  indeterminate,
@@ -2646,10 +2775,10 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
2646
2775
 
2647
2776
  // packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
2648
2777
  import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
2649
- import React30, { forwardRef as forwardRef24 } from "react";
2778
+ import React32, { forwardRef as forwardRef24 } from "react";
2650
2779
  var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2651
2780
  const { tx } = useThemeContext();
2652
- return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveRoot, {
2781
+ return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveRoot, {
2653
2782
  ...props,
2654
2783
  className: tx("scrollArea.root", "scroll-area", {}, classNames),
2655
2784
  ref: forwardedRef
@@ -2657,7 +2786,7 @@ var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, for
2657
2786
  });
2658
2787
  var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2659
2788
  const { tx } = useThemeContext();
2660
- return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveViewport, {
2789
+ return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveViewport, {
2661
2790
  ...props,
2662
2791
  className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
2663
2792
  ref: forwardedRef
@@ -2665,7 +2794,7 @@ var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props },
2665
2794
  });
2666
2795
  var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant = "fine", ...props }, forwardedRef) => {
2667
2796
  const { tx } = useThemeContext();
2668
- return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveScrollbar, {
2797
+ return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveScrollbar, {
2669
2798
  "data-variant": variant,
2670
2799
  ...props,
2671
2800
  className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
@@ -2674,7 +2803,7 @@ var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant =
2674
2803
  });
2675
2804
  var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2676
2805
  const { tx } = useThemeContext();
2677
- return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveThumb, {
2806
+ return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveThumb, {
2678
2807
  ...props,
2679
2808
  className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
2680
2809
  ref: forwardedRef
@@ -2682,7 +2811,7 @@ var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, fo
2682
2811
  });
2683
2812
  var ScrollAreaCorner = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2684
2813
  const { tx } = useThemeContext();
2685
- return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveCorner, {
2814
+ return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveCorner, {
2686
2815
  ...props,
2687
2816
  className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
2688
2817
  ref: forwardedRef
@@ -2699,7 +2828,7 @@ var ScrollArea = {
2699
2828
  // packages/ui/react-ui/src/components/Select/Select.tsx
2700
2829
  import { CaretDown as CaretDown2, CaretUp } from "@phosphor-icons/react";
2701
2830
  import * as SelectPrimitive from "@radix-ui/react-select";
2702
- import React31, { forwardRef as forwardRef25 } from "react";
2831
+ import React33, { forwardRef as forwardRef25 } from "react";
2703
2832
  var SelectRoot = SelectPrimitive.Root;
2704
2833
  var SelectTrigger = SelectPrimitive.Trigger;
2705
2834
  var SelectValue = SelectPrimitive.Value;
@@ -2707,52 +2836,57 @@ var SelectIcon = SelectPrimitive.Icon;
2707
2836
  var SelectPortal = SelectPrimitive.Portal;
2708
2837
  var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
2709
2838
  const { tx } = useThemeContext();
2710
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.Trigger, {
2839
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.Trigger, {
2711
2840
  asChild: true,
2712
2841
  ref: forwardedRef
2713
- }, /* @__PURE__ */ React31.createElement(Button, props, /* @__PURE__ */ React31.createElement(SelectPrimitive.Value, {
2842
+ }, /* @__PURE__ */ React33.createElement(Button, props, /* @__PURE__ */ React33.createElement(SelectPrimitive.Value, {
2714
2843
  placeholder
2715
- }, children), /* @__PURE__ */ React31.createElement("span", {
2844
+ }, children), /* @__PURE__ */ React33.createElement("span", {
2716
2845
  className: "w-1 flex-1"
2717
- }), /* @__PURE__ */ React31.createElement(SelectPrimitive.Icon, {
2846
+ }), /* @__PURE__ */ React33.createElement(SelectPrimitive.Icon, {
2718
2847
  asChild: true
2719
- }, /* @__PURE__ */ React31.createElement(CaretDown2, {
2848
+ }, /* @__PURE__ */ React33.createElement(CaretDown2, {
2720
2849
  className: tx("select.triggerIcon", "select__trigger__icon", {}),
2721
2850
  weight: "bold"
2722
2851
  }))));
2723
2852
  });
2724
- var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2853
+ var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
2725
2854
  const { tx } = useThemeContext();
2726
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.Content, {
2855
+ const elevation = useElevationContext();
2856
+ const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
2857
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.Content, {
2727
2858
  ...props,
2728
- className: tx("select.content", "select__content", {}, classNames),
2859
+ collisionPadding: safeCollisionPadding,
2860
+ className: tx("select.content", "select__content", {
2861
+ elevation
2862
+ }, classNames),
2729
2863
  position: "popper",
2730
2864
  ref: forwardedRef
2731
2865
  }, children);
2732
2866
  });
2733
2867
  var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2734
2868
  const { tx } = useThemeContext();
2735
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.SelectScrollUpButton, {
2869
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollUpButton, {
2736
2870
  ...props,
2737
2871
  className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
2738
2872
  ref: forwardedRef
2739
- }, children ?? /* @__PURE__ */ React31.createElement(CaretUp, {
2873
+ }, children ?? /* @__PURE__ */ React33.createElement(CaretUp, {
2740
2874
  weight: "bold"
2741
2875
  }));
2742
2876
  });
2743
2877
  var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2744
2878
  const { tx } = useThemeContext();
2745
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.SelectScrollDownButton, {
2879
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollDownButton, {
2746
2880
  ...props,
2747
2881
  className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
2748
2882
  ref: forwardedRef
2749
- }, children ?? /* @__PURE__ */ React31.createElement(CaretDown2, {
2883
+ }, children ?? /* @__PURE__ */ React33.createElement(CaretDown2, {
2750
2884
  weight: "bold"
2751
2885
  }));
2752
2886
  });
2753
2887
  var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, children, ...props }, forwardedRef) => {
2754
2888
  const { tx } = useThemeContext();
2755
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.SelectViewport, {
2889
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectViewport, {
2756
2890
  ...props,
2757
2891
  className: tx("select.viewport", "select__viewport", {}, classNames),
2758
2892
  ref: forwardedRef
@@ -2760,7 +2894,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, child
2760
2894
  });
2761
2895
  var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2762
2896
  const { tx } = useThemeContext();
2763
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.Item, {
2897
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
2764
2898
  ...props,
2765
2899
  className: tx("select.item", "option", {}, classNames),
2766
2900
  ref: forwardedRef
@@ -2769,7 +2903,7 @@ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forward
2769
2903
  var SelectItemText = SelectPrimitive.ItemText;
2770
2904
  var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2771
2905
  const { tx } = useThemeContext();
2772
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.ItemIndicator, {
2906
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemIndicator, {
2773
2907
  ...props,
2774
2908
  className: tx("select.itemIndicator", "option__indicator", {}, classNames),
2775
2909
  ref: forwardedRef
@@ -2777,13 +2911,13 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children,
2777
2911
  });
2778
2912
  var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
2779
2913
  const { tx } = useThemeContext();
2780
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.Item, {
2914
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
2781
2915
  ...props,
2782
2916
  className: tx("select.item", "option", {}, classNames),
2783
2917
  ref: forwardedRef
2784
- }, /* @__PURE__ */ React31.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React31.createElement("span", {
2918
+ }, /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React33.createElement("span", {
2785
2919
  className: "grow w-1"
2786
- }), /* @__PURE__ */ React31.createElement(Icon, {
2920
+ }), /* @__PURE__ */ React33.createElement(Icon, {
2787
2921
  icon: "ph--check--regular"
2788
2922
  }));
2789
2923
  });
@@ -2791,7 +2925,7 @@ var SelectGroup = SelectPrimitive.Group;
2791
2925
  var SelectLabel = SelectPrimitive.Label;
2792
2926
  var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2793
2927
  const { tx } = useThemeContext();
2794
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.Separator, {
2928
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.Separator, {
2795
2929
  ...props,
2796
2930
  className: tx("select.separator", "select__separator", {}, classNames),
2797
2931
  ref: forwardedRef
@@ -2799,7 +2933,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, fo
2799
2933
  });
2800
2934
  var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2801
2935
  const { tx } = useThemeContext();
2802
- return /* @__PURE__ */ React31.createElement(SelectPrimitive.Arrow, {
2936
+ return /* @__PURE__ */ React33.createElement(SelectPrimitive.Arrow, {
2803
2937
  ...props,
2804
2938
  className: tx("select.arrow", "select__arrow", {}, classNames),
2805
2939
  ref: forwardedRef
@@ -2828,30 +2962,32 @@ var Select = {
2828
2962
 
2829
2963
  // packages/ui/react-ui/src/components/Separator/Separator.tsx
2830
2964
  import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
2831
- import React32 from "react";
2832
- var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
2965
+ import React34, { forwardRef as forwardRef26 } from "react";
2966
+ var Separator4 = /* @__PURE__ */ forwardRef26(({ classNames, orientation = "horizontal", ...props }, forwardedRef) => {
2833
2967
  const { tx } = useThemeContext();
2834
- return /* @__PURE__ */ React32.createElement(SeparatorPrimitive, {
2968
+ return /* @__PURE__ */ React34.createElement(SeparatorPrimitive, {
2835
2969
  orientation,
2836
2970
  ...props,
2837
2971
  className: tx("separator.root", "separator", {
2838
2972
  orientation
2839
- }, classNames)
2973
+ }, classNames),
2974
+ ref: forwardedRef
2840
2975
  });
2841
- };
2976
+ });
2842
2977
 
2843
2978
  // packages/ui/react-ui/src/components/Tag/Tag.tsx
2844
2979
  import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
2845
2980
  import { Slot as Slot13 } from "@radix-ui/react-slot";
2846
- import React33, { forwardRef as forwardRef26 } from "react";
2847
- var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props }, forwardedRef) => {
2981
+ import React35, { forwardRef as forwardRef27 } from "react";
2982
+ var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
2848
2983
  const { tx } = useThemeContext();
2849
2984
  const Root5 = asChild ? Slot13 : Primitive12.span;
2850
- return /* @__PURE__ */ React33.createElement(Root5, {
2985
+ return /* @__PURE__ */ React35.createElement(Root5, {
2851
2986
  ...props,
2852
- className: tx("tag.root", "tag", {
2987
+ className: tx("tag.root", "dx-tag", {
2853
2988
  palette
2854
2989
  }, classNames),
2990
+ "data-hue": palette,
2855
2991
  ref: forwardedRef
2856
2992
  });
2857
2993
  });
@@ -2860,56 +2996,56 @@ var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props
2860
2996
  import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
2861
2997
  import { Slot as Slot14 } from "@radix-ui/react-slot";
2862
2998
  import { ToastProvider as ToastProviderPrimitive, ToastViewport as ToastViewportPrimitive, Root as ToastRootPrimitive, ToastTitle as ToastTitlePrimitive, ToastDescription as ToastDescriptionPrimitive, ToastAction as ToastActionPrimitive, ToastClose as ToastClosePrimitive } from "@radix-ui/react-toast";
2863
- import React34, { forwardRef as forwardRef27 } from "react";
2999
+ import React36, { forwardRef as forwardRef28 } from "react";
2864
3000
  var ToastProvider = ToastProviderPrimitive;
2865
- var ToastViewport = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
3001
+ var ToastViewport = /* @__PURE__ */ forwardRef28(({ classNames, ...props }, forwardedRef) => {
2866
3002
  const { tx } = useThemeContext();
2867
- return /* @__PURE__ */ React34.createElement(ToastViewportPrimitive, {
3003
+ return /* @__PURE__ */ React36.createElement(ToastViewportPrimitive, {
2868
3004
  className: tx("toast.viewport", "toast-viewport", {}, classNames),
2869
3005
  ref: forwardedRef
2870
3006
  });
2871
3007
  });
2872
- var ToastRoot = /* @__PURE__ */ forwardRef27(({ classNames, children, ...props }, forwardedRef) => {
3008
+ var ToastRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
2873
3009
  const { tx } = useThemeContext();
2874
- return /* @__PURE__ */ React34.createElement(ToastRootPrimitive, {
3010
+ return /* @__PURE__ */ React36.createElement(ToastRootPrimitive, {
2875
3011
  ...props,
2876
3012
  className: tx("toast.root", "toast", {}, classNames),
2877
3013
  ref: forwardedRef
2878
- }, /* @__PURE__ */ React34.createElement(ElevationProvider, {
2879
- elevation: "chrome"
3014
+ }, /* @__PURE__ */ React36.createElement(ElevationProvider, {
3015
+ elevation: "toast"
2880
3016
  }, children));
2881
3017
  });
2882
- var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
3018
+ var ToastBody = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
2883
3019
  const { tx } = useThemeContext();
2884
3020
  const Root5 = asChild ? Slot14 : Primitive13.div;
2885
- return /* @__PURE__ */ React34.createElement(Root5, {
3021
+ return /* @__PURE__ */ React36.createElement(Root5, {
2886
3022
  ...props,
2887
3023
  className: tx("toast.body", "toast__body", {}, classNames),
2888
3024
  ref: forwardedRef
2889
3025
  });
2890
3026
  });
2891
- var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
3027
+ var ToastTitle = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
2892
3028
  const { tx } = useThemeContext();
2893
3029
  const Root5 = asChild ? Slot14 : ToastTitlePrimitive;
2894
- return /* @__PURE__ */ React34.createElement(Root5, {
3030
+ return /* @__PURE__ */ React36.createElement(Root5, {
2895
3031
  ...props,
2896
3032
  className: tx("toast.title", "toast__title", {}, classNames),
2897
3033
  ref: forwardedRef
2898
3034
  });
2899
3035
  });
2900
- var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
3036
+ var ToastDescription = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
2901
3037
  const { tx } = useThemeContext();
2902
3038
  const Root5 = asChild ? Slot14 : ToastDescriptionPrimitive;
2903
- return /* @__PURE__ */ React34.createElement(Root5, {
3039
+ return /* @__PURE__ */ React36.createElement(Root5, {
2904
3040
  ...props,
2905
3041
  className: tx("toast.description", "toast__description", {}, classNames),
2906
3042
  ref: forwardedRef
2907
3043
  });
2908
3044
  });
2909
- var ToastActions = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
3045
+ var ToastActions = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
2910
3046
  const { tx } = useThemeContext();
2911
3047
  const Root5 = asChild ? Slot14 : Primitive13.div;
2912
- return /* @__PURE__ */ React34.createElement(Root5, {
3048
+ return /* @__PURE__ */ React36.createElement(Root5, {
2913
3049
  ...props,
2914
3050
  className: tx("toast.actions", "toast__actions", {}, classNames),
2915
3051
  ref: forwardedRef
@@ -2931,55 +3067,63 @@ var Toast = {
2931
3067
 
2932
3068
  // packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
2933
3069
  import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
2934
- import React35, { forwardRef as forwardRef28 } from "react";
2935
- var ToolbarRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
3070
+ import React37, { forwardRef as forwardRef29 } from "react";
3071
+ var ToolbarRoot = /* @__PURE__ */ forwardRef29(({ classNames, children, ...props }, forwardedRef) => {
2936
3072
  const { tx } = useThemeContext();
2937
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Root, {
3073
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Root, {
2938
3074
  ...props,
2939
3075
  className: tx("toolbar.root", "toolbar", {}, classNames),
2940
3076
  ref: forwardedRef
2941
3077
  }, children);
2942
3078
  });
2943
- var ToolbarButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
2944
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Button, {
3079
+ var ToolbarButton = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
3080
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
2945
3081
  asChild: true
2946
- }, /* @__PURE__ */ React35.createElement(Button, {
3082
+ }, /* @__PURE__ */ React37.createElement(Button, {
2947
3083
  ...props,
2948
3084
  ref: forwardedRef
2949
3085
  }));
2950
3086
  });
2951
- var ToolbarToggle = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
2952
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Button, {
3087
+ var ToolbarIconButton = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
3088
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
2953
3089
  asChild: true
2954
- }, /* @__PURE__ */ React35.createElement(Toggle, {
3090
+ }, /* @__PURE__ */ React37.createElement(IconButton, {
2955
3091
  ...props,
2956
3092
  ref: forwardedRef
2957
3093
  }));
2958
3094
  });
2959
- var ToolbarLink = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
2960
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Link, {
3095
+ var ToolbarToggle = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
3096
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
2961
3097
  asChild: true
2962
- }, /* @__PURE__ */ React35.createElement(Link, {
3098
+ }, /* @__PURE__ */ React37.createElement(Toggle, {
2963
3099
  ...props,
2964
3100
  ref: forwardedRef
2965
3101
  }));
2966
3102
  });
2967
- var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children, elevation, ...props }, forwardedRef) => {
2968
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
3103
+ var ToolbarLink = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
3104
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Link, {
3105
+ asChild: true
3106
+ }, /* @__PURE__ */ React37.createElement(Link, {
3107
+ ...props,
3108
+ ref: forwardedRef
3109
+ }));
3110
+ });
3111
+ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef29(({ classNames, children, elevation, ...props }, forwardedRef) => {
3112
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
2969
3113
  ...props,
2970
3114
  asChild: true
2971
- }, /* @__PURE__ */ React35.createElement(ButtonGroup, {
3115
+ }, /* @__PURE__ */ React37.createElement(ButtonGroup, {
2972
3116
  classNames,
2973
3117
  children,
2974
3118
  elevation,
2975
3119
  ref: forwardedRef
2976
3120
  }));
2977
3121
  });
2978
- var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
2979
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.ToolbarToggleItem, {
3122
+ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef29(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
3123
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
2980
3124
  ...props,
2981
3125
  asChild: true
2982
- }, /* @__PURE__ */ React35.createElement(Button, {
3126
+ }, /* @__PURE__ */ React37.createElement(Button, {
2983
3127
  variant,
2984
3128
  density,
2985
3129
  elevation,
@@ -2988,26 +3132,42 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, e
2988
3132
  ref: forwardedRef
2989
3133
  }));
2990
3134
  });
2991
- var ToolbarSeparator = (props) => {
2992
- return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Separator, {
3135
+ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef29(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
3136
+ return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
3137
+ ...props,
2993
3138
  asChild: true
2994
- }, /* @__PURE__ */ React35.createElement(Separator4, {
2995
- orientation: "vertical",
2996
- ...props
3139
+ }, /* @__PURE__ */ React37.createElement(IconButton, {
3140
+ variant,
3141
+ density,
3142
+ elevation,
3143
+ classNames,
3144
+ icon,
3145
+ label,
3146
+ iconOnly,
3147
+ ref: forwardedRef
2997
3148
  }));
2998
- };
2999
- var ToolbarExpander = () => /* @__PURE__ */ React35.createElement("div", {
3000
- className: "grow"
3149
+ });
3150
+ var ToolbarSeparator = /* @__PURE__ */ forwardRef29(({ variant = "line", ...props }, forwardedRef) => {
3151
+ return variant === "line" ? /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
3152
+ asChild: true
3153
+ }, /* @__PURE__ */ React37.createElement(Separator4, {
3154
+ ...props,
3155
+ ref: forwardedRef
3156
+ })) : /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
3157
+ className: "grow",
3158
+ ref: forwardedRef
3159
+ });
3001
3160
  });
3002
3161
  var Toolbar = {
3003
3162
  Root: ToolbarRoot,
3004
3163
  Button: ToolbarButton,
3164
+ IconButton: ToolbarIconButton,
3005
3165
  Link: ToolbarLink,
3006
3166
  Toggle: ToolbarToggle,
3007
3167
  ToggleGroup: ToolbarToggleGroup2,
3008
3168
  ToggleGroupItem: ToolbarToggleGroupItem,
3009
- Separator: ToolbarSeparator,
3010
- Expander: ToolbarExpander
3169
+ ToggleGroupIconItem: ToolbarToggleGroupIconItem,
3170
+ Separator: ToolbarSeparator
3011
3171
  };
3012
3172
  export {
3013
3173
  AlertDialog,
@@ -3058,6 +3218,7 @@ export {
3058
3218
  createDropdownMenuScope,
3059
3219
  createPopoverScope,
3060
3220
  hasIosKeyboard,
3221
+ initialSafeArea,
3061
3222
  isLabel,
3062
3223
  toLocalizedString,
3063
3224
  useAvatarContext,
@@ -3067,9 +3228,11 @@ export {
3067
3228
  useDropdownMenuContext,
3068
3229
  useDropdownMenuMenuScope,
3069
3230
  useElevationContext,
3231
+ useLandmarkMover,
3070
3232
  useListContext,
3071
3233
  useListItemContext,
3072
3234
  useMainContext,
3235
+ useSafeArea,
3073
3236
  useSidebars,
3074
3237
  useThemeContext,
3075
3238
  useTranslation,