polish(pres_mgmt): dark-mode token cleanup on agree/consent forms + style guide update

Replace all forbidden hardcoded colors (red/green bg, text-red-*, text-green-*)
with Skeleton semantic tokens (error/success) so forms render correctly in dark mode.
Update agreement text wrapper from bg-white/dark:bg-gray-900 to bg-surface-50-950.
Document Flowbite Svelte Modal standard pattern (incl. note that classes.footer
padding override does not work in current version).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-23 17:56:29 -04:00
parent 7e255a7845
commit 7c129d3237
5 changed files with 78 additions and 32 deletions

View File

@@ -277,7 +277,47 @@ $events_sess.pres_mgmt.session_qr_url[$lq__obj.id] = result; // ← URL string
---
## 12. Known Issues & Workarounds
## 12. Flowbite Svelte Modal — Standard Usage
**LLM docs:** [flowbite-svelte.com/llm/components/modal.md](https://flowbite-svelte.com/llm/components/modal.md)
All consent/agreement modals in pres_mgmt use this pattern. Do not deviate.
```svelte
<Modal
title="Person Name — Agreement Title"
bind:open={$store.show_modal__thing}
autoclose={false}
placement="top-center"
size="lg">
<YourFormComponent {prop} />
{#snippet footer()}
<div class="w-full text-center">
<button
type="button"
onclick={() => ($store.show_modal__thing = false)}
class="btn preset-tonal-warning border border-warning-500">
<X size="1em" class="mr-1" />
Close
</button>
</div>
{/snippet}
</Modal>
```
**Rules:**
- `classes` prop, not deprecated `bodyClass`/`headerClass`/`footerClass`
- **`classes={{ footer: '...' }}` does NOT override footer padding** in the current Flowbite Svelte version — the default `p-4 md:p-5` applies regardless
- `autoclose={false}` — prevents backdrop click from dismissing the dialog
- `placement="top-center"` — keeps long forms near the top so content is immediately visible
- Scrolling inside a long body is **automatic** — never add `max-h` or `overflow` to the body
- The modal title should include the person's name so the inner component doesn't need a redundant `<h2>`
---
## 13. Known Issues & Workarounds
### `btn` + `preset-filled-*` resolves to transparent inside `card` components