// Typed React bindings for the @sylar_iii/ui custom elements (), generated from the element sources. // Include once from a file the compiler reads, e.g. src/sylar-ui.d.ts: import type {} from '@sylar_iii/ui/jsx'; import type { ReactNode, Ref, HTMLAttributes } from 'react'; import type { SyBadgeAppearance } from '@sylar_iii/ui/badge'; import type { SyParticleBlend, SyParticleEffect } from '@sylar_iii/ui/particle-cursor'; import type { SyButtonAppearance, SyButtonType } from '@sylar_iii/ui/button'; import type { SyGridMenuAnimation, SyGridMenuItem, SyGridMenuLayout, SyGridMenuShape } from '@sylar_iii/ui/grid-menu'; import type { SyIconVariant } from '@sylar_iii/ui/icon'; import type { SyInputAction, SyInputOption, SyInputType, SyOtpMode, SyPasswordRule, SyPasswordStrength, SyPasswordStrengthFn, SyPasswordToggle } from '@sylar_iii/ui/input'; import type { SySidebarEntry, SySidebarMode } from '@sylar_iii/ui/sidebar'; import type { PhoneNumberModel, PhoneNumberType, SySeverity } from '@sylar_iii/ui/types'; // Native attributes plus the element props (camelCase: React sets properties on custom elements) and events (on, lowercase). interface SyJsxBase extends HTMLAttributes { children?: ReactNode; ref?: Ref; } interface ParticleCursorJsxProps extends SyJsxBase { effect?: SyParticleEffect; colors?: string; count?: number; size?: number; life?: number; speed?: number; gravity?: number; blend?: SyParticleBlend; global?: boolean; autoplay?: boolean; clickBurst?: boolean; maxParticles?: number; disabled?: boolean; } interface BadgeJsxProps extends SyJsxBase { text?: string; severity?: SySeverity; appearance?: SyBadgeAppearance; color?: string; textColor?: string; font?: string; fontSize?: string; uppercase?: boolean; } interface ButtonJsxProps extends SyJsxBase { appearance?: SyButtonAppearance; severity?: SySeverity; ripple?: boolean; disabled?: boolean; type?: SyButtonType; name?: string; value?: string; color?: string; textColor?: string; hoverColor?: string; gradient?: string; padding?: string; radius?: string; shadow?: string; } interface IconJsxProps extends SyJsxBase { name?: string; src?: string; size?: string | number; color?: string; label?: string; variant?: SyIconVariant; } interface GridMenuJsxProps extends SyJsxBase { items?: SyGridMenuItem[]; open?: boolean; disabled?: boolean; layout?: SyGridMenuLayout; columns?: number; cellSize?: string; gap?: string; ringRadius?: string; overlay?: boolean; shape?: SyGridMenuShape; radius?: string; iconSize?: string; color?: string; hoverColor?: string; iconColor?: string; toggleColor?: string; toggleIconColor?: string; dotColor?: string; showLabels?: boolean; animation?: SyGridMenuAnimation; duration?: number; stagger?: number; closeOnSelect?: boolean; closeOnOutsideClick?: boolean; menuLabel?: string; openLabel?: string; closeLabel?: string; onopenchange?: (event: CustomEvent) => void; onitemclick?: (event: CustomEvent) => void; } interface SidebarJsxProps extends SyJsxBase { entries?: SySidebarEntry[]; navLabel?: string; mode?: SySidebarMode; breakpoint?: number; open?: boolean; childIconBorders?: boolean; singleExpand?: boolean; current?: string; hrefPrefix?: string; onopenchange?: (event: CustomEvent) => void; onentryselect?: (event: CustomEvent) => void; } interface InputJsxProps extends SyJsxBase { value?: string; values?: string[]; type?: SyInputType; label?: string; floatLabel?: boolean; placeholder?: string; inputId?: string; name?: string; autocomplete?: string; hint?: string; error?: string; required?: boolean; readonly?: boolean; disabled?: boolean; loading?: boolean; maxLength?: number; showCounter?: boolean; clearable?: boolean; copy?: boolean; copyText?: string; copiedText?: string; appearance?: 'outlined' | 'filled' | 'soft' | 'underlined'; shape?: 'rounded' | 'pill' | 'square'; size?: 'sm' | 'md' | 'lg'; color?: string; radius?: string; shadeColor?: string; lightColor?: string; depth?: number; icon?: string; iconEnd?: string; addonBefore?: string; addonBeforeIcon?: string; addonAfter?: string; addonAfterIcon?: string; action?: SyInputAction; actionIcon?: string; actionLabel?: string; options?: ReadonlyArray; filter?: boolean; filterPlaceholder?: string; emptyText?: string; maxSelected?: number; min?: number | null; max?: number | null; step?: number | null; rows?: number; autoResize?: boolean; otpLength?: number; otpMode?: SyOtpMode; otpMask?: boolean; toggle?: SyPasswordToggle; showText?: string; hideText?: string; strength?: boolean; strengthLabel?: string; strengthTexts?: Partial>; strengthFn?: SyPasswordStrengthFn; checklist?: boolean; checklistTitle?: string; minLength?: number; rules?: ReadonlyArray | null; enforceRules?: boolean; generate?: boolean; generateLength?: number; generateText?: string; capsLockWarning?: boolean; capsLockText?: string; oninput?: (event: CustomEvent) => void; onchange?: (event: CustomEvent) => void; onstrengthchange?: (event: CustomEvent) => void; onpasswordvisibility?: (event: CustomEvent) => void; ongenerate?: (event: CustomEvent) => void; onvaluecopy?: (event: CustomEvent) => void; onclear?: (event: CustomEvent) => void; onactionclick?: (event: CustomEvent) => void; onoptionselect?: (event: CustomEvent) => void; oncomplete?: (event: CustomEvent) => void; } interface PhoneInputJsxProps extends SyJsxBase { defaultCountry?: string; value?: string; acceptedNumbersTypes?: PhoneNumberType[]; name?: string; required?: boolean; disabled?: boolean; label?: string; placeholder?: string; onnumberchange?: (event: CustomEvent) => void; oninput?: (event: CustomEvent) => void; onchange?: (event: CustomEvent) => void; } declare module 'react' { namespace JSX { interface IntrinsicElements { 'sy-particle-cursor': ParticleCursorJsxProps; 'sy-badge': BadgeJsxProps; 'sy-button': ButtonJsxProps; 'sy-icon': IconJsxProps; 'sy-grid-menu': GridMenuJsxProps; 'sy-sidebar': SidebarJsxProps; 'sy-input': InputJsxProps; 'sy-phone-input': PhoneInputJsxProps; } } }