From fb924554f4731bb259f12ff7738cd56b5142fc58 Mon Sep 17 00:00:00 2001 From: Kirill Petrov Date: Thu, 16 Dec 2021 20:06:27 +0400 Subject: [PATCH 01/10] Update composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1c4ff13..209d43f 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "php": ">=7.0", "ext-json": "*", "yiisoft/yii2": "^2.0.42", - "bower-asset/bootstrap": "^5.1.0" + "bower-asset/bootstrap": "^5.1.0", + "twbs/bootstrap-icons": "^1.7.5" }, "require-dev": { "yiisoft/yii2-coding-standards": "~2.0", From f305113978feb61f8ec42c8c2afe57252298836d Mon Sep 17 00:00:00 2001 From: Kirill Petrov Date: Thu, 16 Dec 2021 20:07:40 +0400 Subject: [PATCH 02/10] Create BootstrapIconAsset --- src/BootstrapIconAsset | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/BootstrapIconAsset diff --git a/src/BootstrapIconAsset b/src/BootstrapIconAsset new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/BootstrapIconAsset @@ -0,0 +1 @@ + From 26c001763d91679069142dfe3b942eaba61db64b Mon Sep 17 00:00:00 2001 From: Kirill Petrov Date: Thu, 16 Dec 2021 20:08:08 +0400 Subject: [PATCH 03/10] Update and rename BootstrapIconAsset to BootstrapIconAsset.php --- src/BootstrapIconAsset | 1 - src/BootstrapIconAsset.php | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) delete mode 100644 src/BootstrapIconAsset create mode 100644 src/BootstrapIconAsset.php diff --git a/src/BootstrapIconAsset b/src/BootstrapIconAsset deleted file mode 100644 index 8b13789..0000000 --- a/src/BootstrapIconAsset +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/BootstrapIconAsset.php b/src/BootstrapIconAsset.php new file mode 100644 index 0000000..3bd7df4 --- /dev/null +++ b/src/BootstrapIconAsset.php @@ -0,0 +1,13 @@ + Date: Thu, 16 Dec 2021 20:26:58 +0400 Subject: [PATCH 04/10] Update BootstrapIconAsset.php --- src/BootstrapIconAsset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapIconAsset.php b/src/BootstrapIconAsset.php index 3bd7df4..3b1bd84 100644 --- a/src/BootstrapIconAsset.php +++ b/src/BootstrapIconAsset.php @@ -2,7 +2,7 @@ namespace app\assets; -class IconsBs5Asset extends \yii\web\AssetBundle +class BootstrapIconAsset extends \yii\web\AssetBundle { public $sourcePath = '@vendor/twbs/bootstrap-icons/font'; From 6b2d1f6c65060b6b55c1b58a553f55ee48ed7706 Mon Sep 17 00:00:00 2001 From: Kirill Petrov Date: Thu, 16 Dec 2021 20:27:07 +0400 Subject: [PATCH 05/10] Update BootstrapAsset.php --- src/BootstrapAsset.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/BootstrapAsset.php b/src/BootstrapAsset.php index 42a615d..edfa23c 100644 --- a/src/BootstrapAsset.php +++ b/src/BootstrapAsset.php @@ -18,4 +18,9 @@ class BootstrapAsset extends AssetBundle 'css/bootstrap.css', ]; public $js = []; + + public $depends = [ + BootstrapIconAsset::class + ]; + } From 7484883437533ae2d9a95caf131b5720090f2d41 Mon Sep 17 00:00:00 2001 From: simialbi Date: Sun, 19 Dec 2021 13:10:01 +0100 Subject: [PATCH 06/10] Put the bootstrap icons to suggest section --- composer.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 209d43f..72d881a 100644 --- a/composer.json +++ b/composer.json @@ -27,12 +27,15 @@ "php": ">=7.0", "ext-json": "*", "yiisoft/yii2": "^2.0.42", - "bower-asset/bootstrap": "^5.1.0", - "twbs/bootstrap-icons": "^1.7.5" + "bower-asset/bootstrap": "^5.1.0" }, "require-dev": { "yiisoft/yii2-coding-standards": "~2.0", - "phpunit/phpunit": "^6.5.14" + "phpunit/phpunit": "^6.5.14", + "twbs/bootstrap-icons": "^1.7.5" + }, + "suggest": { + "twbs/bootstrap-icons": "Add this package to the `require` section of your `composer.json` if you'd like to use the bootstrap icon asset." }, "repositories": [ { From 1a12d1cf65b09b43f56c9811f5cfc0e5f9d5393d Mon Sep 17 00:00:00 2001 From: simialbi Date: Sun, 19 Dec 2021 13:10:37 +0100 Subject: [PATCH 07/10] Do not force icon asset --- src/BootstrapAsset.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/BootstrapAsset.php b/src/BootstrapAsset.php index edfa23c..42a615d 100644 --- a/src/BootstrapAsset.php +++ b/src/BootstrapAsset.php @@ -18,9 +18,4 @@ class BootstrapAsset extends AssetBundle 'css/bootstrap.css', ]; public $js = []; - - public $depends = [ - BootstrapIconAsset::class - ]; - } From 7642e09bb0f629e1522d39c45b9ff26fa0102ae0 Mon Sep 17 00:00:00 2001 From: simialbi Date: Sun, 19 Dec 2021 13:18:53 +0100 Subject: [PATCH 08/10] Fixed icon asset version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 72d881a..85baea6 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "require-dev": { "yiisoft/yii2-coding-standards": "~2.0", "phpunit/phpunit": "^6.5.14", - "twbs/bootstrap-icons": "^1.7.5" + "twbs/bootstrap-icons": "^1.7.2" }, "suggest": { "twbs/bootstrap-icons": "Add this package to the `require` section of your `composer.json` if you'd like to use the bootstrap icon asset." From a2e68756ca0319b6113088a62a0afb5388975b7c Mon Sep 17 00:00:00 2001 From: simialbi Date: Sun, 19 Dec 2021 13:37:40 +0100 Subject: [PATCH 09/10] Added Changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 226844c..fc92945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 bootstrap5 extension Change Log 2.0.3 under development ----------------------- +- Enh #26: Add Bootstrap icon asset (Krakozaber) - Enh #18: Add rangeInput(), colorInput() and switch mode to checkbox() in class ActiveField (WinterSilence) - Bug #19: Fix value of attribute "aria-current" in LinkPager::renderPageButton() (WinterSilence) - Bug #23: Fix class attribute in listBox() and dropDownList() of class ActiveField (WinterSilence) From 813e9fd8792ecf36f60d4b387643cfe79cf537dd Mon Sep 17 00:00:00 2001 From: simialbi Date: Sun, 19 Dec 2021 13:52:54 +0100 Subject: [PATCH 10/10] Fixed BootstrapIconAsset --- src/BootstrapIconAsset.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/BootstrapIconAsset.php b/src/BootstrapIconAsset.php index 3b1bd84..094bddd 100644 --- a/src/BootstrapIconAsset.php +++ b/src/BootstrapIconAsset.php @@ -1,8 +1,17 @@