Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
21
node_modules/@radix-ui/react-popper/LICENSE
generated
vendored
Normal file
21
node_modules/@radix-ui/react-popper/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
node_modules/@radix-ui/react-popper/README.md
generated
vendored
Normal file
3
node_modules/@radix-ui/react-popper/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# `react-popper`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
46
node_modules/@radix-ui/react-popper/dist/index.d.mts
generated
vendored
Normal file
46
node_modules/@radix-ui/react-popper/dist/index.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import * as ArrowPrimitive from '@radix-ui/react-arrow';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
import { Measurable } from '@radix-ui/rect';
|
||||
|
||||
declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
||||
declare const ALIGN_OPTIONS: readonly ["start", "center", "end"];
|
||||
type Side = (typeof SIDE_OPTIONS)[number];
|
||||
type Align = (typeof ALIGN_OPTIONS)[number];
|
||||
declare const createPopperScope: _radix_ui_react_context.CreateScope;
|
||||
interface PopperProps {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
declare const Popper: React.FC<PopperProps>;
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface PopperAnchorProps extends PrimitiveDivProps {
|
||||
virtualRef?: React.RefObject<Measurable>;
|
||||
}
|
||||
declare const PopperAnchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type Boundary = Element | null;
|
||||
interface PopperContentProps extends PrimitiveDivProps {
|
||||
side?: Side;
|
||||
sideOffset?: number;
|
||||
align?: Align;
|
||||
alignOffset?: number;
|
||||
arrowPadding?: number;
|
||||
avoidCollisions?: boolean;
|
||||
collisionBoundary?: Boundary | Boundary[];
|
||||
collisionPadding?: number | Partial<Record<Side, number>>;
|
||||
sticky?: 'partial' | 'always';
|
||||
hideWhenDetached?: boolean;
|
||||
updatePositionStrategy?: 'optimized' | 'always';
|
||||
onPlaced?: () => void;
|
||||
}
|
||||
declare const PopperContent: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type ArrowProps = React.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
||||
interface PopperArrowProps extends ArrowProps {
|
||||
}
|
||||
declare const PopperArrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
declare const Root: React.FC<PopperProps>;
|
||||
declare const Anchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Content: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Arrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
|
||||
export { ALIGN_OPTIONS, Anchor, Arrow, Content, Popper, PopperAnchor, type PopperAnchorProps, PopperArrow, type PopperArrowProps, PopperContent, type PopperContentProps, type PopperProps, Root, SIDE_OPTIONS, createPopperScope };
|
||||
46
node_modules/@radix-ui/react-popper/dist/index.d.ts
generated
vendored
Normal file
46
node_modules/@radix-ui/react-popper/dist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import * as ArrowPrimitive from '@radix-ui/react-arrow';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
import { Measurable } from '@radix-ui/rect';
|
||||
|
||||
declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
||||
declare const ALIGN_OPTIONS: readonly ["start", "center", "end"];
|
||||
type Side = (typeof SIDE_OPTIONS)[number];
|
||||
type Align = (typeof ALIGN_OPTIONS)[number];
|
||||
declare const createPopperScope: _radix_ui_react_context.CreateScope;
|
||||
interface PopperProps {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
declare const Popper: React.FC<PopperProps>;
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface PopperAnchorProps extends PrimitiveDivProps {
|
||||
virtualRef?: React.RefObject<Measurable>;
|
||||
}
|
||||
declare const PopperAnchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type Boundary = Element | null;
|
||||
interface PopperContentProps extends PrimitiveDivProps {
|
||||
side?: Side;
|
||||
sideOffset?: number;
|
||||
align?: Align;
|
||||
alignOffset?: number;
|
||||
arrowPadding?: number;
|
||||
avoidCollisions?: boolean;
|
||||
collisionBoundary?: Boundary | Boundary[];
|
||||
collisionPadding?: number | Partial<Record<Side, number>>;
|
||||
sticky?: 'partial' | 'always';
|
||||
hideWhenDetached?: boolean;
|
||||
updatePositionStrategy?: 'optimized' | 'always';
|
||||
onPlaced?: () => void;
|
||||
}
|
||||
declare const PopperContent: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type ArrowProps = React.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
||||
interface PopperArrowProps extends ArrowProps {
|
||||
}
|
||||
declare const PopperArrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
declare const Root: React.FC<PopperProps>;
|
||||
declare const Anchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Content: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Arrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
|
||||
export { ALIGN_OPTIONS, Anchor, Arrow, Content, Popper, PopperAnchor, type PopperAnchorProps, PopperArrow, type PopperArrowProps, PopperContent, type PopperContentProps, type PopperProps, Root, SIDE_OPTIONS, createPopperScope };
|
||||
330
node_modules/@radix-ui/react-popper/dist/index.js
generated
vendored
Normal file
330
node_modules/@radix-ui/react-popper/dist/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
ALIGN_OPTIONS: () => ALIGN_OPTIONS,
|
||||
Anchor: () => Anchor,
|
||||
Arrow: () => Arrow,
|
||||
Content: () => Content,
|
||||
Popper: () => Popper,
|
||||
PopperAnchor: () => PopperAnchor,
|
||||
PopperArrow: () => PopperArrow,
|
||||
PopperContent: () => PopperContent,
|
||||
Root: () => Root2,
|
||||
SIDE_OPTIONS: () => SIDE_OPTIONS,
|
||||
createPopperScope: () => createPopperScope
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/popper.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_react_dom = require("@floating-ui/react-dom");
|
||||
var ArrowPrimitive = __toESM(require("@radix-ui/react-arrow"));
|
||||
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
|
||||
var import_react_context = require("@radix-ui/react-context");
|
||||
var import_react_primitive = require("@radix-ui/react-primitive");
|
||||
var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref");
|
||||
var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect");
|
||||
var import_react_use_size = require("@radix-ui/react-use-size");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var SIDE_OPTIONS = ["top", "right", "bottom", "left"];
|
||||
var ALIGN_OPTIONS = ["start", "center", "end"];
|
||||
var POPPER_NAME = "Popper";
|
||||
var [createPopperContext, createPopperScope] = (0, import_react_context.createContextScope)(POPPER_NAME);
|
||||
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
||||
var Popper = (props) => {
|
||||
const { __scopePopper, children } = props;
|
||||
const [anchor, setAnchor] = React.useState(null);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
||||
};
|
||||
Popper.displayName = POPPER_NAME;
|
||||
var ANCHOR_NAME = "PopperAnchor";
|
||||
var PopperAnchor = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
||||
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
||||
const ref = React.useRef(null);
|
||||
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref);
|
||||
const anchorRef = React.useRef(null);
|
||||
React.useEffect(() => {
|
||||
const previousAnchor = anchorRef.current;
|
||||
anchorRef.current = virtualRef?.current || ref.current;
|
||||
if (previousAnchor !== anchorRef.current) {
|
||||
context.onAnchorChange(anchorRef.current);
|
||||
}
|
||||
});
|
||||
return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...anchorProps, ref: composedRefs });
|
||||
}
|
||||
);
|
||||
PopperAnchor.displayName = ANCHOR_NAME;
|
||||
var CONTENT_NAME = "PopperContent";
|
||||
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
||||
var PopperContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopePopper,
|
||||
side = "bottom",
|
||||
sideOffset = 0,
|
||||
align = "center",
|
||||
alignOffset = 0,
|
||||
arrowPadding = 0,
|
||||
avoidCollisions = true,
|
||||
collisionBoundary = [],
|
||||
collisionPadding: collisionPaddingProp = 0,
|
||||
sticky = "partial",
|
||||
hideWhenDetached = false,
|
||||
updatePositionStrategy = "optimized",
|
||||
onPlaced,
|
||||
...contentProps
|
||||
} = props;
|
||||
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
||||
const [content, setContent] = React.useState(null);
|
||||
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContent(node));
|
||||
const [arrow, setArrow] = React.useState(null);
|
||||
const arrowSize = (0, import_react_use_size.useSize)(arrow);
|
||||
const arrowWidth = arrowSize?.width ?? 0;
|
||||
const arrowHeight = arrowSize?.height ?? 0;
|
||||
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
||||
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
||||
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
||||
const hasExplicitBoundaries = boundary.length > 0;
|
||||
const detectOverflowOptions = {
|
||||
padding: collisionPadding,
|
||||
boundary: boundary.filter(isNotNull),
|
||||
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
||||
altBoundary: hasExplicitBoundaries
|
||||
};
|
||||
const { refs, floatingStyles, placement, isPositioned, middlewareData } = (0, import_react_dom.useFloating)({
|
||||
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
||||
strategy: "fixed",
|
||||
placement: desiredPlacement,
|
||||
whileElementsMounted: (...args) => {
|
||||
const cleanup = (0, import_react_dom.autoUpdate)(...args, {
|
||||
animationFrame: updatePositionStrategy === "always"
|
||||
});
|
||||
return cleanup;
|
||||
},
|
||||
elements: {
|
||||
reference: context.anchor
|
||||
},
|
||||
middleware: [
|
||||
(0, import_react_dom.offset)({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),
|
||||
avoidCollisions && (0, import_react_dom.shift)({
|
||||
mainAxis: true,
|
||||
crossAxis: false,
|
||||
limiter: sticky === "partial" ? (0, import_react_dom.limitShift)() : void 0,
|
||||
...detectOverflowOptions
|
||||
}),
|
||||
avoidCollisions && (0, import_react_dom.flip)({ ...detectOverflowOptions }),
|
||||
(0, import_react_dom.size)({
|
||||
...detectOverflowOptions,
|
||||
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
||||
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
||||
const contentStyle = elements.floating.style;
|
||||
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
|
||||
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
|
||||
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
|
||||
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
|
||||
}
|
||||
}),
|
||||
arrow && (0, import_react_dom.arrow)({ element: arrow, padding: arrowPadding }),
|
||||
transformOrigin({ arrowWidth, arrowHeight }),
|
||||
hideWhenDetached && (0, import_react_dom.hide)({ strategy: "referenceHidden", ...detectOverflowOptions })
|
||||
]
|
||||
});
|
||||
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
||||
const handlePlaced = (0, import_react_use_callback_ref.useCallbackRef)(onPlaced);
|
||||
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
||||
if (isPositioned) {
|
||||
handlePlaced?.();
|
||||
}
|
||||
}, [isPositioned, handlePlaced]);
|
||||
const arrowX = middlewareData.arrow?.x;
|
||||
const arrowY = middlewareData.arrow?.y;
|
||||
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
||||
const [contentZIndex, setContentZIndex] = React.useState();
|
||||
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
||||
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
||||
}, [content]);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
"div",
|
||||
{
|
||||
ref: refs.setFloating,
|
||||
"data-radix-popper-content-wrapper": "",
|
||||
style: {
|
||||
...floatingStyles,
|
||||
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
||||
// keep off the page when measuring
|
||||
minWidth: "max-content",
|
||||
zIndex: contentZIndex,
|
||||
["--radix-popper-transform-origin"]: [
|
||||
middlewareData.transformOrigin?.x,
|
||||
middlewareData.transformOrigin?.y
|
||||
].join(" "),
|
||||
// hide the content if using the hide middleware and should be hidden
|
||||
// set visibility to hidden and disable pointer events so the UI behaves
|
||||
// as if the PopperContent isn't there at all
|
||||
...middlewareData.hide?.referenceHidden && {
|
||||
visibility: "hidden",
|
||||
pointerEvents: "none"
|
||||
}
|
||||
},
|
||||
dir: props.dir,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
PopperContentProvider,
|
||||
{
|
||||
scope: __scopePopper,
|
||||
placedSide,
|
||||
onArrowChange: setArrow,
|
||||
arrowX,
|
||||
arrowY,
|
||||
shouldHideArrow: cannotCenterArrow,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.div,
|
||||
{
|
||||
"data-side": placedSide,
|
||||
"data-align": placedAlign,
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
...contentProps.style,
|
||||
// if the PopperContent hasn't been placed yet (not all measurements done)
|
||||
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
||||
animation: !isPositioned ? "none" : void 0
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
PopperContent.displayName = CONTENT_NAME;
|
||||
var ARROW_NAME = "PopperArrow";
|
||||
var OPPOSITE_SIDE = {
|
||||
top: "bottom",
|
||||
right: "left",
|
||||
bottom: "top",
|
||||
left: "right"
|
||||
};
|
||||
var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
||||
const { __scopePopper, ...arrowProps } = props;
|
||||
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
||||
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
||||
return (
|
||||
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
||||
// doesn't report size as we'd expect on SVG elements.
|
||||
// it reports their bounding box which is effectively the largest path inside the SVG.
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
"span",
|
||||
{
|
||||
ref: contentContext.onArrowChange,
|
||||
style: {
|
||||
position: "absolute",
|
||||
left: contentContext.arrowX,
|
||||
top: contentContext.arrowY,
|
||||
[baseSide]: 0,
|
||||
transformOrigin: {
|
||||
top: "",
|
||||
right: "0 0",
|
||||
bottom: "center 0",
|
||||
left: "100% 0"
|
||||
}[contentContext.placedSide],
|
||||
transform: {
|
||||
top: "translateY(100%)",
|
||||
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
||||
bottom: `rotate(180deg)`,
|
||||
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
||||
}[contentContext.placedSide],
|
||||
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
||||
},
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
ArrowPrimitive.Root,
|
||||
{
|
||||
...arrowProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
...arrowProps.style,
|
||||
// ensures the element can be measured correctly (mostly for if SVG)
|
||||
display: "block"
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
PopperArrow.displayName = ARROW_NAME;
|
||||
function isNotNull(value) {
|
||||
return value !== null;
|
||||
}
|
||||
var transformOrigin = (options) => ({
|
||||
name: "transformOrigin",
|
||||
options,
|
||||
fn(data) {
|
||||
const { placement, rects, middlewareData } = data;
|
||||
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
||||
const isArrowHidden = cannotCenterArrow;
|
||||
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
||||
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
||||
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
||||
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
||||
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
||||
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
||||
let x = "";
|
||||
let y = "";
|
||||
if (placedSide === "bottom") {
|
||||
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
||||
y = `${-arrowHeight}px`;
|
||||
} else if (placedSide === "top") {
|
||||
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
||||
y = `${rects.floating.height + arrowHeight}px`;
|
||||
} else if (placedSide === "right") {
|
||||
x = `${-arrowHeight}px`;
|
||||
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
||||
} else if (placedSide === "left") {
|
||||
x = `${rects.floating.width + arrowHeight}px`;
|
||||
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
||||
}
|
||||
return { data: { x, y } };
|
||||
}
|
||||
});
|
||||
function getSideAndAlignFromPlacement(placement) {
|
||||
const [side, align = "center"] = placement.split("-");
|
||||
return [side, align];
|
||||
}
|
||||
var Root2 = Popper;
|
||||
var Anchor = PopperAnchor;
|
||||
var Content = PopperContent;
|
||||
var Arrow = PopperArrow;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
node_modules/@radix-ui/react-popper/dist/index.js.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-popper/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
308
node_modules/@radix-ui/react-popper/dist/index.mjs
generated
vendored
Normal file
308
node_modules/@radix-ui/react-popper/dist/index.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,308 @@
|
|||
"use client";
|
||||
|
||||
// src/popper.tsx
|
||||
import * as React from "react";
|
||||
import {
|
||||
useFloating,
|
||||
autoUpdate,
|
||||
offset,
|
||||
shift,
|
||||
limitShift,
|
||||
hide,
|
||||
arrow as floatingUIarrow,
|
||||
flip,
|
||||
size
|
||||
} from "@floating-ui/react-dom";
|
||||
import * as ArrowPrimitive from "@radix-ui/react-arrow";
|
||||
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
||||
import { createContextScope } from "@radix-ui/react-context";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import { useCallbackRef } from "@radix-ui/react-use-callback-ref";
|
||||
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
|
||||
import { useSize } from "@radix-ui/react-use-size";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var SIDE_OPTIONS = ["top", "right", "bottom", "left"];
|
||||
var ALIGN_OPTIONS = ["start", "center", "end"];
|
||||
var POPPER_NAME = "Popper";
|
||||
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
||||
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
||||
var Popper = (props) => {
|
||||
const { __scopePopper, children } = props;
|
||||
const [anchor, setAnchor] = React.useState(null);
|
||||
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
||||
};
|
||||
Popper.displayName = POPPER_NAME;
|
||||
var ANCHOR_NAME = "PopperAnchor";
|
||||
var PopperAnchor = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
||||
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
||||
const ref = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
const anchorRef = React.useRef(null);
|
||||
React.useEffect(() => {
|
||||
const previousAnchor = anchorRef.current;
|
||||
anchorRef.current = virtualRef?.current || ref.current;
|
||||
if (previousAnchor !== anchorRef.current) {
|
||||
context.onAnchorChange(anchorRef.current);
|
||||
}
|
||||
});
|
||||
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
||||
}
|
||||
);
|
||||
PopperAnchor.displayName = ANCHOR_NAME;
|
||||
var CONTENT_NAME = "PopperContent";
|
||||
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
||||
var PopperContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopePopper,
|
||||
side = "bottom",
|
||||
sideOffset = 0,
|
||||
align = "center",
|
||||
alignOffset = 0,
|
||||
arrowPadding = 0,
|
||||
avoidCollisions = true,
|
||||
collisionBoundary = [],
|
||||
collisionPadding: collisionPaddingProp = 0,
|
||||
sticky = "partial",
|
||||
hideWhenDetached = false,
|
||||
updatePositionStrategy = "optimized",
|
||||
onPlaced,
|
||||
...contentProps
|
||||
} = props;
|
||||
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
||||
const [content, setContent] = React.useState(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
||||
const [arrow, setArrow] = React.useState(null);
|
||||
const arrowSize = useSize(arrow);
|
||||
const arrowWidth = arrowSize?.width ?? 0;
|
||||
const arrowHeight = arrowSize?.height ?? 0;
|
||||
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
||||
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
||||
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
||||
const hasExplicitBoundaries = boundary.length > 0;
|
||||
const detectOverflowOptions = {
|
||||
padding: collisionPadding,
|
||||
boundary: boundary.filter(isNotNull),
|
||||
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
||||
altBoundary: hasExplicitBoundaries
|
||||
};
|
||||
const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
|
||||
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
||||
strategy: "fixed",
|
||||
placement: desiredPlacement,
|
||||
whileElementsMounted: (...args) => {
|
||||
const cleanup = autoUpdate(...args, {
|
||||
animationFrame: updatePositionStrategy === "always"
|
||||
});
|
||||
return cleanup;
|
||||
},
|
||||
elements: {
|
||||
reference: context.anchor
|
||||
},
|
||||
middleware: [
|
||||
offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),
|
||||
avoidCollisions && shift({
|
||||
mainAxis: true,
|
||||
crossAxis: false,
|
||||
limiter: sticky === "partial" ? limitShift() : void 0,
|
||||
...detectOverflowOptions
|
||||
}),
|
||||
avoidCollisions && flip({ ...detectOverflowOptions }),
|
||||
size({
|
||||
...detectOverflowOptions,
|
||||
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
||||
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
||||
const contentStyle = elements.floating.style;
|
||||
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
|
||||
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
|
||||
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
|
||||
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
|
||||
}
|
||||
}),
|
||||
arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),
|
||||
transformOrigin({ arrowWidth, arrowHeight }),
|
||||
hideWhenDetached && hide({ strategy: "referenceHidden", ...detectOverflowOptions })
|
||||
]
|
||||
});
|
||||
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
||||
const handlePlaced = useCallbackRef(onPlaced);
|
||||
useLayoutEffect(() => {
|
||||
if (isPositioned) {
|
||||
handlePlaced?.();
|
||||
}
|
||||
}, [isPositioned, handlePlaced]);
|
||||
const arrowX = middlewareData.arrow?.x;
|
||||
const arrowY = middlewareData.arrow?.y;
|
||||
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
||||
const [contentZIndex, setContentZIndex] = React.useState();
|
||||
useLayoutEffect(() => {
|
||||
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
||||
}, [content]);
|
||||
return /* @__PURE__ */ jsx(
|
||||
"div",
|
||||
{
|
||||
ref: refs.setFloating,
|
||||
"data-radix-popper-content-wrapper": "",
|
||||
style: {
|
||||
...floatingStyles,
|
||||
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
||||
// keep off the page when measuring
|
||||
minWidth: "max-content",
|
||||
zIndex: contentZIndex,
|
||||
["--radix-popper-transform-origin"]: [
|
||||
middlewareData.transformOrigin?.x,
|
||||
middlewareData.transformOrigin?.y
|
||||
].join(" "),
|
||||
// hide the content if using the hide middleware and should be hidden
|
||||
// set visibility to hidden and disable pointer events so the UI behaves
|
||||
// as if the PopperContent isn't there at all
|
||||
...middlewareData.hide?.referenceHidden && {
|
||||
visibility: "hidden",
|
||||
pointerEvents: "none"
|
||||
}
|
||||
},
|
||||
dir: props.dir,
|
||||
children: /* @__PURE__ */ jsx(
|
||||
PopperContentProvider,
|
||||
{
|
||||
scope: __scopePopper,
|
||||
placedSide,
|
||||
onArrowChange: setArrow,
|
||||
arrowX,
|
||||
arrowY,
|
||||
shouldHideArrow: cannotCenterArrow,
|
||||
children: /* @__PURE__ */ jsx(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-side": placedSide,
|
||||
"data-align": placedAlign,
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
...contentProps.style,
|
||||
// if the PopperContent hasn't been placed yet (not all measurements done)
|
||||
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
||||
animation: !isPositioned ? "none" : void 0
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
PopperContent.displayName = CONTENT_NAME;
|
||||
var ARROW_NAME = "PopperArrow";
|
||||
var OPPOSITE_SIDE = {
|
||||
top: "bottom",
|
||||
right: "left",
|
||||
bottom: "top",
|
||||
left: "right"
|
||||
};
|
||||
var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
||||
const { __scopePopper, ...arrowProps } = props;
|
||||
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
||||
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
||||
return (
|
||||
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
||||
// doesn't report size as we'd expect on SVG elements.
|
||||
// it reports their bounding box which is effectively the largest path inside the SVG.
|
||||
/* @__PURE__ */ jsx(
|
||||
"span",
|
||||
{
|
||||
ref: contentContext.onArrowChange,
|
||||
style: {
|
||||
position: "absolute",
|
||||
left: contentContext.arrowX,
|
||||
top: contentContext.arrowY,
|
||||
[baseSide]: 0,
|
||||
transformOrigin: {
|
||||
top: "",
|
||||
right: "0 0",
|
||||
bottom: "center 0",
|
||||
left: "100% 0"
|
||||
}[contentContext.placedSide],
|
||||
transform: {
|
||||
top: "translateY(100%)",
|
||||
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
||||
bottom: `rotate(180deg)`,
|
||||
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
||||
}[contentContext.placedSide],
|
||||
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
||||
},
|
||||
children: /* @__PURE__ */ jsx(
|
||||
ArrowPrimitive.Root,
|
||||
{
|
||||
...arrowProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
...arrowProps.style,
|
||||
// ensures the element can be measured correctly (mostly for if SVG)
|
||||
display: "block"
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
PopperArrow.displayName = ARROW_NAME;
|
||||
function isNotNull(value) {
|
||||
return value !== null;
|
||||
}
|
||||
var transformOrigin = (options) => ({
|
||||
name: "transformOrigin",
|
||||
options,
|
||||
fn(data) {
|
||||
const { placement, rects, middlewareData } = data;
|
||||
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
||||
const isArrowHidden = cannotCenterArrow;
|
||||
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
||||
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
||||
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
||||
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
||||
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
||||
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
||||
let x = "";
|
||||
let y = "";
|
||||
if (placedSide === "bottom") {
|
||||
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
||||
y = `${-arrowHeight}px`;
|
||||
} else if (placedSide === "top") {
|
||||
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
||||
y = `${rects.floating.height + arrowHeight}px`;
|
||||
} else if (placedSide === "right") {
|
||||
x = `${-arrowHeight}px`;
|
||||
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
||||
} else if (placedSide === "left") {
|
||||
x = `${rects.floating.width + arrowHeight}px`;
|
||||
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
||||
}
|
||||
return { data: { x, y } };
|
||||
}
|
||||
});
|
||||
function getSideAndAlignFromPlacement(placement) {
|
||||
const [side, align = "center"] = placement.split("-");
|
||||
return [side, align];
|
||||
}
|
||||
var Root2 = Popper;
|
||||
var Anchor = PopperAnchor;
|
||||
var Content = PopperContent;
|
||||
var Arrow = PopperArrow;
|
||||
export {
|
||||
ALIGN_OPTIONS,
|
||||
Anchor,
|
||||
Arrow,
|
||||
Content,
|
||||
Popper,
|
||||
PopperAnchor,
|
||||
PopperArrow,
|
||||
PopperContent,
|
||||
Root2 as Root,
|
||||
SIDE_OPTIONS,
|
||||
createPopperScope
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
node_modules/@radix-ui/react-popper/dist/index.mjs.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-popper/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/LICENSE
generated
vendored
Normal file
21
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/README.md
generated
vendored
Normal file
3
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# `react-primitive`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
52
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.d.mts
generated
vendored
Normal file
52
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import * as React from 'react';
|
||||
|
||||
declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
||||
type Primitives = {
|
||||
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
||||
};
|
||||
type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
||||
}
|
||||
declare const Primitive: Primitives;
|
||||
/**
|
||||
* Flush custom event dispatch
|
||||
* https://github.com/radix-ui/primitives/pull/1378
|
||||
*
|
||||
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
||||
*
|
||||
* Internally, React prioritises events in the following order:
|
||||
* - discrete
|
||||
* - continuous
|
||||
* - default
|
||||
*
|
||||
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
||||
*
|
||||
* `discrete` is an important distinction as updates within these events are applied immediately.
|
||||
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
||||
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
||||
* dispatched by another `discrete` event.
|
||||
*
|
||||
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
||||
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
||||
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
||||
* For example:
|
||||
*
|
||||
* dispatching a known click 👎
|
||||
* target.dispatchEvent(new Event(‘click’))
|
||||
*
|
||||
* dispatching a custom type within a non-discrete event 👎
|
||||
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
||||
*
|
||||
* dispatching a custom type within a `discrete` event 👍
|
||||
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
||||
*
|
||||
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
||||
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
||||
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
||||
*/
|
||||
declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
|
||||
declare const Root: Primitives;
|
||||
|
||||
export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
|
||||
52
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.d.ts
generated
vendored
Normal file
52
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import * as React from 'react';
|
||||
|
||||
declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
||||
type Primitives = {
|
||||
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
||||
};
|
||||
type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
||||
}
|
||||
declare const Primitive: Primitives;
|
||||
/**
|
||||
* Flush custom event dispatch
|
||||
* https://github.com/radix-ui/primitives/pull/1378
|
||||
*
|
||||
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
||||
*
|
||||
* Internally, React prioritises events in the following order:
|
||||
* - discrete
|
||||
* - continuous
|
||||
* - default
|
||||
*
|
||||
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
||||
*
|
||||
* `discrete` is an important distinction as updates within these events are applied immediately.
|
||||
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
||||
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
||||
* dispatched by another `discrete` event.
|
||||
*
|
||||
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
||||
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
||||
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
||||
* For example:
|
||||
*
|
||||
* dispatching a known click 👎
|
||||
* target.dispatchEvent(new Event(‘click’))
|
||||
*
|
||||
* dispatching a custom type within a non-discrete event 👎
|
||||
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
||||
*
|
||||
* dispatching a custom type within a `discrete` event 👍
|
||||
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
||||
*
|
||||
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
||||
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
||||
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
||||
*/
|
||||
declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
|
||||
declare const Root: Primitives;
|
||||
|
||||
export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
|
||||
80
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.js
generated
vendored
Normal file
80
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Primitive: () => Primitive,
|
||||
Root: () => Root,
|
||||
dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/primitive.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var ReactDOM = __toESM(require("react-dom"));
|
||||
var import_react_slot = require("@radix-ui/react-slot");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
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 Slot = (0, import_react_slot.createSlot)(`Primitive.${node}`);
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
var Root = Primitive;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.js.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/primitive.tsx"],
|
||||
"sourcesContent": ["export {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n} from './primitive';\nexport type { PrimitivePropsWithRef } from './primitive';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,wBAA2B;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,WAAO,8BAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,4CAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
47
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.mjs
generated
vendored
Normal file
47
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
// src/primitive.tsx
|
||||
import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
import { createSlot } from "@radix-ui/react-slot";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
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 Slot = createSlot(`Primitive.${node}`);
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
var Root = Primitive;
|
||||
export {
|
||||
Primitive,
|
||||
Root,
|
||||
dispatchDiscreteCustomEvent
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.mjs.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.mjs.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/primitive.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
|
||||
"mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,kBAAkB;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAO,WAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,oBAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
68
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/package.json
generated
vendored
Normal file
68
node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "@radix-ui/react-primitive",
|
||||
"version": "2.1.3",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-slot": "1.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint": "^9.18.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
77
node_modules/@radix-ui/react-popper/package.json
generated
vendored
Normal file
77
node_modules/@radix-ui/react-popper/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"name": "@radix-ui/react-popper",
|
||||
"version": "1.2.8",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@floating-ui/react-dom": "^2.0.0",
|
||||
"@radix-ui/react-compose-refs": "1.1.2",
|
||||
"@radix-ui/react-arrow": "1.1.7",
|
||||
"@radix-ui/react-primitive": "2.1.3",
|
||||
"@radix-ui/react-context": "1.1.2",
|
||||
"@radix-ui/react-use-layout-effect": "1.1.1",
|
||||
"@radix-ui/react-use-rect": "1.1.1",
|
||||
"@radix-ui/react-use-size": "1.1.1",
|
||||
"@radix-ui/rect": "1.1.1",
|
||||
"@radix-ui/react-use-callback-ref": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint": "^9.18.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue