@compositive/foundation
Version:
Compositive framework foundation package.
229 lines • 45.2 kB
TypeScript
import type { ReactElement, ReactNode, SyntheticEvent } from "react";
import type { ColorPicker, Shade } from "../color";
import type { AsProp } from "../primitives";
import type { ThemedSxProp } from "../styling";
import type { UnknownTheme } from "../theming";
import { SurfaceParts } from "./SurfaceParts";
export declare namespace Surface {
type Attributes = {
shape: Surface.Element<"shape">;
corners?: Surface.Element<"corners">;
border?: Surface.Element<"border">;
background?: Surface.Element<"background">;
foreground?: Shade | ColorPicker;
shadow?: Surface.Element<"shadow">;
};
interface Element<E extends Surface.ElementType = Surface.ElementType> {
readonly type: E;
process<T extends UnknownTheme>(parts: SurfaceParts<T>, chain: Surface.Element[]): [SurfaceParts<T>, Surface.Element[]];
}
type ElementType = Exclude<keyof Surface.Attributes, "foreground">;
type ElementChain = Array<Exclude<Surface.Attributes[Surface.ElementType], undefined>>;
type StateProp = {
state: "default" | "hovered" | "pressed" | "disabled";
};
type Props<T extends UnknownTheme> = {
children?: ReactNode;
sx?: ThemedSxProp<T>;
innerSx?: ThemedSxProp<T>;
as?: AsProp;
onHoverStart?: (e: SyntheticEvent) => void;
onHoverEnd?: (e: SyntheticEvent) => void;
onPress?: (e: SyntheticEvent) => void;
onPressIn?: (e: SyntheticEvent) => void;
onPressOut?: (e: SyntheticEvent) => void;
} & Partial<Surface.StateProp>;
type ComponentType<P = {}> = <T extends UnknownTheme>(props: Surface.Props<T> & P) => ReactElement;
}
declare const SurfaceSpec_base: new (attributes: import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes> | import("@compositive/commons-spec/AttributeDefiner").AttributeDefiner<Surface.Attributes>, variants?: import("@compositive/commons-spec/VariantDefiner").VariantDefiner<Surface.StateProp> | import("@compositive/commons-spec/VariantDefiner").VariantDefinitions<Surface.StateProp> | undefined) => import("@compositive/commons-spec").AbstractSpec<Surface.Attributes, Surface.StateProp> & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<{
state: ("default" | "hovered" | "pressed" | "disabled")[];
}>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_2, K_2 extends string, O extends string>(this: TSelf_2, name: K_2, options: { [key in O]: (self: TSelf_2) => TSelf_2; }): TSelf_2 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<({ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never) extends infer T ? { [K_3 in keyof T]: ({ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never)[K_3][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_3, K_4 extends string, O_1 extends string>(this: TSelf_3, name: K_4, options: { [key_1 in O_1]: (self: TSelf_3) => TSelf_3; }): TSelf_3 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }> extends infer T_2 ? { [K_5 in keyof T_2]: import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>[K_5][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_4, K_6 extends string, O_2 extends string>(this: TSelf_4, name: K_6, options: { [key_2 in O_2]: (self: TSelf_4) => TSelf_4; }): TSelf_4 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }> extends infer T_3 ? { [K_7 in keyof T_3]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>[K_7][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_5, K_8 extends string, O_3 extends string>(this: TSelf_5, name: K_8, options: { [key_3 in O_3]: (self: TSelf_5) => TSelf_5; }): TSelf_5 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }> extends infer T_4 ? { [K_9 in keyof T_4]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>[K_9][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_6, K_10 extends string, O_4 extends string>(this: TSelf_6, name: K_10, options: { [key_4 in O_4]: (self: TSelf_6) => TSelf_6; }): TSelf_6 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }> extends infer T_5 ? { [K_11 in keyof T_5]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>[K_11][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_7, K_12 extends string, O_5 extends string>(this: TSelf_7, name: K_12, options: { [key_5 in O_5]: (self: TSelf_7) => TSelf_7; }): TSelf_7 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }> extends infer T_6 ? { [K_13 in keyof T_6]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>[K_13][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_8, K_14 extends string, O_6 extends string>(this: TSelf_8, name: K_14, options: { [key_6 in O_6]: (self: TSelf_8) => TSelf_8; }): TSelf_8 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }> extends infer T_7 ? { [K_15 in keyof T_7]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>[K_15][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_9, K_16 extends string, O_7 extends string>(this: TSelf_9, name: K_16, options: { [key_7 in O_7]: (self: TSelf_9) => TSelf_9; }): TSelf_9 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }> extends infer T_8 ? { [K_17 in keyof T_8]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>[K_17][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_10, K_18 extends string, O_8 extends string>(this: TSelf_10, name: K_18, options: { [key_8 in O_8]: (self: TSelf_10) => TSelf_10; }): TSelf_10 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>, { [keys_8 in K_18]: O_8; }> extends infer T_9 ? { [K_19 in keyof T_9]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>, { [keys_8 in K_18]: O_8; }>[K_19][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_11, K_20 extends string, O_9 extends string>(this: TSelf_11, name: K_20, options: { [key_9 in O_9]: (self: TSelf_11) => TSelf_11; }): TSelf_11 & {
readonly attributes: Readonly<Surface.Attributes>;
readonly variants: Readonly<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>, { [keys_8 in K_18]: O_8; }>, { [keys_9 in K_20]: O_9; }> extends infer T_10 ? { [K_21 in keyof T_10]: import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>, { [keys_8 in K_18]: O_8; }>, { [keys_9 in K_20]: O_9; }>[K_21][]; } : never>;
get<K extends keyof Surface.Attributes>(key: K): Surface.Attributes[K];
with<TSelf, K_1 extends keyof Surface.Attributes>(this: TSelf, key: K_1, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, K_1>): TSelf;
with<TSelf_1>(this: TSelf_1, attributes: Partial<import("@compositive/commons-spec").AttributeDefinitions<Surface.Attributes>>): TSelf_1;
when<TSelf_12, K_22 extends string, O_10 extends string>(this: TSelf_12, name: K_22, options: { [key_10 in O_10]: (self: TSelf_12) => TSelf_12; }): TSelf_12 & any & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_19>(this: TSelf_19, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>, { [keys_8 in K_18]: O_8; }>, { [keys_9 in K_20]: O_9; }>>): TSelf_19;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_20>(this: TSelf_20, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>, { [keys_8 in K_18]: O_8; }>>): TSelf_20;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_21>(this: TSelf_21, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>, { [keys_7 in K_16]: O_7; }>>): TSelf_21;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_22>(this: TSelf_22, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>, { [keys_6 in K_14]: O_6; }>>): TSelf_22;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_23>(this: TSelf_23, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>, { [keys_5 in K_12]: O_5; }>>): TSelf_23;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_24>(this: TSelf_24, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>, { [keys_4 in K_10]: O_4; }>>): TSelf_24;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_25>(this: TSelf_25, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>, { [keys_3 in K_8]: O_3; }>>): TSelf_25;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_26>(this: TSelf_26, activeVariants: Partial<import("@compositive/commons-types").Merge<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>, { [keys_2 in K_6]: O_2; }>>): TSelf_26;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_27>(this: TSelf_27, activeVariants: Partial<import("@compositive/commons-types").Merge<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never, { [keys_1 in K_4]: O_1; }>>): TSelf_27;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_28>(this: TSelf_28, activeVariants: Partial<{ [keys in K_2]: O; } extends infer T_1 ? T_1 extends { [keys in K_2]: O; } ? T_1 extends Record<string, any> ? import("@compositive/commons-types").Merge.Records<Surface.StateProp, T_1> : import("@compositive/commons-types").FirstDefined<T_1, Surface.StateProp> : never : never>): TSelf_28;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
using<TSelf_29>(this: TSelf_29, activeVariants: Partial<Surface.StateProp>): TSelf_29;
hasVariant(variantName: string): boolean;
} & Readonly<Surface.Attributes> & {
withShape: <TSelf_13>(this: TSelf_13, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shape">) => TSelf_13;
withCorners: <TSelf_14>(this: TSelf_14, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "corners">) => TSelf_14;
withBorder: <TSelf_15>(this: TSelf_15, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "border">) => TSelf_15;
withBackground: <TSelf_16>(this: TSelf_16, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "background">) => TSelf_16;
withForeground: <TSelf_17>(this: TSelf_17, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "foreground">) => TSelf_17;
withShadow: <TSelf_18>(this: TSelf_18, value: import("@compositive/commons-spec").AttributeValueDefinition<Surface.Attributes, "shadow">) => TSelf_18;
};
export declare class SurfaceSpec<TVariants extends Surface.StateProp = Surface.StateProp> extends SurfaceSpec_base {
toComponent(): Surface.ComponentType<Partial<TVariants>>;
private _getSurfaceParts;
}
export {};
//# sourceMappingURL=SurfaceSpec.d.ts.map