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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- Enh #56: Add `Button` class for HTML `<button>` element with attributes and rendering capabilities (@terabytesoftw)
- Bug #57: Add tests for invalid argument exceptions in HTML attributes (@terabytesoftw)
- Enh #59: Add `Form` class for HTML `<form>` element with attributes and rendering capabilities (@terabytesoftw)
- Bug #61: Align tag enums and defaults provider with latest `ui-awesome/html-core` and `ui-awesome/html-interop` changes (@terabytesoftw)

## 0.3.0 March 31, 2024

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"ui-awesome/html-attribute": "^0.6@dev",
"ui-awesome/html-core": "^0.6@dev",
"ui-awesome/html-helper": "^0.7",
"ui-awesome/html-interop": "^0.3",
"ui-awesome/html-mixin": "^0.4"
"ui-awesome/html-interop": "^0.4@dev",
"ui-awesome/html-mixin": "dev-main as 0.4"
},
"require-dev": {
"infection/infection": "^0.27|^0.32",
Expand All @@ -26,7 +26,8 @@
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-strict-rules": "^2.0.3",
"phpunit/phpunit": "^10.5"
"phpunit/phpunit": "^10.5",
"ui-awesome/html-contracts": "^0.1@dev"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions src/Embedded/Img.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use UIAwesome\Html\Attribute\{HasCrossorigin, HasFetchpriority, HasSizes};
use UIAwesome\Html\Core\Element\BaseVoid;
use UIAwesome\Html\Embedded\Attribute\{HasElementtiming, HasIsmap};
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<img>` element for embedding images.
Expand Down Expand Up @@ -60,11 +60,11 @@ final class Img extends BaseVoid
/**
* Returns the tag enumeration for the `<img>` element.
*
* @return VoidInterface Tag enumeration instance for `<img>`.
* @return Voids Tag enumeration instance for `<img>`.
*
* {@see Voids} for valid void-level tags.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::IMG;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Flow/Div.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace UIAwesome\Html\Flow;

use UIAwesome\Html\Core\Element\BaseBlock;
use UIAwesome\Html\Interop\{Block, BlockInterface};
use UIAwesome\Html\Interop\Block;

/**
* Renders the HTML `<div>` element for grouping flow content.
Expand All @@ -29,11 +29,11 @@ final class Div extends BaseBlock
/**
* Returns the tag enumeration for the `<div>` element.
*
* @return BlockInterface Tag enumeration instance for `<div>`.
* @return Block Tag enumeration instance for `<div>`.
*
* {@see Block} for valid block-level tags.
*/
protected function getTag(): BlockInterface
protected function getTag(): Block
{
return Block::DIV;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Flow/Hr.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace UIAwesome\Html\Flow;

use UIAwesome\Html\Core\Element\BaseVoid;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<hr>` element for thematic breaks.
Expand All @@ -28,11 +28,11 @@ final class Hr extends BaseVoid
/**
* Returns the tag enumeration for the `<hr>` element.
*
* @return VoidInterface Tag enumeration instance for `<hr>`.
* @return Voids Tag enumeration instance for `<hr>`.
*
* {@see Voids} for valid void-level tags.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::HR;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Flow/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace UIAwesome\Html\Flow;

use UIAwesome\Html\Core\Element\BaseBlock;
use UIAwesome\Html\Interop\{Block, BlockInterface};
use UIAwesome\Html\Interop\Block;

/**
* Renders the HTML `<main>` element for dominant document content.
Expand All @@ -29,11 +29,11 @@ final class Main extends BaseBlock
/**
* Returns the tag enumeration for the `<main>` element.
*
* @return BlockInterface Tag enumeration instance for `<main>`.
* @return Block Tag enumeration instance for `<main>`.
*
* {@see Block} for valid block-level tags.
*/
protected function getTag(): BlockInterface
protected function getTag(): Block
{
return Block::MAIN;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Flow/P.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace UIAwesome\Html\Flow;

use UIAwesome\Html\Core\Element\BaseBlock;
use UIAwesome\Html\Interop\{Block, BlockInterface};
use UIAwesome\Html\Interop\Block;

/**
* Renders the HTML `<p>` element for paragraphs.
Expand All @@ -29,11 +29,11 @@ final class P extends BaseBlock
/**
* Returns the tag enumeration for the `<p>` element.
*
* @return BlockInterface Tag enumeration instance for `<p>`.
* @return Block Tag enumeration instance for `<p>`.
*
* {@see Block} for valid block-level tags.
*/
protected function getTag(): BlockInterface
protected function getTag(): Block
{
return Block::P;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
};
use UIAwesome\Html\Form\Values\ButtonType;
use UIAwesome\Html\Helper\Validator;
use UIAwesome\Html\Interop\{Inline, InlineInterface};
use UIAwesome\Html\Interop\Inline;
use UnitEnum;

/**
Expand Down Expand Up @@ -91,11 +91,11 @@ public function type(string|UnitEnum|null $value): static
/**
* Returns the tag enumeration for the `<button>` element.
*
* @return InlineInterface Tag enumeration instance for `<button>`.
* @return Inline Tag enumeration instance for `<button>`.
*
* {@see Inline} for valid inline-level tags.
*/
protected function getTag(): InlineInterface
protected function getTag(): Inline
{
return Inline::BUTTON;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use UIAwesome\Html\Attribute\{HasName, HasRel, HasTarget};
use UIAwesome\Html\Core\Element\BaseBlock;
use UIAwesome\Html\Form\Attribute\{CanBeNovalidate, HasAcceptCharset, HasAction, HasEnctype, HasMethod};
use UIAwesome\Html\Interop\{Block, BlockInterface};
use UIAwesome\Html\Interop\Block;

/**
* Renders the HTML `<form>` element for submitting user data.
Expand Down Expand Up @@ -45,11 +45,11 @@ final class Form extends BaseBlock
/**
* Returns the tag enumeration for the `<form>` element.
*
* @return BlockInterface Tag enumeration instance for `<form>`.
* @return Block Tag enumeration instance for `<form>`.
*
* {@see Block} for valid block-level tags.
*/
protected function getTag(): BlockInterface
protected function getTag(): Block
{
return Block::FORM;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputCheckbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Form\Mixin\HasCheckedState;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Represents the HTML `<input type="checkbox">` element.
Expand Down Expand Up @@ -55,9 +55,9 @@ public function getAttributes(): array
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Form\Attribute\{HasAlpha, HasColorspace};
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="color">` element.
Expand Down Expand Up @@ -53,9 +53,9 @@ final class InputColor extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use UIAwesome\Html\Attribute\HasValue;
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="date">` element.
Expand Down Expand Up @@ -65,9 +65,9 @@ final class InputDate extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputDateTimeLocal.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use UIAwesome\Html\Attribute\HasValue;
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="datetime-local">` element.
Expand Down Expand Up @@ -65,9 +65,9 @@ final class InputDateTimeLocal extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use UIAwesome\Html\Attribute\HasValue;
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="email">` element.
Expand Down Expand Up @@ -65,9 +65,9 @@ final class InputEmail extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Form\Attribute\HasCapture;
use UIAwesome\Html\Helper\Naming;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="file">` element.
Expand Down Expand Up @@ -71,9 +71,9 @@ public function getAttributes(): array
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputHidden.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use UIAwesome\Html\Attribute\HasValue;
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="hidden">` element.
Expand Down Expand Up @@ -37,9 +37,9 @@ final class InputHidden extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
HasFormnovalidate,
HasFormtarget
};
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="image">` element.
Expand Down Expand Up @@ -55,9 +55,9 @@ final class InputImage extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputMonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use UIAwesome\Html\Attribute\HasValue;
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="month">` element.
Expand Down Expand Up @@ -66,9 +66,9 @@ final class InputMonth extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/InputNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use UIAwesome\Html\Attribute\HasValue;
use UIAwesome\Html\Attribute\Values\Type;
use UIAwesome\Html\Core\Element\BaseInput;
use UIAwesome\Html\Interop\{VoidInterface, Voids};
use UIAwesome\Html\Interop\Voids;

/**
* Renders the HTML `<input type="number">` element.
Expand Down Expand Up @@ -59,9 +59,9 @@ final class InputNumber extends BaseInput
/**
* Returns the tag enumeration for the `<input>` element.
*
* @return VoidInterface Tag enumeration instance for `<input>`.
* @return Voids Tag enumeration instance for `<input>`.
*/
protected function getTag(): VoidInterface
protected function getTag(): Voids
{
return Voids::INPUT;
}
Expand Down
Loading
Loading