fix: widget modal — clean embed mode, better close button, backdrop blur

- ?embed=true renders widget without page wrapper (white bg, no padding)
- widget-loader.js appends &embed=true to modal URL automatically
- Close button is now inside dialog (not overlapping iframe), light style
- Backdrop blur effect, Escape key closes modal
- FAB: subtle translateY on hover instead of scale

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-12 01:28:23 +03:00
parent e614905ca1
commit 85ccd32574
2 changed files with 87 additions and 38 deletions

View File

@@ -75,6 +75,22 @@ export function BookingWidgetStandalonePage() {
}, [slug])
const isFullWidth = searchParams.get('width') === 'full'
const isEmbed = searchParams.get('embed') === 'true'
if (isEmbed) {
return (
<div className="w-full bg-white">
<WidgetPreview
settings={settings}
slug={slug}
realRooms={realRooms.length > 0 ? realRooms : undefined}
realCategories={realCategories.length > 0 ? realCategories : undefined}
realRentalObjects={realRentalObjects.length > 0 ? realRentalObjects : undefined}
paymentEnabled={paymentEnabled}
/>
</div>
)
}
return (
<div className={isFullWidth ? 'min-h-screen bg-slate-50' : 'min-h-screen bg-slate-50 flex items-start justify-center py-6 px-3'}>