@dxos/react-ui 0.7.4 → 0.7.5-main.9cb18ac
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 +254 -163
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +354 -271
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +254 -163
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +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/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +13 -12
- 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/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
|
@@ -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
|
});
|
|
@@ -745,7 +748,7 @@ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React15.cre
|
|
|
745
748
|
|
|
746
749
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
747
750
|
var ThemeContext = /* @__PURE__ */ createContext7(void 0);
|
|
748
|
-
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine",
|
|
751
|
+
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", ...rest }) => {
|
|
749
752
|
useEffect3(() => {
|
|
750
753
|
if (document.defaultView) {
|
|
751
754
|
const kb = createKeyborg(document.defaultView);
|
|
@@ -765,7 +768,7 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
765
768
|
resourceExtensions,
|
|
766
769
|
appNs
|
|
767
770
|
}, /* @__PURE__ */ React16.createElement(ElevationProvider, {
|
|
768
|
-
elevation:
|
|
771
|
+
elevation: "base"
|
|
769
772
|
}, /* @__PURE__ */ React16.createElement(DensityProvider, {
|
|
770
773
|
density: rootDensity
|
|
771
774
|
}, children))));
|
|
@@ -824,8 +827,7 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
824
827
|
onOpenChange: setOpen
|
|
825
828
|
}, /* @__PURE__ */ React17.createElement(Tooltip.Portal, null, /* @__PURE__ */ React17.createElement(Tooltip.Content, {
|
|
826
829
|
side: "bottom",
|
|
827
|
-
sideOffset: 12
|
|
828
|
-
classNames: "z-30"
|
|
830
|
+
sideOffset: 12
|
|
829
831
|
}, /* @__PURE__ */ React17.createElement("span", null, label), /* @__PURE__ */ React17.createElement(Tooltip.Arrow, null))), /* @__PURE__ */ React17.createElement(Tooltip.Trigger, {
|
|
830
832
|
"aria-label": label,
|
|
831
833
|
...props,
|
|
@@ -856,7 +858,9 @@ var Clipboard = {
|
|
|
856
858
|
import { createContext as createContext8 } from "@radix-ui/react-context";
|
|
857
859
|
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
860
|
import React18, { forwardRef as forwardRef12 } from "react";
|
|
859
|
-
var DialogRoot =
|
|
861
|
+
var DialogRoot = (props) => /* @__PURE__ */ React18.createElement(ElevationProvider, {
|
|
862
|
+
elevation: "dialog"
|
|
863
|
+
}, /* @__PURE__ */ React18.createElement(DialogRootPrimitive, props));
|
|
860
864
|
var DialogTrigger = DialogTriggerPrimitive;
|
|
861
865
|
var DialogPortal = DialogPortalPrimitive;
|
|
862
866
|
var DialogTitle = /* @__PURE__ */ forwardRef12(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
@@ -906,9 +910,7 @@ var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...pro
|
|
|
906
910
|
inOverlayLayout
|
|
907
911
|
}, classNames),
|
|
908
912
|
ref: forwardedRef
|
|
909
|
-
},
|
|
910
|
-
elevation: "chrome"
|
|
911
|
-
}, children));
|
|
913
|
+
}, children);
|
|
912
914
|
});
|
|
913
915
|
DialogContent.displayName = DIALOG_CONTENT_NAME;
|
|
914
916
|
var Dialog = {
|
|
@@ -926,7 +928,9 @@ var Dialog = {
|
|
|
926
928
|
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
929
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
928
930
|
import React19, { forwardRef as forwardRef13 } from "react";
|
|
929
|
-
var AlertDialogRoot =
|
|
931
|
+
var AlertDialogRoot = (props) => /* @__PURE__ */ React19.createElement(ElevationProvider, {
|
|
932
|
+
elevation: "dialog"
|
|
933
|
+
}, /* @__PURE__ */ React19.createElement(AlertDialogRootPrimitive, props));
|
|
930
934
|
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
931
935
|
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
932
936
|
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
@@ -977,9 +981,7 @@ var AlertDialogContent = /* @__PURE__ */ forwardRef13(({ classNames, children, .
|
|
|
977
981
|
inOverlayLayout
|
|
978
982
|
}, classNames),
|
|
979
983
|
ref: forwardedRef
|
|
980
|
-
},
|
|
981
|
-
elevation: "chrome"
|
|
982
|
-
}, children));
|
|
984
|
+
}, children);
|
|
983
985
|
});
|
|
984
986
|
AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
|
|
985
987
|
var AlertDialog = {
|
|
@@ -1004,14 +1006,15 @@ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
|
1004
1006
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
1005
1007
|
var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
|
|
1006
1008
|
const { tx } = useThemeContext();
|
|
1009
|
+
const elevation = useElevationContext();
|
|
1007
1010
|
return /* @__PURE__ */ React20.createElement(ContextMenuPrimitive.Content, {
|
|
1008
1011
|
collisionPadding: 8,
|
|
1009
1012
|
...props,
|
|
1010
|
-
className: tx("menu.content", "menu", {
|
|
1013
|
+
className: tx("menu.content", "menu", {
|
|
1014
|
+
elevation
|
|
1015
|
+
}, classNames),
|
|
1011
1016
|
ref: forwardedRef
|
|
1012
|
-
},
|
|
1013
|
-
elevation: "chrome"
|
|
1014
|
-
}, children));
|
|
1017
|
+
}, children);
|
|
1015
1018
|
});
|
|
1016
1019
|
var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
1017
1020
|
const { tx } = useThemeContext();
|
|
@@ -1216,6 +1219,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
|
|
|
1216
1219
|
const { __scopeDropdownMenu, classNames, ...contentProps } = props;
|
|
1217
1220
|
const { tx } = useThemeContext();
|
|
1218
1221
|
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
1222
|
+
const elevation = useElevationContext();
|
|
1219
1223
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1220
1224
|
const hasInteractedOutsideRef = useRef(false);
|
|
1221
1225
|
return /* @__PURE__ */ React21.createElement(MenuPrimitive.Content, {
|
|
@@ -1239,7 +1243,9 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
|
|
|
1239
1243
|
hasInteractedOutsideRef.current = true;
|
|
1240
1244
|
}
|
|
1241
1245
|
}),
|
|
1242
|
-
className: tx("menu.content", "menu", {
|
|
1246
|
+
className: tx("menu.content", "menu", {
|
|
1247
|
+
elevation
|
|
1248
|
+
}, classNames),
|
|
1243
1249
|
style: {
|
|
1244
1250
|
...props.style,
|
|
1245
1251
|
// re-namespace exposed content custom properties
|
|
@@ -1433,11 +1439,9 @@ var DropdownMenu = {
|
|
|
1433
1439
|
var useDropdownMenuMenuScope = useMenuScope;
|
|
1434
1440
|
|
|
1435
1441
|
// 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";
|
|
1442
|
+
import { Root as CheckboxPrimitive } from "@radix-ui/react-checkbox";
|
|
1439
1443
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1440
|
-
import React22, { forwardRef as forwardRef16,
|
|
1444
|
+
import React22, { forwardRef as forwardRef16, useCallback as useCallback3 } from "react";
|
|
1441
1445
|
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
1446
|
var Label3 = /* @__PURE__ */ forwardRef16(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1443
1447
|
const { tx } = useThemeContext();
|
|
@@ -1563,7 +1567,6 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
|
|
|
1563
1567
|
});
|
|
1564
1568
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1565
1569
|
const { tx } = useThemeContext();
|
|
1566
|
-
const Icon3 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
1567
1570
|
return /* @__PURE__ */ React22.createElement(CheckboxPrimitive, {
|
|
1568
1571
|
...props,
|
|
1569
1572
|
checked,
|
|
@@ -1578,42 +1581,37 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsCheck
|
|
|
1578
1581
|
size
|
|
1579
1582
|
}, "shrink-0", classNames),
|
|
1580
1583
|
ref: forwardedRef
|
|
1581
|
-
}, /* @__PURE__ */ React22.createElement(
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
size
|
|
1584
|
+
}, /* @__PURE__ */ React22.createElement(Icon, {
|
|
1585
|
+
icon: checked === "indeterminate" ? "ph--minus--regular" : "ph--check--regular",
|
|
1586
|
+
classNames: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
1587
|
+
size,
|
|
1588
|
+
checked
|
|
1587
1589
|
})
|
|
1588
|
-
}))
|
|
1590
|
+
}));
|
|
1589
1591
|
});
|
|
1590
|
-
var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange,
|
|
1591
|
-
const { tx } = useThemeContext();
|
|
1592
|
+
var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, classNames, ...props }, forwardedRef) => {
|
|
1592
1593
|
const [checked, onCheckedChange] = useControllableState2({
|
|
1593
1594
|
prop: propsChecked,
|
|
1594
|
-
defaultProp: propsDefaultChecked,
|
|
1595
|
+
defaultProp: propsDefaultChecked ?? false,
|
|
1595
1596
|
onChange: propsOnCheckedChange
|
|
1596
1597
|
});
|
|
1597
1598
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1598
|
-
return /* @__PURE__ */ React22.createElement(
|
|
1599
|
-
|
|
1599
|
+
return /* @__PURE__ */ React22.createElement("input", {
|
|
1600
|
+
type: "checkbox",
|
|
1601
|
+
className: "ch-checkbox--switch ch-focus-ring",
|
|
1600
1602
|
checked,
|
|
1601
|
-
|
|
1603
|
+
onChange: (event) => {
|
|
1604
|
+
onCheckedChange(event.target.checked);
|
|
1605
|
+
},
|
|
1602
1606
|
id,
|
|
1603
1607
|
"aria-describedby": descriptionId,
|
|
1608
|
+
...props,
|
|
1604
1609
|
...validationValence === "error" && {
|
|
1605
1610
|
"aria-invalid": "true",
|
|
1606
1611
|
"aria-errormessage": errorMessageId
|
|
1607
1612
|
},
|
|
1608
|
-
className: tx("input.switch", "input--switch", {
|
|
1609
|
-
size
|
|
1610
|
-
}, classNames),
|
|
1611
1613
|
ref: forwardedRef
|
|
1612
|
-
}
|
|
1613
|
-
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
1614
|
-
size
|
|
1615
|
-
})
|
|
1616
|
-
}));
|
|
1614
|
+
});
|
|
1617
1615
|
});
|
|
1618
1616
|
var Input = {
|
|
1619
1617
|
Root: InputRoot,
|
|
@@ -1631,14 +1629,54 @@ var Input = {
|
|
|
1631
1629
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1632
1630
|
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1633
1631
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1634
|
-
import
|
|
1632
|
+
import React24, { forwardRef as forwardRef17 } from "react";
|
|
1635
1633
|
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";
|
|
1634
|
+
|
|
1635
|
+
// packages/ui/react-ui/src/components/Lists/ListDropIndicator.tsx
|
|
1636
|
+
import React23 from "react";
|
|
1637
|
+
var edgeToOrientationMap = {
|
|
1638
|
+
top: "horizontal",
|
|
1639
|
+
bottom: "horizontal",
|
|
1640
|
+
left: "vertical",
|
|
1641
|
+
right: "vertical"
|
|
1642
|
+
};
|
|
1643
|
+
var orientationStyles = {
|
|
1644
|
+
horizontal: "h-[--line-thickness] left-[--terminal-radius] right-0 before:left-[--negative-terminal-size]",
|
|
1645
|
+
vertical: "w-[--line-thickness] top-[--terminal-radius] bottom-0 before:top-[--negative-terminal-size]"
|
|
1646
|
+
};
|
|
1647
|
+
var edgeStyles = {
|
|
1648
|
+
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
1649
|
+
right: "right-[--line-offset] before:right-[--offset-terminal]",
|
|
1650
|
+
bottom: "bottom-[--line-offset] before:bottom-[--offset-terminal]",
|
|
1651
|
+
left: "left-[--line-offset] before:left-[--offset-terminal]"
|
|
1652
|
+
};
|
|
1653
|
+
var strokeSize = 2;
|
|
1654
|
+
var terminalSize = 8;
|
|
1655
|
+
var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
1656
|
+
var ListDropIndicator = ({ edge, gap = 0 }) => {
|
|
1657
|
+
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;
|
|
1658
|
+
const orientation = edgeToOrientationMap[edge];
|
|
1659
|
+
return /* @__PURE__ */ React23.createElement("div", {
|
|
1660
|
+
role: "none",
|
|
1661
|
+
style: {
|
|
1662
|
+
"--line-thickness": `${strokeSize}px`,
|
|
1663
|
+
"--line-offset": `${lineOffset}`,
|
|
1664
|
+
"--terminal-size": `${terminalSize}px`,
|
|
1665
|
+
"--terminal-radius": `${terminalSize / 2}px`,
|
|
1666
|
+
"--negative-terminal-size": `-${terminalSize}px`,
|
|
1667
|
+
"--offset-terminal": `${offsetToAlignTerminalWithLine}px`
|
|
1668
|
+
},
|
|
1669
|
+
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]}`
|
|
1670
|
+
});
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1636
1674
|
var List = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1637
1675
|
const { tx } = useThemeContext();
|
|
1638
1676
|
const density = useDensityContext(props.density);
|
|
1639
|
-
return /* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ React24.createElement(DensityProvider, {
|
|
1640
1678
|
density
|
|
1641
|
-
}, /* @__PURE__ */
|
|
1679
|
+
}, /* @__PURE__ */ React24.createElement(ListPrimitive, {
|
|
1642
1680
|
...props,
|
|
1643
1681
|
className: tx("list.root", "list", {}, classNames),
|
|
1644
1682
|
ref: forwardedRef
|
|
@@ -1648,7 +1686,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
|
|
|
1648
1686
|
const Root5 = asChild ? Slot8 : "div";
|
|
1649
1687
|
const density = useDensityContext();
|
|
1650
1688
|
const { tx } = useThemeContext();
|
|
1651
|
-
return /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ React24.createElement(Root5, {
|
|
1652
1690
|
...!asChild && {
|
|
1653
1691
|
role: "none"
|
|
1654
1692
|
},
|
|
@@ -1662,7 +1700,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
|
|
|
1662
1700
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1663
1701
|
const density = useDensityContext();
|
|
1664
1702
|
const { tx } = useThemeContext();
|
|
1665
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ React24.createElement("div", {
|
|
1666
1704
|
role: "none",
|
|
1667
1705
|
...props,
|
|
1668
1706
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1673,7 +1711,7 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1673
1711
|
var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
|
|
1674
1712
|
const { tx } = useThemeContext();
|
|
1675
1713
|
const density = useDensityContext();
|
|
1676
|
-
return /* @__PURE__ */
|
|
1714
|
+
return /* @__PURE__ */ React24.createElement(ListPrimitiveItemHeading, {
|
|
1677
1715
|
...props,
|
|
1678
1716
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1679
1717
|
density
|
|
@@ -1686,13 +1724,13 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
|
|
|
1686
1724
|
const density = useDensityContext();
|
|
1687
1725
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1688
1726
|
const Icon3 = open ? CaretDown : CaretRight;
|
|
1689
|
-
return /* @__PURE__ */
|
|
1727
|
+
return /* @__PURE__ */ React24.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1690
1728
|
...props,
|
|
1691
1729
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1692
1730
|
density
|
|
1693
1731
|
}, classNames),
|
|
1694
1732
|
ref: forwardedRef
|
|
1695
|
-
}, children || /* @__PURE__ */
|
|
1733
|
+
}, children || /* @__PURE__ */ React24.createElement(Icon3, {
|
|
1696
1734
|
weight: "bold",
|
|
1697
1735
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1698
1736
|
}));
|
|
@@ -1700,7 +1738,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
|
|
|
1700
1738
|
var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
|
|
1701
1739
|
const { tx } = useThemeContext();
|
|
1702
1740
|
const density = useDensityContext();
|
|
1703
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ React24.createElement(ListPrimitiveItem, {
|
|
1704
1742
|
...props,
|
|
1705
1743
|
className: tx("list.item.root", "list__listItem", {
|
|
1706
1744
|
density,
|
|
@@ -1715,27 +1753,75 @@ var ListItem = {
|
|
|
1715
1753
|
Heading: ListItemHeading,
|
|
1716
1754
|
OpenTrigger: ListItemOpenTrigger,
|
|
1717
1755
|
CollapsibleContent: ListItemCollapsibleContent,
|
|
1718
|
-
MockOpenTrigger: MockListItemOpenTrigger
|
|
1756
|
+
MockOpenTrigger: MockListItemOpenTrigger,
|
|
1757
|
+
DropIndicator: ListDropIndicator
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1761
|
+
import React26, { forwardRef as forwardRef18 } from "react";
|
|
1762
|
+
|
|
1763
|
+
// packages/ui/react-ui/src/components/Lists/TreeDropIndicator.tsx
|
|
1764
|
+
import React25 from "react";
|
|
1765
|
+
var edgeToOrientationMap2 = {
|
|
1766
|
+
"reorder-above": "sibling",
|
|
1767
|
+
"reorder-below": "sibling",
|
|
1768
|
+
"make-child": "child",
|
|
1769
|
+
reparent: "child"
|
|
1770
|
+
};
|
|
1771
|
+
var orientationStyles2 = {
|
|
1772
|
+
// TODO(wittjosiah): Stop using left/right here.
|
|
1773
|
+
sibling: "bs-[--line-thickness] left-[--horizontal-indent] right-0 bg-accentSurface before:left-[--negative-terminal-size]",
|
|
1774
|
+
child: "is-full block-start-0 block-end-0 border-[length:--line-thickness] before:invisible"
|
|
1775
|
+
};
|
|
1776
|
+
var instructionStyles = {
|
|
1777
|
+
"reorder-above": "block-start-[--line-offset] before:block-start-[--offset-terminal]",
|
|
1778
|
+
"reorder-below": "block-end-[--line-offset] before:block-end-[--offset-terminal]",
|
|
1779
|
+
"make-child": "border-accentSurface",
|
|
1780
|
+
// TODO(wittjosiah): This is not occurring in the current implementation.
|
|
1781
|
+
reparent: ""
|
|
1782
|
+
};
|
|
1783
|
+
var strokeSize2 = 2;
|
|
1784
|
+
var terminalSize2 = 8;
|
|
1785
|
+
var offsetToAlignTerminalWithLine2 = (strokeSize2 - terminalSize2) / 2;
|
|
1786
|
+
var TreeDropIndicator = ({ instruction, gap = 0 }) => {
|
|
1787
|
+
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize2}px))`;
|
|
1788
|
+
const isBlocked = instruction.type === "instruction-blocked";
|
|
1789
|
+
const desiredInstruction = isBlocked ? instruction.desired : instruction;
|
|
1790
|
+
const orientation = edgeToOrientationMap2[desiredInstruction.type];
|
|
1791
|
+
if (isBlocked) {
|
|
1792
|
+
return null;
|
|
1793
|
+
}
|
|
1794
|
+
return /* @__PURE__ */ React25.createElement("div", {
|
|
1795
|
+
style: {
|
|
1796
|
+
"--line-thickness": `${strokeSize2}px`,
|
|
1797
|
+
"--line-offset": `${lineOffset}`,
|
|
1798
|
+
"--terminal-size": `${terminalSize2}px`,
|
|
1799
|
+
"--terminal-radius": `${terminalSize2 / 2}px`,
|
|
1800
|
+
"--negative-terminal-size": `-${terminalSize2}px`,
|
|
1801
|
+
"--offset-terminal": `${offsetToAlignTerminalWithLine2}px`,
|
|
1802
|
+
"--horizontal-indent": `${desiredInstruction.currentLevel * desiredInstruction.indentPerLevel + 4}px`
|
|
1803
|
+
},
|
|
1804
|
+
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]}`
|
|
1805
|
+
});
|
|
1719
1806
|
};
|
|
1720
1807
|
|
|
1721
1808
|
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1722
|
-
import React24, { forwardRef as forwardRef18 } from "react";
|
|
1723
1809
|
var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1724
|
-
return /* @__PURE__ */
|
|
1810
|
+
return /* @__PURE__ */ React26.createElement(List, {
|
|
1725
1811
|
...props,
|
|
1726
1812
|
ref: forwardedRef
|
|
1727
1813
|
});
|
|
1728
1814
|
});
|
|
1729
1815
|
var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
|
|
1730
1816
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1731
|
-
return /* @__PURE__ */
|
|
1817
|
+
return /* @__PURE__ */ React26.createElement(List, {
|
|
1732
1818
|
...props,
|
|
1733
1819
|
"aria-labelledby": headingId,
|
|
1734
1820
|
ref: forwardedRef
|
|
1735
1821
|
});
|
|
1736
1822
|
});
|
|
1737
1823
|
var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1738
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ React26.createElement(ListItem.Root, {
|
|
1739
1825
|
role: "treeitem",
|
|
1740
1826
|
...props,
|
|
1741
1827
|
ref: forwardedRef
|
|
@@ -1754,7 +1840,8 @@ var TreeItem = {
|
|
|
1754
1840
|
Heading: TreeItemHeading,
|
|
1755
1841
|
Body: TreeItemBody,
|
|
1756
1842
|
OpenTrigger: TreeItemOpenTrigger,
|
|
1757
|
-
MockOpenTrigger: MockTreeItemOpenTrigger
|
|
1843
|
+
MockOpenTrigger: MockTreeItemOpenTrigger,
|
|
1844
|
+
DropIndicator: TreeDropIndicator
|
|
1758
1845
|
};
|
|
1759
1846
|
|
|
1760
1847
|
// packages/ui/react-ui/src/components/Lists/Treegrid.tsx
|
|
@@ -1763,7 +1850,7 @@ import { createContextScope as createContextScope2 } from "@radix-ui/react-conte
|
|
|
1763
1850
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1764
1851
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1765
1852
|
import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
|
|
1766
|
-
import
|
|
1853
|
+
import React27, { forwardRef as forwardRef19 } from "react";
|
|
1767
1854
|
var TREEGRID_ROW_NAME = "TreegridRow";
|
|
1768
1855
|
var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
|
|
1769
1856
|
var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
|
|
@@ -1777,7 +1864,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef19(({ asChild, classNames, children
|
|
|
1777
1864
|
tabbable: false,
|
|
1778
1865
|
circular: true
|
|
1779
1866
|
});
|
|
1780
|
-
return /* @__PURE__ */
|
|
1867
|
+
return /* @__PURE__ */ React27.createElement(Root5, {
|
|
1781
1868
|
role: "treegrid",
|
|
1782
1869
|
...arrowNavigationAttrs,
|
|
1783
1870
|
...props,
|
|
@@ -1808,11 +1895,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
|
|
|
1808
1895
|
circular: false,
|
|
1809
1896
|
memorizeCurrent: false
|
|
1810
1897
|
});
|
|
1811
|
-
return /* @__PURE__ */
|
|
1898
|
+
return /* @__PURE__ */ React27.createElement(TreegridRowProvider, {
|
|
1812
1899
|
open,
|
|
1813
1900
|
onOpenChange,
|
|
1814
1901
|
scope: __treegridRowScope
|
|
1815
|
-
}, /* @__PURE__ */
|
|
1902
|
+
}, /* @__PURE__ */ React27.createElement(Root5, {
|
|
1816
1903
|
role: "row",
|
|
1817
1904
|
"aria-level": level,
|
|
1818
1905
|
className: tx("treegrid.row", "treegrid__row", {
|
|
@@ -1827,7 +1914,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
|
|
|
1827
1914
|
...props,
|
|
1828
1915
|
id,
|
|
1829
1916
|
ref: forwardedRef
|
|
1830
|
-
}, /* @__PURE__ */
|
|
1917
|
+
}, /* @__PURE__ */ React27.createElement("div", {
|
|
1831
1918
|
role: "none",
|
|
1832
1919
|
className: "contents",
|
|
1833
1920
|
...arrowGroupAttrs
|
|
@@ -1835,7 +1922,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
|
|
|
1835
1922
|
});
|
|
1836
1923
|
var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
|
|
1837
1924
|
const { tx } = useThemeContext();
|
|
1838
|
-
return /* @__PURE__ */
|
|
1925
|
+
return /* @__PURE__ */ React27.createElement("div", {
|
|
1839
1926
|
role: "gridcell",
|
|
1840
1927
|
className: tx("treegrid.cell", "treegrid__cell", {
|
|
1841
1928
|
indent
|
|
@@ -1862,7 +1949,7 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1862
1949
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1863
1950
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1864
1951
|
import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
|
|
1865
|
-
import
|
|
1952
|
+
import React28, { forwardRef as forwardRef20, useCallback as useCallback5, useEffect as useEffect6, useRef as useRef2, useState as useState6 } from "react";
|
|
1866
1953
|
import { log } from "@dxos/log";
|
|
1867
1954
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1868
1955
|
|
|
@@ -2005,7 +2092,7 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
|
2005
2092
|
setNavigationSidebarOpen: (nextOpen) => {
|
|
2006
2093
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2007
2094
|
F: __dxlog_file,
|
|
2008
|
-
L:
|
|
2095
|
+
L: 80,
|
|
2009
2096
|
S: void 0,
|
|
2010
2097
|
C: (f, a) => f(...a)
|
|
2011
2098
|
});
|
|
@@ -2014,7 +2101,7 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
|
2014
2101
|
setComplementarySidebarOpen: (nextOpen) => {
|
|
2015
2102
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2016
2103
|
F: __dxlog_file,
|
|
2017
|
-
L:
|
|
2104
|
+
L: 85,
|
|
2018
2105
|
S: void 0,
|
|
2019
2106
|
C: (f, a) => f(...a)
|
|
2020
2107
|
});
|
|
@@ -2082,7 +2169,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
2082
2169
|
}, [
|
|
2083
2170
|
handleResize
|
|
2084
2171
|
]);
|
|
2085
|
-
return /* @__PURE__ */
|
|
2172
|
+
return /* @__PURE__ */ React28.createElement(MainProvider, {
|
|
2086
2173
|
...props,
|
|
2087
2174
|
navigationSidebarOpen,
|
|
2088
2175
|
setNavigationSidebarOpen,
|
|
@@ -2114,10 +2201,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2114
2201
|
props.onKeyDown
|
|
2115
2202
|
]);
|
|
2116
2203
|
const Root5 = isLg ? Primitive9.div : DialogContent2;
|
|
2117
|
-
return /* @__PURE__ */
|
|
2204
|
+
return /* @__PURE__ */ React28.createElement(DialogRoot2, {
|
|
2118
2205
|
open,
|
|
2119
2206
|
modal: false
|
|
2120
|
-
}, /* @__PURE__ */
|
|
2207
|
+
}, /* @__PURE__ */ React28.createElement(Root5, {
|
|
2121
2208
|
...!isLg && {
|
|
2122
2209
|
forceMount: true,
|
|
2123
2210
|
tabIndex: -1,
|
|
@@ -2133,14 +2220,12 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2133
2220
|
inert: "true"
|
|
2134
2221
|
},
|
|
2135
2222
|
ref
|
|
2136
|
-
},
|
|
2137
|
-
elevation: "group"
|
|
2138
|
-
}, children)));
|
|
2223
|
+
}, children));
|
|
2139
2224
|
});
|
|
2140
2225
|
var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
2141
2226
|
const { navigationSidebarOpen, setNavigationSidebarOpen, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
2142
2227
|
const mover = useLandmarkMover(props.onKeyDown, "0");
|
|
2143
|
-
return /* @__PURE__ */
|
|
2228
|
+
return /* @__PURE__ */ React28.createElement(MainSidebar, {
|
|
2144
2229
|
...mover,
|
|
2145
2230
|
...props,
|
|
2146
2231
|
open: navigationSidebarOpen,
|
|
@@ -2154,7 +2239,7 @@ MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
|
2154
2239
|
var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
2155
2240
|
const { complementarySidebarOpen, setComplementarySidebarOpen, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
2156
2241
|
const mover = useLandmarkMover(props.onKeyDown, "2");
|
|
2157
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ React28.createElement(MainSidebar, {
|
|
2158
2243
|
...mover,
|
|
2159
2244
|
...props,
|
|
2160
2245
|
open: complementarySidebarOpen,
|
|
@@ -2170,7 +2255,7 @@ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, h
|
|
|
2170
2255
|
const { tx } = useThemeContext();
|
|
2171
2256
|
const Root5 = asChild ? Slot10 : role ? "div" : "main";
|
|
2172
2257
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
2173
|
-
return /* @__PURE__ */
|
|
2258
|
+
return /* @__PURE__ */ React28.createElement(Root5, {
|
|
2174
2259
|
role,
|
|
2175
2260
|
...handlesFocus && {
|
|
2176
2261
|
...mover
|
|
@@ -2192,7 +2277,7 @@ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwar
|
|
|
2192
2277
|
});
|
|
2193
2278
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
2194
2279
|
const { tx } = useThemeContext();
|
|
2195
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
|
2196
2281
|
onClick: () => {
|
|
2197
2282
|
setNavigationSidebarOpen(false);
|
|
2198
2283
|
setComplementarySidebarOpen(false);
|
|
@@ -2223,7 +2308,7 @@ var MainNotch = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwarde
|
|
|
2223
2308
|
props?.onKeyDown
|
|
2224
2309
|
]);
|
|
2225
2310
|
const mover = useLandmarkMover(handleKeyDown, "3");
|
|
2226
|
-
return /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
|
2227
2312
|
role: "toolbar",
|
|
2228
2313
|
...mover,
|
|
2229
2314
|
...props,
|
|
@@ -2245,7 +2330,7 @@ var Main = {
|
|
|
2245
2330
|
import { createContext as createContext11 } from "@radix-ui/react-context";
|
|
2246
2331
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
2247
2332
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
2248
|
-
import
|
|
2333
|
+
import React29, { forwardRef as forwardRef21 } from "react";
|
|
2249
2334
|
import { useId as useId4 } from "@dxos/react-hooks";
|
|
2250
2335
|
var MESSAGE_NAME = "Message";
|
|
2251
2336
|
var [MessageProvider, useMessageContext] = createContext11(MESSAGE_NAME);
|
|
@@ -2255,10 +2340,10 @@ var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence, elevation: p
|
|
|
2255
2340
|
const descriptionId = useId4("message__description", propsDescriptionId);
|
|
2256
2341
|
const elevation = useElevationContext(propsElevation);
|
|
2257
2342
|
const Root5 = asChild ? Slot11 : Primitive10.div;
|
|
2258
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ React29.createElement(MessageProvider, {
|
|
2259
2344
|
titleId,
|
|
2260
2345
|
descriptionId
|
|
2261
|
-
}, /* @__PURE__ */
|
|
2346
|
+
}, /* @__PURE__ */ React29.createElement(Root5, {
|
|
2262
2347
|
...props,
|
|
2263
2348
|
className: tx("message.root", "message", {
|
|
2264
2349
|
valence,
|
|
@@ -2275,7 +2360,7 @@ var MessageTitle = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
|
|
|
2275
2360
|
const { tx } = useThemeContext();
|
|
2276
2361
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
2277
2362
|
const Root5 = asChild ? Slot11 : Primitive10.h2;
|
|
2278
|
-
return /* @__PURE__ */
|
|
2363
|
+
return /* @__PURE__ */ React29.createElement(Root5, {
|
|
2279
2364
|
...props,
|
|
2280
2365
|
className: tx("message.title", "message__title", {}, className),
|
|
2281
2366
|
id: titleId,
|
|
@@ -2288,7 +2373,7 @@ var MessageBody = /* @__PURE__ */ forwardRef21(({ asChild, className, children,
|
|
|
2288
2373
|
const { tx } = useThemeContext();
|
|
2289
2374
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
2290
2375
|
const Root5 = asChild ? Slot11 : Primitive10.p;
|
|
2291
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ React29.createElement(Root5, {
|
|
2292
2377
|
...props,
|
|
2293
2378
|
className: tx("message.body", "message__body", {}, className),
|
|
2294
2379
|
id: descriptionId,
|
|
@@ -2318,7 +2403,7 @@ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
|
|
|
2318
2403
|
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
2319
2404
|
import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
|
|
2320
2405
|
import { hideOthers } from "aria-hidden";
|
|
2321
|
-
import
|
|
2406
|
+
import React30, { forwardRef as forwardRef22, useRef as useRef3, useCallback as useCallback6, useState as useState7, useEffect as useEffect7 } from "react";
|
|
2322
2407
|
import { RemoveScroll } from "react-remove-scroll";
|
|
2323
2408
|
var POPOVER_NAME = "Popover";
|
|
2324
2409
|
var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
|
|
@@ -2336,7 +2421,7 @@ var PopoverRoot = (props) => {
|
|
|
2336
2421
|
defaultProp: defaultOpen,
|
|
2337
2422
|
onChange: onOpenChange
|
|
2338
2423
|
});
|
|
2339
|
-
return /* @__PURE__ */
|
|
2424
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React30.createElement(PopoverProvider, {
|
|
2340
2425
|
scope: __scopePopover,
|
|
2341
2426
|
contentId: useId5(),
|
|
2342
2427
|
triggerRef,
|
|
@@ -2365,7 +2450,7 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2365
2450
|
onCustomAnchorAdd,
|
|
2366
2451
|
onCustomAnchorRemove
|
|
2367
2452
|
]);
|
|
2368
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
|
|
2369
2454
|
...popperScope,
|
|
2370
2455
|
...anchorProps,
|
|
2371
2456
|
ref: forwardedRef
|
|
@@ -2378,7 +2463,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2378
2463
|
const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
|
|
2379
2464
|
const popperScope = usePopperScope(__scopePopover);
|
|
2380
2465
|
const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
|
|
2381
|
-
const trigger = /* @__PURE__ */
|
|
2466
|
+
const trigger = /* @__PURE__ */ React30.createElement(Primitive11.button, {
|
|
2382
2467
|
type: "button",
|
|
2383
2468
|
"aria-haspopup": "dialog",
|
|
2384
2469
|
"aria-expanded": context.open,
|
|
@@ -2388,7 +2473,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2388
2473
|
ref: composedTriggerRef,
|
|
2389
2474
|
onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
|
|
2390
2475
|
});
|
|
2391
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */
|
|
2476
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
|
|
2392
2477
|
asChild: true,
|
|
2393
2478
|
...popperScope
|
|
2394
2479
|
}, trigger);
|
|
@@ -2404,7 +2489,7 @@ var PopoverVirtualTrigger = (props) => {
|
|
|
2404
2489
|
context.triggerRef.current = virtualRef.current;
|
|
2405
2490
|
}
|
|
2406
2491
|
});
|
|
2407
|
-
return /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Anchor, {
|
|
2408
2493
|
...popperScope,
|
|
2409
2494
|
virtualRef
|
|
2410
2495
|
});
|
|
@@ -2417,12 +2502,12 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
|
|
|
2417
2502
|
var PopoverPortal = (props) => {
|
|
2418
2503
|
const { __scopePopover, forceMount, children, container } = props;
|
|
2419
2504
|
const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
|
|
2420
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ React30.createElement(PortalProvider, {
|
|
2421
2506
|
scope: __scopePopover,
|
|
2422
2507
|
forceMount
|
|
2423
|
-
}, /* @__PURE__ */
|
|
2508
|
+
}, /* @__PURE__ */ React30.createElement(Presence, {
|
|
2424
2509
|
present: forceMount || context.open
|
|
2425
|
-
}, /* @__PURE__ */
|
|
2510
|
+
}, /* @__PURE__ */ React30.createElement(PortalPrimitive, {
|
|
2426
2511
|
asChild: true,
|
|
2427
2512
|
container
|
|
2428
2513
|
}, children)));
|
|
@@ -2433,12 +2518,12 @@ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2433
2518
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
|
|
2434
2519
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
2435
2520
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2436
|
-
return /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ React30.createElement(Presence, {
|
|
2437
2522
|
present: forceMount || context.open
|
|
2438
|
-
}, context.modal ? /* @__PURE__ */
|
|
2523
|
+
}, context.modal ? /* @__PURE__ */ React30.createElement(PopoverContentModal, {
|
|
2439
2524
|
...contentProps,
|
|
2440
2525
|
ref: forwardedRef
|
|
2441
|
-
}) : /* @__PURE__ */
|
|
2526
|
+
}) : /* @__PURE__ */ React30.createElement(PopoverContentNonModal, {
|
|
2442
2527
|
...contentProps,
|
|
2443
2528
|
ref: forwardedRef
|
|
2444
2529
|
}));
|
|
@@ -2455,10 +2540,10 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) =>
|
|
|
2455
2540
|
return hideOthers(content);
|
|
2456
2541
|
}
|
|
2457
2542
|
}, []);
|
|
2458
|
-
return /* @__PURE__ */
|
|
2543
|
+
return /* @__PURE__ */ React30.createElement(RemoveScroll, {
|
|
2459
2544
|
as: Slot12,
|
|
2460
2545
|
allowPinchZoom: true
|
|
2461
|
-
}, /* @__PURE__ */
|
|
2546
|
+
}, /* @__PURE__ */ React30.createElement(PopoverContentImpl, {
|
|
2462
2547
|
...props,
|
|
2463
2548
|
ref: composedRefs,
|
|
2464
2549
|
// we make sure we're not trapping once it's been closed
|
|
@@ -2490,7 +2575,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef)
|
|
|
2490
2575
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
2491
2576
|
const hasInteractedOutsideRef = useRef3(false);
|
|
2492
2577
|
const hasPointerDownOutsideRef = useRef3(false);
|
|
2493
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ React30.createElement(PopoverContentImpl, {
|
|
2494
2579
|
...props,
|
|
2495
2580
|
ref: forwardedRef,
|
|
2496
2581
|
trapFocus: false,
|
|
@@ -2530,14 +2615,15 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2530
2615
|
const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
|
|
2531
2616
|
const popperScope = usePopperScope(__scopePopover);
|
|
2532
2617
|
const { tx } = useThemeContext();
|
|
2618
|
+
const elevation = useElevationContext();
|
|
2533
2619
|
useFocusGuards();
|
|
2534
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ React30.createElement(FocusScope, {
|
|
2535
2621
|
asChild: true,
|
|
2536
2622
|
loop: true,
|
|
2537
2623
|
trapped: trapFocus,
|
|
2538
2624
|
onMountAutoFocus: onOpenAutoFocus,
|
|
2539
2625
|
onUnmountAutoFocus: onCloseAutoFocus
|
|
2540
|
-
}, /* @__PURE__ */
|
|
2626
|
+
}, /* @__PURE__ */ React30.createElement(DismissableLayer, {
|
|
2541
2627
|
asChild: true,
|
|
2542
2628
|
disableOutsidePointerEvents,
|
|
2543
2629
|
onInteractOutside,
|
|
@@ -2545,13 +2631,15 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2545
2631
|
onPointerDownOutside,
|
|
2546
2632
|
onFocusOutside,
|
|
2547
2633
|
onDismiss: () => context.onOpenChange(false)
|
|
2548
|
-
}, /* @__PURE__ */
|
|
2634
|
+
}, /* @__PURE__ */ React30.createElement(PopperPrimitive.Content, {
|
|
2549
2635
|
"data-state": getState(context.open),
|
|
2550
2636
|
role: "dialog",
|
|
2551
2637
|
id: context.contentId,
|
|
2552
2638
|
...popperScope,
|
|
2553
2639
|
...contentProps,
|
|
2554
|
-
className: tx("popover.content", "popover", {
|
|
2640
|
+
className: tx("popover.content", "popover", {
|
|
2641
|
+
elevation
|
|
2642
|
+
}, classNames),
|
|
2555
2643
|
ref: forwardedRef,
|
|
2556
2644
|
style: {
|
|
2557
2645
|
...contentProps.style,
|
|
@@ -2570,7 +2658,7 @@ var CLOSE_NAME = "PopoverClose";
|
|
|
2570
2658
|
var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
2571
2659
|
const { __scopePopover, ...closeProps } = props;
|
|
2572
2660
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
2573
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ React30.createElement(Primitive11.button, {
|
|
2574
2662
|
type: "button",
|
|
2575
2663
|
...closeProps,
|
|
2576
2664
|
ref: forwardedRef,
|
|
@@ -2583,7 +2671,7 @@ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
|
|
|
2583
2671
|
const { __scopePopover, classNames, ...arrowProps } = props;
|
|
2584
2672
|
const popperScope = usePopperScope(__scopePopover);
|
|
2585
2673
|
const { tx } = useThemeContext();
|
|
2586
|
-
return /* @__PURE__ */
|
|
2674
|
+
return /* @__PURE__ */ React30.createElement(PopperPrimitive.Arrow, {
|
|
2587
2675
|
...popperScope,
|
|
2588
2676
|
...arrowProps,
|
|
2589
2677
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
@@ -2594,7 +2682,7 @@ PopoverArrow.displayName = ARROW_NAME2;
|
|
|
2594
2682
|
var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
2595
2683
|
const { tx } = useThemeContext();
|
|
2596
2684
|
const Root5 = asChild ? Slot12 : Primitive11.div;
|
|
2597
|
-
return /* @__PURE__ */
|
|
2685
|
+
return /* @__PURE__ */ React30.createElement(Root5, {
|
|
2598
2686
|
...props,
|
|
2599
2687
|
className: tx("popover.viewport", "popover__viewport", {
|
|
2600
2688
|
constrainInline,
|
|
@@ -2617,10 +2705,10 @@ var Popover = {
|
|
|
2617
2705
|
};
|
|
2618
2706
|
|
|
2619
2707
|
// packages/ui/react-ui/src/components/Status/Status.tsx
|
|
2620
|
-
import
|
|
2708
|
+
import React31, { forwardRef as forwardRef23 } from "react";
|
|
2621
2709
|
var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
|
|
2622
2710
|
const { tx } = useThemeContext();
|
|
2623
|
-
return /* @__PURE__ */
|
|
2711
|
+
return /* @__PURE__ */ React31.createElement("span", {
|
|
2624
2712
|
role: "status",
|
|
2625
2713
|
...props,
|
|
2626
2714
|
className: tx("status.root", "status", {
|
|
@@ -2628,7 +2716,7 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
|
|
|
2628
2716
|
variant
|
|
2629
2717
|
}, classNames),
|
|
2630
2718
|
ref: forwardedRef
|
|
2631
|
-
}, /* @__PURE__ */
|
|
2719
|
+
}, /* @__PURE__ */ React31.createElement("span", {
|
|
2632
2720
|
role: "none",
|
|
2633
2721
|
className: tx("status.bar", "status__bar", {
|
|
2634
2722
|
indeterminate,
|
|
@@ -2644,10 +2732,10 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
|
|
|
2644
2732
|
|
|
2645
2733
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
2646
2734
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
2647
|
-
import
|
|
2735
|
+
import React32, { forwardRef as forwardRef24 } from "react";
|
|
2648
2736
|
var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2649
2737
|
const { tx } = useThemeContext();
|
|
2650
|
-
return /* @__PURE__ */
|
|
2738
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveRoot, {
|
|
2651
2739
|
...props,
|
|
2652
2740
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
2653
2741
|
ref: forwardedRef
|
|
@@ -2655,7 +2743,7 @@ var ScrollAreaRoot = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, for
|
|
|
2655
2743
|
});
|
|
2656
2744
|
var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2657
2745
|
const { tx } = useThemeContext();
|
|
2658
|
-
return /* @__PURE__ */
|
|
2746
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveViewport, {
|
|
2659
2747
|
...props,
|
|
2660
2748
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
2661
2749
|
ref: forwardedRef
|
|
@@ -2663,7 +2751,7 @@ var ScrollAreaViewport = /* @__PURE__ */ forwardRef24(({ classNames, ...props },
|
|
|
2663
2751
|
});
|
|
2664
2752
|
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant = "fine", ...props }, forwardedRef) => {
|
|
2665
2753
|
const { tx } = useThemeContext();
|
|
2666
|
-
return /* @__PURE__ */
|
|
2754
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
2667
2755
|
"data-variant": variant,
|
|
2668
2756
|
...props,
|
|
2669
2757
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
@@ -2672,7 +2760,7 @@ var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef24(({ classNames, variant =
|
|
|
2672
2760
|
});
|
|
2673
2761
|
var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2674
2762
|
const { tx } = useThemeContext();
|
|
2675
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveThumb, {
|
|
2676
2764
|
...props,
|
|
2677
2765
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
2678
2766
|
ref: forwardedRef
|
|
@@ -2680,7 +2768,7 @@ var ScrollAreaThumb = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, fo
|
|
|
2680
2768
|
});
|
|
2681
2769
|
var ScrollAreaCorner = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forwardedRef) => {
|
|
2682
2770
|
const { tx } = useThemeContext();
|
|
2683
|
-
return /* @__PURE__ */
|
|
2771
|
+
return /* @__PURE__ */ React32.createElement(ScrollAreaPrimitiveCorner, {
|
|
2684
2772
|
...props,
|
|
2685
2773
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
2686
2774
|
ref: forwardedRef
|
|
@@ -2697,7 +2785,7 @@ var ScrollArea = {
|
|
|
2697
2785
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
2698
2786
|
import { CaretDown as CaretDown2, CaretUp } from "@phosphor-icons/react";
|
|
2699
2787
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2700
|
-
import
|
|
2788
|
+
import React33, { forwardRef as forwardRef25 } from "react";
|
|
2701
2789
|
var SelectRoot = SelectPrimitive.Root;
|
|
2702
2790
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
2703
2791
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -2705,52 +2793,55 @@ var SelectIcon = SelectPrimitive.Icon;
|
|
|
2705
2793
|
var SelectPortal = SelectPrimitive.Portal;
|
|
2706
2794
|
var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
|
|
2707
2795
|
const { tx } = useThemeContext();
|
|
2708
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Trigger, {
|
|
2709
2797
|
asChild: true,
|
|
2710
2798
|
ref: forwardedRef
|
|
2711
|
-
}, /* @__PURE__ */
|
|
2799
|
+
}, /* @__PURE__ */ React33.createElement(Button, props, /* @__PURE__ */ React33.createElement(SelectPrimitive.Value, {
|
|
2712
2800
|
placeholder
|
|
2713
|
-
}, children), /* @__PURE__ */
|
|
2801
|
+
}, children), /* @__PURE__ */ React33.createElement("span", {
|
|
2714
2802
|
className: "w-1 flex-1"
|
|
2715
|
-
}), /* @__PURE__ */
|
|
2803
|
+
}), /* @__PURE__ */ React33.createElement(SelectPrimitive.Icon, {
|
|
2716
2804
|
asChild: true
|
|
2717
|
-
}, /* @__PURE__ */
|
|
2805
|
+
}, /* @__PURE__ */ React33.createElement(CaretDown2, {
|
|
2718
2806
|
className: tx("select.triggerIcon", "select__trigger__icon", {}),
|
|
2719
2807
|
weight: "bold"
|
|
2720
2808
|
}))));
|
|
2721
2809
|
});
|
|
2722
2810
|
var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2723
2811
|
const { tx } = useThemeContext();
|
|
2724
|
-
|
|
2812
|
+
const elevation = useElevationContext();
|
|
2813
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Content, {
|
|
2725
2814
|
...props,
|
|
2726
|
-
className: tx("select.content", "select__content", {
|
|
2815
|
+
className: tx("select.content", "select__content", {
|
|
2816
|
+
elevation
|
|
2817
|
+
}, classNames),
|
|
2727
2818
|
position: "popper",
|
|
2728
2819
|
ref: forwardedRef
|
|
2729
2820
|
}, children);
|
|
2730
2821
|
});
|
|
2731
2822
|
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2732
2823
|
const { tx } = useThemeContext();
|
|
2733
|
-
return /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
2734
2825
|
...props,
|
|
2735
2826
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
2736
2827
|
ref: forwardedRef
|
|
2737
|
-
}, children ?? /* @__PURE__ */
|
|
2828
|
+
}, children ?? /* @__PURE__ */ React33.createElement(CaretUp, {
|
|
2738
2829
|
weight: "bold"
|
|
2739
2830
|
}));
|
|
2740
2831
|
});
|
|
2741
2832
|
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2742
2833
|
const { tx } = useThemeContext();
|
|
2743
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
2744
2835
|
...props,
|
|
2745
2836
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
2746
2837
|
ref: forwardedRef
|
|
2747
|
-
}, children ?? /* @__PURE__ */
|
|
2838
|
+
}, children ?? /* @__PURE__ */ React33.createElement(CaretDown2, {
|
|
2748
2839
|
weight: "bold"
|
|
2749
2840
|
}));
|
|
2750
2841
|
});
|
|
2751
2842
|
var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
2752
2843
|
const { tx } = useThemeContext();
|
|
2753
|
-
return /* @__PURE__ */
|
|
2844
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectViewport, {
|
|
2754
2845
|
...props,
|
|
2755
2846
|
className: tx("select.viewport", "select__viewport", {}, classNames),
|
|
2756
2847
|
ref: forwardedRef
|
|
@@ -2758,7 +2849,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, asChild, child
|
|
|
2758
2849
|
});
|
|
2759
2850
|
var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2760
2851
|
const { tx } = useThemeContext();
|
|
2761
|
-
return /* @__PURE__ */
|
|
2852
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
|
|
2762
2853
|
...props,
|
|
2763
2854
|
className: tx("select.item", "option", {}, classNames),
|
|
2764
2855
|
ref: forwardedRef
|
|
@@ -2767,7 +2858,7 @@ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forward
|
|
|
2767
2858
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
2768
2859
|
var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2769
2860
|
const { tx } = useThemeContext();
|
|
2770
|
-
return /* @__PURE__ */
|
|
2861
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemIndicator, {
|
|
2771
2862
|
...props,
|
|
2772
2863
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
2773
2864
|
ref: forwardedRef
|
|
@@ -2775,13 +2866,13 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children,
|
|
|
2775
2866
|
});
|
|
2776
2867
|
var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
|
|
2777
2868
|
const { tx } = useThemeContext();
|
|
2778
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
|
|
2779
2870
|
...props,
|
|
2780
2871
|
className: tx("select.item", "option", {}, classNames),
|
|
2781
2872
|
ref: forwardedRef
|
|
2782
|
-
}, /* @__PURE__ */
|
|
2873
|
+
}, /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React33.createElement("span", {
|
|
2783
2874
|
className: "grow w-1"
|
|
2784
|
-
}), /* @__PURE__ */
|
|
2875
|
+
}), /* @__PURE__ */ React33.createElement(Icon, {
|
|
2785
2876
|
icon: "ph--check--regular"
|
|
2786
2877
|
}));
|
|
2787
2878
|
});
|
|
@@ -2789,7 +2880,7 @@ var SelectGroup = SelectPrimitive.Group;
|
|
|
2789
2880
|
var SelectLabel = SelectPrimitive.Label;
|
|
2790
2881
|
var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2791
2882
|
const { tx } = useThemeContext();
|
|
2792
|
-
return /* @__PURE__ */
|
|
2883
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Separator, {
|
|
2793
2884
|
...props,
|
|
2794
2885
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
2795
2886
|
ref: forwardedRef
|
|
@@ -2797,7 +2888,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, fo
|
|
|
2797
2888
|
});
|
|
2798
2889
|
var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2799
2890
|
const { tx } = useThemeContext();
|
|
2800
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Arrow, {
|
|
2801
2892
|
...props,
|
|
2802
2893
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
2803
2894
|
ref: forwardedRef
|
|
@@ -2826,10 +2917,10 @@ var Select = {
|
|
|
2826
2917
|
|
|
2827
2918
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
2828
2919
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
2829
|
-
import
|
|
2920
|
+
import React34 from "react";
|
|
2830
2921
|
var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
2831
2922
|
const { tx } = useThemeContext();
|
|
2832
|
-
return /* @__PURE__ */
|
|
2923
|
+
return /* @__PURE__ */ React34.createElement(SeparatorPrimitive, {
|
|
2833
2924
|
orientation,
|
|
2834
2925
|
...props,
|
|
2835
2926
|
className: tx("separator.root", "separator", {
|
|
@@ -2841,11 +2932,11 @@ var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
2841
2932
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
2842
2933
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2843
2934
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2844
|
-
import
|
|
2935
|
+
import React35, { forwardRef as forwardRef26 } from "react";
|
|
2845
2936
|
var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2846
2937
|
const { tx } = useThemeContext();
|
|
2847
2938
|
const Root5 = asChild ? Slot13 : Primitive12.span;
|
|
2848
|
-
return /* @__PURE__ */
|
|
2939
|
+
return /* @__PURE__ */ React35.createElement(Root5, {
|
|
2849
2940
|
...props,
|
|
2850
2941
|
className: tx("tag.root", "tag", {
|
|
2851
2942
|
palette
|
|
@@ -2858,29 +2949,29 @@ var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette, classNames, ...props
|
|
|
2858
2949
|
import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
|
|
2859
2950
|
import { Slot as Slot14 } from "@radix-ui/react-slot";
|
|
2860
2951
|
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
|
|
2952
|
+
import React36, { forwardRef as forwardRef27 } from "react";
|
|
2862
2953
|
var ToastProvider = ToastProviderPrimitive;
|
|
2863
2954
|
var ToastViewport = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2864
2955
|
const { tx } = useThemeContext();
|
|
2865
|
-
return /* @__PURE__ */
|
|
2956
|
+
return /* @__PURE__ */ React36.createElement(ToastViewportPrimitive, {
|
|
2866
2957
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
2867
2958
|
ref: forwardedRef
|
|
2868
2959
|
});
|
|
2869
2960
|
});
|
|
2870
2961
|
var ToastRoot = /* @__PURE__ */ forwardRef27(({ classNames, children, ...props }, forwardedRef) => {
|
|
2871
2962
|
const { tx } = useThemeContext();
|
|
2872
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ React36.createElement(ToastRootPrimitive, {
|
|
2873
2964
|
...props,
|
|
2874
2965
|
className: tx("toast.root", "toast", {}, classNames),
|
|
2875
2966
|
ref: forwardedRef
|
|
2876
|
-
}, /* @__PURE__ */
|
|
2877
|
-
elevation: "
|
|
2967
|
+
}, /* @__PURE__ */ React36.createElement(ElevationProvider, {
|
|
2968
|
+
elevation: "toast"
|
|
2878
2969
|
}, children));
|
|
2879
2970
|
});
|
|
2880
2971
|
var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2881
2972
|
const { tx } = useThemeContext();
|
|
2882
2973
|
const Root5 = asChild ? Slot14 : Primitive13.div;
|
|
2883
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2884
2975
|
...props,
|
|
2885
2976
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
2886
2977
|
ref: forwardedRef
|
|
@@ -2889,7 +2980,7 @@ var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props },
|
|
|
2889
2980
|
var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2890
2981
|
const { tx } = useThemeContext();
|
|
2891
2982
|
const Root5 = asChild ? Slot14 : ToastTitlePrimitive;
|
|
2892
|
-
return /* @__PURE__ */
|
|
2983
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2893
2984
|
...props,
|
|
2894
2985
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
2895
2986
|
ref: forwardedRef
|
|
@@ -2898,7 +2989,7 @@ var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }
|
|
|
2898
2989
|
var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2899
2990
|
const { tx } = useThemeContext();
|
|
2900
2991
|
const Root5 = asChild ? Slot14 : ToastDescriptionPrimitive;
|
|
2901
|
-
return /* @__PURE__ */
|
|
2992
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2902
2993
|
...props,
|
|
2903
2994
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
2904
2995
|
ref: forwardedRef
|
|
@@ -2907,7 +2998,7 @@ var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...p
|
|
|
2907
2998
|
var ToastActions = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2908
2999
|
const { tx } = useThemeContext();
|
|
2909
3000
|
const Root5 = asChild ? Slot14 : Primitive13.div;
|
|
2910
|
-
return /* @__PURE__ */
|
|
3001
|
+
return /* @__PURE__ */ React36.createElement(Root5, {
|
|
2911
3002
|
...props,
|
|
2912
3003
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
2913
3004
|
ref: forwardedRef
|
|
@@ -2929,44 +3020,44 @@ var Toast = {
|
|
|
2929
3020
|
|
|
2930
3021
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
2931
3022
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
2932
|
-
import
|
|
3023
|
+
import React37, { forwardRef as forwardRef28 } from "react";
|
|
2933
3024
|
var ToolbarRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
|
|
2934
3025
|
const { tx } = useThemeContext();
|
|
2935
|
-
return /* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Root, {
|
|
2936
3027
|
...props,
|
|
2937
3028
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
2938
3029
|
ref: forwardedRef
|
|
2939
3030
|
}, children);
|
|
2940
3031
|
});
|
|
2941
3032
|
var ToolbarButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2942
|
-
return /* @__PURE__ */
|
|
3033
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
2943
3034
|
asChild: true
|
|
2944
|
-
}, /* @__PURE__ */
|
|
3035
|
+
}, /* @__PURE__ */ React37.createElement(Button, {
|
|
2945
3036
|
...props,
|
|
2946
3037
|
ref: forwardedRef
|
|
2947
3038
|
}));
|
|
2948
3039
|
});
|
|
2949
3040
|
var ToolbarToggle = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2950
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
2951
3042
|
asChild: true
|
|
2952
|
-
}, /* @__PURE__ */
|
|
3043
|
+
}, /* @__PURE__ */ React37.createElement(Toggle, {
|
|
2953
3044
|
...props,
|
|
2954
3045
|
ref: forwardedRef
|
|
2955
3046
|
}));
|
|
2956
3047
|
});
|
|
2957
3048
|
var ToolbarLink = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
2958
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Link, {
|
|
2959
3050
|
asChild: true
|
|
2960
|
-
}, /* @__PURE__ */
|
|
3051
|
+
}, /* @__PURE__ */ React37.createElement(Link, {
|
|
2961
3052
|
...props,
|
|
2962
3053
|
ref: forwardedRef
|
|
2963
3054
|
}));
|
|
2964
3055
|
});
|
|
2965
3056
|
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children, elevation, ...props }, forwardedRef) => {
|
|
2966
|
-
return /* @__PURE__ */
|
|
3057
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
2967
3058
|
...props,
|
|
2968
3059
|
asChild: true
|
|
2969
|
-
}, /* @__PURE__ */
|
|
3060
|
+
}, /* @__PURE__ */ React37.createElement(ButtonGroup, {
|
|
2970
3061
|
classNames,
|
|
2971
3062
|
children,
|
|
2972
3063
|
elevation,
|
|
@@ -2974,10 +3065,10 @@ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children,
|
|
|
2974
3065
|
}));
|
|
2975
3066
|
});
|
|
2976
3067
|
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
2977
|
-
return /* @__PURE__ */
|
|
3068
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
2978
3069
|
...props,
|
|
2979
3070
|
asChild: true
|
|
2980
|
-
}, /* @__PURE__ */
|
|
3071
|
+
}, /* @__PURE__ */ React37.createElement(Button, {
|
|
2981
3072
|
variant,
|
|
2982
3073
|
density,
|
|
2983
3074
|
elevation,
|
|
@@ -2987,14 +3078,14 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, e
|
|
|
2987
3078
|
}));
|
|
2988
3079
|
});
|
|
2989
3080
|
var ToolbarSeparator = (props) => {
|
|
2990
|
-
return /* @__PURE__ */
|
|
3081
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
|
|
2991
3082
|
asChild: true
|
|
2992
|
-
}, /* @__PURE__ */
|
|
3083
|
+
}, /* @__PURE__ */ React37.createElement(Separator4, {
|
|
2993
3084
|
orientation: "vertical",
|
|
2994
3085
|
...props
|
|
2995
3086
|
}));
|
|
2996
3087
|
};
|
|
2997
|
-
var ToolbarExpander = () => /* @__PURE__ */
|
|
3088
|
+
var ToolbarExpander = () => /* @__PURE__ */ React37.createElement("div", {
|
|
2998
3089
|
className: "grow"
|
|
2999
3090
|
});
|
|
3000
3091
|
var Toolbar = {
|