@dxos/react-ui 0.8.4-main.dedc0f3 → 0.8.4-main.e8ec1fe
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/{chunk-Y4PW3CX2.mjs → chunk-53MI2QCM.mjs} +600 -295
- package/dist/lib/browser/chunk-53MI2QCM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +10 -1
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +57 -29
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/{chunk-L6LIOSFT.mjs → chunk-ID67AFFF.mjs} +600 -295
- package/dist/lib/node-esm/chunk-ID67AFFF.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +10 -1
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +57 -29
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +0 -6
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +0 -6
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +0 -6
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/{Buttons → Button}/Button.d.ts +1 -1
- package/dist/types/src/components/Button/Button.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/Button.stories.d.ts +1 -7
- package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/IconButton.d.ts +0 -1
- package/dist/types/src/components/Button/IconButton.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/IconButton.stories.d.ts +0 -6
- package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/Toggle.d.ts.map +1 -0
- package/dist/types/src/components/Button/Toggle.stories.d.ts +16 -0
- package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/ToggleGroup.d.ts +2 -6
- package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/ToggleGroup.stories.d.ts +2 -12
- package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/index.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -0
- package/dist/types/src/components/{Dialogs → Dialog}/AlertDialog.stories.d.ts +0 -6
- package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/types/src/components/{Dialogs → Dialog}/Dialog.stories.d.ts +0 -1
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/index.d.ts.map +1 -0
- package/dist/types/src/components/Icon/Icon.d.ts +1 -1
- package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/src/components/Icon/Icon.stories.d.ts +17 -0
- package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -0
- package/dist/types/src/components/Input/Input.d.ts +0 -2
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +0 -6
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts +0 -6
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/List.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/List.stories.d.ts +0 -6
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/List/Tree.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/Tree.stories.d.ts +0 -6
- package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/Treegrid.d.ts.map +1 -1
- package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/index.d.ts.map +1 -0
- package/dist/types/src/components/Main/Main.d.ts +9 -18
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +1 -2
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +0 -6
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts +0 -6
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +0 -1
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +0 -6
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +0 -6
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +37 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +18 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScrollContainer/index.d.ts +2 -0
- package/dist/types/src/components/ScrollContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/Select/Select.d.ts +1 -1
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +0 -6
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts +0 -6
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +8 -8
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +0 -6
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +12 -12
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +0 -6
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +1 -3
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +0 -6
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -1
- package/dist/types/src/hooks/useVisualViewport.d.ts +2 -2
- package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +0 -6
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Custom.stories.d.ts +1 -2
- package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Typography.stories.d.ts +0 -6
- package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/index.d.ts +2 -1
- package/dist/types/src/testing/decorators/index.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withLayout.d.ts +15 -0
- package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/{withSurfaceVariantsLayout.d.ts → withLayoutVariants.d.ts} +2 -2
- package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/withTheme.d.ts +3 -0
- package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
- package/dist/types/src/util/domino.d.ts +18 -0
- package/dist/types/src/util/domino.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/usePx.d.ts +8 -0
- package/dist/types/src/util/usePx.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -23
- package/src/components/Avatars/Avatar.stories.tsx +0 -2
- package/src/components/Avatars/AvatarGroup.stories.tsx +0 -3
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -4
- package/src/components/{Buttons → Button}/Button.stories.tsx +3 -5
- package/src/components/{Buttons → Button}/IconButton.stories.tsx +0 -3
- package/src/components/{Buttons → Button}/IconButton.tsx +12 -11
- package/src/components/{Buttons → Button}/Toggle.stories.tsx +5 -7
- package/src/components/{Buttons → Button}/ToggleGroup.stories.tsx +0 -3
- package/src/components/Clipboard/CopyButton.tsx +1 -1
- package/src/components/{Dialogs → Dialog}/AlertDialog.stories.tsx +1 -4
- package/src/components/{Dialogs → Dialog}/Dialog.stories.tsx +6 -4
- package/src/components/Icon/Icon.stories.tsx +113 -0
- package/src/components/Icon/Icon.tsx +1 -1
- package/src/components/Input/Input.stories.tsx +0 -3
- package/src/components/Input/Input.tsx +3 -3
- package/src/components/Link/Link.stories.tsx +0 -3
- package/src/components/{Lists → List}/List.stories.tsx +2 -6
- package/src/components/{Lists → List}/ListDropIndicator.tsx +1 -1
- package/src/components/{Lists → List}/Tree.stories.tsx +0 -3
- package/src/components/{Lists → List}/Treegrid.tsx +57 -16
- package/src/components/Main/Main.stories.tsx +4 -4
- package/src/components/Main/Main.tsx +28 -19
- package/src/components/Menus/ContextMenu.stories.tsx +0 -3
- package/src/components/Menus/DropdownMenu.stories.tsx +1 -4
- package/src/components/Menus/DropdownMenu.tsx +20 -3
- package/src/components/Message/Message.stories.tsx +0 -2
- package/src/components/Popover/Popover.stories.tsx +1 -4
- package/src/components/Popover/Popover.tsx +22 -5
- package/src/components/ScrollArea/ScrollArea.stories.tsx +1 -4
- package/src/components/ScrollContainer/ScrollContainer.stories.tsx +69 -0
- package/src/components/ScrollContainer/ScrollContainer.tsx +231 -0
- package/src/components/ScrollContainer/index.ts +5 -0
- package/src/components/Select/Select.stories.tsx +3 -5
- package/src/components/Select/Select.tsx +4 -4
- package/src/components/Status/Status.stories.tsx +0 -3
- package/src/components/Tag/Tag.stories.tsx +8 -7
- package/src/components/Toast/Toast.stories.tsx +1 -4
- package/src/components/Toolbar/Toolbar.stories.tsx +2 -7
- package/src/components/Toolbar/Toolbar.tsx +17 -6
- package/src/components/Tooltip/Tooltip.stories.tsx +1 -4
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/index.ts +4 -3
- package/src/hooks/useSafeArea.ts +3 -2
- package/src/hooks/useVisualViewport.ts +4 -4
- package/src/index.ts +1 -1
- package/src/playground/Controls.stories.tsx +3 -5
- package/src/playground/Custom.stories.tsx +9 -20
- package/src/playground/Typography.stories.tsx +0 -3
- package/src/testing/decorators/index.ts +2 -1
- package/src/testing/decorators/withLayout.tsx +56 -0
- package/src/testing/decorators/{withSurfaceVariantsLayout.tsx → withLayoutVariants.tsx} +2 -2
- package/src/testing/decorators/withTheme.tsx +31 -0
- package/src/util/domino.ts +53 -0
- package/src/util/index.ts +2 -0
- package/src/util/usePx.ts +61 -0
- package/dist/lib/browser/chunk-Y4PW3CX2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-L6LIOSFT.mjs.map +0 -7
- package/dist/types/src/components/Buttons/Button.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Toggle.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +0 -19
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/index.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/index.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/index.d.ts.map +0 -1
- package/dist/types/src/testing/decorators/withSurfaceVariantsLayout.d.ts.map +0 -1
- package/src/testing/decorators/withTheme.ts +0 -25
- /package/dist/types/src/components/{Buttons → Button}/Toggle.d.ts +0 -0
- /package/dist/types/src/components/{Buttons → Button}/index.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/AlertDialog.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/Dialog.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/index.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/List.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/ListDropIndicator.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/Tree.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/TreeDropIndicator.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/Treegrid.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/Treegrid.stories.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/index.d.ts +0 -0
- /package/src/components/{Buttons → Button}/Button.tsx +0 -0
- /package/src/components/{Buttons → Button}/Toggle.tsx +0 -0
- /package/src/components/{Buttons → Button}/ToggleGroup.tsx +0 -0
- /package/src/components/{Buttons → Button}/index.ts +0 -0
- /package/src/components/{Dialogs → Dialog}/AlertDialog.tsx +0 -0
- /package/src/components/{Dialogs → Dialog}/Dialog.tsx +0 -0
- /package/src/components/{Dialogs → Dialog}/index.ts +0 -0
- /package/src/components/{Lists → List}/List.tsx +0 -0
- /package/src/components/{Lists → List}/Tree.tsx +0 -0
- /package/src/components/{Lists → List}/TreeDropIndicator.tsx +0 -0
- /package/src/components/{Lists → List}/Treegrid.stories.tsx +0 -0
- /package/src/components/{Lists → List}/index.ts +0 -0
|
@@ -29,7 +29,7 @@ var useIconHref = (icon) => {
|
|
|
29
29
|
|
|
30
30
|
// src/hooks/useSafeArea.ts
|
|
31
31
|
import { useCallback, useState } from "react";
|
|
32
|
-
import {
|
|
32
|
+
import { useViewportResize } from "@dxos/react-hooks";
|
|
33
33
|
var initialSafeArea = {
|
|
34
34
|
top: NaN,
|
|
35
35
|
right: NaN,
|
|
@@ -46,7 +46,7 @@ var useSafeArea = () => {
|
|
|
46
46
|
left: parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-left"))
|
|
47
47
|
});
|
|
48
48
|
}, []);
|
|
49
|
-
|
|
49
|
+
useViewportResize(handleResize);
|
|
50
50
|
return padding;
|
|
51
51
|
};
|
|
52
52
|
|
|
@@ -128,7 +128,7 @@ var useTranslationsContext = () => useContext4(TranslationsContext);
|
|
|
128
128
|
|
|
129
129
|
// src/hooks/useVisualViewport.ts
|
|
130
130
|
import { useCallback as useCallback2, useState as useState3 } from "react";
|
|
131
|
-
import {
|
|
131
|
+
import { useViewportResize as useViewportResize2 } from "@dxos/react-hooks";
|
|
132
132
|
var useVisualViewport = (deps) => {
|
|
133
133
|
const [width, setWidth] = useState3(null);
|
|
134
134
|
const [height, setHeight] = useState3(null);
|
|
@@ -138,7 +138,7 @@ var useVisualViewport = (deps) => {
|
|
|
138
138
|
setHeight(window.visualViewport.height);
|
|
139
139
|
}
|
|
140
140
|
}, []);
|
|
141
|
-
|
|
141
|
+
useViewportResize2(handleResize, deps);
|
|
142
142
|
return {
|
|
143
143
|
width,
|
|
144
144
|
height
|
|
@@ -150,8 +150,8 @@ var AnchoredOverflowRoot = /* @__PURE__ */ forwardRef(({ asChild, classNames, ch
|
|
|
150
150
|
var _effect = _useSignals2();
|
|
151
151
|
try {
|
|
152
152
|
const { tx } = useThemeContext();
|
|
153
|
-
const
|
|
154
|
-
return /* @__PURE__ */ React2.createElement(
|
|
153
|
+
const Root8 = asChild ? Slot : Primitive.div;
|
|
154
|
+
return /* @__PURE__ */ React2.createElement(Root8, {
|
|
155
155
|
role: "none",
|
|
156
156
|
...props,
|
|
157
157
|
className: tx("anchoredOverflow.root", "overflow-anchored", {}, classNames),
|
|
@@ -165,8 +165,8 @@ var AnchoredOverflowAnchor = /* @__PURE__ */ forwardRef(({ asChild, classNames,
|
|
|
165
165
|
var _effect = _useSignals2();
|
|
166
166
|
try {
|
|
167
167
|
const { tx } = useThemeContext();
|
|
168
|
-
const
|
|
169
|
-
return /* @__PURE__ */ React2.createElement(
|
|
168
|
+
const Root8 = asChild ? Slot : Primitive.div;
|
|
169
|
+
return /* @__PURE__ */ React2.createElement(Root8, {
|
|
170
170
|
role: "none",
|
|
171
171
|
...props,
|
|
172
172
|
className: tx("anchoredOverflow.anchor", "overflow-anchor", {}, classNames),
|
|
@@ -226,10 +226,10 @@ var AvatarContent = /* @__PURE__ */ forwardRef2(({ icon, classNames, ...props },
|
|
|
226
226
|
var AvatarLabel = /* @__PURE__ */ forwardRef2(({ asChild, srOnly, classNames, ...props }, forwardedRef) => {
|
|
227
227
|
var _effect = _useSignals3();
|
|
228
228
|
try {
|
|
229
|
-
const
|
|
229
|
+
const Root8 = asChild ? Slot2 : Primitive2.span;
|
|
230
230
|
const { tx } = useThemeContext();
|
|
231
231
|
const { labelId } = useAvatarContext("AvatarLabel");
|
|
232
|
-
return /* @__PURE__ */ React3.createElement(
|
|
232
|
+
return /* @__PURE__ */ React3.createElement(Root8, {
|
|
233
233
|
...props,
|
|
234
234
|
id: labelId,
|
|
235
235
|
ref: forwardedRef,
|
|
@@ -244,10 +244,10 @@ var AvatarLabel = /* @__PURE__ */ forwardRef2(({ asChild, srOnly, classNames, ..
|
|
|
244
244
|
var AvatarDescription = /* @__PURE__ */ forwardRef2(({ asChild, srOnly, classNames, ...props }, forwardedRef) => {
|
|
245
245
|
var _effect = _useSignals3();
|
|
246
246
|
try {
|
|
247
|
-
const
|
|
247
|
+
const Root8 = asChild ? Slot2 : Primitive2.span;
|
|
248
248
|
const { tx } = useThemeContext();
|
|
249
249
|
const { descriptionId } = useAvatarContext("AvatarDescription");
|
|
250
|
-
return /* @__PURE__ */ React3.createElement(
|
|
250
|
+
return /* @__PURE__ */ React3.createElement(Root8, {
|
|
251
251
|
...props,
|
|
252
252
|
id: descriptionId,
|
|
253
253
|
ref: forwardedRef,
|
|
@@ -275,7 +275,7 @@ import React6, { forwardRef as forwardRef5 } from "react";
|
|
|
275
275
|
// src/components/Icon/Icon.tsx
|
|
276
276
|
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
277
277
|
import React4, { forwardRef as forwardRef3, memo } from "react";
|
|
278
|
-
var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef3(({ icon, classNames, size, ...props }, forwardedRef) => {
|
|
278
|
+
var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef3(({ icon, classNames, size = 4, ...props }, forwardedRef) => {
|
|
279
279
|
var _effect = _useSignals4();
|
|
280
280
|
try {
|
|
281
281
|
const { tx } = useThemeContext();
|
|
@@ -303,8 +303,8 @@ var Link = /* @__PURE__ */ forwardRef4(({ asChild, variant, classNames, ...props
|
|
|
303
303
|
var _effect = _useSignals5();
|
|
304
304
|
try {
|
|
305
305
|
const { tx } = useThemeContext();
|
|
306
|
-
const
|
|
307
|
-
return /* @__PURE__ */ React5.createElement(
|
|
306
|
+
const Root8 = asChild ? Slot3 : Primitive3.a;
|
|
307
|
+
return /* @__PURE__ */ React5.createElement(Root8, {
|
|
308
308
|
...props,
|
|
309
309
|
className: tx("link.root", "link", {
|
|
310
310
|
variant
|
|
@@ -321,8 +321,8 @@ var BreadcrumbRoot = /* @__PURE__ */ forwardRef5(({ asChild, classNames, ...prop
|
|
|
321
321
|
var _effect = _useSignals6();
|
|
322
322
|
try {
|
|
323
323
|
const { tx } = useThemeContext();
|
|
324
|
-
const
|
|
325
|
-
return /* @__PURE__ */ React6.createElement(
|
|
324
|
+
const Root8 = asChild ? Slot4 : Primitive4.div;
|
|
325
|
+
return /* @__PURE__ */ React6.createElement(Root8, {
|
|
326
326
|
role: "navigation",
|
|
327
327
|
...props,
|
|
328
328
|
className: tx("breadcrumb.root", "breadcrumb", {}, classNames),
|
|
@@ -336,8 +336,8 @@ var BreadcrumbList = /* @__PURE__ */ forwardRef5(({ asChild, classNames, ...prop
|
|
|
336
336
|
var _effect = _useSignals6();
|
|
337
337
|
try {
|
|
338
338
|
const { tx } = useThemeContext();
|
|
339
|
-
const
|
|
340
|
-
return /* @__PURE__ */ React6.createElement(
|
|
339
|
+
const Root8 = asChild ? Slot4 : Primitive4.ol;
|
|
340
|
+
return /* @__PURE__ */ React6.createElement(Root8, {
|
|
341
341
|
role: "list",
|
|
342
342
|
...props,
|
|
343
343
|
className: tx("breadcrumb.list", "breadcrumb__list", {}, classNames),
|
|
@@ -351,8 +351,8 @@ var BreadcrumbListItem = /* @__PURE__ */ forwardRef5(({ asChild, classNames, ...
|
|
|
351
351
|
var _effect = _useSignals6();
|
|
352
352
|
try {
|
|
353
353
|
const { tx } = useThemeContext();
|
|
354
|
-
const
|
|
355
|
-
return /* @__PURE__ */ React6.createElement(
|
|
354
|
+
const Root8 = asChild ? Slot4 : Primitive4.li;
|
|
355
|
+
return /* @__PURE__ */ React6.createElement(Root8, {
|
|
356
356
|
role: "listitem",
|
|
357
357
|
...props,
|
|
358
358
|
className: tx("breadcrumb.listItem", "breadcrumb__list__item", {}, classNames),
|
|
@@ -365,8 +365,8 @@ var BreadcrumbListItem = /* @__PURE__ */ forwardRef5(({ asChild, classNames, ...
|
|
|
365
365
|
var BreadcrumbLink = /* @__PURE__ */ forwardRef5(({ asChild, ...props }, forwardedRef) => {
|
|
366
366
|
var _effect = _useSignals6();
|
|
367
367
|
try {
|
|
368
|
-
const
|
|
369
|
-
return /* @__PURE__ */ React6.createElement(
|
|
368
|
+
const Root8 = asChild ? Slot4 : Link;
|
|
369
|
+
return /* @__PURE__ */ React6.createElement(Root8, {
|
|
370
370
|
...props,
|
|
371
371
|
ref: forwardedRef
|
|
372
372
|
});
|
|
@@ -378,8 +378,8 @@ var BreadcrumbCurrent = /* @__PURE__ */ forwardRef5(({ asChild, classNames, ...p
|
|
|
378
378
|
var _effect = _useSignals6();
|
|
379
379
|
try {
|
|
380
380
|
const { tx } = useThemeContext();
|
|
381
|
-
const
|
|
382
|
-
return /* @__PURE__ */ React6.createElement(
|
|
381
|
+
const Root8 = asChild ? Slot4 : "h1";
|
|
382
|
+
return /* @__PURE__ */ React6.createElement(Root8, {
|
|
383
383
|
...props,
|
|
384
384
|
"aria-current": "page",
|
|
385
385
|
className: tx("breadcrumb.current", "breadcrumb__item__heading--current", {}, classNames),
|
|
@@ -414,7 +414,7 @@ var Breadcrumb = {
|
|
|
414
414
|
Separator: BreadcrumbSeparator
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
-
// src/components/
|
|
417
|
+
// src/components/Button/Button.tsx
|
|
418
418
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
419
419
|
import { createContext as createContext3 } from "@radix-ui/react-context";
|
|
420
420
|
import { Primitive as Primitive5 } from "@radix-ui/react-primitive";
|
|
@@ -432,8 +432,8 @@ var Button = /* @__PURE__ */ memo2(/* @__PURE__ */ forwardRef6(({ classNames, ch
|
|
|
432
432
|
const { tx } = useThemeContext();
|
|
433
433
|
const elevation = useElevationContext(propsElevation);
|
|
434
434
|
const density = useDensityContext(propsDensity);
|
|
435
|
-
const
|
|
436
|
-
return /* @__PURE__ */ React7.createElement(
|
|
435
|
+
const Root8 = asChild ? Slot5 : Primitive5.button;
|
|
436
|
+
return /* @__PURE__ */ React7.createElement(Root8, {
|
|
437
437
|
ref,
|
|
438
438
|
...props,
|
|
439
439
|
"data-variant": variant,
|
|
@@ -460,8 +460,8 @@ var ButtonGroup = /* @__PURE__ */ forwardRef6(({ children, elevation: propsEleva
|
|
|
460
460
|
try {
|
|
461
461
|
const { tx } = useThemeContext();
|
|
462
462
|
const elevation = useElevationContext(propsElevation);
|
|
463
|
-
const
|
|
464
|
-
return /* @__PURE__ */ React7.createElement(
|
|
463
|
+
const Root8 = asChild ? Slot5 : Primitive5.div;
|
|
464
|
+
return /* @__PURE__ */ React7.createElement(Root8, {
|
|
465
465
|
role: "none",
|
|
466
466
|
...props,
|
|
467
467
|
className: tx("button.group", "button-group", {
|
|
@@ -477,7 +477,7 @@ var ButtonGroup = /* @__PURE__ */ forwardRef6(({ children, elevation: propsEleva
|
|
|
477
477
|
});
|
|
478
478
|
ButtonGroup.displayName = BUTTON_GROUP_NAME;
|
|
479
479
|
|
|
480
|
-
// src/components/
|
|
480
|
+
// src/components/Button/IconButton.tsx
|
|
481
481
|
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
482
482
|
import React9, { forwardRef as forwardRef8 } from "react";
|
|
483
483
|
|
|
@@ -1104,8 +1104,22 @@ var Tooltip = {
|
|
|
1104
1104
|
Trigger: TooltipTrigger
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
1107
|
-
// src/components/
|
|
1108
|
-
var
|
|
1107
|
+
// src/components/Button/IconButton.tsx
|
|
1108
|
+
var IconButton = /* @__PURE__ */ forwardRef8((props, forwardedRef) => {
|
|
1109
|
+
var _effect = _useSignals9();
|
|
1110
|
+
try {
|
|
1111
|
+
return props.iconOnly ? /* @__PURE__ */ React9.createElement(IconOnlyButton, {
|
|
1112
|
+
...props,
|
|
1113
|
+
ref: forwardedRef
|
|
1114
|
+
}) : /* @__PURE__ */ React9.createElement(LabelledIconButton, {
|
|
1115
|
+
...props,
|
|
1116
|
+
ref: forwardedRef
|
|
1117
|
+
});
|
|
1118
|
+
} finally {
|
|
1119
|
+
_effect.f();
|
|
1120
|
+
}
|
|
1121
|
+
});
|
|
1122
|
+
var IconOnlyButton = /* @__PURE__ */ forwardRef8(({ noTooltip, tooltipSide, ...props }, forwardedRef) => {
|
|
1109
1123
|
var _effect = _useSignals9();
|
|
1110
1124
|
try {
|
|
1111
1125
|
if (noTooltip) {
|
|
@@ -1126,7 +1140,7 @@ var IconOnlyButton = /* @__PURE__ */ forwardRef8(({ noTooltip, tooltipPortal = t
|
|
|
1126
1140
|
_effect.f();
|
|
1127
1141
|
}
|
|
1128
1142
|
});
|
|
1129
|
-
var LabelledIconButton = /* @__PURE__ */ forwardRef8(({ icon, size, iconOnly, label, classNames, iconClassNames, caretDown, ...props }, forwardedRef) => {
|
|
1143
|
+
var LabelledIconButton = /* @__PURE__ */ forwardRef8(({ icon, size = 5, iconOnly, label, classNames, iconClassNames, caretDown, ...props }, forwardedRef) => {
|
|
1130
1144
|
var _effect = _useSignals9();
|
|
1131
1145
|
try {
|
|
1132
1146
|
const { tx } = useThemeContext();
|
|
@@ -1150,22 +1164,8 @@ var LabelledIconButton = /* @__PURE__ */ forwardRef8(({ icon, size, iconOnly, la
|
|
|
1150
1164
|
_effect.f();
|
|
1151
1165
|
}
|
|
1152
1166
|
});
|
|
1153
|
-
var IconButton = /* @__PURE__ */ forwardRef8((props, forwardedRef) => {
|
|
1154
|
-
var _effect = _useSignals9();
|
|
1155
|
-
try {
|
|
1156
|
-
return props.iconOnly ? /* @__PURE__ */ React9.createElement(IconOnlyButton, {
|
|
1157
|
-
...props,
|
|
1158
|
-
ref: forwardedRef
|
|
1159
|
-
}) : /* @__PURE__ */ React9.createElement(LabelledIconButton, {
|
|
1160
|
-
...props,
|
|
1161
|
-
ref: forwardedRef
|
|
1162
|
-
});
|
|
1163
|
-
} finally {
|
|
1164
|
-
_effect.f();
|
|
1165
|
-
}
|
|
1166
|
-
});
|
|
1167
1167
|
|
|
1168
|
-
// src/components/
|
|
1168
|
+
// src/components/Button/Toggle.tsx
|
|
1169
1169
|
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
1170
1170
|
import { Toggle as TogglePrimitive } from "@radix-ui/react-toggle";
|
|
1171
1171
|
import React10, { forwardRef as forwardRef9 } from "react";
|
|
@@ -1186,7 +1186,7 @@ var Toggle = /* @__PURE__ */ forwardRef9(({ defaultPressed, pressed, onPressedCh
|
|
|
1186
1186
|
}
|
|
1187
1187
|
});
|
|
1188
1188
|
|
|
1189
|
-
// src/components/
|
|
1189
|
+
// src/components/Button/ToggleGroup.tsx
|
|
1190
1190
|
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
1191
1191
|
import { ToggleGroupItem as ToggleGroupItemPrimitive, ToggleGroup as ToggleGroupPrimitive } from "@radix-ui/react-toggle-group";
|
|
1192
1192
|
import React11, { forwardRef as forwardRef10 } from "react";
|
|
@@ -1275,18 +1275,103 @@ var ClipboardProvider = ({ children }) => {
|
|
|
1275
1275
|
// src/components/Clipboard/CopyButton.tsx
|
|
1276
1276
|
import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
|
|
1277
1277
|
import React16 from "react";
|
|
1278
|
-
import { mx as
|
|
1278
|
+
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
1279
1279
|
|
|
1280
1280
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
1281
1281
|
import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
|
|
1282
1282
|
import { createKeyborg } from "keyborg";
|
|
1283
|
-
import React15, { createContext as createContext7, useEffect as
|
|
1283
|
+
import React15, { createContext as createContext7, useEffect as useEffect4, useMemo as useMemo3 } from "react";
|
|
1284
|
+
|
|
1285
|
+
// src/util/domino.ts
|
|
1286
|
+
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
1287
|
+
var Domino = class _Domino {
|
|
1288
|
+
static of(tag) {
|
|
1289
|
+
return new _Domino(tag);
|
|
1290
|
+
}
|
|
1291
|
+
_el;
|
|
1292
|
+
constructor(tag) {
|
|
1293
|
+
this._el = document.createElement(tag);
|
|
1294
|
+
}
|
|
1295
|
+
classNames(...classNames) {
|
|
1296
|
+
this._el.className = mx2(classNames);
|
|
1297
|
+
return this;
|
|
1298
|
+
}
|
|
1299
|
+
text(value) {
|
|
1300
|
+
this._el.textContent = value;
|
|
1301
|
+
return this;
|
|
1302
|
+
}
|
|
1303
|
+
data(key, value) {
|
|
1304
|
+
this._el.dataset[key] = value;
|
|
1305
|
+
return this;
|
|
1306
|
+
}
|
|
1307
|
+
attributes(attr) {
|
|
1308
|
+
Object.entries(attr).filter(([_, value]) => value !== void 0).map(([key, value]) => this._el.setAttribute(key, value));
|
|
1309
|
+
return this;
|
|
1310
|
+
}
|
|
1311
|
+
style(styles) {
|
|
1312
|
+
Object.assign(this._el.style, styles);
|
|
1313
|
+
return this;
|
|
1314
|
+
}
|
|
1315
|
+
children(...children) {
|
|
1316
|
+
children.forEach((child) => this._el.appendChild(child.build()));
|
|
1317
|
+
return this;
|
|
1318
|
+
}
|
|
1319
|
+
on(event, handler) {
|
|
1320
|
+
this._el.addEventListener(event, handler);
|
|
1321
|
+
return this;
|
|
1322
|
+
}
|
|
1323
|
+
build() {
|
|
1324
|
+
return this._el;
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1284
1327
|
|
|
1285
1328
|
// src/util/hasIosKeyboard.ts
|
|
1286
1329
|
var hasIosKeyboard = () => {
|
|
1287
1330
|
return !!navigator.userAgent.match(/iP(ad|od|hone).+Safari/);
|
|
1288
1331
|
};
|
|
1289
1332
|
|
|
1333
|
+
// src/util/usePx.ts
|
|
1334
|
+
import { useCallback as useCallback5, useEffect as useEffect3, useMemo as useMemo2, useState as useState6 } from "react";
|
|
1335
|
+
var getDocumentElementFontSize = () => parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
1336
|
+
var usePx = (rem) => {
|
|
1337
|
+
const [fontSize, setFontSize] = useState6(() => {
|
|
1338
|
+
if (typeof document !== "undefined") {
|
|
1339
|
+
return getDocumentElementFontSize();
|
|
1340
|
+
}
|
|
1341
|
+
return 16;
|
|
1342
|
+
});
|
|
1343
|
+
const updateFontSize = useCallback5(() => {
|
|
1344
|
+
setFontSize(getDocumentElementFontSize());
|
|
1345
|
+
}, []);
|
|
1346
|
+
useEffect3(() => {
|
|
1347
|
+
if (typeof document === "undefined") {
|
|
1348
|
+
return;
|
|
1349
|
+
}
|
|
1350
|
+
const resizeObserver = new ResizeObserver(updateFontSize);
|
|
1351
|
+
resizeObserver.observe(document.documentElement);
|
|
1352
|
+
const mediaQueryList = window.matchMedia("all");
|
|
1353
|
+
const handleMediaChange = () => {
|
|
1354
|
+
updateFontSize();
|
|
1355
|
+
};
|
|
1356
|
+
if (mediaQueryList.addEventListener) {
|
|
1357
|
+
mediaQueryList.addEventListener("change", handleMediaChange);
|
|
1358
|
+
} else {
|
|
1359
|
+
mediaQueryList.addListener(handleMediaChange);
|
|
1360
|
+
}
|
|
1361
|
+
return () => {
|
|
1362
|
+
resizeObserver.disconnect();
|
|
1363
|
+
if (mediaQueryList.removeEventListener) {
|
|
1364
|
+
mediaQueryList.removeEventListener("change", handleMediaChange);
|
|
1365
|
+
} else {
|
|
1366
|
+
mediaQueryList.removeListener(handleMediaChange);
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
}, []);
|
|
1370
|
+
return useMemo2(() => rem * fontSize, [
|
|
1371
|
+
fontSize
|
|
1372
|
+
]);
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1290
1375
|
// src/components/DensityProvider/DensityProvider.tsx
|
|
1291
1376
|
import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
|
|
1292
1377
|
import React13, { createContext as createContext5 } from "react";
|
|
@@ -1330,7 +1415,7 @@ var ThemeContext = /* @__PURE__ */ createContext7(void 0);
|
|
|
1330
1415
|
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", ...rest }) => {
|
|
1331
1416
|
var _effect = _useSignals15();
|
|
1332
1417
|
try {
|
|
1333
|
-
|
|
1418
|
+
useEffect4(() => {
|
|
1334
1419
|
if (document.defaultView) {
|
|
1335
1420
|
const kb = createKeyborg(document.defaultView);
|
|
1336
1421
|
kb.subscribe(handleInputModalityChange);
|
|
@@ -1338,7 +1423,7 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
1338
1423
|
}
|
|
1339
1424
|
}, []);
|
|
1340
1425
|
const safeAreaPadding = useSafeArea();
|
|
1341
|
-
const contextValue =
|
|
1426
|
+
const contextValue = useMemo3(() => ({
|
|
1342
1427
|
tx,
|
|
1343
1428
|
themeMode,
|
|
1344
1429
|
hasIosKeyboard: hasIosKeyboard(),
|
|
@@ -1391,7 +1476,7 @@ var CopyButton = ({ classNames, value, size = 5, ...props }) => {
|
|
|
1391
1476
|
"data-testid": "copy-invitation"
|
|
1392
1477
|
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1393
1478
|
role: "none",
|
|
1394
|
-
className:
|
|
1479
|
+
className: mx3("flex gap-1 items-center", isCopied && inactiveLabelStyles)
|
|
1395
1480
|
}, /* @__PURE__ */ React16.createElement("span", {
|
|
1396
1481
|
className: "pli-1"
|
|
1397
1482
|
}, t("copy label")), /* @__PURE__ */ React16.createElement(Icon, {
|
|
@@ -1399,7 +1484,7 @@ var CopyButton = ({ classNames, value, size = 5, ...props }) => {
|
|
|
1399
1484
|
size
|
|
1400
1485
|
})), /* @__PURE__ */ React16.createElement("div", {
|
|
1401
1486
|
role: "none",
|
|
1402
|
-
className:
|
|
1487
|
+
className: mx3("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
|
|
1403
1488
|
}, /* @__PURE__ */ React16.createElement("span", {
|
|
1404
1489
|
className: "pli-1"
|
|
1405
1490
|
}, t("copy success label")), /* @__PURE__ */ React16.createElement(Icon, {
|
|
@@ -1443,7 +1528,7 @@ var Clipboard = {
|
|
|
1443
1528
|
Provider: ClipboardProvider
|
|
1444
1529
|
};
|
|
1445
1530
|
|
|
1446
|
-
// src/components/
|
|
1531
|
+
// src/components/Dialog/Dialog.tsx
|
|
1447
1532
|
import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
|
|
1448
1533
|
import { createContext as createContext8 } from "@radix-ui/react-context";
|
|
1449
1534
|
import { DialogClose as DialogClosePrimitive, DialogContent as DialogContentPrimitive, DialogDescription as DialogDescriptionPrimitive, DialogOverlay as DialogOverlayPrimitive, DialogPortal as DialogPortalPrimitive, Root as DialogRootPrimitive, DialogTitle as DialogTitlePrimitive, DialogTrigger as DialogTriggerPrimitive } from "@radix-ui/react-dialog";
|
|
@@ -1542,7 +1627,7 @@ var Dialog = {
|
|
|
1542
1627
|
Close: DialogClose
|
|
1543
1628
|
};
|
|
1544
1629
|
|
|
1545
|
-
// src/components/
|
|
1630
|
+
// src/components/Dialog/AlertDialog.tsx
|
|
1546
1631
|
import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
|
|
1547
1632
|
import { AlertDialogAction as AlertDialogActionPrimitive, AlertDialogCancel as AlertDialogCancelPrimitive, AlertDialogContent as AlertDialogContentPrimitive, AlertDialogDescription as AlertDialogDescriptionPrimitive, AlertDialogOverlay as AlertDialogOverlayPrimitive, AlertDialogPortal as AlertDialogPortalPrimitive, Root as AlertDialogRootPrimitive, AlertDialogTitle as AlertDialogTitlePrimitive, AlertDialogTrigger as AlertDialogTriggerPrimitive } from "@radix-ui/react-alert-dialog";
|
|
1548
1633
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
@@ -1646,9 +1731,9 @@ var AlertDialog = {
|
|
|
1646
1731
|
import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
|
|
1647
1732
|
import { Root as CheckboxPrimitive } from "@radix-ui/react-checkbox";
|
|
1648
1733
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1649
|
-
import React19, { forwardRef as forwardRef13, useCallback as
|
|
1734
|
+
import React19, { forwardRef as forwardRef13, useCallback as useCallback6 } from "react";
|
|
1650
1735
|
import { DescriptionAndValidation as DescriptionAndValidationPrimitive, Description as DescriptionPrimitive, INPUT_NAME, InputRoot, Label as LabelPrimitive, PinInput as PinInputPrimitive, TextArea as TextAreaPrimitive, TextInput as TextInputPrimitive, Validation as ValidationPrimitive, useInputContext } from "@dxos/react-input";
|
|
1651
|
-
import { mx as
|
|
1736
|
+
import { mx as mx4 } from "@dxos/react-ui-theme";
|
|
1652
1737
|
var Label = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
1653
1738
|
var _effect = _useSignals19();
|
|
1654
1739
|
try {
|
|
@@ -1718,7 +1803,7 @@ var PinInput = /* @__PURE__ */ forwardRef13(({ density: propsDensity, elevation:
|
|
|
1718
1803
|
const { tx } = useThemeContext();
|
|
1719
1804
|
const density = useDensityContext(propsDensity);
|
|
1720
1805
|
const elevation = useElevationContext(propsElevation);
|
|
1721
|
-
const segmentClassName =
|
|
1806
|
+
const segmentClassName = useCallback6(({ focused, validationValence }) => tx("input.input", "input--pin-segment", {
|
|
1722
1807
|
variant: "static",
|
|
1723
1808
|
focused,
|
|
1724
1809
|
disabled: props.disabled,
|
|
@@ -1800,7 +1885,7 @@ var TextArea = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, density
|
|
|
1800
1885
|
_effect.f();
|
|
1801
1886
|
}
|
|
1802
1887
|
});
|
|
1803
|
-
var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size,
|
|
1888
|
+
var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, classNames, ...props }, forwardedRef) => {
|
|
1804
1889
|
var _effect = _useSignals19();
|
|
1805
1890
|
try {
|
|
1806
1891
|
const [checked, onCheckedChange] = useControllableState2({
|
|
@@ -1846,7 +1931,7 @@ var Switch = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked
|
|
|
1846
1931
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1847
1932
|
return /* @__PURE__ */ React19.createElement("input", {
|
|
1848
1933
|
type: "checkbox",
|
|
1849
|
-
className:
|
|
1934
|
+
className: mx4("dx-checkbox--switch dx-focus-ring", classNames),
|
|
1850
1935
|
checked,
|
|
1851
1936
|
onChange: (event) => {
|
|
1852
1937
|
onCheckedChange(event.target.checked);
|
|
@@ -1877,13 +1962,13 @@ var Input = {
|
|
|
1877
1962
|
DescriptionAndValidation
|
|
1878
1963
|
};
|
|
1879
1964
|
|
|
1880
|
-
// src/components/
|
|
1965
|
+
// src/components/List/List.tsx
|
|
1881
1966
|
import { useSignals as _useSignals21 } from "@preact-signals/safe-react/tracking";
|
|
1882
1967
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
1883
1968
|
import React21, { forwardRef as forwardRef14 } from "react";
|
|
1884
1969
|
import { LIST_ITEM_NAME, LIST_NAME, ListItemCollapsibleContent, List as ListPrimitive, ListItem as ListPrimitiveItem, ListItemHeading as ListPrimitiveItemHeading, ListItemOpenTrigger as ListPrimitiveItemOpenTrigger, useListContext, useListItemContext } from "@dxos/react-list";
|
|
1885
1970
|
|
|
1886
|
-
// src/components/
|
|
1971
|
+
// src/components/List/ListDropIndicator.tsx
|
|
1887
1972
|
import { useSignals as _useSignals20 } from "@preact-signals/safe-react/tracking";
|
|
1888
1973
|
import React20 from "react";
|
|
1889
1974
|
var edgeToOrientationMap = {
|
|
@@ -1894,7 +1979,7 @@ var edgeToOrientationMap = {
|
|
|
1894
1979
|
};
|
|
1895
1980
|
var orientationStyles = {
|
|
1896
1981
|
horizontal: "h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]",
|
|
1897
|
-
vertical: "
|
|
1982
|
+
vertical: "is-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]"
|
|
1898
1983
|
};
|
|
1899
1984
|
var edgeStyles = {
|
|
1900
1985
|
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
@@ -1927,7 +2012,7 @@ var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineIns
|
|
|
1927
2012
|
}
|
|
1928
2013
|
};
|
|
1929
2014
|
|
|
1930
|
-
// src/components/
|
|
2015
|
+
// src/components/List/List.tsx
|
|
1931
2016
|
var List = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, forwardedRef) => {
|
|
1932
2017
|
var _effect = _useSignals21();
|
|
1933
2018
|
try {
|
|
@@ -1947,10 +2032,10 @@ var List = /* @__PURE__ */ forwardRef14(({ classNames, children, ...props }, for
|
|
|
1947
2032
|
var ListItemEndcap = /* @__PURE__ */ forwardRef14(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1948
2033
|
var _effect = _useSignals21();
|
|
1949
2034
|
try {
|
|
1950
|
-
const
|
|
2035
|
+
const Root8 = asChild ? Slot6 : "div";
|
|
1951
2036
|
const density = useDensityContext();
|
|
1952
2037
|
const { tx } = useThemeContext();
|
|
1953
|
-
return /* @__PURE__ */ React21.createElement(
|
|
2038
|
+
return /* @__PURE__ */ React21.createElement(Root8, {
|
|
1954
2039
|
...!asChild && {
|
|
1955
2040
|
role: "none"
|
|
1956
2041
|
},
|
|
@@ -2044,11 +2129,11 @@ var ListItem = {
|
|
|
2044
2129
|
DropIndicator: ListDropIndicator
|
|
2045
2130
|
};
|
|
2046
2131
|
|
|
2047
|
-
// src/components/
|
|
2132
|
+
// src/components/List/Tree.tsx
|
|
2048
2133
|
import { useSignals as _useSignals23 } from "@preact-signals/safe-react/tracking";
|
|
2049
2134
|
import React23, { forwardRef as forwardRef15 } from "react";
|
|
2050
2135
|
|
|
2051
|
-
// src/components/
|
|
2136
|
+
// src/components/List/TreeDropIndicator.tsx
|
|
2052
2137
|
import { useSignals as _useSignals22 } from "@preact-signals/safe-react/tracking";
|
|
2053
2138
|
import React22 from "react";
|
|
2054
2139
|
var edgeToOrientationMap2 = {
|
|
@@ -2099,7 +2184,7 @@ var TreeDropIndicator = ({ instruction, gap = 0 }) => {
|
|
|
2099
2184
|
}
|
|
2100
2185
|
};
|
|
2101
2186
|
|
|
2102
|
-
// src/components/
|
|
2187
|
+
// src/components/List/Tree.tsx
|
|
2103
2188
|
var TreeRoot = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
|
|
2104
2189
|
var _effect = _useSignals23();
|
|
2105
2190
|
try {
|
|
@@ -2153,14 +2238,14 @@ var TreeItem = {
|
|
|
2153
2238
|
DropIndicator: TreeDropIndicator
|
|
2154
2239
|
};
|
|
2155
2240
|
|
|
2156
|
-
// src/components/
|
|
2241
|
+
// src/components/List/Treegrid.tsx
|
|
2157
2242
|
import { useSignals as _useSignals24 } from "@preact-signals/safe-react/tracking";
|
|
2158
|
-
import {
|
|
2243
|
+
import { useFocusFinders } from "@fluentui/react-tabster";
|
|
2159
2244
|
import { createContextScope as createContextScope2 } from "@radix-ui/react-context";
|
|
2160
2245
|
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
2161
2246
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
2162
2247
|
import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
|
|
2163
|
-
import React24, { forwardRef as forwardRef16 } from "react";
|
|
2248
|
+
import React24, { forwardRef as forwardRef16, useCallback as useCallback7 } from "react";
|
|
2164
2249
|
var TREEGRID_ROW_NAME = "TreegridRow";
|
|
2165
2250
|
var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
|
|
2166
2251
|
var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
|
|
@@ -2170,15 +2255,44 @@ var TreegridRoot = /* @__PURE__ */ forwardRef16(({ asChild, classNames, children
|
|
|
2170
2255
|
var _effect = _useSignals24();
|
|
2171
2256
|
try {
|
|
2172
2257
|
const { tx } = useThemeContext();
|
|
2173
|
-
const
|
|
2174
|
-
const
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2258
|
+
const Root8 = asChild ? Slot7 : Primitive7.div;
|
|
2259
|
+
const { findFirstFocusable } = useFocusFinders();
|
|
2260
|
+
const handleKeyDown = useCallback7((event) => {
|
|
2261
|
+
switch (event.key) {
|
|
2262
|
+
case "ArrowDown":
|
|
2263
|
+
case "ArrowUp": {
|
|
2264
|
+
const direction = event.key === "ArrowDown" ? "down" : "up";
|
|
2265
|
+
const target = event.target;
|
|
2266
|
+
const ancestorWithArrowKeys = target.closest(`[data-arrow-keys*="${direction}"], [data-arrow-keys="all"]`);
|
|
2267
|
+
if (!ancestorWithArrowKeys) {
|
|
2268
|
+
const currentRow = target.closest('[role="row"]');
|
|
2269
|
+
if (currentRow) {
|
|
2270
|
+
const treegrid = currentRow.closest('[role="treegrid"]');
|
|
2271
|
+
if (treegrid) {
|
|
2272
|
+
const rows = Array.from(treegrid.querySelectorAll('[role="row"]'));
|
|
2273
|
+
const currentIndex = rows.indexOf(currentRow);
|
|
2274
|
+
const nextIndex = direction === "down" ? currentIndex + 1 : currentIndex - 1;
|
|
2275
|
+
const targetRow = rows[nextIndex];
|
|
2276
|
+
if (targetRow) {
|
|
2277
|
+
const firstFocusable = findFirstFocusable(targetRow);
|
|
2278
|
+
if (firstFocusable) {
|
|
2279
|
+
event.preventDefault();
|
|
2280
|
+
firstFocusable.focus();
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
break;
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
props.onKeyDown?.(event);
|
|
2290
|
+
}, [
|
|
2291
|
+
findFirstFocusable
|
|
2292
|
+
]);
|
|
2293
|
+
return /* @__PURE__ */ React24.createElement(Root8, {
|
|
2180
2294
|
role: "treegrid",
|
|
2181
|
-
|
|
2295
|
+
onKeyDown: handleKeyDown,
|
|
2182
2296
|
...props,
|
|
2183
2297
|
className: tx("treegrid.root", "treegrid", {}, classNames),
|
|
2184
2298
|
style: {
|
|
@@ -2195,7 +2309,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef16(({ __treegridRowScope, asChild, c
|
|
|
2195
2309
|
var _effect = _useSignals24();
|
|
2196
2310
|
try {
|
|
2197
2311
|
const { tx } = useThemeContext();
|
|
2198
|
-
const
|
|
2312
|
+
const Root8 = asChild ? Slot7 : Primitive7.div;
|
|
2199
2313
|
const pathParts = id.split(PATH_SEPARATOR);
|
|
2200
2314
|
const level = pathParts.length - 1;
|
|
2201
2315
|
const [open, onOpenChange] = useControllableState3({
|
|
@@ -2203,20 +2317,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef16(({ __treegridRowScope, asChild, c
|
|
|
2203
2317
|
onChange: propsOnOpenChange,
|
|
2204
2318
|
defaultProp: defaultOpen
|
|
2205
2319
|
});
|
|
2206
|
-
const focusableGroupAttrs = useFocusableGroup({
|
|
2207
|
-
tabBehavior: "limited"
|
|
2208
|
-
});
|
|
2209
|
-
const arrowGroupAttrs = useArrowNavigationGroup({
|
|
2210
|
-
axis: "horizontal",
|
|
2211
|
-
tabbable: false,
|
|
2212
|
-
circular: false,
|
|
2213
|
-
memorizeCurrent: false
|
|
2214
|
-
});
|
|
2215
2320
|
return /* @__PURE__ */ React24.createElement(TreegridRowProvider, {
|
|
2216
2321
|
open,
|
|
2217
2322
|
onOpenChange,
|
|
2218
2323
|
scope: __treegridRowScope
|
|
2219
|
-
}, /* @__PURE__ */ React24.createElement(
|
|
2324
|
+
}, /* @__PURE__ */ React24.createElement(Root8, {
|
|
2220
2325
|
role: "row",
|
|
2221
2326
|
"aria-level": level,
|
|
2222
2327
|
className: tx("treegrid.row", "treegrid__row", {
|
|
@@ -2226,16 +2331,10 @@ var TreegridRow = /* @__PURE__ */ forwardRef16(({ __treegridRowScope, asChild, c
|
|
|
2226
2331
|
"aria-expanded": open,
|
|
2227
2332
|
"aria-owns": parentOf
|
|
2228
2333
|
},
|
|
2229
|
-
tabIndex: 0,
|
|
2230
|
-
...focusableGroupAttrs,
|
|
2231
2334
|
...props,
|
|
2232
2335
|
id,
|
|
2233
2336
|
ref: forwardedRef
|
|
2234
|
-
},
|
|
2235
|
-
role: "none",
|
|
2236
|
-
className: "contents",
|
|
2237
|
-
...arrowGroupAttrs
|
|
2238
|
-
}, children)));
|
|
2337
|
+
}, children));
|
|
2239
2338
|
} finally {
|
|
2240
2339
|
_effect.f();
|
|
2241
2340
|
}
|
|
@@ -2268,17 +2367,18 @@ var Treegrid = {
|
|
|
2268
2367
|
|
|
2269
2368
|
// src/components/Main/Main.tsx
|
|
2270
2369
|
import { useSignals as _useSignals25 } from "@preact-signals/safe-react/tracking";
|
|
2370
|
+
import { useFocusableGroup } from "@fluentui/react-tabster";
|
|
2271
2371
|
import { createContext as createContext10 } from "@radix-ui/react-context";
|
|
2272
2372
|
import { DialogContent as DialogContent2, Root as DialogRoot2, DialogTitle as DialogTitle2 } from "@radix-ui/react-dialog";
|
|
2273
2373
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
2274
2374
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
2275
2375
|
import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
|
|
2276
|
-
import React25, { forwardRef as forwardRef17, useCallback as
|
|
2376
|
+
import React25, { forwardRef as forwardRef17, useCallback as useCallback9, useEffect as useEffect6, useRef as useRef2, useState as useState8 } from "react";
|
|
2277
2377
|
import { log } from "@dxos/log";
|
|
2278
2378
|
import { useForwardedRef, useMediaQuery } from "@dxos/react-hooks";
|
|
2279
2379
|
|
|
2280
2380
|
// src/components/Main/useSwipeToDismiss.ts
|
|
2281
|
-
import { useCallback as
|
|
2381
|
+
import { useCallback as useCallback8, useEffect as useEffect5, useState as useState7 } from "react";
|
|
2282
2382
|
var useSwipeToDismiss = (ref, {
|
|
2283
2383
|
onDismiss,
|
|
2284
2384
|
dismissThreshold = 64,
|
|
@@ -2287,22 +2387,22 @@ var useSwipeToDismiss = (ref, {
|
|
|
2287
2387
|
/* side = 'inline-start' */
|
|
2288
2388
|
}) => {
|
|
2289
2389
|
const $root = ref.current;
|
|
2290
|
-
const [motionState, setMotionState] =
|
|
2291
|
-
const [gestureStartX, setGestureStartX] =
|
|
2292
|
-
const setIdle =
|
|
2390
|
+
const [motionState, setMotionState] = useState7(0);
|
|
2391
|
+
const [gestureStartX, setGestureStartX] = useState7(0);
|
|
2392
|
+
const setIdle = useCallback8(() => {
|
|
2293
2393
|
setMotionState(0);
|
|
2294
2394
|
$root?.style.removeProperty("inset-inline-start");
|
|
2295
2395
|
$root?.style.setProperty("transition-duration", "200ms");
|
|
2296
2396
|
}, [
|
|
2297
2397
|
$root
|
|
2298
2398
|
]);
|
|
2299
|
-
const setFollowing =
|
|
2399
|
+
const setFollowing = useCallback8(() => {
|
|
2300
2400
|
setMotionState(2);
|
|
2301
2401
|
$root?.style.setProperty("transition-duration", "0ms");
|
|
2302
2402
|
}, [
|
|
2303
2403
|
$root
|
|
2304
2404
|
]);
|
|
2305
|
-
const handlePointerDown =
|
|
2405
|
+
const handlePointerDown = useCallback8(({ screenX }) => {
|
|
2306
2406
|
if (motionState === 0) {
|
|
2307
2407
|
setMotionState(1);
|
|
2308
2408
|
setGestureStartX(screenX);
|
|
@@ -2310,7 +2410,7 @@ var useSwipeToDismiss = (ref, {
|
|
|
2310
2410
|
}, [
|
|
2311
2411
|
motionState
|
|
2312
2412
|
]);
|
|
2313
|
-
const handlePointerMove =
|
|
2413
|
+
const handlePointerMove = useCallback8(({ screenX }) => {
|
|
2314
2414
|
if ($root) {
|
|
2315
2415
|
const delta = Math.min(screenX - gestureStartX, 0);
|
|
2316
2416
|
switch (motionState) {
|
|
@@ -2334,12 +2434,12 @@ var useSwipeToDismiss = (ref, {
|
|
|
2334
2434
|
motionState,
|
|
2335
2435
|
gestureStartX
|
|
2336
2436
|
]);
|
|
2337
|
-
const handlePointerUp =
|
|
2437
|
+
const handlePointerUp = useCallback8(() => {
|
|
2338
2438
|
setIdle();
|
|
2339
2439
|
}, [
|
|
2340
2440
|
setIdle
|
|
2341
2441
|
]);
|
|
2342
|
-
|
|
2442
|
+
useEffect5(() => {
|
|
2343
2443
|
$root?.addEventListener("pointerdown", handlePointerDown);
|
|
2344
2444
|
return () => {
|
|
2345
2445
|
$root?.removeEventListener("pointerdown", handlePointerDown);
|
|
@@ -2348,7 +2448,7 @@ var useSwipeToDismiss = (ref, {
|
|
|
2348
2448
|
$root,
|
|
2349
2449
|
handlePointerDown
|
|
2350
2450
|
]);
|
|
2351
|
-
|
|
2451
|
+
useEffect5(() => {
|
|
2352
2452
|
$root && document.documentElement.addEventListener("pointermove", handlePointerMove);
|
|
2353
2453
|
return () => {
|
|
2354
2454
|
document.documentElement.removeEventListener("pointermove", handlePointerMove);
|
|
@@ -2357,7 +2457,7 @@ var useSwipeToDismiss = (ref, {
|
|
|
2357
2457
|
$root,
|
|
2358
2458
|
handlePointerMove
|
|
2359
2459
|
]);
|
|
2360
|
-
|
|
2460
|
+
useEffect5(() => {
|
|
2361
2461
|
$root && document.documentElement.addEventListener("pointerup", handlePointerUp);
|
|
2362
2462
|
return () => {
|
|
2363
2463
|
document.documentElement.removeEventListener("pointerup", handlePointerUp);
|
|
@@ -2370,14 +2470,14 @@ var useSwipeToDismiss = (ref, {
|
|
|
2370
2470
|
|
|
2371
2471
|
// src/components/Main/Main.tsx
|
|
2372
2472
|
var __dxlog_file = "/__w/dxos/dxos/packages/ui/react-ui/src/components/Main/Main.tsx";
|
|
2473
|
+
var MAIN_NAME = "Main";
|
|
2373
2474
|
var MAIN_ROOT_NAME = "MainRoot";
|
|
2374
2475
|
var NAVIGATION_SIDEBAR_NAME = "NavigationSidebar";
|
|
2375
2476
|
var COMPLEMENTARY_SIDEBAR_NAME = "ComplementarySidebar";
|
|
2376
|
-
var MAIN_NAME = "Main";
|
|
2377
2477
|
var GENERIC_CONSUMER_NAME = "GenericConsumer";
|
|
2378
2478
|
var landmarkAttr = "data-main-landmark";
|
|
2379
2479
|
var useLandmarkMover = (propsOnKeyDown, landmark) => {
|
|
2380
|
-
const handleKeyDown =
|
|
2480
|
+
const handleKeyDown = useCallback9((event) => {
|
|
2381
2481
|
const target = event.target;
|
|
2382
2482
|
if (event.target === event.currentTarget && event.key === "Tab" && target.hasAttribute(landmarkAttr)) {
|
|
2383
2483
|
event.preventDefault();
|
|
@@ -2391,12 +2491,12 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
|
|
|
2391
2491
|
}, [
|
|
2392
2492
|
propsOnKeyDown
|
|
2393
2493
|
]);
|
|
2394
|
-
const focusableGroupAttrs =
|
|
2494
|
+
const focusableGroupAttrs = useFocusableGroup({
|
|
2395
2495
|
tabBehavior: "limited",
|
|
2396
2496
|
ignoreDefaultKeydown: {
|
|
2397
2497
|
Tab: true
|
|
2398
2498
|
}
|
|
2399
|
-
};
|
|
2499
|
+
});
|
|
2400
2500
|
return {
|
|
2401
2501
|
onKeyDown: handleKeyDown,
|
|
2402
2502
|
[landmarkAttr]: landmark,
|
|
@@ -2410,7 +2510,7 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
|
2410
2510
|
setNavigationSidebarState: (_nextState) => {
|
|
2411
2511
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2412
2512
|
F: __dxlog_file,
|
|
2413
|
-
L:
|
|
2513
|
+
L: 92,
|
|
2414
2514
|
S: void 0,
|
|
2415
2515
|
C: (f, a) => f(...a)
|
|
2416
2516
|
});
|
|
@@ -2419,7 +2519,7 @@ var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
|
2419
2519
|
setComplementarySidebarState: (_nextState) => {
|
|
2420
2520
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2421
2521
|
F: __dxlog_file,
|
|
2422
|
-
L:
|
|
2522
|
+
L: 97,
|
|
2423
2523
|
S: void 0,
|
|
2424
2524
|
C: (f, a) => f(...a)
|
|
2425
2525
|
});
|
|
@@ -2430,31 +2530,29 @@ var useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {
|
|
|
2430
2530
|
return {
|
|
2431
2531
|
navigationSidebarState,
|
|
2432
2532
|
setNavigationSidebarState,
|
|
2433
|
-
toggleNavigationSidebar:
|
|
2533
|
+
toggleNavigationSidebar: useCallback9(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
|
|
2434
2534
|
navigationSidebarState,
|
|
2435
2535
|
setNavigationSidebarState
|
|
2436
2536
|
]),
|
|
2437
|
-
openNavigationSidebar:
|
|
2438
|
-
collapseNavigationSidebar:
|
|
2439
|
-
closeNavigationSidebar:
|
|
2537
|
+
openNavigationSidebar: useCallback9(() => setNavigationSidebarState("expanded"), []),
|
|
2538
|
+
collapseNavigationSidebar: useCallback9(() => setNavigationSidebarState("collapsed"), []),
|
|
2539
|
+
closeNavigationSidebar: useCallback9(() => setNavigationSidebarState("closed"), []),
|
|
2440
2540
|
complementarySidebarState,
|
|
2441
2541
|
setComplementarySidebarState,
|
|
2442
|
-
toggleComplementarySidebar:
|
|
2542
|
+
toggleComplementarySidebar: useCallback9(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
|
|
2443
2543
|
complementarySidebarState,
|
|
2444
2544
|
setComplementarySidebarState
|
|
2445
2545
|
]),
|
|
2446
|
-
openComplementarySidebar:
|
|
2447
|
-
collapseComplementarySidebar:
|
|
2448
|
-
closeComplementarySidebar:
|
|
2546
|
+
openComplementarySidebar: useCallback9(() => setComplementarySidebarState("expanded"), []),
|
|
2547
|
+
collapseComplementarySidebar: useCallback9(() => setComplementarySidebarState("collapsed"), []),
|
|
2548
|
+
closeComplementarySidebar: useCallback9(() => setComplementarySidebarState("closed"), [])
|
|
2449
2549
|
};
|
|
2450
2550
|
};
|
|
2451
2551
|
var resizeDebounce = 3e3;
|
|
2452
2552
|
var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState, onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState, onComplementarySidebarStateChange, children, ...props }) => {
|
|
2453
2553
|
var _effect = _useSignals25();
|
|
2454
2554
|
try {
|
|
2455
|
-
const [isLg] = useMediaQuery("lg"
|
|
2456
|
-
ssr: false
|
|
2457
|
-
});
|
|
2555
|
+
const [isLg] = useMediaQuery("lg");
|
|
2458
2556
|
const [navigationSidebarState = isLg ? "expanded" : "collapsed", setNavigationSidebarState] = useControllableState4({
|
|
2459
2557
|
prop: propsNavigationSidebarState,
|
|
2460
2558
|
defaultProp: defaultNavigationSidebarState,
|
|
@@ -2465,9 +2563,9 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
|
|
|
2465
2563
|
defaultProp: defaultComplementarySidebarState,
|
|
2466
2564
|
onChange: onComplementarySidebarStateChange
|
|
2467
2565
|
});
|
|
2468
|
-
const [resizing, setResizing] =
|
|
2566
|
+
const [resizing, setResizing] = useState8(false);
|
|
2469
2567
|
const resizeInterval = useRef2(null);
|
|
2470
|
-
const handleResize =
|
|
2568
|
+
const handleResize = useCallback9(() => {
|
|
2471
2569
|
setResizing(true);
|
|
2472
2570
|
if (resizeInterval.current) {
|
|
2473
2571
|
clearTimeout(resizeInterval.current);
|
|
@@ -2477,7 +2575,7 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
|
|
|
2477
2575
|
resizeInterval.current = null;
|
|
2478
2576
|
}, resizeDebounce);
|
|
2479
2577
|
}, []);
|
|
2480
|
-
|
|
2578
|
+
useEffect6(() => {
|
|
2481
2579
|
window.addEventListener("resize", handleResize);
|
|
2482
2580
|
return () => window.removeEventListener("resize", handleResize);
|
|
2483
2581
|
}, [
|
|
@@ -2502,9 +2600,7 @@ var handleOpenAutoFocus = (event) => {
|
|
|
2502
2600
|
var MainSidebar = /* @__PURE__ */ forwardRef17(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props }, forwardedRef) => {
|
|
2503
2601
|
var _effect = _useSignals25();
|
|
2504
2602
|
try {
|
|
2505
|
-
const [isLg] = useMediaQuery("lg"
|
|
2506
|
-
ssr: false
|
|
2507
|
-
});
|
|
2603
|
+
const [isLg] = useMediaQuery("lg");
|
|
2508
2604
|
const { tx } = useThemeContext();
|
|
2509
2605
|
const { t } = useTranslation();
|
|
2510
2606
|
const ref = useForwardedRef(forwardedRef);
|
|
@@ -2512,22 +2608,25 @@ var MainSidebar = /* @__PURE__ */ forwardRef17(({ classNames, children, swipeToD
|
|
|
2512
2608
|
useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
|
|
2513
2609
|
onDismiss: () => onStateChange?.("closed")
|
|
2514
2610
|
});
|
|
2515
|
-
const handleKeyDown =
|
|
2516
|
-
|
|
2517
|
-
|
|
2611
|
+
const handleKeyDown = useCallback9((event) => {
|
|
2612
|
+
const focusGroupParent = event.target.closest("[data-tabster]");
|
|
2613
|
+
if (event.key === "Escape" && focusGroupParent) {
|
|
2614
|
+
event.preventDefault();
|
|
2615
|
+
event.stopPropagation();
|
|
2616
|
+
focusGroupParent.focus();
|
|
2518
2617
|
}
|
|
2519
2618
|
props.onKeyDown?.(event);
|
|
2520
2619
|
}, [
|
|
2521
2620
|
props.onKeyDown
|
|
2522
2621
|
]);
|
|
2523
|
-
const
|
|
2622
|
+
const Root8 = isLg ? Primitive8.div : DialogContent2;
|
|
2524
2623
|
return /* @__PURE__ */ React25.createElement(DialogRoot2, {
|
|
2525
2624
|
open: state !== "closed",
|
|
2526
2625
|
"aria-label": toLocalizedString(label, t),
|
|
2527
2626
|
modal: false
|
|
2528
2627
|
}, !isLg && /* @__PURE__ */ React25.createElement(DialogTitle2, {
|
|
2529
2628
|
className: "sr-only"
|
|
2530
|
-
}, toLocalizedString(label, t)), /* @__PURE__ */ React25.createElement(
|
|
2629
|
+
}, toLocalizedString(label, t)), /* @__PURE__ */ React25.createElement(Root8, {
|
|
2531
2630
|
...!isLg && {
|
|
2532
2631
|
forceMount: true,
|
|
2533
2632
|
tabIndex: -1,
|
|
@@ -2538,9 +2637,9 @@ var MainSidebar = /* @__PURE__ */ forwardRef17(({ classNames, children, swipeToD
|
|
|
2538
2637
|
"data-state": state,
|
|
2539
2638
|
"data-resizing": resizing ? "true" : "false",
|
|
2540
2639
|
className: tx("main.sidebar", "main__sidebar", {}, classNames),
|
|
2541
|
-
|
|
2640
|
+
onKeyDownCapture: handleKeyDown,
|
|
2542
2641
|
...state === "closed" && {
|
|
2543
|
-
inert:
|
|
2642
|
+
inert: true
|
|
2544
2643
|
},
|
|
2545
2644
|
ref
|
|
2546
2645
|
}, children));
|
|
@@ -2591,9 +2690,9 @@ var MainContent = /* @__PURE__ */ forwardRef17(({ asChild, classNames, bounce, h
|
|
|
2591
2690
|
try {
|
|
2592
2691
|
const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);
|
|
2593
2692
|
const { tx } = useThemeContext();
|
|
2594
|
-
const
|
|
2693
|
+
const Root8 = asChild ? Slot8 : role ? "div" : "main";
|
|
2595
2694
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
2596
|
-
return /* @__PURE__ */ React25.createElement(
|
|
2695
|
+
return /* @__PURE__ */ React25.createElement(Root8, {
|
|
2597
2696
|
role,
|
|
2598
2697
|
...handlesFocus && {
|
|
2599
2698
|
...mover
|
|
@@ -2616,9 +2715,7 @@ MainContent.displayName = MAIN_NAME;
|
|
|
2616
2715
|
var MainOverlay = /* @__PURE__ */ forwardRef17(({ classNames, ...props }, forwardedRef) => {
|
|
2617
2716
|
var _effect = _useSignals25();
|
|
2618
2717
|
try {
|
|
2619
|
-
const [isLg] = useMediaQuery("lg"
|
|
2620
|
-
ssr: false
|
|
2621
|
-
});
|
|
2718
|
+
const [isLg] = useMediaQuery("lg");
|
|
2622
2719
|
const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_NAME);
|
|
2623
2720
|
const { tx } = useThemeContext();
|
|
2624
2721
|
return /* @__PURE__ */ React25.createElement("div", {
|
|
@@ -2656,7 +2753,7 @@ import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
|
2656
2753
|
import React26, { forwardRef as forwardRef18 } from "react";
|
|
2657
2754
|
|
|
2658
2755
|
// src/hooks/useSafeCollisionPadding.ts
|
|
2659
|
-
import { useMemo as
|
|
2756
|
+
import { useMemo as useMemo4 } from "react";
|
|
2660
2757
|
var propIsNumber = (prop) => Number.isFinite(prop);
|
|
2661
2758
|
var propsIsRecord = (prop) => !!(prop && typeof prop === "object");
|
|
2662
2759
|
var safePadding = (propsPadding, safePadding2, side) => {
|
|
@@ -2664,7 +2761,7 @@ var safePadding = (propsPadding, safePadding2, side) => {
|
|
|
2664
2761
|
};
|
|
2665
2762
|
var useSafeCollisionPadding = (collisionPadding) => {
|
|
2666
2763
|
const { safeAreaPadding } = useThemeContext();
|
|
2667
|
-
return
|
|
2764
|
+
return useMemo4(() => ({
|
|
2668
2765
|
top: safePadding(collisionPadding, safeAreaPadding, "top"),
|
|
2669
2766
|
right: safePadding(collisionPadding, safeAreaPadding, "right"),
|
|
2670
2767
|
bottom: safePadding(collisionPadding, safeAreaPadding, "bottom"),
|
|
@@ -2702,8 +2799,8 @@ var ContextMenuViewport = /* @__PURE__ */ forwardRef18(({ classNames, asChild, c
|
|
|
2702
2799
|
var _effect = _useSignals26();
|
|
2703
2800
|
try {
|
|
2704
2801
|
const { tx } = useThemeContext();
|
|
2705
|
-
const
|
|
2706
|
-
return /* @__PURE__ */ React26.createElement(
|
|
2802
|
+
const Root8 = asChild ? Slot9 : Primitive9.div;
|
|
2803
|
+
return /* @__PURE__ */ React26.createElement(Root8, {
|
|
2707
2804
|
...props,
|
|
2708
2805
|
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
2709
2806
|
ref: forwardedRef
|
|
@@ -2805,7 +2902,7 @@ import { createMenuScope } from "@radix-ui/react-menu";
|
|
|
2805
2902
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
2806
2903
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
2807
2904
|
import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
|
|
2808
|
-
import React27, { forwardRef as forwardRef19, useCallback as
|
|
2905
|
+
import React27, { forwardRef as forwardRef19, useCallback as useCallback10, useEffect as useEffect7, useMemo as useMemo5, useRef as useRef3 } from "react";
|
|
2809
2906
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
2810
2907
|
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope3(DROPDOWN_MENU_NAME, [
|
|
2811
2908
|
createMenuScope
|
|
@@ -2830,7 +2927,7 @@ var DropdownMenuRoot = (props) => {
|
|
|
2830
2927
|
contentId: useId3(),
|
|
2831
2928
|
open,
|
|
2832
2929
|
onOpenChange: setOpen,
|
|
2833
|
-
onOpenToggle:
|
|
2930
|
+
onOpenToggle: useCallback10(() => setOpen((prevOpen) => !prevOpen), [
|
|
2834
2931
|
setOpen
|
|
2835
2932
|
]),
|
|
2836
2933
|
modal
|
|
@@ -2910,7 +3007,7 @@ var DropdownMenuVirtualTrigger = (props) => {
|
|
|
2910
3007
|
const { __scopeDropdownMenu, virtualRef } = props;
|
|
2911
3008
|
const context = useDropdownMenuContext(VIRTUAL_TRIGGER_NAME, __scopeDropdownMenu);
|
|
2912
3009
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
2913
|
-
|
|
3010
|
+
useEffect7(() => {
|
|
2914
3011
|
if (virtualRef.current) {
|
|
2915
3012
|
context.triggerRef.current = virtualRef.current;
|
|
2916
3013
|
}
|
|
@@ -2943,8 +3040,8 @@ var DropdownMenuViewport = /* @__PURE__ */ forwardRef19(({ classNames, asChild,
|
|
|
2943
3040
|
var _effect = _useSignals27();
|
|
2944
3041
|
try {
|
|
2945
3042
|
const { tx } = useThemeContext();
|
|
2946
|
-
const
|
|
2947
|
-
return /* @__PURE__ */ React27.createElement(
|
|
3043
|
+
const Root8 = asChild ? Slot10 : Primitive10.div;
|
|
3044
|
+
return /* @__PURE__ */ React27.createElement(Root8, {
|
|
2948
3045
|
...props,
|
|
2949
3046
|
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
2950
3047
|
ref: forwardedRef
|
|
@@ -2957,18 +3054,35 @@ var CONTENT_NAME2 = "DropdownMenuContent";
|
|
|
2957
3054
|
var DropdownMenuContent = /* @__PURE__ */ forwardRef19((props, forwardedRef) => {
|
|
2958
3055
|
var _effect = _useSignals27();
|
|
2959
3056
|
try {
|
|
2960
|
-
const { __scopeDropdownMenu, classNames, collisionPadding = 8, ...contentProps } = props;
|
|
3057
|
+
const { __scopeDropdownMenu, classNames, collisionPadding = 8, collisionBoundary, ...contentProps } = props;
|
|
2961
3058
|
const { tx } = useThemeContext();
|
|
2962
3059
|
const context = useDropdownMenuContext(CONTENT_NAME2, __scopeDropdownMenu);
|
|
2963
3060
|
const elevation = useElevationContext();
|
|
2964
3061
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
2965
3062
|
const hasInteractedOutsideRef = useRef3(false);
|
|
2966
3063
|
const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
|
|
3064
|
+
const computedCollisionBoundary = useMemo5(() => {
|
|
3065
|
+
const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
|
|
3066
|
+
return closestBoundary ? Array.isArray(collisionBoundary) ? [
|
|
3067
|
+
closestBoundary,
|
|
3068
|
+
...collisionBoundary
|
|
3069
|
+
] : collisionBoundary ? [
|
|
3070
|
+
closestBoundary,
|
|
3071
|
+
collisionBoundary
|
|
3072
|
+
] : [
|
|
3073
|
+
closestBoundary
|
|
3074
|
+
] : collisionBoundary;
|
|
3075
|
+
}, [
|
|
3076
|
+
context.open,
|
|
3077
|
+
collisionBoundary,
|
|
3078
|
+
context.triggerRef.current
|
|
3079
|
+
]);
|
|
2967
3080
|
return /* @__PURE__ */ React27.createElement(MenuPrimitive.Content, {
|
|
2968
3081
|
id: context.contentId,
|
|
2969
3082
|
"aria-labelledby": context.triggerId,
|
|
2970
3083
|
...menuScope,
|
|
2971
3084
|
...contentProps,
|
|
3085
|
+
collisionBoundary: computedCollisionBoundary,
|
|
2972
3086
|
collisionPadding: safeCollisionPadding,
|
|
2973
3087
|
ref: forwardedRef,
|
|
2974
3088
|
onCloseAutoFocus: composeEventHandlers2(props.onCloseAutoFocus, (event) => {
|
|
@@ -3270,12 +3384,12 @@ var MessageRoot = /* @__PURE__ */ forwardRef20(({ asChild, valence = "neutral",
|
|
|
3270
3384
|
const titleId = useId4("message__title", propsTitleId);
|
|
3271
3385
|
const descriptionId = useId4("message__description", propsDescriptionId);
|
|
3272
3386
|
const elevation = useElevationContext(propsElevation);
|
|
3273
|
-
const
|
|
3387
|
+
const Root8 = asChild ? Slot11 : Primitive11.div;
|
|
3274
3388
|
return /* @__PURE__ */ React28.createElement(MessageProvider, {
|
|
3275
3389
|
titleId,
|
|
3276
3390
|
descriptionId,
|
|
3277
3391
|
valence
|
|
3278
|
-
}, /* @__PURE__ */ React28.createElement(
|
|
3392
|
+
}, /* @__PURE__ */ React28.createElement(Root8, {
|
|
3279
3393
|
role: valence === "neutral" ? "paragraph" : "alert",
|
|
3280
3394
|
...props,
|
|
3281
3395
|
className: tx("message.root", "message", {
|
|
@@ -3297,8 +3411,8 @@ var MessageTitle = /* @__PURE__ */ forwardRef20(({ asChild, classNames, children
|
|
|
3297
3411
|
try {
|
|
3298
3412
|
const { tx } = useThemeContext();
|
|
3299
3413
|
const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
3300
|
-
const
|
|
3301
|
-
return /* @__PURE__ */ React28.createElement(
|
|
3414
|
+
const Root8 = asChild ? Slot11 : Primitive11.h2;
|
|
3415
|
+
return /* @__PURE__ */ React28.createElement(Root8, {
|
|
3302
3416
|
...props,
|
|
3303
3417
|
className: tx("message.title", "message__title", {}, classNames),
|
|
3304
3418
|
id: titleId,
|
|
@@ -3321,8 +3435,8 @@ var MessageContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, childr
|
|
|
3321
3435
|
try {
|
|
3322
3436
|
const { tx } = useThemeContext();
|
|
3323
3437
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
3324
|
-
const
|
|
3325
|
-
return /* @__PURE__ */ React28.createElement(
|
|
3438
|
+
const Root8 = asChild ? Slot11 : Primitive11.p;
|
|
3439
|
+
return /* @__PURE__ */ React28.createElement(Root8, {
|
|
3326
3440
|
...props,
|
|
3327
3441
|
className: tx("message.content", "message__content", {}, classNames),
|
|
3328
3442
|
id: descriptionId,
|
|
@@ -3357,7 +3471,7 @@ import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
|
3357
3471
|
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
3358
3472
|
import { useControllableState as useControllableState6 } from "@radix-ui/react-use-controllable-state";
|
|
3359
3473
|
import { hideOthers } from "aria-hidden";
|
|
3360
|
-
import React29, { forwardRef as forwardRef21, useCallback as
|
|
3474
|
+
import React29, { forwardRef as forwardRef21, useCallback as useCallback11, useEffect as useEffect8, useMemo as useMemo6, useRef as useRef4, useState as useState9 } from "react";
|
|
3361
3475
|
import { RemoveScroll } from "react-remove-scroll";
|
|
3362
3476
|
var POPOVER_NAME = "Popover";
|
|
3363
3477
|
var [createPopoverContext, createPopoverScope] = createContextScope4(POPOVER_NAME, [
|
|
@@ -3371,7 +3485,7 @@ var PopoverRoot = (props) => {
|
|
|
3371
3485
|
const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
|
|
3372
3486
|
const popperScope = usePopperScope2(__scopePopover);
|
|
3373
3487
|
const triggerRef = useRef4(null);
|
|
3374
|
-
const [hasCustomAnchor, setHasCustomAnchor] =
|
|
3488
|
+
const [hasCustomAnchor, setHasCustomAnchor] = useState9(false);
|
|
3375
3489
|
const [open = false, setOpen] = useControllableState6({
|
|
3376
3490
|
prop: openProp,
|
|
3377
3491
|
defaultProp: defaultOpen,
|
|
@@ -3383,12 +3497,12 @@ var PopoverRoot = (props) => {
|
|
|
3383
3497
|
triggerRef,
|
|
3384
3498
|
open,
|
|
3385
3499
|
onOpenChange: setOpen,
|
|
3386
|
-
onOpenToggle:
|
|
3500
|
+
onOpenToggle: useCallback11(() => setOpen((prevOpen) => !prevOpen), [
|
|
3387
3501
|
setOpen
|
|
3388
3502
|
]),
|
|
3389
3503
|
hasCustomAnchor,
|
|
3390
|
-
onCustomAnchorAdd:
|
|
3391
|
-
onCustomAnchorRemove:
|
|
3504
|
+
onCustomAnchorAdd: useCallback11(() => setHasCustomAnchor(true), []),
|
|
3505
|
+
onCustomAnchorRemove: useCallback11(() => setHasCustomAnchor(false), []),
|
|
3392
3506
|
modal
|
|
3393
3507
|
}, children));
|
|
3394
3508
|
} finally {
|
|
@@ -3404,7 +3518,7 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef21((props, forwardedRef) => {
|
|
|
3404
3518
|
const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
|
|
3405
3519
|
const popperScope = usePopperScope2(__scopePopover);
|
|
3406
3520
|
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
3407
|
-
|
|
3521
|
+
useEffect8(() => {
|
|
3408
3522
|
onCustomAnchorAdd();
|
|
3409
3523
|
return () => onCustomAnchorRemove();
|
|
3410
3524
|
}, [
|
|
@@ -3455,7 +3569,7 @@ var PopoverVirtualTrigger = (props) => {
|
|
|
3455
3569
|
const { __scopePopover, virtualRef } = props;
|
|
3456
3570
|
const context = usePopoverContext(VIRTUAL_TRIGGER_NAME2, __scopePopover);
|
|
3457
3571
|
const popperScope = usePopperScope2(__scopePopover);
|
|
3458
|
-
|
|
3572
|
+
useEffect8(() => {
|
|
3459
3573
|
if (virtualRef.current) {
|
|
3460
3574
|
context.triggerRef.current = virtualRef.current;
|
|
3461
3575
|
}
|
|
@@ -3520,7 +3634,7 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef21((props, forwardedRef) =>
|
|
|
3520
3634
|
const contentRef = useRef4(null);
|
|
3521
3635
|
const composedRefs = useComposedRefs2(forwardedRef, contentRef);
|
|
3522
3636
|
const isRightClickOutsideRef = useRef4(false);
|
|
3523
|
-
|
|
3637
|
+
useEffect8(() => {
|
|
3524
3638
|
const content = contentRef.current;
|
|
3525
3639
|
if (content) {
|
|
3526
3640
|
return hideOthers(content);
|
|
@@ -3607,13 +3721,29 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef21((props, forwardedRef)
|
|
|
3607
3721
|
var PopoverContentImpl = /* @__PURE__ */ forwardRef21((props, forwardedRef) => {
|
|
3608
3722
|
var _effect = _useSignals29();
|
|
3609
3723
|
try {
|
|
3610
|
-
const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, collisionPadding = 8, classNames, ...contentProps } = props;
|
|
3724
|
+
const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, collisionPadding = 8, collisionBoundary, classNames, ...contentProps } = props;
|
|
3611
3725
|
const context = usePopoverContext(CONTENT_NAME3, __scopePopover);
|
|
3612
3726
|
const popperScope = usePopperScope2(__scopePopover);
|
|
3613
3727
|
const { tx } = useThemeContext();
|
|
3614
3728
|
const elevation = useElevationContext();
|
|
3615
3729
|
const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
|
|
3616
3730
|
useFocusGuards();
|
|
3731
|
+
const computedCollisionBoundary = useMemo6(() => {
|
|
3732
|
+
const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
|
|
3733
|
+
return closestBoundary ? Array.isArray(collisionBoundary) ? [
|
|
3734
|
+
closestBoundary,
|
|
3735
|
+
...collisionBoundary
|
|
3736
|
+
] : collisionBoundary ? [
|
|
3737
|
+
closestBoundary,
|
|
3738
|
+
collisionBoundary
|
|
3739
|
+
] : [
|
|
3740
|
+
closestBoundary
|
|
3741
|
+
] : collisionBoundary;
|
|
3742
|
+
}, [
|
|
3743
|
+
context.open,
|
|
3744
|
+
collisionBoundary,
|
|
3745
|
+
context.triggerRef.current
|
|
3746
|
+
]);
|
|
3617
3747
|
return /* @__PURE__ */ React29.createElement(FocusScope, {
|
|
3618
3748
|
asChild: true,
|
|
3619
3749
|
loop: true,
|
|
@@ -3635,13 +3765,14 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef21((props, forwardedRef) => {
|
|
|
3635
3765
|
...popperScope,
|
|
3636
3766
|
...contentProps,
|
|
3637
3767
|
collisionPadding: safeCollisionPadding,
|
|
3768
|
+
collisionBoundary: computedCollisionBoundary,
|
|
3638
3769
|
className: tx("popover.content", "popover", {
|
|
3639
3770
|
elevation
|
|
3640
3771
|
}, classNames),
|
|
3641
3772
|
ref: forwardedRef,
|
|
3642
3773
|
style: {
|
|
3643
3774
|
...contentProps.style,
|
|
3644
|
-
//
|
|
3775
|
+
// Re-namespace exposed content custom properties.
|
|
3645
3776
|
...{
|
|
3646
3777
|
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3647
3778
|
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
@@ -3694,8 +3825,8 @@ var PopoverViewport = /* @__PURE__ */ forwardRef21(({ classNames, asChild, const
|
|
|
3694
3825
|
var _effect = _useSignals29();
|
|
3695
3826
|
try {
|
|
3696
3827
|
const { tx } = useThemeContext();
|
|
3697
|
-
const
|
|
3698
|
-
return /* @__PURE__ */ React29.createElement(
|
|
3828
|
+
const Root8 = asChild ? Slot12 : Primitive12.div;
|
|
3829
|
+
return /* @__PURE__ */ React29.createElement(Root8, {
|
|
3699
3830
|
...props,
|
|
3700
3831
|
className: tx("popover.viewport", "popover__viewport", {
|
|
3701
3832
|
constrainInline,
|
|
@@ -3830,28 +3961,190 @@ var ScrollArea = {
|
|
|
3830
3961
|
Corner: ScrollAreaCorner
|
|
3831
3962
|
};
|
|
3832
3963
|
|
|
3833
|
-
// src/components/
|
|
3964
|
+
// src/components/ScrollContainer/ScrollContainer.tsx
|
|
3834
3965
|
import { useSignals as _useSignals32 } from "@preact-signals/safe-react/tracking";
|
|
3966
|
+
import { useState as useState10 } from "@preact-signals/safe-react/react";
|
|
3967
|
+
import { createContext as createContext12 } from "@radix-ui/react-context";
|
|
3968
|
+
import React32, { forwardRef as forwardRef24, useCallback as useCallback12, useEffect as useEffect9, useImperativeHandle, useMemo as useMemo7, useRef as useRef5 } from "react";
|
|
3969
|
+
import { addEventListener, combine } from "@dxos/async";
|
|
3970
|
+
import { invariant } from "@dxos/invariant";
|
|
3971
|
+
import { useForwardedRef as useForwardedRef2 } from "@dxos/react-hooks";
|
|
3972
|
+
import { mx as mx5 } from "@dxos/react-ui-theme";
|
|
3973
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/ui/react-ui/src/components/ScrollContainer/ScrollContainer.tsx";
|
|
3974
|
+
var isBottom = (el) => {
|
|
3975
|
+
return !!(el && el.scrollHeight - el.scrollTop === el.clientHeight);
|
|
3976
|
+
};
|
|
3977
|
+
var [ScrollContainerProvider, useScrollContainerContext] = createContext12("ScrollContainer");
|
|
3978
|
+
var Root5 = /* @__PURE__ */ forwardRef24(({ children, classNames, pin, fade }, forwardedRef) => {
|
|
3979
|
+
var _effect = _useSignals32();
|
|
3980
|
+
try {
|
|
3981
|
+
const scrollerRef = useRef5(null);
|
|
3982
|
+
const autoScrollRef = useRef5(false);
|
|
3983
|
+
const [overflow, setOverflow] = useState10(false);
|
|
3984
|
+
const [pinned, setPinned] = useState10(pin);
|
|
3985
|
+
const timeoutRef = useRef5(void 0);
|
|
3986
|
+
const scrollToBottom = useCallback12((behavior = "instant") => {
|
|
3987
|
+
if (scrollerRef.current) {
|
|
3988
|
+
autoScrollRef.current = true;
|
|
3989
|
+
scrollerRef.current.classList.add("scrollbar-none");
|
|
3990
|
+
scrollerRef.current.scrollTo({
|
|
3991
|
+
top: scrollerRef.current.scrollHeight,
|
|
3992
|
+
behavior
|
|
3993
|
+
});
|
|
3994
|
+
clearTimeout(timeoutRef.current);
|
|
3995
|
+
if (behavior !== "instant") {
|
|
3996
|
+
timeoutRef.current = setTimeout(() => {
|
|
3997
|
+
scrollerRef.current?.classList.remove("scrollbar-none");
|
|
3998
|
+
autoScrollRef.current = false;
|
|
3999
|
+
}, 500);
|
|
4000
|
+
}
|
|
4001
|
+
setPinned(true);
|
|
4002
|
+
}
|
|
4003
|
+
}, []);
|
|
4004
|
+
const controller = useMemo7(() => ({
|
|
4005
|
+
viewport: scrollerRef.current,
|
|
4006
|
+
scrollToTop: () => {
|
|
4007
|
+
invariant(scrollerRef.current, void 0, {
|
|
4008
|
+
F: __dxlog_file2,
|
|
4009
|
+
L: 92,
|
|
4010
|
+
S: void 0,
|
|
4011
|
+
A: [
|
|
4012
|
+
"scrollerRef.current",
|
|
4013
|
+
""
|
|
4014
|
+
]
|
|
4015
|
+
});
|
|
4016
|
+
scrollerRef.current.scrollTo({
|
|
4017
|
+
top: 0,
|
|
4018
|
+
behavior: "smooth"
|
|
4019
|
+
});
|
|
4020
|
+
setPinned(false);
|
|
4021
|
+
},
|
|
4022
|
+
scrollToBottom: () => {
|
|
4023
|
+
scrollToBottom("smooth");
|
|
4024
|
+
}
|
|
4025
|
+
}), [
|
|
4026
|
+
scrollToBottom,
|
|
4027
|
+
scrollerRef.current
|
|
4028
|
+
]);
|
|
4029
|
+
useImperativeHandle(forwardedRef, () => controller, [
|
|
4030
|
+
controller
|
|
4031
|
+
]);
|
|
4032
|
+
useEffect9(() => {
|
|
4033
|
+
if (!scrollerRef.current) {
|
|
4034
|
+
return;
|
|
4035
|
+
}
|
|
4036
|
+
return combine(
|
|
4037
|
+
// Check if user scrolls.
|
|
4038
|
+
addEventListener(scrollerRef.current, "wheel", () => {
|
|
4039
|
+
setPinned(isBottom(scrollerRef.current));
|
|
4040
|
+
}),
|
|
4041
|
+
// Check if scrolls.
|
|
4042
|
+
addEventListener(scrollerRef.current, "scroll", () => {
|
|
4043
|
+
setOverflow((scrollerRef.current?.scrollTop ?? 0) > 0);
|
|
4044
|
+
})
|
|
4045
|
+
);
|
|
4046
|
+
}, []);
|
|
4047
|
+
return /* @__PURE__ */ React32.createElement(ScrollContainerProvider, {
|
|
4048
|
+
pinned,
|
|
4049
|
+
controller,
|
|
4050
|
+
scrollToBottom
|
|
4051
|
+
}, /* @__PURE__ */ React32.createElement("div", {
|
|
4052
|
+
className: "relative grid flex-1 min-bs-0 overflow-hidden"
|
|
4053
|
+
}, fade && /* @__PURE__ */ React32.createElement("div", {
|
|
4054
|
+
role: "none",
|
|
4055
|
+
"data-visible": overflow,
|
|
4056
|
+
className: mx5(
|
|
4057
|
+
// NOTE: Gradients may not be visible with dark reader extensions.
|
|
4058
|
+
"z-10 absolute block-start-0 inset-inline-0 bs-24 is-full",
|
|
4059
|
+
'opacity-0 duration-200 transition-opacity data-[visible="true"]:opacity-100',
|
|
4060
|
+
"bg-gradient-to-b from-[--surface-bg] to-transparent pointer-events-none"
|
|
4061
|
+
)
|
|
4062
|
+
}), /* @__PURE__ */ React32.createElement("div", {
|
|
4063
|
+
className: mx5("flex flex-col min-bs-0 overflow-y-auto scrollbar-thin", classNames),
|
|
4064
|
+
ref: scrollerRef
|
|
4065
|
+
}, children)));
|
|
4066
|
+
} finally {
|
|
4067
|
+
_effect.f();
|
|
4068
|
+
}
|
|
4069
|
+
});
|
|
4070
|
+
Root5.displayName = "ScrollContainer.Root";
|
|
4071
|
+
var Viewport = /* @__PURE__ */ forwardRef24(({ classNames, children, ...props }, forwardedRef) => {
|
|
4072
|
+
var _effect = _useSignals32();
|
|
4073
|
+
try {
|
|
4074
|
+
const contentRef = useForwardedRef2(forwardedRef);
|
|
4075
|
+
const { pinned, scrollToBottom } = useScrollContainerContext(Viewport.displayName);
|
|
4076
|
+
useEffect9(() => {
|
|
4077
|
+
if (!pinned || !contentRef.current) {
|
|
4078
|
+
return;
|
|
4079
|
+
}
|
|
4080
|
+
const resizeObserver = new ResizeObserver(() => scrollToBottom());
|
|
4081
|
+
scrollToBottom("instant");
|
|
4082
|
+
resizeObserver.observe(contentRef.current);
|
|
4083
|
+
return () => {
|
|
4084
|
+
resizeObserver.disconnect();
|
|
4085
|
+
};
|
|
4086
|
+
}, [
|
|
4087
|
+
pinned,
|
|
4088
|
+
scrollToBottom
|
|
4089
|
+
]);
|
|
4090
|
+
return /* @__PURE__ */ React32.createElement("div", {
|
|
4091
|
+
className: mx5("is-full", classNames),
|
|
4092
|
+
...props,
|
|
4093
|
+
ref: contentRef
|
|
4094
|
+
}, children);
|
|
4095
|
+
} finally {
|
|
4096
|
+
_effect.f();
|
|
4097
|
+
}
|
|
4098
|
+
});
|
|
4099
|
+
Viewport.displayName = "ScrollContainer.Viewport";
|
|
4100
|
+
var ScrollDownButton = ({ classNames }) => {
|
|
4101
|
+
var _effect = _useSignals32();
|
|
4102
|
+
try {
|
|
4103
|
+
const { pinned, scrollToBottom } = useScrollContainerContext(ScrollDownButton.displayName);
|
|
4104
|
+
return /* @__PURE__ */ React32.createElement("div", {
|
|
4105
|
+
role: "none",
|
|
4106
|
+
className: mx5("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
|
|
4107
|
+
}, /* @__PURE__ */ React32.createElement(IconButton, {
|
|
4108
|
+
variant: "primary",
|
|
4109
|
+
icon: "ph--arrow-down--regular",
|
|
4110
|
+
iconOnly: true,
|
|
4111
|
+
size: 4,
|
|
4112
|
+
label: "Scroll down",
|
|
4113
|
+
onClick: () => scrollToBottom()
|
|
4114
|
+
}));
|
|
4115
|
+
} finally {
|
|
4116
|
+
_effect.f();
|
|
4117
|
+
}
|
|
4118
|
+
};
|
|
4119
|
+
ScrollDownButton.displayName = "ScrollContainer.ScrollDownButton";
|
|
4120
|
+
var ScrollContainer = {
|
|
4121
|
+
Root: Root5,
|
|
4122
|
+
Viewport,
|
|
4123
|
+
ScrollDownButton
|
|
4124
|
+
};
|
|
4125
|
+
|
|
4126
|
+
// src/components/Select/Select.tsx
|
|
4127
|
+
import { useSignals as _useSignals33 } from "@preact-signals/safe-react/tracking";
|
|
3835
4128
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3836
|
-
import
|
|
4129
|
+
import React33, { forwardRef as forwardRef25 } from "react";
|
|
3837
4130
|
var SelectRoot = SelectPrimitive.Root;
|
|
3838
4131
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
3839
4132
|
var SelectValue = SelectPrimitive.Value;
|
|
3840
4133
|
var SelectIcon = SelectPrimitive.Icon;
|
|
3841
4134
|
var SelectPortal = SelectPrimitive.Portal;
|
|
3842
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
3843
|
-
var _effect =
|
|
4135
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
|
|
4136
|
+
var _effect = _useSignals33();
|
|
3844
4137
|
try {
|
|
3845
|
-
return /* @__PURE__ */
|
|
4138
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Trigger, {
|
|
3846
4139
|
asChild: true,
|
|
3847
4140
|
ref: forwardedRef
|
|
3848
|
-
}, /* @__PURE__ */
|
|
4141
|
+
}, /* @__PURE__ */ React33.createElement(Button, props, /* @__PURE__ */ React33.createElement(SelectPrimitive.Value, {
|
|
3849
4142
|
placeholder
|
|
3850
|
-
}, children), /* @__PURE__ */
|
|
3851
|
-
className: "
|
|
3852
|
-
}), /* @__PURE__ */
|
|
4143
|
+
}, children), /* @__PURE__ */ React33.createElement("span", {
|
|
4144
|
+
className: "is-1 flex-1"
|
|
4145
|
+
}), /* @__PURE__ */ React33.createElement(SelectPrimitive.Icon, {
|
|
3853
4146
|
asChild: true
|
|
3854
|
-
}, /* @__PURE__ */
|
|
4147
|
+
}, /* @__PURE__ */ React33.createElement(Icon, {
|
|
3855
4148
|
size: 3,
|
|
3856
4149
|
icon: "ph--caret-down--bold"
|
|
3857
4150
|
}))));
|
|
@@ -3859,13 +4152,13 @@ var SelectTriggerButton = /* @__PURE__ */ forwardRef24(({ children, placeholder,
|
|
|
3859
4152
|
_effect.f();
|
|
3860
4153
|
}
|
|
3861
4154
|
});
|
|
3862
|
-
var SelectContent = /* @__PURE__ */
|
|
3863
|
-
var _effect =
|
|
4155
|
+
var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
|
|
4156
|
+
var _effect = _useSignals33();
|
|
3864
4157
|
try {
|
|
3865
4158
|
const { tx } = useThemeContext();
|
|
3866
4159
|
const elevation = useElevationContext();
|
|
3867
4160
|
const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
|
|
3868
|
-
return /* @__PURE__ */
|
|
4161
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Content, {
|
|
3869
4162
|
...props,
|
|
3870
4163
|
"data-arrow-keys": "up down",
|
|
3871
4164
|
collisionPadding: safeCollisionPadding,
|
|
@@ -3879,15 +4172,15 @@ var SelectContent = /* @__PURE__ */ forwardRef24(({ classNames, children, collis
|
|
|
3879
4172
|
_effect.f();
|
|
3880
4173
|
}
|
|
3881
4174
|
});
|
|
3882
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
3883
|
-
var _effect =
|
|
4175
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
4176
|
+
var _effect = _useSignals33();
|
|
3884
4177
|
try {
|
|
3885
4178
|
const { tx } = useThemeContext();
|
|
3886
|
-
return /* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
3887
4180
|
...props,
|
|
3888
4181
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
3889
4182
|
ref: forwardedRef
|
|
3890
|
-
}, children ?? /* @__PURE__ */
|
|
4183
|
+
}, children ?? /* @__PURE__ */ React33.createElement(Icon, {
|
|
3891
4184
|
size: 3,
|
|
3892
4185
|
icon: "ph--caret-up--bold"
|
|
3893
4186
|
}));
|
|
@@ -3895,15 +4188,15 @@ var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef24(({ classNames, children
|
|
|
3895
4188
|
_effect.f();
|
|
3896
4189
|
}
|
|
3897
4190
|
});
|
|
3898
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
3899
|
-
var _effect =
|
|
4191
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
4192
|
+
var _effect = _useSignals33();
|
|
3900
4193
|
try {
|
|
3901
4194
|
const { tx } = useThemeContext();
|
|
3902
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
3903
4196
|
...props,
|
|
3904
4197
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
3905
4198
|
ref: forwardedRef
|
|
3906
|
-
}, children ?? /* @__PURE__ */
|
|
4199
|
+
}, children ?? /* @__PURE__ */ React33.createElement(Icon, {
|
|
3907
4200
|
size: 3,
|
|
3908
4201
|
icon: "ph--caret-down--bold"
|
|
3909
4202
|
}));
|
|
@@ -3911,11 +4204,11 @@ var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef24(({ classNames, childr
|
|
|
3911
4204
|
_effect.f();
|
|
3912
4205
|
}
|
|
3913
4206
|
});
|
|
3914
|
-
var SelectViewport2 = /* @__PURE__ */
|
|
3915
|
-
var _effect =
|
|
4207
|
+
var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
4208
|
+
var _effect = _useSignals33();
|
|
3916
4209
|
try {
|
|
3917
4210
|
const { tx } = useThemeContext();
|
|
3918
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.SelectViewport, {
|
|
3919
4212
|
...props,
|
|
3920
4213
|
className: tx("select.viewport", "select__viewport", {}, classNames),
|
|
3921
4214
|
ref: forwardedRef
|
|
@@ -3924,11 +4217,11 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef24(({ classNames, asChild, child
|
|
|
3924
4217
|
_effect.f();
|
|
3925
4218
|
}
|
|
3926
4219
|
});
|
|
3927
|
-
var SelectItem = /* @__PURE__ */
|
|
3928
|
-
var _effect =
|
|
4220
|
+
var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
4221
|
+
var _effect = _useSignals33();
|
|
3929
4222
|
try {
|
|
3930
4223
|
const { tx } = useThemeContext();
|
|
3931
|
-
return /* @__PURE__ */
|
|
4224
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
|
|
3932
4225
|
...props,
|
|
3933
4226
|
className: tx("select.item", "option", {}, classNames),
|
|
3934
4227
|
ref: forwardedRef
|
|
@@ -3938,11 +4231,11 @@ var SelectItem = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, forward
|
|
|
3938
4231
|
}
|
|
3939
4232
|
});
|
|
3940
4233
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
3941
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
3942
|
-
var _effect =
|
|
4234
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
4235
|
+
var _effect = _useSignals33();
|
|
3943
4236
|
try {
|
|
3944
4237
|
const { tx } = useThemeContext();
|
|
3945
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemIndicator, {
|
|
3946
4239
|
...props,
|
|
3947
4240
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
3948
4241
|
ref: forwardedRef
|
|
@@ -3951,17 +4244,17 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef24(({ classNames, children,
|
|
|
3951
4244
|
_effect.f();
|
|
3952
4245
|
}
|
|
3953
4246
|
});
|
|
3954
|
-
var SelectOption = /* @__PURE__ */
|
|
3955
|
-
var _effect =
|
|
4247
|
+
var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
|
|
4248
|
+
var _effect = _useSignals33();
|
|
3956
4249
|
try {
|
|
3957
4250
|
const { tx } = useThemeContext();
|
|
3958
|
-
return /* @__PURE__ */
|
|
4251
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Item, {
|
|
3959
4252
|
...props,
|
|
3960
4253
|
className: tx("select.item", "option", {}, classNames),
|
|
3961
4254
|
ref: forwardedRef
|
|
3962
|
-
}, /* @__PURE__ */
|
|
3963
|
-
className: "grow
|
|
3964
|
-
}), /* @__PURE__ */
|
|
4255
|
+
}, /* @__PURE__ */ React33.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React33.createElement("span", {
|
|
4256
|
+
className: "grow is-1"
|
|
4257
|
+
}), /* @__PURE__ */ React33.createElement(Icon, {
|
|
3965
4258
|
icon: "ph--check--regular"
|
|
3966
4259
|
}));
|
|
3967
4260
|
} finally {
|
|
@@ -3970,11 +4263,11 @@ var SelectOption = /* @__PURE__ */ forwardRef24(({ children, classNames, ...prop
|
|
|
3970
4263
|
});
|
|
3971
4264
|
var SelectGroup = SelectPrimitive.Group;
|
|
3972
4265
|
var SelectLabel = SelectPrimitive.Label;
|
|
3973
|
-
var SelectSeparator = /* @__PURE__ */
|
|
3974
|
-
var _effect =
|
|
4266
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
4267
|
+
var _effect = _useSignals33();
|
|
3975
4268
|
try {
|
|
3976
4269
|
const { tx } = useThemeContext();
|
|
3977
|
-
return /* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Separator, {
|
|
3978
4271
|
...props,
|
|
3979
4272
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
3980
4273
|
ref: forwardedRef
|
|
@@ -3983,11 +4276,11 @@ var SelectSeparator = /* @__PURE__ */ forwardRef24(({ classNames, ...props }, fo
|
|
|
3983
4276
|
_effect.f();
|
|
3984
4277
|
}
|
|
3985
4278
|
});
|
|
3986
|
-
var SelectArrow = /* @__PURE__ */
|
|
3987
|
-
var _effect =
|
|
4279
|
+
var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
4280
|
+
var _effect = _useSignals33();
|
|
3988
4281
|
try {
|
|
3989
4282
|
const { tx } = useThemeContext();
|
|
3990
|
-
return /* @__PURE__ */
|
|
4283
|
+
return /* @__PURE__ */ React33.createElement(SelectPrimitive.Arrow, {
|
|
3991
4284
|
...props,
|
|
3992
4285
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
3993
4286
|
ref: forwardedRef
|
|
@@ -4018,14 +4311,14 @@ var Select = {
|
|
|
4018
4311
|
};
|
|
4019
4312
|
|
|
4020
4313
|
// src/components/Separator/Separator.tsx
|
|
4021
|
-
import { useSignals as
|
|
4314
|
+
import { useSignals as _useSignals34 } from "@preact-signals/safe-react/tracking";
|
|
4022
4315
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
4023
|
-
import
|
|
4024
|
-
var Separator4 = /* @__PURE__ */
|
|
4025
|
-
var _effect =
|
|
4316
|
+
import React34, { forwardRef as forwardRef26 } from "react";
|
|
4317
|
+
var Separator4 = /* @__PURE__ */ forwardRef26(({ classNames, orientation = "horizontal", subdued, ...props }, forwardedRef) => {
|
|
4318
|
+
var _effect = _useSignals34();
|
|
4026
4319
|
try {
|
|
4027
4320
|
const { tx } = useThemeContext();
|
|
4028
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ React34.createElement(SeparatorPrimitive, {
|
|
4029
4322
|
orientation,
|
|
4030
4323
|
...props,
|
|
4031
4324
|
className: tx("separator.root", "separator", {
|
|
@@ -4040,16 +4333,16 @@ var Separator4 = /* @__PURE__ */ forwardRef25(({ classNames, orientation = "hori
|
|
|
4040
4333
|
});
|
|
4041
4334
|
|
|
4042
4335
|
// src/components/Tag/Tag.tsx
|
|
4043
|
-
import { useSignals as
|
|
4336
|
+
import { useSignals as _useSignals35 } from "@preact-signals/safe-react/tracking";
|
|
4044
4337
|
import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
|
|
4045
4338
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
4046
|
-
import
|
|
4047
|
-
var Tag = /* @__PURE__ */
|
|
4048
|
-
var _effect =
|
|
4339
|
+
import React35, { forwardRef as forwardRef27 } from "react";
|
|
4340
|
+
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
|
|
4341
|
+
var _effect = _useSignals35();
|
|
4049
4342
|
try {
|
|
4050
4343
|
const { tx } = useThemeContext();
|
|
4051
|
-
const
|
|
4052
|
-
return /* @__PURE__ */
|
|
4344
|
+
const Root8 = asChild ? Slot13 : Primitive13.span;
|
|
4345
|
+
return /* @__PURE__ */ React35.createElement(Root8, {
|
|
4053
4346
|
...props,
|
|
4054
4347
|
className: tx("tag.root", "dx-tag", {
|
|
4055
4348
|
palette
|
|
@@ -4063,17 +4356,17 @@ var Tag = /* @__PURE__ */ forwardRef26(({ asChild, palette = "neutral", classNam
|
|
|
4063
4356
|
});
|
|
4064
4357
|
|
|
4065
4358
|
// src/components/Toast/Toast.tsx
|
|
4066
|
-
import { useSignals as
|
|
4359
|
+
import { useSignals as _useSignals36 } from "@preact-signals/safe-react/tracking";
|
|
4067
4360
|
import { Primitive as Primitive14 } from "@radix-ui/react-primitive";
|
|
4068
4361
|
import { Slot as Slot14 } from "@radix-ui/react-slot";
|
|
4069
4362
|
import { ToastAction as ToastActionPrimitive, ToastClose as ToastClosePrimitive, ToastDescription as ToastDescriptionPrimitive, ToastProvider as ToastProviderPrimitive, Root as ToastRootPrimitive, ToastTitle as ToastTitlePrimitive, ToastViewport as ToastViewportPrimitive } from "@radix-ui/react-toast";
|
|
4070
|
-
import
|
|
4363
|
+
import React36, { forwardRef as forwardRef28 } from "react";
|
|
4071
4364
|
var ToastProvider = ToastProviderPrimitive;
|
|
4072
|
-
var ToastViewport = /* @__PURE__ */
|
|
4073
|
-
var _effect =
|
|
4365
|
+
var ToastViewport = /* @__PURE__ */ forwardRef28(({ classNames, ...props }, forwardedRef) => {
|
|
4366
|
+
var _effect = _useSignals36();
|
|
4074
4367
|
try {
|
|
4075
4368
|
const { tx } = useThemeContext();
|
|
4076
|
-
return /* @__PURE__ */
|
|
4369
|
+
return /* @__PURE__ */ React36.createElement(ToastViewportPrimitive, {
|
|
4077
4370
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
4078
4371
|
ref: forwardedRef
|
|
4079
4372
|
});
|
|
@@ -4081,27 +4374,27 @@ var ToastViewport = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forw
|
|
|
4081
4374
|
_effect.f();
|
|
4082
4375
|
}
|
|
4083
4376
|
});
|
|
4084
|
-
var ToastRoot = /* @__PURE__ */
|
|
4085
|
-
var _effect =
|
|
4377
|
+
var ToastRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
|
|
4378
|
+
var _effect = _useSignals36();
|
|
4086
4379
|
try {
|
|
4087
4380
|
const { tx } = useThemeContext();
|
|
4088
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ React36.createElement(ToastRootPrimitive, {
|
|
4089
4382
|
...props,
|
|
4090
4383
|
className: tx("toast.root", "toast", {}, classNames),
|
|
4091
4384
|
ref: forwardedRef
|
|
4092
|
-
}, /* @__PURE__ */
|
|
4385
|
+
}, /* @__PURE__ */ React36.createElement(ElevationProvider, {
|
|
4093
4386
|
elevation: "toast"
|
|
4094
4387
|
}, children));
|
|
4095
4388
|
} finally {
|
|
4096
4389
|
_effect.f();
|
|
4097
4390
|
}
|
|
4098
4391
|
});
|
|
4099
|
-
var ToastBody = /* @__PURE__ */
|
|
4100
|
-
var _effect =
|
|
4392
|
+
var ToastBody = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
4393
|
+
var _effect = _useSignals36();
|
|
4101
4394
|
try {
|
|
4102
4395
|
const { tx } = useThemeContext();
|
|
4103
|
-
const
|
|
4104
|
-
return /* @__PURE__ */
|
|
4396
|
+
const Root8 = asChild ? Slot14 : Primitive14.div;
|
|
4397
|
+
return /* @__PURE__ */ React36.createElement(Root8, {
|
|
4105
4398
|
...props,
|
|
4106
4399
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
4107
4400
|
ref: forwardedRef
|
|
@@ -4110,12 +4403,12 @@ var ToastBody = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props },
|
|
|
4110
4403
|
_effect.f();
|
|
4111
4404
|
}
|
|
4112
4405
|
});
|
|
4113
|
-
var ToastTitle = /* @__PURE__ */
|
|
4114
|
-
var _effect =
|
|
4406
|
+
var ToastTitle = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
4407
|
+
var _effect = _useSignals36();
|
|
4115
4408
|
try {
|
|
4116
4409
|
const { tx } = useThemeContext();
|
|
4117
|
-
const
|
|
4118
|
-
return /* @__PURE__ */
|
|
4410
|
+
const Root8 = asChild ? Slot14 : ToastTitlePrimitive;
|
|
4411
|
+
return /* @__PURE__ */ React36.createElement(Root8, {
|
|
4119
4412
|
...props,
|
|
4120
4413
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
4121
4414
|
ref: forwardedRef
|
|
@@ -4124,12 +4417,12 @@ var ToastTitle = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...props }
|
|
|
4124
4417
|
_effect.f();
|
|
4125
4418
|
}
|
|
4126
4419
|
});
|
|
4127
|
-
var ToastDescription = /* @__PURE__ */
|
|
4128
|
-
var _effect =
|
|
4420
|
+
var ToastDescription = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
4421
|
+
var _effect = _useSignals36();
|
|
4129
4422
|
try {
|
|
4130
4423
|
const { tx } = useThemeContext();
|
|
4131
|
-
const
|
|
4132
|
-
return /* @__PURE__ */
|
|
4424
|
+
const Root8 = asChild ? Slot14 : ToastDescriptionPrimitive;
|
|
4425
|
+
return /* @__PURE__ */ React36.createElement(Root8, {
|
|
4133
4426
|
...props,
|
|
4134
4427
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
4135
4428
|
ref: forwardedRef
|
|
@@ -4138,12 +4431,12 @@ var ToastDescription = /* @__PURE__ */ forwardRef27(({ asChild, classNames, ...p
|
|
|
4138
4431
|
_effect.f();
|
|
4139
4432
|
}
|
|
4140
4433
|
});
|
|
4141
|
-
var ToastActions = /* @__PURE__ */
|
|
4142
|
-
var _effect =
|
|
4434
|
+
var ToastActions = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
4435
|
+
var _effect = _useSignals36();
|
|
4143
4436
|
try {
|
|
4144
4437
|
const { tx } = useThemeContext();
|
|
4145
|
-
const
|
|
4146
|
-
return /* @__PURE__ */
|
|
4438
|
+
const Root8 = asChild ? Slot14 : Primitive14.div;
|
|
4439
|
+
return /* @__PURE__ */ React36.createElement(Root8, {
|
|
4147
4440
|
...props,
|
|
4148
4441
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
4149
4442
|
ref: forwardedRef
|
|
@@ -4167,31 +4460,39 @@ var Toast = {
|
|
|
4167
4460
|
};
|
|
4168
4461
|
|
|
4169
4462
|
// src/components/Toolbar/Toolbar.tsx
|
|
4170
|
-
import { useSignals as
|
|
4463
|
+
import { useSignals as _useSignals37 } from "@preact-signals/safe-react/tracking";
|
|
4171
4464
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
4172
|
-
import
|
|
4173
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
4174
|
-
var _effect =
|
|
4465
|
+
import React37, { Fragment, forwardRef as forwardRef29 } from "react";
|
|
4466
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef29(({ classNames, children, layoutManaged, textBlockWidth: textBlockWidthParam, disabled, ...props }, forwardedRef) => {
|
|
4467
|
+
var _effect = _useSignals37();
|
|
4175
4468
|
try {
|
|
4176
4469
|
const { tx } = useThemeContext();
|
|
4177
|
-
|
|
4470
|
+
const InnerRoot = textBlockWidthParam ? "div" : Fragment;
|
|
4471
|
+
const innerRootProps = textBlockWidthParam ? {
|
|
4472
|
+
role: "none",
|
|
4473
|
+
className: tx("toolbar.inner", "toolbar", {
|
|
4474
|
+
layoutManaged
|
|
4475
|
+
}, classNames)
|
|
4476
|
+
} : {};
|
|
4477
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Root, {
|
|
4178
4478
|
...props,
|
|
4179
4479
|
"data-arrow-keys": props.orientation === "vertical" ? "up down" : "left right",
|
|
4180
4480
|
className: tx("toolbar.root", "toolbar", {
|
|
4181
|
-
layoutManaged
|
|
4481
|
+
layoutManaged,
|
|
4482
|
+
disabled
|
|
4182
4483
|
}, classNames),
|
|
4183
4484
|
ref: forwardedRef
|
|
4184
|
-
}, children);
|
|
4485
|
+
}, /* @__PURE__ */ React37.createElement(InnerRoot, innerRootProps, children));
|
|
4185
4486
|
} finally {
|
|
4186
4487
|
_effect.f();
|
|
4187
4488
|
}
|
|
4188
4489
|
});
|
|
4189
|
-
var ToolbarButton = /* @__PURE__ */
|
|
4190
|
-
var _effect =
|
|
4490
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
|
|
4491
|
+
var _effect = _useSignals37();
|
|
4191
4492
|
try {
|
|
4192
|
-
return /* @__PURE__ */
|
|
4493
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
4193
4494
|
asChild: true
|
|
4194
|
-
}, /* @__PURE__ */
|
|
4495
|
+
}, /* @__PURE__ */ React37.createElement(Button, {
|
|
4195
4496
|
...props,
|
|
4196
4497
|
ref: forwardedRef
|
|
4197
4498
|
}));
|
|
@@ -4199,12 +4500,12 @@ var ToolbarButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
|
4199
4500
|
_effect.f();
|
|
4200
4501
|
}
|
|
4201
4502
|
});
|
|
4202
|
-
var ToolbarIconButton = /* @__PURE__ */
|
|
4203
|
-
var _effect =
|
|
4503
|
+
var ToolbarIconButton = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
|
|
4504
|
+
var _effect = _useSignals37();
|
|
4204
4505
|
try {
|
|
4205
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
4206
4507
|
asChild: true
|
|
4207
|
-
}, /* @__PURE__ */
|
|
4508
|
+
}, /* @__PURE__ */ React37.createElement(IconButton, {
|
|
4208
4509
|
...props,
|
|
4209
4510
|
ref: forwardedRef
|
|
4210
4511
|
}));
|
|
@@ -4212,12 +4513,12 @@ var ToolbarIconButton = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
|
4212
4513
|
_effect.f();
|
|
4213
4514
|
}
|
|
4214
4515
|
});
|
|
4215
|
-
var ToolbarToggle = /* @__PURE__ */
|
|
4216
|
-
var _effect =
|
|
4516
|
+
var ToolbarToggle = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
|
|
4517
|
+
var _effect = _useSignals37();
|
|
4217
4518
|
try {
|
|
4218
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Button, {
|
|
4219
4520
|
asChild: true
|
|
4220
|
-
}, /* @__PURE__ */
|
|
4521
|
+
}, /* @__PURE__ */ React37.createElement(Toggle, {
|
|
4221
4522
|
...props,
|
|
4222
4523
|
ref: forwardedRef
|
|
4223
4524
|
}));
|
|
@@ -4225,12 +4526,12 @@ var ToolbarToggle = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
|
4225
4526
|
_effect.f();
|
|
4226
4527
|
}
|
|
4227
4528
|
});
|
|
4228
|
-
var ToolbarLink = /* @__PURE__ */
|
|
4229
|
-
var _effect =
|
|
4529
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef29((props, forwardedRef) => {
|
|
4530
|
+
var _effect = _useSignals37();
|
|
4230
4531
|
try {
|
|
4231
|
-
return /* @__PURE__ */
|
|
4532
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Link, {
|
|
4232
4533
|
asChild: true
|
|
4233
|
-
}, /* @__PURE__ */
|
|
4534
|
+
}, /* @__PURE__ */ React37.createElement(Link, {
|
|
4234
4535
|
...props,
|
|
4235
4536
|
ref: forwardedRef
|
|
4236
4537
|
}));
|
|
@@ -4238,13 +4539,13 @@ var ToolbarLink = /* @__PURE__ */ forwardRef28((props, forwardedRef) => {
|
|
|
4238
4539
|
_effect.f();
|
|
4239
4540
|
}
|
|
4240
4541
|
});
|
|
4241
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
4242
|
-
var _effect =
|
|
4542
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef29(({ classNames, children, elevation, ...props }, forwardedRef) => {
|
|
4543
|
+
var _effect = _useSignals37();
|
|
4243
4544
|
try {
|
|
4244
|
-
return /* @__PURE__ */
|
|
4545
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
4245
4546
|
...props,
|
|
4246
4547
|
asChild: true
|
|
4247
|
-
}, /* @__PURE__ */
|
|
4548
|
+
}, /* @__PURE__ */ React37.createElement(ButtonGroup, {
|
|
4248
4549
|
classNames,
|
|
4249
4550
|
children,
|
|
4250
4551
|
elevation,
|
|
@@ -4254,13 +4555,13 @@ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef28(({ classNames, children,
|
|
|
4254
4555
|
_effect.f();
|
|
4255
4556
|
}
|
|
4256
4557
|
});
|
|
4257
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
4258
|
-
var _effect =
|
|
4558
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef29(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
4559
|
+
var _effect = _useSignals37();
|
|
4259
4560
|
try {
|
|
4260
|
-
return /* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
4261
4562
|
...props,
|
|
4262
4563
|
asChild: true
|
|
4263
|
-
}, /* @__PURE__ */
|
|
4564
|
+
}, /* @__PURE__ */ React37.createElement(Button, {
|
|
4264
4565
|
variant,
|
|
4265
4566
|
density,
|
|
4266
4567
|
elevation,
|
|
@@ -4272,13 +4573,13 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef28(({ variant, density, e
|
|
|
4272
4573
|
_effect.f();
|
|
4273
4574
|
}
|
|
4274
4575
|
});
|
|
4275
|
-
var ToolbarToggleGroupIconItem = /* @__PURE__ */
|
|
4276
|
-
var _effect =
|
|
4576
|
+
var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef29(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
|
|
4577
|
+
var _effect = _useSignals37();
|
|
4277
4578
|
try {
|
|
4278
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ React37.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
4279
4580
|
...props,
|
|
4280
4581
|
asChild: true
|
|
4281
|
-
}, /* @__PURE__ */
|
|
4582
|
+
}, /* @__PURE__ */ React37.createElement(IconButton, {
|
|
4282
4583
|
variant,
|
|
4283
4584
|
density,
|
|
4284
4585
|
elevation,
|
|
@@ -4292,15 +4593,15 @@ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef28(({ variant, densit
|
|
|
4292
4593
|
_effect.f();
|
|
4293
4594
|
}
|
|
4294
4595
|
});
|
|
4295
|
-
var ToolbarSeparator = /* @__PURE__ */
|
|
4296
|
-
var _effect =
|
|
4596
|
+
var ToolbarSeparator = /* @__PURE__ */ forwardRef29(({ variant = "line", ...props }, forwardedRef) => {
|
|
4597
|
+
var _effect = _useSignals37();
|
|
4297
4598
|
try {
|
|
4298
|
-
return variant === "line" ? /* @__PURE__ */
|
|
4599
|
+
return variant === "line" ? /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
|
|
4299
4600
|
asChild: true
|
|
4300
|
-
}, /* @__PURE__ */
|
|
4601
|
+
}, /* @__PURE__ */ React37.createElement(Separator4, {
|
|
4301
4602
|
...props,
|
|
4302
4603
|
ref: forwardedRef
|
|
4303
|
-
})) : /* @__PURE__ */
|
|
4604
|
+
})) : /* @__PURE__ */ React37.createElement(ToolbarPrimitive.Separator, {
|
|
4304
4605
|
className: "grow",
|
|
4305
4606
|
ref: forwardedRef
|
|
4306
4607
|
});
|
|
@@ -4357,7 +4658,9 @@ export {
|
|
|
4357
4658
|
ToggleGroupItem,
|
|
4358
4659
|
ToggleGroupIconItem,
|
|
4359
4660
|
useClipboard,
|
|
4661
|
+
Domino,
|
|
4360
4662
|
hasIosKeyboard,
|
|
4663
|
+
usePx,
|
|
4361
4664
|
DensityContext,
|
|
4362
4665
|
DensityProvider,
|
|
4363
4666
|
ElevationContext,
|
|
@@ -4393,10 +4696,12 @@ export {
|
|
|
4393
4696
|
Popover,
|
|
4394
4697
|
Status,
|
|
4395
4698
|
ScrollArea,
|
|
4699
|
+
useScrollContainerContext,
|
|
4700
|
+
ScrollContainer,
|
|
4396
4701
|
Select,
|
|
4397
4702
|
Separator4 as Separator,
|
|
4398
4703
|
Tag,
|
|
4399
4704
|
Toast,
|
|
4400
4705
|
Toolbar
|
|
4401
4706
|
};
|
|
4402
|
-
//# sourceMappingURL=chunk-
|
|
4707
|
+
//# sourceMappingURL=chunk-53MI2QCM.mjs.map
|