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