/* * M3's text fields — the chrome every form control here shares: outlined (the default) and filled. * * The states are selectors rather than classes: whether the label rests in the field or floats is a * question about the control's value and focus, and `:has()` asks it without JavaScript, so it is * right before Alpine starts, in a test, and after a Livewire morph rewrites the value underneath. * * The outlined field's notch is MUI's technique: a `
` draws the outline and a hidden * ``, carrying the label at its floated size, cuts the gap the label sits in, so the gap is * right on any background. The filled field has no outline: a surface-container-highest box with * extra-small top corners and an active indicator line, the label floating inside it * (FilledTextFieldTokens / OutlinedTextFieldTokens, androidx Compose Material 3, Apache-2.0): 56px * tall, 16px padding, 24px icons 16px from the text, the label in body-small once it floats. * The `sm` (40px) and `xs` (32px) sizes are this package's, for an unlabelled field in a toolbar. * Disabled is on-surface at M3's 38% content and 12% container opacities (tokens/state.css); the * filled field's disabled container is on-surface at 4%, FilledTextFieldTokens' * DisabledContainerOpacity, which has no system token. * * Anatomy (resources/views/components/field.blade.php): * * [data-md-field] the whole thing; `class` from the call site lands here; * data-md-variant, data-md-size, data-md-invalid, data-md-floated, * data-md-mono, data-md-full, data-md-readonly * [data-md-field-box] the 56px row: icon, prefix, control, suffix, trailing * [data-md-field-icon] the leading icon * [data-md-field-affix] a prefix or suffix beside the value * [data-md-field-control] the ,