-
Notifications
You must be signed in to change notification settings - Fork 998
Description
Problem
39 components use flat base: structure in their themes, preventing TypeScript from accepting slots overrides in app.config.ts.
Example Error
// app.config.ts
export default defineAppConfig({
ui: {
container: {
slots: { base: 'custom-class' } // ❌ TS Error: Property 'slots' does not exist
}
}
})Root Cause
Container theme (src/theme/container.ts):
export default {
base: 'w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8'
}Type system (src/runtime/types/tv.ts:39):
type ComponentSlots<T> = Id<{
[K in keyof T['slots']]?: ClassValue // T['slots'] is undefined for flat base
}>Affected Components (39 total)
Main (16): container, skeleton, form, main, kbd, link, page-body, page-columns, page-grid, page-list, blog-posts, pricing-plans, field-group, dashboard-group, dashboard-resize-handle, dashboard-sidebar-collapse, dashboard-sidebar-toggle
Prose (23): a, accordion-item, badge, blockquote, card-group, code, em, field-group, hr, icon, kbd, li, ol, p, steps, strong, tabs-item, tbody, td, th, thead, tr, ul
Inconsistency
96% of components use slots: structure, but these 39 use flat base:.
Proposed Solution
Normalize all theme files to use slots: { base: '...' } structure for consistency with Button, Card, Input, Select, Toast, etc.
Note: This is a breaking change requiring migration to v5.0.0. Will add backward compatibility layer for app.config.ts via normalization util.