Revisão logo
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-KKEH7IGY.js";
|
||||
} from "./chunk-3Q7Z2X7T.js";
|
||||
import {
|
||||
Combination_default,
|
||||
DismissableLayer,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Portal,
|
||||
hideOthers,
|
||||
useFocusGuards
|
||||
} from "./chunk-QF76HVLY.js";
|
||||
} from "./chunk-26QBR6Z3.js";
|
||||
import {
|
||||
Primitive,
|
||||
composeEventHandlers,
|
||||
@@ -17,12 +17,12 @@ import {
|
||||
createContextScope,
|
||||
useControllableState,
|
||||
useId
|
||||
} from "./chunk-X34PLQQA.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
} from "./chunk-2ZZW3GAI.js";
|
||||
import {
|
||||
composeRefs,
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+1
-1
@@ -2,10 +2,10 @@
|
||||
import {
|
||||
createSlot
|
||||
} from "./chunk-YWBEB5PG.js";
|
||||
import "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+6
-6
@@ -1,13 +1,13 @@
|
||||
"use client";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-3Q7Z2X7T.js";
|
||||
import {
|
||||
createCollection,
|
||||
useDirection,
|
||||
usePrevious,
|
||||
useSize
|
||||
} from "./chunk-D4MYACAJ.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-KKEH7IGY.js";
|
||||
} from "./chunk-5BI4FO63.js";
|
||||
import {
|
||||
Primitive,
|
||||
composeEventHandlers,
|
||||
@@ -15,11 +15,11 @@ import {
|
||||
useCallbackRef,
|
||||
useControllableState,
|
||||
useId
|
||||
} from "./chunk-X34PLQQA.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
} from "./chunk-2ZZW3GAI.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@ import {
|
||||
useDirection,
|
||||
usePrevious,
|
||||
useSize
|
||||
} from "./chunk-D4MYACAJ.js";
|
||||
} from "./chunk-5BI4FO63.js";
|
||||
import {
|
||||
Combination_default,
|
||||
DismissableLayer,
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Portal,
|
||||
hideOthers,
|
||||
useFocusGuards
|
||||
} from "./chunk-QF76HVLY.js";
|
||||
} from "./chunk-26QBR6Z3.js";
|
||||
import {
|
||||
Primitive,
|
||||
composeEventHandlers,
|
||||
@@ -21,14 +21,14 @@ import {
|
||||
useControllableState,
|
||||
useId,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-X34PLQQA.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
} from "./chunk-2ZZW3GAI.js";
|
||||
import {
|
||||
composeRefs,
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+31
-37
@@ -1,115 +1,109 @@
|
||||
{
|
||||
"hash": "bef2a67d",
|
||||
"hash": "baa9bd3c",
|
||||
"configHash": "eccf13b4",
|
||||
"lockfileHash": "c4c8a51c",
|
||||
"browserHash": "e7109be1",
|
||||
"lockfileHash": "f25e87f1",
|
||||
"browserHash": "4d672fc5",
|
||||
"optimized": {
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "5b37d437",
|
||||
"fileHash": "2adf36c9",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom": {
|
||||
"src": "../../react-dom/index.js",
|
||||
"file": "react-dom.js",
|
||||
"fileHash": "a8665bbc",
|
||||
"fileHash": "91ce8077",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "5962ef4b",
|
||||
"fileHash": "051319e1",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "cc4583ea",
|
||||
"fileHash": "1945fc54",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@radix-ui/react-dialog": {
|
||||
"src": "../../@radix-ui/react-dialog/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dialog.js",
|
||||
"fileHash": "e65a7fe9",
|
||||
"fileHash": "8be1d102",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-label": {
|
||||
"src": "../../@radix-ui/react-label/dist/index.mjs",
|
||||
"file": "@radix-ui_react-label.js",
|
||||
"fileHash": "d5676393",
|
||||
"fileHash": "7c8329ad",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-radio-group": {
|
||||
"src": "../../@radix-ui/react-radio-group/dist/index.mjs",
|
||||
"file": "@radix-ui_react-radio-group.js",
|
||||
"fileHash": "8a90e2b5",
|
||||
"fileHash": "c1cf0673",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-select": {
|
||||
"src": "../../@radix-ui/react-select/dist/index.mjs",
|
||||
"file": "@radix-ui_react-select.js",
|
||||
"fileHash": "0b10fc7e",
|
||||
"fileHash": "e8a77682",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slot": {
|
||||
"src": "../../@radix-ui/react-slot/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slot.js",
|
||||
"fileHash": "c8dbd881",
|
||||
"fileHash": "4581ea7a",
|
||||
"needsInterop": false
|
||||
},
|
||||
"class-variance-authority": {
|
||||
"src": "../../class-variance-authority/dist/index.mjs",
|
||||
"file": "class-variance-authority.js",
|
||||
"fileHash": "5acda8ac",
|
||||
"fileHash": "e840c683",
|
||||
"needsInterop": false
|
||||
},
|
||||
"clsx": {
|
||||
"src": "../../clsx/dist/clsx.mjs",
|
||||
"file": "clsx.js",
|
||||
"fileHash": "694a54a4",
|
||||
"fileHash": "79cbbdef",
|
||||
"needsInterop": false
|
||||
},
|
||||
"gsap": {
|
||||
"src": "../../gsap/index.js",
|
||||
"file": "gsap.js",
|
||||
"fileHash": "7ddb7298",
|
||||
"fileHash": "096a1c72",
|
||||
"needsInterop": false
|
||||
},
|
||||
"gsap/ScrollTrigger": {
|
||||
"src": "../../gsap/ScrollTrigger.js",
|
||||
"file": "gsap_ScrollTrigger.js",
|
||||
"fileHash": "a71932dd",
|
||||
"fileHash": "05527b31",
|
||||
"needsInterop": false
|
||||
},
|
||||
"lucide-react": {
|
||||
"src": "../../lucide-react/dist/esm/lucide-react.js",
|
||||
"file": "lucide-react.js",
|
||||
"fileHash": "6ea882ab",
|
||||
"fileHash": "4c9ad860",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "f07d8307",
|
||||
"fileHash": "93025179",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-helmet-async": {
|
||||
"src": "../../react-helmet-async/lib/index.esm.js",
|
||||
"file": "react-helmet-async.js",
|
||||
"fileHash": "b7d7d0af",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../react-router-dom/dist/index.mjs",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "9ac7c1ba",
|
||||
"fileHash": "a7f80be8",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tailwind-merge": {
|
||||
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
|
||||
"file": "tailwind-merge.js",
|
||||
"fileHash": "0cfdfcd3",
|
||||
"fileHash": "e87c9277",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
@@ -117,27 +111,27 @@
|
||||
"chunk-U7P2NEEE": {
|
||||
"file": "chunk-U7P2NEEE.js"
|
||||
},
|
||||
"chunk-D4MYACAJ": {
|
||||
"file": "chunk-D4MYACAJ.js"
|
||||
},
|
||||
"chunk-YWBEB5PG": {
|
||||
"file": "chunk-YWBEB5PG.js"
|
||||
},
|
||||
"chunk-KKEH7IGY": {
|
||||
"file": "chunk-KKEH7IGY.js"
|
||||
"chunk-3Q7Z2X7T": {
|
||||
"file": "chunk-3Q7Z2X7T.js"
|
||||
},
|
||||
"chunk-QF76HVLY": {
|
||||
"file": "chunk-QF76HVLY.js"
|
||||
"chunk-5BI4FO63": {
|
||||
"file": "chunk-5BI4FO63.js"
|
||||
},
|
||||
"chunk-X34PLQQA": {
|
||||
"file": "chunk-X34PLQQA.js"
|
||||
"chunk-26QBR6Z3": {
|
||||
"file": "chunk-26QBR6Z3.js"
|
||||
},
|
||||
"chunk-YF4B4G2L": {
|
||||
"file": "chunk-YF4B4G2L.js"
|
||||
"chunk-2ZZW3GAI": {
|
||||
"file": "chunk-2ZZW3GAI.js"
|
||||
},
|
||||
"chunk-2VUH7NEY": {
|
||||
"file": "chunk-2VUH7NEY.js"
|
||||
},
|
||||
"chunk-YF4B4G2L": {
|
||||
"file": "chunk-YF4B4G2L.js"
|
||||
},
|
||||
"chunk-2YVA4HRZ": {
|
||||
"file": "chunk-2YVA4HRZ.js"
|
||||
},
|
||||
|
||||
-248
@@ -1,248 +0,0 @@
|
||||
import {
|
||||
createContextScope,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-X34PLQQA.js";
|
||||
import {
|
||||
composeRefs,
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-WUR7D6NS.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
||||
var import_react = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = createSlotClone(ownerName);
|
||||
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
||||
return React.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot2.displayName = `${ownerName}.Slot`;
|
||||
return Slot2;
|
||||
}
|
||||
var Slot = createSlot("Slot");
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React.cloneElement(children, props2);
|
||||
}
|
||||
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
||||
function createSlottable(ownerName) {
|
||||
const Slottable2 = ({ children }) => {
|
||||
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
||||
};
|
||||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||||
return Slottable2;
|
||||
}
|
||||
var Slottable = createSlottable("Slottable");
|
||||
function isSlottable(child) {
|
||||
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
const result = childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
return result;
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var import_react2 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
||||
function createCollection(name) {
|
||||
const PROVIDER_NAME = name + "CollectionProvider";
|
||||
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
||||
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
||||
PROVIDER_NAME,
|
||||
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
||||
);
|
||||
const CollectionProvider = (props) => {
|
||||
const { scope, children } = props;
|
||||
const ref = import_react.default.useRef(null);
|
||||
const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
|
||||
return (0, import_jsx_runtime2.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
||||
};
|
||||
CollectionProvider.displayName = PROVIDER_NAME;
|
||||
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
||||
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
||||
const CollectionSlot = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { scope, children } = props;
|
||||
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
||||
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
||||
return (0, import_jsx_runtime2.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
|
||||
}
|
||||
);
|
||||
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
||||
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
||||
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
||||
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
||||
const CollectionItemSlot = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { scope, children, ...itemData } = props;
|
||||
const ref = import_react.default.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
||||
import_react.default.useEffect(() => {
|
||||
context.itemMap.set(ref, { ref, ...itemData });
|
||||
return () => void context.itemMap.delete(ref);
|
||||
});
|
||||
return (0, import_jsx_runtime2.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
||||
}
|
||||
);
|
||||
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
||||
function useCollection(scope) {
|
||||
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
||||
const getItems = import_react.default.useCallback(() => {
|
||||
const collectionNode = context.collectionRef.current;
|
||||
if (!collectionNode) return [];
|
||||
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
||||
const items = Array.from(context.itemMap.values());
|
||||
const orderedItems = items.sort(
|
||||
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
||||
);
|
||||
return orderedItems;
|
||||
}, [context.collectionRef, context.itemMap]);
|
||||
return getItems;
|
||||
}
|
||||
return [
|
||||
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
||||
useCollection,
|
||||
createCollectionScope
|
||||
];
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-direction/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
||||
var DirectionContext = React3.createContext(void 0);
|
||||
function useDirection(localDir) {
|
||||
const globalDir = React3.useContext(DirectionContext);
|
||||
return localDir || globalDir || "ltr";
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-size/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
function useSize(element) {
|
||||
const [size, setSize] = React4.useState(void 0);
|
||||
useLayoutEffect2(() => {
|
||||
if (element) {
|
||||
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
if (!Array.isArray(entries)) {
|
||||
return;
|
||||
}
|
||||
if (!entries.length) {
|
||||
return;
|
||||
}
|
||||
const entry = entries[0];
|
||||
let width;
|
||||
let height;
|
||||
if ("borderBoxSize" in entry) {
|
||||
const borderSizeEntry = entry["borderBoxSize"];
|
||||
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
||||
width = borderSize["inlineSize"];
|
||||
height = borderSize["blockSize"];
|
||||
} else {
|
||||
width = element.offsetWidth;
|
||||
height = element.offsetHeight;
|
||||
}
|
||||
setSize({ width, height });
|
||||
});
|
||||
resizeObserver.observe(element, { box: "border-box" });
|
||||
return () => resizeObserver.unobserve(element);
|
||||
} else {
|
||||
setSize(void 0);
|
||||
}
|
||||
}, [element]);
|
||||
return size;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
function usePrevious(value) {
|
||||
const ref = React5.useRef({ value, previous: value });
|
||||
return React5.useMemo(() => {
|
||||
if (ref.current.value !== value) {
|
||||
ref.current.previous = ref.current.value;
|
||||
ref.current.value = value;
|
||||
}
|
||||
return ref.current.previous;
|
||||
}, [value]);
|
||||
}
|
||||
|
||||
export {
|
||||
createCollection,
|
||||
useDirection,
|
||||
useSize,
|
||||
usePrevious
|
||||
};
|
||||
//# sourceMappingURL=chunk-D4MYACAJ.js.map
|
||||
-7
File diff suppressed because one or more lines are too long
-143
@@ -1,143 +0,0 @@
|
||||
import {
|
||||
useLayoutEffect2
|
||||
} from "./chunk-X34PLQQA.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-WUR7D6NS.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
}
|
||||
var Presence = (props) => {
|
||||
const { present, children } = props;
|
||||
const presence = usePresence(present);
|
||||
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
|
||||
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
||||
const forceMount = typeof children === "function";
|
||||
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
|
||||
};
|
||||
Presence.displayName = "Presence";
|
||||
function usePresence(present) {
|
||||
const [node, setNode] = React2.useState();
|
||||
const stylesRef = React2.useRef(null);
|
||||
const prevPresentRef = React2.useRef(present);
|
||||
const prevAnimationNameRef = React2.useRef("none");
|
||||
const initialState = present ? "mounted" : "unmounted";
|
||||
const [state, send] = useStateMachine(initialState, {
|
||||
mounted: {
|
||||
UNMOUNT: "unmounted",
|
||||
ANIMATION_OUT: "unmountSuspended"
|
||||
},
|
||||
unmountSuspended: {
|
||||
MOUNT: "mounted",
|
||||
ANIMATION_END: "unmounted"
|
||||
},
|
||||
unmounted: {
|
||||
MOUNT: "mounted"
|
||||
}
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
||||
}, [state]);
|
||||
useLayoutEffect2(() => {
|
||||
const styles = stylesRef.current;
|
||||
const wasPresent = prevPresentRef.current;
|
||||
const hasPresentChanged = wasPresent !== present;
|
||||
if (hasPresentChanged) {
|
||||
const prevAnimationName = prevAnimationNameRef.current;
|
||||
const currentAnimationName = getAnimationName(styles);
|
||||
if (present) {
|
||||
send("MOUNT");
|
||||
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
||||
send("UNMOUNT");
|
||||
} else {
|
||||
const isAnimating = prevAnimationName !== currentAnimationName;
|
||||
if (wasPresent && isAnimating) {
|
||||
send("ANIMATION_OUT");
|
||||
} else {
|
||||
send("UNMOUNT");
|
||||
}
|
||||
}
|
||||
prevPresentRef.current = present;
|
||||
}
|
||||
}, [present, send]);
|
||||
useLayoutEffect2(() => {
|
||||
if (node) {
|
||||
let timeoutId;
|
||||
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
||||
const handleAnimationEnd = (event) => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
||||
if (event.target === node && isCurrentAnimation) {
|
||||
send("ANIMATION_END");
|
||||
if (!prevPresentRef.current) {
|
||||
const currentFillMode = node.style.animationFillMode;
|
||||
node.style.animationFillMode = "forwards";
|
||||
timeoutId = ownerWindow.setTimeout(() => {
|
||||
if (node.style.animationFillMode === "forwards") {
|
||||
node.style.animationFillMode = currentFillMode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleAnimationStart = (event) => {
|
||||
if (event.target === node) {
|
||||
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
||||
}
|
||||
};
|
||||
node.addEventListener("animationstart", handleAnimationStart);
|
||||
node.addEventListener("animationcancel", handleAnimationEnd);
|
||||
node.addEventListener("animationend", handleAnimationEnd);
|
||||
return () => {
|
||||
ownerWindow.clearTimeout(timeoutId);
|
||||
node.removeEventListener("animationstart", handleAnimationStart);
|
||||
node.removeEventListener("animationcancel", handleAnimationEnd);
|
||||
node.removeEventListener("animationend", handleAnimationEnd);
|
||||
};
|
||||
} else {
|
||||
send("ANIMATION_END");
|
||||
}
|
||||
}, [node, send]);
|
||||
return {
|
||||
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
||||
ref: React2.useCallback((node2) => {
|
||||
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
||||
setNode(node2);
|
||||
}, [])
|
||||
};
|
||||
}
|
||||
function getAnimationName(styles) {
|
||||
return styles?.animationName || "none";
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
export {
|
||||
Presence
|
||||
};
|
||||
//# sourceMappingURL=chunk-KKEH7IGY.js.map
|
||||
-7
File diff suppressed because one or more lines are too long
-1352
File diff suppressed because it is too large
Load Diff
-7
File diff suppressed because one or more lines are too long
-354
@@ -1,354 +0,0 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
composeRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-WUR7D6NS.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/primitive/dist/index.mjs
|
||||
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler?.(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler?.(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-context/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React.createContext(defaultContext);
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = scope?.[scopeName] || scopeContexts;
|
||||
return React.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var ReactDOM = __toESM(require_react_dom(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = createSlotClone(ownerName);
|
||||
const Slot2 = React2.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React2.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
|
||||
return React2.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot2.displayName = `${ownerName}.Slot`;
|
||||
return Slot2;
|
||||
}
|
||||
var Slot = createSlot("Slot");
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React2.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React2.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React2.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React2.cloneElement(children, props2);
|
||||
}
|
||||
return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
||||
function createSlottable(ownerName) {
|
||||
const Slottable2 = ({ children }) => {
|
||||
return (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
|
||||
};
|
||||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||||
return Slottable2;
|
||||
}
|
||||
var Slottable = createSlottable("Slottable");
|
||||
function isSlottable(child) {
|
||||
return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
const result = childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
return result;
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
||||
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"select",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot2 = createSlot(`Primitive.${node}`);
|
||||
const Node = React3.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot2 : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
function useCallbackRef(callback) {
|
||||
const callbackRef = React4.useRef(callback);
|
||||
React4.useEffect(() => {
|
||||
callbackRef.current = callback;
|
||||
});
|
||||
return React4.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = globalThis?.document ? React5.useLayoutEffect : () => {
|
||||
};
|
||||
|
||||
// node_modules/@radix-ui/react-id/dist/index.mjs
|
||||
var React6 = __toESM(require_react(), 1);
|
||||
var useReactId = React6[" useId ".trim().toString()] || (() => void 0);
|
||||
var count = 0;
|
||||
function useId(deterministicId) {
|
||||
const [id, setId] = React6.useState(useReactId());
|
||||
useLayoutEffect2(() => {
|
||||
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
||||
}, [deterministicId]);
|
||||
return deterministicId || (id ? `radix-${id}` : "");
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var React8 = __toESM(require_react(), 1);
|
||||
var React22 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-use-effect-event/dist/index.mjs
|
||||
var React7 = __toESM(require_react(), 1);
|
||||
var useReactEffectEvent = React7[" useEffectEvent ".trim().toString()];
|
||||
var useReactInsertionEffect = React7[" useInsertionEffect ".trim().toString()];
|
||||
|
||||
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var useInsertionEffect = React8[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
||||
function useControllableState({
|
||||
prop,
|
||||
defaultProp,
|
||||
onChange = () => {
|
||||
},
|
||||
caller
|
||||
}) {
|
||||
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
||||
defaultProp,
|
||||
onChange
|
||||
});
|
||||
const isControlled = prop !== void 0;
|
||||
const value = isControlled ? prop : uncontrolledProp;
|
||||
if (true) {
|
||||
const isControlledRef = React8.useRef(prop !== void 0);
|
||||
React8.useEffect(() => {
|
||||
const wasControlled = isControlledRef.current;
|
||||
if (wasControlled !== isControlled) {
|
||||
const from = wasControlled ? "controlled" : "uncontrolled";
|
||||
const to = isControlled ? "controlled" : "uncontrolled";
|
||||
console.warn(
|
||||
`${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.`
|
||||
);
|
||||
}
|
||||
isControlledRef.current = isControlled;
|
||||
}, [isControlled, caller]);
|
||||
}
|
||||
const setValue = React8.useCallback(
|
||||
(nextValue) => {
|
||||
if (isControlled) {
|
||||
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
||||
if (value2 !== prop) {
|
||||
onChangeRef.current?.(value2);
|
||||
}
|
||||
} else {
|
||||
setUncontrolledProp(nextValue);
|
||||
}
|
||||
},
|
||||
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
||||
);
|
||||
return [value, setValue];
|
||||
}
|
||||
function useUncontrolledState({
|
||||
defaultProp,
|
||||
onChange
|
||||
}) {
|
||||
const [value, setValue] = React8.useState(defaultProp);
|
||||
const prevValueRef = React8.useRef(value);
|
||||
const onChangeRef = React8.useRef(onChange);
|
||||
useInsertionEffect(() => {
|
||||
onChangeRef.current = onChange;
|
||||
}, [onChange]);
|
||||
React8.useEffect(() => {
|
||||
if (prevValueRef.current !== value) {
|
||||
onChangeRef.current?.(value);
|
||||
prevValueRef.current = value;
|
||||
}
|
||||
}, [value, prevValueRef]);
|
||||
return [value, setValue, onChangeRef];
|
||||
}
|
||||
function isFunction(value) {
|
||||
return typeof value === "function";
|
||||
}
|
||||
|
||||
export {
|
||||
composeEventHandlers,
|
||||
createContext2,
|
||||
createContextScope,
|
||||
Primitive,
|
||||
dispatchDiscreteCustomEvent,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2,
|
||||
useId,
|
||||
useControllableState
|
||||
};
|
||||
//# sourceMappingURL=chunk-X34PLQQA.js.map
|
||||
-7
File diff suppressed because one or more lines are too long
-1150
File diff suppressed because it is too large
Load Diff
-7
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user