Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Forms/EmailInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public function id(string $id): self
return $this;
}

/**
* Sets properties on this component's outermost div, not the input.
*/
public function wrapperProps(string ...$properties): self
{
$this->wrapperProperties = array_values($properties);
Expand Down
7 changes: 7 additions & 0 deletions src/Forms/Fieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class Fieldset implements Stringable
*/
private array $elements = [];

/**
* Renders one group warning; callers must wire aria-invalid and
* aria-describedby on member controls (see Select's radio/checkbox modes).
*/
public static function create(
string|Stringable $label,
string|Stringable $name,
Expand All @@ -54,6 +58,9 @@ public function elements(string|Stringable ...$elements): self
return $this;
}

/**
* Sets properties on this component's outermost element: the fieldset.
*/
public function wrapperProps(string ...$properties): self
{
$this->wrapperProperties = $properties;
Expand Down
3 changes: 3 additions & 0 deletions src/Forms/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public function id(string $id): self
return $this;
}

/**
* Sets properties on this component's outermost div, not the input.
*/
public function wrapperProps(string ...$properties): self
{
$this->wrapperProperties = array_values($properties);
Expand Down
4 changes: 4 additions & 0 deletions src/Forms/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public function id(string $id): self
return $this;
}

/**
* Sets properties on the outermost div in dropdown/multiple modes,
* or the fieldset in radio/checkbox modes, not on member controls.
*/
public function wrapperProps(string ...$properties): self
{
$this->wrapperProperties = array_values($properties);
Expand Down
3 changes: 3 additions & 0 deletions src/Forms/TextArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public function id(string $id): self
return $this;
}

/**
* Sets properties on this component's outermost div, not the textarea.
*/
public function wrapperProps(string ...$properties): self
{
$this->wrapperProperties = array_values($properties);
Expand Down
3 changes: 3 additions & 0 deletions src/Forms/TextInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public function id(string $id): self
return $this;
}

/**
* Sets properties on this component's outermost div, not the input.
*/
public function wrapperProps(string ...$properties): self
{
$this->wrapperProperties = array_values($properties);
Expand Down
Loading