diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d2ee797..5df907dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ --- +#### `5.1.2` + +- chore(dependencies): update (js-yaml vulnerability) +- fix(avatar): add `alt` prop for img alternate text +- fix(footer): set default `role="contentinfo"` +- fix(header): set default `role="banner"` +- fix(sidebar-nav): set default `role="navigation"` +- fix(tab-pane): add default `role="tabpanel"` +- fix(TabContentRef): add `aria-selected` attribute and default `role="tab"` + +--- + #### `5.1.1` - chore(dependencies): update diff --git a/package-lock.json b/package-lock.json index 0b5f2600..4da3a3df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coreui-angular-dev", - "version": "5.1.1", + "version": "5.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coreui-angular-dev", - "version": "5.1.1", + "version": "5.1.2", "license": "MIT", "dependencies": { "@angular/animations": "^17.3.10", @@ -3680,21 +3680,21 @@ } }, "node_modules/@nrwl/devkit": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.0.7.tgz", - "integrity": "sha512-HS6H2YgC1igC0iGewSpsO63/U8oX5zaEa0OOfKqWC59IqCeDqP0LCkYatAbBEl7fh/eIgCoyQWWouTkAaLUFiw==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.1.0.tgz", + "integrity": "sha512-n4YxtAMSdlXAmwcSKcLEX48kpcPGI/sX7lCfDeoSnTKud8Y1tlNeD8rf0YZV3ae+srE6j4lxfoJrRCpWweMcEQ==", "dev": true, "dependencies": { - "@nx/devkit": "19.0.7" + "@nx/devkit": "19.1.0" } }, "node_modules/@nrwl/tao": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.0.7.tgz", - "integrity": "sha512-tWUUsFZiu6KxMO3Q1mYm7HQh0XXQOIsJaxuuNO2UFBdfsE/P5GKUe6SuKyBmfoOY+LcZcBL/nlaJ02hJkCe7Sg==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.1.0.tgz", + "integrity": "sha512-Mayqkuh2EXkac5prri5fQFd19RBRxBQRjVwTcezk7yTKWI7V+bJzbgZANybtcKGsPCH34cpqrlV4inVwtyaVzw==", "dev": true, "dependencies": { - "nx": "19.0.7", + "nx": "19.1.0", "tslib": "^2.3.0" }, "bin": { @@ -3702,12 +3702,12 @@ } }, "node_modules/@nx/devkit": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.0.7.tgz", - "integrity": "sha512-yIIQHS1gl+dKLJXqzT7SN+Uo7wQeWT/fG9vbti4Lmc6b6gOV0vFOZiARHq3rDxNqHRCWjJbZlM9ME3GiN7UNkA==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.1.0.tgz", + "integrity": "sha512-jn8uNgavpRhYZ1u63YFNWc2lEoAr3YA7bvPK9yaBmV++tFj+Ig+eFKkQxRou4tvOUnIyVPrs/fmi/TBLVQcpQg==", "dev": true, "dependencies": { - "@nrwl/devkit": "19.0.7", + "@nrwl/devkit": "19.1.0", "ejs": "^3.1.7", "enquirer": "~2.3.6", "ignore": "^5.0.4", @@ -3722,9 +3722,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.0.7.tgz", - "integrity": "sha512-tMcYKJzldLAAF3RuHE8+SA+M4nJzQBiv4CuDChdkQ6nqoDndg3uqJ2U7rwmrNu+VJXLxJzbnWdFzaupkfu9FpQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.1.0.tgz", + "integrity": "sha512-qUPZmVusnYrgqwhIYKBbabB1RpVQZiTcKfBdW1XiBTk+dXOuIVyWVCsg2ohoBJpHJiENYjtCprxR3RWPaxFs5Q==", "cpu": [ "arm64" ], @@ -3738,9 +3738,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.0.7.tgz", - "integrity": "sha512-c3WFxHEEY/1GuSGVHREIbK19gEXnl09Rx93Sx10gPCqk2OWu6nogCg3UfY3yYzpm3c7qWOXzj/dvSRCTmzcEGQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.1.0.tgz", + "integrity": "sha512-0Gf45EQTq8Q9/inGDzX5SqNY4jXDtqqVsz6wAJ07M9CeyjwDIXOzPe36uoMUhcvXQMbMp3QUH2E/X9poxOOubg==", "cpu": [ "x64" ], @@ -3754,9 +3754,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.0.7.tgz", - "integrity": "sha512-WrteQTg/4zYqHciEmwnPje87XooqUeu8kemHDLt83BQ538AxqAp9R2DoW+JSbwHOq4ZYK7nVzQRwNbuZ7/7bkQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.1.0.tgz", + "integrity": "sha512-bw3sKpXy1R17OTStOkeRUE4EkPsvXjAEp26qmKX3G7a7bCVjH7cn+UXdgF8jsEyyiqb8WY1LG63abIlbyfecIA==", "cpu": [ "x64" ], @@ -3770,9 +3770,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.0.7.tgz", - "integrity": "sha512-jrJQYf63LCOClYDfl2Rgg/rQvA/qOoCvmEIB8XI/9TCfeRU7Zoa+dxVC6nKG02DzFaarY3zdQ2GFzYd0wpTFvg==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.1.0.tgz", + "integrity": "sha512-jJzkPWptqFnl7Q7clTMGvI6OT1x8Jw7JHLCi6JgKBqb2ieF4vUCUsLHkrfS/95l9hCUeIHeBrfHJxEXLZIhOgQ==", "cpu": [ "arm" ], @@ -3786,9 +3786,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.0.7.tgz", - "integrity": "sha512-0ekdp8+8NzFsiK3EQu9eg8W/z5ehjlPF38Vy+Pb7T3xM7pR8Kpx0k5B2D2/StPBQU8ENdyDxspBch9FnZsSbYg==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.1.0.tgz", + "integrity": "sha512-zycD7+PbVStbjlPsxE3G+bdwFDzXE7LKWtQOrGLvBxG99pXbTr+Oq1GtqL68p2Jp4MEYjIO5qdxWdNt9bBsSwA==", "cpu": [ "arm64" ], @@ -3802,9 +3802,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.0.7.tgz", - "integrity": "sha512-d0a3iIobeYJY4b8HdwsohGt1d7TMKQJM0nWI3xcbqotLSovFoL6CqNn3g7uZhZPhNwQXNtSEwaXfQRZcH9Nr1g==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.1.0.tgz", + "integrity": "sha512-NBUUbj/3NXHrqgkoLdMTnd8e9qduRVcSoGqpYDha0HBFc+Fspacw5+U26LjnmIuk/BT4yMtMrgFKU29Rq1a56w==", "cpu": [ "arm64" ], @@ -3818,9 +3818,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.0.7.tgz", - "integrity": "sha512-C75zX747Fwc/oH8Xk6+U4xBG97BYka5hGU57034cQVMHKaDfivVHKfwBuROVkj3Mg96QbAS3rAAfMtaCthMLTA==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.1.0.tgz", + "integrity": "sha512-jaPrd1VIdz/dqcjEKUJ5BnU+ONSZmG1G/g1HrNb+SIl3Ztputrwz8yJ7CwpUryRo+xSwWhZXIiNJ5r7z09kaKw==", "cpu": [ "x64" ], @@ -3834,9 +3834,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.0.7.tgz", - "integrity": "sha512-OzPtwGp4ENsRI5J35kbjXE0hDbTNF1QwnK3O7R7H1Ew9WJjZi3tEm1cTsq0/SssI6YbZqRhzrNBd/N7Mkjd2dA==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.1.0.tgz", + "integrity": "sha512-gj3Bq81s1NWzjtWteyTgczbbd2yq6xmic4H3PGFZkA5THjFAD/MiYiS9b5oQVzPWONyFgtk+gsTWVbiM7dOhew==", "cpu": [ "x64" ], @@ -3850,9 +3850,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.0.7.tgz", - "integrity": "sha512-G17tdQEjE6eAWRO4XFGpoFHZ55M1AVmj+CJwaTowzXDSk26y3waoDUGOy75ft1LLoz5i8Q9CWFG4Fnyno4Bv/g==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.1.0.tgz", + "integrity": "sha512-PIGy+uu8dzhWodIHXC0jbPtYcpi95NdtkghD1yZ32jcoVzAcHOohM07tTMHXbl7WyLqXw+De0XkmZadMJoVNAg==", "cpu": [ "arm64" ], @@ -3866,9 +3866,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.0.7.tgz", - "integrity": "sha512-ZK4w5w9khgphyqEf/cKSyZsmHD4np7/sNp25D9Fdr5z6RTu2U73K07/e3nj2jS2ZCIrjPxobAGljZdXom9LH7g==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.1.0.tgz", + "integrity": "sha512-aTbwZLIpViWgMZqyDl+2fyO5LJjtz0J4a0+0qPpEW46BAZ/kcEuE7Xv33Yoob+KorLr27n6BpzTs+7Wg4dXXFw==", "cpu": [ "x64" ], @@ -5027,6 +5027,24 @@ "node": ">=14.15.0" } }, + "node_modules/@zkochan/js-yaml": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz", + "integrity": "sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@zkochan/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -5805,9 +5823,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001621", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", - "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", + "version": "1.0.30001623", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001623.tgz", + "integrity": "sha512-X/XhAVKlpIxWPpgRTnlgZssJrF0m6YtRA0QDWgsBNT12uZM6LPRydR7ip405Y3t1LamD8cP2TZFEDZFBf5ApcA==", "funding": [ { "type": "opencollective", @@ -6866,9 +6884,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.782", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.782.tgz", - "integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==" + "version": "1.4.783", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.783.tgz", + "integrity": "sha512-bT0jEz/Xz1fahQpbZ1D7LgmPYZ3iHVY39NcWWro1+hA2IvjiPeaXtfSqrQ+nXjApMvQRE2ASt1itSLRrebHMRQ==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -8168,6 +8186,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -9613,9 +9632,9 @@ } }, "node_modules/karma-jasmine/node_modules/jasmine-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.0.tgz", - "integrity": "sha512-O236+gd0ZXS8YAjFx8xKaJ94/erqUliEkJTDedyE7iHvv4ZVqi+q+8acJxu05/WJDKm512EUNn809In37nWlAQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.1.tgz", + "integrity": "sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ==", "dev": true }, "node_modules/karma-source-map-support": { @@ -11030,15 +11049,16 @@ } }, "node_modules/nx": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/nx/-/nx-19.0.7.tgz", - "integrity": "sha512-9ZgxIvesVwM2941wnq5hvFD28kcABN+Nhf9RvA0P2DeFhOWYNMn1FhdYBrAl7tQB3gZsXrpitM5+f9kqIBzF8g==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/nx/-/nx-19.1.0.tgz", + "integrity": "sha512-ia9XIL4QWli02WNZ3tLSpWvIYJVOWcikeELJwouZOwHKT7RA9i6vCQjKsIKWSFlUs47WDwiYiLSsMxR5KTqk8Q==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/tao": "19.0.7", + "@nrwl/tao": "19.1.0", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", + "@zkochan/js-yaml": "0.0.7", "axios": "^1.6.0", "chalk": "^4.1.0", "cli-cursor": "3.1.0", @@ -11052,7 +11072,6 @@ "fs-extra": "^11.1.0", "ignore": "^5.0.4", "jest-diff": "^29.4.1", - "js-yaml": "npm:@zkochan/js-yaml@0.0.7", "jsonc-parser": "3.2.0", "lines-and-columns": "~2.0.3", "minimatch": "9.0.3", @@ -11075,16 +11094,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "19.0.7", - "@nx/nx-darwin-x64": "19.0.7", - "@nx/nx-freebsd-x64": "19.0.7", - "@nx/nx-linux-arm-gnueabihf": "19.0.7", - "@nx/nx-linux-arm64-gnu": "19.0.7", - "@nx/nx-linux-arm64-musl": "19.0.7", - "@nx/nx-linux-x64-gnu": "19.0.7", - "@nx/nx-linux-x64-musl": "19.0.7", - "@nx/nx-win32-arm64-msvc": "19.0.7", - "@nx/nx-win32-x64-msvc": "19.0.7" + "@nx/nx-darwin-arm64": "19.1.0", + "@nx/nx-darwin-x64": "19.1.0", + "@nx/nx-freebsd-x64": "19.1.0", + "@nx/nx-linux-arm-gnueabihf": "19.1.0", + "@nx/nx-linux-arm64-gnu": "19.1.0", + "@nx/nx-linux-arm64-musl": "19.1.0", + "@nx/nx-linux-x64-gnu": "19.1.0", + "@nx/nx-linux-x64-musl": "19.1.0", + "@nx/nx-win32-arm64-msvc": "19.1.0", + "@nx/nx-win32-x64-msvc": "19.1.0" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -11114,12 +11133,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/nx/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/nx/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11163,19 +11176,6 @@ "node": ">=8" } }, - "node_modules/nx/node_modules/js-yaml": { - "name": "@zkochan/js-yaml", - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz", - "integrity": "sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/nx/node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -12496,6 +12496,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" diff --git a/package.json b/package.json index e36483cf..681b1df6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coreui-angular-dev", - "version": "5.1.1", + "version": "5.1.2", "description": "CoreUI Components Library for Angular", "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek", "license": "MIT", @@ -11,7 +11,7 @@ "build:lib:prod": "ng build coreui-angular", "test:lib:dev": "ng test coreui-angular", "test:lib:prod": "ng test coreui-angular --karma-config=projects/coreui-angular/karma.conf.github.js", - "prepublish:lib": "ng build coreui-icons-angular && ng lint coreui-angular && ng test coreui-angular --watch=false && ng build coreui-angular", + "prepublish:lib": "npm run prepublish:icons && ng lint coreui-angular && ng test coreui-angular --watch=false && ng build coreui-angular", "publish:lib": "cd dist/coreui-angular/ && npm publish --tag next --dry-run", "lint:lib": "ng lint coreui-angular", "link:lib": "cd dist/coreui-angular/ && npm link", diff --git a/projects/coreui-angular/package.json b/projects/coreui-angular/package.json index 7818f37b..f96e7f73 100644 --- a/projects/coreui-angular/package.json +++ b/projects/coreui-angular/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/angular", - "version": "5.1.1", + "version": "5.1.2", "description": "CoreUI Components Library for Angular", "copyright": "Copyright 2024 creativeLabs Łukasz Holeczek", "license": "MIT", diff --git a/projects/coreui-angular/src/lib/avatar/avatar.component.html b/projects/coreui-angular/src/lib/avatar/avatar.component.html index 17cc35e5..4d44eda9 100644 --- a/projects/coreui-angular/src/lib/avatar/avatar.component.html +++ b/projects/coreui-angular/src/lib/avatar/avatar.component.html @@ -7,7 +7,7 @@ @if (!!src) { - + {{alt}} } @else { } diff --git a/projects/coreui-angular/src/lib/avatar/avatar.component.ts b/projects/coreui-angular/src/lib/avatar/avatar.component.ts index 5a95f487..75134da6 100644 --- a/projects/coreui-angular/src/lib/avatar/avatar.component.ts +++ b/projects/coreui-angular/src/lib/avatar/avatar.component.ts @@ -1,5 +1,5 @@ import { Component, HostBinding, Input } from '@angular/core'; -import { NgClass, NgTemplateOutlet } from '@angular/common'; +import { NgClass, NgOptimizedImage, NgTemplateOutlet } from '@angular/common'; import { Colors, Shapes, Sizes, TextColors } from '../coreui.types'; import { TextColorDirective } from '../utilities'; @@ -8,13 +8,13 @@ import { TextColorDirective } from '../utilities'; selector: 'c-avatar', templateUrl: './avatar.component.html', standalone: true, - imports: [ - NgTemplateOutlet, - NgClass - ], - hostDirectives: [{ - directive: TextColorDirective, inputs: ['cTextColor: textColor'] - }] + imports: [NgTemplateOutlet, NgClass, NgOptimizedImage], + hostDirectives: [ + { + directive: TextColorDirective, + inputs: ['cTextColor: textColor'] + } + ] }) export class AvatarComponent { /** @@ -22,21 +22,31 @@ export class AvatarComponent { * @type Colors */ @Input() color?: Colors; + /** * Select the shape of the component. * @type Shapes */ @Input() shape?: Shapes; + /** * Size the component small, large, or extra large. * @default 'md' */ @Input() size?: Omit = 'md'; + + /** + * The alt attribute for the img element alternate text. + * @type string + */ + @Input() alt: string = ''; + /** * The src attribute for the img element. * @type string */ @Input() src?: string; + /** * Sets the color context of the status indicator to one of CoreUI’s themed colors. * @type Colors @@ -50,8 +60,6 @@ export class AvatarComponent { */ @Input() textColor?: TextColors; - constructor() { } - get statusClass(): any { return { 'avatar-status': true, diff --git a/projects/coreui-angular/src/lib/footer/footer.component.ts b/projects/coreui-angular/src/lib/footer/footer.component.ts index 13c61fad..9524200a 100644 --- a/projects/coreui-angular/src/lib/footer/footer.component.ts +++ b/projects/coreui-angular/src/lib/footer/footer.component.ts @@ -13,13 +13,15 @@ export class FooterComponent { * @type Positions */ @Input() position?: Positions; + /** * Default role for footer. [docs] * @type string - * @default 'footer' + * @default 'contentinfo' */ + @HostBinding('attr.role') @Input() - @HostBinding('attr.role') role = 'footer'; + role = 'contentinfo'; @HostBinding('class') get getClasses(): any { diff --git a/projects/coreui-angular/src/lib/header/header/header.component.ts b/projects/coreui-angular/src/lib/header/header/header.component.ts index 712e1874..3d362d5b 100644 --- a/projects/coreui-angular/src/lib/header/header/header.component.ts +++ b/projects/coreui-angular/src/lib/header/header/header.component.ts @@ -12,7 +12,6 @@ type Container = boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'fluid'; imports: [NgClass] }) export class HeaderComponent { - /** * Defines optional container wrapping children elements. */ @@ -24,10 +23,11 @@ export class HeaderComponent { /** * Default role for header. [docs] * @type string - * @default 'header' + * @default 'banner' */ @HostBinding('attr.role') - @Input() role = 'header'; + @Input() + role = 'banner'; @HostBinding('class') get getClasses(): any { diff --git a/projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav.component.ts b/projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav.component.ts index b0681dec..bb45b62b 100644 --- a/projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav.component.ts +++ b/projects/coreui-angular/src/lib/sidebar/sidebar-nav/sidebar-nav.component.ts @@ -52,20 +52,23 @@ import { IconDirective } from '@coreui/icons-angular'; ], animations: [ trigger('openClose', [ - state('open', style({ - height: '*' - })), - state('closed', style({ - height: '0px' - })), - transition('open <=> closed', [ - animate('.15s ease') - ]) + state( + 'open', + style({ + height: '*' + }) + ), + state( + 'closed', + style({ + height: '0px' + }) + ), + transition('open <=> closed', [animate('.15s ease')]) ]) ] }) export class SidebarNavGroupComponent implements OnInit, OnDestroy { - constructor( private router: Router, private renderer: Renderer2, @@ -102,7 +105,6 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy { public display: any = { display: 'block' }; ngOnInit(): void { - this.navItems = [...this.item.children]; this.navSubscription = this.navigationEndObservable.subscribe((event: NavigationEnd) => { @@ -116,7 +118,7 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy { this.openGroup(true); } - this.navGroupSubscription = this.sidebarNavGroupService.sidebarNavGroupState$.subscribe(next => { + this.navGroupSubscription = this.sidebarNavGroupService.sidebarNavGroupState$.subscribe((next) => { if (this.dropdownMode === 'close' && next.sidebarNavGroup && next.sidebarNavGroup !== this) { if (next.sidebarNavGroup.item.url.startsWith(this.item.url)) { return; @@ -194,7 +196,6 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy { ] }) export class SidebarNavComponent implements OnChanges { - constructor( @Optional() public sidebar: SidebarComponent, public helper: SidebarNavHelper, @@ -202,7 +203,7 @@ export class SidebarNavComponent implements OnChanges { private renderer: Renderer2, private hostElement: ElementRef, private sidebarService: SidebarService - ) { } + ) {} @Input() navItems?: INavData[] = []; @Input() dropdownMode: 'path' | 'none' | 'close' = 'path'; @@ -223,7 +224,9 @@ export class SidebarNavComponent implements OnChanges { // return !!this.groupItems; // } - @HostBinding('attr.role') role = 'nav'; + @HostBinding('attr.role') + @Input() + role = 'navigation'; public navItemsArray: INavData[] = []; diff --git a/projects/coreui-angular/src/lib/tabs/tab-content-ref.directive.ts b/projects/coreui-angular/src/lib/tabs/tab-content-ref.directive.ts index 392fd23d..0aafeba8 100644 --- a/projects/coreui-angular/src/lib/tabs/tab-content-ref.directive.ts +++ b/projects/coreui-angular/src/lib/tabs/tab-content-ref.directive.ts @@ -19,7 +19,6 @@ import { TabService } from './tab.service'; standalone: true }) export class TabContentRefDirective implements OnChanges, OnDestroy { - constructor( private changeDetectorRef: ChangeDetectorRef, private tabService: TabService @@ -92,7 +91,16 @@ export class TabContentRefDirective implements OnChanges, OnDestroy { @HostBinding('attr.disabled') get attrDisabled() { return this.disabled ? '' : null; - }; + } + + @HostBinding('attr.aria-selected') + private get ariaSelected() { + return this.active; + } + + @Input() + @HostBinding('attr.role') + role = 'tab'; @HostBinding('attr.tabindex') get getTabindex(): string | null { @@ -130,7 +138,7 @@ export class TabContentRefDirective implements OnChanges, OnDestroy { if (subscribe) { this.tabServiceSubscription = this.tabService.activeTabPaneIdx$.subscribe((tabContentState) => { if (tabContentState.tabContent === this.tabContentRef) { - this.active = (tabContentState.activeIdx === this.tabPaneIdx); + this.active = tabContentState.activeIdx === this.tabPaneIdx; } }); } else { diff --git a/projects/coreui-angular/src/lib/tabs/tab-pane/tab-pane.component.ts b/projects/coreui-angular/src/lib/tabs/tab-pane/tab-pane.component.ts index 37be5f5c..c6fc19ba 100644 --- a/projects/coreui-angular/src/lib/tabs/tab-pane/tab-pane.component.ts +++ b/projects/coreui-angular/src/lib/tabs/tab-pane/tab-pane.component.ts @@ -1,4 +1,4 @@ -import { booleanAttribute, ChangeDetectorRef, Component, HostBinding, OnDestroy } from '@angular/core'; +import { booleanAttribute, ChangeDetectorRef, Component, HostBinding, Input, OnDestroy } from '@angular/core'; import { Subscription } from 'rxjs'; import { TabContentComponent } from '../tab-content/tab-content.component'; @@ -12,7 +12,6 @@ import { ITabContentState, TabService } from '../tab.service'; standalone: true }) export class TabPaneComponent implements OnDestroy { - constructor( private changeDetectorRef: ChangeDetectorRef, private tabService: TabService @@ -48,6 +47,10 @@ export class TabPaneComponent implements OnDestroy { }; } + @Input() + @HostBinding('attr.role') + role = 'tabpanel'; + ngOnDestroy(): void { this.subscribeTabService(false); } @@ -56,7 +59,7 @@ export class TabPaneComponent implements OnDestroy { if (subscribe) { this.tabServiceSubscription = this.tabService.activeTabPaneIdx$.subscribe((tabContentState: ITabContentState) => { if (tabContentState.tabContent === this.tabContent) { - this.active = (tabContentState.activeIdx === this.tabPaneIdx); + this.active = tabContentState.activeIdx === this.tabPaneIdx; } }); } else {