diff --git a/resources/boost/skills/livewire-material-development/SKILL.md b/resources/boost/skills/livewire-material-development/SKILL.md index c9c00ee7..74511648 100644 --- a/resources/boost/skills/livewire-material-development/SKILL.md +++ b/resources/boost/skills/livewire-material-development/SKILL.md @@ -555,6 +555,7 @@ M3 text fields. `variant`: `outlined` or `filled`; without it, `config('livewire - ``: `icon`, `icon-right`, `prefix`, `suffix`, `clearable`, `copyable` (copies the value, confirms with a snackbar), `counter`, `size` (`sm` 40px, `xs` 32px — for unlabelled toolbar controls; give them `aria-label`), `mono`. - ``: a reveal button; `icon`, `size`. - ``: grows from `rows` (3) to `max-rows`, then scrolls; `:autogrow="false"` for a fixed, hand-resizable one; `counter`. +- Width: M3 asks that a text field never span the full width of a large screen, so from `medium` (600px) every field stops at **40rem**; below that it fills its pane. A `max-w-*` class on the component narrows or widens it, and `full` (on ``, ``, ``) takes the bound off for a field that really is the width of its pane — a search row, an editor. ``'s bar carries M3's own bound, 720px. - `counter` (on `` and ``) puts M3's character counter at the end of the supporting-text row, beside the hint or the error: `n/max`, counted on every keystroke against the field's own `maxlength`, and in the error colour once the value is past it. It needs `maxlength` — without one there is nothing to count against and nothing is drawn. It is said as "Character count, 5/20" from a polite region a second after typing stops. - ``: native ``: `type`, `min`, `step`, + the supporting-text row; `full` lets the field span its pane past the 40rem M3 bounds it to + from `medium`. Every other attribute reaches the ``: `type`, `min`, `step`, `readonly`, `wire:model` and the rest. Errors are read from the bag under the `wire:model` name. The placeholder is a single space when none is given, because the label can only tell an @@ -23,6 +24,7 @@ 'clearable' => false, 'copyable' => false, 'counter' => false, + 'full' => false, 'size' => 'md', 'variant' => null, 'mono' => false, @@ -39,7 +41,7 @@ $max = $counter ? $attributes->get('maxlength') : null; @endphp - + except(['class', 'id', 'placeholder'])->merge(['type' => 'text']) }} id="{{ $id }}" diff --git a/resources/views/components/textarea.blade.php b/resources/views/components/textarea.blade.php index 84f5e5a9..29e3c4d1 100644 --- a/resources/views/components/textarea.blade.php +++ b/resources/views/components/textarea.blade.php @@ -3,8 +3,9 @@ It starts at `rows` lines (3) and grows with what is typed up to `max-rows`, then scrolls; `:autogrow="false"` keeps it at `rows` and lets it be resized by hand, vertically only, so a form's column never moves. The label rests on the first line rather than in the middle of the - box. `label`, `hint`, `variant`, and `counter` for M3's character counter against `maxlength`; - every other attribute reaches the `