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_BUTTON_TAG: "button";
type ButtonRenderPropArg = {
disabled: boolean;
hover: boolean;
focus: boolean;
active: boolean;
autofocus: boolean;
};
type ButtonPropsWeControl = never;
export type ButtonProps<TTag extends ElementType = typeof DEFAULT_BUTTON_TAG> = Props<TTag, ButtonRenderPropArg, ButtonPropsWeControl, {
disabled?: boolean;
autoFocus?: boolean;
type?: 'button' | 'submit' | 'reset';
}>;
declare function ButtonFn<TTag extends ElementType = typeof DEFAULT_BUTTON_TAG>(props: ButtonProps<TTag>, ref: Ref<HTMLElement>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
export interface _internal_ComponentButton extends HasDisplayName {
<TTag extends ElementType = typeof DEFAULT_BUTTON_TAG>(props: ButtonProps<TTag> & RefProp<typeof ButtonFn>): React.JSX.Element;
}
export declare let Button: _internal_ComponentButton;
export {};

View File

@@ -0,0 +1 @@
"use client";import{useFocusRing as y}from"@react-aria/focus";import{useHover as b}from"@react-aria/interactions";import{useMemo as P}from"react";import{useActivePress as B}from'../../hooks/use-active-press.js';import{useDisabled as c}from'../../internal/disabled.js';import{forwardRefWithAs as A,mergeProps as g,useRender as _}from'../../utils/render.js';let R="button";function v(a,u){var p;let l=c(),{disabled:e=l||!1,autoFocus:t=!1,...o}=a,{isFocusVisible:r,focusProps:i}=y({autoFocus:t}),{isHovered:s,hoverProps:T}=b({isDisabled:e}),{pressed:n,pressProps:d}=B({disabled:e}),f=g({ref:u,type:(p=o.type)!=null?p:"button",disabled:e||void 0,autoFocus:t},i,T,d),m=P(()=>({disabled:e,hover:s,focus:r,active:n,autofocus:t}),[e,s,r,n,t]);return _()({ourProps:f,theirProps:o,slot:m,defaultTag:R,name:"Button"})}let H=A(v);export{H as Button};