Last
Some checks are pending
Deploy Volleyball CMS / deploy (push) Waiting to run

This commit is contained in:
2025-06-02 18:56:22 +02:00
parent 8f62885a45
commit 33181acf83
1443 changed files with 286102 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
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_INPUT_TAG: "input";
type InputRenderPropArg = {
disabled: boolean;
hover: boolean;
focus: boolean;
autofocus: boolean;
invalid: boolean;
};
type InputPropsWeControl = 'aria-labelledby' | 'aria-describedby';
export type InputProps<TTag extends ElementType = typeof DEFAULT_INPUT_TAG> = Props<TTag, InputRenderPropArg, InputPropsWeControl, {
disabled?: boolean;
invalid?: boolean;
autoFocus?: boolean;
}>;
declare function InputFn<TTag extends ElementType = typeof DEFAULT_INPUT_TAG>(props: InputProps<TTag>, ref: Ref<HTMLElement>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
export interface _internal_ComponentInput extends HasDisplayName {
<TTag extends ElementType = typeof DEFAULT_INPUT_TAG>(props: InputProps<TTag> & RefProp<typeof InputFn>): React.JSX.Element;
}
export declare let Input: _internal_ComponentInput;
export {};

View File

@@ -0,0 +1 @@
"use client";import{useFocusRing as P}from"@react-aria/focus";import{useHover as c}from"@react-aria/interactions";import{useMemo as g}from"react";import{useId as v}from'../../hooks/use-id.js';import{useDisabled as A}from'../../internal/disabled.js';import{useProvidedId as _}from'../../internal/id.js';import{forwardRefWithAs as R,mergeProps as D,useRender as E}from'../../utils/render.js';import{useDescribedBy as F}from'../description/description.js';import{useLabelledBy as U}from'../label/label.js';let x="input";function h(p,s){let a=v(),l=_(),i=A(),{id:d=l||`headlessui-input-${a}`,disabled:e=i||!1,autoFocus:o=!1,invalid:t=!1,...u}=p,f=U(),m=F(),{isFocused:r,focusProps:T}=P({autoFocus:o}),{isHovered:n,hoverProps:b}=c({isDisabled:e}),y=D({ref:s,id:d,"aria-labelledby":f,"aria-describedby":m,"aria-invalid":t?"true":void 0,disabled:e||void 0,autoFocus:o},T,b),I=g(()=>({disabled:e,invalid:t,hover:n,focus:r,autofocus:o}),[e,t,n,r,o]);return E()({ourProps:y,theirProps:u,slot:I,defaultTag:x,name:"Input"})}let S=R(h);export{S as Input};