- Delete packages/library/src/engine/ and engine.spec.ts; LoadingIcon is now exported directly instead of routed through a generic theming engine. - Remove primevue from every package.json (root devDependencies, library peerDependencies, playground dependencies) and from vite.config.ts's externalized/global Rollup config; add reka-ui as the library's peer dep. - Delete the hand-written nychthemeron.css/theme.css, now fully superseded by the Tailwind entry CSS; both library exports (./style, ./theme) point at it. - Drop the PrimeVue plugin install from Storybook's preview.ts. - Add a `@source "../../";` directive to tailwind.css: Tailwind's automatic content detection is scoped to whichever Vite project runs it, so when the playground consumes this CSS file it never scanned the sibling packages/library/src tree for class usage -- every component rendered with zero utility classes applied until this was added (verified via the compiled Storybook CSS output going from ~2KB/no .bg-primary rule to ~40KB with the full utility set, and the pre-fix screenshot that surfaced it: buttons and other components with a real background color showing as bare, near-invisible text on white). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
215 lines
5.1 KiB
TypeScript
215 lines
5.1 KiB
TypeScript
import type { App } from 'vue'
|
|
import {
|
|
NychLoadingIcon,
|
|
Button,
|
|
buttonVariants,
|
|
Input,
|
|
Textarea,
|
|
Switch,
|
|
Badge,
|
|
badgeVariants,
|
|
Checkbox,
|
|
CheckboxGroup,
|
|
RadioGroup,
|
|
RadioGroupItem,
|
|
Card,
|
|
CardHeader,
|
|
CardTitle,
|
|
CardDescription,
|
|
CardContent,
|
|
CardFooter,
|
|
CardAction,
|
|
Alert,
|
|
AlertTitle,
|
|
AlertDescription,
|
|
AlertAction,
|
|
alertVariants,
|
|
Select,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectContent,
|
|
SelectItem,
|
|
SelectGroup,
|
|
SelectLabel,
|
|
SelectSeparator,
|
|
Dialog,
|
|
DialogTrigger,
|
|
DialogContent,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
DialogDescription,
|
|
DialogFooter,
|
|
DialogClose,
|
|
DialogOverlay,
|
|
DialogScrollContent,
|
|
} from '../components'
|
|
|
|
export {
|
|
Button,
|
|
buttonVariants,
|
|
Input,
|
|
Textarea,
|
|
Switch,
|
|
Badge,
|
|
badgeVariants,
|
|
Checkbox,
|
|
CheckboxGroup,
|
|
RadioGroup,
|
|
RadioGroupItem,
|
|
Card,
|
|
CardHeader,
|
|
CardTitle,
|
|
CardDescription,
|
|
CardContent,
|
|
CardFooter,
|
|
CardAction,
|
|
Alert,
|
|
AlertTitle,
|
|
AlertDescription,
|
|
AlertAction,
|
|
alertVariants,
|
|
Select,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectContent,
|
|
SelectItem,
|
|
SelectGroup,
|
|
SelectLabel,
|
|
SelectSeparator,
|
|
Dialog,
|
|
DialogTrigger,
|
|
DialogContent,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
DialogDescription,
|
|
DialogFooter,
|
|
DialogClose,
|
|
DialogOverlay,
|
|
DialogScrollContent,
|
|
}
|
|
|
|
export const LoadingIcon = NychLoadingIcon
|
|
|
|
export const createNychthemeron = (): {
|
|
Button: typeof Button
|
|
LoadingIcon: typeof NychLoadingIcon
|
|
Input: typeof Input
|
|
Textarea: typeof Textarea
|
|
Checkbox: typeof Checkbox
|
|
CheckboxGroup: typeof CheckboxGroup
|
|
RadioGroup: typeof RadioGroup
|
|
RadioGroupItem: typeof RadioGroupItem
|
|
Switch: typeof Switch
|
|
Select: typeof Select
|
|
SelectTrigger: typeof SelectTrigger
|
|
SelectValue: typeof SelectValue
|
|
SelectContent: typeof SelectContent
|
|
SelectItem: typeof SelectItem
|
|
SelectGroup: typeof SelectGroup
|
|
SelectLabel: typeof SelectLabel
|
|
SelectSeparator: typeof SelectSeparator
|
|
Card: typeof Card
|
|
CardHeader: typeof CardHeader
|
|
CardTitle: typeof CardTitle
|
|
CardDescription: typeof CardDescription
|
|
CardContent: typeof CardContent
|
|
CardFooter: typeof CardFooter
|
|
CardAction: typeof CardAction
|
|
Dialog: typeof Dialog
|
|
DialogTrigger: typeof DialogTrigger
|
|
DialogContent: typeof DialogContent
|
|
DialogHeader: typeof DialogHeader
|
|
DialogTitle: typeof DialogTitle
|
|
DialogDescription: typeof DialogDescription
|
|
DialogFooter: typeof DialogFooter
|
|
DialogClose: typeof DialogClose
|
|
DialogOverlay: typeof DialogOverlay
|
|
DialogScrollContent: typeof DialogScrollContent
|
|
Alert: typeof Alert
|
|
AlertTitle: typeof AlertTitle
|
|
AlertDescription: typeof AlertDescription
|
|
AlertAction: typeof AlertAction
|
|
Badge: typeof Badge
|
|
install: (app: App) => void
|
|
} => ({
|
|
Button,
|
|
LoadingIcon,
|
|
Input,
|
|
Textarea,
|
|
Checkbox,
|
|
CheckboxGroup,
|
|
RadioGroup,
|
|
RadioGroupItem,
|
|
Switch,
|
|
Select,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectContent,
|
|
SelectItem,
|
|
SelectGroup,
|
|
SelectLabel,
|
|
SelectSeparator,
|
|
Card,
|
|
CardHeader,
|
|
CardTitle,
|
|
CardDescription,
|
|
CardContent,
|
|
CardFooter,
|
|
CardAction,
|
|
Dialog,
|
|
DialogTrigger,
|
|
DialogContent,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
DialogDescription,
|
|
DialogFooter,
|
|
DialogClose,
|
|
DialogOverlay,
|
|
DialogScrollContent,
|
|
Alert,
|
|
AlertTitle,
|
|
AlertDescription,
|
|
AlertAction,
|
|
Badge,
|
|
install(app: App) {
|
|
app.component('NychButton', Button)
|
|
app.component('NychLoadingIcon', LoadingIcon)
|
|
app.component('NychInput', Input)
|
|
app.component('NychTextarea', Textarea)
|
|
app.component('NychCheckbox', Checkbox)
|
|
app.component('NychCheckboxGroup', CheckboxGroup)
|
|
app.component('NychRadioGroup', RadioGroup)
|
|
app.component('NychRadioGroupItem', RadioGroupItem)
|
|
app.component('NychSwitch', Switch)
|
|
app.component('NychSelect', Select)
|
|
app.component('NychSelectTrigger', SelectTrigger)
|
|
app.component('NychSelectValue', SelectValue)
|
|
app.component('NychSelectContent', SelectContent)
|
|
app.component('NychSelectItem', SelectItem)
|
|
app.component('NychSelectGroup', SelectGroup)
|
|
app.component('NychSelectLabel', SelectLabel)
|
|
app.component('NychSelectSeparator', SelectSeparator)
|
|
app.component('NychCard', Card)
|
|
app.component('NychCardHeader', CardHeader)
|
|
app.component('NychCardTitle', CardTitle)
|
|
app.component('NychCardDescription', CardDescription)
|
|
app.component('NychCardContent', CardContent)
|
|
app.component('NychCardFooter', CardFooter)
|
|
app.component('NychCardAction', CardAction)
|
|
app.component('NychDialog', Dialog)
|
|
app.component('NychDialogTrigger', DialogTrigger)
|
|
app.component('NychDialogContent', DialogContent)
|
|
app.component('NychDialogHeader', DialogHeader)
|
|
app.component('NychDialogTitle', DialogTitle)
|
|
app.component('NychDialogDescription', DialogDescription)
|
|
app.component('NychDialogFooter', DialogFooter)
|
|
app.component('NychDialogClose', DialogClose)
|
|
app.component('NychDialogOverlay', DialogOverlay)
|
|
app.component('NychDialogScrollContent', DialogScrollContent)
|
|
app.component('NychAlert', Alert)
|
|
app.component('NychAlertTitle', AlertTitle)
|
|
app.component('NychAlertDescription', AlertDescription)
|
|
app.component('NychAlertAction', AlertAction)
|
|
app.component('NychBadge', Badge)
|
|
},
|
|
})
|