@dxos/react-ui 0.3.7-main.ea9e237 → 0.3.7-main.ec7f1fc
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 +338 -442
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.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/package.json +6 -7
- package/src/components/Input/Input.tsx +0 -1
- package/src/components/Select/Select.tsx +1 -3
- package/src/components/index.ts +0 -1
- package/dist/types/src/components/ComboBox/ComboBox.d.ts +0 -49
- package/dist/types/src/components/ComboBox/ComboBox.d.ts.map +0 -1
- package/dist/types/src/components/ComboBox/ComboBox.stories.d.ts +0 -25
- package/dist/types/src/components/ComboBox/ComboBox.stories.d.ts.map +0 -1
- package/dist/types/src/components/ComboBox/index.d.ts +0 -2
- package/dist/types/src/components/ComboBox/index.d.ts.map +0 -1
- package/src/components/ComboBox/ComboBox.stories.tsx +0 -82
- package/src/components/ComboBox/ComboBox.tsx +0 -218
- package/src/components/ComboBox/index.ts +0 -5
|
@@ -199,10 +199,10 @@ var AvatarFrame = /* @__PURE__ */ forwardRef(({ classNames, children, ...props }
|
|
|
199
199
|
}));
|
|
200
200
|
});
|
|
201
201
|
var AvatarLabel = /* @__PURE__ */ forwardRef(({ asChild, srOnly, classNames, ...props }, forwardedRef) => {
|
|
202
|
-
const
|
|
202
|
+
const Root3 = asChild ? Slot : Primitive.span;
|
|
203
203
|
const { tx } = useThemeContext();
|
|
204
204
|
const { labelId } = useAvatarContext("AvatarLabel");
|
|
205
|
-
return /* @__PURE__ */ React2.createElement(
|
|
205
|
+
return /* @__PURE__ */ React2.createElement(Root3, {
|
|
206
206
|
...props,
|
|
207
207
|
id: labelId,
|
|
208
208
|
ref: forwardedRef,
|
|
@@ -212,10 +212,10 @@ var AvatarLabel = /* @__PURE__ */ forwardRef(({ asChild, srOnly, classNames, ...
|
|
|
212
212
|
});
|
|
213
213
|
});
|
|
214
214
|
var AvatarDescription = /* @__PURE__ */ forwardRef(({ asChild, srOnly, classNames, ...props }, forwardedRef) => {
|
|
215
|
-
const
|
|
215
|
+
const Root3 = asChild ? Slot : Primitive.span;
|
|
216
216
|
const { tx } = useThemeContext();
|
|
217
217
|
const { descriptionId } = useAvatarContext("AvatarDescription");
|
|
218
|
-
return /* @__PURE__ */ React2.createElement(
|
|
218
|
+
return /* @__PURE__ */ React2.createElement(Root3, {
|
|
219
219
|
...props,
|
|
220
220
|
id: descriptionId,
|
|
221
221
|
ref: forwardedRef,
|
|
@@ -372,8 +372,8 @@ import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
|
372
372
|
import React4, { forwardRef as forwardRef3 } from "react";
|
|
373
373
|
var Link = /* @__PURE__ */ forwardRef3(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
374
374
|
const { tx } = useThemeContext();
|
|
375
|
-
const
|
|
376
|
-
return /* @__PURE__ */ React4.createElement(
|
|
375
|
+
const Root3 = asChild ? Slot2 : Primitive2.a;
|
|
376
|
+
return /* @__PURE__ */ React4.createElement(Root3, {
|
|
377
377
|
...props,
|
|
378
378
|
className: tx("link.root", "link", {}, classNames),
|
|
379
379
|
ref: forwardedRef
|
|
@@ -383,8 +383,8 @@ var Link = /* @__PURE__ */ forwardRef3(({ asChild, classNames, ...props }, forwa
|
|
|
383
383
|
// packages/ui/react-ui/src/components/Breadcrumb/Breadcrumb.tsx
|
|
384
384
|
var BreadcrumbRoot = /* @__PURE__ */ forwardRef4(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
385
385
|
const { tx } = useThemeContext();
|
|
386
|
-
const
|
|
387
|
-
return /* @__PURE__ */ React5.createElement(
|
|
386
|
+
const Root3 = asChild ? Slot3 : Primitive3.div;
|
|
387
|
+
return /* @__PURE__ */ React5.createElement(Root3, {
|
|
388
388
|
role: "navigation",
|
|
389
389
|
...props,
|
|
390
390
|
className: tx("breadcrumb.root", "breadcrumb", {}, classNames),
|
|
@@ -393,8 +393,8 @@ var BreadcrumbRoot = /* @__PURE__ */ forwardRef4(({ asChild, classNames, ...prop
|
|
|
393
393
|
});
|
|
394
394
|
var BreadcrumbList = /* @__PURE__ */ forwardRef4(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
395
395
|
const { tx } = useThemeContext();
|
|
396
|
-
const
|
|
397
|
-
return /* @__PURE__ */ React5.createElement(
|
|
396
|
+
const Root3 = asChild ? Slot3 : Primitive3.ol;
|
|
397
|
+
return /* @__PURE__ */ React5.createElement(Root3, {
|
|
398
398
|
...props,
|
|
399
399
|
className: tx("breadcrumb.list", "breadcrumb__list", {}, classNames),
|
|
400
400
|
ref: forwardedRef
|
|
@@ -402,24 +402,24 @@ var BreadcrumbList = /* @__PURE__ */ forwardRef4(({ asChild, classNames, ...prop
|
|
|
402
402
|
});
|
|
403
403
|
var BreadcrumbListItem = /* @__PURE__ */ forwardRef4(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
404
404
|
const { tx } = useThemeContext();
|
|
405
|
-
const
|
|
406
|
-
return /* @__PURE__ */ React5.createElement(
|
|
405
|
+
const Root3 = asChild ? Slot3 : Primitive3.li;
|
|
406
|
+
return /* @__PURE__ */ React5.createElement(Root3, {
|
|
407
407
|
...props,
|
|
408
408
|
className: tx("breadcrumb.listItem", "breadcrumb__list__item", {}, classNames),
|
|
409
409
|
ref: forwardedRef
|
|
410
410
|
});
|
|
411
411
|
});
|
|
412
412
|
var BreadcrumbLink = /* @__PURE__ */ forwardRef4(({ asChild, ...props }, forwardedRef) => {
|
|
413
|
-
const
|
|
414
|
-
return /* @__PURE__ */ React5.createElement(
|
|
413
|
+
const Root3 = asChild ? Slot3 : Link;
|
|
414
|
+
return /* @__PURE__ */ React5.createElement(Root3, {
|
|
415
415
|
...props,
|
|
416
416
|
ref: forwardedRef
|
|
417
417
|
});
|
|
418
418
|
});
|
|
419
419
|
var BreadcrumbCurrent = /* @__PURE__ */ forwardRef4(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
420
420
|
const { tx } = useThemeContext();
|
|
421
|
-
const
|
|
422
|
-
return /* @__PURE__ */ React5.createElement(
|
|
421
|
+
const Root3 = asChild ? Slot3 : "h1";
|
|
422
|
+
return /* @__PURE__ */ React5.createElement(Root3, {
|
|
423
423
|
...props,
|
|
424
424
|
"aria-current": "page",
|
|
425
425
|
className: tx("breadcrumb.current", "breadcrumb__item__heading--current", {}, classNames),
|
|
@@ -461,8 +461,8 @@ var Button = /* @__PURE__ */ forwardRef5(({ classNames, children, density: props
|
|
|
461
461
|
const { tx } = useThemeContext();
|
|
462
462
|
const elevation = useElevationContext(propsElevation);
|
|
463
463
|
const density = useDensityContext(propsDensity);
|
|
464
|
-
const
|
|
465
|
-
return /* @__PURE__ */ React6.createElement(
|
|
464
|
+
const Root3 = asChild ? Slot4 : Primitive4.button;
|
|
465
|
+
return /* @__PURE__ */ React6.createElement(Root3, {
|
|
466
466
|
ref,
|
|
467
467
|
...props,
|
|
468
468
|
className: tx("button.root", "button", {
|
|
@@ -481,8 +481,8 @@ Button.displayName = BUTTON_NAME;
|
|
|
481
481
|
var ButtonGroup = /* @__PURE__ */ forwardRef5(({ children, elevation: propsElevation, classNames, asChild, ...props }, forwardedRef) => {
|
|
482
482
|
const { tx } = useThemeContext();
|
|
483
483
|
const elevation = useElevationContext(propsElevation);
|
|
484
|
-
const
|
|
485
|
-
return /* @__PURE__ */ React6.createElement(
|
|
484
|
+
const Root3 = asChild ? Slot4 : Primitive4.div;
|
|
485
|
+
return /* @__PURE__ */ React6.createElement(Root3, {
|
|
486
486
|
role: "none",
|
|
487
487
|
...props,
|
|
488
488
|
className: tx("button.group", "button-group", {
|
|
@@ -576,8 +576,8 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef8(({ classNames, children, .
|
|
|
576
576
|
});
|
|
577
577
|
var DropdownMenuViewport = /* @__PURE__ */ forwardRef8(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
578
578
|
const { tx } = useThemeContext();
|
|
579
|
-
const
|
|
580
|
-
return /* @__PURE__ */ React10.createElement(
|
|
579
|
+
const Root3 = asChild ? Slot5 : Primitive5.div;
|
|
580
|
+
return /* @__PURE__ */ React10.createElement(Root3, {
|
|
581
581
|
...props,
|
|
582
582
|
className: tx("dropdownMenu.viewport", "dropdown-menu__viewport", {}, classNames),
|
|
583
583
|
ref: forwardedRef
|
|
@@ -757,24 +757,156 @@ var Center = (props) => {
|
|
|
757
757
|
}, children);
|
|
758
758
|
};
|
|
759
759
|
|
|
760
|
-
// packages/ui/react-ui/src/components/
|
|
761
|
-
import {
|
|
762
|
-
import {
|
|
763
|
-
import {
|
|
764
|
-
|
|
765
|
-
|
|
760
|
+
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
761
|
+
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
762
|
+
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";
|
|
763
|
+
import React13, { forwardRef as forwardRef10 } from "react";
|
|
764
|
+
var DialogRoot = DialogRootPrimitive;
|
|
765
|
+
var DialogTrigger = DialogTriggerPrimitive;
|
|
766
|
+
var DialogPortal = DialogPortalPrimitive;
|
|
767
|
+
var DialogTitle = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
768
|
+
const { tx } = useThemeContext();
|
|
769
|
+
return /* @__PURE__ */ React13.createElement(DialogTitlePrimitive, {
|
|
770
|
+
...props,
|
|
771
|
+
className: tx("dialog.title", "dialog__title", {
|
|
772
|
+
srOnly
|
|
773
|
+
}, classNames),
|
|
774
|
+
ref: forwardedRef
|
|
775
|
+
});
|
|
776
|
+
});
|
|
777
|
+
var DialogDescription = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
778
|
+
const { tx } = useThemeContext();
|
|
779
|
+
return /* @__PURE__ */ React13.createElement(DialogDescriptionPrimitive, {
|
|
780
|
+
...props,
|
|
781
|
+
className: tx("dialog.description", "dialog__description", {
|
|
782
|
+
srOnly
|
|
783
|
+
}, classNames),
|
|
784
|
+
ref: forwardedRef
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
var DialogClose = DialogClosePrimitive;
|
|
788
|
+
var DIALOG_OVERLAY_NAME = "DialogOverlay";
|
|
789
|
+
var DIALOG_CONTENT_NAME = "DialogContent";
|
|
790
|
+
var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
|
|
791
|
+
inOverlayLayout: false
|
|
792
|
+
});
|
|
793
|
+
var DialogOverlay = /* @__PURE__ */ forwardRef10(({ classNames, children, ...props }, forwardedRef) => {
|
|
794
|
+
const { tx } = useThemeContext();
|
|
795
|
+
return /* @__PURE__ */ React13.createElement(DialogOverlayPrimitive, {
|
|
796
|
+
...props,
|
|
797
|
+
className: tx("dialog.overlay", "dialog__overlay", {}, classNames),
|
|
798
|
+
ref: forwardedRef
|
|
799
|
+
}, /* @__PURE__ */ React13.createElement(OverlayLayoutProvider, {
|
|
800
|
+
inOverlayLayout: true
|
|
801
|
+
}, children));
|
|
802
|
+
});
|
|
803
|
+
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
804
|
+
var DialogContent = /* @__PURE__ */ forwardRef10(({ classNames, children, ...props }, forwardedRef) => {
|
|
805
|
+
const { tx } = useThemeContext();
|
|
806
|
+
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
807
|
+
return /* @__PURE__ */ React13.createElement(DialogContentPrimitive, {
|
|
808
|
+
...props,
|
|
809
|
+
className: tx("dialog.content", "dialog", {
|
|
810
|
+
inOverlayLayout
|
|
811
|
+
}, classNames),
|
|
812
|
+
ref: forwardedRef
|
|
813
|
+
}, /* @__PURE__ */ React13.createElement(ElevationProvider, {
|
|
814
|
+
elevation: "chrome"
|
|
815
|
+
}, children));
|
|
816
|
+
});
|
|
817
|
+
DialogContent.displayName = DIALOG_CONTENT_NAME;
|
|
818
|
+
var Dialog = {
|
|
819
|
+
Root: DialogRoot,
|
|
820
|
+
Trigger: DialogTrigger,
|
|
821
|
+
Portal: DialogPortal,
|
|
822
|
+
Overlay: DialogOverlay,
|
|
823
|
+
Content: DialogContent,
|
|
824
|
+
Title: DialogTitle,
|
|
825
|
+
Description: DialogDescription,
|
|
826
|
+
Close: DialogClose
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
// packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
|
|
830
|
+
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";
|
|
831
|
+
import { createContext as createContext6 } from "@radix-ui/react-context";
|
|
766
832
|
import React14, { forwardRef as forwardRef11 } from "react";
|
|
833
|
+
var AlertDialogRoot = AlertDialogRootPrimitive;
|
|
834
|
+
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
835
|
+
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
836
|
+
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
837
|
+
var AlertDialogAction = AlertDialogActionPrimitive;
|
|
838
|
+
var AlertDialogTitle = /* @__PURE__ */ forwardRef11(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
839
|
+
const { tx } = useThemeContext();
|
|
840
|
+
return /* @__PURE__ */ React14.createElement(AlertDialogTitlePrimitive, {
|
|
841
|
+
...props,
|
|
842
|
+
className: tx("dialog.title", "dialog--alert__title", {
|
|
843
|
+
srOnly
|
|
844
|
+
}, classNames),
|
|
845
|
+
ref: forwardedRef
|
|
846
|
+
});
|
|
847
|
+
});
|
|
848
|
+
var AlertDialogDescription = /* @__PURE__ */ forwardRef11(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
849
|
+
const { tx } = useThemeContext();
|
|
850
|
+
return /* @__PURE__ */ React14.createElement(AlertDialogDescriptionPrimitive, {
|
|
851
|
+
...props,
|
|
852
|
+
className: tx("dialog.description", "dialog--alert__description", {
|
|
853
|
+
srOnly
|
|
854
|
+
}, classNames),
|
|
855
|
+
ref: forwardedRef
|
|
856
|
+
});
|
|
857
|
+
});
|
|
858
|
+
var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
|
|
859
|
+
var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
|
|
860
|
+
var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
|
|
861
|
+
inOverlayLayout: false
|
|
862
|
+
});
|
|
863
|
+
var AlertDialogOverlay = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
864
|
+
const { tx } = useThemeContext();
|
|
865
|
+
return /* @__PURE__ */ React14.createElement(AlertDialogOverlayPrimitive, {
|
|
866
|
+
...props,
|
|
867
|
+
className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
|
|
868
|
+
ref: forwardedRef
|
|
869
|
+
}, /* @__PURE__ */ React14.createElement(OverlayLayoutProvider2, {
|
|
870
|
+
inOverlayLayout: true
|
|
871
|
+
}, children));
|
|
872
|
+
});
|
|
873
|
+
AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
|
|
874
|
+
var AlertDialogContent = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
875
|
+
const { tx } = useThemeContext();
|
|
876
|
+
const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
|
|
877
|
+
return /* @__PURE__ */ React14.createElement(AlertDialogContentPrimitive, {
|
|
878
|
+
...props,
|
|
879
|
+
className: tx("dialog.content", "dialog--alert", {
|
|
880
|
+
inOverlayLayout
|
|
881
|
+
}, classNames),
|
|
882
|
+
ref: forwardedRef
|
|
883
|
+
}, /* @__PURE__ */ React14.createElement(ElevationProvider, {
|
|
884
|
+
elevation: "chrome"
|
|
885
|
+
}, children));
|
|
886
|
+
});
|
|
887
|
+
AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
|
|
888
|
+
var AlertDialog = {
|
|
889
|
+
Root: AlertDialogRoot,
|
|
890
|
+
Trigger: AlertDialogTrigger,
|
|
891
|
+
Portal: AlertDialogPortal,
|
|
892
|
+
Overlay: AlertDialogOverlay,
|
|
893
|
+
Content: AlertDialogContent,
|
|
894
|
+
Title: AlertDialogTitle,
|
|
895
|
+
Description: AlertDialogDescription,
|
|
896
|
+
Cancel: AlertDialogCancel,
|
|
897
|
+
Action: AlertDialogAction
|
|
898
|
+
};
|
|
767
899
|
|
|
768
900
|
// packages/ui/react-ui/src/components/Input/Input.tsx
|
|
769
901
|
import { Check, Minus } from "@phosphor-icons/react";
|
|
770
902
|
import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
|
|
771
903
|
import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
|
|
772
904
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
773
|
-
import
|
|
905
|
+
import React15, { forwardRef as forwardRef12, Fragment, useCallback } from "react";
|
|
774
906
|
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";
|
|
775
|
-
var Label = /* @__PURE__ */
|
|
907
|
+
var Label = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
776
908
|
const { tx } = useThemeContext();
|
|
777
|
-
return /* @__PURE__ */
|
|
909
|
+
return /* @__PURE__ */ React15.createElement(LabelPrimitive, {
|
|
778
910
|
...props,
|
|
779
911
|
className: tx("input.label", "input__label", {
|
|
780
912
|
srOnly
|
|
@@ -782,9 +914,9 @@ var Label = /* @__PURE__ */ forwardRef10(({ srOnly, classNames, children, ...pro
|
|
|
782
914
|
ref: forwardedRef
|
|
783
915
|
}, children);
|
|
784
916
|
});
|
|
785
|
-
var Description = /* @__PURE__ */
|
|
917
|
+
var Description = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
786
918
|
const { tx } = useThemeContext();
|
|
787
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ React15.createElement(DescriptionPrimitive, {
|
|
788
920
|
...props,
|
|
789
921
|
className: tx("input.description", "input__description", {
|
|
790
922
|
srOnly
|
|
@@ -792,10 +924,10 @@ var Description = /* @__PURE__ */ forwardRef10(({ srOnly, classNames, children,
|
|
|
792
924
|
ref: forwardedRef
|
|
793
925
|
}, children);
|
|
794
926
|
});
|
|
795
|
-
var Validation = /* @__PURE__ */
|
|
927
|
+
var Validation = /* @__PURE__ */ forwardRef12(({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
796
928
|
const { tx } = useThemeContext();
|
|
797
929
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
798
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ React15.createElement(ValidationPrimitive, {
|
|
799
931
|
...props,
|
|
800
932
|
className: tx("input.validation", `input__validation-message input__validation-message--${validationValence}`, {
|
|
801
933
|
srOnly,
|
|
@@ -804,9 +936,9 @@ var Validation = /* @__PURE__ */ forwardRef10(({ __inputScope, srOnly, className
|
|
|
804
936
|
ref: forwardedRef
|
|
805
937
|
}, children);
|
|
806
938
|
});
|
|
807
|
-
var DescriptionAndValidation = /* @__PURE__ */
|
|
939
|
+
var DescriptionAndValidation = /* @__PURE__ */ forwardRef12(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
808
940
|
const { tx } = useThemeContext();
|
|
809
|
-
return /* @__PURE__ */
|
|
941
|
+
return /* @__PURE__ */ React15.createElement(DescriptionAndValidationPrimitive, {
|
|
810
942
|
...props,
|
|
811
943
|
className: tx("input.descriptionAndValidation", "input__description-and-validation", {
|
|
812
944
|
srOnly
|
|
@@ -814,7 +946,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef10(({ srOnly, className
|
|
|
814
946
|
ref: forwardedRef
|
|
815
947
|
}, children);
|
|
816
948
|
});
|
|
817
|
-
var PinInput = /* @__PURE__ */
|
|
949
|
+
var PinInput = /* @__PURE__ */ forwardRef12(({ density: propsDensity, elevation: propsElevation, segmentClassName: propsSegmentClassName, inputClassName, variant, ...props }, forwardedRef) => {
|
|
818
950
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
819
951
|
const { tx } = useThemeContext();
|
|
820
952
|
const density = useDensityContext(propsDensity);
|
|
@@ -833,7 +965,7 @@ var PinInput = /* @__PURE__ */ forwardRef10(({ density: propsDensity, elevation:
|
|
|
833
965
|
propsElevation,
|
|
834
966
|
density
|
|
835
967
|
]);
|
|
836
|
-
return /* @__PURE__ */
|
|
968
|
+
return /* @__PURE__ */ React15.createElement(PinInputPrimitive, {
|
|
837
969
|
...props,
|
|
838
970
|
segmentClassName,
|
|
839
971
|
...props.autoFocus && !hasIosKeyboard2 && {
|
|
@@ -845,13 +977,13 @@ var PinInput = /* @__PURE__ */ forwardRef10(({ density: propsDensity, elevation:
|
|
|
845
977
|
ref: forwardedRef
|
|
846
978
|
});
|
|
847
979
|
});
|
|
848
|
-
var TextInput = /* @__PURE__ */
|
|
980
|
+
var TextInput = /* @__PURE__ */ forwardRef12(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
849
981
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
850
982
|
const { tx } = useThemeContext();
|
|
851
983
|
const density = useDensityContext(propsDensity);
|
|
852
984
|
const elevation = useElevationContext(propsElevation);
|
|
853
985
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
854
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ React15.createElement(TextInputPrimitive, {
|
|
855
987
|
...props,
|
|
856
988
|
className: tx("input.input", "input", {
|
|
857
989
|
variant,
|
|
@@ -866,13 +998,13 @@ var TextInput = /* @__PURE__ */ forwardRef10(({ __inputScope, classNames, densit
|
|
|
866
998
|
ref: forwardedRef
|
|
867
999
|
});
|
|
868
1000
|
});
|
|
869
|
-
var TextArea = /* @__PURE__ */
|
|
1001
|
+
var TextArea = /* @__PURE__ */ forwardRef12(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
870
1002
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
871
1003
|
const { tx } = useThemeContext();
|
|
872
1004
|
const density = useDensityContext(propsDensity);
|
|
873
1005
|
const elevation = useElevationContext(propsElevation);
|
|
874
1006
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
875
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ React15.createElement(TextAreaPrimitive, {
|
|
876
1008
|
...props,
|
|
877
1009
|
className: tx("input.input", "input--text-area", {
|
|
878
1010
|
variant,
|
|
@@ -887,7 +1019,7 @@ var TextArea = /* @__PURE__ */ forwardRef10(({ __inputScope, classNames, density
|
|
|
887
1019
|
ref: forwardedRef
|
|
888
1020
|
});
|
|
889
1021
|
});
|
|
890
|
-
var Checkbox = /* @__PURE__ */
|
|
1022
|
+
var Checkbox = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, weight = "bold", classNames, ...props }, forwardedRef) => {
|
|
891
1023
|
const [checked, onCheckedChange] = useControllableState({
|
|
892
1024
|
prop: propsChecked,
|
|
893
1025
|
defaultProp: propsDefaultChecked,
|
|
@@ -896,7 +1028,7 @@ var Checkbox = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsCheck
|
|
|
896
1028
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
897
1029
|
const { tx } = useThemeContext();
|
|
898
1030
|
const Icon2 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
899
|
-
return /* @__PURE__ */
|
|
1031
|
+
return /* @__PURE__ */ React15.createElement(CheckboxPrimitive, {
|
|
900
1032
|
...props,
|
|
901
1033
|
checked,
|
|
902
1034
|
onCheckedChange,
|
|
@@ -910,16 +1042,16 @@ var Checkbox = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsCheck
|
|
|
910
1042
|
size
|
|
911
1043
|
}, "shrink-0", classNames),
|
|
912
1044
|
ref: forwardedRef
|
|
913
|
-
}, /* @__PURE__ */
|
|
1045
|
+
}, /* @__PURE__ */ React15.createElement(CheckboxIndicatorPrimitive, {
|
|
914
1046
|
asChild: true
|
|
915
|
-
}, /* @__PURE__ */
|
|
1047
|
+
}, /* @__PURE__ */ React15.createElement(Icon2, checked && {
|
|
916
1048
|
weight,
|
|
917
1049
|
className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
918
1050
|
size
|
|
919
1051
|
})
|
|
920
1052
|
})));
|
|
921
1053
|
});
|
|
922
|
-
var Switch = /* @__PURE__ */
|
|
1054
|
+
var Switch = /* @__PURE__ */ forwardRef12(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
|
|
923
1055
|
const { tx } = useThemeContext();
|
|
924
1056
|
const [checked, onCheckedChange] = useControllableState({
|
|
925
1057
|
prop: propsChecked,
|
|
@@ -927,7 +1059,7 @@ var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked
|
|
|
927
1059
|
onChange: propsOnCheckedChange
|
|
928
1060
|
});
|
|
929
1061
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
930
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ React15.createElement(SwitchPrimitive, {
|
|
931
1063
|
...props,
|
|
932
1064
|
checked,
|
|
933
1065
|
onCheckedChange,
|
|
@@ -941,7 +1073,7 @@ var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked
|
|
|
941
1073
|
size
|
|
942
1074
|
}, classNames),
|
|
943
1075
|
ref: forwardedRef
|
|
944
|
-
}, /* @__PURE__ */
|
|
1076
|
+
}, /* @__PURE__ */ React15.createElement(SwitchThumbPrimitive, {
|
|
945
1077
|
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
946
1078
|
size
|
|
947
1079
|
})
|
|
@@ -960,275 +1092,40 @@ var Input = {
|
|
|
960
1092
|
DescriptionAndValidation
|
|
961
1093
|
};
|
|
962
1094
|
|
|
963
|
-
// packages/ui/react-ui/src/components/ComboBox/ComboBox.tsx
|
|
964
|
-
var COMBOBOX_NAME = "ComboBox";
|
|
965
|
-
var usePopperScope = createPopperScope();
|
|
966
|
-
var [createComboBoxContext] = createContextScope(COMBOBOX_NAME, [
|
|
967
|
-
createPopperScope
|
|
968
|
-
]);
|
|
969
|
-
var [ComboBoxProvider, useComboBoxContext] = createComboBoxContext(COMBOBOX_NAME);
|
|
970
|
-
var ComboBoxRoot = ({ __scopeComboBox, children, classNames, items = [], value, onChange, onInputChange }) => {
|
|
971
|
-
const { tx } = useThemeContext();
|
|
972
|
-
const popperScope = usePopperScope(__scopeComboBox);
|
|
973
|
-
const comboProps = useCombobox({
|
|
974
|
-
items,
|
|
975
|
-
itemToString: (selectedItem) => selectedItem?.label ?? "",
|
|
976
|
-
onInputValueChange: ({ inputValue }) => onInputChange?.(inputValue),
|
|
977
|
-
selectedItem: value ?? null,
|
|
978
|
-
onSelectedItemChange: ({ selectedItem }) => onChange?.(selectedItem === null ? void 0 : selectedItem)
|
|
979
|
-
});
|
|
980
|
-
return /* @__PURE__ */ React14.createElement(ComboBoxProvider, {
|
|
981
|
-
scope: __scopeComboBox,
|
|
982
|
-
items,
|
|
983
|
-
...comboProps
|
|
984
|
-
}, /* @__PURE__ */ React14.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React14.createElement("div", {
|
|
985
|
-
className: tx("combobox.root", "combobox__root", {}, classNames)
|
|
986
|
-
}, children)));
|
|
987
|
-
};
|
|
988
|
-
var INPUT_NAME2 = "ComboBoxInput";
|
|
989
|
-
var ComboBoxInput = /* @__PURE__ */ forwardRef11(({ __scopeComboBox, classNames, placeholder }, forwardedRef) => {
|
|
990
|
-
const { tx } = useThemeContext();
|
|
991
|
-
const popperScope = usePopperScope(__scopeComboBox);
|
|
992
|
-
const { getInputProps, getToggleButtonProps, isOpen } = useComboBoxContext(INPUT_NAME2, __scopeComboBox);
|
|
993
|
-
return /* @__PURE__ */ React14.createElement(PopperPrimitive.Anchor, {
|
|
994
|
-
asChild: true,
|
|
995
|
-
...popperScope,
|
|
996
|
-
ref: forwardedRef
|
|
997
|
-
}, /* @__PURE__ */ React14.createElement("div", {
|
|
998
|
-
role: "none",
|
|
999
|
-
className: "flex items-center gap-1"
|
|
1000
|
-
}, /* @__PURE__ */ React14.createElement(Input.Root, null, /* @__PURE__ */ React14.createElement(Input.TextInput, {
|
|
1001
|
-
...getInputProps(),
|
|
1002
|
-
placeholder,
|
|
1003
|
-
variant: "subdued",
|
|
1004
|
-
classNames: tx("combobox.input", "combobox__input", {}, classNames)
|
|
1005
|
-
})), /* @__PURE__ */ React14.createElement(Button, {
|
|
1006
|
-
...getToggleButtonProps(),
|
|
1007
|
-
"aria-label": "toggle menu",
|
|
1008
|
-
variant: "ghost",
|
|
1009
|
-
classNames: tx("combobox.button", "combobox__button")
|
|
1010
|
-
}, isOpen && /* @__PURE__ */ React14.createElement(CaretUp, null) || /* @__PURE__ */ React14.createElement(CaretDown, null))));
|
|
1011
|
-
});
|
|
1012
|
-
var CONTENT_NAME = "ComboBoxContent";
|
|
1013
|
-
var ComboBoxContent = /* @__PURE__ */ forwardRef11(({ __scopeComboBox, classNames, children }, forwardedRef) => {
|
|
1014
|
-
const { tx } = useThemeContext();
|
|
1015
|
-
const popperScope = usePopperScope(__scopeComboBox);
|
|
1016
|
-
const { getMenuProps, isOpen } = useComboBoxContext(CONTENT_NAME, __scopeComboBox);
|
|
1017
|
-
return /* @__PURE__ */ React14.createElement(PopperPrimitive.Content, {
|
|
1018
|
-
"data-state": isOpen,
|
|
1019
|
-
role: "dialog",
|
|
1020
|
-
...popperScope,
|
|
1021
|
-
ref: forwardedRef,
|
|
1022
|
-
style: {
|
|
1023
|
-
// Re-namespace exposed content custom properties.
|
|
1024
|
-
...{
|
|
1025
|
-
"--radix-combobox-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1026
|
-
"--radix-combobox-content-available-width": "var(--radix-popper-available-width)",
|
|
1027
|
-
"--radix-combobox-content-available-height": "var(--radix-popper-available-height)",
|
|
1028
|
-
"--radix-combobox-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1029
|
-
"--radix-combobox-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
}, /* @__PURE__ */ React14.createElement("ul", {
|
|
1033
|
-
...getMenuProps(),
|
|
1034
|
-
className: tx("combobox.content", "combobox__content", {}, classNames)
|
|
1035
|
-
}, isOpen && children));
|
|
1036
|
-
});
|
|
1037
|
-
var ITEM_NAME = "ComboBoxItem";
|
|
1038
|
-
var ComboBoxItem = /* @__PURE__ */ forwardRef11(({ __scopeComboBox, classNames, children, item }, forwardedRef) => {
|
|
1039
|
-
const { tx } = useThemeContext();
|
|
1040
|
-
const { getItemProps, items, selectedItem, highlightedIndex } = useComboBoxContext(ITEM_NAME, __scopeComboBox);
|
|
1041
|
-
return /* @__PURE__ */ React14.createElement("li", {
|
|
1042
|
-
ref: forwardedRef,
|
|
1043
|
-
"data-selected": selectedItem?.id === item.id ? "true" : void 0,
|
|
1044
|
-
"data-highlighted": highlightedIndex !== void 0 && items[highlightedIndex]?.id === item.id ? "true" : void 0,
|
|
1045
|
-
className: tx("combobox.item", "item", {}, classNames),
|
|
1046
|
-
...getItemProps({
|
|
1047
|
-
item
|
|
1048
|
-
})
|
|
1049
|
-
}, children);
|
|
1050
|
-
});
|
|
1051
|
-
var ComboBox = {
|
|
1052
|
-
Root: ComboBoxRoot,
|
|
1053
|
-
Input: ComboBoxInput,
|
|
1054
|
-
Content: ComboBoxContent,
|
|
1055
|
-
Item: ComboBoxItem
|
|
1056
|
-
};
|
|
1057
|
-
|
|
1058
|
-
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
1059
|
-
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
1060
|
-
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";
|
|
1061
|
-
import React15, { forwardRef as forwardRef12 } from "react";
|
|
1062
|
-
var DialogRoot = DialogRootPrimitive;
|
|
1063
|
-
var DialogTrigger = DialogTriggerPrimitive;
|
|
1064
|
-
var DialogPortal = DialogPortalPrimitive;
|
|
1065
|
-
var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1066
|
-
const { tx } = useThemeContext();
|
|
1067
|
-
return /* @__PURE__ */ React15.createElement(DialogTitlePrimitive, {
|
|
1068
|
-
...props,
|
|
1069
|
-
className: tx("dialog.title", "dialog__title", {
|
|
1070
|
-
srOnly
|
|
1071
|
-
}, classNames),
|
|
1072
|
-
ref: forwardedRef
|
|
1073
|
-
});
|
|
1074
|
-
});
|
|
1075
|
-
var DialogDescription = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1076
|
-
const { tx } = useThemeContext();
|
|
1077
|
-
return /* @__PURE__ */ React15.createElement(DialogDescriptionPrimitive, {
|
|
1078
|
-
...props,
|
|
1079
|
-
className: tx("dialog.description", "dialog__description", {
|
|
1080
|
-
srOnly
|
|
1081
|
-
}, classNames),
|
|
1082
|
-
ref: forwardedRef
|
|
1083
|
-
});
|
|
1084
|
-
});
|
|
1085
|
-
var DialogClose = DialogClosePrimitive;
|
|
1086
|
-
var DIALOG_OVERLAY_NAME = "DialogOverlay";
|
|
1087
|
-
var DIALOG_CONTENT_NAME = "DialogContent";
|
|
1088
|
-
var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
|
|
1089
|
-
inOverlayLayout: false
|
|
1090
|
-
});
|
|
1091
|
-
var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
1092
|
-
const { tx } = useThemeContext();
|
|
1093
|
-
return /* @__PURE__ */ React15.createElement(DialogOverlayPrimitive, {
|
|
1094
|
-
...props,
|
|
1095
|
-
className: tx("dialog.overlay", "dialog__overlay", {}, classNames),
|
|
1096
|
-
ref: forwardedRef
|
|
1097
|
-
}, /* @__PURE__ */ React15.createElement(OverlayLayoutProvider, {
|
|
1098
|
-
inOverlayLayout: true
|
|
1099
|
-
}, children));
|
|
1100
|
-
});
|
|
1101
|
-
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
1102
|
-
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
1103
|
-
const { tx } = useThemeContext();
|
|
1104
|
-
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
1105
|
-
return /* @__PURE__ */ React15.createElement(DialogContentPrimitive, {
|
|
1106
|
-
...props,
|
|
1107
|
-
className: tx("dialog.content", "dialog", {
|
|
1108
|
-
inOverlayLayout
|
|
1109
|
-
}, classNames),
|
|
1110
|
-
ref: forwardedRef
|
|
1111
|
-
}, /* @__PURE__ */ React15.createElement(ElevationProvider, {
|
|
1112
|
-
elevation: "chrome"
|
|
1113
|
-
}, children));
|
|
1114
|
-
});
|
|
1115
|
-
DialogContent.displayName = DIALOG_CONTENT_NAME;
|
|
1116
|
-
var Dialog = {
|
|
1117
|
-
Root: DialogRoot,
|
|
1118
|
-
Trigger: DialogTrigger,
|
|
1119
|
-
Portal: DialogPortal,
|
|
1120
|
-
Overlay: DialogOverlay,
|
|
1121
|
-
Content: DialogContent,
|
|
1122
|
-
Title: DialogTitle,
|
|
1123
|
-
Description: DialogDescription,
|
|
1124
|
-
Close: DialogClose
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
// packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
|
|
1128
|
-
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";
|
|
1129
|
-
import { createContext as createContext6 } from "@radix-ui/react-context";
|
|
1130
|
-
import React16, { forwardRef as forwardRef13 } from "react";
|
|
1131
|
-
var AlertDialogRoot = AlertDialogRootPrimitive;
|
|
1132
|
-
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
1133
|
-
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
1134
|
-
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
1135
|
-
var AlertDialogAction = AlertDialogActionPrimitive;
|
|
1136
|
-
var AlertDialogTitle = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1137
|
-
const { tx } = useThemeContext();
|
|
1138
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogTitlePrimitive, {
|
|
1139
|
-
...props,
|
|
1140
|
-
className: tx("dialog.title", "dialog--alert__title", {
|
|
1141
|
-
srOnly
|
|
1142
|
-
}, classNames),
|
|
1143
|
-
ref: forwardedRef
|
|
1144
|
-
});
|
|
1145
|
-
});
|
|
1146
|
-
var AlertDialogDescription = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1147
|
-
const { tx } = useThemeContext();
|
|
1148
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogDescriptionPrimitive, {
|
|
1149
|
-
...props,
|
|
1150
|
-
className: tx("dialog.description", "dialog--alert__description", {
|
|
1151
|
-
srOnly
|
|
1152
|
-
}, classNames),
|
|
1153
|
-
ref: forwardedRef
|
|
1154
|
-
});
|
|
1155
|
-
});
|
|
1156
|
-
var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
|
|
1157
|
-
var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
|
|
1158
|
-
var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
|
|
1159
|
-
inOverlayLayout: false
|
|
1160
|
-
});
|
|
1161
|
-
var AlertDialogOverlay = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1162
|
-
const { tx } = useThemeContext();
|
|
1163
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogOverlayPrimitive, {
|
|
1164
|
-
...props,
|
|
1165
|
-
className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
|
|
1166
|
-
ref: forwardedRef
|
|
1167
|
-
}, /* @__PURE__ */ React16.createElement(OverlayLayoutProvider2, {
|
|
1168
|
-
inOverlayLayout: true
|
|
1169
|
-
}, children));
|
|
1170
|
-
});
|
|
1171
|
-
AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
|
|
1172
|
-
var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1173
|
-
const { tx } = useThemeContext();
|
|
1174
|
-
const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
|
|
1175
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogContentPrimitive, {
|
|
1176
|
-
...props,
|
|
1177
|
-
className: tx("dialog.content", "dialog--alert", {
|
|
1178
|
-
inOverlayLayout
|
|
1179
|
-
}, classNames),
|
|
1180
|
-
ref: forwardedRef
|
|
1181
|
-
}, /* @__PURE__ */ React16.createElement(ElevationProvider, {
|
|
1182
|
-
elevation: "chrome"
|
|
1183
|
-
}, children));
|
|
1184
|
-
});
|
|
1185
|
-
AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
|
|
1186
|
-
var AlertDialog = {
|
|
1187
|
-
Root: AlertDialogRoot,
|
|
1188
|
-
Trigger: AlertDialogTrigger,
|
|
1189
|
-
Portal: AlertDialogPortal,
|
|
1190
|
-
Overlay: AlertDialogOverlay,
|
|
1191
|
-
Content: AlertDialogContent,
|
|
1192
|
-
Title: AlertDialogTitle,
|
|
1193
|
-
Description: AlertDialogDescription,
|
|
1194
|
-
Cancel: AlertDialogCancel,
|
|
1195
|
-
Action: AlertDialogAction
|
|
1196
|
-
};
|
|
1197
|
-
|
|
1198
1095
|
// packages/ui/react-ui/src/components/List/List.tsx
|
|
1199
|
-
import { CaretDown
|
|
1096
|
+
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1200
1097
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
1201
|
-
import
|
|
1098
|
+
import React17, { forwardRef as forwardRef13 } from "react";
|
|
1202
1099
|
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";
|
|
1203
1100
|
|
|
1204
1101
|
// packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
|
|
1205
|
-
import
|
|
1102
|
+
import React16, { createContext as createContext7 } from "react";
|
|
1206
1103
|
var DensityContext = /* @__PURE__ */ createContext7({
|
|
1207
1104
|
density: "coarse"
|
|
1208
1105
|
});
|
|
1209
|
-
var DensityProvider = ({ density, children }) => /* @__PURE__ */
|
|
1106
|
+
var DensityProvider = ({ density, children }) => /* @__PURE__ */ React16.createElement(DensityContext.Provider, {
|
|
1210
1107
|
value: {
|
|
1211
1108
|
density
|
|
1212
1109
|
}
|
|
1213
1110
|
}, children);
|
|
1214
1111
|
|
|
1215
1112
|
// packages/ui/react-ui/src/components/List/List.tsx
|
|
1216
|
-
var List = /* @__PURE__ */
|
|
1113
|
+
var List = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1217
1114
|
const { tx } = useThemeContext();
|
|
1218
1115
|
const density = useDensityContext(props.density);
|
|
1219
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ React17.createElement(DensityProvider, {
|
|
1220
1117
|
density
|
|
1221
|
-
}, /* @__PURE__ */
|
|
1118
|
+
}, /* @__PURE__ */ React17.createElement(ListPrimitive, {
|
|
1222
1119
|
...props,
|
|
1223
1120
|
className: tx("list.root", "list", {}, classNames),
|
|
1224
1121
|
ref: forwardedRef
|
|
1225
1122
|
}, children));
|
|
1226
1123
|
});
|
|
1227
|
-
var ListItemEndcap = /* @__PURE__ */
|
|
1228
|
-
const
|
|
1124
|
+
var ListItemEndcap = /* @__PURE__ */ forwardRef13(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1125
|
+
const Root3 = asChild ? Slot6 : "div";
|
|
1229
1126
|
const density = useDensityContext();
|
|
1230
1127
|
const { tx } = useThemeContext();
|
|
1231
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ React17.createElement(Root3, {
|
|
1232
1129
|
...!asChild && {
|
|
1233
1130
|
role: "none"
|
|
1234
1131
|
},
|
|
@@ -1242,7 +1139,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef14(({ children, classNames, asChi
|
|
|
1242
1139
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1243
1140
|
const density = useDensityContext();
|
|
1244
1141
|
const { tx } = useThemeContext();
|
|
1245
|
-
return /* @__PURE__ */
|
|
1142
|
+
return /* @__PURE__ */ React17.createElement("div", {
|
|
1246
1143
|
role: "none",
|
|
1247
1144
|
...props,
|
|
1248
1145
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1250,10 +1147,10 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1250
1147
|
}, classNames)
|
|
1251
1148
|
});
|
|
1252
1149
|
};
|
|
1253
|
-
var ListItemHeading = /* @__PURE__ */
|
|
1150
|
+
var ListItemHeading = /* @__PURE__ */ forwardRef13(({ children, classNames, ...props }, forwardedRef) => {
|
|
1254
1151
|
const { tx } = useThemeContext();
|
|
1255
1152
|
const density = useDensityContext();
|
|
1256
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItemHeading, {
|
|
1257
1154
|
...props,
|
|
1258
1155
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1259
1156
|
density
|
|
@@ -1261,26 +1158,26 @@ var ListItemHeading = /* @__PURE__ */ forwardRef14(({ children, classNames, ...p
|
|
|
1261
1158
|
ref: forwardedRef
|
|
1262
1159
|
}, children);
|
|
1263
1160
|
});
|
|
1264
|
-
var ListItemOpenTrigger = /* @__PURE__ */
|
|
1161
|
+
var ListItemOpenTrigger = /* @__PURE__ */ forwardRef13(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
|
|
1265
1162
|
const { tx } = useThemeContext();
|
|
1266
1163
|
const density = useDensityContext();
|
|
1267
1164
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1268
|
-
const Icon2 = open ?
|
|
1269
|
-
return /* @__PURE__ */
|
|
1165
|
+
const Icon2 = open ? CaretDown : CaretRight;
|
|
1166
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1270
1167
|
...props,
|
|
1271
1168
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1272
1169
|
density
|
|
1273
1170
|
}, classNames),
|
|
1274
1171
|
ref: forwardedRef
|
|
1275
|
-
}, children || /* @__PURE__ */
|
|
1172
|
+
}, children || /* @__PURE__ */ React17.createElement(Icon2, {
|
|
1276
1173
|
weight: "bold",
|
|
1277
1174
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1278
1175
|
}));
|
|
1279
1176
|
});
|
|
1280
|
-
var ListItemRoot = /* @__PURE__ */
|
|
1177
|
+
var ListItemRoot = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1281
1178
|
const { tx } = useThemeContext();
|
|
1282
1179
|
const density = useDensityContext();
|
|
1283
|
-
return /* @__PURE__ */
|
|
1180
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItem, {
|
|
1284
1181
|
...props,
|
|
1285
1182
|
className: tx("list.item.root", "list__listItem", {
|
|
1286
1183
|
density,
|
|
@@ -1299,23 +1196,23 @@ var ListItem = {
|
|
|
1299
1196
|
};
|
|
1300
1197
|
|
|
1301
1198
|
// packages/ui/react-ui/src/components/List/Tree.tsx
|
|
1302
|
-
import
|
|
1303
|
-
var TreeRoot = /* @__PURE__ */
|
|
1304
|
-
return /* @__PURE__ */
|
|
1199
|
+
import React18, { forwardRef as forwardRef14 } from "react";
|
|
1200
|
+
var TreeRoot = /* @__PURE__ */ forwardRef14((props, forwardedRef) => {
|
|
1201
|
+
return /* @__PURE__ */ React18.createElement(List, {
|
|
1305
1202
|
...props,
|
|
1306
1203
|
ref: forwardedRef
|
|
1307
1204
|
});
|
|
1308
1205
|
});
|
|
1309
|
-
var TreeBranch = /* @__PURE__ */
|
|
1206
|
+
var TreeBranch = /* @__PURE__ */ forwardRef14(({ __listScope, ...props }, forwardedRef) => {
|
|
1310
1207
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1311
|
-
return /* @__PURE__ */
|
|
1208
|
+
return /* @__PURE__ */ React18.createElement(List, {
|
|
1312
1209
|
...props,
|
|
1313
1210
|
"aria-labelledby": headingId,
|
|
1314
1211
|
ref: forwardedRef
|
|
1315
1212
|
});
|
|
1316
1213
|
});
|
|
1317
|
-
var TreeItemRoot = /* @__PURE__ */
|
|
1318
|
-
return /* @__PURE__ */
|
|
1214
|
+
var TreeItemRoot = /* @__PURE__ */ forwardRef14((props, forwardedRef) => {
|
|
1215
|
+
return /* @__PURE__ */ React18.createElement(ListItem.Root, {
|
|
1319
1216
|
role: "treeitem",
|
|
1320
1217
|
...props,
|
|
1321
1218
|
ref: forwardedRef
|
|
@@ -1343,7 +1240,7 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1343
1240
|
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
1344
1241
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
1345
1242
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1346
|
-
import
|
|
1243
|
+
import React19, { forwardRef as forwardRef15, useCallback as useCallback3, useRef } from "react";
|
|
1347
1244
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1348
1245
|
|
|
1349
1246
|
// packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
|
|
@@ -1502,7 +1399,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
1502
1399
|
defaultProp: defaultComplementarySidebarOpen,
|
|
1503
1400
|
onChange: onComplementarySidebarOpenChange
|
|
1504
1401
|
});
|
|
1505
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ React19.createElement(MainProvider, {
|
|
1506
1403
|
...props,
|
|
1507
1404
|
navigationSidebarOpen,
|
|
1508
1405
|
setNavigationSidebarOpen,
|
|
@@ -1514,7 +1411,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
1514
1411
|
var handleOpenAutoFocus = (event) => {
|
|
1515
1412
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
1516
1413
|
};
|
|
1517
|
-
var MainSidebar = /* @__PURE__ */
|
|
1414
|
+
var MainSidebar = /* @__PURE__ */ forwardRef15(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, setOpen, side, ...props }, forwardedRef) => {
|
|
1518
1415
|
const [isLg] = useMediaQuery("lg", {
|
|
1519
1416
|
ssr: false
|
|
1520
1417
|
});
|
|
@@ -1524,11 +1421,11 @@ var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToD
|
|
|
1524
1421
|
useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
|
|
1525
1422
|
onDismiss: () => setOpen(false)
|
|
1526
1423
|
});
|
|
1527
|
-
const
|
|
1528
|
-
return /* @__PURE__ */
|
|
1424
|
+
const Root3 = isLg ? Primitive6.div : DialogContent2;
|
|
1425
|
+
return /* @__PURE__ */ React19.createElement(DialogRoot2, {
|
|
1529
1426
|
open,
|
|
1530
1427
|
modal: false
|
|
1531
|
-
}, /* @__PURE__ */
|
|
1428
|
+
}, /* @__PURE__ */ React19.createElement(Root3, {
|
|
1532
1429
|
...!isLg && {
|
|
1533
1430
|
forceMount: true,
|
|
1534
1431
|
tabIndex: -1,
|
|
@@ -1544,13 +1441,13 @@ var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToD
|
|
|
1544
1441
|
inert: "true"
|
|
1545
1442
|
},
|
|
1546
1443
|
ref
|
|
1547
|
-
}, /* @__PURE__ */
|
|
1444
|
+
}, /* @__PURE__ */ React19.createElement(ElevationProvider, {
|
|
1548
1445
|
elevation: "group"
|
|
1549
1446
|
}, children)));
|
|
1550
1447
|
});
|
|
1551
|
-
var MainNavigationSidebar = /* @__PURE__ */
|
|
1448
|
+
var MainNavigationSidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1552
1449
|
const { navigationSidebarOpen, setNavigationSidebarOpen } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
1553
|
-
return /* @__PURE__ */
|
|
1450
|
+
return /* @__PURE__ */ React19.createElement(MainSidebar, {
|
|
1554
1451
|
...props,
|
|
1555
1452
|
open: navigationSidebarOpen,
|
|
1556
1453
|
setOpen: setNavigationSidebarOpen,
|
|
@@ -1559,9 +1456,9 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef) =
|
|
|
1559
1456
|
});
|
|
1560
1457
|
});
|
|
1561
1458
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1562
|
-
var MainComplementarySidebar = /* @__PURE__ */
|
|
1459
|
+
var MainComplementarySidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1563
1460
|
const { complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
1564
|
-
return /* @__PURE__ */
|
|
1461
|
+
return /* @__PURE__ */ React19.createElement(MainSidebar, {
|
|
1565
1462
|
...props,
|
|
1566
1463
|
open: complementarySidebarOpen,
|
|
1567
1464
|
setOpen: setComplementarySidebarOpen,
|
|
@@ -1570,14 +1467,14 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef
|
|
|
1570
1467
|
});
|
|
1571
1468
|
});
|
|
1572
1469
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1573
|
-
var MainContent = /* @__PURE__ */
|
|
1470
|
+
var MainContent = /* @__PURE__ */ forwardRef15(({ asChild, classNames, bounce, children, ...props }, forwardedRef) => {
|
|
1574
1471
|
const [isLg] = useMediaQuery("lg", {
|
|
1575
1472
|
ssr: false
|
|
1576
1473
|
});
|
|
1577
1474
|
const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1578
1475
|
const { tx } = useThemeContext();
|
|
1579
|
-
const
|
|
1580
|
-
return /* @__PURE__ */
|
|
1476
|
+
const Root3 = asChild ? Slot7 : "main";
|
|
1477
|
+
return /* @__PURE__ */ React19.createElement(Root3, {
|
|
1581
1478
|
...props,
|
|
1582
1479
|
className: tx("main.content", "main", {
|
|
1583
1480
|
isLg,
|
|
@@ -1589,13 +1486,13 @@ var MainContent = /* @__PURE__ */ forwardRef16(({ asChild, classNames, bounce, c
|
|
|
1589
1486
|
}, children);
|
|
1590
1487
|
});
|
|
1591
1488
|
MainContent.displayName = MAIN_NAME;
|
|
1592
|
-
var MainOverlay = /* @__PURE__ */
|
|
1489
|
+
var MainOverlay = /* @__PURE__ */ forwardRef15(({ classNames, ...props }, forwardedRef) => {
|
|
1593
1490
|
const [isLg] = useMediaQuery("lg", {
|
|
1594
1491
|
ssr: false
|
|
1595
1492
|
});
|
|
1596
1493
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1597
1494
|
const { tx } = useThemeContext();
|
|
1598
|
-
return /* @__PURE__ */
|
|
1495
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1599
1496
|
onClick: () => {
|
|
1600
1497
|
setNavigationSidebarOpen(false);
|
|
1601
1498
|
setComplementarySidebarOpen(false);
|
|
@@ -1624,20 +1521,20 @@ var Main = {
|
|
|
1624
1521
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
1625
1522
|
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
1626
1523
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1627
|
-
import
|
|
1524
|
+
import React20, { forwardRef as forwardRef16 } from "react";
|
|
1628
1525
|
import { useId as useId3 } from "@dxos/react-hooks";
|
|
1629
1526
|
var MESSAGE_NAME = "Message";
|
|
1630
1527
|
var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
|
|
1631
|
-
var MessageRoot = /* @__PURE__ */
|
|
1528
|
+
var MessageRoot = /* @__PURE__ */ forwardRef16(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
|
|
1632
1529
|
const { tx } = useThemeContext();
|
|
1633
1530
|
const titleId = useId3("message__title", propsTitleId);
|
|
1634
1531
|
const descriptionId = useId3("message__description", propsDescriptionId);
|
|
1635
1532
|
const elevation = useElevationContext(propsElevation);
|
|
1636
|
-
const
|
|
1637
|
-
return /* @__PURE__ */
|
|
1533
|
+
const Root3 = asChild ? Slot8 : Primitive7.div;
|
|
1534
|
+
return /* @__PURE__ */ React20.createElement(MessageProvider, {
|
|
1638
1535
|
titleId,
|
|
1639
1536
|
descriptionId
|
|
1640
|
-
}, /* @__PURE__ */
|
|
1537
|
+
}, /* @__PURE__ */ React20.createElement(Root3, {
|
|
1641
1538
|
...props,
|
|
1642
1539
|
className: tx("message.root", "message", {
|
|
1643
1540
|
valence,
|
|
@@ -1650,11 +1547,11 @@ var MessageRoot = /* @__PURE__ */ forwardRef17(({ asChild, valence, elevation: p
|
|
|
1650
1547
|
});
|
|
1651
1548
|
MessageRoot.displayName = MESSAGE_NAME;
|
|
1652
1549
|
var MESSAGE_TITLE_NAME = "MessageTitle";
|
|
1653
|
-
var MessageTitle = /* @__PURE__ */
|
|
1550
|
+
var MessageTitle = /* @__PURE__ */ forwardRef16(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1654
1551
|
const { tx } = useThemeContext();
|
|
1655
1552
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
1656
|
-
const
|
|
1657
|
-
return /* @__PURE__ */
|
|
1553
|
+
const Root3 = asChild ? Slot8 : Primitive7.h2;
|
|
1554
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1658
1555
|
...props,
|
|
1659
1556
|
className: tx("message.title", "message__title", {}, className),
|
|
1660
1557
|
id: titleId,
|
|
@@ -1663,11 +1560,11 @@ var MessageTitle = /* @__PURE__ */ forwardRef17(({ asChild, className, children,
|
|
|
1663
1560
|
});
|
|
1664
1561
|
MessageTitle.displayName = MESSAGE_TITLE_NAME;
|
|
1665
1562
|
var MESSAGE_BODY_NAME = "MessageBody";
|
|
1666
|
-
var MessageBody = /* @__PURE__ */
|
|
1563
|
+
var MessageBody = /* @__PURE__ */ forwardRef16(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1667
1564
|
const { tx } = useThemeContext();
|
|
1668
1565
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
1669
|
-
const
|
|
1670
|
-
return /* @__PURE__ */
|
|
1566
|
+
const Root3 = asChild ? Slot8 : Primitive7.p;
|
|
1567
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1671
1568
|
...props,
|
|
1672
1569
|
className: tx("message.body", "message__body", {}, className),
|
|
1673
1570
|
id: descriptionId,
|
|
@@ -1685,36 +1582,36 @@ var Message = {
|
|
|
1685
1582
|
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";
|
|
1686
1583
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1687
1584
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1688
|
-
import
|
|
1585
|
+
import React21, { forwardRef as forwardRef17 } from "react";
|
|
1689
1586
|
var PopoverRoot = PopoverRootPrimitive;
|
|
1690
1587
|
var PopoverPortal = PopoverPortalPrimitive;
|
|
1691
1588
|
var PopoverTrigger = PopoverTriggerPrimitive;
|
|
1692
1589
|
var PopoverAnchor = PopoverAnchorPrimitive;
|
|
1693
1590
|
var PopoverClose = PopoverClosePrimitive;
|
|
1694
|
-
var PopoverArrow = /* @__PURE__ */
|
|
1591
|
+
var PopoverArrow = /* @__PURE__ */ forwardRef17(({ classNames, ...props }, forwardedRef) => {
|
|
1695
1592
|
const { tx } = useThemeContext();
|
|
1696
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ React21.createElement(PopoverArrowPrimitive, {
|
|
1697
1594
|
...props,
|
|
1698
1595
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
1699
1596
|
ref: forwardedRef
|
|
1700
1597
|
});
|
|
1701
1598
|
});
|
|
1702
|
-
var PopoverContent = /* @__PURE__ */
|
|
1599
|
+
var PopoverContent = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1703
1600
|
const { tx } = useThemeContext();
|
|
1704
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ React21.createElement(PopoverContentPrimitive, {
|
|
1705
1602
|
sideOffset: 4,
|
|
1706
1603
|
collisionPadding: 8,
|
|
1707
1604
|
...props,
|
|
1708
1605
|
className: tx("popover.content", "popover", {}, classNames),
|
|
1709
1606
|
ref: forwardedRef
|
|
1710
|
-
}, /* @__PURE__ */
|
|
1607
|
+
}, /* @__PURE__ */ React21.createElement(ElevationProvider, {
|
|
1711
1608
|
elevation: "chrome"
|
|
1712
1609
|
}, children));
|
|
1713
1610
|
});
|
|
1714
|
-
var PopoverViewport = /* @__PURE__ */
|
|
1611
|
+
var PopoverViewport = /* @__PURE__ */ forwardRef17(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
1715
1612
|
const { tx } = useThemeContext();
|
|
1716
|
-
const
|
|
1717
|
-
return /* @__PURE__ */
|
|
1613
|
+
const Root3 = asChild ? Slot9 : Primitive8.div;
|
|
1614
|
+
return /* @__PURE__ */ React21.createElement(Root3, {
|
|
1718
1615
|
...props,
|
|
1719
1616
|
className: tx("popover.viewport", "popover__viewport", {
|
|
1720
1617
|
constrainInline,
|
|
@@ -1735,13 +1632,13 @@ var Popover = {
|
|
|
1735
1632
|
};
|
|
1736
1633
|
|
|
1737
1634
|
// packages/ui/react-ui/src/components/ProgressBar/ProgressBar.tsx
|
|
1738
|
-
import
|
|
1635
|
+
import React22 from "react";
|
|
1739
1636
|
var ProgressBar = (props) => {
|
|
1740
1637
|
const { className, indeterminate = false, progress = 0 } = props;
|
|
1741
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ React22.createElement("span", {
|
|
1742
1639
|
role: "none",
|
|
1743
1640
|
className: "w-20 h-1 inline-block relative bg-neutral-400/25 rounded-full" + (className ? " " + className : "")
|
|
1744
|
-
}, /* @__PURE__ */
|
|
1641
|
+
}, /* @__PURE__ */ React22.createElement("span", {
|
|
1745
1642
|
className: "absolute left-0 top-0 bottom-0 inline-block bg-neutral-400 rounded-full" + (indeterminate ? " animate-progress-indeterminate" : ""),
|
|
1746
1643
|
...indeterminate ? {} : {
|
|
1747
1644
|
style: {
|
|
@@ -1753,42 +1650,42 @@ var ProgressBar = (props) => {
|
|
|
1753
1650
|
|
|
1754
1651
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
1755
1652
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
1756
|
-
import
|
|
1757
|
-
var ScrollAreaRoot = /* @__PURE__ */
|
|
1653
|
+
import React23, { forwardRef as forwardRef18 } from "react";
|
|
1654
|
+
var ScrollAreaRoot = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1758
1655
|
const { tx } = useThemeContext();
|
|
1759
|
-
return /* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveRoot, {
|
|
1760
1657
|
...props,
|
|
1761
1658
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
1762
1659
|
ref: forwardedRef
|
|
1763
1660
|
});
|
|
1764
1661
|
});
|
|
1765
|
-
var ScrollAreaViewport = /* @__PURE__ */
|
|
1662
|
+
var ScrollAreaViewport = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1766
1663
|
const { tx } = useThemeContext();
|
|
1767
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveViewport, {
|
|
1768
1665
|
...props,
|
|
1769
1666
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
1770
1667
|
ref: forwardedRef
|
|
1771
1668
|
});
|
|
1772
1669
|
});
|
|
1773
|
-
var ScrollAreaScrollbar = /* @__PURE__ */
|
|
1670
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1774
1671
|
const { tx } = useThemeContext();
|
|
1775
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
1776
1673
|
...props,
|
|
1777
1674
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
1778
1675
|
ref: forwardedRef
|
|
1779
1676
|
});
|
|
1780
1677
|
});
|
|
1781
|
-
var ScrollAreaThumb = /* @__PURE__ */
|
|
1678
|
+
var ScrollAreaThumb = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1782
1679
|
const { tx } = useThemeContext();
|
|
1783
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveThumb, {
|
|
1784
1681
|
...props,
|
|
1785
1682
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
1786
1683
|
ref: forwardedRef
|
|
1787
1684
|
});
|
|
1788
1685
|
});
|
|
1789
|
-
var ScrollAreaCorner = /* @__PURE__ */
|
|
1686
|
+
var ScrollAreaCorner = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1790
1687
|
const { tx } = useThemeContext();
|
|
1791
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveCorner, {
|
|
1792
1689
|
...props,
|
|
1793
1690
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
1794
1691
|
ref: forwardedRef
|
|
@@ -1803,97 +1700,97 @@ var ScrollArea = {
|
|
|
1803
1700
|
};
|
|
1804
1701
|
|
|
1805
1702
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
1806
|
-
import { CaretDown as
|
|
1703
|
+
import { CaretDown as CaretDown2, CaretUp, Check as Check2 } from "@phosphor-icons/react";
|
|
1807
1704
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1808
|
-
import
|
|
1705
|
+
import React24, { forwardRef as forwardRef19 } from "react";
|
|
1809
1706
|
var SelectRoot = SelectPrimitive.Root;
|
|
1810
1707
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
1811
1708
|
var SelectValue = SelectPrimitive.Value;
|
|
1812
1709
|
var SelectIcon = SelectPrimitive.Icon;
|
|
1813
1710
|
var SelectPortal = SelectPrimitive.Portal;
|
|
1814
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
1815
|
-
return /* @__PURE__ */
|
|
1711
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef19(({ placeholder, ...props }, forwardedRef) => {
|
|
1712
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Trigger, {
|
|
1816
1713
|
asChild: true,
|
|
1817
1714
|
ref: forwardedRef
|
|
1818
|
-
}, /* @__PURE__ */
|
|
1715
|
+
}, /* @__PURE__ */ React24.createElement(Button, props, /* @__PURE__ */ React24.createElement(SelectPrimitive.Value, {
|
|
1819
1716
|
placeholder
|
|
1820
|
-
}), /* @__PURE__ */
|
|
1717
|
+
}), /* @__PURE__ */ React24.createElement(SelectPrimitive.Icon, {
|
|
1821
1718
|
className: "pis-2"
|
|
1822
|
-
}, /* @__PURE__ */
|
|
1719
|
+
}, /* @__PURE__ */ React24.createElement(CaretDown2, {
|
|
1823
1720
|
weight: "bold"
|
|
1824
1721
|
}))));
|
|
1825
1722
|
});
|
|
1826
|
-
var SelectContent = /* @__PURE__ */
|
|
1723
|
+
var SelectContent = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1827
1724
|
const { tx } = useThemeContext();
|
|
1828
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Content, {
|
|
1829
1726
|
...props,
|
|
1830
1727
|
className: tx("select.content", "select__content", {}, classNames),
|
|
1831
1728
|
ref: forwardedRef
|
|
1832
1729
|
}, children);
|
|
1833
1730
|
});
|
|
1834
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
1731
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1835
1732
|
const { tx } = useThemeContext();
|
|
1836
|
-
return /* @__PURE__ */
|
|
1733
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
1837
1734
|
...props,
|
|
1838
1735
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
1839
1736
|
ref: forwardedRef
|
|
1840
|
-
}, children ?? /* @__PURE__ */
|
|
1737
|
+
}, children ?? /* @__PURE__ */ React24.createElement(CaretUp, {
|
|
1841
1738
|
weight: "bold"
|
|
1842
1739
|
}));
|
|
1843
1740
|
});
|
|
1844
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
1741
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1845
1742
|
const { tx } = useThemeContext();
|
|
1846
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
1847
1744
|
...props,
|
|
1848
1745
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
1849
1746
|
ref: forwardedRef
|
|
1850
|
-
}, children ?? /* @__PURE__ */
|
|
1747
|
+
}, children ?? /* @__PURE__ */ React24.createElement(CaretDown2, {
|
|
1851
1748
|
weight: "bold"
|
|
1852
1749
|
}));
|
|
1853
1750
|
});
|
|
1854
1751
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
1855
|
-
var SelectItem = /* @__PURE__ */
|
|
1752
|
+
var SelectItem = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1856
1753
|
const { tx } = useThemeContext();
|
|
1857
|
-
return /* @__PURE__ */
|
|
1754
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Item, {
|
|
1858
1755
|
...props,
|
|
1859
1756
|
className: tx("select.item", "option", {}, classNames),
|
|
1860
1757
|
ref: forwardedRef
|
|
1861
1758
|
});
|
|
1862
1759
|
});
|
|
1863
1760
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
1864
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
1761
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1865
1762
|
const { tx } = useThemeContext();
|
|
1866
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemIndicator, {
|
|
1867
1764
|
...props,
|
|
1868
1765
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
1869
1766
|
ref: forwardedRef
|
|
1870
1767
|
}, children);
|
|
1871
1768
|
});
|
|
1872
|
-
var SelectOption = /* @__PURE__ */
|
|
1769
|
+
var SelectOption = /* @__PURE__ */ forwardRef19(({ children, classNames, ...props }, forwardedRef) => {
|
|
1873
1770
|
const { tx } = useThemeContext();
|
|
1874
|
-
return /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Item, {
|
|
1875
1772
|
...props,
|
|
1876
1773
|
className: tx("select.item", "option", {}, classNames),
|
|
1877
1774
|
ref: forwardedRef
|
|
1878
|
-
}, /* @__PURE__ */
|
|
1879
|
-
className: tx("select.itemIndicator", "option__indicator", {}
|
|
1880
|
-
}, /* @__PURE__ */
|
|
1775
|
+
}, /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemIndicator, {
|
|
1776
|
+
className: tx("select.itemIndicator", "option__indicator", {})
|
|
1777
|
+
}, /* @__PURE__ */ React24.createElement(Check2, {
|
|
1881
1778
|
weight: "bold"
|
|
1882
1779
|
})));
|
|
1883
1780
|
});
|
|
1884
1781
|
var SelectGroup = SelectPrimitive.Group;
|
|
1885
1782
|
var SelectLabel = SelectPrimitive.Label;
|
|
1886
|
-
var SelectSeparator = /* @__PURE__ */
|
|
1783
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1887
1784
|
const { tx } = useThemeContext();
|
|
1888
|
-
return /* @__PURE__ */
|
|
1785
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Separator, {
|
|
1889
1786
|
...props,
|
|
1890
1787
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
1891
1788
|
ref: forwardedRef
|
|
1892
1789
|
});
|
|
1893
1790
|
});
|
|
1894
|
-
var SelectArrow = /* @__PURE__ */
|
|
1791
|
+
var SelectArrow = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1895
1792
|
const { tx } = useThemeContext();
|
|
1896
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Arrow, {
|
|
1897
1794
|
...props,
|
|
1898
1795
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
1899
1796
|
ref: forwardedRef
|
|
@@ -1922,10 +1819,10 @@ var Select = {
|
|
|
1922
1819
|
|
|
1923
1820
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
1924
1821
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
1925
|
-
import
|
|
1822
|
+
import React25 from "react";
|
|
1926
1823
|
var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
1927
1824
|
const { tx } = useThemeContext();
|
|
1928
|
-
return /* @__PURE__ */
|
|
1825
|
+
return /* @__PURE__ */ React25.createElement(SeparatorPrimitive, {
|
|
1929
1826
|
orientation,
|
|
1930
1827
|
...props,
|
|
1931
1828
|
className: tx("separator.root", "separator", {
|
|
@@ -1937,11 +1834,11 @@ var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
1937
1834
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
1938
1835
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1939
1836
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1940
|
-
import
|
|
1941
|
-
var Tag = /* @__PURE__ */
|
|
1837
|
+
import React26, { forwardRef as forwardRef20 } from "react";
|
|
1838
|
+
var Tag = /* @__PURE__ */ forwardRef20(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
1942
1839
|
const { tx } = useThemeContext();
|
|
1943
|
-
const
|
|
1944
|
-
return /* @__PURE__ */
|
|
1840
|
+
const Root3 = asChild ? Slot10 : Primitive9.span;
|
|
1841
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1945
1842
|
...props,
|
|
1946
1843
|
className: tx("tag.root", "tag", {
|
|
1947
1844
|
palette
|
|
@@ -1954,58 +1851,58 @@ var Tag = /* @__PURE__ */ forwardRef21(({ asChild, palette, classNames, ...props
|
|
|
1954
1851
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
1955
1852
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
1956
1853
|
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";
|
|
1957
|
-
import
|
|
1854
|
+
import React27, { forwardRef as forwardRef21 } from "react";
|
|
1958
1855
|
var ToastProvider = ToastProviderPrimitive;
|
|
1959
|
-
var ToastViewport = /* @__PURE__ */
|
|
1856
|
+
var ToastViewport = /* @__PURE__ */ forwardRef21(({ classNames, ...props }, forwardedRef) => {
|
|
1960
1857
|
const { tx } = useThemeContext();
|
|
1961
|
-
return /* @__PURE__ */
|
|
1858
|
+
return /* @__PURE__ */ React27.createElement(ToastViewportPrimitive, {
|
|
1962
1859
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
1963
1860
|
ref: forwardedRef
|
|
1964
1861
|
});
|
|
1965
1862
|
});
|
|
1966
|
-
var ToastRoot = /* @__PURE__ */
|
|
1863
|
+
var ToastRoot = /* @__PURE__ */ forwardRef21(({ classNames, children, ...props }, forwardedRef) => {
|
|
1967
1864
|
const { tx } = useThemeContext();
|
|
1968
|
-
return /* @__PURE__ */
|
|
1865
|
+
return /* @__PURE__ */ React27.createElement(ToastRootPrimitive, {
|
|
1969
1866
|
...props,
|
|
1970
1867
|
className: tx("toast.root", "toast", {}, classNames),
|
|
1971
1868
|
ref: forwardedRef
|
|
1972
|
-
}, /* @__PURE__ */
|
|
1869
|
+
}, /* @__PURE__ */ React27.createElement(ElevationProvider, {
|
|
1973
1870
|
elevation: "chrome"
|
|
1974
|
-
}, /* @__PURE__ */
|
|
1871
|
+
}, /* @__PURE__ */ React27.createElement(DensityProvider, {
|
|
1975
1872
|
density: "fine"
|
|
1976
1873
|
}, children)));
|
|
1977
1874
|
});
|
|
1978
|
-
var ToastBody = /* @__PURE__ */
|
|
1875
|
+
var ToastBody = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1979
1876
|
const { tx } = useThemeContext();
|
|
1980
|
-
const
|
|
1981
|
-
return /* @__PURE__ */
|
|
1877
|
+
const Root3 = asChild ? Slot11 : Primitive10.div;
|
|
1878
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1982
1879
|
...props,
|
|
1983
1880
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
1984
1881
|
ref: forwardedRef
|
|
1985
1882
|
});
|
|
1986
1883
|
});
|
|
1987
|
-
var ToastTitle = /* @__PURE__ */
|
|
1884
|
+
var ToastTitle = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1988
1885
|
const { tx } = useThemeContext();
|
|
1989
|
-
const
|
|
1990
|
-
return /* @__PURE__ */
|
|
1886
|
+
const Root3 = asChild ? Slot11 : ToastTitlePrimitive;
|
|
1887
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1991
1888
|
...props,
|
|
1992
1889
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
1993
1890
|
ref: forwardedRef
|
|
1994
1891
|
});
|
|
1995
1892
|
});
|
|
1996
|
-
var ToastDescription = /* @__PURE__ */
|
|
1893
|
+
var ToastDescription = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1997
1894
|
const { tx } = useThemeContext();
|
|
1998
|
-
const
|
|
1999
|
-
return /* @__PURE__ */
|
|
1895
|
+
const Root3 = asChild ? Slot11 : ToastDescriptionPrimitive;
|
|
1896
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
2000
1897
|
...props,
|
|
2001
1898
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
2002
1899
|
ref: forwardedRef
|
|
2003
1900
|
});
|
|
2004
1901
|
});
|
|
2005
|
-
var ToastActions = /* @__PURE__ */
|
|
1902
|
+
var ToastActions = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2006
1903
|
const { tx } = useThemeContext();
|
|
2007
|
-
const
|
|
2008
|
-
return /* @__PURE__ */
|
|
1904
|
+
const Root3 = asChild ? Slot11 : Primitive10.div;
|
|
1905
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
2009
1906
|
...props,
|
|
2010
1907
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
2011
1908
|
ref: forwardedRef
|
|
@@ -2027,46 +1924,46 @@ var Toast = {
|
|
|
2027
1924
|
|
|
2028
1925
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
2029
1926
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
2030
|
-
import
|
|
2031
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
1927
|
+
import React28, { forwardRef as forwardRef22 } from "react";
|
|
1928
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
|
|
2032
1929
|
const { tx } = useThemeContext();
|
|
2033
|
-
return /* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Root, {
|
|
2034
1931
|
...props,
|
|
2035
1932
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
2036
1933
|
ref: forwardedRef
|
|
2037
1934
|
}, children);
|
|
2038
1935
|
});
|
|
2039
|
-
var ToolbarButton = /* @__PURE__ */
|
|
2040
|
-
return /* @__PURE__ */
|
|
1936
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
1937
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Button, {
|
|
2041
1938
|
asChild: true
|
|
2042
|
-
}, /* @__PURE__ */
|
|
1939
|
+
}, /* @__PURE__ */ React28.createElement(Button, {
|
|
2043
1940
|
...props,
|
|
2044
1941
|
ref: forwardedRef
|
|
2045
1942
|
}));
|
|
2046
1943
|
});
|
|
2047
|
-
var ToolbarLink = /* @__PURE__ */
|
|
2048
|
-
return /* @__PURE__ */
|
|
1944
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
1945
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Link, {
|
|
2049
1946
|
asChild: true
|
|
2050
|
-
}, /* @__PURE__ */
|
|
1947
|
+
}, /* @__PURE__ */ React28.createElement(Link, {
|
|
2051
1948
|
...props,
|
|
2052
1949
|
ref: forwardedRef
|
|
2053
1950
|
}));
|
|
2054
1951
|
});
|
|
2055
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
2056
|
-
return /* @__PURE__ */
|
|
1952
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
|
|
1953
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
2057
1954
|
...props,
|
|
2058
1955
|
asChild: true
|
|
2059
|
-
}, /* @__PURE__ */
|
|
1956
|
+
}, /* @__PURE__ */ React28.createElement(ButtonGroup, {
|
|
2060
1957
|
classNames,
|
|
2061
1958
|
children,
|
|
2062
1959
|
ref: forwardedRef
|
|
2063
1960
|
}));
|
|
2064
1961
|
});
|
|
2065
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
2066
|
-
return /* @__PURE__ */
|
|
1962
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef22(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
1963
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
2067
1964
|
...props,
|
|
2068
1965
|
asChild: true
|
|
2069
|
-
}, /* @__PURE__ */
|
|
1966
|
+
}, /* @__PURE__ */ React28.createElement(Button, {
|
|
2070
1967
|
variant,
|
|
2071
1968
|
density,
|
|
2072
1969
|
elevation,
|
|
@@ -2076,9 +1973,9 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef23(({ variant, density, e
|
|
|
2076
1973
|
}));
|
|
2077
1974
|
});
|
|
2078
1975
|
var ToolbarSeparator = (props) => {
|
|
2079
|
-
return /* @__PURE__ */
|
|
1976
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Separator, {
|
|
2080
1977
|
asChild: true
|
|
2081
|
-
}, /* @__PURE__ */
|
|
1978
|
+
}, /* @__PURE__ */ React28.createElement(Separator2, {
|
|
2082
1979
|
orientation: "vertical",
|
|
2083
1980
|
...props
|
|
2084
1981
|
}));
|
|
@@ -2094,22 +1991,22 @@ var Toolbar = {
|
|
|
2094
1991
|
|
|
2095
1992
|
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
2096
1993
|
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
2097
|
-
import
|
|
1994
|
+
import React29, { forwardRef as forwardRef23 } from "react";
|
|
2098
1995
|
var TooltipProvider = TooltipProviderPrimitive;
|
|
2099
1996
|
var TooltipRoot = TooltipRootPrimitive;
|
|
2100
1997
|
var TooltipPortal = TooltipPortalPrimitive;
|
|
2101
1998
|
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
2102
|
-
var TooltipArrow = /* @__PURE__ */
|
|
1999
|
+
var TooltipArrow = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
2103
2000
|
const { tx } = useThemeContext();
|
|
2104
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ React29.createElement(TooltipArrowPrimitive, {
|
|
2105
2002
|
...props,
|
|
2106
2003
|
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
2107
2004
|
ref: forwardedRef
|
|
2108
2005
|
});
|
|
2109
2006
|
});
|
|
2110
|
-
var TooltipContent = /* @__PURE__ */
|
|
2007
|
+
var TooltipContent = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
2111
2008
|
const { tx } = useThemeContext();
|
|
2112
|
-
return /* @__PURE__ */
|
|
2009
|
+
return /* @__PURE__ */ React29.createElement(TooltipContentPrimitive, {
|
|
2113
2010
|
sideOffset: 4,
|
|
2114
2011
|
collisionPadding: 8,
|
|
2115
2012
|
...props,
|
|
@@ -2128,7 +2025,7 @@ var Tooltip = {
|
|
|
2128
2025
|
|
|
2129
2026
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
2130
2027
|
import { createKeyborg } from "keyborg";
|
|
2131
|
-
import
|
|
2028
|
+
import React30, { createContext as createContext10, useEffect as useEffect4 } from "react";
|
|
2132
2029
|
|
|
2133
2030
|
// packages/ui/react-ui/src/util/hasIosKeyboard.ts
|
|
2134
2031
|
var hasIosKeyboard = () => {
|
|
@@ -2156,19 +2053,19 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
2156
2053
|
return () => kb.unsubscribe(handleInputModalityChange);
|
|
2157
2054
|
}
|
|
2158
2055
|
}, []);
|
|
2159
|
-
return /* @__PURE__ */
|
|
2056
|
+
return /* @__PURE__ */ React30.createElement(ThemeContext.Provider, {
|
|
2160
2057
|
value: {
|
|
2161
2058
|
tx,
|
|
2162
2059
|
themeMode,
|
|
2163
2060
|
hasIosKeyboard: hasIosKeyboard()
|
|
2164
2061
|
}
|
|
2165
|
-
}, /* @__PURE__ */
|
|
2062
|
+
}, /* @__PURE__ */ React30.createElement(TranslationsProvider, {
|
|
2166
2063
|
fallback,
|
|
2167
2064
|
resourceExtensions,
|
|
2168
2065
|
appNs
|
|
2169
|
-
}, /* @__PURE__ */
|
|
2066
|
+
}, /* @__PURE__ */ React30.createElement(ElevationProvider, {
|
|
2170
2067
|
elevation: rootElevation
|
|
2171
|
-
}, /* @__PURE__ */
|
|
2068
|
+
}, /* @__PURE__ */ React30.createElement(DensityProvider, {
|
|
2172
2069
|
density: rootDensity
|
|
2173
2070
|
}, children))));
|
|
2174
2071
|
};
|
|
@@ -2187,7 +2084,6 @@ export {
|
|
|
2187
2084
|
CardMedia,
|
|
2188
2085
|
CardTitle,
|
|
2189
2086
|
Center,
|
|
2190
|
-
ComboBox,
|
|
2191
2087
|
DensityContext,
|
|
2192
2088
|
DensityProvider,
|
|
2193
2089
|
Dialog,
|