nextworks 0.0.1 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -30
- package/dist/.gitkeep +0 -0
- package/dist/cli_manifests/auth_manifest.json +86 -0
- package/dist/cli_manifests/blocks_manifest.json +185 -0
- package/dist/cli_manifests/data_manifest.json +51 -0
- package/dist/cli_manifests/forms_manifest.json +61 -0
- package/dist/commands/admin-posts.d.ts +2 -0
- package/dist/commands/admin-posts.d.ts.map +1 -0
- package/dist/commands/admin-posts.js +15 -0
- package/dist/commands/admin-posts.js.map +1 -0
- package/dist/commands/admin-users.d.ts +2 -0
- package/dist/commands/admin-users.d.ts.map +1 -0
- package/dist/commands/admin-users.js +15 -0
- package/dist/commands/admin-users.js.map +1 -0
- package/dist/commands/auth-core.d.ts +2 -0
- package/dist/commands/auth-core.d.ts.map +1 -0
- package/dist/commands/auth-core.js +83 -0
- package/dist/commands/auth-core.js.map +1 -0
- package/dist/commands/auth-forms.d.ts +2 -0
- package/dist/commands/auth-forms.d.ts.map +1 -0
- package/dist/commands/auth-forms.js +15 -0
- package/dist/commands/auth-forms.js.map +1 -0
- package/dist/commands/blocks-options.d.ts +7 -0
- package/dist/commands/blocks-options.d.ts.map +1 -0
- package/dist/commands/blocks-options.js +19 -0
- package/dist/commands/blocks-options.js.map +1 -0
- package/dist/commands/blocks.d.ts +7 -0
- package/dist/commands/blocks.d.ts.map +1 -0
- package/dist/commands/blocks.js +145 -0
- package/dist/commands/blocks.js.map +1 -0
- package/dist/commands/data.d.ts +3 -0
- package/dist/commands/data.d.ts.map +1 -0
- package/dist/commands/data.js +88 -0
- package/dist/commands/data.js.map +1 -0
- package/dist/commands/forms.d.ts +6 -0
- package/dist/commands/forms.d.ts.map +1 -0
- package/dist/commands/forms.js +107 -0
- package/dist/commands/forms.js.map +1 -0
- package/dist/commands/remove-auth-core.d.ts +2 -0
- package/dist/commands/remove-auth-core.d.ts.map +1 -0
- package/dist/commands/remove-auth-core.js +69 -0
- package/dist/commands/remove-auth-core.js.map +1 -0
- package/dist/commands/remove-blocks.d.ts +2 -0
- package/dist/commands/remove-blocks.d.ts.map +1 -0
- package/dist/commands/remove-blocks.js +36 -0
- package/dist/commands/remove-blocks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -0
- package/dist/kits/auth-core/README.md +106 -0
- package/dist/kits/auth-core/app/(protected)/dashboard/page.tsx +8 -0
- package/dist/kits/auth-core/app/(protected)/layout.tsx +18 -0
- package/dist/kits/auth-core/app/(protected)/settings/profile/page.tsx +15 -0
- package/dist/kits/auth-core/app/(protected)/settings/profile/profile-form.tsx +114 -0
- package/dist/kits/auth-core/app/api/auth/[...nextauth]/route.ts +1 -0
- package/dist/kits/auth-core/app/api/auth/forgot-password/route.ts +114 -0
- package/dist/kits/auth-core/app/api/auth/providers/route.ts +6 -0
- package/dist/kits/auth-core/app/api/auth/reset-password/route.ts +63 -0
- package/dist/kits/auth-core/app/api/auth/send-verify-email/route.ts +6 -0
- package/dist/kits/auth-core/app/api/signup/route.ts +41 -0
- package/dist/kits/auth-core/app/auth/forgot-password/page.tsx +21 -0
- package/dist/kits/auth-core/app/auth/login/page.tsx +5 -0
- package/dist/kits/auth-core/app/auth/reset-password/page.tsx +187 -0
- package/dist/kits/auth-core/app/auth/signup/page.tsx +5 -0
- package/dist/kits/auth-core/app/auth/verify-email/page.tsx +11 -0
- package/dist/kits/auth-core/components/admin/admin-header.tsx +57 -0
- package/dist/kits/auth-core/components/auth/dashboard.tsx +237 -0
- package/dist/kits/auth-core/components/auth/forgot-password-form.tsx +90 -0
- package/dist/kits/auth-core/components/auth/login-form.tsx +467 -0
- package/dist/kits/auth-core/components/auth/logout-button.tsx +50 -0
- package/dist/kits/auth-core/components/auth/minimal-logout-button.tsx +40 -0
- package/dist/kits/auth-core/components/auth/signup-form.tsx +468 -0
- package/dist/kits/auth-core/components/require-auth.tsx +59 -0
- package/dist/kits/auth-core/components/session-provider.tsx +11 -0
- package/dist/kits/auth-core/components/ui/README.txt +1 -0
- package/dist/kits/auth-core/components/ui/button.tsx +55 -0
- package/dist/kits/auth-core/components/ui/input.tsx +25 -0
- package/dist/kits/auth-core/components/ui/label.tsx +23 -0
- package/dist/kits/auth-core/lib/api/errors.ts +14 -0
- package/dist/kits/auth-core/lib/auth-helpers.ts +29 -0
- package/dist/kits/auth-core/lib/auth.ts +142 -0
- package/dist/kits/auth-core/lib/email/dev-transport.ts +42 -0
- package/dist/kits/auth-core/lib/email/index.ts +28 -0
- package/dist/kits/auth-core/lib/email/provider-smtp.ts +36 -0
- package/dist/kits/auth-core/lib/forms/map-errors.ts +11 -0
- package/dist/kits/auth-core/lib/hash.ts +6 -0
- package/dist/kits/auth-core/lib/prisma.ts +15 -0
- package/dist/kits/auth-core/lib/server/result.ts +45 -0
- package/dist/kits/auth-core/lib/utils.ts +6 -0
- package/dist/kits/auth-core/lib/validation/forms.ts +88 -0
- package/dist/kits/auth-core/package-deps.json +19 -0
- package/dist/kits/auth-core/prisma/auth-models.prisma +81 -0
- package/dist/kits/auth-core/prisma/schema.prisma +81 -0
- package/dist/kits/auth-core/scripts/populate-tokenhash.mjs +26 -0
- package/dist/kits/auth-core/scripts/promote-admin.mjs +33 -0
- package/dist/kits/auth-core/scripts/seed-demo.mjs +40 -0
- package/dist/kits/auth-core/types/next-auth.d.ts +25 -0
- package/dist/kits/blocks/README.md +53 -0
- package/dist/kits/blocks/app/globals.css +175 -0
- package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -0
- package/dist/kits/blocks/app/templates/digitalagency/README.md +36 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +99 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +74 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +227 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +90 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +168 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +297 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -0
- package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -0
- package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +85 -0
- package/dist/kits/blocks/app/templates/gallery/page.tsx +303 -0
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +74 -0
- package/dist/kits/blocks/app/templates/productlaunch/README.md +55 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +178 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +93 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +93 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +84 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +89 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +162 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +89 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -0
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +45 -0
- package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -0
- package/dist/kits/blocks/app/templates/saasdashboard/README.md +38 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +176 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +91 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +105 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +127 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +159 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +97 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -0
- package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -0
- package/dist/kits/blocks/components/app-providers.tsx +1 -0
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -0
- package/dist/kits/blocks/components/sections/About.tsx +291 -0
- package/dist/kits/blocks/components/sections/CTA.tsx +258 -0
- package/dist/kits/blocks/components/sections/Contact.tsx +267 -0
- package/dist/kits/blocks/components/sections/FAQ.tsx +226 -0
- package/dist/kits/blocks/components/sections/Features.tsx +269 -0
- package/dist/kits/blocks/components/sections/Footer.tsx +302 -0
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +307 -0
- package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -0
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -0
- package/dist/kits/blocks/components/sections/Navbar.tsx +353 -0
- package/dist/kits/blocks/components/sections/Newsletter.tsx +156 -0
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +550 -0
- package/dist/kits/blocks/components/sections/Pricing.tsx +264 -0
- package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -0
- package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -0
- package/dist/kits/blocks/components/sections/Team.tsx +309 -0
- package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -0
- package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -0
- package/dist/kits/blocks/components/theme-provider.tsx +34 -0
- package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -0
- package/dist/kits/blocks/components/ui/brand-node.tsx +121 -0
- package/dist/kits/blocks/components/ui/button.tsx +122 -0
- package/dist/kits/blocks/components/ui/button_bck.tsx +93 -0
- package/dist/kits/blocks/components/ui/card.tsx +95 -0
- package/dist/kits/blocks/components/ui/checkbox.tsx +30 -0
- package/dist/kits/blocks/components/ui/cta-button.tsx +125 -0
- package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -0
- package/dist/kits/blocks/components/ui/feature-card.tsx +91 -0
- package/dist/kits/blocks/components/ui/input.tsx +27 -0
- package/dist/kits/blocks/components/ui/label.tsx +29 -0
- package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -0
- package/dist/kits/blocks/components/ui/select.tsx +25 -0
- package/dist/kits/blocks/components/ui/skeleton.tsx +13 -0
- package/dist/kits/blocks/components/ui/switch.tsx +78 -0
- package/dist/kits/blocks/components/ui/table.tsx +98 -0
- package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -0
- package/dist/kits/blocks/components/ui/textarea.tsx +26 -0
- package/dist/kits/blocks/components/ui/theme-selector.tsx +247 -0
- package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -0
- package/dist/kits/blocks/components/ui/toaster.tsx +7 -0
- package/dist/kits/blocks/lib/themes.ts +399 -0
- package/dist/kits/blocks/lib/themes_old.ts +37 -0
- package/dist/kits/blocks/lib/utils.ts +9 -0
- package/dist/kits/blocks/next.config.ts +11 -0
- package/dist/kits/blocks/notes/THEME_GUIDE.md +29 -0
- package/dist/kits/blocks/notes/THEMING_CONVERSION_SUMMARY.md +14 -0
- package/dist/kits/blocks/package-deps.json +22 -0
- package/dist/kits/blocks/public/placeholders/gallery/hero-pexels-broken-9945014.avif +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626431.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626432.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626434.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626436.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_1.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_2.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_3.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_4.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/hero.png +0 -0
- package/dist/kits/blocks/public/placeholders/saas_dashboard/analytics.png +0 -0
- package/dist/kits/blocks/public/placeholders/saas_dashboard/chat.png +0 -0
- package/dist/kits/blocks/public/placeholders/saas_dashboard/projectBoard.png +0 -0
- package/dist/kits/data/.gitkeep +0 -0
- package/dist/kits/data/README.md +104 -0
- package/dist/kits/data/app/(protected)/admin/posts/page.tsx +5 -0
- package/dist/kits/data/app/(protected)/admin/users/page.tsx +5 -0
- package/dist/kits/data/app/api/posts/[id]/route.ts +83 -0
- package/dist/kits/data/app/api/posts/route.ts +138 -0
- package/dist/kits/data/app/api/seed-demo/route.ts +45 -0
- package/dist/kits/data/app/api/users/[id]/route.ts +127 -0
- package/dist/kits/data/app/api/users/check-email/route.ts +18 -0
- package/dist/kits/data/app/api/users/check-unique/route.ts +27 -0
- package/dist/kits/data/app/api/users/route.ts +79 -0
- package/dist/kits/data/app/examples/demo/README.md +4 -0
- package/dist/kits/data/app/examples/demo/create-post-form.tsx +106 -0
- package/dist/kits/data/app/examples/demo/page.tsx +118 -0
- package/dist/kits/data/app/examples/demo/seed-demo-button.tsx +37 -0
- package/dist/kits/data/components/admin/posts-manager.tsx +719 -0
- package/dist/kits/data/components/admin/users-manager.tsx +432 -0
- package/dist/kits/data/lib/prisma.ts +15 -0
- package/dist/kits/data/lib/server/result.ts +90 -0
- package/dist/kits/data/package-deps.json +11 -0
- package/dist/kits/data/scripts/seed-demo.mjs +41 -0
- package/dist/kits/forms/.gitkeep +0 -0
- package/dist/kits/forms/README.md +49 -0
- package/dist/kits/forms/app/.gitkeep +0 -0
- package/dist/kits/forms/app/api/wizard/route.ts +71 -0
- package/dist/kits/forms/app/examples/forms/basic/page.tsx +124 -0
- package/dist/kits/forms/app/examples/forms/server-action/form-client.tsx +28 -0
- package/dist/kits/forms/app/examples/forms/server-action/page.tsx +71 -0
- package/dist/kits/forms/app/examples/forms/wizard/page.tsx +15 -0
- package/dist/kits/forms/app/examples/forms/wizard/wizard-client.tsx +2 -0
- package/dist/kits/forms/components/.gitkeep +0 -0
- package/dist/kits/forms/components/examples/wizard-client.tsx +231 -0
- package/dist/kits/forms/components/hooks/useCheckUnique.ts +79 -0
- package/dist/kits/forms/components/ui/button.tsx +122 -0
- package/dist/kits/forms/components/ui/checkbox.tsx +30 -0
- package/dist/kits/forms/components/ui/form/context.ts +33 -0
- package/dist/kits/forms/components/ui/form/form-control.tsx +28 -0
- package/dist/kits/forms/components/ui/form/form-description.tsx +22 -0
- package/dist/kits/forms/components/ui/form/form-field.tsx +36 -0
- package/dist/kits/forms/components/ui/form/form-item.tsx +21 -0
- package/dist/kits/forms/components/ui/form/form-label.tsx +24 -0
- package/dist/kits/forms/components/ui/form/form-message.tsx +29 -0
- package/dist/kits/forms/components/ui/form/form.tsx +26 -0
- package/dist/kits/forms/components/ui/input.tsx +27 -0
- package/dist/kits/forms/components/ui/label.tsx +29 -0
- package/dist/kits/forms/components/ui/select.tsx +25 -0
- package/dist/kits/forms/components/ui/switch.tsx +78 -0
- package/dist/kits/forms/components/ui/textarea.tsx +26 -0
- package/dist/kits/forms/lib/.gitkeep +0 -0
- package/dist/kits/forms/lib/forms/map-errors.ts +29 -0
- package/dist/kits/forms/lib/prisma.ts +16 -0
- package/dist/kits/forms/lib/utils.ts +9 -0
- package/dist/kits/forms/lib/validation/forms.ts +88 -0
- package/dist/kits/forms/lib/validation/wizard.ts +32 -0
- package/dist/kits/forms/package-deps.json +17 -0
- package/dist/utils/file-operations.d.ts +18 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +327 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/installation-tracker.d.ts +26 -0
- package/dist/utils/installation-tracker.d.ts.map +1 -0
- package/dist/utils/installation-tracker.js +98 -0
- package/dist/utils/installation-tracker.js.map +1 -0
- package/package.json +51 -21
- package/index.js +0 -1
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { type ThemeConfig, type ThemeVariant } from "@nextworks/blocks-core";
|
|
2
|
+
|
|
3
|
+
export const themes: Record<ThemeVariant, ThemeConfig> = {
|
|
4
|
+
default: {
|
|
5
|
+
name: "Default",
|
|
6
|
+
colors: {
|
|
7
|
+
primary: "oklch(0.205 0 0)",
|
|
8
|
+
primaryForeground: "oklch(0.985 0 0)",
|
|
9
|
+
secondary: "oklch(0.97 0 0)",
|
|
10
|
+
secondaryForeground: "oklch(0.205 0 0)",
|
|
11
|
+
accent: "oklch(0.97 0 0)",
|
|
12
|
+
accentForeground: "oklch(0.205 0 0)",
|
|
13
|
+
background: "oklch(1 0 0)",
|
|
14
|
+
foreground: "oklch(0.145 0 0)",
|
|
15
|
+
card: "oklch(1 0 0)",
|
|
16
|
+
cardForeground: "oklch(0.145 0 0)",
|
|
17
|
+
popover: "oklch(1 0 0)",
|
|
18
|
+
popoverForeground: "oklch(0.145 0 0)",
|
|
19
|
+
muted: "oklch(0.97 0 0)",
|
|
20
|
+
mutedForeground: "oklch(0.556 0 0)",
|
|
21
|
+
border: "oklch(0.922 0 0)",
|
|
22
|
+
input: "oklch(0.922 0 0)",
|
|
23
|
+
ring: "oklch(0.708 0 0)",
|
|
24
|
+
destructive: "oklch(0.577 0.245 27.325)",
|
|
25
|
+
chart1: "oklch(0.646 0.222 41.116)",
|
|
26
|
+
chart2: "oklch(0.6 0.118 184.704)",
|
|
27
|
+
chart3: "oklch(0.398 0.07 227.392)",
|
|
28
|
+
chart4: "oklch(0.828 0.189 84.429)",
|
|
29
|
+
chart5: "oklch(0.769 0.188 70.08)",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
monochrome: {
|
|
33
|
+
name: "Monochrome",
|
|
34
|
+
colors: {
|
|
35
|
+
primary: "oklch(0.2 0 0)",
|
|
36
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
37
|
+
secondary: "oklch(0.95 0 0)",
|
|
38
|
+
secondaryForeground: "oklch(0.2 0 0)",
|
|
39
|
+
accent: "oklch(0.9 0 0)",
|
|
40
|
+
accentForeground: "oklch(0.2 0 0)",
|
|
41
|
+
background: "oklch(1 0 0)",
|
|
42
|
+
foreground: "oklch(0.1 0 0)",
|
|
43
|
+
card: "oklch(0.99 0 0)",
|
|
44
|
+
cardForeground: "oklch(0.1 0 0)",
|
|
45
|
+
popover: "oklch(0.99 0 0)",
|
|
46
|
+
popoverForeground: "oklch(0.1 0 0)",
|
|
47
|
+
muted: "oklch(0.95 0 0)",
|
|
48
|
+
mutedForeground: "oklch(0.5 0 0)",
|
|
49
|
+
border: "oklch(0.9 0 0)",
|
|
50
|
+
input: "oklch(0.9 0 0)",
|
|
51
|
+
ring: "oklch(0.7 0 0)",
|
|
52
|
+
destructive: "oklch(0.4 0 0)",
|
|
53
|
+
chart1: "oklch(0.2 0 0)",
|
|
54
|
+
chart2: "oklch(0.4 0 0)",
|
|
55
|
+
chart3: "oklch(0.6 0 0)",
|
|
56
|
+
chart4: "oklch(0.8 0 0)",
|
|
57
|
+
chart5: "oklch(0.3 0 0)",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
blue: {
|
|
61
|
+
name: "Blue",
|
|
62
|
+
colors: {
|
|
63
|
+
primary: "oklch(0.5 0.2 240)",
|
|
64
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
65
|
+
secondary: "oklch(0.95 0.05 240)",
|
|
66
|
+
secondaryForeground: "oklch(0.2 0.1 240)",
|
|
67
|
+
accent: "oklch(0.9 0.1 240)",
|
|
68
|
+
accentForeground: "oklch(0.2 0.1 240)",
|
|
69
|
+
background: "oklch(1 0 0)",
|
|
70
|
+
foreground: "oklch(0.1 0 0)",
|
|
71
|
+
card: "oklch(0.99 0 0)",
|
|
72
|
+
cardForeground: "oklch(0.1 0 0)",
|
|
73
|
+
popover: "oklch(0.99 0 0)",
|
|
74
|
+
popoverForeground: "oklch(0.1 0 0)",
|
|
75
|
+
muted: "oklch(0.95 0.02 240)",
|
|
76
|
+
mutedForeground: "oklch(0.5 0.05 240)",
|
|
77
|
+
border: "oklch(0.9 0.05 240)",
|
|
78
|
+
input: "oklch(0.9 0.05 240)",
|
|
79
|
+
ring: "oklch(0.5 0.2 240)",
|
|
80
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
81
|
+
chart1: "oklch(0.5 0.2 240)",
|
|
82
|
+
chart2: "oklch(0.6 0.15 200)",
|
|
83
|
+
chart3: "oklch(0.7 0.1 180)",
|
|
84
|
+
chart4: "oklch(0.4 0.2 280)",
|
|
85
|
+
chart5: "oklch(0.8 0.1 220)",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
green: {
|
|
89
|
+
name: "Green",
|
|
90
|
+
colors: {
|
|
91
|
+
primary: "oklch(0.5 0.2 140)",
|
|
92
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
93
|
+
secondary: "oklch(0.95 0.05 140)",
|
|
94
|
+
secondaryForeground: "oklch(0.2 0.1 140)",
|
|
95
|
+
accent: "oklch(0.9 0.1 140)",
|
|
96
|
+
accentForeground: "oklch(0.2 0.1 140)",
|
|
97
|
+
background: "oklch(1 0 0)",
|
|
98
|
+
foreground: "oklch(0.1 0 0)",
|
|
99
|
+
card: "oklch(0.99 0 0)",
|
|
100
|
+
cardForeground: "oklch(0.1 0 0)",
|
|
101
|
+
popover: "oklch(0.99 0 0)",
|
|
102
|
+
popoverForeground: "oklch(0.1 0 0)",
|
|
103
|
+
muted: "oklch(0.95 0.02 140)",
|
|
104
|
+
mutedForeground: "oklch(0.5 0.05 140)",
|
|
105
|
+
border: "oklch(0.9 0.05 140)",
|
|
106
|
+
input: "oklch(0.9 0.05 140)",
|
|
107
|
+
ring: "oklch(0.5 0.2 140)",
|
|
108
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
109
|
+
chart1: "oklch(0.5 0.2 140)",
|
|
110
|
+
chart2: "oklch(0.6 0.15 120)",
|
|
111
|
+
chart3: "oklch(0.7 0.1 100)",
|
|
112
|
+
chart4: "oklch(0.4 0.2 160)",
|
|
113
|
+
chart5: "oklch(0.8 0.1 130)",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
purple: {
|
|
117
|
+
name: "Purple",
|
|
118
|
+
colors: {
|
|
119
|
+
primary: "oklch(0.5 0.2 300)",
|
|
120
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
121
|
+
secondary: "oklch(0.95 0.05 300)",
|
|
122
|
+
secondaryForeground: "oklch(0.2 0.1 300)",
|
|
123
|
+
accent: "oklch(0.9 0.1 300)",
|
|
124
|
+
accentForeground: "oklch(0.2 0.1 300)",
|
|
125
|
+
background: "oklch(1 0 0)",
|
|
126
|
+
foreground: "oklch(0.1 0 0)",
|
|
127
|
+
card: "oklch(0.99 0 0)",
|
|
128
|
+
cardForeground: "oklch(0.1 0 0)",
|
|
129
|
+
popover: "oklch(0.99 0 0)",
|
|
130
|
+
popoverForeground: "oklch(0.1 0 0)",
|
|
131
|
+
muted: "oklch(0.95 0.02 300)",
|
|
132
|
+
mutedForeground: "oklch(0.5 0.05 300)",
|
|
133
|
+
border: "oklch(0.9 0.05 300)",
|
|
134
|
+
input: "oklch(0.9 0.05 300)",
|
|
135
|
+
ring: "oklch(0.5 0.2 300)",
|
|
136
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
137
|
+
chart1: "oklch(0.5 0.2 300)",
|
|
138
|
+
chart2: "oklch(0.6 0.15 280)",
|
|
139
|
+
chart3: "oklch(0.7 0.1 260)",
|
|
140
|
+
chart4: "oklch(0.4 0.2 320)",
|
|
141
|
+
chart5: "oklch(0.8 0.1 290)",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
orange: {
|
|
145
|
+
name: "Orange",
|
|
146
|
+
colors: {
|
|
147
|
+
primary: "oklch(0.6 0.2 40)",
|
|
148
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
149
|
+
secondary: "oklch(0.95 0.05 40)",
|
|
150
|
+
secondaryForeground: "oklch(0.2 0.1 40)",
|
|
151
|
+
accent: "oklch(0.9 0.1 40)",
|
|
152
|
+
accentForeground: "oklch(0.2 0.1 40)",
|
|
153
|
+
background: "oklch(1 0 0)",
|
|
154
|
+
foreground: "oklch(0.1 0 0)",
|
|
155
|
+
card: "oklch(0.99 0 0)",
|
|
156
|
+
cardForeground: "oklch(0.1 0 0)",
|
|
157
|
+
popover: "oklch(0.99 0 0)",
|
|
158
|
+
popoverForeground: "oklch(0.1 0 0)",
|
|
159
|
+
muted: "oklch(0.95 0.02 40)",
|
|
160
|
+
mutedForeground: "oklch(0.5 0.05 40)",
|
|
161
|
+
border: "oklch(0.9 0.05 40)",
|
|
162
|
+
input: "oklch(0.9 0.05 40)",
|
|
163
|
+
ring: "oklch(0.6 0.2 40)",
|
|
164
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
165
|
+
chart1: "oklch(0.6 0.2 40)",
|
|
166
|
+
chart2: "oklch(0.7 0.15 20)",
|
|
167
|
+
chart3: "oklch(0.8 0.1 0)",
|
|
168
|
+
chart4: "oklch(0.5 0.2 60)",
|
|
169
|
+
chart5: "oklch(0.9 0.1 30)",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
custom: {
|
|
173
|
+
name: "Custom",
|
|
174
|
+
colors: {
|
|
175
|
+
primary: "oklch(0.205 0 0)",
|
|
176
|
+
primaryForeground: "oklch(0.985 0 0)",
|
|
177
|
+
secondary: "oklch(0.97 0 0)",
|
|
178
|
+
secondaryForeground: "oklch(0.205 0 0)",
|
|
179
|
+
accent: "oklch(0.97 0 0)",
|
|
180
|
+
accentForeground: "oklch(0.205 0 0)",
|
|
181
|
+
background: "oklch(1 0 0)",
|
|
182
|
+
foreground: "oklch(0.145 0 0)",
|
|
183
|
+
card: "oklch(1 0 0)",
|
|
184
|
+
cardForeground: "oklch(0.145 0 0)",
|
|
185
|
+
popover: "oklch(1 0 0)",
|
|
186
|
+
popoverForeground: "oklch(0.145 0 0)",
|
|
187
|
+
muted: "oklch(0.97 0 0)",
|
|
188
|
+
mutedForeground: "oklch(0.556 0 0)",
|
|
189
|
+
border: "oklch(0.922 0 0)",
|
|
190
|
+
input: "oklch(0.922 0 0)",
|
|
191
|
+
ring: "oklch(0.708 0 0)",
|
|
192
|
+
destructive: "oklch(0.577 0.245 27.325)",
|
|
193
|
+
chart1: "oklch(0.646 0.222 41.116)",
|
|
194
|
+
chart2: "oklch(0.6 0.118 184.704)",
|
|
195
|
+
chart3: "oklch(0.398 0.07 227.392)",
|
|
196
|
+
chart4: "oklch(0.828 0.189 84.429)",
|
|
197
|
+
chart5: "oklch(0.769 0.188 70.08)",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export const darkThemes: Record<ThemeVariant, ThemeConfig> = {
|
|
203
|
+
default: {
|
|
204
|
+
name: "Default Dark",
|
|
205
|
+
colors: {
|
|
206
|
+
primary: "oklch(0.922 0 0)",
|
|
207
|
+
primaryForeground: "oklch(0.205 0 0)",
|
|
208
|
+
secondary: "oklch(0.269 0 0)",
|
|
209
|
+
secondaryForeground: "oklch(0.985 0 0)",
|
|
210
|
+
accent: "oklch(0.269 0 0)",
|
|
211
|
+
accentForeground: "oklch(0.985 0 0)",
|
|
212
|
+
background: "oklch(0.145 0 0)",
|
|
213
|
+
foreground: "oklch(0.985 0 0)",
|
|
214
|
+
card: "oklch(0.205 0 0)",
|
|
215
|
+
cardForeground: "oklch(0.985 0 0)",
|
|
216
|
+
popover: "oklch(0.205 0 0)",
|
|
217
|
+
popoverForeground: "oklch(0.985 0 0)",
|
|
218
|
+
muted: "oklch(0.269 0 0)",
|
|
219
|
+
mutedForeground: "oklch(0.708 0 0)",
|
|
220
|
+
border: "oklch(1 0 0 / 10%)",
|
|
221
|
+
input: "oklch(1 0 0 / 15%)",
|
|
222
|
+
ring: "oklch(0.556 0 0)",
|
|
223
|
+
destructive: "oklch(0.704 0.191 22.216)",
|
|
224
|
+
chart1: "oklch(0.488 0.243 264.376)",
|
|
225
|
+
chart2: "oklch(0.696 0.17 162.48)",
|
|
226
|
+
chart3: "oklch(0.769 0.188 70.08)",
|
|
227
|
+
chart4: "oklch(0.627 0.265 303.9)",
|
|
228
|
+
chart5: "oklch(0.645 0.246 16.439)",
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
monochrome: {
|
|
232
|
+
name: "Monochrome Dark",
|
|
233
|
+
colors: {
|
|
234
|
+
primary: "oklch(0.8 0 0)",
|
|
235
|
+
primaryForeground: "oklch(0.2 0 0)",
|
|
236
|
+
secondary: "oklch(0.3 0 0)",
|
|
237
|
+
secondaryForeground: "oklch(0.9 0 0)",
|
|
238
|
+
accent: "oklch(0.3 0 0)",
|
|
239
|
+
accentForeground: "oklch(0.9 0 0)",
|
|
240
|
+
background: "oklch(0.1 0 0)",
|
|
241
|
+
foreground: "oklch(0.9 0 0)",
|
|
242
|
+
card: "oklch(0.15 0 0)",
|
|
243
|
+
cardForeground: "oklch(0.9 0 0)",
|
|
244
|
+
popover: "oklch(0.15 0 0)",
|
|
245
|
+
popoverForeground: "oklch(0.9 0 0)",
|
|
246
|
+
muted: "oklch(0.3 0 0)",
|
|
247
|
+
mutedForeground: "oklch(0.6 0 0)",
|
|
248
|
+
border: "oklch(0.2 0 0)",
|
|
249
|
+
input: "oklch(0.2 0 0)",
|
|
250
|
+
ring: "oklch(0.5 0 0)",
|
|
251
|
+
destructive: "oklch(0.6 0 0)",
|
|
252
|
+
chart1: "oklch(0.8 0 0)",
|
|
253
|
+
chart2: "oklch(0.6 0 0)",
|
|
254
|
+
chart3: "oklch(0.4 0 0)",
|
|
255
|
+
chart4: "oklch(0.7 0 0)",
|
|
256
|
+
chart5: "oklch(0.5 0 0)",
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
blue: {
|
|
260
|
+
name: "Blue Dark",
|
|
261
|
+
colors: {
|
|
262
|
+
primary: "oklch(0.7 0.2 240)",
|
|
263
|
+
primaryForeground: "oklch(0.1 0 0)",
|
|
264
|
+
secondary: "oklch(0.3 0.1 240)",
|
|
265
|
+
secondaryForeground: "oklch(0.9 0 0)",
|
|
266
|
+
accent: "oklch(0.3 0.1 240)",
|
|
267
|
+
accentForeground: "oklch(0.9 0 0)",
|
|
268
|
+
background: "oklch(0.1 0 0)",
|
|
269
|
+
foreground: "oklch(0.9 0 0)",
|
|
270
|
+
card: "oklch(0.15 0.05 240)",
|
|
271
|
+
cardForeground: "oklch(0.9 0 0)",
|
|
272
|
+
popover: "oklch(0.15 0.05 240)",
|
|
273
|
+
popoverForeground: "oklch(0.9 0 0)",
|
|
274
|
+
muted: "oklch(0.3 0.05 240)",
|
|
275
|
+
mutedForeground: "oklch(0.6 0.05 240)",
|
|
276
|
+
border: "oklch(0.2 0.1 240)",
|
|
277
|
+
input: "oklch(0.2 0.1 240)",
|
|
278
|
+
ring: "oklch(0.7 0.2 240)",
|
|
279
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
280
|
+
chart1: "oklch(0.7 0.2 240)",
|
|
281
|
+
chart2: "oklch(0.6 0.15 200)",
|
|
282
|
+
chart3: "oklch(0.5 0.1 180)",
|
|
283
|
+
chart4: "oklch(0.8 0.2 280)",
|
|
284
|
+
chart5: "oklch(0.4 0.1 220)",
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
green: {
|
|
288
|
+
name: "Green Dark",
|
|
289
|
+
colors: {
|
|
290
|
+
primary: "oklch(0.7 0.2 140)",
|
|
291
|
+
primaryForeground: "oklch(0.1 0 0)",
|
|
292
|
+
secondary: "oklch(0.3 0.1 140)",
|
|
293
|
+
secondaryForeground: "oklch(0.9 0 0)",
|
|
294
|
+
accent: "oklch(0.3 0.1 140)",
|
|
295
|
+
accentForeground: "oklch(0.9 0 0)",
|
|
296
|
+
background: "oklch(0.1 0 0)",
|
|
297
|
+
foreground: "oklch(0.9 0 0)",
|
|
298
|
+
card: "oklch(0.15 0.05 140)",
|
|
299
|
+
cardForeground: "oklch(0.9 0 0)",
|
|
300
|
+
popover: "oklch(0.15 0.05 140)",
|
|
301
|
+
popoverForeground: "oklch(0.9 0 0)",
|
|
302
|
+
muted: "oklch(0.3 0.05 140)",
|
|
303
|
+
mutedForeground: "oklch(0.6 0.05 140)",
|
|
304
|
+
border: "oklch(0.2 0.1 140)",
|
|
305
|
+
input: "oklch(0.2 0.1 140)",
|
|
306
|
+
ring: "oklch(0.7 0.2 140)",
|
|
307
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
308
|
+
chart1: "oklch(0.7 0.2 140)",
|
|
309
|
+
chart2: "oklch(0.6 0.15 120)",
|
|
310
|
+
chart3: "oklch(0.5 0.1 100)",
|
|
311
|
+
chart4: "oklch(0.8 0.2 160)",
|
|
312
|
+
chart5: "oklch(0.4 0.1 130)",
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
purple: {
|
|
316
|
+
name: "Purple Dark",
|
|
317
|
+
colors: {
|
|
318
|
+
primary: "oklch(0.7 0.2 300)",
|
|
319
|
+
primaryForeground: "oklch(0.1 0 0)",
|
|
320
|
+
secondary: "oklch(0.3 0.1 300)",
|
|
321
|
+
secondaryForeground: "oklch(0.9 0 0)",
|
|
322
|
+
accent: "oklch(0.3 0.1 300)",
|
|
323
|
+
accentForeground: "oklch(0.9 0 0)",
|
|
324
|
+
background: "oklch(0.1 0 0)",
|
|
325
|
+
foreground: "oklch(0.9 0 0)",
|
|
326
|
+
card: "oklch(0.15 0.05 300)",
|
|
327
|
+
cardForeground: "oklch(0.9 0 0)",
|
|
328
|
+
popover: "oklch(0.15 0.05 300)",
|
|
329
|
+
popoverForeground: "oklch(0.9 0 0)",
|
|
330
|
+
muted: "oklch(0.3 0.05 300)",
|
|
331
|
+
mutedForeground: "oklch(0.6 0.05 300)",
|
|
332
|
+
border: "oklch(0.2 0.1 300)",
|
|
333
|
+
input: "oklch(0.2 0.1 300)",
|
|
334
|
+
ring: "oklch(0.7 0.2 300)",
|
|
335
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
336
|
+
chart1: "oklch(0.7 0.2 300)",
|
|
337
|
+
chart2: "oklch(0.6 0.15 280)",
|
|
338
|
+
chart3: "oklch(0.5 0.1 260)",
|
|
339
|
+
chart4: "oklch(0.8 0.2 320)",
|
|
340
|
+
chart5: "oklch(0.4 0.1 290)",
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
orange: {
|
|
344
|
+
name: "Orange Dark",
|
|
345
|
+
colors: {
|
|
346
|
+
primary: "oklch(0.8 0.2 40)",
|
|
347
|
+
primaryForeground: "oklch(0.1 0 0)",
|
|
348
|
+
secondary: "oklch(0.3 0.1 40)",
|
|
349
|
+
secondaryForeground: "oklch(0.9 0 0)",
|
|
350
|
+
accent: "oklch(0.3 0.1 40)",
|
|
351
|
+
accentForeground: "oklch(0.9 0 0)",
|
|
352
|
+
background: "oklch(0.1 0 0)",
|
|
353
|
+
foreground: "oklch(0.9 0 0)",
|
|
354
|
+
card: "oklch(0.15 0.05 40)",
|
|
355
|
+
cardForeground: "oklch(0.9 0 0)",
|
|
356
|
+
popover: "oklch(0.15 0.05 40)",
|
|
357
|
+
popoverForeground: "oklch(0.9 0 0)",
|
|
358
|
+
muted: "oklch(0.3 0.05 40)",
|
|
359
|
+
mutedForeground: "oklch(0.6 0.05 40)",
|
|
360
|
+
border: "oklch(0.2 0.1 40)",
|
|
361
|
+
input: "oklch(0.2 0.1 40)",
|
|
362
|
+
ring: "oklch(0.8 0.2 40)",
|
|
363
|
+
destructive: "oklch(0.6 0.2 0)",
|
|
364
|
+
chart1: "oklch(0.8 0.2 40)",
|
|
365
|
+
chart2: "oklch(0.7 0.15 20)",
|
|
366
|
+
chart3: "oklch(0.6 0.1 0)",
|
|
367
|
+
chart4: "oklch(0.9 0.2 60)",
|
|
368
|
+
chart5: "oklch(0.5 0.1 30)",
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
custom: {
|
|
372
|
+
name: "Custom Dark",
|
|
373
|
+
colors: {
|
|
374
|
+
primary: "oklch(0.922 0 0)",
|
|
375
|
+
primaryForeground: "oklch(0.205 0 0)",
|
|
376
|
+
secondary: "oklch(0.269 0 0)",
|
|
377
|
+
secondaryForeground: "oklch(0.985 0 0)",
|
|
378
|
+
accent: "oklch(0.269 0 0)",
|
|
379
|
+
accentForeground: "oklch(0.985 0 0)",
|
|
380
|
+
background: "oklch(0.145 0 0)",
|
|
381
|
+
foreground: "oklch(0.985 0 0)",
|
|
382
|
+
card: "oklch(0.205 0 0)",
|
|
383
|
+
cardForeground: "oklch(0.985 0 0)",
|
|
384
|
+
popover: "oklch(0.205 0 0)",
|
|
385
|
+
popoverForeground: "oklch(0.985 0 0)",
|
|
386
|
+
muted: "oklch(0.269 0 0)",
|
|
387
|
+
mutedForeground: "oklch(0.708 0 0)",
|
|
388
|
+
border: "oklch(1 0 0 / 10%)",
|
|
389
|
+
input: "oklch(1 0 0 / 15%)",
|
|
390
|
+
ring: "oklch(0.556 0 0)",
|
|
391
|
+
destructive: "oklch(0.704 0.191 22.216)",
|
|
392
|
+
chart1: "oklch(0.488 0.243 264.376)",
|
|
393
|
+
chart2: "oklch(0.696 0.17 162.48)",
|
|
394
|
+
chart3: "oklch(0.769 0.188 70.08)",
|
|
395
|
+
chart4: "oklch(0.627 0.265 303.9)",
|
|
396
|
+
chart5: "oklch(0.645 0.246 16.439)",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// TypeScript cli/kits/blocks/lib/themes.ts
|
|
2
|
+
|
|
3
|
+
export type Theme = {
|
|
4
|
+
name: string;
|
|
5
|
+
colors: {
|
|
6
|
+
primary: string;
|
|
7
|
+
background: string;
|
|
8
|
+
surface: string;
|
|
9
|
+
text: string;
|
|
10
|
+
muted: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const themes: Theme[] = [
|
|
15
|
+
{
|
|
16
|
+
name: "light",
|
|
17
|
+
colors: {
|
|
18
|
+
primary: "#7c3aed",
|
|
19
|
+
background: "#ffffff",
|
|
20
|
+
surface: "#f8fafc",
|
|
21
|
+
text: "#0f172a",
|
|
22
|
+
muted: "#64748b",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "dark",
|
|
27
|
+
colors: {
|
|
28
|
+
primary: "#8b5cf6",
|
|
29
|
+
background: "#0b1220",
|
|
30
|
+
surface: "#071026",
|
|
31
|
+
text: "#e6eef8",
|
|
32
|
+
muted: "#93c5fd",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export const defaultTheme = themes[0];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Theme Guide (Blocks kit)
|
|
2
|
+
|
|
3
|
+
This guide explains the theming system used by the Blocks kit.
|
|
4
|
+
|
|
5
|
+
Overview
|
|
6
|
+
|
|
7
|
+
- Theme definitions live in lib/themes.ts and export a list of theme presets and a default theme.
|
|
8
|
+
- The ThemeProvider and EnhancedThemeProvider components consume these presets to provide runtime theme switching and CSS variable injection.
|
|
9
|
+
|
|
10
|
+
Creating new themes
|
|
11
|
+
|
|
12
|
+
1. Edit lib/themes.ts and add a new theme object with name and color tokens.
|
|
13
|
+
2. Update any PresetThemeVars components in app/templates/* if you need template-specific variables.
|
|
14
|
+
|
|
15
|
+
Usage
|
|
16
|
+
|
|
17
|
+
- Wrap your app with the EnhancedThemeProvider in app/layout.tsx to enable theme switching.
|
|
18
|
+
- Use CSS variables or the theme tokens directly in components when styling.
|
|
19
|
+
|
|
20
|
+
Example
|
|
21
|
+
|
|
22
|
+
import { themes } from "@/lib/themes";
|
|
23
|
+
|
|
24
|
+
const custom = {
|
|
25
|
+
name: "brand",
|
|
26
|
+
colors: { primary: "#ff6600", background: "#fff8f0", surface: "#fff", text: "#1f2937", muted: "#9ca3af" }
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
themes.push(custom);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Theming Conversion Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes the changes made when converting the components to the new theming system.
|
|
4
|
+
|
|
5
|
+
Key changes
|
|
6
|
+
|
|
7
|
+
- All hardcoded tailwind classes for colors were replaced with semantic theme tokens defined in lib/themes.ts.
|
|
8
|
+
- Components now read theme values via CSS variables injected by the EnhancedThemeProvider.
|
|
9
|
+
- PresetThemeVars components in each template set CSS variables for each preset theme.
|
|
10
|
+
|
|
11
|
+
Recommended follow-ups
|
|
12
|
+
|
|
13
|
+
- Review components for any remaining hardcoded colors and replace them with theme tokens.
|
|
14
|
+
- Add more theme presets into lib/themes.ts and update the PresetThemeVars where necessary.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dependencies": {
|
|
3
|
+
"clsx": "^2.1.1",
|
|
4
|
+
"class-variance-authority": "^0.7.1",
|
|
5
|
+
"lucide-react": "^0.542.0",
|
|
6
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
7
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
8
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
9
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
10
|
+
"tailwind-merge": "^3.3.1",
|
|
11
|
+
"tw-animate-css": "^1.3.7",
|
|
12
|
+
"next-themes": "^0.4.6",
|
|
13
|
+
"motion": "^12.23.12",
|
|
14
|
+
"sonner": "^2.0.7",
|
|
15
|
+
"@nextworks/blocks-core": "0.1.0-alpha.0",
|
|
16
|
+
"@nextworks/blocks-sections": "0.1.0-alpha.0",
|
|
17
|
+
"@nextworks/blocks-templates": "0.1.0-alpha.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"tailwindcss": "^4.1.12"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Data kit (cli/kits/data)
|
|
2
|
+
|
|
3
|
+
This kit provides a standalone example Data layer with Posts + Users CRUD: API routes, admin UI, Prisma helpers and a seed script. The kit is designed to be installed via the `nextworks` CLI:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx nextworks add data
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
and is packaged with its own kit dependencies metadata.
|
|
10
|
+
|
|
11
|
+
What the kit includes
|
|
12
|
+
|
|
13
|
+
- API routes:
|
|
14
|
+
- app/api/posts/route.ts
|
|
15
|
+
- app/api/posts/[id]/route.ts
|
|
16
|
+
- app/api/users/route.ts
|
|
17
|
+
- app/api/users/[id]/route.ts
|
|
18
|
+
- app/api/users/check-unique/route.ts
|
|
19
|
+
- app/api/users/check-email/route.ts
|
|
20
|
+
- app/api/seed-demo/route.ts
|
|
21
|
+
- Admin UI components (now standalone in the kit):
|
|
22
|
+
- components/admin/posts-manager.tsx
|
|
23
|
+
- components/admin/users-manager.tsx
|
|
24
|
+
- Protected admin pages:
|
|
25
|
+
- app/(protected)/admin/posts/page.tsx
|
|
26
|
+
- app/(protected)/admin/users/page.tsx
|
|
27
|
+
- Example/demo pages and helpers:
|
|
28
|
+
- app/examples/demo/create-post-form.tsx
|
|
29
|
+
- app/examples/demo/page.tsx
|
|
30
|
+
- app/examples/demo/README.md
|
|
31
|
+
- Prisma helpers and utilities:
|
|
32
|
+
- lib/prisma.ts
|
|
33
|
+
- lib/server/result.ts (ApiResult helpers)
|
|
34
|
+
- lib/utils.ts
|
|
35
|
+
- Seed script: scripts/seed-demo.mjs
|
|
36
|
+
- Kit metadata: package-deps.json (declares @prisma/client and zod; prisma is a devDependency)
|
|
37
|
+
|
|
38
|
+
Database requirements
|
|
39
|
+
|
|
40
|
+
- The data kit is designed and tested with **PostgreSQL**, using a Postgres database hosted on [Neon](https://neon.tech/) during development.
|
|
41
|
+
- Any Prisma‑supported provider _may_ work, but **Postgres is the recommended and currently tested path**.
|
|
42
|
+
|
|
43
|
+
Quick start with Postgres (recommended):
|
|
44
|
+
|
|
45
|
+
1. Create a Postgres database (for example on Neon).
|
|
46
|
+
2. Copy the connection string into your `.env` as:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
DATABASE_URL="postgres://..."
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
3. Merge the Data/Auth Prisma models into your project's `prisma/schema.prisma` (see `prisma/auth-models.prisma` referenced by the manifest).
|
|
53
|
+
4. Run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx prisma generate
|
|
57
|
+
npx prisma migrate dev -n init_data
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If you choose a different database provider, update the `provider` field in your Prisma schema and carefully review indexes/constraints before running migrations.
|
|
61
|
+
|
|
62
|
+
Notes and important behavior
|
|
63
|
+
|
|
64
|
+
- Kit dependencies:
|
|
65
|
+
- Data depends on Auth (for RBAC/session) and Forms (for form primitives/validation). The CLI currently auto-installs `auth-core` and `forms` when you run `nextworks add data` to ensure the required pieces are present. If you prefer an interactive prompt instead of auto-install, the CLI can be adjusted to prompt (ask the maintainers).
|
|
66
|
+
- The kit's package-deps.json lists runtime and dev dependencies that the CLI will merge into the project's package.json; after installation you must run npm install in the project.
|
|
67
|
+
|
|
68
|
+
- Standalone admin components:
|
|
69
|
+
- The admin UI components have been copied into the kit so the Data kit is self-contained. They may still import shared UI primitives (for example from a Blocks or shared ui package) — ensure the consumer project has those UI packages or the CLI installs the required kits.
|
|
70
|
+
|
|
71
|
+
- Auth overlap:
|
|
72
|
+
- The Data kit references the signup API route (app/api/signup/route.ts) in its manifest but does not duplicate the signup implementation — signup is provided by the Auth kit.
|
|
73
|
+
|
|
74
|
+
- Prisma schema & migrations:
|
|
75
|
+
- The kit manifest references prisma/schema.prisma, prisma/migrations/\* and prisma/auth-models.prisma snippets, but the kit does not ship a full migrations directory. You must merge the provided model snippets into your project's prisma/schema.prisma, then run:
|
|
76
|
+
1. npx prisma generate
|
|
77
|
+
2. npx prisma migrate dev
|
|
78
|
+
|
|
79
|
+
Post-install checklist
|
|
80
|
+
|
|
81
|
+
1. Run `npm install` in your project to install dependencies merged by the kit.
|
|
82
|
+
2. Merge the Data/Auth Prisma models into your project's `prisma/schema.prisma` (see `prisma/auth-models.prisma` referenced by the manifest) and run:
|
|
83
|
+
- `npx prisma generate`
|
|
84
|
+
- `npx prisma migrate dev`
|
|
85
|
+
3. Populate demo data if desired:
|
|
86
|
+
- Either run the kit seed script locally: `node scripts/seed-demo.mjs`
|
|
87
|
+
- Or call the included API seed endpoint (POST to `/api/seed-demo`) if you prefer an HTTP-driven seed.
|
|
88
|
+
|
|
89
|
+
CLI behavior and packaging (for maintainers)
|
|
90
|
+
|
|
91
|
+
- Command: the CLI exposes the command `nextworks add data` which copies the files listed in `cli/cli_manifests/data_manifest.json` into your project and merges `package-deps.json` entries.
|
|
92
|
+
- Auto-install: when running the command the CLI ensures Forms and Auth are installed first (auto-installs them if missing).
|
|
93
|
+
- Manifest: keep cli_manifests/data_manifest.json and the files in this kit folder in sync — the CLI uses the manifest to know which files to copy.
|
|
94
|
+
- Packaging: the kit includes package-deps.json and is included in the CLI distribution tarball (dist/kits/data). When the CLI package is built/packed it will include the standalone Data kit files.
|
|
95
|
+
|
|
96
|
+
Caveats & tips
|
|
97
|
+
|
|
98
|
+
- The kit is intended as example/demo code — consumers should review and adapt for production use (security, RBAC rules, validation, etc.).
|
|
99
|
+
- If you want the CLI to prompt before installing Auth/Forms instead of auto-installing, open an issue or request the interactive behavior; it can be added.
|
|
100
|
+
- If you want a timestamped or additional tarball build, the CLI packing step can be re-run to produce another artifact.
|
|
101
|
+
|
|
102
|
+
CLI manifest
|
|
103
|
+
|
|
104
|
+
- In the Nextworks repo, the CLI copies files listed in `cli/cli_manifests/data_manifest.json`. Keep that manifest and this kit folder in sync when editing the repo.
|