1- "use client" ;
2-
3- import { useEffect } from "react" ;
4- import { X , Settings } from "lucide-react" ;
5- import { createPortal } from "react-dom" ;
6- import { cn , isDemoMode } from "@/lib/utils" ;
7- import { useSettingsModal } from "@/hooks/use-settings-modal" ;
8- import { useTranslations } from "next-intl" ;
9- import SelectContainerWidth from "@/components/ui/select-container-width" ;
10- import SelectPaginationType from "@/components/ui/select-pagination-type" ;
11- import SelectDatabaseMode from "@/components/ui/select-database-mode" ;
12- import SelectCheckoutProvider from "@/components/ui/select-checkout-provider" ;
13- import { DatabaseStatusWarning } from "@/components/ui/database-status-warning" ;
14- import { useFocusManagement } from "@/components/ui/accessibility" ;
1+ 'use client' ;
2+
3+ import { useEffect } from 'react' ;
4+ import { X , Settings } from 'lucide-react' ;
5+ import { createPortal } from 'react-dom' ;
6+ import { cn , isDemoMode } from '@/lib/utils' ;
7+ import { useSettingsModal } from '@/hooks/use-settings-modal' ;
8+ import { useTranslations } from 'next-intl' ;
9+ import SelectLayout from '@/components/ui/select-layout' ;
10+ import SelectContainerWidth from '@/components/ui/select-container-width' ;
11+ import SelectPaginationType from '@/components/ui/select-pagination-type' ;
12+ import SelectDatabaseMode from '@/components/ui/select-database-mode' ;
13+ import SelectCheckoutProvider from '@/components/ui/select-checkout-provider' ;
14+ import { DatabaseStatusWarning } from '@/components/ui/database-status-warning' ;
15+ import { useFocusManagement } from '@/components/ui/accessibility' ;
1516
1617const BACKDROP_CLASSES = cn (
17- " fixed inset-0" ,
18- " bg-gradient-to-br from-black/50 via-black/60 to-black/70" ,
19- " dark:bg-gradient-to-br dark:from-black/70 dark:via-black/80 dark:to-black/90" ,
20- " backdrop-blur-2xl backdrop-saturate-150" ,
21- " z-[9998]" ,
22- " transition-all duration-300 ease-out"
18+ ' fixed inset-0' ,
19+ ' bg-gradient-to-br from-black/50 via-black/60 to-black/70' ,
20+ ' dark:bg-gradient-to-br dark:from-black/70 dark:via-black/80 dark:to-black/90' ,
21+ ' backdrop-blur-2xl backdrop-saturate-150' ,
22+ ' z-[9998]' ,
23+ ' transition-all duration-300 ease-out'
2324) ;
2425
2526const MODAL_CLASSES = cn (
26- " fixed top-1/2 left-1/2" ,
27- " transform -translate-x-1/2 -translate-y-1/2" ,
28- " w-full max-w-2xl" ,
29- " max-h-[90vh]" ,
30- " bg-white/70 dark:bg-gray-900/70" ,
31- " backdrop-blur-2xl backdrop-saturate-200" ,
32- " border border-white/20 dark:border-white/10" ,
33- " ring-1 ring-theme-primary-500/10 dark:ring-theme-primary-400/10" ,
34- " rounded-2xl shadow-2xl shadow-black/20 dark:shadow-black/60" ,
35- " z-[9999]" ,
36- " overflow-visible" ,
37- " transition-all duration-300 ease-out" ,
38- " animate-fade-in-up"
27+ ' fixed top-1/2 left-1/2' ,
28+ ' transform -translate-x-1/2 -translate-y-1/2' ,
29+ ' w-full max-w-2xl' ,
30+ ' max-h-[90vh]' ,
31+ ' bg-white/70 dark:bg-gray-900/70' ,
32+ ' backdrop-blur-2xl backdrop-saturate-200' ,
33+ ' border border-white/20 dark:border-white/10' ,
34+ ' ring-1 ring-theme-primary-500/10 dark:ring-theme-primary-400/10' ,
35+ ' rounded-2xl shadow-2xl shadow-black/20 dark:shadow-black/60' ,
36+ ' z-[9999]' ,
37+ ' overflow-visible' ,
38+ ' transition-all duration-300 ease-out' ,
39+ ' animate-fade-in-up'
3940) ;
4041
41- const DIVIDER_CLASSES = cn ( " border-t border-gray-200 dark:border-gray-700" ) ;
42+ const DIVIDER_CLASSES = cn ( ' border-t border-gray-200 dark:border-gray-700' ) ;
4243
4344export function SettingsModal ( ) {
4445 const { isOpen, closeModal } = useSettingsModal ( ) ;
45- const t = useTranslations ( " settings" ) ;
46+ const t = useTranslations ( ' settings' ) ;
4647 const { focusRef, setFocus, trapFocus } = useFocusManagement ( ) ;
4748 const isDemo = isDemoMode ( ) ;
4849
@@ -54,15 +55,15 @@ export function SettingsModal() {
5455
5556 // Add keyboard listener for focus trap
5657 const handleKeyDown = ( e : KeyboardEvent ) => trapFocus ( e ) ;
57- document . addEventListener ( " keydown" , handleKeyDown ) ;
58+ document . addEventListener ( ' keydown' , handleKeyDown ) ;
5859
5960 return ( ) => {
60- document . removeEventListener ( " keydown" , handleKeyDown ) ;
61+ document . removeEventListener ( ' keydown' , handleKeyDown ) ;
6162 } ;
6263 }
6364 } , [ isOpen , setFocus , trapFocus ] ) ;
6465
65- if ( ! isOpen || typeof window === " undefined" ) {
66+ if ( ! isOpen || typeof window === ' undefined' ) {
6667 return null ;
6768 }
6869
@@ -81,36 +82,43 @@ export function SettingsModal() {
8182 tabIndex = { - 1 }
8283 >
8384 { /* Modal Header */ }
84- < div className = { cn (
85- "flex items-center justify-between px-6 py-4" ,
86- "border-b border-gray-200 dark:border-gray-700" ,
87- "bg-gradient-to-r from-gray-50/50 to-white" ,
88- "dark:from-gray-800/50 dark:to-gray-900/50" ,
89- "shadow-sm"
90- ) } >
85+ < div
86+ className = { cn (
87+ 'flex items-center justify-between px-6 py-4' ,
88+ 'border-b border-gray-200 dark:border-gray-700' ,
89+ 'bg-gradient-to-r from-gray-50/50 to-white' ,
90+ 'dark:from-gray-800/50 dark:to-gray-900/50' ,
91+ 'shadow-sm'
92+ ) }
93+ >
9194 < div className = "flex items-center gap-3" >
92- < div className = { cn (
93- "p-2 rounded-lg" ,
94- "bg-gradient-to-br from-theme-primary-100 to-theme-primary-200" ,
95- "dark:from-theme-primary-900/30 dark:to-theme-primary-800/30" ,
96- "border border-theme-primary-300/50 dark:border-theme-primary-600/50"
97- ) } >
95+ < div
96+ className = { cn (
97+ 'p-2 rounded-lg' ,
98+ 'bg-gradient-to-br from-theme-primary-100 to-theme-primary-200' ,
99+ 'dark:from-theme-primary-900/30 dark:to-theme-primary-800/30' ,
100+ 'border border-theme-primary-300/50 dark:border-theme-primary-600/50'
101+ ) }
102+ >
98103 < Settings className = "h-5 w-5 text-theme-primary-600 dark:text-theme-primary-400" />
99104 </ div >
100- < h2 id = "settings-title" className = "text-2xl font-bold tracking-tight text-gray-900 dark:text-white" >
101- { t ( "SETTINGS" ) }
105+ < h2
106+ id = "settings-title"
107+ className = "text-2xl font-bold tracking-tight text-gray-900 dark:text-white"
108+ >
109+ { t ( 'SETTINGS' ) }
102110 </ h2 >
103111 </ div >
104112 < button
105113 onClick = { closeModal }
106114 className = { cn (
107- " p-2 rounded-lg transition-all duration-200" ,
108- " text-gray-500 hover:text-gray-700" ,
109- " dark:text-gray-400 dark:hover:text-gray-200" ,
110- " hover:bg-gray-100 dark:hover:bg-gray-800" ,
111- " hover:scale-110"
115+ ' p-2 rounded-lg transition-all duration-200' ,
116+ ' text-gray-500 hover:text-gray-700' ,
117+ ' dark:text-gray-400 dark:hover:text-gray-200' ,
118+ ' hover:bg-gray-100 dark:hover:bg-gray-800' ,
119+ ' hover:scale-110'
112120 ) }
113- aria-label = { t ( " CLOSE_SETTINGS" ) }
121+ aria-label = { t ( ' CLOSE_SETTINGS' ) }
114122 type = "button"
115123 >
116124 < X className = "h-5 w-5" />
@@ -119,6 +127,9 @@ export function SettingsModal() {
119127
120128 { /* Modal Content */ }
121129 < div className = "px-6 py-8 space-y-5" >
130+ { /* Layout Section - Always show */ }
131+ < SelectLayout />
132+
122133 { /* Container Width Section - Always show */ }
123134 < SelectContainerWidth />
124135
0 commit comments