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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user