Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/components/builder/components/LayerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,20 @@ useEffect(() => {
return (
<SidebarLayout bodyClassName="px-2 pt-2 pb-8"
header={
<div className="flex bg-[#111113] rounded-lg p-0.5 border border-white/6">
<div
className="flex w-full rounded-xl p-0.5 shadow-lg shadow-black/40"
style={{
background: 'linear-gradient(120deg, rgba(196,124,46,0.08), rgba(18,16,13,0.9))',
border: '1px solid rgba(196,124,46,0.15)',
boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.04)',
}}
>
{(["source", "layers"] as const).map(tab => (
<button key={tab} onClick={() => setActiveTab(tab)}
className={clsx("flex-1 flex items-center justify-center gap-1.5 py-2 rounded-md text-[11px] font-medium transition-all duration-150 outline-none select-none capitalize",
localMode === tab ? "bg-[#1c1c1f] text-zinc-100 shadow-sm" : "text-zinc-500 hover:text-zinc-300"
className={clsx("flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg text-[11px] font-medium transition-all duration-150 outline-none select-none capitalize",
localMode === tab
? "bg-[#1c1c1f] text-[#F0E6CC] shadow-[0_12px_28px_rgba(0,0,0,0.35)] ring-1 ring-[#C47C2E]/35"
: "text-zinc-500 hover:text-zinc-300"
)}>
{tab === "source" ? <Film size={11} strokeWidth={2} /> : <Layers size={11} strokeWidth={2} />}
{tab.charAt(0).toUpperCase() + tab.slice(1)}
Expand Down
58 changes: 50 additions & 8 deletions src/components/builder/components/SidebarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,62 @@ interface Props {
const SidebarLayout: React.FC<Props> = ({ header, children, bodyClassName, className }) => {
return (
<div
className={clsx('flex flex-col h-full min-h-0', className)}
style={{ background: 'var(--film-dark)' }}
className={clsx('flex flex-col h-full min-h-0 relative overflow-hidden', className)}
style={{
background: 'linear-gradient(180deg, rgba(10,9,7,0.95), rgba(7,7,6,0.96))',
boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 48px rgba(0,0,0,0.55)',
borderLeft: '1px solid rgba(196,124,46,0.08)',
borderRight: '1px solid rgba(196,124,46,0.08)',
backdropFilter: 'blur(12px) saturate(1.05)',
}}
>
<div
className="shrink-0 px-3 pt-3 pb-2 z-10"
aria-hidden
className="absolute inset-0 pointer-events-none"
style={{
background: 'var(--film-dark)',
borderBottom: '1px solid rgba(196,124,46,0.08)',
background: 'radial-gradient(circle at 20% 10%, rgba(196,124,46,0.08), transparent 36%), radial-gradient(circle at 80% 0%, rgba(196,124,46,0.06), transparent 42%)',
opacity: 0.8,
}}
/>

<div
className="shrink-0 px-3 pt-3 pb-2 z-10 relative"
style={{
background: 'linear-gradient(180deg, rgba(18,16,13,0.96), rgba(12,11,9,0.92))',
borderBottom: '1px solid rgba(196,124,46,0.12)',
boxShadow: '0 10px 28px rgba(0,0,0,0.45)',
}}
>
{header}
<div
aria-hidden
className="absolute inset-x-0 top-0 h-px"
style={{ background: 'linear-gradient(90deg, transparent, rgba(196,124,46,0.3), transparent)' }}
/>
<div
aria-hidden
className="absolute inset-x-3 top-3 rounded-full h-7 blur-xl opacity-30"
style={{ background: 'radial-gradient(circle, rgba(196,124,46,0.25), transparent 60%)' }}
/>
<div className="relative z-10">
{header}
</div>
</div>
<div className={clsx('flex-1 min-h-0 overflow-y-auto overscroll-contain custom-scrollbar', bodyClassName)}>
{children}

<div
className={clsx('flex-1 min-h-0 overflow-y-auto overscroll-contain custom-scrollbar relative', bodyClassName)}
style={{
background: 'radial-gradient(circle at 50% -10%, rgba(196,124,46,0.05), transparent 55%)',
paddingBottom: 12,
}}
>
<div
aria-hidden
className="absolute inset-x-0 top-0 h-3 pointer-events-none"
style={{ background: 'linear-gradient(180deg, rgba(255,255,255,0.03), transparent)' }}
/>
<div className="relative z-10">
{children}
</div>
</div>
</div>
);
Expand Down
17 changes: 14 additions & 3 deletions src/components/builder/components/layout/Inspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,30 @@ const Inspector: React.FC<Props> = memo(({ config, setConfig }) => {
return (
<SidebarLayout
header={
<div className="flex bg-[#111113] rounded-lg p-0.5 border border-white/6">
<div
className="flex w-full rounded-xl p-0.5 shadow-lg shadow-black/40"
style={{
background: 'linear-gradient(120deg, rgba(196,124,46,0.08), rgba(18,16,13,0.9))',
border: '1px solid rgba(196,124,46,0.15)',
boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.04)',
}}
>
<button
onClick={() => { clearSelection(); setActiveTab('canvas'); }}
aria-pressed={currentMode === 'global'}
className={clsx('flex-1 flex items-center justify-center gap-1.5 py-1.5 rounded-md text-[11px] font-medium transition-all duration-150 outline-none select-none', currentMode === 'global' ? 'bg-[#1c1c1f] text-zinc-100 shadow-sm' : 'text-zinc-600 hover:text-zinc-400')}
className={clsx('flex-1 flex items-center justify-center gap-1.5 py-1.5 rounded-lg text-[11px] font-medium transition-all duration-150 outline-none select-none', currentMode === 'global'
? 'bg-[#1c1c1f] text-[#F0E6CC] shadow-[0_12px_28px_rgba(0,0,0,0.35)] ring-1 ring-[#C47C2E]/35'
: 'text-zinc-600 hover:text-zinc-400')}
>
<Globe size={11} strokeWidth={2} />
Canvas
</button>
<button
onClick={() => setActiveTab('badge')}
aria-pressed={currentMode === 'selection'}
className={clsx('flex-1 flex items-center justify-center gap-1.5 py-1.5 rounded-md text-[11px] font-medium transition-all duration-150 outline-none select-none', currentMode === 'selection' ? 'bg-[#1c1c1f] text-zinc-100 shadow-sm' : 'text-zinc-600 hover:text-zinc-400')}
className={clsx('flex-1 flex items-center justify-center gap-1.5 py-1.5 rounded-lg text-[11px] font-medium transition-all duration-150 outline-none select-none', currentMode === 'selection'
? 'bg-[#1c1c1f] text-[#F0E6CC] shadow-[0_12px_28px_rgba(0,0,0,0.35)] ring-1 ring-[#C47C2E]/35'
: 'text-zinc-600 hover:text-zinc-400')}
>
<MousePointer2 size={11} strokeWidth={2} />
{selCount > 0 ? `${selCount} selected` : 'Selection'}
Expand Down
Loading