diff --git a/.github/renovate.json b/.github/renovate.json index 6690f33923..fc53553ce1 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -34,7 +34,6 @@ "ng-packagr", "playwright", "remark-gfm", - "style-dictionary", "typescript", "zone.js" ], diff --git a/change/@ni-nimble-tokens-277e42ee-163c-4d3f-a31c-44a524b178a1.json b/change/@ni-nimble-tokens-277e42ee-163c-4d3f-a31c-44a524b178a1.json new file mode 100644 index 0000000000..554a8d760c --- /dev/null +++ b/change/@ni-nimble-tokens-277e42ee-163c-4d3f-a31c-44a524b178a1.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Migrate to style dictionary v4", + "packageName": "@ni/nimble-tokens", + "email": "rajsite@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/package-lock.json b/package-lock.json index f402002124..4751afaf02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3705,6 +3705,195 @@ "node": ">=6.9.0" } }, + "node_modules/@bundled-es-modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-Rk453EklPUPC3NRWc3VUNI/SSUjdBaFoaQvFRmNBNtMHVtOFD5AntiWg5kEE1hqcPqedYFDzxE3ZcMYPcA195w==", + "dev": true, + "dependencies": { + "deepmerge": "^4.3.1" + } + }, + "node_modules/@bundled-es-modules/glob": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/glob/-/glob-10.4.2.tgz", + "integrity": "sha512-740y5ofkzydsFao5EXJrGilcIL6EFEw/cmPf2uhTw9J6G1YOhiIFjNFCHdpgEiiH5VlU3G0SARSjlFlimRRSMA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "buffer": "^6.0.3", + "events": "^3.3.0", + "glob": "^10.4.2", + "patch-package": "^8.0.0", + "path": "^0.12.7", + "stream": "^0.0.3", + "string_decoder": "^1.3.0", + "url": "^0.11.3" + } + }, + "node_modules/@bundled-es-modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@bundled-es-modules/glob/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/@bundled-es-modules/glob/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@bundled-es-modules/glob/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/@bundled-es-modules/glob/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/@bundled-es-modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@bundled-es-modules/glob/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@bundled-es-modules/memfs": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/memfs/-/memfs-4.9.4.tgz", + "integrity": "sha512-1XyYPUaIHwEOdF19wYVLBtHJRr42Do+3ctht17cZOHwHf67vkmRNPlYDGY2kJps4RgE5+c7nEZmEzxxvb1NZWA==", + "dev": true, + "dependencies": { + "assert": "^2.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "memfs": "^4.9.3", + "path": "^0.12.7", + "stream": "^0.0.3", + "util": "^0.12.5" + } + }, + "node_modules/@bundled-es-modules/memfs/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/@bundled-es-modules/memfs/node_modules/memfs": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.11.1.tgz", + "integrity": "sha512-LZcMTBAgqUUKNXZagcZxvXXfgF1bHX7Y7nQ0QyEiNbRJgE29GhgPd8Yna1VQcLlPiHt/5RFJMWYN9Uv/VPNvjQ==", + "dev": true, + "dependencies": { + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + } + }, "node_modules/@chromatic-com/storybook": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/@chromatic-com/storybook/-/storybook-1.6.1.tgz", @@ -10089,6 +10278,17 @@ "dev": true, "peer": true }, + "node_modules/@zip.js/zip.js": { + "version": "2.7.48", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.48.tgz", + "integrity": "sha512-J7cliimZ2snAbr0IhLx2U8BwfA1pKucahKzTpFtYq4hEgKxwvFJcIjCIVNPwQpfVab7iVP+AKmoH1gidBlyhiQ==", + "dev": true, + "engines": { + "bun": ">=0.7.0", + "deno": ">=1.0.0", + "node": ">=16.5.0" + } + }, "node_modules/@zkochan/js-yaml": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz", @@ -10579,6 +10779,19 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, "node_modules/assert-never": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.3.0.tgz", @@ -11472,17 +11685,6 @@ } ] }, - "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/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz", @@ -11561,24 +11763,10 @@ } }, "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" - } + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true }, "node_modules/character-entities": { "version": "2.0.2", @@ -12072,6 +12260,18 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "node_modules/component-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-2.0.0.tgz", + "integrity": "sha512-4m5s3Me2xxlVKG9PkZpQqHQR7bgpnN7joDMJ4yvVkVXngjoITG76IaZmzmywSeRTeTpc6N6r3H3+KyUurV8OYw==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -12305,17 +12505,6 @@ "node": "^14.18.0 || >=16.10.0" } }, - "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/constantinople": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", @@ -13117,7 +13306,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "peer": true, "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -15953,16 +16141,6 @@ "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/hosted-git-info": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", @@ -16959,6 +17137,22 @@ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", "dev": true }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", @@ -21527,6 +21721,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -21539,7 +21749,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "peer": true, "dependencies": { "call-bind": "^1.0.5", "define-properties": "^1.2.1", @@ -22154,22 +22363,22 @@ "node": ">=10" } }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dev": true, + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "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-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -22228,6 +22437,27 @@ "node": ">=8" } }, + "node_modules/path-unified": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/path-unified/-/path-unified-0.1.0.tgz", + "integrity": "sha512-/Oaz9ZJforrkmFrwkR/AcvjVsCAwGSJHO0X6O6ISj8YeFbATjIEBXLDcZfnK3MO4uvCBrJTdVIxdOc79PMqSdg==", + "dev": true + }, + "node_modules/path/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "node_modules/path/node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "dependencies": { + "inherits": "2.0.3" + } + }, "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", @@ -25049,17 +25279,6 @@ "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": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", @@ -25331,16 +25550,6 @@ "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", "dev": true }, - "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/socket.io": { "version": "4.7.5", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", @@ -25882,6 +26091,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stream": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.3.tgz", + "integrity": "sha512-aMsbn7VKrl4A2T7QAQQbzgN7NVc70vgF5INQrBXqn4dCXN1zy3L9HGgLO5s7PExmdrzTJ8uR/27aviW8or8/+A==", + "dev": true, + "dependencies": { + "component-emitter": "^2.0.0" + } + }, "node_modules/streamroller": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", @@ -26177,121 +26395,54 @@ } }, "node_modules/style-dictionary": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/style-dictionary/-/style-dictionary-3.9.2.tgz", - "integrity": "sha512-M2pcQ6hyRtqHOh+NyT6T05R3pD/gwNpuhREBKvxC1En0vyywx+9Wy9nXWT1SZ9ePzv1vAo65ItnpA16tT9ZUCg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/style-dictionary/-/style-dictionary-4.0.1.tgz", + "integrity": "sha512-aZ2iouI0i0DIXk3QhCkwOeo5rQeuk5Ja0PhHo32/EXCNuay4jK4CZ+hQJW0Er0J74VWniR+qaeoWgjklcULxOQ==", "dev": true, + "hasInstallScript": true, "dependencies": { - "chalk": "^4.0.0", - "change-case": "^4.1.2", + "@bundled-es-modules/deepmerge": "^4.3.1", + "@bundled-es-modules/glob": "^10.4.2", + "@bundled-es-modules/memfs": "^4.9.4", + "@zip.js/zip.js": "^2.7.44", + "chalk": "^5.3.0", + "change-case": "^5.3.0", "commander": "^8.3.0", - "fs-extra": "^10.0.0", - "glob": "^10.3.10", + "is-plain-obj": "^4.1.0", "json5": "^2.2.2", - "jsonc-parser": "^3.0.0", - "lodash": "^4.17.15", - "tinycolor2": "^1.4.1" + "patch-package": "^8.0.0", + "path-unified": "^0.1.0", + "tinycolor2": "^1.6.0" }, "bin": { - "style-dictionary": "bin/style-dictionary" + "style-dictionary": "bin/style-dictionary.js" }, "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/style-dictionary/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "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/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/style-dictionary/node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "node": ">=18.0.0" } }, - "node_modules/style-dictionary/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - }, - "node_modules/style-dictionary/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "node_modules/style-dictionary/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/style-dictionary/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "node_modules/style-dictionary/node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, "engines": { - "node": ">=16 || 14 >=14.18" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/style-loader": { @@ -27702,24 +27853,6 @@ "browserslist": ">= 4.21.0" } }, - "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", @@ -29622,7 +29755,7 @@ "license": "MIT", "devDependencies": { "@ni-private/eslint-config-nimble": "*", - "style-dictionary": "^3.9.2", + "style-dictionary": "^4.0.0", "svg-to-ts": "^12.0.0", "typescript": "~5.4.5" } diff --git a/packages/nimble-tokens/.eslintrc.js b/packages/nimble-tokens/.eslintrc.cjs similarity index 52% rename from packages/nimble-tokens/.eslintrc.js rename to packages/nimble-tokens/.eslintrc.cjs index 106b398566..ff1dc6da51 100644 --- a/packages/nimble-tokens/.eslintrc.js +++ b/packages/nimble-tokens/.eslintrc.cjs @@ -7,11 +7,30 @@ module.exports = { ], overrides: [ { - files: ['*.js'], + files: ['*.js', '*.cjs'], extends: ['@ni-private/eslint-config-nimble/javascript'], + parserOptions: { + ecmaVersion: '2022' + }, + }, + { + files: ['*.js'], + rules: { + 'import/extensions': ['error', + 'always', + { + ignorePackages: true, + } + ], + 'import/no-unresolved': ['error', + { + ignore: ['^style-dictionary$'], + } + ], + } }, { - files: ['source/styledictionary/*.js'], + files: ['source/styledictionary/*.cjs'], rules: { // Build scripts will not be in published package and are allowed to use devDependencies 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], diff --git a/packages/nimble-tokens/CONTRIBUTING.md b/packages/nimble-tokens/CONTRIBUTING.md index e4d148b787..e8d0c26e27 100644 --- a/packages/nimble-tokens/CONTRIBUTING.md +++ b/packages/nimble-tokens/CONTRIBUTING.md @@ -17,7 +17,7 @@ ## Editing Base Tokens -Base tokens are generated using the [Style Dictionary](https://amzn.github.io/style-dictionary/#/) build system, which transforms platform-agnostic token definition files into platform-specific output. These JSON definition files are the source of truth for the colors, fonts, and component design tokens in this repository. To modify the generated tokens, complete these steps: +Base tokens are generated using the [Style Dictionary](https://styledictionary.com/) build system, which transforms platform-agnostic token definition files into platform-specific output. These JSON definition files are the source of truth for the colors, fonts, and component design tokens in this repository. To modify the generated tokens, complete these steps: 1. Edit the JSON files in `source/styledictionary/properties`. Long term these tokens will be sourced from a Figma design spec but for now it's OK to make manual edits. 2. Rebuild the generated token files by running the repository's build command, `npm run build`. diff --git a/packages/nimble-tokens/build/.eslintrc.js b/packages/nimble-tokens/build/.eslintrc.cjs similarity index 100% rename from packages/nimble-tokens/build/.eslintrc.js rename to packages/nimble-tokens/build/.eslintrc.cjs diff --git a/packages/nimble-tokens/build/generate-font-scss.js b/packages/nimble-tokens/build/generate-font-scss.cjs similarity index 100% rename from packages/nimble-tokens/build/generate-font-scss.js rename to packages/nimble-tokens/build/generate-font-scss.cjs diff --git a/packages/nimble-tokens/build/svg-to-ts-config.js b/packages/nimble-tokens/build/svg-to-ts-config.js deleted file mode 100644 index 5c2ecd3b5c..0000000000 --- a/packages/nimble-tokens/build/svg-to-ts-config.js +++ /dev/null @@ -1,37 +0,0 @@ -const path = require('path'); - -const iconAssetDir = path.resolve(__dirname, '../dist/icons/svg/*.svg'); -const outputDir = path.resolve(__dirname, '../dist/icons/ts/'); - -console.log(`Icon asset directory :${iconAssetDir}`); -console.log(`Output icon TypeScript directory :${outputDir}`); - -const svgToTsConfig = { - srcFiles: [ - iconAssetDir - ], - prefix: '', - svgoConfig: { - // https://github.com/svg/svgo#built-in-plugins - plugins: [ - { - name: 'preset-default', - params: { - overrides: { - // customize default plugin options - removeUnknownsAndDefaults: { - keepDataAttrs: false, - }, - }, - }, - } - ], - }, - fileName: 'index', - outputDirectory: outputDir, - interfaceName: 'NimbleIcon', - typeName: 'NimbleIconName', - exportCompleteIconSet: false -}; - -module.exports = svgToTsConfig; diff --git a/packages/nimble-tokens/package.json b/packages/nimble-tokens/package.json index 09ce9bc220..b44211e559 100644 --- a/packages/nimble-tokens/package.json +++ b/packages/nimble-tokens/package.json @@ -4,8 +4,8 @@ "description": "Design tokens for the NI Nimble Design System", "scripts": { "build": "npm run build:svg-to-ts && npm run build:ts && npm run build:generate-font-scss && npm run build:style-dictionary", - "build:svg-to-ts": "svg-to-ts-constants --config build/svg-to-ts-config.js", - "build:generate-font-scss": "node build/generate-font-scss.js", + "build:svg-to-ts": "svg-to-ts-constants --config ./svg-to-ts-config.json", + "build:generate-font-scss": "node build/generate-font-scss.cjs", "build:style-dictionary": "cd source/styledictionary && node build.js", "build:ts": "tsc -p ./tsconfig.json", "build:ts:watch": "tsc -p ./tsconfig.json -w", @@ -14,6 +14,7 @@ "pack": "npm pack", "invoke-publish": "npm publish" }, + "type": "module", "repository": { "type": "git", "url": "git+https://github.com/ni/nimble.git" @@ -31,7 +32,7 @@ "homepage": "https://github.com/ni/nimble#readme", "devDependencies": { "@ni-private/eslint-config-nimble": "*", - "style-dictionary": "^3.9.2", + "style-dictionary": "^4.0.0", "svg-to-ts": "^12.0.0", "typescript": "~5.4.5" }, diff --git a/packages/nimble-tokens/source/styledictionary/build.js b/packages/nimble-tokens/source/styledictionary/build.js index 6d29df84c2..cb34976718 100644 --- a/packages/nimble-tokens/source/styledictionary/build.js +++ b/packages/nimble-tokens/source/styledictionary/build.js @@ -1,8 +1,7 @@ -require('./config'); -require('./nimble-extensions'); -const StyleDictionary = require('style-dictionary'); +import './config.js'; +import StyleDictionary from 'style-dictionary'; -const coreStyleDictionary = StyleDictionary.extend( +const coreStyleDictionary = new StyleDictionary( { source: [ 'properties/colors.json', @@ -18,7 +17,7 @@ const coreStyleDictionary = StyleDictionary.extend( format: 'css/variables' } ], - transformGroup: 'css', + transformGroup: 'nimble/css', buildPath: '../../dist/styledictionary/css/' }, js: { @@ -32,7 +31,7 @@ const coreStyleDictionary = StyleDictionary.extend( format: 'typescript/es6-declarations' } ], - transformGroup: 'js', + transformGroup: 'nimble/js', buildPath: '../../dist/styledictionary/js/' }, scss: { @@ -42,11 +41,13 @@ const coreStyleDictionary = StyleDictionary.extend( format: 'scss/variables' } ], - transformGroup: 'scss', + transformGroup: 'nimble/scss', buildPath: '../../dist/styledictionary/scss/' } } } ); +await coreStyleDictionary.hasInitialized; + coreStyleDictionary.buildAllPlatforms(); diff --git a/packages/nimble-tokens/source/styledictionary/config.js b/packages/nimble-tokens/source/styledictionary/config.js index abf2e1588b..959c778d2b 100644 --- a/packages/nimble-tokens/source/styledictionary/config.js +++ b/packages/nimble-tokens/source/styledictionary/config.js @@ -1,4 +1,4 @@ -const StyleDictionary = require('style-dictionary'); +import StyleDictionary from 'style-dictionary'; // Lodash code inlined so we don't have to import another library @@ -228,21 +228,34 @@ const getTokenNameFromProperty = function (prop) { StyleDictionary.registerTransform({ name: 'name/dsp/kebab', type: 'name', - matcher: function (_prop) { + filter: function (_prop) { return true; }, - transformer: function (prop) { + transform: function (prop) { return kebabCase(getTokenNameFromProperty(prop)); } }); +// Workaround as name/dsp/kebab does not support prefixes +// See: https://github.com/AdobeXD/design-system-package-dsp/issues/27 +StyleDictionary.registerTransform({ + name: 'name/nimble/kebab', + type: 'name', + filter: function (_prop) { + return true; + }, + transform: function (prop) { + return `ni-nimble-base-${kebabCase(getTokenNameFromProperty(prop))}`; + } +}); + StyleDictionary.registerTransform({ name: 'name/dsp/camel', type: 'name', - matcher: function (_prop) { + filter: function (_prop) { return true; }, - transformer: function (prop) { + transform: function (prop) { return camelCase(getTokenNameFromProperty(prop)); } }); @@ -250,10 +263,10 @@ StyleDictionary.registerTransform({ StyleDictionary.registerTransform({ name: 'name/dsp/snake', type: 'name', - matcher: function (_prop) { + filter: function (_prop) { return true; }, - transformer: function (prop) { + transform: function (prop) { return snakeCase(getTokenNameFromProperty(prop)); } }); @@ -261,95 +274,69 @@ StyleDictionary.registerTransform({ StyleDictionary.registerTransform({ name: 'name/dsp/pascal', type: 'name', - matcher: function (_prop) { + filter: function (_prop) { return true; }, - transformer: function (prop) { + transform: function (prop) { return upperFirst(camelCase(getTokenNameFromProperty(prop))); } }); -// Override default transform groups with custom name transform -StyleDictionary.registerTransformGroup({ - name: 'css', - transforms: [ - 'attribute/cti', - 'name/dsp/kebab', // replaces 'name/cti/kebab', - 'time/seconds', - 'content/icon', - 'size/rem', - 'color/css' - ] +StyleDictionary.registerTransform({ + type: 'value', + transitive: true, + name: 'font/weight', + filter: token => token.attributes.category === 'font', + transform: token => { + if (token.value === 'Light') { + token.value = '300'; + } else if (token.value === 'Regular') { + token.value = '400'; + } else if (token.value === 'Semibold') { + token.value = '600'; + } else if (token.value === 'Bold') { + token.value = '700'; + } + return token.value; + } }); +// Combination of DSP & Nimble transform overrides StyleDictionary.registerTransformGroup({ - name: 'scss', + name: 'nimble/css', transforms: [ 'attribute/cti', - 'name/dsp/kebab', // replaces 'name/cti/kebab', + 'name/nimble/kebab', // replaces name/dsp/kebab from DSP config 'time/seconds', - 'content/icon', - 'size/rem', + 'html/icon', + 'size/px', // replaces size/rem from DSP config 'color/css', + 'font/weight' ] }); +// Combination of DSP & Nimble transform overrides StyleDictionary.registerTransformGroup({ - name: 'android', + name: 'nimble/scss', transforms: [ 'attribute/cti', - 'name/dsp/snake', // replaces 'name/cti/snake', - 'color/hex8android', - 'size/remToSp', - 'size/remToDp', - ] -}); - -StyleDictionary.registerTransformGroup({ - name: 'ios', - transforms: [ - 'attribute/cti', - 'name/dsp/pascal', // replaces 'name/cti/pascal', - 'color/UIColor', - 'content/objC/literal', - 'asset/objC/literal', - 'size/remToPt', - 'font/objC/literal', - ] -}); - -StyleDictionary.registerTransformGroup({ - name: 'ios-swift', - transforms: [ - 'attribute/cti', - 'name/dsp/camel', // replaces 'name/cti/camel', - 'color/UIColorSwift', - 'content/swift/literal', - 'asset/swift/literal', - 'size/swift/remToCGFloat', - 'font/swift/literal', + 'name/nimble/kebab', // replaces name/dsp/kebab from DSP config + 'time/seconds', + 'html/icon', + 'size/px', // replaces size/rem from DSP config + 'color/css', + 'font/weight' ] }); +// Combination of DSP & Nimble transform overrides StyleDictionary.registerTransformGroup({ - name: 'js', + name: 'nimble/js', transforms: [ 'attribute/cti', 'name/dsp/pascal', // replaces 'name/cti/pascal', - 'size/rem', + 'size/px', // replaces size/rem from DSP config 'color/hex', - ] -}); - -StyleDictionary.registerTransformGroup({ - name: 'flutter', - transforms: [ - 'attribute/cti', - 'name/dsp/camel', // replaces 'name/cti/camel', - 'color/hex8flutter', - 'size/flutter/remToDouble', - 'content/flutter/literal', - 'asset/flutter/literal', - 'font/flutter/literal', + 'font/weight' ] }); diff --git a/packages/nimble-tokens/source/styledictionary/nimble-extensions.js b/packages/nimble-tokens/source/styledictionary/nimble-extensions.js deleted file mode 100644 index 881624c3dc..0000000000 --- a/packages/nimble-tokens/source/styledictionary/nimble-extensions.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * nimble-extensions.js is used as a custom configuration file in the Adobe XD - * extension settings. It both augments the ./config generated by the extension - * and performs additional StyleDictionary builds for custom platforms. - */ - -const StyleDictionary = require('style-dictionary'); - -StyleDictionary.registerTransform({ - type: 'value', - transitive: true, - name: 'font/weight', - matcher: token => token.attributes.category === 'font', - transformer: token => { - if (token.value === 'Light') { - token.value = '300'; - } else if (token.value === 'Regular') { - token.value = '400'; - } else if (token.value === 'Semibold') { - token.value = '600'; - } else if (token.value === 'Bold') { - token.value = '700'; - } - return token.value; - } -}); - -// Workaround as name/dsp/kebab does not support prefixes -// See: https://github.com/AdobeXD/design-system-package-dsp/issues/27 -const { type, matcher, transformer } = StyleDictionary.transform['name/dsp/kebab']; -StyleDictionary.registerTransform({ - name: 'name/nimble/kebab', - type, - matcher, - transformer: function (prop) { - return `ni-nimble-base-${transformer(prop)}`; - } -}); - -// Combination of DSP & Nimble transform overrides -StyleDictionary.registerTransformGroup({ - name: 'css', - transforms: [ - 'attribute/cti', - 'name/nimble/kebab', // replaces name/dsp/kebab from DSP config - 'time/seconds', - 'content/icon', - 'size/px', // replaces size/rem from DSP config - 'color/css', - 'font/weight' - ] -}); - -// Combination of DSP & Nimble transform overrides -StyleDictionary.registerTransformGroup({ - name: 'scss', - transforms: [ - 'attribute/cti', - 'name/nimble/kebab', // replaces name/dsp/kebab from DSP config - 'time/seconds', - 'content/icon', - 'size/px', // replaces size/rem from DSP config - 'color/css', - 'font/weight' - ] -}); - -// Combination of DSP & Nimble transform overrides -StyleDictionary.registerTransformGroup({ - name: 'js', - transforms: [ - 'attribute/cti', - 'name/dsp/pascal', // replaces 'name/cti/pascal', - 'size/px', // replaces size/rem from DSP config - 'color/hex', - 'font/weight' - ] -}); diff --git a/packages/nimble-tokens/source/styledictionary/properties/colors.json b/packages/nimble-tokens/source/styledictionary/properties/colors.json index 63e89a61d8..d8798c4fd7 100644 --- a/packages/nimble-tokens/source/styledictionary/properties/colors.json +++ b/packages/nimble-tokens/source/styledictionary/properties/colors.json @@ -1,187 +1,248 @@ { "color": { "SL_LegacyBlue": { - "value": "#009FF5ff" + "value": "#009FF5ff", + "type": "color" }, "Information100_DarkUI": { - "value": "#A46EFFff" + "value": "#A46EFFff", + "type": "color" }, "Information100_LightUI": { - "value": "#804AD9ff" + "value": "#804AD9ff", + "type": "color" }, "Warning100_DarkUI": { - "value": "#FF8126ff" + "value": "#FF8126ff", + "type": "color" }, "Pass100_LightUI": { - "value": "#009921ff" + "value": "#009921ff", + "type": "color" }, "Pass100_DarkUI": { - "value": "#00C12Bff" + "value": "#00C12Bff", + "type": "color" }, "WarningTypography_LightUI": { - "value": "#D3440Dff" + "value": "#D3440Dff", + "type": "color" }, "PassTypography_LightUI": { - "value": "#00801Cff" + "value": "#00801Cff", + "type": "color" }, "Fail100_LightUI": { - "value": "#C4000Cff" + "value": "#C4000Cff", + "type": "color" }, "Fail100_DarkUI": { - "value": "#FF4646ff" + "value": "#FF4646ff", + "type": "color" }, "Black75": { - "value": "#818386ff" + "value": "#818386ff", + "type": "color" }, "Black15": { - "value": "#F1F1F2ff" + "value": "#F1F1F2ff", + "type": "color" }, "Black7": { - "value": "#F5F5F5ff" + "value": "#F5F5F5ff", + "type": "color" }, "White": { - "value": "#FFFFFFff" + "value": "#FFFFFFff", + "type": "color" }, "Black88": { - "value": "#252526ff" + "value": "#252526ff", + "type": "color" }, "Black85": { - "value": "#363738ff" + "value": "#363738ff", + "type": "color" }, "Black80": { - "value": "#505153ff" + "value": "#505153ff", + "type": "color" }, "Black": { - "value": "#000000ff" + "value": "#000000ff", + "type": "color" }, "Black95": { - "value": "#0E0F0Fff" + "value": "#0E0F0Fff", + "type": "color" }, "Black91": { - "value": "#161617ff" + "value": "#161617ff", + "type": "color" }, "ForestGreen": { - "value": "#074023ff" + "value": "#074023ff", + "type": "color" }, "DigitalGreenLight": { - "value": "#009B65ff" + "value": "#009B65ff", + "type": "color" }, "DigitalGreenLight10": { - "value": "#E6F5F0ff" + "value": "#E6F5F0ff", + "type": "color" }, "Brand85": { - "value": "#26A97Cff" + "value": "#26A97Cff", + "type": "color" }, "Brand100": { - "value": "#009B65ff" + "value": "#009B65ff", + "type": "color" }, "Fail85": { - "value": "#CF1A37ff" + "value": "#CF1A37ff", + "type": "color" }, "NI Sky": { - "value": "#3CB4E7ff" + "value": "#3CB4E7ff", + "type": "color" }, "Banner_Fail_100_DarkUI": { - "value": "#D63434ff" + "value": "#D63434ff", + "type": "color" }, "Warning100LightUI": { - "value": "#FF4B00ff" + "value": "#FF4B00ff", + "type": "color" }, "Black30": { - "value": "#D3D5D6ff" + "value": "#D3D5D6ff", + "type": "color" }, "Black50": { - "value": "#AEB0B3ff" + "value": "#AEB0B3ff", + "type": "color" }, "DigitalGreenDark": { - "value": "#008557ff" + "value": "#008557ff", + "type": "color" }, "DigitalGreenDark105": { - "value": "#00734Bff" + "value": "#00734Bff", + "type": "color" }, "DigitalGreenDark110": { - "value": "#00613Fff" + "value": "#00613Fff", + "type": "color" }, "PowerGreen": { - "value": "#32EB96ff" + "value": "#32EB96ff", + "type": "color" }, "PowerGreen10": { - "value": "#364941ff" + "value": "#364941ff", + "type": "color" }, "Black22": { - "value": "#E6E6E6ff" + "value": "#E6E6E6ff", + "type": "color" }, "CMYK NI Pale Green": { - "value": "#CCDCC8ff" + "value": "#CCDCC8ff", + "type": "color" }, "RGB NI Pale Green": { - "value": "#CDDCC8ff" + "value": "#CDDCC8ff", + "type": "color" }, "RGB NI Forest Green": { - "value": "#044123ff" + "value": "#044123ff", + "type": "color" }, "CMYK NI Nickel": { - "value": "#AEA19Aff" + "value": "#AEA19Aff", + "type": "color" }, "CMYK NI Forest Green": { - "value": "#044123ff" + "value": "#044123ff", + "type": "color" }, "RGB NI Green": { - "value": "#03B585ff" + "value": "#03B585ff", + "type": "color" }, "CMYK NI Green": { - "value": "#03B585ff" + "value": "#03B585ff", + "type": "color" }, "CMYK NI Honey Dark 3": { - "value": "#292011ff" + "value": "#292011ff", + "type": "color" }, "Black82": { - "value": "#434445ff" + "value": "#434445ff", + "type": "color" }, "IndigoDark1": { - "value": "#57539Eff" + "value": "#57539Eff", + "type": "color" }, "IndigoDark2": { - "value": "#312E7Fff" + "value": "#312E7Fff", + "type": "color" }, "NI Honey Light": { - "value": "#FFE76Bff" + "value": "#FFE76Bff", + "type": "color" }, "NI Scarlet": { - "value": "#EF463Fff" + "value": "#EF463Fff", + "type": "color" }, "NI Fern": { - "value": "#76BC43ff" + "value": "#76BC43ff", + "type": "color" }, "NI Scarlet Dark 3": { - "value": "#371615ff" + "value": "#371615ff", + "type": "color" }, "NI Scarlet Dark 1": { - "value": "#CD1722ff" + "value": "#CD1722ff", + "type": "color" }, "NI Fern Dark 1": { - "value": "#499146ff" + "value": "#499146ff", + "type": "color" }, "NI Sea": { - "value": "#00ABA5ff" + "value": "#00ABA5ff", + "type": "color" }, "NI Sea Light": { - "value": "#A5D8C8ff" + "value": "#A5D8C8ff", + "type": "color" }, "NI Tulip": { - "value": "#E54C8Aff" + "value": "#E54C8Aff", + "type": "color" }, "NI Indigo": { - "value": "#8E78B7ff" + "value": "#8E78B7ff", + "type": "color" }, "NI Plum Dark 1": { - "value": "#8C459Aff" + "value": "#8C459Aff", + "type": "color" }, "NI Indigo Dark 2": { - "value": "#312E7Fff" + "value": "#312E7Fff", + "type": "color" }, "NI Sea Dark 2": { - "value": "#00685Fff" + "value": "#00685Fff", + "type": "color" } } } \ No newline at end of file diff --git a/packages/nimble-tokens/source/styledictionary/properties/fonts.json b/packages/nimble-tokens/source/styledictionary/properties/fonts.json index deb91d17f8..93ea1fc39b 100644 --- a/packages/nimble-tokens/source/styledictionary/properties/fonts.json +++ b/packages/nimble-tokens/source/styledictionary/properties/fonts.json @@ -260,100 +260,132 @@ "size": { "font": { "Title_2": { - "value": "22" + "value": "22", + "type": "fontSize" }, "ControlLabel_1": { - "value": "11" + "value": "11", + "type": "fontSize" }, "Body": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Body_2": { - "value": "16" + "value": "16", + "type": "fontSize" }, "Header0": { - "value": "36" + "value": "36", + "type": "fontSize" }, "SubHeader": { - "value": "12" + "value": "12", + "type": "fontSize" }, "Header1": { - "value": "24" + "value": "24", + "type": "fontSize" }, "GroupLabel_1": { - "value": "11" + "value": "11", + "type": "fontSize" }, "ButtonLabel_1": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Title_1": { - "value": "19" + "value": "19", + "type": "fontSize" }, "Link_ColorUI": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Link_DarkUI": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Headline_2": { - "value": "29.1" + "value": "29.1", + "type": "fontSize" }, "Placeholder": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Tooltip_Caption": { - "value": "11" + "value": "11", + "type": "fontSize" }, "BodyEmphasized": { - "value": "14" + "value": "14", + "type": "fontSize" }, "BodyEmphasized_2": { - "value": "16" + "value": "16", + "type": "fontSize" }, "Subtitle_1": { - "value": "12.8" + "value": "12.8", + "type": "fontSize" }, "Title_3": { - "value": "25" + "value": "25", + "type": "fontSize" }, "Subtitle_2": { - "value": "16" + "value": "16", + "type": "fontSize" }, "Link_LightUI": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Headline_1": { - "value": "25" + "value": "25", + "type": "fontSize" }, "ControlLabel_1_Chinese_Mac": { - "value": "11" + "value": "11", + "type": "fontSize" }, "ButtonLabel_1_Chinese_Mac": { - "value": "11" + "value": "11", + "type": "fontSize" }, "Body_Chinese_Mac": { - "value": "13" + "value": "13", + "type": "fontSize" }, "Error_ColorUI": { - "value": "11" + "value": "11", + "type": "fontSize" }, "Link_Visited_LightUI": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Error_LightUI": { - "value": "11" + "value": "11", + "type": "fontSize" }, "Error_DarkUI": { - "value": "11" + "value": "11", + "type": "fontSize" }, "Link_Selection100_LightUI": { - "value": "14" + "value": "14", + "type": "fontSize" }, "Grid_Header": { - "value": "12.8" + "value": "12.8", + "type": "fontSize" }, "GroupLabel_Expander": { - "value": "14" + "value": "14", + "type": "fontSize" } } } diff --git a/packages/nimble-tokens/source/styledictionary/properties/sizes.json b/packages/nimble-tokens/source/styledictionary/properties/sizes.json index 0b6de7129d..89edab6a08 100644 --- a/packages/nimble-tokens/source/styledictionary/properties/sizes.json +++ b/packages/nimble-tokens/source/styledictionary/properties/sizes.json @@ -1,55 +1,72 @@ { "size": { "Body-line-height": { - "value": "18" + "value": "18", + "type": "fontSize" }, "Body_2-line-height": { - "value": "16" + "value": "16", + "type": "fontSize" }, "ControlLabel_1-line-height": { - "value": "16" + "value": "16", + "type": "fontSize" }, "GroupLabel_1-line-height": { - "value": "16" + "value": "16", + "type": "fontSize" }, "Headline_2-line-height": { - "value": "40" + "value": "40", + "type": "fontSize" }, "Headline_1-line-height": { - "value": "32" + "value": "32", + "type": "fontSize" }, "Title_3-line-height": { - "value": "32" + "value": "32", + "type": "fontSize" }, "Title_2-line-height": { - "value": "28" + "value": "28", + "type": "fontSize" }, "Title_1-line-height": { - "value": "24" + "value": "24", + "type": "fontSize" }, "Subtitle_2-line-height": { - "value": "20" + "value": "20", + "type": "fontSize" }, "Subtitle_1-line-height": { - "value": "16" + "value": "16", + "type": "fontSize" }, "Link-line-height": { - "value": "18" + "value": "18", + "type": "fontSize" }, "Placeholder-line-height": { - "value": "18" + "value": "18", + "type": "fontSize" }, "BodyEmphasized-line-height": { - "value": "18" + "value": "18", + "type": "fontSize" }, "BodyEmphasized_2-line-height": { - "value": "16" + "value": "16", + "type": "fontSize" }, "ButtonLabel_1-line-height": { - "value": "16" + "value": "16", + "type": "fontSize" }, "TooltipCaption-line-height": { - "value": "14" + "value": "14", + "type": "fontSize" } } } \ No newline at end of file diff --git a/packages/nimble-tokens/svg-to-ts-config.json b/packages/nimble-tokens/svg-to-ts-config.json new file mode 100644 index 0000000000..d837e486b1 --- /dev/null +++ b/packages/nimble-tokens/svg-to-ts-config.json @@ -0,0 +1,26 @@ + +{ + "srcFiles": [ + "./dist/icons/svg/*.svg" + ], + "prefix": "", + "svgoConfig": { + "plugins": [ + { + "name": "preset-default", + "params": { + "overrides": { + "removeUnknownsAndDefaults": { + "keepDataAttrs": false + } + } + } + } + ] + }, + "fileName": "index", + "outputDirectory": "./dist/icons/ts/", + "interfaceName": "NimbleIcon", + "typeName": "NimbleIconName", + "exportCompleteIconSet": false +} diff --git a/packages/storybook/.storybook/preview.js b/packages/storybook/.storybook/preview.js index 4359bde805..eb612fae73 100644 --- a/packages/storybook/.storybook/preview.js +++ b/packages/storybook/.storybook/preview.js @@ -105,5 +105,5 @@ configureActions({ depth: 1 }); -// Update the GUID on this line to trigger a turbosnap full rebuild: 300cddbf-b808-403a-8561-9e41eed8a155 +// Update the GUID on this line to trigger a turbosnap full rebuild: 6cfef34a-5839-43ea-8588-0cb891bcf7b8 // See https://www.chromatic.com/docs/turbosnap/#full-rebuilds