From 14148ad5dccfe7e61e2873fc45005862a567ac0e Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Thu, 4 Jun 2026 16:51:57 -0500 Subject: [PATCH] refactor(share-modal): tokenize interior palette (Brief 2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brief 2 of cleanup-card-item-list-and-share-modal-palette convoy. Pure palette token sweep across the interior of components/ShareModal.js. The modal SURFACE was already correct (delegates to ) and the user-search-dropdown + email-invite-card areas were updated in PR #117 — this brief addresses the residual interior rows. Migrations: Public Access section (L139-167): - Outer container: `border` (default Tailwind 1px) → tokenized border: '1px solid var(--border)' + backgroundColor: 'var(--bg-secondary)'. rounded-lg → rounded-xl. - Link icon: `text-gray-400` → `var(--text-secondary)`. - Heading: `text-gray-900` → `var(--text-primary)`. - Sub-text: `text-gray-500` → `var(--text-secondary)`. - Toggle: `bg-blue-600` (on) / `bg-gray-200` (off) → `var(--accent-ember)` / `var(--bg-tertiary)` + 1px border for visible delta when off. - Inner span (handle): `bg-white` → kept literal `rgb(255, 255, 255)` for theme-independent white contrast on the ember toggle. Add People input (L172-183): - `border-gray-300` + `focus:ring-blue-500` → `var(--input-border)` + `var(--input-bg)` + `--tw-ring-color: var(--accent-ember)`. - Search icon: `text-gray-400` → `var(--text-secondary)`. - rounded-lg → rounded-xl. Current Permissions section (L253-340): - Section paragraph: `text-gray-700` → `var(--text-secondary)`. - Current-user row: `bg-gray-50 rounded-lg` → `var(--bg-secondary)` + `var(--border)` + `rounded-xl`. - Current-user avatar circle: `bg-purple-600` → `linear-gradient(135deg, var(--accent-ember), var(--accent-flame))` (matches the UserMenu avatar gradient from TopSearchBar). - Owner badge: `bg-white rounded border` → `var(--bg-tertiary)` + `var(--text-secondary)` + 1px ember border + rounded-xl. - Invited-user row: `border rounded-lg` → `var(--border)` + `var(--bg-secondary)` + rounded-xl. - Invited-user avatar: `bg-gray-400` → `var(--bg-tertiary)` + 1px ember border + `var(--text-primary)` for the letter. - Role badge: `bg-gray-100 rounded` → `var(--bg-tertiary)` + `var(--text-secondary)` + rounded-xl. - All `text-gray-{500,700,900}` → `var(--text-primary)` / `var(--text-secondary)` per role. Share Link section (L305-340): - Readonly input: `bg-gray-50 border-gray-300 text-gray-600 rounded-lg` → `var(--input-bg)` + `var(--input-border)` + `var(--text-primary)` + rounded-xl. - Copy-link button: replaced raw -

+

This list will be available in the community.

@@ -175,9 +199,21 @@ export default function ShareModal({ placeholder="Add emails or people" value={searchQuery} onChange={(e) => handleSearch(e.target.value)} - className="w-full px-4 py-3 pl-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent" + className="w-full px-4 py-3 pl-10 rounded-xl focus:ring-2 focus:border-transparent" + style={{ + border: '1px solid var(--input-border)', + backgroundColor: 'var(--input-bg)', + color: 'var(--text-primary)', + '--tw-ring-color': 'var(--accent-ember)', + }} /> - + @@ -253,27 +289,52 @@ export default function ShareModal({ {/* Current Permissions */}
-

+

Only those invited can view or collaborate on this list.

- +
{/* Current User */} {currentUser && ( -
+
-
+
{currentUser.email.charAt(0).toUpperCase()}
-
+
{currentUser.email} (You)
- + Owner
@@ -281,20 +342,45 @@ export default function ShareModal({ {/* Invited Users */} {invitedUsers.map((permission) => ( -
+
-
- +
+ {permission.user_email?.charAt(0).toUpperCase() || '?'}
-
+
{permission.user_email || 'Unknown User'}
- + {permission.role === 'editor' ? 'Collaborator' : 'Viewer'}
@@ -309,18 +395,29 @@ export default function ShareModal({ type="text" value={window.location.href} readOnly - className="flex-1 px-3 py-2 bg-gray-50 border border-gray-300 rounded-lg text-sm text-gray-600" + className="flex-1 px-3 py-2 rounded-xl text-sm" + style={{ + backgroundColor: 'var(--input-bg)', + border: '1px solid var(--input-border)', + color: 'var(--text-primary)', + }} /> - + {copySuccess ? ( + + Copied! + + ) : ( + + )}
@@ -338,7 +435,10 @@ export default function ShareModal({ className="flex flex-col items-center p-3 rounded-xl border nav-item-hover transition-colors" style={{ borderColor: 'var(--border)' }} > -
+
{social.icon === 'twitter' && ( @@ -360,7 +460,12 @@ export default function ShareModal({ )}
- {social.name} + + {social.name} + ))}
-- 2.45.2