From c07e9e2ab517bcc5bd96657483a69e3dade326d5 Mon Sep 17 00:00:00 2001 From: castastrophe Date: Fri, 8 Dec 2023 10:18:27 -0500 Subject: [PATCH] feat(icon,ui-icons)!: migrate the icon compiler to a distinct package BREAKING CHANGE: - icon will no longer contain SVG assets --- .github/actions/file-diff/index.js | 60 ++-- .github/workflows/compare-results.yml | 30 +- .storybook/main.js | 1 - .storybook/package.json | 2 +- README.md | 4 +- components/icon/README.md | 2 +- components/icon/combined/Arrow100.svg | 1 - components/icon/combined/Arrow200.svg | 1 - components/icon/combined/Arrow300.svg | 1 - components/icon/combined/Arrow400.svg | 1 - components/icon/combined/Arrow500.svg | 1 - components/icon/combined/Arrow600.svg | 1 - components/icon/combined/Arrow75.svg | 1 - components/icon/combined/Asterisk100.svg | 1 - components/icon/combined/Asterisk200.svg | 1 - components/icon/combined/Asterisk300.svg | 1 - components/icon/combined/Asterisk75.svg | 1 - components/icon/combined/Checkmark100.svg | 1 - components/icon/combined/Checkmark200.svg | 1 - components/icon/combined/Checkmark300.svg | 1 - components/icon/combined/Checkmark400.svg | 1 - components/icon/combined/Checkmark50.svg | 1 - components/icon/combined/Checkmark500.svg | 1 - components/icon/combined/Checkmark600.svg | 1 - components/icon/combined/Checkmark75.svg | 1 - components/icon/combined/Chevron100.svg | 1 - components/icon/combined/Chevron200.svg | 1 - components/icon/combined/Chevron300.svg | 1 - components/icon/combined/Chevron400.svg | 1 - components/icon/combined/Chevron50.svg | 1 - components/icon/combined/Chevron500.svg | 1 - components/icon/combined/Chevron600.svg | 1 - components/icon/combined/Chevron75.svg | 1 - .../icon/combined/CornerTriangle100.svg | 1 - .../icon/combined/CornerTriangle200.svg | 1 - .../icon/combined/CornerTriangle300.svg | 1 - components/icon/combined/CornerTriangle75.svg | 1 - components/icon/combined/Cross100.svg | 1 - components/icon/combined/Cross200.svg | 1 - components/icon/combined/Cross300.svg | 1 - components/icon/combined/Cross400.svg | 1 - components/icon/combined/Cross500.svg | 1 - components/icon/combined/Cross600.svg | 1 - components/icon/combined/Cross75.svg | 1 - components/icon/combined/Dash100.svg | 1 - components/icon/combined/Dash200.svg | 1 - components/icon/combined/Dash300.svg | 1 - components/icon/combined/Dash400.svg | 1 - components/icon/combined/Dash50.svg | 1 - components/icon/combined/Dash500.svg | 1 - components/icon/combined/Dash600.svg | 1 - components/icon/combined/Dash75.svg | 1 - components/icon/combined/DoubleGripper.svg | 1 - components/icon/combined/SingleGripper.svg | 1 - components/icon/combined/TripleGripper.svg | 1 - components/icon/gulpfile.js | 138 +-------- components/icon/package.json | 12 +- components/icon/stories/template.js | 6 +- components/icon/stories/utilities.js | 2 +- package.json | 3 +- site/resources/js/docs.js | 2 +- site/templates/individualComponent.pug | 2 +- tasks/clean-up-after-migration.sh | 5 + tools/bundle-builder/docs/index.js | 16 +- tools/bundle-builder/package.json | 2 + ui-icons/README.md | 30 ++ ui-icons/index.js | 118 +++++++ .../icon => ui-icons}/large/Arrow100.svg | 0 .../icon => ui-icons}/large/Arrow200.svg | 0 .../icon => ui-icons}/large/Arrow300.svg | 0 .../icon => ui-icons}/large/Arrow400.svg | 0 .../icon => ui-icons}/large/Arrow500.svg | 0 .../icon => ui-icons}/large/Arrow600.svg | 0 .../icon => ui-icons}/large/Arrow75.svg | 0 .../icon => ui-icons}/large/Asterisk100.svg | 0 .../icon => ui-icons}/large/Asterisk200.svg | 0 .../icon => ui-icons}/large/Asterisk300.svg | 0 .../icon => ui-icons}/large/Asterisk75.svg | 0 .../icon => ui-icons}/large/Checkmark100.svg | 0 .../icon => ui-icons}/large/Checkmark200.svg | 0 .../icon => ui-icons}/large/Checkmark300.svg | 0 .../icon => ui-icons}/large/Checkmark400.svg | 0 .../icon => ui-icons}/large/Checkmark50.svg | 0 .../icon => ui-icons}/large/Checkmark500.svg | 0 .../icon => ui-icons}/large/Checkmark600.svg | 0 .../icon => ui-icons}/large/Checkmark75.svg | 0 .../icon => ui-icons}/large/Chevron100.svg | 0 .../icon => ui-icons}/large/Chevron200.svg | 0 .../icon => ui-icons}/large/Chevron300.svg | 0 .../icon => ui-icons}/large/Chevron400.svg | 0 .../icon => ui-icons}/large/Chevron50.svg | 0 .../icon => ui-icons}/large/Chevron500.svg | 0 .../icon => ui-icons}/large/Chevron600.svg | 0 .../icon => ui-icons}/large/Chevron75.svg | 0 .../large/CornerTriangle100.svg | 0 .../large/CornerTriangle200.svg | 0 .../large/CornerTriangle300.svg | 0 .../large/CornerTriangle75.svg | 0 .../icon => ui-icons}/large/Cross100.svg | 0 .../icon => ui-icons}/large/Cross200.svg | 0 .../icon => ui-icons}/large/Cross300.svg | 0 .../icon => ui-icons}/large/Cross400.svg | 0 .../icon => ui-icons}/large/Cross500.svg | 0 .../icon => ui-icons}/large/Cross600.svg | 0 .../icon => ui-icons}/large/Cross75.svg | 0 .../icon => ui-icons}/large/Dash100.svg | 0 .../icon => ui-icons}/large/Dash200.svg | 0 .../icon => ui-icons}/large/Dash300.svg | 0 .../icon => ui-icons}/large/Dash400.svg | 0 .../icon => ui-icons}/large/Dash50.svg | 0 .../icon => ui-icons}/large/Dash500.svg | 0 .../icon => ui-icons}/large/Dash600.svg | 0 .../icon => ui-icons}/large/Dash75.svg | 0 .../icon => ui-icons}/large/DoubleGripper.svg | 0 .../icon => ui-icons}/large/SingleGripper.svg | 0 .../icon => ui-icons}/large/TripleGripper.svg | 0 .../icon => ui-icons}/medium/Arrow100.svg | 0 .../icon => ui-icons}/medium/Arrow200.svg | 0 .../icon => ui-icons}/medium/Arrow300.svg | 0 .../icon => ui-icons}/medium/Arrow400.svg | 0 .../icon => ui-icons}/medium/Arrow500.svg | 0 .../icon => ui-icons}/medium/Arrow600.svg | 0 .../icon => ui-icons}/medium/Arrow75.svg | 0 .../icon => ui-icons}/medium/Asterisk100.svg | 0 .../icon => ui-icons}/medium/Asterisk200.svg | 0 .../icon => ui-icons}/medium/Asterisk300.svg | 0 .../icon => ui-icons}/medium/Asterisk75.svg | 0 .../icon => ui-icons}/medium/Checkmark100.svg | 0 .../icon => ui-icons}/medium/Checkmark200.svg | 0 .../icon => ui-icons}/medium/Checkmark300.svg | 0 .../icon => ui-icons}/medium/Checkmark400.svg | 0 .../icon => ui-icons}/medium/Checkmark50.svg | 0 .../icon => ui-icons}/medium/Checkmark500.svg | 0 .../icon => ui-icons}/medium/Checkmark600.svg | 0 .../icon => ui-icons}/medium/Checkmark75.svg | 0 .../icon => ui-icons}/medium/Chevron100.svg | 0 .../icon => ui-icons}/medium/Chevron200.svg | 0 .../icon => ui-icons}/medium/Chevron300.svg | 0 .../icon => ui-icons}/medium/Chevron400.svg | 0 .../icon => ui-icons}/medium/Chevron50.svg | 0 .../icon => ui-icons}/medium/Chevron500.svg | 0 .../icon => ui-icons}/medium/Chevron600.svg | 0 .../icon => ui-icons}/medium/Chevron75.svg | 0 .../medium/CornerTriangle100.svg | 0 .../medium/CornerTriangle200.svg | 0 .../medium/CornerTriangle300.svg | 0 .../medium/CornerTriangle75.svg | 0 .../icon => ui-icons}/medium/Cross100.svg | 0 .../icon => ui-icons}/medium/Cross200.svg | 0 .../icon => ui-icons}/medium/Cross300.svg | 0 .../icon => ui-icons}/medium/Cross400.svg | 0 .../icon => ui-icons}/medium/Cross500.svg | 0 .../icon => ui-icons}/medium/Cross600.svg | 0 .../icon => ui-icons}/medium/Cross75.svg | 0 .../icon => ui-icons}/medium/Dash100.svg | 0 .../icon => ui-icons}/medium/Dash200.svg | 0 .../icon => ui-icons}/medium/Dash300.svg | 0 .../icon => ui-icons}/medium/Dash400.svg | 0 .../icon => ui-icons}/medium/Dash50.svg | 0 .../icon => ui-icons}/medium/Dash500.svg | 0 .../icon => ui-icons}/medium/Dash600.svg | 0 .../icon => ui-icons}/medium/Dash75.svg | 0 .../medium/DoubleGripper.svg | 0 .../medium/SingleGripper.svg | 0 .../medium/TripleGripper.svg | 0 ui-icons/package.json | 28 ++ ui-icons/svgo.config.js | 51 ++++ yarn.lock | 289 ++++++------------ 168 files changed, 402 insertions(+), 450 deletions(-) delete mode 100644 components/icon/combined/Arrow100.svg delete mode 100644 components/icon/combined/Arrow200.svg delete mode 100644 components/icon/combined/Arrow300.svg delete mode 100644 components/icon/combined/Arrow400.svg delete mode 100644 components/icon/combined/Arrow500.svg delete mode 100644 components/icon/combined/Arrow600.svg delete mode 100644 components/icon/combined/Arrow75.svg delete mode 100644 components/icon/combined/Asterisk100.svg delete mode 100644 components/icon/combined/Asterisk200.svg delete mode 100644 components/icon/combined/Asterisk300.svg delete mode 100644 components/icon/combined/Asterisk75.svg delete mode 100644 components/icon/combined/Checkmark100.svg delete mode 100644 components/icon/combined/Checkmark200.svg delete mode 100644 components/icon/combined/Checkmark300.svg delete mode 100644 components/icon/combined/Checkmark400.svg delete mode 100644 components/icon/combined/Checkmark50.svg delete mode 100644 components/icon/combined/Checkmark500.svg delete mode 100644 components/icon/combined/Checkmark600.svg delete mode 100644 components/icon/combined/Checkmark75.svg delete mode 100644 components/icon/combined/Chevron100.svg delete mode 100644 components/icon/combined/Chevron200.svg delete mode 100644 components/icon/combined/Chevron300.svg delete mode 100644 components/icon/combined/Chevron400.svg delete mode 100644 components/icon/combined/Chevron50.svg delete mode 100644 components/icon/combined/Chevron500.svg delete mode 100644 components/icon/combined/Chevron600.svg delete mode 100644 components/icon/combined/Chevron75.svg delete mode 100644 components/icon/combined/CornerTriangle100.svg delete mode 100644 components/icon/combined/CornerTriangle200.svg delete mode 100644 components/icon/combined/CornerTriangle300.svg delete mode 100644 components/icon/combined/CornerTriangle75.svg delete mode 100644 components/icon/combined/Cross100.svg delete mode 100644 components/icon/combined/Cross200.svg delete mode 100644 components/icon/combined/Cross300.svg delete mode 100644 components/icon/combined/Cross400.svg delete mode 100644 components/icon/combined/Cross500.svg delete mode 100644 components/icon/combined/Cross600.svg delete mode 100644 components/icon/combined/Cross75.svg delete mode 100644 components/icon/combined/Dash100.svg delete mode 100644 components/icon/combined/Dash200.svg delete mode 100644 components/icon/combined/Dash300.svg delete mode 100644 components/icon/combined/Dash400.svg delete mode 100644 components/icon/combined/Dash50.svg delete mode 100644 components/icon/combined/Dash500.svg delete mode 100644 components/icon/combined/Dash600.svg delete mode 100644 components/icon/combined/Dash75.svg delete mode 100644 components/icon/combined/DoubleGripper.svg delete mode 100644 components/icon/combined/SingleGripper.svg delete mode 100644 components/icon/combined/TripleGripper.svg create mode 100644 ui-icons/README.md create mode 100644 ui-icons/index.js rename {components/icon => ui-icons}/large/Arrow100.svg (100%) rename {components/icon => ui-icons}/large/Arrow200.svg (100%) rename {components/icon => ui-icons}/large/Arrow300.svg (100%) rename {components/icon => ui-icons}/large/Arrow400.svg (100%) rename {components/icon => ui-icons}/large/Arrow500.svg (100%) rename {components/icon => ui-icons}/large/Arrow600.svg (100%) rename {components/icon => ui-icons}/large/Arrow75.svg (100%) rename {components/icon => ui-icons}/large/Asterisk100.svg (100%) rename {components/icon => ui-icons}/large/Asterisk200.svg (100%) rename {components/icon => ui-icons}/large/Asterisk300.svg (100%) rename {components/icon => ui-icons}/large/Asterisk75.svg (100%) rename {components/icon => ui-icons}/large/Checkmark100.svg (100%) rename {components/icon => ui-icons}/large/Checkmark200.svg (100%) rename {components/icon => ui-icons}/large/Checkmark300.svg (100%) rename {components/icon => ui-icons}/large/Checkmark400.svg (100%) rename {components/icon => ui-icons}/large/Checkmark50.svg (100%) rename {components/icon => ui-icons}/large/Checkmark500.svg (100%) rename {components/icon => ui-icons}/large/Checkmark600.svg (100%) rename {components/icon => ui-icons}/large/Checkmark75.svg (100%) rename {components/icon => ui-icons}/large/Chevron100.svg (100%) rename {components/icon => ui-icons}/large/Chevron200.svg (100%) rename {components/icon => ui-icons}/large/Chevron300.svg (100%) rename {components/icon => ui-icons}/large/Chevron400.svg (100%) rename {components/icon => ui-icons}/large/Chevron50.svg (100%) rename {components/icon => ui-icons}/large/Chevron500.svg (100%) rename {components/icon => ui-icons}/large/Chevron600.svg (100%) rename {components/icon => ui-icons}/large/Chevron75.svg (100%) rename {components/icon => ui-icons}/large/CornerTriangle100.svg (100%) rename {components/icon => ui-icons}/large/CornerTriangle200.svg (100%) rename {components/icon => ui-icons}/large/CornerTriangle300.svg (100%) rename {components/icon => ui-icons}/large/CornerTriangle75.svg (100%) rename {components/icon => ui-icons}/large/Cross100.svg (100%) rename {components/icon => ui-icons}/large/Cross200.svg (100%) rename {components/icon => ui-icons}/large/Cross300.svg (100%) rename {components/icon => ui-icons}/large/Cross400.svg (100%) rename {components/icon => ui-icons}/large/Cross500.svg (100%) rename {components/icon => ui-icons}/large/Cross600.svg (100%) rename {components/icon => ui-icons}/large/Cross75.svg (100%) rename {components/icon => ui-icons}/large/Dash100.svg (100%) rename {components/icon => ui-icons}/large/Dash200.svg (100%) rename {components/icon => ui-icons}/large/Dash300.svg (100%) rename {components/icon => ui-icons}/large/Dash400.svg (100%) rename {components/icon => ui-icons}/large/Dash50.svg (100%) rename {components/icon => ui-icons}/large/Dash500.svg (100%) rename {components/icon => ui-icons}/large/Dash600.svg (100%) rename {components/icon => ui-icons}/large/Dash75.svg (100%) rename {components/icon => ui-icons}/large/DoubleGripper.svg (100%) rename {components/icon => ui-icons}/large/SingleGripper.svg (100%) rename {components/icon => ui-icons}/large/TripleGripper.svg (100%) rename {components/icon => ui-icons}/medium/Arrow100.svg (100%) rename {components/icon => ui-icons}/medium/Arrow200.svg (100%) rename {components/icon => ui-icons}/medium/Arrow300.svg (100%) rename {components/icon => ui-icons}/medium/Arrow400.svg (100%) rename {components/icon => ui-icons}/medium/Arrow500.svg (100%) rename {components/icon => ui-icons}/medium/Arrow600.svg (100%) rename {components/icon => ui-icons}/medium/Arrow75.svg (100%) rename {components/icon => ui-icons}/medium/Asterisk100.svg (100%) rename {components/icon => ui-icons}/medium/Asterisk200.svg (100%) rename {components/icon => ui-icons}/medium/Asterisk300.svg (100%) rename {components/icon => ui-icons}/medium/Asterisk75.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark100.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark200.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark300.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark400.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark50.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark500.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark600.svg (100%) rename {components/icon => ui-icons}/medium/Checkmark75.svg (100%) rename {components/icon => ui-icons}/medium/Chevron100.svg (100%) rename {components/icon => ui-icons}/medium/Chevron200.svg (100%) rename {components/icon => ui-icons}/medium/Chevron300.svg (100%) rename {components/icon => ui-icons}/medium/Chevron400.svg (100%) rename {components/icon => ui-icons}/medium/Chevron50.svg (100%) rename {components/icon => ui-icons}/medium/Chevron500.svg (100%) rename {components/icon => ui-icons}/medium/Chevron600.svg (100%) rename {components/icon => ui-icons}/medium/Chevron75.svg (100%) rename {components/icon => ui-icons}/medium/CornerTriangle100.svg (100%) rename {components/icon => ui-icons}/medium/CornerTriangle200.svg (100%) rename {components/icon => ui-icons}/medium/CornerTriangle300.svg (100%) rename {components/icon => ui-icons}/medium/CornerTriangle75.svg (100%) rename {components/icon => ui-icons}/medium/Cross100.svg (100%) rename {components/icon => ui-icons}/medium/Cross200.svg (100%) rename {components/icon => ui-icons}/medium/Cross300.svg (100%) rename {components/icon => ui-icons}/medium/Cross400.svg (100%) rename {components/icon => ui-icons}/medium/Cross500.svg (100%) rename {components/icon => ui-icons}/medium/Cross600.svg (100%) rename {components/icon => ui-icons}/medium/Cross75.svg (100%) rename {components/icon => ui-icons}/medium/Dash100.svg (100%) rename {components/icon => ui-icons}/medium/Dash200.svg (100%) rename {components/icon => ui-icons}/medium/Dash300.svg (100%) rename {components/icon => ui-icons}/medium/Dash400.svg (100%) rename {components/icon => ui-icons}/medium/Dash50.svg (100%) rename {components/icon => ui-icons}/medium/Dash500.svg (100%) rename {components/icon => ui-icons}/medium/Dash600.svg (100%) rename {components/icon => ui-icons}/medium/Dash75.svg (100%) rename {components/icon => ui-icons}/medium/DoubleGripper.svg (100%) rename {components/icon => ui-icons}/medium/SingleGripper.svg (100%) rename {components/icon => ui-icons}/medium/TripleGripper.svg (100%) create mode 100644 ui-icons/package.json create mode 100644 ui-icons/svgo.config.js diff --git a/.github/actions/file-diff/index.js b/.github/actions/file-diff/index.js index 82c77f45eba..0871d55eab3 100644 --- a/.github/actions/file-diff/index.js +++ b/.github/actions/file-diff/index.js @@ -113,19 +113,12 @@ async function run() { if (hasDiff) { // If a diff path was provided and the component folder doesn't exist, // report that the compiled assets were removed - if (!existsSync(join(diffPath, "components", name))) { + if ( + !existsSync(join(diffPath, "components", name)) || + (totalSize === 0 && totalDiffSize > 0) + ) { data.push("🚨 package deleted/moved/renamed"); - summaryTable.push(data); - return; - } - - if (totalSize > 0 && totalDiffSize === 0) { - data.push("⚠️ assets deleted/moved/renamed"); - summaryTable.push(data); - return; - } - - if (totalSize === 0 && totalDiffSize > 0) { + } else if (totalSize > 0 && totalDiffSize === 0) { data.push("🎉 new package"); } else { data.push(printChange(totalDiffSize - totalSize)); @@ -136,16 +129,15 @@ async function run() { md.push( ...[ - ["File", "Size", ...(hasDiff ? ["Original size", "Δ", "Δ%"] : [])], - [" - ", " - ", ...(hasDiff ? [" - ", " - ", " - "] : [])], + ["File", "Size", ...(hasDiff ? ["Base", "Δ"] : [])], + [" - ", " - ", ...(hasDiff ? [" - ", " - "] : [])], [ - "**Total changes**", + "**Total**", bytesToSize(totalSize), ...(hasDiff ? [ bytesToSize(totalDiffSize), - printChange(totalDiffSize - totalSize), - printPercentChange((totalDiffSize - totalSize) / totalSize), + `${printChange(totalDiffSize - totalSize)} (${printPercentChange((totalDiffSize - totalSize) / totalSize)})`, ] : []), ], @@ -158,20 +150,17 @@ async function run() { ) => { // @todo readable filename can be linked to html diff of the file? // https://github.com/adobe/spectrum-css/pull/2093/files#diff-6badd53e481452b5af234953767029ef2e364427dd84cdeed25f5778b6fca2e6 - const row = [ - readableFilename, - byteSize === 0 ? "**removed**" : bytesToSize(byteSize), - diffByteSize === 0 ? "" : bytesToSize(diffByteSize), + return [ + ...table, + [ + readableFilename, + byteSize === 0 && diffByteSize > 0 ? "**removed**" : bytesToSize(byteSize), + ...(hasDiff ? [ + bytesToSize(diffByteSize), + `${printChange(diffByteSize - byteSize)} (${printPercentChange((diffByteSize - byteSize) / byteSize)})`, + ] : []), + ] ]; - - if (hasDiff && diffByteSize > 0) { - if (byteSize === 0) row.push("", ""); - else { - row.push(printChange(diffByteSize - byteSize), ""); - } - } - - return [...table, row]; }, [] ) @@ -248,10 +237,8 @@ run(); */ const printChange = function (difference) { return difference === 0 - ? `No change 🎉` - : `${difference > 0 ? "+" : "-"}${bytesToSize(Math.abs(difference))} ${ - difference > 0 ? "⬆" : "⬇" - }`; + ? `-` + : `${difference > 0 ? "⬆" : "⬇"} ${bytesToSize(Math.abs(difference))}`; }; /** @@ -262,9 +249,8 @@ const printChange = function (difference) { * @returns {string} */ const printPercentChange = function (delta) { - if (delta === 0) return `0%`; - const direction = delta > 0 ? "+" : "-"; - return `${direction}${Math.abs(delta * 100).toFixed(2)}%`; + if (delta === 0) return `no change`; + return `${Math.abs(delta * 100).toFixed(2)}%`; }; /** diff --git a/.github/workflows/compare-results.yml b/.github/workflows/compare-results.yml index 164970fe2d5..6799cf9b3e9 100644 --- a/.github/workflows/compare-results.yml +++ b/.github/workflows/compare-results.yml @@ -73,17 +73,17 @@ jobs: shell: bash run: yarn install --frozen-lockfile --cache-folder .cache/yarn - - name: Download build artifacts for head ${{ inputs.head-sha }} + - name: Download build artifacts for head uses: actions/download-artifact@v3 with: name: ubuntu-latest-node18-compiled-assets-${{ inputs.head-sha }} - path: ${{ github.workspace }}/${{ inputs.head-sha }}/components + path: ${{ github.workspace }}/${{ inputs.head-sha }} - - name: Download build artifacts for base ${{ inputs.base-sha }} + - name: Download build artifacts for base uses: actions/download-artifact@v3 with: name: ubuntu-latest-node18-compiled-assets-${{ inputs.base-sha }} - path: ${{ github.workspace }}/${{ inputs.base-sha }}/components + path: ${{ github.workspace }}/${{ inputs.base-sha }} - name: Compare compiled output file size id: compare @@ -92,7 +92,10 @@ jobs: with: path: ${{ github.workspace }}/${{ inputs.head-sha }}/ diff-path: ${{ github.workspace }}/${{ inputs.base-sha }}/ - file-glob-pattern: components/*/dist/** + file-glob-pattern: | + components/*/dist/** + tokens/dist/** + ui-icons/dist/** token: ${{ secrets.GITHUB_TOKEN }} fetch-build-artifacts: @@ -161,16 +164,13 @@ jobs: uses: actions/cache@v3 with: path: | - components/*/dist/** + components/*/dist/** + tokens/dist/** + ui-icons/dist/** key: ${{ steps.derive-key.outputs.key }} - - name: Build components - if: ${{ matrix.branch == inputs.base-sha && steps.cache-build.outputs.cache-hit != 'true' }} - shell: bash - run: yarn build - - - name: Build components - if: ${{ matrix.branch == inputs.head-sha && steps.cache-build.outputs.cache-hit != 'true' }} + - name: Build + if: ${{ steps.cache-build.outputs.cache-hit != 'true' }} shell: bash run: yarn build @@ -179,7 +179,9 @@ jobs: uses: actions/upload-artifact@v3 with: path: | - ${{ github.workspace }}/components/*/dist/** + ${{ github.workspace }}/components/*/dist/** + ${{ github.workspace }}/tokens/dist/** + ${{ github.workspace }}/ui-icons/dist/** name: ${{ steps.derive-key.outputs.key }} # this is important, it lets us catch if the build failed silently # by alterting us that no compiled assets were generated diff --git a/.storybook/main.js b/.storybook/main.js index 9ca11a25831..2ba8d23801f 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -8,7 +8,6 @@ const componentPkgs = readdirSync(componentsPath, { .map((dirent) => dirent.name); module.exports = { stories: [ - "../components/*/stories/*.stories.mdx", "../components/*/stories/*.stories.@(js|jsx|ts|tsx)", ], rootDir: "../", diff --git a/.storybook/package.json b/.storybook/package.json index 4455788a01a..3e6d7929369 100644 --- a/.storybook/package.json +++ b/.storybook/package.json @@ -9,9 +9,9 @@ "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.5.4", "@spectrum-css/expressvars": "^3.0.9", - "@spectrum-css/icon": "^4.0.5", "@spectrum-css/site": "^4.0.2", "@spectrum-css/tokens": "^13.0.5", + "@spectrum-css/ui-icons": "^0.0.0", "@spectrum-css/vars": "^9.0.8" }, "devDependencies": { diff --git a/README.md b/README.md index 2a448f015cc..fe0775d32e6 100644 --- a/README.md +++ b/README.md @@ -149,13 +149,13 @@ For most use cases, you'll want to use `spectrum-css-icons.svg` so you have supp ```js ``` Based on which scales you'll be using, you can choose to load different files: -- `@spectrum-css/icon/dist/spectrum-css-icons.svg` - Both medium and large icons for responsive UIs that support both `.spectrum--medium` and `.spectrum--large` +- `@spectrum-css/ui-icons/dist/spectrum-css-icons.svg` - Both medium and large icons for responsive UIs that support both `.spectrum--medium` and `.spectrum--large` - `@spectrum-css/icon/dist/spectrum-css-icons-medium.svg` - Medium icons only, supports `.spectrum--medium` only - `@spectrum-css/icon/dist/spectrum-css-icons-large.svg` - Large icons only, supports `.spectrum--large` only diff --git a/components/icon/README.md b/components/icon/README.md index 5d366dd8373..131d6e408a8 100644 --- a/components/icon/README.md +++ b/components/icon/README.md @@ -1,3 +1,3 @@ # `@spectrum-css/icon` -The icons component contains all UI icons used for components as well as the CSS for UI and workflow icons. +The icons component contains the CSS for UI and workflow icons. diff --git a/components/icon/combined/Arrow100.svg b/components/icon/combined/Arrow100.svg deleted file mode 100644 index 5d9495daf8b..00000000000 --- a/components/icon/combined/Arrow100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Arrow200.svg b/components/icon/combined/Arrow200.svg deleted file mode 100644 index e5bf1d24f2e..00000000000 --- a/components/icon/combined/Arrow200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Arrow300.svg b/components/icon/combined/Arrow300.svg deleted file mode 100644 index 430c0fbfcd7..00000000000 --- a/components/icon/combined/Arrow300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Arrow400.svg b/components/icon/combined/Arrow400.svg deleted file mode 100644 index e7a7ff86a1a..00000000000 --- a/components/icon/combined/Arrow400.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Arrow500.svg b/components/icon/combined/Arrow500.svg deleted file mode 100644 index 7b3955088f0..00000000000 --- a/components/icon/combined/Arrow500.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Arrow600.svg b/components/icon/combined/Arrow600.svg deleted file mode 100644 index 63889473483..00000000000 --- a/components/icon/combined/Arrow600.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Arrow75.svg b/components/icon/combined/Arrow75.svg deleted file mode 100644 index 226861f00bd..00000000000 --- a/components/icon/combined/Arrow75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Asterisk100.svg b/components/icon/combined/Asterisk100.svg deleted file mode 100644 index c74ab400cb3..00000000000 --- a/components/icon/combined/Asterisk100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Asterisk200.svg b/components/icon/combined/Asterisk200.svg deleted file mode 100644 index f688c9ae487..00000000000 --- a/components/icon/combined/Asterisk200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Asterisk300.svg b/components/icon/combined/Asterisk300.svg deleted file mode 100644 index 8de0de3bbc5..00000000000 --- a/components/icon/combined/Asterisk300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Asterisk75.svg b/components/icon/combined/Asterisk75.svg deleted file mode 100644 index e95a4f91705..00000000000 --- a/components/icon/combined/Asterisk75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark100.svg b/components/icon/combined/Checkmark100.svg deleted file mode 100644 index 0918a9094b5..00000000000 --- a/components/icon/combined/Checkmark100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark200.svg b/components/icon/combined/Checkmark200.svg deleted file mode 100644 index 0d4eccceca5..00000000000 --- a/components/icon/combined/Checkmark200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark300.svg b/components/icon/combined/Checkmark300.svg deleted file mode 100644 index 8504dc9ef86..00000000000 --- a/components/icon/combined/Checkmark300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark400.svg b/components/icon/combined/Checkmark400.svg deleted file mode 100644 index 33650f0dd80..00000000000 --- a/components/icon/combined/Checkmark400.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark50.svg b/components/icon/combined/Checkmark50.svg deleted file mode 100644 index e085efccbae..00000000000 --- a/components/icon/combined/Checkmark50.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark500.svg b/components/icon/combined/Checkmark500.svg deleted file mode 100644 index f4d772c60b8..00000000000 --- a/components/icon/combined/Checkmark500.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark600.svg b/components/icon/combined/Checkmark600.svg deleted file mode 100644 index a42c6eb09c5..00000000000 --- a/components/icon/combined/Checkmark600.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Checkmark75.svg b/components/icon/combined/Checkmark75.svg deleted file mode 100644 index a5286ac4359..00000000000 --- a/components/icon/combined/Checkmark75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron100.svg b/components/icon/combined/Chevron100.svg deleted file mode 100644 index 22493212c69..00000000000 --- a/components/icon/combined/Chevron100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron200.svg b/components/icon/combined/Chevron200.svg deleted file mode 100644 index 8a7bf99e1fb..00000000000 --- a/components/icon/combined/Chevron200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron300.svg b/components/icon/combined/Chevron300.svg deleted file mode 100644 index e20dac4d0a8..00000000000 --- a/components/icon/combined/Chevron300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron400.svg b/components/icon/combined/Chevron400.svg deleted file mode 100644 index 1641d25b9e6..00000000000 --- a/components/icon/combined/Chevron400.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron50.svg b/components/icon/combined/Chevron50.svg deleted file mode 100644 index 012b82453d7..00000000000 --- a/components/icon/combined/Chevron50.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron500.svg b/components/icon/combined/Chevron500.svg deleted file mode 100644 index 3c0ae8e66d3..00000000000 --- a/components/icon/combined/Chevron500.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron600.svg b/components/icon/combined/Chevron600.svg deleted file mode 100644 index 8db52f3e8d2..00000000000 --- a/components/icon/combined/Chevron600.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Chevron75.svg b/components/icon/combined/Chevron75.svg deleted file mode 100644 index 935159c7b76..00000000000 --- a/components/icon/combined/Chevron75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/CornerTriangle100.svg b/components/icon/combined/CornerTriangle100.svg deleted file mode 100644 index 47a650d0438..00000000000 --- a/components/icon/combined/CornerTriangle100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/CornerTriangle200.svg b/components/icon/combined/CornerTriangle200.svg deleted file mode 100644 index e89560c2db9..00000000000 --- a/components/icon/combined/CornerTriangle200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/CornerTriangle300.svg b/components/icon/combined/CornerTriangle300.svg deleted file mode 100644 index 11c3c0c3edb..00000000000 --- a/components/icon/combined/CornerTriangle300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/CornerTriangle75.svg b/components/icon/combined/CornerTriangle75.svg deleted file mode 100644 index 03f37aa31bd..00000000000 --- a/components/icon/combined/CornerTriangle75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross100.svg b/components/icon/combined/Cross100.svg deleted file mode 100644 index 63a516ec314..00000000000 --- a/components/icon/combined/Cross100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross200.svg b/components/icon/combined/Cross200.svg deleted file mode 100644 index 88f4f399339..00000000000 --- a/components/icon/combined/Cross200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross300.svg b/components/icon/combined/Cross300.svg deleted file mode 100644 index bd1068ba8e4..00000000000 --- a/components/icon/combined/Cross300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross400.svg b/components/icon/combined/Cross400.svg deleted file mode 100644 index 68710a3d6f8..00000000000 --- a/components/icon/combined/Cross400.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross500.svg b/components/icon/combined/Cross500.svg deleted file mode 100644 index 0bb93d0987e..00000000000 --- a/components/icon/combined/Cross500.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross600.svg b/components/icon/combined/Cross600.svg deleted file mode 100644 index 3099c87ed1f..00000000000 --- a/components/icon/combined/Cross600.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Cross75.svg b/components/icon/combined/Cross75.svg deleted file mode 100644 index 66c90646cfa..00000000000 --- a/components/icon/combined/Cross75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash100.svg b/components/icon/combined/Dash100.svg deleted file mode 100644 index 2b209386e6e..00000000000 --- a/components/icon/combined/Dash100.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash200.svg b/components/icon/combined/Dash200.svg deleted file mode 100644 index f5bafe771d8..00000000000 --- a/components/icon/combined/Dash200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash300.svg b/components/icon/combined/Dash300.svg deleted file mode 100644 index e9a27a796ef..00000000000 --- a/components/icon/combined/Dash300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash400.svg b/components/icon/combined/Dash400.svg deleted file mode 100644 index 7c449733756..00000000000 --- a/components/icon/combined/Dash400.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash50.svg b/components/icon/combined/Dash50.svg deleted file mode 100644 index 41b03f153c9..00000000000 --- a/components/icon/combined/Dash50.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash500.svg b/components/icon/combined/Dash500.svg deleted file mode 100644 index ee54fd94d1d..00000000000 --- a/components/icon/combined/Dash500.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash600.svg b/components/icon/combined/Dash600.svg deleted file mode 100644 index d156681ebf7..00000000000 --- a/components/icon/combined/Dash600.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/Dash75.svg b/components/icon/combined/Dash75.svg deleted file mode 100644 index 5f0bcb248de..00000000000 --- a/components/icon/combined/Dash75.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/DoubleGripper.svg b/components/icon/combined/DoubleGripper.svg deleted file mode 100644 index fa7bc4a7745..00000000000 --- a/components/icon/combined/DoubleGripper.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/SingleGripper.svg b/components/icon/combined/SingleGripper.svg deleted file mode 100644 index 8012b8c6acc..00000000000 --- a/components/icon/combined/SingleGripper.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/combined/TripleGripper.svg b/components/icon/combined/TripleGripper.svg deleted file mode 100644 index 0a3fb3291fd..00000000000 --- a/components/icon/combined/TripleGripper.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/icon/gulpfile.js b/components/icon/gulpfile.js index 3684d6501e1..79fce384ab1 100644 --- a/components/icon/gulpfile.js +++ b/components/icon/gulpfile.js @@ -1,137 +1 @@ -/*! -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain a copy -of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under -the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -const gulp = require("gulp"); -const rename = require("gulp-rename"); -const path = require("path"); -const svgmin = require("gulp-svgmin"); -const replace = require("gulp-replace"); -const sort = require("gulp-sort"); -const svgcombiner = require("gulp-svgcombiner"); -const svgstore = require("gulp-svgstore"); -const del = require("del"); -const vinylPaths = require("vinyl-paths"); - -function clean() { - return del(["combined/**"]); -} - -function sanitizeIcons() { - return gulp - .src("{medium,large}/*.svg") - .pipe(replace(/[\s\S]*?<\/defs>/m, "")) - .pipe(replace(//m, "")) - .pipe( - svgmin({ - plugins: [ - { - removeAttrs: { - attrs: ["class", "data-name", "id"], - }, - }, - { collapseGroups: true }, - ], - }) - ) - .pipe(vinylPaths(del)) // delete the original file - .pipe( - rename( - (path) => - (path.basename = path.basename.split("_").pop().replace("Size", "")) - ) - ) - .pipe(gulp.dest("./")); -} - -function generateCombinedIcons() { - return gulp - .src("{medium,large}/*.svg") - .pipe(sort()) - .pipe( - svgcombiner({ - processName: function (filePath) { - // Clean filename - return path - .basename(filePath, path.extname(filePath)) - .replace(/S_UI(.*?)_.*/, "$1"); - }, - processClass: function (filePath) { - // Return the last directory - return ( - "spectrum-UIIcon--" + path.dirname(filePath).split(path.sep).pop() - ); - }, - }) - ) - .pipe(gulp.dest("combined/")); -} - -// Only ran by Adobe -const updateIcons = gulp.series(clean, sanitizeIcons, generateCombinedIcons); - -const tasks = require("@spectrum-css/component-builder"); - -function generateSVGSprite() { - return gulp - .src("combined/*.svg") - .pipe( - rename(function (filePath) { - filePath.basename = "spectrum-css-icon-" + filePath.basename; - }) - ) - .pipe( - svgstore({ - inlineSvg: true, - }) - ) - .pipe(rename("spectrum-css-icons.svg")) - .pipe(gulp.dest("dist/")); -} - -function getSVGSpriteTask(size) { - return function generateSVGSprite() { - return gulp - .src(`${size}/*.svg`) - .pipe( - rename(function (filePath) { - filePath.basename = - "spectrum-css-icon-" + - filePath.basename.replace(/S_UI(.*?)_.*/, "$1"); - }) - ) - .pipe( - svgstore({ - inlineSvg: true, - }) - ) - .pipe(rename(`spectrum-css-icons-${size}.svg`)) - .pipe(gulp.dest("dist/")); - }; -} - -const generateSVGSpriteMedium = getSVGSpriteTask("medium"); -const generateSVGSpriteLarge = getSVGSpriteTask("large"); - -const buildIcons = gulp.parallel( - generateSVGSpriteMedium, - generateSVGSpriteLarge, - generateSVGSprite -); - -const build = gulp.parallel(buildIcons, tasks.buildCSS); - -exports.updateIcons = updateIcons; -exports.build = - exports.buildLite = - exports.buildHeavy = - exports.buildMedium = - build; -exports.default = build; +module.exports = require("@spectrum-css/component-builder"); diff --git a/components/icon/package.json b/components/icon/package.json index 819b5f9f6bc..df12765657e 100644 --- a/components/icon/package.json +++ b/components/icon/package.json @@ -16,8 +16,7 @@ "main": "dist/index-vars.css", "scripts": { "build": "gulp", - "clean": "rimraf dist", - "update": "gulp updateIcons" + "clean": "rimraf dist" }, "peerDependencies": { "@spectrum-css/vars": ">=9" @@ -25,14 +24,7 @@ "devDependencies": { "@spectrum-css/component-builder": "^4.0.18", "@spectrum-css/vars": "^9.0.8", - "gulp": "^4.0.0", - "gulp-rename": "^1.4.0", - "gulp-replace": "^1.0.0", - "gulp-sort": "^2.0.0", - "gulp-svgcombiner": "^1.0.1", - "gulp-svgmin": "^2.1.0", - "gulp-svgstore": "^7.0.1", - "vinyl-paths": "^3.0.1" + "gulp": "^4.0.0" }, "publishConfig": { "access": "public" diff --git a/components/icon/stories/template.js b/components/icon/stories/template.js index 7550d028cdb..0dde5dd72f2 100644 --- a/components/icon/stories/template.js +++ b/components/icon/stories/template.js @@ -1,9 +1,9 @@ import { html } from "lit"; +import { classMap } from "lit/directives/class-map.js"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import { classMap } from "lit/directives/class-map.js"; -import { fetchIconSVG, workflowIcons, uiIcons } from "./utilities.js"; +import { fetchIconSVG, uiIcons, workflowIcons } from "./utilities.js"; import "../index.css"; @@ -153,7 +153,7 @@ export const Template = ({ /* webpackPrefetch: true */ `!!raw-loader!@adobe/spectrum-css-workflow-icons/dist/spectrum-icons.svg` ); import( - /* webpackPrefetch: true */ `!!raw-loader!@spectrum-css/icon/dist/spectrum-css-icons.svg` + /* webpackPrefetch: true */ `!!raw-loader!@spectrum-css/ui-icons/dist/spectrum-css-icons.svg` ); } catch (e) { console.warn(e); diff --git a/components/icon/stories/utilities.js b/components/icon/stories/utilities.js index fcccc6c9be9..fc3f444cfaf 100644 --- a/components/icon/stories/utilities.js +++ b/components/icon/stories/utilities.js @@ -41,7 +41,7 @@ export const fetchIconSVG = ({ // Check the ui kit for icon set if not yet found try { - icon = require(`!!raw-loader!@spectrum-css/icon/${ + icon = require(`!!raw-loader!@spectrum-css/ui-icons/${ scale ? scale : "medium" }/${iconName}.svg`); if (icon) return icon.default ?? icon; diff --git a/package.json b/package.json index 6de6b10aa0f..5539b9396d9 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "clean:preview": "nx clean storybook", "precompare": "yarn build", "compare": "node ./tasks/compare-compiled-output.js", - "predev": "yarn build:components", + "predev": "nx run-many --projects @spectrum-css/ui-icons,@spectrum-css/tokens --target build", "dev": "NODE_ENV=development BROWSERSYNC_OPEN=true gulp dev", "docs:mod": "node tasks/mod-extractor.js", "postdocs:mod": "prettier --cache --write components/*/metadata/*.md > /dev/null", @@ -63,6 +63,7 @@ "tools/*", "plugins/*", "tokens", + "ui-icons", "generator", ".storybook", ".github/actions/*" diff --git a/site/resources/js/docs.js b/site/resources/js/docs.js index 50f3db698bd..903f82378ff 100644 --- a/site/resources/js/docs.js +++ b/site/resources/js/docs.js @@ -14,7 +14,7 @@ governing permissions and limitations under the License. "use strict"; -loadIcons("components/icon/spectrum-css-icons.svg"); +loadIcons("img/spectrum-css-icons.svg"); loadIcons("img/spectrum-icons.svg"); // Show and hide code samples diff --git a/site/templates/individualComponent.pug b/site/templates/individualComponent.pug index a79514fb412..b6141e27cb9 100644 --- a/site/templates/individualComponent.pug +++ b/site/templates/individualComponent.pug @@ -61,7 +61,7 @@ html(lang='en-US' dir="ltr").spectrum.spectrum--light.spectrum--medium script(src='js/SpectrumSwitcher.js') script. - loadIcons('dependencies/@spectrum-css/icon/spectrum-css-icons.svg'); + loadIcons('img/spectrum-css-icons.svg'); var switcher = new SpectrumSwitcher(); style(type='text/css'). diff --git a/tasks/clean-up-after-migration.sh b/tasks/clean-up-after-migration.sh index 980e13846fc..ea9958541ef 100644 --- a/tasks/clean-up-after-migration.sh +++ b/tasks/clean-up-after-migration.sh @@ -24,6 +24,11 @@ test -d "components/vars" && rm -rf components/vars test -d "components/expressvars" && rm -rf components/expressvars test -d "components/tokens" && rm -rf components/tokens +# Migrated icons assets +test -d "components/icon/combined" && rm -rf components/icon/combined +test -d "components/icon/large" && rm -rf components/icon/large +test -d "components/icon/medium" && rm -rf components/icon/medium + # test -d "plugins/legacy-postcss-dropdupedvars" && rm -rf plugins/legacy-postcss-dropdupedvars # test -d "plugins/legacy-postcss-dropunusedvars" && rm -rf plugins/legacy-postcss-dropunusedvars # test -d "plugins/postcss-combininator" && rm -rf plugins/postcss-combininator diff --git a/tools/bundle-builder/docs/index.js b/tools/bundle-builder/docs/index.js index de16d07aa13..491c5c3fec7 100644 --- a/tools/bundle-builder/docs/index.js +++ b/tools/bundle-builder/docs/index.js @@ -353,7 +353,18 @@ function copySiteWorkflowIcons() { path.join( path.dirname(require.resolve("@adobe/spectrum-css-workflow-icons")), "spectrum-icons.svg" - ) + ), + ) + .pipe(gulp.dest("dist/img/")); +} + +function copySiteUIIcons() { + return gulp + .src( + path.join( + path.dirname(require.resolve("@spectrum-css/ui-icons")), + "spectrum-css-icons.svg" + ), ) .pipe(gulp.dest("dist/img/")); } @@ -368,7 +379,8 @@ let buildDocs = gulp.series( buildSite_generateIndex, buildDocs_individualPackages, buildSite_copyResources, - copySiteWorkflowIcons + copySiteWorkflowIcons, + copySiteUIIcons ) ); diff --git a/tools/bundle-builder/package.json b/tools/bundle-builder/package.json index 1435f419c9c..b4006fb643d 100644 --- a/tools/bundle-builder/package.json +++ b/tools/bundle-builder/package.json @@ -13,8 +13,10 @@ "url": "https://github.com/adobe/spectrum-css/issues" }, "dependencies": { + "@adobe/spectrum-css-workflow-icons": "^1.5.4", "@spectrum-css/expressvars": "^3.0.9", "@spectrum-css/tokens": "^13.0.5", + "@spectrum-css/ui-icons": "^0.0.0", "@spectrum-css/vars": "^9.0.8", "npm-registry-fetch": "^14.0.5" }, diff --git a/ui-icons/README.md b/ui-icons/README.md new file mode 100644 index 00000000000..afdce5c3e84 --- /dev/null +++ b/ui-icons/README.md @@ -0,0 +1,30 @@ +# @spectrum-css/ui-icons + +> The source for UI iconography used in Spectrum CSS + +This package uses SVGO to process SVGs and combines them into several sprite sheets for use in this and other projects. + +_Please do not import assets from the source directory as these are fluid and not part of the semantic publishing contract. Instead, use the `dist` directory._ + +## Installation + +```sh +yarn add -DW @spectrum-css/ui-icons +``` + +## Usage + +### SVGs + +SVGs are available in the `dist` directory. They are organized by size. The `dist` directory contains the following: + +- `medium`: assets to be used in desktop display formats +- `large`: assets to be used in mobile display formats +- `combined`: assets to be used in products requiring both desktop and mobile display icons to swap quickly or be used in parallel +- `spectrum-css-icons.svg`: a single sprite sheet containing all icons +- `spectrum-css-icons-medium.svg`: a single sprite sheet for medium icons +- `spectrum-css-icons-large.svg`: a single sprite sheet for large icons + +### CSS + +CSS for the icons is available from the `@spectrum-css/icon` package. See the [Icon documentation](../components/icon/README.md) for more information. diff --git a/ui-icons/index.js b/ui-icons/index.js new file mode 100644 index 00000000000..884926f2215 --- /dev/null +++ b/ui-icons/index.js @@ -0,0 +1,118 @@ +const fs = require('fs'); +const fsp = fs.promises; +const path = require('path'); + +const fg = require('fast-glob'); +const { optimize } = require('svgo'); +const combine = require('svgcombiner'); +const svgstore = require('svgstore'); + +async function setupIconStores() { + const stores = new Map(); + stores.set('all', svgstore()); + + for (const variant of await fg(['*'], { + cwd: __dirname, + ignore: ['dist', 'node_modules'], + onlyDirectories: true, + })) { + stores.set(variant, svgstore()); + } + + return stores; +} + +async function main() { + // Not using svgo's loadConfig because it doesn't support dynamic config files + const getSvgoConfig = require('./svgo.config.js'); + + // Hash to hold all icons arranged by processed name + const icons = new Map(); + const stores = await setupIconStores(); + const variants = [...stores.keys()].filter((key) => key !== 'all'); + + const files = await fg([`{${variants.join(',')}}/*.svg`], { + cwd: __dirname, + onlyFiles: true, + }); + + const promises = []; + for (const file of files) { + const assetName = path.basename(file, '.svg'); + + // Capture metadata about the icon from the path and filename + const variant = path.dirname(file); + + // Read in the SVG contents + const contents = await fsp.readFile(file, 'utf-8'); + const result = optimize(contents, getSvgoConfig({ clean: true })); + + icons.set(assetName, { + ...(icons.has(assetName) ? icons.get(assetName) : {}), + [variant]: result.data, + }); + + stores.get(variant).add(assetName, result.data); + + const dest = path.join(__dirname, 'dist', file); + if (!fs.existsSync(path.dirname(dest))) { + fs.mkdirSync(path.dirname(dest), { recursive: true }); + } + + promises.push(fsp.writeFile(dest, result.data)); + } + + // Wait for all the SVG content to be read in and processed before continuing + await Promise.all(promises); + + if (icons.size === 0) return; + + // For each entry in the map, combine the SVG variants into a single SVG file with multiple symbols + promises.length = 0; + [...icons.entries()].map(([iconName, data]) => { + // Combine the SVG variants into a single SVG file with multiple symbols + const contents = combine(iconName, data); + + // Add the combined SVG to the "all" store so we can generate a single SVG file with all icons + stores.get('all').add(iconName, contents); + + // Write the combined SVG to the dist folder + const destPath = path.join(__dirname, 'dist/combined'); + if (!fs.existsSync(destPath)) fs.mkdirSync(destPath, { recursive: true }); + + promises.push(fsp.writeFile(path.join(destPath, `${iconName}.svg`), optimize(contents, getSvgoConfig())?.data)); + }); + + // Finally, we write out the stores to disk + for (const [identifier, store] of stores.entries()) { + const isFullSet = identifier === 'all'; + const filename = isFullSet ? 'spectrum-css-icons' : `spectrum-css-icons-${identifier}`; + const dest = path.join(__dirname, `dist/${filename}.svg`); + const config = getSvgoConfig( + isFullSet + ? { + idPrefix: 'spectrum-css-icon', + removeViewBox: true, + } + : {}, + ); + + const result = optimize(store.toString(), config); + + if (!result?.data) continue; + + promises.push(fsp.writeFile(dest, result?.data)); + } + + return Promise.all(promises); +} + +main() + .then(() => { + console.log('✔ Icons generated successfully.'); + process.exit(0); + }) + .catch((e) => { + console.error(e); + process.exit(1); + }); diff --git a/components/icon/large/Arrow100.svg b/ui-icons/large/Arrow100.svg similarity index 100% rename from components/icon/large/Arrow100.svg rename to ui-icons/large/Arrow100.svg diff --git a/components/icon/large/Arrow200.svg b/ui-icons/large/Arrow200.svg similarity index 100% rename from components/icon/large/Arrow200.svg rename to ui-icons/large/Arrow200.svg diff --git a/components/icon/large/Arrow300.svg b/ui-icons/large/Arrow300.svg similarity index 100% rename from components/icon/large/Arrow300.svg rename to ui-icons/large/Arrow300.svg diff --git a/components/icon/large/Arrow400.svg b/ui-icons/large/Arrow400.svg similarity index 100% rename from components/icon/large/Arrow400.svg rename to ui-icons/large/Arrow400.svg diff --git a/components/icon/large/Arrow500.svg b/ui-icons/large/Arrow500.svg similarity index 100% rename from components/icon/large/Arrow500.svg rename to ui-icons/large/Arrow500.svg diff --git a/components/icon/large/Arrow600.svg b/ui-icons/large/Arrow600.svg similarity index 100% rename from components/icon/large/Arrow600.svg rename to ui-icons/large/Arrow600.svg diff --git a/components/icon/large/Arrow75.svg b/ui-icons/large/Arrow75.svg similarity index 100% rename from components/icon/large/Arrow75.svg rename to ui-icons/large/Arrow75.svg diff --git a/components/icon/large/Asterisk100.svg b/ui-icons/large/Asterisk100.svg similarity index 100% rename from components/icon/large/Asterisk100.svg rename to ui-icons/large/Asterisk100.svg diff --git a/components/icon/large/Asterisk200.svg b/ui-icons/large/Asterisk200.svg similarity index 100% rename from components/icon/large/Asterisk200.svg rename to ui-icons/large/Asterisk200.svg diff --git a/components/icon/large/Asterisk300.svg b/ui-icons/large/Asterisk300.svg similarity index 100% rename from components/icon/large/Asterisk300.svg rename to ui-icons/large/Asterisk300.svg diff --git a/components/icon/large/Asterisk75.svg b/ui-icons/large/Asterisk75.svg similarity index 100% rename from components/icon/large/Asterisk75.svg rename to ui-icons/large/Asterisk75.svg diff --git a/components/icon/large/Checkmark100.svg b/ui-icons/large/Checkmark100.svg similarity index 100% rename from components/icon/large/Checkmark100.svg rename to ui-icons/large/Checkmark100.svg diff --git a/components/icon/large/Checkmark200.svg b/ui-icons/large/Checkmark200.svg similarity index 100% rename from components/icon/large/Checkmark200.svg rename to ui-icons/large/Checkmark200.svg diff --git a/components/icon/large/Checkmark300.svg b/ui-icons/large/Checkmark300.svg similarity index 100% rename from components/icon/large/Checkmark300.svg rename to ui-icons/large/Checkmark300.svg diff --git a/components/icon/large/Checkmark400.svg b/ui-icons/large/Checkmark400.svg similarity index 100% rename from components/icon/large/Checkmark400.svg rename to ui-icons/large/Checkmark400.svg diff --git a/components/icon/large/Checkmark50.svg b/ui-icons/large/Checkmark50.svg similarity index 100% rename from components/icon/large/Checkmark50.svg rename to ui-icons/large/Checkmark50.svg diff --git a/components/icon/large/Checkmark500.svg b/ui-icons/large/Checkmark500.svg similarity index 100% rename from components/icon/large/Checkmark500.svg rename to ui-icons/large/Checkmark500.svg diff --git a/components/icon/large/Checkmark600.svg b/ui-icons/large/Checkmark600.svg similarity index 100% rename from components/icon/large/Checkmark600.svg rename to ui-icons/large/Checkmark600.svg diff --git a/components/icon/large/Checkmark75.svg b/ui-icons/large/Checkmark75.svg similarity index 100% rename from components/icon/large/Checkmark75.svg rename to ui-icons/large/Checkmark75.svg diff --git a/components/icon/large/Chevron100.svg b/ui-icons/large/Chevron100.svg similarity index 100% rename from components/icon/large/Chevron100.svg rename to ui-icons/large/Chevron100.svg diff --git a/components/icon/large/Chevron200.svg b/ui-icons/large/Chevron200.svg similarity index 100% rename from components/icon/large/Chevron200.svg rename to ui-icons/large/Chevron200.svg diff --git a/components/icon/large/Chevron300.svg b/ui-icons/large/Chevron300.svg similarity index 100% rename from components/icon/large/Chevron300.svg rename to ui-icons/large/Chevron300.svg diff --git a/components/icon/large/Chevron400.svg b/ui-icons/large/Chevron400.svg similarity index 100% rename from components/icon/large/Chevron400.svg rename to ui-icons/large/Chevron400.svg diff --git a/components/icon/large/Chevron50.svg b/ui-icons/large/Chevron50.svg similarity index 100% rename from components/icon/large/Chevron50.svg rename to ui-icons/large/Chevron50.svg diff --git a/components/icon/large/Chevron500.svg b/ui-icons/large/Chevron500.svg similarity index 100% rename from components/icon/large/Chevron500.svg rename to ui-icons/large/Chevron500.svg diff --git a/components/icon/large/Chevron600.svg b/ui-icons/large/Chevron600.svg similarity index 100% rename from components/icon/large/Chevron600.svg rename to ui-icons/large/Chevron600.svg diff --git a/components/icon/large/Chevron75.svg b/ui-icons/large/Chevron75.svg similarity index 100% rename from components/icon/large/Chevron75.svg rename to ui-icons/large/Chevron75.svg diff --git a/components/icon/large/CornerTriangle100.svg b/ui-icons/large/CornerTriangle100.svg similarity index 100% rename from components/icon/large/CornerTriangle100.svg rename to ui-icons/large/CornerTriangle100.svg diff --git a/components/icon/large/CornerTriangle200.svg b/ui-icons/large/CornerTriangle200.svg similarity index 100% rename from components/icon/large/CornerTriangle200.svg rename to ui-icons/large/CornerTriangle200.svg diff --git a/components/icon/large/CornerTriangle300.svg b/ui-icons/large/CornerTriangle300.svg similarity index 100% rename from components/icon/large/CornerTriangle300.svg rename to ui-icons/large/CornerTriangle300.svg diff --git a/components/icon/large/CornerTriangle75.svg b/ui-icons/large/CornerTriangle75.svg similarity index 100% rename from components/icon/large/CornerTriangle75.svg rename to ui-icons/large/CornerTriangle75.svg diff --git a/components/icon/large/Cross100.svg b/ui-icons/large/Cross100.svg similarity index 100% rename from components/icon/large/Cross100.svg rename to ui-icons/large/Cross100.svg diff --git a/components/icon/large/Cross200.svg b/ui-icons/large/Cross200.svg similarity index 100% rename from components/icon/large/Cross200.svg rename to ui-icons/large/Cross200.svg diff --git a/components/icon/large/Cross300.svg b/ui-icons/large/Cross300.svg similarity index 100% rename from components/icon/large/Cross300.svg rename to ui-icons/large/Cross300.svg diff --git a/components/icon/large/Cross400.svg b/ui-icons/large/Cross400.svg similarity index 100% rename from components/icon/large/Cross400.svg rename to ui-icons/large/Cross400.svg diff --git a/components/icon/large/Cross500.svg b/ui-icons/large/Cross500.svg similarity index 100% rename from components/icon/large/Cross500.svg rename to ui-icons/large/Cross500.svg diff --git a/components/icon/large/Cross600.svg b/ui-icons/large/Cross600.svg similarity index 100% rename from components/icon/large/Cross600.svg rename to ui-icons/large/Cross600.svg diff --git a/components/icon/large/Cross75.svg b/ui-icons/large/Cross75.svg similarity index 100% rename from components/icon/large/Cross75.svg rename to ui-icons/large/Cross75.svg diff --git a/components/icon/large/Dash100.svg b/ui-icons/large/Dash100.svg similarity index 100% rename from components/icon/large/Dash100.svg rename to ui-icons/large/Dash100.svg diff --git a/components/icon/large/Dash200.svg b/ui-icons/large/Dash200.svg similarity index 100% rename from components/icon/large/Dash200.svg rename to ui-icons/large/Dash200.svg diff --git a/components/icon/large/Dash300.svg b/ui-icons/large/Dash300.svg similarity index 100% rename from components/icon/large/Dash300.svg rename to ui-icons/large/Dash300.svg diff --git a/components/icon/large/Dash400.svg b/ui-icons/large/Dash400.svg similarity index 100% rename from components/icon/large/Dash400.svg rename to ui-icons/large/Dash400.svg diff --git a/components/icon/large/Dash50.svg b/ui-icons/large/Dash50.svg similarity index 100% rename from components/icon/large/Dash50.svg rename to ui-icons/large/Dash50.svg diff --git a/components/icon/large/Dash500.svg b/ui-icons/large/Dash500.svg similarity index 100% rename from components/icon/large/Dash500.svg rename to ui-icons/large/Dash500.svg diff --git a/components/icon/large/Dash600.svg b/ui-icons/large/Dash600.svg similarity index 100% rename from components/icon/large/Dash600.svg rename to ui-icons/large/Dash600.svg diff --git a/components/icon/large/Dash75.svg b/ui-icons/large/Dash75.svg similarity index 100% rename from components/icon/large/Dash75.svg rename to ui-icons/large/Dash75.svg diff --git a/components/icon/large/DoubleGripper.svg b/ui-icons/large/DoubleGripper.svg similarity index 100% rename from components/icon/large/DoubleGripper.svg rename to ui-icons/large/DoubleGripper.svg diff --git a/components/icon/large/SingleGripper.svg b/ui-icons/large/SingleGripper.svg similarity index 100% rename from components/icon/large/SingleGripper.svg rename to ui-icons/large/SingleGripper.svg diff --git a/components/icon/large/TripleGripper.svg b/ui-icons/large/TripleGripper.svg similarity index 100% rename from components/icon/large/TripleGripper.svg rename to ui-icons/large/TripleGripper.svg diff --git a/components/icon/medium/Arrow100.svg b/ui-icons/medium/Arrow100.svg similarity index 100% rename from components/icon/medium/Arrow100.svg rename to ui-icons/medium/Arrow100.svg diff --git a/components/icon/medium/Arrow200.svg b/ui-icons/medium/Arrow200.svg similarity index 100% rename from components/icon/medium/Arrow200.svg rename to ui-icons/medium/Arrow200.svg diff --git a/components/icon/medium/Arrow300.svg b/ui-icons/medium/Arrow300.svg similarity index 100% rename from components/icon/medium/Arrow300.svg rename to ui-icons/medium/Arrow300.svg diff --git a/components/icon/medium/Arrow400.svg b/ui-icons/medium/Arrow400.svg similarity index 100% rename from components/icon/medium/Arrow400.svg rename to ui-icons/medium/Arrow400.svg diff --git a/components/icon/medium/Arrow500.svg b/ui-icons/medium/Arrow500.svg similarity index 100% rename from components/icon/medium/Arrow500.svg rename to ui-icons/medium/Arrow500.svg diff --git a/components/icon/medium/Arrow600.svg b/ui-icons/medium/Arrow600.svg similarity index 100% rename from components/icon/medium/Arrow600.svg rename to ui-icons/medium/Arrow600.svg diff --git a/components/icon/medium/Arrow75.svg b/ui-icons/medium/Arrow75.svg similarity index 100% rename from components/icon/medium/Arrow75.svg rename to ui-icons/medium/Arrow75.svg diff --git a/components/icon/medium/Asterisk100.svg b/ui-icons/medium/Asterisk100.svg similarity index 100% rename from components/icon/medium/Asterisk100.svg rename to ui-icons/medium/Asterisk100.svg diff --git a/components/icon/medium/Asterisk200.svg b/ui-icons/medium/Asterisk200.svg similarity index 100% rename from components/icon/medium/Asterisk200.svg rename to ui-icons/medium/Asterisk200.svg diff --git a/components/icon/medium/Asterisk300.svg b/ui-icons/medium/Asterisk300.svg similarity index 100% rename from components/icon/medium/Asterisk300.svg rename to ui-icons/medium/Asterisk300.svg diff --git a/components/icon/medium/Asterisk75.svg b/ui-icons/medium/Asterisk75.svg similarity index 100% rename from components/icon/medium/Asterisk75.svg rename to ui-icons/medium/Asterisk75.svg diff --git a/components/icon/medium/Checkmark100.svg b/ui-icons/medium/Checkmark100.svg similarity index 100% rename from components/icon/medium/Checkmark100.svg rename to ui-icons/medium/Checkmark100.svg diff --git a/components/icon/medium/Checkmark200.svg b/ui-icons/medium/Checkmark200.svg similarity index 100% rename from components/icon/medium/Checkmark200.svg rename to ui-icons/medium/Checkmark200.svg diff --git a/components/icon/medium/Checkmark300.svg b/ui-icons/medium/Checkmark300.svg similarity index 100% rename from components/icon/medium/Checkmark300.svg rename to ui-icons/medium/Checkmark300.svg diff --git a/components/icon/medium/Checkmark400.svg b/ui-icons/medium/Checkmark400.svg similarity index 100% rename from components/icon/medium/Checkmark400.svg rename to ui-icons/medium/Checkmark400.svg diff --git a/components/icon/medium/Checkmark50.svg b/ui-icons/medium/Checkmark50.svg similarity index 100% rename from components/icon/medium/Checkmark50.svg rename to ui-icons/medium/Checkmark50.svg diff --git a/components/icon/medium/Checkmark500.svg b/ui-icons/medium/Checkmark500.svg similarity index 100% rename from components/icon/medium/Checkmark500.svg rename to ui-icons/medium/Checkmark500.svg diff --git a/components/icon/medium/Checkmark600.svg b/ui-icons/medium/Checkmark600.svg similarity index 100% rename from components/icon/medium/Checkmark600.svg rename to ui-icons/medium/Checkmark600.svg diff --git a/components/icon/medium/Checkmark75.svg b/ui-icons/medium/Checkmark75.svg similarity index 100% rename from components/icon/medium/Checkmark75.svg rename to ui-icons/medium/Checkmark75.svg diff --git a/components/icon/medium/Chevron100.svg b/ui-icons/medium/Chevron100.svg similarity index 100% rename from components/icon/medium/Chevron100.svg rename to ui-icons/medium/Chevron100.svg diff --git a/components/icon/medium/Chevron200.svg b/ui-icons/medium/Chevron200.svg similarity index 100% rename from components/icon/medium/Chevron200.svg rename to ui-icons/medium/Chevron200.svg diff --git a/components/icon/medium/Chevron300.svg b/ui-icons/medium/Chevron300.svg similarity index 100% rename from components/icon/medium/Chevron300.svg rename to ui-icons/medium/Chevron300.svg diff --git a/components/icon/medium/Chevron400.svg b/ui-icons/medium/Chevron400.svg similarity index 100% rename from components/icon/medium/Chevron400.svg rename to ui-icons/medium/Chevron400.svg diff --git a/components/icon/medium/Chevron50.svg b/ui-icons/medium/Chevron50.svg similarity index 100% rename from components/icon/medium/Chevron50.svg rename to ui-icons/medium/Chevron50.svg diff --git a/components/icon/medium/Chevron500.svg b/ui-icons/medium/Chevron500.svg similarity index 100% rename from components/icon/medium/Chevron500.svg rename to ui-icons/medium/Chevron500.svg diff --git a/components/icon/medium/Chevron600.svg b/ui-icons/medium/Chevron600.svg similarity index 100% rename from components/icon/medium/Chevron600.svg rename to ui-icons/medium/Chevron600.svg diff --git a/components/icon/medium/Chevron75.svg b/ui-icons/medium/Chevron75.svg similarity index 100% rename from components/icon/medium/Chevron75.svg rename to ui-icons/medium/Chevron75.svg diff --git a/components/icon/medium/CornerTriangle100.svg b/ui-icons/medium/CornerTriangle100.svg similarity index 100% rename from components/icon/medium/CornerTriangle100.svg rename to ui-icons/medium/CornerTriangle100.svg diff --git a/components/icon/medium/CornerTriangle200.svg b/ui-icons/medium/CornerTriangle200.svg similarity index 100% rename from components/icon/medium/CornerTriangle200.svg rename to ui-icons/medium/CornerTriangle200.svg diff --git a/components/icon/medium/CornerTriangle300.svg b/ui-icons/medium/CornerTriangle300.svg similarity index 100% rename from components/icon/medium/CornerTriangle300.svg rename to ui-icons/medium/CornerTriangle300.svg diff --git a/components/icon/medium/CornerTriangle75.svg b/ui-icons/medium/CornerTriangle75.svg similarity index 100% rename from components/icon/medium/CornerTriangle75.svg rename to ui-icons/medium/CornerTriangle75.svg diff --git a/components/icon/medium/Cross100.svg b/ui-icons/medium/Cross100.svg similarity index 100% rename from components/icon/medium/Cross100.svg rename to ui-icons/medium/Cross100.svg diff --git a/components/icon/medium/Cross200.svg b/ui-icons/medium/Cross200.svg similarity index 100% rename from components/icon/medium/Cross200.svg rename to ui-icons/medium/Cross200.svg diff --git a/components/icon/medium/Cross300.svg b/ui-icons/medium/Cross300.svg similarity index 100% rename from components/icon/medium/Cross300.svg rename to ui-icons/medium/Cross300.svg diff --git a/components/icon/medium/Cross400.svg b/ui-icons/medium/Cross400.svg similarity index 100% rename from components/icon/medium/Cross400.svg rename to ui-icons/medium/Cross400.svg diff --git a/components/icon/medium/Cross500.svg b/ui-icons/medium/Cross500.svg similarity index 100% rename from components/icon/medium/Cross500.svg rename to ui-icons/medium/Cross500.svg diff --git a/components/icon/medium/Cross600.svg b/ui-icons/medium/Cross600.svg similarity index 100% rename from components/icon/medium/Cross600.svg rename to ui-icons/medium/Cross600.svg diff --git a/components/icon/medium/Cross75.svg b/ui-icons/medium/Cross75.svg similarity index 100% rename from components/icon/medium/Cross75.svg rename to ui-icons/medium/Cross75.svg diff --git a/components/icon/medium/Dash100.svg b/ui-icons/medium/Dash100.svg similarity index 100% rename from components/icon/medium/Dash100.svg rename to ui-icons/medium/Dash100.svg diff --git a/components/icon/medium/Dash200.svg b/ui-icons/medium/Dash200.svg similarity index 100% rename from components/icon/medium/Dash200.svg rename to ui-icons/medium/Dash200.svg diff --git a/components/icon/medium/Dash300.svg b/ui-icons/medium/Dash300.svg similarity index 100% rename from components/icon/medium/Dash300.svg rename to ui-icons/medium/Dash300.svg diff --git a/components/icon/medium/Dash400.svg b/ui-icons/medium/Dash400.svg similarity index 100% rename from components/icon/medium/Dash400.svg rename to ui-icons/medium/Dash400.svg diff --git a/components/icon/medium/Dash50.svg b/ui-icons/medium/Dash50.svg similarity index 100% rename from components/icon/medium/Dash50.svg rename to ui-icons/medium/Dash50.svg diff --git a/components/icon/medium/Dash500.svg b/ui-icons/medium/Dash500.svg similarity index 100% rename from components/icon/medium/Dash500.svg rename to ui-icons/medium/Dash500.svg diff --git a/components/icon/medium/Dash600.svg b/ui-icons/medium/Dash600.svg similarity index 100% rename from components/icon/medium/Dash600.svg rename to ui-icons/medium/Dash600.svg diff --git a/components/icon/medium/Dash75.svg b/ui-icons/medium/Dash75.svg similarity index 100% rename from components/icon/medium/Dash75.svg rename to ui-icons/medium/Dash75.svg diff --git a/components/icon/medium/DoubleGripper.svg b/ui-icons/medium/DoubleGripper.svg similarity index 100% rename from components/icon/medium/DoubleGripper.svg rename to ui-icons/medium/DoubleGripper.svg diff --git a/components/icon/medium/SingleGripper.svg b/ui-icons/medium/SingleGripper.svg similarity index 100% rename from components/icon/medium/SingleGripper.svg rename to ui-icons/medium/SingleGripper.svg diff --git a/components/icon/medium/TripleGripper.svg b/ui-icons/medium/TripleGripper.svg similarity index 100% rename from components/icon/medium/TripleGripper.svg rename to ui-icons/medium/TripleGripper.svg diff --git a/ui-icons/package.json b/ui-icons/package.json new file mode 100644 index 00000000000..8443aa8021d --- /dev/null +++ b/ui-icons/package.json @@ -0,0 +1,28 @@ +{ + "name": "@spectrum-css/ui-icons", + "version": "0.0.0", + "description": "The Spectrum CSS UI icons", + "license": "Apache-2.0", + "author": "Adobe", + "homepage": "https://opensource.adobe.com/spectrum-css/", + "repository": { + "type": "git", + "url": "https://github.com/adobe/spectrum-css.git", + "directory": "ui-icons" + }, + "bugs": { + "url": "https://github.com/adobe/spectrum-css/issues" + }, + "main": "dist/spectrum-css-icons.svg", + "scripts": { + "build": "node ./index.js", + "clean": "rimraf ./dist" + }, + "devDependencies": { + "fast-glob": "^3.3.1", + "rimraf": "^5.0.5", + "svgcombiner": "^1.0.1", + "svgo": "^3.0.2", + "svgstore": "^3.0.1" + } +} diff --git a/ui-icons/svgo.config.js b/ui-icons/svgo.config.js new file mode 100644 index 00000000000..67cca2174f2 --- /dev/null +++ b/ui-icons/svgo.config.js @@ -0,0 +1,51 @@ +module.exports = ({ + clean = false, + idPrefix = false, + classPrefix = 'spectrum-UIIcon', + removeViewBox = false, +} = {}) => ({ + multipass: true, + js2svg: { + indent: 2, + pretty: true, + }, + plugins: [ + { + name: 'preset-default', + params: { + overrides: { + cleanupIds: clean, + removeDesc: false, + removeTitle: false, + removeViewBox, + removeUnusedNS: false, + }, + }, + }, + clean + ? { + name: 'removeAttrs', + params: { + attrs: ['class', 'data-name', 'id'], + }, + } + : undefined, + idPrefix + ? { + name: 'prefixIds', + params: { delim: '-', prefix: idPrefix, prefixClassNames: false }, + } + : undefined, + classPrefix + ? { + name: 'prefixIds', + params: { + delim: '--', + prefix: classPrefix, + prefixClassNames: true, + prefixIds: false, + }, + } + : undefined, + ].filter(Boolean), +}); diff --git a/yarn.lock b/yarn.lock index da12bfa58b9..bce0efee82d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3581,6 +3581,11 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@trysound/sax@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" + integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -5738,6 +5743,17 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +cheerio-select@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.6.0.tgz#489f36604112c722afa147dedd0d4609c09e1696" + integrity sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g== + dependencies: + css-select "^4.3.0" + css-what "^6.0.1" + domelementtype "^2.2.0" + domhandler "^4.3.1" + domutils "^2.8.0" + cheerio-select@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" @@ -5750,28 +5766,6 @@ cheerio-select@^2.1.0: domhandler "^5.0.3" domutils "^3.0.1" -cheerio@0.*: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha512-8/MzidM6G/TgRelkzDG13y3Y9LxBjCb+8yOEZ9+wwq5gVF2w2pV0wmHvjfT0RvuxGyR7UEuK36r+yYMbT4uKgA== - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - cheerio@^1.0.0-rc.12, cheerio@^1.0.0-rc.2: version "1.0.0-rc.12" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" @@ -5785,6 +5779,19 @@ cheerio@^1.0.0-rc.12, cheerio@^1.0.0-rc.2: parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" +cheerio@v1.0.0-rc.10: + version "1.0.0-rc.10" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e" + integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== + dependencies: + cheerio-select "^1.5.0" + dom-serializer "^1.3.2" + domhandler "^4.2.0" + htmlparser2 "^6.1.0" + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter "^6.0.1" + tslib "^2.2.0" + chokidar@^2.0.0: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -6182,6 +6189,11 @@ commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -6753,7 +6765,7 @@ css-select@^2.0.0: domutils "^1.7.0" nth-check "^1.0.2" -css-select@^4.1.3: +css-select@^4.1.3, css-select@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== @@ -6775,16 +6787,6 @@ css-select@^5.1.0: domutils "^3.0.1" nth-check "^2.0.1" -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha512-dUQOBoqdR7QwV90WysXPLXG5LO7nhYBgiWVfxF80DKPF8zx1t/pUd2FYy73emg3zrjtM6dzmYgbHKfV2rxiHQA== - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - css-tree@1.0.0-alpha.37: version "1.0.0-alpha.37" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" @@ -6801,7 +6803,7 @@ css-tree@^1.1.2: mdn-data "2.0.14" source-map "^0.6.1" -css-tree@^2.3.1: +css-tree@^2.2.1, css-tree@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw== @@ -6809,16 +6811,19 @@ css-tree@^2.3.1: mdn-data "2.0.30" source-map-js "^1.0.1" +css-tree@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.2.1.tgz#36115d382d60afd271e377f9c5f67d02bd48c032" + integrity sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA== + dependencies: + mdn-data "2.0.28" + source-map-js "^1.0.1" + css-unit-converter@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.2.tgz#4c77f5a1954e6dbff60695ecb214e3270436ab21" integrity sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA== -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - css-what@^3.2.1: version "3.4.2" resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" @@ -6849,6 +6854,13 @@ cssnano-utils@^4.0.0: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-4.0.0.tgz#d1da885ec04003ab19505ff0e62e029708d36b08" integrity sha512-Z39TLP+1E0KUcd7LGyF4qMfu8ZufI0rDzhdyAMsa/8UyNUU8wpS0fhdBxbQbv32r64ea00h4878gommRVg2BHw== +csso@5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/csso/-/csso-5.0.5.tgz#f9b7fe6cc6ac0b7d90781bb16d5e9874303e2ca6" + integrity sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ== + dependencies: + css-tree "~2.2.0" + csso@^4.0.2: version "4.2.0" resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" @@ -7259,7 +7271,7 @@ dom-serializer@0: domelementtype "^2.0.1" entities "^2.0.0" -dom-serializer@^1.0.1: +dom-serializer@^1.0.1, dom-serializer@^1.3.2: version "1.4.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== @@ -7277,20 +7289,12 @@ dom-serializer@^2.0.0: domhandler "^5.0.2" entities "^4.2.0" -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: +domelementtype@1: version "1.3.1" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== @@ -7300,13 +7304,6 @@ domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" @@ -7321,15 +7318,7 @@ domhandler@^5.0.2, domhandler@^5.0.3: dependencies: domelementtype "^2.3.0" -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1, domutils@^1.7.0: +domutils@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== @@ -7547,11 +7536,6 @@ enquirer@~2.3.6: dependencies: ansi-colors "^4.1.1" -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -9185,42 +9169,6 @@ gulp-replace@^1.0.0: replacestream "^4.0.3" yargs-parser ">=5.0.0-security.0" -gulp-sort@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/gulp-sort/-/gulp-sort-2.0.0.tgz#c6762a2f1f0de0a3fc595a21599d3fac8dba1aca" - integrity sha512-MyTel3FXOdh1qhw1yKhpimQrAmur9q1X0ZigLmCOxouQD+BD3za9/89O+HfbgBQvvh4igEbp0/PUWO+VqGYG1g== - dependencies: - through2 "^2.0.1" - -gulp-svgcombiner@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/gulp-svgcombiner/-/gulp-svgcombiner-1.0.2.tgz#f957a7d4e68dbe6ef9db2d6f6360d41ce27aa2cc" - integrity sha512-uMSqypfxV9oQT4K8PIOCVVMOD7WOzmZeljOOvouy08+aBv/DTN/YLMtSak1om8HapsAE2BHvgcoQvCpPnMoyrg== - dependencies: - plugin-error "^1.0.1" - svgcombiner "^1.0.0" - through2 "^3.0.0" - vinyl "^2.2.0" - xtend "^4.0.1" - -gulp-svgmin@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/gulp-svgmin/-/gulp-svgmin-2.2.0.tgz#eabc2b97aa4aef90c21cef65ae5499b075007323" - integrity sha512-MjfZ7DNlomplrhACwmdowPnAV3firF+3432chp1XQyy6OxbZmM7AyMwsITfglS6bGaE3msKiNeqIb0Sn3LHlyg== - dependencies: - plugin-error "^1.0.1" - svgo "^1.2.1" - -gulp-svgstore@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/gulp-svgstore/-/gulp-svgstore-7.0.1.tgz#885b9bb911bded726129a5594d3b3528c94ea423" - integrity sha512-oiAXvkRnBBt6ZML+lit7W15ryClB45k0V9eCVW/i73EymunoQlzZal0Luj3NDrbPLbPIllL8/ltCXFa9Jv03Pg== - dependencies: - cheerio "0.*" - fancy-log "^1.3.2" - plugin-error "^0.1.2" - vinyl "^2.1.0" - gulp@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" @@ -9501,18 +9449,6 @@ html-webpack-plugin@^5.5.0: pretty-error "^4.0.0" tapable "^2.0.0" -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - htmlparser2@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" @@ -11240,16 +11176,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha512-yX/rx6d/UTVh7sSVWVSIMjfnz95evAgDFdb1ZozC35I9mSFCkmzptOzevxjgbQUsc78NR44LVHWjsoMQXy9FDg== - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha512-lxdsn7xxlCymgLYo1gGvVrfHmkjDiyqVv62FAeF2i5ta72BipE1SLxw8hPEPLhD4/247Ijw07UQH7Hq/chT5LA== - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -11260,26 +11186,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.defaults@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha512-pXYUy7PR8BCLwX5mgJ/aNtyOvuJTdZAo9EQFUvMIYugqmJxnrYaANvTbgndOzHSCSR0wnlBBfRXJL5SbWxo3FQ== - -lodash.flatten@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ== - lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -11310,17 +11216,12 @@ lodash.kebabcase@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q== - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== -lodash.merge@^4.4.0, lodash.merge@^4.6.2: +lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== @@ -11330,31 +11231,11 @@ lodash.mergewith@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q== - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw== - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha512-qkTuvgEzYdyhiJBx42YPzPo71R1aEr0z79kAv7Ixg8wPFEjgRgJdUsGMG3Hf3OYSF/kHI79XhNlt+5Ar6OzwxQ== - lodash.snakecase@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha512-j7MJE+TuT51q9ggt4fSgVqro163BEFjAt3u97IqU+JA2DkWl80nFTrowzLpZ/BnpN7rrl0JA/593NAdd8p/scQ== - lodash.startcase@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" @@ -11685,6 +11566,11 @@ mdn-data@2.0.14: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== +mdn-data@2.0.28: + version "2.0.28" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.28.tgz#5ec48e7bef120654539069e1ae4ddc81ca490eba" + integrity sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g== + mdn-data@2.0.30: version "2.0.30" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" @@ -12562,7 +12448,7 @@ npmlog@^7.0.1: gauge "^5.0.0" set-blocking "^2.0.0" -nth-check@^1.0.2, nth-check@~1.0.1: +nth-check@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== @@ -13230,6 +13116,13 @@ parse-url@^8.1.0: dependencies: parse-path "^7.0.0" +parse5-htmlparser2-tree-adapter@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" @@ -13238,6 +13131,11 @@ parse5-htmlparser2-tree-adapter@^7.0.0: domhandler "^5.0.2" parse5 "^7.0.0" +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^7.0.0: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" @@ -16287,14 +16185,14 @@ svg-tags@^1.0.0: resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" integrity sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA== -svgcombiner@^1.0.0: +svgcombiner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/svgcombiner/-/svgcombiner-1.0.1.tgz#7a958a8ffc0ae5b8f619566e26fb35cde778b014" integrity sha512-rnKRVkcHlERoDrZ+dNlcm2qkuptKLH8WxMmJz/PrKbydRNlh2jK803I6esA+a7ec5d/8qHFVuOZKKYUs8Rc7aA== dependencies: cheerio "^1.0.0-rc.2" -svgo@^1.1.1, svgo@^1.2.1: +svgo@^1.1.1: version "1.3.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== @@ -16313,6 +16211,26 @@ svgo@^1.1.1, svgo@^1.2.1: unquote "~1.1.1" util.promisify "~1.0.0" +svgo@^3.0.2: + version "3.0.5" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-3.0.5.tgz#0595cf3c762c4e5180713d7b92dc67deaf46c6a0" + integrity sha512-HQKHEo73pMNOlDlBcLgZRcHW2+1wo7bFYayAXkGN0l/2+h68KjlfZyMRhdhaGvoHV2eApOovl12zoFz42sT6rQ== + dependencies: + "@trysound/sax" "0.2.0" + commander "^7.2.0" + css-select "^5.1.0" + css-tree "^2.2.1" + css-what "^6.1.0" + csso "5.0.5" + picocolors "^1.0.0" + +svgstore@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/svgstore/-/svgstore-3.0.1.tgz#de6e2eeabbf3da32004142b2289c8acc87e285ea" + integrity sha512-nL6WTxYnsVl3e0G/mwGEFSnPAWUrzIwHAPOwInD4QUuLDKxaKMnXduf0Ipw3m/g9AldPhp1Y8E/nkReFBukJrA== + dependencies: + cheerio v1.0.0-rc.10 + swc-loader@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/swc-loader/-/swc-loader-0.2.3.tgz#6792f1c2e4c9ae9bf9b933b3e010210e270c186d" @@ -16483,7 +16401,7 @@ through2-filter@^3.0.0: through2 "~2.0.0" xtend "~4.0.0" -through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0: +through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -16491,7 +16409,7 @@ through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through2@^3.0.0, through2@^3.0.1: +through2@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== @@ -16721,7 +16639,7 @@ tslib@^1.13.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -17357,13 +17275,6 @@ vinyl-fs@^3.0.0: vinyl "^2.0.0" vinyl-sourcemap "^1.1.0" -vinyl-paths@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/vinyl-paths/-/vinyl-paths-3.0.1.tgz#16b42404e21ebddfb75954863f553af3345d56b5" - integrity sha512-fpjimhur1emSbJSvy5dJjDklCFEh2LvQRSHPzMQlYFjPrdFMHAyzSe1fiLzykoqg9X2tqH8evhsOUDNT55a0sw== - dependencies: - through2 "^3.0.1" - vinyl-sourcemap@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" @@ -17384,7 +17295,7 @@ vinyl-sourcemaps-apply@^0.2.1: dependencies: source-map "^0.5.1" -vinyl@^2.0.0, vinyl@^2.1.0, vinyl@^2.2.0: +vinyl@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== @@ -17759,7 +17670,7 @@ xmlhttprequest-ssl@~2.0.0: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==