feat: establish shared field and form foundation

This commit is contained in:
maoyingjie
2026-10-21 22:33:19 +08:00
parent 4f43789f60
commit 7f11afeaa6
35 changed files with 1677 additions and 165 deletions
@@ -0,0 +1,29 @@
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
* See third-party/HEROUI-LICENSE. Modified: hv- namespace. */
/* Field error styles */
.hv-field-error {
@apply h-0 px-1 text-xs wrap-break-word text-danger opacity-0 data-visible:h-auto data-visible:opacity-100;
/**
* Transitions
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
*/
transition:
opacity 150ms var(--ease-out),
height 350ms var(--ease-smooth);
@apply motion-reduce:transition-none;
}
/*
* Toggle fields (checkbox/switch): stack below the label like description.
* Disable collapsible height/opacity — those styles break flex-col content layout.
*/
.hv-checkbox > .hv-field-error,
.hv-checkbox > [data-slot="field-error"],
.hv-switch > .hv-field-error,
.hv-switch > [data-slot="field-error"],
.hv-radio > .hv-field-error,
.hv-radio > [data-slot="field-error"] {
@apply m-0 h-auto min-h-0 p-0 text-muted opacity-100;
transition: none;
}