import { ComponentPropsWithoutRef, CSSProperties, ElementType, HTMLAttributes, ReactNode } from 'react'; import { LismProps } from '../../lib/getLismProps'; import { LayoutSpecificProps } from '../../lib/types/LayoutProps'; type ReactStyleWithCustomProps = CSSProperties & Record<`--${string}`, string | number | undefined>; /** 要素固有の HTML Props + 共通オプション */ type LismElementProps = Omit, 'style'> & { as?: T; children?: ReactNode; exProps?: Record; /** React では camelCase のみ有効(kebab-case は実行時に無視される) */ style?: ReactStyleWithCustomProps; }; /** HTML 属性のベースライン(T がジェネリクスのままでも id 等が補完される) */ type LismHtmlBaseProps = Omit, 'style'>; /** * Lism コンポーネントの Props 型 * @template T - レンダリングする要素の型(デフォルトは 'div') */ export type LismComponentProps = Omit & LismHtmlBaseProps & LayoutSpecificProps & LismElementProps; /** * layout が固定されたレイアウトコンポーネントの Props 型 * layout プロパティは固定されるため受け付けない * @template T - レンダリングする要素の型(デフォルトは 'div') * @template L - レイアウト固有の追加 Props 型 */ export type LayoutComponentProps = Omit & LismHtmlBaseProps & Omit & LismElementProps; /** * Lism Propsを処理できるだけのコンポーネント */ export default function Lism({ children, as, exProps, ...props }: LismComponentProps): import("react").JSX.Element; export {};