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