Skip to content

Commit

Permalink
Remove ui-awesome/html and update dependencies composer.json. (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Mar 31, 2024
1 parent 7155c51 commit a780b29
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
- Enh #2: Add dropdown cookbook selector `language` and toggle cookbok `selectorLanguage` classes (@terabytesoftw)
- Enh #3: Add toggle cookbook `selectorTheme` class (@terabytesoftw)
- Enh #4: Update last change `php-forge/awesome-widget` (@terabytesoftw)
- Bug #5: Remove `ui-awesome/html` and update dependencies `composer.json` (@terabytesoftw)
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@
"require": {
"php": "^8.1",
"php-forge/awesome-widget": "^0.1",
"ui-awesome/html-core-component": "^1.0@dev",
"ui-awesome/html-helper": "^0.1",
"ui-awesome/html-svg":"^0.1"
"ui-awesome/html-core-component": "^0.1",
"ui-awesome/html-helper": "^0.2",
"ui-awesome/html-svg":"^0.2"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.7",
"php-forge/support": "^0.1",
"phpunit/phpunit": "^10.5",
"roave/infection-static-analysis-plugin": "^1.34",
"symplify/easy-coding-standard": "^12.1",
"ui-awesome/html":"^0.2",
"vimeo/psalm": "^5.20"
},
"autoload": {
Expand Down
12 changes: 6 additions & 6 deletions tests/Alert/DefaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace UIAwesome\Html\Component\Flowbite\Tests\Alert;

use PHPForge\Support\Assert;
use UIAwesome\Html\{Component\Flowbite\Alert, Textual\Span};
use UIAwesome\Html\{Component\Flowbite\Alert, Core\HTMLBuilder};

final class DefaultTest extends \PHPUnit\Framework\TestCase
{
Expand All @@ -19,7 +19,7 @@ public function testDanger(): void
HTML,
Alert::widget()
->content(
Span::widget()->class('font-medium')->content('Danger alert!.'),
HTMLBuilder::createTag('span', 'Danger alert!.', ['class' => 'font-medium']),
' Change a few things up and try submitting again.',
)
->cookbook('default', 'danger')
Expand All @@ -38,7 +38,7 @@ public function testDark(): void
HTML,
Alert::widget()
->content(
Span::widget()->class('font-medium')->content('Dark alert!.'),
HTMLBuilder::createTag('span', 'Dark alert!.', ['class' => 'font-medium']),
' Change a few things up and try submitting again.',
)
->cookbook('default', 'dark')
Expand All @@ -57,7 +57,7 @@ public function testInfo(): void
HTML,
Alert::widget()
->content(
Span::widget()->class('font-medium')->content('Info alert!.'),
HTMLBuilder::createTag('span', 'Info alert!.', ['class' => 'font-medium']),
' Change a few things up and try submitting again.',
)
->cookbook('default', 'info')
Expand All @@ -76,7 +76,7 @@ public function testSuccess(): void
HTML,
Alert::widget()
->content(
Span::widget()->class('font-medium')->content('Success alert!.'),
HTMLBuilder::createTag('span', 'Success alert!.', ['class' => 'font-medium']),
' Change a few things up and try submitting again.',
)
->cookbook('default', 'success')
Expand All @@ -95,7 +95,7 @@ public function testWarning(): void
HTML,
Alert::widget()
->content(
Span::widget()->class('font-medium')->content('Warning alert!.'),
HTMLBuilder::createTag('span', 'Warning alert!.', ['class' => 'font-medium']),
' Change a few things up and try submitting again.',
)
->cookbook('default', 'warning')
Expand Down
33 changes: 27 additions & 6 deletions tests/Alert/DismissTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace UIAwesome\Html\Component\Flowbite\Tests\Alert;

use PHPForge\Support\Assert;
use UIAwesome\Html\{Component\Flowbite\Alert, Graphic\Svg, Textual\A};
use UIAwesome\Html\{Component\Flowbite\Alert, Graphic\Svg};
use UIAwesome\Html\Core\HTMLBuilder;

/**
* Alert component with Flowbite dismiss button.
Expand Down Expand Up @@ -37,7 +38,11 @@ public function testDanger(): void
Alert::widget()
->content(
'A simple danger alert with an ',
A::widget()->class('font-semibold underline hover:no-underline')->content('example link')->href('#'),
HTMLBuilder::createTag(
'a',
'example link',
['class' => 'font-semibold underline hover:no-underline', 'href' => '#']
),
'. Give it a click if you like.',
)
->cookbook('dismissible', 'danger')
Expand Down Expand Up @@ -65,7 +70,11 @@ public function testDark(): void
Alert::widget()
->content(
'A simple dark alert with an ',
A::widget()->class('font-semibold underline hover:no-underline')->content('example link')->href('#'),
HTMLBuilder::createTag(
'a',
'example link',
['class' => 'font-semibold underline hover:no-underline', 'href' => '#']
),
'. Give it a click if you like.',
)
->id('alert_658fec01ac6cf')
Expand Down Expand Up @@ -93,7 +102,11 @@ public function testInfo(): void
Alert::widget()
->content(
'A simple dark info with an ',
A::widget()->class('font-semibold underline hover:no-underline')->content('example link')->href('#'),
HTMLBuilder::createTag(
'a',
'example link',
['class' => 'font-semibold underline hover:no-underline', 'href' => '#']
),
'. Give it a click if you like.',
)
->cookbook('dismissible', 'info')
Expand Down Expand Up @@ -121,7 +134,11 @@ public function testSuccess(): void
Alert::widget()
->content(
'A simple success info with an ',
A::widget()->class('font-semibold underline hover:no-underline')->content('example link')->href('#'),
HTMLBuilder::createTag(
'a',
'example link',
['class' => 'font-semibold underline hover:no-underline', 'href' => '#']
),
'. Give it a click if you like.',
)
->id('alert_658fec01ac6cf')
Expand Down Expand Up @@ -149,7 +166,11 @@ public function testWarning(): void
Alert::widget()
->content(
'A simple warning info with an ',
A::widget()->class('font-semibold underline hover:no-underline')->content('example link')->href('#'),
HTMLBuilder::createTag(
'a',
'example link',
['class' => 'font-semibold underline hover:no-underline', 'href' => '#']
),
'. Give it a click if you like.',
)
->cookbook('dismissible', 'warning')
Expand Down

0 comments on commit a780b29

Please sign in to comment.