diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 40e36e23a39..9d083882bed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,6 @@ { "packages/calcite-components": "1.8.0", + "packages/calcite-design-tokens": "1.0.0", "packages/calcite-components-react": "1.8.0", "packages/eslint-plugin-calcite-components": "0.2.2" } diff --git a/package-lock.json b/package-lock.json index db438f3023f..6d9b30c26ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "@storybook/html": "6.5.16", "@storybook/storybook-deployer": "2.8.16", "@storybook/testing-library": "0.2.1", + "@tokens-studio/sd-transforms": "0.8.2", "@types/dedent": "0.7.0", "@types/eslint": "8.40.2", "@types/estree": "1.0.2", @@ -37,19 +38,18 @@ "@types/semver": "7.5.2", "@types/shell-quote": "1.7.1", "@types/sortablejs": "1.15.2", - "@types/yargs": "17.0.24", "@typescript-eslint/eslint-plugin": "5.60.1", "@typescript-eslint/parser": "5.48.2", "@whitespace/storybook-addon-html": "5.0.0", "autoprefixer": "10.4.16", "axe-core": "4.7.2", "babel-loader": "8.3.0", + "change-case": "4.1.2", "cheerio": "1.0.0-rc.10", "chokidar": "3.5.3", "chromatic": "6.19.9", "concurrently": "7.6.0", "conventional-changelog-conventionalcommits": "5.0.0", - "cpy": "10.0.0", "cpy-cli": "5.0.0", "dedent": "0.7.0", "eslint": "8.44.0", @@ -61,7 +61,6 @@ "eslint-plugin-react": "7.33.2", "eslint-plugin-unicorn": "46.0.1", "husky": "8.0.3", - "jest": "27.4.5", "jest-axe": "7.0.1", "jest-cli": "27.4.5", "lerna": "7.1.5", @@ -81,10 +80,12 @@ "storybook": "6.5.16", "storybook-addon-themes": "6.1.0", "storybook-rtl-addon": "0.3.3", + "style-dictionary": "3.7.1", "stylelint": "15.10.3", "stylelint-config-recommended-scss": "12.0.0", "stylelint-use-logical-spec": "5.0.0", "tailwindcss": "3.3.3", + "token-transformer": "0.0.27", "ts-jest": "27.1.5", "ts-node": "10.9.1", "turbo": "1.10.14", @@ -94,7 +95,7 @@ "workbox-build": "7.0.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2524,9 +2525,9 @@ "dev": true }, "node_modules/@cspell/dict-php": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.2.tgz", - "integrity": "sha512-7yglcmMoFHDPQXHW+9QAl8YjAToMm1qOi+4x/yGY1FSIEjZbCpjeDgyKMGg/NgpooQQceEN38AR59Pn23EDriA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.3.tgz", + "integrity": "sha512-PxtSmWJCDEB4M8R9ER9ijxBum/tvUqYT26QeuV58q2IFs5IrPZ6hocQKvnFGXItjCWH4oYXyAEAAzINlBC4Opg==", "dev": true }, "node_modules/@cspell/dict-powershell": { @@ -3098,10 +3099,8 @@ "link": true }, "node_modules/@esri/calcite-design-tokens": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@esri/calcite-design-tokens/-/calcite-design-tokens-1.0.0.tgz", - "integrity": "sha512-iO4tj5aWZwGFRlaEz+XcR8EWjBU8aIJDNtSVfpF0lUFaEEvk+Cic/Zq0wjTuZElCKWiKQkat7YghZVuXgQ8wQw==", - "dev": true + "resolved": "packages/calcite-design-tokens", + "link": true }, "node_modules/@esri/calcite-ui-icons": { "version": "3.24.4", @@ -4318,9 +4317,9 @@ } }, "node_modules/@jest/schemas": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", - "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { "@sinclair/typebox": "^0.27.8" @@ -6358,6 +6357,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/@rollup/plugin-node-resolve": { "version": "15.2.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.1.tgz", @@ -8893,6 +8898,151 @@ "storybook-to-ghpages": "bin/storybook_to_ghpages" } }, + "node_modules/@storybook/storybook-deployer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@storybook/storybook-deployer/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@storybook/storybook-deployer/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, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@storybook/storybook-deployer/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@storybook/telemetry": { "version": "6.5.16", "resolved": "https://registry.npmjs.org/@storybook/telemetry/-/telemetry-6.5.16.tgz", @@ -9092,9 +9242,9 @@ } }, "node_modules/@testing-library/dom/node_modules/@babel/runtime": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz", - "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -9192,6 +9342,145 @@ "@testing-library/dom": ">=7.21.4" } }, + "node_modules/@tokens-studio/sd-transforms": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@tokens-studio/sd-transforms/-/sd-transforms-0.8.2.tgz", + "integrity": "sha512-X++MFWn3NaLOgmN1cHSW41ER9Xq8w8ioCM8+K2OjXYbPWKdPI18zFQf9ZxGcKpz/AxCs5zV2v/ZdvX5V3IfPSA==", + "dev": true, + "dependencies": { + "@tokens-studio/types": "^0.2.1", + "color2k": "^2.0.1", + "colorjs.io": "^0.4.3", + "expr-eval": "^2.0.2", + "postcss-calc-ast-parser": "^0.1.4", + "style-dictionary": "^3.7.2" + }, + "engines": { + "node": ">=15.14.0" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/style-dictionary": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/style-dictionary/-/style-dictionary-3.8.0.tgz", + "integrity": "sha512-wHlB/f5eO3mDcYv6WtOz6gvQC477jBKrwuIXe+PtHskTCBsJdAOvL8hCquczJxDui2TnwpeNE+2msK91JJomZg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "change-case": "^4.1.2", + "commander": "^8.3.0", + "fs-extra": "^10.0.0", + "glob": "^7.2.0", + "json5": "^2.2.2", + "jsonc-parser": "^3.0.0", + "lodash": "^4.17.15", + "tinycolor2": "^1.4.1" + }, + "bin": { + "style-dictionary": "bin/style-dictionary" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@tokens-studio/sd-transforms/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@tokens-studio/types": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@tokens-studio/types/-/types-0.2.5.tgz", + "integrity": "sha512-pJ0zWxGnEjca4dznFIHC9/oXuovu3DKHUhLDNJVzTRZEVXhWkIRIUbjDwIRihxBr39c776W+3thYvWMgChT0Rw==", + "dev": true + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -9707,15 +9996,6 @@ "node": ">= 8" } }, - "node_modules/@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@types/yargs-parser": { "version": "21.0.0", "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", @@ -12655,6 +12935,17 @@ } ] }, + "node_modules/capital-case": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", + "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "node_modules/capture-exit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", @@ -12700,6 +12991,26 @@ "node": ">=4" } }, + "node_modules/change-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", + "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", + "dev": true, + "dependencies": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -13317,6 +13628,12 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/color2k": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.2.tgz", + "integrity": "sha512-kJhwH5nAwb34tmyuqq/lgjEKzlFXn1U99NlnB6Ws4qVaERcRUYeYP1cBw6BJ4vxaWStAUEef4WMr7WjOCnBt8w==", + "dev": true + }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -13329,6 +13646,12 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, + "node_modules/colorjs.io": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.4.5.tgz", + "integrity": "sha512-yCtUNCmge7llyfd/Wou19PMAcf5yC3XXhgFoAh6zsO2pGswhUPBaaUh8jzgHnXtXuZyFKzXZNAnyF5i+apICow==", + "dev": true + }, "node_modules/columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -13569,20 +13892,6 @@ "node": ">=8" } }, - "node_modules/concurrently/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/concurrently/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -13625,42 +13934,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/concurrently/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/concurrently/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/concurrently/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/configstore": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", @@ -13707,6 +13980,17 @@ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, + "node_modules/constant-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", + "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, "node_modules/constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", @@ -14221,28 +14505,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cpy": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/cpy/-/cpy-10.0.0.tgz", - "integrity": "sha512-6aFIEPIDnUE98L4FNBEkfOL5A1XfMt+37fzYsdQ4KugSrVU6gWa1IgBbtc/Di3ohTzGw10LqCcCamw8bL8Erqw==", - "dev": true, - "dependencies": { - "arrify": "^3.0.0", - "cp-file": "^10.0.0", - "globby": "^13.1.4", - "junk": "^4.0.1", - "micromatch": "^4.0.5", - "nested-error-stacks": "^2.1.1", - "p-filter": "^3.0.0", - "p-map": "^6.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cpy-cli": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cpy-cli/-/cpy-cli-5.0.0.tgz", @@ -14315,37 +14577,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cpy/node_modules/globby": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", - "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", - "dev": true, - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cpy/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -17487,6 +17718,12 @@ "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", "dev": true }, + "node_modules/expr-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expr-eval/-/expr-eval-2.0.2.tgz", + "integrity": "sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==", + "dev": true + }, "node_modules/express": { "version": "4.18.2", "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", @@ -19635,6 +19872,16 @@ "he": "bin/he" } }, + "node_modules/header-case": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", + "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", + "dev": true, + "dependencies": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", @@ -21593,6 +21840,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz", "integrity": "sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==", "dev": true, + "peer": true, "dependencies": { "@jest/core": "^27.4.5", "import-local": "^3.0.2", @@ -28989,39 +29237,12 @@ "node": ">=6" } }, - "node_modules/nx/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/nx/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/nx/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/nx/node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -29031,20 +29252,6 @@ "node": ">=12" } }, - "node_modules/nx/node_modules/yargs/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -30138,6 +30345,16 @@ "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", "dev": true }, + "node_modules/path-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", + "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", + "dev": true, + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -30408,6 +30625,24 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-calc-ast-parser": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/postcss-calc-ast-parser/-/postcss-calc-ast-parser-0.1.4.tgz", + "integrity": "sha512-CebpbHc96zgFjGgdQ6BqBy6XIUgRx1xXWCAAk6oke02RZ5nxwo9KQejTg8y7uYEeI9kv8jKQPYjoe6REsY23vw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^3.3.1" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/postcss-calc-ast-parser/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, "node_modules/postcss-flexbugs-fixes": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz", @@ -31618,9 +31853,9 @@ } }, "node_modules/quicktype-core/node_modules/yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", "dev": true, "engines": { "node": ">= 14" @@ -33662,6 +33897,17 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/sentence-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", + "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "node_modules/serialize-javascript": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", @@ -33957,6 +34203,16 @@ "npm": ">= 3.0.0" } }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dev": true, + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -35056,6 +35312,122 @@ "node": ">=4" } }, + "node_modules/style-dictionary": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/style-dictionary/-/style-dictionary-3.7.1.tgz", + "integrity": "sha512-yYU9Z/J8Znj9T9oJVjo8VOYamrOxv0UbBKPjhSt+PharxrhyQCM4RWb71fgEfv2pK9KO8G83/0ChDNQZ1mn0wQ==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "change-case": "^4.1.2", + "commander": "^8.3.0", + "fs-extra": "^10.0.0", + "glob": "^7.2.0", + "json5": "^2.2.0", + "jsonc-parser": "^3.0.0", + "lodash": "^4.17.15", + "tinycolor2": "^1.4.1" + }, + "bin": { + "style-dictionary": "bin/style-dictionary" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/style-dictionary/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/style-dictionary/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/style-dictionary/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/style-dictionary/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/style-dictionary/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/style-dictionary/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/style-dictionary/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/style-dictionary/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/style-loader": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz", @@ -36561,6 +36933,12 @@ "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", "dev": true }, + "node_modules/tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", + "dev": true + }, "node_modules/titleize": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", @@ -36710,6 +37088,18 @@ "node": ">=0.6" } }, + "node_modules/token-transformer": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/token-transformer/-/token-transformer-0.0.27.tgz", + "integrity": "sha512-IBClwoMFrOGrlTD9ql/wArgRCe1IpKbPVfYoLPkegS9kK5yAOz7O4U8VJeZbq6FjSy73C+zLmtz7H8V5k2LqjQ==", + "dev": true, + "dependencies": { + "yargs": "^17.4.1" + }, + "bin": { + "token-transformer": "index.js" + } + }, "node_modules/tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", @@ -37067,9 +37457,9 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "node_modules/tsutils": { @@ -38047,6 +38437,17 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/updtr/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "node_modules/updtr/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -38065,6 +38466,19 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/updtr/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/updtr/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -38074,6 +38488,45 @@ "node": ">=8" } }, + "node_modules/updtr/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/updtr/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, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/updtr/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/updtr/node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -38101,6 +38554,73 @@ "node": ">=8" } }, + "node_modules/updtr/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/updtr/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/updtr/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/upper-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", + "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/upper-case-first": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", + "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.3" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -40248,25 +40768,21 @@ } }, "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yargs-parser": { @@ -40278,127 +40794,36 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/yargs/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/yargs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/yargs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/yargs/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/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, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/yargs/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/yargs/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/yargs/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, "engines": { - "node": ">=6" + "node": ">=12" } }, "node_modules/yauzl": { @@ -40480,6 +40905,11 @@ "react-dom": ">=16.7" } }, + "packages/calcite-design-tokens": { + "name": "@esri/calcite-design-tokens", + "version": "1.0.0", + "license": "SEE LICENSE IN README.md" + }, "packages/eslint-plugin-calcite-components": { "name": "@esri/eslint-plugin-calcite-components", "version": "0.2.3-next.4", @@ -42240,9 +42670,9 @@ "dev": true }, "@cspell/dict-php": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.2.tgz", - "integrity": "sha512-7yglcmMoFHDPQXHW+9QAl8YjAToMm1qOi+4x/yGY1FSIEjZbCpjeDgyKMGg/NgpooQQceEN38AR59Pn23EDriA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.3.tgz", + "integrity": "sha512-PxtSmWJCDEB4M8R9ER9ijxBum/tvUqYT26QeuV58q2IFs5IrPZ6hocQKvnFGXItjCWH4oYXyAEAAzINlBC4Opg==", "dev": true }, "@cspell/dict-powershell": { @@ -42717,10 +43147,7 @@ } }, "@esri/calcite-design-tokens": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@esri/calcite-design-tokens/-/calcite-design-tokens-1.0.0.tgz", - "integrity": "sha512-iO4tj5aWZwGFRlaEz+XcR8EWjBU8aIJDNtSVfpF0lUFaEEvk+Cic/Zq0wjTuZElCKWiKQkat7YghZVuXgQ8wQw==", - "dev": true + "version": "file:packages/calcite-design-tokens" }, "@esri/calcite-ui-icons": { "version": "3.24.4", @@ -43661,9 +44088,9 @@ } }, "@jest/schemas": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", - "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "requires": { "@sinclair/typebox": "^0.27.8" @@ -45182,6 +45609,12 @@ "is-inside-container": "^1.0.0", "is-wsl": "^2.2.0" } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true } } }, @@ -47053,6 +47486,120 @@ "parse-repo": "^1.0.4", "shelljs": "^0.8.1", "yargs": "^15.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "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, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, "@storybook/telemetry": { @@ -47126,97 +47673,175 @@ } } }, - "@storybook/testing-library": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@storybook/testing-library/-/testing-library-0.2.1.tgz", - "integrity": "sha512-AdbfLCm1C2nEFrhA3ScdicfW6Fjcorehr6RlGwECMiWwaXisnP971Wd4psqtWxlAqQo4tYBZ0f6rJ3J78JLtsg==", - "dev": true, - "requires": { - "@testing-library/dom": "^9.0.0", - "@testing-library/user-event": "~14.4.0", - "ts-dedent": "^2.2.0" - } - }, - "@storybook/theming": { - "version": "6.5.16", - "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.5.16.tgz", - "integrity": "sha512-hNLctkjaYLRdk1+xYTkC1mg4dYz2wSv6SqbLpcKMbkPHTE0ElhddGPHQqB362md/w9emYXNkt1LSMD8Xk9JzVQ==", - "dev": true, - "requires": { - "@storybook/client-logger": "6.5.16", - "core-js": "^3.8.2", - "memoizerific": "^1.11.3", - "regenerator-runtime": "^0.13.7" - } - }, - "@storybook/ui": { - "version": "6.5.16", - "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.5.16.tgz", - "integrity": "sha512-rHn/n12WM8BaXtZ3IApNZCiS+C4Oc5+Lkl4MoctX8V7QSml0SxZBB5hsJ/AiWkgbRxjQpa/L/Nt7/Qw0FjTH/A==", - "dev": true, - "requires": { - "@storybook/addons": "6.5.16", - "@storybook/api": "6.5.16", - "@storybook/channels": "6.5.16", - "@storybook/client-logger": "6.5.16", - "@storybook/components": "6.5.16", - "@storybook/core-events": "6.5.16", - "@storybook/router": "6.5.16", - "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.5.16", - "core-js": "^3.8.2", - "memoizerific": "^1.11.3", - "qs": "^6.10.0", - "regenerator-runtime": "^0.13.7", - "resolve-from": "^5.0.0" - } - }, - "@surma/rollup-plugin-off-main-thread": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", - "integrity": "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==", - "dev": true, - "requires": { - "ejs": "^3.1.6", - "json5": "^2.2.0", - "magic-string": "^0.25.0", - "string.prototype.matchall": "^4.0.6" - } - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "@storybook/testing-library": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@storybook/testing-library/-/testing-library-0.2.1.tgz", + "integrity": "sha512-AdbfLCm1C2nEFrhA3ScdicfW6Fjcorehr6RlGwECMiWwaXisnP971Wd4psqtWxlAqQo4tYBZ0f6rJ3J78JLtsg==", + "dev": true, + "requires": { + "@testing-library/dom": "^9.0.0", + "@testing-library/user-event": "~14.4.0", + "ts-dedent": "^2.2.0" + } + }, + "@storybook/theming": { + "version": "6.5.16", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.5.16.tgz", + "integrity": "sha512-hNLctkjaYLRdk1+xYTkC1mg4dYz2wSv6SqbLpcKMbkPHTE0ElhddGPHQqB362md/w9emYXNkt1LSMD8Xk9JzVQ==", + "dev": true, + "requires": { + "@storybook/client-logger": "6.5.16", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "regenerator-runtime": "^0.13.7" + } + }, + "@storybook/ui": { + "version": "6.5.16", + "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.5.16.tgz", + "integrity": "sha512-rHn/n12WM8BaXtZ3IApNZCiS+C4Oc5+Lkl4MoctX8V7QSml0SxZBB5hsJ/AiWkgbRxjQpa/L/Nt7/Qw0FjTH/A==", + "dev": true, + "requires": { + "@storybook/addons": "6.5.16", + "@storybook/api": "6.5.16", + "@storybook/channels": "6.5.16", + "@storybook/client-logger": "6.5.16", + "@storybook/components": "6.5.16", + "@storybook/core-events": "6.5.16", + "@storybook/router": "6.5.16", + "@storybook/semver": "^7.3.2", + "@storybook/theming": "6.5.16", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "qs": "^6.10.0", + "regenerator-runtime": "^0.13.7", + "resolve-from": "^5.0.0" + } + }, + "@surma/rollup-plugin-off-main-thread": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", + "integrity": "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==", + "dev": true, + "requires": { + "ejs": "^3.1.6", + "json5": "^2.2.0", + "magic-string": "^0.25.0", + "string.prototype.matchall": "^4.0.6" + } + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@testing-library/dom": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.3.tgz", + "integrity": "sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@testing-library/user-event": { + "version": "14.4.3", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz", + "integrity": "sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q==", "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } + "requires": {} }, - "@testing-library/dom": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.3.tgz", - "integrity": "sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==", + "@tokens-studio/sd-transforms": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@tokens-studio/sd-transforms/-/sd-transforms-0.8.2.tgz", + "integrity": "sha512-X++MFWn3NaLOgmN1cHSW41ER9Xq8w8ioCM8+K2OjXYbPWKdPI18zFQf9ZxGcKpz/AxCs5zV2v/ZdvX5V3IfPSA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.1.3", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "pretty-format": "^27.0.2" + "@tokens-studio/types": "^0.2.1", + "color2k": "^2.0.1", + "colorjs.io": "^0.4.3", + "expr-eval": "^2.0.2", + "postcss-calc-ast-parser": "^0.1.4", + "style-dictionary": "^3.7.2" }, "dependencies": { - "@babel/runtime": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz", - "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.14.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -47251,17 +47876,45 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", - "dev": true + "style-dictionary": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/style-dictionary/-/style-dictionary-3.8.0.tgz", + "integrity": "sha512-wHlB/f5eO3mDcYv6WtOz6gvQC477jBKrwuIXe+PtHskTCBsJdAOvL8hCquczJxDui2TnwpeNE+2msK91JJomZg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "change-case": "^4.1.2", + "commander": "^8.3.0", + "fs-extra": "^10.0.0", + "glob": "^7.2.0", + "json5": "^2.2.2", + "jsonc-parser": "^3.0.0", + "lodash": "^4.17.15", + "tinycolor2": "^1.4.1" + } }, "supports-color": { "version": "7.2.0", @@ -47274,12 +47927,11 @@ } } }, - "@testing-library/user-event": { - "version": "14.4.3", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz", - "integrity": "sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q==", - "dev": true, - "requires": {} + "@tokens-studio/types": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@tokens-studio/types/-/types-0.2.5.tgz", + "integrity": "sha512-pJ0zWxGnEjca4dznFIHC9/oXuovu3DKHUhLDNJVzTRZEVXhWkIRIUbjDwIRihxBr39c776W+3thYvWMgChT0Rw==", + "dev": true }, "@tootallnate/once": { "version": "1.1.2", @@ -47781,15 +48433,6 @@ } } }, - "@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "@types/yargs-parser": { "version": "21.0.0", "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", @@ -50003,6 +50646,17 @@ "integrity": "sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA==", "dev": true }, + "capital-case": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", + "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "capture-exit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", @@ -50035,6 +50689,26 @@ "supports-color": "^5.3.0" } }, + "change-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", + "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", + "dev": true, + "requires": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -50486,6 +51160,12 @@ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, + "color2k": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.2.tgz", + "integrity": "sha512-kJhwH5nAwb34tmyuqq/lgjEKzlFXn1U99NlnB6Ws4qVaERcRUYeYP1cBw6BJ4vxaWStAUEef4WMr7WjOCnBt8w==", + "dev": true + }, "colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -50498,6 +51178,12 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, + "colorjs.io": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.4.5.tgz", + "integrity": "sha512-yCtUNCmge7llyfd/Wou19PMAcf5yC3XXhgFoAh6zsO2pGswhUPBaaUh8jzgHnXtXuZyFKzXZNAnyF5i+apICow==", + "dev": true + }, "columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -50686,17 +51372,6 @@ } } }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -50726,33 +51401,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true } } }, @@ -50792,6 +51440,17 @@ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, + "constant-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", + "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", @@ -51178,43 +51837,6 @@ "p-event": "^5.0.1" } }, - "cpy": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/cpy/-/cpy-10.0.0.tgz", - "integrity": "sha512-6aFIEPIDnUE98L4FNBEkfOL5A1XfMt+37fzYsdQ4KugSrVU6gWa1IgBbtc/Di3ohTzGw10LqCcCamw8bL8Erqw==", - "dev": true, - "requires": { - "arrify": "^3.0.0", - "cp-file": "^10.0.0", - "globby": "^13.1.4", - "junk": "^4.0.1", - "micromatch": "^4.0.5", - "nested-error-stacks": "^2.1.1", - "p-filter": "^3.0.0", - "p-map": "^6.0.0" - }, - "dependencies": { - "globby": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", - "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", - "dev": true, - "requires": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" - } - }, - "slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true - } - } - }, "cpy-cli": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cpy-cli/-/cpy-cli-5.0.0.tgz", @@ -53689,6 +54311,12 @@ "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", "dev": true }, + "expr-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expr-eval/-/expr-eval-2.0.2.tgz", + "integrity": "sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==", + "dev": true + }, "express": { "version": "4.18.2", "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", @@ -55343,6 +55971,16 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "header-case": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", + "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", + "dev": true, + "requires": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + } + }, "highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", @@ -56745,6 +57383,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz", "integrity": "sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==", "dev": true, + "peer": true, "requires": { "@jest/core": "^27.4.5", "import-local": "^3.0.2", @@ -62503,46 +63142,12 @@ "strip-bom": "^3.0.0" } }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "dependencies": { - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - } - } - }, "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -63371,6 +63976,16 @@ "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", "dev": true }, + "path-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", + "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -63559,6 +64174,23 @@ "source-map-js": "^1.0.2" } }, + "postcss-calc-ast-parser": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/postcss-calc-ast-parser/-/postcss-calc-ast-parser-0.1.4.tgz", + "integrity": "sha512-CebpbHc96zgFjGgdQ6BqBy6XIUgRx1xXWCAAk6oke02RZ5nxwo9KQejTg8y7uYEeI9kv8jKQPYjoe6REsY23vw==", + "dev": true, + "requires": { + "postcss-value-parser": "^3.3.1" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, "postcss-flexbugs-fixes": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz", @@ -64440,9 +65072,9 @@ } }, "yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", "dev": true } } @@ -66042,6 +66674,17 @@ } } }, + "sentence-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", + "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "serialize-javascript": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", @@ -66280,6 +66923,16 @@ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true }, + "snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -67158,6 +67811,91 @@ "through": "^2.3.4" } }, + "style-dictionary": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/style-dictionary/-/style-dictionary-3.7.1.tgz", + "integrity": "sha512-yYU9Z/J8Znj9T9oJVjo8VOYamrOxv0UbBKPjhSt+PharxrhyQCM4RWb71fgEfv2pK9KO8G83/0ChDNQZ1mn0wQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "change-case": "^4.1.2", + "commander": "^8.3.0", + "fs-extra": "^10.0.0", + "glob": "^7.2.0", + "json5": "^2.2.0", + "jsonc-parser": "^3.0.0", + "lodash": "^4.17.15", + "tinycolor2": "^1.4.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "style-loader": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz", @@ -68300,6 +69038,12 @@ "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", "dev": true }, + "tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", + "dev": true + }, "titleize": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", @@ -68419,6 +69163,15 @@ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true }, + "token-transformer": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/token-transformer/-/token-transformer-0.0.27.tgz", + "integrity": "sha512-IBClwoMFrOGrlTD9ql/wArgRCe1IpKbPVfYoLPkegS9kK5yAOz7O4U8VJeZbq6FjSy73C+zLmtz7H8V5k2LqjQ==", + "dev": true, + "requires": { + "yargs": "^17.4.1" + } + }, "tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", @@ -68664,9 +69417,9 @@ } }, "tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "tsutils": { @@ -69369,6 +70122,17 @@ "supports-color": "^7.1.0" } }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -69384,12 +70148,49 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "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, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -69410,9 +70211,67 @@ "requires": { "has-flag": "^4.0.0" } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, + "upper-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", + "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, + "upper-case-first": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", + "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -71179,116 +72038,42 @@ "dev": true }, "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "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, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true } } }, diff --git a/package.json b/package.json index ae83a29574f..cedec413df0 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ ], "scripts": { "build": "turbo run build --log-order=stream", - "clean": "turbo run clean --log-order=stream && rimraf node_modules", + "clean:node": "rimraf node_modules --glob ./packages/*/node_modules", + "clean": "turbo run clean --log-order=stream", "lint": "turbo run lint --log-order=stream", "publish:next": "lerna publish from-package --dist-tag next --yes", "publish:latest": "lerna publish from-package --yes", @@ -38,6 +39,7 @@ "@storybook/html": "6.5.16", "@storybook/storybook-deployer": "2.8.16", "@storybook/testing-library": "0.2.1", + "@tokens-studio/sd-transforms": "0.8.2", "@types/dedent": "0.7.0", "@types/eslint": "8.40.2", "@types/estree": "1.0.2", @@ -50,19 +52,18 @@ "@types/semver": "7.5.2", "@types/shell-quote": "1.7.1", "@types/sortablejs": "1.15.2", - "@types/yargs": "17.0.24", "@typescript-eslint/eslint-plugin": "5.60.1", "@typescript-eslint/parser": "5.48.2", "@whitespace/storybook-addon-html": "5.0.0", "autoprefixer": "10.4.16", "axe-core": "4.7.2", "babel-loader": "8.3.0", + "change-case": "4.1.2", "cheerio": "1.0.0-rc.10", "chokidar": "3.5.3", "chromatic": "6.19.9", "concurrently": "7.6.0", "conventional-changelog-conventionalcommits": "5.0.0", - "cpy": "10.0.0", "cpy-cli": "5.0.0", "dedent": "0.7.0", "eslint": "8.44.0", @@ -74,7 +75,6 @@ "eslint-plugin-react": "7.33.2", "eslint-plugin-unicorn": "46.0.1", "husky": "8.0.3", - "jest": "27.4.5", "jest-axe": "7.0.1", "jest-cli": "27.4.5", "lerna": "7.1.5", @@ -94,10 +94,12 @@ "storybook": "6.5.16", "storybook-addon-themes": "6.1.0", "storybook-rtl-addon": "0.3.3", + "style-dictionary": "3.7.1", "stylelint": "15.10.3", "stylelint-config-recommended-scss": "12.0.0", "stylelint-use-logical-spec": "5.0.0", "tailwindcss": "3.3.3", + "token-transformer": "0.0.27", "ts-jest": "27.1.5", "ts-node": "10.9.1", "turbo": "1.10.14", @@ -108,7 +110,7 @@ }, "license": "SEE LICENSE.md", "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" }, "packageManager": "npm@10.1.0", "volta": { diff --git a/packages/calcite-components-react/package.json b/packages/calcite-components-react/package.json index 1e4fdff35fb..5356e9e4ae5 100644 --- a/packages/calcite-components-react/package.json +++ b/packages/calcite-components-react/package.json @@ -6,12 +6,10 @@ "description": "A set of React components that wrap calcite components", "license": "SEE LICENSE.md", "scripts": { - "build": "rimraf dist && npm run compile", - "prebuild": "npm run patch:ssr", - "clean": "rimraf dist node_modules .turbo", - "compile": "npm run tsc", + "build": "tsc", + "clean": "rimraf dist", "patch:ssr": "ts-node support/patchSSR.ts", - "tsc": "tsc" + "prebuild": "npm run patch:ssr" }, "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/packages/calcite-components/.storybook/preview-head.html b/packages/calcite-components/.storybook/preview-head.html index 6eabb7b8d9a..71f53c644dd 100644 --- a/packages/calcite-components/.storybook/preview-head.html +++ b/packages/calcite-components/.storybook/preview-head.html @@ -7,7 +7,7 @@ body { font-family: var(--calcite-sans-family); color: var(--calcite-ui-text-1); - background-color: var(--calcite-ui-background); + background-color: var(--calcite-ui-background-1); } calcite-slider { diff --git a/packages/calcite-components/calcite-preset.ts b/packages/calcite-components/calcite-preset.ts index eda55adb9df..a8402e01b9b 100644 --- a/packages/calcite-components/calcite-preset.ts +++ b/packages/calcite-components/calcite-preset.ts @@ -8,6 +8,7 @@ import plugin from "tailwindcss/plugin"; * * @param {string} value - the CSS value to invert * @param {string} flagPropName - the boolean CSS prop (value must be 0 or 1) + * @returns {string} - the inverted css prop value */ function invert(value: string, flagPropName: string): string { return `calc( @@ -55,7 +56,7 @@ export default { "danger-hover": "var(--calcite-ui-danger-hover)", "danger-press": "var(--calcite-ui-danger-press)", background: { - background: "var(--calcite-ui-background)", + background: "var(--calcite-ui-background-1)", foreground: { 1: "var(--calcite-ui-foreground-1)", 2: "var(--calcite-ui-foreground-2)", @@ -80,45 +81,45 @@ export default { }, fontSize: { // assets/styles/_type - n3: "var(--calcite-font-size--3)", // 10px - n2: "var(--calcite-font-size--2)", // 12px - n1: "var(--calcite-font-size--1)", // 14px - 0: "var(--calcite-font-size-0)", // 16px - 1: "var(--calcite-font-size-1)", // 18px - 2: "var(--calcite-font-size-2)", // 20px - 3: "var(--calcite-font-size-3)", // 26px - 4: "var(--calcite-font-size-4)", // 32px - 5: "var(--calcite-font-size-5)", // 40px - 6: "var(--calcite-font-size-6)", // 48px - 7: "var(--calcite-font-size-7)", // 56px - 8: "var(--calcite-font-size-8)", // 64px + n3: "var(--calcite-font-size-0)", // 10px + n2: "var(--calcite-font-size-1)", // 12px + n1: "var(--calcite-font-size-2)", // 14px + 0: "var(--calcite-font-size-3)", // 16px + 1: "var(--calcite-font-size-4)", // 18px + 2: "var(--calcite-font-size-5)", // 20px + 3: "var(--calcite-font-size-6)", // 26px + 4: "var(--calcite-font-size-7)", // 32px + 5: "var(--calcite-font-size-8)", // 40px + 6: "var(--calcite-font-size-9)", // 48px + 7: "var(--calcite-font-size-10)", // 56px + 8: "var(--calcite-font-size-11)", // 64px // TODO: temp selectors to be renamed before closing https://github.com/Esri/calcite-design-system/issues/1500. // at this point all existing instances of text-N should be replaced with either text-Nh or text-N-wrap and we // should be able to safely drop the "h" suffix. - n3h: ["var(--calcite-font-size--3)", { lineHeight: "0.75rem" }], // 10px (0.625rem) - n2h: ["var(--calcite-font-size--2)", { lineHeight: "1rem" }], // 12px (0.75rem) - n1h: ["var(--calcite-font-size--1)", { lineHeight: "1rem" }], // 14px (0.875rem) - "0h": ["var(--calcite-font-size-0)", { lineHeight: "1.25rem" }], // 16px (1rem) - "1h": ["var(--calcite-font-size-1)", { lineHeight: "1.5rem" }], // 18px (1.125rem) - "2h": ["var(--calcite-font-size-2)", { lineHeight: "1.5rem" }], // 20px (1.25rem) - "3h": ["var(--calcite-font-size-3)", { lineHeight: "2rem" }], // 26px (1.625rem) - "4h": ["var(--calcite-font-size-4)", { lineHeight: "2.5rem" }], // 32px (2rem) - "5h": ["var(--calcite-font-size-5)", { lineHeight: "3rem" }], // 40px (2.5rem) - "6h": ["var(--calcite-font-size-6)", { lineHeight: "4rem" }], // 48px (3rem) - "7h": ["var(--calcite-font-size-7)", { lineHeight: "4rem" }], // 56px (3.5rem) - "8h": ["var(--calcite-font-size-8)", { lineHeight: "5rem" }], // 64px (4rem) - "n3-wrap": ["var(--calcite-font-size--3)", { lineHeight: "1.375" }], - "n2-wrap": ["var(--calcite-font-size--2)", { lineHeight: "1.375" }], - "n1-wrap": ["var(--calcite-font-size--1)", { lineHeight: "1.375" }], - "0-wrap": ["var(--calcite-font-size-0)", { lineHeight: "1.375" }], - "1-wrap": ["var(--calcite-font-size-1)", { lineHeight: "1.375" }], - "2-wrap": ["var(--calcite-font-size-2)", { lineHeight: "1.375" }], - "3-wrap": ["var(--calcite-font-size-3)", { lineHeight: "1.25" }], - "4-wrap": ["var(--calcite-font-size-4)", { lineHeight: "1.25" }], - "5-wrap": ["var(--calcite-font-size-5)", { lineHeight: "1.25" }], - "6-wrap": ["var(--calcite-font-size-6)", { lineHeight: "1.25" }], - "7-wrap": ["var(--calcite-font-size-7)", { lineHeight: "1.25" }], - "8-wrap": ["var(--calcite-font-size-8)", { lineHeight: "1.25" }], + n3h: ["var(--calcite-font-size-0)", { lineHeight: "0.75rem" }], // 10px (0.625rem) + n2h: ["var(--calcite-font-size-1)", { lineHeight: "1rem" }], // 12px (0.75rem) + n1h: ["var(--calcite-font-size-2)", { lineHeight: "1rem" }], // 14px (0.875rem) + "0h": ["var(--calcite-font-size-3)", { lineHeight: "1.25rem" }], // 16px (1rem) + "1h": ["var(--calcite-font-size-4)", { lineHeight: "1.5rem" }], // 18px (1.125rem) + "2h": ["var(--calcite-font-size-5)", { lineHeight: "1.5rem" }], // 20px (1.25rem) + "3h": ["var(--calcite-font-size-6)", { lineHeight: "2rem" }], // 26px (1.625rem) + "4h": ["var(--calcite-font-size-7)", { lineHeight: "2.5rem" }], // 32px (2rem) + "5h": ["var(--calcite-font-size-8)", { lineHeight: "3rem" }], // 40px (2.5rem) + "6h": ["var(--calcite-font-size-9)", { lineHeight: "4rem" }], // 48px (3rem) + "7h": ["var(--calcite-font-size-10)", { lineHeight: "4rem" }], // 56px (3.5rem) + "8h": ["var(--calcite-font-size-11)", { lineHeight: "5rem" }], // 64px (4rem) + "n3-wrap": ["var(--calcite-font-size-0)", { lineHeight: "1.375" }], + "n2-wrap": ["var(--calcite-font-size-1)", { lineHeight: "1.375" }], + "n1-wrap": ["var(--calcite-font-size-2)", { lineHeight: "1.375" }], + "0-wrap": ["var(--calcite-font-size-3)", { lineHeight: "1.375" }], + "1-wrap": ["var(--calcite-font-size-4)", { lineHeight: "1.375" }], + "2-wrap": ["var(--calcite-font-size-5)", { lineHeight: "1.375" }], + "3-wrap": ["var(--calcite-font-size-6)", { lineHeight: "1.25" }], + "4-wrap": ["var(--calcite-font-size-7)", { lineHeight: "1.25" }], + "5-wrap": ["var(--calcite-font-size-8)", { lineHeight: "1.25" }], + "6-wrap": ["var(--calcite-font-size-9)", { lineHeight: "1.25" }], + "7-wrap": ["var(--calcite-font-size-10)", { lineHeight: "1.25" }], + "8-wrap": ["var(--calcite-font-size-11)", { lineHeight: "1.25" }], }, fontWeight: { // assets/styles/_type @@ -232,16 +233,16 @@ export default { menu: "45vh", }, zIndex: { - deep: "var(--calcite-app-z-index-deep)", - default: "var(--calcite-app-z-index)", - sticky: "var(--calcite-app-z-index-sticky)", - header: "var(--calcite-app-z-index-header)", - toast: "var(--calcite-app-z-index-toast)", - dropdown: "var(--calcite-app-z-index-dropdown)", - overlay: "var(--calcite-app-z-index-overlay)", - modal: "var(--calcite-app-z-index-modal)", - popover: "var(--calcite-app-z-index-popup)", - tooltip: "var(--calcite-app-z-index-tooltip)", + deep: "var(--calcite-z-index-deep)", + default: "var(--calcite-z-index)", + sticky: "var(--calcite-z-index-sticky)", + header: "var(--calcite-z-index-header)", + toast: "var(--calcite-z-index-toast)", + dropdown: "var(--calcite-z-index-dropdown)", + overlay: "var(--calcite-z-index-overlay)", + modal: "var(--calcite-z-index-modal)", + popover: "var(--calcite-z-index-popup)", + tooltip: "calc(var(--calcite-z-index-tooltip) + 1)", }, }, }, diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 8bd985855f9..82eab9a6a56 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -19,28 +19,31 @@ "hydrate/" ], "scripts": { - "build": "npm run util:prep-build-reqs && stencil build", - "postbuild": "npm run util:patch && npm run util:generate-t9n-docs-json && git restore src/components/*/readme.md", - "build:watch": "npm run util:prep-build-reqs && stencil build --no-docs --watch", - "build:watch-dev": "npm run util:prep-build-reqs && stencil build --no-docs --dev --watch", "build-storybook": "npm run util:build-docs && NODE_OPTIONS=--openssl-legacy-provider build-storybook --output-dir ./docs --quiet", - "clean": "npm run util:clean-js-files && rimraf node_modules dist www hydrate docs .turbo src/components.d.ts", + "build:watch-dev": "npm run util:prep-build-reqs && stencil build --no-docs --dev --watch", + "build:watch": "npm run util:prep-build-reqs && stencil build --no-docs --watch", + "build": "npm run util:prep-build-reqs && stencil build", + "clean:dist": "rimraf dist www hydrate docs", + "clean:js-files": "rimraf --glob -- *.js {src,.storybook,support}/**.js", + "clean:types": "rimraf src/components.d.ts", + "clean": "concurrently npm:clean:*", "deps:update": "updtr --exclude chalk cheerio typescript @types/jest jest jest-cli ts-jest puppeteer @whitespace/storybook-addon-html && npm audit fix", - "docs": "build-storybook", "docs:preview": "npm run util:build-docs && NODE_OPTIONS=--openssl-legacy-provider STORYBOOK_SCREENSHOT_LOCAL_BUILD=true start-storybook", - "lint": "concurrently npm:lint:*", + "docs": "build-storybook", "lint:html": "prettier --write \"**/*.html\" >/dev/null", "lint:json": "prettier --write \"**/*.json\" >/dev/null", "lint:md": "markdownlint \"**/*.md\" --fix --dot --ignore-path .gitignore && prettier --write \"**/*.md\" >/dev/null", "lint:scss": "stylelint --fix \"src/**/*.scss\" && prettier --write \"**/*.scss\" >/dev/null", "lint:ts": "eslint --ext .ts,.tsx --fix . && prettier --write \"**/*.ts?(x)\" >/dev/null", + "lint": "concurrently npm:lint:*", + "postbuild": "npm run util:patch && npm run util:generate-t9n-docs-json && git restore src/components/*/readme.md", "posttest": "npm run test:prerender", "prepublishOnly": "./support/stencilDoubleBuildTypesWorkaround.sh", "release:docs": "npm run docs && storybook-to-ghpages --existing-output-dir=docs", - "start": "npm run util:clean-js-files && concurrently --kill-others --raw \"tsc --project ./tsconfig-demos.json --watch\" \"npm run build:watch-dev -- --serve\"", - "test": "stencil test --no-docs --no-build --spec --e2e", + "start": "npm run clean:js-files && concurrently --kill-others --raw \"tsc --project ./tsconfig-demos.json --watch\" \"npm run build:watch-dev -- --serve\"", "test:prerender": "stencil build --no-docs --prerender", "test:watch": "npm run build && npm run test -- -- --watchAll", + "test": "stencil test --no-docs --no-build --spec --e2e", "util:build-docs": "npm run util:prep-build-reqs && stencil build --docs --config stencil.storybook.config.ts", "util:clean-tested-build": "npm ci && npm test && npm run build", "util:copy-assets": "npm run util:copy-icons", @@ -48,14 +51,13 @@ "util:generate-t9n-docs-json": "ts-node --esm support/generateT9nDocsJSON.ts", "util:generate-t9n-types": "ts-node --esm support/generateT9nTypes.ts", "util:hydration-styles": "ts-node --esm support/hydrationStyles.ts", - "util:patch": "npm run util:patch-esm-resolution && npm run util:patch-tree-shaking", + "util:is-working-tree-clean": "[ -z \"$(git status --porcelain=v1)\" ]", "util:patch-esm-resolution": "ts-node --esm support/patchESMResolution.ts", "util:patch-tree-shaking": "ts-node --esm support/patchTreeShaking.ts", + "util:patch": "npm run util:patch-esm-resolution && npm run util:patch-tree-shaking", "util:prep-build-reqs": "npm run util:copy-assets && npm run util:generate-t9n-types", "util:sync-t9n-en-bundles": "ts-node --esm support/syncEnT9nBundles.ts", - "util:test-types": "tsc --esModuleInterop dist/types/**/*.d.ts dist/components/*.d.ts && ! grep -rnw 'dist/types' -e ' run("src", "dist", theme))); diff --git a/packages/calcite-design-tokens/support/token-transformer/format/scss.ts b/packages/calcite-design-tokens/support/token-transformer/format/scss.ts new file mode 100644 index 00000000000..6b065bc457a --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/format/scss.ts @@ -0,0 +1,63 @@ +import * as changeCase from "change-case"; +import { default as styleDictionary } from "style-dictionary"; +import { Dictionary } from "style-dictionary/types/Dictionary"; +import { File } from "style-dictionary/types/File"; +import { Formatter } from "style-dictionary/types/Format"; +import { Options } from "style-dictionary/types/Options"; +import { Platform } from "style-dictionary/types/Platform"; +// , { Dictionary, File, Platform, Options } +// import * as styleDictionary, { Dictionary, File, Platform, Options } from "style-dictionary"; +const { pascalCase, sentenceCase } = changeCase; + +const regexThemeGroup = /calcite|brand/gi; +const regexFileNameWithoutExtension = /\w+(?=\.\w+$)/gi; +const { formatHelpers } = styleDictionary; +/** + * Exports SCSS style formats + * + * @param {object} fileInfo the file object + * @param {Dictionary} fileInfo.dictionary the Style Dictionary object + * @param {File} fileInfo.file information about the file to be generated + * @param {Platform} [fileInfo.platform] the platform to generate the asset for + * @param {Options} fileInfo.options the Style Dictionary format options passed from the config + * @returns {string} a string that is passed to fs.writeFileSync + */ +export const formatSCSS: Formatter = (fileInfo: { + dictionary: Dictionary; + file: File; + platform?: Platform; + // eslint-disable-next-line @cspell/spellchecker + options: Options & { themeable?: boolean }; +}) => { + const { dictionary, file, options } = fileInfo; + const { outputReferences } = options; + const fileRegexMatch = file.destination.match(regexFileNameWithoutExtension); + + if (fileRegexMatch) { + const themeName = pascalCase( + sentenceCase(fileRegexMatch ? fileRegexMatch[0] : "") + .split(" ") + .filter((n) => !regexThemeGroup.test(n)) + .join(" ") + ).toLowerCase(); + + return ( + formatHelpers.fileHeader({ file }) + + formatHelpers + .formattedVariables({ format: "sass", dictionary, outputReferences }) + .split("\n") + .filter((customProp) => !customProp.includes("ui-component")) + .join("\n") + + "\n" + + `@mixin calcite-theme-${themeName}() {\n` + + formatHelpers + .formattedVariables({ format: "css", dictionary, outputReferences }) + .split("\n") + .filter((customProp) => !customProp.includes("ui-component")) + .join("\n") + + `\n}\n` + ); + } + + return ""; +}; diff --git a/packages/calcite-design-tokens/support/token-transformer/getThemes.ts b/packages/calcite-design-tokens/support/token-transformer/getThemes.ts new file mode 100644 index 00000000000..eb95301f114 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/getThemes.ts @@ -0,0 +1,51 @@ +import { Options } from "style-dictionary"; +import { parseName } from "./utils/parseName.js"; + +export interface ThemeOutputFile { + name: string; + selectedTokenSets: Record; +} + +export interface ThemeFileInterface { + theme: string; + output?: boolean; + outputFiles: ThemeOutputFile[]; + include?: string[]; +} + +export type Theme = { + name?: string; + enabled?: string[]; + disabled?: string[]; + source?: string[]; + id?: string; + options?: Options; +}; + +/** + * + * @param {ThemeFileInterface} themes an array of Figma Token Studio theme definition objects + * @param {string} tokensDir the directory in which to look for files + * @returns {Array} an array of Style Dictionary theme definition objects + */ +export async function getThemes(themes: ThemeFileInterface[]): Promise { + return themes.reduce((acc, theme) => { + if (theme.output === false) { + return acc; + } + + theme.outputFiles.forEach((file) => { + acc.push({ + name: parseName(theme.theme === "calcite" ? file.name : `${theme.theme}/${file.name}`), + enabled: Object.keys(file.selectedTokenSets).filter( + (tokenFileName) => file.selectedTokenSets[tokenFileName] === "enabled" + ), + source: Object.keys(file.selectedTokenSets).filter( + (tokenFileName) => file.selectedTokenSets[tokenFileName] === "source" + ), + }); + }); + + return acc; + }, [] as Theme[]); +} diff --git a/packages/calcite-design-tokens/support/token-transformer/parse/expandComposites.spec.ts b/packages/calcite-design-tokens/support/token-transformer/parse/expandComposites.spec.ts new file mode 100644 index 00000000000..d9192d77252 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/parse/expandComposites.spec.ts @@ -0,0 +1,145 @@ +const mockCorrectTypeCompoundToken = { + core: { + 1: { + type: "sizing", + value: "10", + }, + }, + compound: { + value: { + fontFamily: "$core.font.font-family.primary", + fontWeight: "$core.font.font-weight.light", + lineHeight: "$core.font.line-height.fixed.0", + fontSize: "$core.font.font-size.0", + letterSpacing: "$core.font.letter-spacing.normal", + paragraphSpacing: "$core.font.paragraph-spacing.normal", + textDecoration: "$core.font.text-decoration.none", + textCase: "$core.font.text-case.none", + }, + type: "typography", + }, +}; +const mockTransformedCompoundTokens = { + core: { + 1: { + type: "sizing", + value: "10", + }, + }, + compound: { + "font-family": { + value: "$core.font.font-family.primary", + type: "font-family", + }, + "font-weight": { + value: "$core.font.font-weight.light", + type: "font-weights", + }, + "line-height": { + value: "$core.font.line-height.fixed.0", + type: "line-heights", + }, + "font-size": { + value: "$core.font.font-size.0", + type: "font-size", + }, + "letter-spacing": { + value: "$core.font.letter-spacing.normal", + type: "letter-spacing", + }, + "paragraph-spacing": { + value: "$core.font.paragraph-spacing.normal", + type: "paragraph-spacing", + }, + "text-decoration": { + value: "$core.font.text-decoration.none", + type: "font-style", + }, + "text-case": { + value: "$core.font.text-case.none", + type: "text-case", + }, + }, +}; + +const handleTokenStudioVariables = jest.fn((token) => (token.includes("$") ? `{${token.replace(/\$/g, "")}}` : token)); +const convertTokenToStyleDictionaryFormat = jest.fn(() => handleTokenStudioVariables); +const shouldExpand = jest.fn().mockReturnValue(true); +const expandToken = jest.fn().mockReturnValue(mockTransformedCompoundTokens); + +jest.mock("../utils/compositeTokens.js", () => { + const originalModule = jest.requireActual("../utils/compositeTokens.js"); + return { + __esModule: false, + ...originalModule, + shouldExpand, + expandToken, + }; +}); + +jest.mock("../utils/convertTokenToStyleDictionaryFormat.js", () => { + const originalModule = jest.requireActual("../utils/convertTokenToStyleDictionaryFormat.js"); + return { + __esModule: false, + ...originalModule, + convertTokenToStyleDictionaryFormat, + }; +}); + +import * as expandComposites from "./expandComposites"; + +describe("expand token dictionary", () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should not add placeholder elements", () => { + const placeholderToken = { + "[placeholder-component]": { + type: "other", + value: "#333", + }, + }; + const placeholderValue = { + component: { + type: "other", + value: "[placeholder-value]", + }, + }; + + // @ts-expect-error - These placeholder tokens are not a deep match to the DeepTokenMap type but it's close enough for the purposes of this test + const testExpandPlaceholderKey = expandComposites.expandComposites(placeholderToken, "./fakePath"); + // @ts-expect-error - These placeholder tokens are not a deep match to the DeepTokenMap type but it's close enough for the purposes of this test + const testExpandPlaceholderValue = expandComposites.expandComposites(placeholderValue, "./fakePath"); + + expect(testExpandPlaceholderKey).toMatchObject({}); + expect(testExpandPlaceholderValue).toMatchObject({}); + }); + + it('should loop through a dictionary and run "shouldExpand" and "expandToken" on each composite token', () => { + // @ts-expect-error - These placeholder tokens are not a deep match to the DeepTokenMap type but it's close enough for the purposes of this test + const testExpandComposite = expandComposites.expandComposites(mockCorrectTypeCompoundToken, "./fakePath"); + expect(handleTokenStudioVariables).toHaveBeenCalledTimes(1); + expect(shouldExpand).toHaveBeenCalledTimes(1); + expect(expandToken).toHaveBeenCalledTimes(1); + expect(testExpandComposite).toMatchObject(mockTransformedCompoundTokens); + }); + + it("should not run expand token on unrecognized types", () => { + const mockDictionary = { + core: { + type: "customType", + value: { + // eslint-disable-next-line @cspell/spellchecker + fontFamily: "Avanir", + fontSize: "12px", + }, + }, + }; + // @ts-expect-error - it's fine this is a test + const testExpandComposite = expandComposites.expandComposites(mockDictionary, "./fakePath"); + expect(shouldExpand).not.toHaveBeenCalled(); + expect(expandToken).not.toHaveBeenCalled(); + expect(testExpandComposite).toMatchObject(mockDictionary); + }); +}); diff --git a/packages/calcite-design-tokens/support/token-transformer/parse/expandComposites.ts b/packages/calcite-design-tokens/support/token-transformer/parse/expandComposites.ts new file mode 100644 index 00000000000..0315e9e7a0f --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/parse/expandComposites.ts @@ -0,0 +1,72 @@ +import { DeepKeyTokenMap } from "@tokens-studio/types"; +import { DesignToken } from "style-dictionary/types/DesignToken.js"; +import { + TransformOptions, + ExpandTokensAsStrings, + ExpandTokens, + expandTokensAsStringsArray, +} from "../utils/transformOptions.js"; +import { matchPlaceholderElement, tokenStudioCustomVariableIndicator } from "../utils/regex.js"; +import { shouldExpand, expandToken } from "../utils/compositeTokens.js"; +import { convertTokenToStyleDictionaryFormat } from "../utils/convertTokenToStyleDictionaryFormat.js"; + +/** + * Figma Token Studio creates an odd type of composite token where the "value" may contain an object of "key: value" pairs rather than a sting. + * Here we will lift these composite tokens up to match the Style Dictionary format. + * + * @param {DeepKeyTokenMap} dictionary the raw JSON object in the token files. We will assume this is a token object generated by Figma Token Studio and may require composite tokens to be expanded. + * @param {string} filePath the absolute file path to the JSON token file. + * @param {TransformOptions} transformOpts the options passed in from the Style Dictionary config and runner + * @returns {DeepKeyTokenMap} a token object where any Figma Token Studio composite tokens now match the Style Dictionary token format + */ +export function expandComposites( + dictionary: DeepKeyTokenMap, + filePath: string, + transformOpts: TransformOptions = {} +): DeepKeyTokenMap { + const opts = { + ...transformOpts, + expand: { + composition: true, + typography: false, + border: false, + shadow: false, + ...transformOpts.expand, + }, + }; + const returnSlice: DeepKeyTokenMap = {}; + const handleTokenStudioVariables = convertTokenToStyleDictionaryFormat(tokenStudioCustomVariableIndicator); + const newDictionary = Object.entries(dictionary).reduce((acc, [key, token]) => { + const { type } = token; + + if ( + matchPlaceholderElement.test(`${key}`) || + (typeof token.value === "string" && matchPlaceholderElement.test(`${token.value}`)) + ) { + return acc; + } + + if (token.value && type) { + const includesType = expandTokensAsStringsArray.includes(`${type}`); + + if (includesType) { + const expandType = (type as ExpandTokensAsStrings) === "boxShadow" ? "shadow" : type; + const expand = shouldExpand(token as ExpandTokens, opts.expand[`${expandType}`], filePath); + if (expand) { + const expandedToken = expandToken(token as DesignToken, expandType === "shadow", handleTokenStudioVariables); + return expandedToken; + } + } else if (typeof token.value === "string") { + token.value = handleTokenStudioVariables(token.value); + acc[key] = token; + } else { + acc[key] = token; + } + } else if (typeof token === "object") { + acc[key] = expandComposites(token as DeepKeyTokenMap, filePath, transformOpts); + } + return acc; + }, returnSlice); + + return newDictionary || {}; +} diff --git a/packages/calcite-design-tokens/support/token-transformer/sd-run.ts b/packages/calcite-design-tokens/support/token-transformer/sd-run.ts new file mode 100644 index 00000000000..d3738e64214 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/sd-run.ts @@ -0,0 +1,140 @@ +import { registerTransforms } from "@tokens-studio/sd-transforms"; +import { default as StyleDictionary } from "style-dictionary"; +import { expandComposites } from "./parse/expandComposites.js"; +import { formatSCSS } from "./format/scss.js"; +import { matchExclusions } from "./utils/regex.js"; +import { matchList } from "./utils/matchList.js"; +import { nameCamelCase } from "./transform/nameCamelCase.js"; +import { nameKebabCase } from "./transform/nameKebabCase.js"; +import { Theme } from "./getThemes.js"; + +/** + * Style Dictionary runner configuration overrides. + * + * @param {string} tokenDir the directory containing design token files + * @param {string} buildPath the directory to write generated assets to + * @param {Theme} theme the theme configuration to use to generate the platform asset files + * @param {string} theme.name the name of the theme. This will be used as the basis for the generated asset file names. + * @param {string[]} theme.enabled an array of partial file names matching the token files which should be included in the output + * @param {string[]} theme.disabled an array of partial file names matching the token files which should explicitly not be included in the output + * @param {string[]} theme.source an array of partial file names matching the token files which should not always be included in the output but who's values should be used for variables references in the "enabled" files + */ +export const run = async (tokenDir = "src", buildPath = "dist", theme: Theme): Promise => { + // const tokenDir = "src"; + // const theme.name = theme.name; + const include = theme.source.map((tokenFile) => `${tokenDir}/${tokenFile}.json`); + const source = theme.enabled.map((tokenFile) => `${tokenDir}/${tokenFile}.json`); + const options = { + outputReferences: true, + }; + + // Here we are registering the Transforms provided by Token Studio however, + // we need to pass "expand: false" so that we can use our own custom JSON file parser. + // any references to "ts/..." below are references to these Token Studio transformers + // https://github.com/tokens-studio/sd-transforms + // @ts-expect-error - @token-studio/sd-transforms is not keeping their StyleDictionary types utd. + await registerTransforms(StyleDictionary, { expand: false }); + + // Register custom formatter https://amzn.github.io/style-dictionary/#/formats?id=custom-formats + StyleDictionary.registerFormat({ + name: "calcite/scss", + formatter: formatSCSS, + }); + + // Registering Style Dictionary transformers https://amzn.github.io/style-dictionary/#/transforms?id=defining-custom-transforms + StyleDictionary.registerTransform({ + name: "name/calcite/camel", + type: "name", + transformer: nameCamelCase, + }); + + StyleDictionary.registerTransform({ + name: "name/calcite/kebab", + type: "name", + transformer: nameKebabCase, + }); + + StyleDictionary.registerFilter({ + name: "filterSource", + matcher: (token) => token.isSource, + }); + + // We are programmatically creating the Style Dictionary configuration here + // https://amzn.github.io/style-dictionary/#/config + const sd = StyleDictionary.extend({ + source, + include, + platforms: { + css: { + prefix: "calcite", + transforms: [ + "ts/descriptionToComment", + "ts/size/px", + "ts/opacity", + // eslint-disable-next-line @cspell/spellchecker + "ts/size/lineheight", + "ts/type/fontWeight", + "ts/resolveMath", + // eslint-disable-next-line @cspell/spellchecker + "ts/size/css/letterspacing", + // eslint-disable-next-line @cspell/spellchecker + "ts/color/css/hexrgba", + "ts/color/modifiers", + "name/calcite/kebab", + ], + buildPath: `${buildPath}/css/`, + files: [ + { + destination: `${theme.name}.css`, + format: "css/variables", + filter: "filterSource", + options, + }, + ], + }, + scss: { + prefix: "calcite", + transforms: [ + "ts/descriptionToComment", + "ts/size/px", + "ts/opacity", + // eslint-disable-next-line @cspell/spellchecker + "ts/size/lineheight", + "ts/type/fontWeight", + "ts/resolveMath", + // eslint-disable-next-line @cspell/spellchecker + "ts/size/css/letterspacing", + // eslint-disable-next-line @cspell/spellchecker + "ts/color/css/hexrgba", + "ts/color/modifiers", + "name/calcite/kebab", + ], + buildPath: `${buildPath}/scss/`, + files: [ + { + destination: `${theme.name}.scss`, + format: "calcite/scss", + filter: "filterSource", + options, + }, + ], + }, + }, + parsers: [ + { + pattern: /\.json$/, + parse: (file) => + matchList(file.filePath, [...theme.source, ...theme.enabled], matchExclusions) + ? expandComposites(JSON.parse(file.contents), file.filePath) + : {}, + }, + ], + }); + + try { + sd.cleanAllPlatforms(); + sd.buildAllPlatforms(); + } catch (error) { + console.error(error); + } +}; diff --git a/packages/calcite-design-tokens/support/token-transformer/transform/nameCamelCase.spec.ts b/packages/calcite-design-tokens/support/token-transformer/transform/nameCamelCase.spec.ts new file mode 100644 index 00000000000..2ff57980480 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/transform/nameCamelCase.spec.ts @@ -0,0 +1,36 @@ +import { nameCamelCase } from "./nameCamelCase"; + +describe("transform names to camel case", () => { + it("should transform a token path to token name in a camel case format", () => { + const mockToken = { + name: "current-name", + path: ["test", "token", "name"], + value: "fake-value", + filePath: "./fakePath.json", + original: { + value: "fake-value", + type: "composite", + }, + isSource: true, + }; + expect(nameCamelCase(mockToken, {})).toBe("testTokenName"); + }); + + it("should add prefix to token name", () => { + const mockToken = { + name: "current-name", + path: ["test", "token", "name"], + value: "fake-value", + filePath: "./fakePath.json", + original: { + value: "fake-value", + type: "composite", + }, + isSource: true, + }; + const mockOptions = { + prefix: "calcite", + }; + expect(nameCamelCase(mockToken, mockOptions)).toBe("calciteTestTokenName"); + }); +}); diff --git a/packages/calcite-design-tokens/support/token-transformer/transform/nameCamelCase.ts b/packages/calcite-design-tokens/support/token-transformer/transform/nameCamelCase.ts new file mode 100644 index 00000000000..37b9659f2ac --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/transform/nameCamelCase.ts @@ -0,0 +1,15 @@ +import { camelCase } from "change-case"; +import { TransformedToken } from "style-dictionary/types/TransformedToken.js"; +import { parseTokenPath } from "../utils/parseTokenPath.js"; +import { Platform } from "style-dictionary/types/Platform.js"; + +/** + * Convert token name to camel case + * + * @param {TransformedToken} token Style Dictionary token object + * @param {Platform} options Style Dictionary format options + * @returns {string} an updated name for the token which will be used for the final output + */ +export function nameCamelCase(token: TransformedToken, options?: Platform): string { + return camelCase([options?.prefix].concat(parseTokenPath(token.path)).join(" ")); +} diff --git a/packages/calcite-design-tokens/support/token-transformer/transform/nameKebabCase.spec.ts b/packages/calcite-design-tokens/support/token-transformer/transform/nameKebabCase.spec.ts new file mode 100644 index 00000000000..ed4de4b83fb --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/transform/nameKebabCase.spec.ts @@ -0,0 +1,36 @@ +import { nameKebabCase } from "./nameKebabCase"; + +describe("transform names to kebab case", () => { + it("should transform a token path to token name in a kebab case format", () => { + const mockToken = { + name: "current-name", + path: ["test", "token", "name"], + value: "fake-value", + filePath: "./fakePath.json", + original: { + value: "fake-value", + type: "composite", + }, + isSource: true, + }; + expect(nameKebabCase(mockToken, {})).toBe("test-token-name"); + }); + + it("should add prefix to token name", () => { + const mockToken = { + name: "current-name", + path: ["test", "token", "name"], + value: "fake-value", + filePath: "./fakePath.json", + original: { + value: "fake-value", + type: "composite", + }, + isSource: true, + }; + const mockOptions = { + prefix: "calcite", + }; + expect(nameKebabCase(mockToken, mockOptions)).toBe("calcite-test-token-name"); + }); +}); diff --git a/packages/calcite-design-tokens/support/token-transformer/transform/nameKebabCase.ts b/packages/calcite-design-tokens/support/token-transformer/transform/nameKebabCase.ts new file mode 100644 index 00000000000..d289a19a1de --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/transform/nameKebabCase.ts @@ -0,0 +1,15 @@ +import { paramCase } from "change-case"; +import { TransformedToken } from "style-dictionary/types/TransformedToken.js"; +import { parseTokenPath } from "../utils/parseTokenPath.js"; +import { Platform } from "style-dictionary/types/Platform.js"; + +/** + * convert token name to kebab case + * + * @param {TransformedToken} token Style Dictionary token object + * @param {Platform} options Style Dictionary format options + * @returns {string} an updated name for the token which will be used for the final output + */ +export function nameKebabCase(token: TransformedToken, options?: Platform): string { + return paramCase([options?.prefix].concat(parseTokenPath(token.path)).join(" ")); +} diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/compositeTokens.spec.ts b/packages/calcite-design-tokens/support/token-transformer/utils/compositeTokens.spec.ts new file mode 100644 index 00000000000..3627591065c --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/compositeTokens.spec.ts @@ -0,0 +1,131 @@ +import { SingleToken, TokenTypes } from "@tokens-studio/types"; +import { expandToken, shouldExpand } from "./compositeTokens.js"; + +const mockHandleValue = jest.fn((val) => val); + +describe("expand composite token", () => { + it("should expand a non-shadow token", () => { + const mockTypographyToken = { + value: { + fontFamily: "$core.font.font-family.primary", + fontWeight: "$core.font.font-weight.light", + lineHeight: "$core.font.line-height.fixed.0", + fontSize: "$core.font.font-size.0", + letterSpacing: "$core.font.letter-spacing.normal", + paragraphSpacing: "$core.font.paragraph-spacing.normal", + textDecoration: "$core.font.text-decoration.none", + textCase: "$core.font.text-case.none", + }, + type: "typography", + }; + const mockExpandedTypographyToken = { + "font-family": { + value: "$core.font.font-family.primary", + type: "font-family", + }, + "font-weight": { + value: "$core.font.font-weight.light", + type: "font-weights", + }, + "line-height": { + value: "$core.font.line-height.fixed.0", + type: "line-heights", + }, + "font-size": { + value: "$core.font.font-size.0", + type: "font-size", + }, + "letter-spacing": { + value: "$core.font.letter-spacing.normal", + type: "letter-spacing", + }, + "paragraph-spacing": { + value: "$core.font.paragraph-spacing.normal", + type: "paragraph-spacing", + }, + "text-decoration": { + value: "$core.font.text-decoration.none", + type: "font-style", + }, + "text-case": { + value: "$core.font.text-case.none", + type: "text-case", + }, + }; + const testExpandToken = expandToken(mockTypographyToken, false, mockHandleValue); + expect(testExpandToken).toMatchObject(mockExpandedTypographyToken); + }); + it("should expand a shadow token", () => { + const mockShadowToken = { + value: [ + { + x: "0", + y: "2", + blur: "8", + spread: "0", + color: "rgba($core.color.neutral.blk-240, $core.opacity.4)", + type: "dropShadow", + }, + { + x: "0", + y: "4", + blur: "16", + spread: "0", + color: "rgba($core.color.neutral.blk-240, $core.opacity.8)", + type: "dropShadow", + }, + ], + type: "boxShadow", + }; + const mockExpandedShadowToken = { + "1": { + x: { + type: "dimension", + value: "0", + }, + y: { + type: "dimension", + value: "2", + }, + blur: { + type: "dimension", + value: "8", + }, + spread: { + type: "dimension", + value: "0", + }, + color: { + type: "color", + value: "rgba($core.color.neutral.blk-240, $core.opacity.4)", + }, + }, + }; + const testExpandToken = expandToken(mockShadowToken, true, mockHandleValue); + expect(testExpandToken).toMatchObject(mockExpandedShadowToken); + }); +}); + +describe("shouldExpand", () => { + const filePath = "./mockFile.json"; + const mockToken: SingleToken = { + name: "testToken", + type: TokenTypes["FONT_FAMILIES"], + value: "san-serif", + }; + + it("should return true", () => { + const testExpand = shouldExpand(mockToken, true, filePath); + expect(testExpand).toBe(true); + }); + it("should return false", () => { + const testExpand = shouldExpand(mockToken, false, filePath); + expect(testExpand).toBe(false); + }); + it("should use condition function", () => { + const mockExpandFunction = jest.fn(() => true); + const testExpand = shouldExpand(mockToken, mockExpandFunction, filePath); + expect(testExpand).toBe(true); + expect(mockExpandFunction).toHaveBeenCalled(); + }); +}); diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/compositeTokens.ts b/packages/calcite-design-tokens/support/token-transformer/utils/compositeTokens.ts new file mode 100644 index 00000000000..e95940a50dc --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/compositeTokens.ts @@ -0,0 +1,103 @@ +import { DesignToken } from "style-dictionary/types/DesignToken"; +import { SingleToken } from "@tokens-studio/types"; +import { paramCase } from "change-case"; +import { ExpandFilter } from "./transformOptions.js"; +import { matchPlaceholderElement } from "./regex.js"; + +// A customized type map based off Token Studio. +// This determines the applied "type" associated with each Style Dictionary token value +const typeMaps = { + boxShadow: { + x: "dimension", + y: "dimension", + blur: "dimension", + spread: "dimension", + type: "other", + color: "color", + }, + border: { + width: "border-width", + style: "other", + }, + composition: { + typography: "font-size", + fontWeight: "font-weight", + }, + typography: { + fontFamily: "font-family", + fontWeight: "font-weights", + lineHeight: "line-heights", + fontSize: "font-size", + letterSpacing: "letter-spacing", + paragraphSpacing: "paragraph-spacing", + textDecoration: "font-style", + textCase: "text-case", + }, +}; + +/** + * Get type from type map + * + * @param {string} key type + * @param {DesignToken} compositeToken a Style Dictionary token + * @returns a string + */ +export const getType = (key: string, compositeToken: DesignToken): string => typeMaps[compositeToken.type][key] ?? key; + +/** + * This is a recursive function to dig into composite tokens and lift up the token values in a Style Dictionary format. + * + * @param {DesignToken} compositeToken the composite token object + * @param {boolean} isShadow is a drop shadow? + * @param {Function} handleValue a function to determine how the final token value string should be passed to Style Dictionary + * @returns {DesignToken} a single Style Dictionary token object + */ +export function expandToken(compositeToken: DesignToken, isShadow = false, handleValue = (v) => v): DesignToken { + const expandedObj = {} as DesignToken; + + if (isShadow && Array.isArray(compositeToken.value)) { + compositeToken.value.forEach((shadow, index) => { + expandedObj[index + 1] = {}; + Object.entries(shadow).forEach(([key, value]) => { + if (matchPlaceholderElement.test(`${value}`) || key === "type") { + return; + } + expandedObj[index + 1][key] = { + value: `${handleValue(value)}`, + type: getType(key, compositeToken), + }; + }); + }); + } else { + Object.entries(compositeToken.value).forEach(([key, value]) => { + const newKey = paramCase(key); + if (matchPlaceholderElement.test(`${value}`)) { + return; + } + expandedObj[newKey] = { + value: `${handleValue(value)}`, + type: getType(key, compositeToken), + }; + }); + } + + return expandedObj; +} + +/** + * + * @param {DesignToken} token Style Dictionary token object + * @param {boolean | ExpandFilter} condition check if the token should be expanded or not + * @param {string} filePath the file path where the token came from + * @returns {boolean} if the token should be expanded + */ +export function shouldExpand( + token: T, + condition: boolean | ExpandFilter, + filePath: string +): boolean { + if (typeof condition === "function") { + return condition(token, filePath); + } + return condition; +} diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/convertTokenToStyleDictionaryFormat.ts b/packages/calcite-design-tokens/support/token-transformer/utils/convertTokenToStyleDictionaryFormat.ts new file mode 100644 index 00000000000..e08a5e34790 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/convertTokenToStyleDictionaryFormat.ts @@ -0,0 +1,20 @@ +/** + * Some tokens defined in Figma Token Studio do not used the common { [variable.name] } for token references. + * This function loops over each value, finds custom token references and converts them to the expected Style Dictionary format. + * + * @param {RegExp} customReferenceTokenIndicator a regex to find the token references + * @returns {Function} to convert the token to the reference format expected by Style Dictionary "{ [variable.name] }" + */ +export function convertTokenToStyleDictionaryFormat( + customReferenceTokenIndicator: RegExp +): (value: string | number) => string { + return (value: string | number): string => { + let newValue = `${value}`; + const matchesArr = [...newValue.matchAll(customReferenceTokenIndicator)]; + matchesArr.forEach((match) => { + const figmaVariable = match[0]; + newValue = newValue.replace(figmaVariable, `{${figmaVariable.slice(1)}}`); + }); + return newValue; + }; +} diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/matchList.ts b/packages/calcite-design-tokens/support/token-transformer/utils/matchList.ts new file mode 100644 index 00000000000..429d23426ef --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/matchList.ts @@ -0,0 +1,11 @@ +/** + * Find the string in a list + * + * @param {string} str the string to find in the list + * @param {string[]} list the list of strings to match with the provided string + * @param {RegExp} regexExclude a regular expression defining strings that should always be excluded + * @returns {boolean} does the string match the items in the list + */ +export const matchList = (str: string, list: string[], regexExclude: RegExp): boolean => { + return list.some((value) => str.includes(value) && !regexExclude.test(str)); +}; diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/parseName.ts b/packages/calcite-design-tokens/support/token-transformer/utils/parseName.ts new file mode 100644 index 00000000000..357d504b953 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/parseName.ts @@ -0,0 +1,22 @@ +import { paramCase } from "change-case"; + +/** + * Used to set the file name for the generated theme file. + * + * @param {string} name the file name passed from the themes object + * @returns {string} a kebab-case file name from the passed name, optionally starting with a prefix + */ +export function parseName(name: string): string { + const regex = /\.\w+$/; + const indexOfFileExtension = name.search(regex); + const normalizedName = + indexOfFileExtension === -1 + ? name + : name + .slice(0, indexOfFileExtension) + .split("/") + .map((n) => paramCase(n)) + .join("/"); + + return normalizedName; +} diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/parseTokenPath.ts b/packages/calcite-design-tokens/support/token-transformer/utils/parseTokenPath.ts new file mode 100644 index 00000000000..be913664056 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/parseTokenPath.ts @@ -0,0 +1,26 @@ +/** + * Replaces the word "color" with "ui" when it is the first value in the path and removes the word "default" from the final token names. + * This puts generated tokens in alignment with the theme variable names in Calcite-Colors + * + * @param {string[]} path the path to each token value in the Style Dictionary token object + * @returns {string[]} an updated token path + */ +export const parseTokenPath = (path: string[]): string[] => { + return path.reduce((acc, p, idx) => { + if (["core", "semantic"].includes(p)) { + return acc; + } + + if (idx === 0 && p === "color") { + acc.push("ui"); + } else if (p === "default") { + return acc; + } else if (acc[acc.length - 1] && p.includes(acc[acc.length - 1])) { + acc[acc.length - 1] = p; + } else { + acc.push(p); + } + + return acc; + }, []); +}; diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/regex.ts b/packages/calcite-design-tokens/support/token-transformer/utils/regex.ts new file mode 100644 index 00000000000..744ceeae59d --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/regex.ts @@ -0,0 +1,9 @@ +// Match files and tokens which include "[" or "]" +export const matchPlaceholderElement = /[\[\]]/g; + +// Match custom variable indicator created by Designers in Token Studio. +// Using the ${token.name} format in Token Studio makes it much easier for Designers to search for token references while doing their work. +export const tokenStudioCustomVariableIndicator = /\$[.\w-]+/g; + +// Match files and tokens which include "backup", "[", "]", or file extensions +export const matchExclusions = /(backup|\[|\])(?=\.\w+$)/; diff --git a/packages/calcite-design-tokens/support/token-transformer/utils/transformOptions.ts b/packages/calcite-design-tokens/support/token-transformer/utils/transformOptions.ts new file mode 100644 index 00000000000..06bb344d2d4 --- /dev/null +++ b/packages/calcite-design-tokens/support/token-transformer/utils/transformOptions.ts @@ -0,0 +1,29 @@ +import { + SingleBorderToken, + SingleBoxShadowToken, + SingleCompositionToken, + SingleToken, + SingleTypographyToken, +} from "@tokens-studio/types"; + +/** + * Copied from https://github.com/tokens-studio/sd-transforms/blob/main/src/TransformOptions.ts + * This is needed for correct type setting and is not exported by Token Studio SD Transforms. + */ +export type ExpandTokens = SingleCompositionToken | SingleTypographyToken | SingleBorderToken | SingleBoxShadowToken; +export const expandTokensAsStringsArray = ["composition", "typography", "border", "boxShadow"]; +export type ExpandTokensAsStrings = (typeof expandTokensAsStringsArray)[number]; + +export type ExpandFilter = (token: T, filePath: string) => boolean; + +export interface ExpandOptions { + typography?: boolean | ExpandFilter; + border?: boolean | ExpandFilter; + shadow?: boolean | ExpandFilter; + composition?: boolean | ExpandFilter; +} + +export interface TransformOptions { + expand?: ExpandOptions | false; + excludeParentKeys?: boolean; +} diff --git a/packages/calcite-design-tokens/tsconfig-base.json b/packages/calcite-design-tokens/tsconfig-base.json new file mode 100644 index 00000000000..c31bc3b1706 --- /dev/null +++ b/packages/calcite-design-tokens/tsconfig-base.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "allowUnreachableCode": false, + "declaration": false, + "esModuleInterop": true, + "experimentalDecorators": true, + "lib": ["dom", "dom.iterable", "ES2021"], + "module": "esnext", + "moduleResolution": "node", + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "target": "ES2021" + }, + "exclude": ["node_modules", "dist"] +} diff --git a/packages/calcite-design-tokens/tsconfig-eslint.json b/packages/calcite-design-tokens/tsconfig-eslint.json new file mode 100644 index 00000000000..acd50dd751a --- /dev/null +++ b/packages/calcite-design-tokens/tsconfig-eslint.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig-base.json", + "include": ["./**/*"] +} diff --git a/packages/calcite-design-tokens/tsconfig.json b/packages/calcite-design-tokens/tsconfig.json new file mode 100755 index 00000000000..87330b6212a --- /dev/null +++ b/packages/calcite-design-tokens/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig-base", + "include": ["support", "src"] +} diff --git a/release-please-config.json b/release-please-config.json index afdac6ce85e..a3f0a973af5 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,6 +8,9 @@ "component": "@esri/calcite-components", "extra-files": ["readme.md"] }, + "packages/calcite-design-tokens": { + "component": "@esri/calcite-design-tokens" + }, "packages/calcite-components-react": { "component": "@esri/calcite-components-react" },