diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9bb2e5c07..e683f83ca 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/php:1-8.3-bullseye +FROM mcr.microsoft.com/devcontainers/php:8.3-trixie # Remove broken Yarn repo RUN rm -f /etc/apt/sources.list.d/yarn.list diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 2c3a69fc7..485f25dfa 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -22,7 +22,7 @@ jobs: - name: Setup PHP with composer v2 uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' tools: composer:v2 - name: Configure npm for GitHub Packages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 555fbe7e6..55dba0d66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Bump version files (no release yet) uses: helsingborg-stad/release-wp-plugin-action@main with: - php-version: 8.2 + php-version: 8.3 node-version: 24.3.0 skip-release: true # custom flag you added @@ -43,7 +43,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.2" + php-version: "8.3" - name: Configure npm for GitHub Packages run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 036cf7d48..1ac71e124 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' tools: composer:v2 - name: Install composer packages diff --git a/composer.json b/composer.json index bfbf9f691..1bed1f818 100644 --- a/composer.json +++ b/composer.json @@ -1,69 +1,69 @@ { - "name": "helsingborg-stad/styleguide", - "license": "MIT", - "type": "library", - "authors": [ - { - "name": "Sebastian Thulin", - "email": "sebastian.thulin@helsingborg.se" - }, - { - "name": "Nikolas Ramstedt", - "email": "nikolas.ramstedt@helsingborg.se" - }, - { - "name": "Jonatan Hanson", - "email": "jonatan.hanson@helsingborg.se" - }, - { - "name": "Johan Silvergrund", - "email": "johan.silvergrund@hiq.se" - } - ], - "minimum-stability": "stable", - "repositories": [ - { - "type": "composer", - "url": "https://packagist.org" - }, - { - "type": "composer", - "url": "https://wpackagist.org" - } - ], - "autoload": { - "psr-4": { - "MunicipioStyleGuide\\": "source/php/", - "MunicipioStyleGuide\\Validators\\": "source/validators/" - } - }, - "require": { - "php": "^8.2", - "erusev/parsedown": "^1.7", - "helsingborg-stad/component-library": "5.24.3", - "ramsey/uuid": "4.9.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.6", - "carthage-software/mago": "1.26.0" - }, - "config": { - "allow-plugins": { - "carthage-software/mago": true - } - }, - "scripts": { - "test": "XDEBUG_MODE=off vendor/bin/phpunit --testdox", - "test:filter": "XDEBUG_MODE=off vendor/bin/phpunit --filter", - "lint": "vendor/bin/mago lint", - "fix": "vendor/bin/mago lint --format-after-fix --fix", - "format": "vendor/bin/mago fmt", - "serve": "php -S 127.0.0.1:0 router.php", - "cache": "php cli.php cache", - "cache:clear:blade": "php cli.php cache --clear --blade blade", - "pin-all-latest": [ - "bash -c 'set -euo pipefail; composer outdated --direct --format=json --ignore-platform-req=ext-imagick | jq -c \".installed[] | select(.latest != null and .latest != \\\"[none matched]\\\" and (.latest | startswith(\\\"dev-\\\") | not)) | {name:.name, version:.latest}\" | while read -r row; do PKG=$(echo \"$row\" | jq -r .name); VER=$(echo \"$row\" | jq -r .version); CURRENT=$(jq -r --arg p \"$PKG\" \".require[\\$p] // \\\"\\\"\" composer.json); if [ -z \"$CURRENT\" ]; then echo \"Skipping $PKG (not in root composer.json)\"; elif [[ \"$CURRENT\" == dev-* ]]; then echo \"Skipping $PKG (current version is dev)\"; else echo \"Updating $PKG to $VER\"; jq --arg p \"$PKG\" --arg v \"$VER\" \".require[\\$p] = \\$v\" composer.json > composer.json.tmp && mv composer.json.tmp composer.json; fi; done'", - "composer update --lock --ignore-platform-req=ext-imagick -W" - ] - } + "name": "helsingborg-stad/styleguide", + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Sebastian Thulin", + "email": "sebastian.thulin@helsingborg.se" + }, + { + "name": "Nikolas Ramstedt", + "email": "nikolas.ramstedt@helsingborg.se" + }, + { + "name": "Jonatan Hanson", + "email": "jonatan.hanson@helsingborg.se" + }, + { + "name": "Johan Silvergrund", + "email": "johan.silvergrund@hiq.se" + } + ], + "minimum-stability": "stable", + "repositories": [ + { + "type": "composer", + "url": "https://packagist.org" + }, + { + "type": "composer", + "url": "https://wpackagist.org" + } + ], + "autoload": { + "psr-4": { + "MunicipioStyleGuide\\": "source/php/", + "MunicipioStyleGuide\\Validators\\": "source/validators/" + } + }, + "require": { + "php": "^8.3", + "erusev/parsedown": "^1.7", + "helsingborg-stad/component-library": "5.24.3", + "ramsey/uuid": "4.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^11.5", + "carthage-software/mago": "1.26.0" + }, + "config": { + "allow-plugins": { + "carthage-software/mago": true + } + }, + "scripts": { + "test": "XDEBUG_MODE=off vendor/bin/phpunit --testdox", + "test:filter": "XDEBUG_MODE=off vendor/bin/phpunit --filter", + "lint": "vendor/bin/mago lint", + "fix": "vendor/bin/mago lint --format-after-fix --fix", + "format": "vendor/bin/mago fmt", + "serve": "php -S 127.0.0.1:0 router.php", + "cache": "php cli.php cache", + "cache:clear:blade": "php cli.php cache --clear --blade blade", + "pin-all-latest": [ + "bash -c 'set -euo pipefail; composer outdated --direct --format=json --ignore-platform-req=ext-imagick | jq -c \".installed[] | select(.latest != null and .latest != \\\"[none matched]\\\" and (.latest | startswith(\\\"dev-\\\") | not)) | {name:.name, version:.latest}\" | while read -r row; do PKG=$(echo \"$row\" | jq -r .name); VER=$(echo \"$row\" | jq -r .version); CURRENT=$(jq -r --arg p \"$PKG\" \".require[\\$p] // \\\"\\\"\" composer.json); if [ -z \"$CURRENT\" ]; then echo \"Skipping $PKG (not in root composer.json)\"; elif [[ \"$CURRENT\" == dev-* ]]; then echo \"Skipping $PKG (current version is dev)\"; else echo \"Updating $PKG to $VER\"; jq --arg p \"$PKG\" --arg v \"$VER\" \".require[\\$p] = \\$v\" composer.json > composer.json.tmp && mv composer.json.tmp composer.json; fi; done'", + "composer update --lock --ignore-platform-req=ext-imagick -W" + ] + } } diff --git a/composer.lock b/composer.lock index 744cd1536..ad07bca53 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "afd158b5110903767f6815c70f95a66e", + "content-hash": "bcc4d62bf5d1f515d02cecf24bff3d05", "packages": [ { "name": "brick/math", @@ -1993,75 +1993,6 @@ ], "time": "2026-05-06T21:44:02+00:00" }, - { - "name": "doctrine/instantiator", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/23da848e1a2308728fe5fdddabf4be17ff9720c7", - "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7", - "shasum": "" - }, - "require": { - "php": "^8.4" - }, - "require-dev": { - "doctrine/coding-standard": "^14", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.5.58" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.1.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2026-01-05T06:47:08+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.13.4", @@ -2300,35 +2231,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.32", + "version": "11.0.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2c1ed04922802c15e1de5d7447b4856de949cf56", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-text-template": "^2.0.4", - "sebastian/code-unit-reverse-lookup": "^2.0.3", - "sebastian/complexity": "^2.0.3", - "sebastian/environment": "^5.1.5", - "sebastian/lines-of-code": "^1.0.4", - "sebastian/version": "^3.0.2", - "theseer/tokenizer": "^1.2.3" + "nikic/php-parser": "^5.7.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.1", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.3.1" }, "require-dev": { - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^11.5.46" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -2337,7 +2268,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "9.2.x-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -2366,40 +2297,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.12" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2024-08-22T04:23:01+00:00" + "time": "2025-12-24T07:01:01+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2f3a64888c814fc235386b7387dd5b5ed92ad903", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2426,36 +2369,49 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2026-02-02T13:52:54+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -2463,7 +2419,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2489,7 +2445,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -2497,32 +2454,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2548,7 +2505,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -2556,32 +2514,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -2607,7 +2565,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -2615,24 +2574,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.34", + "version": "11.5.55", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b36f02317466907a230d3aa1d34467041271ef4a" + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b36f02317466907a230d3aa1d34467041271ef4a", - "reference": "b36f02317466907a230d3aa1d34467041271ef4a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/adc7262fccc12de2b30f12a8aa0b33775d814f00", + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -2642,27 +2600,27 @@ "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.32", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.10", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.8", - "sebastian/global-state": "^5.0.8", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.12", + "phpunit/php-file-iterator": "^5.1.1", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.3", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.1", + "sebastian/exporter": "^6.3.2", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/recursion-context": "^6.0.3", + "sebastian/type": "^5.1.3", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -2670,7 +2628,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -2702,7 +2660,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.34" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.55" }, "funding": [ { @@ -2726,32 +2684,32 @@ "type": "tidelift" } ], - "time": "2026-01-27T05:45:00+00:00" + "time": "2026-02-18T12:37:06+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2774,7 +2732,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -2782,32 +2741,32 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2830,7 +2789,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" }, "funding": [ { @@ -2838,32 +2798,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2025-03-19T07:56:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2885,7 +2845,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -2893,34 +2854,39 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.10", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d" + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d", - "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -2959,7 +2925,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.10" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.3" }, "funding": [ { @@ -2979,33 +2946,33 @@ "type": "tidelift" } ], - "time": "2026-01-24T09:22:56+00:00" + "time": "2026-01-24T09:26:40+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3028,7 +2995,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -3036,33 +3004,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3094,7 +3062,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -3102,27 +3071,27 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-posix": "*" @@ -3130,7 +3099,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -3149,7 +3118,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -3157,42 +3126,55 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2025-05-21T11:55:47+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.8", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", - "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/70a298763b40b213ec087c51c739efcaa90bcd74", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -3234,7 +3216,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.2" }, "funding": [ { @@ -3254,38 +3237,35 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:03:27+00:00" + "time": "2025-09-24T06:12:51+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.8", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", - "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -3304,59 +3284,48 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", - "type": "tidelift" } ], - "time": "2025-08-10T07:10:35+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3379,7 +3348,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -3387,34 +3357,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3436,7 +3406,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -3444,32 +3415,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3491,7 +3462,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -3499,32 +3471,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.6", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "539c6691e0623af6dc6f9c20384c120f963465a0" + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0", - "reference": "539c6691e0623af6dc6f9c20384c120f963465a0", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3554,7 +3526,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3" }, "funding": [ { @@ -3574,32 +3547,32 @@ "type": "tidelift" } ], - "time": "2025-08-10T06:57:39+00:00" + "time": "2025-08-13T04:42:22+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.4", + "name": "sebastian/type", + "version": "5.1.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -3614,46 +3587,58 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.3" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" } ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2025-08-09T06:55:48+00:00" }, { - "name": "sebastian/type", - "version": "3.2.1", + "name": "sebastian/version", + "version": "5.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3672,11 +3657,12 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -3684,60 +3670,59 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2024-10-09T05:16:32+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "staabm/side-effects-detector", + "version": "1.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", "shasum": "" }, "require": { - "php": ">=7.3" + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" }, + "type": "library", "autoload": { "classmap": [ - "src/" + "lib/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/staabm", "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2024-10-20T05:08:20+00:00" }, { "name": "theseer/tokenizer", @@ -3796,8 +3781,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.2" + "php": "^8.3" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/mago.toml b/mago.toml index 60503bd70..1b802c955 100644 --- a/mago.toml +++ b/mago.toml @@ -1,6 +1,6 @@ # Welcome to Mago! # For full documentation, see https://mago.carthage.software/tools/overview -php-version = "8.2.0" +php-version = "8.3.0" [source] paths = ["source/php/"] diff --git a/phpunit.xml b/phpunit.xml index d37e7e1f3..4635c2c57 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,10 +1,11 @@ + failOnDeprecation="true" + failOnPhpunitDeprecation="true"> diff --git a/source/components/Tests/UnusedTokensTest.php b/source/components/Tests/UnusedTokensTest.php index 011e1ecb6..d3932f116 100644 --- a/source/components/Tests/UnusedTokensTest.php +++ b/source/components/Tests/UnusedTokensTest.php @@ -2,6 +2,8 @@ namespace MunicipioStyleGuide\Components\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\TestDox; use PHPUnit\Framework\TestCase; class UnusedTokensTest extends TestCase @@ -10,10 +12,8 @@ class UnusedTokensTest extends TestCase private const SHADOW_REQUIRED_TOKENS = ['shadow-amount', 'shadow-color']; private const TOKEN_EXCEPTIONS = self::SHADOW_REQUIRED_TOKENS; - /** - * @testdox component utilizes all tokens declared in component.json - * @dataProvider componentFilesProvider - */ + #[TestDox('component "$component" utilizes all tokens declared in component.json')] + #[DataProvider('componentFilesProvider')] public function testComponentUtilizeAllTokens(string $component, string $tokenFile, string $componentDir): void { $tokens = self::extractTokensFromTokenFile($tokenFile); diff --git a/source/components/chat/script/chat.ts b/source/components/chat/script/chat.ts index 00e8aff14..cdaae1fa7 100644 --- a/source/components/chat/script/chat.ts +++ b/source/components/chat/script/chat.ts @@ -1,6 +1,6 @@ -import MessageFactory from "./messages/messageFactory"; -import MessageRenderer from "./messages/messageRenderer"; -import PendingMessageManager from "./messages/pendingMessageManager"; +import type MessageFactory from "./messages/messageFactory"; +import type MessageRenderer from "./messages/messageRenderer"; +import type PendingMessageManager from "./messages/pendingMessageManager"; class Chat implements ChatInterface { diff --git a/source/components/chat/script/messages/pendingMessageManager.ts b/source/components/chat/script/messages/pendingMessageManager.ts index 5ba03bcd7..e894a25df 100644 --- a/source/components/chat/script/messages/pendingMessageManager.ts +++ b/source/components/chat/script/messages/pendingMessageManager.ts @@ -1,5 +1,5 @@ import { getPendingMarkup } from "../helper/pending"; -import MessageFactory from "./messageFactory"; +import type MessageFactory from "./messageFactory"; class PendingMessageManager { private pendingMessage: MessageInterface | null = null; diff --git a/source/components/drawer/style.scss b/source/components/drawer/style.scss index d4ff9ac20..5e7fb6216 100644 --- a/source/components/drawer/style.scss +++ b/source/components/drawer/style.scss @@ -128,8 +128,8 @@ $_: "c-drawer"; z-index: 10; transform: translate(-100%); transition: visibility 0s linear var(--#{$_}--drawer-transition-ms), - var(--#{$_}--drawer-transition-ms) ease-in transform, - var(--#{$_}--drawer-transition-ms) ease-in opacity; + var(--#{$_}--drawer-transition-ms) ease-in transform, + var(--#{$_}--drawer-transition-ms) ease-in opacity; visibility: hidden; opacity: 0; display: flex; @@ -214,8 +214,8 @@ $_: "c-drawer"; .c-drawer.is-open { transition: visibility 0s linear 0s, - var(--#{$_}--drawer-transition-ms) ease-out transform, - var(--#{$_}--drawer-transition-ms) ease-out opacity; + var(--#{$_}--drawer-transition-ms) ease-out transform, + var(--#{$_}--drawer-transition-ms) ease-out opacity; visibility: visible; transform: translate(0%); opacity: 1; @@ -235,7 +235,7 @@ $_overlay: "drawer-overlay"; height: 100%; z-index: 9; transition: visibility 0s linear var(--#{$_overlay}--drawer-transition-ms), - var(--#{$_overlay}--drawer-transition-ms) ease-in opacity; + var(--#{$_overlay}--drawer-transition-ms) ease-in opacity; visibility: hidden; opacity: 0; backdrop-filter: blur(1px); @@ -246,6 +246,6 @@ $_overlay: "drawer-overlay"; .c-drawer.is-open+.drawer-overlay { opacity: 1; transition: visibility 0s linear 0s, - var(--#{$_}--drawer-transition-ms) ease-out opacity; + var(--#{$_}--drawer-transition-ms) ease-out opacity; visibility: visible; } \ No newline at end of file diff --git a/source/components/field/style.scss b/source/components/field/style.scss index 9d3abb07b..79b8e82f8 100644 --- a/source/components/field/style.scss +++ b/source/components/field/style.scss @@ -178,8 +178,8 @@ $fields: "input, input[type=" color"], input[type=" text"], input[type=" search" width: calc(tokens.getCalculatedValue($_, "base", 5)); border-left: tokens.getCalculatedValue($_, "border-width", 1) solid var(--#{$_}--border-color); background-image: linear-gradient(to bottom, - color-mix(in srgb, var(--#{$_}--border-color) 14%, var(--#{$_}--background-color)), - color-mix(in srgb, var(--#{$_}--border-color) 8%, var(--#{$_}--background-color))); + color-mix(in srgb, var(--#{$_}--border-color) 14%, var(--#{$_}--background-color)), + color-mix(in srgb, var(--#{$_}--border-color) 8%, var(--#{$_}--background-color))); border-top-right-radius: tokens.getCalculatedValue($_, "border-radius"); border-bottom-right-radius: tokens.getCalculatedValue($_, "border-radius"); pointer-events: none; diff --git a/source/components/slider/index.ts b/source/components/slider/index.ts index 3bca77046..20b783734 100644 --- a/source/components/slider/index.ts +++ b/source/components/slider/index.ts @@ -44,7 +44,7 @@ export default class Slider { gap: this.sliderAttributes.gap, padding: this.sliderAttributes.padding, autoplay: Boolean(autoPlay) && (!mediaQuery || !mediaQuery.matches), - interval: Boolean(autoPlay) ? autoPlay * 1000 : 5000, + interval: autoPlay ? autoPlay * 1000 : 5000, pagination: slider.classList.contains('c-slider--has-stepper'), pauseOnHover: true, pauseOnFocus: true, @@ -139,7 +139,7 @@ export default class Slider { } getAttributes(): Options { - let padding = parseInt(this.sliderElement.getAttribute('data-slider-padding') || '0', 10); + const padding = parseInt(this.sliderElement.getAttribute('data-slider-padding') || '0', 10); const gap = parseInt(this.sliderElement.getAttribute('data-slider-gap') || '2', 10); const slidesPerPage = parseInt(this.sliderElement.getAttribute('data-slides-per-page') || '1', 10); const slidesPerMove = parseInt(this.sliderElement.getAttribute('data-slides-per-move') || '1', 10); diff --git a/source/components/timeline/style.scss b/source/components/timeline/style.scss index ceaf70426..a661da7be 100644 --- a/source/components/timeline/style.scss +++ b/source/components/timeline/style.scss @@ -2,8 +2,8 @@ @use "../../sass/mixin/tokens"; @property --inherit-color-background { - syntax: "*"; - inherits: true; + syntax: "*"; + inherits: true; } $_: "c-timeline"; @@ -11,298 +11,298 @@ $_: "c-timeline"; @include tokens.create($_, getComponentTokens($_)); .#{$_} { - --#{$_}--gap: #{tokens.getCalculatedValue($_, "space", 4)}; - --#{$_}--line-width: max(2px, #{tokens.getCalculatedValue($_, "border-width")}); - --#{$_}--line-color-default: #{tokens.getRawValue($_, "color--surface-border")}; - --#{$_}--line-color-active: #{tokens.getRawValue($_, "color--primary")}; - --#{$_}--marker-size: #{tokens.getCalculatedValue($_, "base", 2.5)}; - --#{$_}--marker-border-width: max(4px, #{tokens.getCalculatedValue($_, "border-width")}); - --#{$_}--marker-border-color: #{tokens.getRawValue($_, "color--surface")}; - --#{$_}--track-width: calc(var(--#{$_}--marker-size) + #{tokens.getCalculatedValue($_, "space", 2)}); - --#{$_}--card-width: min(100%, #{tokens.getCalculatedValue($_, "base", 44)}); - --#{$_}--card-arrow-size: #{tokens.getCalculatedValue($_, "base", 1.25)}; - --#{$_}--card-arrow-top: 50%; - --#{$_}--card-background: #{tokens.getRawValue($_, "color--surface")}; - --#{$_}--card-outline: color-mix(in srgb, #{tokens.getRawValue($_, "color--primary")} 20%, transparent); - --#{$_}--date-background: #{tokens.getRawValue($_, "color--surface-alt")}; - --#{$_}--date-color: #{tokens.getRawValue($_, "color--surface-contrast")}; - --#{$_}--date-border: #{tokens.getRawValue($_, "color--surface-border")}; - --#{$_}--accent: #{tokens.getRawValue($_, "color--primary")}; - --#{$_}--accent-contrast: #{tokens.getRawValue($_, "color--primary-contrast")}; - - position: relative; - list-style: none; - margin: 0 auto; - padding: #{tokens.getCalculatedValue($_, "space", 1)} 0; - display: grid; - gap: var(--#{$_}--gap); - - &:after { - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 50%; - transform: translateX(-50%); - width: var(--#{$_}--line-width); - border-radius: 999px; - background-color: var(--#{$_}--line-color, var(--#{$_}--line-color-default)); - } - - .#{$_}__event { + --#{$_}--gap: #{tokens.getCalculatedValue($_, "space", 4)}; + --#{$_}--line-width: max(2px, #{tokens.getCalculatedValue($_, "border-width")}); + --#{$_}--line-color-default: #{tokens.getRawValue($_, "color--surface-border")}; + --#{$_}--line-color-active: #{tokens.getRawValue($_, "color--primary")}; + --#{$_}--marker-size: #{tokens.getCalculatedValue($_, "base", 2.5)}; + --#{$_}--marker-border-width: max(4px, #{tokens.getCalculatedValue($_, "border-width")}); + --#{$_}--marker-border-color: #{tokens.getRawValue($_, "color--surface")}; + --#{$_}--track-width: calc(var(--#{$_}--marker-size) + #{tokens.getCalculatedValue($_, "space", 2)}); + --#{$_}--card-width: min(100%, #{tokens.getCalculatedValue($_, "base", 44)}); + --#{$_}--card-arrow-size: #{tokens.getCalculatedValue($_, "base", 1.25)}; + --#{$_}--card-arrow-top: 50%; + --#{$_}--card-background: #{tokens.getRawValue($_, "color--surface")}; + --#{$_}--card-outline: color-mix(in srgb, #{tokens.getRawValue($_, "color--primary")} 20%, transparent); + --#{$_}--date-background: #{tokens.getRawValue($_, "color--surface-alt")}; + --#{$_}--date-color: #{tokens.getRawValue($_, "color--surface-contrast")}; + --#{$_}--date-border: #{tokens.getRawValue($_, "color--surface-border")}; + --#{$_}--accent: #{tokens.getRawValue($_, "color--primary")}; + --#{$_}--accent-contrast: #{tokens.getRawValue($_, "color--primary-contrast")}; + position: relative; + list-style: none; + margin: 0 auto; + padding: #{tokens.getCalculatedValue($_, "space", 1)} 0; display: grid; - grid-template-columns: minmax(0, 1fr) var(--#{$_}--track-width) minmax(0, 1fr); gap: var(--#{$_}--gap); - align-items: center; - list-style: none; - z-index: 1; - padding: 0; - } - - .#{$_}__date { - grid-row: 1; - grid-column: 3; - justify-self: start; - display: inline-flex; - align-items: center; - min-height: calc(var(--#{$_}--marker-size) - #{tokens.getCalculatedValue($_, "space", 0.5)}); - max-width: 100%; - padding: #{tokens.getCalculatedValue($_, "space", 0.75)} #{tokens.getCalculatedValue($_, "space", 1.25)}; - color: var(--#{$_}--date-color); - font-size: #{tokens.getRawValue($_, "font-size-100")}; - font-weight: 600; - line-height: 1; - white-space: nowrap; - background-color: var(--#{$_}--date-background); - border: var(--#{$_}--line-width) solid var(--#{$_}--date-border); - border-radius: #{tokens.getCalculatedValue($_, "border-radius")}; - corner-shape: #{tokens.getRawValue($_, "corner-shape")}; - box-shadow: none; - } - - .#{$_}__marker { - grid-row: 1; - grid-column: 2; - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-height: var(--#{$_}--marker-size); - - &:before { - content: ""; - width: var(--#{$_}--marker-size); - height: var(--#{$_}--marker-size); - border-radius: 999px; - outline: var(--#{$_}--marker-border-width) solid var(--#{$_}--marker-border-color); - background-color: var(--#{$_}--line-color, var(--inherit-color-background, var(--#{$_}--line-color-default))); - box-sizing: border-box; - box-shadow: none; - } - .#{$_}__date { - display: none; + &:after { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + transform: translateX(-50%); + width: var(--#{$_}--line-width); + border-radius: 999px; + background-color: var(--#{$_}--line-color, var(--#{$_}--line-color-default)); } - } - - .#{$_}__event__card { - grid-row: 1; - grid-column: 1; - justify-self: end; - width: var(--#{$_}--card-width); - min-width: 0; - position: relative; - z-index: 1; - transform-origin: center right; - transition: transform 180ms ease, outline-color 180ms ease, box-shadow 180ms ease; - >* { - background-color: inherit; + .#{$_}__event { + position: relative; + display: grid; + grid-template-columns: minmax(0, 1fr) var(--#{$_}--track-width) minmax(0, 1fr); + gap: var(--#{$_}--gap); + align-items: center; + list-style: none; + z-index: 1; + padding: 0; } - &:before { - content: ""; - position: absolute; - top: var(--#{$_}--card-arrow-top); - right: calc(var(--#{$_}--card-arrow-size) * -0.6); - transform: translateY(-50%) rotate(45deg); - width: var(--#{$_}--card-arrow-size); - height: var(--#{$_}--card-arrow-size); - background-color: inherit; - border: inherit; - z-index: -1; - border-radius: max(2px, #{tokens.getCalculatedValue($_, "border-radius", 0.25)}); + .#{$_}__date { + grid-row: 1; + grid-column: 3; + justify-self: start; + display: inline-flex; + align-items: center; + min-height: calc(var(--#{$_}--marker-size) - #{tokens.getCalculatedValue($_, "space", 0.5)}); + max-width: 100%; + padding: #{tokens.getCalculatedValue($_, "space", 0.75)} #{tokens.getCalculatedValue($_, "space", 1.25)}; + color: var(--#{$_}--date-color); + font-size: #{tokens.getRawValue($_, "font-size-100")}; + font-weight: 600; + line-height: 1; + white-space: nowrap; + background-color: var(--#{$_}--date-background); + border: var(--#{$_}--line-width) solid var(--#{$_}--date-border); + border-radius: #{tokens.getCalculatedValue($_, "border-radius")}; + corner-shape: #{tokens.getRawValue($_, "corner-shape")}; + box-shadow: none; } - &.c-card--flat:before, - &.c-card--flat:after { - display: none; - } - } + .#{$_}__marker { + grid-row: 1; + grid-column: 2; + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-height: var(--#{$_}--marker-size); - .#{$_}__event:nth-child(even) { - .#{$_}__date { - grid-column: 1; - justify-self: end; - text-align: right; + &:before { + content: ""; + width: var(--#{$_}--marker-size); + height: var(--#{$_}--marker-size); + border-radius: 999px; + outline: var(--#{$_}--marker-border-width) solid var(--#{$_}--marker-border-color); + background-color: var(--#{$_}--line-color, var(--inherit-color-background, var(--#{$_}--line-color-default))); + box-sizing: border-box; + box-shadow: none; + } + + .#{$_}__date { + display: none; + } } .#{$_}__event__card { - grid-column: 3; - justify-self: start; - transform-origin: center left; - - &:before { - left: calc(var(--#{$_}--card-arrow-size) * -0.6); - right: auto; - } - } - } + grid-row: 1; + grid-column: 1; + justify-self: end; + width: var(--#{$_}--card-width); + min-width: 0; + position: relative; + z-index: 1; + transform-origin: center right; + transition: transform 180ms ease, outline-color 180ms ease, box-shadow 180ms ease; - .#{$_}__event--active { - .#{$_}__marker::before { - background-color: var(--#{$_}--accent); - } + >* { + background-color: inherit; + } + + &:before { + content: ""; + position: absolute; + top: var(--#{$_}--card-arrow-top); + right: calc(var(--#{$_}--card-arrow-size) * -0.6); + transform: translateY(-50%) rotate(45deg); + width: var(--#{$_}--card-arrow-size); + height: var(--#{$_}--card-arrow-size); + background-color: inherit; + border: inherit; + z-index: -1; + border-radius: max(2px, #{tokens.getCalculatedValue($_, "border-radius", 0.25)}); + } - >.#{$_}__date, - .#{$_}__marker>.#{$_}__date { - background-color: #{tokens.getRawValue($_, "color--surface")}; + &.c-card--flat:before, + &.c-card--flat:after { + display: none; + } } - .#{$_}__marker>.#{$_}__date { - background: var(--#{$_}--accent); - border-color: var(--#{$_}--accent); - color: var(--#{$_}--accent-contrast); - box-shadow: none; + .#{$_}__event:nth-child(even) { + .#{$_}__date { + grid-column: 1; + justify-self: end; + text-align: right; + } + + .#{$_}__event__card { + grid-column: 3; + justify-self: start; + transform-origin: center left; - &:before { - border-left-color: var(--#{$_}--accent); - border-bottom-color: var(--#{$_}--accent); - } + &:before { + left: calc(var(--#{$_}--card-arrow-size) * -0.6); + right: auto; + } + } } - } - &.#{$_}--sequential { + .#{$_}__event--active { + .#{$_}__marker::before { + background-color: var(--#{$_}--accent); + } - &:after { - left: calc(var(--#{$_}--track-width) / 2); - transform: translateX(-50%); - } + >.#{$_}__date, + .#{$_}__marker>.#{$_}__date { + background-color: #{tokens.getRawValue($_, "color--surface")}; + } - .#{$_}__event { - grid-template-columns: var(--#{$_}--track-width) minmax(0, 1fr); - align-items: start; - } + .#{$_}__marker>.#{$_}__date { + background: var(--#{$_}--accent); + border-color: var(--#{$_}--accent); + color: var(--#{$_}--accent-contrast); + box-shadow: none; - .#{$_}__marker { - grid-column: 1; - justify-content: center; - padding-top: #{tokens.getCalculatedValue($_, "space", 1.5)}; + &:before { + border-left-color: var(--#{$_}--accent); + border-bottom-color: var(--#{$_}--accent); + } + } } - .#{$_}__event__card { - grid-column: 2; - justify-self: start; - width: 100%; - transform-origin: center left; - --#{$_}--card-arrow-top: #{tokens.getCalculatedValue($_, "space", 2.5)}; - - &:before { - left: calc(var(--#{$_}--card-arrow-size) * -0.6); - right: auto; - } - } + &.#{$_}--sequential { - .#{$_}__event:nth-child(even) { - .#{$_}__event__card { - grid-column: 2; - justify-self: start; - } - } - } + &:after { + left: calc(var(--#{$_}--track-width) / 2); + transform: translateX(-50%); + } - @include mq.mq($until: md) { - --#{$_}--gap: #{tokens.getCalculatedValue($_, "space", 3)}; - --#{$_}--card-width: 100%; - --#{$_}--card-arrow-top: #{tokens.getCalculatedValue($_, "space", 2.5)}; + .#{$_}__event { + grid-template-columns: var(--#{$_}--track-width) minmax(0, 1fr); + align-items: start; + } - &:after { - left: calc(var(--#{$_}--track-width) / 2); - transform: translateX(-50%); - } + .#{$_}__marker { + grid-column: 1; + justify-content: center; + padding-top: #{tokens.getCalculatedValue($_, "space", 1.5)}; + } - .#{$_}__event { - grid-template-columns: var(--#{$_}--track-width) minmax(0, 1fr); - gap: #{tokens.getCalculatedValue($_, "space", 2)}; - align-items: start; + .#{$_}__event__card { + grid-column: 2; + justify-self: start; + width: 100%; + transform-origin: center left; + --#{$_}--card-arrow-top: #{tokens.getCalculatedValue($_, "space", 2.5)}; + + &:before { + left: calc(var(--#{$_}--card-arrow-size) * -0.6); + right: auto; + } + } + + .#{$_}__event:nth-child(even) { + .#{$_}__event__card { + grid-column: 2; + justify-self: start; + } + } } - .#{$_}__marker { - grid-column: 1; - justify-content: center; - align-items: center; - padding-top: 0; + @include mq.mq($until: md) { + --#{$_}--gap: #{tokens.getCalculatedValue($_, "space", 3)}; + --#{$_}--card-width: 100%; + --#{$_}--card-arrow-top: #{tokens.getCalculatedValue($_, "space", 2.5)}; - .#{$_}__date { - display: inline-flex !important; - position: absolute; - top: 50%; - left: calc(100% + #{tokens.getCalculatedValue($_, "space", 2)}); - transform: translateY(-50%); - visibility: visible !important; - width: auto !important; - max-width: calc(100vw - var(--#{$_}--track-width) - #{tokens.getCalculatedValue($_, "space", 6)}) !important; - line-height: 1.2; - z-index: 1; + &:after { + left: calc(var(--#{$_}--track-width) / 2); + transform: translateX(-50%); + } - &:before { - content: ""; - position: absolute; - left: calc(var(--#{$_}--card-arrow-size) * -0.75); - top: 50%; - width: var(--#{$_}--card-arrow-size); - height: var(--#{$_}--card-arrow-size); - transform: translateY(-50%) rotate(45deg); - background-color: inherit; - border-left: var(--#{$_}--line-width) solid var(--#{$_}--date-border); - border-bottom: var(--#{$_}--line-width) solid var(--#{$_}--date-border); - z-index: -1; + .#{$_}__event { + grid-template-columns: var(--#{$_}--track-width) minmax(0, 1fr); + gap: #{tokens.getCalculatedValue($_, "space", 2)}; + align-items: start; } - } - } - .#{$_}__event>.#{$_}__date { - display: none; - } + .#{$_}__marker { + grid-column: 1; + justify-content: center; + align-items: center; + padding-top: 0; + + .#{$_}__date { + display: inline-flex !important; + position: absolute; + top: 50%; + left: calc(100% + #{tokens.getCalculatedValue($_, "space", 2)}); + transform: translateY(-50%); + visibility: visible !important; + width: auto !important; + max-width: calc(100vw - var(--#{$_}--track-width) - #{tokens.getCalculatedValue($_, "space", 6)}) !important; + line-height: 1.2; + z-index: 1; + + &:before { + content: ""; + position: absolute; + left: calc(var(--#{$_}--card-arrow-size) * -0.75); + top: 50%; + width: var(--#{$_}--card-arrow-size); + height: var(--#{$_}--card-arrow-size); + transform: translateY(-50%) rotate(45deg); + background-color: inherit; + border-left: var(--#{$_}--line-width) solid var(--#{$_}--date-border); + border-bottom: var(--#{$_}--line-width) solid var(--#{$_}--date-border); + z-index: -1; + } + } + } - .#{$_}__event__card, - .#{$_}__event:nth-child(even) .#{$_}__event__card { - grid-column: 2; - justify-self: start; - width: 100%; - margin-top: calc(var(--#{$_}--marker-size) + #{tokens.getCalculatedValue($_, "space", 3)}); - transform-origin: center left; - - &:before { - display: none; - } - } + .#{$_}__event>.#{$_}__date { + display: none; + } - &.#{$_}--sequential { + .#{$_}__event__card, + .#{$_}__event:nth-child(even) .#{$_}__event__card { + grid-column: 2; + justify-self: start; + width: 100%; + margin-top: calc(var(--#{$_}--marker-size) + #{tokens.getCalculatedValue($_, "space", 3)}); + transform-origin: center left; + + &:before { + display: none; + } + } - .#{$_}__event__card, - .#{$_}__event:nth-child(even) .#{$_}__event__card { - margin-top: 0; + &.#{$_}--sequential { - &:before { - display: block; - left: calc(var(--#{$_}--card-arrow-size) * -0.6); - right: auto; - top: var(--#{$_}--card-arrow-top); - transform: translateY(-50%) rotate(45deg); + .#{$_}__event__card, + .#{$_}__event:nth-child(even) .#{$_}__event__card { + margin-top: 0; + + &:before { + display: block; + left: calc(var(--#{$_}--card-arrow-size) * -0.6); + right: auto; + top: var(--#{$_}--card-arrow-top); + transform: translateY(-50%) rotate(45deg); + } + } } - } } - } } \ No newline at end of file diff --git a/source/js/ClickAway.ts b/source/js/ClickAway.ts index c0222154a..ad10cb3a3 100644 --- a/source/js/ClickAway.ts +++ b/source/js/ClickAway.ts @@ -30,7 +30,7 @@ export class ClickAway { } export function initializeClickAways() { - let clickAwayInstances: ClickAway[] = []; + const clickAwayInstances: ClickAway[] = []; document.querySelectorAll('[data-js-click-away]').forEach((element) => { const classesToRemove = element.getAttribute('data-js-click-away')?. diff --git a/source/js/anchorMenu.js b/source/js/anchorMenu.js index 028b6b9e7..ea10ee2ab 100644 --- a/source/js/anchorMenu.js +++ b/source/js/anchorMenu.js @@ -23,7 +23,7 @@ const setListeners = (menuElements, sectionElements) => { let currentScroll = 0; window.addEventListener('scroll', () => { - let scrollTop = window.scrollY; + const scrollTop = window.scrollY; if(Math.abs(currentScroll - scrollTop > 10 || currentScroll - scrollTop < -10)) { handleScroll(menuElements); currentScroll = scrollTop; @@ -52,9 +52,7 @@ const elementPositions = (sectionElements) => { headerHeight = header.offsetHeight; scrollContainer.style.top = header.offsetHeight + 'px'; } - const arr = sectionElements.map(function (sectionElement) { - return ({"position": window.scrollY + sectionElement.getBoundingClientRect().top, "height": sectionElement.getBoundingClientRect().height}); - }); + const arr = sectionElements.map((sectionElement) => ({"position": window.scrollY + sectionElement.getBoundingClientRect().top, "height": sectionElement.getBoundingClientRect().height})); sectionElementPositions = arr; } diff --git a/source/js/classToggle/classToggleInitializer.ts b/source/js/classToggle/classToggleInitializer.ts index 42fd5ae56..52e8725e1 100644 --- a/source/js/classToggle/classToggleInitializer.ts +++ b/source/js/classToggle/classToggleInitializer.ts @@ -22,7 +22,7 @@ class ClassToggleInitializer { if (mutation.type === "childList") { mutation.addedNodes.forEach((node) => { if (node instanceof HTMLElement) { - let triggers = [...this.findTriggers(node)]; + const triggers = [...this.findTriggers(node)]; if (node.hasAttribute(ClassToggleAttr.TRIGGER) || node.hasAttribute(ClassToggleAttr.TRIGGER_DEPRECATED)) { triggers.push(node); @@ -57,8 +57,8 @@ class ClassToggleInitializer { * @param trigger The trigger element to initialize. */ private initTrigger(trigger: HTMLElement) { - let triggerId = trigger.getAttribute(ClassToggleAttr.TRIGGER) || trigger.getAttribute(ClassToggleAttr.TRIGGER_DEPRECATED); - let groupId = trigger.getAttribute(ClassToggleAttr.GROUP) || trigger.getAttribute(ClassToggleAttr.GROUP_DEPRECATED); + const triggerId = trigger.getAttribute(ClassToggleAttr.TRIGGER) || trigger.getAttribute(ClassToggleAttr.TRIGGER_DEPRECATED); + const groupId = trigger.getAttribute(ClassToggleAttr.GROUP) || trigger.getAttribute(ClassToggleAttr.GROUP_DEPRECATED); if (triggerId) { new ClassToggle(trigger as HTMLElement, triggerId, groupId); diff --git a/source/js/copy.ts b/source/js/copy.ts index f2afec66f..1e8279efa 100644 --- a/source/js/copy.ts +++ b/source/js/copy.ts @@ -5,13 +5,13 @@ class Copy { } copy(element: Element) { - let target = element.getAttribute('data-js-copy-target'); + const target = element.getAttribute('data-js-copy-target'); element.addEventListener('click', () => { - let targetEl = target == "self" ? element : document.querySelector(`[data-js-copy-item="${target}"]`); + const targetEl = target == "self" ? element : document.querySelector(`[data-js-copy-item="${target}"]`); if (targetEl && targetEl.hasAttribute('data-js-copy-data')) { - let data = targetEl.getAttribute('data-js-copy-data') ?? ''; + const data = targetEl.getAttribute('data-js-copy-data') ?? ''; if ('permissions' in navigator) { navigator.permissions.query({ name: 'clipboard-write' as PermissionName}) @@ -49,7 +49,7 @@ class Copy { const errorNotice = element.getAttribute('data-js-copy-error') ?? 'Something went wrong'; const notice = success ? successNotice : errorNotice; - let sibling = element.nextSibling; + const sibling = element.nextSibling; if (sibling instanceof Element && sibling.hasAttribute('js-data-copy-notice')) { sibling.textContent = notice; } else { diff --git a/source/js/filter.js b/source/js/filter.js index 50505f1ca..75057e215 100644 --- a/source/js/filter.js +++ b/source/js/filter.js @@ -12,7 +12,7 @@ export default class Filter { } enableSearch() { - let containers = document.querySelectorAll(CONTAINER);//Get filterable elements + const containers = document.querySelectorAll(CONTAINER);//Get filterable elements containers.forEach((container) => { @@ -45,12 +45,12 @@ export default class Filter { //Get inputs container.querySelectorAll(INPUT).forEach((input) => { input.addEventListener('input', () => { - let inputId = input.getAttribute('js-filter-input'); + const inputId = input.getAttribute('js-filter-input'); this.list.forEach((item) => { if (item.searchId === inputId) { //Get search term and search in item - let res = item.data.search(input.value.toLocaleLowerCase()); + const res = item.data.search(input.value.toLocaleLowerCase()); if (res < 0) { item.element.remove(); //Remove unmatched diff --git a/source/js/form/checkbox.js b/source/js/form/checkbox.js index 831e96467..b47e860ae 100644 --- a/source/js/form/checkbox.js +++ b/source/js/form/checkbox.js @@ -6,11 +6,11 @@ class Checkbox { setListener(checkboxGroups) { checkboxGroups.forEach(checkboxGroup => { const checkboxes = checkboxGroup.querySelectorAll('.c-option__checkbox--hidden-box'); - let validationElement = checkboxGroup.querySelector('.js-checkbox-valid'); + const validationElement = checkboxGroup.querySelector('.js-checkbox-valid'); checkboxes.forEach(checkbox => { checkbox.addEventListener('change', () => { - let validator = checkboxGroup.querySelectorAll('.c-option [type="checkbox"]:checked'); + const validator = checkboxGroup.querySelectorAll('.c-option [type="checkbox"]:checked'); if (validator.length > 0) { validationElement.setAttribute('checked', true); checkboxGroup.querySelector('.c-field__label').classList.remove('u-color__text--danger'); @@ -24,9 +24,9 @@ class Checkbox { validateCheckboxes(checkboxGroups) { - let hasChecked = []; + const hasChecked = []; checkboxGroups.forEach(group => { - let input = group.querySelector('[data-js-required]'); + const input = group.querySelector('[data-js-required]'); let validation = input.getAttribute('checked') ? true : false; if (input.hasAttribute('js-no-validation')) { diff --git a/source/js/form/conditions.js b/source/js/form/conditions.js index 69895fb39..f05a39d00 100644 --- a/source/js/form/conditions.js +++ b/source/js/form/conditions.js @@ -7,7 +7,7 @@ class Conditions { const groups = form.querySelectorAll('[conditional-target]'); const conditionalElements = form.querySelectorAll('[conditional]') && Array.from(form.querySelectorAll('[conditional]')).map(element => element).filter(element => element.getAttribute('conditional')); - let condtionalTargets = []; + const condtionalTargets = []; Array.from(groups).forEach(group => { condtionalTargets.push({element: group, json: JSON.parse(group.getAttribute('conditional-target'))}); this.handleRequired(group.querySelectorAll('[data-js-required]'), true); diff --git a/source/js/form/fileinput/UI/fileList.ts b/source/js/form/fileinput/UI/fileList.ts index d0a03d1ee..98673986e 100644 --- a/source/js/form/fileinput/UI/fileList.ts +++ b/source/js/form/fileinput/UI/fileList.ts @@ -1,4 +1,4 @@ -import { FileInputController } from "../controller"; +import type { FileInputController } from "../controller"; class FileList { constructor( diff --git a/source/js/form/fileinput/UI/preview/filePreviewCardRenderer.ts b/source/js/form/fileinput/UI/preview/filePreviewCardRenderer.ts index 20b5fcb97..be9ded6dd 100644 --- a/source/js/form/fileinput/UI/preview/filePreviewCardRenderer.ts +++ b/source/js/form/fileinput/UI/preview/filePreviewCardRenderer.ts @@ -1,8 +1,8 @@ -import { FileInputController } from "../../controller"; -import FileIdCreator from "../helper/fileIdCreator"; -import FileNameFormatter from "../helper/fileNameFormatter"; -import FileSizeFormatter from "../helper/fileSizeFormatter"; -import PreviewCreator from "./previewCreator"; +import type { FileInputController } from "../../controller"; +import type FileIdCreator from "../helper/fileIdCreator"; +import type FileNameFormatter from "../helper/fileNameFormatter"; +import type FileSizeFormatter from "../helper/fileSizeFormatter"; +import type PreviewCreator from "./previewCreator"; class FilePreviewCardRenderer implements FilePreviewRenderer { private fileNameTarget: string = '[data-js-file="filename"]'; diff --git a/source/js/form/fileinput/UI/preview/filePreviewFactory.ts b/source/js/form/fileinput/UI/preview/filePreviewFactory.ts index 6ce5a3a90..75a8709e1 100644 --- a/source/js/form/fileinput/UI/preview/filePreviewFactory.ts +++ b/source/js/form/fileinput/UI/preview/filePreviewFactory.ts @@ -1,4 +1,4 @@ -import { FileInputController } from "../../controller"; +import type { FileInputController } from "../../controller"; import FileIdCreator from "../helper/fileIdCreator"; import FileNameFormatter from "../helper/fileNameFormatter"; import FileSizeFormatter from "../helper/fileSizeFormatter"; @@ -24,7 +24,7 @@ class FilePreviewFactory { new FileIdCreator() ] - if (!!fileInput.dataset.jsFilePreview) { + if (fileInput.dataset.jsFilePreview) { return new FilePreviewCardRenderer(...params, new PreviewCreator()); } diff --git a/source/js/form/fileinput/UI/preview/filePreviewListRenderer.ts b/source/js/form/fileinput/UI/preview/filePreviewListRenderer.ts index 9105839ab..7ffc1a51d 100644 --- a/source/js/form/fileinput/UI/preview/filePreviewListRenderer.ts +++ b/source/js/form/fileinput/UI/preview/filePreviewListRenderer.ts @@ -1,7 +1,7 @@ -import { FileInputController } from "../../controller"; -import FileIdCreator from "../helper/fileIdCreator"; -import FileNameFormatter from "../helper/fileNameFormatter"; -import FileSizeFormatter from "../helper/fileSizeFormatter"; +import type { FileInputController } from "../../controller"; +import type FileIdCreator from "../helper/fileIdCreator"; +import type FileNameFormatter from "../helper/fileNameFormatter"; +import type FileSizeFormatter from "../helper/fileSizeFormatter"; class FilePreviewListRenderer implements FilePreviewRenderer { private fileNameTarget: string = '[data-js-file="filename"]'; diff --git a/source/js/form/fileinput/dropzone.ts b/source/js/form/fileinput/dropzone.ts index 0fcb3d8d6..6c611ded8 100644 --- a/source/js/form/fileinput/dropzone.ts +++ b/source/js/form/fileinput/dropzone.ts @@ -1,4 +1,4 @@ -import Notice from "./notice"; +import type Notice from "./notice"; export class Dropzone { private dragCounter = 0; diff --git a/source/js/form/fileinput/fileCounter.ts b/source/js/form/fileinput/fileCounter.ts index 8c705a915..0761466b7 100644 --- a/source/js/form/fileinput/fileCounter.ts +++ b/source/js/form/fileinput/fileCounter.ts @@ -1,4 +1,4 @@ -import { FileInputController } from './controller'; +import type { FileInputController } from './controller'; export function FileCounter( controller: FileInputController, diff --git a/source/js/form/fileinput/hasMaxFiles.ts b/source/js/form/fileinput/hasMaxFiles.ts index 28c84e566..376be42fc 100644 --- a/source/js/form/fileinput/hasMaxFiles.ts +++ b/source/js/form/fileinput/hasMaxFiles.ts @@ -1,4 +1,4 @@ -import { FileInputController } from './controller'; +import type { FileInputController } from './controller'; export function HasMaxFiles( controller: FileInputController, diff --git a/source/js/form/fileinput/hasMinFiles.ts b/source/js/form/fileinput/hasMinFiles.ts index e6691bb0a..df7e16739 100644 --- a/source/js/form/fileinput/hasMinFiles.ts +++ b/source/js/form/fileinput/hasMinFiles.ts @@ -1,4 +1,4 @@ -import { FileInputController } from './controller'; +import type { FileInputController } from './controller'; export function HasMinFiles( controller: FileInputController, diff --git a/source/js/form/fileinput/isEmpty.ts b/source/js/form/fileinput/isEmpty.ts index 15b2451ac..9110b6992 100644 --- a/source/js/form/fileinput/isEmpty.ts +++ b/source/js/form/fileinput/isEmpty.ts @@ -1,4 +1,4 @@ -import { FileInputController } from './controller'; +import type { FileInputController } from './controller'; export function FileInputisEmpty( controller: FileInputController, diff --git a/source/js/form/fileinput/maxFileSize.ts b/source/js/form/fileinput/maxFileSize.ts index 69fe23c7f..b05ca585c 100644 --- a/source/js/form/fileinput/maxFileSize.ts +++ b/source/js/form/fileinput/maxFileSize.ts @@ -1,5 +1,5 @@ -import { FileInputController } from './controller'; -import Notice from './notice'; +import type { FileInputController } from './controller'; +import type Notice from './notice'; export function MaxFileSize( controller: FileInputController, diff --git a/source/js/form/fileinput/placeholder.ts b/source/js/form/fileinput/placeholder.ts index 7e519684d..0a63d7b28 100644 --- a/source/js/form/fileinput/placeholder.ts +++ b/source/js/form/fileinput/placeholder.ts @@ -1,4 +1,4 @@ -import { FileInputController } from "./controller"; +import type { FileInputController } from "./controller"; type FilePlaceholderData = { name: string; diff --git a/source/js/form/policy.js b/source/js/form/policy.js index dd8addccd..8a66f89b5 100644 --- a/source/js/form/policy.js +++ b/source/js/form/policy.js @@ -16,7 +16,7 @@ class Policy { validatePolicy() { if (this.parentElement) { - let checked = this.parentElement.querySelector('.c-option [type="checkbox"]:checked') ? true : false; + const checked = this.parentElement.querySelector('.c-option [type="checkbox"]:checked') ? true : false; if (!checked) { this.parentElement.querySelector('.c-option__checkbox--label-text').classList.add('u-color__text--danger'); } diff --git a/source/js/helpers/ComponentRenderer.ts b/source/js/helpers/ComponentRenderer.ts index c7760416e..d3fd35119 100644 --- a/source/js/helpers/ComponentRenderer.ts +++ b/source/js/helpers/ComponentRenderer.ts @@ -3,7 +3,7 @@ import util from 'node:util' import fs from 'node:fs' const exec = util.promisify(require('node:child_process').exec) -export interface IComponentData {} +export type IComponentData = {} interface IComponentRenderer { scriptPath: string diff --git a/source/js/helpers/moveElement.ts b/source/js/helpers/moveElement.ts index 2f4d18087..bd61865bc 100644 --- a/source/js/helpers/moveElement.ts +++ b/source/js/helpers/moveElement.ts @@ -1,6 +1,4 @@ -export interface ImoveElement { - (element: Element, target: Element): void -} +export type ImoveElement = (element: Element, target: Element) => void export const moveElement:ImoveElement = (element, target) => { target.appendChild(element) diff --git a/source/js/helpers/moveElements.ts b/source/js/helpers/moveElements.ts index daa5bd2ed..4e227cdd5 100644 --- a/source/js/helpers/moveElements.ts +++ b/source/js/helpers/moveElements.ts @@ -1,4 +1,4 @@ -import { ImoveElement } from "./moveElement"; +import type { ImoveElement } from "./moveElement"; const moveToSelector = '[data-move-to]' const moveToAttributeName = 'data-move-to' diff --git a/source/js/iframeAcceptance.js b/source/js/iframeAcceptance.js index 02372bdb8..85f38c643 100644 --- a/source/js/iframeAcceptance.js +++ b/source/js/iframeAcceptance.js @@ -1,16 +1,16 @@ -let acceptedSuppliers = JSON.parse(localStorage.getItem('acceptedSuppliers')) ?? []; +const acceptedSuppliers = JSON.parse(localStorage.getItem('acceptedSuppliers')) ?? []; /* Undefined check */ const hasSuppressedContent = (modifier) => { - let suppressedContentExists = document.querySelectorAll('.js-suppressed-content' + (modifier ? modifier : '')).length > 0; + const suppressedContentExists = document.querySelectorAll('.js-suppressed-content' + (modifier ? modifier : '')).length > 0; return suppressedContentExists; } /* Returns url */ const url = (contentWrapper) => { if(contentWrapper.hasAttribute('data-src')) { - let json = JSON.parse(contentWrapper.getAttribute('data-src')); - let url = []; + const json = JSON.parse(contentWrapper.getAttribute('data-src')); + const url = []; json.forEach(host => { url.push(new URL(host)); }); @@ -21,7 +21,7 @@ const url = (contentWrapper) => { } const handleReveal = (contentWrapper) => { - let needsAcceptance = []; + const needsAcceptance = []; const contentUrl = url(contentWrapper); contentUrl.forEach(supplier => { if(acceptedSuppliers.includes(supplier.host)) { diff --git a/source/js/image.js b/source/js/image.js index ba481d491..c8ffd2f0e 100644 --- a/source/js/image.js +++ b/source/js/image.js @@ -32,7 +32,7 @@ class Image { setAttr(){ if (this.imgAttr.src) { - for (let [key, value] of Object.entries(this.imgAttr)) { + for (const [key, value] of Object.entries(this.imgAttr)) { this.image.setAttribute(`${key}`, value); } } diff --git a/source/js/modal.test.ts b/source/js/modal.test.ts index 4ad427164..8d0fda562 100644 --- a/source/js/modal.test.ts +++ b/source/js/modal.test.ts @@ -1,5 +1,5 @@ import { getByTestId, getByText, screen } from "@testing-library/dom" -import { IComponentData, renderComponent } from "./helpers/ComponentRenderer" +import { type IComponentData, renderComponent } from "./helpers/ComponentRenderer" import Modal from "./modal" import userEvent from "@testing-library/user-event" import Gallery from "./gallery" diff --git a/source/js/notification.js b/source/js/notification.js index 82d1d3d4d..f7d1a1626 100644 --- a/source/js/notification.js +++ b/source/js/notification.js @@ -47,7 +47,7 @@ class Notification{ setAutoHideDuration(notification){ const autoHideDuration = notification.getAttribute('autoHideDuration'); - setTimeout(function(){ notification.outerHTML = ""; }, autoHideDuration); + setTimeout(()=> { notification.outerHTML = ""; }, autoHideDuration); } } diff --git a/source/js/notificationDoc.js b/source/js/notificationDoc.js index b9699e236..0552e1a24 100644 --- a/source/js/notificationDoc.js +++ b/source/js/notificationDoc.js @@ -7,14 +7,14 @@ class NotificationDoc{ if(notification) { const direction = notification.getAttribute('direction'); - let container = document.createElement('DIV'); + const container = document.createElement('DIV'); container.classList.add('c-notification__container'); container.classList.add('c-notification__container--' + direction); container.setAttribute('maxAmount', 3) document.body.appendChild(container); notificationButton.addEventListener('click', ()=>{ - let notificationCopy = notification.cloneNode(true); + const notificationCopy = notification.cloneNode(true); notificationCopy.classList.remove('u-display--none'); container.appendChild(notificationCopy); diff --git a/source/js/pagination.ts b/source/js/pagination.ts index 2f7d1cb82..5c3ad453b 100644 --- a/source/js/pagination.ts +++ b/source/js/pagination.ts @@ -123,7 +123,7 @@ export default class Pagination { } public tableRefresh() { - let list = this.paginateList(this.list); + const list = this.paginateList(this.list); this.renderTable(list); this.paginatePages(); @@ -221,7 +221,7 @@ export default class Pagination { btns.forEach((btn) => { btn.addEventListener('click', (e) => { e.preventDefault(); - let next = (e.target as HTMLElement)?.closest(`[${this.indexLinks}]`)!.getAttribute(this.indexLinks); + const next = (e.target as HTMLElement)?.closest(`[${this.indexLinks}]`)!.getAttribute(this.indexLinks); next && this.paginateSetCurrent(parseInt(next)); this.tableRefresh(); this.scrollToTop(); @@ -231,16 +231,16 @@ export default class Pagination { } private scrollToTop() { - let offset = document.querySelector('.c-header--sticky') ? 100 : 0; - let elementPosition = this.container?.getBoundingClientRect().top ?? 0; - let offsetPosition = elementPosition + window.pageYOffset - offset; + const offset = document.querySelector('.c-header--sticky') ? 100 : 0; + const elementPosition = this.container?.getBoundingClientRect().top ?? 0; + const offsetPosition = elementPosition + window.pageYOffset - offset; window.scrollTo({ top: offsetPosition, }); } setFocus() { - let element = this.listContainer?.querySelector('[data-js-pagination-item]:first-child') as HTMLElement; + const element = this.listContainer?.querySelector('[data-js-pagination-item]:first-child') as HTMLElement; if (!element) return; element.focus(); } diff --git a/source/js/resizeMediaQuery.ts b/source/js/resizeMediaQuery.ts index f6a9da781..47babf9a7 100644 --- a/source/js/resizeMediaQuery.ts +++ b/source/js/resizeMediaQuery.ts @@ -17,7 +17,7 @@ class ResizeMediaQuery { this.element = element; this.resizeClass = null; - let resizeClass = element.getAttribute('data-observe-resizes'); + const resizeClass = element.getAttribute('data-observe-resizes'); if (resizeClass !== '') { this.resizeClass = resizeClass; } diff --git a/source/js/selectFilter.ts b/source/js/selectFilter.ts index 60d591414..23c823c10 100644 --- a/source/js/selectFilter.ts +++ b/source/js/selectFilter.ts @@ -1,4 +1,4 @@ -import { FilterableElementComponent, FilterSelects } from "./selectFilterInterface"; +import type { FilterableElementComponent, FilterSelects } from "./selectFilterInterface"; class SelectFilter { selectContainerId: string; @@ -47,7 +47,7 @@ class SelectFilter { private filterFilterableElements(): void { this.filterableElementComponents.forEach((filterableElementComponent: FilterableElementComponent) => { - let showElement = [true]; + const showElement = [true]; for (const key in this.filterSelects) { if (this.filterSelects[key].selected.length > 0) { showElement.push(this.filterSelects[key].selected.some((selected) => { @@ -71,7 +71,7 @@ class SelectFilter { } private updateSelected(key: string): void { - let selected = [] as Array; + const selected = [] as Array; this.filterSelects[key].selects.forEach((select) => { const selectedOptions = select.querySelectorAll('option:checked'); @@ -94,7 +94,7 @@ class SelectFilter { } private setFilterableElementComponent(element: HTMLElement) { - let filterableElementComponent = {} as FilterableElementComponent; + const filterableElementComponent = {} as FilterableElementComponent; filterableElementComponent['element'] = element; filterableElementComponent['filterProperties'] = {}; diff --git a/source/js/sort.js b/source/js/sort.js index 4408b7f31..7b5b16788 100644 --- a/source/js/sort.js +++ b/source/js/sort.js @@ -17,9 +17,9 @@ class Sort { appendSortable(container, dataId, initialSort = false) { let sorted = []; - let sortOrder = container.getAttribute(this.ORDER); - let sortData = container.querySelectorAll(`[${this.DATA}="${dataId}"]`); - let comparableData = [...sortData].map((data) => { + const sortOrder = container.getAttribute(this.ORDER); + const sortData = container.querySelectorAll(`[${this.DATA}="${dataId}"]`); + const comparableData = [...sortData].map((data) => { return { data: data.innerText, index: data.closest(`[${this.SORTABLE}]`) } }); @@ -47,8 +47,8 @@ class Sort { const sortButtons = container.querySelectorAll(`[${this.BUTTON}]`); sortButtons.forEach((button) => { - let dataId = button.getAttribute(this.BUTTON); - let initialSort = container.getAttribute(this.INITIAL) + const dataId = button.getAttribute(this.BUTTON); + const initialSort = container.getAttribute(this.INITIAL) if(initialSort){ container.setAttribute(this.ORDER, initialSort) diff --git a/source/js/splitButton.js b/source/js/splitButton.js index c2b2e6bfc..9119e7ff6 100644 --- a/source/js/splitButton.js +++ b/source/js/splitButton.js @@ -9,12 +9,12 @@ class SplitButton{ splitButtons.forEach((splitButton)=> { - let buttons = splitButton.getElementsByClassName('c-button'); - let actionButton = buttons[0]; - let dropDownList = splitButton.getElementsByClassName('c-dropdown__list')[0]; - let listItems = dropDownList.getElementsByTagName('li'); + const buttons = splitButton.getElementsByClassName('c-button'); + const actionButton = buttons[0]; + const dropDownList = splitButton.getElementsByClassName('c-dropdown__list')[0]; + const listItems = dropDownList.getElementsByTagName('li'); - for(let item of listItems){ + for(const item of listItems){ item.addEventListener('click', () => { actionButton.innerText = item.innerText; }) diff --git a/source/js/stickyKeys.js b/source/js/stickyKeys.js index aeb350bb1..942cbf305 100644 --- a/source/js/stickyKeys.js +++ b/source/js/stickyKeys.js @@ -34,7 +34,7 @@ } subscribeInput(targetElements) { - let arr = []; + const arr = []; targetElements.forEach(input => { input.addEventListener('keydown', (event) => { if ( diff --git a/source/js/tooltip/tooltipController.ts b/source/js/tooltip/tooltipController.ts index 93c8e486c..6da23768e 100644 --- a/source/js/tooltip/tooltipController.ts +++ b/source/js/tooltip/tooltipController.ts @@ -1,7 +1,7 @@ import { TooltipDom, TooltipSetup } from './tooltipEnums'; -import TooltipEvents from './tooltipEvents'; -import TooltipPositioner from './tooltipPositioner'; -import TooltipView from './tooltipView'; +import type TooltipEvents from './tooltipEvents'; +import type TooltipPositioner from './tooltipPositioner'; +import type TooltipView from './tooltipView'; class TooltipController { private activeTrigger: HTMLElement | null = null; diff --git a/source/php/Tests/ApiControllerSearchTest.php b/source/php/Tests/ApiControllerSearchTest.php index bcbbaefe8..f98e8b61a 100644 --- a/source/php/Tests/ApiControllerSearchTest.php +++ b/source/php/Tests/ApiControllerSearchTest.php @@ -11,9 +11,6 @@ use MunicipioStyleGuide\Search\Search; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Controllers\ApiController - */ class ApiControllerSearchTest extends TestCase { /** diff --git a/source/php/Tests/CliTest.php b/source/php/Tests/CliTest.php index e4cfbe56c..c17a25044 100644 --- a/source/php/Tests/CliTest.php +++ b/source/php/Tests/CliTest.php @@ -6,18 +6,12 @@ use CLI; use InvalidArgumentException; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \CLI - */ class CliTest extends TestCase { - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testExecuteCommandClearsBladeCacheWhenSupportedFlagsAreUsed(): void { $cachePath = sys_get_temp_dir() . '/styleguide-cli-cache-' . uniqid('', true); @@ -42,11 +36,7 @@ public function testExecuteCommandClearsBladeCacheWhenSupportedFlagsAreUsed(): v @rmdir($cachePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testExecuteCommandThrowsForUnsupportedCacheOptions(): void { require_once dirname(__DIR__, 3) . '/cli.php'; diff --git a/source/php/Tests/ComponentCssParametersTest.php b/source/php/Tests/ComponentCssParametersTest.php index f03e45b5c..ec43384c8 100644 --- a/source/php/Tests/ComponentCssParametersTest.php +++ b/source/php/Tests/ComponentCssParametersTest.php @@ -5,9 +5,6 @@ use MunicipioStyleGuide\Helper\ComponentCssParameters; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Helper\ComponentCssParameters - */ class ComponentCssParametersTest extends TestCase { private string $tempBasePath; diff --git a/source/php/Tests/ComponentLibraryTest.php b/source/php/Tests/ComponentLibraryTest.php index 5c05b4961..e5b57d5e2 100644 --- a/source/php/Tests/ComponentLibraryTest.php +++ b/source/php/Tests/ComponentLibraryTest.php @@ -5,11 +5,9 @@ use HelsingborgStad\BladeService\BladeServiceInterface; use Illuminate\Contracts\View\View as BladeView; use MunicipioStyleGuide\Helper\Documentation; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Helper\Documentation - */ class ComponentLibraryTest extends TestCase { private string $tempBasePath; @@ -215,11 +213,7 @@ public function testGetSubcomponentsUsesProxyComponentApiWhenSchemaIsEmpty(): vo $this->assertStringContainsString("'message' => [", $subcomponents[0]['usageExample']); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testGetUsageExamplesMapsPaperWrapperMetadata(): void { mkdir($this->tempBasePath . 'source/components/accordion/examples', 0777, true); diff --git a/source/php/Tests/ComponentPageSubcomponentsTest.php b/source/php/Tests/ComponentPageSubcomponentsTest.php index 548c16964..1f0ffd794 100644 --- a/source/php/Tests/ComponentPageSubcomponentsTest.php +++ b/source/php/Tests/ComponentPageSubcomponentsTest.php @@ -9,18 +9,12 @@ use MunicipioStyleGuide\Navigation; use MunicipioStyleGuide\Search\Search; use MunicipioStyleGuide\View; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Controllers\PageController - */ class ComponentPageSubcomponentsTest extends TestCase { - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsComponentSubcomponentsForComponentPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-component-' . uniqid('', true) . '/'; diff --git a/source/php/Tests/ComponentsDataSourceTest.php b/source/php/Tests/ComponentsDataSourceTest.php index d4fbfac8a..62ae76a5e 100644 --- a/source/php/Tests/ComponentsDataSourceTest.php +++ b/source/php/Tests/ComponentsDataSourceTest.php @@ -5,9 +5,6 @@ use MunicipioStyleGuide\Search\DataSources\ComponentsDataSource; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Search\DataSources\ComponentsDataSource - */ class ComponentsDataSourceTest extends TestCase { /** diff --git a/source/php/Tests/CustomizeAssetsTest.php b/source/php/Tests/CustomizeAssetsTest.php index 30ddf6c65..8787a963d 100644 --- a/source/php/Tests/CustomizeAssetsTest.php +++ b/source/php/Tests/CustomizeAssetsTest.php @@ -3,18 +3,12 @@ namespace MunicipioStyleGuide\Tests; use MunicipioStyleGuide\Customize\CustomizeAssets; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Customize\CustomizeAssets - */ class CustomizeAssetsTest extends TestCase { - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testGetReturnsCustomizeAssetsAndDataWhenFilesExist(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-customize-assets-' . uniqid('', true) . '/'; @@ -65,11 +59,7 @@ public function testGetReturnsCustomizeAssetsAndDataWhenFilesExist(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testGetReturnsNullValuesWhenManifestAndDataAreInvalid(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-customize-assets-invalid-' . uniqid('', true) . '/'; diff --git a/source/php/Tests/ElementPageControllerTest.php b/source/php/Tests/ElementPageControllerTest.php index ed5099bdf..7b4569fbc 100644 --- a/source/php/Tests/ElementPageControllerTest.php +++ b/source/php/Tests/ElementPageControllerTest.php @@ -9,18 +9,12 @@ use MunicipioStyleGuide\Navigation; use MunicipioStyleGuide\Search\Search; use MunicipioStyleGuide\View; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Controllers\ElementPageController - */ class ElementPageControllerTest extends TestCase { - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsElementsOverviewItemsForElementsPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-element-controller-' . uniqid('', true) . '/'; @@ -106,11 +100,7 @@ public function testHandleAddsElementsOverviewItemsForElementsPage(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsElementDocumentationDataForDetailPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-element-controller-detail-' . uniqid('', true) . '/'; diff --git a/source/php/Tests/NavigationApiDataProviderTest.php b/source/php/Tests/NavigationApiDataProviderTest.php index 1df572396..3c75c3dee 100644 --- a/source/php/Tests/NavigationApiDataProviderTest.php +++ b/source/php/Tests/NavigationApiDataProviderTest.php @@ -6,9 +6,6 @@ use MunicipioStyleGuide\Data\NavigationApiDataProvider; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Data\NavigationApiDataProvider - */ class NavigationApiDataProviderTest extends TestCase { /** diff --git a/source/php/Tests/NavigationDataParserTest.php b/source/php/Tests/NavigationDataParserTest.php index 989f6c5ad..d7ee9aa48 100644 --- a/source/php/Tests/NavigationDataParserTest.php +++ b/source/php/Tests/NavigationDataParserTest.php @@ -5,9 +5,6 @@ use MunicipioStyleGuide\Data\NavigationDataParser; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Data\NavigationDataParser - */ class NavigationDataParserTest extends TestCase { /** diff --git a/source/php/Tests/NavigationSidebarSectionsTest.php b/source/php/Tests/NavigationSidebarSectionsTest.php index 91d75dfba..a02ff4328 100644 --- a/source/php/Tests/NavigationSidebarSectionsTest.php +++ b/source/php/Tests/NavigationSidebarSectionsTest.php @@ -14,9 +14,6 @@ use MunicipioStyleGuide\Sidebar\Sections\UtilitiesSection; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Navigation - */ class NavigationSidebarSectionsTest extends TestCase { private string $tempProjectRoot; diff --git a/source/php/Tests/ObjectPageControllerTest.php b/source/php/Tests/ObjectPageControllerTest.php index cedb00e7e..301610be2 100644 --- a/source/php/Tests/ObjectPageControllerTest.php +++ b/source/php/Tests/ObjectPageControllerTest.php @@ -9,18 +9,12 @@ use MunicipioStyleGuide\Navigation; use MunicipioStyleGuide\Search\Search; use MunicipioStyleGuide\View; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Controllers\ObjectPageController - */ class ObjectPageControllerTest extends TestCase { - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsObjectsOverviewItemsForObjectsPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-object-controller-' . uniqid('', true) . '/'; @@ -103,11 +97,7 @@ public function testHandleAddsObjectsOverviewItemsForObjectsPage(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleDoesNotAddObjectsOverviewItemsForSubPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-object-controller-sub-' . uniqid('', true) . '/'; diff --git a/source/php/Tests/PageControllerTest.php b/source/php/Tests/PageControllerTest.php index 4b6f83d52..25a246523 100644 --- a/source/php/Tests/PageControllerTest.php +++ b/source/php/Tests/PageControllerTest.php @@ -9,18 +9,12 @@ use MunicipioStyleGuide\Navigation; use MunicipioStyleGuide\Search\Search; use MunicipioStyleGuide\View; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Controllers\PageController - */ class PageControllerTest extends TestCase { - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsComponentOverviewItemsForComponentsPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-' . uniqid('', true) . '/'; @@ -103,11 +97,7 @@ public function testHandleAddsComponentOverviewItemsForComponentsPage(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsUtilitiesOverviewItemsForUtilitiesPage(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-utilities-' . uniqid('', true) . '/'; @@ -208,11 +198,7 @@ public function testHandleAddsUtilitiesOverviewItemsForUtilitiesPage(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsUtilityPageDataFromUtilityJson(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-utility-' . uniqid('', true) . '/'; @@ -292,11 +278,7 @@ public function testHandleAddsUtilityPageDataFromUtilityJson(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsUtilityPageDataFromLegacyUtilityAliasUrl(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-utility-alias-' . uniqid('', true) . '/'; @@ -364,11 +346,7 @@ public function testHandleAddsUtilityPageDataFromLegacyUtilityAliasUrl(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAppendsStateToUtilityHeadlineWhenNotStable(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-utility-state-' . uniqid('', true) . '/'; @@ -436,11 +414,7 @@ public function testHandleAppendsStateToUtilityHeadlineWhenNotStable(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleAddsUtilityExampleCssUrlsWhenConfigured(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-utility-css-' . uniqid('', true) . '/'; @@ -532,11 +506,7 @@ public function testHandleAddsUtilityExampleCssUrlsWhenConfigured(): void @rmdir($tempBasePath); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testHandleMapsListStyleUtilityExamplesWithSectionMetadata(): void { $tempBasePath = sys_get_temp_dir() . '/styleguide-page-controller-utility-list-examples-' . uniqid('', true) . '/'; diff --git a/source/php/Tests/RequestTest.php b/source/php/Tests/RequestTest.php index 0058fc4ff..803789025 100644 --- a/source/php/Tests/RequestTest.php +++ b/source/php/Tests/RequestTest.php @@ -5,9 +5,6 @@ use MunicipioStyleGuide\Http\Request; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Http\Request - */ class RequestTest extends TestCase { private string $tempBasePath; diff --git a/source/php/Tests/RouterTest.php b/source/php/Tests/RouterTest.php index f6e0a0e85..98293d6af 100644 --- a/source/php/Tests/RouterTest.php +++ b/source/php/Tests/RouterTest.php @@ -11,11 +11,9 @@ use MunicipioStyleGuide\Controllers\UtilityPageController; use MunicipioStyleGuide\Http\Request; use MunicipioStyleGuide\Router; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Router - */ class RouterTest extends TestCase { /** @@ -124,11 +122,7 @@ public function testDispatchUsesObjectAndScriptControllersForTheirEndpoints(): v $scriptRouter->dispatch(); } - /** - * @return void - * - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testDispatchUsesComponentAndUtilityControllersForDetailPages(): void { $componentSlug = 'button-' . uniqid('', false); @@ -220,9 +214,6 @@ public function testDispatchUsesComponentAndUtilityControllersForDetailPages(): } } - /** - * @return void - */ public function testDispatchUsesPageControllerForStandardPages(): void { $request = new Request('/about', []); diff --git a/source/php/Tests/SearchTest.php b/source/php/Tests/SearchTest.php index a0908575d..4e9ce57e8 100644 --- a/source/php/Tests/SearchTest.php +++ b/source/php/Tests/SearchTest.php @@ -6,9 +6,6 @@ use MunicipioStyleGuide\Search\Search; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\Search\Search - */ class SearchTest extends TestCase { /** diff --git a/source/php/Tests/ViewTest.php b/source/php/Tests/ViewTest.php index 1e6865386..ef4330c44 100644 --- a/source/php/Tests/ViewTest.php +++ b/source/php/Tests/ViewTest.php @@ -7,9 +7,6 @@ use MunicipioStyleGuide\View; use PHPUnit\Framework\TestCase; -/** - * @covers \MunicipioStyleGuide\View - */ class ViewTest extends TestCase { /** diff --git a/source/sass/element/_body.scss b/source/sass/element/_body.scss index 87a3b7f81..9f48f8496 100644 --- a/source/sass/element/_body.scss +++ b/source/sass/element/_body.scss @@ -4,10 +4,7 @@ $_: "o-body"; /* Design tokens */ -@include tokens.create($_, - ("color--background", - "color--background-contrast", - )); +@include tokens.create($_, ("color--background", "color--background-contrast")); /* Object */ .#{$_}, diff --git a/source/sass/mixin/_button.scss b/source/sass/mixin/_button.scss index 8381027f6..28ab64df0 100644 --- a/source/sass/mixin/_button.scss +++ b/source/sass/mixin/_button.scss @@ -31,12 +31,7 @@ } // Button sizes -@mixin button-size( - $padding-vertical, - $padding-horizontal, - $font-size, - $border-radius -) { +@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $border-radius ) { padding-left: $padding-horizontal; padding-right: $padding-horizontal; font-size: $font-size; @@ -68,4 +63,4 @@ filter: var_properties.$drop-shadow-0; text-decoration: underline; } -} +} \ No newline at end of file diff --git a/source/sass/mixin/_inherit.scss b/source/sass/mixin/_inherit.scss index 3812866a4..5f7cbe897 100644 --- a/source/sass/mixin/_inherit.scss +++ b/source/sass/mixin/_inherit.scss @@ -1,14 +1,14 @@ @mixin property($name, $inherits: true) { - @property --inherit-#{$name} { - syntax: "*"; - inherits: $inherits; - } + @property --inherit-#{$name} { + syntax: "*"; + inherits: $inherits; + } } @mixin publish($name, $value) { - --inherit-#{$name}: #{$value}; + --inherit-#{$name}: #{$value}; } @mixin consume($component, $name, $fallback, $localName: $name) { - --#{$component}--#{$localName}: var(--inherit-#{$name}, #{$fallback}); + --#{$component}--#{$localName}: var(--inherit-#{$name}, #{$fallback}); } \ No newline at end of file diff --git a/source/sass/mixin/_inset-multiplier.scss b/source/sass/mixin/_inset-multiplier.scss index 5010d44f8..3fa1a3dba 100644 --- a/source/sass/mixin/_inset-multiplier.scss +++ b/source/sass/mixin/_inset-multiplier.scss @@ -1,75 +1,75 @@ @use "./tokens"; $default-scales: ( - 350px: 1.5, - 500px: 2, + 350px: 1.5, + 500px: 2, ); @mixin property() { - @property --inherit-inset-multiplier { - syntax: "*"; - inherits: false; - } + @property --inherit-inset-multiplier { + syntax: "*"; + inherits: false; + } } @function contextual-multiplier($local-scale, $inherited-multiplier: var(--inherit-inset-multiplier, 1)) { - @return max(#{$inherited-multiplier}, #{$local-scale}); + @return max(#{$inherited-multiplier}, #{$local-scale}); } @mixin publish($multiplier) { - --inherit-inset-multiplier: #{$multiplier}; + --inherit-inset-multiplier: #{$multiplier}; } @mixin consume($component, $multiplier: var(--inherit-inset-multiplier, 1), $includeContentGap: false, $includeStackGap: false) { - --#{$component}--inset-multiplier: #{$multiplier}; - --#{$component}--inset-padding-x: calc(#{tokens.getCalculatedValue($component, "space", 2)} * var(--#{$component}--inset-multiplier)); - --#{$component}--inset-padding-y: calc(var(--#{$component}--inset-padding-x) * 0.75); + --#{$component}--inset-multiplier: #{$multiplier}; + --#{$component}--inset-padding-x: calc(#{tokens.getCalculatedValue($component, "space", 2)} * var(--#{$component}--inset-multiplier)); + --#{$component}--inset-padding-y: calc(var(--#{$component}--inset-padding-x) * 0.75); - @if $includeContentGap { - --#{$component}--content-gap: calc(#{tokens.getCalculatedValue($component, "space", 0.5)} * var(--#{$component}--inset-multiplier)); - } + @if $includeContentGap { + --#{$component}--content-gap: calc(#{tokens.getCalculatedValue($component, "space", 0.5)} * var(--#{$component}--inset-multiplier)); + } - @if $includeStackGap { - --#{$component}--stack-gap: calc(#{tokens.getCalculatedValue($component, "space")} * var(--#{$component}--inset-multiplier)); - } + @if $includeStackGap { + --#{$component}--stack-gap: calc(#{tokens.getCalculatedValue($component, "space")} * var(--#{$component}--inset-multiplier)); + } } @mixin responsive-publish($selector: null, $scales: $default-scales) { - @each $width, $scale in $scales { - @container (min-width: #{$width}) { - @if $selector ==null { - @include publish(contextual-multiplier($scale)); - } + @each $width, $scale in $scales { + @container (min-width: #{$width}) { + @if $selector ==null { + @include publish(contextual-multiplier($scale)); + } - @else { - #{$selector} { - @include publish(contextual-multiplier($scale)); + @else { + #{$selector} { + @include publish(contextual-multiplier($scale)); + } + } } - } } - } } @mixin responsive-resolve($component, $selector: null, $scales: $default-scales, $publish: false, $includeContentGap: false, $includeStackGap: false) { - @each $width, $scale in $scales { - @container (min-width: #{$width}) { - @if $selector ==null { - @if $publish { - @include publish(contextual-multiplier($scale)); - } + @each $width, $scale in $scales { + @container (min-width: #{$width}) { + @if $selector ==null { + @if $publish { + @include publish(contextual-multiplier($scale)); + } - @include consume($component, contextual-multiplier($scale), $includeContentGap: $includeContentGap, $includeStackGap: $includeStackGap); - } + @include consume($component, contextual-multiplier($scale), $includeContentGap: $includeContentGap, $includeStackGap: $includeStackGap); + } - @else { - #{$selector} { - @if $publish { - @include publish(contextual-multiplier($scale)); - } + @else { + #{$selector} { + @if $publish { + @include publish(contextual-multiplier($scale)); + } - @include consume($component, contextual-multiplier($scale), $includeContentGap: $includeContentGap, $includeStackGap: $includeStackGap); + @include consume($component, contextual-multiplier($scale), $includeContentGap: $includeContentGap, $includeStackGap: $includeStackGap); + } + } } - } } - } } \ No newline at end of file diff --git a/source/sass/setting/_var_css.scss b/source/sass/setting/_var_css.scss index 6ce96424b..639c6a0b3 100644 --- a/source/sass/setting/_var_css.scss +++ b/source/sass/setting/_var_css.scss @@ -1,59 +1,59 @@ :root { - /********************************************************** + /********************************************************** * BASE * This is the base of the full stylguide, it is used to * calculate other variables, such as radius, spacing, etc. * It should not be changed directly, but can be overridden * locally by declaring the --base variable. ***********************************************************/ - --base: 8px; - --base-font-size: 16px; + --base: 8px; + --base-font-size: 16px; - /********************************************************** + /********************************************************** * Z-INDEX LEVELS ***********************************************************/ - --level-1: 1000; - --level-2: 2000; - --level-3: 3000; - --level-4: 4000; - --level-5: 5000; - --level-6: 6000; - --level-7: 7000; - --level-8: 8000; - --level-9: 9000; - - /********************************************************** + --level-1: 1000; + --level-2: 2000; + --level-3: 3000; + --level-4: 4000; + --level-5: 5000; + --level-6: 6000; + --level-7: 7000; + --level-8: 8000; + --level-9: 9000; + + /********************************************************** * CORNER RADIUS AND SHAPE ***********************************************************/ - --radius: calc(var(--base) / 2); - --radius-xs: max(calc(var(--radius) * 0.5), 4px); - --radius-sm: max(var(--radius), 8px); - --radius-md: max(calc(var(--radius) * 1.5), 12px); - --radius-lg: max(calc(var(--radius) * 2), 16px); - --radius-xl: max(calc(var(--radius) * 4), 24px); - --radius-full: 5000px; - - --corner-shape: "squirkle"; - /* Options: 'square', 'rounded', 'squirkle', 'circular' */ - - /********************************************************** + --radius: calc(var(--base) / 2); + --radius-xs: max(calc(var(--radius) * 0.5), 4px); + --radius-sm: max(var(--radius), 8px); + --radius-md: max(calc(var(--radius) * 1.5), 12px); + --radius-lg: max(calc(var(--radius) * 2), 16px); + --radius-xl: max(calc(var(--radius) * 4), 24px); + --radius-full: 5000px; + + --corner-shape: "squirkle"; + /* Options: 'square', 'rounded', 'squirkle', 'circular' */ + + /********************************************************** * SPACING ***********************************************************/ - --spacing-0: 0; - - //Derived from base spacing unit - --spacing-xs: var(--base); - --spacing-sm: calc(var(--base) * 2); - --spacing-md: calc(var(--base) * 4); - --spacing-lg: calc(var(--base) * 6); - --spacing-xl: calc(var(--base) * 8); - --spacing-xxl: calc(var(--base) * 10); - --spacing-3xl: calc(var(--base) * 12); - --spacing-4xl: calc(var(--base) * 16); - --spacing-5xl: calc(var(--base) * 24); - - /********************************************************** + --spacing-0: 0; + + //Derived from base spacing unit + --spacing-xs: var(--base); + --spacing-sm: calc(var(--base) * 2); + --spacing-md: calc(var(--base) * 4); + --spacing-lg: calc(var(--base) * 6); + --spacing-xl: calc(var(--base) * 8); + --spacing-xxl: calc(var(--base) * 10); + --spacing-3xl: calc(var(--base) * 12); + --spacing-4xl: calc(var(--base) * 16); + --spacing-5xl: calc(var(--base) * 24); + + /********************************************************** * TYPOGRAPHY * Base typography tokens for fonts, sizes, weights, and spacing. * @@ -64,47 +64,47 @@ * } ***********************************************************/ - /* Font Families */ - --font-family-base: "Roboto", sans-serif; - --font-family-heading: var(--font-family-base); - --font-family-code: "Fira Sans", "Monaco", "Consolas", "Menlo", "Lucida Console", "Courier New", "Courier", "Console"; - - /* Font Type Scale */ - --font-size-scale-ratio: 1.681; - /* Options: '1.067|Minor Second', '1.125|Major Second', '1.200|Minor Third', '1.250|Major Third', '1.333|Perfect Fourth', '1.414|Augmented Fourth', '1.500|Perfect Fifth', '1.618|Golden Ratio' */ - - // Derived from base font size and scale ratio - --font-size-base: var(--base-font-size); - --font-size-caption: calc(var(--font-size-base) / var(--font-size-scale-ratio)); - --font-size-lead: calc(var(--font-size-base) * var(--font-size-scale-ratio)); - --font-size-marketing: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 3)); - --font-size-headline: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 2)); - --font-size-title: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 1.5)); - --font-size-subtitle: calc(var(--font-size-base) * var(--font-size-scale-ratio)); - - // Derived heading sizes (h1=headline → h6=base) - --font-size-h1: var(--font-size-headline); - --font-size-h2: var(--font-size-title); - --font-size-h3: var(--font-size-subtitle); - --font-size-h4: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 0.5)); - --font-size-h5: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 0.25)); - --font-size-h6: var(--font-size-base); - - /* Font Weights */ - --font-weight-normal: 400; - --font-weight-medium: 500; - --font-weight-bold: 700; - --font-weight-heading: var(--font-weight-medium); - - /* Line Heights */ - --line-height-base: 1.625; - --line-height-heading: 1.33; - - /* Letter Spacing */ - --letter-spacing-base: 0; - --letter-spacing-heading: var(--letter-spacing-base); - - /********************************************************** + /* Font Families */ + --font-family-base: "Roboto", sans-serif; + --font-family-heading: var(--font-family-base); + --font-family-code: "Fira Sans", "Monaco", "Consolas", "Menlo", "Lucida Console", "Courier New", "Courier", "Console"; + + /* Font Type Scale */ + --font-size-scale-ratio: 1.681; + /* Options: '1.067|Minor Second', '1.125|Major Second', '1.200|Minor Third', '1.250|Major Third', '1.333|Perfect Fourth', '1.414|Augmented Fourth', '1.500|Perfect Fifth', '1.618|Golden Ratio' */ + + // Derived from base font size and scale ratio + --font-size-base: var(--base-font-size); + --font-size-caption: calc(var(--font-size-base) / var(--font-size-scale-ratio)); + --font-size-lead: calc(var(--font-size-base) * var(--font-size-scale-ratio)); + --font-size-marketing: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 3)); + --font-size-headline: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 2)); + --font-size-title: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 1.5)); + --font-size-subtitle: calc(var(--font-size-base) * var(--font-size-scale-ratio)); + + // Derived heading sizes (h1=headline → h6=base) + --font-size-h1: var(--font-size-headline); + --font-size-h2: var(--font-size-title); + --font-size-h3: var(--font-size-subtitle); + --font-size-h4: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 0.5)); + --font-size-h5: calc(var(--font-size-base) * pow(var(--font-size-scale-ratio), 0.25)); + --font-size-h6: var(--font-size-base); + + /* Font Weights */ + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-bold: 700; + --font-weight-heading: var(--font-weight-medium); + + /* Line Heights */ + --line-height-base: 1.625; + --line-height-heading: 1.33; + + /* Letter Spacing */ + --letter-spacing-base: 0; + --letter-spacing-heading: var(--letter-spacing-base); + + /********************************************************** * BORDERS * Border width tokens for UI elements. * @@ -114,17 +114,17 @@ * } ***********************************************************/ - /* Base Widths */ - --border-width-thin: 1px; - --border-width-medium: 2px; - --border-width-thick: 4px; + /* Base Widths */ + --border-width-thin: 1px; + --border-width-medium: 2px; + --border-width-thick: 4px; - /* Semantic Border Widths */ - --border-width-divider: var(--border-width-thin); - --border-width-input: var(--border-width-thin); - --border-width-button: var(--border-width-medium); + /* Semantic Border Widths */ + --border-width-divider: var(--border-width-thin); + --border-width-input: var(--border-width-thin); + --border-width-button: var(--border-width-medium); - /********************************************************** + /********************************************************** * SHADOWS * Shadow system with global multipliers for consistent elevation. * @@ -135,80 +135,80 @@ * } ***********************************************************/ - /* Shadow Configuration */ - --shadow-color: rgba(0, 0, 0, 0.1); - --shadow-amount: 0.7; - --shadow-detail-amount: 0.5; - - /* Drop Shadows - For elevation */ - --shadow-0: drop-shadow(0 0 0 transparent); - --shadow-1: drop-shadow(0px calc(4px * var(--shadow-amount)) calc(6px * var(--shadow-amount)) var(--shadow-color)); - --shadow-2: drop-shadow(0px calc(6px * var(--shadow-amount)) calc(8px * var(--shadow-amount)) var(--shadow-color)); - --shadow-3: drop-shadow(0px calc(8px * var(--shadow-amount)) calc(10px * var(--shadow-amount)) var(--shadow-color)); - --shadow-4: drop-shadow(0px calc(10px * var(--shadow-amount)) calc(12px * var(--shadow-amount)) var(--shadow-color)); - --shadow-5: drop-shadow(0px calc(12px * var(--shadow-amount)) calc(14px * var(--shadow-amount)) var(--shadow-color)); - - /* Detail Shadows - For subtle depth */ - --shadow-detail-0: drop-shadow(0 0 0 transparent); - --shadow-detail-1: drop-shadow(0px calc(2px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); - --shadow-detail-2: drop-shadow(0px calc(4px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); - --shadow-detail-3: drop-shadow(0px calc(6px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); - --shadow-detail-4: drop-shadow(0px calc(8px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); - --shadow-detail-5: drop-shadow(0px calc(8px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); - - /********************************************************** + /* Shadow Configuration */ + --shadow-color: rgba(0, 0, 0, 0.1); + --shadow-amount: 0.7; + --shadow-detail-amount: 0.5; + + /* Drop Shadows - For elevation */ + --shadow-0: drop-shadow(0 0 0 transparent); + --shadow-1: drop-shadow(0px calc(4px * var(--shadow-amount)) calc(6px * var(--shadow-amount)) var(--shadow-color)); + --shadow-2: drop-shadow(0px calc(6px * var(--shadow-amount)) calc(8px * var(--shadow-amount)) var(--shadow-color)); + --shadow-3: drop-shadow(0px calc(8px * var(--shadow-amount)) calc(10px * var(--shadow-amount)) var(--shadow-color)); + --shadow-4: drop-shadow(0px calc(10px * var(--shadow-amount)) calc(12px * var(--shadow-amount)) var(--shadow-color)); + --shadow-5: drop-shadow(0px calc(12px * var(--shadow-amount)) calc(14px * var(--shadow-amount)) var(--shadow-color)); + + /* Detail Shadows - For subtle depth */ + --shadow-detail-0: drop-shadow(0 0 0 transparent); + --shadow-detail-1: drop-shadow(0px calc(2px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); + --shadow-detail-2: drop-shadow(0px calc(4px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); + --shadow-detail-3: drop-shadow(0px calc(6px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); + --shadow-detail-4: drop-shadow(0px calc(8px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); + --shadow-detail-5: drop-shadow(0px calc(8px * var(--shadow-detail-amount)) calc(4px * var(--shadow-detail-amount)) var(--shadow-color)); + + /********************************************************** * Colors ***********************************************************/ - /* Brand */ - --color--primary: #2d2d2d; - --color--primary-contrast: #ffffff; + /* Brand */ + --color--primary: #2d2d2d; + --color--primary-contrast: #ffffff; - --color--secondary: #6e6e6e; - --color--secondary-contrast: #ffffff; + --color--secondary: #6e6e6e; + --color--secondary-contrast: #ffffff; - --color--accent: #bdbdbd; - --color--accent-contrast: #2d2d2d; + --color--accent: #bdbdbd; + --color--accent-contrast: #2d2d2d; - /* Layout */ - --color--background: #f5f5f5; - --color--background-contrast: #2d2d2d; + /* Layout */ + --color--background: #f5f5f5; + --color--background-contrast: #2d2d2d; - --color--surface: #ffffff; - --color--surface-contrast: #2d2d2d; + --color--surface: #ffffff; + --color--surface-contrast: #2d2d2d; - /* Typography */ - --color--text: #2d2d2d; - --color--muted: #6e6e6e; + /* Typography */ + --color--text: #2d2d2d; + --color--muted: #6e6e6e; - /* UI */ - --color--border: #e0e0e0; - --color--ring: #bdbdbd; + /* UI */ + --color--border: #e0e0e0; + --color--ring: #bdbdbd; - /* State / feedback */ - --color--success: #4caf50; - --color--success-contrast: #ffffff; + /* State / feedback */ + --color--success: #4caf50; + --color--success-contrast: #ffffff; - --color--warning: #ffb300; - --color--warning-contrast: #2d2d2d; + --color--warning: #ffb300; + --color--warning-contrast: #2d2d2d; - --color--error: #e53935; - --color--error-contrast: #ffffff; + --color--error: #e53935; + --color--error-contrast: #ffffff; - --color--info: #039be5; - --color--info-contrast: #ffffff; + --color--info: #039be5; + --color--info-contrast: #ffffff; - /* Extended Monotone Palette */ - --color--black: #000000; - --color--white: #ffffff; - --color--darker: #565656; - --color--dark: #707070; - --color--light: #e5e5e5; - --color--lighter: #f5f5f5; + /* Extended Monotone Palette */ + --color--black: #000000; + --color--white: #ffffff; + --color--darker: #565656; + --color--dark: #707070; + --color--light: #e5e5e5; + --color--lighter: #f5f5f5; - /* Semantic UI Colors */ - --color--disabled: var(--color--lighter); - --color--disabled-text: var(--color--dark); - --color--focus: #4d90fe; - --color--link: var(--color--primary); + /* Semantic UI Colors */ + --color--disabled: var(--color--lighter); + --color--disabled-text: var(--color--dark); + --color--focus: #4d90fe; + --color--link: var(--color--primary); } \ No newline at end of file diff --git a/source/validators/Tests/CssVariablesNamespacedTest.php b/source/validators/Tests/CssVariablesNamespacedTest.php index c834387ee..ff0bd0dd0 100644 --- a/source/validators/Tests/CssVariablesNamespacedTest.php +++ b/source/validators/Tests/CssVariablesNamespacedTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\CssVariablesNamespacedValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class CssVariablesNamespacedTest extends TestCase @@ -51,9 +52,7 @@ public static function componentFilesProvider(): array return $cases; } - /** - * @dataProvider componentFilesProvider - */ + #[DataProvider('componentFilesProvider')] public function testCssVariablesAreNamespaced(string $filePath): void { if ($filePath === '/dev/null') { diff --git a/source/validators/Tests/CssVariablesReferencesDesignTokensTest.php b/source/validators/Tests/CssVariablesReferencesDesignTokensTest.php index 5b062a015..5ce4dd5a7 100644 --- a/source/validators/Tests/CssVariablesReferencesDesignTokensTest.php +++ b/source/validators/Tests/CssVariablesReferencesDesignTokensTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\CssVariablesReferencesDesignTokensValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class CssVariablesReferencesDesignTokensTest extends TestCase @@ -61,9 +62,7 @@ public static function componentFilesProvider(): array return $cases; } - /** - * @dataProvider componentFilesProvider - */ + #[DataProvider('componentFilesProvider')] public function testCssVariableReferencesExistInDesignTokens(string $filePath): void { if ($filePath === '/dev/null') { diff --git a/source/validators/Tests/InheritCustomizationPrecedenceTest.php b/source/validators/Tests/InheritCustomizationPrecedenceTest.php index 600807f29..6438ccc5b 100644 --- a/source/validators/Tests/InheritCustomizationPrecedenceTest.php +++ b/source/validators/Tests/InheritCustomizationPrecedenceTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\InheritCustomizationPrecedenceValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; /** @@ -72,12 +73,11 @@ public static function componentFilesProvider(): array * Asserts that token-backed component settings are not hidden behind * inherit-first fallbacks. * - * @dataProvider componentFilesProvider - * * @param string $filePath Absolute path to the component SCSS file. * * @return void */ + #[DataProvider('componentFilesProvider')] public function testTokenBackedComponentSettingsOutrankInheritFallbacks(string $filePath): void { if ($filePath === '/dev/null') { diff --git a/source/validators/Tests/InheritVariablesDeclaredTest.php b/source/validators/Tests/InheritVariablesDeclaredTest.php index 7515fb1a6..a5300dc41 100644 --- a/source/validators/Tests/InheritVariablesDeclaredTest.php +++ b/source/validators/Tests/InheritVariablesDeclaredTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\InheritVariablesDeclaredValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; /** @@ -76,12 +77,11 @@ public static function componentFilesProvider(): array * Asserts that every --inherit-* variable in the file is declared as * an @property block with inherits: false. * - * @dataProvider componentFilesProvider - * * @param string $filePath Absolute path to the component SCSS file. * * @return void */ + #[DataProvider('componentFilesProvider')] public function testInheritVariablesAreDeclaredWithInheritsOff(string $filePath): void { if ($filePath === '/dev/null') { diff --git a/source/validators/Tests/LocalizedColorTokenFamilyCoverageTest.php b/source/validators/Tests/LocalizedColorTokenFamilyCoverageTest.php index 9c36cdedc..73f86f938 100644 --- a/source/validators/Tests/LocalizedColorTokenFamilyCoverageTest.php +++ b/source/validators/Tests/LocalizedColorTokenFamilyCoverageTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\LocalizedColorTokenFamilyCoverageValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; /** @@ -72,12 +73,12 @@ public static function componentFilesProvider(): array * Asserts that components with token-backed color settings expose all * localized companion family tokens they rely on. * - * @dataProvider componentFilesProvider * * @param string $filePath Absolute path to the component SCSS file. * * @return void */ + #[DataProvider('componentFilesProvider')] public function testTokenBackedColorSettingsExposeFullFamilyCoverage(string $filePath): void { if ($filePath === '/dev/null') { diff --git a/source/validators/Tests/NoSassVariablesTest.php b/source/validators/Tests/NoSassVariablesTest.php index d2a64af1c..a8797914d 100644 --- a/source/validators/Tests/NoSassVariablesTest.php +++ b/source/validators/Tests/NoSassVariablesTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\NoSassVariablesValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class NoSassVariablesTest extends TestCase @@ -71,9 +72,7 @@ static function (string $filePath): bool { return $cases; } - /** - * @dataProvider componentFilesProvider - */ + #[DataProvider('componentFilesProvider')] public function testNoSassVariablesInComponent(string $filePath): void { if ($filePath === '/dev/null') { diff --git a/source/validators/Tests/TokenMixingTest.php b/source/validators/Tests/TokenMixingTest.php index 60d4eed29..c351f33da 100644 --- a/source/validators/Tests/TokenMixingTest.php +++ b/source/validators/Tests/TokenMixingTest.php @@ -3,6 +3,7 @@ namespace MunicipioStyleGuide\Validators\Tests; use MunicipioStyleGuide\Validators\Sass\TokenMixingValidator; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class TokenMixingTest extends TestCase @@ -58,9 +59,7 @@ public static function utilityFilesProvider(): array return $cases; } - /** - * @dataProvider utilityFilesProvider - */ + #[DataProvider('utilityFilesProvider')] public function testNoTokenMixinInUtility(string $filePath): void { if ($filePath === '/dev/null') {