Move allauth + auth UI to legacy/
allauth/ (44 files) is a django-allauth React UI — a separate concern from the Mizan protocol. Moved to legacy/ pending extraction into a standalone mizan-django-allauth package. Also moved to legacy/: - client/AuthContext.tsx — generic auth state from /me endpoint - client/RouterContext.tsx — framework-agnostic router adapter - client/routing.tsx — UserRoute/StaffRoute/AnonymousRoute guards - client/nextjs.tsx — Next.js router adapter for auth These are auth UI infrastructure, not Mizan protocol. The Mizan core only needs JWT for auth header selection (jwt/ stays — MizanProvider depends on useJWT() to decide between Bearer and session auth). Cleaned up re-exports in client/react.ts and vitest aliases. 33 React tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
122
legacy/allauth/styles/types.ts
Normal file
122
legacy/allauth/styles/types.ts
Normal file
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* Class names for styling the auth components.
|
||||
*
|
||||
* All properties are optional - components will use empty strings as defaults.
|
||||
* Pass your own CSS module or Tailwind classes to customize the appearance.
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
* // With CSS Modules
|
||||
* import styles from './auth.module.css'
|
||||
* <AllauthProvider classNames={styles}>
|
||||
*
|
||||
* // With Tailwind
|
||||
* const classNames = {
|
||||
* container: 'max-w-md mx-auto p-4',
|
||||
* card: 'bg-white rounded-lg shadow-lg p-6',
|
||||
* title: 'text-2xl font-bold',
|
||||
* // ...
|
||||
* }
|
||||
* <AllauthProvider classNames={classNames}>
|
||||
* ```
|
||||
*/
|
||||
export interface AuthClassNames {
|
||||
// Layout
|
||||
container?: string
|
||||
card?: string
|
||||
|
||||
// Typography
|
||||
title?: string
|
||||
subtitle?: string
|
||||
|
||||
// Form elements
|
||||
form?: string
|
||||
fieldsContainer?: string
|
||||
field?: string
|
||||
fieldLabel?: string
|
||||
fieldInput?: string
|
||||
fieldHelp?: string
|
||||
fieldError?: string
|
||||
required?: string
|
||||
|
||||
// Buttons
|
||||
submit?: string
|
||||
link?: string
|
||||
smallButton?: string
|
||||
smallButtonPrimary?: string
|
||||
smallButtonSecondary?: string
|
||||
smallButtonDanger?: string
|
||||
|
||||
// Feedback
|
||||
error?: string
|
||||
success?: string
|
||||
loading?: string
|
||||
spinner?: string
|
||||
emptyState?: string
|
||||
|
||||
// Divider
|
||||
divider?: string
|
||||
dividerText?: string
|
||||
|
||||
// Footer
|
||||
footer?: string
|
||||
|
||||
// Code input (for TOTP/login codes)
|
||||
codeInput?: string
|
||||
|
||||
// OAuth providers
|
||||
providersContainer?: string
|
||||
providerButtons?: string
|
||||
providerButton?: string
|
||||
|
||||
// Passkey
|
||||
passkeyContainer?: string
|
||||
passkeyButton?: string
|
||||
|
||||
// Settings page
|
||||
settingsContainer?: string
|
||||
settingsPageTitle?: string
|
||||
settingsCard?: string
|
||||
settingsSection?: string
|
||||
settingsSectionTitle?: string
|
||||
settingsSubtitle?: string
|
||||
settingsList?: string
|
||||
settingsItem?: string
|
||||
settingsItemInfo?: string
|
||||
settingsItemLabel?: string
|
||||
settingsItemMeta?: string
|
||||
settingsItemActions?: string
|
||||
|
||||
// Badges
|
||||
badge?: string
|
||||
badgePrimary?: string
|
||||
badgeUnverified?: string
|
||||
badgeSuccess?: string
|
||||
badgeDanger?: string
|
||||
|
||||
// Inline form
|
||||
inlineForm?: string
|
||||
|
||||
// TOTP setup
|
||||
totpSetup?: string
|
||||
qrCode?: string
|
||||
|
||||
// Recovery codes
|
||||
recoveryCodes?: string
|
||||
|
||||
// Form controls
|
||||
checkbox?: string
|
||||
radioGroup?: string
|
||||
radioItem?: string
|
||||
|
||||
// Navigation
|
||||
navLinks?: string
|
||||
navLink?: string
|
||||
navLinkActive?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty class names - used as default when no styles provided.
|
||||
* Components will render without any styling classes.
|
||||
*/
|
||||
export const emptyClassNames: AuthClassNames = {}
|
||||
Reference in New Issue
Block a user