prompt 9
This commit is contained in:
33
codex-prompt/prompt-9.txt
Normal file
33
codex-prompt/prompt-9.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
Crea /ui-kit come progetto Vite + Svelte per custom elements.
|
||||
|
||||
Requisiti:
|
||||
- build deve scrivere direttamente in ../web/static/ui:
|
||||
- ui.esm.js
|
||||
- ui.css (tokens+base)
|
||||
- src/index.ts registra:
|
||||
- ui-modal
|
||||
- ui-drop-down
|
||||
- ui-data-table-shell (driver htmx per aggiornare un target)
|
||||
|
||||
Componenti:
|
||||
1) UiModal.svelte:
|
||||
- <svelte:options customElement="ui-modal" />
|
||||
- attributi: title, open (boolean presence)
|
||||
- close on ESC, backdrop click
|
||||
- focus trap minimale
|
||||
- emette evento "ui:close" (bubbles+composed)
|
||||
- slot contenuto (HTMX swappa dentro al tag)
|
||||
|
||||
2) UiDropDown.svelte:
|
||||
- usa <option> del light DOM
|
||||
- espone value/name/placeholder/disabled
|
||||
- integra con form MVC (hidden input name=...)
|
||||
- emette change + ui:change
|
||||
|
||||
3) UiDataTableShell.svelte:
|
||||
- attributi: endpoint, target, page-size
|
||||
- input search -> usa htmx.ajax('GET', url, {target}) se disponibile
|
||||
- non renderizza tabella, solo toolbar
|
||||
|
||||
Aggiorna layout per includere /static/ui/ui.css e /static/ui/ui.esm.js con ?v={{.BuildHash}}.
|
||||
Aggiorna README con comandi npm.
|
||||
Reference in New Issue
Block a user