@dxos/react-ui 0.7.3-staging.cc8dd3e → 0.7.3

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.
@@ -686,29 +686,182 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef11(({ variant, elevation, densit
686
686
  }));
687
687
  });
688
688
 
689
- // packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
690
- import { createContext as createContext5 } from "@radix-ui/react-context";
691
- 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";
692
- import React14, { forwardRef as forwardRef12 } from "react";
689
+ // packages/ui/react-ui/src/components/Clipboard/ClipboardProvider.tsx
690
+ import React13, { createContext as createContext4, useCallback, useContext as useContext6, useState as useState3 } from "react";
691
+ var ClipboardContext = /* @__PURE__ */ createContext4({
692
+ textValue: "",
693
+ setTextValue: async (_) => {
694
+ }
695
+ });
696
+ var useClipboard = () => useContext6(ClipboardContext);
697
+ var ClipboardProvider = ({ children }) => {
698
+ const [textValue, setInternalTextValue] = useState3("");
699
+ const setTextValue = useCallback(async (nextValue) => {
700
+ await navigator.clipboard.writeText(nextValue);
701
+ return setInternalTextValue(nextValue);
702
+ }, []);
703
+ return /* @__PURE__ */ React13.createElement(ClipboardContext.Provider, {
704
+ value: {
705
+ textValue,
706
+ setTextValue
707
+ }
708
+ }, children);
709
+ };
710
+
711
+ // packages/ui/react-ui/src/components/Clipboard/CopyButton.tsx
712
+ import React17, { useState as useState4 } from "react";
713
+ import { mx } from "@dxos/react-ui-theme";
714
+
715
+ // packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
716
+ import { createKeyborg } from "keyborg";
717
+ import React16, { createContext as createContext7, useEffect as useEffect3 } from "react";
718
+
719
+ // packages/ui/react-ui/src/util/hasIosKeyboard.ts
720
+ var hasIosKeyboard = () => {
721
+ return !!navigator.userAgent.match(/iP(ad|od|hone).+Safari/);
722
+ };
723
+
724
+ // packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
725
+ import React14, { createContext as createContext5 } from "react";
726
+ var DensityContext = /* @__PURE__ */ createContext5({
727
+ density: "fine"
728
+ });
729
+ var DensityProvider = ({ density, children }) => /* @__PURE__ */ React14.createElement(DensityContext.Provider, {
730
+ value: {
731
+ density
732
+ }
733
+ }, children);
693
734
 
694
735
  // packages/ui/react-ui/src/components/ElevationProvider/ElevationProvider.tsx
695
- import React13, { createContext as createContext4 } from "react";
696
- var ElevationContext = /* @__PURE__ */ createContext4({
736
+ import React15, { createContext as createContext6 } from "react";
737
+ var ElevationContext = /* @__PURE__ */ createContext6({
697
738
  elevation: "base"
698
739
  });
699
- var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React13.createElement(ElevationContext.Provider, {
740
+ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React15.createElement(ElevationContext.Provider, {
700
741
  value: {
701
742
  elevation
702
743
  }
703
744
  }, children);
704
745
 
746
+ // packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
747
+ var ThemeContext = /* @__PURE__ */ createContext7(void 0);
748
+ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", rootElevation = "base", ...rest }) => {
749
+ useEffect3(() => {
750
+ if (document.defaultView) {
751
+ const kb = createKeyborg(document.defaultView);
752
+ kb.subscribe(handleInputModalityChange);
753
+ return () => kb.unsubscribe(handleInputModalityChange);
754
+ }
755
+ }, []);
756
+ return /* @__PURE__ */ React16.createElement(ThemeContext.Provider, {
757
+ value: {
758
+ tx,
759
+ themeMode,
760
+ hasIosKeyboard: hasIosKeyboard(),
761
+ ...rest
762
+ }
763
+ }, /* @__PURE__ */ React16.createElement(TranslationsProvider, {
764
+ fallback,
765
+ resourceExtensions,
766
+ appNs
767
+ }, /* @__PURE__ */ React16.createElement(ElevationProvider, {
768
+ elevation: rootElevation
769
+ }, /* @__PURE__ */ React16.createElement(DensityProvider, {
770
+ density: rootDensity
771
+ }, children))));
772
+ };
773
+ var handleInputModalityChange = (isUsingKeyboard) => {
774
+ if (isUsingKeyboard) {
775
+ document.body.setAttribute("data-is-keyboard", "true");
776
+ } else {
777
+ document.body.removeAttribute("data-is-keyboard");
778
+ }
779
+ };
780
+
781
+ // packages/ui/react-ui/src/components/Clipboard/CopyButton.tsx
782
+ var inactiveLabelStyles = "invisible bs-px -mbe-px overflow-hidden";
783
+ var CopyButton = ({ value, classNames, iconProps, ...props }) => {
784
+ const { t } = useTranslation("os");
785
+ const { textValue, setTextValue } = useClipboard();
786
+ const isCopied = textValue === value;
787
+ return /* @__PURE__ */ React17.createElement(Button, {
788
+ ...props,
789
+ classNames: [
790
+ "inline-flex flex-col justify-center",
791
+ classNames
792
+ ],
793
+ onClick: () => setTextValue(value),
794
+ "data-testid": "copy-invitation"
795
+ }, /* @__PURE__ */ React17.createElement("div", {
796
+ role: "none",
797
+ className: mx("flex gap-1 items-center", isCopied && inactiveLabelStyles)
798
+ }, /* @__PURE__ */ React17.createElement("span", {
799
+ className: "pli-1"
800
+ }, t("copy label")), /* @__PURE__ */ React17.createElement(Icon, {
801
+ icon: "ph--copy--regular",
802
+ size: 5,
803
+ ...iconProps
804
+ })), /* @__PURE__ */ React17.createElement("div", {
805
+ role: "none",
806
+ className: mx("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
807
+ }, /* @__PURE__ */ React17.createElement("span", {
808
+ className: "pli-1"
809
+ }, t("copy success label")), /* @__PURE__ */ React17.createElement(Icon, {
810
+ icon: "ph--check--regular",
811
+ size: 5,
812
+ ...iconProps
813
+ })));
814
+ };
815
+ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) => {
816
+ const { t } = useTranslation("os");
817
+ const { textValue, setTextValue } = useClipboard();
818
+ const isCopied = textValue === value;
819
+ const label = isCopied ? t("copy success label") : t("copy label");
820
+ const [open, setOpen] = useState4(false);
821
+ return /* @__PURE__ */ React17.createElement(Tooltip.Root, {
822
+ delayDuration: 1500,
823
+ open,
824
+ onOpenChange: setOpen
825
+ }, /* @__PURE__ */ React17.createElement(Tooltip.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip.Content, {
826
+ side: "bottom",
827
+ sideOffset: 12,
828
+ classNames: "z-30"
829
+ }, /* @__PURE__ */ React17.createElement("span", null, label), /* @__PURE__ */ React17.createElement(Tooltip.Arrow, null))), /* @__PURE__ */ React17.createElement(Tooltip.Trigger, {
830
+ "aria-label": label,
831
+ ...props,
832
+ onClick: () => setTextValue(value).then(() => setOpen(true)),
833
+ "data-testid": "copy-invitation",
834
+ asChild: true
835
+ }, /* @__PURE__ */ React17.createElement(Button, {
836
+ variant,
837
+ classNames: [
838
+ "inline-flex flex-col justify-center",
839
+ classNames
840
+ ]
841
+ }, /* @__PURE__ */ React17.createElement(Icon, {
842
+ icon: "ph--copy--regular",
843
+ size: 5,
844
+ ...iconProps
845
+ }))));
846
+ };
847
+
848
+ // packages/ui/react-ui/src/components/Clipboard/index.ts
849
+ var Clipboard = {
850
+ Button: CopyButton,
851
+ IconButton: CopyButtonIconOnly,
852
+ Provider: ClipboardProvider
853
+ };
854
+
705
855
  // packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
856
+ import { createContext as createContext8 } from "@radix-ui/react-context";
857
+ 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";
858
+ import React18, { forwardRef as forwardRef12 } from "react";
706
859
  var DialogRoot = DialogRootPrimitive;
707
860
  var DialogTrigger = DialogTriggerPrimitive;
708
861
  var DialogPortal = DialogPortalPrimitive;
709
862
  var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
710
863
  const { tx } = useThemeContext();
711
- return /* @__PURE__ */ React14.createElement(DialogTitlePrimitive, {
864
+ return /* @__PURE__ */ React18.createElement(DialogTitlePrimitive, {
712
865
  ...props,
713
866
  className: tx("dialog.title", "dialog__title", {
714
867
  srOnly
@@ -718,7 +871,7 @@ var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }
718
871
  });
719
872
  var DialogDescription = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
720
873
  const { tx } = useThemeContext();
721
- return /* @__PURE__ */ React14.createElement(DialogDescriptionPrimitive, {
874
+ return /* @__PURE__ */ React18.createElement(DialogDescriptionPrimitive, {
722
875
  ...props,
723
876
  className: tx("dialog.description", "dialog__description", {
724
877
  srOnly
@@ -729,17 +882,17 @@ var DialogDescription = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...p
729
882
  var DialogClose = DialogClosePrimitive;
730
883
  var DIALOG_OVERLAY_NAME = "DialogOverlay";
731
884
  var DIALOG_CONTENT_NAME = "DialogContent";
732
- var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
885
+ var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext8(DIALOG_OVERLAY_NAME, {
733
886
  inOverlayLayout: false
734
887
  });
735
888
  var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
736
889
  const { tx } = useThemeContext();
737
- return /* @__PURE__ */ React14.createElement(DialogOverlayPrimitive, {
890
+ return /* @__PURE__ */ React18.createElement(DialogOverlayPrimitive, {
738
891
  ...props,
739
892
  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"),
740
893
  ref: forwardedRef,
741
894
  "data-block-align": blockAlign
742
- }, /* @__PURE__ */ React14.createElement(OverlayLayoutProvider, {
895
+ }, /* @__PURE__ */ React18.createElement(OverlayLayoutProvider, {
743
896
  inOverlayLayout: true
744
897
  }, children));
745
898
  });
@@ -747,13 +900,13 @@ DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
747
900
  var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
748
901
  const { tx } = useThemeContext();
749
902
  const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
750
- return /* @__PURE__ */ React14.createElement(DialogContentPrimitive, {
903
+ return /* @__PURE__ */ React18.createElement(DialogContentPrimitive, {
751
904
  ...props,
752
905
  className: tx("dialog.content", "dialog", {
753
906
  inOverlayLayout
754
907
  }, classNames),
755
908
  ref: forwardedRef
756
- }, /* @__PURE__ */ React14.createElement(ElevationProvider, {
909
+ }, /* @__PURE__ */ React18.createElement(ElevationProvider, {
757
910
  elevation: "chrome"
758
911
  }, children));
759
912
  });
@@ -771,8 +924,8 @@ var Dialog = {
771
924
 
772
925
  // packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
773
926
  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";
774
- import { createContext as createContext6 } from "@radix-ui/react-context";
775
- import React15, { forwardRef as forwardRef13 } from "react";
927
+ import { createContext as createContext9 } from "@radix-ui/react-context";
928
+ import React19, { forwardRef as forwardRef13 } from "react";
776
929
  var AlertDialogRoot = AlertDialogRootPrimitive;
777
930
  var AlertDialogTrigger = AlertDialogTriggerPrimitive;
778
931
  var AlertDialogPortal = AlertDialogPortalPrimitive;
@@ -780,7 +933,7 @@ var AlertDialogCancel = AlertDialogCancelPrimitive;
780
933
  var AlertDialogAction = AlertDialogActionPrimitive;
781
934
  var AlertDialogTitle = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
782
935
  const { tx } = useThemeContext();
783
- return /* @__PURE__ */ React15.createElement(AlertDialogTitlePrimitive, {
936
+ return /* @__PURE__ */ React19.createElement(AlertDialogTitlePrimitive, {
784
937
  ...props,
785
938
  className: tx("dialog.title", "dialog--alert__title", {
786
939
  srOnly
@@ -790,7 +943,7 @@ var AlertDialogTitle = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...pr
790
943
  });
791
944
  var AlertDialogDescription = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
792
945
  const { tx } = useThemeContext();
793
- return /* @__PURE__ */ React15.createElement(AlertDialogDescriptionPrimitive, {
946
+ return /* @__PURE__ */ React19.createElement(AlertDialogDescriptionPrimitive, {
794
947
  ...props,
795
948
  className: tx("dialog.description", "dialog--alert__description", {
796
949
  srOnly
@@ -800,16 +953,17 @@ var AlertDialogDescription = /* @__PURE__ */ forwardRef13(({ classNames, srOnly,
800
953
  });
801
954
  var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
802
955
  var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
803
- var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
956
+ var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext9(ALERT_DIALOG_OVERLAY_NAME, {
804
957
  inOverlayLayout: false
805
958
  });
806
- var AlertDialogOverlay = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
959
+ var AlertDialogOverlay = /* @__PURE__ */ forwardRef13(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
807
960
  const { tx } = useThemeContext();
808
- return /* @__PURE__ */ React15.createElement(AlertDialogOverlayPrimitive, {
961
+ return /* @__PURE__ */ React19.createElement(AlertDialogOverlayPrimitive, {
809
962
  ...props,
810
- className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
811
- ref: forwardedRef
812
- }, /* @__PURE__ */ React15.createElement(OverlayLayoutProvider2, {
963
+ className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames, "data-[block-align=start]:justify-center", "data-[block-align=start]:items-start", "data-[block-align=center]:place-content-center"),
964
+ ref: forwardedRef,
965
+ "data-block-align": blockAlign
966
+ }, /* @__PURE__ */ React19.createElement(OverlayLayoutProvider2, {
813
967
  inOverlayLayout: true
814
968
  }, children));
815
969
  });
@@ -817,13 +971,13 @@ AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
817
971
  var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
818
972
  const { tx } = useThemeContext();
819
973
  const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
820
- return /* @__PURE__ */ React15.createElement(AlertDialogContentPrimitive, {
974
+ return /* @__PURE__ */ React19.createElement(AlertDialogContentPrimitive, {
821
975
  ...props,
822
976
  className: tx("dialog.content", "dialog--alert", {
823
977
  inOverlayLayout
824
978
  }, classNames),
825
979
  ref: forwardedRef
826
- }, /* @__PURE__ */ React15.createElement(ElevationProvider, {
980
+ }, /* @__PURE__ */ React19.createElement(ElevationProvider, {
827
981
  elevation: "chrome"
828
982
  }, children));
829
983
  });
@@ -844,25 +998,25 @@ var AlertDialog = {
844
998
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
845
999
  import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
846
1000
  import { Slot as Slot6 } from "@radix-ui/react-slot";
847
- import React16, { forwardRef as forwardRef14 } from "react";
1001
+ import React20, { forwardRef as forwardRef14 } from "react";
848
1002
  var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
849
1003
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
850
1004
  var ContextMenuPortal = ContextMenuPrimitive.Portal;
851
1005
  var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
852
1006
  const { tx } = useThemeContext();
853
- return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Content, {
1007
+ return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Content, {
854
1008
  collisionPadding: 8,
855
1009
  ...props,
856
1010
  className: tx("menu.content", "menu", {}, classNames),
857
1011
  ref: forwardedRef
858
- }, /* @__PURE__ */ React16.createElement(ElevationProvider, {
1012
+ }, /* @__PURE__ */ React20.createElement(ElevationProvider, {
859
1013
  elevation: "chrome"
860
1014
  }, children));
861
1015
  });
862
1016
  var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
863
1017
  const { tx } = useThemeContext();
864
1018
  const Root5 = asChild ? Slot6 : Primitive6.div;
865
- return /* @__PURE__ */ React16.createElement(Root5, {
1019
+ return /* @__PURE__ */ React20.createElement(Root5, {
866
1020
  ...props,
867
1021
  className: tx("menu.viewport", "menu__viewport", {}, classNames),
868
1022
  ref: forwardedRef
@@ -870,7 +1024,7 @@ var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, c
870
1024
  });
871
1025
  var ContextMenuArrow = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
872
1026
  const { tx } = useThemeContext();
873
- return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Arrow, {
1027
+ return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Arrow, {
874
1028
  ...props,
875
1029
  className: tx("menu.arrow", "menu__arrow", {}, classNames),
876
1030
  ref: forwardedRef
@@ -880,7 +1034,7 @@ var ContextMenuGroup = ContextMenuPrimitive.Group;
880
1034
  var ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;
881
1035
  var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
882
1036
  const { tx } = useThemeContext();
883
- return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Item, {
1037
+ return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Item, {
884
1038
  ...props,
885
1039
  className: tx("menu.item", "menu__item", {}, classNames),
886
1040
  ref: forwardedRef
@@ -888,7 +1042,7 @@ var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, fo
888
1042
  });
889
1043
  var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
890
1044
  const { tx } = useThemeContext();
891
- return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.CheckboxItem, {
1045
+ return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.CheckboxItem, {
892
1046
  ...props,
893
1047
  className: tx("menu.item", "menu__item--checkbox", {}, classNames),
894
1048
  ref: forwardedRef
@@ -896,7 +1050,7 @@ var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...pro
896
1050
  });
897
1051
  var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
898
1052
  const { tx } = useThemeContext();
899
- return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Separator, {
1053
+ return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Separator, {
900
1054
  ...props,
901
1055
  className: tx("menu.separator", "menu__item", {}, classNames),
902
1056
  ref: forwardedRef
@@ -904,7 +1058,7 @@ var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props
904
1058
  });
905
1059
  var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
906
1060
  const { tx } = useThemeContext();
907
- return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Label, {
1061
+ return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Label, {
908
1062
  ...props,
909
1063
  className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
910
1064
  ref: forwardedRef
@@ -935,7 +1089,7 @@ import { createMenuScope } from "@radix-ui/react-menu";
935
1089
  import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
936
1090
  import { Slot as Slot7 } from "@radix-ui/react-slot";
937
1091
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
938
- import React17, { useRef, useCallback, forwardRef as forwardRef15, useEffect as useEffect3 } from "react";
1092
+ import React21, { useRef, useCallback as useCallback2, forwardRef as forwardRef15, useEffect as useEffect4 } from "react";
939
1093
  var DROPDOWN_MENU_NAME = "DropdownMenu";
940
1094
  var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
941
1095
  createMenuScope
@@ -951,18 +1105,18 @@ var DropdownMenuRoot = (props) => {
951
1105
  defaultProp: defaultOpen,
952
1106
  onChange: onOpenChange
953
1107
  });
954
- return /* @__PURE__ */ React17.createElement(DropdownMenuProvider, {
1108
+ return /* @__PURE__ */ React21.createElement(DropdownMenuProvider, {
955
1109
  scope: __scopeDropdownMenu,
956
1110
  triggerId: useId3(),
957
1111
  triggerRef,
958
1112
  contentId: useId3(),
959
1113
  open,
960
1114
  onOpenChange: setOpen,
961
- onOpenToggle: useCallback(() => setOpen((prevOpen) => !prevOpen), [
1115
+ onOpenToggle: useCallback2(() => setOpen((prevOpen) => !prevOpen), [
962
1116
  setOpen
963
1117
  ]),
964
1118
  modal
965
- }, /* @__PURE__ */ React17.createElement(MenuPrimitive.Root, {
1119
+ }, /* @__PURE__ */ React21.createElement(MenuPrimitive.Root, {
966
1120
  ...menuScope,
967
1121
  open,
968
1122
  onOpenChange: setOpen,
@@ -976,10 +1130,10 @@ var DropdownMenuTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
976
1130
  const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
977
1131
  const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
978
1132
  const menuScope = useMenuScope(__scopeDropdownMenu);
979
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Anchor, {
1133
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Anchor, {
980
1134
  asChild: true,
981
1135
  ...menuScope
982
- }, /* @__PURE__ */ React17.createElement(Primitive7.button, {
1136
+ }, /* @__PURE__ */ React21.createElement(Primitive7.button, {
983
1137
  type: "button",
984
1138
  id: context.triggerId,
985
1139
  "aria-haspopup": "menu",
@@ -1027,12 +1181,12 @@ var DropdownMenuVirtualTrigger = (props) => {
1027
1181
  const { __scopeDropdownMenu, virtualRef } = props;
1028
1182
  const context = useDropdownMenuContext(VIRTUAL_TRIGGER_NAME, __scopeDropdownMenu);
1029
1183
  const menuScope = useMenuScope(__scopeDropdownMenu);
1030
- useEffect3(() => {
1184
+ useEffect4(() => {
1031
1185
  if (virtualRef.current) {
1032
1186
  context.triggerRef.current = virtualRef.current;
1033
1187
  }
1034
1188
  });
1035
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Anchor, {
1189
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Anchor, {
1036
1190
  ...menuScope,
1037
1191
  virtualRef
1038
1192
  });
@@ -1042,7 +1196,7 @@ var PORTAL_NAME = "DropdownMenuPortal";
1042
1196
  var DropdownMenuPortal = (props) => {
1043
1197
  const { __scopeDropdownMenu, ...portalProps } = props;
1044
1198
  const menuScope = useMenuScope(__scopeDropdownMenu);
1045
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Portal, {
1199
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Portal, {
1046
1200
  ...menuScope,
1047
1201
  ...portalProps
1048
1202
  });
@@ -1051,7 +1205,7 @@ DropdownMenuPortal.displayName = PORTAL_NAME;
1051
1205
  var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild, children, ...props }, forwardedRef) => {
1052
1206
  const { tx } = useThemeContext();
1053
1207
  const Root5 = asChild ? Slot7 : Primitive7.div;
1054
- return /* @__PURE__ */ React17.createElement(Root5, {
1208
+ return /* @__PURE__ */ React21.createElement(Root5, {
1055
1209
  ...props,
1056
1210
  className: tx("menu.viewport", "menu__viewport", {}, classNames),
1057
1211
  ref: forwardedRef
@@ -1064,7 +1218,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
1064
1218
  const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
1065
1219
  const menuScope = useMenuScope(__scopeDropdownMenu);
1066
1220
  const hasInteractedOutsideRef = useRef(false);
1067
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Content, {
1221
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Content, {
1068
1222
  id: context.contentId,
1069
1223
  "aria-labelledby": context.triggerId,
1070
1224
  ...menuScope,
@@ -1104,7 +1258,7 @@ var GROUP_NAME = "DropdownMenuGroup";
1104
1258
  var DropdownMenuGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1105
1259
  const { __scopeDropdownMenu, ...groupProps } = props;
1106
1260
  const menuScope = useMenuScope(__scopeDropdownMenu);
1107
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Group, {
1261
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Group, {
1108
1262
  ...menuScope,
1109
1263
  ...groupProps,
1110
1264
  ref: forwardedRef
@@ -1116,7 +1270,7 @@ var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1116
1270
  const { __scopeDropdownMenu, classNames, ...labelProps } = props;
1117
1271
  const menuScope = useMenuScope(__scopeDropdownMenu);
1118
1272
  const { tx } = useThemeContext();
1119
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Label, {
1273
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Label, {
1120
1274
  ...menuScope,
1121
1275
  ...labelProps,
1122
1276
  className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
@@ -1129,7 +1283,7 @@ var DropdownMenuItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1129
1283
  const { __scopeDropdownMenu, classNames, ...itemProps } = props;
1130
1284
  const menuScope = useMenuScope(__scopeDropdownMenu);
1131
1285
  const { tx } = useThemeContext();
1132
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Item, {
1286
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Item, {
1133
1287
  ...menuScope,
1134
1288
  ...itemProps,
1135
1289
  className: tx("menu.item", "menu__item", {}, classNames),
@@ -1142,7 +1296,7 @@ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef15((props, forwardedRef
1142
1296
  const { __scopeDropdownMenu, classNames, ...checkboxItemProps } = props;
1143
1297
  const menuScope = useMenuScope(__scopeDropdownMenu);
1144
1298
  const { tx } = useThemeContext();
1145
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.CheckboxItem, {
1299
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.CheckboxItem, {
1146
1300
  ...menuScope,
1147
1301
  ...checkboxItemProps,
1148
1302
  className: tx("menu.item", "menu__item--checkbox", {}, classNames),
@@ -1154,7 +1308,7 @@ var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
1154
1308
  var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1155
1309
  const { __scopeDropdownMenu, ...radioGroupProps } = props;
1156
1310
  const menuScope = useMenuScope(__scopeDropdownMenu);
1157
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.RadioGroup, {
1311
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.RadioGroup, {
1158
1312
  ...menuScope,
1159
1313
  ...radioGroupProps,
1160
1314
  ref: forwardedRef
@@ -1165,7 +1319,7 @@ var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
1165
1319
  var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1166
1320
  const { __scopeDropdownMenu, ...radioItemProps } = props;
1167
1321
  const menuScope = useMenuScope(__scopeDropdownMenu);
1168
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.RadioItem, {
1322
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.RadioItem, {
1169
1323
  ...menuScope,
1170
1324
  ...radioItemProps,
1171
1325
  ref: forwardedRef
@@ -1176,7 +1330,7 @@ var INDICATOR_NAME = "DropdownMenuItemIndicator";
1176
1330
  var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1177
1331
  const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
1178
1332
  const menuScope = useMenuScope(__scopeDropdownMenu);
1179
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.ItemIndicator, {
1333
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.ItemIndicator, {
1180
1334
  ...menuScope,
1181
1335
  ...itemIndicatorProps,
1182
1336
  ref: forwardedRef
@@ -1188,7 +1342,7 @@ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef15((props, forwardedRef) =
1188
1342
  const { __scopeDropdownMenu, classNames, ...separatorProps } = props;
1189
1343
  const menuScope = useMenuScope(__scopeDropdownMenu);
1190
1344
  const { tx } = useThemeContext();
1191
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Separator, {
1345
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Separator, {
1192
1346
  ...menuScope,
1193
1347
  ...separatorProps,
1194
1348
  className: tx("menu.separator", "menu__item", {}, classNames),
@@ -1201,7 +1355,7 @@ var DropdownMenuArrow = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1201
1355
  const { __scopeDropdownMenu, classNames, ...arrowProps } = props;
1202
1356
  const menuScope = useMenuScope(__scopeDropdownMenu);
1203
1357
  const { tx } = useThemeContext();
1204
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Arrow, {
1358
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Arrow, {
1205
1359
  ...menuScope,
1206
1360
  ...arrowProps,
1207
1361
  className: tx("menu.arrow", "menu__arrow", {}, classNames),
@@ -1217,7 +1371,7 @@ var DropdownMenuSub = (props) => {
1217
1371
  defaultProp: defaultOpen,
1218
1372
  onChange: onOpenChange
1219
1373
  });
1220
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.Sub, {
1374
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.Sub, {
1221
1375
  ...menuScope,
1222
1376
  open,
1223
1377
  onOpenChange: setOpen
@@ -1227,7 +1381,7 @@ var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
1227
1381
  var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1228
1382
  const { __scopeDropdownMenu, ...subTriggerProps } = props;
1229
1383
  const menuScope = useMenuScope(__scopeDropdownMenu);
1230
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.SubTrigger, {
1384
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.SubTrigger, {
1231
1385
  ...menuScope,
1232
1386
  ...subTriggerProps,
1233
1387
  ref: forwardedRef
@@ -1238,7 +1392,7 @@ var SUB_CONTENT_NAME = "DropdownMenuSubContent";
1238
1392
  var DropdownMenuSubContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1239
1393
  const { __scopeDropdownMenu, ...subContentProps } = props;
1240
1394
  const menuScope = useMenuScope(__scopeDropdownMenu);
1241
- return /* @__PURE__ */ React17.createElement(MenuPrimitive.SubContent, {
1395
+ return /* @__PURE__ */ React21.createElement(MenuPrimitive.SubContent, {
1242
1396
  ...menuScope,
1243
1397
  ...subContentProps,
1244
1398
  ref: forwardedRef,
@@ -1283,11 +1437,11 @@ import { Check, Minus } from "@phosphor-icons/react";
1283
1437
  import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
1284
1438
  import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
1285
1439
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
1286
- import React18, { forwardRef as forwardRef16, Fragment, useCallback as useCallback2 } from "react";
1440
+ import React22, { forwardRef as forwardRef16, Fragment, useCallback as useCallback3 } from "react";
1287
1441
  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";
1288
1442
  var Label3 = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
1289
1443
  const { tx } = useThemeContext();
1290
- return /* @__PURE__ */ React18.createElement(LabelPrimitive, {
1444
+ return /* @__PURE__ */ React22.createElement(LabelPrimitive, {
1291
1445
  ...props,
1292
1446
  className: tx("input.label", "input__label", {
1293
1447
  srOnly
@@ -1297,7 +1451,7 @@ var Label3 = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...pr
1297
1451
  });
1298
1452
  var Description = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
1299
1453
  const { tx } = useThemeContext();
1300
- return /* @__PURE__ */ React18.createElement(DescriptionPrimitive, {
1454
+ return /* @__PURE__ */ React22.createElement(DescriptionPrimitive, {
1301
1455
  ...props,
1302
1456
  className: tx("input.description", "input__description", {
1303
1457
  srOnly
@@ -1308,7 +1462,7 @@ var Description = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children,
1308
1462
  var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {
1309
1463
  const { tx } = useThemeContext();
1310
1464
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
1311
- return /* @__PURE__ */ React18.createElement(ValidationPrimitive, {
1465
+ return /* @__PURE__ */ React22.createElement(ValidationPrimitive, {
1312
1466
  ...props,
1313
1467
  className: tx("input.validation", `input__validation-message input__validation-message--${validationValence}`, {
1314
1468
  srOnly,
@@ -1319,7 +1473,7 @@ var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, srOnly, className
1319
1473
  });
1320
1474
  var DescriptionAndValidation = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
1321
1475
  const { tx } = useThemeContext();
1322
- return /* @__PURE__ */ React18.createElement(DescriptionAndValidationPrimitive, {
1476
+ return /* @__PURE__ */ React22.createElement(DescriptionAndValidationPrimitive, {
1323
1477
  ...props,
1324
1478
  className: tx("input.descriptionAndValidation", "input__description-and-validation", {
1325
1479
  srOnly
@@ -1332,7 +1486,7 @@ var PinInput = /* @__PURE__ */ forwardRef16(({ density: propsDensity, elevation:
1332
1486
  const { tx } = useThemeContext();
1333
1487
  const density = useDensityContext(propsDensity);
1334
1488
  const elevation = useElevationContext(propsElevation);
1335
- const segmentClassName = useCallback2(({ focused, validationValence }) => tx("input.input", "input--pin-segment", {
1489
+ const segmentClassName = useCallback3(({ focused, validationValence }) => tx("input.input", "input--pin-segment", {
1336
1490
  variant: "static",
1337
1491
  focused,
1338
1492
  disabled: props.disabled,
@@ -1346,7 +1500,7 @@ var PinInput = /* @__PURE__ */ forwardRef16(({ density: propsDensity, elevation:
1346
1500
  propsElevation,
1347
1501
  density
1348
1502
  ]);
1349
- return /* @__PURE__ */ React18.createElement(PinInputPrimitive, {
1503
+ return /* @__PURE__ */ React22.createElement(PinInputPrimitive, {
1350
1504
  ...props,
1351
1505
  segmentClassName,
1352
1506
  ...props.autoFocus && !hasIosKeyboard2 && {
@@ -1365,7 +1519,7 @@ var TextInput = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, densit
1365
1519
  const elevation = useElevationContext(propsElevation);
1366
1520
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
1367
1521
  const { tx } = themeContextValue;
1368
- return /* @__PURE__ */ React18.createElement(TextInputPrimitive, {
1522
+ return /* @__PURE__ */ React22.createElement(TextInputPrimitive, {
1369
1523
  ...props,
1370
1524
  className: tx("input.input", "input", {
1371
1525
  variant,
@@ -1386,7 +1540,7 @@ var TextArea = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density
1386
1540
  const density = useDensityContext(propsDensity);
1387
1541
  const elevation = useElevationContext(propsElevation);
1388
1542
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
1389
- return /* @__PURE__ */ React18.createElement(TextAreaPrimitive, {
1543
+ return /* @__PURE__ */ React22.createElement(TextAreaPrimitive, {
1390
1544
  ...props,
1391
1545
  className: tx("input.input", "input--text-area", {
1392
1546
  variant,
@@ -1410,7 +1564,7 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
1410
1564
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
1411
1565
  const { tx } = useThemeContext();
1412
1566
  const Icon3 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
1413
- return /* @__PURE__ */ React18.createElement(CheckboxPrimitive, {
1567
+ return /* @__PURE__ */ React22.createElement(CheckboxPrimitive, {
1414
1568
  ...props,
1415
1569
  checked,
1416
1570
  onCheckedChange,
@@ -1424,9 +1578,9 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
1424
1578
  size
1425
1579
  }, "shrink-0", classNames),
1426
1580
  ref: forwardedRef
1427
- }, /* @__PURE__ */ React18.createElement(CheckboxIndicatorPrimitive, {
1581
+ }, /* @__PURE__ */ React22.createElement(CheckboxIndicatorPrimitive, {
1428
1582
  asChild: true
1429
- }, /* @__PURE__ */ React18.createElement(Icon3, checked && {
1583
+ }, /* @__PURE__ */ React22.createElement(Icon3, checked && {
1430
1584
  weight,
1431
1585
  className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
1432
1586
  size
@@ -1441,7 +1595,7 @@ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked
1441
1595
  onChange: propsOnCheckedChange
1442
1596
  });
1443
1597
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
1444
- return /* @__PURE__ */ React18.createElement(SwitchPrimitive, {
1598
+ return /* @__PURE__ */ React22.createElement(SwitchPrimitive, {
1445
1599
  ...props,
1446
1600
  checked,
1447
1601
  onCheckedChange,
@@ -1455,7 +1609,7 @@ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked
1455
1609
  size
1456
1610
  }, classNames),
1457
1611
  ref: forwardedRef
1458
- }, /* @__PURE__ */ React18.createElement(SwitchThumbPrimitive, {
1612
+ }, /* @__PURE__ */ React22.createElement(SwitchThumbPrimitive, {
1459
1613
  className: tx("input.switchThumb", "input--switch__thumb", {
1460
1614
  size
1461
1615
  })
@@ -1477,27 +1631,14 @@ var Input = {
1477
1631
  // packages/ui/react-ui/src/components/Lists/List.tsx
1478
1632
  import { CaretDown, CaretRight } from "@phosphor-icons/react";
1479
1633
  import { Slot as Slot8 } from "@radix-ui/react-slot";
1480
- import React20, { forwardRef as forwardRef17 } from "react";
1634
+ import React23, { forwardRef as forwardRef17 } from "react";
1481
1635
  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";
1482
-
1483
- // packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
1484
- import React19, { createContext as createContext7 } from "react";
1485
- var DensityContext = /* @__PURE__ */ createContext7({
1486
- density: "fine"
1487
- });
1488
- var DensityProvider = ({ density, children }) => /* @__PURE__ */ React19.createElement(DensityContext.Provider, {
1489
- value: {
1490
- density
1491
- }
1492
- }, children);
1493
-
1494
- // packages/ui/react-ui/src/components/Lists/List.tsx
1495
1636
  var List = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
1496
1637
  const { tx } = useThemeContext();
1497
1638
  const density = useDensityContext(props.density);
1498
- return /* @__PURE__ */ React20.createElement(DensityProvider, {
1639
+ return /* @__PURE__ */ React23.createElement(DensityProvider, {
1499
1640
  density
1500
- }, /* @__PURE__ */ React20.createElement(ListPrimitive, {
1641
+ }, /* @__PURE__ */ React23.createElement(ListPrimitive, {
1501
1642
  ...props,
1502
1643
  className: tx("list.root", "list", {}, classNames),
1503
1644
  ref: forwardedRef
@@ -1507,7 +1648,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
1507
1648
  const Root5 = asChild ? Slot8 : "div";
1508
1649
  const density = useDensityContext();
1509
1650
  const { tx } = useThemeContext();
1510
- return /* @__PURE__ */ React20.createElement(Root5, {
1651
+ return /* @__PURE__ */ React23.createElement(Root5, {
1511
1652
  ...!asChild && {
1512
1653
  role: "none"
1513
1654
  },
@@ -1521,7 +1662,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
1521
1662
  var MockListItemOpenTrigger = ({ classNames, ...props }) => {
1522
1663
  const density = useDensityContext();
1523
1664
  const { tx } = useThemeContext();
1524
- return /* @__PURE__ */ React20.createElement("div", {
1665
+ return /* @__PURE__ */ React23.createElement("div", {
1525
1666
  role: "none",
1526
1667
  ...props,
1527
1668
  className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
@@ -1532,7 +1673,7 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
1532
1673
  var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
1533
1674
  const { tx } = useThemeContext();
1534
1675
  const density = useDensityContext();
1535
- return /* @__PURE__ */ React20.createElement(ListPrimitiveItemHeading, {
1676
+ return /* @__PURE__ */ React23.createElement(ListPrimitiveItemHeading, {
1536
1677
  ...props,
1537
1678
  className: tx("list.item.heading", "list__listItem__heading", {
1538
1679
  density
@@ -1545,13 +1686,13 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
1545
1686
  const density = useDensityContext();
1546
1687
  const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
1547
1688
  const Icon3 = open ? CaretDown : CaretRight;
1548
- return /* @__PURE__ */ React20.createElement(ListPrimitiveItemOpenTrigger, {
1689
+ return /* @__PURE__ */ React23.createElement(ListPrimitiveItemOpenTrigger, {
1549
1690
  ...props,
1550
1691
  className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
1551
1692
  density
1552
1693
  }, classNames),
1553
1694
  ref: forwardedRef
1554
- }, children || /* @__PURE__ */ React20.createElement(Icon3, {
1695
+ }, children || /* @__PURE__ */ React23.createElement(Icon3, {
1555
1696
  weight: "bold",
1556
1697
  className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
1557
1698
  }));
@@ -1559,7 +1700,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
1559
1700
  var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
1560
1701
  const { tx } = useThemeContext();
1561
1702
  const density = useDensityContext();
1562
- return /* @__PURE__ */ React20.createElement(ListPrimitiveItem, {
1703
+ return /* @__PURE__ */ React23.createElement(ListPrimitiveItem, {
1563
1704
  ...props,
1564
1705
  className: tx("list.item.root", "list__listItem", {
1565
1706
  density,
@@ -1578,23 +1719,23 @@ var ListItem = {
1578
1719
  };
1579
1720
 
1580
1721
  // packages/ui/react-ui/src/components/Lists/Tree.tsx
1581
- import React21, { forwardRef as forwardRef18 } from "react";
1722
+ import React24, { forwardRef as forwardRef18 } from "react";
1582
1723
  var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
1583
- return /* @__PURE__ */ React21.createElement(List, {
1724
+ return /* @__PURE__ */ React24.createElement(List, {
1584
1725
  ...props,
1585
1726
  ref: forwardedRef
1586
1727
  });
1587
1728
  });
1588
1729
  var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
1589
1730
  const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
1590
- return /* @__PURE__ */ React21.createElement(List, {
1731
+ return /* @__PURE__ */ React24.createElement(List, {
1591
1732
  ...props,
1592
1733
  "aria-labelledby": headingId,
1593
1734
  ref: forwardedRef
1594
1735
  });
1595
1736
  });
1596
1737
  var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
1597
- return /* @__PURE__ */ React21.createElement(ListItem.Root, {
1738
+ return /* @__PURE__ */ React24.createElement(ListItem.Root, {
1598
1739
  role: "treeitem",
1599
1740
  ...props,
1600
1741
  ref: forwardedRef
@@ -1622,7 +1763,7 @@ import { createContextScope as createContextScope2 } from "@radix-ui/react-conte
1622
1763
  import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
1623
1764
  import { Slot as Slot9 } from "@radix-ui/react-slot";
1624
1765
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
1625
- import React22, { forwardRef as forwardRef19 } from "react";
1766
+ import React25, { forwardRef as forwardRef19 } from "react";
1626
1767
  var TREEGRID_ROW_NAME = "TreegridRow";
1627
1768
  var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
1628
1769
  var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
@@ -1636,7 +1777,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef19(({ asChild, classNames, children
1636
1777
  tabbable: false,
1637
1778
  circular: true
1638
1779
  });
1639
- return /* @__PURE__ */ React22.createElement(Root5, {
1780
+ return /* @__PURE__ */ React25.createElement(Root5, {
1640
1781
  role: "treegrid",
1641
1782
  ...arrowNavigationAttrs,
1642
1783
  ...props,
@@ -1667,11 +1808,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
1667
1808
  circular: false,
1668
1809
  memorizeCurrent: false
1669
1810
  });
1670
- return /* @__PURE__ */ React22.createElement(TreegridRowProvider, {
1811
+ return /* @__PURE__ */ React25.createElement(TreegridRowProvider, {
1671
1812
  open,
1672
1813
  onOpenChange,
1673
1814
  scope: __treegridRowScope
1674
- }, /* @__PURE__ */ React22.createElement(Root5, {
1815
+ }, /* @__PURE__ */ React25.createElement(Root5, {
1675
1816
  role: "row",
1676
1817
  "aria-level": level,
1677
1818
  className: tx("treegrid.row", "treegrid__row", {
@@ -1686,7 +1827,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
1686
1827
  ...props,
1687
1828
  id,
1688
1829
  ref: forwardedRef
1689
- }, /* @__PURE__ */ React22.createElement("div", {
1830
+ }, /* @__PURE__ */ React25.createElement("div", {
1690
1831
  role: "none",
1691
1832
  className: "contents",
1692
1833
  ...arrowGroupAttrs
@@ -1694,7 +1835,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
1694
1835
  });
1695
1836
  var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
1696
1837
  const { tx } = useThemeContext();
1697
- return /* @__PURE__ */ React22.createElement("div", {
1838
+ return /* @__PURE__ */ React25.createElement("div", {
1698
1839
  role: "gridcell",
1699
1840
  className: tx("treegrid.cell", "treegrid__cell", {
1700
1841
  indent
@@ -1716,17 +1857,17 @@ var Treegrid = {
1716
1857
  // packages/ui/react-ui/src/components/Main/Main.tsx
1717
1858
  import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
1718
1859
  import { useComposedRefs } from "@radix-ui/react-compose-refs";
1719
- import { createContext as createContext8 } from "@radix-ui/react-context";
1860
+ import { createContext as createContext10 } from "@radix-ui/react-context";
1720
1861
  import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/react-dialog";
1721
1862
  import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
1722
1863
  import { Slot as Slot10 } from "@radix-ui/react-slot";
1723
1864
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
1724
- import React23, { forwardRef as forwardRef20, useCallback as useCallback4, useEffect as useEffect5, useRef as useRef2, useState as useState4 } from "react";
1865
+ import React26, { forwardRef as forwardRef20, useCallback as useCallback5, useEffect as useEffect6, useRef as useRef2, useState as useState6 } from "react";
1725
1866
  import { log } from "@dxos/log";
1726
1867
  import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
1727
1868
 
1728
1869
  // packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
1729
- import { useCallback as useCallback3, useEffect as useEffect4, useState as useState3 } from "react";
1870
+ import { useCallback as useCallback4, useEffect as useEffect5, useState as useState5 } from "react";
1730
1871
  var MotionState;
1731
1872
  (function(MotionState2) {
1732
1873
  MotionState2[MotionState2["IDLE"] = 0] = "IDLE";
@@ -1741,22 +1882,22 @@ var useSwipeToDismiss = (ref, {
1741
1882
  /* side = 'inline-start' */
1742
1883
  }) => {
1743
1884
  const $root = ref.current;
1744
- const [motionState, setMotionState] = useState3(0);
1745
- const [gestureStartX, setGestureStartX] = useState3(0);
1746
- const setIdle = useCallback3(() => {
1885
+ const [motionState, setMotionState] = useState5(0);
1886
+ const [gestureStartX, setGestureStartX] = useState5(0);
1887
+ const setIdle = useCallback4(() => {
1747
1888
  setMotionState(0);
1748
1889
  $root?.style.removeProperty("inset-inline-start");
1749
1890
  $root?.style.setProperty("transition-duration", "200ms");
1750
1891
  }, [
1751
1892
  $root
1752
1893
  ]);
1753
- const setFollowing = useCallback3(() => {
1894
+ const setFollowing = useCallback4(() => {
1754
1895
  setMotionState(2);
1755
1896
  $root?.style.setProperty("transition-duration", "0ms");
1756
1897
  }, [
1757
1898
  $root
1758
1899
  ]);
1759
- const handlePointerDown = useCallback3(({ screenX }) => {
1900
+ const handlePointerDown = useCallback4(({ screenX }) => {
1760
1901
  if (motionState === 0) {
1761
1902
  setMotionState(1);
1762
1903
  setGestureStartX(screenX);
@@ -1764,7 +1905,7 @@ var useSwipeToDismiss = (ref, {
1764
1905
  }, [
1765
1906
  motionState
1766
1907
  ]);
1767
- const handlePointerMove = useCallback3(({ screenX }) => {
1908
+ const handlePointerMove = useCallback4(({ screenX }) => {
1768
1909
  if ($root) {
1769
1910
  const delta = Math.min(screenX - gestureStartX, 0);
1770
1911
  switch (motionState) {
@@ -1788,12 +1929,12 @@ var useSwipeToDismiss = (ref, {
1788
1929
  motionState,
1789
1930
  gestureStartX
1790
1931
  ]);
1791
- const handlePointerUp = useCallback3(() => {
1932
+ const handlePointerUp = useCallback4(() => {
1792
1933
  setIdle();
1793
1934
  }, [
1794
1935
  setIdle
1795
1936
  ]);
1796
- useEffect4(() => {
1937
+ useEffect5(() => {
1797
1938
  $root?.addEventListener("pointerdown", handlePointerDown);
1798
1939
  return () => {
1799
1940
  $root?.removeEventListener("pointerdown", handlePointerDown);
@@ -1802,7 +1943,7 @@ var useSwipeToDismiss = (ref, {
1802
1943
  $root,
1803
1944
  handlePointerDown
1804
1945
  ]);
1805
- useEffect4(() => {
1946
+ useEffect5(() => {
1806
1947
  $root && document.documentElement.addEventListener("pointermove", handlePointerMove);
1807
1948
  return () => {
1808
1949
  document.documentElement.removeEventListener("pointermove", handlePointerMove);
@@ -1811,7 +1952,7 @@ var useSwipeToDismiss = (ref, {
1811
1952
  $root,
1812
1953
  handlePointerMove
1813
1954
  ]);
1814
- useEffect4(() => {
1955
+ useEffect5(() => {
1815
1956
  $root && document.documentElement.addEventListener("pointerup", handlePointerUp);
1816
1957
  return () => {
1817
1958
  document.documentElement.removeEventListener("pointerup", handlePointerUp);
@@ -1831,7 +1972,7 @@ var MAIN_NAME = "Main";
1831
1972
  var GENERIC_CONSUMER_NAME = "GenericConsumer";
1832
1973
  var landmarkAttr = "data-main-landmark";
1833
1974
  var useLandmarkMover = (propsOnKeyDown, landmark) => {
1834
- const handleKeyDown = useCallback4((event) => {
1975
+ const handleKeyDown = useCallback5((event) => {
1835
1976
  const target = event.target;
1836
1977
  if (event.target === event.currentTarget && event.key === "Tab" && target.hasAttribute(landmarkAttr)) {
1837
1978
  event.preventDefault();
@@ -1858,7 +1999,7 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
1858
1999
  ...focusableAttrs
1859
2000
  };
1860
2001
  };
1861
- var [MainProvider, useMainContext] = createContext8(MAIN_NAME, {
2002
+ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
1862
2003
  resizing: false,
1863
2004
  navigationSidebarOpen: false,
1864
2005
  setNavigationSidebarOpen: (nextOpen) => {
@@ -1884,26 +2025,26 @@ var useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {
1884
2025
  return {
1885
2026
  navigationSidebarOpen,
1886
2027
  setNavigationSidebarOpen,
1887
- toggleNavigationSidebar: useCallback4(() => setNavigationSidebarOpen(!navigationSidebarOpen), [
2028
+ toggleNavigationSidebar: useCallback5(() => setNavigationSidebarOpen(!navigationSidebarOpen), [
1888
2029
  navigationSidebarOpen,
1889
2030
  setNavigationSidebarOpen
1890
2031
  ]),
1891
- openNavigationSidebar: useCallback4(() => setNavigationSidebarOpen(true), [
2032
+ openNavigationSidebar: useCallback5(() => setNavigationSidebarOpen(true), [
1892
2033
  setNavigationSidebarOpen
1893
2034
  ]),
1894
- closeNavigationSidebar: useCallback4(() => setNavigationSidebarOpen(false), [
2035
+ closeNavigationSidebar: useCallback5(() => setNavigationSidebarOpen(false), [
1895
2036
  setNavigationSidebarOpen
1896
2037
  ]),
1897
2038
  complementarySidebarOpen,
1898
2039
  setComplementarySidebarOpen,
1899
- toggleComplementarySidebar: useCallback4(() => setComplementarySidebarOpen(!complementarySidebarOpen), [
2040
+ toggleComplementarySidebar: useCallback5(() => setComplementarySidebarOpen(!complementarySidebarOpen), [
1900
2041
  complementarySidebarOpen,
1901
2042
  setComplementarySidebarOpen
1902
2043
  ]),
1903
- openComplementarySidebar: useCallback4(() => setComplementarySidebarOpen(true), [
2044
+ openComplementarySidebar: useCallback5(() => setComplementarySidebarOpen(true), [
1904
2045
  setComplementarySidebarOpen
1905
2046
  ]),
1906
- closeComplementarySidebar: useCallback4(() => setComplementarySidebarOpen(false), [
2047
+ closeComplementarySidebar: useCallback5(() => setComplementarySidebarOpen(false), [
1907
2048
  setComplementarySidebarOpen
1908
2049
  ])
1909
2050
  };
@@ -1923,9 +2064,9 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
1923
2064
  defaultProp: defaultComplementarySidebarOpen,
1924
2065
  onChange: onComplementarySidebarOpenChange
1925
2066
  });
1926
- const [resizing, setResizing] = useState4(false);
2067
+ const [resizing, setResizing] = useState6(false);
1927
2068
  const resizeInterval = useRef2(null);
1928
- const handleResize = useCallback4(() => {
2069
+ const handleResize = useCallback5(() => {
1929
2070
  setResizing(true);
1930
2071
  if (resizeInterval.current) {
1931
2072
  clearTimeout(resizeInterval.current);
@@ -1935,13 +2076,13 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
1935
2076
  resizeInterval.current = null;
1936
2077
  }, resizeDebounce);
1937
2078
  }, []);
1938
- useEffect5(() => {
2079
+ useEffect6(() => {
1939
2080
  window.addEventListener("resize", handleResize);
1940
2081
  return () => window.removeEventListener("resize", handleResize);
1941
2082
  }, [
1942
2083
  handleResize
1943
2084
  ]);
1944
- return /* @__PURE__ */ React23.createElement(MainProvider, {
2085
+ return /* @__PURE__ */ React26.createElement(MainProvider, {
1945
2086
  ...props,
1946
2087
  navigationSidebarOpen,
1947
2088
  setNavigationSidebarOpen,
@@ -1964,7 +2105,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
1964
2105
  useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
1965
2106
  onDismiss: () => setOpen(false)
1966
2107
  });
1967
- const handleKeyDown = useCallback4((event) => {
2108
+ const handleKeyDown = useCallback5((event) => {
1968
2109
  if (event.key === "Escape") {
1969
2110
  event.target.closest("[data-tabster]")?.focus();
1970
2111
  }
@@ -1973,10 +2114,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
1973
2114
  props.onKeyDown
1974
2115
  ]);
1975
2116
  const Root5 = isLg ? Primitive9.div : DialogContent2;
1976
- return /* @__PURE__ */ React23.createElement(DialogRoot2, {
2117
+ return /* @__PURE__ */ React26.createElement(DialogRoot2, {
1977
2118
  open,
1978
2119
  modal: false
1979
- }, /* @__PURE__ */ React23.createElement(Root5, {
2120
+ }, /* @__PURE__ */ React26.createElement(Root5, {
1980
2121
  ...!isLg && {
1981
2122
  forceMount: true,
1982
2123
  tabIndex: -1,
@@ -1992,14 +2133,14 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
1992
2133
  inert: "true"
1993
2134
  },
1994
2135
  ref
1995
- }, /* @__PURE__ */ React23.createElement(ElevationProvider, {
2136
+ }, /* @__PURE__ */ React26.createElement(ElevationProvider, {
1996
2137
  elevation: "group"
1997
2138
  }, children)));
1998
2139
  });
1999
2140
  var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2000
2141
  const { navigationSidebarOpen, setNavigationSidebarOpen, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
2001
2142
  const mover = useLandmarkMover(props.onKeyDown, "0");
2002
- return /* @__PURE__ */ React23.createElement(MainSidebar, {
2143
+ return /* @__PURE__ */ React26.createElement(MainSidebar, {
2003
2144
  ...mover,
2004
2145
  ...props,
2005
2146
  open: navigationSidebarOpen,
@@ -2013,7 +2154,7 @@ MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
2013
2154
  var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2014
2155
  const { complementarySidebarOpen, setComplementarySidebarOpen, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
2015
2156
  const mover = useLandmarkMover(props.onKeyDown, "2");
2016
- return /* @__PURE__ */ React23.createElement(MainSidebar, {
2157
+ return /* @__PURE__ */ React26.createElement(MainSidebar, {
2017
2158
  ...mover,
2018
2159
  ...props,
2019
2160
  open: complementarySidebarOpen,
@@ -2029,7 +2170,7 @@ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, h
2029
2170
  const { tx } = useThemeContext();
2030
2171
  const Root5 = asChild ? Slot10 : role ? "div" : "main";
2031
2172
  const mover = useLandmarkMover(props.onKeyDown, "1");
2032
- return /* @__PURE__ */ React23.createElement(Root5, {
2173
+ return /* @__PURE__ */ React26.createElement(Root5, {
2033
2174
  role,
2034
2175
  ...handlesFocus && {
2035
2176
  ...mover
@@ -2051,7 +2192,7 @@ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwar
2051
2192
  });
2052
2193
  const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
2053
2194
  const { tx } = useThemeContext();
2054
- return /* @__PURE__ */ React23.createElement("div", {
2195
+ return /* @__PURE__ */ React26.createElement("div", {
2055
2196
  onClick: () => {
2056
2197
  setNavigationSidebarOpen(false);
2057
2198
  setComplementarySidebarOpen(false);
@@ -2072,7 +2213,7 @@ var MainNotch = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwarde
2072
2213
  const { navigationSidebarOpen } = useMainContext(MAIN_NAME);
2073
2214
  const notchElement = useRef2(null);
2074
2215
  const ref = useComposedRefs(forwardedRef, notchElement);
2075
- const handleKeyDown = useCallback4((event) => {
2216
+ const handleKeyDown = useCallback5((event) => {
2076
2217
  switch (event.key) {
2077
2218
  case "Escape":
2078
2219
  props?.onKeyDown?.(event);
@@ -2082,7 +2223,7 @@ var MainNotch = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwarde
2082
2223
  props?.onKeyDown
2083
2224
  ]);
2084
2225
  const mover = useLandmarkMover(handleKeyDown, "3");
2085
- return /* @__PURE__ */ React23.createElement("div", {
2226
+ return /* @__PURE__ */ React26.createElement("div", {
2086
2227
  role: "toolbar",
2087
2228
  ...mover,
2088
2229
  ...props,
@@ -2101,23 +2242,23 @@ var Main = {
2101
2242
  };
2102
2243
 
2103
2244
  // packages/ui/react-ui/src/components/Message/Message.tsx
2104
- import { createContext as createContext9 } from "@radix-ui/react-context";
2245
+ import { createContext as createContext11 } from "@radix-ui/react-context";
2105
2246
  import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
2106
2247
  import { Slot as Slot11 } from "@radix-ui/react-slot";
2107
- import React24, { forwardRef as forwardRef21 } from "react";
2248
+ import React27, { forwardRef as forwardRef21 } from "react";
2108
2249
  import { useId as useId4 } from "@dxos/react-hooks";
2109
2250
  var MESSAGE_NAME = "Message";
2110
- var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
2251
+ var [MessageProvider, useMessageContext] = createContext11(MESSAGE_NAME);
2111
2252
  var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
2112
2253
  const { tx } = useThemeContext();
2113
2254
  const titleId = useId4("message__title", propsTitleId);
2114
2255
  const descriptionId = useId4("message__description", propsDescriptionId);
2115
2256
  const elevation = useElevationContext(propsElevation);
2116
2257
  const Root5 = asChild ? Slot11 : Primitive10.div;
2117
- return /* @__PURE__ */ React24.createElement(MessageProvider, {
2258
+ return /* @__PURE__ */ React27.createElement(MessageProvider, {
2118
2259
  titleId,
2119
2260
  descriptionId
2120
- }, /* @__PURE__ */ React24.createElement(Root5, {
2261
+ }, /* @__PURE__ */ React27.createElement(Root5, {
2121
2262
  ...props,
2122
2263
  className: tx("message.root", "message", {
2123
2264
  valence,
@@ -2134,7 +2275,7 @@ var MessageTitle = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
2134
2275
  const { tx } = useThemeContext();
2135
2276
  const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
2136
2277
  const Root5 = asChild ? Slot11 : Primitive10.h2;
2137
- return /* @__PURE__ */ React24.createElement(Root5, {
2278
+ return /* @__PURE__ */ React27.createElement(Root5, {
2138
2279
  ...props,
2139
2280
  className: tx("message.title", "message__title", {}, className),
2140
2281
  id: titleId,
@@ -2147,7 +2288,7 @@ var MessageBody = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
2147
2288
  const { tx } = useThemeContext();
2148
2289
  const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
2149
2290
  const Root5 = asChild ? Slot11 : Primitive10.p;
2150
- return /* @__PURE__ */ React24.createElement(Root5, {
2291
+ return /* @__PURE__ */ React27.createElement(Root5, {
2151
2292
  ...props,
2152
2293
  className: tx("message.body", "message__body", {}, className),
2153
2294
  id: descriptionId,
@@ -2177,7 +2318,7 @@ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
2177
2318
  import { Slot as Slot12 } from "@radix-ui/react-slot";
2178
2319
  import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
2179
2320
  import { hideOthers } from "aria-hidden";
2180
- import React25, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback5, useState as useState5, useEffect as useEffect6 } from "react";
2321
+ import React28, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback6, useState as useState7, useEffect as useEffect7 } from "react";
2181
2322
  import { RemoveScroll } from "react-remove-scroll";
2182
2323
  var POPOVER_NAME = "Popover";
2183
2324
  var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
@@ -2189,24 +2330,24 @@ var PopoverRoot = (props) => {
2189
2330
  const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
2190
2331
  const popperScope = usePopperScope(__scopePopover);
2191
2332
  const triggerRef = useRef3(null);
2192
- const [hasCustomAnchor, setHasCustomAnchor] = useState5(false);
2333
+ const [hasCustomAnchor, setHasCustomAnchor] = useState7(false);
2193
2334
  const [open = false, setOpen] = useControllableState5({
2194
2335
  prop: openProp,
2195
2336
  defaultProp: defaultOpen,
2196
2337
  onChange: onOpenChange
2197
2338
  });
2198
- return /* @__PURE__ */ React25.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React25.createElement(PopoverProvider, {
2339
+ return /* @__PURE__ */ React28.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React28.createElement(PopoverProvider, {
2199
2340
  scope: __scopePopover,
2200
2341
  contentId: useId5(),
2201
2342
  triggerRef,
2202
2343
  open,
2203
2344
  onOpenChange: setOpen,
2204
- onOpenToggle: useCallback5(() => setOpen((prevOpen) => !prevOpen), [
2345
+ onOpenToggle: useCallback6(() => setOpen((prevOpen) => !prevOpen), [
2205
2346
  setOpen
2206
2347
  ]),
2207
2348
  hasCustomAnchor,
2208
- onCustomAnchorAdd: useCallback5(() => setHasCustomAnchor(true), []),
2209
- onCustomAnchorRemove: useCallback5(() => setHasCustomAnchor(false), []),
2349
+ onCustomAnchorAdd: useCallback6(() => setHasCustomAnchor(true), []),
2350
+ onCustomAnchorRemove: useCallback6(() => setHasCustomAnchor(false), []),
2210
2351
  modal
2211
2352
  }, children));
2212
2353
  };
@@ -2217,14 +2358,14 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2217
2358
  const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
2218
2359
  const popperScope = usePopperScope(__scopePopover);
2219
2360
  const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
2220
- useEffect6(() => {
2361
+ useEffect7(() => {
2221
2362
  onCustomAnchorAdd();
2222
2363
  return () => onCustomAnchorRemove();
2223
2364
  }, [
2224
2365
  onCustomAnchorAdd,
2225
2366
  onCustomAnchorRemove
2226
2367
  ]);
2227
- return /* @__PURE__ */ React25.createElement(PopperPrimitive.Anchor, {
2368
+ return /* @__PURE__ */ React28.createElement(PopperPrimitive.Anchor, {
2228
2369
  ...popperScope,
2229
2370
  ...anchorProps,
2230
2371
  ref: forwardedRef
@@ -2237,7 +2378,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2237
2378
  const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
2238
2379
  const popperScope = usePopperScope(__scopePopover);
2239
2380
  const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
2240
- const trigger = /* @__PURE__ */ React25.createElement(Primitive11.button, {
2381
+ const trigger = /* @__PURE__ */ React28.createElement(Primitive11.button, {
2241
2382
  type: "button",
2242
2383
  "aria-haspopup": "dialog",
2243
2384
  "aria-expanded": context.open,
@@ -2247,7 +2388,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2247
2388
  ref: composedTriggerRef,
2248
2389
  onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
2249
2390
  });
2250
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React25.createElement(PopperPrimitive.Anchor, {
2391
+ return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React28.createElement(PopperPrimitive.Anchor, {
2251
2392
  asChild: true,
2252
2393
  ...popperScope
2253
2394
  }, trigger);
@@ -2258,12 +2399,12 @@ var PopoverVirtualTrigger = (props) => {
2258
2399
  const { __scopePopover, virtualRef } = props;
2259
2400
  const context = usePopoverContext(VIRTUAL_TRIGGER_NAME2, __scopePopover);
2260
2401
  const popperScope = usePopperScope(__scopePopover);
2261
- useEffect6(() => {
2402
+ useEffect7(() => {
2262
2403
  if (virtualRef.current) {
2263
2404
  context.triggerRef.current = virtualRef.current;
2264
2405
  }
2265
2406
  });
2266
- return /* @__PURE__ */ React25.createElement(PopperPrimitive.Anchor, {
2407
+ return /* @__PURE__ */ React28.createElement(PopperPrimitive.Anchor, {
2267
2408
  ...popperScope,
2268
2409
  virtualRef
2269
2410
  });
@@ -2276,12 +2417,12 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
2276
2417
  var PopoverPortal = (props) => {
2277
2418
  const { __scopePopover, forceMount, children, container } = props;
2278
2419
  const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
2279
- return /* @__PURE__ */ React25.createElement(PortalProvider, {
2420
+ return /* @__PURE__ */ React28.createElement(PortalProvider, {
2280
2421
  scope: __scopePopover,
2281
2422
  forceMount
2282
- }, /* @__PURE__ */ React25.createElement(Presence, {
2423
+ }, /* @__PURE__ */ React28.createElement(Presence, {
2283
2424
  present: forceMount || context.open
2284
- }, /* @__PURE__ */ React25.createElement(PortalPrimitive, {
2425
+ }, /* @__PURE__ */ React28.createElement(PortalPrimitive, {
2285
2426
  asChild: true,
2286
2427
  container
2287
2428
  }, children)));
@@ -2292,12 +2433,12 @@ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2292
2433
  const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
2293
2434
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
2294
2435
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
2295
- return /* @__PURE__ */ React25.createElement(Presence, {
2436
+ return /* @__PURE__ */ React28.createElement(Presence, {
2296
2437
  present: forceMount || context.open
2297
- }, context.modal ? /* @__PURE__ */ React25.createElement(PopoverContentModal, {
2438
+ }, context.modal ? /* @__PURE__ */ React28.createElement(PopoverContentModal, {
2298
2439
  ...contentProps,
2299
2440
  ref: forwardedRef
2300
- }) : /* @__PURE__ */ React25.createElement(PopoverContentNonModal, {
2441
+ }) : /* @__PURE__ */ React28.createElement(PopoverContentNonModal, {
2301
2442
  ...contentProps,
2302
2443
  ref: forwardedRef
2303
2444
  }));
@@ -2308,16 +2449,16 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) =>
2308
2449
  const contentRef = useRef3(null);
2309
2450
  const composedRefs = useComposedRefs2(forwardedRef, contentRef);
2310
2451
  const isRightClickOutsideRef = useRef3(false);
2311
- useEffect6(() => {
2452
+ useEffect7(() => {
2312
2453
  const content = contentRef.current;
2313
2454
  if (content) {
2314
2455
  return hideOthers(content);
2315
2456
  }
2316
2457
  }, []);
2317
- return /* @__PURE__ */ React25.createElement(RemoveScroll, {
2458
+ return /* @__PURE__ */ React28.createElement(RemoveScroll, {
2318
2459
  as: Slot12,
2319
2460
  allowPinchZoom: true
2320
- }, /* @__PURE__ */ React25.createElement(PopoverContentImpl, {
2461
+ }, /* @__PURE__ */ React28.createElement(PopoverContentImpl, {
2321
2462
  ...props,
2322
2463
  ref: composedRefs,
2323
2464
  // we make sure we're not trapping once it's been closed
@@ -2349,7 +2490,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef)
2349
2490
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
2350
2491
  const hasInteractedOutsideRef = useRef3(false);
2351
2492
  const hasPointerDownOutsideRef = useRef3(false);
2352
- return /* @__PURE__ */ React25.createElement(PopoverContentImpl, {
2493
+ return /* @__PURE__ */ React28.createElement(PopoverContentImpl, {
2353
2494
  ...props,
2354
2495
  ref: forwardedRef,
2355
2496
  trapFocus: false,
@@ -2390,13 +2531,13 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2390
2531
  const popperScope = usePopperScope(__scopePopover);
2391
2532
  const { tx } = useThemeContext();
2392
2533
  useFocusGuards();
2393
- return /* @__PURE__ */ React25.createElement(FocusScope, {
2534
+ return /* @__PURE__ */ React28.createElement(FocusScope, {
2394
2535
  asChild: true,
2395
2536
  loop: true,
2396
2537
  trapped: trapFocus,
2397
2538
  onMountAutoFocus: onOpenAutoFocus,
2398
2539
  onUnmountAutoFocus: onCloseAutoFocus
2399
- }, /* @__PURE__ */ React25.createElement(DismissableLayer, {
2540
+ }, /* @__PURE__ */ React28.createElement(DismissableLayer, {
2400
2541
  asChild: true,
2401
2542
  disableOutsidePointerEvents,
2402
2543
  onInteractOutside,
@@ -2404,7 +2545,7 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2404
2545
  onPointerDownOutside,
2405
2546
  onFocusOutside,
2406
2547
  onDismiss: () => context.onOpenChange(false)
2407
- }, /* @__PURE__ */ React25.createElement(PopperPrimitive.Content, {
2548
+ }, /* @__PURE__ */ React28.createElement(PopperPrimitive.Content, {
2408
2549
  "data-state": getState(context.open),
2409
2550
  role: "dialog",
2410
2551
  id: context.contentId,
@@ -2429,7 +2570,7 @@ var CLOSE_NAME = "PopoverClose";
2429
2570
  var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2430
2571
  const { __scopePopover, ...closeProps } = props;
2431
2572
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
2432
- return /* @__PURE__ */ React25.createElement(Primitive11.button, {
2573
+ return /* @__PURE__ */ React28.createElement(Primitive11.button, {
2433
2574
  type: "button",
2434
2575
  ...closeProps,
2435
2576
  ref: forwardedRef,
@@ -2442,7 +2583,7 @@ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
2442
2583
  const { __scopePopover, classNames, ...arrowProps } = props;
2443
2584
  const popperScope = usePopperScope(__scopePopover);
2444
2585
  const { tx } = useThemeContext();
2445
- return /* @__PURE__ */ React25.createElement(PopperPrimitive.Arrow, {
2586
+ return /* @__PURE__ */ React28.createElement(PopperPrimitive.Arrow, {
2446
2587
  ...popperScope,
2447
2588
  ...arrowProps,
2448
2589
  className: tx("popover.arrow", "popover__arrow", {}, classNames),
@@ -2453,7 +2594,7 @@ PopoverArrow.displayName = ARROW_NAME2;
2453
2594
  var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
2454
2595
  const { tx } = useThemeContext();
2455
2596
  const Root5 = asChild ? Slot12 : Primitive11.div;
2456
- return /* @__PURE__ */ React25.createElement(Root5, {
2597
+ return /* @__PURE__ */ React28.createElement(Root5, {
2457
2598
  ...props,
2458
2599
  className: tx("popover.viewport", "popover__viewport", {
2459
2600
  constrainInline,
@@ -2476,10 +2617,10 @@ var Popover = {
2476
2617
  };
2477
2618
 
2478
2619
  // packages/ui/react-ui/src/components/Status/Status.tsx
2479
- import React26, { forwardRef as forwardRef23 } from "react";
2620
+ import React29, { forwardRef as forwardRef23 } from "react";
2480
2621
  var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
2481
2622
  const { tx } = useThemeContext();
2482
- return /* @__PURE__ */ React26.createElement("span", {
2623
+ return /* @__PURE__ */ React29.createElement("span", {
2483
2624
  role: "status",
2484
2625
  ...props,
2485
2626
  className: tx("status.root", "status", {
@@ -2487,7 +2628,7 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
2487
2628
  variant
2488
2629
  }, classNames),
2489
2630
  ref: forwardedRef
2490
- }, /* @__PURE__ */ React26.createElement("span", {
2631
+ }, /* @__PURE__ */ React29.createElement("span", {
2491
2632
  role: "none",
2492
2633
  className: tx("status.bar", "status__bar", {
2493
2634
  indeterminate,
@@ -2503,10 +2644,10 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
2503
2644
 
2504
2645
  // packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
2505
2646
  import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
2506
- import React27, { forwardRef as forwardRef24 } from "react";
2647
+ import React30, { forwardRef as forwardRef24 } from "react";
2507
2648
  var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2508
2649
  const { tx } = useThemeContext();
2509
- return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveRoot, {
2650
+ return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveRoot, {
2510
2651
  ...props,
2511
2652
  className: tx("scrollArea.root", "scroll-area", {}, classNames),
2512
2653
  ref: forwardedRef
@@ -2514,7 +2655,7 @@ var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, for
2514
2655
  });
2515
2656
  var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2516
2657
  const { tx } = useThemeContext();
2517
- return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveViewport, {
2658
+ return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveViewport, {
2518
2659
  ...props,
2519
2660
  className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
2520
2661
  ref: forwardedRef
@@ -2522,7 +2663,7 @@ var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props },
2522
2663
  });
2523
2664
  var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant = "fine", ...props }, forwardedRef) => {
2524
2665
  const { tx } = useThemeContext();
2525
- return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveScrollbar, {
2666
+ return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveScrollbar, {
2526
2667
  "data-variant": variant,
2527
2668
  ...props,
2528
2669
  className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
@@ -2531,7 +2672,7 @@ var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant =
2531
2672
  });
2532
2673
  var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2533
2674
  const { tx } = useThemeContext();
2534
- return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveThumb, {
2675
+ return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveThumb, {
2535
2676
  ...props,
2536
2677
  className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
2537
2678
  ref: forwardedRef
@@ -2539,7 +2680,7 @@ var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, fo
2539
2680
  });
2540
2681
  var ScrollAreaCorner = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
2541
2682
  const { tx } = useThemeContext();
2542
- return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveCorner, {
2683
+ return /* @__PURE__ */ React30.createElement(ScrollAreaPrimitiveCorner, {
2543
2684
  ...props,
2544
2685
  className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
2545
2686
  ref: forwardedRef
@@ -2556,7 +2697,7 @@ var ScrollArea = {
2556
2697
  // packages/ui/react-ui/src/components/Select/Select.tsx
2557
2698
  import { CaretDown as CaretDown2, CaretUp } from "@phosphor-icons/react";
2558
2699
  import * as SelectPrimitive from "@radix-ui/react-select";
2559
- import React28, { forwardRef as forwardRef25 } from "react";
2700
+ import React31, { forwardRef as forwardRef25 } from "react";
2560
2701
  var SelectRoot = SelectPrimitive.Root;
2561
2702
  var SelectTrigger = SelectPrimitive.Trigger;
2562
2703
  var SelectValue = SelectPrimitive.Value;
@@ -2564,23 +2705,23 @@ var SelectIcon = SelectPrimitive.Icon;
2564
2705
  var SelectPortal = SelectPrimitive.Portal;
2565
2706
  var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
2566
2707
  const { tx } = useThemeContext();
2567
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.Trigger, {
2708
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.Trigger, {
2568
2709
  asChild: true,
2569
2710
  ref: forwardedRef
2570
- }, /* @__PURE__ */ React28.createElement(Button, props, /* @__PURE__ */ React28.createElement(SelectPrimitive.Value, {
2711
+ }, /* @__PURE__ */ React31.createElement(Button, props, /* @__PURE__ */ React31.createElement(SelectPrimitive.Value, {
2571
2712
  placeholder
2572
- }, children), /* @__PURE__ */ React28.createElement("span", {
2713
+ }, children), /* @__PURE__ */ React31.createElement("span", {
2573
2714
  className: "w-1 flex-1"
2574
- }), /* @__PURE__ */ React28.createElement(SelectPrimitive.Icon, {
2715
+ }), /* @__PURE__ */ React31.createElement(SelectPrimitive.Icon, {
2575
2716
  asChild: true
2576
- }, /* @__PURE__ */ React28.createElement(CaretDown2, {
2717
+ }, /* @__PURE__ */ React31.createElement(CaretDown2, {
2577
2718
  className: tx("select.triggerIcon", "select__trigger__icon", {}),
2578
2719
  weight: "bold"
2579
2720
  }))));
2580
2721
  });
2581
2722
  var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2582
2723
  const { tx } = useThemeContext();
2583
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.Content, {
2724
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.Content, {
2584
2725
  ...props,
2585
2726
  className: tx("select.content", "select__content", {}, classNames),
2586
2727
  position: "popper",
@@ -2589,27 +2730,27 @@ var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, ...pro
2589
2730
  });
2590
2731
  var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2591
2732
  const { tx } = useThemeContext();
2592
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.SelectScrollUpButton, {
2733
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.SelectScrollUpButton, {
2593
2734
  ...props,
2594
2735
  className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
2595
2736
  ref: forwardedRef
2596
- }, children ?? /* @__PURE__ */ React28.createElement(CaretUp, {
2737
+ }, children ?? /* @__PURE__ */ React31.createElement(CaretUp, {
2597
2738
  weight: "bold"
2598
2739
  }));
2599
2740
  });
2600
2741
  var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2601
2742
  const { tx } = useThemeContext();
2602
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.SelectScrollDownButton, {
2743
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.SelectScrollDownButton, {
2603
2744
  ...props,
2604
2745
  className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
2605
2746
  ref: forwardedRef
2606
- }, children ?? /* @__PURE__ */ React28.createElement(CaretDown2, {
2747
+ }, children ?? /* @__PURE__ */ React31.createElement(CaretDown2, {
2607
2748
  weight: "bold"
2608
2749
  }));
2609
2750
  });
2610
2751
  var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, children, ...props }, forwardedRef) => {
2611
2752
  const { tx } = useThemeContext();
2612
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.SelectViewport, {
2753
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.SelectViewport, {
2613
2754
  ...props,
2614
2755
  className: tx("select.viewport", "select__viewport", {}, classNames),
2615
2756
  ref: forwardedRef
@@ -2617,7 +2758,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, child
2617
2758
  });
2618
2759
  var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2619
2760
  const { tx } = useThemeContext();
2620
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.Item, {
2761
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.Item, {
2621
2762
  ...props,
2622
2763
  className: tx("select.item", "option", {}, classNames),
2623
2764
  ref: forwardedRef
@@ -2626,7 +2767,7 @@ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forward
2626
2767
  var SelectItemText = SelectPrimitive.ItemText;
2627
2768
  var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
2628
2769
  const { tx } = useThemeContext();
2629
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.ItemIndicator, {
2770
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.ItemIndicator, {
2630
2771
  ...props,
2631
2772
  className: tx("select.itemIndicator", "option__indicator", {}, classNames),
2632
2773
  ref: forwardedRef
@@ -2634,13 +2775,13 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children,
2634
2775
  });
2635
2776
  var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
2636
2777
  const { tx } = useThemeContext();
2637
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.Item, {
2778
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.Item, {
2638
2779
  ...props,
2639
2780
  className: tx("select.item", "option", {}, classNames),
2640
2781
  ref: forwardedRef
2641
- }, /* @__PURE__ */ React28.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React28.createElement("span", {
2782
+ }, /* @__PURE__ */ React31.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React31.createElement("span", {
2642
2783
  className: "grow w-1"
2643
- }), /* @__PURE__ */ React28.createElement(Icon, {
2784
+ }), /* @__PURE__ */ React31.createElement(Icon, {
2644
2785
  icon: "ph--check--regular"
2645
2786
  }));
2646
2787
  });
@@ -2648,7 +2789,7 @@ var SelectGroup = SelectPrimitive.Group;
2648
2789
  var SelectLabel = SelectPrimitive.Label;
2649
2790
  var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2650
2791
  const { tx } = useThemeContext();
2651
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.Separator, {
2792
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.Separator, {
2652
2793
  ...props,
2653
2794
  className: tx("select.separator", "select__separator", {}, classNames),
2654
2795
  ref: forwardedRef
@@ -2656,7 +2797,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, fo
2656
2797
  });
2657
2798
  var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2658
2799
  const { tx } = useThemeContext();
2659
- return /* @__PURE__ */ React28.createElement(SelectPrimitive.Arrow, {
2800
+ return /* @__PURE__ */ React31.createElement(SelectPrimitive.Arrow, {
2660
2801
  ...props,
2661
2802
  className: tx("select.arrow", "select__arrow", {}, classNames),
2662
2803
  ref: forwardedRef
@@ -2685,10 +2826,10 @@ var Select = {
2685
2826
 
2686
2827
  // packages/ui/react-ui/src/components/Separator/Separator.tsx
2687
2828
  import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
2688
- import React29 from "react";
2829
+ import React32 from "react";
2689
2830
  var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
2690
2831
  const { tx } = useThemeContext();
2691
- return /* @__PURE__ */ React29.createElement(SeparatorPrimitive, {
2832
+ return /* @__PURE__ */ React32.createElement(SeparatorPrimitive, {
2692
2833
  orientation,
2693
2834
  ...props,
2694
2835
  className: tx("separator.root", "separator", {
@@ -2700,11 +2841,11 @@ var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
2700
2841
  // packages/ui/react-ui/src/components/Tag/Tag.tsx
2701
2842
  import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
2702
2843
  import { Slot as Slot13 } from "@radix-ui/react-slot";
2703
- import React30, { forwardRef as forwardRef26 } from "react";
2844
+ import React33, { forwardRef as forwardRef26 } from "react";
2704
2845
  var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props }, forwardedRef) => {
2705
2846
  const { tx } = useThemeContext();
2706
2847
  const Root5 = asChild ? Slot13 : Primitive12.span;
2707
- return /* @__PURE__ */ React30.createElement(Root5, {
2848
+ return /* @__PURE__ */ React33.createElement(Root5, {
2708
2849
  ...props,
2709
2850
  className: tx("tag.root", "tag", {
2710
2851
  palette
@@ -2717,29 +2858,29 @@ var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props
2717
2858
  import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
2718
2859
  import { Slot as Slot14 } from "@radix-ui/react-slot";
2719
2860
  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";
2720
- import React31, { forwardRef as forwardRef27 } from "react";
2861
+ import React34, { forwardRef as forwardRef27 } from "react";
2721
2862
  var ToastProvider = ToastProviderPrimitive;
2722
2863
  var ToastViewport = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
2723
2864
  const { tx } = useThemeContext();
2724
- return /* @__PURE__ */ React31.createElement(ToastViewportPrimitive, {
2865
+ return /* @__PURE__ */ React34.createElement(ToastViewportPrimitive, {
2725
2866
  className: tx("toast.viewport", "toast-viewport", {}, classNames),
2726
2867
  ref: forwardedRef
2727
2868
  });
2728
2869
  });
2729
2870
  var ToastRoot = /* @__PURE__ */ forwardRef27(({ classNames, children, ...props }, forwardedRef) => {
2730
2871
  const { tx } = useThemeContext();
2731
- return /* @__PURE__ */ React31.createElement(ToastRootPrimitive, {
2872
+ return /* @__PURE__ */ React34.createElement(ToastRootPrimitive, {
2732
2873
  ...props,
2733
2874
  className: tx("toast.root", "toast", {}, classNames),
2734
2875
  ref: forwardedRef
2735
- }, /* @__PURE__ */ React31.createElement(ElevationProvider, {
2876
+ }, /* @__PURE__ */ React34.createElement(ElevationProvider, {
2736
2877
  elevation: "chrome"
2737
2878
  }, children));
2738
2879
  });
2739
2880
  var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
2740
2881
  const { tx } = useThemeContext();
2741
2882
  const Root5 = asChild ? Slot14 : Primitive13.div;
2742
- return /* @__PURE__ */ React31.createElement(Root5, {
2883
+ return /* @__PURE__ */ React34.createElement(Root5, {
2743
2884
  ...props,
2744
2885
  className: tx("toast.body", "toast__body", {}, classNames),
2745
2886
  ref: forwardedRef
@@ -2748,7 +2889,7 @@ var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props },
2748
2889
  var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
2749
2890
  const { tx } = useThemeContext();
2750
2891
  const Root5 = asChild ? Slot14 : ToastTitlePrimitive;
2751
- return /* @__PURE__ */ React31.createElement(Root5, {
2892
+ return /* @__PURE__ */ React34.createElement(Root5, {
2752
2893
  ...props,
2753
2894
  className: tx("toast.title", "toast__title", {}, classNames),
2754
2895
  ref: forwardedRef
@@ -2757,7 +2898,7 @@ var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }
2757
2898
  var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
2758
2899
  const { tx } = useThemeContext();
2759
2900
  const Root5 = asChild ? Slot14 : ToastDescriptionPrimitive;
2760
- return /* @__PURE__ */ React31.createElement(Root5, {
2901
+ return /* @__PURE__ */ React34.createElement(Root5, {
2761
2902
  ...props,
2762
2903
  className: tx("toast.description", "toast__description", {}, classNames),
2763
2904
  ref: forwardedRef
@@ -2766,7 +2907,7 @@ var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...p
2766
2907
  var ToastActions = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
2767
2908
  const { tx } = useThemeContext();
2768
2909
  const Root5 = asChild ? Slot14 : Primitive13.div;
2769
- return /* @__PURE__ */ React31.createElement(Root5, {
2910
+ return /* @__PURE__ */ React34.createElement(Root5, {
2770
2911
  ...props,
2771
2912
  className: tx("toast.actions", "toast__actions", {}, classNames),
2772
2913
  ref: forwardedRef
@@ -2788,44 +2929,44 @@ var Toast = {
2788
2929
 
2789
2930
  // packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
2790
2931
  import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
2791
- import React32, { forwardRef as forwardRef28 } from "react";
2932
+ import React35, { forwardRef as forwardRef28 } from "react";
2792
2933
  var ToolbarRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
2793
2934
  const { tx } = useThemeContext();
2794
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Root, {
2935
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Root, {
2795
2936
  ...props,
2796
2937
  className: tx("toolbar.root", "toolbar", {}, classNames),
2797
2938
  ref: forwardedRef
2798
2939
  }, children);
2799
2940
  });
2800
2941
  var ToolbarButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
2801
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Button, {
2942
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Button, {
2802
2943
  asChild: true
2803
- }, /* @__PURE__ */ React32.createElement(Button, {
2944
+ }, /* @__PURE__ */ React35.createElement(Button, {
2804
2945
  ...props,
2805
2946
  ref: forwardedRef
2806
2947
  }));
2807
2948
  });
2808
2949
  var ToolbarToggle = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
2809
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Button, {
2950
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Button, {
2810
2951
  asChild: true
2811
- }, /* @__PURE__ */ React32.createElement(Toggle, {
2952
+ }, /* @__PURE__ */ React35.createElement(Toggle, {
2812
2953
  ...props,
2813
2954
  ref: forwardedRef
2814
2955
  }));
2815
2956
  });
2816
2957
  var ToolbarLink = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
2817
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Link, {
2958
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Link, {
2818
2959
  asChild: true
2819
- }, /* @__PURE__ */ React32.createElement(Link, {
2960
+ }, /* @__PURE__ */ React35.createElement(Link, {
2820
2961
  ...props,
2821
2962
  ref: forwardedRef
2822
2963
  }));
2823
2964
  });
2824
2965
  var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children, elevation, ...props }, forwardedRef) => {
2825
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
2966
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
2826
2967
  ...props,
2827
2968
  asChild: true
2828
- }, /* @__PURE__ */ React32.createElement(ButtonGroup, {
2969
+ }, /* @__PURE__ */ React35.createElement(ButtonGroup, {
2829
2970
  classNames,
2830
2971
  children,
2831
2972
  elevation,
@@ -2833,10 +2974,10 @@ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children,
2833
2974
  }));
2834
2975
  });
2835
2976
  var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
2836
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.ToolbarToggleItem, {
2977
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.ToolbarToggleItem, {
2837
2978
  ...props,
2838
2979
  asChild: true
2839
- }, /* @__PURE__ */ React32.createElement(Button, {
2980
+ }, /* @__PURE__ */ React35.createElement(Button, {
2840
2981
  variant,
2841
2982
  density,
2842
2983
  elevation,
@@ -2846,14 +2987,14 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, e
2846
2987
  }));
2847
2988
  });
2848
2989
  var ToolbarSeparator = (props) => {
2849
- return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Separator, {
2990
+ return /* @__PURE__ */ React35.createElement(ToolbarPrimitive.Separator, {
2850
2991
  asChild: true
2851
- }, /* @__PURE__ */ React32.createElement(Separator4, {
2992
+ }, /* @__PURE__ */ React35.createElement(Separator4, {
2852
2993
  orientation: "vertical",
2853
2994
  ...props
2854
2995
  }));
2855
2996
  };
2856
- var ToolbarExpander = () => /* @__PURE__ */ React32.createElement("div", {
2997
+ var ToolbarExpander = () => /* @__PURE__ */ React35.createElement("div", {
2857
2998
  className: "grow"
2858
2999
  });
2859
3000
  var Toolbar = {
@@ -2866,50 +3007,6 @@ var Toolbar = {
2866
3007
  Separator: ToolbarSeparator,
2867
3008
  Expander: ToolbarExpander
2868
3009
  };
2869
-
2870
- // packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
2871
- import { createKeyborg } from "keyborg";
2872
- import React33, { createContext as createContext10, useEffect as useEffect7 } from "react";
2873
-
2874
- // packages/ui/react-ui/src/util/hasIosKeyboard.ts
2875
- var hasIosKeyboard = () => {
2876
- return !!navigator.userAgent.match(/iP(ad|od|hone).+Safari/);
2877
- };
2878
-
2879
- // packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
2880
- var ThemeContext = /* @__PURE__ */ createContext10(void 0);
2881
- var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", rootElevation = "base", ...rest }) => {
2882
- useEffect7(() => {
2883
- if (document.defaultView) {
2884
- const kb = createKeyborg(document.defaultView);
2885
- kb.subscribe(handleInputModalityChange);
2886
- return () => kb.unsubscribe(handleInputModalityChange);
2887
- }
2888
- }, []);
2889
- return /* @__PURE__ */ React33.createElement(ThemeContext.Provider, {
2890
- value: {
2891
- tx,
2892
- themeMode,
2893
- hasIosKeyboard: hasIosKeyboard(),
2894
- ...rest
2895
- }
2896
- }, /* @__PURE__ */ React33.createElement(TranslationsProvider, {
2897
- fallback,
2898
- resourceExtensions,
2899
- appNs
2900
- }, /* @__PURE__ */ React33.createElement(ElevationProvider, {
2901
- elevation: rootElevation
2902
- }, /* @__PURE__ */ React33.createElement(DensityProvider, {
2903
- density: rootDensity
2904
- }, children))));
2905
- };
2906
- var handleInputModalityChange = (isUsingKeyboard) => {
2907
- if (isUsingKeyboard) {
2908
- document.body.setAttribute("data-is-keyboard", "true");
2909
- } else {
2910
- document.body.removeAttribute("data-is-keyboard");
2911
- }
2912
- };
2913
3010
  export {
2914
3011
  AlertDialog,
2915
3012
  AnchoredOverflow,
@@ -2920,6 +3017,7 @@ export {
2920
3017
  Breadcrumb,
2921
3018
  Button,
2922
3019
  ButtonGroup,
3020
+ Clipboard,
2923
3021
  ContextMenu2 as ContextMenu,
2924
3022
  DensityContext,
2925
3023
  DensityProvider,
@@ -2962,6 +3060,7 @@ export {
2962
3060
  toLocalizedString,
2963
3061
  useAvatarContext,
2964
3062
  useButtonGroupContext,
3063
+ useClipboard,
2965
3064
  useDensityContext,
2966
3065
  useDropdownMenuContext,
2967
3066
  useDropdownMenuMenuScope,