@dxos/react-ui 0.3.9-main.915c0ba → 0.3.9-main.9c4408c
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 +275 -390
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -0
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +1 -0
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +1 -0
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts +1 -0
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +1 -0
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +1 -0
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +1 -0
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +1 -0
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -0
- package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +2 -2
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +2 -1
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.stories.d.ts +1 -0
- package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts +1 -0
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.d.ts +2 -2
- package/dist/types/src/components/Main/Main.stories.d.ts +1 -0
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +1 -0
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +6 -0
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +6 -0
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +6 -0
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts +6 -0
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +6 -0
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +6 -0
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +6 -0
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Surfaces.stories.d.ts +6 -0
- package/dist/types/src/playground/Surfaces.stories.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/index.d.ts +2 -0
- package/dist/types/src/testing/decorators/index.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/with-theme.d.ts +3 -0
- package/dist/types/src/testing/decorators/with-theme.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/package.json +8 -14
- package/src/components/Avatars/Avatar.stories.tsx +2 -0
- package/src/components/Avatars/AvatarGroup.stories.tsx +2 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +2 -0
- package/src/components/Buttons/Button.stories.tsx +2 -0
- package/src/components/Buttons/Toggle.stories.tsx +2 -0
- package/src/components/Buttons/ToggleGroup.stories.tsx +2 -0
- package/src/components/Dialogs/AlertDialog.stories.tsx +2 -0
- package/src/components/Dialogs/Dialog.stories.tsx +2 -0
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +2 -0
- package/src/components/Input/Input.stories.tsx +21 -2
- package/src/components/Input/Input.tsx +3 -1
- package/src/components/Link/Link.stories.tsx +2 -0
- package/src/components/Lists/List.stories.tsx +2 -0
- package/src/components/Lists/Tree.stories.tsx +2 -0
- package/src/components/Main/Main.stories.tsx +5 -1
- package/src/components/Message/Message.stories.tsx +2 -0
- package/src/components/Popover/Popover.stories.tsx +3 -0
- package/src/components/ScrollArea/ScrollArea.stories.tsx +3 -0
- package/src/components/Select/Select.stories.tsx +3 -0
- package/src/components/Status/Status.stories.tsx +3 -0
- package/src/components/Tag/Tag.stories.tsx +3 -0
- package/src/components/Toast/Toast.stories.tsx +3 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +3 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +3 -0
- package/src/components/index.ts +0 -1
- package/src/playground/Controls.stories.tsx +3 -0
- package/src/playground/Surfaces.stories.tsx +4 -0
- package/src/{components/Card → testing/decorators}/index.ts +1 -1
- package/src/testing/decorators/with-theme.ts +22 -0
- package/src/testing/index.ts +5 -0
- package/dist/types/src/components/Card/Card.d.ts +0 -52
- package/dist/types/src/components/Card/Card.d.ts.map +0 -1
- package/dist/types/src/components/Card/Card.stories.d.ts +0 -56
- package/dist/types/src/components/Card/Card.stories.d.ts.map +0 -1
- package/dist/types/src/components/Card/index.d.ts +0 -2
- package/dist/types/src/components/Card/index.d.ts.map +0 -1
- package/src/components/Card/Card.stories.tsx +0 -220
- package/src/components/Card/Card.tsx +0 -147
|
@@ -568,14 +568,9 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef8(({ variant, elevation, density
|
|
|
568
568
|
}));
|
|
569
569
|
});
|
|
570
570
|
|
|
571
|
-
// packages/ui/react-ui/src/components/
|
|
572
|
-
import {
|
|
573
|
-
import
|
|
574
|
-
|
|
575
|
-
// packages/ui/react-ui/src/components/DropdownMenu/DropdownMenu.tsx
|
|
576
|
-
import { Root as DropdownMenuRootPrimitive, DropdownMenuTrigger as DropdownMenuTriggerPrimitive, DropdownMenuPortal as DropdownMenuPortalPrimitive, DropdownMenuContent as DropdownMenuContentPrimitive, DropdownMenuArrow as DropdownMenuArrowPrimitive, DropdownMenuGroup as DropdownMenuGroupPrimitive, DropdownMenuItem as DropdownMenuItemPrimitive, DropdownMenuCheckboxItem as DropdownMenuCheckboxItemPrimitive, DropdownMenuItemIndicator as DropdownMenuItemIndicatorPrimitive, DropdownMenuSeparator as DropdownMenuSeparatorPrimitive, DropdownMenuLabel as DropdownMenuLabelPrimitive } from "@radix-ui/react-dropdown-menu";
|
|
577
|
-
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
578
|
-
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
571
|
+
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
572
|
+
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
573
|
+
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";
|
|
579
574
|
import React11, { forwardRef as forwardRef9 } from "react";
|
|
580
575
|
|
|
581
576
|
// packages/ui/react-ui/src/components/ElevationProvider/ElevationProvider.tsx
|
|
@@ -589,205 +584,13 @@ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React10.cre
|
|
|
589
584
|
}
|
|
590
585
|
}, children);
|
|
591
586
|
|
|
592
|
-
// packages/ui/react-ui/src/components/DropdownMenu/DropdownMenu.tsx
|
|
593
|
-
var DropdownMenuRoot = DropdownMenuRootPrimitive;
|
|
594
|
-
var DropdownMenuTrigger = DropdownMenuTriggerPrimitive;
|
|
595
|
-
var DropdownMenuPortal = DropdownMenuPortalPrimitive;
|
|
596
|
-
var DropdownMenuContent = /* @__PURE__ */ forwardRef9(({ classNames, children, ...props }, forwardedRef) => {
|
|
597
|
-
const { tx } = useThemeContext();
|
|
598
|
-
return /* @__PURE__ */ React11.createElement(DropdownMenuContentPrimitive, {
|
|
599
|
-
sideOffset: 4,
|
|
600
|
-
collisionPadding: 8,
|
|
601
|
-
...props,
|
|
602
|
-
className: tx("dropdownMenu.content", "dropdown-menu", {}, classNames),
|
|
603
|
-
ref: forwardedRef
|
|
604
|
-
}, /* @__PURE__ */ React11.createElement(ElevationProvider, {
|
|
605
|
-
elevation: "chrome"
|
|
606
|
-
}, children));
|
|
607
|
-
});
|
|
608
|
-
var DropdownMenuViewport = /* @__PURE__ */ forwardRef9(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
609
|
-
const { tx } = useThemeContext();
|
|
610
|
-
const Root3 = asChild ? Slot6 : Primitive6.div;
|
|
611
|
-
return /* @__PURE__ */ React11.createElement(Root3, {
|
|
612
|
-
...props,
|
|
613
|
-
className: tx("dropdownMenu.viewport", "dropdown-menu__viewport", {}, classNames),
|
|
614
|
-
ref: forwardedRef
|
|
615
|
-
}, children);
|
|
616
|
-
});
|
|
617
|
-
var DropdownMenuArrow = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
|
|
618
|
-
const { tx } = useThemeContext();
|
|
619
|
-
return /* @__PURE__ */ React11.createElement(DropdownMenuArrowPrimitive, {
|
|
620
|
-
...props,
|
|
621
|
-
className: tx("dropdownMenu.arrow", "dropdown-menu__arrow", {}, classNames),
|
|
622
|
-
ref: forwardedRef
|
|
623
|
-
});
|
|
624
|
-
});
|
|
625
|
-
var DropdownMenuGroup = DropdownMenuGroupPrimitive;
|
|
626
|
-
var DropdownMenuItemIndicator = DropdownMenuItemIndicatorPrimitive;
|
|
627
|
-
var DropdownMenuItem = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
|
|
628
|
-
const { tx } = useThemeContext();
|
|
629
|
-
return /* @__PURE__ */ React11.createElement(DropdownMenuItemPrimitive, {
|
|
630
|
-
...props,
|
|
631
|
-
className: tx("dropdownMenu.item", "dropdown-menu__item", {}, classNames),
|
|
632
|
-
ref: forwardedRef
|
|
633
|
-
});
|
|
634
|
-
});
|
|
635
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
|
|
636
|
-
const { tx } = useThemeContext();
|
|
637
|
-
return /* @__PURE__ */ React11.createElement(DropdownMenuCheckboxItemPrimitive, {
|
|
638
|
-
...props,
|
|
639
|
-
className: tx("dropdownMenu.item", "dropdown-menu__item--checkbox", {}, classNames),
|
|
640
|
-
ref: forwardedRef
|
|
641
|
-
});
|
|
642
|
-
});
|
|
643
|
-
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
|
|
644
|
-
const { tx } = useThemeContext();
|
|
645
|
-
return /* @__PURE__ */ React11.createElement(DropdownMenuSeparatorPrimitive, {
|
|
646
|
-
...props,
|
|
647
|
-
className: tx("dropdownMenu.separator", "dropdown-menu__item", {}, classNames),
|
|
648
|
-
ref: forwardedRef
|
|
649
|
-
});
|
|
650
|
-
});
|
|
651
|
-
var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
|
|
652
|
-
const { tx } = useThemeContext();
|
|
653
|
-
return /* @__PURE__ */ React11.createElement(DropdownMenuLabelPrimitive, {
|
|
654
|
-
...props,
|
|
655
|
-
className: tx("dropdownMenu.groupLabel", "dropdown-menu__group__label", {}, classNames),
|
|
656
|
-
ref: forwardedRef
|
|
657
|
-
});
|
|
658
|
-
});
|
|
659
|
-
var DropdownMenu = {
|
|
660
|
-
Root: DropdownMenuRoot,
|
|
661
|
-
Trigger: DropdownMenuTrigger,
|
|
662
|
-
Portal: DropdownMenuPortal,
|
|
663
|
-
Content: DropdownMenuContent,
|
|
664
|
-
Viewport: DropdownMenuViewport,
|
|
665
|
-
Arrow: DropdownMenuArrow,
|
|
666
|
-
Group: DropdownMenuGroup,
|
|
667
|
-
Item: DropdownMenuItem,
|
|
668
|
-
CheckboxItem: DropdownMenuCheckboxItem,
|
|
669
|
-
ItemIndicator: DropdownMenuItemIndicator,
|
|
670
|
-
Separator: DropdownMenuSeparator,
|
|
671
|
-
GroupLabel: DropdownMenuGroupLabel
|
|
672
|
-
};
|
|
673
|
-
|
|
674
|
-
// packages/ui/react-ui/src/components/Card/Card.tsx
|
|
675
|
-
var CardRoot = /* @__PURE__ */ forwardRef10(({ grow, square, noPadding, classNames, children, ...props }, forwardedRef) => {
|
|
676
|
-
const { tx } = useThemeContext();
|
|
677
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
678
|
-
...props,
|
|
679
|
-
ref: forwardedRef,
|
|
680
|
-
className: tx("card.root", "card", {
|
|
681
|
-
grow,
|
|
682
|
-
square,
|
|
683
|
-
noPadding
|
|
684
|
-
}, classNames)
|
|
685
|
-
}, children);
|
|
686
|
-
});
|
|
687
|
-
var CardHeader = ({ floating, classNames, children, ...props }) => {
|
|
688
|
-
const { tx } = useThemeContext();
|
|
689
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
690
|
-
...props,
|
|
691
|
-
className: tx("card.header", "card", {
|
|
692
|
-
floating
|
|
693
|
-
}, classNames)
|
|
694
|
-
}, children);
|
|
695
|
-
};
|
|
696
|
-
var CardTitle = ({ center, title, classNames, ...props }) => {
|
|
697
|
-
const { tx } = useThemeContext();
|
|
698
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
699
|
-
...props,
|
|
700
|
-
className: tx("card.title", "card", {
|
|
701
|
-
center
|
|
702
|
-
}, classNames)
|
|
703
|
-
}, title);
|
|
704
|
-
};
|
|
705
|
-
var CardDragHandle = ({ position, classNames, ...props }) => {
|
|
706
|
-
const { tx } = useThemeContext();
|
|
707
|
-
const density = useDensityContext();
|
|
708
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
709
|
-
...props,
|
|
710
|
-
className: tx("card.dragHandle", "card", {
|
|
711
|
-
density,
|
|
712
|
-
position
|
|
713
|
-
}, classNames)
|
|
714
|
-
}, /* @__PURE__ */ React12.createElement(DotsSixVertical, {
|
|
715
|
-
className: tx("card.dragHandleIcon", "card")
|
|
716
|
-
}));
|
|
717
|
-
};
|
|
718
|
-
var CardEndcap = ({ Icon: Icon2, position, classNames, ...props }) => {
|
|
719
|
-
const { tx } = useThemeContext();
|
|
720
|
-
const density = useDensityContext();
|
|
721
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
722
|
-
...props,
|
|
723
|
-
className: tx("card.menu", "card", {
|
|
724
|
-
density,
|
|
725
|
-
position
|
|
726
|
-
}, classNames)
|
|
727
|
-
}, /* @__PURE__ */ React12.createElement(Icon2, {
|
|
728
|
-
className: tx("card.menuIcon", "card")
|
|
729
|
-
}));
|
|
730
|
-
};
|
|
731
|
-
var CardMenu = /* @__PURE__ */ forwardRef10(({ children, position, classNames, ...props }, forwardRef1) => {
|
|
732
|
-
const { tx } = useThemeContext();
|
|
733
|
-
const density = useDensityContext();
|
|
734
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
735
|
-
...props,
|
|
736
|
-
className: tx("card.menu", "card", {
|
|
737
|
-
density,
|
|
738
|
-
position
|
|
739
|
-
}, classNames),
|
|
740
|
-
ref: forwardRef1
|
|
741
|
-
}, /* @__PURE__ */ React12.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React12.createElement(DropdownMenu.Trigger, {
|
|
742
|
-
asChild: true
|
|
743
|
-
}, /* @__PURE__ */ React12.createElement(DotsThreeVertical, {
|
|
744
|
-
className: tx("card.menuIcon", "card", {})
|
|
745
|
-
})), /* @__PURE__ */ React12.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React12.createElement(DropdownMenu.Viewport, null, children))));
|
|
746
|
-
});
|
|
747
|
-
var CardBody = ({ gutter, classNames, children, ...props }) => {
|
|
748
|
-
const { tx } = useThemeContext();
|
|
749
|
-
const density = useDensityContext();
|
|
750
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
751
|
-
...props,
|
|
752
|
-
className: tx("card.body", "card", {
|
|
753
|
-
density,
|
|
754
|
-
gutter
|
|
755
|
-
}, classNames)
|
|
756
|
-
}, children);
|
|
757
|
-
};
|
|
758
|
-
var CardMedia = ({ src, contain, classNames, ...props }) => {
|
|
759
|
-
const { tx } = useThemeContext();
|
|
760
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
761
|
-
className: "flex grow overflow-hidden"
|
|
762
|
-
}, /* @__PURE__ */ React12.createElement("img", {
|
|
763
|
-
...props,
|
|
764
|
-
className: tx("card.media", "card", {
|
|
765
|
-
contain
|
|
766
|
-
}, classNames),
|
|
767
|
-
src
|
|
768
|
-
}));
|
|
769
|
-
};
|
|
770
|
-
var Card = {
|
|
771
|
-
Root: CardRoot,
|
|
772
|
-
Header: CardHeader,
|
|
773
|
-
DragHandle: CardDragHandle,
|
|
774
|
-
Endcap: CardEndcap,
|
|
775
|
-
Menu: CardMenu,
|
|
776
|
-
Title: CardTitle,
|
|
777
|
-
Body: CardBody,
|
|
778
|
-
Media: CardMedia
|
|
779
|
-
};
|
|
780
|
-
|
|
781
587
|
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
782
|
-
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
783
|
-
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";
|
|
784
|
-
import React13, { forwardRef as forwardRef11 } from "react";
|
|
785
588
|
var DialogRoot = DialogRootPrimitive;
|
|
786
589
|
var DialogTrigger = DialogTriggerPrimitive;
|
|
787
590
|
var DialogPortal = DialogPortalPrimitive;
|
|
788
|
-
var DialogTitle = /* @__PURE__ */
|
|
591
|
+
var DialogTitle = /* @__PURE__ */ forwardRef9(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
789
592
|
const { tx } = useThemeContext();
|
|
790
|
-
return /* @__PURE__ */
|
|
593
|
+
return /* @__PURE__ */ React11.createElement(DialogTitlePrimitive, {
|
|
791
594
|
...props,
|
|
792
595
|
className: tx("dialog.title", "dialog__title", {
|
|
793
596
|
srOnly
|
|
@@ -795,9 +598,9 @@ var DialogTitle = /* @__PURE__ */ forwardRef11(({ classNames, srOnly, ...props }
|
|
|
795
598
|
ref: forwardedRef
|
|
796
599
|
});
|
|
797
600
|
});
|
|
798
|
-
var DialogDescription = /* @__PURE__ */
|
|
601
|
+
var DialogDescription = /* @__PURE__ */ forwardRef9(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
799
602
|
const { tx } = useThemeContext();
|
|
800
|
-
return /* @__PURE__ */
|
|
603
|
+
return /* @__PURE__ */ React11.createElement(DialogDescriptionPrimitive, {
|
|
801
604
|
...props,
|
|
802
605
|
className: tx("dialog.description", "dialog__description", {
|
|
803
606
|
srOnly
|
|
@@ -811,27 +614,27 @@ var DIALOG_CONTENT_NAME = "DialogContent";
|
|
|
811
614
|
var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
|
|
812
615
|
inOverlayLayout: false
|
|
813
616
|
});
|
|
814
|
-
var DialogOverlay = /* @__PURE__ */
|
|
617
|
+
var DialogOverlay = /* @__PURE__ */ forwardRef9(({ classNames, children, ...props }, forwardedRef) => {
|
|
815
618
|
const { tx } = useThemeContext();
|
|
816
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ React11.createElement(DialogOverlayPrimitive, {
|
|
817
620
|
...props,
|
|
818
621
|
className: tx("dialog.overlay", "dialog__overlay", {}, classNames),
|
|
819
622
|
ref: forwardedRef
|
|
820
|
-
}, /* @__PURE__ */
|
|
623
|
+
}, /* @__PURE__ */ React11.createElement(OverlayLayoutProvider, {
|
|
821
624
|
inOverlayLayout: true
|
|
822
625
|
}, children));
|
|
823
626
|
});
|
|
824
627
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
825
|
-
var DialogContent = /* @__PURE__ */
|
|
628
|
+
var DialogContent = /* @__PURE__ */ forwardRef9(({ classNames, children, ...props }, forwardedRef) => {
|
|
826
629
|
const { tx } = useThemeContext();
|
|
827
630
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
828
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ React11.createElement(DialogContentPrimitive, {
|
|
829
632
|
...props,
|
|
830
633
|
className: tx("dialog.content", "dialog", {
|
|
831
634
|
inOverlayLayout
|
|
832
635
|
}, classNames),
|
|
833
636
|
ref: forwardedRef
|
|
834
|
-
}, /* @__PURE__ */
|
|
637
|
+
}, /* @__PURE__ */ React11.createElement(ElevationProvider, {
|
|
835
638
|
elevation: "chrome"
|
|
836
639
|
}, children));
|
|
837
640
|
});
|
|
@@ -850,15 +653,15 @@ var Dialog = {
|
|
|
850
653
|
// packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
|
|
851
654
|
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";
|
|
852
655
|
import { createContext as createContext6 } from "@radix-ui/react-context";
|
|
853
|
-
import
|
|
656
|
+
import React12, { forwardRef as forwardRef10 } from "react";
|
|
854
657
|
var AlertDialogRoot = AlertDialogRootPrimitive;
|
|
855
658
|
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
856
659
|
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
857
660
|
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
858
661
|
var AlertDialogAction = AlertDialogActionPrimitive;
|
|
859
|
-
var AlertDialogTitle = /* @__PURE__ */
|
|
662
|
+
var AlertDialogTitle = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
860
663
|
const { tx } = useThemeContext();
|
|
861
|
-
return /* @__PURE__ */
|
|
664
|
+
return /* @__PURE__ */ React12.createElement(AlertDialogTitlePrimitive, {
|
|
862
665
|
...props,
|
|
863
666
|
className: tx("dialog.title", "dialog--alert__title", {
|
|
864
667
|
srOnly
|
|
@@ -866,9 +669,9 @@ var AlertDialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...pr
|
|
|
866
669
|
ref: forwardedRef
|
|
867
670
|
});
|
|
868
671
|
});
|
|
869
|
-
var AlertDialogDescription = /* @__PURE__ */
|
|
672
|
+
var AlertDialogDescription = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
870
673
|
const { tx } = useThemeContext();
|
|
871
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ React12.createElement(AlertDialogDescriptionPrimitive, {
|
|
872
675
|
...props,
|
|
873
676
|
className: tx("dialog.description", "dialog--alert__description", {
|
|
874
677
|
srOnly
|
|
@@ -881,27 +684,27 @@ var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
|
|
|
881
684
|
var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
|
|
882
685
|
inOverlayLayout: false
|
|
883
686
|
});
|
|
884
|
-
var AlertDialogOverlay = /* @__PURE__ */
|
|
687
|
+
var AlertDialogOverlay = /* @__PURE__ */ forwardRef10(({ classNames, children, ...props }, forwardedRef) => {
|
|
885
688
|
const { tx } = useThemeContext();
|
|
886
|
-
return /* @__PURE__ */
|
|
689
|
+
return /* @__PURE__ */ React12.createElement(AlertDialogOverlayPrimitive, {
|
|
887
690
|
...props,
|
|
888
691
|
className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
|
|
889
692
|
ref: forwardedRef
|
|
890
|
-
}, /* @__PURE__ */
|
|
693
|
+
}, /* @__PURE__ */ React12.createElement(OverlayLayoutProvider2, {
|
|
891
694
|
inOverlayLayout: true
|
|
892
695
|
}, children));
|
|
893
696
|
});
|
|
894
697
|
AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
|
|
895
|
-
var AlertDialogContent = /* @__PURE__ */
|
|
698
|
+
var AlertDialogContent = /* @__PURE__ */ forwardRef10(({ classNames, children, ...props }, forwardedRef) => {
|
|
896
699
|
const { tx } = useThemeContext();
|
|
897
700
|
const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
|
|
898
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ React12.createElement(AlertDialogContentPrimitive, {
|
|
899
702
|
...props,
|
|
900
703
|
className: tx("dialog.content", "dialog--alert", {
|
|
901
704
|
inOverlayLayout
|
|
902
705
|
}, classNames),
|
|
903
706
|
ref: forwardedRef
|
|
904
|
-
}, /* @__PURE__ */
|
|
707
|
+
}, /* @__PURE__ */ React12.createElement(ElevationProvider, {
|
|
905
708
|
elevation: "chrome"
|
|
906
709
|
}, children));
|
|
907
710
|
});
|
|
@@ -918,16 +721,102 @@ var AlertDialog = {
|
|
|
918
721
|
Action: AlertDialogAction
|
|
919
722
|
};
|
|
920
723
|
|
|
724
|
+
// packages/ui/react-ui/src/components/DropdownMenu/DropdownMenu.tsx
|
|
725
|
+
import { Root as DropdownMenuRootPrimitive, DropdownMenuTrigger as DropdownMenuTriggerPrimitive, DropdownMenuPortal as DropdownMenuPortalPrimitive, DropdownMenuContent as DropdownMenuContentPrimitive, DropdownMenuArrow as DropdownMenuArrowPrimitive, DropdownMenuGroup as DropdownMenuGroupPrimitive, DropdownMenuItem as DropdownMenuItemPrimitive, DropdownMenuCheckboxItem as DropdownMenuCheckboxItemPrimitive, DropdownMenuItemIndicator as DropdownMenuItemIndicatorPrimitive, DropdownMenuSeparator as DropdownMenuSeparatorPrimitive, DropdownMenuLabel as DropdownMenuLabelPrimitive } from "@radix-ui/react-dropdown-menu";
|
|
726
|
+
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
727
|
+
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
728
|
+
import React13, { forwardRef as forwardRef11 } from "react";
|
|
729
|
+
var DropdownMenuRoot = DropdownMenuRootPrimitive;
|
|
730
|
+
var DropdownMenuTrigger = DropdownMenuTriggerPrimitive;
|
|
731
|
+
var DropdownMenuPortal = DropdownMenuPortalPrimitive;
|
|
732
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
733
|
+
const { tx } = useThemeContext();
|
|
734
|
+
return /* @__PURE__ */ React13.createElement(DropdownMenuContentPrimitive, {
|
|
735
|
+
sideOffset: 4,
|
|
736
|
+
collisionPadding: 8,
|
|
737
|
+
...props,
|
|
738
|
+
className: tx("dropdownMenu.content", "dropdown-menu", {}, classNames),
|
|
739
|
+
ref: forwardedRef
|
|
740
|
+
}, /* @__PURE__ */ React13.createElement(ElevationProvider, {
|
|
741
|
+
elevation: "chrome"
|
|
742
|
+
}, children));
|
|
743
|
+
});
|
|
744
|
+
var DropdownMenuViewport = /* @__PURE__ */ forwardRef11(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
745
|
+
const { tx } = useThemeContext();
|
|
746
|
+
const Root3 = asChild ? Slot6 : Primitive6.div;
|
|
747
|
+
return /* @__PURE__ */ React13.createElement(Root3, {
|
|
748
|
+
...props,
|
|
749
|
+
className: tx("dropdownMenu.viewport", "dropdown-menu__viewport", {}, classNames),
|
|
750
|
+
ref: forwardedRef
|
|
751
|
+
}, children);
|
|
752
|
+
});
|
|
753
|
+
var DropdownMenuArrow = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
754
|
+
const { tx } = useThemeContext();
|
|
755
|
+
return /* @__PURE__ */ React13.createElement(DropdownMenuArrowPrimitive, {
|
|
756
|
+
...props,
|
|
757
|
+
className: tx("dropdownMenu.arrow", "dropdown-menu__arrow", {}, classNames),
|
|
758
|
+
ref: forwardedRef
|
|
759
|
+
});
|
|
760
|
+
});
|
|
761
|
+
var DropdownMenuGroup = DropdownMenuGroupPrimitive;
|
|
762
|
+
var DropdownMenuItemIndicator = DropdownMenuItemIndicatorPrimitive;
|
|
763
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
764
|
+
const { tx } = useThemeContext();
|
|
765
|
+
return /* @__PURE__ */ React13.createElement(DropdownMenuItemPrimitive, {
|
|
766
|
+
...props,
|
|
767
|
+
className: tx("dropdownMenu.item", "dropdown-menu__item", {}, classNames),
|
|
768
|
+
ref: forwardedRef
|
|
769
|
+
});
|
|
770
|
+
});
|
|
771
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
772
|
+
const { tx } = useThemeContext();
|
|
773
|
+
return /* @__PURE__ */ React13.createElement(DropdownMenuCheckboxItemPrimitive, {
|
|
774
|
+
...props,
|
|
775
|
+
className: tx("dropdownMenu.item", "dropdown-menu__item--checkbox", {}, classNames),
|
|
776
|
+
ref: forwardedRef
|
|
777
|
+
});
|
|
778
|
+
});
|
|
779
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
780
|
+
const { tx } = useThemeContext();
|
|
781
|
+
return /* @__PURE__ */ React13.createElement(DropdownMenuSeparatorPrimitive, {
|
|
782
|
+
...props,
|
|
783
|
+
className: tx("dropdownMenu.separator", "dropdown-menu__item", {}, classNames),
|
|
784
|
+
ref: forwardedRef
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, forwardedRef) => {
|
|
788
|
+
const { tx } = useThemeContext();
|
|
789
|
+
return /* @__PURE__ */ React13.createElement(DropdownMenuLabelPrimitive, {
|
|
790
|
+
...props,
|
|
791
|
+
className: tx("dropdownMenu.groupLabel", "dropdown-menu__group__label", {}, classNames),
|
|
792
|
+
ref: forwardedRef
|
|
793
|
+
});
|
|
794
|
+
});
|
|
795
|
+
var DropdownMenu = {
|
|
796
|
+
Root: DropdownMenuRoot,
|
|
797
|
+
Trigger: DropdownMenuTrigger,
|
|
798
|
+
Portal: DropdownMenuPortal,
|
|
799
|
+
Content: DropdownMenuContent,
|
|
800
|
+
Viewport: DropdownMenuViewport,
|
|
801
|
+
Arrow: DropdownMenuArrow,
|
|
802
|
+
Group: DropdownMenuGroup,
|
|
803
|
+
Item: DropdownMenuItem,
|
|
804
|
+
CheckboxItem: DropdownMenuCheckboxItem,
|
|
805
|
+
ItemIndicator: DropdownMenuItemIndicator,
|
|
806
|
+
Separator: DropdownMenuSeparator,
|
|
807
|
+
GroupLabel: DropdownMenuGroupLabel
|
|
808
|
+
};
|
|
809
|
+
|
|
921
810
|
// packages/ui/react-ui/src/components/Input/Input.tsx
|
|
922
811
|
import { Check, Minus } from "@phosphor-icons/react";
|
|
923
812
|
import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
|
|
924
813
|
import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
|
|
925
814
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
926
|
-
import
|
|
815
|
+
import React14, { forwardRef as forwardRef12, Fragment, useCallback } from "react";
|
|
927
816
|
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";
|
|
928
|
-
var Label = /* @__PURE__ */
|
|
817
|
+
var Label = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
929
818
|
const { tx } = useThemeContext();
|
|
930
|
-
return /* @__PURE__ */
|
|
819
|
+
return /* @__PURE__ */ React14.createElement(LabelPrimitive, {
|
|
931
820
|
...props,
|
|
932
821
|
className: tx("input.label", "input__label", {
|
|
933
822
|
srOnly
|
|
@@ -935,9 +824,9 @@ var Label = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children, ...pro
|
|
|
935
824
|
ref: forwardedRef
|
|
936
825
|
}, children);
|
|
937
826
|
});
|
|
938
|
-
var Description = /* @__PURE__ */
|
|
827
|
+
var Description = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
939
828
|
const { tx } = useThemeContext();
|
|
940
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ React14.createElement(DescriptionPrimitive, {
|
|
941
830
|
...props,
|
|
942
831
|
className: tx("input.description", "input__description", {
|
|
943
832
|
srOnly
|
|
@@ -945,10 +834,10 @@ var Description = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children,
|
|
|
945
834
|
ref: forwardedRef
|
|
946
835
|
}, children);
|
|
947
836
|
});
|
|
948
|
-
var Validation = /* @__PURE__ */
|
|
837
|
+
var Validation = /* @__PURE__ */ forwardRef12(({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
949
838
|
const { tx } = useThemeContext();
|
|
950
839
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
951
|
-
return /* @__PURE__ */
|
|
840
|
+
return /* @__PURE__ */ React14.createElement(ValidationPrimitive, {
|
|
952
841
|
...props,
|
|
953
842
|
className: tx("input.validation", `input__validation-message input__validation-message--${validationValence}`, {
|
|
954
843
|
srOnly,
|
|
@@ -957,9 +846,9 @@ var Validation = /* @__PURE__ */ forwardRef13(({ __inputScope, srOnly, className
|
|
|
957
846
|
ref: forwardedRef
|
|
958
847
|
}, children);
|
|
959
848
|
});
|
|
960
|
-
var DescriptionAndValidation = /* @__PURE__ */
|
|
849
|
+
var DescriptionAndValidation = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
961
850
|
const { tx } = useThemeContext();
|
|
962
|
-
return /* @__PURE__ */
|
|
851
|
+
return /* @__PURE__ */ React14.createElement(DescriptionAndValidationPrimitive, {
|
|
963
852
|
...props,
|
|
964
853
|
className: tx("input.descriptionAndValidation", "input__description-and-validation", {
|
|
965
854
|
srOnly
|
|
@@ -967,7 +856,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef13(({ srOnly, className
|
|
|
967
856
|
ref: forwardedRef
|
|
968
857
|
}, children);
|
|
969
858
|
});
|
|
970
|
-
var PinInput = /* @__PURE__ */
|
|
859
|
+
var PinInput = /* @__PURE__ */ forwardRef12(({ density: propsDensity, elevation: propsElevation, segmentClassName: propsSegmentClassName, inputClassName, variant, ...props }, forwardedRef) => {
|
|
971
860
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
972
861
|
const { tx } = useThemeContext();
|
|
973
862
|
const density = useDensityContext(propsDensity);
|
|
@@ -986,7 +875,7 @@ var PinInput = /* @__PURE__ */ forwardRef13(({ density: propsDensity, elevation:
|
|
|
986
875
|
propsElevation,
|
|
987
876
|
density
|
|
988
877
|
]);
|
|
989
|
-
return /* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ React14.createElement(PinInputPrimitive, {
|
|
990
879
|
...props,
|
|
991
880
|
segmentClassName,
|
|
992
881
|
...props.autoFocus && !hasIosKeyboard2 && {
|
|
@@ -998,13 +887,14 @@ var PinInput = /* @__PURE__ */ forwardRef13(({ density: propsDensity, elevation:
|
|
|
998
887
|
ref: forwardedRef
|
|
999
888
|
});
|
|
1000
889
|
});
|
|
1001
|
-
var TextInput = /* @__PURE__ */
|
|
890
|
+
var TextInput = /* @__PURE__ */ forwardRef12(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
1002
891
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
1003
|
-
const
|
|
892
|
+
const themeContextValue = useThemeContext();
|
|
1004
893
|
const density = useDensityContext(propsDensity);
|
|
1005
894
|
const elevation = useElevationContext(propsElevation);
|
|
1006
895
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
1007
|
-
|
|
896
|
+
const { tx } = themeContextValue;
|
|
897
|
+
return /* @__PURE__ */ React14.createElement(TextInputPrimitive, {
|
|
1008
898
|
...props,
|
|
1009
899
|
className: tx("input.input", "input", {
|
|
1010
900
|
variant,
|
|
@@ -1019,13 +909,13 @@ var TextInput = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, densit
|
|
|
1019
909
|
ref: forwardedRef
|
|
1020
910
|
});
|
|
1021
911
|
});
|
|
1022
|
-
var TextArea = /* @__PURE__ */
|
|
912
|
+
var TextArea = /* @__PURE__ */ forwardRef12(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
1023
913
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
1024
914
|
const { tx } = useThemeContext();
|
|
1025
915
|
const density = useDensityContext(propsDensity);
|
|
1026
916
|
const elevation = useElevationContext(propsElevation);
|
|
1027
917
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
1028
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ React14.createElement(TextAreaPrimitive, {
|
|
1029
919
|
...props,
|
|
1030
920
|
className: tx("input.input", "input--text-area", {
|
|
1031
921
|
variant,
|
|
@@ -1040,7 +930,7 @@ var TextArea = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, density
|
|
|
1040
930
|
ref: forwardedRef
|
|
1041
931
|
});
|
|
1042
932
|
});
|
|
1043
|
-
var Checkbox = /* @__PURE__ */
|
|
933
|
+
var Checkbox = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, weight = "bold", classNames, ...props }, forwardedRef) => {
|
|
1044
934
|
const [checked, onCheckedChange] = useControllableState({
|
|
1045
935
|
prop: propsChecked,
|
|
1046
936
|
defaultProp: propsDefaultChecked,
|
|
@@ -1049,7 +939,7 @@ var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsCheck
|
|
|
1049
939
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1050
940
|
const { tx } = useThemeContext();
|
|
1051
941
|
const Icon2 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
1052
|
-
return /* @__PURE__ */
|
|
942
|
+
return /* @__PURE__ */ React14.createElement(CheckboxPrimitive, {
|
|
1053
943
|
...props,
|
|
1054
944
|
checked,
|
|
1055
945
|
onCheckedChange,
|
|
@@ -1063,16 +953,16 @@ var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsCheck
|
|
|
1063
953
|
size
|
|
1064
954
|
}, "shrink-0", classNames),
|
|
1065
955
|
ref: forwardedRef
|
|
1066
|
-
}, /* @__PURE__ */
|
|
956
|
+
}, /* @__PURE__ */ React14.createElement(CheckboxIndicatorPrimitive, {
|
|
1067
957
|
asChild: true
|
|
1068
|
-
}, /* @__PURE__ */
|
|
958
|
+
}, /* @__PURE__ */ React14.createElement(Icon2, checked && {
|
|
1069
959
|
weight,
|
|
1070
960
|
className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
1071
961
|
size
|
|
1072
962
|
})
|
|
1073
963
|
})));
|
|
1074
964
|
});
|
|
1075
|
-
var Switch = /* @__PURE__ */
|
|
965
|
+
var Switch = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
|
|
1076
966
|
const { tx } = useThemeContext();
|
|
1077
967
|
const [checked, onCheckedChange] = useControllableState({
|
|
1078
968
|
prop: propsChecked,
|
|
@@ -1080,7 +970,7 @@ var Switch = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked
|
|
|
1080
970
|
onChange: propsOnCheckedChange
|
|
1081
971
|
});
|
|
1082
972
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1083
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ React14.createElement(SwitchPrimitive, {
|
|
1084
974
|
...props,
|
|
1085
975
|
checked,
|
|
1086
976
|
onCheckedChange,
|
|
@@ -1094,7 +984,7 @@ var Switch = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked
|
|
|
1094
984
|
size
|
|
1095
985
|
}, classNames),
|
|
1096
986
|
ref: forwardedRef
|
|
1097
|
-
}, /* @__PURE__ */
|
|
987
|
+
}, /* @__PURE__ */ React14.createElement(SwitchThumbPrimitive, {
|
|
1098
988
|
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
1099
989
|
size
|
|
1100
990
|
})
|
|
@@ -1116,37 +1006,37 @@ var Input = {
|
|
|
1116
1006
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1117
1007
|
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1118
1008
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
1119
|
-
import
|
|
1009
|
+
import React16, { forwardRef as forwardRef13 } from "react";
|
|
1120
1010
|
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";
|
|
1121
1011
|
|
|
1122
1012
|
// packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
|
|
1123
|
-
import
|
|
1013
|
+
import React15, { createContext as createContext7 } from "react";
|
|
1124
1014
|
var DensityContext = /* @__PURE__ */ createContext7({
|
|
1125
1015
|
density: "coarse"
|
|
1126
1016
|
});
|
|
1127
|
-
var DensityProvider = ({ density, children }) => /* @__PURE__ */
|
|
1017
|
+
var DensityProvider = ({ density, children }) => /* @__PURE__ */ React15.createElement(DensityContext.Provider, {
|
|
1128
1018
|
value: {
|
|
1129
1019
|
density
|
|
1130
1020
|
}
|
|
1131
1021
|
}, children);
|
|
1132
1022
|
|
|
1133
1023
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1134
|
-
var List = /* @__PURE__ */
|
|
1024
|
+
var List = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1135
1025
|
const { tx } = useThemeContext();
|
|
1136
1026
|
const density = useDensityContext(props.density);
|
|
1137
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ React16.createElement(DensityProvider, {
|
|
1138
1028
|
density
|
|
1139
|
-
}, /* @__PURE__ */
|
|
1029
|
+
}, /* @__PURE__ */ React16.createElement(ListPrimitive, {
|
|
1140
1030
|
...props,
|
|
1141
1031
|
className: tx("list.root", "list", {}, classNames),
|
|
1142
1032
|
ref: forwardedRef
|
|
1143
1033
|
}, children));
|
|
1144
1034
|
});
|
|
1145
|
-
var ListItemEndcap = /* @__PURE__ */
|
|
1035
|
+
var ListItemEndcap = /* @__PURE__ */ forwardRef13(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1146
1036
|
const Root3 = asChild ? Slot7 : "div";
|
|
1147
1037
|
const density = useDensityContext();
|
|
1148
1038
|
const { tx } = useThemeContext();
|
|
1149
|
-
return /* @__PURE__ */
|
|
1039
|
+
return /* @__PURE__ */ React16.createElement(Root3, {
|
|
1150
1040
|
...!asChild && {
|
|
1151
1041
|
role: "none"
|
|
1152
1042
|
},
|
|
@@ -1160,7 +1050,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef14(({ children, classNames, asChi
|
|
|
1160
1050
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1161
1051
|
const density = useDensityContext();
|
|
1162
1052
|
const { tx } = useThemeContext();
|
|
1163
|
-
return /* @__PURE__ */
|
|
1053
|
+
return /* @__PURE__ */ React16.createElement("div", {
|
|
1164
1054
|
role: "none",
|
|
1165
1055
|
...props,
|
|
1166
1056
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1168,10 +1058,10 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1168
1058
|
}, classNames)
|
|
1169
1059
|
});
|
|
1170
1060
|
};
|
|
1171
|
-
var ListItemHeading = /* @__PURE__ */
|
|
1061
|
+
var ListItemHeading = /* @__PURE__ */ forwardRef13(({ children, classNames, ...props }, forwardedRef) => {
|
|
1172
1062
|
const { tx } = useThemeContext();
|
|
1173
1063
|
const density = useDensityContext();
|
|
1174
|
-
return /* @__PURE__ */
|
|
1064
|
+
return /* @__PURE__ */ React16.createElement(ListPrimitiveItemHeading, {
|
|
1175
1065
|
...props,
|
|
1176
1066
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1177
1067
|
density
|
|
@@ -1179,26 +1069,26 @@ var ListItemHeading = /* @__PURE__ */ forwardRef14(({ children, classNames, ...p
|
|
|
1179
1069
|
ref: forwardedRef
|
|
1180
1070
|
}, children);
|
|
1181
1071
|
});
|
|
1182
|
-
var ListItemOpenTrigger = /* @__PURE__ */
|
|
1072
|
+
var ListItemOpenTrigger = /* @__PURE__ */ forwardRef13(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
|
|
1183
1073
|
const { tx } = useThemeContext();
|
|
1184
1074
|
const density = useDensityContext();
|
|
1185
1075
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1186
1076
|
const Icon2 = open ? CaretDown : CaretRight;
|
|
1187
|
-
return /* @__PURE__ */
|
|
1077
|
+
return /* @__PURE__ */ React16.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1188
1078
|
...props,
|
|
1189
1079
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1190
1080
|
density
|
|
1191
1081
|
}, classNames),
|
|
1192
1082
|
ref: forwardedRef
|
|
1193
|
-
}, children || /* @__PURE__ */
|
|
1083
|
+
}, children || /* @__PURE__ */ React16.createElement(Icon2, {
|
|
1194
1084
|
weight: "bold",
|
|
1195
1085
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1196
1086
|
}));
|
|
1197
1087
|
});
|
|
1198
|
-
var ListItemRoot = /* @__PURE__ */
|
|
1088
|
+
var ListItemRoot = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1199
1089
|
const { tx } = useThemeContext();
|
|
1200
1090
|
const density = useDensityContext();
|
|
1201
|
-
return /* @__PURE__ */
|
|
1091
|
+
return /* @__PURE__ */ React16.createElement(ListPrimitiveItem, {
|
|
1202
1092
|
...props,
|
|
1203
1093
|
className: tx("list.item.root", "list__listItem", {
|
|
1204
1094
|
density,
|
|
@@ -1217,23 +1107,23 @@ var ListItem = {
|
|
|
1217
1107
|
};
|
|
1218
1108
|
|
|
1219
1109
|
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1220
|
-
import
|
|
1221
|
-
var TreeRoot = /* @__PURE__ */
|
|
1222
|
-
return /* @__PURE__ */
|
|
1110
|
+
import React17, { forwardRef as forwardRef14 } from "react";
|
|
1111
|
+
var TreeRoot = /* @__PURE__ */ forwardRef14((props, forwardedRef) => {
|
|
1112
|
+
return /* @__PURE__ */ React17.createElement(List, {
|
|
1223
1113
|
...props,
|
|
1224
1114
|
ref: forwardedRef
|
|
1225
1115
|
});
|
|
1226
1116
|
});
|
|
1227
|
-
var TreeBranch = /* @__PURE__ */
|
|
1117
|
+
var TreeBranch = /* @__PURE__ */ forwardRef14(({ __listScope, ...props }, forwardedRef) => {
|
|
1228
1118
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1229
|
-
return /* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ React17.createElement(List, {
|
|
1230
1120
|
...props,
|
|
1231
1121
|
"aria-labelledby": headingId,
|
|
1232
1122
|
ref: forwardedRef
|
|
1233
1123
|
});
|
|
1234
1124
|
});
|
|
1235
|
-
var TreeItemRoot = /* @__PURE__ */
|
|
1236
|
-
return /* @__PURE__ */
|
|
1125
|
+
var TreeItemRoot = /* @__PURE__ */ forwardRef14((props, forwardedRef) => {
|
|
1126
|
+
return /* @__PURE__ */ React17.createElement(ListItem.Root, {
|
|
1237
1127
|
role: "treeitem",
|
|
1238
1128
|
...props,
|
|
1239
1129
|
ref: forwardedRef
|
|
@@ -1261,7 +1151,7 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1261
1151
|
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
1262
1152
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1263
1153
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1264
|
-
import
|
|
1154
|
+
import React18, { forwardRef as forwardRef15, useCallback as useCallback3, useRef } from "react";
|
|
1265
1155
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1266
1156
|
|
|
1267
1157
|
// packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
|
|
@@ -1420,7 +1310,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
1420
1310
|
defaultProp: defaultComplementarySidebarOpen,
|
|
1421
1311
|
onChange: onComplementarySidebarOpenChange
|
|
1422
1312
|
});
|
|
1423
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ React18.createElement(MainProvider, {
|
|
1424
1314
|
...props,
|
|
1425
1315
|
navigationSidebarOpen,
|
|
1426
1316
|
setNavigationSidebarOpen,
|
|
@@ -1432,7 +1322,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
1432
1322
|
var handleOpenAutoFocus = (event) => {
|
|
1433
1323
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
1434
1324
|
};
|
|
1435
|
-
var MainSidebar = /* @__PURE__ */
|
|
1325
|
+
var MainSidebar = /* @__PURE__ */ forwardRef15(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, setOpen, side, ...props }, forwardedRef) => {
|
|
1436
1326
|
const [isLg] = useMediaQuery("lg", {
|
|
1437
1327
|
ssr: false
|
|
1438
1328
|
});
|
|
@@ -1443,10 +1333,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToD
|
|
|
1443
1333
|
onDismiss: () => setOpen(false)
|
|
1444
1334
|
});
|
|
1445
1335
|
const Root3 = isLg ? Primitive7.div : DialogContent2;
|
|
1446
|
-
return /* @__PURE__ */
|
|
1336
|
+
return /* @__PURE__ */ React18.createElement(DialogRoot2, {
|
|
1447
1337
|
open,
|
|
1448
1338
|
modal: false
|
|
1449
|
-
}, /* @__PURE__ */
|
|
1339
|
+
}, /* @__PURE__ */ React18.createElement(Root3, {
|
|
1450
1340
|
...!isLg && {
|
|
1451
1341
|
forceMount: true,
|
|
1452
1342
|
tabIndex: -1,
|
|
@@ -1462,13 +1352,13 @@ var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToD
|
|
|
1462
1352
|
inert: "true"
|
|
1463
1353
|
},
|
|
1464
1354
|
ref
|
|
1465
|
-
}, /* @__PURE__ */
|
|
1355
|
+
}, /* @__PURE__ */ React18.createElement(ElevationProvider, {
|
|
1466
1356
|
elevation: "group"
|
|
1467
1357
|
}, children)));
|
|
1468
1358
|
});
|
|
1469
|
-
var MainNavigationSidebar = /* @__PURE__ */
|
|
1359
|
+
var MainNavigationSidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1470
1360
|
const { navigationSidebarOpen, setNavigationSidebarOpen } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
1471
|
-
return /* @__PURE__ */
|
|
1361
|
+
return /* @__PURE__ */ React18.createElement(MainSidebar, {
|
|
1472
1362
|
...props,
|
|
1473
1363
|
open: navigationSidebarOpen,
|
|
1474
1364
|
setOpen: setNavigationSidebarOpen,
|
|
@@ -1477,9 +1367,9 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef) =
|
|
|
1477
1367
|
});
|
|
1478
1368
|
});
|
|
1479
1369
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1480
|
-
var MainComplementarySidebar = /* @__PURE__ */
|
|
1370
|
+
var MainComplementarySidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1481
1371
|
const { complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
1482
|
-
return /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ React18.createElement(MainSidebar, {
|
|
1483
1373
|
...props,
|
|
1484
1374
|
open: complementarySidebarOpen,
|
|
1485
1375
|
setOpen: setComplementarySidebarOpen,
|
|
@@ -1488,14 +1378,14 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef
|
|
|
1488
1378
|
});
|
|
1489
1379
|
});
|
|
1490
1380
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1491
|
-
var MainContent = /* @__PURE__ */
|
|
1381
|
+
var MainContent = /* @__PURE__ */ forwardRef15(({ asChild, classNames, bounce, children, ...props }, forwardedRef) => {
|
|
1492
1382
|
const [isLg] = useMediaQuery("lg", {
|
|
1493
1383
|
ssr: false
|
|
1494
1384
|
});
|
|
1495
1385
|
const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1496
1386
|
const { tx } = useThemeContext();
|
|
1497
1387
|
const Root3 = asChild ? Slot8 : "main";
|
|
1498
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ React18.createElement(Root3, {
|
|
1499
1389
|
...props,
|
|
1500
1390
|
className: tx("main.content", "main", {
|
|
1501
1391
|
isLg,
|
|
@@ -1507,13 +1397,13 @@ var MainContent = /* @__PURE__ */ forwardRef16(({ asChild, classNames, bounce, c
|
|
|
1507
1397
|
}, children);
|
|
1508
1398
|
});
|
|
1509
1399
|
MainContent.displayName = MAIN_NAME;
|
|
1510
|
-
var MainOverlay = /* @__PURE__ */
|
|
1400
|
+
var MainOverlay = /* @__PURE__ */ forwardRef15(({ classNames, ...props }, forwardedRef) => {
|
|
1511
1401
|
const [isLg] = useMediaQuery("lg", {
|
|
1512
1402
|
ssr: false
|
|
1513
1403
|
});
|
|
1514
1404
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1515
1405
|
const { tx } = useThemeContext();
|
|
1516
|
-
return /* @__PURE__ */
|
|
1406
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
|
1517
1407
|
onClick: () => {
|
|
1518
1408
|
setNavigationSidebarOpen(false);
|
|
1519
1409
|
setComplementarySidebarOpen(false);
|
|
@@ -1542,20 +1432,20 @@ var Main = {
|
|
|
1542
1432
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
1543
1433
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1544
1434
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1545
|
-
import
|
|
1435
|
+
import React19, { forwardRef as forwardRef16 } from "react";
|
|
1546
1436
|
import { useId as useId3 } from "@dxos/react-hooks";
|
|
1547
1437
|
var MESSAGE_NAME = "Message";
|
|
1548
1438
|
var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
|
|
1549
|
-
var MessageRoot = /* @__PURE__ */
|
|
1439
|
+
var MessageRoot = /* @__PURE__ */ forwardRef16(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
|
|
1550
1440
|
const { tx } = useThemeContext();
|
|
1551
1441
|
const titleId = useId3("message__title", propsTitleId);
|
|
1552
1442
|
const descriptionId = useId3("message__description", propsDescriptionId);
|
|
1553
1443
|
const elevation = useElevationContext(propsElevation);
|
|
1554
1444
|
const Root3 = asChild ? Slot9 : Primitive8.div;
|
|
1555
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ React19.createElement(MessageProvider, {
|
|
1556
1446
|
titleId,
|
|
1557
1447
|
descriptionId
|
|
1558
|
-
}, /* @__PURE__ */
|
|
1448
|
+
}, /* @__PURE__ */ React19.createElement(Root3, {
|
|
1559
1449
|
...props,
|
|
1560
1450
|
className: tx("message.root", "message", {
|
|
1561
1451
|
valence,
|
|
@@ -1568,11 +1458,11 @@ var MessageRoot = /* @__PURE__ */ forwardRef17(({ asChild, valence, elevation: p
|
|
|
1568
1458
|
});
|
|
1569
1459
|
MessageRoot.displayName = MESSAGE_NAME;
|
|
1570
1460
|
var MESSAGE_TITLE_NAME = "MessageTitle";
|
|
1571
|
-
var MessageTitle = /* @__PURE__ */
|
|
1461
|
+
var MessageTitle = /* @__PURE__ */ forwardRef16(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1572
1462
|
const { tx } = useThemeContext();
|
|
1573
1463
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
1574
1464
|
const Root3 = asChild ? Slot9 : Primitive8.h2;
|
|
1575
|
-
return /* @__PURE__ */
|
|
1465
|
+
return /* @__PURE__ */ React19.createElement(Root3, {
|
|
1576
1466
|
...props,
|
|
1577
1467
|
className: tx("message.title", "message__title", {}, className),
|
|
1578
1468
|
id: titleId,
|
|
@@ -1581,11 +1471,11 @@ var MessageTitle = /* @__PURE__ */ forwardRef17(({ asChild, className, children,
|
|
|
1581
1471
|
});
|
|
1582
1472
|
MessageTitle.displayName = MESSAGE_TITLE_NAME;
|
|
1583
1473
|
var MESSAGE_BODY_NAME = "MessageBody";
|
|
1584
|
-
var MessageBody = /* @__PURE__ */
|
|
1474
|
+
var MessageBody = /* @__PURE__ */ forwardRef16(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1585
1475
|
const { tx } = useThemeContext();
|
|
1586
1476
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
1587
1477
|
const Root3 = asChild ? Slot9 : Primitive8.p;
|
|
1588
|
-
return /* @__PURE__ */
|
|
1478
|
+
return /* @__PURE__ */ React19.createElement(Root3, {
|
|
1589
1479
|
...props,
|
|
1590
1480
|
className: tx("message.body", "message__body", {}, className),
|
|
1591
1481
|
id: descriptionId,
|
|
@@ -1603,36 +1493,36 @@ var Message = {
|
|
|
1603
1493
|
import { Root as PopoverRootPrimitive, PopoverContent as PopoverContentPrimitive, PopoverTrigger as PopoverTriggerPrimitive, PopoverAnchor as PopoverAnchorPrimitive, PopoverPortal as PopoverPortalPrimitive, PopoverArrow as PopoverArrowPrimitive, PopoverClose as PopoverClosePrimitive } from "@radix-ui/react-popover";
|
|
1604
1494
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1605
1495
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1606
|
-
import
|
|
1496
|
+
import React20, { forwardRef as forwardRef17 } from "react";
|
|
1607
1497
|
var PopoverRoot = PopoverRootPrimitive;
|
|
1608
1498
|
var PopoverPortal = PopoverPortalPrimitive;
|
|
1609
1499
|
var PopoverTrigger = PopoverTriggerPrimitive;
|
|
1610
1500
|
var PopoverAnchor = PopoverAnchorPrimitive;
|
|
1611
1501
|
var PopoverClose = PopoverClosePrimitive;
|
|
1612
|
-
var PopoverArrow = /* @__PURE__ */
|
|
1502
|
+
var PopoverArrow = /* @__PURE__ */ forwardRef17(({ classNames, ...props }, forwardedRef) => {
|
|
1613
1503
|
const { tx } = useThemeContext();
|
|
1614
|
-
return /* @__PURE__ */
|
|
1504
|
+
return /* @__PURE__ */ React20.createElement(PopoverArrowPrimitive, {
|
|
1615
1505
|
...props,
|
|
1616
1506
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
1617
1507
|
ref: forwardedRef
|
|
1618
1508
|
});
|
|
1619
1509
|
});
|
|
1620
|
-
var PopoverContent = /* @__PURE__ */
|
|
1510
|
+
var PopoverContent = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1621
1511
|
const { tx } = useThemeContext();
|
|
1622
|
-
return /* @__PURE__ */
|
|
1512
|
+
return /* @__PURE__ */ React20.createElement(PopoverContentPrimitive, {
|
|
1623
1513
|
sideOffset: 4,
|
|
1624
1514
|
collisionPadding: 8,
|
|
1625
1515
|
...props,
|
|
1626
1516
|
className: tx("popover.content", "popover", {}, classNames),
|
|
1627
1517
|
ref: forwardedRef
|
|
1628
|
-
}, /* @__PURE__ */
|
|
1518
|
+
}, /* @__PURE__ */ React20.createElement(ElevationProvider, {
|
|
1629
1519
|
elevation: "chrome"
|
|
1630
1520
|
}, children));
|
|
1631
1521
|
});
|
|
1632
|
-
var PopoverViewport = /* @__PURE__ */
|
|
1522
|
+
var PopoverViewport = /* @__PURE__ */ forwardRef17(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
1633
1523
|
const { tx } = useThemeContext();
|
|
1634
1524
|
const Root3 = asChild ? Slot10 : Primitive9.div;
|
|
1635
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1636
1526
|
...props,
|
|
1637
1527
|
className: tx("popover.viewport", "popover__viewport", {
|
|
1638
1528
|
constrainInline,
|
|
@@ -1653,17 +1543,17 @@ var Popover = {
|
|
|
1653
1543
|
};
|
|
1654
1544
|
|
|
1655
1545
|
// packages/ui/react-ui/src/components/Status/Status.tsx
|
|
1656
|
-
import
|
|
1657
|
-
var Status = /* @__PURE__ */
|
|
1546
|
+
import React21, { forwardRef as forwardRef18 } from "react";
|
|
1547
|
+
var Status = /* @__PURE__ */ forwardRef18(({ classNames, children, progress = 0, indeterminate, ...props }, forwardedRef) => {
|
|
1658
1548
|
const { tx } = useThemeContext();
|
|
1659
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ React21.createElement("span", {
|
|
1660
1550
|
role: "status",
|
|
1661
1551
|
...props,
|
|
1662
1552
|
className: tx("status.root", "status", {
|
|
1663
1553
|
indeterminate
|
|
1664
1554
|
}, classNames),
|
|
1665
1555
|
ref: forwardedRef
|
|
1666
|
-
}, /* @__PURE__ */
|
|
1556
|
+
}, /* @__PURE__ */ React21.createElement("span", {
|
|
1667
1557
|
role: "none",
|
|
1668
1558
|
className: tx("status.bar", "status__bar", {
|
|
1669
1559
|
indeterminate
|
|
@@ -1678,42 +1568,42 @@ var Status = /* @__PURE__ */ forwardRef19(({ classNames, children, progress = 0,
|
|
|
1678
1568
|
|
|
1679
1569
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
1680
1570
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
1681
|
-
import
|
|
1682
|
-
var ScrollAreaRoot = /* @__PURE__ */
|
|
1571
|
+
import React22, { forwardRef as forwardRef19 } from "react";
|
|
1572
|
+
var ScrollAreaRoot = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1683
1573
|
const { tx } = useThemeContext();
|
|
1684
|
-
return /* @__PURE__ */
|
|
1574
|
+
return /* @__PURE__ */ React22.createElement(ScrollAreaPrimitiveRoot, {
|
|
1685
1575
|
...props,
|
|
1686
1576
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
1687
1577
|
ref: forwardedRef
|
|
1688
1578
|
});
|
|
1689
1579
|
});
|
|
1690
|
-
var ScrollAreaViewport = /* @__PURE__ */
|
|
1580
|
+
var ScrollAreaViewport = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1691
1581
|
const { tx } = useThemeContext();
|
|
1692
|
-
return /* @__PURE__ */
|
|
1582
|
+
return /* @__PURE__ */ React22.createElement(ScrollAreaPrimitiveViewport, {
|
|
1693
1583
|
...props,
|
|
1694
1584
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
1695
1585
|
ref: forwardedRef
|
|
1696
1586
|
});
|
|
1697
1587
|
});
|
|
1698
|
-
var ScrollAreaScrollbar = /* @__PURE__ */
|
|
1588
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1699
1589
|
const { tx } = useThemeContext();
|
|
1700
|
-
return /* @__PURE__ */
|
|
1590
|
+
return /* @__PURE__ */ React22.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
1701
1591
|
...props,
|
|
1702
1592
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
1703
1593
|
ref: forwardedRef
|
|
1704
1594
|
});
|
|
1705
1595
|
});
|
|
1706
|
-
var ScrollAreaThumb = /* @__PURE__ */
|
|
1596
|
+
var ScrollAreaThumb = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1707
1597
|
const { tx } = useThemeContext();
|
|
1708
|
-
return /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ React22.createElement(ScrollAreaPrimitiveThumb, {
|
|
1709
1599
|
...props,
|
|
1710
1600
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
1711
1601
|
ref: forwardedRef
|
|
1712
1602
|
});
|
|
1713
1603
|
});
|
|
1714
|
-
var ScrollAreaCorner = /* @__PURE__ */
|
|
1604
|
+
var ScrollAreaCorner = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1715
1605
|
const { tx } = useThemeContext();
|
|
1716
|
-
return /* @__PURE__ */
|
|
1606
|
+
return /* @__PURE__ */ React22.createElement(ScrollAreaPrimitiveCorner, {
|
|
1717
1607
|
...props,
|
|
1718
1608
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
1719
1609
|
ref: forwardedRef
|
|
@@ -1730,95 +1620,95 @@ var ScrollArea = {
|
|
|
1730
1620
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
1731
1621
|
import { CaretDown as CaretDown2, CaretUp, Check as Check2 } from "@phosphor-icons/react";
|
|
1732
1622
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1733
|
-
import
|
|
1623
|
+
import React23, { forwardRef as forwardRef20 } from "react";
|
|
1734
1624
|
var SelectRoot = SelectPrimitive.Root;
|
|
1735
1625
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
1736
1626
|
var SelectValue = SelectPrimitive.Value;
|
|
1737
1627
|
var SelectIcon = SelectPrimitive.Icon;
|
|
1738
1628
|
var SelectPortal = SelectPrimitive.Portal;
|
|
1739
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
1740
|
-
return /* @__PURE__ */
|
|
1629
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef20(({ placeholder, ...props }, forwardedRef) => {
|
|
1630
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.Trigger, {
|
|
1741
1631
|
asChild: true,
|
|
1742
1632
|
ref: forwardedRef
|
|
1743
|
-
}, /* @__PURE__ */
|
|
1633
|
+
}, /* @__PURE__ */ React23.createElement(Button, props, /* @__PURE__ */ React23.createElement(SelectPrimitive.Value, {
|
|
1744
1634
|
placeholder
|
|
1745
|
-
}), /* @__PURE__ */
|
|
1635
|
+
}), /* @__PURE__ */ React23.createElement(SelectPrimitive.Icon, {
|
|
1746
1636
|
className: "pis-2"
|
|
1747
|
-
}, /* @__PURE__ */
|
|
1637
|
+
}, /* @__PURE__ */ React23.createElement(CaretDown2, {
|
|
1748
1638
|
weight: "bold"
|
|
1749
1639
|
}))));
|
|
1750
1640
|
});
|
|
1751
|
-
var SelectContent = /* @__PURE__ */
|
|
1641
|
+
var SelectContent = /* @__PURE__ */ forwardRef20(({ classNames, children, ...props }, forwardedRef) => {
|
|
1752
1642
|
const { tx } = useThemeContext();
|
|
1753
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.Content, {
|
|
1754
1644
|
...props,
|
|
1755
1645
|
className: tx("select.content", "select__content", {}, classNames),
|
|
1756
1646
|
ref: forwardedRef
|
|
1757
1647
|
}, children);
|
|
1758
1648
|
});
|
|
1759
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
1649
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef20(({ classNames, children, ...props }, forwardedRef) => {
|
|
1760
1650
|
const { tx } = useThemeContext();
|
|
1761
|
-
return /* @__PURE__ */
|
|
1651
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
1762
1652
|
...props,
|
|
1763
1653
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
1764
1654
|
ref: forwardedRef
|
|
1765
|
-
}, children ?? /* @__PURE__ */
|
|
1655
|
+
}, children ?? /* @__PURE__ */ React23.createElement(CaretUp, {
|
|
1766
1656
|
weight: "bold"
|
|
1767
1657
|
}));
|
|
1768
1658
|
});
|
|
1769
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
1659
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef20(({ classNames, children, ...props }, forwardedRef) => {
|
|
1770
1660
|
const { tx } = useThemeContext();
|
|
1771
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
1772
1662
|
...props,
|
|
1773
1663
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
1774
1664
|
ref: forwardedRef
|
|
1775
|
-
}, children ?? /* @__PURE__ */
|
|
1665
|
+
}, children ?? /* @__PURE__ */ React23.createElement(CaretDown2, {
|
|
1776
1666
|
weight: "bold"
|
|
1777
1667
|
}));
|
|
1778
1668
|
});
|
|
1779
1669
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
1780
|
-
var SelectItem = /* @__PURE__ */
|
|
1670
|
+
var SelectItem = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1781
1671
|
const { tx } = useThemeContext();
|
|
1782
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.Item, {
|
|
1783
1673
|
...props,
|
|
1784
1674
|
className: tx("select.item", "option", {}, classNames),
|
|
1785
1675
|
ref: forwardedRef
|
|
1786
1676
|
});
|
|
1787
1677
|
});
|
|
1788
1678
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
1789
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
1679
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef20(({ classNames, children, ...props }, forwardedRef) => {
|
|
1790
1680
|
const { tx } = useThemeContext();
|
|
1791
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.ItemIndicator, {
|
|
1792
1682
|
...props,
|
|
1793
1683
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
1794
1684
|
ref: forwardedRef
|
|
1795
1685
|
}, children);
|
|
1796
1686
|
});
|
|
1797
|
-
var SelectOption = /* @__PURE__ */
|
|
1687
|
+
var SelectOption = /* @__PURE__ */ forwardRef20(({ children, classNames, ...props }, forwardedRef) => {
|
|
1798
1688
|
const { tx } = useThemeContext();
|
|
1799
|
-
return /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.Item, {
|
|
1800
1690
|
...props,
|
|
1801
1691
|
className: tx("select.item", "option", {}, classNames),
|
|
1802
1692
|
ref: forwardedRef
|
|
1803
|
-
}, /* @__PURE__ */
|
|
1693
|
+
}, /* @__PURE__ */ React23.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React23.createElement(SelectPrimitive.ItemIndicator, {
|
|
1804
1694
|
className: tx("select.itemIndicator", "option__indicator", {})
|
|
1805
|
-
}, /* @__PURE__ */
|
|
1695
|
+
}, /* @__PURE__ */ React23.createElement(Check2, {
|
|
1806
1696
|
weight: "bold"
|
|
1807
1697
|
})));
|
|
1808
1698
|
});
|
|
1809
1699
|
var SelectGroup = SelectPrimitive.Group;
|
|
1810
1700
|
var SelectLabel = SelectPrimitive.Label;
|
|
1811
|
-
var SelectSeparator = /* @__PURE__ */
|
|
1701
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1812
1702
|
const { tx } = useThemeContext();
|
|
1813
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.Separator, {
|
|
1814
1704
|
...props,
|
|
1815
1705
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
1816
1706
|
ref: forwardedRef
|
|
1817
1707
|
});
|
|
1818
1708
|
});
|
|
1819
|
-
var SelectArrow = /* @__PURE__ */
|
|
1709
|
+
var SelectArrow = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1820
1710
|
const { tx } = useThemeContext();
|
|
1821
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ React23.createElement(SelectPrimitive.Arrow, {
|
|
1822
1712
|
...props,
|
|
1823
1713
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
1824
1714
|
ref: forwardedRef
|
|
@@ -1847,10 +1737,10 @@ var Select = {
|
|
|
1847
1737
|
|
|
1848
1738
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
1849
1739
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
1850
|
-
import
|
|
1740
|
+
import React24 from "react";
|
|
1851
1741
|
var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
1852
1742
|
const { tx } = useThemeContext();
|
|
1853
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ React24.createElement(SeparatorPrimitive, {
|
|
1854
1744
|
orientation,
|
|
1855
1745
|
...props,
|
|
1856
1746
|
className: tx("separator.root", "separator", {
|
|
@@ -1862,11 +1752,11 @@ var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
1862
1752
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
1863
1753
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
1864
1754
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
1865
|
-
import
|
|
1866
|
-
var Tag = /* @__PURE__ */
|
|
1755
|
+
import React25, { forwardRef as forwardRef21 } from "react";
|
|
1756
|
+
var Tag = /* @__PURE__ */ forwardRef21(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
1867
1757
|
const { tx } = useThemeContext();
|
|
1868
1758
|
const Root3 = asChild ? Slot11 : Primitive10.span;
|
|
1869
|
-
return /* @__PURE__ */
|
|
1759
|
+
return /* @__PURE__ */ React25.createElement(Root3, {
|
|
1870
1760
|
...props,
|
|
1871
1761
|
className: tx("tag.root", "tag", {
|
|
1872
1762
|
palette
|
|
@@ -1879,58 +1769,58 @@ var Tag = /* @__PURE__ */ forwardRef22(({ asChild, palette, classNames, ...props
|
|
|
1879
1769
|
import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
|
|
1880
1770
|
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
1881
1771
|
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";
|
|
1882
|
-
import
|
|
1772
|
+
import React26, { forwardRef as forwardRef22 } from "react";
|
|
1883
1773
|
var ToastProvider = ToastProviderPrimitive;
|
|
1884
|
-
var ToastViewport = /* @__PURE__ */
|
|
1774
|
+
var ToastViewport = /* @__PURE__ */ forwardRef22(({ classNames, ...props }, forwardedRef) => {
|
|
1885
1775
|
const { tx } = useThemeContext();
|
|
1886
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ React26.createElement(ToastViewportPrimitive, {
|
|
1887
1777
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
1888
1778
|
ref: forwardedRef
|
|
1889
1779
|
});
|
|
1890
1780
|
});
|
|
1891
|
-
var ToastRoot = /* @__PURE__ */
|
|
1781
|
+
var ToastRoot = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
|
|
1892
1782
|
const { tx } = useThemeContext();
|
|
1893
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ React26.createElement(ToastRootPrimitive, {
|
|
1894
1784
|
...props,
|
|
1895
1785
|
className: tx("toast.root", "toast", {}, classNames),
|
|
1896
1786
|
ref: forwardedRef
|
|
1897
|
-
}, /* @__PURE__ */
|
|
1787
|
+
}, /* @__PURE__ */ React26.createElement(ElevationProvider, {
|
|
1898
1788
|
elevation: "chrome"
|
|
1899
|
-
}, /* @__PURE__ */
|
|
1789
|
+
}, /* @__PURE__ */ React26.createElement(DensityProvider, {
|
|
1900
1790
|
density: "fine"
|
|
1901
1791
|
}, children)));
|
|
1902
1792
|
});
|
|
1903
|
-
var ToastBody = /* @__PURE__ */
|
|
1793
|
+
var ToastBody = /* @__PURE__ */ forwardRef22(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1904
1794
|
const { tx } = useThemeContext();
|
|
1905
1795
|
const Root3 = asChild ? Slot12 : Primitive11.div;
|
|
1906
|
-
return /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1907
1797
|
...props,
|
|
1908
1798
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
1909
1799
|
ref: forwardedRef
|
|
1910
1800
|
});
|
|
1911
1801
|
});
|
|
1912
|
-
var ToastTitle = /* @__PURE__ */
|
|
1802
|
+
var ToastTitle = /* @__PURE__ */ forwardRef22(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1913
1803
|
const { tx } = useThemeContext();
|
|
1914
1804
|
const Root3 = asChild ? Slot12 : ToastTitlePrimitive;
|
|
1915
|
-
return /* @__PURE__ */
|
|
1805
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1916
1806
|
...props,
|
|
1917
1807
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
1918
1808
|
ref: forwardedRef
|
|
1919
1809
|
});
|
|
1920
1810
|
});
|
|
1921
|
-
var ToastDescription = /* @__PURE__ */
|
|
1811
|
+
var ToastDescription = /* @__PURE__ */ forwardRef22(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1922
1812
|
const { tx } = useThemeContext();
|
|
1923
1813
|
const Root3 = asChild ? Slot12 : ToastDescriptionPrimitive;
|
|
1924
|
-
return /* @__PURE__ */
|
|
1814
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1925
1815
|
...props,
|
|
1926
1816
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
1927
1817
|
ref: forwardedRef
|
|
1928
1818
|
});
|
|
1929
1819
|
});
|
|
1930
|
-
var ToastActions = /* @__PURE__ */
|
|
1820
|
+
var ToastActions = /* @__PURE__ */ forwardRef22(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1931
1821
|
const { tx } = useThemeContext();
|
|
1932
1822
|
const Root3 = asChild ? Slot12 : Primitive11.div;
|
|
1933
|
-
return /* @__PURE__ */
|
|
1823
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1934
1824
|
...props,
|
|
1935
1825
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
1936
1826
|
ref: forwardedRef
|
|
@@ -1952,46 +1842,46 @@ var Toast = {
|
|
|
1952
1842
|
|
|
1953
1843
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
1954
1844
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
1955
|
-
import
|
|
1956
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
1845
|
+
import React27, { forwardRef as forwardRef23 } from "react";
|
|
1846
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1957
1847
|
const { tx } = useThemeContext();
|
|
1958
|
-
return /* @__PURE__ */
|
|
1848
|
+
return /* @__PURE__ */ React27.createElement(ToolbarPrimitive.Root, {
|
|
1959
1849
|
...props,
|
|
1960
1850
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
1961
1851
|
ref: forwardedRef
|
|
1962
1852
|
}, children);
|
|
1963
1853
|
});
|
|
1964
|
-
var ToolbarButton = /* @__PURE__ */
|
|
1965
|
-
return /* @__PURE__ */
|
|
1854
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef23((props, forwardedRef) => {
|
|
1855
|
+
return /* @__PURE__ */ React27.createElement(ToolbarPrimitive.Button, {
|
|
1966
1856
|
asChild: true
|
|
1967
|
-
}, /* @__PURE__ */
|
|
1857
|
+
}, /* @__PURE__ */ React27.createElement(Button, {
|
|
1968
1858
|
...props,
|
|
1969
1859
|
ref: forwardedRef
|
|
1970
1860
|
}));
|
|
1971
1861
|
});
|
|
1972
|
-
var ToolbarLink = /* @__PURE__ */
|
|
1973
|
-
return /* @__PURE__ */
|
|
1862
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef23((props, forwardedRef) => {
|
|
1863
|
+
return /* @__PURE__ */ React27.createElement(ToolbarPrimitive.Link, {
|
|
1974
1864
|
asChild: true
|
|
1975
|
-
}, /* @__PURE__ */
|
|
1865
|
+
}, /* @__PURE__ */ React27.createElement(Link, {
|
|
1976
1866
|
...props,
|
|
1977
1867
|
ref: forwardedRef
|
|
1978
1868
|
}));
|
|
1979
1869
|
});
|
|
1980
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
1981
|
-
return /* @__PURE__ */
|
|
1870
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1871
|
+
return /* @__PURE__ */ React27.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
1982
1872
|
...props,
|
|
1983
1873
|
asChild: true
|
|
1984
|
-
}, /* @__PURE__ */
|
|
1874
|
+
}, /* @__PURE__ */ React27.createElement(ButtonGroup, {
|
|
1985
1875
|
classNames,
|
|
1986
1876
|
children,
|
|
1987
1877
|
ref: forwardedRef
|
|
1988
1878
|
}));
|
|
1989
1879
|
});
|
|
1990
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
1991
|
-
return /* @__PURE__ */
|
|
1880
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef23(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
1881
|
+
return /* @__PURE__ */ React27.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
1992
1882
|
...props,
|
|
1993
1883
|
asChild: true
|
|
1994
|
-
}, /* @__PURE__ */
|
|
1884
|
+
}, /* @__PURE__ */ React27.createElement(Button, {
|
|
1995
1885
|
variant,
|
|
1996
1886
|
density,
|
|
1997
1887
|
elevation,
|
|
@@ -2001,9 +1891,9 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef24(({ variant, density, e
|
|
|
2001
1891
|
}));
|
|
2002
1892
|
});
|
|
2003
1893
|
var ToolbarSeparator = (props) => {
|
|
2004
|
-
return /* @__PURE__ */
|
|
1894
|
+
return /* @__PURE__ */ React27.createElement(ToolbarPrimitive.Separator, {
|
|
2005
1895
|
asChild: true
|
|
2006
|
-
}, /* @__PURE__ */
|
|
1896
|
+
}, /* @__PURE__ */ React27.createElement(Separator2, {
|
|
2007
1897
|
orientation: "vertical",
|
|
2008
1898
|
...props
|
|
2009
1899
|
}));
|
|
@@ -2019,22 +1909,22 @@ var Toolbar = {
|
|
|
2019
1909
|
|
|
2020
1910
|
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
2021
1911
|
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
2022
|
-
import
|
|
1912
|
+
import React28, { forwardRef as forwardRef24 } from "react";
|
|
2023
1913
|
var TooltipProvider = TooltipProviderPrimitive;
|
|
2024
1914
|
var TooltipRoot = TooltipRootPrimitive;
|
|
2025
1915
|
var TooltipPortal = TooltipPortalPrimitive;
|
|
2026
1916
|
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
2027
|
-
var TooltipArrow = /* @__PURE__ */
|
|
1917
|
+
var TooltipArrow = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2028
1918
|
const { tx } = useThemeContext();
|
|
2029
|
-
return /* @__PURE__ */
|
|
1919
|
+
return /* @__PURE__ */ React28.createElement(TooltipArrowPrimitive, {
|
|
2030
1920
|
...props,
|
|
2031
1921
|
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
2032
1922
|
ref: forwardedRef
|
|
2033
1923
|
});
|
|
2034
1924
|
});
|
|
2035
|
-
var TooltipContent = /* @__PURE__ */
|
|
1925
|
+
var TooltipContent = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2036
1926
|
const { tx } = useThemeContext();
|
|
2037
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ React28.createElement(TooltipContentPrimitive, {
|
|
2038
1928
|
sideOffset: 4,
|
|
2039
1929
|
collisionPadding: 8,
|
|
2040
1930
|
...props,
|
|
@@ -2053,7 +1943,7 @@ var Tooltip = {
|
|
|
2053
1943
|
|
|
2054
1944
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
2055
1945
|
import { createKeyborg } from "keyborg";
|
|
2056
|
-
import
|
|
1946
|
+
import React29, { createContext as createContext10, useEffect as useEffect4 } from "react";
|
|
2057
1947
|
|
|
2058
1948
|
// packages/ui/react-ui/src/util/hasIosKeyboard.ts
|
|
2059
1949
|
var hasIosKeyboard = () => {
|
|
@@ -2081,19 +1971,19 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
2081
1971
|
return () => kb.unsubscribe(handleInputModalityChange);
|
|
2082
1972
|
}
|
|
2083
1973
|
}, []);
|
|
2084
|
-
return /* @__PURE__ */
|
|
1974
|
+
return /* @__PURE__ */ React29.createElement(ThemeContext.Provider, {
|
|
2085
1975
|
value: {
|
|
2086
1976
|
tx,
|
|
2087
1977
|
themeMode,
|
|
2088
1978
|
hasIosKeyboard: hasIosKeyboard()
|
|
2089
1979
|
}
|
|
2090
|
-
}, /* @__PURE__ */
|
|
1980
|
+
}, /* @__PURE__ */ React29.createElement(TranslationsProvider, {
|
|
2091
1981
|
fallback,
|
|
2092
1982
|
resourceExtensions,
|
|
2093
1983
|
appNs
|
|
2094
|
-
}, /* @__PURE__ */
|
|
1984
|
+
}, /* @__PURE__ */ React29.createElement(ElevationProvider, {
|
|
2095
1985
|
elevation: rootElevation
|
|
2096
|
-
}, /* @__PURE__ */
|
|
1986
|
+
}, /* @__PURE__ */ React29.createElement(DensityProvider, {
|
|
2097
1987
|
density: rootDensity
|
|
2098
1988
|
}, children))));
|
|
2099
1989
|
};
|
|
@@ -2107,11 +1997,6 @@ export {
|
|
|
2107
1997
|
Breadcrumb,
|
|
2108
1998
|
Button,
|
|
2109
1999
|
ButtonGroup,
|
|
2110
|
-
Card,
|
|
2111
|
-
CardBody,
|
|
2112
|
-
CardHeader,
|
|
2113
|
-
CardMedia,
|
|
2114
|
-
CardTitle,
|
|
2115
2000
|
DensityContext,
|
|
2116
2001
|
DensityProvider,
|
|
2117
2002
|
Dialog,
|