@digilogiclabs/create-saas-app 1.5.1 → 1.5.2
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/dist/.tsbuildinfo +1 -1
- package/dist/cli/commands/add.d.ts +6 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +39 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/create.d.ts +28 -0
- package/dist/cli/commands/create.d.ts.map +1 -0
- package/dist/cli/commands/create.js +130 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/index.d.ts +4 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +20 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/update.d.ts +6 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +68 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/{index.d.ts → cli/index.d.ts} +2 -3
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +59 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/prompts/index.d.ts +2 -0
- package/dist/cli/prompts/index.d.ts.map +1 -0
- package/dist/cli/prompts/index.js +18 -0
- package/dist/cli/prompts/index.js.map +1 -0
- package/dist/cli/prompts/project-setup.d.ts +5 -0
- package/dist/cli/prompts/project-setup.d.ts.map +1 -0
- package/dist/cli/prompts/project-setup.js +251 -0
- package/dist/cli/prompts/project-setup.js.map +1 -0
- package/dist/cli/utils/git.d.ts +9 -0
- package/dist/cli/utils/git.d.ts.map +1 -0
- package/dist/cli/utils/git.js +77 -0
- package/dist/cli/utils/git.js.map +1 -0
- package/dist/cli/utils/index.d.ts +5 -0
- package/dist/cli/utils/index.d.ts.map +1 -0
- package/dist/cli/utils/index.js +21 -0
- package/dist/cli/utils/index.js.map +1 -0
- package/dist/cli/utils/logger.d.ts +16 -0
- package/dist/cli/utils/logger.d.ts.map +1 -0
- package/dist/cli/utils/logger.js +55 -0
- package/dist/cli/utils/logger.js.map +1 -0
- package/dist/cli/utils/package-manager.d.ts +8 -0
- package/dist/cli/utils/package-manager.d.ts.map +1 -0
- package/dist/cli/utils/package-manager.js +92 -0
- package/dist/cli/utils/package-manager.js.map +1 -0
- package/dist/cli/utils/spinner.d.ts +7 -0
- package/dist/cli/utils/spinner.d.ts.map +1 -0
- package/dist/cli/utils/spinner.js +48 -0
- package/dist/cli/utils/spinner.js.map +1 -0
- package/dist/cli/validators/dependencies.d.ts +15 -0
- package/dist/cli/validators/dependencies.d.ts.map +1 -0
- package/dist/cli/validators/dependencies.js +108 -0
- package/dist/cli/validators/dependencies.js.map +1 -0
- package/dist/cli/validators/index.d.ts +3 -0
- package/dist/cli/validators/index.d.ts.map +1 -0
- package/dist/cli/validators/index.js +19 -0
- package/dist/cli/validators/index.js.map +1 -0
- package/dist/cli/validators/project-name.d.ts +5 -0
- package/dist/cli/validators/project-name.d.ts.map +1 -0
- package/dist/cli/validators/project-name.js +151 -0
- package/dist/cli/validators/project-name.js.map +1 -0
- package/dist/generators/file-processor.d.ts +28 -0
- package/dist/generators/file-processor.d.ts.map +1 -0
- package/dist/generators/file-processor.js +203 -0
- package/dist/generators/file-processor.js.map +1 -0
- package/dist/generators/index.d.ts +4 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +20 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/generators/package-installer.d.ts +29 -0
- package/dist/generators/package-installer.d.ts.map +1 -0
- package/dist/generators/package-installer.js +167 -0
- package/dist/generators/package-installer.js.map +1 -0
- package/dist/generators/template-generator.d.ts +48 -0
- package/dist/generators/template-generator.d.ts.map +1 -0
- package/dist/generators/template-generator.js +276 -0
- package/dist/generators/template-generator.js.map +1 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/templates/web/ui-auth-payments/template/package-lock.json +12240 -0
- package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +3 -3
- package/src/templates/web/ui-auth-payments/template/tsconfig.tsbuildinfo +1 -0
- package/src/templates/web/ui-auth-payments-audio/template/package-lock.json +12241 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/login/page.tsx +2 -105
- package/src/templates/web/ui-auth-payments-audio/template/src/app/signup/page.tsx +2 -124
- package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/components/client/login-form.tsx +1 -1
- package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/components/client/signup-form.tsx +3 -3
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/actions/index.ts +14 -0
- package/src/templates/web/ui-auth-payments-audio/template/tsconfig.tsbuildinfo +1 -0
- package/dist/templates/mobile/base/template/.env.example +0 -15
- package/dist/templates/mobile/base/template/App.tsx +0 -88
- package/dist/templates/mobile/base/template/app/(auth)/login.tsx +0 -44
- package/dist/templates/mobile/base/template/app/(auth)/signup.tsx +0 -43
- package/dist/templates/mobile/base/template/app/checkout.tsx +0 -20
- package/dist/templates/mobile/base/template/package.json +0 -38
- package/dist/templates/shared/auth/firebase/web/config.ts +0 -23
- package/dist/templates/shared/auth/supabase/web/config.ts +0 -8
- package/dist/templates/web/base/template/.env.example +0 -15
- package/dist/templates/web/base/template/.eslintrc.js +0 -8
- package/dist/templates/web/base/template/README.md +0 -68
- package/dist/templates/web/base/template/next.config.js +0 -15
- package/dist/templates/web/base/template/package.json +0 -58
- package/dist/templates/web/base/template/postcss.config.js +0 -7
- package/dist/templates/web/base/template/src/app/auth/callback/route.ts +0 -18
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +0 -28
- package/dist/templates/web/base/template/src/app/error.tsx +0 -97
- package/dist/templates/web/base/template/src/app/globals.css +0 -60
- package/dist/templates/web/base/template/src/app/layout.tsx +0 -35
- package/dist/templates/web/base/template/src/app/loading.tsx +0 -34
- package/dist/templates/web/base/template/src/app/login/page.tsx +0 -39
- package/dist/templates/web/base/template/src/app/page.tsx +0 -132
- package/dist/templates/web/base/template/src/app/signup/page.tsx +0 -39
- package/dist/templates/web/base/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +0 -33
- package/dist/templates/web/base/template/src/components/providers/theme-provider.tsx +0 -94
- package/dist/templates/web/base/template/src/components/shared/footer.tsx +0 -36
- package/dist/templates/web/base/template/src/components/shared/header.tsx +0 -44
- package/dist/templates/web/base/template/src/components/ui/badge.tsx +0 -36
- package/dist/templates/web/base/template/src/components/ui/button.tsx +0 -56
- package/dist/templates/web/base/template/src/components/ui/card.tsx +0 -71
- package/dist/templates/web/base/template/src/components/ui/theme-toggle.tsx +0 -34
- package/dist/templates/web/base/template/src/lib/env.ts +0 -46
- package/dist/templates/web/base/template/src/lib/utils.ts +0 -140
- package/dist/templates/web/base/template/src/test/setup.ts +0 -79
- package/dist/templates/web/base/template/tailwind.config.js +0 -77
- package/dist/templates/web/base/template/tsconfig.json +0 -33
- package/dist/templates/web/base/template/vitest.config.ts +0 -17
- package/dist/templates/web/base/template.backup/.env.example +0 -15
- package/dist/templates/web/base/template.backup.20250817/.env.example +0 -15
- package/dist/templates/web/ui-auth/template/.env.example +0 -15
- package/dist/templates/web/ui-auth/template/.eslintrc.js +0 -8
- package/dist/templates/web/ui-auth/template/README.md +0 -68
- package/dist/templates/web/ui-auth/template/next.config.js +0 -12
- package/dist/templates/web/ui-auth/template/package.json +0 -50
- package/dist/templates/web/ui-auth/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth/template/src/app/auth/callback/route.ts +0 -12
- package/dist/templates/web/ui-auth/template/src/app/checkout/page.tsx +0 -25
- package/dist/templates/web/ui-auth/template/src/app/error.tsx +0 -67
- package/dist/templates/web/ui-auth/template/src/app/globals.css +0 -42
- package/dist/templates/web/ui-auth/template/src/app/layout.tsx +0 -33
- package/dist/templates/web/ui-auth/template/src/app/loading.tsx +0 -20
- package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +0 -109
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +0 -129
- package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +0 -128
- package/dist/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +0 -29
- package/dist/templates/web/ui-auth/template/src/components/providers/theme-provider.tsx +0 -94
- package/dist/templates/web/ui-auth/template/src/components/shared/footer.tsx +0 -36
- package/dist/templates/web/ui-auth/template/src/components/shared/header.tsx +0 -53
- package/dist/templates/web/ui-auth/template/src/components/ui/badge.tsx +0 -36
- package/dist/templates/web/ui-auth/template/src/components/ui/theme-toggle.tsx +0 -34
- package/dist/templates/web/ui-auth/template/src/lib/env.ts +0 -49
- package/dist/templates/web/ui-auth/template/src/lib/utils.ts +0 -140
- package/dist/templates/web/ui-auth/template/src/test/setup.ts +0 -79
- package/dist/templates/web/ui-auth/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth/template/tsconfig.json +0 -33
- package/dist/templates/web/ui-auth/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth/template.backup/.env.example +0 -15
- package/dist/templates/web/ui-auth/template.backup.20250817/.env.example +0 -15
- package/dist/templates/web/ui-auth-payments/template/.env.example +0 -15
- package/dist/templates/web/ui-auth-payments/template/README.md +0 -165
- package/dist/templates/web/ui-auth-payments/template/next.config.js +0 -12
- package/dist/templates/web/ui-auth-payments/template/package.json +0 -52
- package/dist/templates/web/ui-auth-payments/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments/template/src/app/auth/callback/route.ts +0 -12
- package/dist/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +0 -211
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +0 -142
- package/dist/templates/web/ui-auth-payments/template/src/app/error.tsx +0 -67
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +0 -42
- package/dist/templates/web/ui-auth-payments/template/src/app/layout.tsx +0 -33
- package/dist/templates/web/ui-auth-payments/template/src/app/loading.tsx +0 -20
- package/dist/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +0 -38
- package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +0 -109
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +0 -143
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +0 -50
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +0 -128
- package/dist/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +0 -68
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +0 -32
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/theme-provider.tsx +0 -94
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/footer.tsx +0 -36
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +0 -62
- package/dist/templates/web/ui-auth-payments/template/src/components/ui/badge.tsx +0 -36
- package/dist/templates/web/ui-auth-payments/template/src/components/ui/theme-toggle.tsx +0 -34
- package/dist/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +0 -340
- package/dist/templates/web/ui-auth-payments/template/src/lib/auth-server.ts +0 -177
- package/dist/templates/web/ui-auth-payments/template/src/lib/env.ts +0 -49
- package/dist/templates/web/ui-auth-payments/template/src/lib/utils.ts +0 -140
- package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +0 -79
- package/dist/templates/web/ui-auth-payments/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-payments/template/tsconfig.json +0 -33
- package/dist/templates/web/ui-auth-payments/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth-payments-audio/template/.env.example +0 -15
- package/dist/templates/web/ui-auth-payments-audio/template/README.md +0 -187
- package/dist/templates/web/ui-auth-payments-audio/template/next.config.js +0 -12
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +0 -53
- package/dist/templates/web/ui-auth-payments-audio/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/auth/callback/route.ts +0 -12
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +0 -211
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +0 -142
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/error.tsx +0 -67
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +0 -42
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +0 -35
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/loading.tsx +0 -20
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/login/page.tsx +0 -109
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +0 -181
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/signup/page.tsx +0 -128
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +0 -32
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/theme-provider.tsx +0 -94
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/footer.tsx +0 -36
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +0 -62
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/ui/badge.tsx +0 -36
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/ui/theme-toggle.tsx +0 -34
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/env.ts +0 -49
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/utils.ts +0 -140
- package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +0 -79
- package/dist/templates/web/ui-auth-payments-audio/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-payments-audio/template/tsconfig.json +0 -33
- package/dist/templates/web/ui-auth-payments-audio/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth-payments-video/template/.env.example +0 -15
- package/dist/templates/web/ui-auth-payments-video/template/README.md +0 -190
- package/dist/templates/web/ui-auth-payments-video/template/next.config.js +0 -12
- package/dist/templates/web/ui-auth-payments-video/template/package.json +0 -53
- package/dist/templates/web/ui-auth-payments-video/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments-video/template/src/app/auth/callback/route.ts +0 -12
- package/dist/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +0 -211
- package/dist/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +0 -142
- package/dist/templates/web/ui-auth-payments-video/template/src/app/error.tsx +0 -67
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +0 -42
- package/dist/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +0 -33
- package/dist/templates/web/ui-auth-payments-video/template/src/app/loading.tsx +0 -20
- package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +0 -109
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +0 -187
- package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +0 -128
- package/dist/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +0 -32
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/theme-provider.tsx +0 -94
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/footer.tsx +0 -36
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +0 -62
- package/dist/templates/web/ui-auth-payments-video/template/src/components/ui/badge.tsx +0 -36
- package/dist/templates/web/ui-auth-payments-video/template/src/components/ui/theme-toggle.tsx +0 -34
- package/dist/templates/web/ui-auth-payments-video/template/src/lib/env.ts +0 -49
- package/dist/templates/web/ui-auth-payments-video/template/src/lib/utils.ts +0 -140
- package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +0 -79
- package/dist/templates/web/ui-auth-payments-video/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-payments-video/template/tsconfig.json +0 -33
- package/dist/templates/web/ui-auth-payments-video/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-only/template/.env.example +0 -15
- package/dist/templates/web/ui-only/template/.eslintrc.js +0 -8
- package/dist/templates/web/ui-only/template/README.md +0 -68
- package/dist/templates/web/ui-only/template/next.config.js +0 -12
- package/dist/templates/web/ui-only/template/package.json +0 -49
- package/dist/templates/web/ui-only/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-only/template/src/app/auth/callback/route.ts +0 -12
- package/dist/templates/web/ui-only/template/src/app/checkout/page.tsx +0 -25
- package/dist/templates/web/ui-only/template/src/app/error.tsx +0 -67
- package/dist/templates/web/ui-only/template/src/app/globals.css +0 -42
- package/dist/templates/web/ui-only/template/src/app/layout.tsx +0 -33
- package/dist/templates/web/ui-only/template/src/app/loading.tsx +0 -20
- package/dist/templates/web/ui-only/template/src/app/login/page.tsx +0 -63
- package/dist/templates/web/ui-only/template/src/app/page.tsx +0 -91
- package/dist/templates/web/ui-only/template/src/app/signup/page.tsx +0 -79
- package/dist/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-only/template/src/components/providers/app-providers.tsx +0 -26
- package/dist/templates/web/ui-only/template/src/components/providers/theme-provider.tsx +0 -94
- package/dist/templates/web/ui-only/template/src/components/shared/footer.tsx +0 -36
- package/dist/templates/web/ui-only/template/src/components/shared/header.tsx +0 -53
- package/dist/templates/web/ui-only/template/src/components/ui/badge.tsx +0 -36
- package/dist/templates/web/ui-only/template/src/components/ui/theme-toggle.tsx +0 -34
- package/dist/templates/web/ui-only/template/src/lib/env.ts +0 -49
- package/dist/templates/web/ui-only/template/src/lib/utils.ts +0 -140
- package/dist/templates/web/ui-only/template/src/test/setup.ts +0 -79
- package/dist/templates/web/ui-only/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-only/template/tsconfig.json +0 -33
- package/dist/templates/web/ui-only/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-only/template.backup/.env.example +0 -15
- package/dist/templates/web/ui-only/template.backup.20250817/.env.example +0 -15
- package/dist/templates/web/ui-package-test/template/package.json +0 -42
- package/dist/templates/web/ui-package-test/template/src/app/page.tsx +0 -106
- package/dist/templates/web/ui-package-test/template/tsconfig.json +0 -41
- /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/middleware.ts +0 -0
- /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/app/dashboard/layout.tsx +0 -0
- /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/app/dashboard/page.tsx +0 -0
- /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/components/client/auth-status.tsx +0 -0
- /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/lib/actions/auth.ts +0 -0
- /package/{dist/templates/web/base → src/templates/web/ui-auth-payments-audio}/template/src/lib/auth-server.ts +0 -0
package/dist/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { useState, useActionState } from 'react'
|
|
4
|
-
import { Button, Input, Label } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
-
import { subscribeToNewsletter } from '@/lib/actions'
|
|
6
|
-
|
|
7
|
-
export function NewsletterSignup() {
|
|
8
|
-
const [email, setEmail] = useState('')
|
|
9
|
-
const [state, formAction, isPending] = useActionState(subscribeToNewsletter, null)
|
|
10
|
-
|
|
11
|
-
const handleSubmit = async (formData: FormData) => {
|
|
12
|
-
await formAction(formData)
|
|
13
|
-
if (state?.success) {
|
|
14
|
-
setEmail('') // Clear form on success
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className="bg-blue-600 dark:bg-blue-800 rounded-lg p-6 text-white">
|
|
20
|
-
<h3 className="text-lg font-semibold mb-2">Stay Updated</h3>
|
|
21
|
-
<p className="text-blue-100 dark:text-blue-200 mb-4 text-sm">
|
|
22
|
-
Get the latest updates and features delivered to your inbox
|
|
23
|
-
</p>
|
|
24
|
-
|
|
25
|
-
{state?.success && (
|
|
26
|
-
<div className="mb-4 p-3 bg-green-100 border border-green-400 text-green-700 rounded">
|
|
27
|
-
{state.data?.message}
|
|
28
|
-
</div>
|
|
29
|
-
)}
|
|
30
|
-
|
|
31
|
-
{state?.error && (
|
|
32
|
-
<div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
|
33
|
-
{state.error}
|
|
34
|
-
</div>
|
|
35
|
-
)}
|
|
36
|
-
|
|
37
|
-
<form action={handleSubmit} className="flex gap-2">
|
|
38
|
-
<div className="flex-1">
|
|
39
|
-
<Label htmlFor="newsletter-email" className="sr-only">
|
|
40
|
-
Email address
|
|
41
|
-
</Label>
|
|
42
|
-
<Input
|
|
43
|
-
id="newsletter-email"
|
|
44
|
-
name="email"
|
|
45
|
-
type="email"
|
|
46
|
-
value={email}
|
|
47
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
48
|
-
placeholder="Enter your email"
|
|
49
|
-
required
|
|
50
|
-
disabled={isPending}
|
|
51
|
-
className="bg-white dark:bg-gray-800 text-gray-900 dark:text-white"
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
<Button
|
|
55
|
-
type="submit"
|
|
56
|
-
variant="secondary"
|
|
57
|
-
disabled={isPending}
|
|
58
|
-
>
|
|
59
|
-
{isPending ? 'Subscribing...' : 'Subscribe'}
|
|
60
|
-
</Button>
|
|
61
|
-
</form>
|
|
62
|
-
|
|
63
|
-
<p className="text-xs text-blue-200 dark:text-blue-300 mt-2">
|
|
64
|
-
We respect your privacy. Unsubscribe at any time.
|
|
65
|
-
</p>
|
|
66
|
-
</div>
|
|
67
|
-
)
|
|
68
|
-
}
|
package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { ThemeProvider } from 'next-themes'
|
|
5
|
-
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
|
-
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
-
import { AppThemeProvider } from './theme-provider'
|
|
8
|
-
|
|
9
|
-
interface AppProvidersProps {
|
|
10
|
-
children: React.ReactNode
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function AppProviders({ children }: AppProvidersProps) {
|
|
14
|
-
return (
|
|
15
|
-
<ThemeProvider
|
|
16
|
-
attribute="class"
|
|
17
|
-
defaultTheme="{{defaultTheme}}"
|
|
18
|
-
enableSystem
|
|
19
|
-
disableTransitionOnChange
|
|
20
|
-
storageKey="{{packageName}}-theme"
|
|
21
|
-
>
|
|
22
|
-
<AuthProvider>
|
|
23
|
-
<PaymentsProvider>
|
|
24
|
-
<AppThemeProvider themeColor="{{themeColor}}">
|
|
25
|
-
{children}
|
|
26
|
-
</AppThemeProvider>
|
|
27
|
-
</PaymentsProvider>
|
|
28
|
-
</AuthProvider>
|
|
29
|
-
</ThemeProvider>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
package/dist/templates/web/ui-auth-payments/template/src/components/providers/theme-provider.tsx
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React, { createContext, useContext, useEffect } from 'react'
|
|
4
|
-
|
|
5
|
-
interface ThemeContextType {
|
|
6
|
-
themeColor: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const ThemeContext = createContext<ThemeContextType | undefined>(undefined)
|
|
10
|
-
|
|
11
|
-
interface AppThemeProviderProps {
|
|
12
|
-
children: React.ReactNode
|
|
13
|
-
themeColor: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const THEME_COLORS = {
|
|
17
|
-
blue: {
|
|
18
|
-
primary: '221.2 83.2% 53.3%',
|
|
19
|
-
primaryForeground: '210 40% 98%',
|
|
20
|
-
secondary: '210 40% 96%',
|
|
21
|
-
accent: '210 40% 96%',
|
|
22
|
-
ring: '221.2 83.2% 53.3%',
|
|
23
|
-
},
|
|
24
|
-
green: {
|
|
25
|
-
primary: '142.1 76.2% 36.3%',
|
|
26
|
-
primaryForeground: '355.7 100% 97.3%',
|
|
27
|
-
secondary: '138.5 76.2% 96.7%',
|
|
28
|
-
accent: '138.5 76.2% 96.7%',
|
|
29
|
-
ring: '142.1 76.2% 36.3%',
|
|
30
|
-
},
|
|
31
|
-
purple: {
|
|
32
|
-
primary: '262.1 83.3% 57.8%',
|
|
33
|
-
primaryForeground: '210 40% 98%',
|
|
34
|
-
secondary: '270 3.18% 96.5%',
|
|
35
|
-
accent: '270 3.18% 96.5%',
|
|
36
|
-
ring: '262.1 83.3% 57.8%',
|
|
37
|
-
},
|
|
38
|
-
orange: {
|
|
39
|
-
primary: '24.6 95% 53.1%',
|
|
40
|
-
primaryForeground: '60 9.1% 97.8%',
|
|
41
|
-
secondary: '60 4.8% 95.9%',
|
|
42
|
-
accent: '60 4.8% 95.9%',
|
|
43
|
-
ring: '24.6 95% 53.1%',
|
|
44
|
-
},
|
|
45
|
-
red: {
|
|
46
|
-
primary: '0 72.2% 50.6%',
|
|
47
|
-
primaryForeground: '0 85.7% 97.3%',
|
|
48
|
-
secondary: '0 0% 96.3%',
|
|
49
|
-
accent: '0 0% 96.3%',
|
|
50
|
-
ring: '0 72.2% 50.6%',
|
|
51
|
-
},
|
|
52
|
-
slate: {
|
|
53
|
-
primary: '215 27.9% 16.9%',
|
|
54
|
-
primaryForeground: '0 0% 98%',
|
|
55
|
-
secondary: '210 40% 96%',
|
|
56
|
-
accent: '210 40% 96%',
|
|
57
|
-
ring: '215 27.9% 16.9%',
|
|
58
|
-
},
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function AppThemeProvider({ children, themeColor }: AppThemeProviderProps) {
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
const colorScheme = THEME_COLORS[themeColor as keyof typeof THEME_COLORS] || THEME_COLORS.blue
|
|
64
|
-
|
|
65
|
-
// Apply theme colors to CSS custom properties
|
|
66
|
-
const root = document.documentElement
|
|
67
|
-
root.style.setProperty('--primary', colorScheme.primary)
|
|
68
|
-
root.style.setProperty('--primary-foreground', colorScheme.primaryForeground)
|
|
69
|
-
root.style.setProperty('--secondary', colorScheme.secondary)
|
|
70
|
-
root.style.setProperty('--accent', colorScheme.accent)
|
|
71
|
-
root.style.setProperty('--ring', colorScheme.ring)
|
|
72
|
-
|
|
73
|
-
// Store theme color preference
|
|
74
|
-
localStorage.setItem('{{packageName}}-theme-color', themeColor)
|
|
75
|
-
}, [themeColor])
|
|
76
|
-
|
|
77
|
-
const contextValue: ThemeContextType = {
|
|
78
|
-
themeColor,
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<ThemeContext.Provider value={contextValue}>
|
|
83
|
-
{children}
|
|
84
|
-
</ThemeContext.Provider>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function useAppTheme() {
|
|
89
|
-
const context = useContext(ThemeContext)
|
|
90
|
-
if (context === undefined) {
|
|
91
|
-
throw new Error('useAppTheme must be used within a AppThemeProvider')
|
|
92
|
-
}
|
|
93
|
-
return context
|
|
94
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
interface FooterProps {
|
|
6
|
-
className?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function Footer({ className = '' }: FooterProps) {
|
|
10
|
-
return (
|
|
11
|
-
<footer className={`border-t bg-background py-4 ${className}`}>
|
|
12
|
-
<div className="container mx-auto px-4">
|
|
13
|
-
<div className="flex flex-col sm:flex-row justify-between items-center gap-4 text-sm text-muted-foreground">
|
|
14
|
-
<div className="flex items-center gap-2">
|
|
15
|
-
<span>© {new Date().getFullYear()} {{titleCaseName}}</span>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div className="flex items-center gap-2 text-xs">
|
|
19
|
-
<span>Generated with</span>
|
|
20
|
-
<a
|
|
21
|
-
href="https://docs.digilogiclabs.com"
|
|
22
|
-
target="_blank"
|
|
23
|
-
rel="noopener noreferrer"
|
|
24
|
-
className="hover:text-foreground transition-colors"
|
|
25
|
-
>
|
|
26
|
-
Digi Logic Labs
|
|
27
|
-
</a>
|
|
28
|
-
<span className="text-muted-foreground/60">
|
|
29
|
-
• UI v{{uiVersion}} • Auth v{{authVersion}} • Payments v{{paymentsVersion}} • {{generatedDate}}
|
|
30
|
-
</span>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</footer>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
|
-
import { LogOut, CreditCard } from 'lucide-react';
|
|
6
|
-
import { useAuth } from '@digilogiclabs/saas-factory-auth';
|
|
7
|
-
import { ThemeToggle } from '../ui/theme-toggle';
|
|
8
|
-
|
|
9
|
-
export function Header() {
|
|
10
|
-
const { user, signOut } = useAuth();
|
|
11
|
-
|
|
12
|
-
const handleSignOut = async () => {
|
|
13
|
-
try {
|
|
14
|
-
await signOut();
|
|
15
|
-
} catch (error) {
|
|
16
|
-
console.error('Sign out error:', error);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<header className="bg-white dark:bg-gray-800 shadow-md">
|
|
22
|
-
<div className="container mx-auto px-4 py-4 flex justify-between items-center">
|
|
23
|
-
<Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
|
|
24
|
-
{{titleCaseName}}
|
|
25
|
-
</Link>
|
|
26
|
-
<nav className="flex items-center gap-4">
|
|
27
|
-
<ThemeToggle />
|
|
28
|
-
{user ? (
|
|
29
|
-
<>
|
|
30
|
-
<Link href="/dashboard" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
|
|
31
|
-
Dashboard
|
|
32
|
-
</Link>
|
|
33
|
-
<Link href="/billing" className="flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
|
|
34
|
-
<CreditCard className="h-4 w-4" />
|
|
35
|
-
Billing
|
|
36
|
-
</Link>
|
|
37
|
-
<button
|
|
38
|
-
onClick={handleSignOut}
|
|
39
|
-
className="p-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"
|
|
40
|
-
>
|
|
41
|
-
<LogOut className="h-5 w-5" />
|
|
42
|
-
</button>
|
|
43
|
-
</>
|
|
44
|
-
) : (
|
|
45
|
-
<>
|
|
46
|
-
<Link href="/login" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
|
|
47
|
-
Login
|
|
48
|
-
</Link>
|
|
49
|
-
<Link
|
|
50
|
-
href="/signup"
|
|
51
|
-
className="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
|
|
52
|
-
>
|
|
53
|
-
Sign Up
|
|
54
|
-
</Link>
|
|
55
|
-
</>
|
|
56
|
-
)}
|
|
57
|
-
</nav>
|
|
58
|
-
</div>
|
|
59
|
-
</header>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const badgeVariants = cva(
|
|
6
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
7
|
-
{
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default:
|
|
11
|
-
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
12
|
-
secondary:
|
|
13
|
-
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
14
|
-
destructive:
|
|
15
|
-
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
16
|
-
outline: "text-foreground",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
defaultVariants: {
|
|
20
|
-
variant: "default",
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
export interface BadgeProps
|
|
26
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
27
|
-
VariantProps<typeof badgeVariants> {}
|
|
28
|
-
|
|
29
|
-
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
30
|
-
return (
|
|
31
|
-
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { Badge, badgeVariants }
|
|
36
|
-
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Moon, Sun } from "lucide-react"
|
|
5
|
-
import { useTheme } from "next-themes"
|
|
6
|
-
|
|
7
|
-
import { Button } from "@digilogiclabs/saas-factory-ui"
|
|
8
|
-
|
|
9
|
-
export function ThemeToggle() {
|
|
10
|
-
const { theme, setTheme } = useTheme()
|
|
11
|
-
|
|
12
|
-
const toggleTheme = () => {
|
|
13
|
-
if (theme === 'light') {
|
|
14
|
-
setTheme('dark')
|
|
15
|
-
} else if (theme === 'dark') {
|
|
16
|
-
setTheme('system')
|
|
17
|
-
} else {
|
|
18
|
-
setTheme('light')
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Button
|
|
24
|
-
variant="outline"
|
|
25
|
-
size="icon"
|
|
26
|
-
onClick={toggleTheme}
|
|
27
|
-
className="h-9 w-9"
|
|
28
|
-
>
|
|
29
|
-
<Sun className="h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
|
|
30
|
-
<Moon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
|
|
31
|
-
<span className="sr-only">Toggle theme</span>
|
|
32
|
-
</Button>
|
|
33
|
-
)
|
|
34
|
-
}
|