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