@dxos/react-ui 0.3.7-main.f0cd532 → 0.3.7-next.bfe6796
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 +345 -445
- 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 +6 -7
- 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,23 +1042,24 @@ 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) => {
|
|
1055
|
+
const { tx } = useThemeContext();
|
|
923
1056
|
const [checked, onCheckedChange] = useControllableState({
|
|
924
1057
|
prop: propsChecked,
|
|
925
1058
|
defaultProp: propsDefaultChecked,
|
|
926
1059
|
onChange: propsOnCheckedChange
|
|
927
1060
|
});
|
|
928
1061
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
929
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ React15.createElement(SwitchPrimitive, {
|
|
930
1063
|
...props,
|
|
931
1064
|
checked,
|
|
932
1065
|
onCheckedChange,
|
|
@@ -936,11 +1069,14 @@ var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked
|
|
|
936
1069
|
"aria-invalid": "true",
|
|
937
1070
|
"aria-errormessage": errorMessageId
|
|
938
1071
|
},
|
|
939
|
-
|
|
940
|
-
|
|
1072
|
+
className: tx("input.switch", "input--switch", {
|
|
1073
|
+
size
|
|
1074
|
+
}, classNames),
|
|
941
1075
|
ref: forwardedRef
|
|
942
|
-
}, /* @__PURE__ */
|
|
943
|
-
className: "
|
|
1076
|
+
}, /* @__PURE__ */ React15.createElement(SwitchThumbPrimitive, {
|
|
1077
|
+
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
1078
|
+
size
|
|
1079
|
+
})
|
|
944
1080
|
}));
|
|
945
1081
|
});
|
|
946
1082
|
var Input = {
|
|
@@ -956,275 +1092,40 @@ var Input = {
|
|
|
956
1092
|
DescriptionAndValidation
|
|
957
1093
|
};
|
|
958
1094
|
|
|
959
|
-
// packages/ui/react-ui/src/components/ComboBox/ComboBox.tsx
|
|
960
|
-
var COMBOBOX_NAME = "ComboBox";
|
|
961
|
-
var usePopperScope = createPopperScope();
|
|
962
|
-
var [createComboBoxContext] = createContextScope(COMBOBOX_NAME, [
|
|
963
|
-
createPopperScope
|
|
964
|
-
]);
|
|
965
|
-
var [ComboBoxProvider, useComboBoxContext] = createComboBoxContext(COMBOBOX_NAME);
|
|
966
|
-
var ComboBoxRoot = ({ __scopeComboBox, children, classNames, items = [], value, onChange, onInputChange }) => {
|
|
967
|
-
const { tx } = useThemeContext();
|
|
968
|
-
const popperScope = usePopperScope(__scopeComboBox);
|
|
969
|
-
const comboProps = useCombobox({
|
|
970
|
-
items,
|
|
971
|
-
itemToString: (selectedItem) => selectedItem?.label ?? "",
|
|
972
|
-
onInputValueChange: ({ inputValue }) => onInputChange?.(inputValue),
|
|
973
|
-
selectedItem: value ?? null,
|
|
974
|
-
onSelectedItemChange: ({ selectedItem }) => onChange?.(selectedItem === null ? void 0 : selectedItem)
|
|
975
|
-
});
|
|
976
|
-
return /* @__PURE__ */ React14.createElement(ComboBoxProvider, {
|
|
977
|
-
scope: __scopeComboBox,
|
|
978
|
-
items,
|
|
979
|
-
...comboProps
|
|
980
|
-
}, /* @__PURE__ */ React14.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React14.createElement("div", {
|
|
981
|
-
className: tx("combobox.root", "combobox__root", {}, classNames)
|
|
982
|
-
}, children)));
|
|
983
|
-
};
|
|
984
|
-
var INPUT_NAME2 = "ComboBoxInput";
|
|
985
|
-
var ComboBoxInput = /* @__PURE__ */ forwardRef11(({ __scopeComboBox, classNames, placeholder }, forwardedRef) => {
|
|
986
|
-
const { tx } = useThemeContext();
|
|
987
|
-
const popperScope = usePopperScope(__scopeComboBox);
|
|
988
|
-
const { getInputProps, getToggleButtonProps, isOpen } = useComboBoxContext(INPUT_NAME2, __scopeComboBox);
|
|
989
|
-
return /* @__PURE__ */ React14.createElement(PopperPrimitive.Anchor, {
|
|
990
|
-
asChild: true,
|
|
991
|
-
...popperScope,
|
|
992
|
-
ref: forwardedRef
|
|
993
|
-
}, /* @__PURE__ */ React14.createElement("div", {
|
|
994
|
-
role: "none",
|
|
995
|
-
className: "flex items-center gap-1"
|
|
996
|
-
}, /* @__PURE__ */ React14.createElement(Input.Root, null, /* @__PURE__ */ React14.createElement(Input.TextInput, {
|
|
997
|
-
...getInputProps(),
|
|
998
|
-
placeholder,
|
|
999
|
-
variant: "subdued",
|
|
1000
|
-
classNames: tx("combobox.input", "combobox__input", {}, classNames)
|
|
1001
|
-
})), /* @__PURE__ */ React14.createElement(Button, {
|
|
1002
|
-
...getToggleButtonProps(),
|
|
1003
|
-
"aria-label": "toggle menu",
|
|
1004
|
-
variant: "ghost",
|
|
1005
|
-
classNames: tx("combobox.button", "combobox__button")
|
|
1006
|
-
}, isOpen && /* @__PURE__ */ React14.createElement(CaretUp, null) || /* @__PURE__ */ React14.createElement(CaretDown, null))));
|
|
1007
|
-
});
|
|
1008
|
-
var CONTENT_NAME = "ComboBoxContent";
|
|
1009
|
-
var ComboBoxContent = /* @__PURE__ */ forwardRef11(({ __scopeComboBox, classNames, children }, forwardedRef) => {
|
|
1010
|
-
const { tx } = useThemeContext();
|
|
1011
|
-
const popperScope = usePopperScope(__scopeComboBox);
|
|
1012
|
-
const { getMenuProps, isOpen } = useComboBoxContext(CONTENT_NAME, __scopeComboBox);
|
|
1013
|
-
return /* @__PURE__ */ React14.createElement(PopperPrimitive.Content, {
|
|
1014
|
-
"data-state": isOpen,
|
|
1015
|
-
role: "dialog",
|
|
1016
|
-
...popperScope,
|
|
1017
|
-
ref: forwardedRef,
|
|
1018
|
-
style: {
|
|
1019
|
-
// Re-namespace exposed content custom properties.
|
|
1020
|
-
...{
|
|
1021
|
-
"--radix-combobox-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1022
|
-
"--radix-combobox-content-available-width": "var(--radix-popper-available-width)",
|
|
1023
|
-
"--radix-combobox-content-available-height": "var(--radix-popper-available-height)",
|
|
1024
|
-
"--radix-combobox-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1025
|
-
"--radix-combobox-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
}, /* @__PURE__ */ React14.createElement("ul", {
|
|
1029
|
-
...getMenuProps(),
|
|
1030
|
-
className: tx("combobox.content", "combobox__content", {}, classNames)
|
|
1031
|
-
}, isOpen && children));
|
|
1032
|
-
});
|
|
1033
|
-
var ITEM_NAME = "ComboBoxItem";
|
|
1034
|
-
var ComboBoxItem = /* @__PURE__ */ forwardRef11(({ __scopeComboBox, classNames, children, item }, forwardedRef) => {
|
|
1035
|
-
const { tx } = useThemeContext();
|
|
1036
|
-
const { getItemProps, items, selectedItem, highlightedIndex } = useComboBoxContext(ITEM_NAME, __scopeComboBox);
|
|
1037
|
-
return /* @__PURE__ */ React14.createElement("li", {
|
|
1038
|
-
ref: forwardedRef,
|
|
1039
|
-
"data-selected": selectedItem?.id === item.id ? "true" : void 0,
|
|
1040
|
-
"data-highlighted": highlightedIndex !== void 0 && items[highlightedIndex]?.id === item.id ? "true" : void 0,
|
|
1041
|
-
className: tx("combobox.item", "item", {}, classNames),
|
|
1042
|
-
...getItemProps({
|
|
1043
|
-
item
|
|
1044
|
-
})
|
|
1045
|
-
}, children);
|
|
1046
|
-
});
|
|
1047
|
-
var ComboBox = {
|
|
1048
|
-
Root: ComboBoxRoot,
|
|
1049
|
-
Input: ComboBoxInput,
|
|
1050
|
-
Content: ComboBoxContent,
|
|
1051
|
-
Item: ComboBoxItem
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
1055
|
-
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
1056
|
-
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";
|
|
1057
|
-
import React15, { forwardRef as forwardRef12 } from "react";
|
|
1058
|
-
var DialogRoot = DialogRootPrimitive;
|
|
1059
|
-
var DialogTrigger = DialogTriggerPrimitive;
|
|
1060
|
-
var DialogPortal = DialogPortalPrimitive;
|
|
1061
|
-
var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1062
|
-
const { tx } = useThemeContext();
|
|
1063
|
-
return /* @__PURE__ */ React15.createElement(DialogTitlePrimitive, {
|
|
1064
|
-
...props,
|
|
1065
|
-
className: tx("dialog.title", "dialog__title", {
|
|
1066
|
-
srOnly
|
|
1067
|
-
}, classNames),
|
|
1068
|
-
ref: forwardedRef
|
|
1069
|
-
});
|
|
1070
|
-
});
|
|
1071
|
-
var DialogDescription = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1072
|
-
const { tx } = useThemeContext();
|
|
1073
|
-
return /* @__PURE__ */ React15.createElement(DialogDescriptionPrimitive, {
|
|
1074
|
-
...props,
|
|
1075
|
-
className: tx("dialog.description", "dialog__description", {
|
|
1076
|
-
srOnly
|
|
1077
|
-
}, classNames),
|
|
1078
|
-
ref: forwardedRef
|
|
1079
|
-
});
|
|
1080
|
-
});
|
|
1081
|
-
var DialogClose = DialogClosePrimitive;
|
|
1082
|
-
var DIALOG_OVERLAY_NAME = "DialogOverlay";
|
|
1083
|
-
var DIALOG_CONTENT_NAME = "DialogContent";
|
|
1084
|
-
var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
|
|
1085
|
-
inOverlayLayout: false
|
|
1086
|
-
});
|
|
1087
|
-
var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
1088
|
-
const { tx } = useThemeContext();
|
|
1089
|
-
return /* @__PURE__ */ React15.createElement(DialogOverlayPrimitive, {
|
|
1090
|
-
...props,
|
|
1091
|
-
className: tx("dialog.overlay", "dialog__overlay", {}, classNames),
|
|
1092
|
-
ref: forwardedRef
|
|
1093
|
-
}, /* @__PURE__ */ React15.createElement(OverlayLayoutProvider, {
|
|
1094
|
-
inOverlayLayout: true
|
|
1095
|
-
}, children));
|
|
1096
|
-
});
|
|
1097
|
-
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
1098
|
-
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
1099
|
-
const { tx } = useThemeContext();
|
|
1100
|
-
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
1101
|
-
return /* @__PURE__ */ React15.createElement(DialogContentPrimitive, {
|
|
1102
|
-
...props,
|
|
1103
|
-
className: tx("dialog.content", "dialog", {
|
|
1104
|
-
inOverlayLayout
|
|
1105
|
-
}, classNames),
|
|
1106
|
-
ref: forwardedRef
|
|
1107
|
-
}, /* @__PURE__ */ React15.createElement(ElevationProvider, {
|
|
1108
|
-
elevation: "chrome"
|
|
1109
|
-
}, children));
|
|
1110
|
-
});
|
|
1111
|
-
DialogContent.displayName = DIALOG_CONTENT_NAME;
|
|
1112
|
-
var Dialog = {
|
|
1113
|
-
Root: DialogRoot,
|
|
1114
|
-
Trigger: DialogTrigger,
|
|
1115
|
-
Portal: DialogPortal,
|
|
1116
|
-
Overlay: DialogOverlay,
|
|
1117
|
-
Content: DialogContent,
|
|
1118
|
-
Title: DialogTitle,
|
|
1119
|
-
Description: DialogDescription,
|
|
1120
|
-
Close: DialogClose
|
|
1121
|
-
};
|
|
1122
|
-
|
|
1123
|
-
// packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
|
|
1124
|
-
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";
|
|
1125
|
-
import { createContext as createContext6 } from "@radix-ui/react-context";
|
|
1126
|
-
import React16, { forwardRef as forwardRef13 } from "react";
|
|
1127
|
-
var AlertDialogRoot = AlertDialogRootPrimitive;
|
|
1128
|
-
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
1129
|
-
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
1130
|
-
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
1131
|
-
var AlertDialogAction = AlertDialogActionPrimitive;
|
|
1132
|
-
var AlertDialogTitle = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1133
|
-
const { tx } = useThemeContext();
|
|
1134
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogTitlePrimitive, {
|
|
1135
|
-
...props,
|
|
1136
|
-
className: tx("dialog.title", "dialog--alert__title", {
|
|
1137
|
-
srOnly
|
|
1138
|
-
}, classNames),
|
|
1139
|
-
ref: forwardedRef
|
|
1140
|
-
});
|
|
1141
|
-
});
|
|
1142
|
-
var AlertDialogDescription = /* @__PURE__ */ forwardRef13(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
1143
|
-
const { tx } = useThemeContext();
|
|
1144
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogDescriptionPrimitive, {
|
|
1145
|
-
...props,
|
|
1146
|
-
className: tx("dialog.description", "dialog--alert__description", {
|
|
1147
|
-
srOnly
|
|
1148
|
-
}, classNames),
|
|
1149
|
-
ref: forwardedRef
|
|
1150
|
-
});
|
|
1151
|
-
});
|
|
1152
|
-
var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
|
|
1153
|
-
var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
|
|
1154
|
-
var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
|
|
1155
|
-
inOverlayLayout: false
|
|
1156
|
-
});
|
|
1157
|
-
var AlertDialogOverlay = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1158
|
-
const { tx } = useThemeContext();
|
|
1159
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogOverlayPrimitive, {
|
|
1160
|
-
...props,
|
|
1161
|
-
className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
|
|
1162
|
-
ref: forwardedRef
|
|
1163
|
-
}, /* @__PURE__ */ React16.createElement(OverlayLayoutProvider2, {
|
|
1164
|
-
inOverlayLayout: true
|
|
1165
|
-
}, children));
|
|
1166
|
-
});
|
|
1167
|
-
AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
|
|
1168
|
-
var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1169
|
-
const { tx } = useThemeContext();
|
|
1170
|
-
const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
|
|
1171
|
-
return /* @__PURE__ */ React16.createElement(AlertDialogContentPrimitive, {
|
|
1172
|
-
...props,
|
|
1173
|
-
className: tx("dialog.content", "dialog--alert", {
|
|
1174
|
-
inOverlayLayout
|
|
1175
|
-
}, classNames),
|
|
1176
|
-
ref: forwardedRef
|
|
1177
|
-
}, /* @__PURE__ */ React16.createElement(ElevationProvider, {
|
|
1178
|
-
elevation: "chrome"
|
|
1179
|
-
}, children));
|
|
1180
|
-
});
|
|
1181
|
-
AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
|
|
1182
|
-
var AlertDialog = {
|
|
1183
|
-
Root: AlertDialogRoot,
|
|
1184
|
-
Trigger: AlertDialogTrigger,
|
|
1185
|
-
Portal: AlertDialogPortal,
|
|
1186
|
-
Overlay: AlertDialogOverlay,
|
|
1187
|
-
Content: AlertDialogContent,
|
|
1188
|
-
Title: AlertDialogTitle,
|
|
1189
|
-
Description: AlertDialogDescription,
|
|
1190
|
-
Cancel: AlertDialogCancel,
|
|
1191
|
-
Action: AlertDialogAction
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
1095
|
// packages/ui/react-ui/src/components/List/List.tsx
|
|
1195
|
-
import { CaretDown
|
|
1096
|
+
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1196
1097
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
1197
|
-
import
|
|
1098
|
+
import React17, { forwardRef as forwardRef13 } from "react";
|
|
1198
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";
|
|
1199
1100
|
|
|
1200
1101
|
// packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
|
|
1201
|
-
import
|
|
1102
|
+
import React16, { createContext as createContext7 } from "react";
|
|
1202
1103
|
var DensityContext = /* @__PURE__ */ createContext7({
|
|
1203
1104
|
density: "coarse"
|
|
1204
1105
|
});
|
|
1205
|
-
var DensityProvider = ({ density, children }) => /* @__PURE__ */
|
|
1106
|
+
var DensityProvider = ({ density, children }) => /* @__PURE__ */ React16.createElement(DensityContext.Provider, {
|
|
1206
1107
|
value: {
|
|
1207
1108
|
density
|
|
1208
1109
|
}
|
|
1209
1110
|
}, children);
|
|
1210
1111
|
|
|
1211
1112
|
// packages/ui/react-ui/src/components/List/List.tsx
|
|
1212
|
-
var List = /* @__PURE__ */
|
|
1113
|
+
var List = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1213
1114
|
const { tx } = useThemeContext();
|
|
1214
1115
|
const density = useDensityContext(props.density);
|
|
1215
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ React17.createElement(DensityProvider, {
|
|
1216
1117
|
density
|
|
1217
|
-
}, /* @__PURE__ */
|
|
1118
|
+
}, /* @__PURE__ */ React17.createElement(ListPrimitive, {
|
|
1218
1119
|
...props,
|
|
1219
1120
|
className: tx("list.root", "list", {}, classNames),
|
|
1220
1121
|
ref: forwardedRef
|
|
1221
1122
|
}, children));
|
|
1222
1123
|
});
|
|
1223
|
-
var ListItemEndcap = /* @__PURE__ */
|
|
1224
|
-
const
|
|
1124
|
+
var ListItemEndcap = /* @__PURE__ */ forwardRef13(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1125
|
+
const Root3 = asChild ? Slot6 : "div";
|
|
1225
1126
|
const density = useDensityContext();
|
|
1226
1127
|
const { tx } = useThemeContext();
|
|
1227
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ React17.createElement(Root3, {
|
|
1228
1129
|
...!asChild && {
|
|
1229
1130
|
role: "none"
|
|
1230
1131
|
},
|
|
@@ -1238,7 +1139,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef14(({ children, classNames, asChi
|
|
|
1238
1139
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1239
1140
|
const density = useDensityContext();
|
|
1240
1141
|
const { tx } = useThemeContext();
|
|
1241
|
-
return /* @__PURE__ */
|
|
1142
|
+
return /* @__PURE__ */ React17.createElement("div", {
|
|
1242
1143
|
role: "none",
|
|
1243
1144
|
...props,
|
|
1244
1145
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1246,10 +1147,10 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1246
1147
|
}, classNames)
|
|
1247
1148
|
});
|
|
1248
1149
|
};
|
|
1249
|
-
var ListItemHeading = /* @__PURE__ */
|
|
1150
|
+
var ListItemHeading = /* @__PURE__ */ forwardRef13(({ children, classNames, ...props }, forwardedRef) => {
|
|
1250
1151
|
const { tx } = useThemeContext();
|
|
1251
1152
|
const density = useDensityContext();
|
|
1252
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItemHeading, {
|
|
1253
1154
|
...props,
|
|
1254
1155
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1255
1156
|
density
|
|
@@ -1257,26 +1158,26 @@ var ListItemHeading = /* @__PURE__ */ forwardRef14(({ children, classNames, ...p
|
|
|
1257
1158
|
ref: forwardedRef
|
|
1258
1159
|
}, children);
|
|
1259
1160
|
});
|
|
1260
|
-
var ListItemOpenTrigger = /* @__PURE__ */
|
|
1161
|
+
var ListItemOpenTrigger = /* @__PURE__ */ forwardRef13(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
|
|
1261
1162
|
const { tx } = useThemeContext();
|
|
1262
1163
|
const density = useDensityContext();
|
|
1263
1164
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1264
|
-
const Icon2 = open ?
|
|
1265
|
-
return /* @__PURE__ */
|
|
1165
|
+
const Icon2 = open ? CaretDown : CaretRight;
|
|
1166
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1266
1167
|
...props,
|
|
1267
1168
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1268
1169
|
density
|
|
1269
1170
|
}, classNames),
|
|
1270
1171
|
ref: forwardedRef
|
|
1271
|
-
}, children || /* @__PURE__ */
|
|
1172
|
+
}, children || /* @__PURE__ */ React17.createElement(Icon2, {
|
|
1272
1173
|
weight: "bold",
|
|
1273
1174
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1274
1175
|
}));
|
|
1275
1176
|
});
|
|
1276
|
-
var ListItemRoot = /* @__PURE__ */
|
|
1177
|
+
var ListItemRoot = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
1277
1178
|
const { tx } = useThemeContext();
|
|
1278
1179
|
const density = useDensityContext();
|
|
1279
|
-
return /* @__PURE__ */
|
|
1180
|
+
return /* @__PURE__ */ React17.createElement(ListPrimitiveItem, {
|
|
1280
1181
|
...props,
|
|
1281
1182
|
className: tx("list.item.root", "list__listItem", {
|
|
1282
1183
|
density,
|
|
@@ -1295,23 +1196,23 @@ var ListItem = {
|
|
|
1295
1196
|
};
|
|
1296
1197
|
|
|
1297
1198
|
// packages/ui/react-ui/src/components/List/Tree.tsx
|
|
1298
|
-
import
|
|
1299
|
-
var TreeRoot = /* @__PURE__ */
|
|
1300
|
-
return /* @__PURE__ */
|
|
1199
|
+
import React18, { forwardRef as forwardRef14 } from "react";
|
|
1200
|
+
var TreeRoot = /* @__PURE__ */ forwardRef14((props, forwardedRef) => {
|
|
1201
|
+
return /* @__PURE__ */ React18.createElement(List, {
|
|
1301
1202
|
...props,
|
|
1302
1203
|
ref: forwardedRef
|
|
1303
1204
|
});
|
|
1304
1205
|
});
|
|
1305
|
-
var TreeBranch = /* @__PURE__ */
|
|
1206
|
+
var TreeBranch = /* @__PURE__ */ forwardRef14(({ __listScope, ...props }, forwardedRef) => {
|
|
1306
1207
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1307
|
-
return /* @__PURE__ */
|
|
1208
|
+
return /* @__PURE__ */ React18.createElement(List, {
|
|
1308
1209
|
...props,
|
|
1309
1210
|
"aria-labelledby": headingId,
|
|
1310
1211
|
ref: forwardedRef
|
|
1311
1212
|
});
|
|
1312
1213
|
});
|
|
1313
|
-
var TreeItemRoot = /* @__PURE__ */
|
|
1314
|
-
return /* @__PURE__ */
|
|
1214
|
+
var TreeItemRoot = /* @__PURE__ */ forwardRef14((props, forwardedRef) => {
|
|
1215
|
+
return /* @__PURE__ */ React18.createElement(ListItem.Root, {
|
|
1315
1216
|
role: "treeitem",
|
|
1316
1217
|
...props,
|
|
1317
1218
|
ref: forwardedRef
|
|
@@ -1339,7 +1240,7 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1339
1240
|
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
1340
1241
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
1341
1242
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1342
|
-
import
|
|
1243
|
+
import React19, { forwardRef as forwardRef15, useCallback as useCallback3, useRef } from "react";
|
|
1343
1244
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1344
1245
|
|
|
1345
1246
|
// packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
|
|
@@ -1498,7 +1399,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
1498
1399
|
defaultProp: defaultComplementarySidebarOpen,
|
|
1499
1400
|
onChange: onComplementarySidebarOpenChange
|
|
1500
1401
|
});
|
|
1501
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ React19.createElement(MainProvider, {
|
|
1502
1403
|
...props,
|
|
1503
1404
|
navigationSidebarOpen,
|
|
1504
1405
|
setNavigationSidebarOpen,
|
|
@@ -1510,7 +1411,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
1510
1411
|
var handleOpenAutoFocus = (event) => {
|
|
1511
1412
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
1512
1413
|
};
|
|
1513
|
-
var MainSidebar = /* @__PURE__ */
|
|
1414
|
+
var MainSidebar = /* @__PURE__ */ forwardRef15(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, setOpen, side, ...props }, forwardedRef) => {
|
|
1514
1415
|
const [isLg] = useMediaQuery("lg", {
|
|
1515
1416
|
ssr: false
|
|
1516
1417
|
});
|
|
@@ -1520,11 +1421,11 @@ var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToD
|
|
|
1520
1421
|
useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
|
|
1521
1422
|
onDismiss: () => setOpen(false)
|
|
1522
1423
|
});
|
|
1523
|
-
const
|
|
1524
|
-
return /* @__PURE__ */
|
|
1424
|
+
const Root3 = isLg ? Primitive6.div : DialogContent2;
|
|
1425
|
+
return /* @__PURE__ */ React19.createElement(DialogRoot2, {
|
|
1525
1426
|
open,
|
|
1526
1427
|
modal: false
|
|
1527
|
-
}, /* @__PURE__ */
|
|
1428
|
+
}, /* @__PURE__ */ React19.createElement(Root3, {
|
|
1528
1429
|
...!isLg && {
|
|
1529
1430
|
forceMount: true,
|
|
1530
1431
|
tabIndex: -1,
|
|
@@ -1540,13 +1441,13 @@ var MainSidebar = /* @__PURE__ */ forwardRef16(({ classNames, children, swipeToD
|
|
|
1540
1441
|
inert: "true"
|
|
1541
1442
|
},
|
|
1542
1443
|
ref
|
|
1543
|
-
}, /* @__PURE__ */
|
|
1444
|
+
}, /* @__PURE__ */ React19.createElement(ElevationProvider, {
|
|
1544
1445
|
elevation: "group"
|
|
1545
1446
|
}, children)));
|
|
1546
1447
|
});
|
|
1547
|
-
var MainNavigationSidebar = /* @__PURE__ */
|
|
1448
|
+
var MainNavigationSidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1548
1449
|
const { navigationSidebarOpen, setNavigationSidebarOpen } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
1549
|
-
return /* @__PURE__ */
|
|
1450
|
+
return /* @__PURE__ */ React19.createElement(MainSidebar, {
|
|
1550
1451
|
...props,
|
|
1551
1452
|
open: navigationSidebarOpen,
|
|
1552
1453
|
setOpen: setNavigationSidebarOpen,
|
|
@@ -1555,9 +1456,9 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef) =
|
|
|
1555
1456
|
});
|
|
1556
1457
|
});
|
|
1557
1458
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1558
|
-
var MainComplementarySidebar = /* @__PURE__ */
|
|
1459
|
+
var MainComplementarySidebar = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
1559
1460
|
const { complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
1560
|
-
return /* @__PURE__ */
|
|
1461
|
+
return /* @__PURE__ */ React19.createElement(MainSidebar, {
|
|
1561
1462
|
...props,
|
|
1562
1463
|
open: complementarySidebarOpen,
|
|
1563
1464
|
setOpen: setComplementarySidebarOpen,
|
|
@@ -1566,14 +1467,14 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef16((props, forwardedRef
|
|
|
1566
1467
|
});
|
|
1567
1468
|
});
|
|
1568
1469
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1569
|
-
var MainContent = /* @__PURE__ */
|
|
1470
|
+
var MainContent = /* @__PURE__ */ forwardRef15(({ asChild, classNames, bounce, children, ...props }, forwardedRef) => {
|
|
1570
1471
|
const [isLg] = useMediaQuery("lg", {
|
|
1571
1472
|
ssr: false
|
|
1572
1473
|
});
|
|
1573
1474
|
const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1574
1475
|
const { tx } = useThemeContext();
|
|
1575
|
-
const
|
|
1576
|
-
return /* @__PURE__ */
|
|
1476
|
+
const Root3 = asChild ? Slot7 : "main";
|
|
1477
|
+
return /* @__PURE__ */ React19.createElement(Root3, {
|
|
1577
1478
|
...props,
|
|
1578
1479
|
className: tx("main.content", "main", {
|
|
1579
1480
|
isLg,
|
|
@@ -1585,13 +1486,13 @@ var MainContent = /* @__PURE__ */ forwardRef16(({ asChild, classNames, bounce, c
|
|
|
1585
1486
|
}, children);
|
|
1586
1487
|
});
|
|
1587
1488
|
MainContent.displayName = MAIN_NAME;
|
|
1588
|
-
var MainOverlay = /* @__PURE__ */
|
|
1489
|
+
var MainOverlay = /* @__PURE__ */ forwardRef15(({ classNames, ...props }, forwardedRef) => {
|
|
1589
1490
|
const [isLg] = useMediaQuery("lg", {
|
|
1590
1491
|
ssr: false
|
|
1591
1492
|
});
|
|
1592
1493
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1593
1494
|
const { tx } = useThemeContext();
|
|
1594
|
-
return /* @__PURE__ */
|
|
1495
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1595
1496
|
onClick: () => {
|
|
1596
1497
|
setNavigationSidebarOpen(false);
|
|
1597
1498
|
setComplementarySidebarOpen(false);
|
|
@@ -1620,20 +1521,20 @@ var Main = {
|
|
|
1620
1521
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
1621
1522
|
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
1622
1523
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1623
|
-
import
|
|
1524
|
+
import React20, { forwardRef as forwardRef16 } from "react";
|
|
1624
1525
|
import { useId as useId3 } from "@dxos/react-hooks";
|
|
1625
1526
|
var MESSAGE_NAME = "Message";
|
|
1626
1527
|
var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
|
|
1627
|
-
var MessageRoot = /* @__PURE__ */
|
|
1528
|
+
var MessageRoot = /* @__PURE__ */ forwardRef16(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
|
|
1628
1529
|
const { tx } = useThemeContext();
|
|
1629
1530
|
const titleId = useId3("message__title", propsTitleId);
|
|
1630
1531
|
const descriptionId = useId3("message__description", propsDescriptionId);
|
|
1631
1532
|
const elevation = useElevationContext(propsElevation);
|
|
1632
|
-
const
|
|
1633
|
-
return /* @__PURE__ */
|
|
1533
|
+
const Root3 = asChild ? Slot8 : Primitive7.div;
|
|
1534
|
+
return /* @__PURE__ */ React20.createElement(MessageProvider, {
|
|
1634
1535
|
titleId,
|
|
1635
1536
|
descriptionId
|
|
1636
|
-
}, /* @__PURE__ */
|
|
1537
|
+
}, /* @__PURE__ */ React20.createElement(Root3, {
|
|
1637
1538
|
...props,
|
|
1638
1539
|
className: tx("message.root", "message", {
|
|
1639
1540
|
valence,
|
|
@@ -1646,11 +1547,11 @@ var MessageRoot = /* @__PURE__ */ forwardRef17(({ asChild, valence, elevation: p
|
|
|
1646
1547
|
});
|
|
1647
1548
|
MessageRoot.displayName = MESSAGE_NAME;
|
|
1648
1549
|
var MESSAGE_TITLE_NAME = "MessageTitle";
|
|
1649
|
-
var MessageTitle = /* @__PURE__ */
|
|
1550
|
+
var MessageTitle = /* @__PURE__ */ forwardRef16(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1650
1551
|
const { tx } = useThemeContext();
|
|
1651
1552
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
1652
|
-
const
|
|
1653
|
-
return /* @__PURE__ */
|
|
1553
|
+
const Root3 = asChild ? Slot8 : Primitive7.h2;
|
|
1554
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1654
1555
|
...props,
|
|
1655
1556
|
className: tx("message.title", "message__title", {}, className),
|
|
1656
1557
|
id: titleId,
|
|
@@ -1659,11 +1560,11 @@ var MessageTitle = /* @__PURE__ */ forwardRef17(({ asChild, className, children,
|
|
|
1659
1560
|
});
|
|
1660
1561
|
MessageTitle.displayName = MESSAGE_TITLE_NAME;
|
|
1661
1562
|
var MESSAGE_BODY_NAME = "MessageBody";
|
|
1662
|
-
var MessageBody = /* @__PURE__ */
|
|
1563
|
+
var MessageBody = /* @__PURE__ */ forwardRef16(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1663
1564
|
const { tx } = useThemeContext();
|
|
1664
1565
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
1665
|
-
const
|
|
1666
|
-
return /* @__PURE__ */
|
|
1566
|
+
const Root3 = asChild ? Slot8 : Primitive7.p;
|
|
1567
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1667
1568
|
...props,
|
|
1668
1569
|
className: tx("message.body", "message__body", {}, className),
|
|
1669
1570
|
id: descriptionId,
|
|
@@ -1681,36 +1582,36 @@ var Message = {
|
|
|
1681
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";
|
|
1682
1583
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1683
1584
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1684
|
-
import
|
|
1585
|
+
import React21, { forwardRef as forwardRef17 } from "react";
|
|
1685
1586
|
var PopoverRoot = PopoverRootPrimitive;
|
|
1686
1587
|
var PopoverPortal = PopoverPortalPrimitive;
|
|
1687
1588
|
var PopoverTrigger = PopoverTriggerPrimitive;
|
|
1688
1589
|
var PopoverAnchor = PopoverAnchorPrimitive;
|
|
1689
1590
|
var PopoverClose = PopoverClosePrimitive;
|
|
1690
|
-
var PopoverArrow = /* @__PURE__ */
|
|
1591
|
+
var PopoverArrow = /* @__PURE__ */ forwardRef17(({ classNames, ...props }, forwardedRef) => {
|
|
1691
1592
|
const { tx } = useThemeContext();
|
|
1692
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ React21.createElement(PopoverArrowPrimitive, {
|
|
1693
1594
|
...props,
|
|
1694
1595
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
1695
1596
|
ref: forwardedRef
|
|
1696
1597
|
});
|
|
1697
1598
|
});
|
|
1698
|
-
var PopoverContent = /* @__PURE__ */
|
|
1599
|
+
var PopoverContent = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1699
1600
|
const { tx } = useThemeContext();
|
|
1700
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ React21.createElement(PopoverContentPrimitive, {
|
|
1701
1602
|
sideOffset: 4,
|
|
1702
1603
|
collisionPadding: 8,
|
|
1703
1604
|
...props,
|
|
1704
1605
|
className: tx("popover.content", "popover", {}, classNames),
|
|
1705
1606
|
ref: forwardedRef
|
|
1706
|
-
}, /* @__PURE__ */
|
|
1607
|
+
}, /* @__PURE__ */ React21.createElement(ElevationProvider, {
|
|
1707
1608
|
elevation: "chrome"
|
|
1708
1609
|
}, children));
|
|
1709
1610
|
});
|
|
1710
|
-
var PopoverViewport = /* @__PURE__ */
|
|
1611
|
+
var PopoverViewport = /* @__PURE__ */ forwardRef17(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
1711
1612
|
const { tx } = useThemeContext();
|
|
1712
|
-
const
|
|
1713
|
-
return /* @__PURE__ */
|
|
1613
|
+
const Root3 = asChild ? Slot9 : Primitive8.div;
|
|
1614
|
+
return /* @__PURE__ */ React21.createElement(Root3, {
|
|
1714
1615
|
...props,
|
|
1715
1616
|
className: tx("popover.viewport", "popover__viewport", {
|
|
1716
1617
|
constrainInline,
|
|
@@ -1731,13 +1632,13 @@ var Popover = {
|
|
|
1731
1632
|
};
|
|
1732
1633
|
|
|
1733
1634
|
// packages/ui/react-ui/src/components/ProgressBar/ProgressBar.tsx
|
|
1734
|
-
import
|
|
1635
|
+
import React22 from "react";
|
|
1735
1636
|
var ProgressBar = (props) => {
|
|
1736
1637
|
const { className, indeterminate = false, progress = 0 } = props;
|
|
1737
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ React22.createElement("span", {
|
|
1738
1639
|
role: "none",
|
|
1739
1640
|
className: "w-20 h-1 inline-block relative bg-neutral-400/25 rounded-full" + (className ? " " + className : "")
|
|
1740
|
-
}, /* @__PURE__ */
|
|
1641
|
+
}, /* @__PURE__ */ React22.createElement("span", {
|
|
1741
1642
|
className: "absolute left-0 top-0 bottom-0 inline-block bg-neutral-400 rounded-full" + (indeterminate ? " animate-progress-indeterminate" : ""),
|
|
1742
1643
|
...indeterminate ? {} : {
|
|
1743
1644
|
style: {
|
|
@@ -1749,42 +1650,42 @@ var ProgressBar = (props) => {
|
|
|
1749
1650
|
|
|
1750
1651
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
1751
1652
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
1752
|
-
import
|
|
1753
|
-
var ScrollAreaRoot = /* @__PURE__ */
|
|
1653
|
+
import React23, { forwardRef as forwardRef18 } from "react";
|
|
1654
|
+
var ScrollAreaRoot = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1754
1655
|
const { tx } = useThemeContext();
|
|
1755
|
-
return /* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveRoot, {
|
|
1756
1657
|
...props,
|
|
1757
1658
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
1758
1659
|
ref: forwardedRef
|
|
1759
1660
|
});
|
|
1760
1661
|
});
|
|
1761
|
-
var ScrollAreaViewport = /* @__PURE__ */
|
|
1662
|
+
var ScrollAreaViewport = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1762
1663
|
const { tx } = useThemeContext();
|
|
1763
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveViewport, {
|
|
1764
1665
|
...props,
|
|
1765
1666
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
1766
1667
|
ref: forwardedRef
|
|
1767
1668
|
});
|
|
1768
1669
|
});
|
|
1769
|
-
var ScrollAreaScrollbar = /* @__PURE__ */
|
|
1670
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1770
1671
|
const { tx } = useThemeContext();
|
|
1771
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
1772
1673
|
...props,
|
|
1773
1674
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
1774
1675
|
ref: forwardedRef
|
|
1775
1676
|
});
|
|
1776
1677
|
});
|
|
1777
|
-
var ScrollAreaThumb = /* @__PURE__ */
|
|
1678
|
+
var ScrollAreaThumb = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1778
1679
|
const { tx } = useThemeContext();
|
|
1779
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveThumb, {
|
|
1780
1681
|
...props,
|
|
1781
1682
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
1782
1683
|
ref: forwardedRef
|
|
1783
1684
|
});
|
|
1784
1685
|
});
|
|
1785
|
-
var ScrollAreaCorner = /* @__PURE__ */
|
|
1686
|
+
var ScrollAreaCorner = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1786
1687
|
const { tx } = useThemeContext();
|
|
1787
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ React23.createElement(ScrollAreaPrimitiveCorner, {
|
|
1788
1689
|
...props,
|
|
1789
1690
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
1790
1691
|
ref: forwardedRef
|
|
@@ -1799,97 +1700,97 @@ var ScrollArea = {
|
|
|
1799
1700
|
};
|
|
1800
1701
|
|
|
1801
1702
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
1802
|
-
import { CaretDown as
|
|
1703
|
+
import { CaretDown as CaretDown2, CaretUp, Check as Check2 } from "@phosphor-icons/react";
|
|
1803
1704
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1804
|
-
import
|
|
1705
|
+
import React24, { forwardRef as forwardRef19 } from "react";
|
|
1805
1706
|
var SelectRoot = SelectPrimitive.Root;
|
|
1806
1707
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
1807
1708
|
var SelectValue = SelectPrimitive.Value;
|
|
1808
1709
|
var SelectIcon = SelectPrimitive.Icon;
|
|
1809
1710
|
var SelectPortal = SelectPrimitive.Portal;
|
|
1810
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
1811
|
-
return /* @__PURE__ */
|
|
1711
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef19(({ placeholder, ...props }, forwardedRef) => {
|
|
1712
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Trigger, {
|
|
1812
1713
|
asChild: true,
|
|
1813
1714
|
ref: forwardedRef
|
|
1814
|
-
}, /* @__PURE__ */
|
|
1715
|
+
}, /* @__PURE__ */ React24.createElement(Button, props, /* @__PURE__ */ React24.createElement(SelectPrimitive.Value, {
|
|
1815
1716
|
placeholder
|
|
1816
|
-
}), /* @__PURE__ */
|
|
1717
|
+
}), /* @__PURE__ */ React24.createElement(SelectPrimitive.Icon, {
|
|
1817
1718
|
className: "pis-2"
|
|
1818
|
-
}, /* @__PURE__ */
|
|
1719
|
+
}, /* @__PURE__ */ React24.createElement(CaretDown2, {
|
|
1819
1720
|
weight: "bold"
|
|
1820
1721
|
}))));
|
|
1821
1722
|
});
|
|
1822
|
-
var SelectContent = /* @__PURE__ */
|
|
1723
|
+
var SelectContent = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1823
1724
|
const { tx } = useThemeContext();
|
|
1824
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Content, {
|
|
1825
1726
|
...props,
|
|
1826
1727
|
className: tx("select.content", "select__content", {}, classNames),
|
|
1827
1728
|
ref: forwardedRef
|
|
1828
1729
|
}, children);
|
|
1829
1730
|
});
|
|
1830
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
1731
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1831
1732
|
const { tx } = useThemeContext();
|
|
1832
|
-
return /* @__PURE__ */
|
|
1733
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
1833
1734
|
...props,
|
|
1834
1735
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
1835
1736
|
ref: forwardedRef
|
|
1836
|
-
}, children ?? /* @__PURE__ */
|
|
1737
|
+
}, children ?? /* @__PURE__ */ React24.createElement(CaretUp, {
|
|
1837
1738
|
weight: "bold"
|
|
1838
1739
|
}));
|
|
1839
1740
|
});
|
|
1840
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
1741
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1841
1742
|
const { tx } = useThemeContext();
|
|
1842
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
1843
1744
|
...props,
|
|
1844
1745
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
1845
1746
|
ref: forwardedRef
|
|
1846
|
-
}, children ?? /* @__PURE__ */
|
|
1747
|
+
}, children ?? /* @__PURE__ */ React24.createElement(CaretDown2, {
|
|
1847
1748
|
weight: "bold"
|
|
1848
1749
|
}));
|
|
1849
1750
|
});
|
|
1850
1751
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
1851
|
-
var SelectItem = /* @__PURE__ */
|
|
1752
|
+
var SelectItem = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1852
1753
|
const { tx } = useThemeContext();
|
|
1853
|
-
return /* @__PURE__ */
|
|
1754
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Item, {
|
|
1854
1755
|
...props,
|
|
1855
1756
|
className: tx("select.item", "option", {}, classNames),
|
|
1856
1757
|
ref: forwardedRef
|
|
1857
1758
|
});
|
|
1858
1759
|
});
|
|
1859
1760
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
1860
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
1761
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef19(({ classNames, children, ...props }, forwardedRef) => {
|
|
1861
1762
|
const { tx } = useThemeContext();
|
|
1862
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.ItemIndicator, {
|
|
1863
1764
|
...props,
|
|
1864
1765
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
1865
1766
|
ref: forwardedRef
|
|
1866
1767
|
}, children);
|
|
1867
1768
|
});
|
|
1868
|
-
var SelectOption = /* @__PURE__ */
|
|
1769
|
+
var SelectOption = /* @__PURE__ */ forwardRef19(({ children, classNames, ...props }, forwardedRef) => {
|
|
1869
1770
|
const { tx } = useThemeContext();
|
|
1870
|
-
return /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Item, {
|
|
1871
1772
|
...props,
|
|
1872
1773
|
className: tx("select.item", "option", {}, classNames),
|
|
1873
1774
|
ref: forwardedRef
|
|
1874
|
-
}, /* @__PURE__ */
|
|
1875
|
-
className: tx("select.itemIndicator", "option__indicator", {}
|
|
1876
|
-
}, /* @__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, {
|
|
1877
1778
|
weight: "bold"
|
|
1878
1779
|
})));
|
|
1879
1780
|
});
|
|
1880
1781
|
var SelectGroup = SelectPrimitive.Group;
|
|
1881
1782
|
var SelectLabel = SelectPrimitive.Label;
|
|
1882
|
-
var SelectSeparator = /* @__PURE__ */
|
|
1783
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1883
1784
|
const { tx } = useThemeContext();
|
|
1884
|
-
return /* @__PURE__ */
|
|
1785
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Separator, {
|
|
1885
1786
|
...props,
|
|
1886
1787
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
1887
1788
|
ref: forwardedRef
|
|
1888
1789
|
});
|
|
1889
1790
|
});
|
|
1890
|
-
var SelectArrow = /* @__PURE__ */
|
|
1791
|
+
var SelectArrow = /* @__PURE__ */ forwardRef19(({ classNames, ...props }, forwardedRef) => {
|
|
1891
1792
|
const { tx } = useThemeContext();
|
|
1892
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ React24.createElement(SelectPrimitive.Arrow, {
|
|
1893
1794
|
...props,
|
|
1894
1795
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
1895
1796
|
ref: forwardedRef
|
|
@@ -1918,10 +1819,10 @@ var Select = {
|
|
|
1918
1819
|
|
|
1919
1820
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
1920
1821
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
1921
|
-
import
|
|
1822
|
+
import React25 from "react";
|
|
1922
1823
|
var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
1923
1824
|
const { tx } = useThemeContext();
|
|
1924
|
-
return /* @__PURE__ */
|
|
1825
|
+
return /* @__PURE__ */ React25.createElement(SeparatorPrimitive, {
|
|
1925
1826
|
orientation,
|
|
1926
1827
|
...props,
|
|
1927
1828
|
className: tx("separator.root", "separator", {
|
|
@@ -1933,11 +1834,11 @@ var Separator2 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
1933
1834
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
1934
1835
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1935
1836
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1936
|
-
import
|
|
1937
|
-
var Tag = /* @__PURE__ */
|
|
1837
|
+
import React26, { forwardRef as forwardRef20 } from "react";
|
|
1838
|
+
var Tag = /* @__PURE__ */ forwardRef20(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
1938
1839
|
const { tx } = useThemeContext();
|
|
1939
|
-
const
|
|
1940
|
-
return /* @__PURE__ */
|
|
1840
|
+
const Root3 = asChild ? Slot10 : Primitive9.span;
|
|
1841
|
+
return /* @__PURE__ */ React26.createElement(Root3, {
|
|
1941
1842
|
...props,
|
|
1942
1843
|
className: tx("tag.root", "tag", {
|
|
1943
1844
|
palette
|
|
@@ -1950,58 +1851,58 @@ var Tag = /* @__PURE__ */ forwardRef21(({ asChild, palette, classNames, ...props
|
|
|
1950
1851
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
1951
1852
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
1952
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";
|
|
1953
|
-
import
|
|
1854
|
+
import React27, { forwardRef as forwardRef21 } from "react";
|
|
1954
1855
|
var ToastProvider = ToastProviderPrimitive;
|
|
1955
|
-
var ToastViewport = /* @__PURE__ */
|
|
1856
|
+
var ToastViewport = /* @__PURE__ */ forwardRef21(({ classNames, ...props }, forwardedRef) => {
|
|
1956
1857
|
const { tx } = useThemeContext();
|
|
1957
|
-
return /* @__PURE__ */
|
|
1858
|
+
return /* @__PURE__ */ React27.createElement(ToastViewportPrimitive, {
|
|
1958
1859
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
1959
1860
|
ref: forwardedRef
|
|
1960
1861
|
});
|
|
1961
1862
|
});
|
|
1962
|
-
var ToastRoot = /* @__PURE__ */
|
|
1863
|
+
var ToastRoot = /* @__PURE__ */ forwardRef21(({ classNames, children, ...props }, forwardedRef) => {
|
|
1963
1864
|
const { tx } = useThemeContext();
|
|
1964
|
-
return /* @__PURE__ */
|
|
1865
|
+
return /* @__PURE__ */ React27.createElement(ToastRootPrimitive, {
|
|
1965
1866
|
...props,
|
|
1966
1867
|
className: tx("toast.root", "toast", {}, classNames),
|
|
1967
1868
|
ref: forwardedRef
|
|
1968
|
-
}, /* @__PURE__ */
|
|
1869
|
+
}, /* @__PURE__ */ React27.createElement(ElevationProvider, {
|
|
1969
1870
|
elevation: "chrome"
|
|
1970
|
-
}, /* @__PURE__ */
|
|
1871
|
+
}, /* @__PURE__ */ React27.createElement(DensityProvider, {
|
|
1971
1872
|
density: "fine"
|
|
1972
1873
|
}, children)));
|
|
1973
1874
|
});
|
|
1974
|
-
var ToastBody = /* @__PURE__ */
|
|
1875
|
+
var ToastBody = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1975
1876
|
const { tx } = useThemeContext();
|
|
1976
|
-
const
|
|
1977
|
-
return /* @__PURE__ */
|
|
1877
|
+
const Root3 = asChild ? Slot11 : Primitive10.div;
|
|
1878
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1978
1879
|
...props,
|
|
1979
1880
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
1980
1881
|
ref: forwardedRef
|
|
1981
1882
|
});
|
|
1982
1883
|
});
|
|
1983
|
-
var ToastTitle = /* @__PURE__ */
|
|
1884
|
+
var ToastTitle = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1984
1885
|
const { tx } = useThemeContext();
|
|
1985
|
-
const
|
|
1986
|
-
return /* @__PURE__ */
|
|
1886
|
+
const Root3 = asChild ? Slot11 : ToastTitlePrimitive;
|
|
1887
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1987
1888
|
...props,
|
|
1988
1889
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
1989
1890
|
ref: forwardedRef
|
|
1990
1891
|
});
|
|
1991
1892
|
});
|
|
1992
|
-
var ToastDescription = /* @__PURE__ */
|
|
1893
|
+
var ToastDescription = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
1993
1894
|
const { tx } = useThemeContext();
|
|
1994
|
-
const
|
|
1995
|
-
return /* @__PURE__ */
|
|
1895
|
+
const Root3 = asChild ? Slot11 : ToastDescriptionPrimitive;
|
|
1896
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
1996
1897
|
...props,
|
|
1997
1898
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
1998
1899
|
ref: forwardedRef
|
|
1999
1900
|
});
|
|
2000
1901
|
});
|
|
2001
|
-
var ToastActions = /* @__PURE__ */
|
|
1902
|
+
var ToastActions = /* @__PURE__ */ forwardRef21(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2002
1903
|
const { tx } = useThemeContext();
|
|
2003
|
-
const
|
|
2004
|
-
return /* @__PURE__ */
|
|
1904
|
+
const Root3 = asChild ? Slot11 : Primitive10.div;
|
|
1905
|
+
return /* @__PURE__ */ React27.createElement(Root3, {
|
|
2005
1906
|
...props,
|
|
2006
1907
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
2007
1908
|
ref: forwardedRef
|
|
@@ -2023,46 +1924,46 @@ var Toast = {
|
|
|
2023
1924
|
|
|
2024
1925
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
2025
1926
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
2026
|
-
import
|
|
2027
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
1927
|
+
import React28, { forwardRef as forwardRef22 } from "react";
|
|
1928
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
|
|
2028
1929
|
const { tx } = useThemeContext();
|
|
2029
|
-
return /* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Root, {
|
|
2030
1931
|
...props,
|
|
2031
1932
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
2032
1933
|
ref: forwardedRef
|
|
2033
1934
|
}, children);
|
|
2034
1935
|
});
|
|
2035
|
-
var ToolbarButton = /* @__PURE__ */
|
|
2036
|
-
return /* @__PURE__ */
|
|
1936
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
1937
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Button, {
|
|
2037
1938
|
asChild: true
|
|
2038
|
-
}, /* @__PURE__ */
|
|
1939
|
+
}, /* @__PURE__ */ React28.createElement(Button, {
|
|
2039
1940
|
...props,
|
|
2040
1941
|
ref: forwardedRef
|
|
2041
1942
|
}));
|
|
2042
1943
|
});
|
|
2043
|
-
var ToolbarLink = /* @__PURE__ */
|
|
2044
|
-
return /* @__PURE__ */
|
|
1944
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
1945
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Link, {
|
|
2045
1946
|
asChild: true
|
|
2046
|
-
}, /* @__PURE__ */
|
|
1947
|
+
}, /* @__PURE__ */ React28.createElement(Link, {
|
|
2047
1948
|
...props,
|
|
2048
1949
|
ref: forwardedRef
|
|
2049
1950
|
}));
|
|
2050
1951
|
});
|
|
2051
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
2052
|
-
return /* @__PURE__ */
|
|
1952
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
|
|
1953
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
2053
1954
|
...props,
|
|
2054
1955
|
asChild: true
|
|
2055
|
-
}, /* @__PURE__ */
|
|
1956
|
+
}, /* @__PURE__ */ React28.createElement(ButtonGroup, {
|
|
2056
1957
|
classNames,
|
|
2057
1958
|
children,
|
|
2058
1959
|
ref: forwardedRef
|
|
2059
1960
|
}));
|
|
2060
1961
|
});
|
|
2061
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
2062
|
-
return /* @__PURE__ */
|
|
1962
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef22(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
1963
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
2063
1964
|
...props,
|
|
2064
1965
|
asChild: true
|
|
2065
|
-
}, /* @__PURE__ */
|
|
1966
|
+
}, /* @__PURE__ */ React28.createElement(Button, {
|
|
2066
1967
|
variant,
|
|
2067
1968
|
density,
|
|
2068
1969
|
elevation,
|
|
@@ -2072,9 +1973,9 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef23(({ variant, density, e
|
|
|
2072
1973
|
}));
|
|
2073
1974
|
});
|
|
2074
1975
|
var ToolbarSeparator = (props) => {
|
|
2075
|
-
return /* @__PURE__ */
|
|
1976
|
+
return /* @__PURE__ */ React28.createElement(ToolbarPrimitive.Separator, {
|
|
2076
1977
|
asChild: true
|
|
2077
|
-
}, /* @__PURE__ */
|
|
1978
|
+
}, /* @__PURE__ */ React28.createElement(Separator2, {
|
|
2078
1979
|
orientation: "vertical",
|
|
2079
1980
|
...props
|
|
2080
1981
|
}));
|
|
@@ -2090,22 +1991,22 @@ var Toolbar = {
|
|
|
2090
1991
|
|
|
2091
1992
|
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
2092
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";
|
|
2093
|
-
import
|
|
1994
|
+
import React29, { forwardRef as forwardRef23 } from "react";
|
|
2094
1995
|
var TooltipProvider = TooltipProviderPrimitive;
|
|
2095
1996
|
var TooltipRoot = TooltipRootPrimitive;
|
|
2096
1997
|
var TooltipPortal = TooltipPortalPrimitive;
|
|
2097
1998
|
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
2098
|
-
var TooltipArrow = /* @__PURE__ */
|
|
1999
|
+
var TooltipArrow = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
2099
2000
|
const { tx } = useThemeContext();
|
|
2100
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ React29.createElement(TooltipArrowPrimitive, {
|
|
2101
2002
|
...props,
|
|
2102
2003
|
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
2103
2004
|
ref: forwardedRef
|
|
2104
2005
|
});
|
|
2105
2006
|
});
|
|
2106
|
-
var TooltipContent = /* @__PURE__ */
|
|
2007
|
+
var TooltipContent = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
2107
2008
|
const { tx } = useThemeContext();
|
|
2108
|
-
return /* @__PURE__ */
|
|
2009
|
+
return /* @__PURE__ */ React29.createElement(TooltipContentPrimitive, {
|
|
2109
2010
|
sideOffset: 4,
|
|
2110
2011
|
collisionPadding: 8,
|
|
2111
2012
|
...props,
|
|
@@ -2124,7 +2025,7 @@ var Tooltip = {
|
|
|
2124
2025
|
|
|
2125
2026
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
2126
2027
|
import { createKeyborg } from "keyborg";
|
|
2127
|
-
import
|
|
2028
|
+
import React30, { createContext as createContext10, useEffect as useEffect4 } from "react";
|
|
2128
2029
|
|
|
2129
2030
|
// packages/ui/react-ui/src/util/hasIosKeyboard.ts
|
|
2130
2031
|
var hasIosKeyboard = () => {
|
|
@@ -2152,19 +2053,19 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
2152
2053
|
return () => kb.unsubscribe(handleInputModalityChange);
|
|
2153
2054
|
}
|
|
2154
2055
|
}, []);
|
|
2155
|
-
return /* @__PURE__ */
|
|
2056
|
+
return /* @__PURE__ */ React30.createElement(ThemeContext.Provider, {
|
|
2156
2057
|
value: {
|
|
2157
2058
|
tx,
|
|
2158
2059
|
themeMode,
|
|
2159
2060
|
hasIosKeyboard: hasIosKeyboard()
|
|
2160
2061
|
}
|
|
2161
|
-
}, /* @__PURE__ */
|
|
2062
|
+
}, /* @__PURE__ */ React30.createElement(TranslationsProvider, {
|
|
2162
2063
|
fallback,
|
|
2163
2064
|
resourceExtensions,
|
|
2164
2065
|
appNs
|
|
2165
|
-
}, /* @__PURE__ */
|
|
2066
|
+
}, /* @__PURE__ */ React30.createElement(ElevationProvider, {
|
|
2166
2067
|
elevation: rootElevation
|
|
2167
|
-
}, /* @__PURE__ */
|
|
2068
|
+
}, /* @__PURE__ */ React30.createElement(DensityProvider, {
|
|
2168
2069
|
density: rootDensity
|
|
2169
2070
|
}, children))));
|
|
2170
2071
|
};
|
|
@@ -2183,7 +2084,6 @@ export {
|
|
|
2183
2084
|
CardMedia,
|
|
2184
2085
|
CardTitle,
|
|
2185
2086
|
Center,
|
|
2186
|
-
ComboBox,
|
|
2187
2087
|
DensityContext,
|
|
2188
2088
|
DensityProvider,
|
|
2189
2089
|
Dialog,
|