@ark-ui/solid
Version:
A collection of unstyled, accessible UI components for Solid, utilizing state machines for seamless interaction.
21 lines (18 loc) • 900 B
TypeScript
import { JSX, ComponentProps } from 'solid-js';
import { A as Assign } from '../types-Bc0WfPsv.js';
type ElementType = keyof JSX.IntrinsicElements;
type JsxElements = {
[E in ElementType]: ArkComponent<E>;
};
type ParentProps<T extends ElementType> = (userProps?: JSX.IntrinsicElements[T]) => JSX.HTMLAttributes<any>;
type PolymorphicProps<T extends ElementType> = {
/**
* Use the provided child element as the default rendered element, combining their props and behavior.
*/
asChild?: (props: ParentProps<T>) => JSX.Element;
};
type HTMLProps<E extends ElementType> = JSX.IntrinsicElements[E];
type HTMLArkProps<E extends ElementType> = Assign<ComponentProps<E>, PolymorphicProps<E>>;
type ArkComponent<E extends ElementType> = (props: HTMLArkProps<E>) => JSX.Element;
declare const ark: JsxElements;
export { type HTMLArkProps, type HTMLProps, type PolymorphicProps, ark };