@explita/daily-toolset-form
Version:
A lightweight form toolkit for React built with developer ergonomics in mind. Includes a flexible Form component, useForm, useField, and useFormContext hooks for managing form state and validation with ease. Designed to simplify complex forms while remain
2 lines (1 loc) • 979 B
TypeScript
export declare const css = ".explita-form .form-label {\n display: flex;\n align-items: center;\n gap: 0.5rem; /* gap-2 */\n font-size: 0.875rem; /* text-sm */\n line-height: 1.25rem; /* leading-none */\n font-weight: 500; /* font-medium */\n user-select: none; /* select-none */\n}\n\n/* Disabled group */\n.explita-form .group[data-disabled=\"true\"] .form-label {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Disabled peer */\n.explita-form .peer:disabled ~ .form-label {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Required field */\n.explita-form .form-label[data-required=\"true\"]::after {\n content: \"*\";\n color: #ef4444; /* Tailwind red-500 */\n font-size: 1rem; /* text-base */\n margin-left: -0.25rem; /* ml-1 */\n}\n\n/* Error state */\n.explita-form .form-label[data-error=\"true\"] {\n color: #ef4444; /* red-500 */\n}\n\n/* Input error state */\n.explita-form [data-input-error=\"true\"] {\n border-color: #ef4444; /* red-500 */\n}\n";