UNPKG

@poupe/vue

Version:

Vue component library for Poupe UI framework with theme customization and accessibility support

749 lines 22.7 kB
import * as _$vue from "vue"; import { InputHTMLAttributes, InputTypeHTMLAttribute } from "vue"; import { IconifyIconProps } from "@iconify/vue"; import * as _$tailwind_variants0 from "tailwind-variants"; import { VariantProps } from "tailwind-variants"; import { createPoupe, poupeInjectionKey } from "@poupe/vue/composables/use-poupe"; declare const surface: _$tailwind_variants0.TVReturnType<{ role: { surface: {}; container: {}; }; tone: { dim: { wrapper: string; }; base: { wrapper: string; }; bright: { wrapper: string; }; }; level: { lowest: { wrapper: string; }; low: { wrapper: string; }; base: { wrapper: string; }; high: { wrapper: string; }; highest: { wrapper: string; }; }; variant: { primary: { wrapper: string; }; secondary: { wrapper: string; }; tertiary: { wrapper: string; }; error: { wrapper: string; }; 'primary-fixed': { wrapper: string; }; 'secondary-fixed': { wrapper: string; }; 'tertiary-fixed': { wrapper: string; }; 'primary-container': { wrapper: string; }; 'secondary-container': { wrapper: string; }; 'tertiary-container': { wrapper: string; }; 'error-container': { wrapper: string; }; inverse: { wrapper: string; }; 'inverse-primary': { wrapper: string; }; }; shape: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded" | "full" | "squircle-xs" | "squircle-sm" | "squircle-md" | "squircle-lg" | "squircle-xl" | "squircle-full", Record<string, _$tailwind_variants0.ClassValue>>; shadow: Record<"none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset", Record<string, _$tailwind_variants0.ClassValue>>; border: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; interactive: { true: { wrapper: string; }; false: {}; }; padding: { none: {}; sm: { wrapper: string; }; md: { wrapper: string; }; lg: { wrapper: string; }; xl: { wrapper: string; }; }; }, { wrapper: string; }, undefined, { role: { surface: {}; container: {}; }; tone: { dim: { wrapper: string; }; base: { wrapper: string; }; bright: { wrapper: string; }; }; level: { lowest: { wrapper: string; }; low: { wrapper: string; }; base: { wrapper: string; }; high: { wrapper: string; }; highest: { wrapper: string; }; }; variant: { primary: { wrapper: string; }; secondary: { wrapper: string; }; tertiary: { wrapper: string; }; error: { wrapper: string; }; 'primary-fixed': { wrapper: string; }; 'secondary-fixed': { wrapper: string; }; 'tertiary-fixed': { wrapper: string; }; 'primary-container': { wrapper: string; }; 'secondary-container': { wrapper: string; }; 'tertiary-container': { wrapper: string; }; 'error-container': { wrapper: string; }; inverse: { wrapper: string; }; 'inverse-primary': { wrapper: string; }; }; shape: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded" | "full" | "squircle-xs" | "squircle-sm" | "squircle-md" | "squircle-lg" | "squircle-xl" | "squircle-full", Record<string, _$tailwind_variants0.ClassValue>>; shadow: Record<"none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset", Record<string, _$tailwind_variants0.ClassValue>>; border: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; interactive: { true: { wrapper: string; }; false: {}; }; padding: { none: {}; sm: { wrapper: string; }; md: { wrapper: string; }; lg: { wrapper: string; }; xl: { wrapper: string; }; }; }, { wrapper: string; }, _$tailwind_variants0.TVReturnType<{ role: { surface: {}; container: {}; }; tone: { dim: { wrapper: string; }; base: { wrapper: string; }; bright: { wrapper: string; }; }; level: { lowest: { wrapper: string; }; low: { wrapper: string; }; base: { wrapper: string; }; high: { wrapper: string; }; highest: { wrapper: string; }; }; variant: { primary: { wrapper: string; }; secondary: { wrapper: string; }; tertiary: { wrapper: string; }; error: { wrapper: string; }; 'primary-fixed': { wrapper: string; }; 'secondary-fixed': { wrapper: string; }; 'tertiary-fixed': { wrapper: string; }; 'primary-container': { wrapper: string; }; 'secondary-container': { wrapper: string; }; 'tertiary-container': { wrapper: string; }; 'error-container': { wrapper: string; }; inverse: { wrapper: string; }; 'inverse-primary': { wrapper: string; }; }; shape: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded" | "full" | "squircle-xs" | "squircle-sm" | "squircle-md" | "squircle-lg" | "squircle-xl" | "squircle-full", Record<string, _$tailwind_variants0.ClassValue>>; shadow: Record<"none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset", Record<string, _$tailwind_variants0.ClassValue>>; border: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; interactive: { true: { wrapper: string; }; false: {}; }; padding: { none: {}; sm: { wrapper: string; }; md: { wrapper: string; }; lg: { wrapper: string; }; xl: { wrapper: string; }; }; }, { wrapper: string; }, undefined, unknown, unknown, undefined>>; type SurfaceVariantProps = VariantProps<typeof surface>; /** Surface component props */ interface SurfaceProps { /** HTML tag to render */ tag?: string; /** Surface role (surface or container) */ role?: NonNullable<SurfaceVariantProps['role']>; /** Surface tone (for role='surface': dim, base, bright) */ tone?: NonNullable<SurfaceVariantProps['tone']>; /** Container level (for role='container': lowest, low, base, high, highest) */ level?: NonNullable<SurfaceVariantProps['level']>; /** Semantic color variant (primary, secondary, tertiary, error, etc.) */ variant?: NonNullable<SurfaceVariantProps['variant']>; /** Shape variant */ shape?: NonNullable<SurfaceVariantProps['shape']>; /** Shadow elevation */ shadow?: NonNullable<SurfaceVariantProps['shadow']>; /** Border style */ border?: NonNullable<SurfaceVariantProps['border']>; /** Enable interactive states */ interactive?: NonNullable<SurfaceVariantProps['interactive']>; /** Padding size */ padding?: NonNullable<SurfaceVariantProps['padding']>; /** Additional CSS classes */ class?: string; } declare module '../composables/use-poupe' { interface PoupeComponentDefaults { surface?: Partial<SurfaceProps>; } } declare const _default$5: typeof __VLS_export$5; declare const __VLS_export$5: __VLS_WithSlots$4<_$vue.DefineComponent<SurfaceProps, { rootElement: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>; }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<SurfaceProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>, { default?: (props: {}) => any; }>; type __VLS_WithSlots$4<T, S> = T & { new (): { $slots: S; }; }; /** Material Design 3 button types */ type ButtonType = 'elevated' | 'filled' | 'outlined' | 'text' | 'tonal'; /** Button color variants */ type ButtonVariant = 'base' | 'error' | 'primary' | 'secondary' | 'tertiary'; /** Button size scale */ type ButtonSize = 'base' | 'lg' | 'sm' | 'xl' | 'xs'; /** Button component props */ interface ButtonProps extends Omit<SurfaceProps, 'level' | 'padding' | 'role' | 'tone' | 'variant'> { /** Button label text */ label?: string; /** Material Design 3 button type */ type?: ButtonType; /** Button size */ size?: ButtonSize; /** Semantic color variant for the button */ variant?: ButtonVariant; /** Loading state */ loading?: boolean; /** Disabled state */ disabled?: boolean; /** Full width button */ expand?: boolean; /** Add ellipsis to label */ ellipsis?: boolean; /** Floating Action Button mode */ fab?: boolean; /** Extended FAB (only with fab=true) */ extended?: boolean; /** Icon button mode */ iconButton?: boolean; /** Toggle button mode */ toggle?: boolean; /** Toggle pressed state */ pressed?: boolean; /** Leading icon */ icon?: string; /** Trailing icon */ trailingIcon?: string; /** Icon start slot content */ iconStart?: string; /** Icon end slot content */ iconEnd?: string; } declare module '../composables/use-poupe' { interface PoupeComponentDefaults { button?: { border?: ButtonProps['border']; disabled?: ButtonProps['disabled']; ellipsis?: ButtonProps['ellipsis']; expand?: ButtonProps['expand']; extended?: ButtonProps['extended']; fab?: ButtonProps['fab']; iconButton?: ButtonProps['iconButton']; interactive?: ButtonProps['interactive']; loading?: ButtonProps['loading']; pressed?: ButtonProps['pressed']; shadow?: ButtonProps['shadow']; shape?: ButtonProps['shape']; size?: ButtonProps['size']; toggle?: ButtonProps['toggle']; type?: ButtonType; variant?: ButtonVariant; }; } } declare const _default: typeof __VLS_export$4; declare const __VLS_export$4: __VLS_WithSlots$3<_$vue.DefineComponent<ButtonProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, { click: (event: MouseEvent) => any; }, string, _$vue.PublicProps, Readonly<ButtonProps> & Readonly<{ onClick?: ((event: MouseEvent) => any) | undefined; }>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>, { default?: (props: {}) => any; }>; type __VLS_WithSlots$3<T, S> = T & { new (): { $slots: S; }; }; /** Card component props */ interface CardProps extends Omit<SurfaceProps, 'padding'> { /** Card title displayed in header */ title?: string; /** Convenience prop for surface colors */ surface?: 'base' | 'bright' | 'container' | 'dim' | 'high' | 'highest' | 'low' | 'lowest'; /** Convenience prop for container colors */ container?: 'error' | 'primary' | 'secondary' | 'tertiary'; } declare module '../composables/use-poupe' { interface PoupeComponentDefaults { card?: Partial<CardProps>; } } declare const _default$1: typeof __VLS_export$3; declare const __VLS_export$3: __VLS_WithSlots$2<_$vue.DefineComponent<CardProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>, { header?: (props: {}) => any; } & { default?: (props: {}) => any; } & { footer?: (props: {}) => any; }>; type __VLS_WithSlots$2<T, S> = T & { new (): { $slots: S; }; }; interface IconProps extends Omit<IconifyIconProps, 'icon'> { icon?: IconifyIconProps['icon']; } declare const _default$2: typeof __VLS_export$2; declare const __VLS_export$2: _$vue.DefineComponent<IconProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>; type InputValue = InputHTMLAttributes['value']; type InputType = InputTypeHTMLAttribute; declare const inputWrapperVariants: _$tailwind_variants0.TVReturnType<{ surface: Record<"primary" | "secondary" | "tertiary" | "error" | "base" | "lowest" | "low" | "high" | "highest" | "primary-fixed" | "secondary-fixed" | "tertiary-fixed" | "primary-container" | "secondary-container" | "tertiary-container" | "error-container" | "inverse" | "inverse-primary", Record<string, _$tailwind_variants0.ClassValue>>; border: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; outline: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; rounded: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl", Record<string, _$tailwind_variants0.ClassValue>>; padding: { [x: number]: { start: string; field: string; unit: string; end: string; }; }; expand: { true: { wrapper: string; }; }; }, { wrapper: string[]; field: string; start: string; input: string; unit: string; end: string; }, undefined, { surface: Record<"primary" | "secondary" | "tertiary" | "error" | "base" | "lowest" | "low" | "high" | "highest" | "primary-fixed" | "secondary-fixed" | "tertiary-fixed" | "primary-container" | "secondary-container" | "tertiary-container" | "error-container" | "inverse" | "inverse-primary", Record<string, _$tailwind_variants0.ClassValue>>; border: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; outline: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; rounded: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl", Record<string, _$tailwind_variants0.ClassValue>>; padding: { [x: number]: { start: string; field: string; unit: string; end: string; }; }; expand: { true: { wrapper: string; }; }; }, { wrapper: string[]; field: string; start: string; input: string; unit: string; end: string; }, _$tailwind_variants0.TVReturnType<{ surface: Record<"primary" | "secondary" | "tertiary" | "error" | "base" | "lowest" | "low" | "high" | "highest" | "primary-fixed" | "secondary-fixed" | "tertiary-fixed" | "primary-container" | "secondary-container" | "tertiary-container" | "error-container" | "inverse" | "inverse-primary", Record<string, _$tailwind_variants0.ClassValue>>; border: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; outline: Record<"none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline", Record<string, _$tailwind_variants0.ClassValue>>; rounded: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl", Record<string, _$tailwind_variants0.ClassValue>>; padding: { [x: number]: { start: string; field: string; unit: string; end: string; }; }; expand: { true: { wrapper: string; }; }; }, { wrapper: string[]; field: string; start: string; input: string; unit: string; end: string; }, undefined, unknown, unknown, undefined>>; type InputWrapperVariantProps = VariantProps<typeof inputWrapperVariants>; interface InputWrapperProps { class?: string; id?: string; type?: InputType; modelValue?: InputValue; value?: never; iconEnd?: string; iconStart?: string; unit?: string; border?: InputWrapperVariantProps['border']; expand?: InputWrapperVariantProps['expand']; outline?: InputWrapperVariantProps['outline']; padding?: InputWrapperVariantProps['padding']; rounded?: InputWrapperVariantProps['rounded']; surface?: InputWrapperVariantProps['surface']; } type __VLS_Props = InputWrapperProps; type __VLS_ModelProps = { modelValue?: InputValue; }; type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps; declare var __VLS_1: { padding: number; class: string; }, __VLS_8: { padding: number; class: string; ref: (ref: Element | _$vue.ComponentPublicInstance | null) => void; }, __VLS_10: { padding: number; class: string; }, __VLS_12: { padding: number; class: string; }; type __VLS_Slots = {} & { start?: (props: typeof __VLS_1) => any; } & { field?: (props: typeof __VLS_8) => any; } & { unit?: (props: typeof __VLS_10) => any; } & { end?: (props: typeof __VLS_12) => any; }; declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, { "update:modelValue": (value: any) => any; }, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{ "onUpdate:modelValue"?: ((value: any) => any) | undefined; }>, { surface: "primary" | "secondary" | "tertiary" | "error" | "base" | "lowest" | "low" | "high" | "highest" | "primary-fixed" | "secondary-fixed" | "tertiary-fixed" | "primary-container" | "secondary-container" | "tertiary-container" | "error-container" | "inverse" | "inverse-primary"; rounded: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl"; outline: "none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline"; border: "none" | "current" | "primary" | "secondary" | "tertiary" | "error" | "outline"; padding: number; class: string; type: InputType; expand: boolean; iconStart: string; iconEnd: string; value: never; id: string; modelValue: InputValue; unit: string; }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>; declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base, __VLS_Slots>; declare const _default$3: typeof __VLS_export$1; type __VLS_WithSlots$1<T, S> = T & { new (): { $slots: S; }; }; declare const placeholder: _$tailwind_variants0.TVReturnType<{ border: Record<"none" | "dashed" | "solid", Record<string, _$tailwind_variants0.ClassValue>>; color: { current: { wrapper: string; pattern: string; }; "outline-variant": { wrapper: string; pattern: string; }; outline: { wrapper: string; pattern: string; }; primary: { wrapper: string; pattern: string; }; secondary: { wrapper: string; pattern: string; }; tertiary: { wrapper: string; pattern: string; }; error: { wrapper: string; pattern: string; }; }; rounded: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl", Record<string, _$tailwind_variants0.ClassValue>>; shadow: Record<"none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset", Record<string, _$tailwind_variants0.ClassValue>>; }, { wrapper: string; pattern: string; }, undefined, { border: Record<"none" | "dashed" | "solid", Record<string, _$tailwind_variants0.ClassValue>>; color: { current: { wrapper: string; pattern: string; }; "outline-variant": { wrapper: string; pattern: string; }; outline: { wrapper: string; pattern: string; }; primary: { wrapper: string; pattern: string; }; secondary: { wrapper: string; pattern: string; }; tertiary: { wrapper: string; pattern: string; }; error: { wrapper: string; pattern: string; }; }; rounded: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl", Record<string, _$tailwind_variants0.ClassValue>>; shadow: Record<"none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset", Record<string, _$tailwind_variants0.ClassValue>>; }, { wrapper: string; pattern: string; }, _$tailwind_variants0.TVReturnType<{ border: Record<"none" | "dashed" | "solid", Record<string, _$tailwind_variants0.ClassValue>>; color: { current: { wrapper: string; pattern: string; }; "outline-variant": { wrapper: string; pattern: string; }; outline: { wrapper: string; pattern: string; }; primary: { wrapper: string; pattern: string; }; secondary: { wrapper: string; pattern: string; }; tertiary: { wrapper: string; pattern: string; }; error: { wrapper: string; pattern: string; }; }; rounded: Record<"none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl", Record<string, _$tailwind_variants0.ClassValue>>; shadow: Record<"none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset", Record<string, _$tailwind_variants0.ClassValue>>; }, { wrapper: string; pattern: string; }, undefined, unknown, unknown, undefined>>; type PlaceholderVariantProps = VariantProps<typeof placeholder>; /** Placeholder component props */ type PlaceholderProps = { /** rhombus height. @defaultValue 20 */rh?: number; /** rhombus width. @defaultValue 10 */ rw?: number; /** placeholder border. @defaultValue `'dashed'` */ border?: PlaceholderVariantProps['border']; /** pattern and border color. @defaultValue '`outline-variant`' */ color?: PlaceholderVariantProps['color']; /** rounded corners. @defaultValue `'xl'` */ rounded?: PlaceholderVariantProps['rounded']; /** shadow. @defaultValue `'none'` */ shadow?: PlaceholderVariantProps['shadow']; }; declare const _default$4: typeof __VLS_export; declare const __VLS_export: __VLS_WithSlots<_$vue.DefineComponent<PlaceholderProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<PlaceholderProps> & Readonly<{}>, { rounded: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" | "3xl"; shadow: "none" | "current" | "z1" | "z2" | "z3" | "z4" | "z5" | "inset"; border: "none" | "dashed" | "solid"; color: "current" | "primary" | "secondary" | "tertiary" | "error" | "outline" | "outline-variant"; rh: number; rw: number; }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>, { default?: (props: {}) => any; }>; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; }; export { _default as Button, type ButtonProps, _default$1 as Card, type CardProps, _default$2 as Icon, type IconProps, _default$3 as Input, type InputWrapperProps as InputProps, type InputType, type InputValue, _default$4 as Placeholder, type PlaceholderProps, _default$5 as Surface, type SurfaceProps, createPoupe, poupeInjectionKey }; //# sourceMappingURL=index.d.mts.map