diff --git a/.eslintrc.js b/.eslintrc.js index 55b1706fe..e136f5a20 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,5 +17,9 @@ module.exports = { trailingComma: 'all' } ] - } + }, + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./site/tsconfig.json', './packages/*/tsconfig.json'], + }, }; diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 730e27c30..df19ca741 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,7 +11,7 @@ Before reporting an issue, please search to see if someone has filed a similar i ## Prerequisites * Version: -* Are you running from source/master: +* Are you running from source/main: * Are you using a released build: * Operating system: * Bits: diff --git a/.github/PULL_REQUEST_TEMPLATE/new-icon.md b/.github/PULL_REQUEST_TEMPLATE/new-icon.md index 4d228d2b4..93ba01898 100644 --- a/.github/PULL_REQUEST_TEMPLATE/new-icon.md +++ b/.github/PULL_REQUEST_TEMPLATE/new-icon.md @@ -5,7 +5,7 @@ labels: "🎨 - **Name of the icon** : diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c514d8f8..23b354244 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,15 +14,33 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install - name: Fetch tags run: git fetch --all --tags @@ -32,7 +50,7 @@ jobs: run: echo "::set-output name=LATEST_TAG::$(git describe --tags `git rev-list --tags --max-count=1`)" - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Check if we can patch run: .github/workflows/version-up.sh --minor @@ -44,7 +62,7 @@ jobs: - name: Create change log id: change-log run: | - CHANGE_LOG=$(yarn --silent run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }}) + CHANGE_LOG=$(pnpm run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }}) CHANGE_LOG="${CHANGE_LOG//'%'/'%25'}" CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}" CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}" diff --git a/.github/workflows/lucide-angular.yml b/.github/workflows/lucide-angular.yml new file mode 100644 index 000000000..cd6d6c986 --- /dev/null +++ b/.github/workflows/lucide-angular.yml @@ -0,0 +1,47 @@ +name: Lucide Angular checks + +on: + pull_request: + paths: + - packages/lucide-angular/** + push: + paths: + - packages/lucide-angular/** + +jobs: + lucide-angular: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-angular build + + - name: Test + run: pnpm --filter lucide-angular test diff --git a/.github/workflows/lucide-preact.yml b/.github/workflows/lucide-preact.yml new file mode 100644 index 000000000..6689f31c8 --- /dev/null +++ b/.github/workflows/lucide-preact.yml @@ -0,0 +1,47 @@ +name: Lucide Preact Checks + +on: + pull_request: + paths: + - packages/lucide-preact/** + push: + paths: + - packages/lucide-preact/** + +jobs: + lucide-preact: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-preact build + + - name: Test + run: pnpm --filter lucide-preact test diff --git a/.github/workflows/lucide-react-native.yml b/.github/workflows/lucide-react-native.yml new file mode 100644 index 000000000..bd22ebf74 --- /dev/null +++ b/.github/workflows/lucide-react-native.yml @@ -0,0 +1,47 @@ +name: Lucide React Native checks + +on: + pull_request: + paths: + - packages/lucide-react-native/** + push: + paths: + - packages/lucide-react-native/** + +jobs: + lucide-react-native: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-react-native build + + - name: Test + run: pnpm --filter lucide-react-native test diff --git a/.github/workflows/lucide-react.yml b/.github/workflows/lucide-react.yml new file mode 100644 index 000000000..6920357c6 --- /dev/null +++ b/.github/workflows/lucide-react.yml @@ -0,0 +1,47 @@ +name: Lucide React Checks + +on: + pull_request: + paths: + - packages/lucide-react/** + push: + paths: + - packages/lucide-react/** + +jobs: + lucide-react: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-react build + + - name: Test + run: pnpm --filter lucide-react test diff --git a/.github/workflows/lucide-solid.yml b/.github/workflows/lucide-solid.yml new file mode 100644 index 000000000..96b6d1dd7 --- /dev/null +++ b/.github/workflows/lucide-solid.yml @@ -0,0 +1,47 @@ +name: Lucide Solid Checks + +on: + pull_request: + paths: + - packages/lucide-solid/** + push: + paths: + - packages/lucide-solid/** + +jobs: + lucide-solid: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-solid build + + - name: Test + run: pnpm --filter lucide-solid test diff --git a/.github/workflows/lucide-static.yml b/.github/workflows/lucide-static.yml new file mode 100644 index 000000000..45de8c426 --- /dev/null +++ b/.github/workflows/lucide-static.yml @@ -0,0 +1,44 @@ +name: Lucide Static checks + +on: + pull_request: + paths: + - packages/lucide-static/** + push: + paths: + - packages/lucide-static/** + +jobs: + lucide-static: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-static build diff --git a/.github/workflows/lucide-svelte.yml b/.github/workflows/lucide-svelte.yml new file mode 100644 index 000000000..847e6dcbf --- /dev/null +++ b/.github/workflows/lucide-svelte.yml @@ -0,0 +1,47 @@ +name: Lucide Svelte checks + +on: + pull_request: + paths: + - packages/lucide-svelte/** + push: + paths: + - packages/lucide-svelte/** + +jobs: + lucide-svelte: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-svelte build + + - name: Test + run: pnpm --filter lucide-svelte test diff --git a/.github/workflows/lucide-vue-next.yml b/.github/workflows/lucide-vue-next.yml new file mode 100644 index 000000000..83456e5ca --- /dev/null +++ b/.github/workflows/lucide-vue-next.yml @@ -0,0 +1,47 @@ +name: Lucide Vue Next checks + +on: + pull_request: + paths: + - packages/lucide-vue-next/** + push: + paths: + - packages/lucide-vue-next/** + +jobs: + lucide-vue-next: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-vue-next build + + - name: Test + run: pnpm --filter lucide-vue-next test diff --git a/.github/workflows/lucide-vue.yml b/.github/workflows/lucide-vue.yml new file mode 100644 index 000000000..a961c8575 --- /dev/null +++ b/.github/workflows/lucide-vue.yml @@ -0,0 +1,47 @@ +name: Lucide Vue checks + +on: + pull_request: + paths: + - packages/lucide-vue/** + push: + paths: + - packages/lucide-vue/** + +jobs: + lucide-vue: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide-vue build + + - name: Test + run: pnpm --filter lucide-vue test diff --git a/.github/workflows/lucide.yml b/.github/workflows/lucide.yml new file mode 100644 index 000000000..e533c653e --- /dev/null +++ b/.github/workflows/lucide.yml @@ -0,0 +1,47 @@ +name: Lucide checks + +on: + pull_request: + paths: + - packages/lucide/** + push: + paths: + - packages/lucide/** + +jobs: + lucide: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm --filter lucide build + + - name: Test + run: pnpm --filter lucide test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40dea9a78..c08b3a59d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release Packages on: push: tags: - - "v*" + - 'v*' workflow_dispatch: inputs: @@ -13,7 +13,7 @@ on: jobs: pre-build: - if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey"]', github.actor) + if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey", "karsa-mistmere"]', github.actor) runs-on: ubuntu-latest outputs: VERSION: ${{ steps.get_version.outputs.VERSION }} @@ -32,31 +32,48 @@ jobs: runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set new version - run: yarn workspace lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide build + run: pnpm --filter lucide build - name: Test - run: yarn workspace lucide test + run: pnpm --filter lucide test - name: Publish - run: yarn workspace lucide publish + run: pnpm --filter lucide publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -69,32 +86,49 @@ jobs: runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set package.json version lucide - run: yarn workspace lucide-react version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-react version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide-react build + run: pnpm --filter lucide-react build - name: Test - run: yarn workspace lucide-react test + run: pnpm --filter lucide-react test - name: Publish - run: yarn workspace lucide-react publish + run: pnpm --filter lucide-react publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -102,37 +136,109 @@ jobs: name: lucide-react-package-json path: packages/lucide-react/package.json + lucide-react-native: + if: github.repository == 'lucide-icons/lucide' + runs-on: ubuntu-latest + needs: pre-build + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Set Auth Token + run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + + - name: Set package.json version lucide + run: pnpm --filter lucide-react-native version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + + - name: Build + run: pnpm --filter lucide-react-native build + + - name: Test + run: pnpm --filter lucide-react-native test + + - name: Publish + run: pnpm --filter lucide-react-native publish --no-git-checks + + - name: Upload package.json + uses: actions/upload-artifact@v2 + with: + name: lucide-react-native-package-json + path: packages/lucide-react-native/package.json + lucide-vue: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set new version - run: yarn workspace lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide-vue build + run: pnpm --filter lucide-vue build - name: Test - run: yarn workspace lucide-vue test + run: pnpm --filter lucide-vue test - name: Publish - run: yarn workspace lucide-vue publish + run: pnpm --filter lucide-vue publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -145,32 +251,49 @@ jobs: runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set new version - run: yarn workspace lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide-vue-next build + run: pnpm --filter lucide-vue-next build - name: Test - run: yarn workspace lucide-vue-next test + run: pnpm --filter lucide-vue-next test - name: Publish - run: yarn workspace lucide-vue-next publish + run: pnpm --filter lucide-vue-next publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -183,32 +306,49 @@ jobs: runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set package.json version lucide - run: yarn workspace lucide-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide-angular build + run: pnpm --filter lucide-angular build - name: Test - run: yarn workspace lucide-angular test:headless + run: pnpm --filter lucide-angular test - name: Publish - run: yarn workspace lucide-angular publish dist + run: pnpm --filter lucide-angular publish --no-git-checks --ignore-scripts - name: Upload package.json uses: actions/upload-artifact@v2 @@ -221,32 +361,49 @@ jobs: runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set package.json version lucide - run: yarn workspace lucide-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide-preact build + run: pnpm --filter lucide-preact build - name: Test - run: yarn workspace lucide-preact test + run: pnpm --filter lucide-preact test - name: Publish - run: yarn workspace lucide-preact publish + run: pnpm --filter lucide-preact publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -254,37 +411,109 @@ jobs: name: lucide-preact-package-json path: packages/lucide-preact/package.json - lucide-svelte: + lucide-solid: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set package.json version lucide - run: yarn workspace lucide-svelte version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-solid version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build - run: yarn workspace lucide-svelte build + run: pnpm --filter lucide-solid build - name: Test - run: yarn workspace lucide-svelte test + run: pnpm --filter lucide-solid test - name: Publish - run: yarn workspace lucide-svelte publish + run: pnpm --filter lucide-solid publish --no-git-checks + + - name: Upload package.json + uses: actions/upload-artifact@v2 + with: + name: lucide-solid-package-json + path: packages/lucide-solid/package.json + + lucide-svelte: + if: github.repository == 'lucide-icons/lucide' + runs-on: ubuntu-latest + needs: pre-build + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Set Auth Token + run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + + - name: Set package.json version lucide + run: pnpm --filter lucide-svelte version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + + - name: Build + run: pnpm --filter lucide-svelte build + + - name: Test + run: pnpm --filter lucide-svelte test + + - name: Publish + run: pnpm --filter lucide-svelte publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -297,33 +526,50 @@ jobs: runs-on: ubuntu-latest needs: [pre-build, lucide-font] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/download-artifact@v2 - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn --frozen-lockfile + run: pnpm install - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set new version - run: yarn workspace lucide-static version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-static version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Move Font run: cp -r lucide-font packages/lucide-static/font - name: Build - run: yarn workspace lucide-static build + run: pnpm --filter lucide-static build - name: Publish - run: yarn workspace lucide-static publish + run: pnpm --filter lucide-static publish --no-git-checks - name: Upload package.json uses: actions/upload-artifact@v2 @@ -336,14 +582,30 @@ jobs: runs-on: ubuntu-latest needs: pre-build steps: - - uses: actions/checkout@v2 - - - name: Setup node - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - cache: 'yarn' - cache-dependency-path: 'yarn.lock' + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install FontForge run: sudo apt-get install zlib1g-dev fontforge @@ -369,15 +631,15 @@ jobs: - name: Install Font Custom dependency run: sudo gem install fontcustom - - name: Install - run: yarn --frozen-lockfile + - name: Install dependencies + run: pnpm install - name: Build Icon Font run: | mkdir lucide-font - yarn build:outline-icons --outputDir=converted_icons && fontcustom compile "./converted_icons" -h -n "lucide" -o ./lucide-font -F + pnpm build:outline-icons --outputDir=converted_icons && fontcustom compile "./converted_icons" -h -n "lucide" -o ./lucide-font -F - - name: "Upload to Artifacts" + - name: 'Upload to Artifacts' uses: actions/upload-artifact@v1 with: name: lucide-font @@ -390,7 +652,7 @@ jobs: container: image: cirrusci/flutter:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/download-artifact@v2 - uses: actions/cache@v2 with: @@ -436,6 +698,10 @@ jobs: run: flutter test working-directory: packages/lucide-flutter + - name: Copy License + run: cp ../../LICENSE ./LICENSE + working-directory: packages/lucide-flutter + - name: Update yaml run: sed -E 's/(version:)[^\n]*/\1 ${{ needs.pre-build.outputs.VERSION }}/;' pubspec.yaml > pubspec && mv pubspec pubspec.yaml working-directory: packages/lucide-flutter @@ -458,6 +724,7 @@ jobs: pre-build, lucide, lucide-react, + lucide-react-native, lucide-vue, lucide-vue-next, lucide-angular, @@ -468,13 +735,14 @@ jobs: ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/download-artifact@v2 - name: Commit package files run: | mv lucide-package-json/package.json packages/lucide/package.json mv lucide-react-package-json/package.json packages/lucide-react/package.json + mv lucide-react-native-package-json/package.json packages/lucide-react-native/package.json mv lucide-vue-package-json/package.json packages/lucide-vue/package.json mv lucide-preact-package-json/package.json packages/lucide-preact/package.json mv lucide-svelte-package-json/package.json packages/lucide-svelte/package.json @@ -488,7 +756,7 @@ jobs: git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \ commit -m ":package: Bump lucide package versions to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git - git push origin HEAD:master + git push origin HEAD:main - name: Zip font and icons run: | diff --git a/.github/workflows/test-lucide-svelte.yml b/.github/workflows/test-lucide-svelte.yml deleted file mode 100644 index a96995a50..000000000 --- a/.github/workflows/test-lucide-svelte.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Test Lucide Svelte - -on: - pull_request: - paths: - - packages/lucide-svelte/** - push: - paths: - - packages/lucide-svelte/** - - workflow_dispatch: - inputs: - version: - description: Version - required: true - -jobs: - lucide-svelte: - if: github.repository == 'lucide-icons/lucide' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.4.0 - with: - node-version: "14" - cache: yarn - - - name: Install dependencies - run: yarn --prefer-offline - - - name: Build - run: yarn workspace lucide-svelte build - - - name: Test - run: yarn workspace lucide-svelte test - diff --git a/.github/workflows/test-lucide-vue-next.yml b/.github/workflows/test-lucide-vue-next.yml deleted file mode 100644 index 7a47f4955..000000000 --- a/.github/workflows/test-lucide-vue-next.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Test Lucide Vue Next - -on: - pull_request: - paths: - - packages/lucide-vue-next/** - push: - paths: - - packages/lucide-vue-next/** - - workflow_dispatch: - inputs: - version: - description: Version - required: true - -jobs: - lucide-vue-next: - if: github.repository == 'lucide-icons/lucide' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.4.0 - with: - node-version: "14" - cache: yarn - - - name: Install dependencies - run: yarn --prefer-offline - - - name: Build - run: yarn workspace lucide-vue-next build - - - name: Test - run: yarn workspace lucide-vue-next test - diff --git a/.github/workflows/test-lucide-vue.yml b/.github/workflows/test-lucide-vue.yml deleted file mode 100644 index 843b1973b..000000000 --- a/.github/workflows/test-lucide-vue.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Test Lucide Vue - -on: - pull_request: - paths: - - packages/lucide-vue/** - push: - paths: - - packages/lucide-vue/** - - workflow_dispatch: - inputs: - version: - description: Version - required: true - -jobs: - lucide-vue: - if: github.repository == 'lucide-icons/lucide' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.4.0 - with: - node-version: "14" - cache: yarn - - - name: Install dependencies - run: yarn --prefer-offline - - - name: Build - run: yarn workspace lucide-vue build - - - name: Test - run: yarn workspace lucide-vue test - diff --git a/.gitignore b/.gitignore index 6e4a2ea9c..7f05f05ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.idea .next .obsidian .now @@ -13,3 +14,4 @@ stats *.log packages/**/src/icons/*.js packages/**/src/icons/*.ts +packages/**/LICENSE diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..3e775efb0 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +auto-install-peers=true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc59663fd..ef3c999c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,13 +10,13 @@ The following is a set of guidelines for contributing to Lucide. Feel free to pr Feel free to open a pull-request to contribute to this project. **Working on your first Pull Request?** You can learn how from this *free* series -[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) +[How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github) Guidelines for pull requests: - __Make your commit messages as descriptive as possible.__ Include as much information as you can. Explain anything that the file diffs themselves won’t make apparent. - __Document your pull request__. Explain your fix, link to the relevant issue, add screenshots when adding new icons. -- __Make sure the target of your pull request is the relevant branch__. Most of bugfix or new feature should go to the `master` branch. +- __Make sure the target of your pull request is the relevant branch__. Most of bugfix or new feature should go to the `main` branch. - __Include only related work__. If your pull request has unrelated commit, it won't be accepted. ### Pull Requests Including Icons @@ -65,7 +65,7 @@ If you are a designer who wants to contribute to Lucide but you don't know what ## Development -You will need minimum version of [Nodejs 16+](https://nodejs.org) +You will need minimum version of [Nodejs 16.4+](https://nodejs.org) For packagemanagement you will need [yarn v1](https://yarnpkg.com/getting-started/install). For flutter package development, you need [Flutter 1.17+](https://docs.flutter.dev/get-started/install). @@ -75,13 +75,13 @@ After cloning the project you need to run: yarn # Install dependencies, including the workspace packages ``` -### Packages -> Yarn Workspaces +### Packages -> PNPM Workspaces -To distribute different packages we use yarn workspaces. Before you start make sure you are familiar with this setup. Read guide here: [yarn workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces). +To distribute different packages we use PNPM workspaces. Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces). The configured directory for workspaces is the [packages](./packages) directory, located in the root directory. There you will find all the current packages from lucide. -> Note: One package is not managed by yarn: **lucide-flutter** +> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing. ### Generated Code @@ -96,11 +96,11 @@ The commands for generating this code you will read in the next chapter. The build script includes multiple subcommands to: clean the dist directory, generate icon files, generate types files, and build/transpile code for each build format. ```sh -yarn [package-name] build +pnpm [package-name] build #example: -yarn lucide-react build +pnpm lucide-react build ``` #### Testing @@ -108,21 +108,21 @@ yarn lucide-react build Run unit tests with jest for each package to make sure all the package apis still works as expected. ```sh -yarn [package-name] test +pnpm [package-name] test #example: -yarn lucide-vue test +pnpm lucide-vue test ``` Recommended to run the test watcher when making changes. ```sh -yarn [package-name] test:watch +pnpm [package-name] test:watch #example: -yarn lucide-preact test:watch +pnpm lucide-preact test:watch ``` ### Unit Testing @@ -131,15 +131,17 @@ When adding new features to for example the icon component for a framework. It i ### Local Testing -To test changes in a local project, you can use `yarn link` or `npm link` to link the package. Before you do this make sure you builded the package first. +To test changes in a local project, you can use `yarn link`, `npm link` or `pnpm link` to link the package. Before you do this make sure you builded the package first. ```sh # in packages/lucide-react -yarn link + +npm run build && +npm link # in your local project -yarn link lucide-react +npm link lucide-react ``` ## Project Structure @@ -168,7 +170,7 @@ All the icons of lucide in SVG format. These will be used as source for all the Includes all the (npm) packages of lucide. -> Note: One package is not managed by yarn: **lucide-flutter** +> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing. ### scripts diff --git a/LICENSE b/LICENSE index 66cc02207..325e8ff0a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2020, Lucide Contributors +Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/README.md b/README.md index bc3e3dabe..98d3db1d7 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -

Lucide Logo

+

Lucide Logo

+

+ license + npm package + figma installs + build status + discord chat +

# Lucide -![NPM](https://img.shields.io/npm/l/lucide) -[![npm](https://img.shields.io/npm/v/lucide)](https://www.npmjs.com/package/lucide) -[![installs](https://img.shields.io/endpoint?logo=figma&label=installs&url=https://yuanqing.github.io/figma-plugins-stats/plugin/939567362549682242/installs.json)](https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons) -[![Discord](https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA)](https://discord.gg/EH6nSts) - -## What is Lucide? - -Lucide is a community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons. +Community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons. It began after growing disaffection with the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted. @@ -17,29 +17,32 @@ Lucide is trying to expand the icon set as much as possible while staying faithf ### Why choose Lucide over Feather Icons -- Lucide already expanded the icon set by 130+ in less than a year, so more icons to work with. +- More icons to work with: Lucide already has hundreds of icons more than Feather does. +- Official librairies and integrations with popular frameworks and design tools. - Well maintained code base. -- Active community. +- Active community, regularly growing and improving the set. ## Table of Contents -* [Installation](#installation) - * [Package managers](#package-managers) - * [CDN](#cdn) -* [Usage](#usage) - * [Web](#web) - * [React](#react) - * [Vue 2](#vue-2) - * [Vue 3](#vue-3) - * [Angular](#angular) - * [Preact](#preact) - * [Static](#static-svg-sprite-font-icons-) - * [Figma](#figma) - * [Laravel](#laravel) - * [Flutter](#flutter) -* [Contributing](#contributing) -* [Community](#community) -* [License](#license) +- [Usage](#usage) + - [Web](#web) + - [React](#react) + - [React Native](#react-native) + - [Vue 2](#vue-2) + - [Vue 3](#vue-3) + - [Angular](#angular) + - [Preact](#preact) + - [Static (svg sprite, font, icons ..)](#static-svg-sprite-font-icons-) + - [Figma](#figma) + - [Laravel](#laravel) + - [Flutter](#flutter) + - [Svelte](#svelte) + - [Solid](#solid) +- [Contributing](#contributing) +- [Community](#community) +- [License](#license) +- [Credits](#credits) +- [Sponsors](#sponsors) ## Usage @@ -54,13 +57,15 @@ Implementation of the lucide icon library for web applications. ```sh npm install lucide +``` -#or +or +```sh yarn add lucide ``` -For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide#lucide). +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide#lucide). ### React @@ -68,13 +73,31 @@ Implementation of the lucide icon library for react applications. ```sh yarn add lucide-react +``` -# or +or +```sh npm install lucide-react ``` -For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-react#lucide-react). +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-react#lucide-react). + +### React Native + +Implementation of the lucide icon library for React Native applications. + +```sh +yarn add lucide-react-native +``` + +or + +```sh +npm install lucide-react-native +``` + +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-react-native#lucide-react-native). ### Vue 2 @@ -82,13 +105,15 @@ Implementation of the lucide icon library for vue applications. ```sh yarn add lucide-vue +``` -# or +or +```sh npm install lucide-vue ``` -For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-vue#lucide-vue). +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-vue#lucide-vue). ### Vue 3 @@ -96,25 +121,29 @@ Implementation of the lucide icon library for vue applications. ```sh yarn add lucide-vue-next +``` -# or +or +```sh npm install lucide-vue-next ``` -For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-vue-next#lucide-vue-next). +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-vue-next#lucide-vue-next). ### Angular ```sh yarn add lucide-angular +``` -# or +or +```sh npm install lucide-angular ``` -For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-angular#lucide-angular). +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-angular#lucide-angular). ### Preact @@ -122,13 +151,15 @@ Implementation of the lucide icon library for preact applications. ```sh yarn add lucide-preact +``` -# or +or +```sh npm install lucide-preact ``` -For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-preact#lucide-preact). +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-preact#lucide-preact). ### Static (svg sprite, font, icons ..) @@ -141,9 +172,11 @@ NPM package ```sh yarn add lucide-static +``` -# or +or +```sh npm install lucide-static ``` @@ -175,11 +208,43 @@ flutter pub add lucide_icons For more details, see the [pub.dev](https://pub.dev/packages/lucide_icons). +### Svelte + +Implementation of the lucide icon library for Svelte applications. + +```sh +yarn add lucide-svelte +``` + +or + +```sh +npm install lucide-svelte +``` + +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-svelte#lucide-svelte). + +### Solid + +Implementation of the lucide icon library for solid applications. + +```sh +yarn add lucide-solid +``` + +or + +```sh +npm install lucide-solid +``` + +For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-solid#lucide-solid). + ## Contributing -For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/master/CONTRIBUTING.md). +For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md). -Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/lucide-icons/lucide/blob/master/README.md) +Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/lucide-icons/lucide/blob/main/README.md) ## Community @@ -187,7 +252,7 @@ Join the community on our [Discord](https://discord.gg/EH6nSts) server! ## License -Lucide is totally free for commercial use and personally use, this software is licensed under the [ISC License](https://github.com/lucide-icons/lucide/blob/master/LICENSE). +Lucide is totally free for commercial use and personally use, this software is licensed under the [ISC License](https://github.com/lucide-icons/lucide/blob/main/LICENSE). ## Credits @@ -201,4 +266,3 @@ Thank you to all the people who contributed to Lucide! Powered by Vercel - diff --git a/docs/ILLUSTRATOR_GUIDE.md b/docs/ILLUSTRATOR_GUIDE.md index 4f11ae4ce..2e84a9bb4 100644 --- a/docs/ILLUSTRATOR_GUIDE.md +++ b/docs/ILLUSTRATOR_GUIDE.md @@ -26,6 +26,6 @@ The Illustrator template is created following guidelines from the [Icon Design G ![SVG export options in Illustrator](images/illustrator-svg-options.png?raw=true "Setting Page Size") -After that, double check that the [code conventions and SVG global attributes](https://github.com/lucide-icons/lucide/blob/master/docs/ICON_DESIGN_GUIDE.md#code-conventions) are correct. +After that, double check that the [code conventions and SVG global attributes](https://github.com/lucide-icons/lucide/blob/main/docs/ICON_DESIGN_GUIDE.md#code-conventions) are correct. 7. Minify paths with [SVGOMG](https://jakearchibald.github.io/svgomg/). diff --git a/docs/comparison.md b/docs/comparison.md index b27f6a8e3..e02a3696c 100644 --- a/docs/comparison.md +++ b/docs/comparison.md @@ -8,7 +8,7 @@ title: Comparison Lucide is a community-run fork of [Feather Icons](https://github.com/feathericons/feather). -It began after growing disaffection of the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned adn not maintained actively. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted. +It began after growing disaffection of the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned and not maintained actively. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted. Lucide is trying to expand the icon set as much as possible while staying faithful to the original simplistic design language. We do this as a community of devs and designers. diff --git a/docs/index.md b/docs/index.md index f487d4aa2..b544e8fdd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ When designing new icons, the community is working with a set of design rules. T Beside design, code is also important. Assets like icons in for example web projects can increase the transferred bytes significantly. With the growing internet, lucide has the responsibility to keep their assets small as possible. To achieve this, lucide uses SVG compression and specific code architecture for tree-shaking abilities. With tree-shaking used you will only ship the icons you used, helps you to keep the software small as possible when distributed. -Lucide provides several official packages for: [Web (Vanilla)](https://lucide.dev/docs/lucide), [React](https://lucide.dev/docs/lucide-react), [Vue](https://lucide.dev/docs/lucide-vue), [Vue 3](https://lucide.dev/docs/lucide-vue-next), [Svelte](https://lucide.dev/docs/lucide-svelte),[Preact](https://lucide.dev/docs/lucide-preact), [Angular](https://lucide.dev/docs/lucide-angular), [NodeJS](https://lucide.dev/docs/lucide-static#nodejs) and [Flutter](https://lucide.dev/docs/lucide-flutter). +Lucide provides several official packages for: [Web (Vanilla)](https://lucide.dev/docs/lucide), [React](https://lucide.dev/docs/lucide-react), [React Native](https://lucide.dev/docs/lucide-react-native), [Vue](https://lucide.dev/docs/lucide-vue), [Vue 3](https://lucide.dev/docs/lucide-vue-next), [Svelte](https://lucide.dev/docs/lucide-svelte),[Preact](https://lucide.dev/docs/lucide-preact), [Angular](https://lucide.dev/docs/lucide-angular), [NodeJS](https://lucide.dev/docs/lucide-static#nodejs) and [Flutter](https://lucide.dev/docs/lucide-flutter). Any questions about lucide? Ask the community. Active on [GitHub](https://github.com/lucide-icons/lucide) and [Discord](https://discord.gg/EH6nSts). diff --git a/docs/installation.md b/docs/installation.md index 351f0f3b0..b6007870c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -10,9 +10,11 @@ Implementation of the lucide icon library for web applications. ```bash npm install lucide +``` -#or +or +```sh yarn add lucide ``` @@ -24,9 +26,11 @@ Implementation of the lucide icon library for react applications. ```bash yarn add lucide-react +``` -# or +or +```sh npm install lucide-react ``` @@ -38,9 +42,11 @@ Implementation of the lucide icon library for vue applications. ```bash yarn add lucide-vue +``` -# or +or +```sh npm install lucide-vue ``` @@ -52,9 +58,11 @@ Implementation of the lucide icon library for vue applications. ```bash yarn add lucide-vue-next +``` -# or +or +```sh npm install lucide-vue-next ``` @@ -66,9 +74,11 @@ Implementation of the lucide icon library for vue applications. ```bash yarn add lucide-svelte +``` -# or +or +```sh npm install lucide-svelte ``` @@ -78,9 +88,11 @@ For more details, see the [documentation](packages/lucide-svelte). ```bash yarn add lucide-angular +``` -# or +or +```sh npm install lucide-angular ``` @@ -92,9 +104,11 @@ Implementation of the lucide icon library for preact applications. ```bash yarn add lucide-preact +``` -# or +or +```sh npm install lucide-preact ``` @@ -106,7 +120,7 @@ The lucide figma plugin. Visit [Figma community page](https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons) to install the plugin. -![Setting Page Size](https://www.figma.com/community/plugin/939567362549682242/thumbnail "Figma Lucide Cover") +![Setting Page Size](https://www.figma.com/community/plugin/939567362549682242/thumbnail 'Figma Lucide Cover') ## Laravel diff --git a/docs/packages/lucide-angular.md b/docs/packages/lucide-angular.md index 10e07cbd6..72651b7ef 100644 --- a/docs/packages/lucide-angular.md +++ b/docs/packages/lucide-angular.md @@ -4,11 +4,13 @@ Implementation of the lucide icon library for angular applications. ## Installation -``` sh +```sh yarn add lucide-angular +``` -# or +or +```sh npm install lucide-angular ``` @@ -20,12 +22,12 @@ There are three ways for use this library. After install `lucide-angular` change content of file `app.component.html` and `app.component.ts`. -``` html +```html
``` -``` js +```js // app.component.ts import { Component, OnInit } from '@angular/core'; @@ -37,7 +39,6 @@ import { Activity } from 'lucide-angular/icons'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) - export class AppComponent implements OnInit { ngOnInit(): void { const div = document.getElementById('lucide-icon'); @@ -51,11 +52,11 @@ export class AppComponent implements OnInit { } ``` -### Method 2: User __Tag__ with __name__ property +### Method 2: User **Tag** with **name** property After install `lucide-angular` change content of file `app.component.html`, `app.component.ts`, `app.component.css` and `app.module.ts`. -``` js +```js // app.module.ts import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; @@ -65,32 +66,29 @@ import { AppComponent } from './app.component'; import { LucideAngularModule, AlarmCheck, Edit } from 'lucide-angular'; @NgModule({ - declarations: [ - AppComponent - ], + declarations: [AppComponent], imports: [ BrowserModule, AppRoutingModule, - LucideAngularModule.pick({ AlarmCheck, Edit }) // add all of icons that is imported. + LucideAngularModule.pick({ AlarmCheck, Edit }) // add all of icons that is imported. ], providers: [], bootstrap: [AppComponent] }) - -export class AppModule { } +export class AppModule {} ``` -``` html +```html ``` -### Method 3: User __Tag__ with __img__ property +### Method 3: User **Tag** with **img** property After install `lucide-angular` change content of file `app.component.html`, `app.component.ts`, `app.component.css` and `app.module.ts`. -``` js +```js // app.module.ts import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; @@ -100,28 +98,21 @@ import { AppComponent } from './app.component'; import { LucideAngularModule } from 'lucide-angular'; @NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - AppRoutingModule, - LucideAngularModule.pick({ }) - ], + declarations: [AppComponent], + imports: [BrowserModule, AppRoutingModule, LucideAngularModule.pick({})], providers: [], bootstrap: [AppComponent] }) - -export class AppModule { } +export class AppModule {} ``` -``` xml +```xml ``` -``` js +```js // app.component.ts import { Component } from '@angular/core'; import { Airplay, Circle } from 'lucide-angular'; @@ -131,7 +122,6 @@ import { Airplay, Circle } from 'lucide-angular'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) - export class AppComponent { ico1 = Airplay; ico2 = Circle; @@ -144,7 +134,7 @@ export class AppComponent { In `Method 2`: import all icons in `app.module.ts` by: -``` js +```js import { icons } from 'lucide-angular/icons'; diff --git a/docs/packages/lucide-preact.md b/docs/packages/lucide-preact.md index 8f185e8ff..d3a543b07 100644 --- a/docs/packages/lucide-preact.md +++ b/docs/packages/lucide-preact.md @@ -10,28 +10,30 @@ Implementation of the lucide icon library for preact applications. ```sh yarn add lucide-preact +``` -# or +or +```sh npm install lucide-preact ``` ## How to use -It's build with ESmodules so it's completely threeshakable. +It's build with ESmodules so it's completely tree-shakable. Each icon can be imported as a preact component. ### Example You can pass additional props to adjust the icon. -``` js +```js import { Camera } from 'lucide-preact'; // Returns PreactComponent // Usage const App = () => { - return + return ; }; export default App; @@ -39,20 +41,20 @@ export default App; ### Props -| name | type | default -| ------------ | -------- | -------- -| `size` | *Number* | 24 -| `color` | *String* | currentColor -| `strokeWidth`| *Number* | 2 +| name | type | default | +| ------------- | -------- | ------------ | +| `size` | _Number_ | 24 | +| `color` | _String_ | currentColor | +| `strokeWidth` | _Number_ | 2 | ### Custom props / svg attributes You can also pass custom props that will be added in the as attributes. With that you can modify the icons look by passing svg attributes. -``` js +```js // Usage const App = () => { - return + return ; }; ``` @@ -62,17 +64,17 @@ const App = () => { It is possible to create one generic icon component to load icons. -> ⚠️ Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly. +> ⚠️ Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly. #### Icon Component Example -``` js +```js import * as icons from 'lucide-preact'; -const Icon = ({name, color, size}) => { +const Icon = ({ name, color, size }) => { const LucideIcon = icons[name]; - return + return ; }; export default Icon; diff --git a/docs/packages/lucide-react-native.md b/docs/packages/lucide-react-native.md new file mode 100644 index 000000000..9ccf3a08c --- /dev/null +++ b/docs/packages/lucide-react-native.md @@ -0,0 +1,77 @@ +# Lucide React Native + +Implementation of the lucide icon library for React Native applications + +## Installation + +First, ensure that you have `react-native-svg@^12.0.0` installed. Then, install the package: + +```bash +yarn add lucide-react-native +``` + +or + +```sh +npm install lucide-react-native +``` + +## How to use + +It's build with ESmodules so it's completely tree-shakable. +Each icon can be imported as a react component. + +### Example + +You can pass additional props to adjust the icon. + +```js +import { Camera } from 'lucide-react-native'; +// Returns ReactComponent + +// Usage +const App = () => { + return ; +}; + +export default App; +``` + +### Props + +| name | type | default | +| ------------- | -------- | ------------ | +| `size` | _Number_ | 24 | +| `color` | _String_ | currentColor | +| `strokeWidth` | _Number_ | 2 | + +### Custom props + +You can also pass custom props that will be added in the svg as attributes. + +```js +// Usage +const App = () => { + return ; +}; +``` + +### One generic icon component + +It is possible to create one generic icon component to load icons. + +> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly. + +#### Icon Component Example + +```js +import * as icons from 'lucide-react'; + +const Icon = ({ name, color, size }) => { + const LucideIcon = icons[name]; + + return ; +}; + +export default Icon; +``` diff --git a/docs/packages/lucide-react.md b/docs/packages/lucide-react.md index 88bb0eb23..ee8783204 100644 --- a/docs/packages/lucide-react.md +++ b/docs/packages/lucide-react.md @@ -4,30 +4,32 @@ Implementation of the lucide icon library for react applications ## Installation -``` bash +```bash yarn add lucide-react +``` -# or +or +```sh npm install lucide-react ``` ## How to use -It's build with ESmodules so it's completely threeshakable. +It's build with ESmodules so it's completely tree-shakable. Each icon can be imported as a react component. ### Example You can pass additional props to adjust the icon. -``` js +```js import { Camera } from 'lucide-react'; // Returns ReactComponent // Usage const App = () => { - return + return ; }; export default App; @@ -35,20 +37,20 @@ export default App; ### Props -| name | type | default -| ------------ | -------- | -------- -| `size` | *Number* | 24 -| `color` | *String* | currentColor -| `strokeWidth`| *Number* | 2 +| name | type | default | +| ------------- | -------- | ------------ | +| `size` | _Number_ | 24 | +| `color` | _String_ | currentColor | +| `strokeWidth` | _Number_ | 2 | ### Custom props You can also pass custom props that will be added in the svg as attributes. -``` js +```js // Usage const App = () => { - return + return ; }; ``` @@ -56,17 +58,17 @@ const App = () => { It is possible to create one generic icon component to load icons. -> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly. +> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly. #### Icon Component Example -``` js +```js import * as icons from 'lucide-react'; -const Icon = ({name, color, size}) => { +const Icon = ({ name, color, size }) => { const LucideIcon = icons[name]; - return + return ; }; export default Icon; diff --git a/docs/packages/lucide-static.md b/docs/packages/lucide-static.md index e184a7905..a753b9147 100644 --- a/docs/packages/lucide-static.md +++ b/docs/packages/lucide-static.md @@ -19,23 +19,25 @@ This package is suitable for very specific use cases for example if you want to ```sh yarn add lucide-static +``` -# or +or +```sh npm install lucide-static ``` ### CDN -``` html +```html - + ``` @@ -50,14 +52,14 @@ Checkout the [codesandbox examples](https://codesandbox.io/s/using-the-svg-sprit To use it in for example html: -``` html +```html - + ``` -``` css +```css .home-icon { - background-image: url(~lucide-static/icons/home.svg) + background-image: url(~lucide-static/icons/home.svg); } ``` @@ -69,7 +71,7 @@ You can simply import each svg by targeting `lucide-static/icons/{icon-name}.svg To use svgs in your project you can for example use a [svg loader](https://v4.webpack.js.org/loaders/svg-inline-loader/). ```js -import arrowRightIcon from 'lucide-static/icons/arrow-right' +import arrowRightIcon from 'lucide-static/icons/arrow-right'; // return string of a svg ``` @@ -80,7 +82,7 @@ You may need additional loader for this. ```html - + ``` - ### Node.js To use lucide icons in your Nodejs project you can import each icon as: ```js -const { messageSquare } = require('lucide-static/lib') +const { messageSquare } = require('lucide-static/lib'); ``` > Note: Each icon name is in camelCase. @@ -154,10 +155,10 @@ const { messageSquare } = require('lucide-static/lib') #### Example in node.js project ```js -const express = require('express') -const { messageSquare } = require('lucide-static/lib') -const app = express() -const port = 3000 +const express = require('express'); +const { messageSquare } = require('lucide-static/lib'); +const app = express(); +const port = 3000; app.get('/', (req, res) => { res.send(` @@ -172,10 +173,10 @@ app.get('/', (req, res) => { - `) -}) + `); +}); app.listen(port, () => { - console.log(`Example app listening at http://localhost:${port}`) -}) + console.log(`Example app listening at http://localhost:${port}`); +}); ``` diff --git a/docs/packages/lucide-svelte.md b/docs/packages/lucide-svelte.md index 8859739f1..b47b8760c 100644 --- a/docs/packages/lucide-svelte.md +++ b/docs/packages/lucide-svelte.md @@ -6,9 +6,11 @@ Implementation of the lucide icon library for svelte applications. ```bash yarn add lucide-svelte +``` -# or +or +```sh npm install lucide-svelte ``` @@ -22,30 +24,30 @@ Default usage: ```html - + ``` You can pass additional props to adjust the icon. ```html - + ``` ### Available props -| name | type | default -| -------------- | -------- | -------- -| `size` | *Number* | 24 -| `color` | *String* | currentColor -| `strokeWidth` | *Number* | 2 -| `*` | *String* | - +| name | type | default | +| ------------- | -------- | ------------ | +| `size` | _Number_ | 24 | +| `color` | _String_ | currentColor | +| `strokeWidth` | _Number_ | 2 | +| `*` | _String_ | - | \* All SVGProps are available to style the svgs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation) @@ -53,10 +55,10 @@ import { Camera } from 'lucide-svelte' ```html - + ``` This results a filled phone icon. @@ -69,20 +71,20 @@ It is possible to create one generic icon component to load icons. #### Icon Component Example -``` html +```html - + ``` ##### Then you can use it like this -``` html +```html diff --git a/docs/packages/lucide-vue-next.md b/docs/packages/lucide-vue-next.md index 2d6bdb370..df1f4c126 100644 --- a/docs/packages/lucide-vue-next.md +++ b/docs/packages/lucide-vue-next.md @@ -2,7 +2,7 @@ Implementation of the lucide icon library for Vue 3 applications. -> ⚠️ This version of lucide is for Vue 3, For Vue 2 got to [lucide-vue-next](lucide-vue) +> ⚠️ This version of lucide is for Vue 3, For Vue 2 got to [lucide-vue](lucide-vue) ## Installation @@ -20,7 +20,7 @@ npm install lucide-vue-next ## How to use -It's build with ESmodules so it's completely threeshakable. +It's build with ESmodules so it's completely tree-shakable. Each icon can be imported as a vue component. ### Example @@ -35,15 +35,8 @@ You can pass additional props to adjust the icon. /> -
diff --git a/docs/packages/lucide.md b/docs/packages/lucide.md index b63f54166..53d2da778 100644 --- a/docs/packages/lucide.md +++ b/docs/packages/lucide.md @@ -6,15 +6,19 @@ Implementation of the lucide icon library for web applications. ### Package Managers -``` bash +```sh npm install lucide -#or +``` + +or + +```sh yarn add lucide ``` ### CDN -``` html +```html @@ -44,7 +48,7 @@ Here is a complete example with unpkg ### With ESModules -To reduce bundle size, lucide is built to be fully treeshakable. +To reduce bundle size, lucide is built to be fully tree-shakable. The `createIcons` function will search for HTMLElements with the attribute `icon-name` and replace it with the svg from the given icon name. ```html @@ -56,7 +60,7 @@ The `createIcons` function will search for HTMLElements with the attribute `icon import { createIcons, icons } from 'lucide'; // Caution, this will import all the icons and bundle them. -createIcons({icons}); +createIcons({ icons }); // Recommended way, to include only the icons you need. import { createIcons, Menu, ArrowRight, Globe } from 'lucide'; @@ -65,8 +69,8 @@ createIcons({ icons: { Menu, ArrowRight, - Globe, - }, + Globe + } }); ``` @@ -83,9 +87,9 @@ createIcons({ attrs: { class: ['my-custom-class', 'icon'], 'stroke-width': 1, - stroke: '#333', + stroke: '#333' }, - nameAttr: 'icon-name', // attribute for the icon name. + nameAttr: 'icon-name' // attribute for the icon name. }); ``` @@ -98,8 +102,8 @@ createIcons({ icons: { Menu, ArrowRight, - Globe, - }, + Globe + } }); ``` diff --git a/icons/air-vent.svg b/icons/air-vent.svg new file mode 100644 index 000000000..0b705dc18 --- /dev/null +++ b/icons/air-vent.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/angry.svg b/icons/angry.svg new file mode 100644 index 000000000..f2b05ebaf --- /dev/null +++ b/icons/angry.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/annoyed.svg b/icons/annoyed.svg new file mode 100644 index 000000000..3279b6621 --- /dev/null +++ b/icons/annoyed.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/apple.svg b/icons/apple.svg new file mode 100644 index 000000000..2d593c300 --- /dev/null +++ b/icons/apple.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/arrow-up-down.svg b/icons/arrow-up-down.svg new file mode 100644 index 000000000..45d6616f5 --- /dev/null +++ b/icons/arrow-up-down.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/axis-3d.svg b/icons/axis-3d.svg new file mode 100644 index 000000000..7185ef6f8 --- /dev/null +++ b/icons/axis-3d.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/baby.svg b/icons/baby.svg new file mode 100644 index 000000000..92d904f03 --- /dev/null +++ b/icons/baby.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/banana.svg b/icons/banana.svg new file mode 100644 index 000000000..415661369 --- /dev/null +++ b/icons/banana.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/bean-off.svg b/icons/bean-off.svg new file mode 100644 index 000000000..17dcccce9 --- /dev/null +++ b/icons/bean-off.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/bean.svg b/icons/bean.svg new file mode 100644 index 000000000..e1346ab20 --- /dev/null +++ b/icons/bean.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/bomb.svg b/icons/bomb.svg new file mode 100644 index 000000000..002168054 --- /dev/null +++ b/icons/bomb.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/bone.svg b/icons/bone.svg new file mode 100644 index 000000000..bba0135bb --- /dev/null +++ b/icons/bone.svg @@ -0,0 +1,13 @@ + + + diff --git a/icons/book-open-check.svg b/icons/book-open-check.svg new file mode 100644 index 000000000..f376746fd --- /dev/null +++ b/icons/book-open-check.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/box-select.svg b/icons/box-select.svg index 22481d880..f0822a34f 100644 --- a/icons/box-select.svg +++ b/icons/box-select.svg @@ -9,16 +9,16 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/icons/cake.svg b/icons/cake.svg new file mode 100644 index 000000000..175b14339 --- /dev/null +++ b/icons/cake.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/icons/calendar-clock.svg b/icons/calendar-clock.svg new file mode 100644 index 000000000..a1c19bda4 --- /dev/null +++ b/icons/calendar-clock.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/calendar-heart.svg b/icons/calendar-heart.svg new file mode 100644 index 000000000..18bb1f746 --- /dev/null +++ b/icons/calendar-heart.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/calendar-search.svg b/icons/calendar-search.svg new file mode 100644 index 000000000..5ad25ae17 --- /dev/null +++ b/icons/calendar-search.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/candy-off.svg b/icons/candy-off.svg new file mode 100644 index 000000000..0416ba436 --- /dev/null +++ b/icons/candy-off.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/candy.svg b/icons/candy.svg new file mode 100644 index 000000000..a59286c1a --- /dev/null +++ b/icons/candy.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/cat.svg b/icons/cat.svg new file mode 100644 index 000000000..7b969a008 --- /dev/null +++ b/icons/cat.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/check-check.svg b/icons/check-check.svg new file mode 100644 index 000000000..f1c28abc4 --- /dev/null +++ b/icons/check-check.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/cherry.svg b/icons/cherry.svg new file mode 100644 index 000000000..e713ce1a3 --- /dev/null +++ b/icons/cherry.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/circle-dot.svg b/icons/circle-dot.svg new file mode 100644 index 000000000..357549b9b --- /dev/null +++ b/icons/circle-dot.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/circle-ellipsis.svg b/icons/circle-ellipsis.svg new file mode 100644 index 000000000..5efa1b3f9 --- /dev/null +++ b/icons/circle-ellipsis.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/citrus.svg b/icons/citrus.svg new file mode 100644 index 000000000..1bc658037 --- /dev/null +++ b/icons/citrus.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/clipboard-check.svg b/icons/clipboard-check.svg index 5844ae9a0..8d6bcb659 100644 --- a/icons/clipboard-check.svg +++ b/icons/clipboard-check.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/clipboard-copy.svg b/icons/clipboard-copy.svg index 21b715d87..83f69543b 100644 --- a/icons/clipboard-copy.svg +++ b/icons/clipboard-copy.svg @@ -9,9 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > + - diff --git a/icons/clipboard-edit.svg b/icons/clipboard-edit.svg new file mode 100644 index 000000000..ee8f55f73 --- /dev/null +++ b/icons/clipboard-edit.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/clipboard-list.svg b/icons/clipboard-list.svg index 015cedcae..0ae603214 100644 --- a/icons/clipboard-list.svg +++ b/icons/clipboard-list.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/clipboard-signature.svg b/icons/clipboard-signature.svg new file mode 100644 index 000000000..5dfd4dfd0 --- /dev/null +++ b/icons/clipboard-signature.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/clipboard-type.svg b/icons/clipboard-type.svg new file mode 100644 index 000000000..95e689793 --- /dev/null +++ b/icons/clipboard-type.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/clipboard-x.svg b/icons/clipboard-x.svg index b6190dd3f..e5641c344 100644 --- a/icons/clipboard-x.svg +++ b/icons/clipboard-x.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/clipboard.svg b/icons/clipboard.svg index 6e733e7e8..f61cea7e6 100644 --- a/icons/clipboard.svg +++ b/icons/clipboard.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/cloud-cog.svg b/icons/cloud-cog.svg new file mode 100644 index 000000000..2c3a938d3 --- /dev/null +++ b/icons/cloud-cog.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + diff --git a/icons/cloud-drizzle.svg b/icons/cloud-drizzle.svg index e3583efa4..01670e369 100644 --- a/icons/cloud-drizzle.svg +++ b/icons/cloud-drizzle.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/cloud-fog.svg b/icons/cloud-fog.svg index 362b1c6e9..aee9fc0fb 100644 --- a/icons/cloud-fog.svg +++ b/icons/cloud-fog.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/cloud-hail.svg b/icons/cloud-hail.svg index 2a7f668d3..3158de52d 100644 --- a/icons/cloud-hail.svg +++ b/icons/cloud-hail.svg @@ -9,11 +9,11 @@ stroke-linecap="round" stroke-linejoin="round" > - + - - + + - + diff --git a/icons/cloud-lightning.svg b/icons/cloud-lightning.svg index 4e92a4f0c..3f11bb355 100644 --- a/icons/cloud-lightning.svg +++ b/icons/cloud-lightning.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > + - diff --git a/icons/cloud-moon-rain.svg b/icons/cloud-moon-rain.svg new file mode 100644 index 000000000..d76f103ae --- /dev/null +++ b/icons/cloud-moon-rain.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/cloud-moon.svg b/icons/cloud-moon.svg index 68e886035..0d205e816 100644 --- a/icons/cloud-moon.svg +++ b/icons/cloud-moon.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/cloud-off.svg b/icons/cloud-off.svg index ecf3f97ea..6bc830e13 100644 --- a/icons/cloud-off.svg +++ b/icons/cloud-off.svg @@ -10,6 +10,6 @@ stroke-linejoin="round" > - - + + diff --git a/icons/cloud-rain-wind.svg b/icons/cloud-rain-wind.svg index 466ea16e0..f6a456067 100644 --- a/icons/cloud-rain-wind.svg +++ b/icons/cloud-rain-wind.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/cloud-rain.svg b/icons/cloud-rain.svg index 6141e2468..2a79fcf7e 100644 --- a/icons/cloud-rain.svg +++ b/icons/cloud-rain.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/cloud-snow.svg b/icons/cloud-snow.svg index ed943d8a3..53a3ffa97 100644 --- a/icons/cloud-snow.svg +++ b/icons/cloud-snow.svg @@ -9,11 +9,11 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - + + + + + + + diff --git a/icons/cloud-sun-rain.svg b/icons/cloud-sun-rain.svg new file mode 100644 index 000000000..b3de2bac4 --- /dev/null +++ b/icons/cloud-sun-rain.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/cloud-sun.svg b/icons/cloud-sun.svg index aca959a11..8d7705d8b 100644 --- a/icons/cloud-sun.svg +++ b/icons/cloud-sun.svg @@ -10,9 +10,9 @@ stroke-linejoin="round" > - + - - - + + + diff --git a/icons/cloud.svg b/icons/cloud.svg index 460550452..96c52fc8e 100644 --- a/icons/cloud.svg +++ b/icons/cloud.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/cloudy.svg b/icons/cloudy.svg index a2a50c6af..088fa8615 100644 --- a/icons/cloudy.svg +++ b/icons/cloudy.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/cog.svg b/icons/cog.svg new file mode 100644 index 000000000..5db1c80f9 --- /dev/null +++ b/icons/cog.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/icons/concierge-bell.svg b/icons/concierge-bell.svg new file mode 100644 index 000000000..0f49fa91a --- /dev/null +++ b/icons/concierge-bell.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/curly-braces.svg b/icons/curly-braces.svg new file mode 100644 index 000000000..d56b1dc17 --- /dev/null +++ b/icons/curly-braces.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/diff.svg b/icons/diff.svg new file mode 100644 index 000000000..ac0307b32 --- /dev/null +++ b/icons/diff.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/dna-off.svg b/icons/dna-off.svg new file mode 100644 index 000000000..70653e180 --- /dev/null +++ b/icons/dna-off.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/icons/dna.svg b/icons/dna.svg new file mode 100644 index 000000000..4b496b8cd --- /dev/null +++ b/icons/dna.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/icons/dog.svg b/icons/dog.svg new file mode 100644 index 000000000..6b4f4b9e8 --- /dev/null +++ b/icons/dog.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/download-cloud.svg b/icons/download-cloud.svg index 7e50c611c..045af5889 100644 --- a/icons/download-cloud.svg +++ b/icons/download-cloud.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/dumbbell.svg b/icons/dumbbell.svg new file mode 100644 index 000000000..9a8c14e79 --- /dev/null +++ b/icons/dumbbell.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/icons/ear-off.svg b/icons/ear-off.svg new file mode 100644 index 000000000..6500235f2 --- /dev/null +++ b/icons/ear-off.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/ear.svg b/icons/ear.svg new file mode 100644 index 000000000..1d2b7fb2d --- /dev/null +++ b/icons/ear.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/egg-fried.svg b/icons/egg-fried.svg new file mode 100644 index 000000000..240883ba2 --- /dev/null +++ b/icons/egg-fried.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/egg-off.svg b/icons/egg-off.svg new file mode 100644 index 000000000..e06179f31 --- /dev/null +++ b/icons/egg-off.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/fan.svg b/icons/fan.svg new file mode 100644 index 000000000..5b1ecb8ac --- /dev/null +++ b/icons/fan.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/file-archive.svg b/icons/file-archive.svg new file mode 100644 index 000000000..00486c063 --- /dev/null +++ b/icons/file-archive.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/file-audio-2.svg b/icons/file-audio-2.svg new file mode 100644 index 000000000..5386d8953 --- /dev/null +++ b/icons/file-audio-2.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-audio.svg b/icons/file-audio.svg new file mode 100644 index 000000000..51a89509f --- /dev/null +++ b/icons/file-audio.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-axis-3d.svg b/icons/file-axis-3d.svg new file mode 100644 index 000000000..e3add4a1b --- /dev/null +++ b/icons/file-axis-3d.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-badge-2.svg b/icons/file-badge-2.svg new file mode 100644 index 000000000..5aef3c40a --- /dev/null +++ b/icons/file-badge-2.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-badge.svg b/icons/file-badge.svg new file mode 100644 index 000000000..a5c68e91b --- /dev/null +++ b/icons/file-badge.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-bar-chart-2.svg b/icons/file-bar-chart-2.svg new file mode 100644 index 000000000..db3a136c0 --- /dev/null +++ b/icons/file-bar-chart-2.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-bar-chart.svg b/icons/file-bar-chart.svg new file mode 100644 index 000000000..40f679ab3 --- /dev/null +++ b/icons/file-bar-chart.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-box.svg b/icons/file-box.svg new file mode 100644 index 000000000..f96a3fb49 --- /dev/null +++ b/icons/file-box.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/file-check-2.svg b/icons/file-check-2.svg index 26c5a8cce..b8b8211d4 100644 --- a/icons/file-check-2.svg +++ b/icons/file-check-2.svg @@ -10,6 +10,6 @@ stroke-linejoin="round" > - + diff --git a/icons/file-clock.svg b/icons/file-clock.svg new file mode 100644 index 000000000..217b647d1 --- /dev/null +++ b/icons/file-clock.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-code.svg b/icons/file-code.svg index 658811fc4..913eb0a59 100644 --- a/icons/file-code.svg +++ b/icons/file-code.svg @@ -10,7 +10,7 @@ stroke-linejoin="round" > - + diff --git a/icons/file-cog-2.svg b/icons/file-cog-2.svg new file mode 100644 index 000000000..688e5b5f6 --- /dev/null +++ b/icons/file-cog-2.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/icons/file-cog.svg b/icons/file-cog.svg new file mode 100644 index 000000000..01f804a38 --- /dev/null +++ b/icons/file-cog.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/icons/file-diff.svg b/icons/file-diff.svg new file mode 100644 index 000000000..2706d2ad2 --- /dev/null +++ b/icons/file-diff.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-digit.svg b/icons/file-digit.svg index 157ea2cef..745fbaeb4 100644 --- a/icons/file-digit.svg +++ b/icons/file-digit.svg @@ -10,7 +10,7 @@ stroke-linejoin="round" > - + diff --git a/icons/file-down.svg b/icons/file-down.svg new file mode 100644 index 000000000..bb06695d0 --- /dev/null +++ b/icons/file-down.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-edit.svg b/icons/file-edit.svg new file mode 100644 index 000000000..805577a8b --- /dev/null +++ b/icons/file-edit.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-heart.svg b/icons/file-heart.svg new file mode 100644 index 000000000..7e0ac9988 --- /dev/null +++ b/icons/file-heart.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-image.svg b/icons/file-image.svg new file mode 100644 index 000000000..ba9f50ebf --- /dev/null +++ b/icons/file-image.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-input.svg b/icons/file-input.svg index b3048fd92..2e25fd334 100644 --- a/icons/file-input.svg +++ b/icons/file-input.svg @@ -10,7 +10,7 @@ stroke-linejoin="round" > - + diff --git a/icons/file-json-2.svg b/icons/file-json-2.svg new file mode 100644 index 000000000..82cc38c5c --- /dev/null +++ b/icons/file-json-2.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-json.svg b/icons/file-json.svg new file mode 100644 index 000000000..a4ade489a --- /dev/null +++ b/icons/file-json.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-key-2.svg b/icons/file-key-2.svg new file mode 100644 index 000000000..e640838a0 --- /dev/null +++ b/icons/file-key-2.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-key.svg b/icons/file-key.svg new file mode 100644 index 000000000..e849483aa --- /dev/null +++ b/icons/file-key.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-line-chart.svg b/icons/file-line-chart.svg new file mode 100644 index 000000000..b8bf128db --- /dev/null +++ b/icons/file-line-chart.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-lock-2.svg b/icons/file-lock-2.svg new file mode 100644 index 000000000..c736d1694 --- /dev/null +++ b/icons/file-lock-2.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-lock.svg b/icons/file-lock.svg new file mode 100644 index 000000000..a9433ed16 --- /dev/null +++ b/icons/file-lock.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-minus-2.svg b/icons/file-minus-2.svg index 5b4a187d0..f3d869f93 100644 --- a/icons/file-minus-2.svg +++ b/icons/file-minus-2.svg @@ -10,6 +10,6 @@ stroke-linejoin="round" > - + diff --git a/icons/file-output.svg b/icons/file-output.svg index a34742f8f..4bf81f9a8 100644 --- a/icons/file-output.svg +++ b/icons/file-output.svg @@ -10,7 +10,7 @@ stroke-linejoin="round" > - + diff --git a/icons/file-pie-chart.svg b/icons/file-pie-chart.svg new file mode 100644 index 000000000..137da77db --- /dev/null +++ b/icons/file-pie-chart.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-plus-2.svg b/icons/file-plus-2.svg index bb4719984..d5976a8e5 100644 --- a/icons/file-plus-2.svg +++ b/icons/file-plus-2.svg @@ -10,7 +10,7 @@ stroke-linejoin="round" > - + diff --git a/icons/file-question.svg b/icons/file-question.svg new file mode 100644 index 000000000..721e75af8 --- /dev/null +++ b/icons/file-question.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-scan.svg b/icons/file-scan.svg new file mode 100644 index 000000000..0aa2ed50c --- /dev/null +++ b/icons/file-scan.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/file-search-2.svg b/icons/file-search-2.svg new file mode 100644 index 000000000..da61de300 --- /dev/null +++ b/icons/file-search-2.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-search.svg b/icons/file-search.svg index 359655394..036f59f55 100644 --- a/icons/file-search.svg +++ b/icons/file-search.svg @@ -10,7 +10,7 @@ stroke-linejoin="round" > - + diff --git a/icons/file-signature.svg b/icons/file-signature.svg new file mode 100644 index 000000000..b4cd452ad --- /dev/null +++ b/icons/file-signature.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-spreadsheet.svg b/icons/file-spreadsheet.svg new file mode 100644 index 000000000..78635bb8d --- /dev/null +++ b/icons/file-spreadsheet.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/file-symlink.svg b/icons/file-symlink.svg new file mode 100644 index 000000000..05b7b0a5d --- /dev/null +++ b/icons/file-symlink.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-terminal.svg b/icons/file-terminal.svg new file mode 100644 index 000000000..148b75efa --- /dev/null +++ b/icons/file-terminal.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-type-2.svg b/icons/file-type-2.svg new file mode 100644 index 000000000..c3f5ecbf2 --- /dev/null +++ b/icons/file-type-2.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-type.svg b/icons/file-type.svg new file mode 100644 index 000000000..67d7da37f --- /dev/null +++ b/icons/file-type.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-up.svg b/icons/file-up.svg new file mode 100644 index 000000000..ad6e941e9 --- /dev/null +++ b/icons/file-up.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-video-2.svg b/icons/file-video-2.svg new file mode 100644 index 000000000..8d36f0df1 --- /dev/null +++ b/icons/file-video-2.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-video.svg b/icons/file-video.svg new file mode 100644 index 000000000..d41a0fe35 --- /dev/null +++ b/icons/file-video.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/file-volume-2.svg b/icons/file-volume-2.svg new file mode 100644 index 000000000..edab47c86 --- /dev/null +++ b/icons/file-volume-2.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/file-volume.svg b/icons/file-volume.svg new file mode 100644 index 000000000..f6c27b177 --- /dev/null +++ b/icons/file-volume.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/file-warning.svg b/icons/file-warning.svg new file mode 100644 index 000000000..51f8b1c58 --- /dev/null +++ b/icons/file-warning.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/flask-conical-off.svg b/icons/flask-conical-off.svg new file mode 100644 index 000000000..51553e59c --- /dev/null +++ b/icons/flask-conical-off.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/flask-conical.svg b/icons/flask-conical.svg index 40628ceab..f0699513e 100644 --- a/icons/flask-conical.svg +++ b/icons/flask-conical.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/flip-horizontal-2.svg b/icons/flip-horizontal-2.svg new file mode 100644 index 000000000..7e0459dab --- /dev/null +++ b/icons/flip-horizontal-2.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/flip-horizontal.svg b/icons/flip-horizontal.svg new file mode 100644 index 000000000..5319777b8 --- /dev/null +++ b/icons/flip-horizontal.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/flip-vertical-2.svg b/icons/flip-vertical-2.svg new file mode 100644 index 000000000..26b0775a3 --- /dev/null +++ b/icons/flip-vertical-2.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/flip-vertical.svg b/icons/flip-vertical.svg new file mode 100644 index 000000000..5678c279c --- /dev/null +++ b/icons/flip-vertical.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/folder-archive.svg b/icons/folder-archive.svg new file mode 100644 index 000000000..3bd6201be --- /dev/null +++ b/icons/folder-archive.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/folder-check.svg b/icons/folder-check.svg new file mode 100644 index 000000000..c2a4689b9 --- /dev/null +++ b/icons/folder-check.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/folder-clock.svg b/icons/folder-clock.svg new file mode 100644 index 000000000..7260da808 --- /dev/null +++ b/icons/folder-clock.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-closed.svg b/icons/folder-closed.svg new file mode 100644 index 000000000..79a18d57f --- /dev/null +++ b/icons/folder-closed.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/folder-cog-2.svg b/icons/folder-cog-2.svg new file mode 100644 index 000000000..7ca430d88 --- /dev/null +++ b/icons/folder-cog-2.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/folder-cog.svg b/icons/folder-cog.svg new file mode 100644 index 000000000..419c6f50f --- /dev/null +++ b/icons/folder-cog.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + diff --git a/icons/folder-down.svg b/icons/folder-down.svg new file mode 100644 index 000000000..c4ac0ca22 --- /dev/null +++ b/icons/folder-down.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-edit.svg b/icons/folder-edit.svg new file mode 100644 index 000000000..a5cbf02b9 --- /dev/null +++ b/icons/folder-edit.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/folder-heart.svg b/icons/folder-heart.svg new file mode 100644 index 000000000..a3f86d5a2 --- /dev/null +++ b/icons/folder-heart.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/folder-input.svg b/icons/folder-input.svg new file mode 100644 index 000000000..31df454fa --- /dev/null +++ b/icons/folder-input.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-key.svg b/icons/folder-key.svg new file mode 100644 index 000000000..82756ad00 --- /dev/null +++ b/icons/folder-key.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/folder-lock.svg b/icons/folder-lock.svg new file mode 100644 index 000000000..4c2993a58 --- /dev/null +++ b/icons/folder-lock.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-minus.svg b/icons/folder-minus.svg index 0e7f4915f..ad247aeeb 100644 --- a/icons/folder-minus.svg +++ b/icons/folder-minus.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/folder-open.svg b/icons/folder-open.svg index 12e386a1c..11355013f 100644 --- a/icons/folder-open.svg +++ b/icons/folder-open.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/folder-output.svg b/icons/folder-output.svg new file mode 100644 index 000000000..422b1a79d --- /dev/null +++ b/icons/folder-output.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-plus.svg b/icons/folder-plus.svg index af1ee2fdc..34dfa27a5 100644 --- a/icons/folder-plus.svg +++ b/icons/folder-plus.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + diff --git a/icons/folder-search-2.svg b/icons/folder-search-2.svg new file mode 100644 index 000000000..6c7515095 --- /dev/null +++ b/icons/folder-search-2.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-search.svg b/icons/folder-search.svg new file mode 100644 index 000000000..92d43a729 --- /dev/null +++ b/icons/folder-search.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-symlink.svg b/icons/folder-symlink.svg new file mode 100644 index 000000000..2b9fd7f32 --- /dev/null +++ b/icons/folder-symlink.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-tree.svg b/icons/folder-tree.svg new file mode 100644 index 000000000..8f9564e2a --- /dev/null +++ b/icons/folder-tree.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/folder-up.svg b/icons/folder-up.svg new file mode 100644 index 000000000..23815114f --- /dev/null +++ b/icons/folder-up.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder-x.svg b/icons/folder-x.svg new file mode 100644 index 000000000..331c4fa9f --- /dev/null +++ b/icons/folder-x.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/folder.svg b/icons/folder.svg index bc875573f..6e46360a3 100644 --- a/icons/folder.svg +++ b/icons/folder.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/folders.svg b/icons/folders.svg new file mode 100644 index 000000000..9e71c6269 --- /dev/null +++ b/icons/folders.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/git-compare.svg b/icons/git-compare.svg new file mode 100644 index 000000000..38c3296bc --- /dev/null +++ b/icons/git-compare.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/git-pull-request-closed.svg b/icons/git-pull-request-closed.svg new file mode 100644 index 000000000..d6d40f18a --- /dev/null +++ b/icons/git-pull-request-closed.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/git-pull-request-draft.svg b/icons/git-pull-request-draft.svg new file mode 100644 index 000000000..bd26c8661 --- /dev/null +++ b/icons/git-pull-request-draft.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/grape.svg b/icons/grape.svg new file mode 100644 index 000000000..d31456c1e --- /dev/null +++ b/icons/grape.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/icons/heading-1.svg b/icons/heading-1.svg new file mode 100644 index 000000000..9c2d8e690 --- /dev/null +++ b/icons/heading-1.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/heading-2.svg b/icons/heading-2.svg new file mode 100644 index 000000000..8f29e37cb --- /dev/null +++ b/icons/heading-2.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/heading-3.svg b/icons/heading-3.svg new file mode 100644 index 000000000..11a32e587 --- /dev/null +++ b/icons/heading-3.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/heading-4.svg b/icons/heading-4.svg new file mode 100644 index 000000000..2f6cc2b00 --- /dev/null +++ b/icons/heading-4.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/heading-5.svg b/icons/heading-5.svg new file mode 100644 index 000000000..df659b799 --- /dev/null +++ b/icons/heading-5.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/heading-6.svg b/icons/heading-6.svg new file mode 100644 index 000000000..b8fd85757 --- /dev/null +++ b/icons/heading-6.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/heading.svg b/icons/heading.svg new file mode 100644 index 000000000..e0eea768d --- /dev/null +++ b/icons/heading.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/heart-pulse.svg b/icons/heart-pulse.svg new file mode 100644 index 000000000..e1e6121b5 --- /dev/null +++ b/icons/heart-pulse.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/hop-off.svg b/icons/hop-off.svg new file mode 100644 index 000000000..48799ce3e --- /dev/null +++ b/icons/hop-off.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/hop.svg b/icons/hop.svg new file mode 100644 index 000000000..5eac5f130 --- /dev/null +++ b/icons/hop.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/ice-cream.svg b/icons/ice-cream.svg new file mode 100644 index 000000000..913b53937 --- /dev/null +++ b/icons/ice-cream.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/joystick.svg b/icons/joystick.svg new file mode 100644 index 000000000..86d8aec90 --- /dev/null +++ b/icons/joystick.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/laugh.svg b/icons/laugh.svg new file mode 100644 index 000000000..f4b6320a5 --- /dev/null +++ b/icons/laugh.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/mail-check.svg b/icons/mail-check.svg new file mode 100644 index 000000000..375a0585f --- /dev/null +++ b/icons/mail-check.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/mail-minus.svg b/icons/mail-minus.svg new file mode 100644 index 000000000..e180e79a6 --- /dev/null +++ b/icons/mail-minus.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/mail-open.svg b/icons/mail-open.svg new file mode 100644 index 000000000..0cb2603c0 --- /dev/null +++ b/icons/mail-open.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/mail-plus.svg b/icons/mail-plus.svg new file mode 100644 index 000000000..31243a5d8 --- /dev/null +++ b/icons/mail-plus.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/mail-question.svg b/icons/mail-question.svg new file mode 100644 index 000000000..3b16ae767 --- /dev/null +++ b/icons/mail-question.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/mail-search.svg b/icons/mail-search.svg new file mode 100644 index 000000000..87cc431f5 --- /dev/null +++ b/icons/mail-search.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/mail-warning.svg b/icons/mail-warning.svg new file mode 100644 index 000000000..ac3a39536 --- /dev/null +++ b/icons/mail-warning.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/mail-x.svg b/icons/mail-x.svg new file mode 100644 index 000000000..6b3393cac --- /dev/null +++ b/icons/mail-x.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/mail.svg b/icons/mail.svg index afaa18fd9..d211c879d 100644 --- a/icons/mail.svg +++ b/icons/mail.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/mails.svg b/icons/mails.svg new file mode 100644 index 000000000..03659ebdb --- /dev/null +++ b/icons/mails.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/medal.svg b/icons/medal.svg new file mode 100644 index 000000000..977e7f298 --- /dev/null +++ b/icons/medal.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/megaphone-off.svg b/icons/megaphone-off.svg new file mode 100644 index 000000000..f90dcab51 --- /dev/null +++ b/icons/megaphone-off.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/mic-2.svg b/icons/mic-2.svg new file mode 100644 index 000000000..fb317da70 --- /dev/null +++ b/icons/mic-2.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/microwave.svg b/icons/microwave.svg new file mode 100644 index 000000000..54825da0c --- /dev/null +++ b/icons/microwave.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/milk-off.svg b/icons/milk-off.svg new file mode 100644 index 000000000..a7126d351 --- /dev/null +++ b/icons/milk-off.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/milk.svg b/icons/milk.svg new file mode 100644 index 000000000..caec132bf --- /dev/null +++ b/icons/milk.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/moon.svg b/icons/moon.svg index 502300566..ce4a59d79 100644 --- a/icons/moon.svg +++ b/icons/moon.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/music-2.svg b/icons/music-2.svg new file mode 100644 index 000000000..9b1aa2974 --- /dev/null +++ b/icons/music-2.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/music-3.svg b/icons/music-3.svg new file mode 100644 index 000000000..02cb44c82 --- /dev/null +++ b/icons/music-3.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/music-4.svg b/icons/music-4.svg new file mode 100644 index 000000000..911a72470 --- /dev/null +++ b/icons/music-4.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/newspaper.svg b/icons/newspaper.svg new file mode 100644 index 000000000..d4e95b34d --- /dev/null +++ b/icons/newspaper.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/nut-off.svg b/icons/nut-off.svg new file mode 100644 index 000000000..b9508eb48 --- /dev/null +++ b/icons/nut-off.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/nut.svg b/icons/nut.svg new file mode 100644 index 000000000..9e232b529 --- /dev/null +++ b/icons/nut.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/package-2.svg b/icons/package-2.svg new file mode 100644 index 000000000..dbe5a5fe8 --- /dev/null +++ b/icons/package-2.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/party-popper.svg b/icons/party-popper.svg new file mode 100644 index 000000000..4d3dafdaf --- /dev/null +++ b/icons/party-popper.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/icons/pizza.svg b/icons/pizza.svg new file mode 100644 index 000000000..9a0b1ad09 --- /dev/null +++ b/icons/pizza.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/plug-2.svg b/icons/plug-2.svg new file mode 100644 index 000000000..04a756bdc --- /dev/null +++ b/icons/plug-2.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/plug.svg b/icons/plug.svg new file mode 100644 index 000000000..16bb1e7a9 --- /dev/null +++ b/icons/plug.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/puzzle.svg b/icons/puzzle.svg index 6439615f0..11822cf46 100644 --- a/icons/puzzle.svg +++ b/icons/puzzle.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/qr-code.svg b/icons/qr-code.svg index 7b3c1cc04..b09a10d77 100644 --- a/icons/qr-code.svg +++ b/icons/qr-code.svg @@ -9,15 +9,16 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - - - - - + + + + + + + + + + + + diff --git a/icons/rectangle-horizontal.svg b/icons/rectangle-horizontal.svg new file mode 100644 index 000000000..90088149b --- /dev/null +++ b/icons/rectangle-horizontal.svg @@ -0,0 +1,13 @@ + + + diff --git a/icons/rectangle-vertical.svg b/icons/rectangle-vertical.svg new file mode 100644 index 000000000..90c05566f --- /dev/null +++ b/icons/rectangle-vertical.svg @@ -0,0 +1,13 @@ + + + diff --git a/icons/refrigerator.svg b/icons/refrigerator.svg new file mode 100644 index 000000000..4884513a3 --- /dev/null +++ b/icons/refrigerator.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/sailboat.svg b/icons/sailboat.svg new file mode 100644 index 000000000..fa41d8117 --- /dev/null +++ b/icons/sailboat.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/scale-3d.svg b/icons/scale-3d.svg new file mode 100644 index 000000000..0c96b481b --- /dev/null +++ b/icons/scale-3d.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/scan-face.svg b/icons/scan-face.svg new file mode 100644 index 000000000..d1227a0e3 --- /dev/null +++ b/icons/scan-face.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/icons/server-cog.svg b/icons/server-cog.svg new file mode 100644 index 000000000..7d977a06b --- /dev/null +++ b/icons/server-cog.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff --git a/icons/shower-head.svg b/icons/shower-head.svg new file mode 100644 index 000000000..5c2ccd6e3 --- /dev/null +++ b/icons/shower-head.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + diff --git a/icons/signal-zero.svg b/icons/signal-zero.svg index 339376428..188042a78 100644 --- a/icons/signal-zero.svg +++ b/icons/signal-zero.svg @@ -10,5 +10,4 @@ stroke-linejoin="round" > - diff --git a/icons/smile-plus.svg b/icons/smile-plus.svg new file mode 100644 index 000000000..c189090a9 --- /dev/null +++ b/icons/smile-plus.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/sort-asc.svg b/icons/sort-asc.svg index c9cad6186..c924fb0a0 100644 --- a/icons/sort-asc.svg +++ b/icons/sort-asc.svg @@ -9,9 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - + + + + + diff --git a/icons/spline.svg b/icons/spline.svg new file mode 100644 index 000000000..6a2b7829a --- /dev/null +++ b/icons/spline.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/sticker.svg b/icons/sticker.svg new file mode 100644 index 000000000..cef1427b5 --- /dev/null +++ b/icons/sticker.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/sticky-note.svg b/icons/sticky-note.svg new file mode 100644 index 000000000..4012b89a2 --- /dev/null +++ b/icons/sticky-note.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/sun-moon.svg b/icons/sun-moon.svg index 136a5710d..3a9239b31 100644 --- a/icons/sun-moon.svg +++ b/icons/sun-moon.svg @@ -10,13 +10,13 @@ stroke-linejoin="round" > - + - - + + - - + + diff --git a/icons/sun-snow.svg b/icons/sun-snow.svg new file mode 100644 index 000000000..b29b6ccbb --- /dev/null +++ b/icons/sun-snow.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/icons/sun.svg b/icons/sun.svg index a3cc1ffe9..3ecadd68c 100644 --- a/icons/sun.svg +++ b/icons/sun.svg @@ -12,10 +12,10 @@ - - + + - - + + diff --git a/icons/sunrise.svg b/icons/sunrise.svg index e38dbab61..11c3f5b8b 100644 --- a/icons/sunrise.svg +++ b/icons/sunrise.svg @@ -10,10 +10,10 @@ stroke-linejoin="round" > - + - + diff --git a/icons/sunset.svg b/icons/sunset.svg index cf5969fef..5e899c5ea 100644 --- a/icons/sunset.svg +++ b/icons/sunset.svg @@ -10,10 +10,10 @@ stroke-linejoin="round" > - + - + diff --git a/icons/table-2.svg b/icons/table-2.svg new file mode 100644 index 000000000..a60705ca3 --- /dev/null +++ b/icons/table-2.svg @@ -0,0 +1,13 @@ + + + diff --git a/icons/tag.svg b/icons/tag.svg index bfa873b21..efbbdb033 100644 --- a/icons/tag.svg +++ b/icons/tag.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/tags.svg b/icons/tags.svg new file mode 100644 index 000000000..d3c3a1115 --- /dev/null +++ b/icons/tags.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/thermometer-sun.svg b/icons/thermometer-sun.svg index f07d3fece..be25fc82c 100644 --- a/icons/thermometer-sun.svg +++ b/icons/thermometer-sun.svg @@ -14,5 +14,5 @@ - + diff --git a/icons/toy-brick.svg b/icons/toy-brick.svg new file mode 100644 index 000000000..bed241506 --- /dev/null +++ b/icons/toy-brick.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/trophy.svg b/icons/trophy.svg new file mode 100644 index 000000000..2854a6b8c --- /dev/null +++ b/icons/trophy.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/upload-cloud.svg b/icons/upload-cloud.svg index 9b8ad2f8d..8742ec61f 100644 --- a/icons/upload-cloud.svg +++ b/icons/upload-cloud.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/usb.svg b/icons/usb.svg new file mode 100644 index 000000000..1daba7903 --- /dev/null +++ b/icons/usb.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/icons/user-cog.svg b/icons/user-cog.svg new file mode 100644 index 000000000..c6f9c95e5 --- /dev/null +++ b/icons/user-cog.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/icons/vegan.svg b/icons/vegan.svg new file mode 100644 index 000000000..39030a073 --- /dev/null +++ b/icons/vegan.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/wand-2.svg b/icons/wand-2.svg new file mode 100644 index 000000000..5a756e4f4 --- /dev/null +++ b/icons/wand-2.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/webhook.svg b/icons/webhook.svg new file mode 100644 index 000000000..a73e53730 --- /dev/null +++ b/icons/webhook.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/wheat-off.svg b/icons/wheat-off.svg new file mode 100644 index 000000000..0f832445b --- /dev/null +++ b/icons/wheat-off.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + diff --git a/icons/wheat.svg b/icons/wheat.svg new file mode 100644 index 000000000..30bb26533 --- /dev/null +++ b/icons/wheat.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/icons/wine-off.svg b/icons/wine-off.svg new file mode 100644 index 000000000..108a9ccb1 --- /dev/null +++ b/icons/wine-off.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/package.json b/package.json index 2539dba39..74b3a243f 100644 --- a/package.json +++ b/package.json @@ -1,81 +1,61 @@ { "private": true, - "workspaces": { - "packages": [ - "packages/*" - ], - "nohoist": [ - "**/jest", - "**/jest/**", - "**/jasmine", - "**/jasmine/**", - "**/react", - "**/react/**", - "**/testing-library__jest-dom", - "**/testing-library__jest-dom/**", - "**/testing-library__react-hooks", - "**/testing-library__react-hooks/**", - "**/react-dom", - "**/react-dom/**", - "**/react-test-renderer", - "**/react-test-renderer/**" - ] - }, "scripts": { - "build": "yarn lucide build && yarn lucide-react build && yarn lucide-preact build && yarn lucide-vue build && yarn lucide-vue-next build && yarn lucide-angular build", - "test": "yarn lucide build:icons && yarn lucide-react build:icons && yarn lucide-vue build:icons && jest", - "lucide": "yarn workspace lucide", - "lucide-angular": "yarn workspace lucide-angular", - "lucide-react": "yarn workspace lucide-react", - "lucide-preact": "yarn workspace lucide-preact", - "lucide-vue": "yarn workspace lucide-vue", - "lucide-vue-next": "yarn workspace lucide-vue-next", - "lucide-svelte": "yarn workspace lucide-svelte", - "lucide-static": "yarn workspace lucide-static", - "build:icons": "babel-node ./scripts/buildIcons.js --presets @babel/env", - "build:outline-icons": "babel-node ./scripts/outlineSvg.js --presets @babel/env", - "generate:supersprite": "babel-node ./scripts/generateSuperSVG.js", - "optimize": "esbuild ./scripts/optimizeSvgs.js --bundle --platform=node | node", - "addtags": "babel-node ./scripts/addMissingKeysToTags.js --presets @babel/env", - "tags2icons": "babel-node ./scripts/migrateTagsToIcons.js --presets @babel/env", - "icons2tags": "babel-node ./scripts/migrateIconsToTags.js --presets @babel/env", - "icons2categories": "babel-node ./scripts/migrateIconsToCategories.js --presets @babel/env", - "categories2icons": "babel-node ./scripts/migrateCategoriesToIcons.js --presets @babel/env", - "generate:changelog": "babel-node ./scripts/generateChangelog.js --presets @babel/env", - "checkIcons": "babel-node ./scripts/checkIconsAndCategories.js --presets @babel/env" + "build": "pnpm -r --filter './packages/**' build", + "test": "pnpm -r --filter './packages/**' test", + "lucide": "pnpm --filter lucide", + "lucide-angular": "pnpm --filter lucide-angular", + "lucide-react": "pnpm --filter lucide-react", + "lucide-react-native": "pnpm --filter lucide-react-native", + "lucide-preact": "pnpm --filter lucide-preact", + "lucide-vue": "pnpm --filter lucide-vue", + "lucide-vue-next": "pnpm --filter lucide-vue-next", + "lucide-svelte": "pnpm --filter lucide-svelte", + "lucide-static": "pnpm --filter lucide-static", + "build:icons": "node ./scripts/buildIcons.mjs --templateSrc ./packages/lucide/scripts/exportTemplate.mjs", + "build:outline-icons": "node ./scripts/outlineSvg.mjs", + "generate:supersprite": "node ./scripts/generateSuperSVG.mjs", + "optimize": "node ./scripts/optimizeSvgs.mjs", + "addtags": "node ./scripts/addMissingKeysToTags.mjs", + "tags2icons": "node ./scripts/migrateTagsToIcons.js --presets @babel/env", + "icons2tags": "node ./scripts/migrateIconsToTags.js --presets @babel/env", + "icons2categories": "node ./scripts/migrateIconsToCategories.js --presets @babel/env", + "categories2icons": "node ./scripts/migrateCategoriesToIcons.js --presets @babel/env", + "generate:changelog": "node ./scripts/generateChangelog.mjs", + "postinstall": "husky install" }, "devDependencies": { - "@ampproject/rollup-plugin-closure-compiler": "^0.25.2", "@atomico/rollup-plugin-sizes": "^1.1.4", - "@babel/cli": "^7.10.5", - "@babel/core": "^7.11.1", - "@babel/node": "^7.13.10", - "@babel/plugin-transform-runtime": "^7.11.5", - "@babel/preset-env": "^7.11.0", - "@rollup/plugin-babel": "^5.0.0", + "@babel/cli": "^7.18.9", + "@babel/core": "^7.18.9", + "@babel/node": "^7.18.9", + "@babel/plugin-transform-runtime": "^7.18.9", + "@babel/preset-env": "^7.18.9", + "@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-commonjs": "^17.1.0", - "@rollup/plugin-node-resolve": "^11.2.0", - "@rollup/plugin-replace": "^2.4.1", + "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-replace": "^2.4.2", "babel-jest": "^26.6.3", - "babel-plugin-add-import-extension": "^1.4.3", - "core-js": "3", - "esbuild": "^0.14.28", + "babel-plugin-add-import-extension": "^1.6.0", + "core-js": "^3.24.0", + "esbuild": "^0.14.51", "eslint": "^4.19.1", "eslint-config-airbnb-base": "^12.1.0", - "eslint-config-prettier": "^2.9.0", - "eslint-plugin-import": "^2.5.0", - "eslint-plugin-prettier": "^2.5.0", - "husky": "^4.3.6", - "jest": "^26.4.2", - "lint-staged": "^10.5.3", + "eslint-config-prettier": "^2.10.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-prettier": "^2.7.0", + "husky": "^8.0.0", + "jest": "^28.1.3", + "lint-staged": "^10.5.4", "minimist": "^1.2.6", "node-fetch": "^2.6.7", "prettier": "1.17.1", - "rollup": "^2.7.3", - "rollup-plugin-license": "^2.0.0", - "rollup-plugin-terser": "^5.2.0", - "rollup-plugin-visualizer": "^4.1.0", + "rollup": "^2.77.2", + "rollup-plugin-license": "^2.8.1", "rollup-plugin-svelte": "^7.1.0", + "rollup-plugin-terser": "^5.3.1", + "rollup-plugin-visualizer": "^4.2.2", + "@rollup/plugin-typescript": "^8.3.4", "svg-outline-stroke": "^1.3.1", "svgo": "^2.8.0", "svgson": "^4.1.0" @@ -86,6 +66,7 @@ } }, "lint-staged": { - "icons/*.svg": "npx babel-node ./scripts/optimizeStagedSvgs.js --presets @babel/env" - } + "icons/*.svg": "node ./scripts/optimizeStagedSvgs.mjs" + }, + "packageManager": "pnpm@7.14.0" } diff --git a/packages/lucide-angular/LICENSE b/packages/lucide-angular/LICENSE deleted file mode 100644 index 66cc02207..000000000 --- a/packages/lucide-angular/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2020, Lucide Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/lucide-angular/README.md b/packages/lucide-angular/README.md index ce3a22ac8..e663477da 100644 --- a/packages/lucide-angular/README.md +++ b/packages/lucide-angular/README.md @@ -6,11 +6,13 @@ Implementation of the lucide icon library for angular applications. ## Installation -``` sh +```sh yarn add lucide-angular +``` -# or +or +```sh npm install lucide-angular ``` @@ -22,12 +24,12 @@ There are three ways for use this library. After install `lucide-angular` change content of file `app.component.html` and `app.component.ts`. -``` html +```html
``` -``` js +```js // app.component.ts import { Component, OnInit } from '@angular/core'; @@ -39,7 +41,6 @@ import { Activity } from 'lucide-angular/icons'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) - export class AppComponent implements OnInit { ngOnInit(): void { const div = document.getElementById('lucide-icon'); @@ -53,11 +54,11 @@ export class AppComponent implements OnInit { } ``` -### Method 2: User __Tag__ with __name__ property +### Method 2: User **Tag** with **name** property After install `lucide-angular` change content of file `app.component.html`, `app.component.ts`, `app.component.css` and `app.module.ts`. -``` js +```js // app.module.ts import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; @@ -67,31 +68,29 @@ import { AppComponent } from './app.component'; import { LucideAngularModule, AlarmCheck, Edit } from 'lucide-angular'; @NgModule({ - declarations: [ - AppComponent - ], + declarations: [AppComponent], imports: [ BrowserModule, AppRoutingModule, - LucideAngularModule.pick({ AlarmCheck, Edit }) // add all of icons that is imported. + LucideAngularModule.pick({ AlarmCheck, Edit }) // add all of icons that is imported. ], providers: [], bootstrap: [AppComponent] }) -export class AppModule { } +export class AppModule {} ``` -``` html +```html ``` -### Method 3: User __Tag__ with __img__ property +### Method 3: User **Tag** with **img** property After install `lucide-angular` change content of file `app.component.html`, `app.component.ts`, `app.component.css` and `app.module.ts`. -``` js +```js // app.module.ts import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; @@ -101,27 +100,21 @@ import { AppComponent } from './app.component'; import { LucideAngularModule } from 'lucide-angular'; @NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - AppRoutingModule, - LucideAngularModule.pick({ }) - ], + declarations: [AppComponent], + imports: [BrowserModule, AppRoutingModule, LucideAngularModule.pick({})], providers: [], bootstrap: [AppComponent] }) -export class AppModule { } +export class AppModule {} ``` -``` xml +```xml ``` -``` js +```js // app.component.ts import { Component } from '@angular/core'; import { Airplay, Circle } from 'lucide-angular'; @@ -131,7 +124,6 @@ import { Airplay, Circle } from 'lucide-angular'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) - export class AppComponent { ico1 = Airplay; ico2 = Circle; @@ -144,7 +136,7 @@ export class AppComponent { In `Method 2`: import all icons in `app.module.ts` by: -``` js +```js ... import { icons } from 'lucide-angular/icons'; .... diff --git a/packages/lucide-angular/package.json b/packages/lucide-angular/package.json index e68c2a787..2dd879675 100644 --- a/packages/lucide-angular/package.json +++ b/packages/lucide-angular/package.json @@ -1,7 +1,7 @@ { "name": "lucide-angular", "description": "A Lucide icon library package for Angular applications", - "version": "0.61.0", + "version": "0.98.0", "author": "SMAH1", "license": "ISC", "homepage": "https://lucide.dev", @@ -11,6 +11,9 @@ "url": "https://github.com/lucide-icons/lucide.git", "directory": "packages/lucide-angular" }, + "publishConfig": { + "directory": "dist" + }, "keywords": [ "Lucide", "Angular", @@ -22,30 +25,31 @@ "Font Awesome" ], "scripts": { - "build": "yarn clean && yarn build:icons && yarn build:ng", - "clean": "npx shx rm -rf dist && npx shx rm -rf ./src/icons/*.ts", - "build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-angular/src --templateSrc=../packages/lucide-angular/scripts/exportTemplate --iconFileExtention=.ts --exportFileName=index.ts", - "build:ng": "ng build --prod", - "test:headless": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI", - "test": "ng test", + "build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:ng", + "copy:license": "cp ../../LICENSE ./LICENSE", + "clean": "rm -rf dist && rm -rf ./src/icons/*.ts", + "build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --iconFileExtention=.ts --exportFileName=index.ts", + "build:ng": "ng build --configuration production", + "test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI", + "test:watch": "ng test", "lint": "ng lint", "e2e": "ng e2e", - "postinstall": "ngcc" + "version": "pnpm version --git-tag-version=false" }, "dependencies": { - "tslib": "^2.3.1" + "tslib": "^2.4.0" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1102.5", - "@angular/cli": "~11.2.15", - "@angular/common": "~11.2.14", - "@angular/compiler": "~11.2.14", - "@angular/compiler-cli": "~11.2.14", - "@angular/core": "~11.2.14", - "@angular/platform-browser": "~11.2.14", - "@angular/platform-browser-dynamic": "~11.2.14", - "@types/jasmine": "~3.10.2", - "@types/node": "^16.11.7", + "@angular-devkit/build-angular": "~14.2.6", + "@angular/cli": "~14.2.6", + "@angular/common": "~14.2.7", + "@angular/compiler": "~14.2.7", + "@angular/compiler-cli": "~14.2.7", + "@angular/core": "~14.2.7", + "@angular/platform-browser": "~14.2.7", + "@angular/platform-browser-dynamic": "~14.2.7", + "@types/jasmine": "~4.3.0", + "@types/node": "^18.11.4", "codelyzer": "^6.0.2", "jasmine-core": "~3.10.1", "jasmine-spec-reporter": "~7.0.0", @@ -54,11 +58,13 @@ "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.7.0", - "ng-packagr": "^11.2.4", + "ng-packagr": "^14.2.1", "protractor": "~7.0.0", "puppeteer": "^8.0.0", - "ts-node": "~10.4.0", + "rxjs": "7.5.7", + "ts-node": "~10.9.1", "tslint": "~6.1.0", - "typescript": "~4.1.5" + "typescript": "~4.8.4", + "zone.js": "^0.11.8" } } diff --git a/packages/lucide-angular/scripts/exportTemplate.js b/packages/lucide-angular/scripts/exportTemplate.mjs similarity index 100% rename from packages/lucide-angular/scripts/exportTemplate.js rename to packages/lucide-angular/scripts/exportTemplate.mjs diff --git a/packages/lucide-angular/tsconfig.json b/packages/lucide-angular/tsconfig.json index 52ab2fee8..d73e8dabc 100644 --- a/packages/lucide-angular/tsconfig.json +++ b/packages/lucide-angular/tsconfig.json @@ -9,6 +9,7 @@ "downlevelIteration": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, + "skipLibCheck": true, "paths": { "lucide-angular": [ "dist" diff --git a/packages/lucide-angular/tsconfig.lib.prod.json b/packages/lucide-angular/tsconfig.lib.prod.json index 5615c27df..8411e6db2 100644 --- a/packages/lucide-angular/tsconfig.lib.prod.json +++ b/packages/lucide-angular/tsconfig.lib.prod.json @@ -5,6 +5,7 @@ "declarationMap": false }, "angularCompilerOptions": { - "enableIvy": false + "enableIvy": true, + "compilationMode": "partial" } } diff --git a/packages/lucide-figma/package.json b/packages/lucide-figma/package.json index be1ef3fea..0f43c37d6 100644 --- a/packages/lucide-figma/package.json +++ b/packages/lucide-figma/package.json @@ -6,14 +6,13 @@ "main": "src/main.js", "scripts": { "dev": "vite", - "build": "tsc && rm -rf dist && yarn build:main && yarn build:worker && yarn build:interface", + "build": "tsc && rm -rf dist && pnpm build:main && pnpm build:worker && pnpm build:interface", "build:main": "INPUT=main vite build", "build:worker": "INPUT=worker vite build", "build:interface": "INPUT=interface vite build", "serve": "vite preview" }, "dependencies": { - "@emotion/core": "^10.0.14", "minimist": "^1.2.6", "react": "^17.0.0", "react-dom": "^17.0.0" diff --git a/packages/lucide-figma/src/api/fetchIcons.ts b/packages/lucide-figma/src/api/fetchIcons.ts index ba3bf3fee..15e471562 100644 --- a/packages/lucide-figma/src/api/fetchIcons.ts +++ b/packages/lucide-figma/src/api/fetchIcons.ts @@ -66,3 +66,24 @@ export const getIcons = () => new Promise(async (resolve, reject)=> } } }); + +type EventCallback = (lucideIcons: LucideIcons) => void + +export const iconFetchListener = (callback: EventCallback) => { + fetchIcons() + + const handleEvent = (event: MessageEvent) => { + if (event.type === 'message' && event?.data?.pluginMessage.type === 'cachedIcons') { + + const lucideIcons = event?.data?.pluginMessage?.cachedIcons + callback(lucideIcons) + } + } + + window.addEventListener('message', handleEvent) + + const removeListener = () => { + window.removeEventListener('message', handleEvent) + } + return removeListener +} diff --git a/packages/lucide-figma/src/components/IconButton/IconButton.scss b/packages/lucide-figma/src/components/IconButton/IconButton.scss index e70e198f4..78980aa57 100644 --- a/packages/lucide-figma/src/components/IconButton/IconButton.scss +++ b/packages/lucide-figma/src/components/IconButton/IconButton.scss @@ -6,9 +6,11 @@ border-radius: 2px; appearance: none; outline: 0; + &:hover { background: rgba(0, 0, 0, 0.06); } + &:focus, &:active { box-shadow: inset 0 0 0 2px var(--color-blue); diff --git a/packages/lucide-figma/src/components/SearchInput/SearchInput.tsx b/packages/lucide-figma/src/components/SearchInput/SearchInput.tsx index f74becf25..bd7ddbd4c 100644 --- a/packages/lucide-figma/src/components/SearchInput/SearchInput.tsx +++ b/packages/lucide-figma/src/components/SearchInput/SearchInput.tsx @@ -6,9 +6,10 @@ interface SearchInputProps extends React.HTMLProps { value: string, iconCount: number, onChange: (event: ChangeEvent) => void + placeholder: string } -function SearchInput({ value, onChange, iconCount, className, ...props }: SearchInputProps) { +function SearchInput({ value, onChange, placeholder, className, ...props }: SearchInputProps) { return (
diff --git a/packages/lucide-figma/src/components/Skeleton/Skeleton.scss b/packages/lucide-figma/src/components/Skeleton/Skeleton.scss new file mode 100644 index 000000000..f4fd7a9b7 --- /dev/null +++ b/packages/lucide-figma/src/components/Skeleton/Skeleton.scss @@ -0,0 +1,25 @@ +@keyframes load { + to { + background-position: 200% 0; + } +} + +.skeleton { + --block: rgba(0, 0, 0, 0.06); + --loader: hsl(0 0% 89%); + + background: linear-gradient( + -75deg, + transparent 40%, + var(--loader), + transparent 60% + ) 0 0 / 200% 100%, + var(--block); + + border-radius: calc(var(--padding) * 0.5); + animation: load 2s infinite linear; + background-attachment: fixed; + width: 40px; + height: 40px; + border-radius: 2px; +} diff --git a/packages/lucide-figma/src/components/Skeleton/Skeleton.tsx b/packages/lucide-figma/src/components/Skeleton/Skeleton.tsx new file mode 100644 index 000000000..c12930022 --- /dev/null +++ b/packages/lucide-figma/src/components/Skeleton/Skeleton.tsx @@ -0,0 +1,13 @@ +import './Skeleton.scss' + +const Skeleton = () => { + return ( + <> + {Array.from({length: 48 }, () => ( +
+ ))} + + ) +} + +export default Skeleton diff --git a/packages/lucide-figma/src/helpers/createIconComponent.ts b/packages/lucide-figma/src/helpers/createIconComponent.ts new file mode 100644 index 000000000..51c8b351e --- /dev/null +++ b/packages/lucide-figma/src/helpers/createIconComponent.ts @@ -0,0 +1,55 @@ +import { forwardRef, createElement, SVGProps } from 'react'; +import { IconNode } from '../api/fetchIcons'; + +const defaultAttributes = { + xmlns: 'http://www.w3.org/2000/svg', + width: 24, + height: 24, + viewBox: '0 0 24 24', + fill: 'none', + stroke: 'currentColor', + strokeWidth: 2, + strokeLinecap: 'round', + strokeLinejoin: 'round', +}; + + +export interface LucideProps extends Partial> { + size?: string | number +} + +/** + * Converts string to KebabCase + * Copied from scripts/helper. If anyone knows how to properly import it here + * then please fix it. + * + * @param {string} string + * @returns {string} A kebabized string + */ +export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); + +const createIconComponent = (iconName: string, iconNode: IconNode) => { + const Component = forwardRef( + ({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }, ref) => + createElement( + 'svg', + { + ref, + ...defaultAttributes, + width: size, + height: size, + stroke: color, + strokeWidth, + className: `lucide lucide-${toKebabCase(iconName)}`, + ...rest, + }, + [...iconNode.map(([tag, attrs]: [tag:string, attrs: SVGProps]) => createElement(tag, attrs)), ...([children] || [])], + ), + ); + + Component.displayName = `${iconName}`; + + return Component; +}; + +export default createIconComponent diff --git a/packages/lucide-figma/src/helpers/iconNodeToSvg.ts b/packages/lucide-figma/src/helpers/iconNodeToSvg.ts index 9c7512e28..b2def619b 100644 --- a/packages/lucide-figma/src/helpers/iconNodeToSvg.ts +++ b/packages/lucide-figma/src/helpers/iconNodeToSvg.ts @@ -1,10 +1,10 @@ -import { createReactComponent } from "lucide-react"; import { createElement } from "react"; import { renderToString } from "react-dom/server"; import { IconNode } from "../api/fetchIcons"; +import createIconComponent from "./createIconComponent"; const iconNodeToSvg = (iconName: string, iconNode : IconNode) => { - const IconComponent = createReactComponent(iconName, iconNode) + const IconComponent = createIconComponent(iconName, iconNode) return renderToString(createElement(IconComponent)); } diff --git a/packages/lucide-figma/src/interface/interface.tsx b/packages/lucide-figma/src/interface/interface.tsx index 3d3176f84..cba8958d4 100644 --- a/packages/lucide-figma/src/interface/interface.tsx +++ b/packages/lucide-figma/src/interface/interface.tsx @@ -6,7 +6,7 @@ type Views = typeof views import useSearch, { Icon } from '../hooks/useSearch' -import { getIcons } from '../api/fetchIcons' +import { getIcons, iconFetchListener, LucideIcons } from '../api/fetchIcons' import './interface.scss' import Menu from '../components/Menu' @@ -19,21 +19,19 @@ function App() { const searchResults = useMemo(() => useSearch(icons, tags, query), [icons, query]) - const getLatestIcons = async () => { - const lucideIcons = await getIcons() + const handleFetchResponse = async (lucideIcons: LucideIcons) => { + const icons = Object.entries(lucideIcons.iconNodes) - setIcons(Object.entries(lucideIcons.iconNodes)) + setIcons(icons) setTags(lucideIcons.tags) setVersion(lucideIcons.version) } useEffect(() => { - getLatestIcons() - }, []) + const removeListener = iconFetchListener(handleFetchResponse) - if(!icons.length) { - return null - } + return removeListener + }, []) const View = views?.[page as keyof Views] ?? views.icons diff --git a/packages/lucide-figma/src/views/Icons.tsx b/packages/lucide-figma/src/views/Icons.tsx index 71e1a0396..9645ebdcd 100644 --- a/packages/lucide-figma/src/views/Icons.tsx +++ b/packages/lucide-figma/src/views/Icons.tsx @@ -1,8 +1,8 @@ -import { createReactComponent } from 'lucide-react' - import IconButton from '../components/IconButton' import SearchInput from '../components/SearchInput' +import createIconComponent from '../helpers/createIconComponent' import { Icon } from '../hooks/useSearch' +import Skeleton from '../components/Skeleton/Skeleton' interface PageProps { query: string @@ -25,16 +25,22 @@ const Icons = ({ value={query} iconCount={icons.length} onChange={(event) => setQuery(event.target.value)} + placeholder={icons.length ? `Search ${icons.length} icons`: 'Loading icons ..'} />
- {searchResults.map(([name, iconNode] :any) => ( - - ))} + {icons.length ? ( + searchResults.map(([name, iconNode]: any) => ( + + )) + ) : ( + + )} +