From f9b59a93ada5b6439fe7fd78d7dead07037e37c2 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sat, 26 Mar 2022 22:04:34 +0300 Subject: [PATCH 01/21] chore: Add `dependabot` --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c769ce4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: '/' + schedule: { interval: weekly, day: saturday } + versioning-strategy: increase + allow: [dependency-type: direct] + assignees: [MorevM] + commit-message: { prefix: chore } + labels: [dependencies] + open-pull-requests-limit: 30 From 1d08a8dd62da2a6fcf75f2db7d62aae6d3bc00c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:10:41 +0300 Subject: [PATCH 02/21] chore: bump @morev/helpers from 0.8.0 to 0.8.1 (#3) Bumps [@morev/helpers](https://github.com/MorevM/helpers) from 0.8.0 to 0.8.1. - [Release notes](https://github.com/MorevM/helpers/releases) - [Changelog](https://github.com/MorevM/helpers/blob/master/CHANGELOG.md) - [Commits](https://github.com/MorevM/helpers/compare/v0.8.0...v0.8.1) --- updated-dependencies: - dependency-name: "@morev/helpers" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 835e3ea..763afcd 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "vue": "^2.6.14" }, "dependencies": { - "@morev/helpers": "^0.8.0" + "@morev/helpers": "^0.8.1" }, "devDependencies": { "@babel/core": "^7.17.8", diff --git a/yarn.lock b/yarn.lock index 4bd6d18..1c8e812 100644 --- a/yarn.lock +++ b/yarn.lock @@ -900,10 +900,10 @@ resolved "https://registry.yarnpkg.com/@morev/helpers/-/helpers-0.5.0.tgz#6727ba435915f8e3a5b841bf4b8c7949a28eed1a" integrity sha512-GrFxyLQdqMj4d6A//yEyBQDZ8gW6lQ1YvWOKcPC1eVIgRuw9ZUM1w0ZoggxyVWFBFssQdWWxhwkVtmrJLpo4SQ== -"@morev/helpers@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@morev/helpers/-/helpers-0.8.0.tgz#32427eb0a554dec36aa7d7cfbb7c1aff708c0543" - integrity sha512-hu4RiRZq9lYibbcO486Q/r72+8n2HOfg9e03nAR//CFkDSOXe2eMf45385vmbaSt/9sQcAiwO31e9N+3GzcOEQ== +"@morev/helpers@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@morev/helpers/-/helpers-0.8.1.tgz#ad4afad69ea4464242e822203ae7b9bd01e764fe" + integrity sha512-+L70c1Qr6Ugf/vkevEIcwLQ+OjlkergeswotYnN9wDNkSKU/O1nebhAri5nV1PlxCyfiXLee8Th9LCScFaL2rw== "@morev/more-bem-classnames@^1.0.2": version "1.0.2" From 9d03fc5eb80bfb84205214ba568bf44983fccc3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:10:55 +0300 Subject: [PATCH 03/21] chore: bump @morev/commitlint-config from 0.1.0 to 0.1.1 (#5) Bumps [@morev/commitlint-config](https://github.com/MorevM/commitlint-config) from 0.1.0 to 0.1.1. - [Release notes](https://github.com/MorevM/commitlint-config/releases) - [Changelog](https://github.com/MorevM/commitlint-config/blob/master/CHANGELOG.md) - [Commits](https://github.com/MorevM/commitlint-config/compare/v0.1.0...v0.1.1) --- updated-dependencies: - dependency-name: "@morev/commitlint-config" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 763afcd..85c4eb3 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@babel/eslint-parser": "^7.17.0", "@babel/plugin-syntax-jsx": "^7.16.7", "@babel/plugin-transform-modules-commonjs": "^7.17.7", - "@morev/commitlint-config": "^0.1.0", + "@morev/commitlint-config": "^0.1.1", "@morev/eslint-config": "^10.0.2", "@morev/stylelint-config": "^1.0.2", "@morev/v-bem-transformer": "^0.0.4", diff --git a/yarn.lock b/yarn.lock index 1c8e812..0003451 100644 --- a/yarn.lock +++ b/yarn.lock @@ -434,7 +434,7 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@commitlint/cli@^16.1.0": +"@commitlint/cli@^16.2.3": version "16.2.3" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-16.2.3.tgz#6c250ce7a660a08a3ac35dd2ec5039421fb831df" integrity sha512-VsJBQLvhhlOgEfxs/Z5liYuK0dXqLE5hz1VJzLBxiOxG31kL/X5Q4OvK292BmO7IGZcm1yJE3XQPWSiFaEHbWA== @@ -852,12 +852,12 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@morev/commitlint-config@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@morev/commitlint-config/-/commitlint-config-0.1.0.tgz#c6dec5c3495dca41a990e25569311a710ea49423" - integrity sha512-4qlFqRSqkmFaQDMXG3ezRCfazHxkMC1+BnEsOxfxM0VP/dJCF5nDoc4I0Sy/cuIQQwuVjdQmwMmbwC6kPJlfYg== +"@morev/commitlint-config@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@morev/commitlint-config/-/commitlint-config-0.1.1.tgz#24213369372f7ce5a9946233f408417018ff6852" + integrity sha512-oIw71gbPa8xKZ//yjkeNb8QqcXB3yGoo7QIUAM5xOKnHc8SC9ahZoOFdvOqeiO4MLwPBA8DsBD37lFZSiYpJ1Q== dependencies: - "@commitlint/cli" "^16.1.0" + "@commitlint/cli" "^16.2.3" conventional-changelog-conventionalcommits "^4.6.3" lodash.clonedeep "^4.5.0" From f3f95a3fc144abf45f544bcfc352937761c2591b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:11:07 +0300 Subject: [PATCH 04/21] chore: bump eslint from 8.11.0 to 8.12.0 (#8) Bumps [eslint](https://github.com/eslint/eslint) from 8.11.0 to 8.12.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.11.0...v8.12.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 85c4eb3..c8c3cb4 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@release-it/conventional-changelog": "^4.2.2", "@types/jest": "^27.4.1", "element-ui": "^2.15.6", - "eslint": "^8.11.0", + "eslint": "^8.12.0", "husky": "^7.0.4", "jest": "^27.5.1", "lint-staged": "^12.3.7", diff --git a/yarn.lock b/yarn.lock index 0003451..014c071 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3222,10 +3222,10 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.11.0: - version "8.11.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.11.0.tgz#88b91cfba1356fc10bb9eb592958457dfe09fb37" - integrity sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA== +eslint@^8.12.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" + integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== dependencies: "@eslint/eslintrc" "^1.2.1" "@humanwhocodes/config-array" "^0.9.2" From b2f64223baa3dfdb5f45f9b524b98e28f1b33a03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:11:24 +0300 Subject: [PATCH 05/21] chore: bump more-sass from 1.0.5 to 1.0.7 (#6) Bumps [more-sass](https://github.com/MorevM/more-sass) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/MorevM/more-sass/releases) - [Changelog](https://github.com/MorevM/more-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/MorevM/more-sass/compare/v1.0.5...v1.0.7) --- updated-dependencies: - dependency-name: more-sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c8c3cb4..22e5d3f 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "husky": "^7.0.4", "jest": "^27.5.1", "lint-staged": "^12.3.7", - "more-sass": "^1.0.5", + "more-sass": "^1.0.7", "release-it": "^14.13.1", "sass": "^1.49.9", "stylelint": "^14.6.1", diff --git a/yarn.lock b/yarn.lock index 014c071..755f71d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5423,10 +5423,10 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -more-sass@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/more-sass/-/more-sass-1.0.5.tgz#bd14c4040bfa0ec9434eaf492b2b84b4821c8d19" - integrity sha512-VIZGyLWPk7uzZuFyusIzmE5pihxKsu20HhGyC7fOoAw03PGkr5Pihe0yHP6abEKlmAXhs4LzK53kZg1epAbYpg== +more-sass@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/more-sass/-/more-sass-1.0.7.tgz#fb7cc537182c236211ca3e1d22d7e3a3ab0d7d31" + integrity sha512-jVJyC81ZNhpLg+0mBAfG5CVDPssxe0fesn4+unzYQl9AgDJlFZ3vq52YL+fWy8K3gZzzxyl5i2wooqr/j5yr9Q== ms@2.0.0: version "2.0.0" From a0e6226aeb378659f69b17a0db2ef9d85afc625f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:11:35 +0300 Subject: [PATCH 06/21] chore: bump @morev/stylelint-config from 1.0.2 to 1.0.3 (#9) Bumps [@morev/stylelint-config](https://github.com/MorevM/stylelint-config) from 1.0.2 to 1.0.3. - [Release notes](https://github.com/MorevM/stylelint-config/releases) - [Changelog](https://github.com/MorevM/stylelint-config/blob/master/CHANGELOG.md) - [Commits](https://github.com/MorevM/stylelint-config/compare/v1.0.2...v1.0.3) --- updated-dependencies: - dependency-name: "@morev/stylelint-config" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 22e5d3f..c7a8235 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.17.7", "@morev/commitlint-config": "^0.1.1", "@morev/eslint-config": "^10.0.2", - "@morev/stylelint-config": "^1.0.2", + "@morev/stylelint-config": "^1.0.3", "@morev/v-bem-transformer": "^0.0.4", "@release-it/conventional-changelog": "^4.2.2", "@types/jest": "^27.4.1", diff --git a/yarn.lock b/yarn.lock index 755f71d..4b295f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -912,10 +912,10 @@ dependencies: "@morev/helpers" "^0.5.0" -"@morev/stylelint-config@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@morev/stylelint-config/-/stylelint-config-1.0.2.tgz#a7585ef7c341f00f57fa97971dd8b2307fdc8546" - integrity sha512-i2dRJ57o6LE0U2NVrOk56MVgMxKwJci+2CZ/b5XSGt54Jnsp73/kN2XjioY6fuzbEzyrzluF9R1jwCeQwfcWkg== +"@morev/stylelint-config@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@morev/stylelint-config/-/stylelint-config-1.0.3.tgz#029406680f51ff8e2ca19969c36351268f403148" + integrity sha512-Kbn/3dNY/KOTvkMXv3afZ3ZFGTOxT8hPss3n+d/zmJuCohiVKuNJIuxTfqRh9WZ0VG5395heSl0f6m3EQvWVwQ== dependencies: lodash.mergewith "^4.6.2" postcss "^8.4.8" From e0b96b4196f295030efeb17c722456c9bc07d6d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:14:37 +0300 Subject: [PATCH 07/21] chore: bump @morev/v-bem-transformer from 0.0.4 to 0.0.5 (#7) Bumps [@morev/v-bem-transformer](https://github.com/MorevM/v-bem-transformer) from 0.0.4 to 0.0.5. - [Release notes](https://github.com/MorevM/v-bem-transformer/releases) - [Changelog](https://github.com/MorevM/v-bem-transformer/blob/master/CHANGELOG.md) - [Commits](https://github.com/MorevM/v-bem-transformer/compare/v0.0.4...v0.0.5) --- updated-dependencies: - dependency-name: "@morev/v-bem-transformer" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c7a8235..f59d174 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@morev/commitlint-config": "^0.1.1", "@morev/eslint-config": "^10.0.2", "@morev/stylelint-config": "^1.0.3", - "@morev/v-bem-transformer": "^0.0.4", + "@morev/v-bem-transformer": "^0.0.5", "@release-it/conventional-changelog": "^4.2.2", "@types/jest": "^27.4.1", "element-ui": "^2.15.6", diff --git a/yarn.lock b/yarn.lock index 4b295f6..8ccd3e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -931,13 +931,13 @@ stylelint-selector-tag-no-without-class "^2.0.5" stylelint-use-nesting "^3.0.0" -"@morev/v-bem-transformer@^0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@morev/v-bem-transformer/-/v-bem-transformer-0.0.4.tgz#91ab6623054194b23e69041407e2022a1ffe12c6" - integrity sha512-oDaQ75Pk2irM5eEVRRM0cDNQV+9XffSsypXk9rmQBnn8NHIpoagT3LZCmeRMcezXXkbzydFUH1SuMqsRsInb5w== +"@morev/v-bem-transformer@^0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@morev/v-bem-transformer/-/v-bem-transformer-0.0.5.tgz#5a97db5017d3adb9000c21706072b7d0c4abcdcd" + integrity sha512-MdbjF4VYEO8ilmzYXJspMEyyhoUVosg/6KtG1tBmzQtjTo6T4nZH4DAmWPCrIpofYGYncblVdOb6HuHz3QKyhw== dependencies: "@morev/more-bem-classnames" "^1.0.2" - unplugin "^0.4.0" + unplugin "^0.6.0" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -7320,12 +7320,13 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unplugin@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.4.0.tgz#43a923f0267f8834118a926c406131d1d84a1358" - integrity sha512-4ScITEmzlz1iZW3tkz+3L1V5k/xMQ6kjgm4lEXKxH0ozd8/OUWfiSA7RMRyrawsvq/t50JIzPpp1UyuSL/AXkA== +unplugin@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.6.0.tgz#bc5c8becdafca8a47e40cb51b2be59c3b1ad9533" + integrity sha512-CzXJyV3cTzxcuD6kRN4SXtNA5iDJOBZpz/RjfxNRyvytXSVmtpQKVu+snacS+kYanu6gxLgASXGDhd8+4XezLw== dependencies: chokidar "^3.5.3" + webpack-sources "^3.2.3" webpack-virtual-modules "^0.4.3" update-notifier@5.1.0: @@ -7546,6 +7547,11 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + webpack-virtual-modules@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz#cd597c6d51d5a5ecb473eea1983a58fa8a17ded9" From ccf21087da7b61663b9ab1602cfc0be60c1b2929 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Mar 2022 19:20:42 +0000 Subject: [PATCH 08/21] chore: bump @morev/eslint-config from 10.0.2 to 10.0.3 (#2) --- package.json | 2 +- yarn.lock | 42 ++++++------------------------------------ 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index f59d174..4aa5267 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@babel/plugin-syntax-jsx": "^7.16.7", "@babel/plugin-transform-modules-commonjs": "^7.17.7", "@morev/commitlint-config": "^0.1.1", - "@morev/eslint-config": "^10.0.2", + "@morev/eslint-config": "^10.0.3", "@morev/stylelint-config": "^1.0.3", "@morev/v-bem-transformer": "^0.0.5", "@release-it/conventional-changelog": "^4.2.2", diff --git a/yarn.lock b/yarn.lock index 8ccd3e2..cfb1100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,28 +21,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== -"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.16.10", "@babel/core@^7.16.12", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.7.tgz#f7c28228c83cdf2dbd1b9baa06eaf9df07f0c2f9" - integrity sha512-djHlEfFHnSnTAcPb7dATbiM5HxGOP98+3JLBZtjRb5I7RXrw7kFRoG2dXM8cm3H+o11A8IFH/uprmJpwFynRNQ== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.7" - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-module-transforms" "^7.17.7" - "@babel/helpers" "^7.17.7" - "@babel/parser" "^7.17.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" - "@babel/types" "^7.17.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - -"@babel/core@^7.17.8": +"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.16.10", "@babel/core@^7.16.12", "@babel/core@^7.17.8", "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.17.8" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a" integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ== @@ -216,15 +195,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== -"@babel/helpers@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.7.tgz#6fc0a24280fd00026e85424bbfed4650e76d7127" - integrity sha512-TKsj9NkjJfTBxM7Phfy7kv6yYc4ZcOo+AaWGqQOKTPDOmcGkIFb5xNA746eKisQkm4yavUYh4InYM9S+VnO01w== - dependencies: - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" - "@babel/types" "^7.17.0" - "@babel/helpers@^7.17.8": version "7.17.8" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.8.tgz#288450be8c6ac7e4e44df37bcc53d345e07bc106" @@ -243,7 +213,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.10", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.7": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.10", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.7.tgz#fc19b645a5456c8d6fdb6cecd3c66c0173902800" integrity sha512-bm3AQf45vR4gKggRfvJdYJ0gFLoCbsPxiFLSH6hTVYABptNHY6l9NrhnucVjQ/X+SPtLANT9lc0fFhikj+VBRA== @@ -861,10 +831,10 @@ conventional-changelog-conventionalcommits "^4.6.3" lodash.clonedeep "^4.5.0" -"@morev/eslint-config@^10.0.2": - version "10.0.2" - resolved "https://registry.yarnpkg.com/@morev/eslint-config/-/eslint-config-10.0.2.tgz#bce26bb447e2eb6b3f477d34b84660476de74cd0" - integrity sha512-2Ur/DjrsxqSe709Gdb6OC2cDt0vIBIC41+5/gmhsSO6bzSnbkI5hM4NR1ae6GG7ecVLnbARdaU4M+nEV5fzs4A== +"@morev/eslint-config@^10.0.3": + version "10.0.3" + resolved "https://registry.yarnpkg.com/@morev/eslint-config/-/eslint-config-10.0.3.tgz#7406989e4f3ce4aedff64f022511b8be0312c68a" + integrity sha512-DCn6otsF5HVgN2zqTETIQBshXTLq8LnqkrjIeanTnFtkbB74sqHIH1akAPvjdn42PVNcz2VrlCFtmc+CZaKtng== dependencies: "@babel/core" "^7.16.12" "@babel/eslint-parser" "^7.16.5" From 368c139c813f67838306d18063f65b0f3fecf19d Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 03:44:03 +0300 Subject: [PATCH 09/21] fix: Set `important` flag to all style transformations Needed to make sure it won't overrided by the styles of element itself --- src/mixins/base-transition.js | 16 ++++++++-------- src/mixins/base-transition.scss | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mixins/base-transition.js b/src/mixins/base-transition.js index 71f4c25..5ecd106 100644 --- a/src/mixins/base-transition.js +++ b/src/mixins/base-transition.js @@ -91,13 +91,13 @@ export const baseTransition = { const easing = this.easing?.[event] ?? this.easing; const delay = this.delay?.[event] ?? this.delay; - element.style.setProperty('transition-duration', `${duration}ms`); - element.style.setProperty('transition-timing-function', `${easing}`); - element.style.setProperty('transition-delay', `${delay}ms`); + element.style.setProperty('transition-duration', `${duration}ms`, 'important'); + element.style.setProperty('transition-timing-function', `${easing}`, 'important'); + element.style.setProperty('transition-delay', `${delay}ms`, 'important'); }, reduceTransition(element) { - element.style.setProperty('transition-duration', '0ms'); - element.style.setProperty('transition-delay', '0ms'); + element.style.setProperty('transition-duration', '0ms', 'important'); + element.style.setProperty('transition-delay', '0ms', 'important'); }, resetTransition(element) { element.style.removeProperty('transition-duration'); @@ -113,11 +113,11 @@ export const baseTransition = { const { width, height } = styles; const { marginLeft, marginTop } = styles; - element.style.setProperty('left', `${element.offsetLeft - parseFloat(marginLeft)}px`); - element.style.setProperty('top', `${element.offsetTop - parseFloat(marginTop)}px`); + element.style.setProperty('left', `${element.offsetLeft - parseFloat(marginLeft)}px`, 'important'); + element.style.setProperty('top', `${element.offsetTop - parseFloat(marginTop)}px`, 'important'); element.style.setProperty('width', `${parseFloat(width)}px`, 'important'); element.style.setProperty('height', `${parseFloat(height)}px`, 'important'); - element.style.setProperty('position', 'absolute'); + element.style.setProperty('position', 'absolute', 'important'); return element; }, diff --git a/src/mixins/base-transition.scss b/src/mixins/base-transition.scss index 0cac34a..8eb48f0 100644 --- a/src/mixins/base-transition.scss +++ b/src/mixins/base-transition.scss @@ -1,9 +1,9 @@ @use '../utility/defaults/defaults.scss'; %base-move { - transition-property: transform; - transition-duration: defaults.$transition-duration; - transition-duration: var(--move-duration, defaults.$transition-duration); - transition-timing-function: defaults.$transition-easing; - transition-delay: 0ms; + transition-property: transform !important; + transition-duration: defaults.$transition-duration !important; + transition-duration: var(--move-duration, defaults.$transition-duration) !important; + transition-timing-function: defaults.$transition-easing !important; + transition-delay: 0ms !important; } From 355bffe533f45af00fb7100de048740b0196803a Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 03:45:15 +0300 Subject: [PATCH 10/21] fix: Correct order of style actions, refactoring the code --- src/mixins/base-transition.js | 24 ++++++++++-------- .../transition-expand/transition-expand.vue | 13 +--------- .../transition-fade/transition-fade.vue | 13 +--------- .../transition-scale/transition-scale.vue | 13 +--------- .../transition-slide/transition-slide.vue | 25 +++++-------------- 5 files changed, 23 insertions(+), 65 deletions(-) diff --git a/src/mixins/base-transition.js b/src/mixins/base-transition.js index 5ecd106..e255cac 100644 --- a/src/mixins/base-transition.js +++ b/src/mixins/base-transition.js @@ -52,18 +52,19 @@ export const baseTransition = { return this.group ? 'transition-group' : 'transition'; }, cAttrs() { - const { appear, mode, tag } = this; - return { appear, mode, tag }; + const { appear, mode, tag, duration } = this; + return { appear, mode, tag, duration }; }, cHooks() { return { ...this.$listeners, beforeEnter: (...args) => { - this.onBegin?.(...args); + this.reduceTransition(...args); this.$emit('before-enter', ...args); }, beforeLeave: (...args) => { - this.onBegin?.(...args); + this.reduceTransition(...args); + this.initLeaving?.(...args); this.$emit('before-leave', ...args); }, enter: (...args) => { @@ -75,11 +76,13 @@ export const baseTransition = { this.$emit('leave', ...args); }, afterEnter: (...args) => { - this.onDone?.(...args); + this.resetTransition(...args); + this.resetElement?.(...args); this.$emit('after-enter', ...args); }, afterLeave: (...args) => { - this.onDone?.(...args); + this.resetTransition(...args); + this.resetElement?.(...args); this.$emit('after-leave', ...args); }, }; @@ -95,19 +98,20 @@ export const baseTransition = { element.style.setProperty('transition-timing-function', `${easing}`, 'important'); element.style.setProperty('transition-delay', `${delay}ms`, 'important'); }, + reduceTransition(element) { element.style.setProperty('transition-duration', '0ms', 'important'); element.style.setProperty('transition-delay', '0ms', 'important'); }, + resetTransition(element) { element.style.removeProperty('transition-duration'); element.style.removeProperty('transition-timing-function'); element.style.removeProperty('transition-delay'); }, - async initLeaving(element) { - if (!this.group || this.noMove) { - return element; - } + + initLeaving(element) { + if (!this.group || this.noMove) return element; const styles = getComputedStyle(element); const { width, height } = styles; diff --git a/src/transitions/transition-expand/transition-expand.vue b/src/transitions/transition-expand/transition-expand.vue index ca76128..b772a2d 100644 --- a/src/transitions/transition-expand/transition-expand.vue +++ b/src/transitions/transition-expand/transition-expand.vue @@ -33,10 +33,6 @@ data: () => ({}), computed: {}, methods: { - onBegin(element) { - this.reduceTransition(element); - }, - onEnter(element) { this.getSizes(element); this.collapseElement(element, 'enter'); @@ -47,22 +43,15 @@ this.$nextTick(() => this.expandElement(element, 'enter')); }, - async onLeave(element) { + onLeave(element) { this.getSizes(element); this.expandElement(element, 'leave'); - element.offsetTop; // eslint-disable-line no-unused-expressions - await this.initLeaving(element); this.setupTransition(element, 'leave'); this.collapseElement(element, 'leave'); }, - onDone(element) { - this.resetTransition(element); - this.resetElement(element); - }, - expandElement(element, event = 'enter') { const axis = this.axis?.[event] ?? this.axis; const start = axis === 'x' ? 'left' : 'top'; diff --git a/src/transitions/transition-fade/transition-fade.vue b/src/transitions/transition-fade/transition-fade.vue index b7524bb..1cc9abd 100644 --- a/src/transitions/transition-fade/transition-fade.vue +++ b/src/transitions/transition-fade/transition-fade.vue @@ -21,10 +21,6 @@ data: () => ({}), computed: {}, methods: { - onBegin(element) { - this.reduceTransition(element); - }, - onEnter(element) { this.fadeElement(element, 'enter'); element.offsetTop; // eslint-disable-line no-unused-expressions @@ -33,18 +29,11 @@ this.$nextTick(() => element.style.removeProperty('opacity')); }, - async onLeave(element) { - await this.initLeaving(element); - + onLeave(element) { this.setupTransition(element, 'leave'); this.fadeElement(element, 'leave'); }, - onDone(element) { - this.resetTransition(element); - this.resetElement(element); - }, - fadeElement(element, event = 'enter') { element.style.setProperty('opacity', 0); }, diff --git a/src/transitions/transition-scale/transition-scale.vue b/src/transitions/transition-scale/transition-scale.vue index 99bdf72..700d910 100644 --- a/src/transitions/transition-scale/transition-scale.vue +++ b/src/transitions/transition-scale/transition-scale.vue @@ -40,10 +40,6 @@ data: () => ({}), computed: {}, methods: { - onBegin(element) { - this.reduceTransition(element); - }, - onEnter(element) { this.scaleElement(element, 'enter'); element.offsetTop; // eslint-disable-line no-unused-expressions @@ -55,18 +51,11 @@ }); }, - async onLeave(element) { - await this.initLeaving(element); - + onLeave(element) { this.setupTransition(element, 'leave'); this.scaleElement(element, 'leave'); }, - onDone(element) { - this.resetTransition(element); - this.resetElement(element); - }, - scaleElement(element, event = 'enter') { const { transform } = getComputedStyle(element); diff --git a/src/transitions/transition-slide/transition-slide.vue b/src/transitions/transition-slide/transition-slide.vue index 1cc7101..9ed8aef 100644 --- a/src/transitions/transition-slide/transition-slide.vue +++ b/src/transitions/transition-slide/transition-slide.vue @@ -30,33 +30,20 @@ data: () => ({}), computed: {}, methods: { - onBegin(element) { - this.reduceTransition(element); - }, - onEnter(element) { this.slideElement(element, 'enter'); element.offsetTop; // eslint-disable-line no-unused-expressions this.setupTransition(element, 'enter'); - this.$nextTick(() => { - element.style.removeProperty('opacity'); - element.style.removeProperty('transform'); - }); + element.style.removeProperty('opacity'); + element.style.removeProperty('transform'); }, - async onLeave(element) { - await this.initLeaving(element); - + onLeave(element) { this.setupTransition(element, 'leave'); this.slideElement(element, 'leave'); }, - onDone(element) { - this.resetTransition(element); - this.resetElement(element); - }, - slideElement(element, event = 'enter') { const { width, height, transform } = getComputedStyle(element); @@ -64,12 +51,12 @@ let [offsetX, offsetY] = offset; if (!isNumeric(offsetX)) { - const val = parseFloat(offsetX.slice(0, -1)); - offsetX = parseFloat(width) * val / 100; + const val = offsetX.endsWith('%') ? parseFloat(offsetX.slice(0, -1)) : parseFloat(offsetX); + offsetX = parseFloat(width) * (val || 0) / 100; } if (!isNumeric(offsetY)) { - const val = parseFloat(offsetY.slice(0, -1)); + const val = offsetY.endsWith('%') ? parseFloat(offsetY.slice(0, -1)) : parseFloat(offsetY); offsetY = parseFloat(height) * val / 100; } From cbb94f1f84ab72a6e4c35be4ec115f369f899a73 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 03:47:23 +0300 Subject: [PATCH 11/21] fix: Add `transform` transition-property to `expand` transition To make sure it animates correctly in group mode --- src/transitions/transition-expand/transition-expand.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transitions/transition-expand/transition-expand.scss b/src/transitions/transition-expand/transition-expand.scss index 56afcb9..9a6b539 100644 --- a/src/transitions/transition-expand/transition-expand.scss +++ b/src/transitions/transition-expand/transition-expand.scss @@ -3,7 +3,7 @@ .expand-enter-active, .expand-leave-active { overflow: hidden; - transition-property: opacity, width, height, margin, padding !important; + transition-property: opacity, width, height, margin, padding, transform !important; } .expand-move { From 496a17c9183a53d90ea967b39049c4f98ddb824e Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 04:53:35 +0300 Subject: [PATCH 12/21] feat: Respect the existing element opacity during expand --- .../transition-expand/transition-expand.vue | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/transitions/transition-expand/transition-expand.vue b/src/transitions/transition-expand/transition-expand.vue index b772a2d..160d83f 100644 --- a/src/transitions/transition-expand/transition-expand.vue +++ b/src/transitions/transition-expand/transition-expand.vue @@ -13,12 +13,6 @@ import { baseTransition } from '../../mixins/base-transition.js'; import { validateExpandAxis } from '../../utility/validate/validate-expand-axis.js'; - const elementVisual = { - size: { x: 0, y: 0 }, - padding: { x: [0, 0], y: [0, 0] }, - margin: { x: [0, 0], y: [0, 0] }, - }; - export default { name: 'transition-expand', mixins: [ @@ -57,13 +51,14 @@ const start = axis === 'x' ? 'left' : 'top'; const end = axis === 'x' ? 'right' : 'bottom'; - const size = elementVisual.size[axis]; - const margin = elementVisual.margin[axis]; - const padding = elementVisual.padding[axis]; + const size = element.visual.size[axis]; + const margin = element.visual.margin[axis]; + const padding = element.visual.padding[axis]; if (!this.noOpacity) { - element.style.setProperty('opacity', 1); + element.style.setProperty('opacity', element.visual.opacity); } + delete element.visual; element.style.setProperty(axis === 'x' ? 'width' : 'height', `${parseFloat(size)}px`); element.style.setProperty(`padding-${start}`, `${parseFloat(padding[0])}px`); @@ -105,17 +100,17 @@ getSizes(element) { const styles = getComputedStyle(element); - + const { opacity } = styles; const { width, height } = styles; const { paddingTop, paddingRight, paddingBottom, paddingLeft } = styles; const { marginTop, marginRight, marginBottom, marginLeft } = styles; - elementVisual.size.x = width; - elementVisual.size.y = height; - elementVisual.padding.x = [paddingLeft, paddingRight]; - elementVisual.padding.y = [paddingTop, paddingBottom]; - elementVisual.margin.x = [marginLeft, marginRight]; - elementVisual.margin.y = [marginTop, marginBottom]; + element.visual = { + opacity, + size: { x: width, y: height }, + padding: { x: [paddingLeft, paddingRight], y: [paddingTop, paddingBottom] }, + margin: { x: [marginLeft, marginRight], y: [marginTop, marginBottom] }, + }; }, }, }; From e7f2028e57b617c6699f2508b54fac3e004fd6d2 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 04:54:09 +0300 Subject: [PATCH 13/21] refactor: More safe `setMoveDuration` --- src/mixins/base-transition.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mixins/base-transition.js b/src/mixins/base-transition.js index e255cac..8bd5642 100644 --- a/src/mixins/base-transition.js +++ b/src/mixins/base-transition.js @@ -125,9 +125,10 @@ export const baseTransition = { return element; }, + setMoveDuration() { - if (this.group) { - this.$el.style.setProperty('--move-duration', `${this.moveDuration}ms`); + if (this.group && this.$el) { + this.$el.style?.setProperty('--move-duration', `${this.moveDuration}ms`); } }, }, @@ -136,7 +137,7 @@ export const baseTransition = { this.setMoveDuration(); }, group() { - this.$el && this.setMoveDuration(); + this.setMoveDuration(); }, }, mounted() { From 91715dea3e7f64240f33705f1f642bab09a13231 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 06:06:06 +0300 Subject: [PATCH 14/21] feat: Playground is done --- .../prop-control-number.vue | 2 +- .../transition-proxy/transition-proxy.scss | 90 +++++++++- .../transition-proxy/transition-proxy.vue | 156 ++++++++++++++---- playground/index.html | 25 ++- playground/main.js | 2 - src/utility/defaults/defaults.js | 3 + 6 files changed, 222 insertions(+), 56 deletions(-) diff --git a/playground/components/prop-control/_prop-control-number/prop-control-number.vue b/playground/components/prop-control/_prop-control-number/prop-control-number.vue index 44a7542..7685bc7 100644 --- a/playground/components/prop-control/_prop-control-number/prop-control-number.vue +++ b/playground/components/prop-control/_prop-control-number/prop-control-number.vue @@ -14,7 +14,7 @@ v-bem:value key="out" :min="0" - :step="50" + :step="step" :value="value[1]" @change="(v) => onChange(v, 'out')" /> diff --git a/playground/components/transition-proxy/transition-proxy.scss b/playground/components/transition-proxy/transition-proxy.scss index 4160ddd..d9d767e 100644 --- a/playground/components/transition-proxy/transition-proxy.scss +++ b/playground/components/transition-proxy/transition-proxy.scss @@ -15,6 +15,24 @@ max-width: 480px; } + &__preview-hint { + @include font('14px/1.5'); + display: flex; + justify-content: center; + align-items: center; + height: 88px; + margin-bottom: 24px; + padding: 16px; + color: #005281; + text-align: center; + background: rgba(#0081cc, .05); + border-radius: 8px; + + @media (min-width: 360px) { + @include font('16px'); + } + } + &__preview-wrapper { @include aspect-ratio(300, 180); display: flex; @@ -34,7 +52,7 @@ transition: opacity .3s; @include parent-state('--mode-group') { - opacity: 0; + @include hidden-element(-1); } } @@ -44,7 +62,7 @@ } &__preview-single { - @include pos-abs(24px); + @include pos-abs(16px); @include font('500 18px/1'); display: flex; justify-content: center; @@ -52,32 +70,86 @@ color: #ffffff; background: #0081cc; border-radius: 4px; + + @media (min-width: 480px) { + @include pos-abs(24px); + } } &__preview-group { - @include pos-abs(24px); + @include pos-abs(16px); @include font('500 18px/1'); display: grid; grid-template-rows: repeat(3, 1fr); - grid-template-columns: repeat(5, 1fr); - gap: 32px; + grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr 24px 1fr; + gap: 16px 0; + + @media (min-width: 480px) { + @include pos-abs(24px); + grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr 32px 1fr; + gap: 32px 0; + } } &__preview-group-item { + @include reset-button; @include aspect-ratio(1, 1); border-radius: 4px; + transition-property: box-shadow, opacity, transform; + transition-duration: .1s; + cursor: pointer; + + &::after { + @include pseudo; + @include box(16px, 2px); + @include pos-abs(50% n n 50%); + @include margin(-1px n n -8px); + background: #ffffff; + opacity: 0; + transform: translateY(4px); + transition-property: transform, opacity; + transition-duration: .2s; + + @include parent-state(':hover') { + @media (hover: hover) { + opacity: 1; + transform: none; + } + } + + @include parent-state('--disabled') { + display: none; + } + } + + &--disabled { + pointer-events: none; + } } &__preview-group-item-add { - @include pos-abs(0 n 0 100%); + @include reset-button; display: flex; justify-content: center; align-items: center; - width: 32px; + width: 24px; opacity: .2; + transition-property: opacity, visibility; + transition-duration: .2s; + cursor: pointer; + + @media (min-width: 480px) { + width: 32px; + } &:hover { - opacity: 1; + @media (hover: hover) { + opacity: 1; + } + } + + &--hidden { + @include hidden-element; } } @@ -92,7 +164,7 @@ gap: 16px; } - &__controls-separate { + &__controls-checkbox { grid-column: span 2; } diff --git a/playground/components/transition-proxy/transition-proxy.vue b/playground/components/transition-proxy/transition-proxy.vue index 9c7c877..4e5ac2f 100644 --- a/playground/components/transition-proxy/transition-proxy.vue +++ b/playground/components/transition-proxy/transition-proxy.vue @@ -1,6 +1,16 @@ @@ -38,22 +62,32 @@
- + {{ option.label }} - - + Single Group - --> + + + + +
@@ -116,10 +150,10 @@ key="prop-value" v-model="scale" v-bind="{ isSeparated }" - label="Value" + label="Scale value" :min="0" :max="1" - :step="0.05" + :step=".05" /> @@ -181,10 +215,13 @@ }, data: () => ({ previewTransition: 'transition-slide', + previewTransitionControl: 'transition-slide', + previewMode: 'single', + previewModeControl: 'single', previewActive: true, previewItems: [], - isSeparated: false, + isSeparated: true, duration: defaults.transitionDuration, delay: defaults.transitionDelay, @@ -194,6 +231,8 @@ scale: defaults.scaleValue, offset: defaults.slideOffset, moveDuration: defaults.moveDuration, + noOpacity: defaults.noOpacity, + noMove: defaults.noMove, }), computed: { isSinglePreview() { @@ -216,7 +255,7 @@ ? { enter: this.offset[0], leave: this.offset[1] } : this.offset; - const moveDuration = this.optionMoveDuration; + const { moveDuration, noMove, noOpacity } = this; return { duration, @@ -227,30 +266,79 @@ origin, scale, moveDuration, + noMove, + noOpacity, }; }, }, watch: { - cTransition() { - this.switchPreview(); + previewTransition() { + this.setData(); }, - cGroup() { - this.switchPreview(); + previewTransitionControl(to) { + if (this.previewMode === 'group') { + return (this.previewTransition = to); + } + const delay = this.previewActive ? (isArray(this.duration) ? this.duration[0] : this.duration) : -100; + this.previewActive = false; + setTimeout(() => { + this.previewTransition = to; + this.previewActive = true; + }, delay + 100); + }, + previewModeControl(to) { + let delay = isArray(this.duration) ? this.duration[0] : this.duration; + if (this.previewMode === 'single') { + if (!this.previewActive) delay = -100; + this.previewActive = false; + } else { + this.previewItems = []; + this.previewActive = true; + } + setTimeout(() => { + this.previewMode = to; + if (to === 'group') { + this.addItem(); + } + }, delay + 100); }, }, methods: { + setData() { + const propsToSet = [ + 'duration', + 'delay', + 'easing', + 'axis', + 'origin', + 'scale', + 'offset', + ]; + + propsToSet.forEach(prop => { + const [toCheck, toSet] = prop === 'offset' + ? [this.offset[0], this.isSeparated ? this.offset : this.offset[0]] + : [this[prop], this[prop]]; + if (this.isSeparated && !isArray(toCheck)) { + this[prop] = [toSet, toSet]; + } + if (!this.isSeparated && isArray(toCheck)) { + this[prop] = toSet; + } + }); + }, + switchPreview() { const delay = (this.previewActive ? this.optionDurationOut : 0) + 20; this.previewActive = false; setTimeout(() => { - this.previewTransition = this.cTransition; this.previewMode = this.previewMode === 'single' ? 'group' : 'single'; this.previewActive = true; }, delay); }, - addItem() { - const index = randomInteger(0, this.previewItems.length); + + addItem(index = 0) { this.previewItems.splice(index, 0, { hash: randomString(), styles: { @@ -262,15 +350,13 @@ }, }); }, - removeItem(e, index) { - const random = randomInteger(0, this.previewItems.length - 1); - this.previewItems.splice(index ?? random, 1); + + removeItem(index) { + this.previewItems.splice(index, 1); }, }, - created() { - for (let i = 0; i < 7; i++) { - this.addItem(); - } + mounted() { + this.setData(); }, }; diff --git a/playground/index.html b/playground/index.html index b4a347f..ec45fe9 100644 --- a/playground/index.html +++ b/playground/index.html @@ -1,12 +1,19 @@ - - - - More Vue2 transitions - - -
- - + + + + + + + + + + Vue transitions + + + +
+ + diff --git a/playground/main.js b/playground/main.js index 2f538a2..1fd3734 100644 --- a/playground/main.js +++ b/playground/main.js @@ -4,8 +4,6 @@ import ElementUI from 'element-ui'; import MoreVueTransitions from '../src/index.js'; import App from './app.vue'; -import 'element-ui/lib/theme-chalk/index.css'; - Vue.use(MoreVueTransitions); Vue.use(ElementUI); Vue.use(vuePlugin({ diff --git a/src/utility/defaults/defaults.js b/src/utility/defaults/defaults.js index a1349fc..f144b16 100644 --- a/src/utility/defaults/defaults.js +++ b/src/utility/defaults/defaults.js @@ -11,3 +11,6 @@ export const scaleOrigin = '50% 50%'; export const scaleValue = 0; export const moveDuration = transitionDuration; + +export const noOpacity = false; +export const noMove = false; From a437e6e8dd4f4b2492e15b7166971be5389a5b43 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 06:45:08 +0300 Subject: [PATCH 15/21] chore: Update VSCode project settings --- .vscode/settings.template.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.template.json b/.vscode/settings.template.json index 54edac3..0b54ca4 100644 --- a/.vscode/settings.template.json +++ b/.vscode/settings.template.json @@ -1,12 +1,14 @@ { "prettier.enable": false, "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "html", "vue", - "yaml", - "json", - "jsonc", - "json5", - "markdown" + "markdown", + "yaml" ], "editor.codeActionsOnSave": { "source.fixAll.eslint": true, From bb821aae7dce3b32224e9b79bfb9b3d4f3104417 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 06:46:34 +0300 Subject: [PATCH 16/21] fix: Correct work with percentage value in `transition-slide` --- .../transition-slide/transition-slide.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/transitions/transition-slide/transition-slide.vue b/src/transitions/transition-slide/transition-slide.vue index 9ed8aef..02e35a2 100644 --- a/src/transitions/transition-slide/transition-slide.vue +++ b/src/transitions/transition-slide/transition-slide.vue @@ -51,13 +51,17 @@ let [offsetX, offsetY] = offset; if (!isNumeric(offsetX)) { - const val = offsetX.endsWith('%') ? parseFloat(offsetX.slice(0, -1)) : parseFloat(offsetX); - offsetX = parseFloat(width) * (val || 0) / 100; + const val = offsetX.endsWith('%') + ? parseFloat(width) * (parseFloat(offsetX.slice(0, -1)) || 0) / 100 + : parseFloat(offsetX); + offsetX = val; } if (!isNumeric(offsetY)) { - const val = offsetY.endsWith('%') ? parseFloat(offsetY.slice(0, -1)) : parseFloat(offsetY); - offsetY = parseFloat(height) * val / 100; + const val = offsetY.endsWith('%') + ? parseFloat(height) * (parseFloat(offsetY.slice(0, -1)) || 0) / 100 + : parseFloat(offsetY); + offsetY = val; } const [matrixType, matrix] = getMatrix(transform); From d87703d3d854ec8407e39c33dd40f1804194fb47 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 06:50:05 +0300 Subject: [PATCH 17/21] chore: Separate Vite configs to make the playground --- .github/workflows/build.yaml | 7 +++++-- .github/workflows/release.yaml | 2 +- .gitignore | 1 + package.json | 5 +++-- vite.config.js => vite/vite-dev.config.js | 16 ++++----------- vite/vite-lib.config.js | 25 +++++++++++++++++++++++ 6 files changed, 39 insertions(+), 17 deletions(-) rename vite.config.js => vite/vite-dev.config.js (67%) create mode 100644 vite/vite-lib.config.js diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 48fcf5e..e2767e2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,5 +28,8 @@ jobs: - name: Testing run: yarn test - - name: Build - run: yarn build + - name: Build lib + run: yarn build:lib + + - name: Build playground + run: yarn build:playground diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index abaaba7..bf8920e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: run: yarn install - name: Build - run: yarn build + run: yarn build:lib - name: Create release uses: softprops/action-gh-release@v1 diff --git a/.gitignore b/.gitignore index 85569ce..62d25ed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ dist build tmp +playground-bundle # Editors .idea diff --git a/package.json b/package.json index f59d174..3374783 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,9 @@ "module": "./dist/vue-transitions.es.js", "browser": "./dist/vue-transitions.umd.js", "scripts": { - "dev": "vite", - "build": "vite build", + "dev": "vite --config vite/vite-dev.config.js", + "build:playground": "vite build --config vite/vite-dev.config.js", + "build:lib": "vite build --config vite/vite-lib.config.js", "prepare": "husky install ./.husky && yarn more-sass-clone", "vscode-settings": "cp .vscode/settings.template.json .vscode/settings.json", "more-sass-clone": "rm -rf .more-sass && cp -r ./node_modules/more-sass ./.more-sass", diff --git a/vite.config.js b/vite/vite-dev.config.js similarity index 67% rename from vite.config.js rename to vite/vite-dev.config.js index 0996aee..d5662e4 100644 --- a/vite.config.js +++ b/vite/vite-dev.config.js @@ -13,6 +13,7 @@ export default defineConfig({ ], server: { port: 3000, + open: true, }, define: {}, css: { @@ -23,22 +24,13 @@ export default defineConfig({ }, }, build: { + assetsDir: 'vue-transitions', minify: 'terser', - lib: { - entry: '../src/index.js', - formats: ['es', 'cjs', 'umd'], - name: 'vueTransitions', - fileName: (format) => `vue-transitions.${format}.js`, - }, - cssCodeSplit: true, rollupOptions: { - external: ['vue'], output: { - dir: 'dist', - globals: { - vue: 'Vue', - }, + dir: 'playground-bundle', }, + input: './playground/index.html', }, }, }); diff --git a/vite/vite-lib.config.js b/vite/vite-lib.config.js new file mode 100644 index 0000000..e0e50ed --- /dev/null +++ b/vite/vite-lib.config.js @@ -0,0 +1,25 @@ +import { defineConfig } from 'vite'; +import { createVuePlugin } from 'vite-plugin-vue2'; + +export default defineConfig({ + plugins: [createVuePlugin()], + build: { + minify: 'terser', + lib: { + entry: './src/index.js', + formats: ['es', 'cjs', 'umd'], + name: 'vueTransitions', + fileName: (format) => `vue-transitions.${format}.js`, + }, + cssCodeSplit: true, + rollupOptions: { + external: ['vue'], + output: { + dir: 'dist', + globals: { + vue: 'Vue', + }, + }, + }, + }, +}); From 27b09274c0dd9e3f0a59b3c54427adfeed510519 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 06:53:59 +0300 Subject: [PATCH 18/21] ci: Add playground publish to GH pages --- .github/workflows/playground.yaml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/playground.yaml diff --git a/.github/workflows/playground.yaml b/.github/workflows/playground.yaml new file mode 100644 index 0000000..5d39d78 --- /dev/null +++ b/.github/workflows/playground.yaml @@ -0,0 +1,33 @@ +name: Playground + +on: + push: + branches: [master] + paths: + - playground/** + # workflow_dispatch: {} + +jobs: + publish-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16' + cache: yarn + + - name: Install dependencies + run: yarn install + + - name: Build playground + run: yarn build:playground + + - name: Publish to GH pages + uses: JamesIves/github-pages-deploy-action@v4.2.5 + with: + branch: gh-pages + folder: playground-bundle From 267a0a40b9a7dd3e6b6ac80cceaab3721f929283 Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 06:59:35 +0300 Subject: [PATCH 19/21] chore: Update linters to skip playground lint --- .eslintignore | 1 + .stylelintignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.eslintignore b/.eslintignore index f12f84b..d26e62c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -8,6 +8,7 @@ dist build tmp node_modules +playground-bundle LICENSE.md CHANGELOG.md diff --git a/.stylelintignore b/.stylelintignore index 42a399f..c32d26f 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -3,5 +3,6 @@ dist build tmp node_modules +playground-bundle .more-sass From 96e32c4d1794cfef38a649a0c0469fa53c8c0a8b Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 07:01:09 +0300 Subject: [PATCH 20/21] chore: Update `release-it` config to fit new `scripts` section --- .release-it.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.release-it.yaml b/.release-it.yaml index 4d4b1a9..1c6357c 100644 --- a/.release-it.yaml +++ b/.release-it.yaml @@ -39,7 +39,8 @@ plugins: hooks: before:init: - yarn lint:fix - - yarn build + - yarn build:lib + - yarn build:playground after:init: - yarn lint - yarn test From fbd5c2849b681f9437daefc1554003bd8bb3399a Mon Sep 17 00:00:00 2001 From: MorevM Date: Sun, 27 Mar 2022 07:03:33 +0300 Subject: [PATCH 21/21] release: Release version 1.1.0 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5891ecb..5e08213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,46 @@ -## [1.0.0](https://github.com/MorevM/vue-transitions/compare/v0.0.2...v1.0.0) (2022-03-25) +## [1.1.0](https://github.com/MorevM/vue-transitions/compare/v1.0.0...v1.1.0) (2022-03-27) + + +### Features + +* Playground is done ([91715de](https://github.com/MorevM/vue-transitions/commit/91715dea3e7f64240f33705f1f642bab09a13231)) +* Respect the existing element opacity during expand ([496a17c](https://github.com/MorevM/vue-transitions/commit/496a17c9183a53d90ea967b39049c4f98ddb824e)) + + +### Refactoring + +* More safe `setMoveDuration` ([e7f2028](https://github.com/MorevM/vue-transitions/commit/e7f2028e57b617c6699f2508b54fac3e004fd6d2)) + + +### Bug fixes + +* Add `transform` transition-property to `expand` transition ([cbb94f1](https://github.com/MorevM/vue-transitions/commit/cbb94f1f84ab72a6e4c35be4ec115f369f899a73)) +* Correct order of style actions, refactoring the code ([355bffe](https://github.com/MorevM/vue-transitions/commit/355bffe533f45af00fb7100de048740b0196803a)) +* Correct work with percentage value in `transition-slide` ([bb821aa](https://github.com/MorevM/vue-transitions/commit/bb821aae7dce3b32224e9b79bfb9b3d4f3104417)) +* Set `important` flag to all style transformations ([368c139](https://github.com/MorevM/vue-transitions/commit/368c139c813f67838306d18063f65b0f3fecf19d)) + + +### CI improvements + +* Add playground publish to GH pages ([27b0927](https://github.com/MorevM/vue-transitions/commit/27b09274c0dd9e3f0a59b3c54427adfeed510519)) + + +### Chores + +* Add `dependabot` ([f9b59a9](https://github.com/MorevM/vue-transitions/commit/f9b59a93ada5b6439fe7fd78d7dead07037e37c2)) +* bump @morev/commitlint-config from 0.1.0 to 0.1.1 ([#5](https://github.com/MorevM/vue-transitions/issues/5)) ([9d03fc5](https://github.com/MorevM/vue-transitions/commit/9d03fc5eb80bfb84205214ba568bf44983fccc3b)) +* bump @morev/eslint-config from 10.0.2 to 10.0.3 ([#2](https://github.com/MorevM/vue-transitions/issues/2)) ([ccf2108](https://github.com/MorevM/vue-transitions/commit/ccf21087da7b61663b9ab1602cfc0be60c1b2929)) +* bump @morev/helpers from 0.8.0 to 0.8.1 ([#3](https://github.com/MorevM/vue-transitions/issues/3)) ([1d08a8d](https://github.com/MorevM/vue-transitions/commit/1d08a8dd62da2a6fcf75f2db7d62aae6d3bc00c2)) +* bump @morev/stylelint-config from 1.0.2 to 1.0.3 ([#9](https://github.com/MorevM/vue-transitions/issues/9)) ([a0e6226](https://github.com/MorevM/vue-transitions/commit/a0e6226aeb378659f69b17a0db2ef9d85afc625f)) +* bump @morev/v-bem-transformer from 0.0.4 to 0.0.5 ([#7](https://github.com/MorevM/vue-transitions/issues/7)) ([e0b96b4](https://github.com/MorevM/vue-transitions/commit/e0b96b4196f295030efeb17c722456c9bc07d6d0)) +* bump eslint from 8.11.0 to 8.12.0 ([#8](https://github.com/MorevM/vue-transitions/issues/8)) ([f3f95a3](https://github.com/MorevM/vue-transitions/commit/f3f95a3fc144abf45f544bcfc352937761c2591b)) +* bump more-sass from 1.0.5 to 1.0.7 ([#6](https://github.com/MorevM/vue-transitions/issues/6)) ([b2f6422](https://github.com/MorevM/vue-transitions/commit/b2f64223baa3dfdb5f45f9b524b98e28f1b33a03)) +* Separate Vite configs to make the playground ([d87703d](https://github.com/MorevM/vue-transitions/commit/d87703d3d854ec8407e39c33dd40f1804194fb47)) +* Update `release-it` config to fit new `scripts` section ([96e32c4](https://github.com/MorevM/vue-transitions/commit/96e32c4d1794cfef38a649a0c0469fa53c8c0a8b)) +* Update linters to skip playground lint ([267a0a4](https://github.com/MorevM/vue-transitions/commit/267a0a40b9a7dd3e6b6ac80cceaab3721f929283)) +* Update VSCode project settings ([a437e6e](https://github.com/MorevM/vue-transitions/commit/a437e6e8dd4f4b2492e15b7166971be5389a5b43))## [1.0.0](https://github.com/MorevM/vue-transitions/compare/v0.0.2...v1.0.0) (2022-03-25) ⚠ BREAKING CHANGES: * Prop `move-disable` was renamed to `no-disable` @@ -38,4 +78,4 @@ ### Bug fixes * Add CSS file exports ([1a1dc50](https://github.com/MorevM/vue-transitions/commit/1a1dc50ff1dd31f8043002864bbe5224b31019ef)) -* Correct initial transform of `transition-slide` ([141e1e5](https://github.com/MorevM/vue-transitions/commit/141e1e5fa0a3414dd47132bd381ca3837058c88d))### 0.0.1 (2022-03-18) +* Correct initial transform of `transition-slide` ([141e1e5](https://github.com/MorevM/vue-transitions/commit/141e1e5fa0a3414dd47132bd381ca3837058c88d))### 0.0.1 (2022-03-18) \ No newline at end of file diff --git a/package.json b/package.json index 2dbfc8b..37b4994 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@morev/vue-transitions", "description": "Shareable Vue transitions library", - "version": "1.0.0", + "version": "1.1.0", "private": false, "license": "MIT", "publishConfig": {