@tutti-os/ui-system 0.0.6 → 0.0.8
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.
|
@@ -66,6 +66,7 @@ function Badge({
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// src/components/bare-icon-button/bare-icon-button.tsx
|
|
69
|
+
import * as React from "react";
|
|
69
70
|
import { cva as cva2 } from "class-variance-authority";
|
|
70
71
|
import { Slot as Slot2 } from "radix-ui";
|
|
71
72
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
@@ -83,27 +84,26 @@ var bareIconButtonVariants = cva2(
|
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
);
|
|
86
|
-
|
|
87
|
-
className,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
);
|
|
104
|
-
}
|
|
87
|
+
var BareIconButton = React.forwardRef(
|
|
88
|
+
({ className, size = "md", asChild = false, type = "button", ...props }, ref) => {
|
|
89
|
+
const Comp = asChild ? Slot2.Root : "button";
|
|
90
|
+
return /* @__PURE__ */ jsx2(
|
|
91
|
+
Comp,
|
|
92
|
+
{
|
|
93
|
+
ref,
|
|
94
|
+
"data-slot": "bare-icon-button",
|
|
95
|
+
"data-size": size,
|
|
96
|
+
type,
|
|
97
|
+
className: cn(bareIconButtonVariants({ size, className })),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
BareIconButton.displayName = "BareIconButton";
|
|
105
104
|
|
|
106
105
|
// src/components/button/button.tsx
|
|
106
|
+
import * as React2 from "react";
|
|
107
107
|
import { cva as cva3 } from "class-variance-authority";
|
|
108
108
|
import { Slot as Slot3 } from "radix-ui";
|
|
109
109
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
@@ -145,25 +145,29 @@ var buttonVariants = cva3(
|
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
148
|
+
var Button = React2.forwardRef(
|
|
149
|
+
({
|
|
150
|
+
className,
|
|
151
|
+
variant = "default",
|
|
152
|
+
size = "default",
|
|
153
|
+
asChild = false,
|
|
154
|
+
...props
|
|
155
|
+
}, ref) => {
|
|
156
|
+
const Comp = asChild ? Slot3.Root : "button";
|
|
157
|
+
return /* @__PURE__ */ jsx3(
|
|
158
|
+
Comp,
|
|
159
|
+
{
|
|
160
|
+
ref,
|
|
161
|
+
"data-slot": "button",
|
|
162
|
+
"data-variant": variant,
|
|
163
|
+
"data-size": size,
|
|
164
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
165
|
+
...props
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
Button.displayName = "Button";
|
|
167
171
|
|
|
168
172
|
// src/components/card/card.tsx
|
|
169
173
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -290,11 +294,11 @@ function Checkbox({
|
|
|
290
294
|
}
|
|
291
295
|
|
|
292
296
|
// src/components/dialog/dialog.tsx
|
|
293
|
-
import * as
|
|
297
|
+
import * as React3 from "react";
|
|
294
298
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
295
299
|
import { Fragment, jsx as jsx6, jsxs } from "react/jsx-runtime";
|
|
296
300
|
var dialogCloseDurationMs = 150;
|
|
297
|
-
var DialogMotionContext =
|
|
301
|
+
var DialogMotionContext = React3.createContext({
|
|
298
302
|
open: false
|
|
299
303
|
});
|
|
300
304
|
function Dialog({
|
|
@@ -303,11 +307,11 @@ function Dialog({
|
|
|
303
307
|
open,
|
|
304
308
|
...props
|
|
305
309
|
}) {
|
|
306
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
310
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React3.useState(
|
|
307
311
|
defaultOpen ?? false
|
|
308
312
|
);
|
|
309
313
|
const currentOpen = open ?? uncontrolledOpen;
|
|
310
|
-
const handleOpenChange =
|
|
314
|
+
const handleOpenChange = React3.useCallback(
|
|
311
315
|
(nextOpen) => {
|
|
312
316
|
if (open === void 0) {
|
|
313
317
|
setUncontrolledOpen(nextOpen);
|
|
@@ -368,9 +372,9 @@ function DialogContent({
|
|
|
368
372
|
style,
|
|
369
373
|
...props
|
|
370
374
|
}) {
|
|
371
|
-
const { open } =
|
|
372
|
-
const [mounted, setMounted] =
|
|
373
|
-
|
|
375
|
+
const { open } = React3.useContext(DialogMotionContext);
|
|
376
|
+
const [mounted, setMounted] = React3.useState(open);
|
|
377
|
+
React3.useEffect(() => {
|
|
374
378
|
if (open) {
|
|
375
379
|
setMounted(true);
|
|
376
380
|
return void 0;
|
|
@@ -578,7 +582,7 @@ function ConfirmationDialog({
|
|
|
578
582
|
}
|
|
579
583
|
|
|
580
584
|
// src/components/date-picker/date-picker.tsx
|
|
581
|
-
import * as
|
|
585
|
+
import * as React4 from "react";
|
|
582
586
|
import { createPortal } from "react-dom";
|
|
583
587
|
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
584
588
|
var defaultLabels = {
|
|
@@ -668,7 +672,7 @@ function subscribeScrollableAncestors(trigger, onScrollLike) {
|
|
|
668
672
|
}
|
|
669
673
|
return () => cleanups.forEach((dispose) => dispose());
|
|
670
674
|
}
|
|
671
|
-
var DatePicker =
|
|
675
|
+
var DatePicker = React4.forwardRef(
|
|
672
676
|
({
|
|
673
677
|
className,
|
|
674
678
|
value,
|
|
@@ -685,20 +689,20 @@ var DatePicker = React2.forwardRef(
|
|
|
685
689
|
...labels,
|
|
686
690
|
weekdayLabels: labels?.weekdayLabels ?? defaultLabels.weekdayLabels
|
|
687
691
|
};
|
|
688
|
-
const triggerRef =
|
|
689
|
-
const popoverRef =
|
|
690
|
-
const selectedDate =
|
|
691
|
-
const [isOpen, setIsOpen] =
|
|
692
|
-
const [visibleMonth, setVisibleMonth] =
|
|
692
|
+
const triggerRef = React4.useRef(null);
|
|
693
|
+
const popoverRef = React4.useRef(null);
|
|
694
|
+
const selectedDate = React4.useMemo(() => parseDateValue(value), [value]);
|
|
695
|
+
const [isOpen, setIsOpen] = React4.useState(false);
|
|
696
|
+
const [visibleMonth, setVisibleMonth] = React4.useState(
|
|
693
697
|
() => selectedDate ?? /* @__PURE__ */ new Date()
|
|
694
698
|
);
|
|
695
|
-
const [popoverPosition, setPopoverPosition] =
|
|
696
|
-
|
|
699
|
+
const [popoverPosition, setPopoverPosition] = React4.useState(null);
|
|
700
|
+
React4.useEffect(() => {
|
|
697
701
|
if (selectedDate) {
|
|
698
702
|
setVisibleMonth(selectedDate);
|
|
699
703
|
}
|
|
700
704
|
}, [selectedDate]);
|
|
701
|
-
const openPopover =
|
|
705
|
+
const openPopover = React4.useCallback(() => {
|
|
702
706
|
const trigger = triggerRef.current;
|
|
703
707
|
if (!trigger) {
|
|
704
708
|
return;
|
|
@@ -708,7 +712,7 @@ var DatePicker = React2.forwardRef(
|
|
|
708
712
|
);
|
|
709
713
|
setIsOpen(true);
|
|
710
714
|
}, []);
|
|
711
|
-
|
|
715
|
+
React4.useLayoutEffect(() => {
|
|
712
716
|
if (!isOpen) {
|
|
713
717
|
return;
|
|
714
718
|
}
|
|
@@ -725,7 +729,7 @@ var DatePicker = React2.forwardRef(
|
|
|
725
729
|
const rafId = window.requestAnimationFrame(sync);
|
|
726
730
|
return () => window.cancelAnimationFrame(rafId);
|
|
727
731
|
}, [isOpen]);
|
|
728
|
-
|
|
732
|
+
React4.useEffect(() => {
|
|
729
733
|
if (!isOpen) {
|
|
730
734
|
return void 0;
|
|
731
735
|
}
|
|
@@ -772,8 +776,8 @@ var DatePicker = React2.forwardRef(
|
|
|
772
776
|
unsubAncestors();
|
|
773
777
|
};
|
|
774
778
|
}, [isOpen]);
|
|
775
|
-
const today =
|
|
776
|
-
const monthGrid =
|
|
779
|
+
const today = React4.useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
780
|
+
const monthGrid = React4.useMemo(
|
|
777
781
|
() => buildMonthGrid(visibleMonth),
|
|
778
782
|
[visibleMonth]
|
|
779
783
|
);
|
|
@@ -1063,14 +1067,14 @@ function DrawerDescription({
|
|
|
1063
1067
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
1064
1068
|
|
|
1065
1069
|
// src/components/menu-surface/menu-surface.tsx
|
|
1066
|
-
import * as
|
|
1070
|
+
import * as React5 from "react";
|
|
1067
1071
|
import { Slot as Slot4 } from "radix-ui";
|
|
1068
1072
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1069
1073
|
var menuSurfaceClassName = "t-dropdown flex flex-col gap-0.5 rounded-[8px] border border-[var(--border-1)] bg-[var(--background-fronted)] p-1 text-[13px] text-[var(--text-primary)] shadow-panel outline-none";
|
|
1070
1074
|
var menuItemClassName = "relative flex cursor-pointer items-center gap-1.5 rounded-sm px-2 py-1 text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 select-none hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus:bg-[var(--transparency-hover)] focus:text-[var(--text-primary)] data-[highlighted]:bg-[var(--transparency-hover)] data-[highlighted]:text-[var(--text-primary)] data-disabled:pointer-events-none data-disabled:text-[var(--text-disabled)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2";
|
|
1071
1075
|
var menuItemWithIndicatorClassName = `${menuItemClassName} pr-8`;
|
|
1072
1076
|
var menuItemIndicatorClassName = "pointer-events-none absolute right-2 flex size-4 items-center justify-center text-[var(--tutti-purple)]";
|
|
1073
|
-
var MenuSurface =
|
|
1077
|
+
var MenuSurface = React5.forwardRef(
|
|
1074
1078
|
({
|
|
1075
1079
|
asChild = false,
|
|
1076
1080
|
className,
|
|
@@ -1602,7 +1606,7 @@ function ResizableHandle({
|
|
|
1602
1606
|
}
|
|
1603
1607
|
|
|
1604
1608
|
// src/components/scroll-area/scroll-area.tsx
|
|
1605
|
-
import * as
|
|
1609
|
+
import * as React6 from "react";
|
|
1606
1610
|
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1607
1611
|
var MIN_THUMB_SIZE_PX = 24;
|
|
1608
1612
|
function ScrollArea({
|
|
@@ -1698,9 +1702,9 @@ function CustomScrollArea({
|
|
|
1698
1702
|
viewportTestId,
|
|
1699
1703
|
...props
|
|
1700
1704
|
}) {
|
|
1701
|
-
const localViewportRef =
|
|
1702
|
-
const contentRef =
|
|
1703
|
-
const [active, setActive] =
|
|
1705
|
+
const localViewportRef = React6.useRef(null);
|
|
1706
|
+
const contentRef = React6.useRef(null);
|
|
1707
|
+
const [active, setActive] = React6.useState(false);
|
|
1704
1708
|
const alwaysVisible = type === "always" || type === "scroll" || hasAlwaysVisibleScrollbarSelector(className);
|
|
1705
1709
|
return /* @__PURE__ */ jsxs7(
|
|
1706
1710
|
ScrollAreaFrame,
|
|
@@ -1791,7 +1795,7 @@ function ScrollAreaFrame({
|
|
|
1791
1795
|
"data-slot": "scroll-area-content",
|
|
1792
1796
|
style: {
|
|
1793
1797
|
minWidth: "100%",
|
|
1794
|
-
display: "
|
|
1798
|
+
display: "block",
|
|
1795
1799
|
...viewportContentStyle
|
|
1796
1800
|
},
|
|
1797
1801
|
children
|
|
@@ -1808,15 +1812,15 @@ function ScrollAreaScrollbar({
|
|
|
1808
1812
|
orientation,
|
|
1809
1813
|
viewportRef
|
|
1810
1814
|
}) {
|
|
1811
|
-
const trackRef =
|
|
1812
|
-
const thumbRef =
|
|
1813
|
-
const dragStateRef =
|
|
1814
|
-
const frameRef =
|
|
1815
|
-
const scrollableRef =
|
|
1816
|
-
const [dragging, setDragging] =
|
|
1817
|
-
const [scrollable, setScrollable] =
|
|
1818
|
-
const [trackActive, setTrackActive] =
|
|
1819
|
-
const syncScrollbarState =
|
|
1815
|
+
const trackRef = React6.useRef(null);
|
|
1816
|
+
const thumbRef = React6.useRef(null);
|
|
1817
|
+
const dragStateRef = React6.useRef(null);
|
|
1818
|
+
const frameRef = React6.useRef(null);
|
|
1819
|
+
const scrollableRef = React6.useRef(false);
|
|
1820
|
+
const [dragging, setDragging] = React6.useState(false);
|
|
1821
|
+
const [scrollable, setScrollable] = React6.useState(false);
|
|
1822
|
+
const [trackActive, setTrackActive] = React6.useState(false);
|
|
1823
|
+
const syncScrollbarState = React6.useCallback(() => {
|
|
1820
1824
|
const viewport = viewportRef.current;
|
|
1821
1825
|
const track = trackRef.current;
|
|
1822
1826
|
const thumb = thumbRef.current;
|
|
@@ -1855,7 +1859,7 @@ function ScrollAreaScrollbar({
|
|
|
1855
1859
|
}
|
|
1856
1860
|
updateScrollable(true, scrollableRef, setScrollable);
|
|
1857
1861
|
}, [orientation, viewportRef]);
|
|
1858
|
-
const scheduleSync =
|
|
1862
|
+
const scheduleSync = React6.useCallback(() => {
|
|
1859
1863
|
if (frameRef.current !== null) {
|
|
1860
1864
|
return;
|
|
1861
1865
|
}
|
|
@@ -1864,7 +1868,7 @@ function ScrollAreaScrollbar({
|
|
|
1864
1868
|
syncScrollbarState();
|
|
1865
1869
|
});
|
|
1866
1870
|
}, [syncScrollbarState]);
|
|
1867
|
-
const scrollViewportToThumbOffset =
|
|
1871
|
+
const scrollViewportToThumbOffset = React6.useCallback(
|
|
1868
1872
|
(thumbOffset) => {
|
|
1869
1873
|
const viewport = viewportRef.current;
|
|
1870
1874
|
const track = trackRef.current;
|
|
@@ -1891,7 +1895,7 @@ function ScrollAreaScrollbar({
|
|
|
1891
1895
|
},
|
|
1892
1896
|
[orientation, syncScrollbarState, viewportRef]
|
|
1893
1897
|
);
|
|
1894
|
-
const handleTrackPointerDown =
|
|
1898
|
+
const handleTrackPointerDown = React6.useCallback(
|
|
1895
1899
|
(event) => {
|
|
1896
1900
|
if (event.button !== 0 || !scrollableRef.current) {
|
|
1897
1901
|
return;
|
|
@@ -1911,7 +1915,7 @@ function ScrollAreaScrollbar({
|
|
|
1911
1915
|
},
|
|
1912
1916
|
[orientation, scrollViewportToThumbOffset]
|
|
1913
1917
|
);
|
|
1914
|
-
const handleThumbPointerDown =
|
|
1918
|
+
const handleThumbPointerDown = React6.useCallback(
|
|
1915
1919
|
(event) => {
|
|
1916
1920
|
if (event.button !== 0 || !scrollableRef.current) {
|
|
1917
1921
|
return;
|
|
@@ -1943,7 +1947,7 @@ function ScrollAreaScrollbar({
|
|
|
1943
1947
|
},
|
|
1944
1948
|
[orientation, viewportRef]
|
|
1945
1949
|
);
|
|
1946
|
-
|
|
1950
|
+
React6.useEffect(() => {
|
|
1947
1951
|
if (!dragging) {
|
|
1948
1952
|
return;
|
|
1949
1953
|
}
|
|
@@ -1974,7 +1978,7 @@ function ScrollAreaScrollbar({
|
|
|
1974
1978
|
window.removeEventListener("pointerup", handlePointerUp);
|
|
1975
1979
|
};
|
|
1976
1980
|
}, [dragging, orientation, syncScrollbarState, viewportRef]);
|
|
1977
|
-
|
|
1981
|
+
React6.useEffect(() => {
|
|
1978
1982
|
const viewport = viewportRef.current;
|
|
1979
1983
|
if (!viewport) {
|
|
1980
1984
|
updateScrollable(false, scrollableRef, setScrollable);
|
|
@@ -1996,7 +2000,7 @@ function ScrollAreaScrollbar({
|
|
|
1996
2000
|
resizeObserver?.disconnect();
|
|
1997
2001
|
};
|
|
1998
2002
|
}, [contentRef, scheduleSync, syncScrollbarState, viewportRef]);
|
|
1999
|
-
|
|
2003
|
+
React6.useEffect(() => {
|
|
2000
2004
|
scheduleSync();
|
|
2001
2005
|
});
|
|
2002
2006
|
return /* @__PURE__ */ jsx16(
|
|
@@ -2696,7 +2700,7 @@ function Textarea({ className, ...props }) {
|
|
|
2696
2700
|
}
|
|
2697
2701
|
|
|
2698
2702
|
// src/components/toast/toast.tsx
|
|
2699
|
-
import * as
|
|
2703
|
+
import * as React7 from "react";
|
|
2700
2704
|
import { Toast as ToastPrimitive } from "radix-ui";
|
|
2701
2705
|
import { cva as cva5 } from "class-variance-authority";
|
|
2702
2706
|
import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
@@ -2707,7 +2711,7 @@ function ToastProvider({
|
|
|
2707
2711
|
}) {
|
|
2708
2712
|
return /* @__PURE__ */ jsx26(ToastPrimitive.Provider, { duration, ...props });
|
|
2709
2713
|
}
|
|
2710
|
-
var ToastVisualContext =
|
|
2714
|
+
var ToastVisualContext = React7.createContext(null);
|
|
2711
2715
|
var toastStatusIconByVariant = {
|
|
2712
2716
|
destructive: FailedFilledIcon,
|
|
2713
2717
|
success: SuccessFilledIcon
|
|
@@ -2731,7 +2735,7 @@ function formatToastText(children) {
|
|
|
2731
2735
|
if (typeof children === "string") {
|
|
2732
2736
|
return stripToastTrailingSentencePunctuation(children);
|
|
2733
2737
|
}
|
|
2734
|
-
const flatChildren =
|
|
2738
|
+
const flatChildren = React7.Children.toArray(children);
|
|
2735
2739
|
if (flatChildren.length === 1 && typeof flatChildren[0] === "string") {
|
|
2736
2740
|
return stripToastTrailingSentencePunctuation(flatChildren[0]);
|
|
2737
2741
|
}
|
|
@@ -2789,7 +2793,7 @@ function ToastTitle({
|
|
|
2789
2793
|
children,
|
|
2790
2794
|
...props
|
|
2791
2795
|
}) {
|
|
2792
|
-
const toastVisual =
|
|
2796
|
+
const toastVisual = React7.useContext(ToastVisualContext);
|
|
2793
2797
|
const StatusIcon = toastVisual?.variant && hasToastStatusIcon(toastVisual.variant) ? toastStatusIconByVariant[toastVisual.variant] : null;
|
|
2794
2798
|
return /* @__PURE__ */ jsxs10(
|
|
2795
2799
|
ToastPrimitive.Title,
|
|
@@ -3121,7 +3125,7 @@ function UnderlineTabs({
|
|
|
3121
3125
|
}
|
|
3122
3126
|
|
|
3123
3127
|
// src/components/viewport-menu-surface/viewport-menu-surface.tsx
|
|
3124
|
-
import * as
|
|
3128
|
+
import * as React8 from "react";
|
|
3125
3129
|
import { createPortal as createPortal2 } from "react-dom";
|
|
3126
3130
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3127
3131
|
var VIEWPORT_MENU_PADDING = 12;
|
|
@@ -3235,7 +3239,7 @@ function assignRef(ref, value) {
|
|
|
3235
3239
|
function callHandler(handler, event) {
|
|
3236
3240
|
handler?.(event);
|
|
3237
3241
|
}
|
|
3238
|
-
var ViewportMenuSurface =
|
|
3242
|
+
var ViewportMenuSurface = React8.forwardRef(function ViewportMenuSurface2({
|
|
3239
3243
|
open,
|
|
3240
3244
|
placement,
|
|
3241
3245
|
children,
|
|
@@ -3251,16 +3255,16 @@ var ViewportMenuSurface = React6.forwardRef(function ViewportMenuSurface2({
|
|
|
3251
3255
|
className,
|
|
3252
3256
|
...rest
|
|
3253
3257
|
}, forwardedRef) {
|
|
3254
|
-
const surfaceRef =
|
|
3255
|
-
const [measuredSize, setMeasuredSize] =
|
|
3256
|
-
const setRefs2 =
|
|
3258
|
+
const surfaceRef = React8.useRef(null);
|
|
3259
|
+
const [measuredSize, setMeasuredSize] = React8.useState(null);
|
|
3260
|
+
const setRefs2 = React8.useCallback(
|
|
3257
3261
|
(node) => {
|
|
3258
3262
|
surfaceRef.current = node;
|
|
3259
3263
|
assignRef(forwardedRef, node);
|
|
3260
3264
|
},
|
|
3261
3265
|
[forwardedRef]
|
|
3262
3266
|
);
|
|
3263
|
-
|
|
3267
|
+
React8.useLayoutEffect(() => {
|
|
3264
3268
|
if (!open) {
|
|
3265
3269
|
setMeasuredSize(null);
|
|
3266
3270
|
return;
|
|
@@ -3284,7 +3288,7 @@ var ViewportMenuSurface = React6.forwardRef(function ViewportMenuSurface2({
|
|
|
3284
3288
|
observer.observe(element);
|
|
3285
3289
|
return () => observer.disconnect();
|
|
3286
3290
|
}, [open, placement]);
|
|
3287
|
-
|
|
3291
|
+
React8.useEffect(() => {
|
|
3288
3292
|
if (!open) {
|
|
3289
3293
|
return;
|
|
3290
3294
|
}
|
|
@@ -3341,7 +3345,7 @@ var ViewportMenuSurface = React6.forwardRef(function ViewportMenuSurface2({
|
|
|
3341
3345
|
onDismiss,
|
|
3342
3346
|
open
|
|
3343
3347
|
]);
|
|
3344
|
-
const resolvedPlacement =
|
|
3348
|
+
const resolvedPlacement = React8.useMemo(() => {
|
|
3345
3349
|
if (placement.type === "absolute") {
|
|
3346
3350
|
const boundary2 = resolveMenuBoundaryFromPoint({
|
|
3347
3351
|
x: placement.left,
|
|
@@ -3528,4 +3532,4 @@ export {
|
|
|
3528
3532
|
UnderlineTabs,
|
|
3529
3533
|
ViewportMenuSurface
|
|
3530
3534
|
};
|
|
3531
|
-
//# sourceMappingURL=chunk-
|
|
3535
|
+
//# sourceMappingURL=chunk-QXXI5OBT.js.map
|