{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\n\n/**\n * Any intrinsic HTML tag name (matches what `dynamic()` accepts).\n */\nexport type HTMLElementTag = keyof JSX.IntrinsicElements;\n\nexport type Orientation = \"horizontal\" | \"vertical\";\n\n/**\n * Props object for a given HTML tag — Solid's `JSX.IntrinsicElements` entry.\n * This is the shape that consumers can splat onto a DOM element.\n */\nexport type HTMLPropsFor<Tag extends HTMLElementTag> =\n\tJSX.IntrinsicElements[Tag];\n\n/**\n * Generic \"plain HTML attributes\" shape, used where we don't know the tag.\n */\nexport type HTMLProps = JSX.HTMLAttributes<HTMLElement>;\n\n/** Solid's native class value accepted by an HTML element. */\nexport type ElementClass = JSX.HTMLAttributes<HTMLElement>[\"class\"];\n\n/** Solid's native style value accepted by an HTML element. */\nexport type ElementStyle = JSX.HTMLAttributes<HTMLElement>[\"style\"];\n\n/** @deprecated Prefer `ElementStyle` for public element style contracts. */\nexport type CSSProperties = JSX.CSSProperties;\n\n/**\n * A deliberately narrow bag of styling attributes.\n *\n * This is not a second arbitrary-props escape hatch: it carries only the\n * outputs produced together by styling systems such as extracted atomic CSS.\n */\nexport interface StylingAttrs {\n\tclass?: ElementClass;\n\tstyle?: ElementStyle;\n\t\"data-style-src\"?: string | undefined;\n}\n\n/**\n * Shared props contract for every Base UI component.\n *\n * `class` / `style` may be a function of state (reactive — resolved against\n * the live state accessor at render time). Tag swap is via the `as` prop on\n * each compound part (routed through a `dynamic()` element). `ref` uses Solid's native\n * `Ref<T>` which already supports arrays for composition.\n */\nexport type BaseUIComponentProps<Tag extends HTMLElementTag, State> = Omit<\n\tHTMLPropsFor<Tag>,\n\t\"class\" | \"style\" | \"children\" | \"ref\"\n> & {\n\t/**\n\t * CSS class applied to the element.\n\t * String, object, array (clsx-style) or a function of state.\n\t */\n\tclass?: ElementClass | ((state: State) => ElementClass) | undefined;\n\t/**\n\t * Solid-native element style, or a function of state returning one.\n\t */\n\tstyle?: ElementStyle | ((state: State) => ElementStyle) | undefined;\n\t/**\n\t * Unified styling output, optionally derived from component state.\n\t * Applied after the legacy `class` and `style` props.\n\t */\n\tattrs?:\n\t\t| StylingAttrs\n\t\t| ((state: State) => StylingAttrs | undefined)\n\t\t| undefined;\n\t/**\n\t * Child content.\n\t */\n\tchildren?: JSX.Element;\n\t/**\n\t * Ref to the rendered element.\n\t */\n\tref?: JSX.IntrinsicElements[Tag][\"ref\"];\n};\n\n/**\n * Props flag for components that render a native `<button>` by default.\n */\nexport interface NativeButtonProps {\n\t/**\n\t * Whether the rendered element is a native `<button>`.\n\t * Set to `false` if the rendered element is not a button (e.g. `<div>`).\n\t * @default true\n\t */\n\tnativeButton?: boolean | undefined;\n}\n\n/**\n * Props flag for components that do NOT render a native `<button>` by default.\n */\nexport interface NonNativeButtonProps {\n\t/**\n\t * Whether the rendered element is a native `<button>`.\n\t * Set to `true` if the rendered element is a native button.\n\t * @default false\n\t */\n\tnativeButton?: boolean | undefined;\n}\n\n/**\n * Utility: makes all keys required except the ones listed.\n */\nexport type RequiredExcept<T, K extends keyof T> = Required<Omit<T, K>> &\n\tPick<T, K>;\n\n/**\n * Utility: flattens a type for nicer IDE output.\n */\nexport type Simplify<T> = T extends (...args: never[]) => unknown\n\t? T\n\t: { [K in keyof T]: T[K] };\n"],"mappings":"","ignoreList":[]}