diff --git a/package-lock.json b/package-lock.json index 0a83c5a..1b22267 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@lit-labs/virtualizer": "^2.1.1", "@lit/context": "^1.1.6", - "igniteui-webcomponents": "~6.4.0", + "igniteui-webcomponents": "~6.5.0", "lit": "^3.3.2" }, "devDependencies": { @@ -33,10 +33,10 @@ "postcss": "^8.5.6", "sass-embedded": "^1.97.2", "sinon": "^21.0.1", - "stylelint": "^16.26.1", - "stylelint-config-standard-scss": "^16.0.0", + "stylelint": "^17.0.0", + "stylelint-config-standard-scss": "^17.0.0", "stylelint-prettier": "^5.0.3", - "stylelint-scss": "^6.14.0", + "stylelint-scss": "^7.0.0", "tslib": "^2.8.1", "typedoc": "^0.28.16", "typescript": "^5.9.3", @@ -266,9 +266,9 @@ } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", - "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", + "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==", "dev": true, "funding": [ { @@ -282,10 +282,10 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-tokenizer": "^4.0.0" } }, "node_modules/@csstools/css-syntax-patches-for-csstree": { @@ -309,9 +309,9 @@ } }, "node_modules/@csstools/css-tokenizer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", - "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz", + "integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==", "dev": true, "funding": [ { @@ -325,13 +325,13 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20.19.0" } }, "node_modules/@csstools/media-query-list-parser": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.3.tgz", - "integrity": "sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-5.0.0.tgz", + "integrity": "sha512-T9lXmZOfnam3eMERPsszjY5NK0jX8RmThmmm99FZ8b7z8yMaFZWKwLWGZuTwdO3ddRY5fy13GmmEYZXB4I98Eg==", "dev": true, "funding": [ { @@ -345,17 +345,40 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + } + }, + "node_modules/@csstools/selector-resolve-nested": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-4.0.0.tgz", + "integrity": "sha512-9vAPxmp+Dx3wQBIUwc1v7Mdisw1kbbaGqXUM8QLTgWg7SoPGYtXBsMXvsFs/0Bn5yoFhcktzxNZGNaUt0VjgjA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.1.1" } }, "node_modules/@csstools/selector-specificity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", - "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-6.0.0.tgz", + "integrity": "sha512-4sSgl78OtOXEX/2d++8A83zHNTgwCJMaR24FvsYL7Uf/VS8HZk9PTwR51elTbGqMuwH3szLvvOXEaVnqn0Z3zA==", "dev": true, "funding": [ { @@ -369,10 +392,10 @@ ], "license": "MIT-0", "engines": { - "node": ">=18" + "node": ">=20.19.0" }, "peerDependencies": { - "postcss-selector-parser": "^7.0.0" + "postcss-selector-parser": "^7.1.1" } }, "node_modules/@custom-elements-manifest/analyzer": { @@ -464,17 +487,6 @@ "rs-module-lexer": "^2.5.1" } }, - "node_modules/@dual-bundle/import-meta-resolve": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.2.1.tgz", - "integrity": "sha512-id+7YRUgoUX6CgV0DtuhirQWodeeA7Lf4i2x71JS/vtA5pRb/hIGWlw+G6MeXvsM+MXrz0VAydTGElX1rAfgPg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/JounQin" - } - }, "node_modules/@emnapi/core": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.8.1.tgz", @@ -3546,11 +3558,14 @@ } }, "node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-3.0.1.tgz", + "integrity": "sha512-vjtV3hiLqYDNRoiAv0zC4QaGAMPomEoq83PRmYIofPswwZurCeWR5LByXm7SyoL0Zh5+2z0+HC7jG8gSZJUh0w==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 16" + } }, "node_modules/bare-events": { "version": "2.8.2", @@ -4544,9 +4559,9 @@ "license": "BSD-3-Clause" }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.2.tgz", + "integrity": "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -5423,13 +5438,13 @@ "license": "MIT" }, "node_modules/html-tags": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", - "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-5.1.0.tgz", + "integrity": "sha512-n6l5uca7/y5joxZ3LUePhzmBFUJ+U2YWzhMa8XUTecSeSlQiZdF5XAd/Q3/WUl0VsXgUwWi8I7CNIwdI5WN1SQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=20.10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5565,9 +5580,9 @@ "license": "MIT" }, "node_modules/igniteui-webcomponents": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/igniteui-webcomponents/-/igniteui-webcomponents-6.4.0.tgz", - "integrity": "sha512-tW0DK91vg06TAHsnApwXmXE7dNxipwcJabeLpjz0/3ua2hQE0kcCZX9/l7OioWT4Pemn5VaaNPjo8oLzQJ6rkw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/igniteui-webcomponents/-/igniteui-webcomponents-6.5.0.tgz", + "integrity": "sha512-b/Wpmu7gfmZy2J9BiXMHJiVlNMKoJOKh48OHXaVfsdWED+HXI23k16uW+MIDW7efrVNHA234/gIDJehkNIbVcQ==", "license": "MIT", "dependencies": { "@floating-ui/dom": "^1.7.0", @@ -5648,6 +5663,17 @@ "node": ">=4" } }, + "node_modules/import-meta-resolve": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -6579,9 +6605,9 @@ } }, "node_modules/mathml-tag-names": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", - "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-4.0.0.tgz", + "integrity": "sha512-aa6AU2Pcx0VP/XWnh8IGL0SYSgQHDT6Ucror2j2mXeFAlN3ahaNs8EZtG1YiticMkSLj3Gt6VPFfZogt7G5iFQ==", "dev": true, "license": "MIT", "funding": { @@ -6614,13 +6640,13 @@ } }, "node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-14.0.0.tgz", + "integrity": "sha512-JhC3R1f6dbspVtmF3vKjAWz1EVIvwFrGGPLSdU6rK79xBwHWTuHoLnRX/t1/zHS1Ch1Y2UtIrih7DAHuH9JFJA==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7639,16 +7665,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/resolve-path": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", @@ -8648,9 +8664,9 @@ } }, "node_modules/stylelint": { - "version": "16.26.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.26.1.tgz", - "integrity": "sha512-v20V59/crfc8sVTAtge0mdafI3AdnzQ2KsWe6v523L4OA1bJO02S7MO2oyXDCS6iWb9ckIPnqAFVItqSBQr7jw==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-17.0.0.tgz", + "integrity": "sha512-saMZ2mqdQre4AfouxcbTdpVglDRcROb4MIucKHvgsDb/0IX7ODhcaz+EOIyfxAsm8Zjl/7j4hJj6MgIYYM8Xwg==", "dev": true, "funding": [ { @@ -8664,13 +8680,13 @@ ], "license": "MIT", "dependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-syntax-patches-for-csstree": "^1.0.19", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/media-query-list-parser": "^4.0.3", - "@csstools/selector-specificity": "^5.0.0", - "@dual-bundle/import-meta-resolve": "^4.2.1", - "balanced-match": "^2.0.0", + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-syntax-patches-for-csstree": "^1.0.25", + "@csstools/css-tokenizer": "^4.0.0", + "@csstools/media-query-list-parser": "^5.0.0", + "@csstools/selector-resolve-nested": "^4.0.0", + "@csstools/selector-specificity": "^6.0.0", + "balanced-match": "^3.0.1", "colord": "^2.9.3", "cosmiconfig": "^9.0.0", "css-functions-list": "^3.2.3", @@ -8680,41 +8696,40 @@ "fastest-levenshtein": "^1.0.16", "file-entry-cache": "^11.1.1", "global-modules": "^2.0.0", - "globby": "^11.1.0", + "globby": "^16.1.0", "globjoin": "^0.1.4", - "html-tags": "^3.3.1", + "html-tags": "^5.1.0", "ignore": "^7.0.5", + "import-meta-resolve": "^4.2.0", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", "known-css-properties": "^0.37.0", - "mathml-tag-names": "^2.1.3", - "meow": "^13.2.0", + "mathml-tag-names": "^4.0.0", + "meow": "^14.0.0", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "picocolors": "^1.1.1", "postcss": "^8.5.6", - "postcss-resolve-nested-selector": "^0.1.6", "postcss-safe-parser": "^7.0.1", - "postcss-selector-parser": "^7.1.0", + "postcss-selector-parser": "^7.1.1", "postcss-value-parser": "^4.2.0", - "resolve-from": "^5.0.0", - "string-width": "^4.2.3", - "supports-hyperlinks": "^3.2.0", + "string-width": "^8.1.0", + "supports-hyperlinks": "^4.4.0", "svg-tags": "^1.0.0", "table": "^6.9.0", - "write-file-atomic": "^5.0.1" + "write-file-atomic": "^7.0.0" }, "bin": { "stylelint": "bin/stylelint.mjs" }, "engines": { - "node": ">=18.12.0" + "node": ">=20.19.0" } }, "node_modules/stylelint-config-recommended": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-17.0.0.tgz", - "integrity": "sha512-WaMSdEiPfZTSFVoYmJbxorJfA610O0tlYuU2aEwY33UQhSPgFbClrVJYWvy3jGJx+XW37O+LyNLiZOEXhKhJmA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-18.0.0.tgz", + "integrity": "sha512-mxgT2XY6YZ3HWWe3Di8umG6aBmWmHTblTgu/f10rqFXnyWxjKWwNdjSWkgkwCtxIKnqjSJzvFmPT5yabVIRxZg==", "dev": true, "funding": [ { @@ -8728,29 +8743,29 @@ ], "license": "MIT", "engines": { - "node": ">=18.12.0" + "node": ">=20.19.0" }, "peerDependencies": { - "stylelint": "^16.23.0" + "stylelint": "^17.0.0" } }, "node_modules/stylelint-config-recommended-scss": { - "version": "16.0.2", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-16.0.2.tgz", - "integrity": "sha512-aUTHhPPWCvFyWaxtckJlCPaXTDFsp4pKO8evXNCsW9OwsaUWyMd6jvcUhSmfGWPrTddvzNqK4rS/UuSLcbVGdQ==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-17.0.0.tgz", + "integrity": "sha512-VkVD9r7jfUT/dq3mA3/I1WXXk2U71rO5wvU2yIil9PW5o1g3UM7Xc82vHmuVJHV7Y8ok5K137fmW5u3HbhtTOA==", "dev": true, "license": "MIT", "dependencies": { "postcss-scss": "^4.0.9", - "stylelint-config-recommended": "^17.0.0", - "stylelint-scss": "^6.12.1" + "stylelint-config-recommended": "^18.0.0", + "stylelint-scss": "^7.0.0" }, "engines": { "node": ">=20" }, "peerDependencies": { "postcss": "^8.3.3", - "stylelint": "^16.24.0" + "stylelint": "^17.0.0" }, "peerDependenciesMeta": { "postcss": { @@ -8759,9 +8774,9 @@ } }, "node_modules/stylelint-config-standard": { - "version": "39.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-39.0.1.tgz", - "integrity": "sha512-b7Fja59EYHRNOTa3aXiuWnhUWXFU2Nfg6h61bLfAb5GS5fX3LMUD0U5t4S8N/4tpHQg3Acs2UVPR9jy2l1g/3A==", + "version": "40.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-40.0.0.tgz", + "integrity": "sha512-EznGJxOUhtWck2r6dJpbgAdPATIzvpLdK9+i5qPd4Lx70es66TkBPljSg4wN3Qnc6c4h2n+WbUrUynQ3fanjHw==", "dev": true, "funding": [ { @@ -8775,31 +8790,31 @@ ], "license": "MIT", "dependencies": { - "stylelint-config-recommended": "^17.0.0" + "stylelint-config-recommended": "^18.0.0" }, "engines": { - "node": ">=18.12.0" + "node": ">=20.19.0" }, "peerDependencies": { - "stylelint": "^16.23.0" + "stylelint": "^17.0.0" } }, "node_modules/stylelint-config-standard-scss": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-16.0.0.tgz", - "integrity": "sha512-/FHECLUu+med/e6OaPFpprG86ShC4SYT7Tzb2PTVdDjJsehhFBOioSlWqYFqJxmGPIwO3AMBxNo+kY3dxrbczA==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-17.0.0.tgz", + "integrity": "sha512-uLJS6xgOCBw5EMsDW7Ukji8l28qRoMnkRch15s0qwZpskXvWt9oPzMmcYM307m9GN4MxuWLsQh4I6hU9yI53cQ==", "dev": true, "license": "MIT", "dependencies": { - "stylelint-config-recommended-scss": "^16.0.1", - "stylelint-config-standard": "^39.0.0" + "stylelint-config-recommended-scss": "^17.0.0", + "stylelint-config-standard": "^40.0.0" }, "engines": { "node": ">=20" }, "peerDependencies": { "postcss": "^8.3.3", - "stylelint": "^16.23.1" + "stylelint": "^17.0.0" }, "peerDependenciesMeta": { "postcss": { @@ -8825,9 +8840,9 @@ } }, "node_modules/stylelint-scss": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.14.0.tgz", - "integrity": "sha512-ZKmHMZolxeuYsnB+PCYrTpFce0/QWX9i9gh0hPXzp73WjuIMqUpzdQaBCrKoLWh6XtCFSaNDErkMPqdjy1/8aA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-7.0.0.tgz", + "integrity": "sha512-H88kCC+6Vtzj76NsC8rv6x/LW8slBzIbyeSjsKVlS+4qaEJoDrcJR4L+8JdrR2ORdTscrBzYWiiT2jq6leYR1Q==", "dev": true, "license": "MIT", "dependencies": { @@ -8841,10 +8856,10 @@ "postcss-value-parser": "^4.2.0" }, "engines": { - "node": ">=18.12.0" + "node": ">=20.19.0" }, "peerDependencies": { - "stylelint": "^16.8.2" + "stylelint": "^16.8.2 || ^17.0.0" } }, "node_modules/stylelint-scss/node_modules/mdn-data": { @@ -8854,123 +8869,60 @@ "dev": true, "license": "CC0-1.0" }, - "node_modules/stylelint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/stylelint/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" + "has-flag": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/globby/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/stylelint/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/stylelint/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/stylelint/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/supports-hyperlinks": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-4.4.0.tgz", + "integrity": "sha512-UKbpT93hN5Nr9go5UY7bopIB9YQlMz9nm/ct4IXt/irb5YRkn9WaqrOBJGZ5Pwvsd5FQzSVeYlGdXoCAPQZrPg==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "has-flag": "^5.0.1", + "supports-color": "^10.2.2" }, "engines": { - "node": ">=8" - } - }, - "node_modules/stylelint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" + "node": ">=20" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/chalk/supports-hyperlinks?sponsor=1" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/supports-hyperlinks/node_modules/has-flag": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-5.0.1.tgz", + "integrity": "sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==", "dev": true, "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/supports-hyperlinks": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz", - "integrity": "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==", + "node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", "dev": true, "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "funding": { - "url": "https://github.com/chalk/supports-hyperlinks?sponsor=1" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -10196,9 +10148,9 @@ "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.0.tgz", + "integrity": "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg==", "dev": true, "license": "ISC", "dependencies": { @@ -10206,7 +10158,7 @@ "signal-exit": "^4.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/write-file-atomic/node_modules/signal-exit": { diff --git a/package.json b/package.json index 2611a97..837f9dd 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "@lit-labs/virtualizer": "^2.1.1", "@lit/context": "^1.1.6", - "igniteui-webcomponents": "~6.4.0", + "igniteui-webcomponents": "~6.5.0", "lit": "^3.3.2" }, "devDependencies": { @@ -68,10 +68,10 @@ "postcss": "^8.5.6", "sass-embedded": "^1.97.2", "sinon": "^21.0.1", - "stylelint": "^16.26.1", - "stylelint-config-standard-scss": "^16.0.0", + "stylelint": "^17.0.0", + "stylelint-config-standard-scss": "^17.0.0", "stylelint-prettier": "^5.0.3", - "stylelint-scss": "^6.14.0", + "stylelint-scss": "^7.0.0", "tslib": "^2.8.1", "typedoc": "^0.28.16", "typescript": "^5.9.3", diff --git a/scripts/_package.json b/scripts/_package.json index 0fd6df6..edeff91 100644 --- a/scripts/_package.json +++ b/scripts/_package.json @@ -31,7 +31,7 @@ "dependencies": { "@lit-labs/virtualizer": "~2.1.0", "@lit/context": "~1.1.5", - "igniteui-webcomponents": "~6.4.0", + "igniteui-webcomponents": "~6.5.0", "lit": "^3.3.0" } } diff --git a/src/components/grid.ts b/src/components/grid.ts index 8c50a24..e2af303 100644 --- a/src/components/grid.ts +++ b/src/components/grid.ts @@ -1,6 +1,7 @@ import { ContextProvider } from '@lit/context'; import type { RenderItemFunction } from '@lit-labs/virtualizer/virtualize.js'; import { + ΞaddThemingController as addThemingController, IgcButtonComponent, IgcChipComponent, IgcDropdownComponent, @@ -19,7 +20,6 @@ import { getElementFromEventPath } from '../internal/element-from-event-path.js' import { EventEmitterBase } from '../internal/mixins/event-emitter.js'; import { registerComponent } from '../internal/register.js'; import { GRID_TAG } from '../internal/tags.js'; -import { addThemingController } from '../internal/theming.js'; import type { ColumnConfiguration, DataPipelineConfiguration, diff --git a/src/components/header.ts b/src/components/header.ts index fbe0f4b..ecf31d5 100644 --- a/src/components/header.ts +++ b/src/components/header.ts @@ -1,5 +1,8 @@ import { consume } from '@lit/context'; -import { IgcIconComponent } from 'igniteui-webcomponents'; +import { + ΞaddThemingController as addThemingController, + IgcIconComponent, +} from 'igniteui-webcomponents'; import { html, LitElement, nothing } from 'lit'; import { property } from 'lit/decorators.js'; import type { StateController } from '../controllers/state.js'; @@ -12,7 +15,6 @@ import { GRID_STATE_CONTEXT } from '../internal/context.js'; import { partMap } from '../internal/part-map.js'; import { registerComponent } from '../internal/register.js'; import { GRID_HEADER_TAG } from '../internal/tags.js'; -import { addThemingController } from '../internal/theming.js'; import type { ColumnConfiguration, IgcHeaderContext } from '../internal/types.js'; import { styles } from '../styles/header-cell/header-cell.css.js'; import { all } from '../styles/themes/grid-header-themes.js'; @@ -55,6 +57,7 @@ export default class IgcGridLiteHeader extends LitElement { addThemingController(this, all); } + #addResizeEventHandlers() { const config: AddEventListenerOptions = { once: true }; diff --git a/src/internal/theming.ts b/src/internal/theming.ts deleted file mode 100644 index 271af8c..0000000 --- a/src/internal/theming.ts +++ /dev/null @@ -1,201 +0,0 @@ -import type { - CSSResult, - LitElement, - ReactiveController, - ReactiveControllerHost, - ReactiveElement, -} from 'lit'; -import { adoptStyles, css, isServer } from 'lit'; - -type Theme = 'material' | 'bootstrap' | 'indigo' | 'fluent'; -type ThemeVariant = 'light' | 'dark'; - -export type Themes = { - light: { - [K in Theme | 'shared']?: CSSResult; - }; - dark: { - [K in Theme | 'shared']?: CSSResult; - }; -}; - -type ThemeChangedCallback = (theme: Theme) => unknown; -type ThemingControllerConfig = { - themeChange?: ThemeChangedCallback; -}; - -const CHANGE_THEME_EVENT = 'igc-change-theme'; -let theme: Theme; -let themeVariant: ThemeVariant; - -function isStyleRule(rule: CSSRule): rule is CSSStyleRule { - return rule != null && 'style' in rule; -} - -function cssKeyToJsKey(key: string): string { - return key.replace(/^--|-./g, (match) => { - return match.startsWith('--') ? '' : match.charAt(1).toUpperCase(); - }); -} - -function getAllCssVariableNames(): Set { - const cssVars = new Set(); - const styleSheets = Array.from(document.styleSheets); - - for (const sheet of styleSheets) { - let rules: CSSRuleList | undefined; - - // Potential CORS or access errors - try { - rules = sheet.cssRules; - } catch { - continue; - } - - if (!rules) { - continue; - } - - for (const rule of Array.from(rules)) { - if (isStyleRule(rule)) { - const length = rule.style.length; - - for (let i = 0; i < length; i++) { - const style = rule.style[i]; - - if (style.startsWith('--')) { - cssVars.add(style); - } - } - } - } - } - - return cssVars; -} - -function getElementCssVariables( - allCssVars: Set, - element: HTMLElement, - pseudo?: string -): Record { - const cssVars: Record = {}; - const styles = getComputedStyle(element, pseudo); - - for (const key of allCssVars) { - const value = styles.getPropertyValue(key); - - if (value) { - cssVars[cssKeyToJsKey(key)] = value.trim(); - } - } - - return cssVars; -} - -function getAllCssVariables(): Record { - /* c8 ignore next 2 */ - return isServer ? {} : getElementCssVariables(getAllCssVariableNames(), document.documentElement); -} - -function isOfTypeTheme(theme: string): theme is Theme { - return ['bootstrap', 'material', 'indigo', 'fluent'].includes(theme); -} - -function isOfTypeThemeVariant(variant: string): variant is ThemeVariant { - return ['light', 'dark'].includes(variant); -} - -function getTheme() { - const cssVars = getAllCssVariables(); - const foundTheme = cssVars.igTheme; - const foundVariant = cssVars.igThemeVariant; - - theme = isOfTypeTheme(foundTheme) ? foundTheme : 'bootstrap'; - themeVariant = isOfTypeThemeVariant(foundVariant) ? foundVariant : 'light'; - - return { theme, themeVariant }; -} - -class ThemingController implements ReactiveController { - private readonly _host: ReactiveControllerHost & ReactiveElement; - private readonly _themes: Themes; - private readonly _options?: ThemingControllerConfig; - - private _theme: Theme = 'bootstrap'; - private _variant: ThemeVariant = 'light'; - - public get theme(): Theme { - return this._theme; - } - - constructor( - host: ReactiveControllerHost & ReactiveElement, - themes: Themes, - config?: ThemingControllerConfig - ) { - this._host = host; - this._themes = themes; - this._options = config; - this._host.addController(this); - } - - /** @internal */ - public hostConnected(): void { - this._handleThemeChanged(); - globalThis.addEventListener(CHANGE_THEME_EVENT, this); - } - - /** @internal */ - public hostDisconnected(): void { - globalThis.removeEventListener(CHANGE_THEME_EVENT, this); - } - - /** @internal */ - public handleEvent(): void { - this._handleThemeChanged(); - } - - private _getStyles() { - const props = this._themes[this._variant]; - const styles = { shared: css``, theme: css`` }; - - for (const [name, sheet] of Object.entries(props)) { - if (name === 'shared') { - styles.shared = sheet; - } - if (name === this.theme) { - styles.theme = sheet; - } - } - - return styles; - } - - protected _adoptStyles(): void { - const { theme: currentTheme, themeVariant } = getTheme(); - this._theme = currentTheme; - this._variant = themeVariant; - - const ctor = this._host.constructor as typeof LitElement; - const { shared, theme } = this._getStyles(); - - adoptStyles(this._host.shadowRoot!, [...ctor.elementStyles, shared, theme]); - } - - private _handleThemeChanged(): void { - this._adoptStyles(); - this._options?.themeChange?.call(this._host, this._theme); - this._host.requestUpdate(); - } -} - -export function addThemingController( - host: ReactiveControllerHost & ReactiveElement, - themes: Themes, - config?: ThemingControllerConfig -): ThemingController { - return new ThemingController(host, themes, config); -} - -export type { ThemingController }; diff --git a/src/internal/types.ts b/src/internal/types.ts index 73d4c8d..944b83a 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -1,4 +1,5 @@ -import type { ReactiveControllerHost, TemplateResult } from 'lit'; +import type { Theme } from 'igniteui-webcomponents'; +import type { CSSResult, ReactiveControllerHost, TemplateResult } from 'lit'; import type IgcGridLiteCell from '../components/cell.js'; import type { IgcGridLite } from '../components/grid.js'; import type IgcGridLiteHeader from '../components/header.js'; @@ -8,6 +9,15 @@ import type { SortComparer } from '../operations/sort/types.js'; export type NavigationState = 'previous' | 'current'; export type GridHost = ReactiveControllerHost & IgcGridLite; +export type Themes = { + light: { + [K in Theme | 'shared']?: CSSResult; + }; + dark: { + [K in Theme | 'shared']?: CSSResult; + }; +}; + type FlatKeys = keyof T; type DotPaths = { [K in keyof T & string]: T[K] extends object diff --git a/src/styles/themes/grid-header-themes.ts b/src/styles/themes/grid-header-themes.ts index a40d6d6..42bdb8b 100644 --- a/src/styles/themes/grid-header-themes.ts +++ b/src/styles/themes/grid-header-themes.ts @@ -1,26 +1,25 @@ import { css } from 'lit'; -import type { Themes } from '../../internal/theming.js'; - +import type { Themes } from '../../internal/types.js'; // Shared import { styles as bootstrap } from './shared/header.bootstrap.css.js'; import { styles as fluent } from './shared/header.fluent.css.js'; const light = { bootstrap: css` - ${bootstrap} + ${bootstrap} `, fluent: css` - ${fluent} + ${fluent} `, }; const dark = { bootstrap: css` - ${bootstrap} + ${bootstrap} `, fluent: css` - ${fluent} + ${fluent} `, }; diff --git a/src/styles/themes/grid-themes.ts b/src/styles/themes/grid-themes.ts index 76d0796..6b27d64 100644 --- a/src/styles/themes/grid-themes.ts +++ b/src/styles/themes/grid-themes.ts @@ -1,6 +1,5 @@ import { css } from 'lit'; - -import type { Themes } from '../../internal/theming.js'; +import type { Themes } from '../../internal/types.js'; // Dark Overrides import { styles as bootstrapDark } from './dark/grid.bootstrap.css.js'; import { styles as fluentDark } from './dark/grid.fluent.css.js'; @@ -17,37 +16,37 @@ import { styles as bootstrap } from './shared/grid.common.css.js'; const light = { shared: css` - ${shared} + ${shared} `, bootstrap: css` - ${bootstrap} ${bootstrapLight} + ${bootstrap} ${bootstrapLight} `, material: css` - ${materialLight} + ${materialLight} `, fluent: css` - ${fluentLight} + ${fluentLight} `, indigo: css` - ${indigoLight} + ${indigoLight} `, }; const dark = { shared: css` - ${shared} + ${shared} `, bootstrap: css` - ${bootstrapDark} + ${bootstrapDark} `, material: css` - ${materialDark} + ${materialDark} `, fluent: css` - ${fluentDark} + ${fluentDark} `, indigo: css` - ${indigoDark} + ${indigoDark} `, };