@dxos/react-ui 0.6.14-staging.e15392e → 0.7.1-staging.599df14
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 +366 -318
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +413 -368
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +366 -318
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts +13 -0
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +1 -0
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts +21 -0
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Buttons/index.d.ts +1 -0
- package/dist/types/src/components/Buttons/index.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.d.ts +4 -2
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.d.ts +1 -0
- package/dist/types/src/components/Status/Status.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/components/Buttons/IconButton.stories.tsx +40 -0
- package/src/components/Buttons/IconButton.tsx +61 -0
- package/src/components/Buttons/index.ts +1 -0
- package/src/components/Select/Select.tsx +15 -2
- package/src/components/Status/Status.tsx +4 -3
|
@@ -571,16 +571,88 @@ var ButtonGroup = /* @__PURE__ */ forwardRef7(({ children, elevation: propsEleva
|
|
|
571
571
|
});
|
|
572
572
|
ButtonGroup.displayName = BUTTON_GROUP_NAME;
|
|
573
573
|
|
|
574
|
+
// packages/ui/react-ui/src/components/Buttons/IconButton.tsx
|
|
575
|
+
import React10, { forwardRef as forwardRef9 } from "react";
|
|
576
|
+
|
|
577
|
+
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
578
|
+
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
579
|
+
import React9, { forwardRef as forwardRef8 } from "react";
|
|
580
|
+
var TooltipProvider = TooltipProviderPrimitive;
|
|
581
|
+
var TooltipRoot = TooltipRootPrimitive;
|
|
582
|
+
var TooltipPortal = TooltipPortalPrimitive;
|
|
583
|
+
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
584
|
+
var TooltipArrow = /* @__PURE__ */ forwardRef8(({ classNames, ...props }, forwardedRef) => {
|
|
585
|
+
const { tx } = useThemeContext();
|
|
586
|
+
return /* @__PURE__ */ React9.createElement(TooltipArrowPrimitive, {
|
|
587
|
+
...props,
|
|
588
|
+
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
589
|
+
ref: forwardedRef
|
|
590
|
+
});
|
|
591
|
+
});
|
|
592
|
+
var TooltipContent = /* @__PURE__ */ forwardRef8(({ classNames, ...props }, forwardedRef) => {
|
|
593
|
+
const { tx } = useThemeContext();
|
|
594
|
+
return /* @__PURE__ */ React9.createElement(TooltipContentPrimitive, {
|
|
595
|
+
sideOffset: 4,
|
|
596
|
+
collisionPadding: 8,
|
|
597
|
+
...props,
|
|
598
|
+
className: tx("tooltip.content", "tooltip", {}, classNames),
|
|
599
|
+
ref: forwardedRef
|
|
600
|
+
});
|
|
601
|
+
});
|
|
602
|
+
var Tooltip = {
|
|
603
|
+
Provider: TooltipProvider,
|
|
604
|
+
Root: TooltipRoot,
|
|
605
|
+
Portal: TooltipPortal,
|
|
606
|
+
Trigger: TooltipTrigger,
|
|
607
|
+
Arrow: TooltipArrow,
|
|
608
|
+
Content: TooltipContent
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
// packages/ui/react-ui/src/components/Buttons/IconButton.tsx
|
|
612
|
+
var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, ...props }, forwardedRef) => {
|
|
613
|
+
const content = /* @__PURE__ */ React10.createElement(Tooltip.Content, zIndex && {
|
|
614
|
+
style: {
|
|
615
|
+
zIndex
|
|
616
|
+
}
|
|
617
|
+
}, props.label, /* @__PURE__ */ React10.createElement(Tooltip.Arrow, null));
|
|
618
|
+
return /* @__PURE__ */ React10.createElement(Tooltip.Root, null, /* @__PURE__ */ React10.createElement(Tooltip.Trigger, {
|
|
619
|
+
asChild: true
|
|
620
|
+
}, /* @__PURE__ */ React10.createElement(LabelledIconButton, {
|
|
621
|
+
...props,
|
|
622
|
+
ref: forwardedRef
|
|
623
|
+
})), tooltipPortal ? /* @__PURE__ */ React10.createElement(Tooltip.Portal, null, content) : content);
|
|
624
|
+
});
|
|
625
|
+
var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, label, classNames, ...props }, forwardedRef) => {
|
|
626
|
+
const { tx } = useThemeContext();
|
|
627
|
+
return /* @__PURE__ */ React10.createElement(Button, {
|
|
628
|
+
...props,
|
|
629
|
+
classNames: tx("iconButton.root", "iconButton", {}, classNames),
|
|
630
|
+
ref: forwardedRef
|
|
631
|
+
}, /* @__PURE__ */ React10.createElement(Icon, {
|
|
632
|
+
icon,
|
|
633
|
+
size
|
|
634
|
+
}), /* @__PURE__ */ React10.createElement("span", {
|
|
635
|
+
className: iconOnly ? "sr-only" : void 0
|
|
636
|
+
}, label));
|
|
637
|
+
});
|
|
638
|
+
var IconButton = /* @__PURE__ */ forwardRef9((props, forwardedRef) => props.iconOnly ? /* @__PURE__ */ React10.createElement(IconOnlyButton, {
|
|
639
|
+
...props,
|
|
640
|
+
ref: forwardedRef
|
|
641
|
+
}) : /* @__PURE__ */ React10.createElement(LabelledIconButton, {
|
|
642
|
+
...props,
|
|
643
|
+
ref: forwardedRef
|
|
644
|
+
}));
|
|
645
|
+
|
|
574
646
|
// packages/ui/react-ui/src/components/Buttons/Toggle.tsx
|
|
575
647
|
import { Toggle as TogglePrimitive } from "@radix-ui/react-toggle";
|
|
576
|
-
import
|
|
577
|
-
var Toggle = /* @__PURE__ */
|
|
578
|
-
return /* @__PURE__ */
|
|
648
|
+
import React11, { forwardRef as forwardRef10 } from "react";
|
|
649
|
+
var Toggle = /* @__PURE__ */ forwardRef10(({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {
|
|
650
|
+
return /* @__PURE__ */ React11.createElement(TogglePrimitive, {
|
|
579
651
|
defaultPressed,
|
|
580
652
|
pressed,
|
|
581
653
|
onPressedChange,
|
|
582
654
|
asChild: true
|
|
583
|
-
}, /* @__PURE__ */
|
|
655
|
+
}, /* @__PURE__ */ React11.createElement(Button, {
|
|
584
656
|
...props,
|
|
585
657
|
ref: forwardedRef
|
|
586
658
|
}));
|
|
@@ -588,22 +660,22 @@ var Toggle = /* @__PURE__ */ forwardRef8(({ defaultPressed, pressed, onPressedCh
|
|
|
588
660
|
|
|
589
661
|
// packages/ui/react-ui/src/components/Buttons/ToggleGroup.tsx
|
|
590
662
|
import { ToggleGroup as ToggleGroupPrimitive, ToggleGroupItem as ToggleGroupItemPrimitive } from "@radix-ui/react-toggle-group";
|
|
591
|
-
import
|
|
592
|
-
var ToggleGroup = /* @__PURE__ */
|
|
593
|
-
return /* @__PURE__ */
|
|
663
|
+
import React12, { forwardRef as forwardRef11 } from "react";
|
|
664
|
+
var ToggleGroup = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
665
|
+
return /* @__PURE__ */ React12.createElement(ToggleGroupPrimitive, {
|
|
594
666
|
...props,
|
|
595
667
|
asChild: true
|
|
596
|
-
}, /* @__PURE__ */
|
|
668
|
+
}, /* @__PURE__ */ React12.createElement(ButtonGroup, {
|
|
597
669
|
classNames,
|
|
598
670
|
children,
|
|
599
671
|
ref: forwardedRef
|
|
600
672
|
}));
|
|
601
673
|
});
|
|
602
|
-
var ToggleGroupItem = /* @__PURE__ */
|
|
603
|
-
return /* @__PURE__ */
|
|
674
|
+
var ToggleGroupItem = /* @__PURE__ */ forwardRef11(({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {
|
|
675
|
+
return /* @__PURE__ */ React12.createElement(ToggleGroupItemPrimitive, {
|
|
604
676
|
...props,
|
|
605
677
|
asChild: true
|
|
606
|
-
}, /* @__PURE__ */
|
|
678
|
+
}, /* @__PURE__ */ React12.createElement(Button, {
|
|
607
679
|
variant,
|
|
608
680
|
elevation,
|
|
609
681
|
density,
|
|
@@ -616,14 +688,14 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef9(({ variant, elevation, density
|
|
|
616
688
|
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
617
689
|
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
618
690
|
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";
|
|
619
|
-
import
|
|
691
|
+
import React14, { forwardRef as forwardRef12 } from "react";
|
|
620
692
|
|
|
621
693
|
// packages/ui/react-ui/src/components/ElevationProvider/ElevationProvider.tsx
|
|
622
|
-
import
|
|
694
|
+
import React13, { createContext as createContext4 } from "react";
|
|
623
695
|
var ElevationContext = /* @__PURE__ */ createContext4({
|
|
624
696
|
elevation: "base"
|
|
625
697
|
});
|
|
626
|
-
var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */
|
|
698
|
+
var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React13.createElement(ElevationContext.Provider, {
|
|
627
699
|
value: {
|
|
628
700
|
elevation
|
|
629
701
|
}
|
|
@@ -633,9 +705,9 @@ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React11.cre
|
|
|
633
705
|
var DialogRoot = DialogRootPrimitive;
|
|
634
706
|
var DialogTrigger = DialogTriggerPrimitive;
|
|
635
707
|
var DialogPortal = DialogPortalPrimitive;
|
|
636
|
-
var DialogTitle = /* @__PURE__ */
|
|
708
|
+
var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
637
709
|
const { tx } = useThemeContext();
|
|
638
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ React14.createElement(DialogTitlePrimitive, {
|
|
639
711
|
...props,
|
|
640
712
|
className: tx("dialog.title", "dialog__title", {
|
|
641
713
|
srOnly
|
|
@@ -643,9 +715,9 @@ var DialogTitle = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }
|
|
|
643
715
|
ref: forwardedRef
|
|
644
716
|
});
|
|
645
717
|
});
|
|
646
|
-
var DialogDescription = /* @__PURE__ */
|
|
718
|
+
var DialogDescription = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
647
719
|
const { tx } = useThemeContext();
|
|
648
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ React14.createElement(DialogDescriptionPrimitive, {
|
|
649
721
|
...props,
|
|
650
722
|
className: tx("dialog.description", "dialog__description", {
|
|
651
723
|
srOnly
|
|
@@ -659,28 +731,28 @@ var DIALOG_CONTENT_NAME = "DialogContent";
|
|
|
659
731
|
var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
|
|
660
732
|
inOverlayLayout: false
|
|
661
733
|
});
|
|
662
|
-
var DialogOverlay = /* @__PURE__ */
|
|
734
|
+
var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
|
|
663
735
|
const { tx } = useThemeContext();
|
|
664
|
-
return /* @__PURE__ */
|
|
736
|
+
return /* @__PURE__ */ React14.createElement(DialogOverlayPrimitive, {
|
|
665
737
|
...props,
|
|
666
738
|
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"),
|
|
667
739
|
ref: forwardedRef,
|
|
668
740
|
"data-block-align": blockAlign
|
|
669
|
-
}, /* @__PURE__ */
|
|
741
|
+
}, /* @__PURE__ */ React14.createElement(OverlayLayoutProvider, {
|
|
670
742
|
inOverlayLayout: true
|
|
671
743
|
}, children));
|
|
672
744
|
});
|
|
673
745
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
674
|
-
var DialogContent = /* @__PURE__ */
|
|
746
|
+
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
675
747
|
const { tx } = useThemeContext();
|
|
676
748
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
677
|
-
return /* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ React14.createElement(DialogContentPrimitive, {
|
|
678
750
|
...props,
|
|
679
751
|
className: tx("dialog.content", "dialog", {
|
|
680
752
|
inOverlayLayout
|
|
681
753
|
}, classNames),
|
|
682
754
|
ref: forwardedRef
|
|
683
|
-
}, /* @__PURE__ */
|
|
755
|
+
}, /* @__PURE__ */ React14.createElement(ElevationProvider, {
|
|
684
756
|
elevation: "chrome"
|
|
685
757
|
}, children));
|
|
686
758
|
});
|
|
@@ -699,15 +771,15 @@ var Dialog = {
|
|
|
699
771
|
// packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
|
|
700
772
|
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";
|
|
701
773
|
import { createContext as createContext6 } from "@radix-ui/react-context";
|
|
702
|
-
import
|
|
774
|
+
import React15, { forwardRef as forwardRef13 } from "react";
|
|
703
775
|
var AlertDialogRoot = AlertDialogRootPrimitive;
|
|
704
776
|
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
705
777
|
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
706
778
|
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
707
779
|
var AlertDialogAction = AlertDialogActionPrimitive;
|
|
708
|
-
var AlertDialogTitle = /* @__PURE__ */
|
|
780
|
+
var AlertDialogTitle = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
709
781
|
const { tx } = useThemeContext();
|
|
710
|
-
return /* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ React15.createElement(AlertDialogTitlePrimitive, {
|
|
711
783
|
...props,
|
|
712
784
|
className: tx("dialog.title", "dialog--alert__title", {
|
|
713
785
|
srOnly
|
|
@@ -715,9 +787,9 @@ var AlertDialogTitle = /* @__PURE__ */ forwardRef11(({ classNames, srOnly, ...pr
|
|
|
715
787
|
ref: forwardedRef
|
|
716
788
|
});
|
|
717
789
|
});
|
|
718
|
-
var AlertDialogDescription = /* @__PURE__ */
|
|
790
|
+
var AlertDialogDescription = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
719
791
|
const { tx } = useThemeContext();
|
|
720
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ React15.createElement(AlertDialogDescriptionPrimitive, {
|
|
721
793
|
...props,
|
|
722
794
|
className: tx("dialog.description", "dialog--alert__description", {
|
|
723
795
|
srOnly
|
|
@@ -730,27 +802,27 @@ var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
|
|
|
730
802
|
var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
|
|
731
803
|
inOverlayLayout: false
|
|
732
804
|
});
|
|
733
|
-
var AlertDialogOverlay = /* @__PURE__ */
|
|
805
|
+
var AlertDialogOverlay = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
734
806
|
const { tx } = useThemeContext();
|
|
735
|
-
return /* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ React15.createElement(AlertDialogOverlayPrimitive, {
|
|
736
808
|
...props,
|
|
737
809
|
className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
|
|
738
810
|
ref: forwardedRef
|
|
739
|
-
}, /* @__PURE__ */
|
|
811
|
+
}, /* @__PURE__ */ React15.createElement(OverlayLayoutProvider2, {
|
|
740
812
|
inOverlayLayout: true
|
|
741
813
|
}, children));
|
|
742
814
|
});
|
|
743
815
|
AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
|
|
744
|
-
var AlertDialogContent = /* @__PURE__ */
|
|
816
|
+
var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
745
817
|
const { tx } = useThemeContext();
|
|
746
818
|
const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
|
|
747
|
-
return /* @__PURE__ */
|
|
819
|
+
return /* @__PURE__ */ React15.createElement(AlertDialogContentPrimitive, {
|
|
748
820
|
...props,
|
|
749
821
|
className: tx("dialog.content", "dialog--alert", {
|
|
750
822
|
inOverlayLayout
|
|
751
823
|
}, classNames),
|
|
752
824
|
ref: forwardedRef
|
|
753
|
-
}, /* @__PURE__ */
|
|
825
|
+
}, /* @__PURE__ */ React15.createElement(ElevationProvider, {
|
|
754
826
|
elevation: "chrome"
|
|
755
827
|
}, children));
|
|
756
828
|
});
|
|
@@ -771,33 +843,33 @@ var AlertDialog = {
|
|
|
771
843
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
772
844
|
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
773
845
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
774
|
-
import
|
|
846
|
+
import React16, { forwardRef as forwardRef14 } from "react";
|
|
775
847
|
var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
|
|
776
848
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
777
849
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
778
|
-
var ContextMenuContent = /* @__PURE__ */
|
|
850
|
+
var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
|
|
779
851
|
const { tx } = useThemeContext();
|
|
780
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Content, {
|
|
781
853
|
collisionPadding: 8,
|
|
782
854
|
...props,
|
|
783
855
|
className: tx("menu.content", "menu", {}, classNames),
|
|
784
856
|
ref: forwardedRef
|
|
785
|
-
}, /* @__PURE__ */
|
|
857
|
+
}, /* @__PURE__ */ React16.createElement(ElevationProvider, {
|
|
786
858
|
elevation: "chrome"
|
|
787
859
|
}, children));
|
|
788
860
|
});
|
|
789
|
-
var ContextMenuViewport = /* @__PURE__ */
|
|
861
|
+
var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
790
862
|
const { tx } = useThemeContext();
|
|
791
863
|
const Root5 = asChild ? Slot6 : Primitive6.div;
|
|
792
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ React16.createElement(Root5, {
|
|
793
865
|
...props,
|
|
794
866
|
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
795
867
|
ref: forwardedRef
|
|
796
868
|
}, children);
|
|
797
869
|
});
|
|
798
|
-
var ContextMenuArrow = /* @__PURE__ */
|
|
870
|
+
var ContextMenuArrow = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
|
|
799
871
|
const { tx } = useThemeContext();
|
|
800
|
-
return /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Arrow, {
|
|
801
873
|
...props,
|
|
802
874
|
className: tx("menu.arrow", "menu__arrow", {}, classNames),
|
|
803
875
|
ref: forwardedRef
|
|
@@ -805,33 +877,33 @@ var ContextMenuArrow = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, f
|
|
|
805
877
|
});
|
|
806
878
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
807
879
|
var ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;
|
|
808
|
-
var ContextMenuItem = /* @__PURE__ */
|
|
880
|
+
var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
|
|
809
881
|
const { tx } = useThemeContext();
|
|
810
|
-
return /* @__PURE__ */
|
|
882
|
+
return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Item, {
|
|
811
883
|
...props,
|
|
812
884
|
className: tx("menu.item", "menu__item", {}, classNames),
|
|
813
885
|
ref: forwardedRef
|
|
814
886
|
});
|
|
815
887
|
});
|
|
816
|
-
var ContextMenuCheckboxItem = /* @__PURE__ */
|
|
888
|
+
var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
|
|
817
889
|
const { tx } = useThemeContext();
|
|
818
|
-
return /* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.CheckboxItem, {
|
|
819
891
|
...props,
|
|
820
892
|
className: tx("menu.item", "menu__item--checkbox", {}, classNames),
|
|
821
893
|
ref: forwardedRef
|
|
822
894
|
});
|
|
823
895
|
});
|
|
824
|
-
var ContextMenuSeparator = /* @__PURE__ */
|
|
896
|
+
var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
|
|
825
897
|
const { tx } = useThemeContext();
|
|
826
|
-
return /* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Separator, {
|
|
827
899
|
...props,
|
|
828
900
|
className: tx("menu.separator", "menu__item", {}, classNames),
|
|
829
901
|
ref: forwardedRef
|
|
830
902
|
});
|
|
831
903
|
});
|
|
832
|
-
var ContextMenuGroupLabel = /* @__PURE__ */
|
|
904
|
+
var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
|
|
833
905
|
const { tx } = useThemeContext();
|
|
834
|
-
return /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ React16.createElement(ContextMenuPrimitive.Label, {
|
|
835
907
|
...props,
|
|
836
908
|
className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
|
|
837
909
|
ref: forwardedRef
|
|
@@ -862,7 +934,7 @@ import { createMenuScope } from "@radix-ui/react-menu";
|
|
|
862
934
|
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
863
935
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
864
936
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
865
|
-
import
|
|
937
|
+
import React17, { useRef, useCallback, forwardRef as forwardRef15, useEffect as useEffect3 } from "react";
|
|
866
938
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
867
939
|
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
|
|
868
940
|
createMenuScope
|
|
@@ -878,7 +950,7 @@ var DropdownMenuRoot = (props) => {
|
|
|
878
950
|
defaultProp: defaultOpen,
|
|
879
951
|
onChange: onOpenChange
|
|
880
952
|
});
|
|
881
|
-
return /* @__PURE__ */
|
|
953
|
+
return /* @__PURE__ */ React17.createElement(DropdownMenuProvider, {
|
|
882
954
|
scope: __scopeDropdownMenu,
|
|
883
955
|
triggerId: useId3(),
|
|
884
956
|
triggerRef,
|
|
@@ -889,7 +961,7 @@ var DropdownMenuRoot = (props) => {
|
|
|
889
961
|
setOpen
|
|
890
962
|
]),
|
|
891
963
|
modal
|
|
892
|
-
}, /* @__PURE__ */
|
|
964
|
+
}, /* @__PURE__ */ React17.createElement(MenuPrimitive.Root, {
|
|
893
965
|
...menuScope,
|
|
894
966
|
open,
|
|
895
967
|
onOpenChange: setOpen,
|
|
@@ -899,14 +971,14 @@ var DropdownMenuRoot = (props) => {
|
|
|
899
971
|
};
|
|
900
972
|
DropdownMenuRoot.displayName = DROPDOWN_MENU_NAME;
|
|
901
973
|
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
902
|
-
var DropdownMenuTrigger = /* @__PURE__ */
|
|
974
|
+
var DropdownMenuTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
903
975
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
904
976
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
905
977
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
906
|
-
return /* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Anchor, {
|
|
907
979
|
asChild: true,
|
|
908
980
|
...menuScope
|
|
909
|
-
}, /* @__PURE__ */
|
|
981
|
+
}, /* @__PURE__ */ React17.createElement(Primitive7.button, {
|
|
910
982
|
type: "button",
|
|
911
983
|
id: context.triggerId,
|
|
912
984
|
"aria-haspopup": "menu",
|
|
@@ -959,7 +1031,7 @@ var DropdownMenuVirtualTrigger = (props) => {
|
|
|
959
1031
|
context.triggerRef.current = virtualRef.current;
|
|
960
1032
|
}
|
|
961
1033
|
});
|
|
962
|
-
return /* @__PURE__ */
|
|
1034
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Anchor, {
|
|
963
1035
|
...menuScope,
|
|
964
1036
|
virtualRef
|
|
965
1037
|
});
|
|
@@ -969,29 +1041,29 @@ var PORTAL_NAME = "DropdownMenuPortal";
|
|
|
969
1041
|
var DropdownMenuPortal = (props) => {
|
|
970
1042
|
const { __scopeDropdownMenu, ...portalProps } = props;
|
|
971
1043
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
972
|
-
return /* @__PURE__ */
|
|
1044
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Portal, {
|
|
973
1045
|
...menuScope,
|
|
974
1046
|
...portalProps
|
|
975
1047
|
});
|
|
976
1048
|
};
|
|
977
1049
|
DropdownMenuPortal.displayName = PORTAL_NAME;
|
|
978
|
-
var DropdownMenuViewport = /* @__PURE__ */
|
|
1050
|
+
var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
979
1051
|
const { tx } = useThemeContext();
|
|
980
1052
|
const Root5 = asChild ? Slot7 : Primitive7.div;
|
|
981
|
-
return /* @__PURE__ */
|
|
1053
|
+
return /* @__PURE__ */ React17.createElement(Root5, {
|
|
982
1054
|
...props,
|
|
983
1055
|
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
984
1056
|
ref: forwardedRef
|
|
985
1057
|
}, children);
|
|
986
1058
|
});
|
|
987
1059
|
var CONTENT_NAME = "DropdownMenuContent";
|
|
988
|
-
var DropdownMenuContent = /* @__PURE__ */
|
|
1060
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
989
1061
|
const { __scopeDropdownMenu, classNames, ...contentProps } = props;
|
|
990
1062
|
const { tx } = useThemeContext();
|
|
991
1063
|
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
992
1064
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
993
1065
|
const hasInteractedOutsideRef = useRef(false);
|
|
994
|
-
return /* @__PURE__ */
|
|
1066
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Content, {
|
|
995
1067
|
id: context.contentId,
|
|
996
1068
|
"aria-labelledby": context.triggerId,
|
|
997
1069
|
...menuScope,
|
|
@@ -1028,10 +1100,10 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef13((props, forwardedRef) =>
|
|
|
1028
1100
|
});
|
|
1029
1101
|
DropdownMenuContent.displayName = CONTENT_NAME;
|
|
1030
1102
|
var GROUP_NAME = "DropdownMenuGroup";
|
|
1031
|
-
var DropdownMenuGroup = /* @__PURE__ */
|
|
1103
|
+
var DropdownMenuGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1032
1104
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
1033
1105
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1034
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Group, {
|
|
1035
1107
|
...menuScope,
|
|
1036
1108
|
...groupProps,
|
|
1037
1109
|
ref: forwardedRef
|
|
@@ -1039,11 +1111,11 @@ var DropdownMenuGroup = /* @__PURE__ */ forwardRef13((props, forwardedRef) => {
|
|
|
1039
1111
|
});
|
|
1040
1112
|
DropdownMenuGroup.displayName = GROUP_NAME;
|
|
1041
1113
|
var LABEL_NAME = "DropdownMenuLabel";
|
|
1042
|
-
var DropdownMenuGroupLabel = /* @__PURE__ */
|
|
1114
|
+
var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1043
1115
|
const { __scopeDropdownMenu, classNames, ...labelProps } = props;
|
|
1044
1116
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1045
1117
|
const { tx } = useThemeContext();
|
|
1046
|
-
return /* @__PURE__ */
|
|
1118
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Label, {
|
|
1047
1119
|
...menuScope,
|
|
1048
1120
|
...labelProps,
|
|
1049
1121
|
className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
|
|
@@ -1052,11 +1124,11 @@ var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef13((props, forwardedRef)
|
|
|
1052
1124
|
});
|
|
1053
1125
|
DropdownMenuGroupLabel.displayName = LABEL_NAME;
|
|
1054
1126
|
var ITEM_NAME = "DropdownMenuItem";
|
|
1055
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
1127
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1056
1128
|
const { __scopeDropdownMenu, classNames, ...itemProps } = props;
|
|
1057
1129
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1058
1130
|
const { tx } = useThemeContext();
|
|
1059
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Item, {
|
|
1060
1132
|
...menuScope,
|
|
1061
1133
|
...itemProps,
|
|
1062
1134
|
className: tx("menu.item", "menu__item", {}, classNames),
|
|
@@ -1065,11 +1137,11 @@ var DropdownMenuItem = /* @__PURE__ */ forwardRef13((props, forwardedRef) => {
|
|
|
1065
1137
|
});
|
|
1066
1138
|
DropdownMenuItem.displayName = ITEM_NAME;
|
|
1067
1139
|
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
1068
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */
|
|
1140
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1069
1141
|
const { __scopeDropdownMenu, classNames, ...checkboxItemProps } = props;
|
|
1070
1142
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1071
1143
|
const { tx } = useThemeContext();
|
|
1072
|
-
return /* @__PURE__ */
|
|
1144
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.CheckboxItem, {
|
|
1073
1145
|
...menuScope,
|
|
1074
1146
|
...checkboxItemProps,
|
|
1075
1147
|
className: tx("menu.item", "menu__item--checkbox", {}, classNames),
|
|
@@ -1078,10 +1150,10 @@ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef13((props, forwardedRef
|
|
|
1078
1150
|
});
|
|
1079
1151
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
1080
1152
|
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
1081
|
-
var DropdownMenuRadioGroup = /* @__PURE__ */
|
|
1153
|
+
var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1082
1154
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
1083
1155
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1084
|
-
return /* @__PURE__ */
|
|
1156
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.RadioGroup, {
|
|
1085
1157
|
...menuScope,
|
|
1086
1158
|
...radioGroupProps,
|
|
1087
1159
|
ref: forwardedRef
|
|
@@ -1089,10 +1161,10 @@ var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef13((props, forwardedRef)
|
|
|
1089
1161
|
});
|
|
1090
1162
|
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
1091
1163
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
1092
|
-
var DropdownMenuRadioItem = /* @__PURE__ */
|
|
1164
|
+
var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1093
1165
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
1094
1166
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1095
|
-
return /* @__PURE__ */
|
|
1167
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.RadioItem, {
|
|
1096
1168
|
...menuScope,
|
|
1097
1169
|
...radioItemProps,
|
|
1098
1170
|
ref: forwardedRef
|
|
@@ -1100,10 +1172,10 @@ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef13((props, forwardedRef) =
|
|
|
1100
1172
|
});
|
|
1101
1173
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
1102
1174
|
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
1103
|
-
var DropdownMenuItemIndicator = /* @__PURE__ */
|
|
1175
|
+
var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1104
1176
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
1105
1177
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1106
|
-
return /* @__PURE__ */
|
|
1178
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.ItemIndicator, {
|
|
1107
1179
|
...menuScope,
|
|
1108
1180
|
...itemIndicatorProps,
|
|
1109
1181
|
ref: forwardedRef
|
|
@@ -1111,11 +1183,11 @@ var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef13((props, forwardedRe
|
|
|
1111
1183
|
});
|
|
1112
1184
|
DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
1113
1185
|
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
1114
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
1186
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1115
1187
|
const { __scopeDropdownMenu, classNames, ...separatorProps } = props;
|
|
1116
1188
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1117
1189
|
const { tx } = useThemeContext();
|
|
1118
|
-
return /* @__PURE__ */
|
|
1190
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Separator, {
|
|
1119
1191
|
...menuScope,
|
|
1120
1192
|
...separatorProps,
|
|
1121
1193
|
className: tx("menu.separator", "menu__item", {}, classNames),
|
|
@@ -1124,11 +1196,11 @@ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef13((props, forwardedRef) =
|
|
|
1124
1196
|
});
|
|
1125
1197
|
DropdownMenuSeparator.displayName = SEPARATOR_NAME;
|
|
1126
1198
|
var ARROW_NAME = "DropdownMenuArrow";
|
|
1127
|
-
var DropdownMenuArrow = /* @__PURE__ */
|
|
1199
|
+
var DropdownMenuArrow = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1128
1200
|
const { __scopeDropdownMenu, classNames, ...arrowProps } = props;
|
|
1129
1201
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1130
1202
|
const { tx } = useThemeContext();
|
|
1131
|
-
return /* @__PURE__ */
|
|
1203
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Arrow, {
|
|
1132
1204
|
...menuScope,
|
|
1133
1205
|
...arrowProps,
|
|
1134
1206
|
className: tx("menu.arrow", "menu__arrow", {}, classNames),
|
|
@@ -1144,17 +1216,17 @@ var DropdownMenuSub = (props) => {
|
|
|
1144
1216
|
defaultProp: defaultOpen,
|
|
1145
1217
|
onChange: onOpenChange
|
|
1146
1218
|
});
|
|
1147
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.Sub, {
|
|
1148
1220
|
...menuScope,
|
|
1149
1221
|
open,
|
|
1150
1222
|
onOpenChange: setOpen
|
|
1151
1223
|
}, children);
|
|
1152
1224
|
};
|
|
1153
1225
|
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
1154
|
-
var DropdownMenuSubTrigger = /* @__PURE__ */
|
|
1226
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1155
1227
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
1156
1228
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1157
|
-
return /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.SubTrigger, {
|
|
1158
1230
|
...menuScope,
|
|
1159
1231
|
...subTriggerProps,
|
|
1160
1232
|
ref: forwardedRef
|
|
@@ -1162,10 +1234,10 @@ var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef13((props, forwardedRef)
|
|
|
1162
1234
|
});
|
|
1163
1235
|
DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
1164
1236
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
1165
|
-
var DropdownMenuSubContent = /* @__PURE__ */
|
|
1237
|
+
var DropdownMenuSubContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1166
1238
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
1167
1239
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1168
|
-
return /* @__PURE__ */
|
|
1240
|
+
return /* @__PURE__ */ React17.createElement(MenuPrimitive.SubContent, {
|
|
1169
1241
|
...menuScope,
|
|
1170
1242
|
...subContentProps,
|
|
1171
1243
|
ref: forwardedRef,
|
|
@@ -1210,11 +1282,11 @@ import { Check, Minus } from "@phosphor-icons/react";
|
|
|
1210
1282
|
import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
|
|
1211
1283
|
import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
|
|
1212
1284
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1213
|
-
import
|
|
1285
|
+
import React18, { forwardRef as forwardRef16, Fragment, useCallback as useCallback2 } from "react";
|
|
1214
1286
|
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";
|
|
1215
|
-
var Label3 = /* @__PURE__ */
|
|
1287
|
+
var Label3 = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1216
1288
|
const { tx } = useThemeContext();
|
|
1217
|
-
return /* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ React18.createElement(LabelPrimitive, {
|
|
1218
1290
|
...props,
|
|
1219
1291
|
className: tx("input.label", "input__label", {
|
|
1220
1292
|
srOnly
|
|
@@ -1222,9 +1294,9 @@ var Label3 = /* @__PURE__ */ forwardRef14(({ srOnly, classNames, children, ...pr
|
|
|
1222
1294
|
ref: forwardedRef
|
|
1223
1295
|
}, children);
|
|
1224
1296
|
});
|
|
1225
|
-
var Description = /* @__PURE__ */
|
|
1297
|
+
var Description = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1226
1298
|
const { tx } = useThemeContext();
|
|
1227
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ React18.createElement(DescriptionPrimitive, {
|
|
1228
1300
|
...props,
|
|
1229
1301
|
className: tx("input.description", "input__description", {
|
|
1230
1302
|
srOnly
|
|
@@ -1232,10 +1304,10 @@ var Description = /* @__PURE__ */ forwardRef14(({ srOnly, classNames, children,
|
|
|
1232
1304
|
ref: forwardedRef
|
|
1233
1305
|
}, children);
|
|
1234
1306
|
});
|
|
1235
|
-
var Validation = /* @__PURE__ */
|
|
1307
|
+
var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1236
1308
|
const { tx } = useThemeContext();
|
|
1237
1309
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
1238
|
-
return /* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ React18.createElement(ValidationPrimitive, {
|
|
1239
1311
|
...props,
|
|
1240
1312
|
className: tx("input.validation", `input__validation-message input__validation-message--${validationValence}`, {
|
|
1241
1313
|
srOnly,
|
|
@@ -1244,9 +1316,9 @@ var Validation = /* @__PURE__ */ forwardRef14(({ __inputScope, srOnly, className
|
|
|
1244
1316
|
ref: forwardedRef
|
|
1245
1317
|
}, children);
|
|
1246
1318
|
});
|
|
1247
|
-
var DescriptionAndValidation = /* @__PURE__ */
|
|
1319
|
+
var DescriptionAndValidation = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1248
1320
|
const { tx } = useThemeContext();
|
|
1249
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ React18.createElement(DescriptionAndValidationPrimitive, {
|
|
1250
1322
|
...props,
|
|
1251
1323
|
className: tx("input.descriptionAndValidation", "input__description-and-validation", {
|
|
1252
1324
|
srOnly
|
|
@@ -1254,7 +1326,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef14(({ srOnly, className
|
|
|
1254
1326
|
ref: forwardedRef
|
|
1255
1327
|
}, children);
|
|
1256
1328
|
});
|
|
1257
|
-
var PinInput = /* @__PURE__ */
|
|
1329
|
+
var PinInput = /* @__PURE__ */ forwardRef16(({ density: propsDensity, elevation: propsElevation, segmentClassName: propsSegmentClassName, inputClassName, variant, ...props }, forwardedRef) => {
|
|
1258
1330
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
1259
1331
|
const { tx } = useThemeContext();
|
|
1260
1332
|
const density = useDensityContext(propsDensity);
|
|
@@ -1273,7 +1345,7 @@ var PinInput = /* @__PURE__ */ forwardRef14(({ density: propsDensity, elevation:
|
|
|
1273
1345
|
propsElevation,
|
|
1274
1346
|
density
|
|
1275
1347
|
]);
|
|
1276
|
-
return /* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ React18.createElement(PinInputPrimitive, {
|
|
1277
1349
|
...props,
|
|
1278
1350
|
segmentClassName,
|
|
1279
1351
|
...props.autoFocus && !hasIosKeyboard2 && {
|
|
@@ -1285,14 +1357,14 @@ var PinInput = /* @__PURE__ */ forwardRef14(({ density: propsDensity, elevation:
|
|
|
1285
1357
|
ref: forwardedRef
|
|
1286
1358
|
});
|
|
1287
1359
|
});
|
|
1288
|
-
var TextInput = /* @__PURE__ */
|
|
1360
|
+
var TextInput = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
1289
1361
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
1290
1362
|
const themeContextValue = useThemeContext();
|
|
1291
1363
|
const density = useDensityContext(propsDensity);
|
|
1292
1364
|
const elevation = useElevationContext(propsElevation);
|
|
1293
1365
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
1294
1366
|
const { tx } = themeContextValue;
|
|
1295
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ React18.createElement(TextInputPrimitive, {
|
|
1296
1368
|
...props,
|
|
1297
1369
|
className: tx("input.input", "input", {
|
|
1298
1370
|
variant,
|
|
@@ -1307,13 +1379,13 @@ var TextInput = /* @__PURE__ */ forwardRef14(({ __inputScope, classNames, densit
|
|
|
1307
1379
|
ref: forwardedRef
|
|
1308
1380
|
});
|
|
1309
1381
|
});
|
|
1310
|
-
var TextArea = /* @__PURE__ */
|
|
1382
|
+
var TextArea = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
1311
1383
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
1312
1384
|
const { tx } = useThemeContext();
|
|
1313
1385
|
const density = useDensityContext(propsDensity);
|
|
1314
1386
|
const elevation = useElevationContext(propsElevation);
|
|
1315
1387
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
1316
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ React18.createElement(TextAreaPrimitive, {
|
|
1317
1389
|
...props,
|
|
1318
1390
|
className: tx("input.input", "input--text-area", {
|
|
1319
1391
|
variant,
|
|
@@ -1328,7 +1400,7 @@ var TextArea = /* @__PURE__ */ forwardRef14(({ __inputScope, classNames, density
|
|
|
1328
1400
|
ref: forwardedRef
|
|
1329
1401
|
});
|
|
1330
1402
|
});
|
|
1331
|
-
var Checkbox = /* @__PURE__ */
|
|
1403
|
+
var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, weight = "bold", classNames, ...props }, forwardedRef) => {
|
|
1332
1404
|
const [checked, onCheckedChange] = useControllableState2({
|
|
1333
1405
|
prop: propsChecked,
|
|
1334
1406
|
defaultProp: propsDefaultChecked,
|
|
@@ -1337,7 +1409,7 @@ var Checkbox = /* @__PURE__ */ forwardRef14(({ __inputScope, checked: propsCheck
|
|
|
1337
1409
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1338
1410
|
const { tx } = useThemeContext();
|
|
1339
1411
|
const Icon3 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
1340
|
-
return /* @__PURE__ */
|
|
1412
|
+
return /* @__PURE__ */ React18.createElement(CheckboxPrimitive, {
|
|
1341
1413
|
...props,
|
|
1342
1414
|
checked,
|
|
1343
1415
|
onCheckedChange,
|
|
@@ -1351,16 +1423,16 @@ var Checkbox = /* @__PURE__ */ forwardRef14(({ __inputScope, checked: propsCheck
|
|
|
1351
1423
|
size
|
|
1352
1424
|
}, "shrink-0", classNames),
|
|
1353
1425
|
ref: forwardedRef
|
|
1354
|
-
}, /* @__PURE__ */
|
|
1426
|
+
}, /* @__PURE__ */ React18.createElement(CheckboxIndicatorPrimitive, {
|
|
1355
1427
|
asChild: true
|
|
1356
|
-
}, /* @__PURE__ */
|
|
1428
|
+
}, /* @__PURE__ */ React18.createElement(Icon3, checked && {
|
|
1357
1429
|
weight,
|
|
1358
1430
|
className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
1359
1431
|
size
|
|
1360
1432
|
})
|
|
1361
1433
|
})));
|
|
1362
1434
|
});
|
|
1363
|
-
var Switch = /* @__PURE__ */
|
|
1435
|
+
var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
|
|
1364
1436
|
const { tx } = useThemeContext();
|
|
1365
1437
|
const [checked, onCheckedChange] = useControllableState2({
|
|
1366
1438
|
prop: propsChecked,
|
|
@@ -1368,7 +1440,7 @@ var Switch = /* @__PURE__ */ forwardRef14(({ __inputScope, checked: propsChecked
|
|
|
1368
1440
|
onChange: propsOnCheckedChange
|
|
1369
1441
|
});
|
|
1370
1442
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1371
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ React18.createElement(SwitchPrimitive, {
|
|
1372
1444
|
...props,
|
|
1373
1445
|
checked,
|
|
1374
1446
|
onCheckedChange,
|
|
@@ -1382,7 +1454,7 @@ var Switch = /* @__PURE__ */ forwardRef14(({ __inputScope, checked: propsChecked
|
|
|
1382
1454
|
size
|
|
1383
1455
|
}, classNames),
|
|
1384
1456
|
ref: forwardedRef
|
|
1385
|
-
}, /* @__PURE__ */
|
|
1457
|
+
}, /* @__PURE__ */ React18.createElement(SwitchThumbPrimitive, {
|
|
1386
1458
|
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
1387
1459
|
size
|
|
1388
1460
|
})
|
|
@@ -1404,37 +1476,37 @@ var Input = {
|
|
|
1404
1476
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1405
1477
|
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1406
1478
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1407
|
-
import
|
|
1479
|
+
import React20, { forwardRef as forwardRef17 } from "react";
|
|
1408
1480
|
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";
|
|
1409
1481
|
|
|
1410
1482
|
// packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
|
|
1411
|
-
import
|
|
1483
|
+
import React19, { createContext as createContext7 } from "react";
|
|
1412
1484
|
var DensityContext = /* @__PURE__ */ createContext7({
|
|
1413
1485
|
density: "fine"
|
|
1414
1486
|
});
|
|
1415
|
-
var DensityProvider = ({ density, children }) => /* @__PURE__ */
|
|
1487
|
+
var DensityProvider = ({ density, children }) => /* @__PURE__ */ React19.createElement(DensityContext.Provider, {
|
|
1416
1488
|
value: {
|
|
1417
1489
|
density
|
|
1418
1490
|
}
|
|
1419
1491
|
}, children);
|
|
1420
1492
|
|
|
1421
1493
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1422
|
-
var List = /* @__PURE__ */
|
|
1494
|
+
var List = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1423
1495
|
const { tx } = useThemeContext();
|
|
1424
1496
|
const density = useDensityContext(props.density);
|
|
1425
|
-
return /* @__PURE__ */
|
|
1497
|
+
return /* @__PURE__ */ React20.createElement(DensityProvider, {
|
|
1426
1498
|
density
|
|
1427
|
-
}, /* @__PURE__ */
|
|
1499
|
+
}, /* @__PURE__ */ React20.createElement(ListPrimitive, {
|
|
1428
1500
|
...props,
|
|
1429
1501
|
className: tx("list.root", "list", {}, classNames),
|
|
1430
1502
|
ref: forwardedRef
|
|
1431
1503
|
}, children));
|
|
1432
1504
|
});
|
|
1433
|
-
var ListItemEndcap = /* @__PURE__ */
|
|
1505
|
+
var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1434
1506
|
const Root5 = asChild ? Slot8 : "div";
|
|
1435
1507
|
const density = useDensityContext();
|
|
1436
1508
|
const { tx } = useThemeContext();
|
|
1437
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ React20.createElement(Root5, {
|
|
1438
1510
|
...!asChild && {
|
|
1439
1511
|
role: "none"
|
|
1440
1512
|
},
|
|
@@ -1448,7 +1520,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef15(({ children, classNames, asChi
|
|
|
1448
1520
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1449
1521
|
const density = useDensityContext();
|
|
1450
1522
|
const { tx } = useThemeContext();
|
|
1451
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ React20.createElement("div", {
|
|
1452
1524
|
role: "none",
|
|
1453
1525
|
...props,
|
|
1454
1526
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1456,10 +1528,10 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1456
1528
|
}, classNames)
|
|
1457
1529
|
});
|
|
1458
1530
|
};
|
|
1459
|
-
var ListItemHeading = /* @__PURE__ */
|
|
1531
|
+
var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
|
|
1460
1532
|
const { tx } = useThemeContext();
|
|
1461
1533
|
const density = useDensityContext();
|
|
1462
|
-
return /* @__PURE__ */
|
|
1534
|
+
return /* @__PURE__ */ React20.createElement(ListPrimitiveItemHeading, {
|
|
1463
1535
|
...props,
|
|
1464
1536
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1465
1537
|
density
|
|
@@ -1467,26 +1539,26 @@ var ListItemHeading = /* @__PURE__ */ forwardRef15(({ children, classNames, ...p
|
|
|
1467
1539
|
ref: forwardedRef
|
|
1468
1540
|
}, children);
|
|
1469
1541
|
});
|
|
1470
|
-
var ListItemOpenTrigger = /* @__PURE__ */
|
|
1542
|
+
var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
|
|
1471
1543
|
const { tx } = useThemeContext();
|
|
1472
1544
|
const density = useDensityContext();
|
|
1473
1545
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1474
1546
|
const Icon3 = open ? CaretDown : CaretRight;
|
|
1475
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React20.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1476
1548
|
...props,
|
|
1477
1549
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1478
1550
|
density
|
|
1479
1551
|
}, classNames),
|
|
1480
1552
|
ref: forwardedRef
|
|
1481
|
-
}, children || /* @__PURE__ */
|
|
1553
|
+
}, children || /* @__PURE__ */ React20.createElement(Icon3, {
|
|
1482
1554
|
weight: "bold",
|
|
1483
1555
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1484
1556
|
}));
|
|
1485
1557
|
});
|
|
1486
|
-
var ListItemRoot = /* @__PURE__ */
|
|
1558
|
+
var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1487
1559
|
const { tx } = useThemeContext();
|
|
1488
1560
|
const density = useDensityContext();
|
|
1489
|
-
return /* @__PURE__ */
|
|
1561
|
+
return /* @__PURE__ */ React20.createElement(ListPrimitiveItem, {
|
|
1490
1562
|
...props,
|
|
1491
1563
|
className: tx("list.item.root", "list__listItem", {
|
|
1492
1564
|
density,
|
|
@@ -1505,23 +1577,23 @@ var ListItem = {
|
|
|
1505
1577
|
};
|
|
1506
1578
|
|
|
1507
1579
|
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1508
|
-
import
|
|
1509
|
-
var TreeRoot = /* @__PURE__ */
|
|
1510
|
-
return /* @__PURE__ */
|
|
1580
|
+
import React21, { forwardRef as forwardRef18 } from "react";
|
|
1581
|
+
var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1582
|
+
return /* @__PURE__ */ React21.createElement(List, {
|
|
1511
1583
|
...props,
|
|
1512
1584
|
ref: forwardedRef
|
|
1513
1585
|
});
|
|
1514
1586
|
});
|
|
1515
|
-
var TreeBranch = /* @__PURE__ */
|
|
1587
|
+
var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
|
|
1516
1588
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1517
|
-
return /* @__PURE__ */
|
|
1589
|
+
return /* @__PURE__ */ React21.createElement(List, {
|
|
1518
1590
|
...props,
|
|
1519
1591
|
"aria-labelledby": headingId,
|
|
1520
1592
|
ref: forwardedRef
|
|
1521
1593
|
});
|
|
1522
1594
|
});
|
|
1523
|
-
var TreeItemRoot = /* @__PURE__ */
|
|
1524
|
-
return /* @__PURE__ */
|
|
1595
|
+
var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1596
|
+
return /* @__PURE__ */ React21.createElement(ListItem.Root, {
|
|
1525
1597
|
role: "treeitem",
|
|
1526
1598
|
...props,
|
|
1527
1599
|
ref: forwardedRef
|
|
@@ -1549,13 +1621,13 @@ import { createContextScope as createContextScope2 } from "@radix-ui/react-conte
|
|
|
1549
1621
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1550
1622
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1551
1623
|
import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
|
|
1552
|
-
import
|
|
1624
|
+
import React22, { forwardRef as forwardRef19 } from "react";
|
|
1553
1625
|
var TREEGRID_ROW_NAME = "TreegridRow";
|
|
1554
1626
|
var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
|
|
1555
1627
|
var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
|
|
1556
1628
|
var PATH_SEPARATOR = "~";
|
|
1557
1629
|
var PARENT_OF_SEPARATOR = " ";
|
|
1558
|
-
var TreegridRoot = /* @__PURE__ */
|
|
1630
|
+
var TreegridRoot = /* @__PURE__ */ forwardRef19(({ asChild, classNames, children, style, gridTemplateColumns, ...props }, forwardedRef) => {
|
|
1559
1631
|
const { tx } = useThemeContext();
|
|
1560
1632
|
const Root5 = asChild ? Slot9 : Primitive8.div;
|
|
1561
1633
|
const arrowNavigationAttrs = useArrowNavigationGroup({
|
|
@@ -1563,7 +1635,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef17(({ asChild, classNames, children
|
|
|
1563
1635
|
tabbable: false,
|
|
1564
1636
|
circular: true
|
|
1565
1637
|
});
|
|
1566
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ React22.createElement(Root5, {
|
|
1567
1639
|
role: "treegrid",
|
|
1568
1640
|
...arrowNavigationAttrs,
|
|
1569
1641
|
...props,
|
|
@@ -1575,7 +1647,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef17(({ asChild, classNames, children
|
|
|
1575
1647
|
ref: forwardedRef
|
|
1576
1648
|
}, children);
|
|
1577
1649
|
});
|
|
1578
|
-
var TreegridRow = /* @__PURE__ */
|
|
1650
|
+
var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, classNames, children, id, parentOf, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, ...props }, forwardedRef) => {
|
|
1579
1651
|
const { tx } = useThemeContext();
|
|
1580
1652
|
const Root5 = asChild ? Slot9 : Primitive8.div;
|
|
1581
1653
|
const pathParts = id.split(PATH_SEPARATOR);
|
|
@@ -1594,11 +1666,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef17(({ __treegridRowScope, asChild, c
|
|
|
1594
1666
|
circular: false,
|
|
1595
1667
|
memorizeCurrent: false
|
|
1596
1668
|
});
|
|
1597
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ React22.createElement(TreegridRowProvider, {
|
|
1598
1670
|
open,
|
|
1599
1671
|
onOpenChange,
|
|
1600
1672
|
scope: __treegridRowScope
|
|
1601
|
-
}, /* @__PURE__ */
|
|
1673
|
+
}, /* @__PURE__ */ React22.createElement(Root5, {
|
|
1602
1674
|
role: "row",
|
|
1603
1675
|
"aria-level": level,
|
|
1604
1676
|
className: tx("treegrid.row", "treegrid__row", {
|
|
@@ -1613,15 +1685,15 @@ var TreegridRow = /* @__PURE__ */ forwardRef17(({ __treegridRowScope, asChild, c
|
|
|
1613
1685
|
...props,
|
|
1614
1686
|
id,
|
|
1615
1687
|
ref: forwardedRef
|
|
1616
|
-
}, /* @__PURE__ */
|
|
1688
|
+
}, /* @__PURE__ */ React22.createElement("div", {
|
|
1617
1689
|
role: "none",
|
|
1618
1690
|
className: "contents",
|
|
1619
1691
|
...arrowGroupAttrs
|
|
1620
1692
|
}, children)));
|
|
1621
1693
|
});
|
|
1622
|
-
var TreegridCell = /* @__PURE__ */
|
|
1694
|
+
var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
|
|
1623
1695
|
const { tx } = useThemeContext();
|
|
1624
|
-
return /* @__PURE__ */
|
|
1696
|
+
return /* @__PURE__ */ React22.createElement("div", {
|
|
1625
1697
|
role: "gridcell",
|
|
1626
1698
|
className: tx("treegrid.cell", "treegrid__cell", {
|
|
1627
1699
|
indent
|
|
@@ -1648,7 +1720,7 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1648
1720
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1649
1721
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1650
1722
|
import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
|
|
1651
|
-
import
|
|
1723
|
+
import React23, { forwardRef as forwardRef20, useCallback as useCallback4, useEffect as useEffect5, useRef as useRef2, useState as useState4 } from "react";
|
|
1652
1724
|
import { log } from "@dxos/log";
|
|
1653
1725
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1654
1726
|
|
|
@@ -1868,7 +1940,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
1868
1940
|
}, [
|
|
1869
1941
|
handleResize
|
|
1870
1942
|
]);
|
|
1871
|
-
return /* @__PURE__ */
|
|
1943
|
+
return /* @__PURE__ */ React23.createElement(MainProvider, {
|
|
1872
1944
|
...props,
|
|
1873
1945
|
navigationSidebarOpen,
|
|
1874
1946
|
setNavigationSidebarOpen,
|
|
@@ -1881,7 +1953,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
1881
1953
|
var handleOpenAutoFocus = (event) => {
|
|
1882
1954
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
1883
1955
|
};
|
|
1884
|
-
var MainSidebar = /* @__PURE__ */
|
|
1956
|
+
var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, resizing, setOpen, side, ...props }, forwardedRef) => {
|
|
1885
1957
|
const [isLg] = useMediaQuery("lg", {
|
|
1886
1958
|
ssr: false
|
|
1887
1959
|
});
|
|
@@ -1900,10 +1972,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef18(({ classNames, children, swipeToD
|
|
|
1900
1972
|
props.onKeyDown
|
|
1901
1973
|
]);
|
|
1902
1974
|
const Root5 = isLg ? Primitive9.div : DialogContent2;
|
|
1903
|
-
return /* @__PURE__ */
|
|
1975
|
+
return /* @__PURE__ */ React23.createElement(DialogRoot2, {
|
|
1904
1976
|
open,
|
|
1905
1977
|
modal: false
|
|
1906
|
-
}, /* @__PURE__ */
|
|
1978
|
+
}, /* @__PURE__ */ React23.createElement(Root5, {
|
|
1907
1979
|
...!isLg && {
|
|
1908
1980
|
forceMount: true,
|
|
1909
1981
|
tabIndex: -1,
|
|
@@ -1919,14 +1991,14 @@ var MainSidebar = /* @__PURE__ */ forwardRef18(({ classNames, children, swipeToD
|
|
|
1919
1991
|
inert: "true"
|
|
1920
1992
|
},
|
|
1921
1993
|
ref
|
|
1922
|
-
}, /* @__PURE__ */
|
|
1994
|
+
}, /* @__PURE__ */ React23.createElement(ElevationProvider, {
|
|
1923
1995
|
elevation: "group"
|
|
1924
1996
|
}, children)));
|
|
1925
1997
|
});
|
|
1926
|
-
var MainNavigationSidebar = /* @__PURE__ */
|
|
1998
|
+
var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
1927
1999
|
const { navigationSidebarOpen, setNavigationSidebarOpen, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
1928
2000
|
const mover = useLandmarkMover(props.onKeyDown, "0");
|
|
1929
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ React23.createElement(MainSidebar, {
|
|
1930
2002
|
...mover,
|
|
1931
2003
|
...props,
|
|
1932
2004
|
open: navigationSidebarOpen,
|
|
@@ -1937,10 +2009,10 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef18((props, forwardedRef) =
|
|
|
1937
2009
|
});
|
|
1938
2010
|
});
|
|
1939
2011
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1940
|
-
var MainComplementarySidebar = /* @__PURE__ */
|
|
2012
|
+
var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
1941
2013
|
const { complementarySidebarOpen, setComplementarySidebarOpen, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
1942
2014
|
const mover = useLandmarkMover(props.onKeyDown, "2");
|
|
1943
|
-
return /* @__PURE__ */
|
|
2015
|
+
return /* @__PURE__ */ React23.createElement(MainSidebar, {
|
|
1944
2016
|
...mover,
|
|
1945
2017
|
...props,
|
|
1946
2018
|
open: complementarySidebarOpen,
|
|
@@ -1951,12 +2023,12 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef18((props, forwardedRef
|
|
|
1951
2023
|
});
|
|
1952
2024
|
});
|
|
1953
2025
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1954
|
-
var MainContent = /* @__PURE__ */
|
|
2026
|
+
var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
|
|
1955
2027
|
const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1956
2028
|
const { tx } = useThemeContext();
|
|
1957
2029
|
const Root5 = asChild ? Slot10 : role ? "div" : "main";
|
|
1958
2030
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
1959
|
-
return /* @__PURE__ */
|
|
2031
|
+
return /* @__PURE__ */ React23.createElement(Root5, {
|
|
1960
2032
|
role,
|
|
1961
2033
|
...handlesFocus && {
|
|
1962
2034
|
...mover
|
|
@@ -1972,13 +2044,13 @@ var MainContent = /* @__PURE__ */ forwardRef18(({ asChild, classNames, bounce, h
|
|
|
1972
2044
|
}, children);
|
|
1973
2045
|
});
|
|
1974
2046
|
MainContent.displayName = MAIN_NAME;
|
|
1975
|
-
var MainOverlay = /* @__PURE__ */
|
|
2047
|
+
var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1976
2048
|
const [isLg] = useMediaQuery("lg", {
|
|
1977
2049
|
ssr: false
|
|
1978
2050
|
});
|
|
1979
2051
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1980
2052
|
const { tx } = useThemeContext();
|
|
1981
|
-
return /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ React23.createElement("div", {
|
|
1982
2054
|
onClick: () => {
|
|
1983
2055
|
setNavigationSidebarOpen(false);
|
|
1984
2056
|
setComplementarySidebarOpen(false);
|
|
@@ -1994,7 +2066,7 @@ var MainOverlay = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwar
|
|
|
1994
2066
|
ref: forwardedRef
|
|
1995
2067
|
});
|
|
1996
2068
|
});
|
|
1997
|
-
var MainNotch = /* @__PURE__ */
|
|
2069
|
+
var MainNotch = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1998
2070
|
const { tx } = useThemeContext();
|
|
1999
2071
|
const { navigationSidebarOpen } = useMainContext(MAIN_NAME);
|
|
2000
2072
|
const notchElement = useRef2(null);
|
|
@@ -2009,7 +2081,7 @@ var MainNotch = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwarde
|
|
|
2009
2081
|
props?.onKeyDown
|
|
2010
2082
|
]);
|
|
2011
2083
|
const mover = useLandmarkMover(handleKeyDown, "3");
|
|
2012
|
-
return /* @__PURE__ */
|
|
2084
|
+
return /* @__PURE__ */ React23.createElement("div", {
|
|
2013
2085
|
role: "toolbar",
|
|
2014
2086
|
...mover,
|
|
2015
2087
|
...props,
|
|
@@ -2031,20 +2103,20 @@ var Main = {
|
|
|
2031
2103
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
2032
2104
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
2033
2105
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
2034
|
-
import
|
|
2106
|
+
import React24, { forwardRef as forwardRef21 } from "react";
|
|
2035
2107
|
import { useId as useId4 } from "@dxos/react-hooks";
|
|
2036
2108
|
var MESSAGE_NAME = "Message";
|
|
2037
2109
|
var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
|
|
2038
|
-
var MessageRoot = /* @__PURE__ */
|
|
2110
|
+
var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
|
|
2039
2111
|
const { tx } = useThemeContext();
|
|
2040
2112
|
const titleId = useId4("message__title", propsTitleId);
|
|
2041
2113
|
const descriptionId = useId4("message__description", propsDescriptionId);
|
|
2042
2114
|
const elevation = useElevationContext(propsElevation);
|
|
2043
2115
|
const Root5 = asChild ? Slot11 : Primitive10.div;
|
|
2044
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ React24.createElement(MessageProvider, {
|
|
2045
2117
|
titleId,
|
|
2046
2118
|
descriptionId
|
|
2047
|
-
}, /* @__PURE__ */
|
|
2119
|
+
}, /* @__PURE__ */ React24.createElement(Root5, {
|
|
2048
2120
|
...props,
|
|
2049
2121
|
className: tx("message.root", "message", {
|
|
2050
2122
|
valence,
|
|
@@ -2057,11 +2129,11 @@ var MessageRoot = /* @__PURE__ */ forwardRef19(({ asChild, valence, elevation: p
|
|
|
2057
2129
|
});
|
|
2058
2130
|
MessageRoot.displayName = MESSAGE_NAME;
|
|
2059
2131
|
var MESSAGE_TITLE_NAME = "MessageTitle";
|
|
2060
|
-
var MessageTitle = /* @__PURE__ */
|
|
2132
|
+
var MessageTitle = /* @__PURE__ */ forwardRef21(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
2061
2133
|
const { tx } = useThemeContext();
|
|
2062
2134
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
2063
2135
|
const Root5 = asChild ? Slot11 : Primitive10.h2;
|
|
2064
|
-
return /* @__PURE__ */
|
|
2136
|
+
return /* @__PURE__ */ React24.createElement(Root5, {
|
|
2065
2137
|
...props,
|
|
2066
2138
|
className: tx("message.title", "message__title", {}, className),
|
|
2067
2139
|
id: titleId,
|
|
@@ -2070,11 +2142,11 @@ var MessageTitle = /* @__PURE__ */ forwardRef19(({ asChild, className, children,
|
|
|
2070
2142
|
});
|
|
2071
2143
|
MessageTitle.displayName = MESSAGE_TITLE_NAME;
|
|
2072
2144
|
var MESSAGE_BODY_NAME = "MessageBody";
|
|
2073
|
-
var MessageBody = /* @__PURE__ */
|
|
2145
|
+
var MessageBody = /* @__PURE__ */ forwardRef21(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
2074
2146
|
const { tx } = useThemeContext();
|
|
2075
2147
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
2076
2148
|
const Root5 = asChild ? Slot11 : Primitive10.p;
|
|
2077
|
-
return /* @__PURE__ */
|
|
2149
|
+
return /* @__PURE__ */ React24.createElement(Root5, {
|
|
2078
2150
|
...props,
|
|
2079
2151
|
className: tx("message.body", "message__body", {}, className),
|
|
2080
2152
|
id: descriptionId,
|
|
@@ -2104,7 +2176,7 @@ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
|
|
|
2104
2176
|
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
2105
2177
|
import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
|
|
2106
2178
|
import { hideOthers } from "aria-hidden";
|
|
2107
|
-
import
|
|
2179
|
+
import React25, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback5, useState as useState5, useEffect as useEffect6 } from "react";
|
|
2108
2180
|
import { RemoveScroll } from "react-remove-scroll";
|
|
2109
2181
|
var POPOVER_NAME = "Popover";
|
|
2110
2182
|
var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
|
|
@@ -2122,7 +2194,7 @@ var PopoverRoot = (props) => {
|
|
|
2122
2194
|
defaultProp: defaultOpen,
|
|
2123
2195
|
onChange: onOpenChange
|
|
2124
2196
|
});
|
|
2125
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ React25.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React25.createElement(PopoverProvider, {
|
|
2126
2198
|
scope: __scopePopover,
|
|
2127
2199
|
contentId: useId5(),
|
|
2128
2200
|
triggerRef,
|
|
@@ -2139,7 +2211,7 @@ var PopoverRoot = (props) => {
|
|
|
2139
2211
|
};
|
|
2140
2212
|
PopoverRoot.displayName = POPOVER_NAME;
|
|
2141
2213
|
var ANCHOR_NAME = "PopoverAnchor";
|
|
2142
|
-
var PopoverAnchor = /* @__PURE__ */
|
|
2214
|
+
var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2143
2215
|
const { __scopePopover, ...anchorProps } = props;
|
|
2144
2216
|
const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
|
|
2145
2217
|
const popperScope = usePopperScope(__scopePopover);
|
|
@@ -2151,7 +2223,7 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2151
2223
|
onCustomAnchorAdd,
|
|
2152
2224
|
onCustomAnchorRemove
|
|
2153
2225
|
]);
|
|
2154
|
-
return /* @__PURE__ */
|
|
2226
|
+
return /* @__PURE__ */ React25.createElement(PopperPrimitive.Anchor, {
|
|
2155
2227
|
...popperScope,
|
|
2156
2228
|
...anchorProps,
|
|
2157
2229
|
ref: forwardedRef
|
|
@@ -2159,12 +2231,12 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2159
2231
|
});
|
|
2160
2232
|
PopoverAnchor.displayName = ANCHOR_NAME;
|
|
2161
2233
|
var TRIGGER_NAME2 = "PopoverTrigger";
|
|
2162
|
-
var PopoverTrigger = /* @__PURE__ */
|
|
2234
|
+
var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2163
2235
|
const { __scopePopover, ...triggerProps } = props;
|
|
2164
2236
|
const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
|
|
2165
2237
|
const popperScope = usePopperScope(__scopePopover);
|
|
2166
2238
|
const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
|
|
2167
|
-
const trigger = /* @__PURE__ */
|
|
2239
|
+
const trigger = /* @__PURE__ */ React25.createElement(Primitive11.button, {
|
|
2168
2240
|
type: "button",
|
|
2169
2241
|
"aria-haspopup": "dialog",
|
|
2170
2242
|
"aria-expanded": context.open,
|
|
@@ -2174,7 +2246,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2174
2246
|
ref: composedTriggerRef,
|
|
2175
2247
|
onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
|
|
2176
2248
|
});
|
|
2177
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */
|
|
2249
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React25.createElement(PopperPrimitive.Anchor, {
|
|
2178
2250
|
asChild: true,
|
|
2179
2251
|
...popperScope
|
|
2180
2252
|
}, trigger);
|
|
@@ -2190,7 +2262,7 @@ var PopoverVirtualTrigger = (props) => {
|
|
|
2190
2262
|
context.triggerRef.current = virtualRef.current;
|
|
2191
2263
|
}
|
|
2192
2264
|
});
|
|
2193
|
-
return /* @__PURE__ */
|
|
2265
|
+
return /* @__PURE__ */ React25.createElement(PopperPrimitive.Anchor, {
|
|
2194
2266
|
...popperScope,
|
|
2195
2267
|
virtualRef
|
|
2196
2268
|
});
|
|
@@ -2203,34 +2275,34 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
|
|
|
2203
2275
|
var PopoverPortal = (props) => {
|
|
2204
2276
|
const { __scopePopover, forceMount, children, container } = props;
|
|
2205
2277
|
const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
|
|
2206
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ React25.createElement(PortalProvider, {
|
|
2207
2279
|
scope: __scopePopover,
|
|
2208
2280
|
forceMount
|
|
2209
|
-
}, /* @__PURE__ */
|
|
2281
|
+
}, /* @__PURE__ */ React25.createElement(Presence, {
|
|
2210
2282
|
present: forceMount || context.open
|
|
2211
|
-
}, /* @__PURE__ */
|
|
2283
|
+
}, /* @__PURE__ */ React25.createElement(PortalPrimitive, {
|
|
2212
2284
|
asChild: true,
|
|
2213
2285
|
container
|
|
2214
2286
|
}, children)));
|
|
2215
2287
|
};
|
|
2216
2288
|
PopoverPortal.displayName = PORTAL_NAME2;
|
|
2217
2289
|
var CONTENT_NAME2 = "PopoverContent";
|
|
2218
|
-
var PopoverContent = /* @__PURE__ */
|
|
2290
|
+
var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2219
2291
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
|
|
2220
2292
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
2221
2293
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2222
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ React25.createElement(Presence, {
|
|
2223
2295
|
present: forceMount || context.open
|
|
2224
|
-
}, context.modal ? /* @__PURE__ */
|
|
2296
|
+
}, context.modal ? /* @__PURE__ */ React25.createElement(PopoverContentModal, {
|
|
2225
2297
|
...contentProps,
|
|
2226
2298
|
ref: forwardedRef
|
|
2227
|
-
}) : /* @__PURE__ */
|
|
2299
|
+
}) : /* @__PURE__ */ React25.createElement(PopoverContentNonModal, {
|
|
2228
2300
|
...contentProps,
|
|
2229
2301
|
ref: forwardedRef
|
|
2230
2302
|
}));
|
|
2231
2303
|
});
|
|
2232
2304
|
PopoverContent.displayName = CONTENT_NAME2;
|
|
2233
|
-
var PopoverContentModal = /* @__PURE__ */
|
|
2305
|
+
var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2234
2306
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2235
2307
|
const contentRef = useRef3(null);
|
|
2236
2308
|
const composedRefs = useComposedRefs2(forwardedRef, contentRef);
|
|
@@ -2241,10 +2313,10 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef20((props, forwardedRef) =>
|
|
|
2241
2313
|
return hideOthers(content);
|
|
2242
2314
|
}
|
|
2243
2315
|
}, []);
|
|
2244
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ React25.createElement(RemoveScroll, {
|
|
2245
2317
|
as: Slot12,
|
|
2246
2318
|
allowPinchZoom: true
|
|
2247
|
-
}, /* @__PURE__ */
|
|
2319
|
+
}, /* @__PURE__ */ React25.createElement(PopoverContentImpl, {
|
|
2248
2320
|
...props,
|
|
2249
2321
|
ref: composedRefs,
|
|
2250
2322
|
// we make sure we're not trapping once it's been closed
|
|
@@ -2272,11 +2344,11 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef20((props, forwardedRef) =>
|
|
|
2272
2344
|
})
|
|
2273
2345
|
}));
|
|
2274
2346
|
});
|
|
2275
|
-
var PopoverContentNonModal = /* @__PURE__ */
|
|
2347
|
+
var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2276
2348
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2277
2349
|
const hasInteractedOutsideRef = useRef3(false);
|
|
2278
2350
|
const hasPointerDownOutsideRef = useRef3(false);
|
|
2279
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ React25.createElement(PopoverContentImpl, {
|
|
2280
2352
|
...props,
|
|
2281
2353
|
ref: forwardedRef,
|
|
2282
2354
|
trapFocus: false,
|
|
@@ -2311,19 +2383,19 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef20((props, forwardedRef)
|
|
|
2311
2383
|
}
|
|
2312
2384
|
});
|
|
2313
2385
|
});
|
|
2314
|
-
var PopoverContentImpl = /* @__PURE__ */
|
|
2386
|
+
var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2315
2387
|
const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, classNames, ...contentProps } = props;
|
|
2316
2388
|
const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
|
|
2317
2389
|
const popperScope = usePopperScope(__scopePopover);
|
|
2318
2390
|
const { tx } = useThemeContext();
|
|
2319
2391
|
useFocusGuards();
|
|
2320
|
-
return /* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ React25.createElement(FocusScope, {
|
|
2321
2393
|
asChild: true,
|
|
2322
2394
|
loop: true,
|
|
2323
2395
|
trapped: trapFocus,
|
|
2324
2396
|
onMountAutoFocus: onOpenAutoFocus,
|
|
2325
2397
|
onUnmountAutoFocus: onCloseAutoFocus
|
|
2326
|
-
}, /* @__PURE__ */
|
|
2398
|
+
}, /* @__PURE__ */ React25.createElement(DismissableLayer, {
|
|
2327
2399
|
asChild: true,
|
|
2328
2400
|
disableOutsidePointerEvents,
|
|
2329
2401
|
onInteractOutside,
|
|
@@ -2331,7 +2403,7 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2331
2403
|
onPointerDownOutside,
|
|
2332
2404
|
onFocusOutside,
|
|
2333
2405
|
onDismiss: () => context.onOpenChange(false)
|
|
2334
|
-
}, /* @__PURE__ */
|
|
2406
|
+
}, /* @__PURE__ */ React25.createElement(PopperPrimitive.Content, {
|
|
2335
2407
|
"data-state": getState(context.open),
|
|
2336
2408
|
role: "dialog",
|
|
2337
2409
|
id: context.contentId,
|
|
@@ -2353,10 +2425,10 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2353
2425
|
})));
|
|
2354
2426
|
});
|
|
2355
2427
|
var CLOSE_NAME = "PopoverClose";
|
|
2356
|
-
var PopoverClose = /* @__PURE__ */
|
|
2428
|
+
var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2357
2429
|
const { __scopePopover, ...closeProps } = props;
|
|
2358
2430
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
2359
|
-
return /* @__PURE__ */
|
|
2431
|
+
return /* @__PURE__ */ React25.createElement(Primitive11.button, {
|
|
2360
2432
|
type: "button",
|
|
2361
2433
|
...closeProps,
|
|
2362
2434
|
ref: forwardedRef,
|
|
@@ -2365,11 +2437,11 @@ var PopoverClose = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2365
2437
|
});
|
|
2366
2438
|
PopoverClose.displayName = CLOSE_NAME;
|
|
2367
2439
|
var ARROW_NAME2 = "PopoverArrow";
|
|
2368
|
-
var PopoverArrow = /* @__PURE__ */
|
|
2440
|
+
var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2369
2441
|
const { __scopePopover, classNames, ...arrowProps } = props;
|
|
2370
2442
|
const popperScope = usePopperScope(__scopePopover);
|
|
2371
2443
|
const { tx } = useThemeContext();
|
|
2372
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ React25.createElement(PopperPrimitive.Arrow, {
|
|
2373
2445
|
...popperScope,
|
|
2374
2446
|
...arrowProps,
|
|
2375
2447
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
@@ -2377,10 +2449,10 @@ var PopoverArrow = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
|
2377
2449
|
});
|
|
2378
2450
|
});
|
|
2379
2451
|
PopoverArrow.displayName = ARROW_NAME2;
|
|
2380
|
-
var PopoverViewport = /* @__PURE__ */
|
|
2452
|
+
var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
2381
2453
|
const { tx } = useThemeContext();
|
|
2382
2454
|
const Root5 = asChild ? Slot12 : Primitive11.div;
|
|
2383
|
-
return /* @__PURE__ */
|
|
2455
|
+
return /* @__PURE__ */ React25.createElement(Root5, {
|
|
2384
2456
|
...props,
|
|
2385
2457
|
className: tx("popover.viewport", "popover__viewport", {
|
|
2386
2458
|
constrainInline,
|
|
@@ -2403,20 +2475,22 @@ var Popover = {
|
|
|
2403
2475
|
};
|
|
2404
2476
|
|
|
2405
2477
|
// packages/ui/react-ui/src/components/Status/Status.tsx
|
|
2406
|
-
import
|
|
2407
|
-
var Status = /* @__PURE__ */
|
|
2478
|
+
import React26, { forwardRef as forwardRef23 } from "react";
|
|
2479
|
+
var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
|
|
2408
2480
|
const { tx } = useThemeContext();
|
|
2409
|
-
return /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ React26.createElement("span", {
|
|
2410
2482
|
role: "status",
|
|
2411
2483
|
...props,
|
|
2412
2484
|
className: tx("status.root", "status", {
|
|
2413
|
-
indeterminate
|
|
2485
|
+
indeterminate,
|
|
2486
|
+
variant
|
|
2414
2487
|
}, classNames),
|
|
2415
2488
|
ref: forwardedRef
|
|
2416
|
-
}, /* @__PURE__ */
|
|
2489
|
+
}, /* @__PURE__ */ React26.createElement("span", {
|
|
2417
2490
|
role: "none",
|
|
2418
2491
|
className: tx("status.bar", "status__bar", {
|
|
2419
|
-
indeterminate
|
|
2492
|
+
indeterminate,
|
|
2493
|
+
variant
|
|
2420
2494
|
}, classNames),
|
|
2421
2495
|
...!indeterminate && {
|
|
2422
2496
|
style: {
|
|
@@ -2428,43 +2502,43 @@ var Status = /* @__PURE__ */ forwardRef21(({ classNames, children, progress = 0,
|
|
|
2428
2502
|
|
|
2429
2503
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
2430
2504
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
2431
|
-
import
|
|
2432
|
-
var ScrollAreaRoot = /* @__PURE__ */
|
|
2505
|
+
import React27, { forwardRef as forwardRef24 } from "react";
|
|
2506
|
+
var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2433
2507
|
const { tx } = useThemeContext();
|
|
2434
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveRoot, {
|
|
2435
2509
|
...props,
|
|
2436
2510
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
2437
2511
|
ref: forwardedRef
|
|
2438
2512
|
});
|
|
2439
2513
|
});
|
|
2440
|
-
var ScrollAreaViewport = /* @__PURE__ */
|
|
2514
|
+
var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2441
2515
|
const { tx } = useThemeContext();
|
|
2442
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveViewport, {
|
|
2443
2517
|
...props,
|
|
2444
2518
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
2445
2519
|
ref: forwardedRef
|
|
2446
2520
|
});
|
|
2447
2521
|
});
|
|
2448
|
-
var ScrollAreaScrollbar = /* @__PURE__ */
|
|
2522
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant = "fine", ...props }, forwardedRef) => {
|
|
2449
2523
|
const { tx } = useThemeContext();
|
|
2450
|
-
return /* @__PURE__ */
|
|
2524
|
+
return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
2451
2525
|
"data-variant": variant,
|
|
2452
2526
|
...props,
|
|
2453
2527
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
2454
2528
|
ref: forwardedRef
|
|
2455
2529
|
});
|
|
2456
2530
|
});
|
|
2457
|
-
var ScrollAreaThumb = /* @__PURE__ */
|
|
2531
|
+
var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2458
2532
|
const { tx } = useThemeContext();
|
|
2459
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveThumb, {
|
|
2460
2534
|
...props,
|
|
2461
2535
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
2462
2536
|
ref: forwardedRef
|
|
2463
2537
|
});
|
|
2464
2538
|
});
|
|
2465
|
-
var ScrollAreaCorner = /* @__PURE__ */
|
|
2539
|
+
var ScrollAreaCorner = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2466
2540
|
const { tx } = useThemeContext();
|
|
2467
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ React27.createElement(ScrollAreaPrimitiveCorner, {
|
|
2468
2542
|
...props,
|
|
2469
2543
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
2470
2544
|
ref: forwardedRef
|
|
@@ -2481,100 +2555,107 @@ var ScrollArea = {
|
|
|
2481
2555
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
2482
2556
|
import { CaretDown as CaretDown2, CaretUp } from "@phosphor-icons/react";
|
|
2483
2557
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2484
|
-
import
|
|
2558
|
+
import React28, { forwardRef as forwardRef25 } from "react";
|
|
2485
2559
|
var SelectRoot = SelectPrimitive.Root;
|
|
2486
2560
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
2487
2561
|
var SelectValue = SelectPrimitive.Value;
|
|
2488
2562
|
var SelectIcon = SelectPrimitive.Icon;
|
|
2489
2563
|
var SelectPortal = SelectPrimitive.Portal;
|
|
2490
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
2564
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
|
|
2491
2565
|
const { tx } = useThemeContext();
|
|
2492
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.Trigger, {
|
|
2493
2567
|
asChild: true,
|
|
2494
2568
|
ref: forwardedRef
|
|
2495
|
-
}, /* @__PURE__ */
|
|
2569
|
+
}, /* @__PURE__ */ React28.createElement(Button, props, /* @__PURE__ */ React28.createElement(SelectPrimitive.Value, {
|
|
2496
2570
|
placeholder
|
|
2497
|
-
}, children), /* @__PURE__ */
|
|
2571
|
+
}, children), /* @__PURE__ */ React28.createElement("span", {
|
|
2498
2572
|
className: "w-1 flex-1"
|
|
2499
|
-
}), /* @__PURE__ */
|
|
2573
|
+
}), /* @__PURE__ */ React28.createElement(SelectPrimitive.Icon, {
|
|
2500
2574
|
asChild: true
|
|
2501
|
-
}, /* @__PURE__ */
|
|
2575
|
+
}, /* @__PURE__ */ React28.createElement(CaretDown2, {
|
|
2502
2576
|
className: tx("select.triggerIcon", "select__trigger__icon", {}),
|
|
2503
2577
|
weight: "bold"
|
|
2504
2578
|
}))));
|
|
2505
2579
|
});
|
|
2506
|
-
var SelectContent = /* @__PURE__ */
|
|
2580
|
+
var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2507
2581
|
const { tx } = useThemeContext();
|
|
2508
|
-
return /* @__PURE__ */
|
|
2582
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.Content, {
|
|
2509
2583
|
...props,
|
|
2510
2584
|
className: tx("select.content", "select__content", {}, classNames),
|
|
2511
2585
|
position: "popper",
|
|
2512
2586
|
ref: forwardedRef
|
|
2513
2587
|
}, children);
|
|
2514
2588
|
});
|
|
2515
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
2589
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2516
2590
|
const { tx } = useThemeContext();
|
|
2517
|
-
return /* @__PURE__ */
|
|
2591
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
2518
2592
|
...props,
|
|
2519
2593
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
2520
2594
|
ref: forwardedRef
|
|
2521
|
-
}, children ?? /* @__PURE__ */
|
|
2595
|
+
}, children ?? /* @__PURE__ */ React28.createElement(CaretUp, {
|
|
2522
2596
|
weight: "bold"
|
|
2523
2597
|
}));
|
|
2524
2598
|
});
|
|
2525
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
2599
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2526
2600
|
const { tx } = useThemeContext();
|
|
2527
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
2528
2602
|
...props,
|
|
2529
2603
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
2530
2604
|
ref: forwardedRef
|
|
2531
|
-
}, children ?? /* @__PURE__ */
|
|
2605
|
+
}, children ?? /* @__PURE__ */ React28.createElement(CaretDown2, {
|
|
2532
2606
|
weight: "bold"
|
|
2533
2607
|
}));
|
|
2534
2608
|
});
|
|
2535
|
-
var
|
|
2536
|
-
|
|
2609
|
+
var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
2610
|
+
const { tx } = useThemeContext();
|
|
2611
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.SelectViewport, {
|
|
2612
|
+
...props,
|
|
2613
|
+
className: tx("select.viewport", "select__viewport", {}, classNames),
|
|
2614
|
+
ref: forwardedRef
|
|
2615
|
+
}, children);
|
|
2616
|
+
});
|
|
2617
|
+
var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2537
2618
|
const { tx } = useThemeContext();
|
|
2538
|
-
return /* @__PURE__ */
|
|
2619
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.Item, {
|
|
2539
2620
|
...props,
|
|
2540
2621
|
className: tx("select.item", "option", {}, classNames),
|
|
2541
2622
|
ref: forwardedRef
|
|
2542
2623
|
});
|
|
2543
2624
|
});
|
|
2544
2625
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
2545
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
2626
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2546
2627
|
const { tx } = useThemeContext();
|
|
2547
|
-
return /* @__PURE__ */
|
|
2628
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.ItemIndicator, {
|
|
2548
2629
|
...props,
|
|
2549
2630
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
2550
2631
|
ref: forwardedRef
|
|
2551
2632
|
}, children);
|
|
2552
2633
|
});
|
|
2553
|
-
var SelectOption = /* @__PURE__ */
|
|
2634
|
+
var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
|
|
2554
2635
|
const { tx } = useThemeContext();
|
|
2555
|
-
return /* @__PURE__ */
|
|
2636
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.Item, {
|
|
2556
2637
|
...props,
|
|
2557
2638
|
className: tx("select.item", "option", {}, classNames),
|
|
2558
2639
|
ref: forwardedRef
|
|
2559
|
-
}, /* @__PURE__ */
|
|
2640
|
+
}, /* @__PURE__ */ React28.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React28.createElement("span", {
|
|
2560
2641
|
className: "grow w-1"
|
|
2561
|
-
}), /* @__PURE__ */
|
|
2642
|
+
}), /* @__PURE__ */ React28.createElement(Icon, {
|
|
2562
2643
|
icon: "ph--check--regular"
|
|
2563
2644
|
}));
|
|
2564
2645
|
});
|
|
2565
2646
|
var SelectGroup = SelectPrimitive.Group;
|
|
2566
2647
|
var SelectLabel = SelectPrimitive.Label;
|
|
2567
|
-
var SelectSeparator = /* @__PURE__ */
|
|
2648
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2568
2649
|
const { tx } = useThemeContext();
|
|
2569
|
-
return /* @__PURE__ */
|
|
2650
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.Separator, {
|
|
2570
2651
|
...props,
|
|
2571
2652
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
2572
2653
|
ref: forwardedRef
|
|
2573
2654
|
});
|
|
2574
2655
|
});
|
|
2575
|
-
var SelectArrow = /* @__PURE__ */
|
|
2656
|
+
var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2576
2657
|
const { tx } = useThemeContext();
|
|
2577
|
-
return /* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ React28.createElement(SelectPrimitive.Arrow, {
|
|
2578
2659
|
...props,
|
|
2579
2660
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
2580
2661
|
ref: forwardedRef
|
|
@@ -2590,7 +2671,7 @@ var Select = {
|
|
|
2590
2671
|
Content: SelectContent,
|
|
2591
2672
|
ScrollUpButton: SelectScrollUpButton2,
|
|
2592
2673
|
ScrollDownButton: SelectScrollDownButton2,
|
|
2593
|
-
Viewport:
|
|
2674
|
+
Viewport: SelectViewport2,
|
|
2594
2675
|
Item: SelectItem,
|
|
2595
2676
|
ItemText: SelectItemText,
|
|
2596
2677
|
ItemIndicator: SelectItemIndicator,
|
|
@@ -2603,10 +2684,10 @@ var Select = {
|
|
|
2603
2684
|
|
|
2604
2685
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
2605
2686
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
2606
|
-
import
|
|
2687
|
+
import React29 from "react";
|
|
2607
2688
|
var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
2608
2689
|
const { tx } = useThemeContext();
|
|
2609
|
-
return /* @__PURE__ */
|
|
2690
|
+
return /* @__PURE__ */ React29.createElement(SeparatorPrimitive, {
|
|
2610
2691
|
orientation,
|
|
2611
2692
|
...props,
|
|
2612
2693
|
className: tx("separator.root", "separator", {
|
|
@@ -2618,11 +2699,11 @@ var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
2618
2699
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
2619
2700
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2620
2701
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2621
|
-
import
|
|
2622
|
-
var Tag = /* @__PURE__ */
|
|
2702
|
+
import React30, { forwardRef as forwardRef26 } from "react";
|
|
2703
|
+
var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2623
2704
|
const { tx } = useThemeContext();
|
|
2624
2705
|
const Root5 = asChild ? Slot13 : Primitive12.span;
|
|
2625
|
-
return /* @__PURE__ */
|
|
2706
|
+
return /* @__PURE__ */ React30.createElement(Root5, {
|
|
2626
2707
|
...props,
|
|
2627
2708
|
className: tx("tag.root", "tag", {
|
|
2628
2709
|
palette
|
|
@@ -2635,56 +2716,56 @@ var Tag = /* @__PURE__ */ forwardRef24(({ asChild, palette, classNames, ...props
|
|
|
2635
2716
|
import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
|
|
2636
2717
|
import { Slot as Slot14 } from "@radix-ui/react-slot";
|
|
2637
2718
|
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";
|
|
2638
|
-
import
|
|
2719
|
+
import React31, { forwardRef as forwardRef27 } from "react";
|
|
2639
2720
|
var ToastProvider = ToastProviderPrimitive;
|
|
2640
|
-
var ToastViewport = /* @__PURE__ */
|
|
2721
|
+
var ToastViewport = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2641
2722
|
const { tx } = useThemeContext();
|
|
2642
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ React31.createElement(ToastViewportPrimitive, {
|
|
2643
2724
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
2644
2725
|
ref: forwardedRef
|
|
2645
2726
|
});
|
|
2646
2727
|
});
|
|
2647
|
-
var ToastRoot = /* @__PURE__ */
|
|
2728
|
+
var ToastRoot = /* @__PURE__ */ forwardRef27(({ classNames, children, ...props }, forwardedRef) => {
|
|
2648
2729
|
const { tx } = useThemeContext();
|
|
2649
|
-
return /* @__PURE__ */
|
|
2730
|
+
return /* @__PURE__ */ React31.createElement(ToastRootPrimitive, {
|
|
2650
2731
|
...props,
|
|
2651
2732
|
className: tx("toast.root", "toast", {}, classNames),
|
|
2652
2733
|
ref: forwardedRef
|
|
2653
|
-
}, /* @__PURE__ */
|
|
2734
|
+
}, /* @__PURE__ */ React31.createElement(ElevationProvider, {
|
|
2654
2735
|
elevation: "chrome"
|
|
2655
2736
|
}, children));
|
|
2656
2737
|
});
|
|
2657
|
-
var ToastBody = /* @__PURE__ */
|
|
2738
|
+
var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2658
2739
|
const { tx } = useThemeContext();
|
|
2659
2740
|
const Root5 = asChild ? Slot14 : Primitive13.div;
|
|
2660
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ React31.createElement(Root5, {
|
|
2661
2742
|
...props,
|
|
2662
2743
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
2663
2744
|
ref: forwardedRef
|
|
2664
2745
|
});
|
|
2665
2746
|
});
|
|
2666
|
-
var ToastTitle = /* @__PURE__ */
|
|
2747
|
+
var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2667
2748
|
const { tx } = useThemeContext();
|
|
2668
2749
|
const Root5 = asChild ? Slot14 : ToastTitlePrimitive;
|
|
2669
|
-
return /* @__PURE__ */
|
|
2750
|
+
return /* @__PURE__ */ React31.createElement(Root5, {
|
|
2670
2751
|
...props,
|
|
2671
2752
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
2672
2753
|
ref: forwardedRef
|
|
2673
2754
|
});
|
|
2674
2755
|
});
|
|
2675
|
-
var ToastDescription = /* @__PURE__ */
|
|
2756
|
+
var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2676
2757
|
const { tx } = useThemeContext();
|
|
2677
2758
|
const Root5 = asChild ? Slot14 : ToastDescriptionPrimitive;
|
|
2678
|
-
return /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ React31.createElement(Root5, {
|
|
2679
2760
|
...props,
|
|
2680
2761
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
2681
2762
|
ref: forwardedRef
|
|
2682
2763
|
});
|
|
2683
2764
|
});
|
|
2684
|
-
var ToastActions = /* @__PURE__ */
|
|
2765
|
+
var ToastActions = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2685
2766
|
const { tx } = useThemeContext();
|
|
2686
2767
|
const Root5 = asChild ? Slot14 : Primitive13.div;
|
|
2687
|
-
return /* @__PURE__ */
|
|
2768
|
+
return /* @__PURE__ */ React31.createElement(Root5, {
|
|
2688
2769
|
...props,
|
|
2689
2770
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
2690
2771
|
ref: forwardedRef
|
|
@@ -2706,55 +2787,55 @@ var Toast = {
|
|
|
2706
2787
|
|
|
2707
2788
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
2708
2789
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
2709
|
-
import
|
|
2710
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
2790
|
+
import React32, { forwardRef as forwardRef28 } from "react";
|
|
2791
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
|
|
2711
2792
|
const { tx } = useThemeContext();
|
|
2712
|
-
return /* @__PURE__ */
|
|
2793
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Root, {
|
|
2713
2794
|
...props,
|
|
2714
2795
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
2715
2796
|
ref: forwardedRef
|
|
2716
2797
|
}, children);
|
|
2717
2798
|
});
|
|
2718
|
-
var ToolbarButton = /* @__PURE__ */
|
|
2719
|
-
return /* @__PURE__ */
|
|
2799
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2800
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Button, {
|
|
2720
2801
|
asChild: true
|
|
2721
|
-
}, /* @__PURE__ */
|
|
2802
|
+
}, /* @__PURE__ */ React32.createElement(Button, {
|
|
2722
2803
|
...props,
|
|
2723
2804
|
ref: forwardedRef
|
|
2724
2805
|
}));
|
|
2725
2806
|
});
|
|
2726
|
-
var ToolbarToggle = /* @__PURE__ */
|
|
2727
|
-
return /* @__PURE__ */
|
|
2807
|
+
var ToolbarToggle = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2808
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Button, {
|
|
2728
2809
|
asChild: true
|
|
2729
|
-
}, /* @__PURE__ */
|
|
2810
|
+
}, /* @__PURE__ */ React32.createElement(Toggle, {
|
|
2730
2811
|
...props,
|
|
2731
2812
|
ref: forwardedRef
|
|
2732
2813
|
}));
|
|
2733
2814
|
});
|
|
2734
|
-
var ToolbarLink = /* @__PURE__ */
|
|
2735
|
-
return /* @__PURE__ */
|
|
2815
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2816
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Link, {
|
|
2736
2817
|
asChild: true
|
|
2737
|
-
}, /* @__PURE__ */
|
|
2818
|
+
}, /* @__PURE__ */ React32.createElement(Link, {
|
|
2738
2819
|
...props,
|
|
2739
2820
|
ref: forwardedRef
|
|
2740
2821
|
}));
|
|
2741
2822
|
});
|
|
2742
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
2743
|
-
return /* @__PURE__ */
|
|
2823
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children, elevation, ...props }, forwardedRef) => {
|
|
2824
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
2744
2825
|
...props,
|
|
2745
2826
|
asChild: true
|
|
2746
|
-
}, /* @__PURE__ */
|
|
2827
|
+
}, /* @__PURE__ */ React32.createElement(ButtonGroup, {
|
|
2747
2828
|
classNames,
|
|
2748
2829
|
children,
|
|
2749
2830
|
elevation,
|
|
2750
2831
|
ref: forwardedRef
|
|
2751
2832
|
}));
|
|
2752
2833
|
});
|
|
2753
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
2754
|
-
return /* @__PURE__ */
|
|
2834
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
2835
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
2755
2836
|
...props,
|
|
2756
2837
|
asChild: true
|
|
2757
|
-
}, /* @__PURE__ */
|
|
2838
|
+
}, /* @__PURE__ */ React32.createElement(Button, {
|
|
2758
2839
|
variant,
|
|
2759
2840
|
density,
|
|
2760
2841
|
elevation,
|
|
@@ -2764,9 +2845,9 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef26(({ variant, density, e
|
|
|
2764
2845
|
}));
|
|
2765
2846
|
});
|
|
2766
2847
|
var ToolbarSeparator = (props) => {
|
|
2767
|
-
return /* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ React32.createElement(ToolbarPrimitive.Separator, {
|
|
2768
2849
|
asChild: true
|
|
2769
|
-
}, /* @__PURE__ */
|
|
2850
|
+
}, /* @__PURE__ */ React32.createElement(Separator4, {
|
|
2770
2851
|
orientation: "vertical",
|
|
2771
2852
|
...props
|
|
2772
2853
|
}));
|
|
@@ -2781,43 +2862,9 @@ var Toolbar = {
|
|
|
2781
2862
|
Separator: ToolbarSeparator
|
|
2782
2863
|
};
|
|
2783
2864
|
|
|
2784
|
-
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
2785
|
-
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
2786
|
-
import React31, { forwardRef as forwardRef27 } from "react";
|
|
2787
|
-
var TooltipProvider = TooltipProviderPrimitive;
|
|
2788
|
-
var TooltipRoot = TooltipRootPrimitive;
|
|
2789
|
-
var TooltipPortal = TooltipPortalPrimitive;
|
|
2790
|
-
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
2791
|
-
var TooltipArrow = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2792
|
-
const { tx } = useThemeContext();
|
|
2793
|
-
return /* @__PURE__ */ React31.createElement(TooltipArrowPrimitive, {
|
|
2794
|
-
...props,
|
|
2795
|
-
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
2796
|
-
ref: forwardedRef
|
|
2797
|
-
});
|
|
2798
|
-
});
|
|
2799
|
-
var TooltipContent = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2800
|
-
const { tx } = useThemeContext();
|
|
2801
|
-
return /* @__PURE__ */ React31.createElement(TooltipContentPrimitive, {
|
|
2802
|
-
sideOffset: 4,
|
|
2803
|
-
collisionPadding: 8,
|
|
2804
|
-
...props,
|
|
2805
|
-
className: tx("tooltip.content", "tooltip", {}, classNames),
|
|
2806
|
-
ref: forwardedRef
|
|
2807
|
-
});
|
|
2808
|
-
});
|
|
2809
|
-
var Tooltip = {
|
|
2810
|
-
Provider: TooltipProvider,
|
|
2811
|
-
Root: TooltipRoot,
|
|
2812
|
-
Portal: TooltipPortal,
|
|
2813
|
-
Trigger: TooltipTrigger,
|
|
2814
|
-
Arrow: TooltipArrow,
|
|
2815
|
-
Content: TooltipContent
|
|
2816
|
-
};
|
|
2817
|
-
|
|
2818
2865
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
2819
2866
|
import { createKeyborg } from "keyborg";
|
|
2820
|
-
import
|
|
2867
|
+
import React33, { createContext as createContext10, useEffect as useEffect7 } from "react";
|
|
2821
2868
|
|
|
2822
2869
|
// packages/ui/react-ui/src/util/hasIosKeyboard.ts
|
|
2823
2870
|
var hasIosKeyboard = () => {
|
|
@@ -2834,19 +2881,19 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
2834
2881
|
return () => kb.unsubscribe(handleInputModalityChange);
|
|
2835
2882
|
}
|
|
2836
2883
|
}, []);
|
|
2837
|
-
return /* @__PURE__ */
|
|
2884
|
+
return /* @__PURE__ */ React33.createElement(ThemeContext.Provider, {
|
|
2838
2885
|
value: {
|
|
2839
2886
|
tx,
|
|
2840
2887
|
themeMode,
|
|
2841
2888
|
hasIosKeyboard: hasIosKeyboard()
|
|
2842
2889
|
}
|
|
2843
|
-
}, /* @__PURE__ */
|
|
2890
|
+
}, /* @__PURE__ */ React33.createElement(TranslationsProvider, {
|
|
2844
2891
|
fallback,
|
|
2845
2892
|
resourceExtensions,
|
|
2846
2893
|
appNs
|
|
2847
|
-
}, /* @__PURE__ */
|
|
2894
|
+
}, /* @__PURE__ */ React33.createElement(ElevationProvider, {
|
|
2848
2895
|
elevation: rootElevation
|
|
2849
|
-
}, /* @__PURE__ */
|
|
2896
|
+
}, /* @__PURE__ */ React33.createElement(DensityProvider, {
|
|
2850
2897
|
density: rootDensity
|
|
2851
2898
|
}, children))));
|
|
2852
2899
|
};
|
|
@@ -2875,6 +2922,7 @@ export {
|
|
|
2875
2922
|
ElevationContext,
|
|
2876
2923
|
ElevationProvider,
|
|
2877
2924
|
Icon,
|
|
2925
|
+
IconButton,
|
|
2878
2926
|
Input,
|
|
2879
2927
|
LIST_ITEM_NAME,
|
|
2880
2928
|
LIST_NAME,
|