@dxos/react-ui 0.3.11-main.3f845e1 → 0.3.11-main.463e5cd
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.
- package/dist/lib/browser/index.mjs +337 -239
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts +3 -3
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +1 -1
- package/dist/types/src/components/List/List.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/List.stories.d.ts +3 -1
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/Tree.d.ts.map +1 -0
- package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/index.d.ts.map +1 -0
- package/dist/types/src/components/Menus/ContextMenu.d.ts +50 -0
- package/dist/types/src/components/Menus/ContextMenu.d.ts.map +1 -0
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +21 -0
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/{DropdownMenu → Menus}/DropdownMenu.d.ts +23 -23
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -0
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/Menus/index.d.ts +3 -0
- package/dist/types/src/components/Menus/index.d.ts.map +1 -0
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +108 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/index.d.ts +1 -0
- package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranslationsContext.d.ts +1 -0
- package/dist/types/src/hooks/useTranslationsContext.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +12 -8
- package/src/components/Avatars/Avatar.tsx +2 -1
- package/src/components/Buttons/Button.stories.tsx +2 -2
- package/src/components/Input/Input.stories.tsx +2 -2
- package/src/components/{Lists → List}/List.stories.tsx +50 -2
- package/src/components/Menus/ContextMenu.stories.tsx +106 -0
- package/src/components/Menus/ContextMenu.tsx +170 -0
- package/src/components/Menus/DropdownMenu.tsx +173 -0
- package/src/components/{DropdownMenu → Menus}/index.ts +1 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +1 -0
- package/src/components/ThemeProvider/TranslationsProvider.tsx +22 -4
- package/src/components/ThemeProvider/index.ts +1 -0
- package/src/components/index.ts +2 -2
- package/src/index.ts +1 -1
- package/src/playground/Surfaces.stories.tsx +9 -9
- package/src/playground/Typography.stories.tsx +1 -1
- package/dist/types/src/components/DropdownMenu/DropdownMenu.d.ts.map +0 -1
- package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts.map +0 -1
- package/dist/types/src/components/DropdownMenu/index.d.ts +0 -2
- package/dist/types/src/components/DropdownMenu/index.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/index.d.ts.map +0 -1
- package/src/components/DropdownMenu/DropdownMenu.tsx +0 -198
- package/dist/types/src/components/{Lists → List}/List.d.ts +0 -0
- package/dist/types/src/components/{Lists → List}/Tree.d.ts +0 -0
- package/dist/types/src/components/{Lists → List}/Tree.stories.d.ts +0 -0
- package/dist/types/src/components/{Lists → List}/index.d.ts +0 -0
- package/dist/types/src/components/{DropdownMenu → Menus}/DropdownMenu.stories.d.ts +0 -0
- package/src/components/{Lists → List}/List.tsx +0 -0
- package/src/components/{Lists → List}/Tree.stories.tsx +0 -0
- package/src/components/{Lists → List}/Tree.tsx +1 -1
- /package/src/components/{Lists → List}/index.ts +0 -0
- /package/src/components/{DropdownMenu → Menus}/DropdownMenu.stories.tsx +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/ui/react-ui/src/index.ts
|
|
2
|
-
import {
|
|
2
|
+
import { Trans } from "react-i18next";
|
|
3
3
|
export * from "@dxos/react-ui-types";
|
|
4
4
|
export * from "@dxos/react-hooks";
|
|
5
5
|
|
|
@@ -23,14 +23,16 @@ var useElevationContext = (propsElevation) => {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
// packages/ui/react-ui/src/hooks/useTranslationsContext.ts
|
|
26
|
-
import { useContext as
|
|
26
|
+
import { useContext as useContext4 } from "react";
|
|
27
27
|
|
|
28
28
|
// packages/ui/react-ui/src/components/ThemeProvider/TranslationsProvider.tsx
|
|
29
|
+
import { enUS as dtLocaleEnUs } from "date-fns/locale";
|
|
29
30
|
import i18Next from "i18next";
|
|
30
|
-
import React, { useEffect, createContext, useState, Suspense } from "react";
|
|
31
|
-
import { initReactI18next } from "react-i18next";
|
|
31
|
+
import React, { useEffect, createContext, useState, Suspense, useContext as useContext3 } from "react";
|
|
32
|
+
import { initReactI18next, useTranslation as useI18NextTranslation } from "react-i18next";
|
|
32
33
|
var initialLng = "en-US";
|
|
33
34
|
var initialNs = "dxos-common";
|
|
35
|
+
var initialDtLocale = dtLocaleEnUs;
|
|
34
36
|
var resources = {
|
|
35
37
|
[initialLng]: {
|
|
36
38
|
[initialNs]: {
|
|
@@ -47,9 +49,18 @@ void i18Next.use(initReactI18next).init({
|
|
|
47
49
|
}
|
|
48
50
|
});
|
|
49
51
|
var TranslationsContext = /* @__PURE__ */ createContext({
|
|
50
|
-
appNs: initialNs
|
|
52
|
+
appNs: initialNs,
|
|
53
|
+
dtLocale: initialDtLocale
|
|
51
54
|
});
|
|
52
|
-
var
|
|
55
|
+
var useTranslation = (...args) => {
|
|
56
|
+
const result = useI18NextTranslation(...args);
|
|
57
|
+
const { dtLocale } = useContext3(TranslationsContext);
|
|
58
|
+
return {
|
|
59
|
+
...result,
|
|
60
|
+
dtLocale
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
var TranslationsProvider = ({ fallback, resourceExtensions, children, appNs, dtLocale }) => {
|
|
53
64
|
const [loaded, setLoaded] = useState(false);
|
|
54
65
|
useEffect(() => {
|
|
55
66
|
setLoaded(false);
|
|
@@ -68,7 +79,8 @@ var TranslationsProvider = ({ fallback, resourceExtensions, children, appNs }) =
|
|
|
68
79
|
]);
|
|
69
80
|
return /* @__PURE__ */ React.createElement(TranslationsContext.Provider, {
|
|
70
81
|
value: {
|
|
71
|
-
appNs: appNs ?? initialNs
|
|
82
|
+
appNs: appNs ?? initialNs,
|
|
83
|
+
dtLocale: dtLocale ?? initialDtLocale
|
|
72
84
|
}
|
|
73
85
|
}, /* @__PURE__ */ React.createElement(Suspense, {
|
|
74
86
|
fallback
|
|
@@ -76,11 +88,11 @@ var TranslationsProvider = ({ fallback, resourceExtensions, children, appNs }) =
|
|
|
76
88
|
};
|
|
77
89
|
|
|
78
90
|
// packages/ui/react-ui/src/hooks/useTranslationsContext.ts
|
|
79
|
-
var useTranslationsContext = () =>
|
|
91
|
+
var useTranslationsContext = () => useContext4(TranslationsContext);
|
|
80
92
|
|
|
81
93
|
// packages/ui/react-ui/src/hooks/useThemeContext.ts
|
|
82
|
-
import { useContext as
|
|
83
|
-
var useThemeContext = () =>
|
|
94
|
+
import { useContext as useContext5 } from "react";
|
|
95
|
+
var useThemeContext = () => useContext5(ThemeContext);
|
|
84
96
|
|
|
85
97
|
// packages/ui/react-ui/src/hooks/useVisualViewport.ts
|
|
86
98
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
@@ -721,78 +733,163 @@ var AlertDialog = {
|
|
|
721
733
|
Action: AlertDialogAction
|
|
722
734
|
};
|
|
723
735
|
|
|
724
|
-
// packages/ui/react-ui/src/components/
|
|
725
|
-
import
|
|
736
|
+
// packages/ui/react-ui/src/components/Menus/ContextMenu.tsx
|
|
737
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
726
738
|
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
727
739
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
728
740
|
import React13, { forwardRef as forwardRef11 } from "react";
|
|
729
|
-
var
|
|
730
|
-
var
|
|
731
|
-
var
|
|
732
|
-
var
|
|
741
|
+
var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
|
|
742
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
743
|
+
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
744
|
+
var ContextMenuContent = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
733
745
|
const { tx } = useThemeContext();
|
|
734
|
-
return /* @__PURE__ */ React13.createElement(
|
|
735
|
-
sideOffset: 4,
|
|
746
|
+
return /* @__PURE__ */ React13.createElement(ContextMenuPrimitive.Content, {
|
|
736
747
|
collisionPadding: 8,
|
|
737
748
|
...props,
|
|
738
|
-
className: tx("
|
|
749
|
+
className: tx("menu.content", "menu", {}, classNames),
|
|
739
750
|
ref: forwardedRef
|
|
740
751
|
}, /* @__PURE__ */ React13.createElement(ElevationProvider, {
|
|
741
752
|
elevation: "chrome"
|
|
742
753
|
}, children));
|
|
743
754
|
});
|
|
744
|
-
var
|
|
755
|
+
var ContextMenuViewport = /* @__PURE__ */ forwardRef11(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
745
756
|
const { tx } = useThemeContext();
|
|
746
757
|
const Root3 = asChild ? Slot6 : Primitive6.div;
|
|
747
758
|
return /* @__PURE__ */ React13.createElement(Root3, {
|
|
748
759
|
...props,
|
|
749
|
-
className: tx("
|
|
760
|
+
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
761
|
+
ref: forwardedRef
|
|
762
|
+
}, children);
|
|
763
|
+
});
|
|
764
|
+
var ContextMenuArrow = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
765
|
+
const { tx } = useThemeContext();
|
|
766
|
+
return /* @__PURE__ */ React13.createElement(ContextMenuPrimitive.Arrow, {
|
|
767
|
+
...props,
|
|
768
|
+
className: tx("menu.arrow", "menu__arrow", {}, classNames),
|
|
769
|
+
ref: forwardedRef
|
|
770
|
+
});
|
|
771
|
+
});
|
|
772
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
773
|
+
var ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;
|
|
774
|
+
var ContextMenuItem = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
775
|
+
const { tx } = useThemeContext();
|
|
776
|
+
return /* @__PURE__ */ React13.createElement(ContextMenuPrimitive.Item, {
|
|
777
|
+
...props,
|
|
778
|
+
className: tx("menu.item", "menu__item", {}, classNames),
|
|
779
|
+
ref: forwardedRef
|
|
780
|
+
});
|
|
781
|
+
});
|
|
782
|
+
var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
783
|
+
const { tx } = useThemeContext();
|
|
784
|
+
return /* @__PURE__ */ React13.createElement(ContextMenuPrimitive.CheckboxItem, {
|
|
785
|
+
...props,
|
|
786
|
+
className: tx("menu.item", "menu__item--checkbox", {}, classNames),
|
|
787
|
+
ref: forwardedRef
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
var ContextMenuSeparator = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
791
|
+
const { tx } = useThemeContext();
|
|
792
|
+
return /* @__PURE__ */ React13.createElement(ContextMenuPrimitive.Separator, {
|
|
793
|
+
...props,
|
|
794
|
+
className: tx("menu.separator", "menu__item", {}, classNames),
|
|
795
|
+
ref: forwardedRef
|
|
796
|
+
});
|
|
797
|
+
});
|
|
798
|
+
var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
799
|
+
const { tx } = useThemeContext();
|
|
800
|
+
return /* @__PURE__ */ React13.createElement(ContextMenuPrimitive.Label, {
|
|
801
|
+
...props,
|
|
802
|
+
className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
|
|
803
|
+
ref: forwardedRef
|
|
804
|
+
});
|
|
805
|
+
});
|
|
806
|
+
var ContextMenu2 = {
|
|
807
|
+
Root: ContextMenuRoot,
|
|
808
|
+
Trigger: ContextMenuTrigger,
|
|
809
|
+
Portal: ContextMenuPortal,
|
|
810
|
+
Content: ContextMenuContent,
|
|
811
|
+
Viewport: ContextMenuViewport,
|
|
812
|
+
Arrow: ContextMenuArrow,
|
|
813
|
+
Group: ContextMenuGroup,
|
|
814
|
+
Item: ContextMenuItem,
|
|
815
|
+
CheckboxItem: ContextMenuCheckboxItem,
|
|
816
|
+
ItemIndicator: ContextMenuItemIndicator,
|
|
817
|
+
Separator: ContextMenuSeparator,
|
|
818
|
+
GroupLabel: ContextMenuGroupLabel
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
// packages/ui/react-ui/src/components/Menus/DropdownMenu.tsx
|
|
822
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
823
|
+
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
824
|
+
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
825
|
+
import React14, { forwardRef as forwardRef12 } from "react";
|
|
826
|
+
var DropdownMenuRoot = DropdownMenuPrimitive.DropdownMenu;
|
|
827
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
828
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
829
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
830
|
+
const { tx } = useThemeContext();
|
|
831
|
+
return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Content, {
|
|
832
|
+
sideOffset: 4,
|
|
833
|
+
collisionPadding: 8,
|
|
834
|
+
...props,
|
|
835
|
+
className: tx("menu.content", "menu", {}, classNames),
|
|
836
|
+
ref: forwardedRef
|
|
837
|
+
}, /* @__PURE__ */ React14.createElement(ElevationProvider, {
|
|
838
|
+
elevation: "chrome"
|
|
839
|
+
}, children));
|
|
840
|
+
});
|
|
841
|
+
var DropdownMenuViewport = /* @__PURE__ */ forwardRef12(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
842
|
+
const { tx } = useThemeContext();
|
|
843
|
+
const Root3 = asChild ? Slot7 : Primitive7.div;
|
|
844
|
+
return /* @__PURE__ */ React14.createElement(Root3, {
|
|
845
|
+
...props,
|
|
846
|
+
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
750
847
|
ref: forwardedRef
|
|
751
848
|
}, children);
|
|
752
849
|
});
|
|
753
|
-
var DropdownMenuArrow = /* @__PURE__ */
|
|
850
|
+
var DropdownMenuArrow = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
754
851
|
const { tx } = useThemeContext();
|
|
755
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Arrow, {
|
|
756
853
|
...props,
|
|
757
|
-
className: tx("
|
|
854
|
+
className: tx("menu.arrow", "menu__arrow", {}, classNames),
|
|
758
855
|
ref: forwardedRef
|
|
759
856
|
});
|
|
760
857
|
});
|
|
761
|
-
var DropdownMenuGroup =
|
|
762
|
-
var DropdownMenuItemIndicator =
|
|
763
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
858
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
859
|
+
var DropdownMenuItemIndicator = DropdownMenuPrimitive.ItemIndicator;
|
|
860
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
764
861
|
const { tx } = useThemeContext();
|
|
765
|
-
return /* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Item, {
|
|
766
863
|
...props,
|
|
767
|
-
className: tx("
|
|
864
|
+
className: tx("menu.item", "menu__item", {}, classNames),
|
|
768
865
|
ref: forwardedRef
|
|
769
866
|
});
|
|
770
867
|
});
|
|
771
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */
|
|
868
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
772
869
|
const { tx } = useThemeContext();
|
|
773
|
-
return /* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.CheckboxItem, {
|
|
774
871
|
...props,
|
|
775
|
-
className: tx("
|
|
872
|
+
className: tx("menu.item", "menu__item--checkbox", {}, classNames),
|
|
776
873
|
ref: forwardedRef
|
|
777
874
|
});
|
|
778
875
|
});
|
|
779
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
876
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
780
877
|
const { tx } = useThemeContext();
|
|
781
|
-
return /* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Separator, {
|
|
782
879
|
...props,
|
|
783
|
-
className: tx("
|
|
880
|
+
className: tx("menu.separator", "menu__item", {}, classNames),
|
|
784
881
|
ref: forwardedRef
|
|
785
882
|
});
|
|
786
883
|
});
|
|
787
|
-
var DropdownMenuGroupLabel = /* @__PURE__ */
|
|
884
|
+
var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
788
885
|
const { tx } = useThemeContext();
|
|
789
|
-
return /* @__PURE__ */
|
|
886
|
+
return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Label, {
|
|
790
887
|
...props,
|
|
791
|
-
className: tx("
|
|
888
|
+
className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
|
|
792
889
|
ref: forwardedRef
|
|
793
890
|
});
|
|
794
891
|
});
|
|
795
|
-
var
|
|
892
|
+
var DropdownMenu2 = {
|
|
796
893
|
Root: DropdownMenuRoot,
|
|
797
894
|
Trigger: DropdownMenuTrigger,
|
|
798
895
|
Portal: DropdownMenuPortal,
|
|
@@ -812,11 +909,11 @@ import { Check, Minus } from "@phosphor-icons/react";
|
|
|
812
909
|
import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
|
|
813
910
|
import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
|
|
814
911
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
815
|
-
import
|
|
912
|
+
import React15, { forwardRef as forwardRef13, Fragment, useCallback } from "react";
|
|
816
913
|
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";
|
|
817
|
-
var
|
|
914
|
+
var Label3 = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
818
915
|
const { tx } = useThemeContext();
|
|
819
|
-
return /* @__PURE__ */
|
|
916
|
+
return /* @__PURE__ */ React15.createElement(LabelPrimitive, {
|
|
820
917
|
...props,
|
|
821
918
|
className: tx("input.label", "input__label", {
|
|
822
919
|
srOnly
|
|
@@ -824,9 +921,9 @@ var Label = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...pro
|
|
|
824
921
|
ref: forwardedRef
|
|
825
922
|
}, children);
|
|
826
923
|
});
|
|
827
|
-
var Description = /* @__PURE__ */
|
|
924
|
+
var Description = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
828
925
|
const { tx } = useThemeContext();
|
|
829
|
-
return /* @__PURE__ */
|
|
926
|
+
return /* @__PURE__ */ React15.createElement(DescriptionPrimitive, {
|
|
830
927
|
...props,
|
|
831
928
|
className: tx("input.description", "input__description", {
|
|
832
929
|
srOnly
|
|
@@ -834,10 +931,10 @@ var Description = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children,
|
|
|
834
931
|
ref: forwardedRef
|
|
835
932
|
}, children);
|
|
836
933
|
});
|
|
837
|
-
var Validation = /* @__PURE__ */
|
|
934
|
+
var Validation = /* @__PURE__ */ forwardRef13(({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
838
935
|
const { tx } = useThemeContext();
|
|
839
936
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
840
|
-
return /* @__PURE__ */
|
|
937
|
+
return /* @__PURE__ */ React15.createElement(ValidationPrimitive, {
|
|
841
938
|
...props,
|
|
842
939
|
className: tx("input.validation", `input__validation-message input__validation-message--${validationValence}`, {
|
|
843
940
|
srOnly,
|
|
@@ -846,9 +943,9 @@ var Validation = /* @__PURE__ */ forwardRef12(({ __inputScope, srOnly, className
|
|
|
846
943
|
ref: forwardedRef
|
|
847
944
|
}, children);
|
|
848
945
|
});
|
|
849
|
-
var DescriptionAndValidation = /* @__PURE__ */
|
|
946
|
+
var DescriptionAndValidation = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
850
947
|
const { tx } = useThemeContext();
|
|
851
|
-
return /* @__PURE__ */
|
|
948
|
+
return /* @__PURE__ */ React15.createElement(DescriptionAndValidationPrimitive, {
|
|
852
949
|
...props,
|
|
853
950
|
className: tx("input.descriptionAndValidation", "input__description-and-validation", {
|
|
854
951
|
srOnly
|
|
@@ -856,7 +953,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef12(({ srOnly, className
|
|
|
856
953
|
ref: forwardedRef
|
|
857
954
|
}, children);
|
|
858
955
|
});
|
|
859
|
-
var PinInput = /* @__PURE__ */
|
|
956
|
+
var PinInput = /* @__PURE__ */ forwardRef13(({ density: propsDensity, elevation: propsElevation, segmentClassName: propsSegmentClassName, inputClassName, variant, ...props }, forwardedRef) => {
|
|
860
957
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
861
958
|
const { tx } = useThemeContext();
|
|
862
959
|
const density = useDensityContext(propsDensity);
|
|
@@ -875,7 +972,7 @@ var PinInput = /* @__PURE__ */ forwardRef12(({ density: propsDensity, elevation:
|
|
|
875
972
|
propsElevation,
|
|
876
973
|
density
|
|
877
974
|
]);
|
|
878
|
-
return /* @__PURE__ */
|
|
975
|
+
return /* @__PURE__ */ React15.createElement(PinInputPrimitive, {
|
|
879
976
|
...props,
|
|
880
977
|
segmentClassName,
|
|
881
978
|
...props.autoFocus && !hasIosKeyboard2 && {
|
|
@@ -887,14 +984,14 @@ var PinInput = /* @__PURE__ */ forwardRef12(({ density: propsDensity, elevation:
|
|
|
887
984
|
ref: forwardedRef
|
|
888
985
|
});
|
|
889
986
|
});
|
|
890
|
-
var TextInput = /* @__PURE__ */
|
|
987
|
+
var TextInput = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
891
988
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
892
989
|
const themeContextValue = useThemeContext();
|
|
893
990
|
const density = useDensityContext(propsDensity);
|
|
894
991
|
const elevation = useElevationContext(propsElevation);
|
|
895
992
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
896
993
|
const { tx } = themeContextValue;
|
|
897
|
-
return /* @__PURE__ */
|
|
994
|
+
return /* @__PURE__ */ React15.createElement(TextInputPrimitive, {
|
|
898
995
|
...props,
|
|
899
996
|
className: tx("input.input", "input", {
|
|
900
997
|
variant,
|
|
@@ -909,13 +1006,13 @@ var TextInput = /* @__PURE__ */ forwardRef12(({ __inputScope, classNames, densit
|
|
|
909
1006
|
ref: forwardedRef
|
|
910
1007
|
});
|
|
911
1008
|
});
|
|
912
|
-
var TextArea = /* @__PURE__ */
|
|
1009
|
+
var TextArea = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
913
1010
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
914
1011
|
const { tx } = useThemeContext();
|
|
915
1012
|
const density = useDensityContext(propsDensity);
|
|
916
1013
|
const elevation = useElevationContext(propsElevation);
|
|
917
1014
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
918
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ React15.createElement(TextAreaPrimitive, {
|
|
919
1016
|
...props,
|
|
920
1017
|
className: tx("input.input", "input--text-area", {
|
|
921
1018
|
variant,
|
|
@@ -930,7 +1027,7 @@ var TextArea = /* @__PURE__ */ forwardRef12(({ __inputScope, classNames, density
|
|
|
930
1027
|
ref: forwardedRef
|
|
931
1028
|
});
|
|
932
1029
|
});
|
|
933
|
-
var Checkbox = /* @__PURE__ */
|
|
1030
|
+
var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, weight = "bold", classNames, ...props }, forwardedRef) => {
|
|
934
1031
|
const [checked, onCheckedChange] = useControllableState({
|
|
935
1032
|
prop: propsChecked,
|
|
936
1033
|
defaultProp: propsDefaultChecked,
|
|
@@ -939,7 +1036,7 @@ var Checkbox = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsCheck
|
|
|
939
1036
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
940
1037
|
const { tx } = useThemeContext();
|
|
941
1038
|
const Icon2 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
942
|
-
return /* @__PURE__ */
|
|
1039
|
+
return /* @__PURE__ */ React15.createElement(CheckboxPrimitive, {
|
|
943
1040
|
...props,
|
|
944
1041
|
checked,
|
|
945
1042
|
onCheckedChange,
|
|
@@ -953,16 +1050,16 @@ var Checkbox = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsCheck
|
|
|
953
1050
|
size
|
|
954
1051
|
}, "shrink-0", classNames),
|
|
955
1052
|
ref: forwardedRef
|
|
956
|
-
}, /* @__PURE__ */
|
|
1053
|
+
}, /* @__PURE__ */ React15.createElement(CheckboxIndicatorPrimitive, {
|
|
957
1054
|
asChild: true
|
|
958
|
-
}, /* @__PURE__ */
|
|
1055
|
+
}, /* @__PURE__ */ React15.createElement(Icon2, checked && {
|
|
959
1056
|
weight,
|
|
960
1057
|
className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
961
1058
|
size
|
|
962
1059
|
})
|
|
963
1060
|
})));
|
|
964
1061
|
});
|
|
965
|
-
var Switch = /* @__PURE__ */
|
|
1062
|
+
var Switch = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
|
|
966
1063
|
const { tx } = useThemeContext();
|
|
967
1064
|
const [checked, onCheckedChange] = useControllableState({
|
|
968
1065
|
prop: propsChecked,
|
|
@@ -970,7 +1067,7 @@ var Switch = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsChecked
|
|
|
970
1067
|
onChange: propsOnCheckedChange
|
|
971
1068
|
});
|
|
972
1069
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
973
|
-
return /* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ React15.createElement(SwitchPrimitive, {
|
|
974
1071
|
...props,
|
|
975
1072
|
checked,
|
|
976
1073
|
onCheckedChange,
|
|
@@ -984,7 +1081,7 @@ var Switch = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsChecked
|
|
|
984
1081
|
size
|
|
985
1082
|
}, classNames),
|
|
986
1083
|
ref: forwardedRef
|
|
987
|
-
}, /* @__PURE__ */
|
|
1084
|
+
}, /* @__PURE__ */ React15.createElement(SwitchThumbPrimitive, {
|
|
988
1085
|
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
989
1086
|
size
|
|
990
1087
|
})
|
|
@@ -997,46 +1094,46 @@ var Input = {
|
|
|
997
1094
|
TextArea,
|
|
998
1095
|
Checkbox,
|
|
999
1096
|
Switch,
|
|
1000
|
-
Label,
|
|
1097
|
+
Label: Label3,
|
|
1001
1098
|
Description,
|
|
1002
1099
|
Validation,
|
|
1003
1100
|
DescriptionAndValidation
|
|
1004
1101
|
};
|
|
1005
1102
|
|
|
1006
|
-
// packages/ui/react-ui/src/components/
|
|
1103
|
+
// packages/ui/react-ui/src/components/List/List.tsx
|
|
1007
1104
|
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1008
|
-
import { Slot as
|
|
1009
|
-
import
|
|
1105
|
+
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1106
|
+
import React17, { forwardRef as forwardRef14 } from "react";
|
|
1010
1107
|
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";
|
|
1011
1108
|
|
|
1012
1109
|
// packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
|
|
1013
|
-
import
|
|
1110
|
+
import React16, { createContext as createContext7 } from "react";
|
|
1014
1111
|
var DensityContext = /* @__PURE__ */ createContext7({
|
|
1015
1112
|
density: "coarse"
|
|
1016
1113
|
});
|
|
1017
|
-
var DensityProvider = ({ density, children }) => /* @__PURE__ */
|
|
1114
|
+
var DensityProvider = ({ density, children }) => /* @__PURE__ */ React16.createElement(DensityContext.Provider, {
|
|
1018
1115
|
value: {
|
|
1019
1116
|
density
|
|
1020
1117
|
}
|
|
1021
1118
|
}, children);
|
|
1022
1119
|
|
|
1023
|
-
// packages/ui/react-ui/src/components/
|
|
1024
|
-
var List = /* @__PURE__ */
|
|
1120
|
+
// packages/ui/react-ui/src/components/List/List.tsx
|
|
1121
|
+
var List = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
|
|
1025
1122
|
const { tx } = useThemeContext();
|
|
1026
1123
|
const density = useDensityContext(props.density);
|
|
1027
|
-
return /* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ React17.createElement(DensityProvider, {
|
|
1028
1125
|
density
|
|
1029
|
-
}, /* @__PURE__ */
|
|
1126
|
+
}, /* @__PURE__ */ React17.createElement(ListPrimitive, {
|
|
1030
1127
|
...props,
|
|
1031
1128
|
className: tx("list.root", "list", {}, classNames),
|
|
1032
1129
|
ref: forwardedRef
|
|
1033
1130
|
}, children));
|
|
1034
1131
|
});
|
|
1035
|
-
var ListItemEndcap = /* @__PURE__ */
|
|
1036
|
-
const Root3 = asChild ?
|
|
1132
|
+
var ListItemEndcap = /* @__PURE__ */ forwardRef14(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1133
|
+
const Root3 = asChild ? Slot8 : "div";
|
|
1037
1134
|
const density = useDensityContext();
|
|
1038
1135
|
const { tx } = useThemeContext();
|
|
1039
|
-
return /* @__PURE__ */
|
|
1136
|
+
return /* @__PURE__ */ React17.createElement(Root3, {
|
|
1040
1137
|
...!asChild && {
|
|
1041
1138
|
role: "none"
|
|
1042
1139
|
},
|
|
@@ -1050,7 +1147,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef13(({ children, classNames, asChi
|
|
|
1050
1147
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1051
1148
|
const density = useDensityContext();
|
|
1052
1149
|
const { tx } = useThemeContext();
|
|
1053
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ React17.createElement("div", {
|
|
1054
1151
|
role: "none",
|
|
1055
1152
|
...props,
|
|
1056
1153
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1058,10 +1155,10 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1058
1155
|
}, classNames)
|
|
1059
1156
|
});
|
|
1060
1157
|
};
|
|
1061
|
-
var ListItemHeading = /* @__PURE__ */
|
|
1158
|
+
var ListItemHeading = /* @__PURE__ */ forwardRef14(({ children, classNames, ...props }, forwardedRef) => {
|
|
1062
1159
|
const { tx } = useThemeContext();
|
|
1063
1160
|
const density = useDensityContext();
|
|
1064
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItemHeading, {
|
|
1065
1162
|
...props,
|
|
1066
1163
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1067
1164
|
density
|
|
@@ -1069,26 +1166,26 @@ var ListItemHeading = /* @__PURE__ */ forwardRef13(({ children, classNames, ...p
|
|
|
1069
1166
|
ref: forwardedRef
|
|
1070
1167
|
}, children);
|
|
1071
1168
|
});
|
|
1072
|
-
var ListItemOpenTrigger = /* @__PURE__ */
|
|
1169
|
+
var ListItemOpenTrigger = /* @__PURE__ */ forwardRef14(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
|
|
1073
1170
|
const { tx } = useThemeContext();
|
|
1074
1171
|
const density = useDensityContext();
|
|
1075
1172
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1076
1173
|
const Icon2 = open ? CaretDown : CaretRight;
|
|
1077
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1078
1175
|
...props,
|
|
1079
1176
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1080
1177
|
density
|
|
1081
1178
|
}, classNames),
|
|
1082
1179
|
ref: forwardedRef
|
|
1083
|
-
}, children || /* @__PURE__ */
|
|
1180
|
+
}, children || /* @__PURE__ */ React17.createElement(Icon2, {
|
|
1084
1181
|
weight: "bold",
|
|
1085
1182
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1086
1183
|
}));
|
|
1087
1184
|
});
|
|
1088
|
-
var ListItemRoot = /* @__PURE__ */
|
|
1185
|
+
var ListItemRoot = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
|
|
1089
1186
|
const { tx } = useThemeContext();
|
|
1090
1187
|
const density = useDensityContext();
|
|
1091
|
-
return /* @__PURE__ */
|
|
1188
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItem, {
|
|
1092
1189
|
...props,
|
|
1093
1190
|
className: tx("list.item.root", "list__listItem", {
|
|
1094
1191
|
density,
|
|
@@ -1106,24 +1203,24 @@ var ListItem = {
|
|
|
1106
1203
|
MockOpenTrigger: MockListItemOpenTrigger
|
|
1107
1204
|
};
|
|
1108
1205
|
|
|
1109
|
-
// packages/ui/react-ui/src/components/
|
|
1110
|
-
import
|
|
1111
|
-
var TreeRoot = /* @__PURE__ */
|
|
1112
|
-
return /* @__PURE__ */
|
|
1206
|
+
// packages/ui/react-ui/src/components/List/Tree.tsx
|
|
1207
|
+
import React18, { forwardRef as forwardRef15 } from "react";
|
|
1208
|
+
var TreeRoot = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1209
|
+
return /* @__PURE__ */ React18.createElement(List, {
|
|
1113
1210
|
...props,
|
|
1114
1211
|
ref: forwardedRef
|
|
1115
1212
|
});
|
|
1116
1213
|
});
|
|
1117
|
-
var TreeBranch = /* @__PURE__ */
|
|
1214
|
+
var TreeBranch = /* @__PURE__ */ forwardRef15(({ __listScope, ...props }, forwardedRef) => {
|
|
1118
1215
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1119
|
-
return /* @__PURE__ */
|
|
1216
|
+
return /* @__PURE__ */ React18.createElement(List, {
|
|
1120
1217
|
...props,
|
|
1121
1218
|
"aria-labelledby": headingId,
|
|
1122
1219
|
ref: forwardedRef
|
|
1123
1220
|
});
|
|
1124
1221
|
});
|
|
1125
|
-
var TreeItemRoot = /* @__PURE__ */
|
|
1126
|
-
return /* @__PURE__ */
|
|
1222
|
+
var TreeItemRoot = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1223
|
+
return /* @__PURE__ */ React18.createElement(ListItem.Root, {
|
|
1127
1224
|
role: "treeitem",
|
|
1128
1225
|
...props,
|
|
1129
1226
|
ref: forwardedRef
|
|
@@ -1148,10 +1245,10 @@ var TreeItem = {
|
|
|
1148
1245
|
// packages/ui/react-ui/src/components/Main/Main.tsx
|
|
1149
1246
|
import { createContext as createContext8 } from "@radix-ui/react-context";
|
|
1150
1247
|
import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/react-dialog";
|
|
1151
|
-
import { Primitive as
|
|
1152
|
-
import { Slot as
|
|
1248
|
+
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1249
|
+
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1153
1250
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1154
|
-
import
|
|
1251
|
+
import React19, { forwardRef as forwardRef16, useCallback as useCallback3, useRef } from "react";
|
|
1155
1252
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1156
1253
|
|
|
1157
1254
|
// packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
|
|
@@ -1170,24 +1267,24 @@ var useSwipeToDismiss = (ref, {
|
|
|
1170
1267
|
/* side = 'inline-start' */
|
|
1171
1268
|
}) => {
|
|
1172
1269
|
const $root = ref.current;
|
|
1173
|
-
const [motionState, setMotionState] = useState3(
|
|
1270
|
+
const [motionState, setMotionState] = useState3(0);
|
|
1174
1271
|
const [gestureStartX, setGestureStartX] = useState3(0);
|
|
1175
1272
|
const setIdle = useCallback2(() => {
|
|
1176
|
-
setMotionState(
|
|
1273
|
+
setMotionState(0);
|
|
1177
1274
|
$root?.style.removeProperty("inset-inline-start");
|
|
1178
1275
|
$root?.style.setProperty("transition-duration", "200ms");
|
|
1179
1276
|
}, [
|
|
1180
1277
|
$root
|
|
1181
1278
|
]);
|
|
1182
1279
|
const setFollowing = useCallback2(() => {
|
|
1183
|
-
setMotionState(
|
|
1280
|
+
setMotionState(2);
|
|
1184
1281
|
$root?.style.setProperty("transition-duration", "0ms");
|
|
1185
1282
|
}, [
|
|
1186
1283
|
$root
|
|
1187
1284
|
]);
|
|
1188
1285
|
const handlePointerDown = useCallback2(({ screenX }) => {
|
|
1189
|
-
if (motionState ===
|
|
1190
|
-
setMotionState(
|
|
1286
|
+
if (motionState === 0) {
|
|
1287
|
+
setMotionState(1);
|
|
1191
1288
|
setGestureStartX(screenX);
|
|
1192
1289
|
}
|
|
1193
1290
|
}, [
|
|
@@ -1197,7 +1294,7 @@ var useSwipeToDismiss = (ref, {
|
|
|
1197
1294
|
if ($root) {
|
|
1198
1295
|
const delta = Math.min(screenX - gestureStartX, 0);
|
|
1199
1296
|
switch (motionState) {
|
|
1200
|
-
case
|
|
1297
|
+
case 2:
|
|
1201
1298
|
if (Math.abs(delta) > dismissThreshold) {
|
|
1202
1299
|
setIdle();
|
|
1203
1300
|
onDismiss?.();
|
|
@@ -1205,7 +1302,7 @@ var useSwipeToDismiss = (ref, {
|
|
|
1205
1302
|
$root.style.setProperty("inset-inline-start", `${offset + delta}px`);
|
|
1206
1303
|
}
|
|
1207
1304
|
break;
|
|
1208
|
-
case
|
|
1305
|
+
case 1:
|
|
1209
1306
|
if (Math.abs(delta) > debounceThreshold) {
|
|
1210
1307
|
setFollowing();
|
|
1211
1308
|
}
|
|
@@ -1310,7 +1407,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
1310
1407
|
defaultProp: defaultComplementarySidebarOpen,
|
|
1311
1408
|
onChange: onComplementarySidebarOpenChange
|
|
1312
1409
|
});
|
|
1313
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ React19.createElement(MainProvider, {
|
|
1314
1411
|
...props,
|
|
1315
1412
|
navigationSidebarOpen,
|
|
1316
1413
|
setNavigationSidebarOpen,
|
|
@@ -1322,7 +1419,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
1322
1419
|
var handleOpenAutoFocus = (event) => {
|
|
1323
1420
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
1324
1421
|
};
|
|
1325
|
-
var MainSidebar = /* @__PURE__ */
|
|
1422
|
+
var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, setOpen, side, ...props }, forwardedRef) => {
|
|
1326
1423
|
const [isLg] = useMediaQuery("lg", {
|
|
1327
1424
|
ssr: false
|
|
1328
1425
|
});
|
|
@@ -1332,11 +1429,11 @@ var MainSidebar = /* @__PURE__ */ forwardRef15(({ classNames, children, swipeToD
|
|
|
1332
1429
|
useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
|
|
1333
1430
|
onDismiss: () => setOpen(false)
|
|
1334
1431
|
});
|
|
1335
|
-
const Root3 = isLg ?
|
|
1336
|
-
return /* @__PURE__ */
|
|
1432
|
+
const Root3 = isLg ? Primitive8.div : DialogContent2;
|
|
1433
|
+
return /* @__PURE__ */ React19.createElement(DialogRoot2, {
|
|
1337
1434
|
open,
|
|
1338
1435
|
modal: false
|
|
1339
|
-
}, /* @__PURE__ */
|
|
1436
|
+
}, /* @__PURE__ */ React19.createElement(Root3, {
|
|
1340
1437
|
...!isLg && {
|
|
1341
1438
|
forceMount: true,
|
|
1342
1439
|
tabIndex: -1,
|
|
@@ -1352,13 +1449,13 @@ var MainSidebar = /* @__PURE__ */ forwardRef15(({ classNames, children, swipeToD
|
|
|
1352
1449
|
inert: "true"
|
|
1353
1450
|
},
|
|
1354
1451
|
ref
|
|
1355
|
-
}, /* @__PURE__ */
|
|
1452
|
+
}, /* @__PURE__ */ React19.createElement(ElevationProvider, {
|
|
1356
1453
|
elevation: "group"
|
|
1357
1454
|
}, children)));
|
|
1358
1455
|
});
|
|
1359
|
-
var MainNavigationSidebar = /* @__PURE__ */
|
|
1456
|
+
var MainNavigationSidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef) => {
|
|
1360
1457
|
const { navigationSidebarOpen, setNavigationSidebarOpen } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
1361
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ React19.createElement(MainSidebar, {
|
|
1362
1459
|
...props,
|
|
1363
1460
|
open: navigationSidebarOpen,
|
|
1364
1461
|
setOpen: setNavigationSidebarOpen,
|
|
@@ -1367,9 +1464,9 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) =
|
|
|
1367
1464
|
});
|
|
1368
1465
|
});
|
|
1369
1466
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1370
|
-
var MainComplementarySidebar = /* @__PURE__ */
|
|
1467
|
+
var MainComplementarySidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef) => {
|
|
1371
1468
|
const { complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
1372
|
-
return /* @__PURE__ */
|
|
1469
|
+
return /* @__PURE__ */ React19.createElement(MainSidebar, {
|
|
1373
1470
|
...props,
|
|
1374
1471
|
open: complementarySidebarOpen,
|
|
1375
1472
|
setOpen: setComplementarySidebarOpen,
|
|
@@ -1378,14 +1475,14 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef
|
|
|
1378
1475
|
});
|
|
1379
1476
|
});
|
|
1380
1477
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1381
|
-
var MainContent = /* @__PURE__ */
|
|
1478
|
+
var MainContent = /* @__PURE__ */ forwardRef16(({ asChild, classNames, bounce, children, ...props }, forwardedRef) => {
|
|
1382
1479
|
const [isLg] = useMediaQuery("lg", {
|
|
1383
1480
|
ssr: false
|
|
1384
1481
|
});
|
|
1385
1482
|
const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1386
1483
|
const { tx } = useThemeContext();
|
|
1387
|
-
const Root3 = asChild ?
|
|
1388
|
-
return /* @__PURE__ */
|
|
1484
|
+
const Root3 = asChild ? Slot9 : "main";
|
|
1485
|
+
return /* @__PURE__ */ React19.createElement(Root3, {
|
|
1389
1486
|
...props,
|
|
1390
1487
|
className: tx("main.content", "main", {
|
|
1391
1488
|
isLg,
|
|
@@ -1397,13 +1494,13 @@ var MainContent = /* @__PURE__ */ forwardRef15(({ asChild, classNames, bounce, c
|
|
|
1397
1494
|
}, children);
|
|
1398
1495
|
});
|
|
1399
1496
|
MainContent.displayName = MAIN_NAME;
|
|
1400
|
-
var MainOverlay = /* @__PURE__ */
|
|
1497
|
+
var MainOverlay = /* @__PURE__ */ forwardRef16(({ classNames, ...props }, forwardedRef) => {
|
|
1401
1498
|
const [isLg] = useMediaQuery("lg", {
|
|
1402
1499
|
ssr: false
|
|
1403
1500
|
});
|
|
1404
1501
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1405
1502
|
const { tx } = useThemeContext();
|
|
1406
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1407
1504
|
onClick: () => {
|
|
1408
1505
|
setNavigationSidebarOpen(false);
|
|
1409
1506
|
setComplementarySidebarOpen(false);
|
|
@@ -1430,22 +1527,22 @@ var Main = {
|
|
|
1430
1527
|
|
|
1431
1528
|
// packages/ui/react-ui/src/components/Message/Message.tsx
|
|
1432
1529
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
1433
|
-
import { Primitive as
|
|
1434
|
-
import { Slot as
|
|
1435
|
-
import
|
|
1530
|
+
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1531
|
+
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1532
|
+
import React20, { forwardRef as forwardRef17 } from "react";
|
|
1436
1533
|
import { useId as useId3 } from "@dxos/react-hooks";
|
|
1437
1534
|
var MESSAGE_NAME = "Message";
|
|
1438
1535
|
var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
|
|
1439
|
-
var MessageRoot = /* @__PURE__ */
|
|
1536
|
+
var MessageRoot = /* @__PURE__ */ forwardRef17(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
|
|
1440
1537
|
const { tx } = useThemeContext();
|
|
1441
1538
|
const titleId = useId3("message__title", propsTitleId);
|
|
1442
1539
|
const descriptionId = useId3("message__description", propsDescriptionId);
|
|
1443
1540
|
const elevation = useElevationContext(propsElevation);
|
|
1444
|
-
const Root3 = asChild ?
|
|
1445
|
-
return /* @__PURE__ */
|
|
1541
|
+
const Root3 = asChild ? Slot10 : Primitive9.div;
|
|
1542
|
+
return /* @__PURE__ */ React20.createElement(MessageProvider, {
|
|
1446
1543
|
titleId,
|
|
1447
1544
|
descriptionId
|
|
1448
|
-
}, /* @__PURE__ */
|
|
1545
|
+
}, /* @__PURE__ */ React20.createElement(Root3, {
|
|
1449
1546
|
...props,
|
|
1450
1547
|
className: tx("message.root", "message", {
|
|
1451
1548
|
valence,
|
|
@@ -1458,11 +1555,11 @@ var MessageRoot = /* @__PURE__ */ forwardRef16(({ asChild, valence, elevation: p
|
|
|
1458
1555
|
});
|
|
1459
1556
|
MessageRoot.displayName = MESSAGE_NAME;
|
|
1460
1557
|
var MESSAGE_TITLE_NAME = "MessageTitle";
|
|
1461
|
-
var MessageTitle = /* @__PURE__ */
|
|
1558
|
+
var MessageTitle = /* @__PURE__ */ forwardRef17(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1462
1559
|
const { tx } = useThemeContext();
|
|
1463
1560
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
1464
|
-
const Root3 = asChild ?
|
|
1465
|
-
return /* @__PURE__ */
|
|
1561
|
+
const Root3 = asChild ? Slot10 : Primitive9.h2;
|
|
1562
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1466
1563
|
...props,
|
|
1467
1564
|
className: tx("message.title", "message__title", {}, className),
|
|
1468
1565
|
id: titleId,
|
|
@@ -1471,11 +1568,11 @@ var MessageTitle = /* @__PURE__ */ forwardRef16(({ asChild, className, children,
|
|
|
1471
1568
|
});
|
|
1472
1569
|
MessageTitle.displayName = MESSAGE_TITLE_NAME;
|
|
1473
1570
|
var MESSAGE_BODY_NAME = "MessageBody";
|
|
1474
|
-
var MessageBody = /* @__PURE__ */
|
|
1571
|
+
var MessageBody = /* @__PURE__ */ forwardRef17(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1475
1572
|
const { tx } = useThemeContext();
|
|
1476
1573
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
1477
|
-
const Root3 = asChild ?
|
|
1478
|
-
return /* @__PURE__ */
|
|
1574
|
+
const Root3 = asChild ? Slot10 : Primitive9.p;
|
|
1575
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1479
1576
|
...props,
|
|
1480
1577
|
className: tx("message.body", "message__body", {}, className),
|
|
1481
1578
|
id: descriptionId,
|
|
@@ -1491,38 +1588,38 @@ var Message = {
|
|
|
1491
1588
|
|
|
1492
1589
|
// packages/ui/react-ui/src/components/Popover/Popover.tsx
|
|
1493
1590
|
import { Root as PopoverRootPrimitive, PopoverContent as PopoverContentPrimitive, PopoverTrigger as PopoverTriggerPrimitive, PopoverAnchor as PopoverAnchorPrimitive, PopoverPortal as PopoverPortalPrimitive, PopoverArrow as PopoverArrowPrimitive, PopoverClose as PopoverClosePrimitive } from "@radix-ui/react-popover";
|
|
1494
|
-
import { Primitive as
|
|
1495
|
-
import { Slot as
|
|
1496
|
-
import
|
|
1591
|
+
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
1592
|
+
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
1593
|
+
import React21, { forwardRef as forwardRef18 } from "react";
|
|
1497
1594
|
var PopoverRoot = PopoverRootPrimitive;
|
|
1498
1595
|
var PopoverPortal = PopoverPortalPrimitive;
|
|
1499
1596
|
var PopoverTrigger = PopoverTriggerPrimitive;
|
|
1500
1597
|
var PopoverAnchor = PopoverAnchorPrimitive;
|
|
1501
1598
|
var PopoverClose = PopoverClosePrimitive;
|
|
1502
|
-
var PopoverArrow = /* @__PURE__ */
|
|
1599
|
+
var PopoverArrow = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1503
1600
|
const { tx } = useThemeContext();
|
|
1504
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ React21.createElement(PopoverArrowPrimitive, {
|
|
1505
1602
|
...props,
|
|
1506
1603
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
1507
1604
|
ref: forwardedRef
|
|
1508
1605
|
});
|
|
1509
1606
|
});
|
|
1510
|
-
var PopoverContent = /* @__PURE__ */
|
|
1607
|
+
var PopoverContent = /* @__PURE__ */ forwardRef18(({ classNames, children, ...props }, forwardedRef) => {
|
|
1511
1608
|
const { tx } = useThemeContext();
|
|
1512
|
-
return /* @__PURE__ */
|
|
1609
|
+
return /* @__PURE__ */ React21.createElement(PopoverContentPrimitive, {
|
|
1513
1610
|
sideOffset: 4,
|
|
1514
1611
|
collisionPadding: 8,
|
|
1515
1612
|
...props,
|
|
1516
1613
|
className: tx("popover.content", "popover", {}, classNames),
|
|
1517
1614
|
ref: forwardedRef
|
|
1518
|
-
}, /* @__PURE__ */
|
|
1615
|
+
}, /* @__PURE__ */ React21.createElement(ElevationProvider, {
|
|
1519
1616
|
elevation: "chrome"
|
|
1520
1617
|
}, children));
|
|
1521
1618
|
});
|
|
1522
|
-
var PopoverViewport = /* @__PURE__ */
|
|
1619
|
+
var PopoverViewport = /* @__PURE__ */ forwardRef18(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
1523
1620
|
const { tx } = useThemeContext();
|
|
1524
|
-
const Root3 = asChild ?
|
|
1525
|
-
return /* @__PURE__ */
|
|
1621
|
+
const Root3 = asChild ? Slot11 : Primitive10.div;
|
|
1622
|
+
return /* @__PURE__ */ React21.createElement(Root3, {
|
|
1526
1623
|
...props,
|
|
1527
1624
|
className: tx("popover.viewport", "popover__viewport", {
|
|
1528
1625
|
constrainInline,
|
|
@@ -1543,17 +1640,17 @@ var Popover = {
|
|
|
1543
1640
|
};
|
|
1544
1641
|
|
|
1545
1642
|
// packages/ui/react-ui/src/components/Status/Status.tsx
|
|
1546
|
-
import
|
|
1547
|
-
var Status = /* @__PURE__ */
|
|
1643
|
+
import React22, { forwardRef as forwardRef19 } from "react";
|
|
1644
|
+
var Status = /* @__PURE__ */ forwardRef19(({ classNames, children, progress = 0, indeterminate, ...props }, forwardedRef) => {
|
|
1548
1645
|
const { tx } = useThemeContext();
|
|
1549
|
-
return /* @__PURE__ */
|
|
1646
|
+
return /* @__PURE__ */ React22.createElement("span", {
|
|
1550
1647
|
role: "status",
|
|
1551
1648
|
...props,
|
|
1552
1649
|
className: tx("status.root", "status", {
|
|
1553
1650
|
indeterminate
|
|
1554
1651
|
}, classNames),
|
|
1555
1652
|
ref: forwardedRef
|
|
1556
|
-
}, /* @__PURE__ */
|
|
1653
|
+
}, /* @__PURE__ */ React22.createElement("span", {
|
|
1557
1654
|
role: "none",
|
|
1558
1655
|
className: tx("status.bar", "status__bar", {
|
|
1559
1656
|
indeterminate
|
|
@@ -1568,42 +1665,42 @@ var Status = /* @__PURE__ */ forwardRef18(({ classNames, children, progress = 0,
|
|
|
1568
1665
|
|
|
1569
1666
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
1570
1667
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
1571
|
-
import
|
|
1572
|
-
var ScrollAreaRoot = /* @__PURE__ */
|
|
1668
|
+
import React23, { forwardRef as forwardRef20 } from "react";
|
|
1669
|
+
var ScrollAreaRoot = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1573
1670
|
const { tx } = useThemeContext();
|
|
1574
|
-
return /* @__PURE__ */
|
|
1671
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveRoot, {
|
|
1575
1672
|
...props,
|
|
1576
1673
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
1577
1674
|
ref: forwardedRef
|
|
1578
1675
|
});
|
|
1579
1676
|
});
|
|
1580
|
-
var ScrollAreaViewport = /* @__PURE__ */
|
|
1677
|
+
var ScrollAreaViewport = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1581
1678
|
const { tx } = useThemeContext();
|
|
1582
|
-
return /* @__PURE__ */
|
|
1679
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveViewport, {
|
|
1583
1680
|
...props,
|
|
1584
1681
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
1585
1682
|
ref: forwardedRef
|
|
1586
1683
|
});
|
|
1587
1684
|
});
|
|
1588
|
-
var ScrollAreaScrollbar = /* @__PURE__ */
|
|
1685
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1589
1686
|
const { tx } = useThemeContext();
|
|
1590
|
-
return /* @__PURE__ */
|
|
1687
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
1591
1688
|
...props,
|
|
1592
1689
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
1593
1690
|
ref: forwardedRef
|
|
1594
1691
|
});
|
|
1595
1692
|
});
|
|
1596
|
-
var ScrollAreaThumb = /* @__PURE__ */
|
|
1693
|
+
var ScrollAreaThumb = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1597
1694
|
const { tx } = useThemeContext();
|
|
1598
|
-
return /* @__PURE__ */
|
|
1695
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveThumb, {
|
|
1599
1696
|
...props,
|
|
1600
1697
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
1601
1698
|
ref: forwardedRef
|
|
1602
1699
|
});
|
|
1603
1700
|
});
|
|
1604
|
-
var ScrollAreaCorner = /* @__PURE__ */
|
|
1701
|
+
var ScrollAreaCorner = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1605
1702
|
const { tx } = useThemeContext();
|
|
1606
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveCorner, {
|
|
1607
1704
|
...props,
|
|
1608
1705
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
1609
1706
|
ref: forwardedRef
|
|
@@ -1620,95 +1717,95 @@ var ScrollArea = {
|
|
|
1620
1717
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
1621
1718
|
import { CaretDown as CaretDown2, CaretUp, Check as Check2 } from "@phosphor-icons/react";
|
|
1622
1719
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1623
|
-
import
|
|
1720
|
+
import React24, { forwardRef as forwardRef21 } from "react";
|
|
1624
1721
|
var SelectRoot = SelectPrimitive.Root;
|
|
1625
1722
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
1626
1723
|
var SelectValue = SelectPrimitive.Value;
|
|
1627
1724
|
var SelectIcon = SelectPrimitive.Icon;
|
|
1628
1725
|
var SelectPortal = SelectPrimitive.Portal;
|
|
1629
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
1630
|
-
return /* @__PURE__ */
|
|
1726
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef21(({ placeholder, ...props }, forwardedRef) => {
|
|
1727
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Trigger, {
|
|
1631
1728
|
asChild: true,
|
|
1632
1729
|
ref: forwardedRef
|
|
1633
|
-
}, /* @__PURE__ */
|
|
1730
|
+
}, /* @__PURE__ */ React24.createElement(Button, props, /* @__PURE__ */ React24.createElement(SelectPrimitive.Value, {
|
|
1634
1731
|
placeholder
|
|
1635
|
-
}), /* @__PURE__ */
|
|
1732
|
+
}), /* @__PURE__ */ React24.createElement(SelectPrimitive.Icon, {
|
|
1636
1733
|
className: "pis-2"
|
|
1637
|
-
}, /* @__PURE__ */
|
|
1734
|
+
}, /* @__PURE__ */ React24.createElement(CaretDown2, {
|
|
1638
1735
|
weight: "bold"
|
|
1639
1736
|
}))));
|
|
1640
1737
|
});
|
|
1641
|
-
var SelectContent = /* @__PURE__ */
|
|
1738
|
+
var SelectContent = /* @__PURE__ */ forwardRef21(({ classNames, children, ...props }, forwardedRef) => {
|
|
1642
1739
|
const { tx } = useThemeContext();
|
|
1643
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Content, {
|
|
1644
1741
|
...props,
|
|
1645
1742
|
className: tx("select.content", "select__content", {}, classNames),
|
|
1646
1743
|
ref: forwardedRef
|
|
1647
1744
|
}, children);
|
|
1648
1745
|
});
|
|
1649
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
1746
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef21(({ classNames, children, ...props }, forwardedRef) => {
|
|
1650
1747
|
const { tx } = useThemeContext();
|
|
1651
|
-
return /* @__PURE__ */
|
|
1748
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
1652
1749
|
...props,
|
|
1653
1750
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
1654
1751
|
ref: forwardedRef
|
|
1655
|
-
}, children ?? /* @__PURE__ */
|
|
1752
|
+
}, children ?? /* @__PURE__ */ React24.createElement(CaretUp, {
|
|
1656
1753
|
weight: "bold"
|
|
1657
1754
|
}));
|
|
1658
1755
|
});
|
|
1659
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
1756
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef21(({ classNames, children, ...props }, forwardedRef) => {
|
|
1660
1757
|
const { tx } = useThemeContext();
|
|
1661
|
-
return /* @__PURE__ */
|
|
1758
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
1662
1759
|
...props,
|
|
1663
1760
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
1664
1761
|
ref: forwardedRef
|
|
1665
|
-
}, children ?? /* @__PURE__ */
|
|
1762
|
+
}, children ?? /* @__PURE__ */ React24.createElement(CaretDown2, {
|
|
1666
1763
|
weight: "bold"
|
|
1667
1764
|
}));
|
|
1668
1765
|
});
|
|
1669
1766
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
1670
|
-
var SelectItem = /* @__PURE__ */
|
|
1767
|
+
var SelectItem = /* @__PURE__ */ forwardRef21(({ classNames, ...props }, forwardedRef) => {
|
|
1671
1768
|
const { tx } = useThemeContext();
|
|
1672
|
-
return /* @__PURE__ */
|
|
1769
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Item, {
|
|
1673
1770
|
...props,
|
|
1674
1771
|
className: tx("select.item", "option", {}, classNames),
|
|
1675
1772
|
ref: forwardedRef
|
|
1676
1773
|
});
|
|
1677
1774
|
});
|
|
1678
1775
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
1679
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
1776
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef21(({ classNames, children, ...props }, forwardedRef) => {
|
|
1680
1777
|
const { tx } = useThemeContext();
|
|
1681
|
-
return /* @__PURE__ */
|
|
1778
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemIndicator, {
|
|
1682
1779
|
...props,
|
|
1683
1780
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
1684
1781
|
ref: forwardedRef
|
|
1685
1782
|
}, children);
|
|
1686
1783
|
});
|
|
1687
|
-
var SelectOption = /* @__PURE__ */
|
|
1784
|
+
var SelectOption = /* @__PURE__ */ forwardRef21(({ children, classNames, ...props }, forwardedRef) => {
|
|
1688
1785
|
const { tx } = useThemeContext();
|
|
1689
|
-
return /* @__PURE__ */
|
|
1786
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Item, {
|
|
1690
1787
|
...props,
|
|
1691
1788
|
className: tx("select.item", "option", {}, classNames),
|
|
1692
1789
|
ref: forwardedRef
|
|
1693
|
-
}, /* @__PURE__ */
|
|
1790
|
+
}, /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemIndicator, {
|
|
1694
1791
|
className: tx("select.itemIndicator", "option__indicator", {})
|
|
1695
|
-
}, /* @__PURE__ */
|
|
1792
|
+
}, /* @__PURE__ */ React24.createElement(Check2, {
|
|
1696
1793
|
weight: "bold"
|
|
1697
1794
|
})));
|
|
1698
1795
|
});
|
|
1699
1796
|
var SelectGroup = SelectPrimitive.Group;
|
|
1700
1797
|
var SelectLabel = SelectPrimitive.Label;
|
|
1701
|
-
var SelectSeparator = /* @__PURE__ */
|
|
1798
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef21(({ classNames, ...props }, forwardedRef) => {
|
|
1702
1799
|
const { tx } = useThemeContext();
|
|
1703
|
-
return /* @__PURE__ */
|
|
1800
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Separator, {
|
|
1704
1801
|
...props,
|
|
1705
1802
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
1706
1803
|
ref: forwardedRef
|
|
1707
1804
|
});
|
|
1708
1805
|
});
|
|
1709
|
-
var SelectArrow = /* @__PURE__ */
|
|
1806
|
+
var SelectArrow = /* @__PURE__ */ forwardRef21(({ classNames, ...props }, forwardedRef) => {
|
|
1710
1807
|
const { tx } = useThemeContext();
|
|
1711
|
-
return /* @__PURE__ */
|
|
1808
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Arrow, {
|
|
1712
1809
|
...props,
|
|
1713
1810
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
1714
1811
|
ref: forwardedRef
|
|
@@ -1737,10 +1834,10 @@ var Select = {
|
|
|
1737
1834
|
|
|
1738
1835
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
1739
1836
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
1740
|
-
import
|
|
1741
|
-
var
|
|
1837
|
+
import React25 from "react";
|
|
1838
|
+
var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
1742
1839
|
const { tx } = useThemeContext();
|
|
1743
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ React25.createElement(SeparatorPrimitive, {
|
|
1744
1841
|
orientation,
|
|
1745
1842
|
...props,
|
|
1746
1843
|
className: tx("separator.root", "separator", {
|
|
@@ -1750,13 +1847,13 @@ var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
1750
1847
|
};
|
|
1751
1848
|
|
|
1752
1849
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
1753
|
-
import { Primitive as
|
|
1754
|
-
import { Slot as
|
|
1755
|
-
import
|
|
1756
|
-
var Tag = /* @__PURE__ */
|
|
1850
|
+
import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
|
|
1851
|
+
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
1852
|
+
import React26, { forwardRef as forwardRef22 } from "react";
|
|
1853
|
+
var Tag = /* @__PURE__ */ forwardRef22(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
1757
1854
|
const { tx } = useThemeContext();
|
|
1758
|
-
const Root3 = asChild ?
|
|
1759
|
-
return /* @__PURE__ */
|
|
1855
|
+
const Root3 = asChild ? Slot12 : Primitive11.span;
|
|
1856
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1760
1857
|
...props,
|
|
1761
1858
|
className: tx("tag.root", "tag", {
|
|
1762
1859
|
palette
|
|
@@ -1766,61 +1863,61 @@ var Tag = /* @__PURE__ */ forwardRef21(({ asChild, palette, classNames, ...props
|
|
|
1766
1863
|
});
|
|
1767
1864
|
|
|
1768
1865
|
// packages/ui/react-ui/src/components/Toast/Toast.tsx
|
|
1769
|
-
import { Primitive as
|
|
1770
|
-
import { Slot as
|
|
1866
|
+
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
1867
|
+
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
1771
1868
|
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";
|
|
1772
|
-
import
|
|
1869
|
+
import React27, { forwardRef as forwardRef23 } from "react";
|
|
1773
1870
|
var ToastProvider = ToastProviderPrimitive;
|
|
1774
|
-
var ToastViewport = /* @__PURE__ */
|
|
1871
|
+
var ToastViewport = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
1775
1872
|
const { tx } = useThemeContext();
|
|
1776
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ React27.createElement(ToastViewportPrimitive, {
|
|
1777
1874
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
1778
1875
|
ref: forwardedRef
|
|
1779
1876
|
});
|
|
1780
1877
|
});
|
|
1781
|
-
var ToastRoot = /* @__PURE__ */
|
|
1878
|
+
var ToastRoot = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1782
1879
|
const { tx } = useThemeContext();
|
|
1783
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ React27.createElement(ToastRootPrimitive, {
|
|
1784
1881
|
...props,
|
|
1785
1882
|
className: tx("toast.root", "toast", {}, classNames),
|
|
1786
1883
|
ref: forwardedRef
|
|
1787
|
-
}, /* @__PURE__ */
|
|
1884
|
+
}, /* @__PURE__ */ React27.createElement(ElevationProvider, {
|
|
1788
1885
|
elevation: "chrome"
|
|
1789
|
-
}, /* @__PURE__ */
|
|
1886
|
+
}, /* @__PURE__ */ React27.createElement(DensityProvider, {
|
|
1790
1887
|
density: "fine"
|
|
1791
1888
|
}, children)));
|
|
1792
1889
|
});
|
|
1793
|
-
var ToastBody = /* @__PURE__ */
|
|
1890
|
+
var ToastBody = /* @__PURE__ */ forwardRef23(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1794
1891
|
const { tx } = useThemeContext();
|
|
1795
|
-
const Root3 = asChild ?
|
|
1796
|
-
return /* @__PURE__ */
|
|
1892
|
+
const Root3 = asChild ? Slot13 : Primitive12.div;
|
|
1893
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1797
1894
|
...props,
|
|
1798
1895
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
1799
1896
|
ref: forwardedRef
|
|
1800
1897
|
});
|
|
1801
1898
|
});
|
|
1802
|
-
var ToastTitle = /* @__PURE__ */
|
|
1899
|
+
var ToastTitle = /* @__PURE__ */ forwardRef23(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1803
1900
|
const { tx } = useThemeContext();
|
|
1804
|
-
const Root3 = asChild ?
|
|
1805
|
-
return /* @__PURE__ */
|
|
1901
|
+
const Root3 = asChild ? Slot13 : ToastTitlePrimitive;
|
|
1902
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1806
1903
|
...props,
|
|
1807
1904
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
1808
1905
|
ref: forwardedRef
|
|
1809
1906
|
});
|
|
1810
1907
|
});
|
|
1811
|
-
var ToastDescription = /* @__PURE__ */
|
|
1908
|
+
var ToastDescription = /* @__PURE__ */ forwardRef23(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1812
1909
|
const { tx } = useThemeContext();
|
|
1813
|
-
const Root3 = asChild ?
|
|
1814
|
-
return /* @__PURE__ */
|
|
1910
|
+
const Root3 = asChild ? Slot13 : ToastDescriptionPrimitive;
|
|
1911
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1815
1912
|
...props,
|
|
1816
1913
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
1817
1914
|
ref: forwardedRef
|
|
1818
1915
|
});
|
|
1819
1916
|
});
|
|
1820
|
-
var ToastActions = /* @__PURE__ */
|
|
1917
|
+
var ToastActions = /* @__PURE__ */ forwardRef23(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1821
1918
|
const { tx } = useThemeContext();
|
|
1822
|
-
const Root3 = asChild ?
|
|
1823
|
-
return /* @__PURE__ */
|
|
1919
|
+
const Root3 = asChild ? Slot13 : Primitive12.div;
|
|
1920
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1824
1921
|
...props,
|
|
1825
1922
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
1826
1923
|
ref: forwardedRef
|
|
@@ -1842,46 +1939,46 @@ var Toast = {
|
|
|
1842
1939
|
|
|
1843
1940
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
1844
1941
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
1845
|
-
import
|
|
1846
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
1942
|
+
import React28, { forwardRef as forwardRef24 } from "react";
|
|
1943
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef24(({ classNames, children, ...props }, forwardedRef) => {
|
|
1847
1944
|
const { tx } = useThemeContext();
|
|
1848
|
-
return /* @__PURE__ */
|
|
1945
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Root, {
|
|
1849
1946
|
...props,
|
|
1850
1947
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
1851
1948
|
ref: forwardedRef
|
|
1852
1949
|
}, children);
|
|
1853
1950
|
});
|
|
1854
|
-
var ToolbarButton = /* @__PURE__ */
|
|
1855
|
-
return /* @__PURE__ */
|
|
1951
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef24((props, forwardedRef) => {
|
|
1952
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Button, {
|
|
1856
1953
|
asChild: true
|
|
1857
|
-
}, /* @__PURE__ */
|
|
1954
|
+
}, /* @__PURE__ */ React28.createElement(Button, {
|
|
1858
1955
|
...props,
|
|
1859
1956
|
ref: forwardedRef
|
|
1860
1957
|
}));
|
|
1861
1958
|
});
|
|
1862
|
-
var ToolbarLink = /* @__PURE__ */
|
|
1863
|
-
return /* @__PURE__ */
|
|
1959
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef24((props, forwardedRef) => {
|
|
1960
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Link, {
|
|
1864
1961
|
asChild: true
|
|
1865
|
-
}, /* @__PURE__ */
|
|
1962
|
+
}, /* @__PURE__ */ React28.createElement(Link, {
|
|
1866
1963
|
...props,
|
|
1867
1964
|
ref: forwardedRef
|
|
1868
1965
|
}));
|
|
1869
1966
|
});
|
|
1870
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
1871
|
-
return /* @__PURE__ */
|
|
1967
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef24(({ classNames, children, ...props }, forwardedRef) => {
|
|
1968
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
1872
1969
|
...props,
|
|
1873
1970
|
asChild: true
|
|
1874
|
-
}, /* @__PURE__ */
|
|
1971
|
+
}, /* @__PURE__ */ React28.createElement(ButtonGroup, {
|
|
1875
1972
|
classNames,
|
|
1876
1973
|
children,
|
|
1877
1974
|
ref: forwardedRef
|
|
1878
1975
|
}));
|
|
1879
1976
|
});
|
|
1880
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
1881
|
-
return /* @__PURE__ */
|
|
1977
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef24(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
1978
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
1882
1979
|
...props,
|
|
1883
1980
|
asChild: true
|
|
1884
|
-
}, /* @__PURE__ */
|
|
1981
|
+
}, /* @__PURE__ */ React28.createElement(Button, {
|
|
1885
1982
|
variant,
|
|
1886
1983
|
density,
|
|
1887
1984
|
elevation,
|
|
@@ -1891,9 +1988,9 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef23(({ variant, density, e
|
|
|
1891
1988
|
}));
|
|
1892
1989
|
});
|
|
1893
1990
|
var ToolbarSeparator = (props) => {
|
|
1894
|
-
return /* @__PURE__ */
|
|
1991
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Separator, {
|
|
1895
1992
|
asChild: true
|
|
1896
|
-
}, /* @__PURE__ */
|
|
1993
|
+
}, /* @__PURE__ */ React28.createElement(Separator4, {
|
|
1897
1994
|
orientation: "vertical",
|
|
1898
1995
|
...props
|
|
1899
1996
|
}));
|
|
@@ -1909,22 +2006,22 @@ var Toolbar = {
|
|
|
1909
2006
|
|
|
1910
2007
|
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
1911
2008
|
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
1912
|
-
import
|
|
2009
|
+
import React29, { forwardRef as forwardRef25 } from "react";
|
|
1913
2010
|
var TooltipProvider = TooltipProviderPrimitive;
|
|
1914
2011
|
var TooltipRoot = TooltipRootPrimitive;
|
|
1915
2012
|
var TooltipPortal = TooltipPortalPrimitive;
|
|
1916
2013
|
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
1917
|
-
var TooltipArrow = /* @__PURE__ */
|
|
2014
|
+
var TooltipArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
1918
2015
|
const { tx } = useThemeContext();
|
|
1919
|
-
return /* @__PURE__ */
|
|
2016
|
+
return /* @__PURE__ */ React29.createElement(TooltipArrowPrimitive, {
|
|
1920
2017
|
...props,
|
|
1921
2018
|
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
1922
2019
|
ref: forwardedRef
|
|
1923
2020
|
});
|
|
1924
2021
|
});
|
|
1925
|
-
var TooltipContent = /* @__PURE__ */
|
|
2022
|
+
var TooltipContent = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
1926
2023
|
const { tx } = useThemeContext();
|
|
1927
|
-
return /* @__PURE__ */
|
|
2024
|
+
return /* @__PURE__ */ React29.createElement(TooltipContentPrimitive, {
|
|
1928
2025
|
sideOffset: 4,
|
|
1929
2026
|
collisionPadding: 8,
|
|
1930
2027
|
...props,
|
|
@@ -1943,7 +2040,7 @@ var Tooltip = {
|
|
|
1943
2040
|
|
|
1944
2041
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
1945
2042
|
import { createKeyborg } from "keyborg";
|
|
1946
|
-
import
|
|
2043
|
+
import React30, { createContext as createContext10, useEffect as useEffect4 } from "react";
|
|
1947
2044
|
|
|
1948
2045
|
// packages/ui/react-ui/src/util/hasIosKeyboard.ts
|
|
1949
2046
|
var hasIosKeyboard = () => {
|
|
@@ -1971,19 +2068,19 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
1971
2068
|
return () => kb.unsubscribe(handleInputModalityChange);
|
|
1972
2069
|
}
|
|
1973
2070
|
}, []);
|
|
1974
|
-
return /* @__PURE__ */
|
|
2071
|
+
return /* @__PURE__ */ React30.createElement(ThemeContext.Provider, {
|
|
1975
2072
|
value: {
|
|
1976
2073
|
tx,
|
|
1977
2074
|
themeMode,
|
|
1978
2075
|
hasIosKeyboard: hasIosKeyboard()
|
|
1979
2076
|
}
|
|
1980
|
-
}, /* @__PURE__ */
|
|
2077
|
+
}, /* @__PURE__ */ React30.createElement(TranslationsProvider, {
|
|
1981
2078
|
fallback,
|
|
1982
2079
|
resourceExtensions,
|
|
1983
2080
|
appNs
|
|
1984
|
-
}, /* @__PURE__ */
|
|
2081
|
+
}, /* @__PURE__ */ React30.createElement(ElevationProvider, {
|
|
1985
2082
|
elevation: rootElevation
|
|
1986
|
-
}, /* @__PURE__ */
|
|
2083
|
+
}, /* @__PURE__ */ React30.createElement(DensityProvider, {
|
|
1987
2084
|
density: rootDensity
|
|
1988
2085
|
}, children))));
|
|
1989
2086
|
};
|
|
@@ -1997,10 +2094,11 @@ export {
|
|
|
1997
2094
|
Breadcrumb,
|
|
1998
2095
|
Button,
|
|
1999
2096
|
ButtonGroup,
|
|
2097
|
+
ContextMenu2 as ContextMenu,
|
|
2000
2098
|
DensityContext,
|
|
2001
2099
|
DensityProvider,
|
|
2002
2100
|
Dialog,
|
|
2003
|
-
DropdownMenu,
|
|
2101
|
+
DropdownMenu2 as DropdownMenu,
|
|
2004
2102
|
ElevationContext,
|
|
2005
2103
|
ElevationProvider,
|
|
2006
2104
|
Input,
|
|
@@ -2014,7 +2112,7 @@ export {
|
|
|
2014
2112
|
Popover,
|
|
2015
2113
|
ScrollArea,
|
|
2016
2114
|
Select,
|
|
2017
|
-
|
|
2115
|
+
Separator4 as Separator,
|
|
2018
2116
|
Status,
|
|
2019
2117
|
Tag,
|
|
2020
2118
|
ThemeContext,
|