This commit is contained in:
19
node_modules/@headlessui/react/dist/components/data-interactive/data-interactive.d.ts
generated
vendored
Normal file
19
node_modules/@headlessui/react/dist/components/data-interactive/data-interactive.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { type ElementType, type Ref } from 'react';
|
||||
import type { Props } from '../../types.js';
|
||||
import { type HasDisplayName, type RefProp } from '../../utils/render.js';
|
||||
declare let DEFAULT_DATA_INTERACTIVE_TAG: import("react").ExoticComponent<{
|
||||
children?: import("react").ReactNode;
|
||||
}>;
|
||||
type DataInteractiveRenderPropArg = {
|
||||
hover: boolean;
|
||||
focus: boolean;
|
||||
active: boolean;
|
||||
};
|
||||
type DataInteractivePropsWeControl = never;
|
||||
export type DataInteractiveProps<TTag extends ElementType = typeof DEFAULT_DATA_INTERACTIVE_TAG> = Props<TTag, DataInteractiveRenderPropArg, DataInteractivePropsWeControl, {}>;
|
||||
declare function DataInteractiveFn<TTag extends ElementType = typeof DEFAULT_DATA_INTERACTIVE_TAG>(props: DataInteractiveProps<TTag>, ref: Ref<HTMLElement>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
||||
export interface _internal_ComponentDataInteractive extends HasDisplayName {
|
||||
<TTag extends ElementType = typeof DEFAULT_DATA_INTERACTIVE_TAG>(props: DataInteractiveProps<TTag> & RefProp<typeof DataInteractiveFn>): React.JSX.Element;
|
||||
}
|
||||
export declare let DataInteractive: _internal_ComponentDataInteractive;
|
||||
export {};
|
||||
1
node_modules/@headlessui/react/dist/components/data-interactive/data-interactive.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/components/data-interactive/data-interactive.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use client";import{useFocusRing as m}from"@react-aria/focus";import{useHover as A}from"@react-aria/interactions";import{Fragment as D,useMemo as f}from"react";import{useActivePress as v}from'../../hooks/use-active-press.js';import{forwardRefWithAs as I,mergeProps as y,useRender as P}from'../../utils/render.js';let E=D;function d(o,n){let{...s}=o,e=!1,{isFocusVisible:t,focusProps:p}=m(),{isHovered:r,hoverProps:i}=A({isDisabled:e}),{pressed:a,pressProps:T}=v({disabled:e}),l=y({ref:n},p,i,T),c=f(()=>({hover:r,focus:t,active:a}),[r,t,a]);return P()({ourProps:l,theirProps:s,slot:c,defaultTag:E,name:"DataInteractive"})}let x=I(d);export{x as DataInteractive};
|
||||
Reference in New Issue
Block a user