Skip to content

Commit

Permalink
feat(icons-lucide): add new package
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Feb 4, 2025
1 parent ba943b8 commit 2654fee
Show file tree
Hide file tree
Showing 3,437 changed files with 60,466 additions and 1 deletion.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 5 additions & 1 deletion .github/workflows/auto-update-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ jobs:
persist-credentials: false
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- name: Lucide icons
- name: Legacy icons # legacy, drop in 5.0
run: |
npx nx prebuild icons
npx nx build icons
- name: Lucide icons
run: |
npx nx prebuild icons-lucide
npx nx build icons-lucide
- name: Material icons
run: |
npx nx prebuild icons-material
Expand Down
15 changes: 15 additions & 0 deletions projects/icons-lucide/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

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
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.
26 changes: 26 additions & 0 deletions projects/icons-lucide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Taiga UI — Icons

[![npm version](https://img.shields.io/npm/v/@taiga-ui/icons.svg)](https://npmjs.com/package/@taiga-ui/icons)
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@taiga-ui/icons)](https://bundlephobia.com/result?p=@taiga-ui/icons)
[![Discord](https://img.shields.io/discord/748677963142135818?color=7289DA&label=%23taiga-ui&logo=discord&logoColor=white)](https://discord.gg/Us8d8JVaTg)

[Website](https://taiga-ui.dev)[Documentation](https://taiga-ui.dev/getting-started)
[Core team](https://github.com/taiga-family/taiga-ui/#core-team)

> A set of vector icons used by Taiga UI
It's a part of [**Taiga UI**](https://github.com/taiga-family/taiga-ui) that is fully-treeshakable Angular UI Kit
consisting of multiple base libraries and several add-ons

## How to install

```
npm i @taiga-ui/icons-lucide
```

Don't forget that Taiga UI is fully-treeshakable. **You can import even just one entity from our library** and be sure
that there is no redundant code in your bundle. Bundlphobia badge shows size of the whole library.

## Docs

See our [Documentation](https://taiga-ui.dev/getting-started)
4 changes: 4 additions & 0 deletions projects/icons-lucide/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Public API Surface
*/
export {};
13 changes: 13 additions & 0 deletions projects/icons-lucide/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"assets": [
"src"
],
"allowedNonPeerDependencies": [
"."
],
"dest": "../../dist/icons-lucide",
"lib": {
"entryFile": "./index.ts"
}
}
17 changes: 17 additions & 0 deletions projects/icons-lucide/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@taiga-ui/icons-lucide",
"version": "4.23.0",
"description": "Feather icons for Taiga UI",
"keywords": [
"angular",
"icon",
"svg",
"lucide"
],
"homepage": "https://github.com/taiga-family/taiga-ui",
"repository": "https://github.com/taiga-family/taiga-ui",
"license": "Apache-2.0",
"devDependencies": {
"lucide-static": "0.473.0"
}
}
51 changes: 51 additions & 0 deletions projects/icons-lucide/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "icons-lucide",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/{projectName}",
"projectType": "library",
"prefix": "tui",
"implicitDependencies": ["!testing"],
"targets": {
"prebuild": {
"executor": "nx:run-commands",
"options": {
"parallel": false,
"commands": [
"ts-node ./{projectRoot}/scripts/prepare-icons.ts",
"prettier ./{projectRoot}/src/* --write --log-level silent"
]
}
},
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"outputs": ["{workspaceRoot}/dist/{projectName}"],
"options": {
"tsConfig": "tsconfig.build.json",
"project": "{projectRoot}/ng-package.json"
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "package.json",
"collectCoverage": false,
"testMatch": ["<rootDir>/{projectRoot}/**/*.spec.ts"]
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"forwardAllArgs": false,
"command": "ts-node ./scripts/publish.ts --path ./dist/{projectName} --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}"
},
"dependsOn": [
{
"target": "build",
"params": "ignore",
"dependencies": false
}
]
}
}
}
43 changes: 43 additions & 0 deletions projects/icons-lucide/scripts/prepare-icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/// <reference lib="es2021" />
import fs from 'node:fs';
import path from 'node:path';

import {prepareSvg} from '../../../scripts/prepare-svg';

const verbose = !process.env.CI;
const src = path.join(process.cwd(), 'node_modules', 'lucide-static', 'icons');
const dest =
process.argv[2] || path.join(process.cwd(), 'projects', 'icons-lucide', 'src');

fs.readdirSync(src).forEach((filename: string) => {
const filledFilename = renameToFilled(filename);
const content = prepareSvg(fs.readFileSync(path.join(src, filename), 'utf-8'));
const filled = content.replaceAll('fill="none"', 'fill="currentColor"');
const filePath = path.join(dest, filename);
const fileFilledPath = path.join(dest, filledFilename);

fs.writeFileSync(filePath, content);
verbose && console.info('copied:', filePath);

fs.writeFileSync(fileFilledPath, filled);
verbose && console.info('copied:', fileFilledPath);
});

// 2. copy flags from design tokens
// noinspection DuplicatedCode
const flagsDir = path.resolve('node_modules/@taiga-ui/design-tokens/icons/flags');

fs.readdirSync(flagsDir).forEach((filename: string) => {
const content = fs.readFileSync(path.join(flagsDir, filename), 'utf-8');
const filePath = path.join(dest, 'flags', filename);

fs.mkdirSync(path.dirname(filePath), {recursive: true});
fs.writeFileSync(filePath, content);
verbose && console.info('copied:', filePath);
});

function renameToFilled(filename: string): string {
const [name, extension] = filename.split('.');

return `${name}-filled.${extension}`;
}
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/a-arrow-down-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/a-arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/a-arrow-up-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/a-arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/a-large-small-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/a-large-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions projects/icons-lucide/src/accessibility-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions projects/icons-lucide/src/accessibility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/activity-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions projects/icons-lucide/src/activity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions projects/icons-lucide/src/air-vent-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2654fee

Please sign in to comment.