@dxos/react-ui 0.7.4 → 0.7.5-main.937ce75
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 +309 -184
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +399 -282
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +309 -184
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts +4 -2
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +5 -6
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +1 -3
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.d.ts +2 -0
- package/dist/types/src/components/Lists/List.d.ts.map +1 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts +11 -0
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/Lists/Tree.d.ts +2 -0
- package/dist/types/src/components/Lists/Tree.d.ts.map +1 -1
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts +8 -0
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -0
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +11 -5
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +3 -2
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +13 -12
- package/src/components/Buttons/IconButton.tsx +19 -5
- package/src/components/Clipboard/CopyButton.tsx +1 -1
- package/src/components/Dialogs/AlertDialog.tsx +6 -2
- package/src/components/Dialogs/Dialog.tsx +6 -2
- package/src/components/Input/Input.stories.tsx +4 -6
- package/src/components/Input/Input.tsx +29 -44
- package/src/components/Lists/List.stories.tsx +2 -2
- package/src/components/Lists/List.tsx +3 -0
- package/src/components/Lists/ListDropIndicator.tsx +62 -0
- package/src/components/Lists/Tree.tsx +3 -0
- package/src/components/Lists/TreeDropIndicator.tsx +70 -0
- package/src/components/Main/Main.tsx +1 -2
- package/src/components/Menus/ContextMenu.tsx +4 -4
- package/src/components/Menus/DropdownMenu.tsx +3 -2
- package/src/components/Popover/Popover.tsx +4 -2
- package/src/components/ScrollArea/ScrollArea.stories.tsx +2 -2
- package/src/components/Select/Select.tsx +3 -2
- package/src/components/ThemeProvider/ThemeProvider.tsx +1 -2
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Toolbar/Toolbar.tsx +35 -7
- package/src/components/Tooltip/Tooltip.tsx +3 -2
- package/src/testing/decorators/withVariants.tsx +4 -4
- package/dist/types/src/playground/Surfaces.stories.d.ts +0 -21
- package/dist/types/src/playground/Surfaces.stories.d.ts.map +0 -1
- package/src/playground/Surfaces.stories.tsx +0 -73
|
@@ -574,7 +574,7 @@ var ButtonGroup = /* @__PURE__ */ forwardRef7(({ children, elevation: propsEleva
|
|
|
574
574
|
ButtonGroup.displayName = BUTTON_GROUP_NAME;
|
|
575
575
|
|
|
576
576
|
// packages/ui/react-ui/src/components/Buttons/IconButton.tsx
|
|
577
|
-
import React10, { forwardRef as forwardRef9 } from "react";
|
|
577
|
+
import React10, { forwardRef as forwardRef9, useState as useState3 } from "react";
|
|
578
578
|
|
|
579
579
|
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
580
580
|
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
@@ -593,11 +593,14 @@ var TooltipArrow = /* @__PURE__ */ forwardRef8(({ classNames, ...props }, forwar
|
|
|
593
593
|
});
|
|
594
594
|
var TooltipContent = /* @__PURE__ */ forwardRef8(({ classNames, ...props }, forwardedRef) => {
|
|
595
595
|
const { tx } = useThemeContext();
|
|
596
|
+
const elevation = useElevationContext();
|
|
596
597
|
return /* @__PURE__ */ React9.createElement(TooltipContentPrimitive, {
|
|
597
598
|
sideOffset: 4,
|
|
598
599
|
collisionPadding: 8,
|
|
599
600
|
...props,
|
|
600
|
-
className: tx("tooltip.content", "tooltip", {
|
|
601
|
+
className: tx("tooltip.content", "tooltip", {
|
|
602
|
+
elevation
|
|
603
|
+
}, classNames),
|
|
601
604
|
ref: forwardedRef
|
|
602
605
|
});
|
|
603
606
|
});
|
|
@@ -611,20 +614,31 @@ var Tooltip = {
|
|
|
611
614
|
};
|
|
612
615
|
|
|
613
616
|
// packages/ui/react-ui/src/components/Buttons/IconButton.tsx
|
|
614
|
-
var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, ...props }, forwardedRef) => {
|
|
617
|
+
var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, suppressNextTooltip, ...props }, forwardedRef) => {
|
|
618
|
+
const [triggerTooltipOpen, setTriggerTooltipOpen] = useState3(false);
|
|
615
619
|
const content = /* @__PURE__ */ React10.createElement(Tooltip.Content, zIndex && {
|
|
616
620
|
style: {
|
|
617
621
|
zIndex
|
|
618
622
|
}
|
|
619
623
|
}, props.label, /* @__PURE__ */ React10.createElement(Tooltip.Arrow, null));
|
|
620
|
-
return /* @__PURE__ */ React10.createElement(Tooltip.Root,
|
|
624
|
+
return /* @__PURE__ */ React10.createElement(Tooltip.Root, {
|
|
625
|
+
open: triggerTooltipOpen,
|
|
626
|
+
onOpenChange: (nextOpen) => {
|
|
627
|
+
if (suppressNextTooltip?.current) {
|
|
628
|
+
setTriggerTooltipOpen(false);
|
|
629
|
+
suppressNextTooltip.current = false;
|
|
630
|
+
} else {
|
|
631
|
+
setTriggerTooltipOpen(nextOpen);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}, /* @__PURE__ */ React10.createElement(Tooltip.Trigger, {
|
|
621
635
|
asChild: true
|
|
622
636
|
}, /* @__PURE__ */ React10.createElement(LabelledIconButton, {
|
|
623
637
|
...props,
|
|
624
638
|
ref: forwardedRef
|
|
625
639
|
})), tooltipPortal ? /* @__PURE__ */ React10.createElement(Tooltip.Portal, null, content) : content);
|
|
626
640
|
});
|
|
627
|
-
var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, label, classNames, iconClassNames, ...props }, forwardedRef) => {
|
|
641
|
+
var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, label, classNames, iconClassNames, caretDown, ...props }, forwardedRef) => {
|
|
628
642
|
const { tx } = useThemeContext();
|
|
629
643
|
return /* @__PURE__ */ React10.createElement(Button, {
|
|
630
644
|
...props,
|
|
@@ -636,7 +650,10 @@ var LabelledIconButton = /* @__PURE__ */ forwardRef9(({ icon, size, iconOnly, la
|
|
|
636
650
|
classNames: iconClassNames
|
|
637
651
|
}), /* @__PURE__ */ React10.createElement("span", {
|
|
638
652
|
className: iconOnly ? "sr-only" : void 0
|
|
639
|
-
}, label)
|
|
653
|
+
}, label), caretDown && /* @__PURE__ */ React10.createElement(Icon, {
|
|
654
|
+
size: 3,
|
|
655
|
+
icon: "ph--caret-down--bold"
|
|
656
|
+
}));
|
|
640
657
|
});
|
|
641
658
|
var IconButton = /* @__PURE__ */ forwardRef9((props, forwardedRef) => props.iconOnly ? /* @__PURE__ */ React10.createElement(IconOnlyButton, {
|
|
642
659
|
...props,
|
|
@@ -689,7 +706,7 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef11(({ variant, elevation, densit
|
|
|
689
706
|
});
|
|
690
707
|
|
|
691
708
|
// packages/ui/react-ui/src/components/Clipboard/ClipboardProvider.tsx
|
|
692
|
-
import React13, { createContext as createContext4, useCallback, useContext as useContext6, useState as
|
|
709
|
+
import React13, { createContext as createContext4, useCallback, useContext as useContext6, useState as useState4 } from "react";
|
|
693
710
|
var ClipboardContext = /* @__PURE__ */ createContext4({
|
|
694
711
|
textValue: "",
|
|
695
712
|
setTextValue: async (_) => {
|
|
@@ -697,7 +714,7 @@ var ClipboardContext = /* @__PURE__ */ createContext4({
|
|
|
697
714
|
});
|
|
698
715
|
var useClipboard = () => useContext6(ClipboardContext);
|
|
699
716
|
var ClipboardProvider = ({ children }) => {
|
|
700
|
-
const [textValue, setInternalTextValue] =
|
|
717
|
+
const [textValue, setInternalTextValue] = useState4("");
|
|
701
718
|
const setTextValue = useCallback(async (nextValue) => {
|
|
702
719
|
await navigator.clipboard.writeText(nextValue);
|
|
703
720
|
return setInternalTextValue(nextValue);
|
|
@@ -711,7 +728,7 @@ var ClipboardProvider = ({ children }) => {
|
|
|
711
728
|
};
|
|
712
729
|
|
|
713
730
|
// packages/ui/react-ui/src/components/Clipboard/CopyButton.tsx
|
|
714
|
-
import React17, { useState as
|
|
731
|
+
import React17, { useState as useState5 } from "react";
|
|
715
732
|
import { mx } from "@dxos/react-ui-theme";
|
|
716
733
|
|
|
717
734
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
@@ -747,7 +764,7 @@ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React15.cre
|
|
|
747
764
|
|
|
748
765
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
749
766
|
var ThemeContext = /* @__PURE__ */ createContext7(void 0);
|
|
750
|
-
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine",
|
|
767
|
+
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", ...rest }) => {
|
|
751
768
|
useEffect3(() => {
|
|
752
769
|
if (document.defaultView) {
|
|
753
770
|
const kb = createKeyborg(document.defaultView);
|
|
@@ -767,7 +784,7 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
767
784
|
resourceExtensions,
|
|
768
785
|
appNs
|
|
769
786
|
}, /* @__PURE__ */ React16.createElement(ElevationProvider, {
|
|
770
|
-
elevation:
|
|
787
|
+
elevation: "base"
|
|
771
788
|
}, /* @__PURE__ */ React16.createElement(DensityProvider, {
|
|
772
789
|
density: rootDensity
|
|
773
790
|
}, children))));
|
|
@@ -819,15 +836,14 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
819
836
|
const { textValue, setTextValue } = useClipboard();
|
|
820
837
|
const isCopied = textValue === value;
|
|
821
838
|
const label = isCopied ? t("copy success label") : t("copy label");
|
|
822
|
-
const [open, setOpen] =
|
|
839
|
+
const [open, setOpen] = useState5(false);
|
|
823
840
|
return /* @__PURE__ */ React17.createElement(Tooltip.Root, {
|
|
824
841
|
delayDuration: 1500,
|
|
825
842
|
open,
|
|
826
843
|
onOpenChange: setOpen
|
|
827
844
|
}, /* @__PURE__ */ React17.createElement(Tooltip.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip.Content, {
|
|
828
845
|
side: "bottom",
|
|
829
|
-
sideOffset: 12
|
|
830
|
-
classNames: "z-30"
|
|
846
|
+
sideOffset: 12
|
|
831
847
|
}, /* @__PURE__ */ React17.createElement("span", null, label), /* @__PURE__ */ React17.createElement(Tooltip.Arrow, null))), /* @__PURE__ */ React17.createElement(Tooltip.Trigger, {
|
|
832
848
|
"aria-label": label,
|
|
833
849
|
...props,
|
|
@@ -858,7 +874,9 @@ var Clipboard = {
|
|
|
858
874
|
import { createContext as createContext8 } from "@radix-ui/react-context";
|
|
859
875
|
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";
|
|
860
876
|
import React18, { forwardRef as forwardRef12 } from "react";
|
|
861
|
-
var DialogRoot =
|
|
877
|
+
var DialogRoot = (props) => /* @__PURE__ */ React18.createElement(ElevationProvider, {
|
|
878
|
+
elevation: "dialog"
|
|
879
|
+
}, /* @__PURE__ */ React18.createElement(DialogRootPrimitive, props));
|
|
862
880
|
var DialogTrigger = DialogTriggerPrimitive;
|
|
863
881
|
var DialogPortal = DialogPortalPrimitive;
|
|
864
882
|
var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
@@ -908,9 +926,7 @@ var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...pro
|
|
|
908
926
|
inOverlayLayout
|
|
909
927
|
}, classNames),
|
|
910
928
|
ref: forwardedRef
|
|
911
|
-
},
|
|
912
|
-
elevation: "chrome"
|
|
913
|
-
}, children));
|
|
929
|
+
}, children);
|
|
914
930
|
});
|
|
915
931
|
DialogContent.displayName = DIALOG_CONTENT_NAME;
|
|
916
932
|
var Dialog = {
|
|
@@ -928,7 +944,9 @@ var Dialog = {
|
|
|
928
944
|
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";
|
|
929
945
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
930
946
|
import React19, { forwardRef as forwardRef13 } from "react";
|
|
931
|
-
var AlertDialogRoot =
|
|
947
|
+
var AlertDialogRoot = (props) => /* @__PURE__ */ React19.createElement(ElevationProvider, {
|
|
948
|
+
elevation: "dialog"
|
|
949
|
+
}, /* @__PURE__ */ React19.createElement(AlertDialogRootPrimitive, props));
|
|
932
950
|
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
933
951
|
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
934
952
|
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
@@ -979,9 +997,7 @@ var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, .
|
|
|
979
997
|
inOverlayLayout
|
|
980
998
|
}, classNames),
|
|
981
999
|
ref: forwardedRef
|
|
982
|
-
},
|
|
983
|
-
elevation: "chrome"
|
|
984
|
-
}, children));
|
|
1000
|
+
}, children);
|
|
985
1001
|
});
|
|
986
1002
|
AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
|
|
987
1003
|
var AlertDialog = {
|
|
@@ -1006,14 +1022,15 @@ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
|
1006
1022
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
1007
1023
|
var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
|
|
1008
1024
|
const { tx } = useThemeContext();
|
|
1025
|
+
const elevation = useElevationContext();
|
|
1009
1026
|
return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Content, {
|
|
1010
1027
|
collisionPadding: 8,
|
|
1011
1028
|
...props,
|
|
1012
|
-
className: tx("menu.content", "menu", {
|
|
1029
|
+
className: tx("menu.content", "menu", {
|
|
1030
|
+
elevation
|
|
1031
|
+
}, classNames),
|
|
1013
1032
|
ref: forwardedRef
|
|
1014
|
-
},
|
|
1015
|
-
elevation: "chrome"
|
|
1016
|
-
}, children));
|
|
1033
|
+
}, children);
|
|
1017
1034
|
});
|
|
1018
1035
|
var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
1019
1036
|
const { tx } = useThemeContext();
|
|
@@ -1218,6 +1235,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
|
|
|
1218
1235
|
const { __scopeDropdownMenu, classNames, ...contentProps } = props;
|
|
1219
1236
|
const { tx } = useThemeContext();
|
|
1220
1237
|
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
1238
|
+
const elevation = useElevationContext();
|
|
1221
1239
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1222
1240
|
const hasInteractedOutsideRef = useRef(false);
|
|
1223
1241
|
return /* @__PURE__ */ React21.createElement(MenuPrimitive.Content, {
|
|
@@ -1241,7 +1259,9 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
|
|
|
1241
1259
|
hasInteractedOutsideRef.current = true;
|
|
1242
1260
|
}
|
|
1243
1261
|
}),
|
|
1244
|
-
className: tx("menu.content", "menu", {
|
|
1262
|
+
className: tx("menu.content", "menu", {
|
|
1263
|
+
elevation
|
|
1264
|
+
}, classNames),
|
|
1245
1265
|
style: {
|
|
1246
1266
|
...props.style,
|
|
1247
1267
|
// re-namespace exposed content custom properties
|
|
@@ -1435,11 +1455,9 @@ var DropdownMenu = {
|
|
|
1435
1455
|
var useDropdownMenuMenuScope = useMenuScope;
|
|
1436
1456
|
|
|
1437
1457
|
// packages/ui/react-ui/src/components/Input/Input.tsx
|
|
1438
|
-
import {
|
|
1439
|
-
import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
|
|
1440
|
-
import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
|
|
1458
|
+
import { Root as CheckboxPrimitive } from "@radix-ui/react-checkbox";
|
|
1441
1459
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1442
|
-
import React22, { forwardRef as forwardRef16,
|
|
1460
|
+
import React22, { forwardRef as forwardRef16, useCallback as useCallback3 } from "react";
|
|
1443
1461
|
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";
|
|
1444
1462
|
var Label3 = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1445
1463
|
const { tx } = useThemeContext();
|
|
@@ -1565,7 +1583,6 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
|
|
|
1565
1583
|
});
|
|
1566
1584
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1567
1585
|
const { tx } = useThemeContext();
|
|
1568
|
-
const Icon3 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
1569
1586
|
return /* @__PURE__ */ React22.createElement(CheckboxPrimitive, {
|
|
1570
1587
|
...props,
|
|
1571
1588
|
checked,
|
|
@@ -1580,42 +1597,37 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
|
|
|
1580
1597
|
size
|
|
1581
1598
|
}, "shrink-0", classNames),
|
|
1582
1599
|
ref: forwardedRef
|
|
1583
|
-
}, /* @__PURE__ */ React22.createElement(
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
size
|
|
1600
|
+
}, /* @__PURE__ */ React22.createElement(Icon, {
|
|
1601
|
+
icon: checked === "indeterminate" ? "ph--minus--regular" : "ph--check--regular",
|
|
1602
|
+
classNames: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
1603
|
+
size,
|
|
1604
|
+
checked
|
|
1589
1605
|
})
|
|
1590
|
-
}))
|
|
1606
|
+
}));
|
|
1591
1607
|
});
|
|
1592
|
-
var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange,
|
|
1593
|
-
const { tx } = useThemeContext();
|
|
1608
|
+
var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, classNames, ...props }, forwardedRef) => {
|
|
1594
1609
|
const [checked, onCheckedChange] = useControllableState2({
|
|
1595
1610
|
prop: propsChecked,
|
|
1596
|
-
defaultProp: propsDefaultChecked,
|
|
1611
|
+
defaultProp: propsDefaultChecked ?? false,
|
|
1597
1612
|
onChange: propsOnCheckedChange
|
|
1598
1613
|
});
|
|
1599
1614
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1600
|
-
return /* @__PURE__ */ React22.createElement(
|
|
1601
|
-
|
|
1615
|
+
return /* @__PURE__ */ React22.createElement("input", {
|
|
1616
|
+
type: "checkbox",
|
|
1617
|
+
className: "ch-checkbox--switch ch-focus-ring",
|
|
1602
1618
|
checked,
|
|
1603
|
-
|
|
1619
|
+
onChange: (event) => {
|
|
1620
|
+
onCheckedChange(event.target.checked);
|
|
1621
|
+
},
|
|
1604
1622
|
id,
|
|
1605
1623
|
"aria-describedby": descriptionId,
|
|
1624
|
+
...props,
|
|
1606
1625
|
...validationValence === "error" && {
|
|
1607
1626
|
"aria-invalid": "true",
|
|
1608
1627
|
"aria-errormessage": errorMessageId
|
|
1609
1628
|
},
|
|
1610
|
-
className: tx("input.switch", "input--switch", {
|
|
1611
|
-
size
|
|
1612
|
-
}, classNames),
|
|
1613
1629
|
ref: forwardedRef
|
|
1614
|
-
}
|
|
1615
|
-
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
1616
|
-
size
|
|
1617
|
-
})
|
|
1618
|
-
}));
|
|
1630
|
+
});
|
|
1619
1631
|
});
|
|
1620
1632
|
var Input = {
|
|
1621
1633
|
Root: InputRoot,
|
|
@@ -1633,14 +1645,54 @@ var Input = {
|
|
|
1633
1645
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1634
1646
|
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1635
1647
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1636
|
-
import
|
|
1648
|
+
import React24, { forwardRef as forwardRef17 } from "react";
|
|
1637
1649
|
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";
|
|
1650
|
+
|
|
1651
|
+
// packages/ui/react-ui/src/components/Lists/ListDropIndicator.tsx
|
|
1652
|
+
import React23 from "react";
|
|
1653
|
+
var edgeToOrientationMap = {
|
|
1654
|
+
top: "horizontal",
|
|
1655
|
+
bottom: "horizontal",
|
|
1656
|
+
left: "vertical",
|
|
1657
|
+
right: "vertical"
|
|
1658
|
+
};
|
|
1659
|
+
var orientationStyles = {
|
|
1660
|
+
horizontal: "h-[--line-thickness] left-[--terminal-radius] right-0 before:left-[--negative-terminal-size]",
|
|
1661
|
+
vertical: "w-[--line-thickness] top-[--terminal-radius] bottom-0 before:top-[--negative-terminal-size]"
|
|
1662
|
+
};
|
|
1663
|
+
var edgeStyles = {
|
|
1664
|
+
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
1665
|
+
right: "right-[--line-offset] before:right-[--offset-terminal]",
|
|
1666
|
+
bottom: "bottom-[--line-offset] before:bottom-[--offset-terminal]",
|
|
1667
|
+
left: "left-[--line-offset] before:left-[--offset-terminal]"
|
|
1668
|
+
};
|
|
1669
|
+
var strokeSize = 2;
|
|
1670
|
+
var terminalSize = 8;
|
|
1671
|
+
var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
1672
|
+
var ListDropIndicator = ({ edge, gap = 0 }) => {
|
|
1673
|
+
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;
|
|
1674
|
+
const orientation = edgeToOrientationMap[edge];
|
|
1675
|
+
return /* @__PURE__ */ React23.createElement("div", {
|
|
1676
|
+
role: "none",
|
|
1677
|
+
style: {
|
|
1678
|
+
"--line-thickness": `${strokeSize}px`,
|
|
1679
|
+
"--line-offset": `${lineOffset}`,
|
|
1680
|
+
"--terminal-size": `${terminalSize}px`,
|
|
1681
|
+
"--terminal-radius": `${terminalSize / 2}px`,
|
|
1682
|
+
"--negative-terminal-size": `-${terminalSize}px`,
|
|
1683
|
+
"--offset-terminal": `${offsetToAlignTerminalWithLine}px`
|
|
1684
|
+
},
|
|
1685
|
+
className: `absolute z-10 pointer-events-none bg-accentSurface before:content-[''] before:w-[--terminal-size] before:h-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles[orientation]} ${edgeStyles[edge]}`
|
|
1686
|
+
});
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1638
1690
|
var List = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1639
1691
|
const { tx } = useThemeContext();
|
|
1640
1692
|
const density = useDensityContext(props.density);
|
|
1641
|
-
return /* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ React24.createElement(DensityProvider, {
|
|
1642
1694
|
density
|
|
1643
|
-
}, /* @__PURE__ */
|
|
1695
|
+
}, /* @__PURE__ */ React24.createElement(ListPrimitive, {
|
|
1644
1696
|
...props,
|
|
1645
1697
|
className: tx("list.root", "list", {}, classNames),
|
|
1646
1698
|
ref: forwardedRef
|
|
@@ -1650,7 +1702,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
|
|
|
1650
1702
|
const Root5 = asChild ? Slot8 : "div";
|
|
1651
1703
|
const density = useDensityContext();
|
|
1652
1704
|
const { tx } = useThemeContext();
|
|
1653
|
-
return /* @__PURE__ */
|
|
1705
|
+
return /* @__PURE__ */ React24.createElement(Root5, {
|
|
1654
1706
|
...!asChild && {
|
|
1655
1707
|
role: "none"
|
|
1656
1708
|
},
|
|
@@ -1664,7 +1716,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
|
|
|
1664
1716
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1665
1717
|
const density = useDensityContext();
|
|
1666
1718
|
const { tx } = useThemeContext();
|
|
1667
|
-
return /* @__PURE__ */
|
|
1719
|
+
return /* @__PURE__ */ React24.createElement("div", {
|
|
1668
1720
|
role: "none",
|
|
1669
1721
|
...props,
|
|
1670
1722
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1675,7 +1727,7 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1675
1727
|
var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
|
|
1676
1728
|
const { tx } = useThemeContext();
|
|
1677
1729
|
const density = useDensityContext();
|
|
1678
|
-
return /* @__PURE__ */
|
|
1730
|
+
return /* @__PURE__ */ React24.createElement(ListPrimitiveItemHeading, {
|
|
1679
1731
|
...props,
|
|
1680
1732
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1681
1733
|
density
|
|
@@ -1688,13 +1740,13 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
|
|
|
1688
1740
|
const density = useDensityContext();
|
|
1689
1741
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1690
1742
|
const Icon3 = open ? CaretDown : CaretRight;
|
|
1691
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ React24.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1692
1744
|
...props,
|
|
1693
1745
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1694
1746
|
density
|
|
1695
1747
|
}, classNames),
|
|
1696
1748
|
ref: forwardedRef
|
|
1697
|
-
}, children || /* @__PURE__ */
|
|
1749
|
+
}, children || /* @__PURE__ */ React24.createElement(Icon3, {
|
|
1698
1750
|
weight: "bold",
|
|
1699
1751
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1700
1752
|
}));
|
|
@@ -1702,7 +1754,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
|
|
|
1702
1754
|
var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1703
1755
|
const { tx } = useThemeContext();
|
|
1704
1756
|
const density = useDensityContext();
|
|
1705
|
-
return /* @__PURE__ */
|
|
1757
|
+
return /* @__PURE__ */ React24.createElement(ListPrimitiveItem, {
|
|
1706
1758
|
...props,
|
|
1707
1759
|
className: tx("list.item.root", "list__listItem", {
|
|
1708
1760
|
density,
|
|
@@ -1717,27 +1769,75 @@ var ListItem = {
|
|
|
1717
1769
|
Heading: ListItemHeading,
|
|
1718
1770
|
OpenTrigger: ListItemOpenTrigger,
|
|
1719
1771
|
CollapsibleContent: ListItemCollapsibleContent,
|
|
1720
|
-
MockOpenTrigger: MockListItemOpenTrigger
|
|
1772
|
+
MockOpenTrigger: MockListItemOpenTrigger,
|
|
1773
|
+
DropIndicator: ListDropIndicator
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1777
|
+
import React26, { forwardRef as forwardRef18 } from "react";
|
|
1778
|
+
|
|
1779
|
+
// packages/ui/react-ui/src/components/Lists/TreeDropIndicator.tsx
|
|
1780
|
+
import React25 from "react";
|
|
1781
|
+
var edgeToOrientationMap2 = {
|
|
1782
|
+
"reorder-above": "sibling",
|
|
1783
|
+
"reorder-below": "sibling",
|
|
1784
|
+
"make-child": "child",
|
|
1785
|
+
reparent: "child"
|
|
1786
|
+
};
|
|
1787
|
+
var orientationStyles2 = {
|
|
1788
|
+
// TODO(wittjosiah): Stop using left/right here.
|
|
1789
|
+
sibling: "bs-[--line-thickness] left-[--horizontal-indent] right-0 bg-accentSurface before:left-[--negative-terminal-size]",
|
|
1790
|
+
child: "is-full block-start-0 block-end-0 border-[length:--line-thickness] before:invisible"
|
|
1791
|
+
};
|
|
1792
|
+
var instructionStyles = {
|
|
1793
|
+
"reorder-above": "block-start-[--line-offset] before:block-start-[--offset-terminal]",
|
|
1794
|
+
"reorder-below": "block-end-[--line-offset] before:block-end-[--offset-terminal]",
|
|
1795
|
+
"make-child": "border-accentSurface",
|
|
1796
|
+
// TODO(wittjosiah): This is not occurring in the current implementation.
|
|
1797
|
+
reparent: ""
|
|
1798
|
+
};
|
|
1799
|
+
var strokeSize2 = 2;
|
|
1800
|
+
var terminalSize2 = 8;
|
|
1801
|
+
var offsetToAlignTerminalWithLine2 = (strokeSize2 - terminalSize2) / 2;
|
|
1802
|
+
var TreeDropIndicator = ({ instruction, gap = 0 }) => {
|
|
1803
|
+
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize2}px))`;
|
|
1804
|
+
const isBlocked = instruction.type === "instruction-blocked";
|
|
1805
|
+
const desiredInstruction = isBlocked ? instruction.desired : instruction;
|
|
1806
|
+
const orientation = edgeToOrientationMap2[desiredInstruction.type];
|
|
1807
|
+
if (isBlocked) {
|
|
1808
|
+
return null;
|
|
1809
|
+
}
|
|
1810
|
+
return /* @__PURE__ */ React25.createElement("div", {
|
|
1811
|
+
style: {
|
|
1812
|
+
"--line-thickness": `${strokeSize2}px`,
|
|
1813
|
+
"--line-offset": `${lineOffset}`,
|
|
1814
|
+
"--terminal-size": `${terminalSize2}px`,
|
|
1815
|
+
"--terminal-radius": `${terminalSize2 / 2}px`,
|
|
1816
|
+
"--negative-terminal-size": `-${terminalSize2}px`,
|
|
1817
|
+
"--offset-terminal": `${offsetToAlignTerminalWithLine2}px`,
|
|
1818
|
+
"--horizontal-indent": `${desiredInstruction.currentLevel * desiredInstruction.indentPerLevel + 4}px`
|
|
1819
|
+
},
|
|
1820
|
+
className: `absolute z-10 pointer-events-none before:is-[--terminal-size] before:bs-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles2[orientation]} ${instructionStyles[desiredInstruction.type]}`
|
|
1821
|
+
});
|
|
1721
1822
|
};
|
|
1722
1823
|
|
|
1723
1824
|
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1724
|
-
import React24, { forwardRef as forwardRef18 } from "react";
|
|
1725
1825
|
var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1726
|
-
return /* @__PURE__ */
|
|
1826
|
+
return /* @__PURE__ */ React26.createElement(List, {
|
|
1727
1827
|
...props,
|
|
1728
1828
|
ref: forwardedRef
|
|
1729
1829
|
});
|
|
1730
1830
|
});
|
|
1731
1831
|
var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
|
|
1732
1832
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1733
|
-
return /* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ React26.createElement(List, {
|
|
1734
1834
|
...props,
|
|
1735
1835
|
"aria-labelledby": headingId,
|
|
1736
1836
|
ref: forwardedRef
|
|
1737
1837
|
});
|
|
1738
1838
|
});
|
|
1739
1839
|
var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1740
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ React26.createElement(ListItem.Root, {
|
|
1741
1841
|
role: "treeitem",
|
|
1742
1842
|
...props,
|
|
1743
1843
|
ref: forwardedRef
|
|
@@ -1756,7 +1856,8 @@ var TreeItem = {
|
|
|
1756
1856
|
Heading: TreeItemHeading,
|
|
1757
1857
|
Body: TreeItemBody,
|
|
1758
1858
|
OpenTrigger: TreeItemOpenTrigger,
|
|
1759
|
-
MockOpenTrigger: MockTreeItemOpenTrigger
|
|
1859
|
+
MockOpenTrigger: MockTreeItemOpenTrigger,
|
|
1860
|
+
DropIndicator: TreeDropIndicator
|
|
1760
1861
|
};
|
|
1761
1862
|
|
|
1762
1863
|
// packages/ui/react-ui/src/components/Lists/Treegrid.tsx
|
|
@@ -1765,7 +1866,7 @@ import { createContextScope as createContextScope2 } from "@radix-ui/react-conte
|
|
|
1765
1866
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1766
1867
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1767
1868
|
import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
|
|
1768
|
-
import
|
|
1869
|
+
import React27, { forwardRef as forwardRef19 } from "react";
|
|
1769
1870
|
var TREEGRID_ROW_NAME = "TreegridRow";
|
|
1770
1871
|
var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
|
|
1771
1872
|
var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
|
|
@@ -1779,7 +1880,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef19(({ asChild, classNames, children
|
|
|
1779
1880
|
tabbable: false,
|
|
1780
1881
|
circular: true
|
|
1781
1882
|
});
|
|
1782
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ React27.createElement(Root5, {
|
|
1783
1884
|
role: "treegrid",
|
|
1784
1885
|
...arrowNavigationAttrs,
|
|
1785
1886
|
...props,
|
|
@@ -1810,11 +1911,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
|
|
|
1810
1911
|
circular: false,
|
|
1811
1912
|
memorizeCurrent: false
|
|
1812
1913
|
});
|
|
1813
|
-
return /* @__PURE__ */
|
|
1914
|
+
return /* @__PURE__ */ React27.createElement(TreegridRowProvider, {
|
|
1814
1915
|
open,
|
|
1815
1916
|
onOpenChange,
|
|
1816
1917
|
scope: __treegridRowScope
|
|
1817
|
-
}, /* @__PURE__ */
|
|
1918
|
+
}, /* @__PURE__ */ React27.createElement(Root5, {
|
|
1818
1919
|
role: "row",
|
|
1819
1920
|
"aria-level": level,
|
|
1820
1921
|
className: tx("treegrid.row", "treegrid__row", {
|
|
@@ -1829,7 +1930,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
|
|
|
1829
1930
|
...props,
|
|
1830
1931
|
id,
|
|
1831
1932
|
ref: forwardedRef
|
|
1832
|
-
}, /* @__PURE__ */
|
|
1933
|
+
}, /* @__PURE__ */ React27.createElement("div", {
|
|
1833
1934
|
role: "none",
|
|
1834
1935
|
className: "contents",
|
|
1835
1936
|
...arrowGroupAttrs
|
|
@@ -1837,7 +1938,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
|
|
|
1837
1938
|
});
|
|
1838
1939
|
var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
|
|
1839
1940
|
const { tx } = useThemeContext();
|
|
1840
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ React27.createElement("div", {
|
|
1841
1942
|
role: "gridcell",
|
|
1842
1943
|
className: tx("treegrid.cell", "treegrid__cell", {
|
|
1843
1944
|
indent
|
|
@@ -1864,12 +1965,12 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1864
1965
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1865
1966
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1866
1967
|
import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
|
|
1867
|
-
import
|
|
1968
|
+
import React28, { forwardRef as forwardRef20, useCallback as useCallback5, useEffect as useEffect6, useRef as useRef2, useState as useState7 } from "react";
|
|
1868
1969
|
import { log } from "@dxos/log";
|
|
1869
1970
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1870
1971
|
|
|
1871
1972
|
// packages/ui/react-ui/src/components/Main/useSwipeToDismiss.ts
|
|
1872
|
-
import { useCallback as useCallback4, useEffect as useEffect5, useState as
|
|
1973
|
+
import { useCallback as useCallback4, useEffect as useEffect5, useState as useState6 } from "react";
|
|
1873
1974
|
var MotionState;
|
|
1874
1975
|
(function(MotionState2) {
|
|
1875
1976
|
MotionState2[MotionState2["IDLE"] = 0] = "IDLE";
|
|
@@ -1884,8 +1985,8 @@ var useSwipeToDismiss = (ref, {
|
|
|
1884
1985
|
/* side = 'inline-start' */
|
|
1885
1986
|
}) => {
|
|
1886
1987
|
const $root = ref.current;
|
|
1887
|
-
const [motionState, setMotionState] =
|
|
1888
|
-
const [gestureStartX, setGestureStartX] =
|
|
1988
|
+
const [motionState, setMotionState] = useState6(0);
|
|
1989
|
+
const [gestureStartX, setGestureStartX] = useState6(0);
|
|
1889
1990
|
const setIdle = useCallback4(() => {
|
|
1890
1991
|
setMotionState(0);
|
|
1891
1992
|
$root?.style.removeProperty("inset-inline-start");
|
|
@@ -2007,7 +2108,7 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
|
2007
2108
|
setNavigationSidebarOpen: (nextOpen) => {
|
|
2008
2109
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2009
2110
|
F: __dxlog_file,
|
|
2010
|
-
L:
|
|
2111
|
+
L: 80,
|
|
2011
2112
|
S: void 0,
|
|
2012
2113
|
C: (f, a) => f(...a)
|
|
2013
2114
|
});
|
|
@@ -2016,7 +2117,7 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
|
2016
2117
|
setComplementarySidebarOpen: (nextOpen) => {
|
|
2017
2118
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2018
2119
|
F: __dxlog_file,
|
|
2019
|
-
L:
|
|
2120
|
+
L: 85,
|
|
2020
2121
|
S: void 0,
|
|
2021
2122
|
C: (f, a) => f(...a)
|
|
2022
2123
|
});
|
|
@@ -2066,7 +2167,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
2066
2167
|
defaultProp: defaultComplementarySidebarOpen,
|
|
2067
2168
|
onChange: onComplementarySidebarOpenChange
|
|
2068
2169
|
});
|
|
2069
|
-
const [resizing, setResizing] =
|
|
2170
|
+
const [resizing, setResizing] = useState7(false);
|
|
2070
2171
|
const resizeInterval = useRef2(null);
|
|
2071
2172
|
const handleResize = useCallback5(() => {
|
|
2072
2173
|
setResizing(true);
|
|
@@ -2084,7 +2185,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
2084
2185
|
}, [
|
|
2085
2186
|
handleResize
|
|
2086
2187
|
]);
|
|
2087
|
-
return /* @__PURE__ */
|
|
2188
|
+
return /* @__PURE__ */ React28.createElement(MainProvider, {
|
|
2088
2189
|
...props,
|
|
2089
2190
|
navigationSidebarOpen,
|
|
2090
2191
|
setNavigationSidebarOpen,
|
|
@@ -2116,10 +2217,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2116
2217
|
props.onKeyDown
|
|
2117
2218
|
]);
|
|
2118
2219
|
const Root5 = isLg ? Primitive9.div : DialogContent2;
|
|
2119
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ React28.createElement(DialogRoot2, {
|
|
2120
2221
|
open,
|
|
2121
2222
|
modal: false
|
|
2122
|
-
}, /* @__PURE__ */
|
|
2223
|
+
}, /* @__PURE__ */ React28.createElement(Root5, {
|
|
2123
2224
|
...!isLg && {
|
|
2124
2225
|
forceMount: true,
|
|
2125
2226
|
tabIndex: -1,
|
|
@@ -2135,14 +2236,12 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2135
2236
|
inert: "true"
|
|
2136
2237
|
},
|
|
2137
2238
|
ref
|
|
2138
|
-
},
|
|
2139
|
-
elevation: "group"
|
|
2140
|
-
}, children)));
|
|
2239
|
+
}, children));
|
|
2141
2240
|
});
|
|
2142
2241
|
var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
2143
2242
|
const { navigationSidebarOpen, setNavigationSidebarOpen, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
2144
2243
|
const mover = useLandmarkMover(props.onKeyDown, "0");
|
|
2145
|
-
return /* @__PURE__ */
|
|
2244
|
+
return /* @__PURE__ */ React28.createElement(MainSidebar, {
|
|
2146
2245
|
...mover,
|
|
2147
2246
|
...props,
|
|
2148
2247
|
open: navigationSidebarOpen,
|
|
@@ -2156,7 +2255,7 @@ MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
|
2156
2255
|
var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
2157
2256
|
const { complementarySidebarOpen, setComplementarySidebarOpen, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
2158
2257
|
const mover = useLandmarkMover(props.onKeyDown, "2");
|
|
2159
|
-
return /* @__PURE__ */
|
|
2258
|
+
return /* @__PURE__ */ React28.createElement(MainSidebar, {
|
|
2160
2259
|
...mover,
|
|
2161
2260
|
...props,
|
|
2162
2261
|
open: complementarySidebarOpen,
|
|
@@ -2172,7 +2271,7 @@ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, h
|
|
|
2172
2271
|
const { tx } = useThemeContext();
|
|
2173
2272
|
const Root5 = asChild ? Slot10 : role ? "div" : "main";
|
|
2174
2273
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
2175
|
-
return /* @__PURE__ */
|
|
2274
|
+
return /* @__PURE__ */ React28.createElement(Root5, {
|
|
2176
2275
|
role,
|
|
2177
2276
|
...handlesFocus && {
|
|
2178
2277
|
...mover
|
|
@@ -2194,7 +2293,7 @@ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwar
|
|
|
2194
2293
|
});
|
|
2195
2294
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
2196
2295
|
const { tx } = useThemeContext();
|
|
2197
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
|
2198
2297
|
onClick: () => {
|
|
2199
2298
|
setNavigationSidebarOpen(false);
|
|
2200
2299
|
setComplementarySidebarOpen(false);
|
|
@@ -2225,7 +2324,7 @@ var MainNotch = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwarde
|
|
|
2225
2324
|
props?.onKeyDown
|
|
2226
2325
|
]);
|
|
2227
2326
|
const mover = useLandmarkMover(handleKeyDown, "3");
|
|
2228
|
-
return /* @__PURE__ */
|
|
2327
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
|
2229
2328
|
role: "toolbar",
|
|
2230
2329
|
...mover,
|
|
2231
2330
|
...props,
|
|
@@ -2247,7 +2346,7 @@ var Main = {
|
|
|
2247
2346
|
import { createContext as createContext11 } from "@radix-ui/react-context";
|
|
2248
2347
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
2249
2348
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
2250
|
-
import
|
|
2349
|
+
import React29, { forwardRef as forwardRef21 } from "react";
|
|
2251
2350
|
import { useId as useId4 } from "@dxos/react-hooks";
|
|
2252
2351
|
var MESSAGE_NAME = "Message";
|
|
2253
2352
|
var [MessageProvider, useMessageContext] = createContext11(MESSAGE_NAME);
|
|
@@ -2257,10 +2356,10 @@ var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence, elevation: p
|
|
|
2257
2356
|
const descriptionId = useId4("message__description", propsDescriptionId);
|
|
2258
2357
|
const elevation = useElevationContext(propsElevation);
|
|
2259
2358
|
const Root5 = asChild ? Slot11 : Primitive10.div;
|
|
2260
|
-
return /* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ React29.createElement(MessageProvider, {
|
|
2261
2360
|
titleId,
|
|
2262
2361
|
descriptionId
|
|
2263
|
-
}, /* @__PURE__ */
|
|
2362
|
+
}, /* @__PURE__ */ React29.createElement(Root5, {
|
|
2264
2363
|
...props,
|
|
2265
2364
|
className: tx("message.root", "message", {
|
|
2266
2365
|
valence,
|
|
@@ -2277,7 +2376,7 @@ var MessageTitle = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
|
|
|
2277
2376
|
const { tx } = useThemeContext();
|
|
2278
2377
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
2279
2378
|
const Root5 = asChild ? Slot11 : Primitive10.h2;
|
|
2280
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ React29.createElement(Root5, {
|
|
2281
2380
|
...props,
|
|
2282
2381
|
className: tx("message.title", "message__title", {}, className),
|
|
2283
2382
|
id: titleId,
|
|
@@ -2290,7 +2389,7 @@ var MessageBody = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
|
|
|
2290
2389
|
const { tx } = useThemeContext();
|
|
2291
2390
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
2292
2391
|
const Root5 = asChild ? Slot11 : Primitive10.p;
|
|
2293
|
-
return /* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ React29.createElement(Root5, {
|
|
2294
2393
|
...props,
|
|
2295
2394
|
className: tx("message.body", "message__body", {}, className),
|
|
2296
2395
|
id: descriptionId,
|
|
@@ -2320,7 +2419,7 @@ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
|
|
|
2320
2419
|
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
2321
2420
|
import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
|
|
2322
2421
|
import { hideOthers } from "aria-hidden";
|
|
2323
|
-
import
|
|
2422
|
+
import React30, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback6, useState as useState8, useEffect as useEffect7 } from "react";
|
|
2324
2423
|
import { RemoveScroll } from "react-remove-scroll";
|
|
2325
2424
|
var POPOVER_NAME = "Popover";
|
|
2326
2425
|
var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
|
|
@@ -2332,13 +2431,13 @@ var PopoverRoot = (props) => {
|
|
|
2332
2431
|
const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
|
|
2333
2432
|
const popperScope = usePopperScope(__scopePopover);
|
|
2334
2433
|
const triggerRef = useRef3(null);
|
|
2335
|
-
const [hasCustomAnchor, setHasCustomAnchor] =
|
|
2434
|
+
const [hasCustomAnchor, setHasCustomAnchor] = useState8(false);
|
|
2336
2435
|
const [open = false, setOpen] = useControllableState5({
|
|
2337
2436
|
prop: openProp,
|
|
2338
2437
|
defaultProp: defaultOpen,
|
|
2339
2438
|
onChange: onOpenChange
|
|
2340
2439
|
});
|
|
2341
|
-
return /* @__PURE__ */
|
|
2440
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React30.createElement(PopoverProvider, {
|
|
2342
2441
|
scope: __scopePopover,
|
|
2343
2442
|
contentId: useId5(),
|
|
2344
2443
|
triggerRef,
|
|
@@ -2367,7 +2466,7 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2367
2466
|
onCustomAnchorAdd,
|
|
2368
2467
|
onCustomAnchorRemove
|
|
2369
2468
|
]);
|
|
2370
|
-
return /* @__PURE__ */
|
|
2469
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
|
|
2371
2470
|
...popperScope,
|
|
2372
2471
|
...anchorProps,
|
|
2373
2472
|
ref: forwardedRef
|
|
@@ -2380,7 +2479,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2380
2479
|
const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
|
|
2381
2480
|
const popperScope = usePopperScope(__scopePopover);
|
|
2382
2481
|
const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
|
|
2383
|
-
const trigger = /* @__PURE__ */
|
|
2482
|
+
const trigger = /* @__PURE__ */ React30.createElement(Primitive11.button, {
|
|
2384
2483
|
type: "button",
|
|
2385
2484
|
"aria-haspopup": "dialog",
|
|
2386
2485
|
"aria-expanded": context.open,
|
|
@@ -2390,7 +2489,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2390
2489
|
ref: composedTriggerRef,
|
|
2391
2490
|
onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
|
|
2392
2491
|
});
|
|
2393
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */
|
|
2492
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
|
|
2394
2493
|
asChild: true,
|
|
2395
2494
|
...popperScope
|
|
2396
2495
|
}, trigger);
|
|
@@ -2406,7 +2505,7 @@ var PopoverVirtualTrigger = (props) => {
|
|
|
2406
2505
|
context.triggerRef.current = virtualRef.current;
|
|
2407
2506
|
}
|
|
2408
2507
|
});
|
|
2409
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
|
|
2410
2509
|
...popperScope,
|
|
2411
2510
|
virtualRef
|
|
2412
2511
|
});
|
|
@@ -2419,12 +2518,12 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
|
|
|
2419
2518
|
var PopoverPortal = (props) => {
|
|
2420
2519
|
const { __scopePopover, forceMount, children, container } = props;
|
|
2421
2520
|
const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
|
|
2422
|
-
return /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ React30.createElement(PortalProvider, {
|
|
2423
2522
|
scope: __scopePopover,
|
|
2424
2523
|
forceMount
|
|
2425
|
-
}, /* @__PURE__ */
|
|
2524
|
+
}, /* @__PURE__ */ React30.createElement(Presence, {
|
|
2426
2525
|
present: forceMount || context.open
|
|
2427
|
-
}, /* @__PURE__ */
|
|
2526
|
+
}, /* @__PURE__ */ React30.createElement(PortalPrimitive, {
|
|
2428
2527
|
asChild: true,
|
|
2429
2528
|
container
|
|
2430
2529
|
}, children)));
|
|
@@ -2435,12 +2534,12 @@ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2435
2534
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
|
|
2436
2535
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
2437
2536
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2438
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ React30.createElement(Presence, {
|
|
2439
2538
|
present: forceMount || context.open
|
|
2440
|
-
}, context.modal ? /* @__PURE__ */
|
|
2539
|
+
}, context.modal ? /* @__PURE__ */ React30.createElement(PopoverContentModal, {
|
|
2441
2540
|
...contentProps,
|
|
2442
2541
|
ref: forwardedRef
|
|
2443
|
-
}) : /* @__PURE__ */
|
|
2542
|
+
}) : /* @__PURE__ */ React30.createElement(PopoverContentNonModal, {
|
|
2444
2543
|
...contentProps,
|
|
2445
2544
|
ref: forwardedRef
|
|
2446
2545
|
}));
|
|
@@ -2457,10 +2556,10 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) =>
|
|
|
2457
2556
|
return hideOthers(content);
|
|
2458
2557
|
}
|
|
2459
2558
|
}, []);
|
|
2460
|
-
return /* @__PURE__ */
|
|
2559
|
+
return /* @__PURE__ */ React30.createElement(RemoveScroll, {
|
|
2461
2560
|
as: Slot12,
|
|
2462
2561
|
allowPinchZoom: true
|
|
2463
|
-
}, /* @__PURE__ */
|
|
2562
|
+
}, /* @__PURE__ */ React30.createElement(PopoverContentImpl, {
|
|
2464
2563
|
...props,
|
|
2465
2564
|
ref: composedRefs,
|
|
2466
2565
|
// we make sure we're not trapping once it's been closed
|
|
@@ -2492,7 +2591,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef)
|
|
|
2492
2591
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2493
2592
|
const hasInteractedOutsideRef = useRef3(false);
|
|
2494
2593
|
const hasPointerDownOutsideRef = useRef3(false);
|
|
2495
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ React30.createElement(PopoverContentImpl, {
|
|
2496
2595
|
...props,
|
|
2497
2596
|
ref: forwardedRef,
|
|
2498
2597
|
trapFocus: false,
|
|
@@ -2532,14 +2631,15 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2532
2631
|
const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
|
|
2533
2632
|
const popperScope = usePopperScope(__scopePopover);
|
|
2534
2633
|
const { tx } = useThemeContext();
|
|
2634
|
+
const elevation = useElevationContext();
|
|
2535
2635
|
useFocusGuards();
|
|
2536
|
-
return /* @__PURE__ */
|
|
2636
|
+
return /* @__PURE__ */ React30.createElement(FocusScope, {
|
|
2537
2637
|
asChild: true,
|
|
2538
2638
|
loop: true,
|
|
2539
2639
|
trapped: trapFocus,
|
|
2540
2640
|
onMountAutoFocus: onOpenAutoFocus,
|
|
2541
2641
|
onUnmountAutoFocus: onCloseAutoFocus
|
|
2542
|
-
}, /* @__PURE__ */
|
|
2642
|
+
}, /* @__PURE__ */ React30.createElement(DismissableLayer, {
|
|
2543
2643
|
asChild: true,
|
|
2544
2644
|
disableOutsidePointerEvents,
|
|
2545
2645
|
onInteractOutside,
|
|
@@ -2547,13 +2647,15 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2547
2647
|
onPointerDownOutside,
|
|
2548
2648
|
onFocusOutside,
|
|
2549
2649
|
onDismiss: () => context.onOpenChange(false)
|
|
2550
|
-
}, /* @__PURE__ */
|
|
2650
|
+
}, /* @__PURE__ */ React30.createElement(PopperPrimitive.Content, {
|
|
2551
2651
|
"data-state": getState(context.open),
|
|
2552
2652
|
role: "dialog",
|
|
2553
2653
|
id: context.contentId,
|
|
2554
2654
|
...popperScope,
|
|
2555
2655
|
...contentProps,
|
|
2556
|
-
className: tx("popover.content", "popover", {
|
|
2656
|
+
className: tx("popover.content", "popover", {
|
|
2657
|
+
elevation
|
|
2658
|
+
}, classNames),
|
|
2557
2659
|
ref: forwardedRef,
|
|
2558
2660
|
style: {
|
|
2559
2661
|
...contentProps.style,
|
|
@@ -2572,7 +2674,7 @@ var CLOSE_NAME = "PopoverClose";
|
|
|
2572
2674
|
var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2573
2675
|
const { __scopePopover, ...closeProps } = props;
|
|
2574
2676
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
2575
|
-
return /* @__PURE__ */
|
|
2677
|
+
return /* @__PURE__ */ React30.createElement(Primitive11.button, {
|
|
2576
2678
|
type: "button",
|
|
2577
2679
|
...closeProps,
|
|
2578
2680
|
ref: forwardedRef,
|
|
@@ -2585,7 +2687,7 @@ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2585
2687
|
const { __scopePopover, classNames, ...arrowProps } = props;
|
|
2586
2688
|
const popperScope = usePopperScope(__scopePopover);
|
|
2587
2689
|
const { tx } = useThemeContext();
|
|
2588
|
-
return /* @__PURE__ */
|
|
2690
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Arrow, {
|
|
2589
2691
|
...popperScope,
|
|
2590
2692
|
...arrowProps,
|
|
2591
2693
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
@@ -2596,7 +2698,7 @@ PopoverArrow.displayName = ARROW_NAME2;
|
|
|
2596
2698
|
var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
2597
2699
|
const { tx } = useThemeContext();
|
|
2598
2700
|
const Root5 = asChild ? Slot12 : Primitive11.div;
|
|
2599
|
-
return /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ React30.createElement(Root5, {
|
|
2600
2702
|
...props,
|
|
2601
2703
|
className: tx("popover.viewport", "popover__viewport", {
|
|
2602
2704
|
constrainInline,
|
|
@@ -2619,10 +2721,10 @@ var Popover = {
|
|
|
2619
2721
|
};
|
|
2620
2722
|
|
|
2621
2723
|
// packages/ui/react-ui/src/components/Status/Status.tsx
|
|
2622
|
-
import
|
|
2724
|
+
import React31, { forwardRef as forwardRef23 } from "react";
|
|
2623
2725
|
var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
|
|
2624
2726
|
const { tx } = useThemeContext();
|
|
2625
|
-
return /* @__PURE__ */
|
|
2727
|
+
return /* @__PURE__ */ React31.createElement("span", {
|
|
2626
2728
|
role: "status",
|
|
2627
2729
|
...props,
|
|
2628
2730
|
className: tx("status.root", "status", {
|
|
@@ -2630,7 +2732,7 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
|
|
|
2630
2732
|
variant
|
|
2631
2733
|
}, classNames),
|
|
2632
2734
|
ref: forwardedRef
|
|
2633
|
-
}, /* @__PURE__ */
|
|
2735
|
+
}, /* @__PURE__ */ React31.createElement("span", {
|
|
2634
2736
|
role: "none",
|
|
2635
2737
|
className: tx("status.bar", "status__bar", {
|
|
2636
2738
|
indeterminate,
|
|
@@ -2646,10 +2748,10 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
|
|
|
2646
2748
|
|
|
2647
2749
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
2648
2750
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
2649
|
-
import
|
|
2751
|
+
import React32, { forwardRef as forwardRef24 } from "react";
|
|
2650
2752
|
var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2651
2753
|
const { tx } = useThemeContext();
|
|
2652
|
-
return /* @__PURE__ */
|
|
2754
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveRoot, {
|
|
2653
2755
|
...props,
|
|
2654
2756
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
2655
2757
|
ref: forwardedRef
|
|
@@ -2657,7 +2759,7 @@ var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, for
|
|
|
2657
2759
|
});
|
|
2658
2760
|
var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2659
2761
|
const { tx } = useThemeContext();
|
|
2660
|
-
return /* @__PURE__ */
|
|
2762
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveViewport, {
|
|
2661
2763
|
...props,
|
|
2662
2764
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
2663
2765
|
ref: forwardedRef
|
|
@@ -2665,7 +2767,7 @@ var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props },
|
|
|
2665
2767
|
});
|
|
2666
2768
|
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant = "fine", ...props }, forwardedRef) => {
|
|
2667
2769
|
const { tx } = useThemeContext();
|
|
2668
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
2669
2771
|
"data-variant": variant,
|
|
2670
2772
|
...props,
|
|
2671
2773
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
@@ -2674,7 +2776,7 @@ var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant =
|
|
|
2674
2776
|
});
|
|
2675
2777
|
var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2676
2778
|
const { tx } = useThemeContext();
|
|
2677
|
-
return /* @__PURE__ */
|
|
2779
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveThumb, {
|
|
2678
2780
|
...props,
|
|
2679
2781
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
2680
2782
|
ref: forwardedRef
|
|
@@ -2682,7 +2784,7 @@ var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, fo
|
|
|
2682
2784
|
});
|
|
2683
2785
|
var ScrollAreaCorner = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2684
2786
|
const { tx } = useThemeContext();
|
|
2685
|
-
return /* @__PURE__ */
|
|
2787
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveCorner, {
|
|
2686
2788
|
...props,
|
|
2687
2789
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
2688
2790
|
ref: forwardedRef
|
|
@@ -2699,7 +2801,7 @@ var ScrollArea = {
|
|
|
2699
2801
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
2700
2802
|
import { CaretDown as CaretDown2, CaretUp } from "@phosphor-icons/react";
|
|
2701
2803
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2702
|
-
import
|
|
2804
|
+
import React33, { forwardRef as forwardRef25 } from "react";
|
|
2703
2805
|
var SelectRoot = SelectPrimitive.Root;
|
|
2704
2806
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
2705
2807
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -2707,52 +2809,55 @@ var SelectIcon = SelectPrimitive.Icon;
|
|
|
2707
2809
|
var SelectPortal = SelectPrimitive.Portal;
|
|
2708
2810
|
var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
|
|
2709
2811
|
const { tx } = useThemeContext();
|
|
2710
|
-
return /* @__PURE__ */
|
|
2812
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Trigger, {
|
|
2711
2813
|
asChild: true,
|
|
2712
2814
|
ref: forwardedRef
|
|
2713
|
-
}, /* @__PURE__ */
|
|
2815
|
+
}, /* @__PURE__ */ React33.createElement(Button, props, /* @__PURE__ */ React33.createElement(SelectPrimitive.Value, {
|
|
2714
2816
|
placeholder
|
|
2715
|
-
}, children), /* @__PURE__ */
|
|
2817
|
+
}, children), /* @__PURE__ */ React33.createElement("span", {
|
|
2716
2818
|
className: "w-1 flex-1"
|
|
2717
|
-
}), /* @__PURE__ */
|
|
2819
|
+
}), /* @__PURE__ */ React33.createElement(SelectPrimitive.Icon, {
|
|
2718
2820
|
asChild: true
|
|
2719
|
-
}, /* @__PURE__ */
|
|
2821
|
+
}, /* @__PURE__ */ React33.createElement(CaretDown2, {
|
|
2720
2822
|
className: tx("select.triggerIcon", "select__trigger__icon", {}),
|
|
2721
2823
|
weight: "bold"
|
|
2722
2824
|
}))));
|
|
2723
2825
|
});
|
|
2724
2826
|
var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2725
2827
|
const { tx } = useThemeContext();
|
|
2726
|
-
|
|
2828
|
+
const elevation = useElevationContext();
|
|
2829
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Content, {
|
|
2727
2830
|
...props,
|
|
2728
|
-
className: tx("select.content", "select__content", {
|
|
2831
|
+
className: tx("select.content", "select__content", {
|
|
2832
|
+
elevation
|
|
2833
|
+
}, classNames),
|
|
2729
2834
|
position: "popper",
|
|
2730
2835
|
ref: forwardedRef
|
|
2731
2836
|
}, children);
|
|
2732
2837
|
});
|
|
2733
2838
|
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2734
2839
|
const { tx } = useThemeContext();
|
|
2735
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
2736
2841
|
...props,
|
|
2737
2842
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
2738
2843
|
ref: forwardedRef
|
|
2739
|
-
}, children ?? /* @__PURE__ */
|
|
2844
|
+
}, children ?? /* @__PURE__ */ React33.createElement(CaretUp, {
|
|
2740
2845
|
weight: "bold"
|
|
2741
2846
|
}));
|
|
2742
2847
|
});
|
|
2743
2848
|
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2744
2849
|
const { tx } = useThemeContext();
|
|
2745
|
-
return /* @__PURE__ */
|
|
2850
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
2746
2851
|
...props,
|
|
2747
2852
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
2748
2853
|
ref: forwardedRef
|
|
2749
|
-
}, children ?? /* @__PURE__ */
|
|
2854
|
+
}, children ?? /* @__PURE__ */ React33.createElement(CaretDown2, {
|
|
2750
2855
|
weight: "bold"
|
|
2751
2856
|
}));
|
|
2752
2857
|
});
|
|
2753
2858
|
var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
2754
2859
|
const { tx } = useThemeContext();
|
|
2755
|
-
return /* @__PURE__ */
|
|
2860
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectViewport, {
|
|
2756
2861
|
...props,
|
|
2757
2862
|
className: tx("select.viewport", "select__viewport", {}, classNames),
|
|
2758
2863
|
ref: forwardedRef
|
|
@@ -2760,7 +2865,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, child
|
|
|
2760
2865
|
});
|
|
2761
2866
|
var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2762
2867
|
const { tx } = useThemeContext();
|
|
2763
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
|
|
2764
2869
|
...props,
|
|
2765
2870
|
className: tx("select.item", "option", {}, classNames),
|
|
2766
2871
|
ref: forwardedRef
|
|
@@ -2769,7 +2874,7 @@ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forward
|
|
|
2769
2874
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
2770
2875
|
var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2771
2876
|
const { tx } = useThemeContext();
|
|
2772
|
-
return /* @__PURE__ */
|
|
2877
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemIndicator, {
|
|
2773
2878
|
...props,
|
|
2774
2879
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
2775
2880
|
ref: forwardedRef
|
|
@@ -2777,13 +2882,13 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children,
|
|
|
2777
2882
|
});
|
|
2778
2883
|
var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
|
|
2779
2884
|
const { tx } = useThemeContext();
|
|
2780
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
|
|
2781
2886
|
...props,
|
|
2782
2887
|
className: tx("select.item", "option", {}, classNames),
|
|
2783
2888
|
ref: forwardedRef
|
|
2784
|
-
}, /* @__PURE__ */
|
|
2889
|
+
}, /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React33.createElement("span", {
|
|
2785
2890
|
className: "grow w-1"
|
|
2786
|
-
}), /* @__PURE__ */
|
|
2891
|
+
}), /* @__PURE__ */ React33.createElement(Icon, {
|
|
2787
2892
|
icon: "ph--check--regular"
|
|
2788
2893
|
}));
|
|
2789
2894
|
});
|
|
@@ -2791,7 +2896,7 @@ var SelectGroup = SelectPrimitive.Group;
|
|
|
2791
2896
|
var SelectLabel = SelectPrimitive.Label;
|
|
2792
2897
|
var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2793
2898
|
const { tx } = useThemeContext();
|
|
2794
|
-
return /* @__PURE__ */
|
|
2899
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Separator, {
|
|
2795
2900
|
...props,
|
|
2796
2901
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
2797
2902
|
ref: forwardedRef
|
|
@@ -2799,7 +2904,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, fo
|
|
|
2799
2904
|
});
|
|
2800
2905
|
var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2801
2906
|
const { tx } = useThemeContext();
|
|
2802
|
-
return /* @__PURE__ */
|
|
2907
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Arrow, {
|
|
2803
2908
|
...props,
|
|
2804
2909
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
2805
2910
|
ref: forwardedRef
|
|
@@ -2828,10 +2933,10 @@ var Select = {
|
|
|
2828
2933
|
|
|
2829
2934
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
2830
2935
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
2831
|
-
import
|
|
2936
|
+
import React34 from "react";
|
|
2832
2937
|
var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
2833
2938
|
const { tx } = useThemeContext();
|
|
2834
|
-
return /* @__PURE__ */
|
|
2939
|
+
return /* @__PURE__ */ React34.createElement(SeparatorPrimitive, {
|
|
2835
2940
|
orientation,
|
|
2836
2941
|
...props,
|
|
2837
2942
|
className: tx("separator.root", "separator", {
|
|
@@ -2843,11 +2948,11 @@ var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
2843
2948
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
2844
2949
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2845
2950
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2846
|
-
import
|
|
2951
|
+
import React35, { forwardRef as forwardRef26 } from "react";
|
|
2847
2952
|
var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2848
2953
|
const { tx } = useThemeContext();
|
|
2849
2954
|
const Root5 = asChild ? Slot13 : Primitive12.span;
|
|
2850
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ React35.createElement(Root5, {
|
|
2851
2956
|
...props,
|
|
2852
2957
|
className: tx("tag.root", "tag", {
|
|
2853
2958
|
palette
|
|
@@ -2860,29 +2965,29 @@ var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props
|
|
|
2860
2965
|
import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
|
|
2861
2966
|
import { Slot as Slot14 } from "@radix-ui/react-slot";
|
|
2862
2967
|
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";
|
|
2863
|
-
import
|
|
2968
|
+
import React36, { forwardRef as forwardRef27 } from "react";
|
|
2864
2969
|
var ToastProvider = ToastProviderPrimitive;
|
|
2865
2970
|
var ToastViewport = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2866
2971
|
const { tx } = useThemeContext();
|
|
2867
|
-
return /* @__PURE__ */
|
|
2972
|
+
return /* @__PURE__ */ React36.createElement(ToastViewportPrimitive, {
|
|
2868
2973
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
2869
2974
|
ref: forwardedRef
|
|
2870
2975
|
});
|
|
2871
2976
|
});
|
|
2872
2977
|
var ToastRoot = /* @__PURE__ */ forwardRef27(({ classNames, children, ...props }, forwardedRef) => {
|
|
2873
2978
|
const { tx } = useThemeContext();
|
|
2874
|
-
return /* @__PURE__ */
|
|
2979
|
+
return /* @__PURE__ */ React36.createElement(ToastRootPrimitive, {
|
|
2875
2980
|
...props,
|
|
2876
2981
|
className: tx("toast.root", "toast", {}, classNames),
|
|
2877
2982
|
ref: forwardedRef
|
|
2878
|
-
}, /* @__PURE__ */
|
|
2879
|
-
elevation: "
|
|
2983
|
+
}, /* @__PURE__ */ React36.createElement(ElevationProvider, {
|
|
2984
|
+
elevation: "toast"
|
|
2880
2985
|
}, children));
|
|
2881
2986
|
});
|
|
2882
2987
|
var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2883
2988
|
const { tx } = useThemeContext();
|
|
2884
2989
|
const Root5 = asChild ? Slot14 : Primitive13.div;
|
|
2885
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2886
2991
|
...props,
|
|
2887
2992
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
2888
2993
|
ref: forwardedRef
|
|
@@ -2891,7 +2996,7 @@ var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props },
|
|
|
2891
2996
|
var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2892
2997
|
const { tx } = useThemeContext();
|
|
2893
2998
|
const Root5 = asChild ? Slot14 : ToastTitlePrimitive;
|
|
2894
|
-
return /* @__PURE__ */
|
|
2999
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2895
3000
|
...props,
|
|
2896
3001
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
2897
3002
|
ref: forwardedRef
|
|
@@ -2900,7 +3005,7 @@ var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }
|
|
|
2900
3005
|
var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2901
3006
|
const { tx } = useThemeContext();
|
|
2902
3007
|
const Root5 = asChild ? Slot14 : ToastDescriptionPrimitive;
|
|
2903
|
-
return /* @__PURE__ */
|
|
3008
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2904
3009
|
...props,
|
|
2905
3010
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
2906
3011
|
ref: forwardedRef
|
|
@@ -2909,7 +3014,7 @@ var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...p
|
|
|
2909
3014
|
var ToastActions = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2910
3015
|
const { tx } = useThemeContext();
|
|
2911
3016
|
const Root5 = asChild ? Slot14 : Primitive13.div;
|
|
2912
|
-
return /* @__PURE__ */
|
|
3017
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2913
3018
|
...props,
|
|
2914
3019
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
2915
3020
|
ref: forwardedRef
|
|
@@ -2931,44 +3036,52 @@ var Toast = {
|
|
|
2931
3036
|
|
|
2932
3037
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
2933
3038
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
2934
|
-
import
|
|
3039
|
+
import React37, { forwardRef as forwardRef28 } from "react";
|
|
2935
3040
|
var ToolbarRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
|
|
2936
3041
|
const { tx } = useThemeContext();
|
|
2937
|
-
return /* @__PURE__ */
|
|
3042
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Root, {
|
|
2938
3043
|
...props,
|
|
2939
3044
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
2940
3045
|
ref: forwardedRef
|
|
2941
3046
|
}, children);
|
|
2942
3047
|
});
|
|
2943
3048
|
var ToolbarButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2944
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
3050
|
+
asChild: true
|
|
3051
|
+
}, /* @__PURE__ */ React37.createElement(Button, {
|
|
3052
|
+
...props,
|
|
3053
|
+
ref: forwardedRef
|
|
3054
|
+
}));
|
|
3055
|
+
});
|
|
3056
|
+
var ToolbarIconButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
3057
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
2945
3058
|
asChild: true
|
|
2946
|
-
}, /* @__PURE__ */
|
|
3059
|
+
}, /* @__PURE__ */ React37.createElement(IconButton, {
|
|
2947
3060
|
...props,
|
|
2948
3061
|
ref: forwardedRef
|
|
2949
3062
|
}));
|
|
2950
3063
|
});
|
|
2951
3064
|
var ToolbarToggle = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2952
|
-
return /* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
2953
3066
|
asChild: true
|
|
2954
|
-
}, /* @__PURE__ */
|
|
3067
|
+
}, /* @__PURE__ */ React37.createElement(Toggle, {
|
|
2955
3068
|
...props,
|
|
2956
3069
|
ref: forwardedRef
|
|
2957
3070
|
}));
|
|
2958
3071
|
});
|
|
2959
3072
|
var ToolbarLink = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2960
|
-
return /* @__PURE__ */
|
|
3073
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Link, {
|
|
2961
3074
|
asChild: true
|
|
2962
|
-
}, /* @__PURE__ */
|
|
3075
|
+
}, /* @__PURE__ */ React37.createElement(Link, {
|
|
2963
3076
|
...props,
|
|
2964
3077
|
ref: forwardedRef
|
|
2965
3078
|
}));
|
|
2966
3079
|
});
|
|
2967
3080
|
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children, elevation, ...props }, forwardedRef) => {
|
|
2968
|
-
return /* @__PURE__ */
|
|
3081
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
2969
3082
|
...props,
|
|
2970
3083
|
asChild: true
|
|
2971
|
-
}, /* @__PURE__ */
|
|
3084
|
+
}, /* @__PURE__ */ React37.createElement(ButtonGroup, {
|
|
2972
3085
|
classNames,
|
|
2973
3086
|
children,
|
|
2974
3087
|
elevation,
|
|
@@ -2976,10 +3089,10 @@ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children,
|
|
|
2976
3089
|
}));
|
|
2977
3090
|
});
|
|
2978
3091
|
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
2979
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
2980
3093
|
...props,
|
|
2981
3094
|
asChild: true
|
|
2982
|
-
}, /* @__PURE__ */
|
|
3095
|
+
}, /* @__PURE__ */ React37.createElement(Button, {
|
|
2983
3096
|
variant,
|
|
2984
3097
|
density,
|
|
2985
3098
|
elevation,
|
|
@@ -2988,26 +3101,38 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, e
|
|
|
2988
3101
|
ref: forwardedRef
|
|
2989
3102
|
}));
|
|
2990
3103
|
});
|
|
2991
|
-
var
|
|
2992
|
-
return /* @__PURE__ */
|
|
3104
|
+
var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef28(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
|
|
3105
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
3106
|
+
...props,
|
|
2993
3107
|
asChild: true
|
|
2994
|
-
}, /* @__PURE__ */
|
|
2995
|
-
|
|
2996
|
-
|
|
3108
|
+
}, /* @__PURE__ */ React37.createElement(IconButton, {
|
|
3109
|
+
variant,
|
|
3110
|
+
density,
|
|
3111
|
+
elevation,
|
|
3112
|
+
classNames,
|
|
3113
|
+
icon,
|
|
3114
|
+
label,
|
|
3115
|
+
iconOnly,
|
|
3116
|
+
ref: forwardedRef
|
|
2997
3117
|
}));
|
|
2998
|
-
};
|
|
2999
|
-
var ToolbarExpander = () => /* @__PURE__ */ React35.createElement("div", {
|
|
3000
|
-
className: "grow"
|
|
3001
3118
|
});
|
|
3119
|
+
var ToolbarSeparator = ({ variant = "line", ...props }) => {
|
|
3120
|
+
return variant === "line" ? /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
|
|
3121
|
+
asChild: true
|
|
3122
|
+
}, /* @__PURE__ */ React37.createElement(Separator4, props)) : /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
|
|
3123
|
+
className: "grow"
|
|
3124
|
+
});
|
|
3125
|
+
};
|
|
3002
3126
|
var Toolbar = {
|
|
3003
3127
|
Root: ToolbarRoot,
|
|
3004
3128
|
Button: ToolbarButton,
|
|
3129
|
+
IconButton: ToolbarIconButton,
|
|
3005
3130
|
Link: ToolbarLink,
|
|
3006
3131
|
Toggle: ToolbarToggle,
|
|
3007
3132
|
ToggleGroup: ToolbarToggleGroup2,
|
|
3008
3133
|
ToggleGroupItem: ToolbarToggleGroupItem,
|
|
3009
|
-
|
|
3010
|
-
|
|
3134
|
+
ToggleGroupIconItem: ToolbarToggleGroupIconItem,
|
|
3135
|
+
Separator: ToolbarSeparator
|
|
3011
3136
|
};
|
|
3012
3137
|
export {
|
|
3013
3138
|
AlertDialog,
|