diff --git a/UPDATING.md b/UPDATING.md index f0dbf1e5f0a..d19a3f5ed15 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -23,8 +23,8 @@ This file documents any backwards-incompatible changes in Superset and assists people when migrating to a new version. ## Next - - [32317](https://github.com/apache/superset/pull/32317) The horizontal filter bar feature is now out of testing/beta development and its feature flag `HORIZONTAL_FILTER_BAR` has been removed. +- [31590](https://github.com/apache/superset/pull/31590) Marks the begining of intricate work around supporting dynamic Theming, and breaks support for [THEME_OVERRIDES](https://github.com/apache/superset/blob/732de4ac7fae88e29b7f123b6cbb2d7cd411b0e4/superset/config.py#L671) in favor of a new theming system based on AntD V5. Likely this will be in disrepair until settling over the 5.x lifecycle. - [31976](https://github.com/apache/superset/pull/31976) Removed the `DISABLE_LEGACY_DATASOURCE_EDITOR` feature flag. The previous value of the feature flag was `True` and now the feature is permanently removed. - [31959](https://github.com/apache/superset/pull/32000) Removes CSV_UPLOAD_MAX_SIZE config, use your web server to control file upload size. - [31959](https://github.com/apache/superset/pull/31959) Removes the following endpoints from data uploads: `/api/v1/database//_upload` and `/api/v1/database/_metadata`, in favour of new one (Details on the PR). And simplifies permissions. diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js index 65cdd18a2c7..bc501295a7c 100644 --- a/superset-frontend/.eslintrc.js +++ b/superset-frontend/.eslintrc.js @@ -373,7 +373,7 @@ module.exports = { 'fixtures.*', 'cypress-base/cypress/**/*', 'Stories.tsx', - 'packages/superset-ui-core/src/style/index.tsx', + 'packages/superset-ui-core/src/theme/index.tsx', ], rules: { 'theme-colors/no-literal-colors': 0, diff --git a/superset-frontend/.prettierignore b/superset-frontend/.prettierignore index 790231eb298..4fe6cf6c11c 100644 --- a/superset-frontend/.prettierignore +++ b/superset-frontend/.prettierignore @@ -26,5 +26,7 @@ CHANGELOG/ *-topo.json storybook-static/ *.snap +**/*.less +**/*.less.hbs /.nx/workspace-data diff --git a/superset-frontend/.storybook/preview.jsx b/superset-frontend/.storybook/preview.jsx index ef27f3591e8..6a16f720409 100644 --- a/superset-frontend/.storybook/preview.jsx +++ b/superset-frontend/.storybook/preview.jsx @@ -17,8 +17,7 @@ * under the License. */ import { withJsx } from '@mihkeleidast/storybook-addon-source'; -import { supersetTheme, ThemeProvider } from '@superset-ui/core'; -import { AntdThemeProvider } from '../src/components/AntdThemeProvider'; +import { themeObject } from '@superset-ui/core'; import { combineReducers, createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import { Provider } from 'react-redux'; @@ -34,14 +33,14 @@ const store = createStore( compose(applyMiddleware(thunk)), ); -const themeDecorator = Story => ( - - +const themeDecorator = Story => { + return ( + - - -); + + ); +}; const providerDecorator = Story => ( diff --git a/superset-frontend/.storybook/storybook.css b/superset-frontend/.storybook/storybook.css index b4e2fce55b7..25fa51c5a8b 100644 --- a/superset-frontend/.storybook/storybook.css +++ b/superset-frontend/.storybook/storybook.css @@ -1,3 +1,2 @@ body { - background: transparent; } diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 793ca61edfd..a56dc87e260 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -16,7 +16,7 @@ "dependencies": { "@ant-design/icons": "^5.2.6", "@emotion/cache": "^11.4.0", - "@emotion/react": "^11.13.3", + "@emotion/react": "^11.14.0", "@emotion/styled": "^11.3.0", "@fontsource/fira-code": "^5.0.18", "@fontsource/inter": "^5.0.20", @@ -83,6 +83,8 @@ "geostyler-style": "^7.5.0", "geostyler-wfs-parser": "^2.0.3", "googleapis": "^130.0.0", + "handlebars": "^4.7.8", + "html-webpack-plugin": "^5.6.3", "immer": "^10.1.1", "interweave": "^13.1.0", "jquery": "^3.7.1", @@ -195,12 +197,13 @@ "@types/dom-to-image": "^2.6.7", "@types/enzyme": "^3.10.18", "@types/fetch-mock": "^7.3.2", - "@types/jest": "^29.5.12", + "@types/jest": "^29.5.14", "@types/jquery": "^3.5.8", "@types/js-levenshtein": "^1.1.3", "@types/json-bigint": "^1.0.4", "@types/math-expression-evaluator": "^1.3.3", "@types/mousetrap": "^1.6.15", + "@types/node": "^22.12.0", "@types/react": "^17.0.83", "@types/react-dom": "^17.0.26", "@types/react-gravatar": "^2.6.14", @@ -219,6 +222,7 @@ "@types/redux-mock-store": "^1.0.6", "@types/rison": "0.1.0", "@types/sinon": "^17.0.3", + "@types/testing-library__jest-dom": "^5.14.9", "@types/tinycolor2": "^1.4.3", "@types/yargs": "12 - 18", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -237,6 +241,8 @@ "css-minimizer-webpack-plugin": "^7.0.0", "enzyme": "^3.11.0", "enzyme-matchers": "^7.1.2", + "esbuild": "^0.20.0", + "esbuild-loader": "^4.2.2", "eslint": "^8.56.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^7.2.0", @@ -263,7 +269,9 @@ "html-webpack-plugin": "^5.6.3", "imports-loader": "^5.0.0", "jest": "^29.7.0", + "jest-environment-enzyme": "^7.1.2", "jest-environment-jsdom": "^29.7.0", + "jest-enzyme": "^7.1.2", "jest-html-reporter": "^3.10.2", "jest-websocket-mock": "^2.5.0", "jsdom": "^26.0.0", @@ -288,6 +296,7 @@ "ts-jest": "^29.2.5", "ts-loader": "^9.5.1", "tscw-config": "^1.1.2", + "tsx": "^4.19.2", "typescript": "5.1.6", "vm-browserify": "^1.1.2", "webpack": "^5.98.0", @@ -3333,6 +3342,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "exec-sh": "^0.3.2", + "minimist": "^1.2.0" + }, + "bin": { + "watch": "cli.js" + }, + "engines": { + "node": ">=0.1.95" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -4425,6 +4451,23 @@ "node": ">=12" } }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/netbsd-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", @@ -4441,6 +4484,23 @@ "node": ">=12" } }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/openbsd-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", @@ -12285,9 +12345,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.10.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.9.tgz", - "integrity": "sha512-Ir6hwgsKyNESl/gLOcEz3krR4CBGgliDqBQ2ma4wIhEx0w+xnoeTq3tdrNw15kU3SxogDjOgv9sqdtLW8mIHaw==", + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -12432,6 +12492,7 @@ "resolved": "https://registry.npmjs.org/@types/react-resizable/-/react-resizable-3.0.8.tgz", "integrity": "sha512-Pcvt2eGA7KNXldt1hkhVhAgZ8hK41m0mp89mFgQi7LAAEZiaLgm4fHJ5zbJZ/4m2LVaAyYrrRRv1LHDcrGQanA==", "dev": true, + "license": "MIT", "dependencies": { "@types/react": "*" } @@ -12694,6 +12755,16 @@ "integrity": "sha512-bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q==", "license": "MIT" }, + "node_modules/@types/testing-library__jest-dom": { + "version": "5.14.9", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.9.tgz", + "integrity": "sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/jest": "*" + } + }, "node_modules/@types/through": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz", @@ -14410,6 +14481,40 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-globals": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + } + }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals/node_modules/acorn-walk": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz", + "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -15424,6 +15529,36 @@ "deep-equal": "^2.0.5" } }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", @@ -15450,6 +15585,16 @@ "node": ">=8" } }, + "node_modules/array-equal": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.2.tgz", + "integrity": "sha512-gUHx76KtnhEgB3HOuFYiCm3FIdEs6ocM2asHvNTkfu/Y09qQVrrVVaOKENmS2KkSaGoxgXNqC+ZVtR/n0MOkSA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -15500,6 +15645,16 @@ "node": ">=8" } }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array.prototype.filter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.4.tgz", @@ -15677,7 +15832,6 @@ "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "safer-buffer": "~2.1.0" } @@ -15701,11 +15855,20 @@ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.8" } }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ast-types": { "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", @@ -15752,6 +15915,13 @@ "node": ">= 0.4" } }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true, + "license": "MIT" + }, "node_modules/async-validator": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.5.2.tgz", @@ -15830,7 +16000,6 @@ "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": "*" } @@ -15840,8 +16009,7 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/axe-core": { "version": "4.10.2", @@ -16393,6 +16561,38 @@ } } }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/base16": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/base16/-/base16-1.0.0.tgz", @@ -16452,7 +16652,6 @@ "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "tweetnacl": "^0.14.3" } @@ -16588,6 +16787,17 @@ "url": "https://bevry.me/fund" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -16838,6 +17048,13 @@ "resolved": "https://registry.npmjs.org/browser-assert/-/browser-assert-1.2.1.tgz", "integrity": "sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==" }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/browserify-zlib": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", @@ -17101,6 +17318,27 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -17385,6 +17623,19 @@ "license": "MIT", "optional": true }, + "node_modules/capture-exit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "dev": true, + "license": "ISC", + "dependencies": { + "rsvp": "^4.8.4" + }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz", @@ -17400,8 +17651,7 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true, - "license": "Apache-2.0", - "peer": true + "license": "Apache-2.0" }, "node_modules/ccount": { "version": "2.0.1", @@ -17797,6 +18047,49 @@ "dev": true, "license": "MIT" }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -18039,6 +18332,20 @@ "dev": true, "license": "MIT" }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -18206,6 +18513,16 @@ "dot-prop": "^5.1.0" } }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -18630,6 +18947,16 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/copy-to-clipboard": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", @@ -19226,6 +19553,13 @@ "dev": true, "license": "CC0-1.0" }, + "node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true, + "license": "MIT" + }, "node_modules/cssstyle": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.2.1.tgz", @@ -19750,7 +20084,6 @@ "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0" }, @@ -20284,6 +20617,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/defu": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", @@ -20636,6 +20983,24 @@ ], "license": "BSD-2-Clause" }, + "node_modules/domexception": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "deprecated": "Use your platform's native DOMException instead", + "dev": true, + "license": "MIT", + "dependencies": { + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/domexception/node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/domhandler": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", @@ -20850,7 +21215,6 @@ "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -20861,8 +21225,7 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", @@ -21245,8 +21608,6 @@ "integrity": "sha512-Ynm6Z6R6iwQ0g2g1YToz6DWhxVnt8Dy1ijR2zynRKxTyBGA8rCDXU3rs2Qc4OKvUvc2Qoe1bcFK6bnPs20TrTg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "@types/cheerio": "^0.22.22", "lodash": "^4.17.21", @@ -21264,9 +21625,7 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true, - "license": "MIT", - "optional": true, - "peer": true + "license": "MIT" }, "node_modules/err-code": { "version": "2.0.3", @@ -21543,6 +21902,478 @@ "@esbuild/win32-x64": "0.20.2" } }, + "node_modules/esbuild-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esbuild-loader/-/esbuild-loader-4.3.0.tgz", + "integrity": "sha512-D7HeJNdkDKKMarPQO/3dlJT6RwN2YJO7ENU6RPlpOz5YxSHnUNi2yvW41Bckvi1EVwctIaLzlb0ni5ag2GINYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "get-tsconfig": "^4.7.0", + "loader-utils": "^2.0.4", + "webpack-sources": "^1.4.3" + }, + "funding": { + "url": "https://github.com/privatenumber/esbuild-loader?sponsor=1" + }, + "peerDependencies": { + "webpack": "^4.40.0 || ^5.0.0" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/android-arm": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/android-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/android-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/darwin-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-arm": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-ia32": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-loong64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-s390x": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/linux-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/sunos-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/win32-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/win32-ia32": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/@esbuild/win32-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/esbuild-loader/node_modules/esbuild": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" + } + }, + "node_modules/esbuild-loader/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esbuild-loader/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, "node_modules/esbuild-plugin-alias": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/esbuild-plugin-alias/-/esbuild-plugin-alias-0.2.1.tgz", @@ -22629,6 +23460,13 @@ "node": ">=0.8.x" } }, + "node_modules/exec-sh": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", + "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", + "dev": true, + "license": "MIT" + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -22675,6 +23513,92 @@ "node": ">= 0.8.0" } }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/expand-brackets/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, "node_modules/expect": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", @@ -22785,6 +23709,20 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "license": "MIT" }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -22823,6 +23761,62 @@ "node": ">=0.6.0" } }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -22868,8 +23862,7 @@ "engines": [ "node >=0.6.0" ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/falafel": { "version": "2.2.5", @@ -23327,6 +24320,14 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -23723,6 +24724,16 @@ "is-callable": "^1.1.3" } }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/foreground-child": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", @@ -23757,7 +24768,6 @@ "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": "*" } @@ -23922,6 +24932,19 @@ "node": ">= 0.6" } }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -24907,6 +25930,16 @@ "node": ">= 14" } }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/getos": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", @@ -24924,7 +25957,6 @@ "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0" } @@ -25579,6 +26611,55 @@ "node": ">=0.10.0" } }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/har-validator/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/har-validator/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -25690,6 +26771,81 @@ "dev": true, "license": "ISC" }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", @@ -27214,6 +28370,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/is-alphabetical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", @@ -27442,6 +28611,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/is-data-view": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", @@ -27492,6 +28674,20 @@ "dev": true, "license": "MIT" }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -27507,6 +28703,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -27921,8 +29130,7 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "2.1.0", @@ -27998,7 +29206,6 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -28060,8 +29267,7 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", @@ -28767,6 +29973,1074 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/jest-environment-enzyme": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/jest-environment-enzyme/-/jest-environment-enzyme-7.1.2.tgz", + "integrity": "sha512-3tfaYAzO7qZSRrv+srQnfK16Vu5XwH/pHi8FpoqSHjKKngbHzXf7aBCBuWh8y3w0OtknHRfDMFrC60Khj+g1hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-environment-jsdom": "^24.0.0" + }, + "peerDependencies": { + "enzyme": "3.x", + "jest": ">=22.0.0", + "react": "^0.13.0 || ^0.14.0 || ^15.0.0 || >=16.x" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/environment": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", + "integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/fake-timers": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", + "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/transform": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", + "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/types": "^24.9.0", + "babel-plugin-istanbul": "^5.1.0", + "chalk": "^2.0.1", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.1.15", + "jest-haste-map": "^24.9.0", + "jest-regex-util": "^24.9.0", + "jest-util": "^24.9.0", + "micromatch": "^3.1.10", + "pirates": "^4.0.1", + "realpath-native": "^1.1.0", + "slash": "^2.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "2.4.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@types/istanbul-reports": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz", + "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*", + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/jest-environment-enzyme/node_modules/@types/stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/@types/yargs": { + "version": "13.0.12", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.12.tgz", + "integrity": "sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-environment-enzyme/node_modules/acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-environment-enzyme/node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/jest-environment-enzyme/node_modules/babel-plugin-istanbul": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", + "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "find-up": "^3.0.0", + "istanbul-lib-instrument": "^3.3.0", + "test-exclude": "^5.2.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-environment-enzyme/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/jest-environment-enzyme/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/cssstyle": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", + "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssom": "0.3.x" + } + }, + "node_modules/jest-environment-enzyme/node_modules/data-urls": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", + "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/data-urls/node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/jest-environment-enzyme/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/jest-environment-enzyme/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "Upgrade to fsevents v2 to mitigate potential security issues", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-environment-enzyme/node_modules/html-encoding-sniffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^1.0.1" + } + }, + "node_modules/jest-environment-enzyme/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/jest-environment-enzyme/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-environment-jsdom": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", + "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0", + "jsdom": "^11.5.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-haste-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", + "integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^24.9.0", + "anymatch": "^2.0.0", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.1.15", + "invariant": "^2.2.4", + "jest-serializer": "^24.9.0", + "jest-util": "^24.9.0", + "jest-worker": "^24.9.0", + "micromatch": "^3.1.10", + "sane": "^4.0.3", + "walker": "^1.0.7" + }, + "engines": { + "node": ">= 6" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-mock": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", + "integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^24.9.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", + "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/source-map": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "callsites": "^3.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "mkdirp": "^0.5.1", + "slash": "^2.0.0", + "source-map": "^0.6.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-worker": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jest-worker/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/jsdom": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/jest-environment-enzyme/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-environment-enzyme/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-environment-enzyme/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/jest-environment-enzyme/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/stack-utils": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.5.tgz", + "integrity": "sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-environment-enzyme/node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-environment-enzyme/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-environment-enzyme/node_modules/test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-environment-enzyme/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/jest-environment-enzyme/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/jest-environment-enzyme/node_modules/whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/jest-environment-enzyme/node_modules/whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-enzyme/node_modules/write-file-atomic": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", + "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "node_modules/jest-environment-enzyme/node_modules/ws": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.4.tgz", + "integrity": "sha512-fFCejsuC8f9kOSu9FYaOw8CdO68O3h5v0lg4p74o8JqWpwTf9tniOD+nOB78aWoVSS6WptVUmDrp/KPsMVBWFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/jest-environment-enzyme/node_modules/xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/jest-environment-jsdom": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", @@ -29074,6 +31348,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-enzyme": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/jest-enzyme/-/jest-enzyme-7.1.2.tgz", + "integrity": "sha512-j+jkph3t5hGBS12eOldpfsnERYRCHi4c/0KWPMnqRPoJJXvCpLIc5th1MHl0xDznQDXVU0AHUXg3rqMrf8vGpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "enzyme-matchers": "^7.1.2", + "enzyme-to-json": "^3.3.0", + "jest-environment-enzyme": "^7.1.2" + }, + "peerDependencies": { + "enzyme": ">=3.4.0", + "jest": ">=22.0.0" + } + }, "node_modules/jest-get-type": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", @@ -29571,6 +31861,16 @@ "node": ">=8" } }, + "node_modules/jest-serializer": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", + "integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", @@ -30557,6 +32857,14 @@ "node": ">=14.0.0" } }, + "node_modules/left-pad": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "deprecated": "use String.prototype.padStart()", + "dev": true, + "license": "WTFPL" + }, "node_modules/lerc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz", @@ -31909,6 +34217,16 @@ "tmpl": "1.0.5" } }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", @@ -31928,6 +34246,19 @@ "integrity": "sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==", "license": "MIT" }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mapbox-gl": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-2.15.0.tgz", @@ -33799,6 +36130,20 @@ "integrity": "sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==", "license": "MIT" }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mjolnir.js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mjolnir.js/-/mjolnir.js-3.0.0.tgz", @@ -33999,6 +36344,14 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/nan": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.1.tgz", + "integrity": "sha512-pfRR4ZcNTSm2ZFHaztuvbICf+hyiG6ecA06SfAxoPmuHjvMu0KUIae7Y8GyVkbBqeEIidsmXeYooWIX9+qjfRQ==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/nanoid": { "version": "5.0.9", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.9.tgz", @@ -34017,6 +36370,29 @@ "node": "^18 || >=20" } }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/nanospinner": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/nanospinner/-/nanospinner-1.2.2.tgz", @@ -34114,6 +36490,13 @@ "node": ">= 0.4.0" } }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true, + "license": "MIT" + }, "node_modules/nise": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", @@ -35317,6 +37700,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -35326,6 +37719,68 @@ "node": ">=0.10.0" } }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", @@ -35363,6 +37818,19 @@ "node": ">= 0.4" } }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object.assign": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", @@ -35454,6 +37922,19 @@ "node": ">= 0.4" } }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object.values": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", @@ -36500,6 +38981,16 @@ "tslib": "^2.0.3" } }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -36779,6 +39270,13 @@ "dev": true, "license": "MIT" }, + "node_modules/pn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "dev": true, + "license": "MIT" + }, "node_modules/png-async": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/png-async/-/png-async-0.9.4.tgz", @@ -36814,6 +39312,16 @@ "node": ">=10" } }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", @@ -40275,6 +42783,19 @@ "node": ">= 12.13.0" } }, + "node_modules/realpath-native": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz", + "integrity": "sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "util.promisify": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/recast": { "version": "0.23.9", "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.9.tgz", @@ -40501,6 +43022,20 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -41784,6 +44319,26 @@ "node": ">=8" } }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, "node_modules/replace-ext": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", @@ -41793,6 +44348,39 @@ "node": ">= 10" } }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", @@ -41804,6 +44392,157 @@ "throttleit": "^1.0.0" } }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "license": "ISC", + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "dev": true, + "license": "ISC", + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/request-promise-native/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/request/node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/request/node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/request/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -41827,8 +44566,7 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true, - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/require-package-name": { "version": "2.0.1", @@ -41940,6 +44678,14 @@ "protocol-buffers-schema": "^3.3.1" } }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true, + "license": "MIT" + }, "node_modules/resolve.exports": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", @@ -42159,6 +44905,16 @@ "nearley": "^2.7.10" } }, + "node_modules/rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "6.* || >= 7.*" + } + }, "node_modules/run-applescript": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", @@ -42285,6 +45041,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, "node_modules/safe-regex-test": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", @@ -42337,13 +45103,335 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, + "node_modules/sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "deprecated": "some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added", + "dev": true, + "license": "MIT", + "dependencies": { + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", + "fb-watchman": "^2.0.0", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5" + }, + "bin": { + "sane": "src/cli.js" + }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/sane/node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/sane/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/sane/node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sane/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sane/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/sane/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sane/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/sane/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/sane/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/sax": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", "dev": true, - "license": "ISC", - "optional": true + "license": "ISC" }, "node_modules/saxes": { "version": "6.0.0", @@ -42683,6 +45771,45 @@ "node": ">= 0.4" } }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -43049,6 +46176,164 @@ "tslib": "^2.0.3" } }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/snapdragon/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -43241,6 +46526,21 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -43262,6 +46562,14 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true, + "license": "MIT" + }, "node_modules/space-separated-tokens": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", @@ -43481,6 +46789,19 @@ "node": ">=6" } }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/split.js": { "version": "1.6.5", "resolved": "https://registry.npmjs.org/split.js/-/split.js-1.6.5.tgz", @@ -43509,7 +46830,6 @@ "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -43535,8 +46855,7 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/ssri": { "version": "10.0.6", @@ -43606,6 +46925,47 @@ "escodegen": "^2.1.0" } }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/static-module": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", @@ -43826,6 +47186,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -44172,6 +47542,16 @@ "node": ">=10" } }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -45081,6 +48461,55 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -45571,6 +49000,458 @@ "dev": true, "license": "0BSD" }, + "node_modules/tsx": { + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", + "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" + } + }, "node_modules/tuf-js": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz", @@ -45592,7 +49473,6 @@ "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -45605,8 +49485,7 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true, - "license": "Unlicense", - "peer": true + "license": "Unlicense" }, "node_modules/type-check": { "version": "0.4.0", @@ -45980,6 +49859,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/unique-filename": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", @@ -46209,6 +50114,65 @@ "dev": true, "license": "MIT" }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -46285,6 +50249,14 @@ "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", "license": "MIT" }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true, + "license": "MIT" + }, "node_modules/url": { "version": "0.11.4", "resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz", @@ -46323,6 +50295,16 @@ "dev": true, "license": "MIT" }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/use-callback-ref": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", @@ -46418,6 +50400,33 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/util.promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.3.tgz", + "integrity": "sha512-GIEaZ6o86fj09Wtf0VfZ5XP7tmd4t3jM5aZCgmBi231D0DB1AEBa3Aa6MP48DMsAIi96WkpWLimIWVwOjbDMOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "for-each": "^0.3.3", + "get-intrinsic": "^1.2.6", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "object.getownpropertydescriptors": "^2.1.8", + "safe-array-concat": "^1.1.3" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/utila": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", @@ -46597,7 +50606,6 @@ "node >=0.6.0" ], "license": "MIT", - "peer": true, "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -46798,6 +50806,17 @@ "pbf": "^3.2.1" } }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", @@ -48833,6 +52852,7 @@ "@types/react": "*", "@types/react-loadable": "*", "@types/tinycolor2": "*", + "antd-v5": "npm:antd@^5.18.0", "react": "^17.0.2", "react-loadable": "^5.5.0", "tinycolor2": "*" diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 3654d486298..53ace28ee61 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -44,6 +44,7 @@ "build-storybook": "storybook build", "build-translation": "scripts/po2json.sh", "bundle-stats": "cross-env BUNDLE_ANALYZER=true npm run build && npx open-cli ../superset/static/stats/statistics.html", + "compile-less": "tsx ./scripts/compileLess.ts", "core:cover": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --coverage --coverageThreshold='{\"global\":{\"statements\":100,\"branches\":100,\"functions\":100,\"lines\":100}}' --collectCoverageFrom='[\"packages/**/src/**/*.{js,ts}\", \"!packages/superset-ui-demo/**/*\"]' packages", "cover": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --coverage", "dev": "webpack --mode=development --color --watch", @@ -83,7 +84,7 @@ "dependencies": { "@ant-design/icons": "^5.2.6", "@emotion/cache": "^11.4.0", - "@emotion/react": "^11.13.3", + "@emotion/react": "^11.14.0", "@emotion/styled": "^11.3.0", "@fontsource/fira-code": "^5.0.18", "@fontsource/inter": "^5.0.20", @@ -150,6 +151,8 @@ "geostyler-style": "^7.5.0", "geostyler-wfs-parser": "^2.0.3", "googleapis": "^130.0.0", + "handlebars": "^4.7.8", + "html-webpack-plugin": "^5.6.3", "immer": "^10.1.1", "interweave": "^13.1.0", "jquery": "^3.7.1", @@ -262,12 +265,13 @@ "@types/dom-to-image": "^2.6.7", "@types/enzyme": "^3.10.18", "@types/fetch-mock": "^7.3.2", - "@types/jest": "^29.5.12", + "@types/jest": "^29.5.14", "@types/jquery": "^3.5.8", "@types/js-levenshtein": "^1.1.3", "@types/json-bigint": "^1.0.4", "@types/math-expression-evaluator": "^1.3.3", "@types/mousetrap": "^1.6.15", + "@types/node": "^22.12.0", "@types/react": "^17.0.83", "@types/react-dom": "^17.0.26", "@types/react-gravatar": "^2.6.14", @@ -286,6 +290,7 @@ "@types/redux-mock-store": "^1.0.6", "@types/rison": "0.1.0", "@types/sinon": "^17.0.3", + "@types/testing-library__jest-dom": "^5.14.9", "@types/tinycolor2": "^1.4.3", "@types/yargs": "12 - 18", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -304,6 +309,8 @@ "css-minimizer-webpack-plugin": "^7.0.0", "enzyme": "^3.11.0", "enzyme-matchers": "^7.1.2", + "esbuild": "^0.20.0", + "esbuild-loader": "^4.2.2", "eslint": "^8.56.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^7.2.0", @@ -330,7 +337,9 @@ "html-webpack-plugin": "^5.6.3", "imports-loader": "^5.0.0", "jest": "^29.7.0", + "jest-environment-enzyme": "^7.1.2", "jest-environment-jsdom": "^29.7.0", + "jest-enzyme": "^7.1.2", "jest-html-reporter": "^3.10.2", "jest-websocket-mock": "^2.5.0", "jsdom": "^26.0.0", @@ -355,6 +364,7 @@ "ts-jest": "^29.2.5", "ts-loader": "^9.5.1", "tscw-config": "^1.1.2", + "tsx": "^4.19.2", "typescript": "5.1.6", "vm-browserify": "^1.1.2", "webpack": "^5.98.0", diff --git a/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/MyChart.erb b/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/MyChart.erb index c5b8583de13..136158ea5c4 100644 --- a/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/MyChart.erb +++ b/superset-frontend/packages/generator-superset/generators/plugin-chart/templates/src/MyChart.erb @@ -25,29 +25,14 @@ import { <%= packageLabel %>Props, <%= packageLabel %>StylesProps } from './type // Theming variables are provided for your use via a ThemeProvider // imported from @superset-ui/core. For variables available, please visit -// https://github.com/apache-superset/superset-ui/blob/master/packages/superset-ui-core/src/style/index.ts +// https://github.com/apache-superset/superset-ui/blob/master/packages/superset-ui-core/src/theme/index.ts const Styles = styled.div<<%= packageLabel %>StylesProps>` - background-color: ${({ theme }) => theme.colors.secondary.light2}; + background-color: ${({ theme }) => theme.colors.primary.light2}; padding: ${({ theme }) => theme.gridUnit * 4}px; border-radius: ${({ theme }) => theme.gridUnit * 2}px; height: ${({ height }) => height}px; width: ${({ width }) => width}px; - - h3 { - /* You can use your props to control CSS! */ - margin-top: 0; - margin-bottom: ${({ theme }) => theme.gridUnit * 3}px; - font-size: ${({ theme, headerFontSize }) => - theme.typography.sizes[headerFontSize]}px; - font-weight: ${({ theme, boldText }) => - theme.typography.weights[boldText ? 'bold' : 'normal']}; - } - - pre { - height: ${({ theme, headerFontSize, height }) => - height - theme.gridUnit * 12 - theme.typography.sizes[headerFontSize]}px; - } `; /** diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx index 5468d66139c..6124834c573 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx @@ -27,7 +27,7 @@ interface CertifiedIconWithTooltipProps { } const StyledDiv = styled.div` - margin-bottom: ${({ theme }) => theme.gridUnit * 2}px; + margin-bottom: ${({ theme }) => theme.sizeUnit * 2}px; `; function CertifiedIconWithTooltip({ @@ -58,7 +58,7 @@ function CertifiedIconWithTooltip({ > diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx index db449b3450e..a9a3d1bdaf7 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx @@ -40,7 +40,7 @@ const StyleOverrides = styled.span` display: flex; align-items: center; svg { - margin-right: ${({ theme }) => theme.gridUnit}px; + margin-right: ${({ theme }) => theme.sizeUnit}px; } `; @@ -82,7 +82,7 @@ export function ColumnOption({ css` - margin-right: ${theme.gridUnit}px; + margin-right: ${theme.sizeUnit}px; `} ref={labelRef} > diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx index 6c655d330a8..ffad85f98dd 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx @@ -37,9 +37,9 @@ const TypeIconWrapper = styled.div` display: flex; justify-content: center; align-items: center; - width: ${theme.gridUnit * 6}px; - height: ${theme.gridUnit * 6}px; - margin-right: ${theme.gridUnit}px; + width: ${theme.sizeUnit * 6}px; + height: ${theme.sizeUnit * 6}px; + margin-right: ${theme.sizeUnit}px; && svg { margin-right: 0; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx index 731b34b6af5..ab6e600bdcb 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx @@ -19,8 +19,8 @@ import { styled } from '@superset-ui/core'; export const ControlSubSectionHeader = styled.div` - font-weight: ${({ theme }) => theme.typography.weights.bold}; - font-size: ${({ theme }) => theme.typography.sizes.s}; - margin-bottom: ${({ theme }) => theme.gridUnit}px; + font-weight: ${({ theme }) => theme.fontWeightStrong}; + font-size: ${({ theme }) => theme.fontSizeSM}; + margin-bottom: ${({ theme }) => theme.sizeUnit}px; `; export default ControlSubSectionHeader; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx index c424cde518e..cb54167df08 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx @@ -37,7 +37,7 @@ const FlexRowContainer = styled.div` display: flex; > svg { - margin-right: ${({ theme }) => theme.gridUnit}px; + margin-right: ${({ theme }) => theme.sizeUnit}px; } `; @@ -73,7 +73,7 @@ export function MetricOption({ css` - margin-right: ${theme.gridUnit}px; + margin-right: ${theme.sizeUnit}px; `} ref={labelRef} > diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx index 3a29c4885cf..5d532af1e2a 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx @@ -26,10 +26,10 @@ import { css, styled, useTheme, t } from '@superset-ui/core'; const StyledCalculatorIcon = styled(CalculatorOutlined)` ${({ theme }) => css` color: ${theme.colors.grayscale.base}; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; & svg { - margin-left: ${theme.gridUnit}px; - margin-right: ${theme.gridUnit}px; + margin-left: ${theme.sizeUnit}px; + margin-right: ${theme.sizeUnit}px; } `} `; @@ -66,8 +66,8 @@ export const SQLPopover = (props: PopoverProps & { sqlExpression: string }) => { wrapEnabled style={{ border: `1px solid ${theme.colors.grayscale.light2}`, - background: theme.colors.secondary.light5, - maxWidth: theme.gridUnit * 100, + background: theme.colorPrimaryBg, + maxWidth: theme.sizeUnit * 100, }} /> } diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx index 1fc482211b6..2e4ce7ca72f 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx @@ -38,10 +38,10 @@ export const Tooltip = ({ css` - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; `} `; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx index 3af514f171b..81bca2c4d40 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx @@ -55,17 +55,17 @@ export default function RadioButtonControl({ }, '.control-label': { color: theme.colors.grayscale.base, - marginBottom: theme.gridUnit, + marginBottom: theme.sizeUnit, }, '.control-label + .btn-group': { marginTop: '1px', }, '.btn-group .btn-default': { - color: theme.colors.grayscale.dark1, + color: theme.colorText, }, '.btn-group .btn.active': { background: theme.colors.grayscale.light4, - fontWeight: theme.typography.weights.bold, + fontWeight: theme.fontWeightStrong, boxShadow: 'none', }, }} diff --git a/superset-frontend/packages/superset-ui-core/package.json b/superset-frontend/packages/superset-ui-core/package.json index ab9b0cbc279..d0b99f807b1 100644 --- a/superset-frontend/packages/superset-ui-core/package.json +++ b/superset-frontend/packages/superset-ui-core/package.json @@ -70,6 +70,7 @@ "timezone-mock": "1.3.6" }, "peerDependencies": { + "antd-v5": "npm:antd@^5.18.0", "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx index 4d34fc88e8d..d5ff70c954c 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx @@ -18,7 +18,7 @@ */ import { t } from '@superset-ui/core'; -import { SupersetTheme } from '../../style'; +import { SupersetTheme } from '../..'; import { FallbackPropsWithDimension } from './SuperChart'; export type Props = FallbackPropsWithDimension; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx index 73e8df62584..3bcb3e3a89a 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx @@ -18,7 +18,7 @@ */ import { CSSProperties } from 'react'; -import { css, styled } from '../../style'; +import { css, styled } from '../../theme'; import { t } from '../../translation'; const MESSAGE_STYLES: CSSProperties = { maxWidth: 800 }; @@ -36,16 +36,16 @@ const Container = styled.div<{ text-align: center; height: ${height}px; width: ${width}px; - padding: ${theme.gridUnit * 4}px; + padding: ${theme.sizeUnit * 4}px; & .no-results-title { - font-size: ${theme.typography.sizes.l}px; - font-weight: ${theme.typography.weights.bold}; - padding-bottom: ${theme.gridUnit * 2}; + font-size: ${theme.fontSizeLG}px; + font-weight: ${theme.fontWeightStrong}; + padding-bottom: ${theme.sizeUnit * 2}; } & .no-results-body { - font-size: ${theme.typography.sizes.m}px; + font-size: ${theme.fontSize}px; } `} `; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/reactify.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/reactify.tsx index 0a1bee16c54..c52f13d0de0 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/reactify.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/reactify.tsx @@ -18,7 +18,7 @@ */ // eslint-disable-next-line no-restricted-syntax -- whole React import is required for `reactify.test.tsx` Jest test passing. -import React, { Component, ComponentClass, WeakValidationMap } from 'react'; +import { Component, ComponentClass, WeakValidationMap } from 'react'; // TODO: Note that id and className can collide between Props and ReactifyProps // leading to (likely) unexpected behaviors. We should either require Props to not diff --git a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts index 829440133a3..2eecb73d1cb 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts @@ -37,7 +37,7 @@ import { SetDataMaskHook, } from '../types/Base'; import { QueryData, DataRecordFilters } from '..'; -import { SupersetTheme } from '../../style'; +import { SupersetTheme } from '../../theme'; // TODO: more specific typing for these fields of ChartProps type AnnotationData = PlainObject; diff --git a/superset-frontend/packages/superset-ui-core/src/index.ts b/superset-frontend/packages/superset-ui-core/src/index.ts index 7258a3b6482..99e9b518433 100644 --- a/superset-frontend/packages/superset-ui-core/src/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/index.ts @@ -28,7 +28,7 @@ export * from './number-format'; export * from './time-format'; export * from './dimension'; export * from './color'; -export * from './style'; +export * from './theme'; export * from './validator'; export * from './chart'; export * from './chart-composition'; diff --git a/superset-frontend/packages/superset-ui-core/src/style/index.tsx b/superset-frontend/packages/superset-ui-core/src/style/index.tsx deleted file mode 100644 index d448b81e790..00000000000 --- a/superset-frontend/packages/superset-ui-core/src/style/index.tsx +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import emotionStyled from '@emotion/styled'; -import { useTheme as useThemeBasic } from '@emotion/react'; -import createCache from '@emotion/cache'; - -export { - css, - keyframes, - jsx, - ThemeProvider, - CacheProvider as EmotionCacheProvider, - withTheme, - type SerializedStyles, -} from '@emotion/react'; -export { default as createEmotionCache } from '@emotion/cache'; - -declare module '@emotion/react' { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - export interface Theme extends SupersetTheme {} -} - -export function useTheme() { - const theme = useThemeBasic(); - // in the case there is no theme, useTheme returns an empty object - if (Object.keys(theme).length === 0 && theme.constructor === Object) { - throw new Error( - 'useTheme() could not find a ThemeContext. The component is likely missing from the app.', - ); - } - return theme; -} - -export const emotionCache = createCache({ - key: 'superset', -}); - -export const styled = emotionStyled; - -const defaultTheme = { - borderRadius: 4, - colors: { - text: { - label: '#879399', - help: '#737373', - }, - primary: { - base: '#20A7C9', - dark1: '#1A85A0', - dark2: '#156378', - light1: '#79CADE', - light2: '#A5DAE9', - light3: '#D2EDF4', - light4: '#E9F6F9', - light5: '#F3F8FA', - }, - secondary: { - base: '#444E7C', - dark1: '#363E63', - dark2: '#282E4A', - dark3: '#1B1F31', - light1: '#8E94B0', - light2: '#B4B8CA', - light3: '#D9DBE4', - light4: '#ECEEF2', - light5: '#F5F5F8', - }, - grayscale: { - base: '#666666', - dark1: '#323232', - dark2: '#000000', - light1: '#B2B2B2', - light2: '#E0E0E0', - light3: '#F0F0F0', - light4: '#F7F7F7', - light5: '#FFFFFF', - }, - error: { - base: '#E04355', - dark1: '#A7323F', - dark2: '#6F212A', - light1: '#EFA1AA', - light2: '#FAEDEE', - }, - warning: { - base: '#FCC700', - dark1: '#BC9501', - dark2: '#7D6300', - light1: '#FDE380', - light2: '#FEF9E6', - }, - success: { - base: '#5AC189', - dark1: '#439066', - dark2: '#2B6144', - light1: '#ACE1C4', - light2: '#EEF8F3', - }, - info: { - base: '#66BCFE', - dark1: '#4D8CBE', - dark2: '#315E7E', - light1: '#B3DEFE', - light2: '#EFF8FE', - }, - }, - opacity: { - light: '10%', - mediumLight: '35%', - mediumHeavy: '60%', - heavy: '80%', - }, - typography: { - families: { - sansSerif: `'Inter', Helvetica, Arial`, - serif: `Georgia, 'Times New Roman', Times, serif`, - monospace: `'Fira Code', 'Courier New', monospace`, - }, - weights: { - light: 200, - normal: 400, - medium: 500, - bold: 600, - }, - sizes: { - xxs: 9, - xs: 10, - s: 12, - m: 14, - l: 16, - xl: 21, - xxl: 28, - }, - }, - zIndex: { - aboveDashboardCharts: 10, - dropdown: 11, - max: 3000, - }, - transitionTiming: 0.3, - gridUnit: 4, - brandIconMaxWidth: 37, -}; - -export type SupersetTheme = typeof defaultTheme; - -export interface SupersetThemeProps { - theme: SupersetTheme; -} - -export const supersetTheme = defaultTheme; diff --git a/superset-frontend/packages/superset-ui-core/src/theme/Theme.test.tsx b/superset-frontend/packages/superset-ui-core/src/theme/Theme.test.tsx new file mode 100644 index 00000000000..a182bbbf032 --- /dev/null +++ b/superset-frontend/packages/superset-ui-core/src/theme/Theme.test.tsx @@ -0,0 +1,145 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { render, screen } from '@testing-library/react'; +import { theme as antdThemeImport } from 'antd-v5'; +import { Theme } from './Theme'; +import { serializeThemeConfig } from './utils'; +import { AnyThemeConfig } from './types'; + +// Mock emotion's cache to avoid actual DOM operations +jest.mock('@emotion/cache', () => ({ + __esModule: true, + default: jest.fn().mockReturnValue({}), +})); + +// Helper to test theme rendering +const TestComponent = ({ theme }: { theme: Theme }) => { + if (!theme?.SupersetThemeProvider) { + throw new Error('SupersetThemeProvider is not initialized'); + } + + return ( + +
Themed Component
+
+ ); +}; + +describe('Theme', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('fromConfig', () => { + it('creates a theme with default tokens when no config is provided', () => { + const theme = Theme.fromConfig(); + + // Verify default primary color is set + expect(theme.theme.colorPrimary.toLowerCase()).toBe('#20a7c9'); + + // Verify default font family is set + expect(theme.theme.fontFamily).toContain('Inter'); + + // Verify the theme is initialized with colors + expect(theme.theme.colors).toBeDefined(); + }); + + it('creates a theme with custom tokens when provided', () => { + const customConfig: AnyThemeConfig = { + token: { + colorPrimary: '#FF0000', + fontFamily: 'CustomFont, sans-serif', + }, + }; + + const theme = Theme.fromConfig(customConfig); + + // Verify custom primary color is set + expect(theme.theme.colorPrimary.toLowerCase()).toBe('#ff0000'); + + // Verify custom font family is set + expect(theme.theme.fontFamily).toBe('CustomFont, sans-serif'); + + // But default tokens should still be preserved for unspecified values + expect(theme.theme.colorError.toLowerCase()).toBe('#e04355'); + }); + + it('creates a theme with dark mode when dark algorithm is specified', () => { + const darkConfig: AnyThemeConfig = { + algorithm: antdThemeImport.darkAlgorithm, + }; + + const theme = Theme.fromConfig(darkConfig); + + // Verify the algorithm is set to dark + const serialized = serializeThemeConfig(theme.antdConfig); + expect(serialized.algorithm).toBe('dark'); + }); + }); + + describe('setConfig', () => { + it('updates theme with a new configuration', () => { + const theme = Theme.fromConfig(); + const initialPrimaryColor = theme.theme.colorPrimary; + + // Update with new config + theme.setConfig({ + token: { + colorPrimary: '#0000FF', + }, + }); + + // Verify the theme was updated + expect(theme.theme.colorPrimary.toLowerCase()).toBe('#0000ff'); + expect(theme.theme.colorPrimary.toLowerCase()).not.toBe( + initialPrimaryColor.toLowerCase(), + ); + }); + + it('preserves default tokens when updating with partial config', () => { + const theme = Theme.fromConfig(); + const initialErrorColor = theme.theme.colorError; + + // Update with new config that doesn't specify error color + theme.setConfig({ + token: { + colorPrimary: '#0000FF', + }, + }); + + // Verify the error color is preserved + expect(theme.theme.colorError.toLowerCase()).toBe( + initialErrorColor.toLowerCase(), + ); + }); + + it('correctly applies algorithm changes', () => { + const theme = Theme.fromConfig(); + + // Change to dark mode via config + theme.setConfig({ + algorithm: antdThemeImport.darkAlgorithm, + }); + + // Verify the algorithm was updated + const serialized = serializeThemeConfig(theme.antdConfig); + expect(serialized.algorithm).toBe('dark'); + }); + }); +}); diff --git a/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx b/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx new file mode 100644 index 00000000000..70caee50ae1 --- /dev/null +++ b/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx @@ -0,0 +1,298 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* eslint-disable react-prefer-function-component/react-prefer-function-component */ +// eslint-disable-next-line no-restricted-syntax +import React from 'react'; +import { theme as antdThemeImport, ConfigProvider } from 'antd-v5'; +import tinycolor from 'tinycolor2'; + +import { + ThemeProvider as EmotionThemeProvider, + CacheProvider as EmotionCacheProvider, +} from '@emotion/react'; +import createCache from '@emotion/cache'; + +import { + AntdThemeConfig, + AnyThemeConfig, + SerializableThemeConfig, + SupersetTheme, + allowedAntdTokens, + SharedAntdTokens, + ColorVariants, + DeprecatedThemeColors, + FontSizeKey, +} from './types'; + +import { + normalizeThemeConfig, + serializeThemeConfig, + getSystemColors, + getDeprecatedColors, +} from './utils'; + +/* eslint-disable theme-colors/no-literal-colors */ + +export class Theme { + theme: SupersetTheme; + + private static readonly defaultTokens = { + // Default colors + colorPrimary: '#20a7c9', + colorError: '#e04355', + colorWarning: '#fcc700', + colorSuccess: '#5ac189', + colorInfo: '#66bcfe', + + // Forcing some default tokens + fontFamily: `'Inter', Helvetica, Arial`, + fontFamilyCode: `'Fira Code', 'Courier New', monospace`, + + // Extra tokens + transitionTiming: 0.3, + brandIconMaxWidth: 37, + fontSizeXS: '8', + fontSizeXXL: '28', + fontWeightNormal: '400', + fontWeightLight: '300', + fontWeightMedium: '500', + }; + + private antdConfig: AntdThemeConfig; + + private static readonly sizeMap: Record = { + xs: 'fontSizeXS', + s: 'fontSizeSM', + m: 'fontSize', + l: 'fontSizeLG', + xl: 'fontSizeXL', + xxl: 'fontSizeXXL', + }; + + private constructor({ config }: { config?: AnyThemeConfig }) { + this.SupersetThemeProvider = this.SupersetThemeProvider.bind(this); + + // Create a new config object with default tokens + const newConfig: AnyThemeConfig = config ? { ...config } : {}; + + // Ensure token property exists with defaults + newConfig.token = { + ...Theme.defaultTokens, + ...(config?.token || {}), + }; + + this.setConfig(newConfig); + } + + /** + * Create a theme from any theme configuration + * Automatically handles both AntdThemeConfig and SerializableThemeConfig + * If simple tokens are provided as { token: {...} }, they will be applied with defaults + * If no config is provided, uses default tokens + * Dark mode can be set via the algorithm property in the config + */ + static fromConfig(config?: AnyThemeConfig): Theme { + return new Theme({ config }); + } + + private static getFilteredAntdTheme( + antdConfig: AntdThemeConfig, + ): SharedAntdTokens { + // This method generates all antd tokens and filters out the ones not allowed + // in Superset + const theme = Theme.getAntdTokens(antdConfig); + return Object.fromEntries( + allowedAntdTokens.map(key => [key, (theme as Record)[key]]), + ) as SharedAntdTokens; + } + + private static getAntdTokens( + antdConfig: AntdThemeConfig, + ): Record { + return antdThemeImport.getDesignToken(antdConfig); + } + + /** + * Update the theme using any theme configuration + * Automatically handles both AntdThemeConfig and SerializableThemeConfig + * Dark mode should be specified via the algorithm property in the config + */ + setConfig(config: AnyThemeConfig): void { + const antdConfig = normalizeThemeConfig(config); + + // Apply default tokens to token property + antdConfig.token = { + ...Theme.defaultTokens, + ...(antdConfig.token || {}), + }; + + // First phase: Let Ant Design compute the tokens + const tokens = Theme.getFilteredAntdTheme(antdConfig); + + // Set the base theme properties + this.antdConfig = antdConfig; + this.theme = { + ...Theme.defaultTokens, + ...antdConfig.token, // Passing through the extra, superset-specific tokens + ...tokens, + colors: {} as DeprecatedThemeColors, // Placeholder that will be filled in the second phase + }; + + // Second phase: Now that theme is initialized, we can determine if it's dark + // and generate the legacy colors correctly + const systemColors = getSystemColors(tokens); + const isDark = this.isThemeDark(); // Now we can safely call this + this.theme.colors = getDeprecatedColors(systemColors, isDark); + + // Update the providers with the fully formed theme + this.updateProviders( + this.theme, + this.antdConfig, + createCache({ key: 'superset' }), + ); + } + + /** + * Export the current theme as a serializable configuration + */ + toSerializedConfig(): SerializableThemeConfig { + return serializeThemeConfig(this.antdConfig); + } + + private getToken(token: string): any { + return (this.theme as Record)[token]; + } + + public getFontSize(size?: FontSizeKey): string { + const fontSizeKey = Theme.sizeMap[size || 'm']; + return this.getToken(fontSizeKey) || this.getToken('fontSize'); + } + + /** + * Check if the current theme is dark based on background color + */ + isThemeDark(): boolean { + return tinycolor(this.theme.colorBgContainer).isDark(); + } + + toggleDarkMode(isDark: boolean): void { + // Create a new config based on the current one + const newConfig = { ...this.antdConfig }; + + // Determine the new algorithm based on isDark + const newAlgorithm = isDark + ? antdThemeImport.darkAlgorithm + : antdThemeImport.defaultAlgorithm; + + // Handle the case where algorithm is an array + if (Array.isArray(newConfig.algorithm)) { + // Filter out any existing dark/default algorithms + const otherAlgorithms = newConfig.algorithm.filter( + alg => + alg !== antdThemeImport.darkAlgorithm && + alg !== antdThemeImport.defaultAlgorithm, + ); + + // Add the new algorithm to the front of the array + newConfig.algorithm = [newAlgorithm, ...otherAlgorithms]; + } else { + // Simple case: just replace the algorithm + newConfig.algorithm = newAlgorithm; + } + + // Update the theme with the new configuration + this.setConfig(newConfig); + } + + getColorVariants(color: string): ColorVariants { + const firstLetterCapped = color.charAt(0).toUpperCase() + color.slice(1); + if (color === 'default' || color === 'grayscale') { + const isDark = this.isThemeDark(); + + const flipBrightness = (baseColor: string): string => { + if (!isDark) return baseColor; + const { r, g, b } = tinycolor(baseColor).toRgb(); + const invertedColor = tinycolor({ r: 255 - r, g: 255 - g, b: 255 - b }); + return invertedColor.toHexString(); + }; + + return { + active: flipBrightness('#222'), + textActive: flipBrightness('#444'), + text: flipBrightness('#555'), + textHover: flipBrightness('#666'), + hover: flipBrightness('#888'), + borderHover: flipBrightness('#AAA'), + border: flipBrightness('#CCC'), + bgHover: flipBrightness('#DDD'), + bg: flipBrightness('#F4F4F4'), + }; + } + + const theme = this.getToken.bind(this); + return { + active: theme(`color${firstLetterCapped}Active`), + textActive: theme(`color${firstLetterCapped}TextActive`), + text: theme(`color${firstLetterCapped}Text`), + textHover: theme(`color${firstLetterCapped}TextHover`), + hover: theme(`color${firstLetterCapped}Hover`), + borderHover: theme(`color${firstLetterCapped}BorderHover`), + border: theme(`color${firstLetterCapped}Border`), + bgHover: theme(`color${firstLetterCapped}BgHover`), + bg: theme(`color${firstLetterCapped}Bg`), + }; + } + + private updateProviders( + theme: SupersetTheme, + antdConfig: AntdThemeConfig, + emotionCache: any, + ): void { + // Overridden at runtime by SupersetThemeProvider using setThemeState + } + + SupersetThemeProvider({ children }: { children: React.ReactNode }) { + if (!this.theme || !this.antdConfig) { + throw new Error('Theme is not initialized.'); + } + + // eslint-disable-next-line react-hooks/rules-of-hooks + const [themeState, setThemeState] = React.useState({ + theme: this.theme, + antdConfig: this.antdConfig, + emotionCache: createCache({ key: 'superset' }), + }); + + this.updateProviders = (theme, antdConfig, emotionCache) => { + setThemeState({ theme, antdConfig, emotionCache }); + }; + + return ( + + + + {children} + + + + ); + } +} + +/* eslint-enable theme-colors/no-literal-colors */ diff --git a/superset-frontend/packages/superset-ui-core/src/theme/index.tsx b/superset-frontend/packages/superset-ui-core/src/theme/index.tsx new file mode 100644 index 00000000000..56fccafb557 --- /dev/null +++ b/superset-frontend/packages/superset-ui-core/src/theme/index.tsx @@ -0,0 +1,59 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import emotionStyled from '@emotion/styled'; +import { useTheme as useThemeBasic } from '@emotion/react'; +// import { theme as antdThemeImport } from 'antd-v5'; +import { Theme } from './Theme'; +import type { SupersetTheme } from './types'; + +export { + css, + keyframes, + jsx, + ThemeProvider, + CacheProvider as EmotionCacheProvider, + withTheme, +} from '@emotion/react'; +export { default as createEmotionCache } from '@emotion/cache'; + +declare module '@emotion/react' { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface Theme extends SupersetTheme {} +} + +export function useTheme() { + const theme = useThemeBasic(); + // in the case there is no theme, useTheme returns an empty object + if (Object.keys(theme).length === 0 && theme.constructor === Object) { + throw new Error( + 'useTheme() could not find a ThemeContext. The component is likely missing from the app.', + ); + } + return theme; +} + +const styled = emotionStyled; + +// launching in in dark mode for now while iterating +const themeObject = Theme.fromConfig({}); + +const { theme } = themeObject; +const supersetTheme = theme; + +export { Theme, SupersetTheme, themeObject, styled, theme, supersetTheme }; diff --git a/superset-frontend/packages/superset-ui-core/src/theme/types.ts b/superset-frontend/packages/superset-ui-core/src/theme/types.ts new file mode 100644 index 00000000000..5fe97e664de --- /dev/null +++ b/superset-frontend/packages/superset-ui-core/src/theme/types.ts @@ -0,0 +1,361 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +// eslint-disable-next-line no-restricted-syntax +import { theme as antdThemeImport } from 'antd-v5'; + +/** + * Get AntdThemeConfig type from the theme object + */ +import type { ThemeConfig } from 'antd-v5'; + +/** + * Grab all antd tokens via getDesignToken(...). + * (Same as in the original file.) + */ +export type AntdTokens = ReturnType; +export type AntdThemeConfig = ThemeConfig; + +/** + * A serializable version of Ant Design's ThemeConfig + * Compatible with theme editor exports + */ +export type SerializableThemeConfig = { + token?: Record; + components?: Record; + algorithm?: + | 'default' + | 'dark' + | 'compact' + | ('default' | 'dark' | 'compact')[]; + hashed?: boolean; + inherit?: boolean; +}; + +/** + * A combined type that can be either a regular AntdThemeConfig or a SerializableThemeConfig + */ +export type AnyThemeConfig = AntdThemeConfig | SerializableThemeConfig; + +/** Minimal color system references. */ +export type FontSizeKey = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'; + +export interface SystemColors { + colorPrimary: string; + colorError: string; + colorWarning: string; + colorSuccess: string; + colorInfo: string; +} + +export interface ColorVariants { + bg: string; + border: string; + hover: string; + active: string; + textHover: string; + text: string; + borderHover: string; + bgHover: string; + textActive: string; +} + +export interface DeprecatedColorVariations { + base: string; + light1: string; + light2: string; + light3: string; + light4: string; + light5: string; + dark1: string; + dark2: string; + dark3: string; + dark4: string; + dark5: string; +} + +export interface DeprecatedThemeColors { + primary: DeprecatedColorVariations; + error: DeprecatedColorVariations; + warning: DeprecatedColorVariations; + success: DeprecatedColorVariations; + info: DeprecatedColorVariations; + grayscale: DeprecatedColorVariations; +} + +export interface LegacySupersetTheme { + // Old colors structure with light/dark semantics still heavily referenced in code base + // TODO: replace/realign with antd-type tokens + colors: DeprecatedThemeColors; + transitionTiming: number; +} + +export interface SupersetSpecificTokens { + // Brand-related + brandIconMaxWidth: number; + + // Font-related + fontSizeXS: string; + fontSizeXXL: string; + fontWeightNormal: string; + fontWeightLight: string; + fontWeightMedium: string; +} + +/** + * This array is used to define which keys from the full Antd token set + * we actually allow in the SupersetTheme. + */ +export const allowedAntdTokens = [ + 'borderRadius', + 'borderRadiusLG', + 'borderRadiusOuter', + 'borderRadiusSM', + 'borderRadiusXS', + 'boxShadow', + 'boxShadowDrawerLeft', + 'boxShadowDrawerRight', + 'boxShadowDrawerUp', + 'boxShadowPopoverArrow', + 'boxShadowSecondary', + 'boxShadowTabsOverflowBottom', + 'boxShadowTabsOverflowLeft', + 'boxShadowTabsOverflowRight', + 'boxShadowTabsOverflowTop', + 'boxShadowTertiary', + 'colorError', + 'colorErrorActive', + 'colorErrorBg', + 'colorErrorBgActive', + 'colorErrorBgHover', + 'colorErrorBorder', + 'colorErrorBorderHover', + 'colorErrorHover', + 'colorErrorOutline', + 'colorErrorText', + 'colorErrorTextActive', + 'colorErrorTextHover', + 'colorPrimary', + 'colorPrimaryActive', + 'colorPrimaryBg', + 'colorPrimaryBgHover', + 'colorPrimaryBorder', + 'colorPrimaryBorderHover', + 'colorPrimaryHover', + 'colorPrimaryText', + 'colorPrimaryTextActive', + 'colorPrimaryTextHover', + 'colorSuccess', + 'colorSuccessActive', + 'colorSuccessBg', + 'colorSuccessBgHover', + 'colorSuccessBorder', + 'colorSuccessBorderHover', + 'colorSuccessHover', + 'colorSuccessText', + 'colorSuccessTextActive', + 'colorSuccessTextHover', + 'colorBgBase', + 'colorBgBlur', + 'colorBgContainer', + 'colorBgContainerDisabled', + 'colorBgElevated', + 'colorBgLayout', + 'colorBgMask', + 'colorBgSpotlight', + 'colorBgTextActive', + 'colorBgTextHover', + 'colorBorder', + 'colorBorderBg', + 'colorBorderSecondary', + 'colorFill', + 'colorFillAlter', + 'colorFillContent', + 'colorFillContentHover', + 'colorFillQuaternary', + 'colorFillSecondary', + 'colorFillTertiary', + 'colorHighlight', + 'colorIcon', + 'colorIconHover', + 'colorInfo', + 'colorInfoActive', + 'colorInfoBg', + 'colorInfoBgHover', + 'colorInfoBorder', + 'colorInfoBorderHover', + 'colorInfoHover', + 'colorInfoText', + 'colorInfoTextActive', + 'colorInfoTextHover', + 'colorLink', + 'colorLinkActive', + 'colorLinkHover', + 'colorSplit', + 'colorText', + 'colorTextBase', + 'colorTextDescription', + 'colorTextDisabled', + 'colorTextHeading', + 'colorTextLabel', + 'colorTextLightSolid', + 'colorTextPlaceholder', + 'colorTextQuaternary', + 'colorTextSecondary', + 'colorTextTertiary', + 'colorWarning', + 'colorWarningActive', + 'colorWarningBg', + 'colorWarningBgHover', + 'colorWarningBorder', + 'colorWarningBorderHover', + 'colorWarningHover', + 'colorWarningOutline', + 'colorWarningText', + 'colorWarningTextActive', + 'colorWarningTextHover', + 'colorWhite', + 'controlHeight', + 'controlHeightLG', + 'controlHeightSM', + 'controlHeightXS', + 'controlInteractiveSize', + 'controlItemBgActive', + 'controlItemBgActiveDisabled', + 'controlItemBgActiveHover', + 'controlItemBgHover', + 'controlOutline', + 'controlOutlineWidth', + 'controlPaddingHorizontal', + 'controlPaddingHorizontalSM', + 'controlTmpOutline', + 'fontFamily', + 'fontFamilyCode', + 'fontHeight', + 'fontHeightLG', + 'fontHeightSM', + 'fontSize', + 'fontSizeHeading1', + 'fontSizeHeading2', + 'fontSizeHeading3', + 'fontSizeHeading4', + 'fontSizeHeading5', + 'fontSizeIcon', + 'fontSizeLG', + 'fontSizeSM', + 'fontSizeXL', + 'fontWeightStrong', + 'lineHeight', + 'lineHeightHeading1', + 'lineHeightHeading2', + 'lineHeightHeading3', + 'lineHeightHeading4', + 'lineHeightHeading5', + 'lineHeightLG', + 'lineHeightSM', + 'lineType', + 'lineWidth', + 'lineWidthBold', + 'lineWidthFocus', + 'linkDecoration', + 'linkFocusDecoration', + 'linkHoverDecoration', + 'margin', + 'marginLG', + 'marginMD', + 'marginSM', + 'marginXL', + 'marginXS', + 'marginXXL', + 'marginXXS', + 'motion', + 'motionBase', + 'motionDurationFast', + 'motionDurationMid', + 'motionDurationSlow', + 'motionEaseInBack', + 'motionEaseInOut', + 'motionEaseInOutCirc', + 'motionEaseInQuint', + 'motionEaseOut', + 'motionEaseOutBack', + 'motionEaseOutCirc', + 'motionEaseOutQuint', + 'motionUnit', + 'opacityImage', + 'opacityLoading', + 'padding', + 'paddingContentHorizontal', + 'paddingContentHorizontalLG', + 'paddingContentHorizontalSM', + 'paddingContentVertical', + 'paddingContentVerticalLG', + 'paddingContentVerticalSM', + 'paddingLG', + 'paddingMD', + 'paddingSM', + 'paddingXL', + 'paddingXS', + 'paddingXXS', + 'screenLG', + 'screenLGMax', + 'screenLGMin', + 'screenMD', + 'screenMDMax', + 'screenMDMin', + 'screenSM', + 'screenSMMax', + 'screenSMMin', + 'screenXL', + 'screenXLMax', + 'screenXLMin', + 'screenXS', + 'screenXSMax', + 'screenXSMin', + 'screenXXL', + 'screenXXLMin', + 'size', + 'sizeLG', + 'sizeMD', + 'sizeMS', + 'sizePopupArrow', + 'sizeSM', + 'sizeStep', + 'sizeUnit', + 'sizeXL', + 'sizeXS', + 'sizeXXL', + 'sizeXXS', + 'wireframe', + 'zIndexBase', + 'zIndexPopupBase', +] as const; + +/** We build a narrower type from these allowed keys. */ +export type AllowedAntdTokenKeys = Extract< + (typeof allowedAntdTokens)[number], + keyof AntdTokens +>; + +export type SharedAntdTokens = Pick; + +/** The final shape for our custom theme object, combining old theme + shared antd + superset specifics. */ +export type SupersetTheme = LegacySupersetTheme & + SharedAntdTokens & + SupersetSpecificTokens; diff --git a/superset-frontend/packages/superset-ui-core/src/theme/utils.ts b/superset-frontend/packages/superset-ui-core/src/theme/utils.ts new file mode 100644 index 00000000000..fbb39909085 --- /dev/null +++ b/superset-frontend/packages/superset-ui-core/src/theme/utils.ts @@ -0,0 +1,189 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { theme as antdThemeImport } from 'antd-v5'; +import tinycolor from 'tinycolor2'; +import { + AntdThemeConfig, + AnyThemeConfig, + SerializableThemeConfig, + DeprecatedColorVariations, + DeprecatedThemeColors, + SystemColors, + SupersetTheme, +} from './types'; + +/** + * Check if a theme config is serializable by detecting string-based algorithm + */ +export function isSerializableConfig( + config: AnyThemeConfig, +): config is SerializableThemeConfig { + const { algorithm } = config; + + if (algorithm === undefined) return true; + + if (Array.isArray(algorithm)) { + return (algorithm as unknown[]).every(alg => typeof alg === 'string'); + } + + return typeof algorithm === 'string'; +} + +/** + * Converts a serializable theme config to an Ant Design ThemeConfig + */ +export function deserializeThemeConfig( + config: SerializableThemeConfig, +): AntdThemeConfig { + const { algorithm, ...rest } = config; + const algorithmMap: Record = { + default: antdThemeImport.defaultAlgorithm, + dark: antdThemeImport.darkAlgorithm, + compact: antdThemeImport.compactAlgorithm, + }; + + let resolvedAlgorithm; + if (Array.isArray(algorithm)) { + resolvedAlgorithm = algorithm.map(alg => algorithmMap[alg]); + } else if (algorithm) { + resolvedAlgorithm = algorithmMap[algorithm]; + } + + return { + ...rest, + algorithm: resolvedAlgorithm, + }; +} + +/** + * Converts an Ant Design ThemeConfig to a serializable format + */ +export function serializeThemeConfig( + config: AntdThemeConfig, +): SerializableThemeConfig { + const { algorithm, ...rest } = config; + + let serializedAlgorithm: SerializableThemeConfig['algorithm']; + + if (Array.isArray(algorithm)) { + serializedAlgorithm = algorithm.map(alg => { + if (alg === antdThemeImport.defaultAlgorithm) return 'default'; + if (alg === antdThemeImport.darkAlgorithm) return 'dark'; + if (alg === antdThemeImport.compactAlgorithm) return 'compact'; + return 'default'; // Fallback + }) as ('default' | 'dark' | 'compact')[]; + } else if (algorithm) { + if (algorithm === antdThemeImport.defaultAlgorithm) + serializedAlgorithm = 'default'; + else if (algorithm === antdThemeImport.darkAlgorithm) + serializedAlgorithm = 'dark'; + else if (algorithm === antdThemeImport.compactAlgorithm) + serializedAlgorithm = 'compact'; + else serializedAlgorithm = 'default'; // Fallback + } + + return { + ...rest, + algorithm: serializedAlgorithm, + }; +} + +/** + * Normalize any theme config to a standard AntdThemeConfig + * This automatically detects and converts serializable configs + */ +export function normalizeThemeConfig(config: AnyThemeConfig): AntdThemeConfig { + if (isSerializableConfig(config)) { + return deserializeThemeConfig(config); + } + return config as AntdThemeConfig; +} + +/** + * Creates default Ant Design configuration from tokens and dark mode preference + */ +export function getAntdConfig( + seed: Partial, + isDark: boolean, +): AntdThemeConfig { + const algorithm = isDark + ? antdThemeImport.darkAlgorithm + : antdThemeImport.defaultAlgorithm; + return { + token: seed, + algorithm, + }; +} + +/** + * Generate deprecated color variations from a base color + */ +export function genDeprecatedColorVariations( + color: string, + isDark: boolean, +): DeprecatedColorVariations { + const bg = isDark ? '#FFF' : '#000'; + const fg = isDark ? '#000' : '#FFF'; + const adjustColor = (c: string, perc: number, tgt: string): string => + tinycolor.mix(c, tgt, perc).toHexString(); + return { + base: color, + light1: adjustColor(color, 20, fg), + light2: adjustColor(color, 45, fg), + light3: adjustColor(color, 70, fg), + light4: adjustColor(color, 90, fg), + light5: adjustColor(color, 95, fg), + dark1: adjustColor(color, 10, bg), + dark2: adjustColor(color, 20, bg), + dark3: adjustColor(color, 40, bg), + dark4: adjustColor(color, 60, bg), + dark5: adjustColor(color, 80, bg), + }; +} + +/** + * Generate deprecated theme colors from system colors + */ +export function getDeprecatedColors( + systemColors: SystemColors, + isDark: boolean, +): DeprecatedThemeColors { + const sc = systemColors; + return { + primary: genDeprecatedColorVariations(sc.colorPrimary, isDark), + error: genDeprecatedColorVariations(sc.colorError, isDark), + warning: genDeprecatedColorVariations(sc.colorWarning, isDark), + success: genDeprecatedColorVariations(sc.colorSuccess, isDark), + info: genDeprecatedColorVariations(sc.colorInfo, isDark), + grayscale: genDeprecatedColorVariations('#666', isDark), + }; +} + +/** + * Extract system colors from Ant Design tokens + */ +export function getSystemColors(antdTokens: Record): SystemColors { + return { + colorPrimary: antdTokens.colorPrimary, + colorError: antdTokens.colorError, + colorWarning: antdTokens.colorWarning, + colorSuccess: antdTokens.colorSuccess, + colorInfo: antdTokens.colorInfo, + }; +} diff --git a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts index 7890fd7c573..f8bcf645d38 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts @@ -58,6 +58,7 @@ export enum FeatureFlag { SlackEnableAvatars = 'SLACK_ENABLE_AVATARS', EnableDashboardScreenshotEndpoints = 'ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS', EnableDashboardDownloadWebDriverScreenshot = 'ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT', + DarkThemeSwitch = 'DARK_THEME_SWITCH', } export type ScheduleQueriesProps = { diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx index 638e5b17bda..7db249bf470 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx @@ -20,7 +20,7 @@ import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; import { FallbackProps } from 'react-error-boundary'; -import { ThemeProvider, supersetTheme } from '../../../src/style'; +import { ThemeProvider, supersetTheme } from '../../../src/theme'; import FallbackComponent from '../../../src/chart/components/FallbackComponent'; diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/NoResultsComponent.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/NoResultsComponent.test.tsx index f736d44b995..5a38c8c98e3 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/NoResultsComponent.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/NoResultsComponent.test.tsx @@ -19,7 +19,7 @@ import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { ThemeProvider, supersetTheme } from '../../../src/style'; +import { ThemeProvider, supersetTheme } from '../../../src/theme'; import NoResultsComponent from '../../../src/chart/components/NoResultsComponent'; const renderNoResultsComponent = () => diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/reactify.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/reactify.test.tsx index 1d00b372c58..c2b7c43450a 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/reactify.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/reactify.test.tsx @@ -106,19 +106,12 @@ describe('reactify(renderFn)', () => { describe('propTypes', () => { it('has propTypes if renderFn.propTypes is defined', () => { /* eslint-disable-next-line react/forbid-foreign-prop-types */ - expect(Object.keys(TheChart.propTypes ?? {})).toEqual([ - 'id', - 'className', - 'content', - ]); + expect(Object.keys(TheChart.propTypes ?? {})).toEqual(['content']); }); it('does not have propTypes if renderFn.propTypes is not defined', () => { const AnotherChart = reactify(() => {}); /* eslint-disable-next-line react/forbid-foreign-prop-types */ - expect(Object.keys(AnotherChart.propTypes ?? {})).toEqual([ - 'id', - 'className', - ]); + expect(Object.keys(AnotherChart.propTypes ?? {})).toEqual([]); }); }); describe('defaultProps', () => { diff --git a/superset-frontend/packages/superset-ui-core/test/style/index.test.tsx b/superset-frontend/packages/superset-ui-core/test/style/index.test.tsx deleted file mode 100644 index 352ea4b6a01..00000000000 --- a/superset-frontend/packages/superset-ui-core/test/style/index.test.tsx +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { - styled, - supersetTheme, - SupersetThemeProps, - useTheme, - ThemeProvider, - EmotionCacheProvider, - emotionCache, -} from '@superset-ui/core'; -import { render } from '@testing-library/react'; - -describe('@superset-ui/style package', () => { - it('exports a theme', () => { - expect(typeof supersetTheme).toBe('object'); - }); - - it('exports styled component templater', () => { - expect(typeof styled.div).toBe('function'); - }); - - it('exports SupersetThemeProps', () => { - const props: SupersetThemeProps = { - theme: supersetTheme, - }; - expect(typeof props).toBe('object'); - }); - - describe('useTheme()', () => { - it('returns the theme', () => { - function ThemeUser() { - expect(useTheme()).toStrictEqual(supersetTheme); - return
test
; - } - render(, { - wrapper: ({ children }) => ( - - {children} - - ), - }); - }); - - it('throws when a theme is not present', () => { - function ThemeUser() { - expect(useTheme).toThrow(/could not find a ThemeContext/); - return
test
; - } - render(, { - wrapper: ({ children }) =>
{children}
, - }); - }); - }); -}); diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/data.ts b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/data.ts index 19a3c4c5a59..b138443942c 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/data.ts +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/data.ts @@ -5539,5 +5539,5 @@ export const generateData = (theme: SupersetTheme) => ({ ], renderWhileDragging: true, tooltip: null, - color: theme.colors.primary.base, + color: theme.colorPrimary, }); diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-deckgl/Path/payload.js b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-deckgl/Path/payload.js index 5a36d7e32c3..f92ad3210a5 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-deckgl/Path/payload.js +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-deckgl/Path/payload.js @@ -81,7 +81,7 @@ export const payload = theme => ({ data: { features: [ { - color: theme.colors.primary.base, + color: theme.colorPrimary, path: [ [-122.3535851, 37.9360513], [-122.3179784, 37.9249513], @@ -108,10 +108,10 @@ export const payload = theme => ({ [-122.3876274, 37.5993171], ], __timestamp: null, - extraProps: { color: theme.colors.primary.base }, + extraProps: { color: theme.colorPrimary }, }, { - color: theme.colors.warning.base, + color: theme.colorWarning, path: [ [-122.353165, 37.936887], [-122.317269, 37.925655], @@ -133,10 +133,10 @@ export const payload = theme => ({ [-121.9772135, 37.5567286], ], __timestamp: null, - extraProps: { color: theme.colors.warning.base }, + extraProps: { color: theme.colorWarning }, }, { - color: theme.colors.error.base, + color: theme.colorError, path: [ [-121.945154, 38.018914], [-122.024597, 38.003275], @@ -166,10 +166,10 @@ export const payload = theme => ({ [-122.38666, 37.599787], ], __timestamp: null, - extraProps: { color: theme.colors.error.base }, + extraProps: { color: theme.colorError }, }, { - color: theme.colors.success.base, + color: theme.colorSuccess, path: [ [-121.900367, 37.701695], [-121.928099, 37.699759], @@ -191,10 +191,10 @@ export const payload = theme => ({ [-122.469081, 37.706121], ], __timestamp: null, - extraProps: { color: theme.colors.success.base }, + extraProps: { color: theme.colorSuccess }, }, { - color: theme.colors.warning.base, + color: theme.colorWarning, path: [ [-121.9764, 37.557355], [-122.017867, 37.591208], @@ -217,7 +217,7 @@ export const payload = theme => ({ [-122.4683093, 37.705461], ], __timestamp: null, - extraProps: { color: theme.colors.warning.base }, + extraProps: { color: theme.colorWarning }, }, ], mapboxApiKey: diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-theme/Theme.stories.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-theme/Theme.stories.tsx new file mode 100644 index 00000000000..503407ce666 --- /dev/null +++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-theme/Theme.stories.tsx @@ -0,0 +1,176 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { supersetTheme, themeObject } from '@superset-ui/core'; + +const colorTypes = [ + 'primary', + 'error', + 'warning', + 'success', + 'info', + 'grayscale', +]; + +const AntDFunctionalColors = ({ antdTheme }) => { + const { antd } = supersetTheme; + + // Define color types and variants dynamically + const variants = [ + 'active', + 'textActive', + 'text', + 'textHover', + 'hover', + 'borderHover', + 'border', + 'bgHover', + 'bg', + ]; + + const { colors } = supersetTheme; + return ( + + + + + {variants.map(variant => ( + + ))} + + + + {colorTypes.map(type => { + const typeKey = `color${type}`; + return ( + + + {variants.map(variant => { + const color = themeObject.getColorVariants(type)[variant]; + return ( + + ); + })} + + ); + })} + +
Type + {variant} +
+ {type} + + {color ? {color} : '-'} +
+ ); +}; + +export const ThemeColors = () => { + const { colors } = supersetTheme; + + // Define tones to be displayed in columns + const tones = [ + 'dark5', + 'dark4', + 'dark3', + 'dark1', + 'base', + 'light1', + 'light2', + 'light3', + 'light4', + 'light5', + ]; + return ( +
+

Theme Colors

+

Legacy Theme Colors

+ + + + + {tones.map(tone => ( + + ))} + + + + {colorTypes.map(category => ( + + + {tones.map(tone => { + const color = colors[category][tone]; + return ( + + ); + })} + + ))} + +
+ Category + + {tone} +
+ {category} + + {color ? {color} : '-'} +
+

Ant Design Theme Colors

+

Functional Colors

+ +

The supersetTheme object

+
+        {JSON.stringify(supersetTheme, null, 2)}
+      
+
+ ); +}; +/* + * */ +export default { + title: 'Core Packages/@superset-ui-theme', +}; + +export const Default = () => ; diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.jsx b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.jsx index 46cb1de852a..8c8edd1a5e9 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.jsx @@ -31,19 +31,19 @@ const Calendar = ({ className, ...otherProps }) => { styles={css` .d3-tip { line-height: 1; - padding: ${theme.gridUnit * 3}px; + padding: ${theme.sizeUnit * 3}px; background: ${theme.colors.grayscale.dark2}; color: ${theme.colors.grayscale.light5}; border-radius: 4px; pointer-events: none; z-index: 1000; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; } /* Creates a small triangle extender for the tooltip */ .d3-tip:after { box-sizing: border-box; display: inline; - font-size: ${theme.typography.sizes.xs}; + font-size: ${theme.fontSizeXS}; width: 100%; line-height: 1; color: ${theme.colors.grayscale.dark2}; @@ -53,7 +53,7 @@ const Calendar = ({ className, ...otherProps }) => { /* Northward tooltips */ .d3-tip.n:after { content: '\\25BC'; - margin: -${theme.gridUnit}px 0 0 0; + margin: -${theme.sizeUnit}px 0 0 0; top: 100%; left: 0; text-align: center; @@ -61,22 +61,22 @@ const Calendar = ({ className, ...otherProps }) => { /* Eastward tooltips */ .d3-tip.e:after { content: '\\25C0'; - margin: -${theme.gridUnit}px 0 0 0; + margin: -${theme.sizeUnit}px 0 0 0; top: 50%; - left: -${theme.gridUnit * 2}px; + left: -${theme.sizeUnit * 2}px; } /* Southward tooltips */ .d3-tip.s:after { content: '\\25B2'; margin: 0; - top: -${theme.gridUnit * 2}px; + top: -${theme.sizeUnit * 2}px; left: 0; text-align: center; } /* Westward tooltips */ .d3-tip.w:after { content: '\\25B6'; - margin: -${theme.gridUnit}px 0 0 0px; + margin: -${theme.sizeUnit}px 0 0 0px; top: 50%; left: 100%; } @@ -99,19 +99,19 @@ Calendar.propTypes = { export default styled(Calendar)` ${({ theme }) => ` .superset-legacy-chart-calendar { - padding: ${theme.gridUnit * 3}px; + padding: ${theme.sizeUnit * 3}px; position: static !important; overflow: auto !important; } .superset-legacy-chart-calendar .ch-tooltip { - margin-left: ${theme.gridUnit * 5}px; - margin-top: ${theme.gridUnit}px; + margin-left: ${theme.sizeUnit * 5}px; + margin-top: ${theme.sizeUnit}px; } .superset-legacy-chart-calendar .d3-tip { line-height: 1; - padding: ${theme.gridUnit * 3}px; + padding: ${theme.sizeUnit * 3}px; background: ${theme.colors.grayscale.dark2}; color: ${theme.colors.grayscale.light5}; border-radius: ${theme.borderRadius}px; @@ -125,7 +125,7 @@ export default styled(Calendar)` .cal-heatmap-container .graph-label { fill: ${theme.colors.grayscale.base}; - font-size: ${theme.typography.sizes.xs}px; + font-size: ${theme.fontSizeXS}px; } .cal-heatmap-container .graph, @@ -143,7 +143,7 @@ export default styled(Calendar)` } .cal-heatmap-container .subdomain-text { - font-size: ${theme.typography.sizes.xs}px; + font-size: ${theme.fontSizeXS}px; pointer-events: none; } @@ -172,8 +172,8 @@ export default styled(Calendar)` } .cal-heatmap-container .q4 { - background-color: ${theme.colors.success.base}; - fill: ${theme.colors.success.base}; + background-color: ${theme.colorSuccess}; + fill: ${theme.colorSuccess}; } .cal-heatmap-container .q5 { @@ -182,21 +182,21 @@ export default styled(Calendar)` } .cal-heatmap-container rect.highlight { - stroke: ${theme.colors.grayscale.dark1}; + stroke: ${theme.colorText}; stroke-width: 1; } .cal-heatmap-container text.highlight { - fill: ${theme.colors.grayscale.dark1}; + fill: ${theme.colorText}; } .cal-heatmap-container rect.highlight-now { - stroke: ${theme.colors.error.base}; + stroke: ${theme.colorError}; } .cal-heatmap-container text.highlight-now { - fill: ${theme.colors.error.base}; - font-weight: ${theme.typography.weights.bold}; + fill: ${theme.colorError}; + font-weight: ${theme.fontWeightStrong}; } .cal-heatmap-container .domain-background { @@ -205,10 +205,10 @@ export default styled(Calendar)` } .ch-tooltip { - padding: ${theme.gridUnit * 2}px; - background: ${theme.colors.grayscale.dark1}; + padding: ${theme.sizeUnit * 2}px; + background: ${theme.colorText}; color: ${theme.colors.grayscale.light1}; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; line-height: 1.4; width: 140px; position: absolute; @@ -229,11 +229,11 @@ export default styled(Calendar)` content: ''; padding: 0; display: block; - bottom: -${theme.gridUnit}px; + bottom: -${theme.sizeUnit}px; left: 50%; - margin-left: -${theme.gridUnit}px; - border-width: ${theme.gridUnit}px ${theme.gridUnit}px 0; - border-top-color: ${theme.colors.grayscale.dark1}; + margin-left: -${theme.sizeUnit}px; + border-width: ${theme.sizeUnit}px ${theme.sizeUnit}px 0; + border-top-color: ${theme.colorSplit}; } `} `; diff --git a/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.jsx b/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.jsx index 7de87414cc2..d413a795370 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.jsx @@ -44,14 +44,14 @@ export default styled(Chord)` pointer-events: all; } .superset-legacy-chart-chord svg .group path { - fill-opacity: ${theme.opacity.mediumHeavy}; + fill-opacity: 60%; } .superset-legacy-chart-chord svg path.chord { - stroke: ${theme.colors.grayscale.dark2}; + stroke: ${theme.colorText}; stroke-width: 0.25px; } .superset-legacy-chart-chord svg #circle:hover path.fade { - opacity: ${theme.opacity.light}; + opacity: 10%; } `} `; diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.jsx b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.jsx index ea6a936b5aa..b857b360408 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.jsx @@ -52,19 +52,19 @@ export default styled(CountryMap)` } .superset-legacy-chart-country-map .text-layer { - color: ${theme.colors.grayscale.dark1}; + color: ${theme.colorText}; text-anchor: middle; pointer-events: none; } .superset-legacy-chart-country-map text.result-text { - font-weight: ${theme.typography.weights.light}; - font-size: ${theme.typography.sizes.xl}px; + font-weight: ${theme.fontWeightLight}; + font-size: ${theme.fontSizeXL}px; } .superset-legacy-chart-country-map text.big-text { - font-weight: ${theme.typography.weights.bold}; - font-size: ${theme.typography.sizes.l}px; + font-weight: ${theme.fontWeightStrong}; + font-size: ${theme.fontSizeLG}px; } .superset-legacy-chart-country-map path.region { diff --git a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.jsx b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.jsx index dc72cb664ad..05b4b6e9aac 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.jsx @@ -73,8 +73,8 @@ const StyledDiv = styled.div` .superset-legacy-chart-horizon .horizon-row span.title { position: absolute; - color: ${theme.colors.grayscale.dark1}; - font-size: ${theme.typography.sizes.s}px; + color: ${theme.colorText}; + font-size: ${theme.fontSizeSM}px; margin: 0; } `} diff --git a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx index 27b2f7239ea..f15a85f4476 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx @@ -46,8 +46,8 @@ const StyledDiv = styled.div` } .paired-ttest-table .scrollbar-content { - padding-left: ${theme.gridUnit}px; - padding-right: ${theme.gridUnit}px; + padding-left: ${theme.sizeUnit}px; + padding-right: ${theme.sizeUnit}px; margin-bottom: 0; } @@ -56,7 +56,7 @@ const StyledDiv = styled.div` } .paired-ttest-table h1 { - margin-left: ${theme.gridUnit}px; + margin-left: ${theme.sizeUnit}px; } .reactable-data tr { @@ -74,19 +74,19 @@ const StyledDiv = styled.div` } .reactable-data tr .false { - color: ${theme.colors.error.base}; + color: ${theme.colorError}; } .reactable-data tr .true { - color: ${theme.colors.success.base}; + color: ${theme.colorSuccess}; } .reactable-data tr .control { - color: ${theme.colors.primary.base}; + color: ${theme.colorPrimary}; } .reactable-data tr .invalid { - color: ${theme.colors.warning.base}; + color: ${theme.colorWarning}; } .reactable-data .control td { @@ -104,13 +104,13 @@ const StyledDiv = styled.div` .reactable-header-sort-asc:after { content: '\\25bc'; position: absolute; - right: ${theme.gridUnit * 3}px; + right: ${theme.sizeUnit * 3}px; } .reactable-header-sort-desc:after { content: '\\25b2'; position: absolute; - right: ${theme.gridUnit * 3}px; + right: ${theme.sizeUnit * 3}px; } `} `; diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx index e9e03af1d3b..740d4043df6 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx @@ -46,7 +46,7 @@ export default styled(ParallelCoordinates)` } .parcoords svg, .parcoords canvas { - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; position: absolute; } .parcoords > canvas { @@ -55,7 +55,7 @@ export default styled(ParallelCoordinates)` .parcoords text.label { font: 100%; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; cursor: drag; } .parcoords rect.background { @@ -74,7 +74,7 @@ export default styled(ParallelCoordinates)` .parcoords .axis line, .parcoords .axis path { fill: none; - stroke: ${theme.colors.grayscale.dark1}; + stroke: ${theme.colorText}; shape-rendering: crispEdges; } .parcoords canvas { @@ -84,7 +84,7 @@ export default styled(ParallelCoordinates)` -o-transition: opacity 0.3s; } .parcoords canvas.faded { - opacity: ${theme.opacity.mediumLight}; + opacity: 35%; } .parcoords { -webkit-touch-callout: none; @@ -100,7 +100,7 @@ export default styled(ParallelCoordinates)` .parcoords .row, .parcoords .header { clear: left; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; line-height: 18px; height: 18px; margin: 0px; @@ -109,7 +109,7 @@ export default styled(ParallelCoordinates)` background: ${addAlpha(theme.colors.grayscale.dark2, 0.05)}; } .parcoords .header { - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; } .parcoords .cell { float: left; diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.jsx b/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.jsx index bfb1340fd70..521ad32e7c2 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.jsx @@ -36,13 +36,13 @@ export default styled(Partition)` .superset-legacy-chart-partition .chart { display: block; margin: auto; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; } .superset-legacy-chart-partition rect { stroke: ${theme.colors.grayscale.light2}; fill: ${theme.colors.grayscale.light1}; - fill-opacity: ${theme.opacity.heavy}; + fill-opacity: 80%; transition: fill-opacity 180ms linear; cursor: pointer; } @@ -52,8 +52,8 @@ export default styled(Partition)` } .superset-legacy-chart-partition g text { - font-weight: ${theme.typography.weights.bold}; - fill: ${theme.colors.grayscale.dark1}; + font-weight: ${theme.fontWeightStrong}; + fill: ${theme.colorText}; } .superset-legacy-chart-partition g:hover text { @@ -65,15 +65,15 @@ export default styled(Partition)` top: 0; left: 0; opacity: 0; - padding: ${theme.gridUnit}px; + padding: ${theme.sizeUnit}px; pointer-events: none; background-color: ${theme.colors.grayscale.dark2}; - border-radius: ${theme.gridUnit}px; + border-radius: ${theme.sizeUnit}px; } .partition-tooltip td { - padding-left: ${theme.gridUnit}px; - font-size: ${theme.typography.sizes.s}px; + padding-left: ${theme.sizeUnit}px; + font-size: ${theme.fontSizeSM}px; color: ${theme.colors.grayscale.light5}; } `} diff --git a/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.jsx b/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.jsx index efd9b59aef6..b7a2c0c800b 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.jsx @@ -28,13 +28,13 @@ const Rose = ({ className, ...otherProps }) => ( styles={theme => css` .tooltip { line-height: 1; - padding: ${theme.gridUnit * 3}px; + padding: ${theme.sizeUnit * 3}px; background: ${theme.colors.grayscale.dark2}; color: ${theme.colors.grayscale.light5}; border-radius: 4px; pointer-events: none; z-index: 1000; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; } `} /> @@ -53,9 +53,8 @@ export default styled(Rose)` } .superset-legacy-chart-rose text { - font-weight: ${theme.typography.weights.normal}; - font-size: ${theme.typography.sizes.s}px; - font-family: ${theme.typography.families.sansSerif}; + font-size: ${theme.fontSizeSM}px; + font-family: ${theme.fontFamily}; pointer-events: none; } diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.js b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.js index 03ea4ea9c78..092aa007f30 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.js +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.js @@ -265,7 +265,7 @@ function WorldMap(element, props) { countryFeature => !filterState.selectedValues.includes(countryFeature.id), ) - .style('fill-opacity', theme.opacity.mediumLight); + .style('fill-opacity', 0.35); // hack to ensure that the clicked country's color is preserved // sometimes the fill color would get default grey value after applying cross filter diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx index 681b114ff82..9e3eaaec4d4 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx @@ -24,12 +24,12 @@ import { formatNumber, styled } from '@superset-ui/core'; const StyledLegend = styled.div` ${({ theme }) => ` - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; position: absolute; background: ${theme.colors.grayscale.light5}; - box-shadow: 0 0 ${theme.gridUnit}px ${theme.colors.grayscale.light2}; - margin: ${theme.gridUnit * 6}px; - padding: ${theme.gridUnit * 3}px ${theme.gridUnit * 5}px; + box-shadow: 0 0 ${theme.sizeUnit}px ${theme.colors.grayscale.light2}; + margin: ${theme.sizeUnit * 6}px; + padding: ${theme.sizeUnit * 3}px ${theme.sizeUnit * 5}px; outline: none; overflow-y: scroll; max-height: 200px; @@ -43,10 +43,10 @@ const StyledLegend = styled.div` display: flex; color: ${theme.colors.grayscale.base}; text-decoration: none; - padding: ${theme.gridUnit}px 0; + padding: ${theme.sizeUnit}px 0; & span { - margin-right: ${theme.gridUnit}px; + margin-right: ${theme.sizeUnit}px; } } } diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx index 0e9801c52f3..7b58d087458 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx @@ -36,12 +36,12 @@ const StyledDiv = styled.div<{ top: number; left: number }>` position: absolute; top: ${top}px; left: ${left}px; - padding: ${theme.gridUnit * 2}px; - margin: ${theme.gridUnit * 2}px; + padding: ${theme.sizeUnit * 2}px; + margin: ${theme.sizeUnit * 2}px; background: ${theme.colors.grayscale.dark2}; color: ${theme.colors.grayscale.light5}; maxWidth: 300px; - fontSize: ${theme.typography.sizes.s}px; + fontSize: ${theme.fontSizeSM}px; zIndex: 9; pointerEvents: none; `} diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx index dfb2124ef03..21397be6d5b 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx @@ -49,23 +49,23 @@ export default styled(NVD3)` svg { &.nvd3-svg { width: auto; - font-size: ${({ theme }) => theme.typography.sizes.m}; + font-size: ${({ theme }) => theme.fontSize}; } } } .superset-legacy-chart-nvd3 { nv-x text { - font-size: ${({ theme }) => theme.typography.sizes.m}; + font-size: ${({ theme }) => theme.fontSize}; } g.superset path { stroke-dasharray: 5, 5; } .nvtooltip tr.highlight td { - font-weight: ${({ theme }) => theme.typography.weights.bold}; - font-size: ${({ theme }) => theme.typography.sizes.m}px !important; + font-weight: ${({ theme }) => theme.fontWeightStrong}; + font-size: ${({ theme }) => theme.fontSize}px !important; } text.nv-axislabel { - font-size: ${({ theme }) => theme.typography.sizes.m} !important; + font-size: ${({ theme }) => theme.fontSize} !important; } g.solid path, line.solid { @@ -134,22 +134,22 @@ export default styled(NVD3)` stroke-dasharray: 5, 5, 1, 5; } .nv-noData.body { - font-size: ${({ theme }) => theme.typography.sizes.m}; - font-weight: ${({ theme }) => theme.typography.weights.normal}; + font-size: ${({ theme }) => theme.fontSize}; + font-weight: ${({ theme }) => theme.fontWeightNormal}; } } .superset-legacy-chart-nvd3-tr-highlight { border-top: 1px solid; border-bottom: 1px solid; - font-weight: ${({ theme }) => theme.typography.weights.bold}; + font-weight: ${({ theme }) => theme.fontWeightStrong}; } .superset-legacy-chart-nvd3-tr-total { - font-weight: ${({ theme }) => theme.typography.weights.bold}; + font-weight: ${({ theme }) => theme.fontWeightStrong}; } .nvtooltip { .tooltip-header { white-space: nowrap; - font-weight: ${({ theme }) => theme.typography.weights.bold}; + font-weight: ${({ theme }) => theme.fontWeightStrong}; } tbody tr:not(.tooltip-header) td:nth-of-type(2) { word-break: break-word; @@ -161,12 +161,12 @@ export default styled(NVD3)` border-radius: 2px; background-color: ${({ theme }) => theme.colors.grayscale.base}; fill-opacity: 0.6; - margin: ${({ theme }) => theme.gridUnit * 2}px; - padding: ${({ theme }) => theme.gridUnit * 2}px; + margin: ${({ theme }) => theme.sizeUnit * 2}px; + padding: ${({ theme }) => theme.sizeUnit * 2}px; color: ${({ theme }) => theme.colors.grayscale.light5}; &:after { content: '\\25BC'; - font-size: ${({ theme }) => theme.typography.sizes.m}; + font-size: ${({ theme }) => theme.fontSize}; color: ${({ theme }) => theme.colors.grayscale.base}; position: absolute; bottom: -14px; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx index a4736c89c20..d4e5b2de0fe 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx @@ -47,10 +47,10 @@ const NumbersContainer = styled.div` const ComparisonValue = styled.div` ${({ theme, subheaderFontSize }) => ` - font-weight: ${theme.typography.weights.light}; + font-weight: ${theme.fontWeightLight}; display: flex; justify-content: center; - font-size: ${subheaderFontSize || 20}px; + font-size: ${String(subheaderFontSize) || 20}px; flex: 1 1 0px; `} `; @@ -59,9 +59,9 @@ const SymbolWrapper = styled.span` ${({ theme, backgroundColor, textColor }) => ` background-color: ${backgroundColor}; color: ${textColor}; - padding: ${theme.gridUnit}px ${theme.gridUnit * 2}px; - border-radius: ${theme.gridUnit * 2}px; - margin-right: ${theme.gridUnit}px; + padding: ${theme.sizeUnit}px ${theme.sizeUnit * 2}px; + border-radius: ${theme.sizeUnit * 2}px; + margin-right: ${theme.sizeUnit}px; `} `; @@ -122,9 +122,9 @@ export default function PopKPI(props: PopKPIProps) { }, [currentTimeRangeFilter, shift, startDateOffset, dashboardTimeRange]); const theme = useTheme(); - const flexGap = theme.gridUnit * 5; + const flexGap = theme.sizeUnit * 5; const wrapperDivStyles = css` - font-family: ${theme.typography.families.sansSerif}; + font-family: ${theme.fontFamily}; display: flex; justify-content: center; align-items: center; @@ -134,10 +134,10 @@ export default function PopKPI(props: PopKPIProps) { `; const bigValueContainerStyles = css` - font-size: ${headerFontSize || 60}px; - font-weight: ${theme.typography.weights.normal}; + font-size: ${String(headerFontSize) || 60}px; + font-weight: ${theme.fontWeightNormal}; text-align: center; - margin-bottom: ${theme.gridUnit * 4}px; + margin-bottom: ${theme.sizeUnit * 4}px; `; const getArrowIndicatorColor = () => { @@ -148,21 +148,21 @@ export default function PopKPI(props: PopKPIProps) { if (percentDifferenceNumber > 0) { // Positive difference return comparisonColorScheme === ColorSchemeEnum.Green - ? theme.colors.success.base - : theme.colors.error.base; + ? theme.colorSuccess + : theme.colorError; } // Negative difference return comparisonColorScheme === ColorSchemeEnum.Red - ? theme.colors.success.base - : theme.colors.error.base; + ? theme.colorSuccess + : theme.colorError; }; const arrowIndicatorStyle = css` color: ${getArrowIndicatorColor()}; - margin-left: ${theme.gridUnit}px; + margin-left: ${theme.sizeUnit}px; `; - const defaultBackgroundColor = theme.colors.grayscale.light4; + const defaultBackgroundColor = theme.colorBgContainer; const defaultTextColor = theme.colors.grayscale.base; const { backgroundColor, textColor } = useMemo(() => { let bgColor = defaultBackgroundColor; @@ -178,9 +178,7 @@ export default function PopKPI(props: PopKPIProps) { bgColor = useSuccess ? theme.colors.success.light2 : theme.colors.error.light2; - txtColor = useSuccess - ? theme.colors.success.base - : theme.colors.error.base; + txtColor = useSuccess ? theme.colorSuccess : theme.colorError; } return { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/types.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/types.ts index e0ece4d8777..a2dbb1f29a2 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/types.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/types.ts @@ -18,17 +18,18 @@ */ import { QueryFormData, - supersetTheme, TimeseriesDataRecord, Metric, SimpleAdhocFilter, } from '@superset-ui/core'; +export type FontSizeOptions = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'; + export interface PopKPIStylesProps { height: number; width: number; - headerFontSize: keyof typeof supersetTheme.typography.sizes; - subheaderFontSize: keyof typeof supersetTheme.typography.sizes; + headerFontSize: FontSizeOptions; + subheaderFontSize: FontSizeOptions; boldText: boolean; comparisonColorEnabled: boolean; } @@ -38,7 +39,7 @@ interface PopKPICustomizeProps { } export interface PopKPIComparisonValueStyleProps { - subheaderFontSize?: keyof typeof supersetTheme.typography.sizes; + subheaderFontSize?: FontSizeOptions; } export interface PopKPIComparisonSymbolStyleProps { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx index d95ae633af0..712b8e463dd 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx @@ -325,7 +325,7 @@ class BigNumberVis extends PureComponent { export default styled(BigNumberVis)` ${({ theme }) => ` - font-family: ${theme.typography.families.sansSerif}; + font-family: ${theme.fontFamily}; position: relative; display: flex; flex-direction: column; @@ -342,11 +342,11 @@ export default styled(BigNumberVis)` justify-content: center; align-items: flex-start; .alert { - font-size: ${theme.typography.sizes.s}; + font-size: ${theme.fontSizeSM}; margin: -0.5em 0 0.4em; line-height: 1; - padding: ${theme.gridUnit}px; - border-radius: ${theme.gridUnit}px; + padding: ${theme.sizeUnit}px; + border-radius: ${theme.sizeUnit}px; } } @@ -359,7 +359,7 @@ export default styled(BigNumberVis)` position: relative; line-height: 1em; white-space: nowrap; - margin-bottom:${theme.gridUnit * 2}px; + margin-bottom:${theme.sizeUnit * 2}px; span { position: absolute; bottom: 0; @@ -375,7 +375,7 @@ export default styled(BigNumberVis)` .kicker, .header-line, .subheader-line { - opacity: ${theme.opacity.mediumHeavy}; + opacity: 60%; } } `} diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts index 676b1f08d48..757b99342ed 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts @@ -24,7 +24,7 @@ export const defaultGaugeSeriesOption = ( ): GaugeSeriesOption => ({ splitLine: { lineStyle: { - color: theme.colors.primary.base, + color: theme.colorPrimary, }, }, axisLine: { @@ -33,12 +33,12 @@ export const defaultGaugeSeriesOption = ( }, }, axisLabel: { - color: theme.colors.grayscale.dark1, + color: theme.colorText, }, axisTick: { lineStyle: { width: 2, - color: theme.colors.primary.base, + color: theme.colorPrimary, }, }, detail: { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts index 853721b2926..68b9b2d8071 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts @@ -220,10 +220,10 @@ export default function transformProps( }); const minShowLabelAngle = (showLabelsThreshold || 0) * 3.6; const padding = { - top: theme.gridUnit * 3, - right: theme.gridUnit, - bottom: theme.gridUnit * 3, - left: theme.gridUnit, + top: theme.sizeUnit * 3, + right: theme.sizeUnit, + bottom: theme.sizeUnit * 3, + left: theme.sizeUnit, }; const containerWidth = width; const containerHeight = height; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts index 70755574fba..5336f36ba88 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts @@ -238,7 +238,7 @@ export default function transformProps( show: false, }, itemStyle: { - color: theme.colors.primary.base, + color: theme.colorPrimary, }, }, ]; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts index ab21e7b37cc..a1d410ab882 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts @@ -406,10 +406,10 @@ export default function transformProps( const echartOptions: EChartsOption = { grid: { ...defaultGrid, - top: theme.gridUnit * 7, - bottom: theme.gridUnit * 7, - left: theme.gridUnit * 5, - right: theme.gridUnit * 7, + top: theme.sizeUnit * 7, + bottom: theme.sizeUnit * 7, + left: theme.sizeUnit * 5, + right: theme.sizeUnit * 7, }, legend: { show: showLegend, @@ -421,7 +421,7 @@ export default function transformProps( type: 'category', name: xAxisLabel, nameTextStyle: { - padding: [theme.gridUnit * 4, 0, 0, 0], + padding: [theme.sizeUnit * 4, 0, 0, 0], }, nameLocation: 'middle', axisLabel, @@ -430,7 +430,7 @@ export default function transformProps( ...defaultYAxis, type: 'value', nameTextStyle: { - padding: [0, 0, theme.gridUnit * 5, 0], + padding: [0, 0, theme.sizeUnit * 5, 0], }, nameLocation: 'middle', name: yAxisLabel, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts index ef10fb9d3ba..e82e633c0f0 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts @@ -438,8 +438,8 @@ export function getLegendProps( selected: legendState, selector: ['all', 'inverse'], selectorLabel: { - fontFamily: theme.typography.families.sansSerif, - fontSize: theme.typography.sizes.s, + fontFamily: theme.fontFamily, + fontSize: theme.fontSizeSM, color: theme.colors.grayscale.base, borderColor: theme.colors.grayscale.base, }, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts index 7054f6019ad..37e8c00cded 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts @@ -54,8 +54,8 @@ import { NULL_STRING } from '../../src/constants'; const expectedThemeProps = { selector: ['all', 'inverse'], selectorLabel: { - fontFamily: theme.typography.families.sansSerif, - fontSize: theme.typography.sizes.s, + fontFamily: theme.fontFamily, + fontSize: theme.fontSizeSM, color: theme.colors.grayscale.base, borderColor: theme.colors.grayscale.base, }, diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx index c4305a2a8c8..77314c6bdea 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx @@ -22,8 +22,8 @@ import { HandlebarsViewer } from './components/Handlebars/HandlebarsViewer'; import { HandlebarsProps, HandlebarsStylesProps } from './types'; const Styles = styled.div` - padding: ${({ theme }) => theme.gridUnit * 4}px; - border-radius: ${({ theme }) => theme.gridUnit * 2}px; + padding: ${({ theme }) => theme.sizeUnit * 4}px; + border-radius: ${({ theme }) => theme.sizeUnit * 2}px; height: ${({ height }) => height}px; width: ${({ width }) => width}px; overflow: auto; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx index 6f21892e0c4..6eef1eb65a2 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx @@ -71,7 +71,7 @@ ${helperDescriptions
{props.label} } />
diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx index 9723228146d..d15fc7d961d 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx @@ -48,7 +48,7 @@ const StyleControl = (props: CustomControlConfig) => {
{props.label}
diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx b/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx index aef8b8b3212..2322c6e6f12 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx @@ -539,7 +539,7 @@ export default function PivotTableChart(props: PivotTableProps) { ); return ( - + css` table.pvtTable { position: ${isDashboardEditMode ? 'inherit' : 'relative'}; - width: calc(100% - ${theme.gridUnit}px); - font-size: ${theme.typography.sizes.s}px; + width: calc(100% - ${theme.sizeUnit}px); + font-size: ${theme.fontSizeSM}px; text-align: left; - margin: ${theme.gridUnit}px; + margin: ${theme.sizeUnit}px; border-collapse: separate; - font-family: ${theme.typography.families.sansSerif}; + font-family: ${theme.fontFamily}; line-height: 1.4; } @@ -43,12 +43,11 @@ export const Styles = styled.div` table.pvtTable thead tr th, table.pvtTable tbody tr th { - background-color: ${theme.colors.grayscale.light5}; - border-top: 1px solid ${theme.colors.grayscale.light2}; - border-left: 1px solid ${theme.colors.grayscale.light2}; - font-size: ${theme.typography.sizes.s}px; - padding: ${theme.gridUnit}px; - font-weight: ${theme.typography.weights.normal}; + border-top: 1px solid ${theme.colorSplit}; + border-left: 1px solid ${theme.colorSplit}; + font-size: ${theme.fontSizeSM}px; + padding: ${theme.sizeUnit}px; + font-weight: ${theme.fontWeightNormal}; } table.pvtTable tbody tr.pvtRowTotals { @@ -94,16 +93,16 @@ export const Styles = styled.div` table.pvtTable .pvtTotalLabel { text-align: right; - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; } table.pvtTable .pvtSubtotalLabel { - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; } table.pvtTable tbody tr td { color: ${theme.colors.primary.dark2}; - padding: ${theme.gridUnit}px; + padding: ${theme.sizeUnit}px; background-color: ${theme.colors.grayscale.light5}; border-top: 1px solid ${theme.colors.grayscale.light2}; border-left: 1px solid ${theme.colors.grayscale.light2}; @@ -117,7 +116,7 @@ export const Styles = styled.div` .pvtTotal, .pvtGrandTotal { - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; } table.pvtTable tbody tr td.pvtRowTotal { @@ -133,7 +132,7 @@ export const Styles = styled.div` } .toggle { - padding-right: ${theme.gridUnit}px; + padding-right: ${theme.sizeUnit}px; cursor: pointer; } diff --git a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx index e394d16446e..5abc21f6d34 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx @@ -36,15 +36,15 @@ export default styled.div` thead > tr > th { padding-right: 0; position: relative; - background: ${theme.colors.grayscale.light5}; + background: ${theme.colorBgLayout}; text-align: left; } th svg { - color: ${theme.colors.grayscale.light2}; - margin: ${theme.gridUnit / 2}px; + color: ${theme.colorIcon}; + margin: ${theme.sizeUnit / 2}px; } th.is-sorted svg { - color: ${theme.colors.grayscale.base}; + color: ${theme.colorText}; } .table > tbody > tr:first-of-type > td, .table > tbody > tr:first-of-type > th { @@ -62,20 +62,20 @@ export default styled.div` text-align: right; } .dt-totals { - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; } .dt-is-null { - color: ${theme.colors.grayscale.light1}; + color: ${theme.colorTextTertiary}; } td.dt-is-filter { cursor: pointer; } td.dt-is-filter:hover { - background-color: ${theme.colors.secondary.light4}; + background-color: ${theme.colorPrimaryBgHover}; } td.dt-is-active-filter, td.dt-is-active-filter:hover { - background-color: ${theme.colors.secondary.light3}; + background-color: ${theme.colorPrimaryBgHover}; } .dt-global-filter { @@ -104,7 +104,7 @@ export default styled.div` .pagination > li > span.dt-pagination-ellipsis:focus, .pagination > li > span.dt-pagination-ellipsis:hover { - background: ${theme.colors.grayscale.light5}; + background: ${theme.colorBgLayout}; } .dt-no-results { @@ -113,7 +113,7 @@ export default styled.div` } .right-border-only { - border-right: 2px solid ${theme.colors.grayscale.light2}; + border-right: 2px solid ${theme.colorSplit}; } table .right-border-only:last-child { border-right: none; diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 77905ea562e..16b403f08a2 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -555,9 +555,9 @@ export default function TableChart(
{t( @@ -568,7 +568,7 @@ export default function TableChart( {column.label} @@ -576,7 +576,7 @@ export default function TableChart( {selectedComparisonColumns.includes(column.key) && ( @@ -625,7 +625,7 @@ export default function TableChart( css={css` float: right; & svg { - color: ${theme.colors.grayscale.base} !important; + color: ${theme.colorText} !important; } `} > @@ -656,7 +656,7 @@ export default function TableChart( ( } const StyledCell = styled.td` + color: ${theme.colorText}; + background-color: ${theme.colorBgBase}; text-align: ${sharedStyle.textAlign}; white-space: ${value instanceof Date ? 'nowrap' : undefined}; position: relative; @@ -823,9 +825,9 @@ export default function TableChart( color: ${basicColorFormatters && basicColorFormatters[row.index][originKey]?.arrowColor === ColorSchemeEnum.Green - ? theme.colors.success.base - : theme.colors.error.base}; - margin-right: ${theme.gridUnit}px; + ? theme.colorSuccess + : theme.colorError}; + margin-right: ${theme.sizeUnit}px; `; if ( @@ -835,9 +837,9 @@ export default function TableChart( arrowStyles = css` color: ${basicColorColumnFormatters[row.index][column.key] ?.arrowColor === ColorSchemeEnum.Green - ? theme.colors.success.base - : theme.colors.error.base}; - margin-right: ${theme.gridUnit}px; + ? theme.colorSuccess + : theme.colorError}; + margin-right: ${theme.sizeUnit}px; `; } @@ -981,8 +983,8 @@ export default function TableChart( display: flex; align-items: center; & svg { - margin-left: ${theme.gridUnit}px; - color: ${theme.colors.grayscale.dark1} !important; + margin-left: ${theme.sizeUnit}px; + color: ${theme.colorText} !important; } `} > diff --git a/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx b/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx index b21a657b815..9ce741c89c5 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx +++ b/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx @@ -356,7 +356,9 @@ describe('plugin-chart-table', () => { expect(getComputedStyle(screen.getByTitle('2467063')).background).toBe( 'rgba(172, 225, 196, 1)', ); - expect(getComputedStyle(screen.getByTitle('2467')).background).toBe(''); + expect(getComputedStyle(screen.getByTitle('2467')).background).toBe( + 'rgb(255, 255, 255)', + ); }); it('render cell without color', () => { @@ -396,9 +398,11 @@ describe('plugin-chart-table', () => { 'rgba(172, 225, 196, 0.812)', ); expect(getComputedStyle(screen.getByTitle('2467063')).background).toBe( - '', + 'rgb(255, 255, 255)', + ); + expect(getComputedStyle(screen.getByText('N/A')).background).toBe( + 'rgb(255, 255, 255)', ); - expect(getComputedStyle(screen.getByText('N/A')).background).toBe(''); }); }); @@ -442,7 +446,7 @@ describe('plugin-chart-table', () => { cells = document.querySelectorAll('td'); cells.forEach(cell => { - expect(cell).toHaveClass('test-c7w8t3'); + expect(cell).toHaveClass('test-70d2p3'); }); props.columns[0].isPercentMetric = false; @@ -455,7 +459,7 @@ describe('plugin-chart-table', () => { ); cells = document.querySelectorAll('td'); cells.forEach(cell => { - expect(cell).toHaveClass('test-c7w8t3'); + expect(cell).toHaveClass('test-70d2p3'); }); }); }); diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx index 0e91e93f126..7dc5d4604b0 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx @@ -26,7 +26,7 @@ import { Encoder, } from 'encodable'; import { - SupersetThemeProps, + SupersetTheme, withTheme, seed, CategoricalColorNamespace, @@ -80,8 +80,7 @@ const defaultProps: Required = { }; type FullWordCloudProps = WordCloudProps & - typeof defaultProps & - SupersetThemeProps; + typeof defaultProps & { theme: SupersetTheme }; const SCALE_FACTOR_STEP = 0.5; const MAX_SCALE_FACTOR = 3; @@ -106,7 +105,7 @@ class WordCloud extends PureComponent { }, defaultEncoding: { color: { value: this.props.theme.colors.grayscale.dark2 }, - fontFamily: { value: this.props.theme.typography.families.sansSerif }, + fontFamily: { value: this.props.theme.fontFamily }, fontSize: { value: 20 }, fontWeight: { value: 'bold' }, text: { value: '' }, @@ -196,15 +195,12 @@ class WordCloud extends PureComponent { cloudLayout() .size([width * scaleFactor, height * scaleFactor]) // clone the data because cloudLayout mutates input - .words(data.map(d => ({ ...d }))) + .words(data.map((d: Word) => ({ ...d }))) .padding(5) .rotate(ROTATION[rotation] || ROTATION.flat) .text((d: PlainObject) => encoder.channels.text.getValueFromDatum(d)) .font((d: PlainObject) => - encoder.channels.fontFamily.encodeDatum( - d, - this.props.theme.typography.families.sansSerif, - ), + encoder.channels.fontFamily.encodeDatum(d, this.props.theme.fontFamily), ) .fontWeight((d: PlainObject) => encoder.channels.fontWeight.encodeDatum(d, 'normal'), diff --git a/superset-frontend/scripts/compileLess.ts b/superset-frontend/scripts/compileLess.ts new file mode 100644 index 00000000000..4c454c668b3 --- /dev/null +++ b/superset-frontend/scripts/compileLess.ts @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import fs from 'fs'; +import path from 'path'; +import Handlebars from 'handlebars'; +import { themeObject } from 'packages/superset-ui-core/src/theme'; + +// eslint-disable no-console +Handlebars.escapeExpression = (value: string) => value; +const { theme } = themeObject; + +// Function to apply a template and generate the output +function applyTemplate(filePath: string): void { + try { + // Read the .less.hbs template + const templateContent = fs.readFileSync(filePath, 'utf-8'); + + // Compile the template + const template = Handlebars.compile(templateContent, { noEscape: true }); + + // Generate the final .less file + const result = template({ theme }); + + // Write the output to a .less file + const outputFilePath = filePath.replace('.hbs', ''); // Remove .hbs for output + fs.writeFileSync(outputFilePath, result, 'utf-8'); + console.log(`Themed .less file generated: ${outputFilePath}`); + } catch (error) { + console.error(`Failed to process template: ${filePath}`, error); + } +} + +function findHbsFiles(dir: string): string[] { + const files = fs.readdirSync(dir); + return files + .map((file: string) => { + const fullPath = path.join(dir, file); + if (fs.statSync(fullPath).isDirectory()) { + return findHbsFiles(fullPath); + } + if (fullPath.endsWith('.less.hbs')) { + return fullPath; + } + return null; + }) + .flat() + .filter((filePath: string | null): filePath is string => filePath !== null); +} + +// Find all `.less.hbs` files in the directory +const hbsFiles = findHbsFiles('src/assets/stylesheets/'); + +// Apply templates to all `.less.hbs` files found +hbsFiles.forEach((filePath: string) => applyTemplate(filePath)); diff --git a/superset-frontend/src/GlobalStyles.tsx b/superset-frontend/src/GlobalStyles.tsx index e80d32e7ec4..0780bbc8c42 100644 --- a/superset-frontend/src/GlobalStyles.tsx +++ b/superset-frontend/src/GlobalStyles.tsx @@ -18,7 +18,6 @@ */ import { css } from '@superset-ui/core'; import { Global } from '@emotion/react'; -import { mix } from 'polished'; import 'react-js-cron/dist/styles.css'; export const GlobalStyles = () => ( @@ -32,7 +31,7 @@ export const GlobalStyles = () => ( h6, strong, th { - font-weight: ${theme.typography.weights.bold}; + font-weight: ${theme.fontWeightStrong}; } // CSS hack to resolve the issue caused by the invisible echart tooltip on // https://github.com/apache/superset/issues/30058 @@ -51,38 +50,11 @@ export const GlobalStyles = () => ( .antd5-picker-dropdown, .ant-popover, .antd5-popover { - z-index: ${theme.zIndex.max} !important; + z-index: ${theme.zIndexPopupBase} !important; } // TODO: Remove when buttons have been upgraded to Ant Design 5. // Check src/components/Modal for more info. - .ant-modal-confirm { - button { - border: none; - border-radius: ${theme.borderRadius}px; - line-height: 1.5715; - font-size: ${theme.typography.sizes.s}px; - font-weight: ${theme.typography.weights.bold}; - } - .ant-btn-primary:not(.btn-danger) { - background: ${theme.colors.primary.base}; - color: ${theme.colors.grayscale.light5}; - &:hover { - background: ${theme.colors.primary.dark1}; - } - } - .ant-btn-default:not(.btn-danger) { - background: ${theme.colors.primary.light4}; - color: ${theme.colors.primary.dark1}; - &:hover { - background: ${mix( - 0.1, - theme.colors.primary.base, - theme.colors.primary.light4, - )}; - } - } - } .column-config-popover { & .antd5-input-number { width: 100%; @@ -95,12 +67,12 @@ export const GlobalStyles = () => ( padding: 5px 10px 6px; } && .ant-tabs { - margin-top: ${theme.gridUnit * -3}px; + margin-top: ${theme.sizeUnit * -3}px; } & .ant-tabs-nav { - margin-left: ${theme.gridUnit * -4}px; - margin-right: ${theme.gridUnit * -4}px; - margin-bottom: ${theme.gridUnit * 2}px; + margin-left: ${theme.sizeUnit * -4}px; + margin-right: ${theme.sizeUnit * -4}px; + margin-bottom: ${theme.sizeUnit * 2}px; } && .ant-tabs-tab { flex: 1; diff --git a/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx b/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx index ef9fb8be62b..5fa75de1bfd 100644 --- a/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx +++ b/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx @@ -26,7 +26,7 @@ export const SqlLabGlobalStyles = () => ( body { min-height: max( 100vh, - ${theme.gridUnit * 125}px + ${theme.sizeUnit * 125}px ); // Set a min height so the gutter is always visible when resizing overflow: hidden; } diff --git a/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx b/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx index 06e67fb4043..0064b544864 100644 --- a/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx +++ b/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx @@ -50,12 +50,39 @@ type AceEditorWrapperProps = { const StyledAceEditor = styled(AceEditor)` ${({ theme }) => css` + color: ${theme.colorText}; && { // double class is better than !important - border: 1px solid ${theme.colors.grayscale.light2}; + border: 1px solid ${theme.colorBorder}; font-feature-settings: 'liga' off, 'calt' off; + + .ace_editor { + font-family: 'Roboto Mono', monospace; + font-size: 14px; + background-color: ${theme.colorBgContainerDisabled}; + } + .ace-github { + color: ${theme.colorText}; + } + + .ace_gutter { + background-color: ${theme.colorBgTextHover}; + color: ${theme.colorText}; + } + + .ace_cursor { + color: ${theme.colorPrimaryText}; + } + + .ace_marker-layer .ace_active-line { + background: ${theme.colorBgTextHover}; + } + + .ace_marker-layer .ace_selection { + background: ${theme.colorPrimaryBgHover}; + } } `} `; @@ -200,7 +227,7 @@ const AceEditorWrapper = ({ .ace_autocomplete { // Use !important because Ace Editor applies extra CSS at the last second // when opening the autocomplete. - width: ${theme.gridUnit * 130}px !important; + width: ${theme.sizeUnit * 130}px !important; } .ace_tooltip { @@ -208,7 +235,7 @@ const AceEditorWrapper = ({ } .ace_scroller { - background-color: ${theme.colors.grayscale.light4}; + background-color: ${theme.colorBgLayout}; } `} /> diff --git a/superset-frontend/src/SqlLab/components/App/index.tsx b/superset-frontend/src/SqlLab/components/App/index.tsx index 8b9c2790834..ab27d351692 100644 --- a/superset-frontend/src/SqlLab/components/App/index.tsx +++ b/superset-frontend/src/SqlLab/components/App/index.tsx @@ -45,13 +45,13 @@ const SqlLabStyles = styled.div` right: 0; bottom: 0; left: 0; - padding: 0 ${theme.gridUnit * 2}px; + padding: 0 ${theme.sizeUnit * 2}px; pre:not(.code) { padding: 0 !important; margin: 0; border: none; - font-size: ${theme.typography.sizes.s}px; + font-size: ${theme.fontSizeSM}px; background: transparent !important; } @@ -76,7 +76,7 @@ const SqlLabStyles = styled.div` .ant-tabs-content { height: 100%; position: relative; - background-color: ${theme.colors.grayscale.light5}; + background-color: ${theme.colorBgContainer}; overflow-x: auto; overflow-y: auto; @@ -90,7 +90,7 @@ const SqlLabStyles = styled.div` } .ResultsModal .antd5-modal-body { - min-height: ${theme.gridUnit * 140}px; + min-height: ${theme.sizeUnit * 140}px; } .antd5-modal-body { diff --git a/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx b/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx index 613fa5dbea0..3cc9d14f552 100644 --- a/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx @@ -29,7 +29,7 @@ const StyledTooltip = (props: any) => { { background: transparent; border: none; text-align: left; - color: ${theme.colors.grayscale.light5}; - font-size: ${theme.typography.sizes.xs}px; + color: ${theme.colorBgLayout}; + font-size: ${theme.fontSizeXS}px; } } `} @@ -50,7 +50,7 @@ const StyledTooltip = (props: any) => { }; const Hr = styled.hr` - margin-top: ${({ theme }) => theme.gridUnit * 1.5}px; + margin-top: ${({ theme }) => theme.sizeUnit * 1.5}px; `; const iconMap = { diff --git a/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx b/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx index 4c50541afd5..a272ecd59d1 100644 --- a/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx @@ -38,7 +38,7 @@ export interface EstimateQueryCostButtonProps { const CostEstimateModalStyles = styled.div` ${({ theme }) => css` - font-size: ${theme.typography.sizes.s}; + font-size: ${theme.fontSizeSM}; `} `; diff --git a/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx b/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx index 05c4ea8ba1b..bc043589a4c 100644 --- a/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx @@ -72,23 +72,23 @@ const KeyMapByCommand = Object.entries(KEY_MAP).reduce< }, {}); const ShortcutDescription = styled.span` - font-size: ${({ theme }) => theme.typography.sizes.m}px; - color: ${({ theme }) => theme.colors.text.help}; - padding-left: ${({ theme }) => theme.gridUnit * 2}px; + font-size: ${({ theme }) => theme.fontSize}px; + color: ${({ theme }) => theme.colorTextLabel}; + padding-left: ${({ theme }) => theme.sizeUnit * 2}px; `; const ShortcutWrapper = styled.div` display: flex; flex-wrap: wrap; - gap: ${({ theme }) => theme.gridUnit}px; - padding: ${({ theme }) => theme.gridUnit * 2}px; + gap: ${({ theme }) => theme.sizeUnit}px; + padding: ${({ theme }) => theme.sizeUnit * 2}px; `; const ShortcutCode = styled.code` - font-size: ${({ theme }) => theme.typography.sizes.s}px; - color: ${({ theme }) => theme.colors.grayscale.dark1}; + font-size: ${({ theme }) => theme.fontSizeSM}px; + color: ${({ theme }) => theme.colorText}; border-radius: ${({ theme }) => theme.borderRadius}px; - padding: ${({ theme }) => `${theme.gridUnit}px ${theme.gridUnit * 2}px`}; + padding: ${({ theme }) => `${theme.sizeUnit}px ${theme.sizeUnit * 2}px`}; `; const KeyboardShortcutButton: FC<{}> = ({ children }) => ( diff --git a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx index ce9cb2b06d2..ff8e12c4b83 100644 --- a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx @@ -77,7 +77,7 @@ const QueryLimitSelect = ({ dropdownRender={() => renderQueryLimit(maxRow, setQueryLimit)} trigger={['click']} > - } diff --git a/superset-frontend/src/SqlLab/components/QueryTable/styles.ts b/superset-frontend/src/SqlLab/components/QueryTable/styles.ts index 2800f099456..a1eb740964e 100644 --- a/superset-frontend/src/SqlLab/components/QueryTable/styles.ts +++ b/superset-frontend/src/SqlLab/components/QueryTable/styles.ts @@ -31,11 +31,11 @@ export const verticalAlign = css` `; export const StyledTooltip = styled(IconTooltip)` - padding-right: ${({ theme }) => theme.gridUnit * 2}px; + padding-right: ${({ theme }) => theme.sizeUnit * 2}px; span { color: ${({ theme }) => theme.colors.grayscale.base}; &: hover { - color: ${({ theme }) => theme.colors.primary.base}; + color: ${({ theme }) => theme.colorPrimary}; } } `; diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx index fb375260e45..231660db4a7 100644 --- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx +++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx @@ -110,24 +110,24 @@ export interface ResultSetProps { const ResultContainer = styled.div` display: flex; flex-direction: column; - row-gap: ${({ theme }) => theme.gridUnit * 2}px; + row-gap: ${({ theme }) => theme.sizeUnit * 2}px; `; const ResultlessStyles = styled.div` position: relative; - min-height: ${({ theme }) => theme.gridUnit * 25}px; + min-height: ${({ theme }) => theme.sizeUnit * 25}px; [role='alert'] { - margin-top: ${({ theme }) => theme.gridUnit * 2}px; + margin-top: ${({ theme }) => theme.sizeUnit * 2}px; } .sql-result-track-job { - margin-top: ${({ theme }) => theme.gridUnit * 2}px; + margin-top: ${({ theme }) => theme.sizeUnit * 2}px; } `; // Making text render line breaks/tabs as is as monospace, // but wrapping text too so text doesn't overflow const MonospaceDiv = styled.div` - font-family: ${({ theme }) => theme.typography.families.monospace}; + font-family: ${({ theme }) => theme.fontFamilyCode}; white-space: pre; word-break: break-word; overflow-x: auto; @@ -135,7 +135,7 @@ const MonospaceDiv = styled.div` `; const ReturnedRows = styled.div` - font-size: ${({ theme }) => theme.typography.sizes.s}px; + font-size: ${({ theme }) => theme.fontSizeSM}px; line-height: 1; `; @@ -147,7 +147,7 @@ const ResultSetControls = styled.div` const ResultSetButtons = styled.div` display: grid; grid-auto-flow: column; - padding-right: ${({ theme }) => 2 * theme.gridUnit}px; + padding-right: ${({ theme }) => 2 * theme.sizeUnit}px; `; const ROWS_CHIP_WIDTH = 100; @@ -501,14 +501,14 @@ const ResultSet = ({ >
@@ -976,7 +975,7 @@ const SqlEditor: FC = ({ data-test="sqlEditor-loading" css={css` flex: 1; - padding: ${theme.gridUnit * 4}px; + padding: ${theme.sizeUnit * 4}px; `} > diff --git a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx index 59fd26023f7..100beb13594 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx @@ -62,7 +62,7 @@ const StyledScrollbarContainer = styled.div` const collapseStyles = (theme: SupersetTheme) => css` .ant-collapse-item { - margin-bottom: ${theme.gridUnit * 3}px; + margin-bottom: ${theme.sizeUnit * 3}px; } .ant-collapse-header { padding: 0px !important; @@ -70,15 +70,15 @@ const collapseStyles = (theme: SupersetTheme) => css` align-items: center; } .ant-collapse-content-box { - padding: 0px ${theme.gridUnit * 4}px 0px 0px !important; + padding: 0px ${theme.sizeUnit * 4}px 0px 0px !important; } .ant-collapse-arrow { padding: 0 !important; - bottom: ${theme.gridUnit}px !important; - right: ${theme.gridUnit * 4}px !important; - color: ${theme.colors.primary.dark1} !important; + bottom: ${theme.sizeUnit}px !important; + right: ${theme.sizeUnit * 4}px !important; + color: ${theme.colorPrimaryText} !important; &:hover { - color: ${theme.colors.primary.dark2} !important; + color: ${theme.colorPrimaryTextHover} !important; } } `; @@ -90,8 +90,8 @@ const LeftBarStyles = styled.div` flex-direction: column; .divider { - border-bottom: 1px solid ${theme.colors.grayscale.light4}; - margin: ${theme.gridUnit * 4}px 0; + border-bottom: 1px solid ${theme.colorSplit}; + margin: ${theme.sizeUnit * 4}px 0; } `} `; diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx index adc09ea63a2..85d4b0a4de3 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx @@ -38,13 +38,13 @@ const TabTitleWrapper = styled.div` align-items: center; `; const TabTitle = styled.span` - margin-right: ${({ theme }) => theme.gridUnit * 2}px; + margin-right: ${({ theme }) => theme.sizeUnit * 2}px; text-transform: none; `; const IconContainer = styled.div` display: inline-block; - width: ${({ theme }) => theme.gridUnit * 8}px; + width: ${({ theme }) => theme.sizeUnit * 8}px; text-align: center; `; diff --git a/superset-frontend/src/SqlLab/components/TabStatusIcon/index.tsx b/superset-frontend/src/SqlLab/components/TabStatusIcon/index.tsx index da069d6cffb..4fbde0c08ea 100644 --- a/superset-frontend/src/SqlLab/components/TabStatusIcon/index.tsx +++ b/superset-frontend/src/SqlLab/components/TabStatusIcon/index.tsx @@ -29,28 +29,28 @@ const IconContainer = styled.span` const Circle = styled.div` ${({ theme }) => css` border-radius: 50%; - width: ${theme.gridUnit * 3}px; - height: ${theme.gridUnit * 3}px; + width: ${theme.sizeUnit * 3}px; + height: ${theme.sizeUnit * 3}px; display: inline-block; background-color: ${theme.colors.grayscale.light2}; text-align: center; vertical-align: middle; - font-size: ${theme.typography.sizes.m}px; - font-weight: ${theme.typography.weights.bold}; + font-size: ${theme.fontSize}px; + font-weight: ${theme.fontWeightStrong}; color: ${theme.colors.grayscale.light5}; position: relative; &.running { - background-color: ${theme.colors.info.base}; + background-color: ${theme.colorInfo}; } &.success { - background-color: ${theme.colors.success.base}; + background-color: ${theme.colorSuccess}; } &.failed { - background-color: ${theme.colors.error.base}; + background-color: ${theme.colorError}; } `} `; diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx index 21a9c8a97d0..b8ac66c00ac 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx @@ -51,7 +51,7 @@ const StyledTab = styled.span` `; const TabTitle = styled.span` - margin-right: ${({ theme }) => theme.gridUnit * 2}px; + margin-right: ${({ theme }) => theme.sizeUnit * 2}px; text-transform: none; `; diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx b/superset-frontend/src/SqlLab/components/TableElement/index.tsx index f65229fd6fa..175d693bfc1 100644 --- a/superset-frontend/src/SqlLab/components/TableElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/TableElement/index.tsx @@ -59,15 +59,15 @@ export interface TableElementProps { } const StyledSpan = styled.span` - color: ${({ theme }) => theme.colors.primary.dark1}; + color: ${({ theme }) => theme.colorPrimaryText}; &:hover { - color: ${({ theme }) => theme.colors.primary.dark2}; + color: ${({ theme }) => theme.colorPrimaryTextHover}; } cursor: pointer; `; const Fade = styled.div` - transition: all ${({ theme }) => theme.transitionTiming}s; + transition: all ${({ theme }) => theme.motionDurationMid}; opacity: ${(props: { hovered: boolean }) => (props.hovered ? 1 : 0)}; `; @@ -75,7 +75,7 @@ const StyledCollapsePanel = styled(Collapse.Panel)` ${({ theme }) => css` & { .ws-el-controls { - margin-right: ${-theme.gridUnit}px; + margin-right: ${-theme.sizeUnit}px; display: flex; } @@ -89,7 +89,7 @@ const StyledCollapsePanel = styled(Collapse.Panel)` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - font-size: ${theme.typography.sizes.l}px; + font-size: ${theme.fontSizeLG}px; flex: 1; } @@ -97,7 +97,7 @@ const StyledCollapsePanel = styled(Collapse.Panel)` margin-left: auto; display: flex; align-items: center; - margin-right: ${theme.gridUnit * 8}px; + margin-right: ${theme.sizeUnit * 8}px; } } } @@ -269,12 +269,12 @@ const TableElement = ({ table, ...props }: TableElementProps) => { return ( diff --git a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx index 5ed54874e58..85b5a33bf56 100644 --- a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx +++ b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx @@ -86,9 +86,9 @@ const Title = styled.div` display: flex; flex-direction: row; align-items: center; - column-gap: ${({ theme }) => theme.gridUnit}px; - font-size: ${({ theme }) => theme.typography.sizes.l}px; - font-weight: ${({ theme }) => theme.typography.weights.bold}; + column-gap: ${({ theme }) => theme.sizeUnit}px; + font-size: ${({ theme }) => theme.fontSizeLG}px; + font-weight: ${({ theme }) => theme.fontWeightStrong}; `; const renderWell = (partitions: TableMetaData['partitions']) => { diff --git a/superset-frontend/src/SqlLab/constants.ts b/superset-frontend/src/SqlLab/constants.ts index 263635bb3b4..0b6118f1127 100644 --- a/superset-frontend/src/SqlLab/constants.ts +++ b/superset-frontend/src/SqlLab/constants.ts @@ -20,12 +20,12 @@ import { t } from '@superset-ui/core'; import type { Type } from 'src/components/Label'; export const STATE_TYPE_MAP: Record = { - offline: 'danger', - failed: 'danger', + offline: 'error', + failed: 'error', pending: 'info', fetching: 'info', running: 'warning', - stopped: 'danger', + stopped: 'error', success: 'success', }; diff --git a/superset-frontend/src/assets/images/chart.svg b/superset-frontend/src/assets/images/chart.svg index 34e45631e08..3ea5213f17b 100644 --- a/superset-frontend/src/assets/images/chart.svg +++ b/superset-frontend/src/assets/images/chart.svg @@ -17,6 +17,6 @@ specific language governing permissions and limitations under the License. --> - - + + diff --git a/superset-frontend/src/assets/images/document.svg b/superset-frontend/src/assets/images/document.svg index 552fc8d220b..e7ae6dbad6e 100644 --- a/superset-frontend/src/assets/images/document.svg +++ b/superset-frontend/src/assets/images/document.svg @@ -17,6 +17,6 @@ specific language governing permissions and limitations under the License. --> - + diff --git a/superset-frontend/src/assets/images/empty-charts.svg b/superset-frontend/src/assets/images/empty-charts.svg index 8c7b205d2a9..a56851af197 100644 --- a/superset-frontend/src/assets/images/empty-charts.svg +++ b/superset-frontend/src/assets/images/empty-charts.svg @@ -26,5 +26,5 @@ under the License. + fill="currentColor" fill-opacity="0.25" /> diff --git a/superset-frontend/src/assets/images/empty-dataset.svg b/superset-frontend/src/assets/images/empty-dataset.svg index 9a0299d3b42..7f1913a4d48 100644 --- a/superset-frontend/src/assets/images/empty-dataset.svg +++ b/superset-frontend/src/assets/images/empty-dataset.svg @@ -17,23 +17,14 @@ specific language governing permissions and limitations under the License. --> - - - - - - - - - + + + + + + + + + - - - - - - - - - diff --git a/superset-frontend/src/assets/images/empty-queries.svg b/superset-frontend/src/assets/images/empty-queries.svg index 1d2d8b00f22..1a7de1d16e7 100644 --- a/superset-frontend/src/assets/images/empty-queries.svg +++ b/superset-frontend/src/assets/images/empty-queries.svg @@ -23,13 +23,13 @@ under the License. - - + + - - + + diff --git a/superset-frontend/src/assets/images/empty-query.svg b/superset-frontend/src/assets/images/empty-query.svg index a19fc73eebf..68074bb78f4 100644 --- a/superset-frontend/src/assets/images/empty-query.svg +++ b/superset-frontend/src/assets/images/empty-query.svg @@ -17,9 +17,9 @@ specific language governing permissions and limitations under the License. --> - - - - - + + + + + diff --git a/superset-frontend/src/assets/images/empty-table.svg b/superset-frontend/src/assets/images/empty-table.svg index 9079b07114c..12a71ae097c 100644 --- a/superset-frontend/src/assets/images/empty-table.svg +++ b/superset-frontend/src/assets/images/empty-table.svg @@ -17,6 +17,6 @@ specific language governing permissions and limitations under the License. --> - - + + diff --git a/superset-frontend/src/assets/images/empty_sql_chart.svg b/superset-frontend/src/assets/images/empty_sql_chart.svg index b729b471a65..b6d0dd73791 100644 --- a/superset-frontend/src/assets/images/empty_sql_chart.svg +++ b/superset-frontend/src/assets/images/empty_sql_chart.svg @@ -17,6 +17,6 @@ specific language governing permissions and limitations under the License. --> - - + + diff --git a/superset-frontend/src/assets/images/filter-results.svg b/superset-frontend/src/assets/images/filter-results.svg index 7244f5538b2..424097d1f4f 100644 --- a/superset-frontend/src/assets/images/filter-results.svg +++ b/superset-frontend/src/assets/images/filter-results.svg @@ -36,7 +36,7 @@ under the License. height="9.44444" rx="0.5" fill="currentColor" - fill-opacity="0.5" + fill-opacity="0.25" stroke="currentColor" stroke-opacity="1" stroke-width="2" @@ -49,7 +49,7 @@ under the License. height="9.44444" rx="0.5" fill="currentColor" - fill-opacity="0.5" + fill-opacity="0.25" stroke="currentColor" stroke-opacity="1" stroke-width="2" @@ -62,7 +62,7 @@ under the License. height="9.44444" rx="0.5" fill="currentColor" - fill-opacity="0.5" + fill-opacity="0.25" stroke="currentColor" stroke-opacity="1" stroke-width="2" diff --git a/superset-frontend/src/assets/images/filter.svg b/superset-frontend/src/assets/images/filter.svg index 2e8c5e0f099..4145e5c2720 100644 --- a/superset-frontend/src/assets/images/filter.svg +++ b/superset-frontend/src/assets/images/filter.svg @@ -26,7 +26,7 @@ under the License. height="9.44444" rx="0.5" fill="currentColor" - fill-opacity="0.5" + fill-opacity="0.25" stroke="currentColor" stroke-opacity="1" stroke-width="1" @@ -38,7 +38,7 @@ under the License. height="9.44444" rx="0.5" fill="currentColor" - fill-opacity="0.5" + fill-opacity="0.25" stroke="currentColor" stroke-opacity="1" stroke-width="1" @@ -50,7 +50,7 @@ under the License. height="9.44444" rx="0.5" fill="currentColor" - fill-opacity="0.5" + fill-opacity="0.25" stroke="currentColor" stroke-opacity="1" stroke-width="1" diff --git a/superset-frontend/src/assets/images/icons/category.svg b/superset-frontend/src/assets/images/icons/category.svg index 6392c58b6e3..f2ae5f15b6e 100644 --- a/superset-frontend/src/assets/images/icons/category.svg +++ b/superset-frontend/src/assets/images/icons/category.svg @@ -18,5 +18,5 @@ under the License. --> - + diff --git a/superset-frontend/src/assets/images/union.svg b/superset-frontend/src/assets/images/union.svg index 9ccf437b225..64542bc720b 100644 --- a/superset-frontend/src/assets/images/union.svg +++ b/superset-frontend/src/assets/images/union.svg @@ -18,5 +18,4 @@ under the License. --> - diff --git a/superset-frontend/src/assets/stylesheets/antd/index.less b/superset-frontend/src/assets/stylesheets/antd/index.less index cf51b165eb9..ae9f0c1e6e6 100644 --- a/superset-frontend/src/assets/stylesheets/antd/index.less +++ b/superset-frontend/src/assets/stylesheets/antd/index.less @@ -10,30 +10,128 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and + * limitations under the License. */ +// @ant-prefix: antd4; -@import '~antd/lib/style/themes/index'; +// Core styles and dependencies +@import '~antd/lib/style/themes/default.less'; // Use default theme instead of index @import '~antd/lib/style/mixins/index'; -@import '~antd/lib/style/core/base'; +// Base styles with prefix +@import '~antd/lib/style/core/base'; @import '~antd/lib/style/core/iconfont'; @import '~antd/lib/style/core/motion'; + +// All component styles @import '~antd/lib/style/components.less'; + /* Theme variables here: https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less */ -@primary-color: #20a7c9; +/* Core Colors */ +@primary-color: #007aa0; @info-color: #66bcfe; -@success-color: #59c189; -@processing-color: #66bcfe; +@processing-color: #525252; +@success-color: #5ac189; @error-color: #e04355; @highlight-color: #e04355; -@normal-color: #d9d9d9; -@white: #fff; -@black: #000; +@normal-color: #d1d1d1; + +// Menu-related +@menu-highlight-color: #007aa0; +@menu-item-active-bg: ; +@menu-item-color: #004960; +@menu-popup-bg: #ffffff; +@menu-bg: #ffffff; + +@tabs-card-head-background: #ffffff; +@component-background: #ffffff; +@select-item-selected-bg: #cadfe0; +@select-item-active-bg: #cadfe0; +@select-item-hover-bg: #cadfe0; + +@item-hover-bg: #ffffff; +@menu-item-hover-bg: #ffffff; + +// GPT generated: + +/* Backgrounds */ +@layout-body-background: #f5f5f5; +@layout-header-background: #ffffff; +@layout-footer-background: #ffffff; +@layout-sider-background: #ffffff; +@background-color-light: #ffffff; +@background-color-base: #ffffff; +@background-elevated: #ffffff; + +/* Text */ +@text-color: rgba(0,0,0,0.88); +@text-color-secondary: rgba(0,0,0,0.65); +@text-color-tertiary: rgba(0,0,0,0.45); +@text-color-quaternary: rgba(0,0,0,0.25); +@heading-color: #ffffff; +@disabled-color: rgba(0,0,0,0.65); +@input-placeholder-color: rgba(0,0,0,0.65); + +/* Borders */ +@border-color-base: #d9d9d9; +@border-color-split: #f0f0f0; +@border-radius-base: 6; +@border-radius-sm: 4; +@border-radius-lg: 8; + +/* Buttons */ +@btn-primary-bg: #007aa0; +@btn-default-bg: #ffffff; +@btn-default-border: #d9d9d9; +@btn-danger-bg: #e04355; +@btn-danger-border: #e04355; + +/* Inputs */ +//@input-bg: ; +@input-border-color: #d9d9d9; +@input-hover-border-color: #3ca5ba; + +/* Menus */ +@menu-bg: #ffffff; +@menu-popup-bg: #ffffff; +@menu-item-color: rgba(0,0,0,0.88); +@menu-inline-submenu-bg: #ffffff; +@menu-highlight-color: rgba(0,0,0,0.88); +@menu-highlight-danger-color: #e04355; +@menu-item-active-bg: #007aa0; +@menu-item-active-danger-bg: #fff0f0; +@menu-item-group-title-color: rgba(0,0,0,0.88); + +/* Typography */ +@font-family: 'Inter', Helvetica, Arial; +@font-family-code: 'Fira Code', 'Courier New', monospace; +@font-size-base: 14px; +@font-size-sm: 12px; +@font-size-lg: 16px; +@line-height-base: 1.5714285714285714; +@line-height-sm: 1.6666666666666667; +@line-height-lg: 1.5; + +/* Tables */ +@table-header-bg: #ffffff; +@table-row-hover-bg: #ffffff; +@table-selected-row-bg: #cadfe0; + +/* Motion */ +@motion-duration-fast: 0.1s; +@motion-duration-mid: 0.2s; +@motion-duration-slow: 0.3s; +@motion-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1); +@motion-ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1); + +/* headers */ +@heading-color: rgba(0,0,0,0.88); +@collapse-header-bg: #ffffff; +@collapse-header-padding: 4px 4px; diff --git a/superset-frontend/src/assets/stylesheets/antd/index.less.hbs b/superset-frontend/src/assets/stylesheets/antd/index.less.hbs new file mode 100644 index 00000000000..616376c60f3 --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/antd/index.less.hbs @@ -0,0 +1,137 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and + * limitations under the License. + */ +// @ant-prefix: antd4; + +// Core styles and dependencies +@import '~antd/lib/style/themes/default.less'; // Use default theme instead of index +@import '~antd/lib/style/mixins/index'; + +// Base styles with prefix +@import '~antd/lib/style/core/base'; +@import '~antd/lib/style/core/iconfont'; +@import '~antd/lib/style/core/motion'; + +// All component styles +@import '~antd/lib/style/components.less'; + + +/* + Theme variables here: https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less +*/ +/* Core Colors */ +@primary-color: {{theme.colorPrimary}}; +@info-color: {{theme.colorInfo}}; +@processing-color: {{theme.colors.grayscale.dark2}}; +@success-color: {{theme.colorSuccess}}; +@error-color: {{theme.colorError}}; +@highlight-color: {{theme.colorError}}; +@normal-color: {{theme.colors.grayscale.light3}}; + +// Menu-related +@menu-highlight-color: {{theme.colorPrimary}}; +@menu-item-active-bg: {{theme.colorElevated}}; +@menu-item-color: {{theme.colors.primary.dark3}}; +@menu-popup-bg: {{theme.colorBgContainer}}; +@menu-bg: {{theme.colorBgContainer}}; + +@tabs-card-head-background: {{theme.colorBgElevated}}; +@component-background: {{theme.colorBgContainer}}; +@select-item-selected-bg: {{theme.colorPrimaryBg}}; +@select-item-active-bg: {{theme.colorPrimaryBg}}; +@select-item-hover-bg: {{theme.colorPrimaryBg}}; + +@item-hover-bg: {{theme.colorBgElevated}}; +@menu-item-hover-bg: {{theme.colorBgElevated}}; + +// GPT generated: + +/* Backgrounds */ +@layout-body-background: {{theme.colorBgLayout}}; +@layout-header-background: {{theme.colorBgContainer}}; +@layout-footer-background: {{theme.colorBgContainer}}; +@layout-sider-background: {{theme.colorBgContainer}}; +@background-color-light: {{theme.colorBgContainer}}; +@background-color-base: {{theme.colorBgContainer}}; +@background-elevated: {{theme.colorBgElevated}}; + +/* Text */ +@text-color: {{theme.colorText}}; +@text-color-secondary: {{theme.colorTextSecondary}}; +@text-color-tertiary: {{theme.colorTextTertiary}}; +@text-color-quaternary: {{theme.colorTextQuaternary}}; +@heading-color: {{theme.colorBgContainer}}; +@disabled-color: {{theme.colorTextSecondary}}; +@input-placeholder-color: {{theme.colorTextSecondary}}; + +/* Borders */ +@border-color-base: {{theme.colorBorder}}; +@border-color-split: {{theme.colorBorderSecondary}}; +@border-radius-base: {{theme.borderRadius}}; +@border-radius-sm: {{theme.borderRadiusSM}}; +@border-radius-lg: {{theme.borderRadiusLG}}; + +/* Buttons */ +@btn-primary-bg: {{theme.colorPrimary}}; +@btn-default-bg: {{theme.colorBgContainer}}; +@btn-default-border: {{theme.colorBorder}}; +@btn-danger-bg: {{theme.colorError}}; +@btn-danger-border: {{theme.colorError}}; + +/* Inputs */ +//@input-bg: {{theme.colorBgInput}}; +@input-border-color: {{theme.colorBorder}}; +@input-hover-border-color: {{theme.colorPrimaryBorderHover}}; + +/* Menus */ +@menu-bg: {{theme.colorBgContainer}}; +@menu-popup-bg: {{theme.colorBgContainer}}; +@menu-item-color: {{theme.colorText}}; +@menu-inline-submenu-bg: {{theme.colorBgContainer}}; +@menu-highlight-color: {{theme.colorText}}; +@menu-highlight-danger-color: {{theme.colorError}}; +@menu-item-active-bg: {{theme.colorPrimary}}; +@menu-item-active-danger-bg: {{theme.colorErrorBg}}; +@menu-item-group-title-color: {{theme.colorText}}; + +/* Typography */ +@font-family: {{theme.fontFamily}}; +@font-family-code: {{theme.fontFamilyCode}}; +@font-size-base: {{theme.fontSize}}px; +@font-size-sm: {{theme.fontSizeSM}}px; +@font-size-lg: {{theme.fontSizeLG}}px; +@line-height-base: {{theme.lineHeight}}; +@line-height-sm: {{theme.lineHeightSM}}; +@line-height-lg: {{theme.lineHeightLG}}; + +/* Tables */ +@table-header-bg: {{theme.colorBgContainer}}; +@table-row-hover-bg: {{theme.colorBgElevated}}; +@table-selected-row-bg: {{theme.colorPrimaryBg}}; + +/* Motion */ +@motion-duration-fast: {{theme.motionDurationFast}}; +@motion-duration-mid: {{theme.motionDurationMid}}; +@motion-duration-slow: {{theme.motionDurationSlow}}; +@motion-ease-out: {{theme.motionEaseOut}}; +@motion-ease-in-out: {{theme.motionEaseInOut}}; + +/* headers */ +@heading-color: {{theme.colorText}}; +@collapse-header-bg: {{theme.colorBgContainer}}; +@collapse-header-padding: {{theme.sizeUnit}}px {{theme.sizeUnit}}px; diff --git a/superset-frontend/src/assets/stylesheets/less/cosmo/bootswatch.less.hbs b/superset-frontend/src/assets/stylesheets/less/cosmo/bootswatch.less.hbs new file mode 100644 index 00000000000..c9ece15bb66 --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/less/cosmo/bootswatch.less.hbs @@ -0,0 +1,509 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +// Forked Cosmo 3.3.7 +// Bootswatch +// ----------------------------------------------------- + +// Navbar ===================================================================== + +.navbar { + border: none; + + li > a:focus { + outline: 0; + } + + &-inverse { + .badge { + background-color: @lightest; + color: @brand-primary; + } + } + + .caret { + display: inline-block; + padding: 0 5px 18px 5px; + } +} + +.navbar-inverse { + border: none; +} + +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + background: transparent; +} + +.navbar-nav > li > a { + padding-top: 18px; +} + +// Buttons ==================================================================== + +.btn:focus, +.btn:active:focus { + outline: none; +} + +.nav-tabs { + .dropdown-toggle.btn, + .btn-group.open .dropdown-toggle.btn { + &, + &:hover, + &:active, + &:focus { + border-color: transparent; + background-color: transparent; + box-shadow: none; + } + } +} + +.caret { + border: none; + color: @gray; + + &:hover { + color: @gray-darker; + } + + &:before { + font-family: 'FontAwesome'; + font-size: @font-size-xs; + content: '\f078'; + } +} + +// Typography ================================================================= + +body { + -webkit-font-smoothing: antialiased; +} + +.text-primary, +.text-primary:hover { + color: @brand-primary; +} + +.text-success, +.text-success:hover { + color: @success; +} + +.text-danger, +.text-danger:hover { + color: @brand-danger; +} + +.text-warning, +.text-warning:hover { + color: @brand-warning; +} + +.text-info, +.text-info:hover { + color: @brand-info; +} + +// Tables ===================================================================== + +table, +.table { + .dropdown-menu a { + text-decoration: none; + } + + .success, + .warning, + .danger, + .info { + color: @lightest; + + a { + color: @lightest; + } + + .btn-default { + color: @gray; + } + } +} + +// Forms ====================================================================== + +.form-control { + box-shadow: none; +} + +.has-warning { + .help-block, + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline, + &.radio label, + &.checkbox label, + &.radio-inline label, + &.checkbox-inline label, + .form-control-feedback { + color: @brand-warning; + } + + .form-control, + .form-control:focus, + .input-group-addon { + border: 1px solid @brand-warning; + } +} + +.has-error { + .help-block, + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline, + &.radio label, + &.checkbox label, + &.radio-inline label, + &.checkbox-inline label, + .form-control-feedback { + color: @brand-danger; + } + + .form-control, + .form-control:focus, + .input-group-addon { + border: 1px solid @brand-danger; + } +} + +.has-success { + .help-block, + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline, + &.radio label, + &.checkbox label, + &.radio-inline label, + &.checkbox-inline label, + .form-control-feedback { + color: @brand-success; + } + + .form-control, + .form-control:focus, + .input-group-addon { + border: 1px solid @brand-success; + } +} + +// Navs ======================================================================= + +.nav-pills { + & > li > a { + border-radius: @border-radius-normal; + } +} + +.dropdown-menu { + & > li > a:hover, + & > li > a:focus { + background-image: none; + text-decoration: none; + } +} + +// Indicators ================================================================= + +.close { + text-decoration: none; + text-shadow: none; + opacity: 0.4; + + &:hover, + &:focus { + opacity: 1; + } +} + +.alert { + border: none; +} + +.alert-link { + text-decoration: underline; +} + +.alert-info .alert-link { + color: @alert-info-text; +} + +.alert-danger .alert-link { + color: @alert-danger-text; +} + +.alert-warning .alert-link { + color: @alert-warning-text; +} + +.alert-success .alert-link { + color: @alert-success-text; +} + +.label { + border-radius: 21px; + padding: 0.35em 0.8em 0.35em; + font-weight: @font-weight-normal; + font-size: @font-size-s; +} +.label-default:hover { + background-color: darken(@label-default-bg, 5%); +} +.label-warning:hover { + background-color: darken(@label-warning-bg, 5%); +} +.label-danger:hover { + background-color: darken(@label-danger-bg, 5%); +} +.label-primary:hover { + background-color: darken(@label-primary-bg, 5%); +} + +label { + font-weight: @font-weight-normal; + font-size: @font-size-s; +} + +// Progress bars ============================================================== + +.progress { + height: 14px; + .box-shadow(none); + + .progress-bar { + font-size: @font-size-s; + line-height: @line-height-tight; + padding-top: 2px; + } +} + +// Containers ================================================================= + +.panel { + border: none; + + &-heading, + &-footer { + border-top-right-radius: 0; + border-top-left-radius: 0; + } + + &-default { + .panel-heading { + padding: 15px 15px 0 15px; + background-color: transparent; + } + + .panel-title { + color: @text-color; + padding-bottom: 5px; + border-bottom: 1px solid @gray-light; + + h1, + h2, + h3, + h4, + h5, + h6 { + margin: 10px 0 0 0; + font-weight: @font-weight-bold; + } + } + + .close { + color: @text-color; + } + } + + &-primary { + .panel-heading { + padding: 15px 15px 0 15px; + background-color: transparent; + } + + .panel-title { + color: @text-color; + padding-bottom: 5px; + border-bottom: 1px solid @gray-light; + + h1, + h2, + h3, + h4, + h5, + h6 { + margin: 10px 0 0 0; + font-weight: @font-weight-bold; + } + } + + .close { + color: @text-color; + } + } + + .accordion-toggle { + display: flex; + align-items: center; + text-decoration: none; + + &:hover { + text-decoration: none; + } + + .caret { + display: flex; + width: auto; + height: auto; + margin-left: 5px; + + &:hover { + color: @gray; + } + } + } +} + +.panel-title-large { + font-size: 24px; +} + +.list-group-item { + padding-top: 5px; + padding-bottom: 5px; +} + +a.list-group-item { + &-success { + &.active { + background-color: @state-success-bg; + } + + &.active:hover, + &.active:focus { + background-color: darken(@state-success-bg, 5%); + } + } + + &-warning { + &.active { + background-color: @state-warning-bg; + } + + &.active:hover, + &.active:focus { + background-color: darken(@state-warning-bg, 5%); + } + } + + &-danger { + &.active { + background-color: @state-danger-bg; + } + + &.active:hover, + &.active:focus { + background-color: darken(@state-danger-bg, 5%); + } + } +} + +.modal { + .close { + color: @text-color; + } +} + +.popover { + color: @text-color; +} + +// Tabs ============================================================== + +.nav-tabs > li > a { + border-top: 3px solid transparent; + color: @text-color; +} + +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + background-color: @lightest; + font-weight: @font-weight-bold; + border-top: 3px solid @brand-primary; +} + +// Tables ============================================================== + +.table { + .info { + color: @state-info-text; + } + + .danger { + color: @state-danger-text; + } + + .warning { + color: @state-warning-text; + } + + .success { + color: @state-success-text; + } +} + +// Utils ============================================================== +hr { + margin: 10px 0; +} + +// generate space-n classes for vertical spacing +.space-loop(@counter) when (@counter > 0) { + .space-loop((@counter - 1)); // next iteration + .space-@{counter} { + margin-bottom: (10px * @counter); // code for each iteration + } +} +.space-loop(6); + +a { + cursor: pointer; +} + +.control-label { + color: @gray; + font-size: @font-size-s; +} diff --git a/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less b/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less index a3c74f712cb..6fa2dc07ae0 100644 --- a/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less +++ b/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less @@ -24,7 +24,7 @@ // // ## Gray and brand colors for use across Bootstrap. -@gray-base: @darkest; // superset-var +@gray-base: #141414; // superset-var @gray-darker: lighten(@gray-base, 13.5%); @gray-dark: lighten(@gray-base, 20%); @bs-gray: lighten(@gray-base, 33.5%); @@ -42,9 +42,9 @@ // ## Settings for some of the most global styles. // ** Background color for ``. -@body-bg: @gray-bg; // superset-var +@body-bg: #ffffff; // ** Global text color on ``. -@text-color: @gray-dark; +@text-color: #3d3d3d; // ** Global textual link color. @link-color: @link; @@ -514,9 +514,9 @@ // ** Tooltip max width @tooltip-max-width: 200px; // ** Tooltip text color -@tooltip-color: @lightest; // superset-var +@tooltip-color: #858585; // superset-var // ** Tooltip background color -@tooltip-bg: @darkest; // superset-var +@tooltip-bg: rgba(0,0,0,0.88); @tooltip-opacity: 0.9; // ** Tooltip arrow width @@ -812,7 +812,7 @@ // // ## -@code-color: darken(@info, @colorstop-one); +@code-color: darken(@info, 10%); @code-bg: @gray-bg; // superset-var @kbd-color: @lightest; // superset-var diff --git a/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less.hbs b/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less.hbs new file mode 100644 index 00000000000..4ba7da9ce62 --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less.hbs @@ -0,0 +1,851 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +// Forked Cosmo 3.3.7 +// Variables +// -------------------------------------------------- + +// == Colors +// +// ## Gray and brand colors for use across Bootstrap. + +@gray-base: {{theme.colors.grayscale.dark5}}; // superset-var +@gray-darker: lighten(@gray-base, 13.5%); +@gray-dark: lighten(@gray-base, 20%); +@bs-gray: lighten(@gray-base, 33.5%); +@bs-gray-light: lighten(@gray-base, 60%); +@gray-lighter: lighten(@gray-base, 95%); + +@brand-primary: @primary-color; // superset-var +@brand-success: @success; // superset-var +@brand-info: @info; // superset-var +@brand-warning: @warning; // superset-var +@brand-danger: @danger; // superset-var + +// == Scaffolding +// +// ## Settings for some of the most global styles. + +// ** Background color for ``. +@body-bg: {{theme.colorBgContainer}}; +// ** Global text color on ``. +@text-color: {{theme.colors.grayscale.dark3}}; + +// ** Global textual link color. +@link-color: @link; +// ** Link hover color set via `darken()` function. +@link-hover-color: @link-hover; +// ** Link hover decoration. +@link-hover-decoration: underline; + +// == Typography +// +// ## Font, line-height, and color for body text, headings, and more. + +@font-size-large: ceil((@font-size-base * 1.25)); // ~18px +@font-size-small: ceil((@font-size-base * 0.85)); // ~12px + +@font-size-h1: floor((@font-size-base * 2.6)); // ~36px +@font-size-h2: floor((@font-size-base * 2.15)); // ~30px +@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px +@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px +@font-size-h5: @font-size-base; +@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px + +// ** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc. +@line-height-computed: floor((@font-size-base * @line-height-base)); + +// ** By default, this inherits from the ``. +@headings-font-family: @font-family-base; +@headings-font-weight: @font-weight-normal; // superset-var +@headings-line-height: @line-height-tight; +@headings-color: inherit; + +// == Iconography +// +// ## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower. + +// ** Load fonts from this directory. +@icon-font-path: '../fonts/'; +// ** File name for all font files. +@icon-font-name: 'glyphicons-halflings-regular'; +// ** Element ID within SVG icon file. +@icon-font-svg-id: 'glyphicons_halflingsregular'; + +// == Components +// +// ## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start). + +@padding-base-vertical: 6.5px; +@padding-base-horizontal: 18px; + +@padding-large-vertical: 18px; +@padding-large-horizontal: 30px; + +@padding-small-vertical: 5px; +@padding-small-horizontal: 10px; + +@padding-xs-vertical: 1px; +@padding-xs-horizontal: 5px; + +@line-height-large: 1.3333333; // extra decimals for Win 8.1 Chrome +@line-height-small: 1.5; + +@border-radius-base: @border-radius-normal; +@border-radius-large: 4px; +@border-radius-small: 4px; + +// ** Global color for active items (e.g., navs or dropdowns). +@component-active-color: @lightest; // superset-var +// ** Global background color for active items (e.g., navs or dropdowns). +@component-active-bg: @brand-primary; + +// ** Width of the `border` for generating carets that indicate dropdowns. +@caret-width-base: 4px; +// ** Carets increase slightly in size for larger components. +@caret-width-large: 5px; + +// == Tables +// +// ## Customizes the `.table` component with basic values, each used across all table variations. + +// ** Padding for ``s and ``s. +@table-cell-padding: 8px; +// ** Padding for cells in `.table-condensed`. +@table-condensed-cell-padding: 5px; + +// ** Default background color used for all tables. +@table-bg: transparent; +// ** Background color used for `.table-striped`. +@table-bg-accent: fade(@gray-bg, @opacity-medium-light); // superset-var +// ** Background color used for `.table-hover`. +@table-bg-hover: @gray-bg; // superset-var +@table-bg-active: @table-bg-hover; + +// ** Border color for table and cell borders. +@table-border-color: @gray-light; // superset-var + +// == Buttons +// +// ## For each of Bootstrap's buttons, define text, background and border color. + +@btn-font-weight: normal; + +@btn-primary-color: @lightest; +@btn-primary-bg: @brand-primary; +@btn-primary-border: @brand-primary; + +@btn-default-color: @bs-gray; +@btn-default-bg: @lightest; +@btn-default-border: @gray-light; + +@btn-success-color: @btn-primary-color; +@btn-success-bg: @brand-success; +@btn-success-border: @btn-success-bg; + +@btn-info-color: @btn-primary-color; +@btn-info-bg: @brand-info; +@btn-info-border: @btn-info-bg; + +@btn-warning-color: @btn-primary-color; +@btn-warning-bg: @brand-warning; +@btn-warning-border: @btn-warning-bg; + +@btn-danger-color: @btn-primary-color; +@btn-danger-bg: @brand-danger; +@btn-danger-border: @btn-danger-bg; + +@btn-link-disabled-color: @bs-gray-light; + +// Allows for customizing button radius independently from global border radius +@btn-border-radius-base: @border-radius-base; +@btn-border-radius-large: @border-radius-large; +@btn-border-radius-small: @border-radius-small; + +// == Forms +// +// ## + +// ** `` background color +@input-bg: @lightest; // superset-var +// ** `` background color +@input-bg-disabled: @gray-lighter; + +// ** Text color for ``s +@input-color: @text-color; +// ** `` border color +@input-border: @gray-light; // superset-var + +// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4 +// ** Default `.form-control` border radius +// This has no effect on ``s in CSS. +@input-border-radius: @border-radius-base; +// ** Large `.form-control` border radius +@input-border-radius-large: @border-radius-large; +// ** Small `.form-control` border radius +@input-border-radius-small: @border-radius-small; + +// ** Border color for inputs on focus +@input-border-focus: @indicator-color; // superset-var + +// ** Placeholder text color +@input-color-placeholder: @bs-gray-light; + +// ** Default `.form-control` height +@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); +// ** Large `.form-control` height +@input-height-large: ( + ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + + 2 +); +// ** Small `.form-control` height +@input-height-small: ( + floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + + 2 +); + +// ** `.form-group` margin +@form-group-margin-bottom: 16px; + +@legend-color: @text-color; +@legend-border-color: @gray-bg; + +// ** Background color for textual input addons +@input-group-addon-bg: @gray-lighter; +// ** Border color for textual input addons +@input-group-addon-border-color: @input-border; + +// ** Disabled cursor for form controls and buttons. +@cursor-disabled: not-allowed; + +// == Dropdowns +// +// ## Dropdown menu container and contents. + +// ** Background for the dropdown menu. +@dropdown-bg: @lightest; // superset-var +// ** Dropdown menu `border-color`. +@dropdown-border: fade(@darkest, @opacity-light); // superset-var +// ** Dropdown menu `border-color` **for IE8**. +@dropdown-fallback-border: @gray-light; // superset-var +// ** Divider color for between dropdown items. +@dropdown-divider-bg: @gray-bg; // superset-var + +// ** Dropdown link text color. +@dropdown-link-color: @gray-dark; +// ** Hover color for dropdown links. +@dropdown-link-hover-color: @lightest; // superset-var +// ** Hover background for dropdown links. +@dropdown-link-hover-bg: @component-active-bg; + +// ** Active dropdown menu item text color. +@dropdown-link-active-color: @lightest; // superset-var +// ** Active dropdown menu item background color. +@dropdown-link-active-bg: @component-active-bg; + +// ** Disabled dropdown menu item background color. +@dropdown-link-disabled-color: @bs-gray-light; + +// ** Text color for headers within dropdown menus. +@dropdown-header-color: @bs-gray-light; + +// ** Deprecated `@dropdown-caret-color` as of v3.1.0 +@dropdown-caret-color: @darkest; // superset-var + +//-- Z-index master list +// +// Warning: Avoid customizing these values. They're used for a bird's eye view +// of components dependent on the z-axis and are designed to all work together. +// +// Note: These variables are not generated into the Customizer. + +@zindex-navbar: 1000; +@zindex-dropdown: 1000; +@zindex-popover: 1060; +@zindex-tooltip: 1070; +@zindex-navbar-fixed: 1030; +@zindex-modal-background: 1040; +@zindex-modal: 1050; + +// == Media queries breakpoints +// +// ## Define the breakpoints at which your layout will change, adapting to different screen sizes. + +// Extra small screen / phone +// ** Deprecated `@screen-xs` as of v3.0.1 +@screen-xs: 480px; +// ** Deprecated `@screen-xs-min` as of v3.2.0 +@screen-xs-min: @screen-xs; +// ** Deprecated `@screen-phone` as of v3.0.1 +@screen-phone: @screen-xs-min; + +// Small screen / tablet +// ** Deprecated `@screen-sm` as of v3.0.1 +@screen-sm: 768px; +@screen-sm-min: @screen-sm; +// ** Deprecated `@screen-tablet` as of v3.0.1 +@screen-tablet: @screen-sm-min; + +// Medium screen / desktop +// ** Deprecated `@screen-md` as of v3.0.1 +@screen-md: 992px; +@screen-md-min: @screen-md; +// ** Deprecated `@screen-desktop` as of v3.0.1 +@screen-desktop: @screen-md-min; + +// Large screen / wide desktop +// ** Deprecated `@screen-lg` as of v3.0.1 +@screen-lg: 1200px; +@screen-lg-min: @screen-lg; +// ** Deprecated `@screen-lg-desktop` as of v3.0.1 +@screen-lg-desktop: @screen-lg-min; + +// So media queries don't overlap when required, provide a maximum +@screen-xs-max: (@screen-sm-min - 1); +@screen-sm-max: (@screen-md-min - 1); +@screen-md-max: (@screen-lg-min - 1); + +// == Grid system +// +// ## Define your custom responsive grid. + +// ** Number of columns in the grid. +@grid-columns: 12; +// ** Padding between columns. Gets divided in half for the left and right. +@grid-gutter-width: 20px; +// Navbar collapse +// ** Point at which the navbar becomes uncollapsed. +@grid-float-breakpoint: @screen-sm-min; +// ** Point at which the navbar begins collapsing. +@grid-float-breakpoint-max: (@grid-float-breakpoint - 1); + +// == Container sizes +// +// ## Define the maximum width of `.container` for different screen sizes. + +// Small screen / tablet +@container-tablet: (720px + @grid-gutter-width); +// ** For `@screen-sm-min` and up. +@container-sm: @container-tablet; + +// Medium screen / desktop +@container-desktop: (940px + @grid-gutter-width); +// ** For `@screen-md-min` and up. +@container-md: @container-desktop; + +// Large screen / wide desktop +@container-large-desktop: (1140px + @grid-gutter-width); +// ** For `@screen-lg-min` and up. +@container-lg: @container-large-desktop; + +// == Navbar +// +// ## + +// Basics of a navbar +@navbar-height: 50px; +@navbar-margin-bottom: @line-height-computed; +@navbar-border-radius: @border-radius-base; +@navbar-padding-horizontal: floor((@grid-gutter-width / 2)); +@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2); +@navbar-collapse-max-height: 340px; + +@navbar-default-color: @lightest; // superset-var +@navbar-default-bg: @gray-darker; +@navbar-default-border: darken(@navbar-default-bg, 6.5%); + +// Navbar links +@navbar-default-link-color: @lightest; // superset-var +@navbar-default-link-hover-color: @lightest; // superset-var +@navbar-default-link-hover-bg: darken(@navbar-default-bg, 10%); +@navbar-default-link-active-color: @navbar-default-link-hover-color; +@navbar-default-link-active-bg: @navbar-default-link-hover-bg; +@navbar-default-link-disabled-color: @gray-light; // superset-var +@navbar-default-link-disabled-bg: transparent; + +// Navbar brand label +@navbar-default-brand-color: @navbar-default-link-color; +@navbar-default-brand-hover-color: @lightest; // superset-var +@navbar-default-brand-hover-bg: none; + +// Navbar toggle +@navbar-default-toggle-hover-bg: @navbar-default-link-hover-bg; +@navbar-default-toggle-icon-bar-bg: @lightest; // superset-var +@navbar-default-toggle-border-color: transparent; + +// === Inverted navbar +// Reset inverted navbar basics +@navbar-inverse-color: @gray-dark; +@navbar-inverse-bg: @lightest; // superset-var +@navbar-inverse-border: transparent; + +// Inverted navbar links +@navbar-inverse-link-color: @gray-dark; +@navbar-inverse-link-hover-color: @gray-dark; +@navbar-inverse-link-hover-bg: darken(@navbar-inverse-bg, 10%); +@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color; +@navbar-inverse-link-active-bg: @navbar-inverse-link-hover-bg; +@navbar-inverse-link-disabled-color: @gray-lighter; +@navbar-inverse-link-disabled-bg: transparent; + +// Inverted navbar brand label +@navbar-inverse-brand-color: @navbar-inverse-link-color; +@navbar-inverse-brand-hover-color: @gray-darker; +@navbar-inverse-brand-hover-bg: none; + +// Inverted navbar toggle +@navbar-inverse-toggle-hover-bg: @navbar-inverse-link-hover-bg; +@navbar-inverse-toggle-icon-bar-bg: @lightest; // superset-var +@navbar-inverse-toggle-border-color: transparent; + +// == Navs +// +// ## + +// === Shared nav styles +@nav-link-padding: 10px 15px; +@nav-link-hover-bg: @gray-lighter; + +@nav-disabled-link-color: @bs-gray-light; +@nav-disabled-link-hover-color: @bs-gray-light; + +// == Tabs +@nav-tabs-border-color: @gray-light; // superset-var + +@nav-tabs-link-hover-border-color: @gray-lighter; + +@nav-tabs-active-link-hover-bg: @body-bg; +@nav-tabs-active-link-hover-color: @bs-gray; +@nav-tabs-active-link-hover-border-color: @gray-light; // superset-var + +@nav-tabs-justified-link-border-color: @gray-light; // superset-var +@nav-tabs-justified-active-link-border-color: @body-bg; + +// == Pills +@nav-pills-border-radius: @border-radius-base; +@nav-pills-active-link-hover-bg: @component-active-bg; +@nav-pills-active-link-hover-color: @component-active-color; + +// == Pagination +// +// ## + +@pagination-color: @link-color; +@pagination-bg: @lightest; // superset-var +@pagination-border: @gray-light; // superset-var + +@pagination-hover-color: @link-hover-color; +@pagination-hover-bg: @gray-lighter; +@pagination-hover-border: @gray-light; // superset-var + +@pagination-active-color: @bs-gray-light; +@pagination-active-bg: @gray-bg; // superset-var +@pagination-active-border: @gray-light; // superset-var + +@pagination-disabled-color: @bs-gray-light; +@pagination-disabled-bg: @lightest; // superset-var +@pagination-disabled-border: @gray-light; // superset-var + +// == Pager +// +// ## + +@pager-bg: @pagination-bg; +@pager-border: @pagination-border; +@pager-border-radius: @border-radius-base; + +@pager-hover-bg: @pagination-hover-bg; + +@pager-active-bg: @pagination-active-bg; +@pager-active-color: @pagination-active-color; + +@pager-disabled-color: @bs-gray-light; + +// == Jumbotron +// +// ## + +@jumbotron-padding: 30px; +@jumbotron-color: inherit; +@jumbotron-bg: @gray-lighter; +@jumbotron-heading-color: inherit; +@jumbotron-font-size: ceil((@font-size-base * 1.5)); +@jumbotron-heading-font-size: ceil((@font-size-base * 4.5)); + +// == Form states and alerts +// +// ## Define colors for form feedback states and, by default, alerts. + +@state-success-text: @success-dark2; +@state-success-bg: @success-light2; +@state-success-border: @success-light2; + +@state-info-text: @info-dark2; +@state-info-bg: @info-light2; +@state-info-border: @info-light2; + +@state-warning-text: @warning-dark2; +@state-warning-bg: @warning-light2; +@state-warning-border: @warning-light2; + +@state-danger-text: @danger-dark2; +@state-danger-bg: @danger-light2; +@state-danger-border: @danger-light2; + +// == Tooltips +// +// ## + +// ** Tooltip max width +@tooltip-max-width: 200px; +// ** Tooltip text color +@tooltip-color: {{ theme.colors.grayscale.light1}}; // superset-var +// ** Tooltip background color +@tooltip-bg: {{theme.colorText}}; +@tooltip-opacity: 0.9; + +// ** Tooltip arrow width +@tooltip-arrow-width: 5px; +// ** Tooltip arrow color +@tooltip-arrow-color: @tooltip-bg; + +// == Popovers +// +// ## + +// ** Popover body background color +@popover-bg: @lightest; // superset-var +// ** Popover maximum width +@popover-max-width: 276px; +// ** Popover border color +@popover-border-color: fade(@darkest, @opacity-light); // superset-var +// ** Popover fallback border color +@popover-fallback-border-color: @gray-light; // superset-var + +// ** Popover title background color +@popover-title-bg: darken(@popover-bg, 3%); + +// ** Popover arrow width +@popover-arrow-width: 10px; +// ** Popover arrow color +@popover-arrow-color: @popover-bg; + +// ** Popover outer arrow width +@popover-arrow-outer-width: (@popover-arrow-width + 1); +// ** Popover outer arrow color +@popover-arrow-outer-color: fadein(@popover-border-color, 5%); +// ** Popover outer arrow fallback color +@popover-arrow-outer-fallback-color: darken( + @popover-fallback-border-color, + 20% +); + +// == Labels +// +// ## + +// ** Default label background color +@label-default-bg: @bs-gray-light; +// ** Primary label background color +@label-primary-bg: @brand-primary; +// ** Success label background color +@label-success-bg: @brand-success; +// ** Info label background color +@label-info-bg: @brand-info; +// ** Warning label background color +@label-warning-bg: darken(@brand-warning, 6%); +// ** Danger label background color +@label-danger-bg: @brand-danger; + +// ** Default label text color +@label-color: @lightest; // superset-var +// ** Default text color of a linked label +@label-link-hover-color: @lightest; // superset-var + +// == Modals +// +// ## + +// ** Padding applied to the modal body +@modal-inner-padding: 20px; + +// ** Padding applied to the modal title +@modal-title-padding: 15px; +// ** Modal title line-height +@modal-title-line-height: @line-height-base; + +// ** Background color of modal content area +@modal-content-bg: @lightest; // superset-var +// ** Modal content border color +@modal-content-border-color: transparent; +// ** Modal content border color **for IE8** +@modal-content-fallback-border-color: @gray; // superset-var + +// ** Modal backdrop background color +@modal-backdrop-bg: @darkest; // superset-var +// ** Modal backdrop opacity +@modal-backdrop-opacity: 0.5; +// ** Modal header border color +@modal-header-border-color: @gray-bg; // superset-var +// ** Modal footer border color +@modal-footer-border-color: @modal-header-border-color; + +@modal-lg: 900px; +@modal-md: 600px; +@modal-sm: 300px; + +// == Alerts +// +// ## Define alert colors, border radius, and padding. + +@alert-padding: 15px; +@alert-border-radius: @border-radius-base; +@alert-link-font-weight: @font-weight-bold; + +@alert-success-bg: @state-success-bg; +@alert-success-text: @state-success-text; +@alert-success-border: @state-success-border; + +@alert-info-bg: @state-info-bg; +@alert-info-text: @state-info-text; +@alert-info-border: @state-info-border; + +@alert-warning-bg: @state-warning-bg; +@alert-warning-text: @state-warning-text; +@alert-warning-border: @state-warning-border; + +@alert-danger-bg: @state-danger-bg; +@alert-danger-text: @state-danger-text; +@alert-danger-border: @state-danger-border; + +// == Progress bars +// +// ## + +// ** Background color of the whole progress component +@progress-bg: @gray-light; // superset-var +// ** Progress bar text color +@progress-bar-color: @lightest; // superset-var +// ** Variable for setting rounded corners on progress bar. +@progress-border-radius: @border-radius-base; + +// ** Default progress bar color +@progress-bar-bg: @brand-primary; +// ** Success progress bar color +@progress-bar-success-bg: @brand-success; +// ** Warning progress bar color +@progress-bar-warning-bg: @brand-warning; +// ** Danger progress bar color +@progress-bar-danger-bg: @brand-danger; +// ** Info progress bar color +@progress-bar-info-bg: @brand-info; + +// == List group +// +// ## + +// ** Background color on `.list-group-item` +@list-group-bg: @lightest; // superset-var +// ** `.list-group-item` border color +@list-group-border: @gray-light; // superset-var +// ** List group border radius +@list-group-border-radius: @border-radius-base; + +// ** Background color of single list items on hover +@list-group-hover-bg: @gray-bg; // superset-var +// ** Text color of active list items +@list-group-active-color: @component-active-color; +// ** Background color of active list items +@list-group-active-bg: @component-active-bg; +// ** Border color of active list elements +@list-group-active-border: @list-group-border; +// ** Text color for content within active list items +@list-group-active-text-color: lighten(@list-group-active-bg, 40%); + +// ** Text color of disabled list items +@list-group-disabled-color: @bs-gray-light; +// ** Background color of disabled list items +@list-group-disabled-bg: @gray-lighter; +// ** Text color for content within disabled list items +@list-group-disabled-text-color: @list-group-disabled-color; + +@list-group-link-color: #555; +@list-group-link-hover-color: @list-group-link-color; +@list-group-link-heading-color: @almost-black; // superset-var + +// == Panels +// +// ## + +@panel-bg: @lightest; // superset-var +@panel-body-padding: 15px; +@panel-heading-padding: 10px 15px; +@panel-footer-padding: @panel-heading-padding; +@panel-border-radius: @border-radius-base; + +// ** Border color for elements within panels +@panel-inner-border: @gray-light; // superset-var +@panel-footer-bg: @gray-bg; // superset-var + +@panel-default-text: @gray-dark; +@panel-default-border: transparent; +@panel-default-heading-bg: @lightest; // superset-var + +@panel-primary-text: @lightest; // superset-var +@panel-primary-border: transparent; +@panel-primary-heading-bg: @brand-primary; + +@panel-success-text: @state-success-text; +@panel-success-border: transparent; +@panel-success-heading-bg: @state-success-bg; + +@panel-info-text: @state-info-text; +@panel-info-border: transparent; +@panel-info-heading-bg: @state-info-bg; + +@panel-warning-text: @state-warning-text; +@panel-warning-border: transparent; +@panel-warning-heading-bg: @state-warning-bg; + +@panel-danger-text: @state-danger-text; +@panel-danger-border: transparent; +@panel-danger-heading-bg: @state-danger-bg; + +// == Thumbnails +// +// ## + +// ** Padding around the thumbnail image +@thumbnail-padding: 4px; +// ** Thumbnail background color +@thumbnail-bg: @body-bg; +// ** Thumbnail border color +@thumbnail-border: @gray-light; // superset-var +// ** Thumbnail border radius +@thumbnail-border-radius: @border-radius-base; + +// ** Custom text color for thumbnail captions +@thumbnail-caption-color: @text-color; +// ** Padding around the thumbnail caption +@thumbnail-caption-padding: 9px; + +// == Wells +// +// ## + +@well-bg: @gray-bg; // superset-var +@well-border: darken(@well-bg, 7%); + +// == Badges +// +// ## + +@badge-color: @lightest; // superset-var +// ** Linked badge text color on hover +@badge-link-hover-color: @lightest; // superset-var +@badge-bg: @brand-primary; + +// ** Badge text color in active nav link +@badge-active-color: @link-color; +// ** Badge background color in active nav link +@badge-active-bg: @lightest; // superset-var + +@badge-font-weight: @font-weight-bold; +@badge-line-height: 1; +@badge-border-radius: 10px; + +// == Breadcrumbs +// +// ## + +@breadcrumb-padding-vertical: 8px; +@breadcrumb-padding-horizontal: 15px; +// ** Breadcrumb background color +@breadcrumb-bg: @gray-bg; // superset-var +// ** Breadcrumb text color +@breadcrumb-color: @gray-light; // superset-var +// ** Text color of current page in the breadcrumb +@breadcrumb-active-color: @bs-gray-light; +// ** Textual separator for between breadcrumb elements +@breadcrumb-separator: '/'; + +// == Carousel +// +// ## + +@carousel-text-shadow: 0 1px 2px fade(@darkest, @opacity-light); // superset-var + +@carousel-control-color: @lightest; // superset-var +@carousel-control-width: 15%; +@carousel-control-opacity: 0.5; +@carousel-control-font-size: 20px; + +@carousel-indicator-active-bg: @lightest; // superset-var +@carousel-indicator-border-color: @lightest; // superset-var + +@carousel-caption-color: @lightest; // superset-var + +// == Close +// +// ## + +@close-font-weight: @font-weight-bold; +@close-color: @lightest; // superset-var +@close-text-shadow: 0 1px 0 @lightest; // superset-var + +// == Code +// +// ## + +@code-color: darken(@info, 10%); +@code-bg: @gray-bg; // superset-var + +@kbd-color: @lightest; // superset-var +@kbd-bg: @almost-black; // superset-var + +@pre-bg: @gray-bg; // superset-var +@pre-color: @gray-dark; +@pre-border-color: @gray-light; // superset-var +@pre-scrollable-max-height: 340px; + +// == Type +// +// ## + +// ** Horizontal offset for forms and lists. +@component-offset-horizontal: 180px; +// ** Text muted color +@text-muted: @bs-gray-light; +// ** Abbreviations and acronyms border color +@abbr-border-color: @bs-gray-light; +// ** Headings small color +@headings-small-color: @bs-gray-light; +// ** Blockquote small color +@blockquote-small-color: @bs-gray-light; +// ** Blockquote font size +@blockquote-font-size: (@font-size-base * 1.25); +// ** Blockquote border color +@blockquote-border-color: @gray-lighter; +// ** Page header border color +@page-header-border-color: @gray-lighter; +// ** Width of horizontal description list titles +@dl-horizontal-offset: @component-offset-horizontal; +// ** Point at which .dl-horizontal becomes horizontal +@dl-horizontal-breakpoint: @grid-float-breakpoint; +// ** Horizontal line color. +@hr-border: @gray-lighter; diff --git a/superset-frontend/src/assets/stylesheets/less/fonts.less b/superset-frontend/src/assets/stylesheets/less/fonts.less index 5fb41d832ae..31eec2f516d 100644 --- a/superset-frontend/src/assets/stylesheets/less/fonts.less +++ b/superset-frontend/src/assets/stylesheets/less/fonts.less @@ -27,7 +27,6 @@ @import '~@fontsource/inter/500.css'; @import '~@fontsource/inter/600.css'; -/******************************* Fira Code ********************************/ @import '~@fontsource/fira-code/400.css'; @import '~@fontsource/fira-code/500.css'; @import '~@fontsource/fira-code/600.css'; diff --git a/superset-frontend/src/assets/stylesheets/less/fonts.less.hbs b/superset-frontend/src/assets/stylesheets/less/fonts.less.hbs new file mode 100644 index 00000000000..31eec2f516d --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/less/fonts.less.hbs @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/*************************************************************************/ +/* USAGE NOTES : Add font all licenses to LICENSE.text */ +/*************************************************************************/ + +/******************************* Inter UI ********************************/ +@import '~@fontsource/inter/200.css'; +@import '~@fontsource/inter/400.css'; +@import '~@fontsource/inter/500.css'; +@import '~@fontsource/inter/600.css'; + +@import '~@fontsource/fira-code/400.css'; +@import '~@fontsource/fira-code/500.css'; +@import '~@fontsource/fira-code/600.css'; diff --git a/superset-frontend/src/assets/stylesheets/less/index.less.hbs b/superset-frontend/src/assets/stylesheets/less/index.less.hbs new file mode 100644 index 00000000000..fc91c477dbe --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/less/index.less.hbs @@ -0,0 +1,47 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +// Index .less, any imports here will be included in the final css build + +@import '~bootstrap/less/bootstrap.less'; +@import './fonts.less'; +@import './variables.less'; +@import './cosmo/bootswatch.less'; + +html, +body { + font-size: @font-size-base; + line-height: @line-height-base; +} + +body { + min-height: 100vh; + display: flex; + flex-direction: column; +} + +header { + flex: 0 1 auto; +} + +#app { + flex: 1 1 auto; + position: relative; + display: flex; + flex-direction: column; +} diff --git a/superset-frontend/src/assets/stylesheets/less/variables.less b/superset-frontend/src/assets/stylesheets/less/variables.less index fe9b8987fd0..4423211c565 100644 --- a/superset-frontend/src/assets/stylesheets/less/variables.less +++ b/superset-frontend/src/assets/stylesheets/less/variables.less @@ -19,71 +19,73 @@ /************************************************************************/ /* COLORS */ -/* Please attempt to use and standardize on these colors, */ -/* rather than including specific color values in */ -/* component styles. This will allow us to more easily adjust theming */ /************************************************************************/ -@primary-color: #20a7c9; +@primary-color: #007aa0; @indicator-color: @primary-color; -@brand-primary-dark1: #1a85a0; -@brand-primary-dark2: #156378; -@brand-primary-light1: #79cade; -@brand-primary-light2: #a5dae9; -@brand-primary-light3: #d2edf4; -@brand-primary-light4: #e9f6f9; -@brand-primary-light5: #f3f8fa; +@brand-primary-dark1: #007aa0; +@brand-primary-dark2: #006280; +@brand-primary-light1: #3395b3; +@brand-primary-light2: #73b6cb; +@brand-primary-light3: #b3d7e3; +@brand-primary-light4: #e6f2f6; +@brand-primary-light5: #f2f8fa; -@brand-secondary: #444e7c; -@brand-secondary-dark1: #363e63; -@brand-secondary-dark2: #282e4a; -@brand-secondary-dark3: #1b1f31; -@brand-secondary-light1: #8e94b0; -@brand-secondary-light2: #b4b8ca; -@brand-secondary-light3: #d9dbe4; -@brand-secondary-light4: #eceef2; -@brand-secondary-light5: #f5f5f8; +@brand-secondary: #007aa0; +@brand-secondary-dark1: #007aa0; +@brand-secondary-dark2: #006280; +@brand-secondary-dark3: #004960; +@brand-secondary-light1: #3395b3; +@brand-secondary-light2: #73b6cb; +@brand-secondary-light3: #b3d7e3; +@brand-secondary-light4: #e6f2f6; +@brand-secondary-light5: #f2f8fa; -@almost-black: #263238; -@gray-dark: #484848; -@gray-light: #e0e0e0; -@gray-light5: #666666; -@gray: #879399; -@gray-bg: #f7f7f7; -@gray-heading: #a3a3a3; -@menu-hover: #f2f3f5; +// TODO line up with theme +@almost-black: #141414; +@gray-dark: #3d3d3d; +@gray-light: #f0f0f0; +@gray-light5: #f7f7f7; +@gray: #007aa0; +@gray-bg: #f0f0f0; +@gray-heading: rgba(0,0,0,0.88); +@menu-hover: rgba(0,0,0,0.88); @lightest: #ffffff; -@darkest: #000000; +@darkest: rgba(0,0,0,0.88); + +@body-bg: #ffffff; /**************************** text-specific *****************************/ -@link: #1985a0; -@link-hover: darken(@link, @colorstop-one); +@text-color: #000; +@heading-color: #000; +@link: #007aa0; +@link-hover: #006280; /***************************** status colors ****************************/ @info: #66bcfe; -@info-dark1: #4d8cbe; -@info-dark2: #315e7e; -@info-light1: #b3defe; -@info-light2: #eff8fe; +@info-dark1: #5ca9e5; +@info-dark2: #5296cb; +@info-light1: #85c9fe; +@info-light2: #abdafe; @danger: #e04355; -@danger-dark1: #a7323f; -@danger-dark2: #6f212a; -@danger-light1: #efa1aa; -@danger-light2: #faedee; +@danger-dark1: #ca3c4d; +@danger-dark2: #b33644; +@danger-light1: #e66977; +@danger-light2: #ee98a2; @success: #5ac189; -@success-dark1: #439066; -@success-dark2: #2b6144; -@success-light1: #ace1c4; -@success-light2: #eef8f3; +@success-dark1: #51ae7b; +@success-dark2: #489a6e; +@success-light1: #7bcda1; +@success-light2: #a4ddbe; @warning: #fcc700; -@warning-dark1: #bc9501; -@warning-dark2: #7d6300; -@warning-light1: #fde380; -@warning-light2: #fef9e6; +@warning-dark1: #e3b300; +@warning-dark2: #ca9f00; +@warning-light1: #fdd233; +@warning-light2: #fde073; /* general component effects */ @shadow-highlight: @primary-color; @@ -141,21 +143,18 @@ /* Commonly used font weights, line heights, etc. These should be the */ /* core values used to build more complex styles for headers, etc. */ /************************************************************************/ +@font-size-base: 14px; // Base `rem` units on this, as needed. -// *************************** Weights ********************************** -@font-weight-light: 200; +@font-weight-light: 300; @font-weight-normal: 400; @font-weight-bold: 600; -// ***************************** Font Sizes ***************************** -@font-size-base: 14px; // Base `rem` units on this, as needed. - -@font-size-xxs: 9px; -@font-size-xs: 10px; +@font-size-xxs: 7px; +@font-size-xs: 8px; @font-size-s: 12px; -@font-size-m: @font-size-base; +@font-size-m: 14px; @font-size-l: 16px; -@font-size-xl: 21px; +@font-size-xl: 20px; @font-size-xxl: 28px; // **************************** Line Heights **************************** @@ -184,16 +183,16 @@ } // ****************************** Families ****************************** + @font-family-sans-serif: 'Inter', Helvetica, Arial; -@font-family-serif: Georgia, 'Times New Roman', Times, serif; @font-family-monospace: 'Fira Code', 'Courier New', monospace; @font-family-base: @font-family-sans-serif; +@line-height-tight: 1; /************************************************************************/ /* TRANSITIONS */ -/* Timing and easings presets used in CSS transitions */ /************************************************************************/ -@timing-normal: 0.3s; +@timing-normal: 0.2s; /************************************************************************/ /* BORDER RADII */ diff --git a/superset-frontend/src/assets/stylesheets/less/variables.less.hbs b/superset-frontend/src/assets/stylesheets/less/variables.less.hbs new file mode 100644 index 00000000000..e6f7d0036a8 --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/less/variables.less.hbs @@ -0,0 +1,211 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/************************************************************************/ +/* COLORS */ +/************************************************************************/ + +@primary-color: {{theme.colorPrimary}}; +@indicator-color: @primary-color; + +@brand-primary-dark1: {{theme.colorPrimaryText}}; +@brand-primary-dark2: {{theme.colors.primary.dark2}}; +@brand-primary-light1: {{theme.colors.primary.light1}}; +@brand-primary-light2: {{theme.colors.primary.light2}}; +@brand-primary-light3: {{theme.colors.primary.light3}}; +@brand-primary-light4: {{theme.colors.primary.light4}}; +@brand-primary-light5: {{theme.colors.primary.light5}}; + +@brand-secondary: {{theme.colorPrimary}}; +@brand-secondary-dark1: {{theme.colorPrimaryText}}; +@brand-secondary-dark2: {{theme.colors.primary.dark2}}; +@brand-secondary-dark3: {{theme.colors.primary.dark3}}; +@brand-secondary-light1: {{theme.colors.primary.light1}}; +@brand-secondary-light2: {{theme.colors.primary.light2}}; +@brand-secondary-light3: {{theme.colors.primary.light3}}; +@brand-secondary-light4: {{theme.colors.primary.light4}}; +@brand-secondary-light5: {{theme.colors.primary.light5}}; + +// TODO line up with theme +@almost-black: {{theme.colors.grayscale.dark5}}; +@gray-dark: {{theme.colors.grayscale.dark3}}; +@gray-light: {{theme.colors.grayscale.light4}}; +@gray-light5: {{theme.colors.grayscale.light5}}; +@gray: {{theme.colorPrimary}}; +@gray-bg: {{theme.colors.grayscale.light4}}; +@gray-heading: {{theme.colorText}}; +@menu-hover: {{theme.colorText}}; +@lightest: {{theme.colorBgContainer}}; +@darkest: {{theme.colorText}}; + +@body-bg: {{theme.colorBgContainer}}; + +/**************************** text-specific *****************************/ +@text-color: {{theme.colorTextBase}}; +@heading-color: {{theme.colorTextBase}}; +@link: {{theme.colorPrimaryText}}; +@link-hover: {{theme.colors.primary.dark2}}; + +/***************************** status colors ****************************/ +@info: {{theme.colorInfo}}; +@info-dark1: {{theme.colors.info.dark1}}; +@info-dark2: {{theme.colors.info.dark2}}; +@info-light1: {{theme.colors.info.light1}}; +@info-light2: {{theme.colors.info.light2}}; + +@danger: {{theme.colorError}}; +@danger-dark1: {{theme.colors.error.dark1}}; +@danger-dark2: {{theme.colors.error.dark2}}; +@danger-light1: {{theme.colors.error.light1}}; +@danger-light2: {{theme.colors.error.light2}}; + +@success: {{theme.colorSuccess}}; +@success-dark1: {{theme.colors.success.dark1}}; +@success-dark2: {{theme.colors.success.dark2}}; +@success-light1: {{theme.colors.success.light1}}; +@success-light2: {{theme.colors.success.light2}}; + +@warning: {{theme.colorWarning}}; +@warning-dark1: {{theme.colors.warning.dark1}}; +@warning-dark2: {{theme.colors.warning.dark2}}; +@warning-light1: {{theme.colors.warning.light1}}; +@warning-light2: {{theme.colors.warning.light2}}; + +/* general component effects */ +@shadow-highlight: @primary-color; + +/************************************************************************/ +/* OPACITIES */ +/* Used in LESS filters, e.g. fade(@someColorVar, @someOpacityBelow) */ +/************************************************************************/ +@opacity-light: 10%; +@opacity-medium-light: 35%; +@opacity-medium-heavy: 60%; +@opacity-heavy: 80%; + +/************************************************************************/ +/* SHADES & TINTS */ +/* Used in LESS filters for shadint/tinting, */ +/* e.g. shade(@someColorVar, @colorstop-one) to darken */ +/* or tint(@someColorVar, @colorstop-one) to lighten */ +/************************************************************************/ +@colorstop-one: 20%; +@colorstop-two: 40%; +@colorstop-three: 60%; +@colorstop-four: 80%; + +/************************************************************************/ +/* LAYOUT */ +/* Widths and heights of things, that might be referred to often */ +/************************************************************************/ + +/* builder component pane */ +@builder-pane-width: 374px; + +/************************************************************************/ +/* Z-INDEX */ +/* Think of the site as "layers" rather than an arms race of numbers */ +/* Keep these to a minimum */ +/* Label semantic "layers" and add comments for usage notes */ +/* Use double dash modifiers to step up/down from a base layer */ +/* e.g. z-whatever--modifier */ +/************************************************************************/ + +/************************ toast messages, popovers **********************/ +@z-index-max: 3000; + +/***** filters, dashboard editor widgets, Explore reloading overlay *****/ +@z-index-dropdown: @z-index-above-dashboard-charts + 1; +@z-index-above-dashboard-charts: 10; + +/******************************** charts ********************************/ +@z-index-chart--dragging: @z-index-chart + 1; +@z-index-chart: 1; + +/************************************************************************/ +/* TYPOGRAPHY */ +/* Commonly used font weights, line heights, etc. These should be the */ +/* core values used to build more complex styles for headers, etc. */ +/************************************************************************/ +@font-size-base: 14px; // Base `rem` units on this, as needed. + +@font-weight-light: {{theme.fontWeightLight}}; +@font-weight-normal: {{theme.fontWeightNormal}}; +@font-weight-bold: {{theme.fontWeightStrong}}; + +@font-size-xxs: 7px; +@font-size-xs: 8px; +@font-size-s: {{theme.fontSizeSM}}px; +@font-size-m: {{theme.fontSize}}px; +@font-size-l: {{theme.fontSizeLG}}px; +@font-size-xl: {{theme.fontSizeXL}}px; +@font-size-xxl: 28px; + +// **************************** Line Heights **************************** +@line-height-base: 1.4; +// Ranged Sizes +@line-height-tight: 1; +@line-height-normal: @line-height-base; +@line-height-loose: 2; + +// ****************************** Features ******************************* +@use-ligatures: false; + +// setting up OTF settings based on @use-ligatures: +.set-otf-options(@use-ligatures); + +.set-otf-options(true) { + @font-feature-settings: + 'liga' on, + 'calt' on; +} + +.set-otf-options(false) { + @font-feature-settings: + 'liga' off, + 'calt' off; +} + +// ****************************** Families ****************************** + +@font-family-sans-serif: {{theme.fontFamily}}; +@font-family-monospace: {{theme.fontFamilyCode}}; +@font-family-base: @font-family-sans-serif; +@line-height-tight: 1; + +/************************************************************************/ +/* TRANSITIONS */ +/************************************************************************/ +@timing-normal: {{theme.motionDurationMid}}; + +/************************************************************************/ +/* BORDER RADII */ +/* Standard border-radius settings */ +/************************************************************************/ +@border-radius-normal: 4px; +@border-radius-large: (@border-radius-normal * 2); + +/************************************************************************/ +/* BOOTSTRAP/BOOTSWATCH/COSMO */ +/* These are the legacy Cosmo theme overrides to Bootswatch's */ +/* overrides to Bootstrap. We should consolidate/deprecate these */ +/* in favor of custom/reusable CSS wherever possible */ +/************************************************************************/ + +@import '../less/cosmo/variables.less'; diff --git a/superset-frontend/src/assets/stylesheets/reactable-pagination.less.hbs b/superset-frontend/src/assets/stylesheets/reactable-pagination.less.hbs new file mode 100644 index 00000000000..9b48d2143ab --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/reactable-pagination.less.hbs @@ -0,0 +1,61 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +@import './less/variables.less'; + +.reactable-pagination td { + padding: 15px 0 0 0 !important; +} + +.reactable-pagination a:focus { + text-decoration: none; + color: @gray-dark; + outline: 1; +} + +.reactable-page-button, +.reactable-next-page, +.reactable-previous-page { + background: @lightest; + border-radius: @border-radius-normal; + border: 1px solid @gray-light; + color: @gray-dark; + display: inline-block; + font-size: @font-size-s; + margin-right: 5px; + padding: 5px 10px; + text-align: center; + text-decoration: none; + vertical-align: middle; + white-space: nowrap; + + &:hover { + background-color: @gray-bg; + border-color: @gray; + color: @gray-dark; + text-decoration: none; + } +} + +.reactable-current-page { + border: 1px solid @gray-light; + color: @gray-dark; + font-weight: @font-weight-bold; + pointer-events: none; + opacity: 0.65; +} diff --git a/superset-frontend/src/assets/stylesheets/superset.less.hbs b/superset-frontend/src/assets/stylesheets/superset.less.hbs new file mode 100644 index 00000000000..7bf8c27fff6 --- /dev/null +++ b/superset-frontend/src/assets/stylesheets/superset.less.hbs @@ -0,0 +1,552 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +@import './less/index.less'; +@import './less/variables.less'; +@import './less/index.less'; + +@datasource-sql-expression-width: 315px; + +span, +div, +i { + &:focus { + outline: none; + } +} + +.alert.alert-danger > .debugger { + color: @danger; +} + +.no-wrap { + white-space: nowrap; +} + +input.form-control { + background-color: @lightest; +} + +.disabledButton { + pointer-events: none; +} + +.col-left-fixed { + width: 350px; + position: absolute; + float: left; +} + +.col-offset { + margin-left: 365px; +} + +.slice_description { + padding: 8px; + margin: 5px 0; + border: 1px solid @gray-light; + background-color: @gray-bg; + border-radius: @border-radius-large; + font-size: @font-size-s; +} + +.slice_info { + cursor: pointer; +} + +.padded { + padding: 10px; +} + +.intable-longtext { + max-height: 200px; + overflow: auto; +} + +.container-fluid { + text-align: left; + padding-left: 16px; + padding-right: 16px; +} + +input[type='checkbox'] { + display: inline-block; + width: 16px; + height: 16px; +} + +.widget-is-cached { + display: none; +} + +.header span.label { + margin-left: 5px; + margin-right: 5px; +} + +.notbtn { + cursor: default; + box-shadow: none; + border: 1px solid @gray; +} + +hr { + margin-top: 15px; + margin-bottom: 15px; +} + +span.title-block { + background-color: @gray-bg; + border-radius: @border-radius-large; + padding: 6px 12px; + margin: 0px 10px; + font-size: @font-size-xl; +} + +.nvtooltip { + table td { + font-size: @font-size-s !important; + } +} + +div.navbar { + .dropdown-menu .fineprint { + line-height: 1.5rem; + padding: 10px 20px 5px 20px; + color: @gray-light; + font-size: @font-size-m; + + div { + white-space: nowrap; + } + } +} + +.datasource { + form { + div.form-control, + input.form-control { + margin-bottom: 5px !important; + } + } + + .tooltip-inner { + max-width: 350px; + } +} + +img.viz-thumb-option { + width: 100px; + border: 1px solid @gray; + margin-right: 5px; + border-radius: @border-radius-large; +} + +.select2-drop.bigdrop .select2-results { + max-height: 700px; +} + +#is_cached { + display: none; +} + +.slice_container.faded { + opacity: 0.2; +} + +.navbar .alert { + padding: 5px 10px; + margin-top: 8px; + margin-bottom: 0; +} + +.table-condensed { + font-size: @font-size-s; +} + +.table-condensed input[type='checkbox'] { + float: left; +} + +table.table-no-hover tr:hover { + background-color: initial; +} + +.editable-title input { + outline: none; + background: transparent; + border: none; + box-shadow: none; + padding: 0; + cursor: initial; +} + +.editable-title textarea { + outline: none; + background: transparent; + box-shadow: none; + cursor: initial; + border: 1px solid @gray; + border-radius: @border-radius-normal; +} + +.editable-title input[type='text'] { + border: 1px solid @gray; + border-radius: @border-radius-normal; + padding: 2px; +} + +.editable-title.datasource-sql-expression { + font-feature-settings: @font-feature-settings; + font-family: @font-family-monospace; + display: inline-block; + min-width: @datasource-sql-expression-width; + width: 100%; +} + +.editable-title.datasource-sql-expression input { + width: 95%; + padding-bottom: 5px; +} + +.editable-title.datasource-sql-expression textarea { + min-height: 100px; + width: 95%; +} + +.editable-title input[type='button'] { + border-color: transparent; + background: transparent; + font-size: inherit; + white-space: normal; + text-align: left; + cursor: initial; +} + +.editable-title.editable-title--editable input[type='button'] { + cursor: pointer; +} + +.editable-title.editable-title--editing input[type='button'] { + cursor: text; +} + +.anchor-link-container { + position: absolute; + + .btn.btn-sm, + .btn.btn-sm:active { + border: none; + padding-top: 0; + padding-bottom: 0; + background: none; + box-shadow: none; + } + + .fa.fa-link { + position: relative; + top: 2px; + right: 0; + visibility: hidden; + font-size: @font-size-s; + text-align: center; + vertical-align: middle; + } +} + +.dashboard-component.dashboard-component-header .anchor-link-container { + .fa.fa-link { + font-size: @font-size-l; + } +} + +.dashboard-component.dashboard-component-header:hover { + .anchor-link-container { + cursor: pointer; + + .fa.fa-link { + visibility: visible; + } + } +} + +.m-r-5 { + margin-right: 5px; +} + +.m-r-3 { + margin-right: 3px; +} + +.m-t-4 { + margin-top: 4px; +} + +.m-t-5 { + margin-top: 5px; +} + +.m-t-10 { + margin-top: 10px; +} + +.m-t-20 { + margin-top: 20px; +} + +.m-b-10 { + margin-bottom: 10px; +} + +.m-l-2 { + margin-left: 2px; +} + +.m-l-4 { + margin-left: 4px; +} + +.m-l-5 { + margin-left: 5px; +} + +.m-l-10 { + margin-left: 10px; +} + +.m-l-25 { + margin-left: 25px; +} + +.p-l-0 { + padding-left: 0; +} + +.p-t-8 { + padding-top: 8; +} + +.p-r-2 { + padding-right: 2; +} + +.list-container { + position: relative; +} + +.list-search-container { + position: relative; +} + +.list-search-container .dropdown-toggle { + position: absolute; + top: -43px; + right: 25px; + border: 0; + padding: 0 18px; +} + +.list-search-container .fa-filter { + position: relative; + left: -8px; +} + +.list-search-container .dropdown-menu { + top: -19px; + right: 0; + left: auto; + float: none; +} + +.list-container .pagination-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: center; + padding-bottom: 20px; +} + +.list-container .pagination-container .pagination { + margin: 0 15px; +} + +.list-container .pagination-container strong { + margin-right: 5px; +} + +.list-container .list-add-action { + position: absolute; + top: -30px; + right: 15px; +} + +.list-container .form-actions-container { + padding: 0 0 20px 10px; + display: inline; +} + +.form-actions-container button { + display: flex; + + .caret { + margin: 0 8px; + } +} + +.list-container .filter-action { + margin: 10px 10px 0 10px; + padding-bottom: 15px; +} + +.list-add-action .btn.btn-sm { + padding: 6px 6px; + font-size: @font-size-xs; + line-height: 2px; + border-radius: 50%; + box-shadow: 2px 2px 4px -1px fade(@darkest, @opacity-light); + i { + width: 10px; + } +} + +iframe { + border: none; + width: 100%; +} + +.text-transparent { + color: transparent; +} + +.pointer { + cursor: pointer; +} + +.popover { + max-width: 500px; +} + +.float-left { + float: left; +} + +.float-right { + float: right; +} + +g.annotation-container { + line { + stroke: @brand-primary; + } + + rect.annotation { + stroke: @brand-primary; + fill-opacity: 0.1; + stroke-width: 1; + } +} + +.stroke-primary { + stroke: @brand-primary; +} + +.reactable-header-sortable { + position: relative; + padding-right: 40px; + + &::after { + font: normal normal normal 14px/1 FontAwesome; + content: '\f0dc'; + margin-left: 10px; + color: @brand-primary; + } +} + +.reactable-header-sort-asc::after { + content: '\f0de'; + color: @brand-primary; +} + +.reactable-header-sort-desc::after { + content: '\f0dd'; + color: @brand-primary; +} + +tr.reactable-column-header th.reactable-header-sortable { + padding-right: 17px; +} + +.align-right { + text-align: right; +} + +td.filtered { + background-color: lighten(desaturate(@brand-primary, 50%), 50%); +} + +.table-name { + font-size: @font-size-l; +} +.select2-container-multi { + width: 100% !important; +} + +/* +Hides the logo while loading the page. +Emotion styles will take care of the correct styling +*/ +.navbar-brand { + display: none; +} + +// Making native radio buttons use brand color +input[type='radio']:after { + width: 15px; + height: 15px; + border-radius: 15px; + top: -2px; + left: -1px; + position: relative; + background-color: #fff; + content: ''; + display: inline-block; + visibility: visible; + border: 2px solid @gray; +} + +input[type='radio']:checked:after { + width: 15px; + height: 15px; + border-radius: 15px; + top: -2px; + left: -1px; + position: relative; + background-color: #fff; + content: ''; + display: inline-block; + visibility: visible; + border: 5px solid @brand-primary; +} +hr { + border-top: 1px solid @gray-light; +} +.ace_gutter-cell.ace_error { + background-image: url('../images/icons/error_solid_small_red.svg') !important; + background-position: -2px center !important; +} diff --git a/superset-frontend/src/components/Alert/Alert.test.tsx b/superset-frontend/src/components/Alert/Alert.test.tsx deleted file mode 100644 index 51671a8644c..00000000000 --- a/superset-frontend/src/components/Alert/Alert.test.tsx +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import { - render, - screen, - userEvent, - waitFor, -} from 'spec/helpers/testing-library'; -import Alert, { AlertProps } from 'src/components/Alert'; - -type AlertType = Pick; -type AlertTypeValue = AlertType[keyof AlertType]; - -test('renders with default props', async () => { - render(); - - expect(screen.getByRole('alert')).toHaveTextContent('Message'); - expect(screen.getByRole('img', { name: 'info-circle' })).toBeInTheDocument(); -}); - -test('renders message for each alert type', () => { - const types: AlertTypeValue[] = ['info', 'error', 'warning', 'success']; - - types.forEach(type => { - const { rerender } = render(); - expect(screen.getByText('Test message')).toBeInTheDocument(); - rerender(<>); // Clean up between renders - }); -}); - -test('renders without close button', async () => { - render(); - await waitFor(() => { - expect(screen.queryByLabelText('close icon')).not.toBeInTheDocument(); - }); -}); - -test('disappear when closed', async () => { - render(); - userEvent.click(screen.getByRole('img', { name: 'close' })); - await waitFor(() => { - expect(screen.queryByRole('alert')).not.toBeInTheDocument(); - }); -}); - -test('renders without icon', async () => { - render(); - await waitFor(() => { - expect(screen.queryByLabelText('info icon')).not.toBeInTheDocument(); - }); -}); - -test('renders message and description', async () => { - render(); - const alert = await screen.findByRole('alert'); - expect(alert).toHaveTextContent('Message'); - expect(alert).toHaveTextContent('Description'); -}); - -test('calls onClose callback when closed', () => { - const onCloseMock = jest.fn(); - render(); - userEvent.click(screen.getByRole('img', { name: 'close' })); - expect(onCloseMock).toHaveBeenCalledTimes(1); -}); diff --git a/superset-frontend/src/components/AntdThemeProvider/index.tsx b/superset-frontend/src/components/AntdThemeProvider/index.tsx index 28ddcabf34a..beff6d0d41f 100644 --- a/superset-frontend/src/components/AntdThemeProvider/index.tsx +++ b/superset-frontend/src/components/AntdThemeProvider/index.tsx @@ -18,18 +18,12 @@ */ import { ConfigProvider, type ConfigProviderProps } from 'antd-v5'; -import { getTheme, ThemeType } from 'src/theme/index'; export const AntdThemeProvider = ({ - theme, children, ...rest }: ConfigProviderProps) => ( - + {children} ); diff --git a/superset-frontend/src/components/AsyncAceEditor/index.tsx b/superset-frontend/src/components/AsyncAceEditor/index.tsx index a45d04ef5aa..2b7b9dbd7a5 100644 --- a/superset-frontend/src/components/AsyncAceEditor/index.tsx +++ b/superset-frontend/src/components/AsyncAceEditor/index.tsx @@ -191,44 +191,47 @@ export default function AsyncAceEditor( <> .ant-tag { diff --git a/superset-frontend/src/components/AsyncEsmComponent/index.tsx b/superset-frontend/src/components/AsyncEsmComponent/index.tsx index 06ac5ef10ff..220c513f4de 100644 --- a/superset-frontend/src/components/AsyncEsmComponent/index.tsx +++ b/superset-frontend/src/components/AsyncEsmComponent/index.tsx @@ -128,6 +128,7 @@ export default function AsyncEsmComponent< const Component = component || placeholder; return Component ? ( // placeholder does not get the ref + // @ts-ignore: Suppress TypeScript error for ref assignment ) : null; }); diff --git a/superset-frontend/src/components/Badge/index.tsx b/superset-frontend/src/components/Badge/index.tsx index 463884e5075..171229f6010 100644 --- a/superset-frontend/src/components/Badge/index.tsx +++ b/superset-frontend/src/components/Badge/index.tsx @@ -27,9 +27,7 @@ const Badge = styled((props: AntdBadgeProps) => )` & > sup, & > sup.antd5-badge-count { ${ - count !== undefined - ? `background: ${color || theme.colors.primary.base};` - : '' + count !== undefined ? `background: ${color || theme.colorPrimary};` : '' } } `} diff --git a/superset-frontend/src/components/Button/Button.stories.tsx b/superset-frontend/src/components/Button/Button.stories.tsx index 800d5af104d..a41a0d2ba80 100644 --- a/superset-frontend/src/components/Button/Button.stories.tsx +++ b/superset-frontend/src/components/Button/Button.stories.tsx @@ -32,13 +32,9 @@ export default { const buttonStyles: ButtonStyleValue[] = [ 'primary', 'secondary', - 'tertiary', 'dashed', 'danger', - 'warning', - 'success', 'link', - 'default', ]; const buttonSizes: ButtonSizeValue[] = ['xsmall', 'small', 'default']; diff --git a/superset-frontend/src/components/Button/index.tsx b/superset-frontend/src/components/Button/index.tsx index aa447e13bcf..6889e851835 100644 --- a/superset-frontend/src/components/Button/index.tsx +++ b/superset-frontend/src/components/Button/index.tsx @@ -24,23 +24,23 @@ import { MouseEventHandler, } from 'react'; -import { mix } from 'polished'; import cx from 'classnames'; import { Button as AntdButton } from 'antd-v5'; import { useTheme } from '@superset-ui/core'; import { Tooltip, TooltipProps } from 'src/components/Tooltip'; -import { ButtonProps as AntdButtonProps } from 'antd-v5/lib/button'; +import { + ButtonProps as AntdButtonProps, + ButtonType, + ButtonVariantType, + ButtonColorType, +} from 'antd-v5/lib/button'; export type OnClickHandler = MouseEventHandler; export type ButtonStyle = | 'primary' | 'secondary' - | 'tertiary' - | 'success' - | 'warning' | 'danger' - | 'default' | 'link' | 'dashed'; @@ -56,25 +56,6 @@ export type ButtonProps = Omit & showMarginRight?: boolean; }; -const decideType = (buttonStyle: ButtonStyle) => { - const typeMap: Record< - ButtonStyle, - 'primary' | 'default' | 'dashed' | 'link' - > = { - primary: 'primary', - danger: 'primary', - warning: 'primary', - success: 'primary', - secondary: 'default', - default: 'default', - tertiary: 'default', - dashed: 'dashed', - link: 'link', - }; - - return typeMap[buttonStyle]; -}; - export default function Button(props: ButtonProps) { const { tooltip, @@ -91,8 +72,7 @@ export default function Button(props: ButtonProps) { } = props; const theme = useTheme(); - const { colors, transitionTiming, borderRadius, typography } = theme; - const { primary, grayscale, success, warning } = colors; + const { fontSizeSM, fontWeightStrong } = theme; let height = 32; let padding = 18; @@ -103,48 +83,27 @@ export default function Button(props: ButtonProps) { height = 30; padding = 10; } + if (buttonStyle === 'link') { + padding = 4; + } - let backgroundColor; - let backgroundColorHover; - let backgroundColorActive; - let backgroundColorDisabled = grayscale.light2; - let color; - let colorHover; - let borderWidth = 0; - let borderStyle = 'none'; - let borderColor; - let borderColorHover; - let borderColorDisabled = 'transparent'; + let antdType: ButtonType = 'default'; + let variant: ButtonVariantType = 'solid'; + let color: ButtonColorType = 'primary'; - if (buttonStyle === 'tertiary' || buttonStyle === 'dashed') { - backgroundColor = grayscale.light5; - backgroundColorHover = grayscale.light5; - backgroundColorActive = grayscale.light5; - backgroundColorDisabled = grayscale.light5; - borderWidth = 1; - borderStyle = buttonStyle === 'dashed' ? 'dashed' : 'solid'; - borderColor = primary.dark1; - borderColorHover = primary.light1; - borderColorDisabled = grayscale.light2; + if (!buttonStyle || buttonStyle === 'primary') { + variant = 'solid'; + } else if (buttonStyle === 'secondary') { + variant = 'outlined'; + color = 'default'; + } else if (buttonStyle === 'dashed') { + color = 'primary'; + variant = 'dashed'; } else if (buttonStyle === 'danger') { - colorHover = color; - } else if (buttonStyle === 'warning') { - backgroundColor = warning.base; - backgroundColorHover = mix(0.1, grayscale.dark2, warning.base); - backgroundColorActive = mix(0.2, grayscale.dark2, warning.base); - color = grayscale.light5; - colorHover = color; - } else if (buttonStyle === 'success') { - backgroundColor = success.base; - backgroundColorHover = mix(0.1, grayscale.light5, success.base); - backgroundColorActive = mix(0.2, grayscale.dark2, success.base); - color = grayscale.light5; - colorHover = color; + color = 'danger'; } else if (buttonStyle === 'link') { - backgroundColor = 'transparent'; - backgroundColorHover = 'transparent'; - backgroundColorActive = 'transparent'; - color = primary.dark1; + variant = 'link'; + antdType = 'default'; } const element = children as ReactElement; @@ -156,16 +115,18 @@ export default function Button(props: ButtonProps) { renderedChildren = Children.toArray(children); } const firstChildMargin = - showMarginRight && renderedChildren.length > 1 ? theme.gridUnit * 2 : 0; + showMarginRight && renderedChildren.length > 1 ? theme.sizeUnit * 2 : 0; - const effectiveButtonStyle: ButtonStyle = buttonStyle ?? 'default'; + const effectiveButtonStyle: ButtonStyle = buttonStyle ?? 'primary'; const button = ( span > :first-of-type': { marginRight: firstChildMargin, @@ -245,7 +170,7 @@ export default function Button(props: ButtonProps) { css={{ cursor: 'not-allowed', '& > .superset-button': { - marginLeft: theme.gridUnit * 2, + marginLeft: theme.sizeUnit * 2, }, }} > diff --git a/superset-frontend/src/components/Card/index.tsx b/superset-frontend/src/components/Card/index.tsx index 855f50c273f..f15530770d7 100644 --- a/superset-frontend/src/components/Card/index.tsx +++ b/superset-frontend/src/components/Card/index.tsx @@ -28,10 +28,8 @@ const Card = ({ padded, ...props }: CardProps) => ( ({ - // 'border-radius': `${theme.gridUnit}px`, - border: `1px solid ${theme.colors.grayscale.light2}`, '.antd5-card-body': { - padding: padded ? theme.gridUnit * 4 : theme.gridUnit, + padding: padded ? theme.sizeUnit * 4 : theme.sizeUnit, }, })} /> diff --git a/superset-frontend/src/components/CertifiedBadge/index.tsx b/superset-frontend/src/components/CertifiedBadge/index.tsx index 65179d046ea..5dc5ded10f3 100644 --- a/superset-frontend/src/components/CertifiedBadge/index.tsx +++ b/superset-frontend/src/components/CertifiedBadge/index.tsx @@ -47,7 +47,7 @@ function CertifiedBadge({ } > - + ); } diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx index 94f521bcd1f..dd618304784 100644 --- a/superset-frontend/src/components/Chart/Chart.tsx +++ b/superset-frontend/src/components/Chart/Chart.tsx @@ -136,7 +136,7 @@ const Styles = styled.div<{ height: number; width?: number }>` .chart-tooltip { opacity: 0.75; - font-size: ${({ theme }) => theme.typography.sizes.s}px; + font-size: ${({ theme }) => theme.fontSizeSM}px; } .slice_container { @@ -151,7 +151,7 @@ const Styles = styled.div<{ height: number; width?: number }>` } .alert { - margin: ${({ theme }) => theme.gridUnit * 2}px; + margin: ${({ theme }) => theme.sizeUnit * 2}px; } } `; @@ -167,7 +167,7 @@ const LoadingDiv = styled.div` const MessageSpan = styled.span` display: block; text-align: center; - margin: ${({ theme }) => theme.gridUnit * 4}px auto; + margin: ${({ theme }) => theme.sizeUnit * 4}px auto; width: fit-content; color: ${({ theme }) => theme.colors.grayscale.base}; `; diff --git a/superset-frontend/src/components/Chart/ChartRenderer.jsx b/superset-frontend/src/components/Chart/ChartRenderer.jsx index 25fc045d210..302f98bd455 100644 --- a/superset-frontend/src/components/Chart/ChartRenderer.jsx +++ b/superset-frontend/src/components/Chart/ChartRenderer.jsx @@ -316,7 +316,7 @@ class ChartRenderer extends Component { ); } else { noResultsComponent = ( - + ); } diff --git a/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx b/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx index 33eb6621145..f66580d7429 100644 --- a/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx +++ b/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx @@ -33,8 +33,8 @@ export const MenuItemTooltip = ({ css` - color: ${color || theme.colors.text.label}; - margin-left: ${theme.gridUnit * 2}px; + color: ${color || theme.colorTextLabel}; + margin-left: ${theme.sizeUnit * 2}px; &.anticon { font-size: unset; .anticon { diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx index b054ff02d62..8f132dd52f5 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx @@ -291,12 +291,7 @@ export const DrillByMenuItems = ({ {showSearch && ( - } + prefix={} onChange={e => { e.stopPropagation(); handleInput(e.target.value); @@ -310,7 +305,7 @@ export const DrillByMenuItems = ({ css={css` width: auto; max-width: 100%; - margin: ${theme.gridUnit * 2}px ${theme.gridUnit * 3}px; + margin: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 3}px; box-shadow: none; `} value={searchInput} @@ -319,7 +314,7 @@ export const DrillByMenuItems = ({ {isLoadingColumns ? (
diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx index d7b2c91ec2f..b85ed36e8df 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx @@ -137,7 +137,7 @@ const ModalFooter = ({ formData, closeModal }: ModalFooterProps) => { onClick={closeModal} data-test="close-drill-by-modal" css={css` - margin-left: ${theme.gridUnit * 2}px; + margin-left: ${theme.sizeUnit * 2}px; `} > {t('Close')} @@ -440,8 +440,8 @@ export default function DrillByModal({ responsive resizable resizableConfig={{ - minHeight: theme.gridUnit * 128, - minWidth: theme.gridUnit * 128, + minHeight: theme.sizeUnit * 128, + minWidth: theme.sizeUnit * 128, defaultSize: { width: 'auto', height: '80vh', diff --git a/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx b/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx index 12d186a25f4..addd4fd1c58 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx @@ -31,7 +31,7 @@ export const useDisplayModeToggle = () => { () => (
css` - margin-bottom: ${theme.gridUnit * 6}px; + margin-bottom: ${theme.sizeUnit * 6}px; `} data-test="drill-by-display-toggle" > diff --git a/superset-frontend/src/components/Chart/DrillBy/useDrillByBreadcrumbs.tsx b/superset-frontend/src/components/Chart/DrillBy/useDrillByBreadcrumbs.tsx index c815f4b5653..66f23249f48 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useDrillByBreadcrumbs.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useDrillByBreadcrumbs.tsx @@ -41,12 +41,12 @@ const BreadcrumbItem = styled(AntdBreadcrumb.Item)<{ ${({ theme, isClickable, isHidden }) => css` cursor: ${isClickable ? 'pointer' : 'auto'}; color: ${theme.colors.grayscale.light1}; - transition: color ease-in ${theme.transitionTiming}s; + transition: color ease-in ${theme.motionDurationMid}; .ant-breadcrumb > span:last-child > & { - color: ${theme.colors.grayscale.dark1}; + color: ${theme.colorText}; } &:hover { - color: ${isClickable ? theme.colors.grayscale.dark1 : 'inherit'}; + color: ${isClickable ? theme.colorText : 'inherit'}; } visibility: ${isHidden ? 'hidden' : 'visible'}; `} @@ -78,7 +78,7 @@ export const useDrillByBreadcrumbs = ( return ( css` - margin: ${theme.gridUnit * 2}px 0 ${theme.gridUnit * 4}px; + margin: ${theme.sizeUnit * 2}px 0 ${theme.sizeUnit * 4}px; `} > {breadcrumbsData diff --git a/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx b/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx index 4d85f949b29..5b01a5fad6a 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx @@ -25,7 +25,7 @@ const DATA_SIZE = 15; const PaginationContainer = styled.div` ${({ theme }) => css` & .pagination-container { - bottom: ${-theme.gridUnit * 4}px; + bottom: ${-theme.sizeUnit * 4}px; } `} `; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx index aae82d8309c..1059fc89517 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx @@ -96,8 +96,8 @@ const Filter = ({ const StyledFilter = styled(Filter)` ${({ theme }) => ` - font-weight: ${theme.typography.weights.bold}; - color: ${theme.colors.primary.base}; + font-weight: ${theme.fontWeightStrong}; + color: ${theme.colorPrimary}; `} `; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx index fa8f22262cb..240acdc45c6 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx @@ -69,7 +69,7 @@ const ModalFooter = ({ onClick={closeModal} data-test="close-drilltodetail-modal" css={css` - margin-left: ${theme.gridUnit * 2}px; + margin-left: ${theme.sizeUnit * 2}px; `} > {t('Close')} @@ -130,8 +130,8 @@ export default function DrillDetailModal({ responsive resizable resizableConfig={{ - minHeight: theme.gridUnit * 128, - minWidth: theme.gridUnit * 128, + minHeight: theme.sizeUnit * 128, + minWidth: theme.sizeUnit * 128, defaultSize: { width: 'auto', height: '75vh', diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx index 82780e36860..c26edd1a332 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx @@ -278,7 +278,7 @@ export default function DrillDetailPane({ tableContent = (
         {responseError}
diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx
index 378f9e80999..a56cafd9213 100644
--- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx
+++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx
@@ -83,8 +83,8 @@ export default function TableControls({
       css={css`
         display: flex;
         justify-content: space-between;
-        padding: ${theme.gridUnit / 2}px 0;
-        margin-bottom: ${theme.gridUnit * 2}px;
+        padding: ${theme.sizeUnit / 2}px 0;
+        margin-bottom: ${theme.sizeUnit * 2}px;
       `}
     >
       
{colName} diff --git a/superset-frontend/src/components/Checkbox/CheckboxIcons.tsx b/superset-frontend/src/components/Checkbox/CheckboxIcons.tsx index 2ad2d0f8d83..9eb1bc5d5ea 100644 --- a/superset-frontend/src/components/Checkbox/CheckboxIcons.tsx +++ b/superset-frontend/src/components/Checkbox/CheckboxIcons.tsx @@ -30,7 +30,7 @@ export const CheckboxChecked = () => { > { - beforeAll(() => { - jest.setTimeout(30000); - }); +function renderCollapse(props?: CollapseProps) { + return render( + + + Content 1 + + + Content 2 + + , + ); +} - afterEach(async () => { - cleanup(); - await new Promise(resolve => setTimeout(resolve, 0)); - }); +test('renders collapsed with default props', () => { + renderCollapse(); - function renderCollapse(props?: CollapseProps) { - return render( - - - Content 1 - - - Content 2 - - , - ); - } + const headers = screen.getAllByRole('button'); - test('renders collapsed with default props', async () => { - const { unmount } = renderCollapse(); - const headers = screen.getAllByRole('button'); - - expect(headers[0]).toHaveTextContent('Header 1'); - expect(headers[1]).toHaveTextContent('Header 2'); - expect(screen.queryByText('Content 1')).not.toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - - unmount(); - }); - - test('renders with one item expanded by default', async () => { - const { unmount } = renderCollapse({ defaultActiveKey: ['1'] }); - const headers = screen.getAllByRole('button'); - - expect(headers[0]).toHaveTextContent('Header 1'); - expect(headers[1]).toHaveTextContent('Header 2'); - expect(screen.getByText('Content 1')).toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - - unmount(); - }); - - test('expands on click without waitFor', async () => { - const { unmount } = renderCollapse(); - - expect(screen.queryByText('Content 1')).not.toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - - await userEvent.click(screen.getAllByRole('button')[0]); - - expect(screen.getByText('Content 1')).toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - - unmount(); - }); - - test('expands on click with waitFor', async () => { - const { unmount } = renderCollapse(); - - await waitFor(() => { - expect(screen.queryByText('Content 1')).not.toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - }); - - await userEvent.click(screen.getAllByRole('button')[0]); - - await waitFor(() => { - expect(screen.getByText('Content 1')).toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - }); - - unmount(); - }); - - // Update other tests similarly with waitFor - test('collapses on click', async () => { - const { unmount } = renderCollapse({ defaultActiveKey: ['1'] }); - - expect(screen.getByText('Content 1')).toBeInTheDocument(); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - - await userEvent.click(screen.getAllByRole('button')[0]); - - expect(screen.getByText('Content 1').parentNode).toHaveClass( - 'ant-collapse-content-hidden', - ); - expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); - - unmount(); - }); + expect(headers[0]).toHaveTextContent('Header 1'); + expect(headers[1]).toHaveTextContent('Header 2'); + expect(screen.queryByText('Content 1')).not.toBeInTheDocument(); + expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); +}); + +test('renders with one item expanded by default', () => { + renderCollapse({ defaultActiveKey: ['1'] }); + + const headers = screen.getAllByRole('button'); + + expect(headers[0]).toHaveTextContent('Header 1'); + expect(headers[1]).toHaveTextContent('Header 2'); + expect(screen.getByText('Content 1')).toBeInTheDocument(); + expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); +}); + +test('expands on click', () => { + renderCollapse(); + + expect(screen.queryByText('Content 1')).not.toBeInTheDocument(); + expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); + + userEvent.click(screen.getAllByRole('button')[0]); + + expect(screen.getByText('Content 1')).toBeInTheDocument(); + expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); +}); + +test('collapses on click', () => { + renderCollapse({ defaultActiveKey: ['1'] }); + + expect(screen.getByText('Content 1')).toBeInTheDocument(); + expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); + + userEvent.click(screen.getAllByRole('button')[0]); + + expect(screen.getByText('Content 1').parentNode).toHaveClass( + 'ant-collapse-content-hidden', + ); + expect(screen.queryByText('Content 2')).not.toBeInTheDocument(); +}); + +test('renders with custom properties', () => { + renderCollapse({ + light: true, + bigger: true, + bold: true, + animateArrows: true, + }); + + const header = document.getElementsByClassName('ant-collapse-header')[0]; + const arrow = + document.getElementsByClassName('ant-collapse-arrow')[0].children[0]; + + const headerStyle = window.getComputedStyle(header); + const arrowStyle = window.getComputedStyle(arrow); + + expect(headerStyle.fontWeight).toBe( + supersetTheme.fontWeightStrong.toString(), + ); + expect(headerStyle.fontSize).toBe(`${supersetTheme.sizeUnit * 4}px`); + expect(arrowStyle.transition).toBe('transform 0.24s'); }); diff --git a/superset-frontend/src/components/Collapse/index.tsx b/superset-frontend/src/components/Collapse/index.tsx index 42af995bb9e..04bdfb95857 100644 --- a/superset-frontend/src/components/Collapse/index.tsx +++ b/superset-frontend/src/components/Collapse/index.tsx @@ -37,11 +37,9 @@ const Collapse = Object.assign( .ant-collapse-item { .ant-collapse-header { font-weight: ${({ bold, theme }) => - bold - ? theme.typography.weights.bold - : theme.typography.weights.normal}; + bold ? theme.fontWeightStrong : theme.fontWeightNormal}; font-size: ${({ bigger, theme }) => - bigger ? `${theme.gridUnit * 4}px` : 'inherit'}; + bigger ? `${theme.sizeUnit * 4}px` : 'inherit'}; .ant-collapse-arrow svg { transition: ${({ animateArrows }) => @@ -60,9 +58,9 @@ const Collapse = Object.assign( ${({ light, theme }) => light && ` - color: ${theme.colors.grayscale.light4}; + color: ${theme.colorTextSecondary}; .ant-collapse-arrow svg { - color: ${theme.colors.grayscale.light4}; + color: ${theme.colorTextSecondary}; } `} @@ -70,13 +68,14 @@ const Collapse = Object.assign( ghost && bordered && ` - border-bottom: 1px solid ${theme.colors.grayscale.light3}; + border-bottom: 1px solid ${theme.colorBorderSecondary}; `} } .ant-collapse-content { + //background-color: ${({ theme }) => theme.colorBgLayout}; .ant-collapse-content-box { .loading.inline { - margin: ${({ theme }) => theme.gridUnit * 12}px auto; + margin: ${({ theme }) => theme.sizeUnit * 12}px auto; display: block; } } diff --git a/superset-frontend/src/components/CronPicker/CronPicker.tsx b/superset-frontend/src/components/CronPicker/CronPicker.tsx index 3e0e93d65da..7b0528b1c18 100644 --- a/superset-frontend/src/components/CronPicker/CronPicker.tsx +++ b/superset-frontend/src/components/CronPicker/CronPicker.tsx @@ -16,8 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -// eslint-disable-next-line no-restricted-imports -import { ConfigProvider } from 'antd'; // TODO: Remove antd import { styled, t } from '@superset-ui/core'; import ReactCronPicker, { Locale, CronProps } from 'react-js-cron'; @@ -104,11 +102,7 @@ export const LOCALE: Locale = { }; export const CronPicker = styled((props: CronProps) => ( - trigger.parentElement as HTMLElement} - > - - + ))` ${({ theme }) => ` @@ -119,8 +113,8 @@ export const CronPicker = styled((props: CronProps) => ( :has(.react-js-cron-months) { display: grid !important; grid-template-columns: repeat(2, 50%); - column-gap: ${theme.gridUnit}px; - row-gap: ${theme.gridUnit * 2}px; + column-gap: ${theme.sizeUnit}px; + row-gap: ${theme.sizeUnit * 2}px; div:has(.react-js-cron-hours) { grid-column: span 2; display: flex; @@ -136,8 +130,8 @@ export const CronPicker = styled((props: CronProps) => ( :not(:has(.react-js-cron-months)) { display: grid; grid-template-columns: repeat(2, 50%); - column-gap: ${theme.gridUnit}px; - row-gap: ${theme.gridUnit * 2}px; + column-gap: ${theme.sizeUnit}px; + row-gap: ${theme.sizeUnit * 2}px; .react-js-cron-period { grid-column: span 2; } @@ -171,7 +165,7 @@ export const CronPicker = styled((props: CronProps) => ( } .react-js-cron-minutes > span { - padding-left: ${theme.gridUnit}px; + padding-left: ${theme.sizeUnit}px; } /* Sizing of select container */ @@ -193,7 +187,7 @@ export const CronPicker = styled((props: CronProps) => ( .react-js-cron-custom-select .ant-select-selection-placeholder { flex: auto; - border-radius: ${theme.gridUnit}px; + border-radius: ${theme.sizeUnit}px; } .react-js-cron-custom-select .ant-select-selection-overflow-item { @@ -202,7 +196,7 @@ export const CronPicker = styled((props: CronProps) => ( .react-js-cron-select > div:first-of-type, .react-js-cron-custom-select { - border-radius: ${theme.gridUnit}px; + border-radius: ${theme.sizeUnit}px; } `} `; diff --git a/superset-frontend/src/components/DatabaseSelector/index.tsx b/superset-frontend/src/components/DatabaseSelector/index.tsx index ba7f03e41fd..41f12ccca32 100644 --- a/superset-frontend/src/components/DatabaseSelector/index.tsx +++ b/superset-frontend/src/components/DatabaseSelector/index.tsx @@ -46,8 +46,8 @@ const DatabaseSelectorWrapper = styled.div` display: flex; align-items: center; width: 30px; - margin-left: ${theme.gridUnit}px; - margin-top: ${theme.gridUnit * 5}px; + margin-left: ${theme.sizeUnit}px; + margin-top: ${theme.sizeUnit * 5}px; } .section { @@ -57,12 +57,12 @@ const DatabaseSelectorWrapper = styled.div` } .select { - width: calc(100% - 30px - ${theme.gridUnit}px); + width: calc(100% - 30px - ${theme.sizeUnit}px); flex: 1; } & > div { - margin-bottom: ${theme.gridUnit * 4}px; + margin-bottom: ${theme.sizeUnit * 4}px; } `} `; @@ -71,7 +71,7 @@ const LabelStyle = styled.div` display: flex; flex-direction: row; align-items: center; - margin-left: ${({ theme }) => theme.gridUnit - 2}px; + margin-left: ${({ theme }) => theme.sizeUnit - 2}px; .backend { overflow: visible; diff --git a/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx b/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx index 1164d083dca..821b91a2da2 100644 --- a/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx +++ b/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx @@ -96,7 +96,7 @@ const ConfirmModalStyled = styled.div` const StyledSpan = styled.span` cursor: pointer; - color: ${({ theme }) => theme.colors.primary.dark1}; + color: ${({ theme }) => theme.colorPrimaryText}; &: hover { color: ${({ theme }) => theme.colors.primary.dark2}; } @@ -288,7 +288,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ ({ marginBottom: theme.gridUnit * 4 })} + css={theme => ({ marginBottom: theme.sizeUnit * 4 })} message={ <> {t('Warning!')} {CHANGE_WARNING_MSG} diff --git a/superset-frontend/src/components/Datasource/CollectionTable.tsx b/superset-frontend/src/components/Datasource/CollectionTable.tsx index 23f725b0a42..70ee95d7adb 100644 --- a/superset-frontend/src/components/Datasource/CollectionTable.tsx +++ b/superset-frontend/src/components/Datasource/CollectionTable.tsx @@ -121,20 +121,20 @@ const CrudTableWrapper = styled.div<{ stickyHeader?: boolean }>` `} ${({ theme }) => ` th span { - vertical-align: ${theme.gridUnit * -2}px; + vertical-align: ${theme.sizeUnit * -2}px; } .text-right { text-align: right; } .empty-collection { - padding: ${theme.gridUnit * 2 + 2}px; + padding: ${theme.sizeUnit * 2 + 2}px; } .tiny-cell { - width: ${theme.gridUnit + 1}px; + width: ${theme.sizeUnit + 1}px; } i.fa-caret-down, i.fa-caret-up { - width: ${theme.gridUnit + 1}px; + width: ${theme.sizeUnit + 1}px; } td.expanded { border-top: 0; @@ -145,13 +145,13 @@ const CrudTableWrapper = styled.div<{ stickyHeader?: boolean }>` const CrudButtonWrapper = styled.div` text-align: right; - ${({ theme }) => `margin-bottom: ${theme.gridUnit * 2}px`} + ${({ theme }) => `margin-bottom: ${theme.sizeUnit * 2}px`} `; const StyledButtonWrapper = styled.span` ${({ theme }) => ` - margin-top: ${theme.gridUnit * 3}px; - margin-left: ${theme.gridUnit * 3}px; + margin-top: ${theme.sizeUnit * 3}px; + margin-left: ${theme.sizeUnit * 3}px; `} `; @@ -482,7 +482,7 @@ export default class CRUDCollection extends PureComponent<