import { App, Component, DefineComponent } from 'vue'; type VariantValue = string | number | boolean | undefined; type VariantProps = Record; type HtmlTagName$1 = keyof HTMLElementTagNameMap; /** * tailwind-styled-v4 — Vue Adapter * * Pola seperti `createComponent` di React tapi untuk Vue 3 Composition API. * Mendukung: base, variants, defaultVariants, compoundVariants. * * @example * import { tw } from '@tailwind-styled/vue' * * const Button = tw('button', { * base: 'px-4 py-2 rounded font-medium', * variants: { * intent: { * primary: 'bg-blue-500 text-white hover:bg-blue-600', * danger: 'bg-red-500 text-white hover:bg-red-600', * }, * size: { sm: 'h-8 text-sm', md: 'h-10 text-base', lg: 'h-12 text-lg' }, * }, * defaultVariants: { intent: 'primary', size: 'md' }, * }) * * // In template: * // */ interface VueComponentConfig { base?: string; variants?: Record>; compoundVariants?: Array<{ class: string; [key: string]: VariantValue; }>; defaultVariants?: Record; } type HtmlTagName = HtmlTagName$1; /** * Buat Vue component dengan Tailwind class yang terstruktur. * * @param tag - HTML tag atau Vue component * @param config - Konfigurasi base, variants, defaultVariants */ declare function tw(tag: Tag, config?: VueComponentConfig): DefineComponent>; /** * Class variant function — returns a class string resolver. * Framework-agnostic, bisa dipakai di mana saja. * * @example * const buttonCv = cv({ * base: 'px-4 py-2 rounded', * variants: { size: { sm: 'h-8', lg: 'h-12' } }, * defaultVariants: { size: 'sm' }, * }) * * buttonCv({ size: 'lg' }) // 'px-4 py-2 rounded h-12' */ declare function cv(config: VueComponentConfig): (props?: VariantProps) => string; /** * Extend komponen Vue yang sudah ada dengan class tambahan. * * @example * const PrimaryButton = extend(Button, 'bg-blue-500 text-white') */ declare function extend(component: Component, extraClasses: string): DefineComponent>; /** * Vue plugin — daftarkan `tw` sebagai global composable. * * @example * // main.ts * import { createApp } from 'vue' * import { TailwindStyledPlugin } from '@tailwind-styled/vue' * import App from './App.vue' * * createApp(App).use(TailwindStyledPlugin).mount('#app') */ declare const TailwindStyledPlugin: { install(app: App): void; }; export { type HtmlTagName, TailwindStyledPlugin, type VueComponentConfig, cv, extend, tw };