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