@backbay/glia 0.2.0-alpha.6 → 0.2.0-alpha.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.
- package/dist/audio/index.js +1145 -5
- package/dist/audio/index.js.map +1 -1
- package/dist/components/index.js +3187 -10
- package/dist/components/index.js.map +1 -1
- package/dist/core.js +19714 -12
- package/dist/core.js.map +1 -1
- package/dist/emotion/index.js +1 -1
- package/dist/emotion/index.js.map +1 -1
- package/dist/hooks/index.js +941 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.js +31841 -183
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.js +21111 -57
- package/dist/primitives/index.js.map +1 -1
- package/dist/protocol/index.js +360 -2
- package/dist/protocol/index.js.map +1 -1
- package/dist/speakeasy/index.js +2786 -38
- package/dist/speakeasy/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +1150 -3
- package/dist/theme/index.js.map +1 -1
- package/dist/vision/index.js +370 -2
- package/dist/vision/index.js.map +1 -1
- package/dist/workspace/index.js +16824 -2
- package/dist/workspace/index.js.map +1 -1
- package/package.json +16 -10
- package/dist/AuroraBackground-AP6ZHVFA.js +0 -6
- package/dist/AuroraBackground-AP6ZHVFA.js.map +0 -1
- package/dist/BentoGrid-CDARICNM.js +0 -6
- package/dist/BentoGrid-CDARICNM.js.map +0 -1
- package/dist/CommandPalette-JCWJKRBY.js +0 -6
- package/dist/CommandPalette-JCWJKRBY.js.map +0 -1
- package/dist/Glass-H4X4ZI4P.js +0 -7
- package/dist/Glass-H4X4ZI4P.js.map +0 -1
- package/dist/GlitchText-KLQ57PPY.js +0 -6
- package/dist/GlitchText-KLQ57PPY.js.map +0 -1
- package/dist/GlowButton-VGBPMZO7.js +0 -6
- package/dist/GlowButton-VGBPMZO7.js.map +0 -1
- package/dist/Graph3D-GO7N2EZQ.js +0 -540
- package/dist/Graph3D-GO7N2EZQ.js.map +0 -1
- package/dist/HUDProgressRing-N6C5NAEV.js +0 -6
- package/dist/HUDProgressRing-N6C5NAEV.js.map +0 -1
- package/dist/KPIStat-PBQK27ZB.js +0 -6
- package/dist/KPIStat-PBQK27ZB.js.map +0 -1
- package/dist/NeonToast-W5F7MU3U.js +0 -6
- package/dist/NeonToast-W5F7MU3U.js.map +0 -1
- package/dist/ParticleField-WK6CNHWU.js +0 -51
- package/dist/ParticleField-WK6CNHWU.js.map +0 -1
- package/dist/TextGenerateEffect-EUCEIIUJ.js +0 -6
- package/dist/TextGenerateEffect-EUCEIIUJ.js.map +0 -1
- package/dist/ThreeDCard-VH5I3SSY.js +0 -6
- package/dist/ThreeDCard-VH5I3SSY.js.map +0 -1
- package/dist/TypingAnimation-GIWOHPIX.js +0 -6
- package/dist/TypingAnimation-GIWOHPIX.js.map +0 -1
- package/dist/alert-dialog-QOSYBIIE.js +0 -19
- package/dist/alert-dialog-QOSYBIIE.js.map +0 -1
- package/dist/avatar-N5R37PCU.js +0 -10
- package/dist/avatar-N5R37PCU.js.map +0 -1
- package/dist/badge-GTVIIGPY.js +0 -8
- package/dist/badge-GTVIIGPY.js.map +0 -1
- package/dist/button-D7IMSV2D.js +0 -8
- package/dist/button-D7IMSV2D.js.map +0 -1
- package/dist/chunk-3CMPQOMY.js +0 -69
- package/dist/chunk-3CMPQOMY.js.map +0 -1
- package/dist/chunk-3OQT6IYR.js +0 -41
- package/dist/chunk-3OQT6IYR.js.map +0 -1
- package/dist/chunk-43B2WVLS.js +0 -85
- package/dist/chunk-43B2WVLS.js.map +0 -1
- package/dist/chunk-4SRFO5W3.js +0 -121
- package/dist/chunk-4SRFO5W3.js.map +0 -1
- package/dist/chunk-5IZELOOU.js +0 -362
- package/dist/chunk-5IZELOOU.js.map +0 -1
- package/dist/chunk-6DM4ACSS.js +0 -154
- package/dist/chunk-6DM4ACSS.js.map +0 -1
- package/dist/chunk-6IGT34PC.js +0 -50
- package/dist/chunk-6IGT34PC.js.map +0 -1
- package/dist/chunk-6RKBCJHN.js +0 -194
- package/dist/chunk-6RKBCJHN.js.map +0 -1
- package/dist/chunk-6RX2WGCO.js +0 -108
- package/dist/chunk-6RX2WGCO.js.map +0 -1
- package/dist/chunk-7K4WZM3U.js +0 -189
- package/dist/chunk-7K4WZM3U.js.map +0 -1
- package/dist/chunk-7MDBHJPT.js +0 -407
- package/dist/chunk-7MDBHJPT.js.map +0 -1
- package/dist/chunk-7UQD6ROV.js +0 -9
- package/dist/chunk-7UQD6ROV.js.map +0 -1
- package/dist/chunk-AFNIVLZP.js +0 -1069
- package/dist/chunk-AFNIVLZP.js.map +0 -1
- package/dist/chunk-ANWYRO6A.js +0 -407
- package/dist/chunk-ANWYRO6A.js.map +0 -1
- package/dist/chunk-DIXPOHDO.js +0 -71
- package/dist/chunk-DIXPOHDO.js.map +0 -1
- package/dist/chunk-DWYMKYPI.js +0 -3
- package/dist/chunk-DWYMKYPI.js.map +0 -1
- package/dist/chunk-E3NVDCZG.js +0 -280
- package/dist/chunk-E3NVDCZG.js.map +0 -1
- package/dist/chunk-EBM7YBKL.js +0 -399
- package/dist/chunk-EBM7YBKL.js.map +0 -1
- package/dist/chunk-EPAM7IWW.js +0 -294
- package/dist/chunk-EPAM7IWW.js.map +0 -1
- package/dist/chunk-EXQ7GYRS.js +0 -134
- package/dist/chunk-EXQ7GYRS.js.map +0 -1
- package/dist/chunk-F4QTUZ3C.js +0 -136
- package/dist/chunk-F4QTUZ3C.js.map +0 -1
- package/dist/chunk-FEW533R2.js +0 -105
- package/dist/chunk-FEW533R2.js.map +0 -1
- package/dist/chunk-FFZLJKC7.js +0 -270
- package/dist/chunk-FFZLJKC7.js.map +0 -1
- package/dist/chunk-GEAMOBF7.js +0 -8486
- package/dist/chunk-GEAMOBF7.js.map +0 -1
- package/dist/chunk-GRTRSCTD.js +0 -74
- package/dist/chunk-GRTRSCTD.js.map +0 -1
- package/dist/chunk-IKGYOGLK.js +0 -16
- package/dist/chunk-IKGYOGLK.js.map +0 -1
- package/dist/chunk-IQ7WYWVJ.js +0 -73
- package/dist/chunk-IQ7WYWVJ.js.map +0 -1
- package/dist/chunk-IXIVWQLF.js +0 -543
- package/dist/chunk-IXIVWQLF.js.map +0 -1
- package/dist/chunk-JCJU57RC.js +0 -115
- package/dist/chunk-JCJU57RC.js.map +0 -1
- package/dist/chunk-KORSTBU4.js +0 -117
- package/dist/chunk-KORSTBU4.js.map +0 -1
- package/dist/chunk-KSEZ6UM2.js +0 -235
- package/dist/chunk-KSEZ6UM2.js.map +0 -1
- package/dist/chunk-MHPF7R3O.js +0 -1376
- package/dist/chunk-MHPF7R3O.js.map +0 -1
- package/dist/chunk-MPC5IH7E.js +0 -81
- package/dist/chunk-MPC5IH7E.js.map +0 -1
- package/dist/chunk-MQIU2NYA.js +0 -114
- package/dist/chunk-MQIU2NYA.js.map +0 -1
- package/dist/chunk-NYMBJOGR.js +0 -2192
- package/dist/chunk-NYMBJOGR.js.map +0 -1
- package/dist/chunk-OBZD2M3C.js +0 -169
- package/dist/chunk-OBZD2M3C.js.map +0 -1
- package/dist/chunk-ODM2AG6G.js +0 -176
- package/dist/chunk-ODM2AG6G.js.map +0 -1
- package/dist/chunk-ONDKF5LP.js +0 -53
- package/dist/chunk-ONDKF5LP.js.map +0 -1
- package/dist/chunk-P25YCWQB.js +0 -41
- package/dist/chunk-P25YCWQB.js.map +0 -1
- package/dist/chunk-PFYVNM6H.js +0 -14
- package/dist/chunk-PFYVNM6H.js.map +0 -1
- package/dist/chunk-PWNNSGFL.js +0 -20
- package/dist/chunk-PWNNSGFL.js.map +0 -1
- package/dist/chunk-Q2PGZVOT.js +0 -36
- package/dist/chunk-Q2PGZVOT.js.map +0 -1
- package/dist/chunk-Q2XDMV7U.js +0 -76
- package/dist/chunk-Q2XDMV7U.js.map +0 -1
- package/dist/chunk-QG7FH2FI.js +0 -45
- package/dist/chunk-QG7FH2FI.js.map +0 -1
- package/dist/chunk-R7HUOK2D.js +0 -1914
- package/dist/chunk-R7HUOK2D.js.map +0 -1
- package/dist/chunk-REUYY7G5.js +0 -773
- package/dist/chunk-REUYY7G5.js.map +0 -1
- package/dist/chunk-RHC2Z2HT.js +0 -199
- package/dist/chunk-RHC2Z2HT.js.map +0 -1
- package/dist/chunk-RMCVLIFE.js +0 -23
- package/dist/chunk-RMCVLIFE.js.map +0 -1
- package/dist/chunk-ROZLTXGR.js +0 -234
- package/dist/chunk-ROZLTXGR.js.map +0 -1
- package/dist/chunk-RSS2C2O3.js +0 -17
- package/dist/chunk-RSS2C2O3.js.map +0 -1
- package/dist/chunk-SAGCG5SH.js +0 -355
- package/dist/chunk-SAGCG5SH.js.map +0 -1
- package/dist/chunk-TM6AOUSD.js +0 -40
- package/dist/chunk-TM6AOUSD.js.map +0 -1
- package/dist/chunk-TPK4BYCO.js +0 -970
- package/dist/chunk-TPK4BYCO.js.map +0 -1
- package/dist/chunk-UNQIL4K2.js +0 -34
- package/dist/chunk-UNQIL4K2.js.map +0 -1
- package/dist/chunk-UUG6L75Y.js +0 -47
- package/dist/chunk-UUG6L75Y.js.map +0 -1
- package/dist/chunk-V2SYMV4W.js +0 -114
- package/dist/chunk-V2SYMV4W.js.map +0 -1
- package/dist/chunk-V7EN5CTH.js +0 -130
- package/dist/chunk-V7EN5CTH.js.map +0 -1
- package/dist/chunk-VITKG2HL.js +0 -1125
- package/dist/chunk-VITKG2HL.js.map +0 -1
- package/dist/chunk-VYEWU5LO.js +0 -2631
- package/dist/chunk-VYEWU5LO.js.map +0 -1
- package/dist/chunk-W67QAGSH.js +0 -178
- package/dist/chunk-W67QAGSH.js.map +0 -1
- package/dist/chunk-WWBIN6KV.js +0 -1353
- package/dist/chunk-WWBIN6KV.js.map +0 -1
- package/dist/chunk-X77Z4PFB.js +0 -224
- package/dist/chunk-X77Z4PFB.js.map +0 -1
- package/dist/chunk-X7VG7OTT.js +0 -8
- package/dist/chunk-X7VG7OTT.js.map +0 -1
- package/dist/chunk-XE4K2SGI.js +0 -74
- package/dist/chunk-XE4K2SGI.js.map +0 -1
- package/dist/chunk-YIUG7IJK.js +0 -628
- package/dist/chunk-YIUG7IJK.js.map +0 -1
- package/dist/chunk-YNVN3V4Y.js +0 -13
- package/dist/chunk-YNVN3V4Y.js.map +0 -1
- package/dist/chunk-Z2S54IZX.js +0 -198
- package/dist/chunk-Z2S54IZX.js.map +0 -1
- package/dist/chunk-ZR6AH25Z.js +0 -17
- package/dist/chunk-ZR6AH25Z.js.map +0 -1
- package/dist/dialog-SPM3DTTI.js +0 -17
- package/dist/dialog-SPM3DTTI.js.map +0 -1
- package/dist/dropdown-menu-HMTWKWGK.js +0 -21
- package/dist/dropdown-menu-HMTWKWGK.js.map +0 -1
- package/dist/input-BH4P4S26.js +0 -6
- package/dist/input-BH4P4S26.js.map +0 -1
- package/dist/label-5Z4Q6VER.js +0 -8
- package/dist/label-5Z4Q6VER.js.map +0 -1
- package/dist/popover-IFOUXYLI.js +0 -18
- package/dist/popover-IFOUXYLI.js.map +0 -1
- package/dist/scroll-area-DJXNW6QX.js +0 -14
- package/dist/scroll-area-DJXNW6QX.js.map +0 -1
- package/dist/select-FZ277C3G.js +0 -22
- package/dist/select-FZ277C3G.js.map +0 -1
- package/dist/separator-BTMLN4NB.js +0 -8
- package/dist/separator-BTMLN4NB.js.map +0 -1
- package/dist/skeleton-DXIWBH4W.js +0 -6
- package/dist/skeleton-DXIWBH4W.js.map +0 -1
- package/dist/switch-4MCXIZBY.js +0 -13
- package/dist/switch-4MCXIZBY.js.map +0 -1
- package/dist/tabs-O7AW3APK.js +0 -17
- package/dist/tabs-O7AW3APK.js.map +0 -1
- package/dist/textarea-IB5WAFDO.js +0 -6
- package/dist/textarea-IB5WAFDO.js.map +0 -1
- package/dist/toggle-XVPPG6P4.js +0 -10
- package/dist/toggle-XVPPG6P4.js.map +0 -1
- package/dist/tooltip-JICZTD4F.js +0 -18
- package/dist/tooltip-JICZTD4F.js.map +0 -1
package/dist/chunk-ANWYRO6A.js
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
import { createPopperScope, Anchor, Content, Arrow, Root2 } from './chunk-NYMBJOGR.js';
|
|
2
|
-
import { hideOthers, Combination_default, useFocusGuards, FocusScope } from './chunk-AFNIVLZP.js';
|
|
3
|
-
import { DismissableLayer, Portal } from './chunk-ROZLTXGR.js';
|
|
4
|
-
import { useId } from './chunk-IKGYOGLK.js';
|
|
5
|
-
import { Presence } from './chunk-V7EN5CTH.js';
|
|
6
|
-
import { createContextScope } from './chunk-MPC5IH7E.js';
|
|
7
|
-
import { useControllableState } from './chunk-DIXPOHDO.js';
|
|
8
|
-
import { Primitive, composeEventHandlers } from './chunk-EXQ7GYRS.js';
|
|
9
|
-
import { useComposedRefs, composeRefs } from './chunk-P25YCWQB.js';
|
|
10
|
-
import { cn } from './chunk-6RX2WGCO.js';
|
|
11
|
-
import * as React2 from 'react';
|
|
12
|
-
import { jsx } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
// @__NO_SIDE_EFFECTS__
|
|
15
|
-
function createSlot(ownerName) {
|
|
16
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
17
|
-
const Slot2 = React2.forwardRef((props, forwardedRef) => {
|
|
18
|
-
const { children, ...slotProps } = props;
|
|
19
|
-
const childrenArray = React2.Children.toArray(children);
|
|
20
|
-
const slottable = childrenArray.find(isSlottable);
|
|
21
|
-
if (slottable) {
|
|
22
|
-
const newElement = slottable.props.children;
|
|
23
|
-
const newChildren = childrenArray.map((child) => {
|
|
24
|
-
if (child === slottable) {
|
|
25
|
-
if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
|
|
26
|
-
return React2.isValidElement(newElement) ? newElement.props.children : null;
|
|
27
|
-
} else {
|
|
28
|
-
return child;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
|
|
32
|
-
}
|
|
33
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
34
|
-
});
|
|
35
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
36
|
-
return Slot2;
|
|
37
|
-
}
|
|
38
|
-
// @__NO_SIDE_EFFECTS__
|
|
39
|
-
function createSlotClone(ownerName) {
|
|
40
|
-
const SlotClone = React2.forwardRef((props, forwardedRef) => {
|
|
41
|
-
const { children, ...slotProps } = props;
|
|
42
|
-
if (React2.isValidElement(children)) {
|
|
43
|
-
const childrenRef = getElementRef(children);
|
|
44
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
45
|
-
if (children.type !== React2.Fragment) {
|
|
46
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
47
|
-
}
|
|
48
|
-
return React2.cloneElement(children, props2);
|
|
49
|
-
}
|
|
50
|
-
return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
|
|
51
|
-
});
|
|
52
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
53
|
-
return SlotClone;
|
|
54
|
-
}
|
|
55
|
-
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
56
|
-
function isSlottable(child) {
|
|
57
|
-
return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
58
|
-
}
|
|
59
|
-
function mergeProps(slotProps, childProps) {
|
|
60
|
-
const overrideProps = { ...childProps };
|
|
61
|
-
for (const propName in childProps) {
|
|
62
|
-
const slotPropValue = slotProps[propName];
|
|
63
|
-
const childPropValue = childProps[propName];
|
|
64
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
65
|
-
if (isHandler) {
|
|
66
|
-
if (slotPropValue && childPropValue) {
|
|
67
|
-
overrideProps[propName] = (...args) => {
|
|
68
|
-
const result = childPropValue(...args);
|
|
69
|
-
slotPropValue(...args);
|
|
70
|
-
return result;
|
|
71
|
-
};
|
|
72
|
-
} else if (slotPropValue) {
|
|
73
|
-
overrideProps[propName] = slotPropValue;
|
|
74
|
-
}
|
|
75
|
-
} else if (propName === "style") {
|
|
76
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
77
|
-
} else if (propName === "className") {
|
|
78
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return { ...slotProps, ...overrideProps };
|
|
82
|
-
}
|
|
83
|
-
function getElementRef(element) {
|
|
84
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
85
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
86
|
-
if (mayWarn) {
|
|
87
|
-
return element.ref;
|
|
88
|
-
}
|
|
89
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
90
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
91
|
-
if (mayWarn) {
|
|
92
|
-
return element.props.ref;
|
|
93
|
-
}
|
|
94
|
-
return element.props.ref || element.ref;
|
|
95
|
-
}
|
|
96
|
-
var POPOVER_NAME = "Popover";
|
|
97
|
-
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
98
|
-
createPopperScope
|
|
99
|
-
]);
|
|
100
|
-
var usePopperScope = createPopperScope();
|
|
101
|
-
var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
|
|
102
|
-
var Popover = (props) => {
|
|
103
|
-
const {
|
|
104
|
-
__scopePopover,
|
|
105
|
-
children,
|
|
106
|
-
open: openProp,
|
|
107
|
-
defaultOpen,
|
|
108
|
-
onOpenChange,
|
|
109
|
-
modal = false
|
|
110
|
-
} = props;
|
|
111
|
-
const popperScope = usePopperScope(__scopePopover);
|
|
112
|
-
const triggerRef = React2.useRef(null);
|
|
113
|
-
const [hasCustomAnchor, setHasCustomAnchor] = React2.useState(false);
|
|
114
|
-
const [open, setOpen] = useControllableState({
|
|
115
|
-
prop: openProp,
|
|
116
|
-
defaultProp: defaultOpen ?? false,
|
|
117
|
-
onChange: onOpenChange,
|
|
118
|
-
caller: POPOVER_NAME
|
|
119
|
-
});
|
|
120
|
-
return /* @__PURE__ */ jsx(Root2, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
121
|
-
PopoverProvider,
|
|
122
|
-
{
|
|
123
|
-
scope: __scopePopover,
|
|
124
|
-
contentId: useId(),
|
|
125
|
-
triggerRef,
|
|
126
|
-
open,
|
|
127
|
-
onOpenChange: setOpen,
|
|
128
|
-
onOpenToggle: React2.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
129
|
-
hasCustomAnchor,
|
|
130
|
-
onCustomAnchorAdd: React2.useCallback(() => setHasCustomAnchor(true), []),
|
|
131
|
-
onCustomAnchorRemove: React2.useCallback(() => setHasCustomAnchor(false), []),
|
|
132
|
-
modal,
|
|
133
|
-
children
|
|
134
|
-
}
|
|
135
|
-
) });
|
|
136
|
-
};
|
|
137
|
-
Popover.displayName = POPOVER_NAME;
|
|
138
|
-
var ANCHOR_NAME = "PopoverAnchor";
|
|
139
|
-
var PopoverAnchor = React2.forwardRef(
|
|
140
|
-
(props, forwardedRef) => {
|
|
141
|
-
const { __scopePopover, ...anchorProps } = props;
|
|
142
|
-
const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
|
|
143
|
-
const popperScope = usePopperScope(__scopePopover);
|
|
144
|
-
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
145
|
-
React2.useEffect(() => {
|
|
146
|
-
onCustomAnchorAdd();
|
|
147
|
-
return () => onCustomAnchorRemove();
|
|
148
|
-
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
149
|
-
return /* @__PURE__ */ jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
PopoverAnchor.displayName = ANCHOR_NAME;
|
|
153
|
-
var TRIGGER_NAME = "PopoverTrigger";
|
|
154
|
-
var PopoverTrigger = React2.forwardRef(
|
|
155
|
-
(props, forwardedRef) => {
|
|
156
|
-
const { __scopePopover, ...triggerProps } = props;
|
|
157
|
-
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
158
|
-
const popperScope = usePopperScope(__scopePopover);
|
|
159
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
160
|
-
const trigger = /* @__PURE__ */ jsx(
|
|
161
|
-
Primitive.button,
|
|
162
|
-
{
|
|
163
|
-
type: "button",
|
|
164
|
-
"aria-haspopup": "dialog",
|
|
165
|
-
"aria-expanded": context.open,
|
|
166
|
-
"aria-controls": context.contentId,
|
|
167
|
-
"data-state": getState(context.open),
|
|
168
|
-
...triggerProps,
|
|
169
|
-
ref: composedTriggerRef,
|
|
170
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
PopoverTrigger.displayName = TRIGGER_NAME;
|
|
177
|
-
var PORTAL_NAME = "PopoverPortal";
|
|
178
|
-
var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {
|
|
179
|
-
forceMount: void 0
|
|
180
|
-
});
|
|
181
|
-
var PopoverPortal = (props) => {
|
|
182
|
-
const { __scopePopover, forceMount, children, container } = props;
|
|
183
|
-
const context = usePopoverContext(PORTAL_NAME, __scopePopover);
|
|
184
|
-
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal, { asChild: true, container, children }) }) });
|
|
185
|
-
};
|
|
186
|
-
PopoverPortal.displayName = PORTAL_NAME;
|
|
187
|
-
var CONTENT_NAME = "PopoverContent";
|
|
188
|
-
var PopoverContent = React2.forwardRef(
|
|
189
|
-
(props, forwardedRef) => {
|
|
190
|
-
const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);
|
|
191
|
-
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
192
|
-
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
193
|
-
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
PopoverContent.displayName = CONTENT_NAME;
|
|
197
|
-
var Slot = createSlot("PopoverContent.RemoveScroll");
|
|
198
|
-
var PopoverContentModal = React2.forwardRef(
|
|
199
|
-
(props, forwardedRef) => {
|
|
200
|
-
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
201
|
-
const contentRef = React2.useRef(null);
|
|
202
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
203
|
-
const isRightClickOutsideRef = React2.useRef(false);
|
|
204
|
-
React2.useEffect(() => {
|
|
205
|
-
const content = contentRef.current;
|
|
206
|
-
if (content) return hideOthers(content);
|
|
207
|
-
}, []);
|
|
208
|
-
return /* @__PURE__ */ jsx(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
209
|
-
PopoverContentImpl,
|
|
210
|
-
{
|
|
211
|
-
...props,
|
|
212
|
-
ref: composedRefs,
|
|
213
|
-
trapFocus: context.open,
|
|
214
|
-
disableOutsidePointerEvents: true,
|
|
215
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
216
|
-
event.preventDefault();
|
|
217
|
-
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
218
|
-
}),
|
|
219
|
-
onPointerDownOutside: composeEventHandlers(
|
|
220
|
-
props.onPointerDownOutside,
|
|
221
|
-
(event) => {
|
|
222
|
-
const originalEvent = event.detail.originalEvent;
|
|
223
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
224
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
225
|
-
isRightClickOutsideRef.current = isRightClick;
|
|
226
|
-
},
|
|
227
|
-
{ checkForDefaultPrevented: false }
|
|
228
|
-
),
|
|
229
|
-
onFocusOutside: composeEventHandlers(
|
|
230
|
-
props.onFocusOutside,
|
|
231
|
-
(event) => event.preventDefault(),
|
|
232
|
-
{ checkForDefaultPrevented: false }
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
) });
|
|
236
|
-
}
|
|
237
|
-
);
|
|
238
|
-
var PopoverContentNonModal = React2.forwardRef(
|
|
239
|
-
(props, forwardedRef) => {
|
|
240
|
-
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
241
|
-
const hasInteractedOutsideRef = React2.useRef(false);
|
|
242
|
-
const hasPointerDownOutsideRef = React2.useRef(false);
|
|
243
|
-
return /* @__PURE__ */ jsx(
|
|
244
|
-
PopoverContentImpl,
|
|
245
|
-
{
|
|
246
|
-
...props,
|
|
247
|
-
ref: forwardedRef,
|
|
248
|
-
trapFocus: false,
|
|
249
|
-
disableOutsidePointerEvents: false,
|
|
250
|
-
onCloseAutoFocus: (event) => {
|
|
251
|
-
props.onCloseAutoFocus?.(event);
|
|
252
|
-
if (!event.defaultPrevented) {
|
|
253
|
-
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
254
|
-
event.preventDefault();
|
|
255
|
-
}
|
|
256
|
-
hasInteractedOutsideRef.current = false;
|
|
257
|
-
hasPointerDownOutsideRef.current = false;
|
|
258
|
-
},
|
|
259
|
-
onInteractOutside: (event) => {
|
|
260
|
-
props.onInteractOutside?.(event);
|
|
261
|
-
if (!event.defaultPrevented) {
|
|
262
|
-
hasInteractedOutsideRef.current = true;
|
|
263
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
264
|
-
hasPointerDownOutsideRef.current = true;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
const target = event.target;
|
|
268
|
-
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
|
269
|
-
if (targetIsTrigger) event.preventDefault();
|
|
270
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
271
|
-
event.preventDefault();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
);
|
|
278
|
-
var PopoverContentImpl = React2.forwardRef(
|
|
279
|
-
(props, forwardedRef) => {
|
|
280
|
-
const {
|
|
281
|
-
__scopePopover,
|
|
282
|
-
trapFocus,
|
|
283
|
-
onOpenAutoFocus,
|
|
284
|
-
onCloseAutoFocus,
|
|
285
|
-
disableOutsidePointerEvents,
|
|
286
|
-
onEscapeKeyDown,
|
|
287
|
-
onPointerDownOutside,
|
|
288
|
-
onFocusOutside,
|
|
289
|
-
onInteractOutside,
|
|
290
|
-
...contentProps
|
|
291
|
-
} = props;
|
|
292
|
-
const context = usePopoverContext(CONTENT_NAME, __scopePopover);
|
|
293
|
-
const popperScope = usePopperScope(__scopePopover);
|
|
294
|
-
useFocusGuards();
|
|
295
|
-
return /* @__PURE__ */ jsx(
|
|
296
|
-
FocusScope,
|
|
297
|
-
{
|
|
298
|
-
asChild: true,
|
|
299
|
-
loop: true,
|
|
300
|
-
trapped: trapFocus,
|
|
301
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
302
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
303
|
-
children: /* @__PURE__ */ jsx(
|
|
304
|
-
DismissableLayer,
|
|
305
|
-
{
|
|
306
|
-
asChild: true,
|
|
307
|
-
disableOutsidePointerEvents,
|
|
308
|
-
onInteractOutside,
|
|
309
|
-
onEscapeKeyDown,
|
|
310
|
-
onPointerDownOutside,
|
|
311
|
-
onFocusOutside,
|
|
312
|
-
onDismiss: () => context.onOpenChange(false),
|
|
313
|
-
children: /* @__PURE__ */ jsx(
|
|
314
|
-
Content,
|
|
315
|
-
{
|
|
316
|
-
"data-state": getState(context.open),
|
|
317
|
-
role: "dialog",
|
|
318
|
-
id: context.contentId,
|
|
319
|
-
...popperScope,
|
|
320
|
-
...contentProps,
|
|
321
|
-
ref: forwardedRef,
|
|
322
|
-
style: {
|
|
323
|
-
...contentProps.style,
|
|
324
|
-
// re-namespace exposed content custom properties
|
|
325
|
-
...{
|
|
326
|
-
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
327
|
-
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
328
|
-
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
329
|
-
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
330
|
-
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
)
|
|
335
|
-
}
|
|
336
|
-
)
|
|
337
|
-
}
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
);
|
|
341
|
-
var CLOSE_NAME = "PopoverClose";
|
|
342
|
-
var PopoverClose = React2.forwardRef(
|
|
343
|
-
(props, forwardedRef) => {
|
|
344
|
-
const { __scopePopover, ...closeProps } = props;
|
|
345
|
-
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
346
|
-
return /* @__PURE__ */ jsx(
|
|
347
|
-
Primitive.button,
|
|
348
|
-
{
|
|
349
|
-
type: "button",
|
|
350
|
-
...closeProps,
|
|
351
|
-
ref: forwardedRef,
|
|
352
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
353
|
-
}
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
);
|
|
357
|
-
PopoverClose.displayName = CLOSE_NAME;
|
|
358
|
-
var ARROW_NAME = "PopoverArrow";
|
|
359
|
-
var PopoverArrow = React2.forwardRef(
|
|
360
|
-
(props, forwardedRef) => {
|
|
361
|
-
const { __scopePopover, ...arrowProps } = props;
|
|
362
|
-
const popperScope = usePopperScope(__scopePopover);
|
|
363
|
-
return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
364
|
-
}
|
|
365
|
-
);
|
|
366
|
-
PopoverArrow.displayName = ARROW_NAME;
|
|
367
|
-
function getState(open) {
|
|
368
|
-
return open ? "open" : "closed";
|
|
369
|
-
}
|
|
370
|
-
var Root22 = Popover;
|
|
371
|
-
var Anchor2 = PopoverAnchor;
|
|
372
|
-
var Trigger = PopoverTrigger;
|
|
373
|
-
var Portal2 = PopoverPortal;
|
|
374
|
-
var Content2 = PopoverContent;
|
|
375
|
-
function Popover2({ ...props }) {
|
|
376
|
-
return /* @__PURE__ */ jsx(Root22, { "data-slot": "popover", ...props });
|
|
377
|
-
}
|
|
378
|
-
function PopoverTrigger2({ ...props }) {
|
|
379
|
-
return /* @__PURE__ */ jsx(Trigger, { "data-slot": "popover-trigger", ...props });
|
|
380
|
-
}
|
|
381
|
-
function PopoverContent2({
|
|
382
|
-
className,
|
|
383
|
-
align = "center",
|
|
384
|
-
sideOffset = 4,
|
|
385
|
-
...props
|
|
386
|
-
}) {
|
|
387
|
-
return /* @__PURE__ */ jsx(Portal2, { children: /* @__PURE__ */ jsx(
|
|
388
|
-
Content2,
|
|
389
|
-
{
|
|
390
|
-
"data-slot": "popover-content",
|
|
391
|
-
align,
|
|
392
|
-
sideOffset,
|
|
393
|
-
className: cn(
|
|
394
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
395
|
-
className
|
|
396
|
-
),
|
|
397
|
-
...props
|
|
398
|
-
}
|
|
399
|
-
) });
|
|
400
|
-
}
|
|
401
|
-
function PopoverAnchor2({ ...props }) {
|
|
402
|
-
return /* @__PURE__ */ jsx(Anchor2, { "data-slot": "popover-anchor", ...props });
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
export { Popover2 as Popover, PopoverAnchor2 as PopoverAnchor, PopoverContent2 as PopoverContent, PopoverTrigger2 as PopoverTrigger };
|
|
406
|
-
//# sourceMappingURL=chunk-ANWYRO6A.js.map
|
|
407
|
-
//# sourceMappingURL=chunk-ANWYRO6A.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/src/slot.tsx","../../../node_modules/@radix-ui/react-popover/src/popover.tsx","../src/primitives/ui/popover.tsx"],"names":["Slot","React","props","jsx","Root","Anchor","Portal","Content","Popover","Root2","PopoverTrigger","PopoverContent","PopoverAnchor"],"mappings":";;;;;;;;;;;;;;AAWkC,SAAS,WAAW,SAAA,EAAmB;AACvE,EAAA,MAAM,SAAA,mCAA4B,SAAS,CAAA;AAC3C,EAAA,MAAMA,KAAAA,GAAaC,MAAA,CAAA,UAAA,CAAmC,CAAC,KAAA,EAAO,YAAA,KAAiB;AAC7E,IAAA,MAAM,EAAE,QAAA,EAAU,GAAG,SAAA,EAAU,GAAI,KAAA;AACnC,IAAA,MAAM,aAAA,GAAsBA,MAAA,CAAA,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA;AACrD,IAAA,MAAM,SAAA,GAAY,aAAA,CAAc,IAAA,CAAK,WAAW,CAAA;AAEhD,IAAA,IAAI,SAAA,EAAW;AAEb,MAAA,MAAM,UAAA,GAAa,UAAU,KAAA,CAAM,QAAA;AAEnC,MAAA,MAAM,WAAA,GAAc,aAAA,CAAc,GAAA,CAAI,CAAC,KA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AAA,EAAU,gBAAA,EAAkB,GAAG,KAAA,EAAO,CAAA;AACxE","file":"chunk-ANWYRO6A.js","sourcesContent":["import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ComponentRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface PopoverPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Slot = createSlot('PopoverContent.RemoveScroll');\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n </RemoveScroll>\n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ComponentRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface PopoverContentImplProps\n extends Omit<PopperContentProps, 'onPlaced'>,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role=\"dialog\"\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-popover-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-popover-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-popover-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-popover-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-popover-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ComponentRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ComponentRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"]}
|
package/dist/chunk-DIXPOHDO.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect2 } from './chunk-7UQD6ROV.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
5
|
-
function useControllableState({
|
|
6
|
-
prop,
|
|
7
|
-
defaultProp,
|
|
8
|
-
onChange = () => {
|
|
9
|
-
},
|
|
10
|
-
caller
|
|
11
|
-
}) {
|
|
12
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
13
|
-
defaultProp,
|
|
14
|
-
onChange
|
|
15
|
-
});
|
|
16
|
-
const isControlled = prop !== void 0;
|
|
17
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
18
|
-
{
|
|
19
|
-
const isControlledRef = React.useRef(prop !== void 0);
|
|
20
|
-
React.useEffect(() => {
|
|
21
|
-
const wasControlled = isControlledRef.current;
|
|
22
|
-
if (wasControlled !== isControlled) {
|
|
23
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
24
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
25
|
-
console.warn(
|
|
26
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
isControlledRef.current = isControlled;
|
|
30
|
-
}, [isControlled, caller]);
|
|
31
|
-
}
|
|
32
|
-
const setValue = React.useCallback(
|
|
33
|
-
(nextValue) => {
|
|
34
|
-
if (isControlled) {
|
|
35
|
-
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
36
|
-
if (value2 !== prop) {
|
|
37
|
-
onChangeRef.current?.(value2);
|
|
38
|
-
}
|
|
39
|
-
} else {
|
|
40
|
-
setUncontrolledProp(nextValue);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
44
|
-
);
|
|
45
|
-
return [value, setValue];
|
|
46
|
-
}
|
|
47
|
-
function useUncontrolledState({
|
|
48
|
-
defaultProp,
|
|
49
|
-
onChange
|
|
50
|
-
}) {
|
|
51
|
-
const [value, setValue] = React.useState(defaultProp);
|
|
52
|
-
const prevValueRef = React.useRef(value);
|
|
53
|
-
const onChangeRef = React.useRef(onChange);
|
|
54
|
-
useInsertionEffect(() => {
|
|
55
|
-
onChangeRef.current = onChange;
|
|
56
|
-
}, [onChange]);
|
|
57
|
-
React.useEffect(() => {
|
|
58
|
-
if (prevValueRef.current !== value) {
|
|
59
|
-
onChangeRef.current?.(value);
|
|
60
|
-
prevValueRef.current = value;
|
|
61
|
-
}
|
|
62
|
-
}, [value, prevValueRef]);
|
|
63
|
-
return [value, setValue, onChangeRef];
|
|
64
|
-
}
|
|
65
|
-
function isFunction(value) {
|
|
66
|
-
return typeof value === "function";
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export { useControllableState };
|
|
70
|
-
//# sourceMappingURL=chunk-DIXPOHDO.js.map
|
|
71
|
-
//# sourceMappingURL=chunk-DIXPOHDO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@radix-ui/react-use-controllable-state/src/use-controllable-state.tsx"],"names":["value"],"mappings":";;;AAIA,IAAM,qBACH,KAAA,CAAc,sBAAA,CAAuB,MAAK,CAAE,QAAA,EAAU,CAAA,IAAK,gBAAA;AAYvD,SAAS,oBAAA,CAAwB;AACtC,EAAA,IAAA;AACA,EAAA,WAAA;AACA,EAAA,QAAA,GAAW,MAAM;AAAC,EAAA,CAAA;AA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,mBAAA,EAAqB,WAAW;AACvD,GAAA;AAEA,EAAA,OAAO,CAAC,OAAO,QAAQ,CAAA;AACzB;AAEA,SAAS,oBAAA,CAAwB;AAC/B,EAAA,WAAA;AACA,EAAA;AACF,CAAA,EAIE;AACA,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAU,eAAS,WAAW,CAAA;AACpD,EAAA,MAAM,YAAA,GAAqB,aAAO,KAAK,CAAA;AAEvC,EAAA,MAAM,WAAA,GAAoB,aAAO,QAAQ,CAAA;AACzC,EAAA,kBAAA,CAAmB,MAAM;AACvB,IAAA,WAAA,CAAY,OAAA,GAAU,QAAA;EACxB,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEP,EAAA,gBAAU,MAAM;AACpB,IAAA,IAAI,YAAA,CAAa,YAAY,KAAA,EAAO;AAClC,MAAA,WAAA,CAAY,UAAU,KAAK,CAAA;AAC3B,MAAA,YAAA,CAAa,OAAA,GAAU,KAAA;AACzB,IAAA;EACF,CAAA,EAAG,CAAC,KAAA,EAAO,YAAY,CAAC,CAAA;AAExB,EAAA,OAAO,CAAC,KAAA,EAAO,QAAA,EAAU,WAAW,CAAA;AACtC;AAEA,SAAS,WAAW,KAAA,EAAkD;AACpE,EAAA,OAAO,OAAO,KAAA,KAAU,UAAA;AAC1B","file":"chunk-DIXPOHDO.js","sourcesContent":["import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// Prevent bundlers from trying to optimize the import\nconst useInsertionEffect: typeof useLayoutEffect =\n (React as any)[' useInsertionEffect '.trim().toString()] || useLayoutEffect;\n\ntype ChangeHandler<T> = (state: T) => void;\ntype SetStateFn<T> = React.Dispatch<React.SetStateAction<T>>;\n\ninterface UseControllableStateParams<T> {\n prop?: T | undefined;\n defaultProp: T;\n onChange?: ChangeHandler<T>;\n caller?: string;\n}\n\nexport function useControllableState<T>({\n prop,\n defaultProp,\n onChange = () => {},\n caller,\n}: UseControllableStateParams<T>): [T, SetStateFn<T>] {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange,\n });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(prop !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const setValue = React.useCallback<SetStateFn<T>>(\n (nextValue) => {\n if (isControlled) {\n const value = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value !== prop) {\n onChangeRef.current?.(value);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n\n return [value, setValue];\n}\n\nfunction useUncontrolledState<T>({\n defaultProp,\n onChange,\n}: Omit<UseControllableStateParams<T>, 'prop'>): [\n Value: T,\n setValue: React.Dispatch<React.SetStateAction<T>>,\n OnChangeRef: React.RefObject<ChangeHandler<T> | undefined>,\n] {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n\n return [value, setValue, onChangeRef];\n}\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n"]}
|
package/dist/chunk-DWYMKYPI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-DWYMKYPI.js","sourcesContent":[]}
|