UNPKG

@nuxt/ui

Version:

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.

54 lines (53 loc) 2.32 kB
import type { AppConfig } from '@nuxt/schema'; import type { SpringOptions } from 'motion-v'; import theme from '#build/ui/changelog-versions'; import type { ChangelogVersionProps, ChangelogVersionSlots } from '../types'; import type { ComponentConfig } from '../types/tv'; type ChangelogVersions = ComponentConfig<typeof theme, AppConfig, 'changelogVersions'>; export interface ChangelogVersionsProps<T extends ChangelogVersionProps = ChangelogVersionProps> { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; versions?: T[]; /** * Display an indicator bar on the left. * @defaultValue true */ indicator?: boolean; /** * Enable scrolling motion effect on the indicator bar. * `{ damping: 30, restDelta: 0.001 }`{lang="ts-type"} * @defaultValue true * @see https://motion.dev/docs/vue-transitions#spring */ indicatorMotion?: boolean | SpringOptions; class?: any; ui?: ChangelogVersions['slots']; } type ExtendSlotWithVersion<T extends ChangelogVersionProps, K extends keyof ChangelogVersionSlots> = ChangelogVersionSlots[K] extends (props: infer P) => any ? (props: P & { version: T; }) => any : ChangelogVersionSlots[K]; export type ChangelogVersionsSlots<T extends ChangelogVersionProps = ChangelogVersionProps> = { [K in keyof ChangelogVersionSlots]: ExtendSlotWithVersion<T, K>; } & { default(props?: {}): any; indicator(props?: {}): any; }; declare const __VLS_export: <T extends ChangelogVersionProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal<ChangelogVersionsProps<T>> & import("vue").PublicProps & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: ChangelogVersionsSlots<T>; emit: {}; }>) => import("vue").VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; declare const _default: typeof __VLS_export; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K]; } & {};