- AGENT.md: §7 full capability catalog (need → import), §0b/§3/§6 on RenderForm, SiteProviders, createPageRoute, re-exported routes, plugin section fields, resolveLink/resolveNav - PROGRAMISTA §2.4, §2.7–2.8 rewritten; §6 items 28–33 (28: FormRenderer leaked the Emails tab) - forms, links, blocks, pages, consent, turnstile, notifications, seo, mcp, i18n, deployment docs - ipal-form: RenderForm block, formClasses, CustomForm example (FormRenderer template removed), seed template handles steps and option labels per language - ipal-nav, ipal-block, ipal-setup, ipal-upgrade, ipal-seo-check, ipal-consent-check, vibe.md - ipal-audit: re-export routes and SiteProviders satisfy the mandatory set; flags form-engine copies, project section fields / navigation, server entries in client components - test/docsConsistency: docs imports exist in code; every public export is documented - CHANGELOG 1.9.2 Co-Authored-By: Claude Opus 5.5 <[email protected]>
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
// src/components/forms/formClasses.ts — the ONLY place forms are styled. Every
|
|
// panel form (RenderForm / BuilderForm) uses it. Values = the project's design
|
|
// tokens (DESIGN.md); the plugin ships no styles. Delete keys you don't need.
|
|
import type { BuilderFormClassNames } from '@intecion/ipal-kit/client'
|
|
|
|
export const formClasses: BuilderFormClassNames = {
|
|
form: 'grid gap-6',
|
|
progress: 'text-sm text-muted', // "Krok 1 z 3"
|
|
step: 'grid gap-4',
|
|
stepTitle: 'text-h3 font-semibold',
|
|
stepDescription: 'text-muted',
|
|
fields: 'grid grid-cols-12 gap-4',
|
|
field: 'col-span-12',
|
|
fieldHalf: 'md:col-span-6', // width ≤ 50 in the panel
|
|
label: 'mb-1 block font-medium',
|
|
input: 'w-full rounded-md border border-border px-3 py-2',
|
|
textarea: 'w-full rounded-md border border-border px-3 py-2',
|
|
select: 'w-full rounded-md border border-border px-3 py-2',
|
|
checkboxLabel: 'flex items-start gap-2',
|
|
choices: 'grid gap-2', // radio / checkbox group <fieldset>
|
|
legend: 'mb-1 font-medium',
|
|
choice: 'flex items-center gap-2',
|
|
error: 'mt-1 text-sm text-danger',
|
|
formError: 'text-danger',
|
|
actions: 'flex gap-3',
|
|
back: 'btn btn-secondary', // same classes as Button.tsx variants
|
|
submit: 'btn btn-primary',
|
|
success: 'rounded-md bg-surface p-6',
|
|
}
|