node_modules ignore

This commit is contained in:
oier committed 2025-05-08 23:43:47 +02:00
1 parent e19d52f172
commit 4574544c9f
65041 files changed
+10593536

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import * as React from "react";
import * as Radix from "@radix-ui/react-primitive";
import { Primitive } from "@radix-ui/react-primitive";
export const createCollapsibleScope: import("@radix-ui/react-context").CreateScope;
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
export interface CollapsibleProps extends PrimitiveDivProps {
defaultOpen?: boolean;
open?: boolean;
disabled?: boolean;
onOpenChange?(open: boolean): void;
}
export const Collapsible: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
export interface CollapsibleTriggerProps extends PrimitiveButtonProps {
}
export const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export interface CollapsibleContentProps extends Omit<CollapsibleContentImplProps, 'present'> {
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
export const CollapsibleContent: React.ForwardRefExoticComponent<CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
interface CollapsibleContentImplProps extends PrimitiveDivProps {
present: boolean;
}
export const Root: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
export const Trigger: React.ForwardRefExoticComponent<CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export const Content: React.ForwardRefExoticComponent<CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=index.d.ts.map
+32
View File
@@ -0,0 +1,32 @@
import * as React from "react";
import * as Radix from "@radix-ui/react-primitive";
import { Primitive } from "@radix-ui/react-primitive";
export const createCollapsibleScope: import("@radix-ui/react-context").CreateScope;
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
export interface CollapsibleProps extends PrimitiveDivProps {
defaultOpen?: boolean;
open?: boolean;
disabled?: boolean;
onOpenChange?(open: boolean): void;
}
export const Collapsible: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
export interface CollapsibleTriggerProps extends PrimitiveButtonProps {
}
export const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export interface CollapsibleContentProps extends Omit<CollapsibleContentImplProps, 'present'> {
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
export const CollapsibleContent: React.ForwardRefExoticComponent<CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
interface CollapsibleContentImplProps extends PrimitiveDivProps {
present: boolean;
}
export const Root: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
export const Trigger: React.ForwardRefExoticComponent<CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export const Content: React.ForwardRefExoticComponent<CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"mappings":";;;AAoBA,OAAA,6FAA+F,CAAC;AAahG,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,iCAA2B,SAAQ,iBAAiB;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC;AAED,OAAA,MAAM,oGAkCL,CAAC;AAWF,4BAA4B,MAAM,wBAAwB,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC;AACpF,wCAAkC,SAAQ,oBAAoB;CAAG;AAEjE,OAAA,MAAM,qHAkBL,CAAC;AAWF,wCAAkC,SAAQ,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC;IACpF;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED,OAAA,MAAM,kHAYL,CAAC;AAOF,qCAAsC,SAAQ,iBAAiB;IAC7D,OAAO,EAAE,OAAO,CAAC;CAClB;AAmFD,OAAA,MAAM,6FAAkB,CAAC;AACzB,OAAA,MAAM,0GAA4B,CAAC;AACnC,OAAA,MAAM,uGAA4B,CAAC","sources":["packages/react/collapsible/src/packages/react/collapsible/src/Collapsible.tsx","packages/react/collapsible/src/packages/react/collapsible/src/index.ts","packages/react/collapsible/src/index.ts"],"sourcesContent":[null,null,"export {\n createCollapsibleScope,\n //\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n //\n Root,\n Trigger,\n Content,\n} from './Collapsible';\nexport type {\n CollapsibleProps,\n CollapsibleTriggerProps,\n CollapsibleContentProps,\n} from './Collapsible';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
+177
View File
@@ -0,0 +1,177 @@
var $f0mF1$babelruntimehelpersextends = require("@babel/runtime/helpers/extends");
var $f0mF1$react = require("react");
var $f0mF1$radixuiprimitive = require("@radix-ui/primitive");
var $f0mF1$radixuireactcontext = require("@radix-ui/react-context");
var $f0mF1$radixuireactusecontrollablestate = require("@radix-ui/react-use-controllable-state");
var $f0mF1$radixuireactuselayouteffect = require("@radix-ui/react-use-layout-effect");
var $f0mF1$radixuireactcomposerefs = require("@radix-ui/react-compose-refs");
var $f0mF1$radixuireactprimitive = require("@radix-ui/react-primitive");
var $f0mF1$radixuireactpresence = require("@radix-ui/react-presence");
var $f0mF1$radixuireactid = require("@radix-ui/react-id");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createCollapsibleScope", () => $e729681ae85df948$export$952b32dcbe73087a);
$parcel$export(module.exports, "Collapsible", () => $e729681ae85df948$export$6eb0f7ddcda6131f);
$parcel$export(module.exports, "CollapsibleTrigger", () => $e729681ae85df948$export$c135dce7b15bbbdc);
$parcel$export(module.exports, "CollapsibleContent", () => $e729681ae85df948$export$aadde00976f34151);
$parcel$export(module.exports, "Root", () => $e729681ae85df948$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Trigger", () => $e729681ae85df948$export$41fb9f06171c75f4);
$parcel$export(module.exports, "Content", () => $e729681ae85df948$export$7c6e2c02157bb7d2);
/* -------------------------------------------------------------------------------------------------
* Collapsible
* -----------------------------------------------------------------------------------------------*/ const $e729681ae85df948$var$COLLAPSIBLE_NAME = 'Collapsible';
const [$e729681ae85df948$var$createCollapsibleContext, $e729681ae85df948$export$952b32dcbe73087a] = $f0mF1$radixuireactcontext.createContextScope($e729681ae85df948$var$COLLAPSIBLE_NAME);
const [$e729681ae85df948$var$CollapsibleProvider, $e729681ae85df948$var$useCollapsibleContext] = $e729681ae85df948$var$createCollapsibleContext($e729681ae85df948$var$COLLAPSIBLE_NAME);
const $e729681ae85df948$export$6eb0f7ddcda6131f = /*#__PURE__*/ $f0mF1$react.forwardRef((props, forwardedRef)=>{
const { __scopeCollapsible: __scopeCollapsible , open: openProp , defaultOpen: defaultOpen , disabled: disabled , onOpenChange: onOpenChange , ...collapsibleProps } = props;
const [open = false, setOpen] = $f0mF1$radixuireactusecontrollablestate.useControllableState({
prop: openProp,
defaultProp: defaultOpen,
onChange: onOpenChange
});
return /*#__PURE__*/ $f0mF1$react.createElement($e729681ae85df948$var$CollapsibleProvider, {
scope: __scopeCollapsible,
disabled: disabled,
contentId: $f0mF1$radixuireactid.useId(),
open: open,
onOpenToggle: $f0mF1$react.useCallback(()=>setOpen((prevOpen)=>!prevOpen
)
, [
setOpen
])
}, /*#__PURE__*/ $f0mF1$react.createElement($f0mF1$radixuireactprimitive.Primitive.div, ($parcel$interopDefault($f0mF1$babelruntimehelpersextends))({
"data-state": $e729681ae85df948$var$getState(open),
"data-disabled": disabled ? '' : undefined
}, collapsibleProps, {
ref: forwardedRef
})));
});
/*#__PURE__*/ Object.assign($e729681ae85df948$export$6eb0f7ddcda6131f, {
displayName: $e729681ae85df948$var$COLLAPSIBLE_NAME
});
/* -------------------------------------------------------------------------------------------------
* CollapsibleTrigger
* -----------------------------------------------------------------------------------------------*/ const $e729681ae85df948$var$TRIGGER_NAME = 'CollapsibleTrigger';
const $e729681ae85df948$export$c135dce7b15bbbdc = /*#__PURE__*/ $f0mF1$react.forwardRef((props, forwardedRef)=>{
const { __scopeCollapsible: __scopeCollapsible , ...triggerProps } = props;
const context = $e729681ae85df948$var$useCollapsibleContext($e729681ae85df948$var$TRIGGER_NAME, __scopeCollapsible);
return /*#__PURE__*/ $f0mF1$react.createElement($f0mF1$radixuireactprimitive.Primitive.button, ($parcel$interopDefault($f0mF1$babelruntimehelpersextends))({
type: "button",
"aria-controls": context.contentId,
"aria-expanded": context.open || false,
"data-state": $e729681ae85df948$var$getState(context.open),
"data-disabled": context.disabled ? '' : undefined,
disabled: context.disabled
}, triggerProps, {
ref: forwardedRef,
onClick: $f0mF1$radixuiprimitive.composeEventHandlers(props.onClick, context.onOpenToggle)
}));
});
/*#__PURE__*/ Object.assign($e729681ae85df948$export$c135dce7b15bbbdc, {
displayName: $e729681ae85df948$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
* CollapsibleContent
* -----------------------------------------------------------------------------------------------*/ const $e729681ae85df948$var$CONTENT_NAME = 'CollapsibleContent';
const $e729681ae85df948$export$aadde00976f34151 = /*#__PURE__*/ $f0mF1$react.forwardRef((props, forwardedRef)=>{
const { forceMount: forceMount , ...contentProps } = props;
const context = $e729681ae85df948$var$useCollapsibleContext($e729681ae85df948$var$CONTENT_NAME, props.__scopeCollapsible);
return /*#__PURE__*/ $f0mF1$react.createElement($f0mF1$radixuireactpresence.Presence, {
present: forceMount || context.open
}, ({ present: present })=>/*#__PURE__*/ $f0mF1$react.createElement($e729681ae85df948$var$CollapsibleContentImpl, ($parcel$interopDefault($f0mF1$babelruntimehelpersextends))({}, contentProps, {
ref: forwardedRef,
present: present
}))
);
});
/*#__PURE__*/ Object.assign($e729681ae85df948$export$aadde00976f34151, {
displayName: $e729681ae85df948$var$CONTENT_NAME
});
/* -----------------------------------------------------------------------------------------------*/ const $e729681ae85df948$var$CollapsibleContentImpl = /*#__PURE__*/ $f0mF1$react.forwardRef((props, forwardedRef)=>{
const { __scopeCollapsible: __scopeCollapsible , present: present , children: children , ...contentProps } = props;
const context = $e729681ae85df948$var$useCollapsibleContext($e729681ae85df948$var$CONTENT_NAME, __scopeCollapsible);
const [isPresent, setIsPresent] = $f0mF1$react.useState(present);
const ref = $f0mF1$react.useRef(null);
const composedRefs = $f0mF1$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
const heightRef = $f0mF1$react.useRef(0);
const height = heightRef.current;
const widthRef = $f0mF1$react.useRef(0);
const width = widthRef.current; // when opening we want it to immediately open to retrieve dimensions
// when closing we delay `present` to retrieve dimensions before closing
const isOpen = context.open || isPresent;
const isMountAnimationPreventedRef = $f0mF1$react.useRef(isOpen);
const originalStylesRef = $f0mF1$react.useRef();
$f0mF1$react.useEffect(()=>{
const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false
);
return ()=>cancelAnimationFrame(rAF)
;
}, []);
$f0mF1$radixuireactuselayouteffect.useLayoutEffect(()=>{
const node = ref.current;
if (node) {
originalStylesRef.current = originalStylesRef.current || {
transitionDuration: node.style.transitionDuration,
animationName: node.style.animationName
}; // block any animations/transitions so the element renders at its full dimensions
node.style.transitionDuration = '0s';
node.style.animationName = 'none'; // get width and height from full dimensions
const rect = node.getBoundingClientRect();
heightRef.current = rect.height;
widthRef.current = rect.width; // kick off any animations/transitions that were originally set up if it isn't the initial mount
if (!isMountAnimationPreventedRef.current) {
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
node.style.animationName = originalStylesRef.current.animationName;
}
setIsPresent(present);
}
/**
* depends on `context.open` because it will change to `false`
* when a close is triggered but `present` will be `false` on
* animation end (so when close finishes). This allows us to
* retrieve the dimensions *before* closing.
*/ }, [
context.open,
present
]);
return /*#__PURE__*/ $f0mF1$react.createElement($f0mF1$radixuireactprimitive.Primitive.div, ($parcel$interopDefault($f0mF1$babelruntimehelpersextends))({
"data-state": $e729681ae85df948$var$getState(context.open),
"data-disabled": context.disabled ? '' : undefined,
id: context.contentId,
hidden: !isOpen
}, contentProps, {
ref: composedRefs,
style: {
[`--radix-collapsible-content-height`]: height ? `${height}px` : undefined,
[`--radix-collapsible-content-width`]: width ? `${width}px` : undefined,
...props.style
}
}), isOpen && children);
});
/* -----------------------------------------------------------------------------------------------*/ function $e729681ae85df948$var$getState(open) {
return open ? 'open' : 'closed';
}
const $e729681ae85df948$export$be92b6f5f03c0fe9 = $e729681ae85df948$export$6eb0f7ddcda6131f;
const $e729681ae85df948$export$41fb9f06171c75f4 = $e729681ae85df948$export$c135dce7b15bbbdc;
const $e729681ae85df948$export$7c6e2c02157bb7d2 = $e729681ae85df948$export$aadde00976f34151;
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;ACaA;;oGAEA,CAEA,MAAMgB,sCAAgB,GAAG,aAAzB,AAAA;AAGA,MAAM,CAACC,8CAAD,EAA2BjB,yCAA3B,CAAA,GAAqDS,6CAAkB,CAACO,sCAAD,CAA7E,AAAA;AASA,MAAM,CAACE,yCAAD,EAAsBC,2CAAtB,CAAA,GACJF,8CAAwB,CAA0BD,sCAA1B,CAD1B,AAAA;AAYA,MAAMf,yCAAW,GAAA,aAAGM,CAAAA,uBAAA,CAClB,CAACc,KAAD,EAAuCC,YAAvC,GAAwD;IACtD,MAAM,E,oBACJC,kBADI,CAAA,EAEJC,IAAI,EAAEC,QAFF,CAAA,E,aAGJC,WAHI,CAAA,E,UAIJC,QAJI,CAAA,E,cAKJC,YALI,CAAA,EAM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I,OAAO,CAAChB,IAAT,CADtB;QAEE,eAAA,EAAegB,OAAO,CAACb,QAAR,GAAmB,EAAnB,GAAwBU,SAFzC;QAGE,EAAE,EAAEG,OAAO,CAACC,SAHd;QAIE,MAAM,EAAE,CAACoB,MAAT;KAJF,EAKMf,YALN,EAAA;QAME,GAAG,EAAES,YANP;QAOE,KAAK,EAAE;YACL,CAAE,CAAA,kCAAA,CAAF,CAAA,EAA+CE,MAAM,GAAI,CAAA,EAAEA,MAAO,CAAA,EAAA,CAAb,GAAmBpB,SADnE;YAEL,CAAE,CAAA,iCAAA,CAAF,CAAA,EAA8CuB,KAAK,GAAI,CAAA,EAAEA,Line truncated
+164
View File
@@ -0,0 +1,164 @@
import $73KQ4$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";
import {forwardRef as $73KQ4$forwardRef, createElement as $73KQ4$createElement, useCallback as $73KQ4$useCallback, useState as $73KQ4$useState, useRef as $73KQ4$useRef, useEffect as $73KQ4$useEffect} from "react";
import {composeEventHandlers as $73KQ4$composeEventHandlers} from "@radix-ui/primitive";
import {createContextScope as $73KQ4$createContextScope} from "@radix-ui/react-context";
import {useControllableState as $73KQ4$useControllableState} from "@radix-ui/react-use-controllable-state";
import {useLayoutEffect as $73KQ4$useLayoutEffect} from "@radix-ui/react-use-layout-effect";
import {useComposedRefs as $73KQ4$useComposedRefs} from "@radix-ui/react-compose-refs";
import {Primitive as $73KQ4$Primitive} from "@radix-ui/react-primitive";
import {Presence as $73KQ4$Presence} from "@radix-ui/react-presence";
import {useId as $73KQ4$useId} from "@radix-ui/react-id";
/* -------------------------------------------------------------------------------------------------
* Collapsible
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$COLLAPSIBLE_NAME = 'Collapsible';
const [$409067139f391064$var$createCollapsibleContext, $409067139f391064$export$952b32dcbe73087a] = $73KQ4$createContextScope($409067139f391064$var$COLLAPSIBLE_NAME);
const [$409067139f391064$var$CollapsibleProvider, $409067139f391064$var$useCollapsibleContext] = $409067139f391064$var$createCollapsibleContext($409067139f391064$var$COLLAPSIBLE_NAME);
const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{
const { __scopeCollapsible: __scopeCollapsible , open: openProp , defaultOpen: defaultOpen , disabled: disabled , onOpenChange: onOpenChange , ...collapsibleProps } = props;
const [open = false, setOpen] = $73KQ4$useControllableState({
prop: openProp,
defaultProp: defaultOpen,
onChange: onOpenChange
});
return /*#__PURE__*/ $73KQ4$createElement($409067139f391064$var$CollapsibleProvider, {
scope: __scopeCollapsible,
disabled: disabled,
contentId: $73KQ4$useId(),
open: open,
onOpenToggle: $73KQ4$useCallback(()=>setOpen((prevOpen)=>!prevOpen
)
, [
setOpen
])
}, /*#__PURE__*/ $73KQ4$createElement($73KQ4$Primitive.div, $73KQ4$babelruntimehelpersesmextends({
"data-state": $409067139f391064$var$getState(open),
"data-disabled": disabled ? '' : undefined
}, collapsibleProps, {
ref: forwardedRef
})));
});
/*#__PURE__*/ Object.assign($409067139f391064$export$6eb0f7ddcda6131f, {
displayName: $409067139f391064$var$COLLAPSIBLE_NAME
});
/* -------------------------------------------------------------------------------------------------
* CollapsibleTrigger
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$TRIGGER_NAME = 'CollapsibleTrigger';
const $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{
const { __scopeCollapsible: __scopeCollapsible , ...triggerProps } = props;
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);
return /*#__PURE__*/ $73KQ4$createElement($73KQ4$Primitive.button, $73KQ4$babelruntimehelpersesmextends({
type: "button",
"aria-controls": context.contentId,
"aria-expanded": context.open || false,
"data-state": $409067139f391064$var$getState(context.open),
"data-disabled": context.disabled ? '' : undefined,
disabled: context.disabled
}, triggerProps, {
ref: forwardedRef,
onClick: $73KQ4$composeEventHandlers(props.onClick, context.onOpenToggle)
}));
});
/*#__PURE__*/ Object.assign($409067139f391064$export$c135dce7b15bbbdc, {
displayName: $409067139f391064$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
* CollapsibleContent
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$CONTENT_NAME = 'CollapsibleContent';
const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{
const { forceMount: forceMount , ...contentProps } = props;
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, props.__scopeCollapsible);
return /*#__PURE__*/ $73KQ4$createElement($73KQ4$Presence, {
present: forceMount || context.open
}, ({ present: present })=>/*#__PURE__*/ $73KQ4$createElement($409067139f391064$var$CollapsibleContentImpl, $73KQ4$babelruntimehelpersesmextends({}, contentProps, {
ref: forwardedRef,
present: present
}))
);
});
/*#__PURE__*/ Object.assign($409067139f391064$export$aadde00976f34151, {
displayName: $409067139f391064$var$CONTENT_NAME
});
/* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$CollapsibleContentImpl = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{
const { __scopeCollapsible: __scopeCollapsible , present: present , children: children , ...contentProps } = props;
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, __scopeCollapsible);
const [isPresent, setIsPresent] = $73KQ4$useState(present);
const ref = $73KQ4$useRef(null);
const composedRefs = $73KQ4$useComposedRefs(forwardedRef, ref);
const heightRef = $73KQ4$useRef(0);
const height = heightRef.current;
const widthRef = $73KQ4$useRef(0);
const width = widthRef.current; // when opening we want it to immediately open to retrieve dimensions
// when closing we delay `present` to retrieve dimensions before closing
const isOpen = context.open || isPresent;
const isMountAnimationPreventedRef = $73KQ4$useRef(isOpen);
const originalStylesRef = $73KQ4$useRef();
$73KQ4$useEffect(()=>{
const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false
);
return ()=>cancelAnimationFrame(rAF)
;
}, []);
$73KQ4$useLayoutEffect(()=>{
const node = ref.current;
if (node) {
originalStylesRef.current = originalStylesRef.current || {
transitionDuration: node.style.transitionDuration,
animationName: node.style.animationName
}; // block any animations/transitions so the element renders at its full dimensions
node.style.transitionDuration = '0s';
node.style.animationName = 'none'; // get width and height from full dimensions
const rect = node.getBoundingClientRect();
heightRef.current = rect.height;
widthRef.current = rect.width; // kick off any animations/transitions that were originally set up if it isn't the initial mount
if (!isMountAnimationPreventedRef.current) {
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
node.style.animationName = originalStylesRef.current.animationName;
}
setIsPresent(present);
}
/**
* depends on `context.open` because it will change to `false`
* when a close is triggered but `present` will be `false` on
* animation end (so when close finishes). This allows us to
* retrieve the dimensions *before* closing.
*/ }, [
context.open,
present
]);
return /*#__PURE__*/ $73KQ4$createElement($73KQ4$Primitive.div, $73KQ4$babelruntimehelpersesmextends({
"data-state": $409067139f391064$var$getState(context.open),
"data-disabled": context.disabled ? '' : undefined,
id: context.contentId,
hidden: !isOpen
}, contentProps, {
ref: composedRefs,
style: {
[`--radix-collapsible-content-height`]: height ? `${height}px` : undefined,
[`--radix-collapsible-content-width`]: width ? `${width}px` : undefined,
...props.style
}
}), isOpen && children);
});
/* -----------------------------------------------------------------------------------------------*/ function $409067139f391064$var$getState(open) {
return open ? 'open' : 'closed';
}
const $409067139f391064$export$be92b6f5f03c0fe9 = $409067139f391064$export$6eb0f7ddcda6131f;
const $409067139f391064$export$41fb9f06171c75f4 = $409067139f391064$export$c135dce7b15bbbdc;
const $409067139f391064$export$7c6e2c02157bb7d2 = $409067139f391064$export$aadde00976f34151;
export {$409067139f391064$export$952b32dcbe73087a as createCollapsibleScope, $409067139f391064$export$6eb0f7ddcda6131f as Collapsible, $409067139f391064$export$c135dce7b15bbbdc as CollapsibleTrigger, $409067139f391064$export$aadde00976f34151 as CollapsibleContent, $409067139f391064$export$be92b6f5f03c0fe9 as Root, $409067139f391064$export$41fb9f06171c75f4 as Trigger, $409067139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