tpmjs/packages/ui/package.json
Ajax Davis a6753cd8e6 feat: add light/dark theme system and full homepage with comprehensive UI components
Implement theme system:
- Add next-themes for theme management with light mode as default
- Swap CSS variable definitions in globals.css (light in :root, dark in .dark class)
- Create ThemeProvider component wrapping next-themes
- Create ThemeToggle component with sun/moon icons
- Update root layout with ThemeProvider

Build full homepage:
- Add Header component with navigation and theme toggle
- Create hero section with gradient background and search
- Add Featured Tools section with 6 tool cards (icons, badges, usage stats)
- Add Browse by Category section with 12 colored category tiles
- Add Platform Statistics section with 4 metric cards
- Add footer with copyright and links
- Create homePageData.ts with comprehensive mock data

Add Storybook stories:
- Icon.stories.ts (AllIcons, AllSizes, WithColors)
- Badge.stories.ts (Default, AllVariants, AllSizes, WithLongText)
- Input.stories.ts (Default, WithLabel, AllStates, AllSizes, PasswordInput)
- ProgressBar.stories.ts (Default, AllVariants, AllSizes, WithLabel, edge cases)
- CodeBlock.stories.ts (Default, multiple languages, LongCode)
- Tabs.stories.ts (Default, AllSizes, WithCounts, ManyTabs)

Fix production build issues:
- Export IconName type from Icon.ts
- Add sun and moon icons to icons.ts
- Fix Icon prop naming (icon not name)
- Fix Icon size constraints (remove xl, use lg)
- Update ThemeProvider types using ComponentProps
- Add explicit return types where needed
- Remove unused imports
- Replace forEach with for...of in variants system
- Fix template literals in storybook stories

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 01:29:28 +10:00

87 lines
2.1 KiB
JSON

{
"name": "@tpmjs/ui",
"version": "0.1.2",
"type": "module",
"exports": {
"./Button/Button": {
"types": "./dist/Button/Button.d.ts",
"default": "./dist/Button/Button.js"
},
"./Card/Card": {
"types": "./dist/Card/Card.d.ts",
"default": "./dist/Card/Card.js"
},
"./Input/Input": {
"types": "./dist/Input/Input.d.ts",
"default": "./dist/Input/Input.js"
},
"./Label/Label": {
"types": "./dist/Label/Label.d.ts",
"default": "./dist/Label/Label.js"
},
"./Badge/Badge": {
"types": "./dist/Badge/Badge.d.ts",
"default": "./dist/Badge/Badge.js"
},
"./Container/Container": {
"types": "./dist/Container/Container.d.ts",
"default": "./dist/Container/Container.js"
},
"./Icon/Icon": {
"types": "./dist/Icon/Icon.d.ts",
"default": "./dist/Icon/Icon.js"
},
"./ProgressBar/ProgressBar": {
"types": "./dist/ProgressBar/ProgressBar.d.ts",
"default": "./dist/ProgressBar/ProgressBar.js"
},
"./CodeBlock/CodeBlock": {
"types": "./dist/CodeBlock/CodeBlock.d.ts",
"default": "./dist/CodeBlock/CodeBlock.js"
},
"./Tabs/Tabs": {
"types": "./dist/Tabs/Tabs.d.ts",
"default": "./dist/Tabs/Tabs.js"
},
"./Header/Header": {
"types": "./dist/Header/Header.d.ts",
"default": "./dist/Header/Header.js"
}
},
"files": ["dist"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"test": "vitest run",
"test:ui": "vitest --ui",
"type-check": "tsc --noEmit",
"lint": "eslint .",
"clean": "rm -rf dist .turbo"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"dependencies": {
"@tpmjs/utils": "workspace:*"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@tpmjs/eslint-config": "workspace:*",
"@tpmjs/test": "workspace:*",
"@tpmjs/tsconfig": "workspace:*",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"glob": "^13.0.0",
"happy-dom": "^15.11.7",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tsup": "^8.3.5",
"typescript": "^5.9.3",
"vitest": "^2.1.8"
},
"publishConfig": {
"access": "public"
}
}