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