Compare commits

...

120 Commits

Author SHA1 Message Date
Karsa
ae2899a09e Optimize russian-ruble.svg (#1541) 2023-08-29 15:17:22 +02:00
Daniel Bayley
8b7ea73aa3 Improve bug icons (#988)
* Refine `bug` icon

* Add `bug-off` icon

* Add `bug-play` (debug) icon

* Add `bug-x` icon

* Add `bug-x` variant

* Delete bug-x.json

* Delete bug-x.svg

* Delete bug-x-2.json

* Delete bug-x-2.svg

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-28 20:08:41 +02:00
Eric Fennis
1bdeae5364 Add conditional exports property Lucide Svelte package.json (#1499)
* add exports property

* adjust wild card import

* Fix exports

* revert bundleSize plugin change

* Fix exports build warning
2023-08-28 19:41:24 +02:00
Jan
0e307087f6 replaced SvelteComponentTyped with SvelteComponent (#1517)
Co-authored-by: Jan Richter <j.richter@vanlanschotkempen>
2023-08-28 19:21:04 +02:00
Karsa
a46114b3e7 [github] Added issue template forms (#1535)
* [github] Added issue template forms

* [github] yaml => yml

* Syntax fixes

* Further syntax fixes

* Sort issue templates

* Update 02_bug_report.yml

---------

Co-authored-by: Karsa <karsa@karsa.org>
2023-08-28 19:20:30 +02:00
Karsa
fcafe0e7b7 [pull-request-template] Added some clarification to pull request requirements. (#1531) 2023-08-28 15:49:06 +02:00
Karsa
5312982b8f [docs] Fixes icon design guide heading levels + naming mix-up (#1533)
* Fixes icon design guide heading levels + naming mix-up

* Update icon-design-guide.md

---------

Co-authored-by: Karsa <karsa@karsa.org>
2023-08-28 09:05:26 +02:00
Daniel Bayley
3a13fab009 Add archive-x (junk) icon (#1203)
* Add `archive-x` (junk) icon

* Improve metadata

* Refine `archive` icon

* Refine `archive-restore` icon

* Refine `archive-*` icons

* Update icons/archive-restore.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/archive-x.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/archive.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-25 14:44:53 +02:00
Karsa
30a69ee670 [lucide-angular] Added factory to LUCIDE_ICONS injection token so that standalone components will be able to import LucideAngularModule. (#1529) 2023-08-25 08:43:16 +02:00
Jakob Guddas
5f442122ab feat: added dpi preview (#1510)
* feat: added dpi preview

* fix: switched to resvg

* build: updated versions and nitro build config

* fix: switched to resvg-wasm

* fix: trying out fetch with import meta url

* fix: trying out copy wasm file manually

* fix: wrong file path

* fix: trying out esmImport

* fix: oups

* fix: giving up

* fix: await initialization

* fix: still nothing

* Revert "fix: still nothing"

This reverts commit dcb9fe3837a32ec4149f41c9b8925ae0e2fbdb79.

* fix: implement suggestions

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-24 11:37:07 +02:00
Jakob Guddas
e78d910a83 feat: defention of done (#1224)
* feat: defention of done

* Update new-icon.md

* Update new-icon.md

* move file pull_request_template.md

* updated the PR template

* update checklist items

* update heading

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Karsa <contact@karsa.org>
2023-08-21 10:30:09 +02:00
Karsa
ccc8dc2b34 Updated icon design guide (#1518)
* Update icon design guide with new design guidelines, naming convention & code convention additions.

* Fix heading levels.

* Update docs/guide/design/icon-design-guide.md
2023-08-21 10:29:51 +02:00
Jakob Guddas
96bcca0e08 Added more tags to party-popper meta data (#1519) 2023-08-19 15:15:35 +02:00
Alwyn Tan
d95b14a70b Fix: Copy SVG properties into the child in react-native-svg (#1485) 2023-08-16 23:01:41 +02:00
Daniel Bayley
a852a43ef4 Optimise box/package icons (#1481)
* Optimise `box` icon

* Optimise `package` icons

* Update icons/package-check.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-minus.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-plus.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-search.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-x.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-15 19:34:12 +02:00
Jakob Guddas
4953a95e36 feat: added fallback background for browsers without prefers-color-scheme support (#1493)
* feat: added fallback background to svg preview for browsers without prefers-color-scheme support

* feat: added fallback background to svg stroke-width preview for browsers without prefers-color-scheme support
2023-08-15 19:32:25 +02:00
Martin Adamko
cad1b95b69 fix(icons): Rename send-horizonal to send-horizontal (#1496)
* fix(icons): Rename `send-horizonal` to `send-horizontal`

* feat(icons): Add `"send-horizonal"` alias for backward compatibility.
2023-08-14 09:00:42 +02:00
Daniel Bayley
92f3fb0f90 Fix database-backup/improve metadata/add database-zap (cache) icon (#1400)
* Fix `database-backup` icon

* Improve `database` icons metadata

* Add `database-zap` icon

* Update icons/database-zap.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/database-backup.svg

Co-authored-by: Karsa <contact@karsa.org>

* Revert "Update icons/database-backup.svg"

This reverts commit ef1cfd2065.

* Update icons/database-backup.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-13 22:09:30 +02:00
Jakob Guddas
6e8895d075 fix: generate alias files for nextjs import mapping (#1486)
* fix: generate alias files for nextjs import mapping

* Add entry files in rollup build

* improve build flow other packages

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-13 22:07:54 +02:00
Daniel Bayley
a1b2ce5b7b Add browser/dev tools icons (#1319)
* Add `mouse-pointer-square-dashed` (inspect variant) icon

* Rename `inspect` to `mouse-pointer-square`

* Add `crosshair-square` (inspector) variant

* Add `computer-chip` icon

* Add `applications` icon

* Add `tablet-smartphone` (devices/responsive design) icon

* Add `waypoints` icon

* Revert "Add `crosshair-square` (inspector) variant"

This reverts commit 1610b85f66.

* Revert "Add `applications` icon"

This reverts commit 06bc672f0f.

* Remove `computer-chip` icon

* Improve metadata

* Revert "Add `waypoints` icon"

This reverts commit acc47f0816.

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-13 12:55:48 +02:00
Jakob Guddas
4a54e87e84 fix: cogs (#1225)
* fix: cogs

* fix: cogs

* fix: added folder-cog-2 as alias for folder-cog

* chore: removed file-cog-2

* feat: rotated cogs

* feat: rotated user-cogs-2 cog
2023-08-13 11:59:48 +02:00
Daniel Bayley
d8bdbff9c6 Improve utility-pole metadata (#1157)
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-13 11:49:25 +02:00
Zara
70cffa8dd2 Fix lucide-vue-next stroke-width must be number bug (#1492) 2023-08-11 15:29:23 +02:00
Eric Fennis
8cff59627b Update Site to Vitepress 1.0.0-rc.4 and fix gh-icon api (#1491)
* update site dependencies

* revert preact change

* update config
2023-08-09 17:09:21 +02:00
Eric Fennis
b684a0083b update snapshots 2023-08-07 22:20:14 +02:00
Eric Fennis
9fb4b0b161 Add multiline support 2023-08-07 12:59:26 +02:00
Daniel Bayley
9ec40ae506 Add transport icons (#1412)
* Refine `truck` icon

* Refine `train` icon

* Rename `train` icon to `tram`

* Add `rail-symbol` icon

* Add `m-square` (metro) icon

* Add `train-track` icon

* Add `cable-car` icon

* Add `coach` icon

* Add `traffic-cone` icon

* Add `traffic-cone` variant

* Improve metadata

* Refine `bus` icon

* Add `traffic-lights` icon

* Revert "Add `traffic-lights` icon"

This reverts commit 22dcfc7aad.

* Refine `train-track` icon

* Rename `train` to `train-high-speed`

* Refine `car` icon

* Add `car-front` variant

* Add `car-taxi` icon

* Add `car-sports` icon

* Add `parking-meter` icon

* Add `tractor` icon

* Refine `bus` icon

* Refine `tractor` icon

* Refine `car-front` icon

* Refine `car-taxi` icon

* Refine `car-sports` icon

* Add `bus-school` icon

* Remove `traffic-cone` variant

* Add `train-high-speed-tunnel` icon

* Refine `coach` icon

* Refine `cable-car` icon

* Refine `car` icon

* Refine `train-high-speed` icon

* Refine `train-high-speed-tunnel` icon

* Update icons/car-front.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/car.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/car-taxi.svg

Co-authored-by: Karsa <contact@karsa.org>

* Refine `coach` icon

* Add `coach` variant

* Rename `tram` to `tram-front`

* Rename `train-high-speed` to `train-front`

* Rename `train-high-speed-tunnel` to `train-front-tunnel`

* Rename `bus-school` to `bus-school-front`

* Rename `coach` to `coach-front`

* Rename `coach` variant to `coach-front` variant

* Rename `car-taxi` to `car-taxi-front`

* Rename `car-sports` to `car-sports-front`

* Add `car-electric-front` icon

* Refine `car-electric-front` icon

* Refine `car` icon

* Add `ship-wheel` icon

* Improve `ship` metadata

* Remove `bus-school-front` icon

* Remove `car-electric-front` icon

* Remove `car-sports-front` icon

* Remove `coach-front` variant

* Rename `coach-front` to `bus-front`

* Improve `train-front-tunnel` metadata

* Refine `car-taxi-front` icon

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-07 11:21:42 +02:00
Daniel Bayley
890514de6c Add blocks icons (#1055)
* Optimise `grid` icon

* Rename `grid` to `grid-3x3`

* Add `grid-2x2` icon

* Add `blocks` icon

* Update icons/blocks.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-06 16:24:50 +02:00
Eric Fennis
9463b2e445 Revert .mjs modules in build for Lucide React (#1471)
* switch to different build strategy for dynamicIconImports

* add remove for dynamicIconImports files
2023-08-06 15:47:07 +02:00
dependabot[bot]
0221022e24 Bump semver from 7.5.0 to 7.5.2 (#1469)
Bumps [semver](https://github.com/npm/node-semver) from 7.5.0 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.0...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-04 10:47:48 +02:00
Eric Fennis
751f7cb1e3 Adjust workflow 2023-07-31 21:21:43 +02:00
Daniel Bayley
4c90b84236 Add rabbit & turtle/snail & shell/aminal icons (#1234)
* Add `rabbit` icon

* Add `turtle` icon

* Update icons/rabbit.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Refine `rabbit` icon

* Add `snail` icon

* Add `shell` icon

* Refine `snail` icon

* Refine `shell` icon

* Refine `snail` icon

* Refine `shell` icon

…to match `snail`.

* Flip `snail` icon to better match Lucide logo

* Refine `shell` icon

…to better match `snail` and the Lucide logo.

* Improve `shell` icon metadata

* Refine `turtle` icon

* Improve `contributor`s

* Reverse `snail` icon

* Reverse `shell` icon

* Reverse `lollipop` icon

* Add `paw-print` icon

* Add `fish-symbol` icon

* Improve metadata

* Update icons/egg-off.json

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/paw-print.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/rabbit.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/shell.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/snail.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/turtle.svg

Co-authored-by: Karsa <contact@karsa.org>

* Fix `turtle` icon

* Update icons/turtle.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update turtle.svg

Restores @danielbayley's original optimization.

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Karsa <contact@karsa.org>
2023-07-31 12:32:44 +02:00
Eric Fennis
01be733532 update workflow 2023-07-30 20:39:47 +02:00
Ishan
4ffa38e013 Add: Missing README Image (#1456)
* Create powered-by-vercel.svg

* Update README.md

Add Missing Image

* Update README.md

* Delete assets directory

Cleanup
2023-07-25 12:53:28 +02:00
Alexandru Bacanu
0a38dccdae Update package.json (#1452) 2023-07-24 21:48:14 +02:00
Eric Fennis
3391b5b717 update workflows 2023-07-21 10:17:43 +02:00
Daniel Bayley
5c145f4e72 Refine [pencil-]ruler icons (#1442)
* Refine `pencil-ruler` icon

* Refine `ruler` icon

…to match `pencil-ruler`.

* Update icons/ruler.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/pencil-ruler.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/pencil-ruler.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/pencil-ruler.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-07-21 09:47:16 +02:00
Daniel Bayley
74429a8e92 Optimise send icon/add variant (#1411)
* Add `send` variant

* Optimise `send` icon

* Refine `send` variant

* Refine `send` variant

* Rename `send-2` to `send-horizonal`
2023-07-19 21:17:31 +02:00
Ishan
1e99499dc8 Update createLucideIcon.ts (#1439)
* Update createLucideIcon.ts

Added Missing ref prop

* Update createLucideIcon.ts

* Update createLucideIcon.ts

ForwardRef need RefAttributes

* Update packages/lucide-react/src/createLucideIcon.ts

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>

* Update createLucideIcon.ts

In needs RefAttributes for Forward Ref

* Update createLucideIcon.ts

* Update createLucideIcon.ts

cleanup

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-07-19 21:16:33 +02:00
Eric Fennis
724a43e3f0 fix site build 2023-07-19 19:37:07 +02:00
Eric Fennis
fb79059fca Move dynamicImportFile to dedicated file (#1440)
* test this

* Fixes dynamicImportsMap and types
2023-07-19 19:32:34 +02:00
Daniel Bayley
9a54838538 Sort out pen[cil]/edit icons/add pencil-ruler (stationery) icon/improve metadata (#1286)
* Add `pencil-ruler` icon

* Add `pencil-eraser` icon

* Optimise `pencil` icon

* Improve stationery metadata

* Fix/rename/refine/optimise `pen`[`cil`]/`edit` icons

* Improve metadata
2023-07-18 12:26:49 +02:00
James Yeoman
c7438c0c10 Add forward and backward overlap icons (#1425)
* Add forward and backward overlap icons

* Apply code suggestions

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Apply metadata suggestions

Co-authored-by: Jakob Guddas <github@jguddas.de>

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-07-18 09:56:25 +02:00
Eric Fennis
667ae303f8 add inputs in workflow 2023-07-18 09:55:07 +02:00
Eric Fennis
dc1d17181f Fix createdRelease in writeReleaseMetadata 2023-07-17 21:58:10 +02:00
Eric Fennis
26abdb904d Merge branch 'main' of https://github.com/lucide-icons/lucide 2023-07-17 21:28:46 +02:00
Eric Fennis
cf0264745e Remove alias 2023-07-17 21:28:43 +02:00
Daniel Bayley
510a5ec3b9 Add boombox icon (#1249)
* Add `boombox` icon

* Rename/refine `boom-box` icon

* Refine `boom-box` icon
2023-07-17 21:16:43 +02:00
Eric Fennis
e1bc19be4e Refactor to workflow call 2023-07-17 21:12:03 +02:00
Daniel Bayley
062894e113 Add computer (GitHub Codespaces) icon (#1269)
* Add `computer` (GitHub Codespaces)  icon

* Add `pilot` (GitHub Copilot) icon

* Improve ro`bot` metadata

* Refine co`pilot` icon

* Update icons/pilot.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Refine `pilot` icon

* Refine `computer` icon

* Remove (co)`pilot` icon

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-07-17 20:40:34 +02:00
Eric Fennis
eaa99b35f6 Merge branch 'main' of https://github.com/lucide-icons/lucide 2023-07-17 20:16:55 +02:00
Eric Fennis
7c22ccfab4 Fix 3 Add back replace changelog formatter 2023-07-17 20:16:52 +02:00
Daniel Bayley
e0e171db81 Add shopping-basket icon (#1430)
* Add `shopping-basket` icon

* Improve `shopping-cart` metadata

* Optimise `shopping-bag` icon

* Fix `shopping-basket` icon
2023-07-17 20:14:49 +02:00
Eric Fennis
3b11552e5e Merge branch 'main' of https://github.com/lucide-icons/lucide 2023-07-17 20:09:25 +02:00
Eric Fennis
d8b455b614 Remove quote github actions 2023-07-17 20:09:23 +02:00
Daniel Bayley
79eecc89f6 Add TV/controller/connector icons (#1341)
* Add [aspect] `ratio` icon

* Rename `tv-2` to `tv-flatscreen`

* Add `triangle-right` (volume) icon

* Add `antenna` icon

* Add `connector-audio-video` icon

* Improve metadata

* Add [generic] `connector` icon

* Add `connector-usb` icon

* Improve metadata

* Add `hdmi-port` icon

* Improve metadata

* Add `connector-audio-video` icon

* Improve metadata

* Rename `connector-*` icons to `cable-*`

* Rename `cable` to `cable-plugs`

* Update icons/tv-flatscreen.json

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/hdmi-port.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/ratio.json

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Revert "Rename `tv-2` to `tv-flatscreen`"

This reverts commit 7df3555837.

* Remove `cable-audio-video` icon

* Rename `cable-plugs` to `cable`

* Remove `cable-usb` icon

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-07-17 20:07:29 +02:00
Eric Fennis
b943430a08 Fix 2 Change log output 2023-07-17 20:06:18 +02:00
Daniel Bayley
cebb0ee84b Refine/add scissors[-square] (snippet) icon (#1266)
* Refine `scissors` icon

* Add `scissors-square` (snippet) icon

* Add `scissors-square-dashed-bottom` (snippet) icon

* Refine `scissors-square-dashed-bottom` icon

* Improve `scissors`[`-*`] icons metadata

* Add `scissors-line-dashed` (cut along dashed line) icon

* Refine `scissors` icons gap to 2px

* Fix `scissors` optimisation

* Fix `scissors-line-dashed` optimisation

* Fix `scissors-square` optimisation

* Fix `scissors-square-dashed-bottom` optimisation
2023-07-17 19:57:02 +02:00
Eric Fennis
210c56807e Try fix changelog output 2023-07-17 19:56:14 +02:00
Daniel Bayley
c2a8f31176 Add hard-drive-[up/down]load icons (#1318)
* Add `download-hard-drive` icon

* Improve `download` metadata

* Rename `download-hard-drive` to `hard-drive-download`

* Improve metadata

* Add `hard-drive-upload` icon
2023-07-14 13:17:08 +02:00
Daniel Bayley
a3f70d5b8b Add gauge alternate icon (#1256)
* Add `gauge` alternate icon

* Improve `gauge` icons metadata

* Rename `gauge` to `gauge-circle`

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-07-13 16:41:47 +02:00
Eric Fennis
c97c6ed9e4 Improve types export for lucide-react (#1424)
* Add types plugin

* Add js doc comment

* Only enable dynamic imports for CJS and ESM builds

* Add documentation

* Adjust docs

* Add test for dynamic import

* Adjust note

* Adjustment in docs
2023-07-13 16:39:02 +02:00
Eric Fennis
e9d69c6948 Fix workflow actions 2023-07-07 18:37:51 +02:00
Daniel Bayley
270c935cd4 Optimise/improve plus/minus icons/metadata (#1381)
* Optimise `plus`/`minus` icons

* Optimise `square` icon

* Improve `plus`/`minus` icons metadata
2023-07-07 14:16:39 +02:00
Daniel Bayley
b7377d21eb Sort out chevron-* icons (#1355)
* Optimise `chevron-*` icons

* Improve `chevron-*` icons metadata

* Add `chevron-left-circle` icon

* Add `chevron-right-circle` icon

* Add `chevron-up-circle` icon

* Add `chevron-down-circle` icon

* Improve metadata
2023-07-07 13:46:50 +02:00
Eric Fennis
7ccf155ad4 Adjust workflow 2023-07-02 21:42:41 +02:00
Eric Fennis
c696d1e907 update workflow 2023-07-02 21:36:30 +02:00
Daniel Bayley
a8cf24e75a Sort out project management (kanban/gantt) icons (#1405)
* Improve `kanban`/`gantt` icons metadata

* Add `kanban` icon

* Rename `square-kanban` to `kanban-square`

* Rename `square-kanban-dashed` to `kanban-square-dashed`

* Rename `square-gantt` to `gantt-chart-square`

* Fix `gantt-chart` icons metadata
2023-07-02 21:12:09 +02:00
Eric Fennis
4e2773bd2d Fix indentation ci workflow 2023-07-02 14:49:02 +02:00
Eric Fennis
7c8f898893 Improve release workflow (#1397)
* first fixes release workflow

* improve workflow

* remove legacy ::set-outputs
2023-07-02 14:46:53 +02:00
Viktor Szépe
c3951d36c7 Fix latest release link in README (#1415) 2023-07-02 14:10:05 +02:00
Daniel Bayley
f958310d91 Improve scroll icons metadata (#1380) 2023-06-29 21:58:22 +02:00
Daniel Bayley
d00cbebcc4 Optimise/add table icons/simplify metadata (#1391)
* Optimise `table` icon

* Add `table-properties` (property list) icon

* Improve `table` icons metadata
2023-06-29 21:57:35 +02:00
Eric Fennis
3619dfa7f2 Bump Vitest and his dependencies (#1414)
* migration to Svelte 4

* feat: update peer dep

* feat: update lockfile

* Bump vitest and deps

---------

Co-authored-by: joseph <josephrios56@gmail.com>
2023-06-29 21:42:47 +02:00
Eric Fennis
c844bc668f Small fixes site (#1408) 2023-06-28 21:04:37 +02:00
Daniel Bayley
32dec05e0b Add VS Code Lucide SVG snippets (#1359) 2023-06-28 09:20:22 +02:00
Daniel Bayley
5394d7fceb Add tally icons (#1244)
* Add `tally` icon

* Improve `calculator` metadata

* Refine `tally` icon

* Add `tally-1` icon

* Add `tally-2` icon

* Add `tally-3` icon

* Add `tally-4` icon

* Rename `tally` icon to `tally-5`
2023-06-28 08:59:50 +02:00
Daniel Bayley
8dea4c7b7f Add shipping/container (Docker) icons (#1372)
* Add `container` (Docker) icon

* Add `arrows-up-from-line` (this way up) icon
2023-06-27 21:39:20 +02:00
Nathaniel
b8a595275d Add area-chart icon (#1376)
* Add  icon

* Move top line up 1px

* Update paths

* Optimize paths
2023-06-27 21:38:18 +02:00
Daniel Bayley
a7b3ecde63 Add gallery icons (#1389)
* Add `gallery-vertical` icon

* Add `gallery-horizontal` icon

* Add `gallery-vertical-end` icon

* Add `gallery-horizontal-end` icon

* Add `gallery-thumbnails` icon
2023-06-27 21:12:50 +02:00
Daniel Bayley
8bcfc225ce Improve dashed icons metadata (#1361)
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-06-25 12:57:44 +02:00
Eric Fennis
1d608db223 Improve labeler paths for site label 2023-06-25 10:02:34 +02:00
Eric Fennis
c1cb5d9bc2 Add labeler (#1379) 2023-06-23 09:37:16 +02:00
Daniel Bayley
66f51474cd Optimise gem icon/improve metadata (#1305)
* Optimise `gem` icon

* Improve `gem` metadata
2023-06-23 09:36:47 +02:00
Daniel Bayley
af0b16bc10 Add wallet-cards icon/wallet variant/optimise credit-card icon/improve metadata (#1332)
* Add `wallet` variant

* Add `wallet-cards` icon

* Optimise `credit-card` icon

* Refine `wallet` icon

* Refine `wallet` variant

* Revert `credit-card` changes

…Handled in #1350.

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-06-23 09:21:54 +02:00
Daniel Bayley
46d6c3c119 Add [cassette/video]-tape icons (#1248)
* Add `cassette-tape` icon

* Add `videotape` (VHS) icon

* Improve `video` metadata

* Improve `voicemail` metadata

* Refine `videotape` icon

* Update icons/cassette-tape.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-23 09:08:17 +02:00
Daniel Bayley
d3b8510602 Add generic folder-root/sync icons (#1215)
* Add generic `folder-root` icon

* Add `folder-dot` icon

* Add `folder-open-dot` icon

* Add `folder-sync` icon

* Refine `folder-sync` icon
2023-06-23 08:46:41 +02:00
Daniel Bayley
97e0f30627 Add square-kanban/gantt (project) icons (#1201)
* Add `project` icon

* Add `project-template` icon

* Add `project-roadmap` icon

* Rename `project*` icons to `square-kanban*`

* Rename `project-roadmap` to `square-gantt`

* Add `gantt-chart` icon

* Improve `target` metadata

* Add `folder-kanban` (project folder) icon
2023-06-23 08:46:19 +02:00
Daniel Bayley
24676ddc8e Add layout-list-check icon (#1232)
* Add `layout-list-check` icon

* Refine `layout-list` icon

* Rename `layout-list-check` icon to `list-todo`

* Add `list-checks` icon

* Update icons/list-checks.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/list-todo.svg

Co-authored-by: Karsa <contact@karsa.org>

* Revert/refine `layout-list` icon

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-23 08:02:08 +02:00
Daniel Bayley
92689a3328 Improve undo-2 metadata (#1339)
* Add `arrow-back` icon

* Improve `undo` variant metadata

* Improve metadata

* Revert "Add `arrow-back` icon"

This reverts commit 9e8c9d97cb.
2023-06-22 09:30:11 +02:00
Daniel Bayley
b578269ecb Add rainbow icon (#1357)
* Add `rainbow` icon

* Add `cloud` variant

* Revert "Add `cloud` variant"

This reverts commit ff23e27606.
2023-06-21 09:21:33 +02:00
Daniel Bayley
d041a2b02a Add square-* code snippet/gist icons (#1068)
* Add `square-dashed-bottom` (snippet) icon

* Add `square-code` (gist) icon

* Optimise `square-dashed-bottom` (snippet) icon

* Optimise `square-code` (gist) icon

* Add `square-dashed-bottom-code` (snippet/gist) icon

* Update icons/square-dashed-bottom.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Refine `square-dashed-bottom-code` icon

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-06-21 09:16:02 +02:00
Daniel Bayley
0253326b17 Improve award/badge/medal icons metadata (#1371) 2023-06-19 09:20:10 +02:00
Daniel Bayley
275c2cbc69 Add candy-cane/lollipop/popsicle/dessert/popcorn icons (#1149)
* Add `lolly` icon

* Add `candy` alternate icon

* Add `ice-lolly` icon

* Rename `candy` to `candy-cane`

* Update icons/lolly.svg

Co-authored-by: Karsa <contact@karsa.org>

* Rename `lolly` to `lollipop`

* Rename `ice-lolly` to `popsicle`

* Update icons/candy-cane.svg

Co-authored-by: Karsa <contact@karsa.org>

* Refine `candy-cane` icon

* Fix `lollipop` to match `search` icon

* Update icons/candy-cane.svg

Co-authored-by: Karsa <contact@karsa.org>

* Improve `lollipop` metadata

* Add `pudding` icon

* Rename `pudding` icon to `dessert`

* Add `popcorn` icon

* Refine `popcorn` icon

* Optimise `lollipop` icon

* Optimise `candy-cane` icon

* Optimise `popsicle` icon

* Add `donut` icon

* Add `cake-slice` icon

* Improve `cake` metadata

* Improve `donut` metadata

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-19 09:10:41 +02:00
Daniel Bayley
4bd6a273db Optimise/add arrow-*navigation icons/improve metadata (#1351)
* Optimise `arrow-*` icons

* Add `arrow-up-left-square` icon

* Add `arrow-up-right-square` (share variant) icon

* Add `arrow-down-left-square` icon

* Add `arrow-down-right-square` icon

* Improve `arrow-*` icons metadata

* Improve map icons metadata
2023-06-18 22:30:09 +02:00
Eric Fennis
34155d48e7 Site improvements (#1366)
* write cions details

* add details

* Add icons details

* update gitignore

* Add node details

* Move tags api to own composable

* remove overridden var

* remopve whitespace

* log directory existence

* Fix path name

* Fix build

* Fix tags fetching

* Move max related icons to prebuild

* Improve tags scroller

* Add categories call

* cleanup

* Add active state
2023-06-15 14:44:43 +02:00
Eric Fennis
82db590192 General improvements in documentation (#1348)
* General improvements in documentation

* fix typo

* Update lucide-angular.md

* Fix build

* remove duplicated key

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-12 22:10:15 +02:00
Daniel Bayley
70be55b78f Improve/optimise null/void/x[-*]/linter icons/metadata (#1247)
* Improve null/void metadata

* Optimise `x`/linter icons
2023-06-12 21:39:49 +02:00
Daniel Bayley
7163aeaa6b Add activity-square icon (#1356)
* Add `activity-square` icon

* Optimise `activity` icon

* Improve `activity` metadata
2023-06-12 21:36:07 +02:00
Daniel Bayley
99cd76bb35 Fix circle-dot icons metadata (#1358) 2023-06-12 21:35:18 +02:00
Eric Fennis
f5fb1ec263 Small seo improvements 2023-06-12 21:13:22 +02:00
Daniel Bayley
6916aebee4 Add generic shapes icon (#1239)
* Add generic `shapes` icon

* Update icons/shapes.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-12 21:03:39 +02:00
Jakob Guddas
65d213264f Changed binary (#1188)
* Changed `binary`

Felt to aggressive.

* feat: rounded radius to zero in file-digit
2023-06-11 20:51:26 +02:00
Daniel Bayley
ee77147aff Add circle-dot-* (GitHub issue) icons (#1066)
* Improve `circle-dot` (GitHub issue) metadata

* Add `refresh-ccw-dot` icon

* Add `circle-dot-dashed` icon

* Add `circle-dashed` icon

* Improve `circle-dot` metadata

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-06-11 19:38:12 +02:00
Daniel Bayley
3b7b74fe86 Improve toggle/binary metadata (#1238) 2023-06-08 13:12:42 +02:00
Daniel Bayley
3a2f052ce9 Add presentation/projector icons (#1327)
* Add `projector` icon

* Add `presentation-screen` icon

* Add `presentation` (whiteboard) icon

* Consolidate `presentation` icons

* Refine `presentation` icon

* Update icons/projector.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-07 10:14:32 +02:00
Eric Fennis
cf34d61971 Revert title change 2023-06-07 08:38:21 +02:00
Eric Fennis
2814a63b8f Add sitemap and OG image to site (#1347)
* Add sitemap generation

* Add og image

* Fix links

* remove comments
2023-06-07 08:25:46 +02:00
Daniel Bayley
4bcab462dc Optimise/add search[-*] icons (#1261)
* Optimise `search` icon

* Add `search-code` icon

* Add `search-x` (stop/clear) icon

* Add `search-check` (complete) icon

* Add `circle-slash` (stop/clear) icon

* Refine `search-x` icon

* Refine `search-slash` icon
2023-06-06 16:03:11 +02:00
Daniel Bayley
6c93bb97c7 Add candlestick-chart icon/bar-chart-big variants (#1320)
* Add `candlestick-chart` icon

* Add `bar-chart-big` alternate icon

* Add `bar-chart-horizontal-big` alternate icon

* Refine `bar-chart-big` icons
2023-06-06 15:59:43 +02:00
Eric Fennis
3c1993c463 Fix orbit json 2023-06-06 15:57:12 +02:00
Daniel Bayley
7a57c306c3 Optimise book icons/add book-up (git force push) alternate icon (#1205)
* Optimise `book` icons

* Add `book-up` (force `push`) alternate icon
2023-06-06 15:18:40 +02:00
Jakob Guddas
32637199f5 Added round corners to network (#1190)
* Added round corners to `network`

* Update network.svg

* Update network.svg

* Update network.svg

* Update network.svg
2023-06-06 15:11:25 +02:00
Guillermo Angeles
e490bc35b8 Add Goal icon (#1251)
* Add more music icons and another mic icon (#746)

* Revert "Add more music icons and another mic icon (#746)" (#750)

This reverts commit 57cba6ae0e.

* Add `goal` icon

* Update icons/goal.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/goal.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: it-is-not <72697755+it-is-not@users.noreply.github.com>
Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Guillermo Angeles <guillermo.angeles@adoptaunabuelo.com>
Co-authored-by: Guillermo Angeles <67046262+g-angeles-aua@users.noreply.github.com>
Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-06-06 15:09:18 +02:00
Jakob Guddas
496058cc15 Update orbit.json (#1342) 2023-06-06 15:03:01 +02:00
Daniel Bayley
4ee46673af Add key variants (#1257)
* Add `key` alternate icon

* Update icons/key-2.svg

Co-authored-by: Karsa <contact@karsa.org>

* Refine `key` alternate icon

* Add `key` variant

* Refine `key` alternate icons

* Rename `key-2` to `key-round`

* Rename `key-3` to `key-square`

* Improve metadata

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-04 23:16:11 +02:00
Jakob Guddas
5a46f4b87c Optimized circle-off (#1262)
* Optimized `circle-off`

* Update icons/circle-off.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-06-04 22:20:07 +02:00
Daniel Bayley
875e8a2d06 Add versions icons (#1141)
* Add `versions` icon

* Add `versions-files` icon

* Rename `versions-files` icon to `file-stack`

* Rename `versions` icon to `square-stack`
2023-06-04 22:12:28 +02:00
Daniel Bayley
e006a171c1 Improve operator icons metadata (#1263)
* Improve operator icons metadata

* Update icons/square-slash.json

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-06-04 22:10:29 +02:00
Eric Fennis
606706e8e0 Fix gh-api for strokewidths 2023-06-04 17:52:03 +02:00
674 changed files with 13900 additions and 6310 deletions

View File

@@ -0,0 +1,49 @@
name: Icon request
description: Suggest a new icon for this project
labels: ['🙌 icon request']
body:
- type: markdown
attributes:
value: |
Before submitting an icon request check if it has already been requested. If there is an open request, please add a 👍.
**Important note**: No new brand logos are allowed, see https://github.com/lucide-icons/lucide/issues/670.
Existing brand icons will also be phased out. For brand icons, consider using https://simpleicons.org, which offers purpose-built SVGs that are also on a 24×24px grid.
- type: input
id: name
attributes:
label: Icon name
description: What should this icon depict? For multiple icons, provide a comma-separated list.
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: Use cases
description: Why do you need this icon? Include at least two real-life use cases per requested icon, avoiding generic descriptions like "it's a car icon".
placeholder: e.g. I need a star icon to use in my rating system.
validations:
required: true
- type: textarea
id: design-ideas
attributes:
label: Design ideas
description: What should this icon look like? Provide simple, minimalistic icon examples from other sets or your own drafts to help us visualize your request.
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please review the following checklist before submitting your request.
options:
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
required: true
- label: I have searched existing icons to make sure it does not already exist and I didn't find any.
required: true
- label: I am not requesting a brand logo and the art is not protected by copyright.
required: true
- label: I am not requesting an icon that includes religious, political imagery or hate symbols.
required: true
- label: I have provided appropriate use cases for the icon(s) requested.
required: true

View File

@@ -0,0 +1,90 @@
name: Bug report
description: Create a report to help us improve
labels: ['🐛 bug']
body:
- type: markdown
attributes:
value: |
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
- type: checkboxes
id: packages
attributes:
label: Package
description: Which Lucide packages are affected? You may select more than one.
options:
- label: lucide
- label: lucide-angular
- label: lucide-flutter
- label: lucide-preact
- label: lucide-react
- label: lucide-react-native
- label: lucide-solid
- label: lucide-svelte
- label: lucide-vue
- label: lucide-vue-next
- label: Figma plugin
- label: source/main
- label: other/not relevant
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version of Lucide are you running?
placeholder: e.g. 0.289.1
validations:
required: true
- type: checkboxes
id: browsers
attributes:
label: Browser
description: In which browser(s) are you experiencing the issue? You may select more than one.
options:
- label: Chrome/Chromium
- label: Firefox
- label: Safari
- label: Edge
- label: iOS Safari
- label: Opera
- label: Other/not relevant
validations:
required: false
- type: checkboxes
id: operating-systems
attributes:
label: Operating system
description: In which operating systems a you experiencing the issue? You may select more than one.
options:
- label: Windows
- label: Linux
- label: macOS
- label: Other/not relevant
- type: textarea
id: description
attributes:
label: Description
description: Try to describe in detail the problem you're running into and provide additional context about your working environment if necessary.
placeholder: e.g. When I do X, Y happens instead of Z
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Please provide a detailed guide on how this issue can be reproduced or a live example with a working reproduction on Codesandbox, JSFiddle or similar.
placeholder: |
1. Import `check` icon
2. Add to a React component/view
3. Run the react app
4. Notice that the `check` isn't rendering correctly which seems a encoding problem
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please review the following checklist before submitting your issue.
options:
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
required: true

View File

@@ -0,0 +1,62 @@
name: lucide.dev bug report
description: Help us improve the Lucide site
labels: ['🐛 bug', '🌍 site']
body:
- type: markdown
attributes:
value: |
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
- type: checkboxes
id: browsers
attributes:
label: Browser
description: In which browser(s) are you experiencing the issue? You may select more than one.
options:
- label: Chrome/Chromium
- label: Firefox
- label: Safari
- label: Edge
- label: iOS Safari
- label: Opera
- label: Other/not relevant
validations:
required: false
- type: checkboxes
id: operating-systems
attributes:
label: Operating system
description: In which operating systems are you experiencing the issue? You may select more than one.
options:
- label: Windows
- label: Linux
- label: macOS
- label: Other/not relevant
- type: textarea
id: description
attributes:
label: Description
description: Try to describe in detail the problem you're running into and provide additional context about your working environment if necessary.
placeholder: e.g. When I do X, Y happens instead of Z
validations:
required: true
- type: textarea
id: stepsToReproduce
attributes:
label: Steps to reproduce
description: Please provide a detailed guide on how this issue can be reproduced.
placeholder: |
1. I click on an icon
2. I click on `Copy SVG` in the drawer
3. I paste from the clipboard
4. A base64 encoded data URI is inserted.
...
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please review the following checklist before submitting your issue.
options:
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
required: true

View File

@@ -0,0 +1,53 @@
name: Feature request
description: Share with us your ideas on how Lucide could be improved upon.
labels: ['💡 idea']
body:
- type: markdown
attributes:
value: |
Before submitting a new feature request, please search to see if someone has filed a similar request before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
- type: checkboxes
id: packages
attributes:
label: Package
description: Which Lucide project do you wish this feature were added to? You may select more than one.
options:
- label: lucide
- label: lucide-angular
- label: lucide-flutter
- label: lucide-preact
- label: lucide-react
- label: lucide-react-native
- label: lucide-solid
- label: lucide-svelte
- label: lucide-vue
- label: lucide-vue-next
- label: Figma plugin
- label: all JS packages
- label: site
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Try to describe in detail the feature you wish existed.
placeholder: e.g. I want to be able to set extra CSS classes on icon components.
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: Use cases
description: Why do you need this feature? Provide real-life use cases as to why this feature will be useful for others.
placeholder: e.g. I could use the extra classes to add animation or global custom styling to some icons.
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please check the following items before submitting your issue.
options:
- label: I have searched the existing issues to make sure this bug has not already been reported.
required: true

View File

@@ -1,68 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
labels: "🐛 bug"
---
<!--
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
-->
## Prerequisites
* Version:
* Are you running from source/main:
* Are you using a released build:
* Operating system:
* Bits:
## Step to reproduce
*(Type here)*
### Actual behavior
## Any message or error
*(Type here)*
## Resources
* Links
* Screenshots
Here is what a great bug report would look like:
```
## Prerequisites
Version: Release v3.1.0
Running from: Import using webpack
Operating system: Mac OSX
Bits: 64 bits
## Step to reproduce
- Import `check` icon
- Add to a React component/view
- Run the react app
- Notice that the `check` isn't rendering correctly which seems a encoding problem
### Actual behavior:
- Import `check` icon
- Add to a React component/view
- Run the react app
- Check is displayed with correct encoding (e.g UTF-8)
## Any message or error
No console output
...
## Resources
No resources
...
```

View File

@@ -1,18 +0,0 @@
---
name: Icon request
about: Suggest an new icon for this project
labels: "🙌 icon request"
---
<!--
Before creating an icon request, please search to see if someone has requested the icon already. If there is an open request, please add a 👍.
A note about brand logos and related material : We follow the decision from Feather Icons (https://github.com/feathericons/feather/issues/763) to deprecate icons relating to brands.
You will find some in the set, but we won't add any new ones. https://simpleicons.org has 24x24 SVG icons for this purpose.
-->
## Icon Request
* Icon name:
* Use case:
* _Screenshots_ of similar icons:

View File

@@ -1,15 +0,0 @@
---
name: New icon
about: Add a new icon to the library
labels: "🎨 <icon"
---
<!-- Thanks for submitting an icon! Please make sure you read the icon design guide
at https://github.com/lucide-icons/lucide/blob/main/docs/icon-design-guide.md beforehand,
and please fill everything below. -->
- **Name of the icon** : <!-- `icon` -->
- **Tags (alternative names for this icon)** (add them in as a separate json file using the same icon name) :
- **What is the purpose of this icon?** : <!-- Shows that one can click it to... / Is used to denote or label... -->
- **100% scale preview** : <!-- upload an image -->
- **Have you considered alternative possibilities** for its naming or design? :

View File

@@ -24,15 +24,15 @@ runs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-lucide-preact-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-lucide-preact-pnpm-store-
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --filter lucide-preact

View File

@@ -24,15 +24,15 @@ runs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-lucide-preact-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-lucide-preact-pnpm-store-
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --filter .

62
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
# For changed dependencies
📦 dependencies:
- pnpm-lock.yaml
# For changes in documentation
📖 documentation:
- docs/*.md
- docs/**/*.md
# For changes in the site, but not markdown files
🌍 site:
- 'docs/**'
# For changes in the metadata
🫧 metadata:
- 'icons/*.json'
- categories/*
# For changes or added icons
🎨 icon:
- 'icons/*.svg'
# For changes in the lucide package
🧳 lucide package:
- 'packages/lucide/*'
# For changes in the lucide React package
⚛️ react package:
- 'packages/lucide-react/*'
# For changes in the lucide React Native package
⚛️ react native package:
- 'packages/lucide-react-native/*'
# For changes in the lucide vue packages
💎 vue package:
- 'packages/lucide-vue/*'
- 'packages/lucide-vue-next/*'
# For changes in the lucide angular package
🅰️ angular package:
- 'packages/lucide-angular/*'
# For changes in the lucide preact package
⚛️ preact package:
- 'packages/lucide-preact/*'
# For changes in the lucide svelte package
🧣 svelte package:
- 'packages/lucide-svelte/*'
# For changes in the lucide solid package
🪝 solid package:
- 'packages/lucide-solid/*'
# For changes in the lucide static package
🪨 static package:
- 'packages/lucide-static/*'
# For changes in the lucide flutter package
🏹 flutter package:
- 'packages/lucide-flutter/*'

55
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,55 @@
<!-- Thank you for contributing! -->
<!-- Insert `closes #issueNumber` here if merging this PR will resolve an existing issue -->
## What is the purpose of this pull request?
<!-- Please choose one of the following, and put an "x" next to it. -->
- [ ] New Icon
- [ ] Bug fix
- [ ] New Feature
- [ ] Documentation update
- [ ] Other:
### Description
<!-- Please insert your description here and provide info about the "what" this PR is contribution -->
### Icon use case <!-- ONLY for new icons, remove this part if not icon PR -->
<!-- What is the purpose of this icon? For each icon added, please insert at least two real life use cases (the more the better). Text like "it's a car icon" is not accepted. -->
### Alternative icon designs <!-- ONLY for new icons, remove this part if not icon PR -->
<!-- If you have any alternative icon designs, please attach them here. -->
## Icon Design Checklist <!-- ONLY for new icons, remove this part if not icon PR -->
### Concept <!-- ONLY for new icons -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I have provided valid use cases for each icon.
- [ ] I have not added any a brand or logo icon.
- [ ] I have not used any hate symbols.
- [ ] I have not included any religious or political imagery.
### Author, credits & license<!-- ONLY for new icons. -->
<!-- Please choose one of the following, and put an "x" next to it. -->
- [ ] The icons are solely my own creation.
- [ ] The icons were originally created in #<issueNumber> by @<githubUser>
- [ ] I've based them on the following Lucide icons: <!-- provide the list of icons -->
- [ ] I've based them on the following design: <!-- provide source URL and license permitting use -->
### Naming <!-- ONLY for new icons -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I've read and followed the [naming conventions](https://lucide.dev/guide/design/icon-design-guide#naming-conventions)
- [ ] I've named icons by what they are rather than their use case.
- [ ] I've provided meta JSON files in `icons/[iconName].json`.
### Design <!-- ONLY for new icons -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I've read and followed the [icon design guidelines](https://lucide.dev/guide/design/icon-design-guide)
- [ ] I've made sure that the icons look sharp on low DPI displays.
- [ ] I've made sure that the icons look consistent with the icon set in size, optical volume and density.
- [ ] I've made sure that the icons are visually centered.
- [ ] I've correctly optimized all icons to two points of precision.
## Before Submitting <!-- For every PR! -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I've read the [Contribution Guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
- [ ] I've checked if there was an existing PR that solves the same issue.

View File

@@ -10,8 +10,9 @@ on:
jobs:
create-release:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
steps:
- uses: actions/checkout@v3
@@ -29,12 +30,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
@@ -47,7 +48,7 @@ jobs:
- name: Get latest tag
id: latest-tag
run: echo "::set-output name=LATEST_TAG::$(git describe --tags `git rev-list --tags --max-count=1`)"
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
- name: Install dependencies
run: pnpm install
@@ -57,17 +58,18 @@ jobs:
- name: Create new version
id: new-version
run: echo "::set-output name=NEW_VERSION::$(.github/workflows/version-up.sh --minor)"
run: echo "NEW_VERSION=$(.github/workflows/version-up.sh --minor)" >> $GITHUB_OUTPUT
- name: Create change log
id: change-log
run: |
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'}"
CHANGE_LOG=$(tail -n +5 <<< $CHANGE_LOG)
echo $CHANGE_LOG
echo "::set-output name=CHANGE_LOG::$CHANGE_LOG"
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "CHANGE_LOG<<$EOF" >> $GITHUB_OUTPUT
echo "$CHANGE_LOG" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
env:
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
@@ -76,11 +78,17 @@ jobs:
echo '${{ steps.new-version.outputs.NEW_VERSION }}'
echo '${{ steps.change-log.outputs.CHANGE_LOG }}'
- name: Release
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
with:
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
start-release:
if: github.repository == 'lucide-icons/lucide'
needs: create-release
uses: './.github/workflows/release.yml'
secrets: inherit
with:
version: ${{ needs.create-release.outputs.VERSION }}

12
.github/workflows/labeler.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-angular/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- icons/**
- tools/build-font/**
- pnpm-lock.yaml
jobs:
@@ -26,15 +27,15 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-lucide-font-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-lucide-font-pnpm-store-
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --filter outline-svg

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-preact/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-react-native/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-react/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-solid/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-static/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-svelte/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-vue-next/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-vue/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -25,12 +26,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

View File

@@ -22,6 +22,20 @@ jobs:
uses: tj-actions/changed-files@v35
with:
files: icons/*.svg
- name: Generate 24px dpi preview
id: generate-24px-dpi-preview
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
cat "$file" | # get file content
tr '\n' ' ' | # remove line breaks
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/dpi/24/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate cohesion check random
id: generate-cohesion-check-random
run: |
@@ -134,6 +148,10 @@ jobs:
${{ steps.generate-3px-stroke-width.outputs.body }}<br/>
</details>
<details>
<summary>DPI Preview (24px)</summary>
${{ steps.generate-24px-dpi-preview.outputs.body }}<br/>
</details>
<details>
<summary>Icon X-rays</summary>
${{ steps.generate-x-rays.outputs.body }}
</details>

View File

@@ -5,6 +5,13 @@ on:
tags:
- 'v*'
workflow_call:
inputs:
version:
required: true
description: Version
type: string
workflow_dispatch:
inputs:
version:
@@ -12,8 +19,8 @@ on:
required: true
jobs:
pre-build:
if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey", "karsa-mistmere"]', github.actor)
pre-release:
if: github.repository == 'lucide-icons/lucide' && contains('["ericfennis", "karsa-mistmere"]', github.actor)
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
@@ -23,19 +30,32 @@ jobs:
id: get_version
run: |
echo $VERSION_REF
echo ::set-output name=VERSION::${VERSION_REF/refs\/tags\/\v}
echo "VERSION=${VERSION_REF/refs\/tags\/\v}" >> $GITHUB_OUTPUT
env:
VERSION_REF: ${{ github.event.inputs.version || github.ref }}
VERSION_REF: ${{ inputs.version || github.event.inputs.version || github.ref }}
lucide:
release:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: pre-build
needs: pre-release
strategy:
matrix:
package: [
'lucide',
'lucide-react',
'lucide-react-native',
'lucide-vue',
'lucide-vue-next',
'lucide-angular',
'lucide-preact',
'lucide-solid',
'lucide-svelte',
]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
@@ -47,484 +67,38 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken ${{ inputs.NPM_TOKEN || secrets.NPM_TOKEN }}
- name: Set new version
run: pnpm --filter lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter ${{ matrix.package }} version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide build
run: pnpm --filter ${{ matrix.package }} build
- name: Test
run: pnpm --filter lucide test
run: pnpm --filter ${{ matrix.package }} test
- name: Publish
run: pnpm --filter lucide publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-package-json
path: packages/lucide/package.json
lucide-react:
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 version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-react build
- name: Test
run: pnpm --filter lucide-react test
- name: Publish
run: pnpm --filter lucide-react publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
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@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 new version
run: pnpm --filter lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-vue build
- name: Test
run: pnpm --filter lucide-vue test
- name: Publish
run: pnpm --filter lucide-vue publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-vue-package-json
path: packages/lucide-vue/package.json
lucide-vue-next:
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 new version
run: pnpm --filter lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-vue-next build
- name: Test
run: pnpm --filter lucide-vue-next test
- name: Publish
run: pnpm --filter lucide-vue-next publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-vue-next-package-json
path: packages/lucide-vue-next/package.json
lucide-angular:
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-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-angular build
- name: Test
run: pnpm --filter lucide-angular test
- name: Publish
run: pnpm --filter lucide-angular publish --no-git-checks --ignore-scripts
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-angular-package-json
path: packages/lucide-angular/package.json
lucide-preact:
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-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-preact build
- name: Test
run: pnpm --filter lucide-preact test
- name: Publish
run: pnpm --filter lucide-preact publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-preact-package-json
path: packages/lucide-preact/package.json
lucide-solid:
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-solid version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: pnpm --filter lucide-solid build
- name: Test
run: pnpm --filter lucide-solid test
- name: 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
with:
name: lucide-svelte-package-json
path: packages/lucide-svelte/package.json
run: pnpm --filter ${{ matrix.package }} publish --no-git-checks --ignore-scripts
lucide-static:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: [pre-build, lucide-font]
needs: [pre-release, lucide-font]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
@@ -543,24 +117,24 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set new version
run: pnpm --filter lucide-static version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
run: pnpm --filter lucide-static version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version
- name: Move Font
run: cp -r lucide-font packages/lucide-static/font
@@ -571,16 +145,10 @@ jobs:
- name: Publish
run: pnpm --filter lucide-static publish --no-git-checks
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-static-package-json
path: packages/lucide-static/package.json
lucide-font:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: pre-build
needs: pre-release
container: ericfennis/lucide-font:latest
steps:
- uses: actions/checkout@v3
@@ -598,12 +166,12 @@ jobs:
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
@@ -626,130 +194,26 @@ jobs:
name: lucide-font
path: lucide-font
lucide-flutter:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: [pre-build, lucide-font]
container:
image: cirrusci/flutter:latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
- uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('~/.pub-cache') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Setup credentials
run: |
mkdir -p ~/.pub-cache
cat <<EOF > ~/.pub-cache/credentials.json
{
"accessToken": "${{ secrets.GOOGLE_OAUTH_ACCESS_TOKEN }}",
"refreshToken": "${{ secrets.GOOGLE_OAUTH_REFRESH_TOKEN }}",
"idToken": "${{ secrets.GOOGLE_OAUTH_ID_TOKEN }}",
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": 1629835569218
}
EOF
- name: Get packages
run: flutter pub get
working-directory: packages/lucide-flutter
- name: List lucide-font folder
run: ls lucide-font
- name: Copy assets from lucide-font directory
run: |
mkdir packages/lucide-flutter/assets
cp lucide-font/lucide.ttf packages/lucide-flutter/assets/lucide.ttf
cp lucide-font/lucide-preview.html packages/lucide-flutter/assets/lucide-preview.html
- name: Generate exports file
run: |
dart tool/generate_fonts.dart assets/lucide-preview.html
flutter format .
working-directory: packages/lucide-flutter
- name: Test
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
- name: Flutter publish
run: flutter pub publish -f
working-directory: packages/lucide-flutter
- name: Upload pubspec.yaml
uses: actions/upload-artifact@v2
with:
name: lucide-flutter-pubspec-yaml
path: packages/lucide-flutter/pubspec.yaml
post-release:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs:
[
pre-build,
lucide,
lucide-react,
lucide-react-native,
lucide-vue,
lucide-vue-next,
lucide-angular,
lucide-svelte,
lucide-preact,
lucide-flutter,
lucide-font,
]
needs: [
pre-release,
lucide-font,
]
steps:
- 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
mv lucide-vue-next-package-json/package.json packages/lucide-vue-next/package.json
mv lucide-angular-package-json/package.json packages/lucide-angular/package.json
mv lucide-flutter-pubspec-yaml/pubspec.yaml packages/lucide-flutter/pubspec.yaml
- name: Commit package.jsons
run: |
git add packages/*/package.json packages/lucide-flutter/pubspec.yaml
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:main
- name: Zip font and icons
run: |
zip -r lucide-font-${{ needs.pre-build.outputs.VERSION }}.zip lucide-font
zip -r lucide-icons-${{ needs.pre-build.outputs.VERSION }}.zip icons
zip -r lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip lucide-font
zip -r lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip icons
- name: Release zip and fonts
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
with:
tag_name: v${{ needs.pre-build.outputs.VERSION }}
tag_name: ${{ needs.pre-release.outputs.VERSION }}
files: |
lucide-font-${{ needs.pre-build.outputs.VERSION }}.zip
lucide-icons-${{ needs.pre-build.outputs.VERSION }}.zip
lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip
lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip

5
.gitignore vendored
View File

@@ -17,6 +17,10 @@ packages/**/src/icons/*.js
packages/**/src/icons/*.ts
packages/**/src/icons/*.tsx
packages/**/src/aliases.ts
packages/**/src/dynamicIconImports.ts
packages/**/dynamicIconImports.js
packages/**/dynamicIconImports.d.ts
packages/**/dynamicIconImports.js.map
packages/**/LICENSE
categories.json
tags.json
@@ -30,6 +34,7 @@ docs/.vitepress/data/iconNodes
docs/.vitepress/data/iconMetaData.ts
docs/.vitepress/data/releaseMetaData.json
docs/.vitepress/data/releaseMetaData
docs/.vitepress/data/iconDetails
docs/.vitepress/data/relatedIcons.json
docs/.vercel
docs/.nitro

95
.vscode/svg.code-snippets vendored Normal file
View File

@@ -0,0 +1,95 @@
{
"Lucide SVG": {
"scope": "xml",
"description": "Base SVG with Lucide attributes.",
"prefix": [
"svg",
"lucide"
],
"body": [
"<svg",
" xmlns=\"http://www.w3.org/2000/svg\"",
" width=\"24\"",
" height=\"24\"",
" viewBox=\"0 0 24 24\"",
" fill=\"none\"",
" stroke=\"currentColor\"",
" stroke-width=\"2\"",
" stroke-linecap=\"round\"",
" stroke-linejoin=\"round\"",
">",
" $0",
"</svg>"
]
},
"Rectangle": {
"scope": "xml",
"description": "SVG `rect`angle, with Lucide defaults.",
"prefix": [
"rect",
"<rect"
],
"body": "<rect width=\"${1:20}\" height=\"${2:12}\" x=\"${3:2}\" y=\"${4:6}\" rx=\"${5|2,1|}\"/>"
},
"Square": {
"scope": "xml",
"description": "SVG square `rect`angle, with Lucide defaults.",
"prefix": [
"square",
"rect",
"<rect",
"tile"
],
"body": "<rect width=\"${1:18}\" height=\"$1\" x=\"${2:3}\" y=\"${3:$2}\" rx=\"${4|2,1|}\" />"
},
"Circle": {
"scope": "xml",
"description": "SVG `circle`, with Lucide defaults.",
"prefix": [
"circle",
"<circle"
],
"body": "<circle cx=\"${2:12}\" cy=\"${3:$2}\" r=\"${1|10,2,.5|}\" />"
},
"Ellipse": {
"scope": "xml",
"description": "SVG `ellipse`.",
"prefix": [
"ellipse",
"<ellipse"
],
"body": "<ellipse cx=\"${3:12}\" cy=\"${4:$3}\" rx=\"${1:10}\" ry=\"${2:$1}\" />"
},
"Path": {
"scope": "xml",
"description": "SVG custom `path`.",
"prefix": [
"path",
"<path",
"polyline",
"<polyline",
"polygon",
"<polygon"
],
"body": "<path d=\"${1|M,m|}$0\" />"
},
"Line": {
"scope": "xml",
"description": "SVG `path`, preffered to `line` in Lucide.",
"prefix": [
"line",
"<line",
"minus"
],
"body": "<path d=\"M${3:5} ${4:12}${1|h,v|}${2:14}\" />"
},
"Dot": {
"scope": "xml",
"description": "SVG small dot, within the Lucide guidelines.",
"prefix": [
"dot",
"."
],
"body": "<path d=\"M ${1:12} ${2:$1}h.01\" />"
}
}

View File

@@ -166,8 +166,8 @@ For more details, see the [documentation](https://github.com/lucide-icons/lucide
### Static (svg sprite, font, icons ..)
Assets:
[Font Files](https://github.com/lucide-icons/lucide/releases/tag/latest)
[SVG Files](https://github.com/lucide-icons/lucide/releases/tag/latest)
[Font Files](https://github.com/lucide-icons/lucide/releases/latest)
[SVG Files](https://github.com/lucide-icons/lucide/releases/latest)
[SVG Sprite](https://cdn.jsdelivr.net/npm/lucide-static@latest/sprite.svg)
NPM package
@@ -286,5 +286,5 @@ Thank you to all the people who contributed to Lucide!
## Sponsors
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
<img src="./site/public/vercel.svg" alt="Powered by Vercel" width="200" />
<img src="/docs/public/vercel.svg" alt="Powered by Vercel" width="200" />
</a>

View File

@@ -1,5 +1,5 @@
{
"$schema": "../category.schema.json",
"title": "Transportation",
"icon": "train"
"icon": "train-front"
}

View File

@@ -0,0 +1,11 @@
import { eventHandler, setResponseHeader } from 'h3'
import iconMetaData from '../../data/iconMetaData'
export default eventHandler((event) => {
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
return Object.fromEntries(
Object.entries(iconMetaData).map(([name, { categories }]) => [ name, categories ])
)
})

View File

@@ -0,0 +1,73 @@
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
import { Resvg, initWasm } from '@resvg/resvg-wasm';
import wasm from './loadWasm';
var initializedResvg = initWasm(wasm);
export default eventHandler(async (event) => {
const { params = {} } = event.context;
await initializedResvg;
const imageSize = 96;
const [iconSizeString, svgData] = params.data.split('/');
const iconSize = parseInt(iconSizeString, 10);
const data = svgData.slice(0, -4);
const src = Buffer.from(data, 'base64').toString('utf8');
const svg = (src.includes('<svg') ? src : `<svg>${src}</svg>`)
.replace(/(\r\n|\n|\r)/gm, '')
.replace(
/<svg[^>]*/,
`<svg
xmlns="http://www.w3.org/2000/svg"
width="${iconSize}"
height="${iconSize}"
viewBox="0 0 24 24"
fill="none"
stroke="#fff"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
`
);
const resvg = new Resvg(svg, { background: '#000' });
const pngData = resvg.render();
const pngBuffer = Buffer.from(pngData.asPng());
defaultContentType(event, 'image/svg+xml');
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
return `
<svg xmlns="http://www.w3.org/2000/svg" width="${imageSize}" height="${imageSize}" viewBox="0 0 ${imageSize} ${imageSize}">
<style>
@media screen and (prefers-color-scheme: light) {
#fallback-background { fill: transparent; }
}
@media screen and (prefers-color-scheme: dark) {
#fallback-background { fill: transparent; }
rect { fill: #fff; }
}
</style>
<mask id="mask">
<image
width="${imageSize}"
height="${imageSize}"
href="data:image/png;base64,${pngBuffer.toString('base64')}"
image-rendering="pixelated"
/>
</mask>
<rect
id="fallback-background"
width="${imageSize}"
height="${imageSize}" ry="${imageSize / 24}"
fill="#fff"
/>
<rect
width="${imageSize}"
height="${imageSize}"
fill="#000"
mask="url(#mask)"
/>
</svg>`;
});

View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import module from 'node:module';
/* WASM_IMPORT */
let wasm;
if (process.env.NODE_ENV === 'development') {
const require = module.createRequire(import.meta.url);
wasm = fs.readFileSync(require.resolve('@resvg/resvg-wasm/index_bg.wasm'));
} else {
wasm = resvg_wasm;
}
export default wasm;

View File

@@ -0,0 +1,44 @@
import { eventHandler, setResponseHeader, defaultContentType } from 'h3'
import { renderToString } from 'react-dom/server'
import { createElement } from 'react'
import SvgPreview from '../../../lib/SvgPreview/index.tsx';
import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon'
import { parseSync } from 'svgson';
export default eventHandler((event) => {
const { params } = event.context
const [strokeWidth, svgData] = params.data.split('/');
const data = svgData.slice(0, -4);
const src = Buffer.from(data, 'base64').toString('utf8');
const Icon = createLucideIcon(
'icon',
parseSync(src.includes('<svg') ? src : `<svg>${src}</svg>`).children.map(
({ name, attributes }) => [name, attributes]
) as IconNode
);
const svg = Buffer.from(
// We can't use jsx here, is not supported here by nitro.
renderToString(createElement(Icon, { strokeWidth }))
.replace(/fill\="none"/, 'fill="#fff"')
.replace(
/>/,
`><style>
@media screen and (prefers-color-scheme: light) {
svg { fill: transparent !important; }
}
@media screen and (prefers-color-scheme: dark) {
svg { stroke: #fff; fill: transparent !important; }
}
</style>`
)
).toString('utf8');
defaultContentType(event, 'image/svg+xml')
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
return svg
})

View File

@@ -8,6 +8,7 @@ export default eventHandler((event) => {
const withUniqueKeys = query.withUniqueKeys === 'true'
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
if (withUniqueKeys) {
return iconNodes

View File

@@ -38,6 +38,7 @@ export default eventHandler((event) => {
defaultContentType(event, 'image/svg+xml')
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
return svg

View File

@@ -3,6 +3,7 @@ import iconMetaData from '../../data/iconMetaData'
export default eventHandler((event) => {
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
return Object.fromEntries(
Object.entries(iconMetaData).map(([name, { tags }]) => [ name, tags ])

View File

@@ -1,13 +1,16 @@
import { fileURLToPath, URL } from 'node:url'
import path from 'path';
import { defineConfig } from 'vitepress'
import sidebar from './sidebar';
const title = "Lucide";
const socialTitle = "Lucide Icons";
const description = "Beautiful & consistent icon toolkit made by the community."
// https://vitepress.dev/reference/site-config
export default defineConfig({
title,
description,
cleanUrls: true,
title: "Lucide",
description: "Beautiful & consistent icon toolkit made by the community.",
outDir: '.vercel/output/static',
vite: {
resolve: {
@@ -25,17 +28,70 @@ export default defineConfig({
)
}
]
}
},
},
head: [
[
'script',
{
src: 'https://plausible.io/js/script.js',
'data-domain': 'lucide.dev',
defer: ''
}
],
[ 'script', {
src: 'https://analytics.lucide.dev/js/script.js',
'data-domain': 'lucide.dev',
defer: ''
}],
[ 'meta', {
property:"og:locale",
content:"en_US"
}],
[ 'meta', {
property:"og:type",
content:"website"
}],
[ 'meta', {
property:"og:site_name",
content: title,
}],
[ 'meta', {
property:"og:title",
content: socialTitle,
}],
[ 'meta', {
property:"og:description",
content: description
}],
[ 'meta', {
property:"og:url",
content:"https://lucide.dev"
}],
[ 'meta', {
property:"og:image",
content: "https://lucide.dev/og.png"
}],
[ 'meta', {
property:"og:image:width",
content:"1200"
}],
[ 'meta', {
property:"og:image:height",
content:"630"
}],
[ 'meta', {
property:"og:image:type",
content:"image/png"
}],
[ 'meta', {
property:"twitter:card",
content:"summary_large_image"
}],
[ 'meta', {
property:"twitter:title",
content: socialTitle,
}],
[ 'meta', {
property:"twitter:description",
content: description
}],
[ 'meta', {
property:"twitter:image",
content:"https://lucide.dev/og.png"
}],
],
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
@@ -44,7 +100,7 @@ export default defineConfig({
dark: '/logo.dark.svg'
},
nav: [
{ text: 'Icons', link: '/icons/index.md' },
{ text: 'Icons', link: '/icons/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Packages', link: '/packages' },
{ text: 'License', link: '/license' },
@@ -61,5 +117,8 @@ export default defineConfig({
editLink: {
pattern: 'https://github.com/lucide-icons/lucide/edit/main/docs/:path'
},
},
sitemap: {
hostname: 'https://lucide.dev/'
}
})

View File

@@ -4,7 +4,7 @@ import { getPaths, assert } from './utils';
const Grid = ({
radius,
fill,
fill = '#fff',
...props
}: {
strokeWidth: number;
@@ -12,6 +12,7 @@ const Grid = ({
} & PathProps<'stroke', 'strokeWidth'>) => (
<g className="svg-preview-grid-group" strokeLinecap="butt" {...props}>
<rect
className="svg-preview-grid-rect"
width={24 - props.strokeWidth}
height={24 - props.strokeWidth}
x={props.strokeWidth / 2}
@@ -207,7 +208,12 @@ const SvgPreview = React.forwardRef<
>(({ src, children, showGrid = false, ...props }, ref) => {
const paths = typeof src === 'string' ? getPaths(src) : src;
const darkModeCss = `@media screen and (prefers-color-scheme: dark) {
const darkModeCss = `@media screen and (prefers-color-scheme: light) {
.svg-preview-grid-rect { fill: none }
}
@media screen and (prefers-color-scheme: dark) {
.svg-preview-grid-rect { fill: none }
.svg
.svg-preview-grid-group,
.svg-preview-radii-group,
.svg-preview-shadow-mask-group,

View File

@@ -8,14 +8,6 @@ const DATE_OF_FORK = '2020-06-08T16:39:52+0100';
const directory = path.join(process.cwd(), "../icons");
export function getAllNames() {
const fileNames = fs.readdirSync(directory).filter((file) => path.extname(file) === '.json');
return fileNames
.filter((fileName) => fs.existsSync(directory + '/' + path.basename(fileName, '.json') + '.svg'))
.map((fileName) => path.basename(fileName, '.json'));
}
export interface GetDataOptions {
withChildKeys?: boolean
}
@@ -49,7 +41,7 @@ export async function getData(name: string) {
}
export async function getAllData(): Promise<{ name: string, iconNode: IconNodeWithKeys}[]> {
const names = getAllNames();
const names = Object.keys(iconNodes);
return Promise.all(names.map((name) => getData(name)));
}

View File

@@ -0,0 +1,55 @@
<script setup lang="ts">
import {onMounted, ref} from 'vue';
import {useFloating, offset, shift} from '@floating-ui/vue';
const reference = ref(null);
const tooltip = ref(null);
const middleware = ref([shift(), offset(8)]);
const { floatingStyles, update } = useFloating(reference, tooltip, {
middleware,
transform: false
});
defineProps<{
title: string
}>()
onMounted(() => {
update()
});
</script>
<template>
<span ref="reference" class="reference">
<slot/>
</span>
<div ref="tooltip" class="tooltip" :style="floatingStyles">
{{title}}
</div>
</template>
<style scoped>
.reference:hover + .tooltip{
opacity: 1;
transform: scale(1);
}
.tooltip {
display: block;
font-size: 12px;
line-height: 20px;
transform: scale(0.9);
font-weight: 400;
background: var(--vp-c-brand-dark);
color: white;
z-index: 10;
white-space: nowrap;
padding: 2px 8px;
border-radius: 4px;
box-shadow: var(--vp-shadow-1);
opacity: 0;
pointer-events: none;
transition: cubic-bezier(0.19, 1, 0.22, 1) .2s;
transition-property: opacity, transform;
}
</style>

View File

@@ -64,7 +64,7 @@ watch(absoluteStrokeWidth, (enabled) => {
<ResetButton @click="resetStyle"></ResetButton>
</h2>
<p class="copy">
Lucide has a lot of customization options to match the icons with you UI.
Lucide has a lot of customization options to match the icons with your UI.
</p>
<div class="customizer">

View File

@@ -3,19 +3,9 @@ import { ref } from 'vue';
import ButtonMenu from '../base/ButtonMenu.vue'
import { useIconStyleContext } from '../../composables/useIconStyle';
import useConfetti from '../../composables/useConfetti';
import getSVGIcon from '../../utils/getSVGIcon';
import downloadData from '../../utils/downloadData';
const allowedAttrs = [
'xmlns',
'width',
'height',
'viewBox',
'fill',
'stroke',
'stroke-width',
'stroke-linecap',
'stroke-linejoin',
'class',
]
const downloadText = 'Download!'
const copiedText = 'Copied!'
const confettiText = ref(copiedText)
@@ -28,24 +18,6 @@ const { size } = useIconStyleContext()
const { animate, confetti } = useConfetti()
function getSVGIcon() {
const svg = document.querySelector('#previewer svg')
if (!svg) return
const clonedSvg = svg.cloneNode(true) as SVGElement
// Filter out attributes that are not allowed in SVGs
for (const attr of Array.from(clonedSvg.attributes)) {
if (!allowedAttrs.includes(attr.name)) {
clonedSvg.removeAttribute(attr.name)
}
}
const svgString = new XMLSerializer().serializeToString(clonedSvg)
return svgString
}
function copySVG() {
confettiText.value = copiedText
const svgString = getSVGIcon()
@@ -70,11 +42,7 @@ function downloadSVG() {
confettiText.value = downloadText
const svgString = getSVGIcon()
const link = document.createElement('a');
link.download = `${props.name}.svg`;
link.href = `data:image/svg+xml;base64,${btoa(svgString)}`
link.click();
downloadData(`${props.name}.svg`, `data:image/svg+xml;base64,${btoa(svgString)}`)
confetti()
}
@@ -91,12 +59,7 @@ function downloadPNG() {
image.src = `data:image/svg+xml;base64,${btoa(svgString)}`;
image.onload = function() {
ctx.drawImage(image, 0, 0);
const link = document.createElement('a');
link.download = `${props.name}.png`;
link.href = canvas.toDataURL('image/png')
link.click();
downloadData(`${props.name}.png`, canvas.toDataURL('image/png'))
confetti()
}
}

View File

@@ -1,30 +1,38 @@
<script setup lang="ts">
import type { IconEntity } from '../../types'
import { computed, ref, watch } from 'vue'
import createLucideIcon from 'lucide-vue-next/src/createLucideIcon';
import IconButton from '../base/IconButton.vue';
import IconContributors from './IconContributors.vue';
import IconPreview from './IconPreview.vue';
import { x, expand } from '../../../data/iconNodes'
import { useRouter } from 'vitepress';
import IconInfo from './IconInfo.vue';
import Badge from '../base/Badge.vue';
import type { IconEntity } from '../../types'
import { computed, ref, watch } from 'vue'
import createLucideIcon from 'lucide-vue-next/src/createLucideIcon';
import IconButton from '../base/IconButton.vue';
import IconContributors from './IconContributors.vue';
import IconPreview from './IconPreview.vue';
import { x, expand } from '../../../data/iconNodes'
import { useRouter } from 'vitepress';
import IconInfo from './IconInfo.vue';
import Badge from '../base/Badge.vue';
import { computedAsync } from '@vueuse/core';
const props = defineProps<{
icon: IconEntity
}>()
const props = defineProps<{
iconName: string
}>()
const emit = defineEmits(['close'])
const isOpen = computed(() => !!props.icon)
function onClose() {
emit('close')
const icon = computedAsync<IconEntity | null>(async () => {
if (props.iconName) {
return (await import(`../../../data/iconDetails/${props.iconName}.ts`)).default as IconEntity
}
return null
}, null)
const { go } = useRouter()
const emit = defineEmits(['close'])
const isOpen = computed(() => !!icon.value)
const CloseIcon = createLucideIcon('Close', x)
const Expand = createLucideIcon('Expand', expand)
function onClose() {
emit('close')
}
const { go } = useRouter()
const CloseIcon = createLucideIcon('Close', x)
const Expand = createLucideIcon('Expand', expand)
</script>
<template>
@@ -109,9 +117,8 @@
}
.icon-info {
padding: 0 24px;
padding-left: 24px;
flex-basis: 100%;
}
.icon-tags {

View File

@@ -43,5 +43,6 @@ function setActiveIcon(name: string) {
.icon {
aspect-ratio: 1/1;
position: relative;
}
</style>

View File

@@ -17,7 +17,7 @@ const { go } = useRouter()
const { page } = useData()
const tags = computed(() => {
if (!props.icon) return []
if (!props.icon || !props?.icon?.tags) return []
return props.icon.tags.join(' • ')
})
</script>
@@ -27,9 +27,11 @@ const tags = computed(() => {
<IconDetailName class="icon-name">
{{ icon.name }}
</IconDetailName>
<p class="icon-tags">
{{ tags }}
</p>
<div class="tags-scroller" v-if="tags.length">
<p class="icon-tags horizontal-scroller">
{{ tags }}
</p>
</div>
<div class="group">
<Badge
v-for="category in icon.categories"
@@ -72,9 +74,61 @@ const tags = computed(() => {
font-size: 16px;
color: var(--vp-c-text-2);
font-weight: 500;
margin-top: 0;;
margin-bottom: 16px;
line-height: 28px;
white-space: nowrap;
position: absolute;
top: 0;
left: 0;
right: 0;
margin-top: 0;
margin-bottom: 0;
}
.tags-scroller {
position: relative;
max-width: 100%;
width: 100%;
height: 28px;
padding: 8px 0 16px;
margin-bottom: 16px;
margin-top: 8px;
align-items: center;
--gradient-background: var(--tags-gradient-background, var(--vp-c-bg-elv))
}
.horizontal-scroller {
overflow-x: scroll;
/* Hide Scrollbar */
-ms-overflow-style: none;
scrollbar-width: none;
scrollbar-width: thin; /* can also be normal, or none, to not render scrollbar */
scrollbar-color: currentColor transparent; /* foreground background */
}
.horizontal-scroller::-webkit-scrollbar {
width: 0;
display: none
}
.horizontal-scroller::-webkit-scrollbar-track {
background: transparent
}
.horizontal-scroller::-webkit-scrollbar-thumb {
background: transparent;
border: none
}
.tags-scroller::after {
content: '';
position: absolute;
bottom: 0;
width: 32px;
height: 100%;
/* Background Gradient left to right */
background: linear-gradient(to right, rgba(255,255,255,0) 0%,var(--gradient-background) 100%);
right: 0;
pointer-events: none;
}
.buttons {

View File

@@ -2,13 +2,17 @@
import createLucideIcon from 'lucide-vue-next/src/createLucideIcon';
import { useMediaQuery } from '@vueuse/core';
import { useRouter } from 'vitepress';
import getSVGIcon from '../../utils/getSVGIcon';
import useConfetti from '../../composables/useConfetti';
import Tooltip from '../base/Tooltip.vue';
const downloadText = 'Download!'
const copiedText = 'Copied!'
export type IconNode = [elementName: string, attrs: Record<string, string>][]
const props = defineProps<{
name: string;
// tags: string[];
// categories: string[];
iconNode: IconNode;
active: boolean;
customizable?: boolean;
@@ -20,40 +24,65 @@ const emit = defineEmits(['setActiveIcon'])
const { go } = useRouter()
const showOverlay = useMediaQuery('(min-width: 860px)');
const { animate, confetti, confettiText } = useConfetti()
const icon = createLucideIcon(props.name, props.iconNode)
function navigateToIcon() {
async function navigateToIcon(event) {
if (event.shiftKey) {
event.preventDefault()
const svgString = getSVGIcon(event.target.firstChild, {
class: `lucide lucide-${props.name}`,
})
await navigator.clipboard.writeText(svgString)
confettiText.value = copiedText
confetti()
return
}
if(props.overlayMode && showOverlay.value) {
event.preventDefault()
window.history.pushState({}, '', `/icons/${props.name}`)
emit('setActiveIcon', props.name)
}
else {
event.preventDefault()
go(`/icons/${props.name}`)
}
}
</script>
<template>
<button
class="icon-button"
@click="navigateToIcon"
:class="{ 'active' : active }"
:data-title="name"
:aria-label="name"
:href="`/icons/${props.name}`"
>
<KeepAlive>
<component
v-if="!hideIcon"
:is="icon"
class="lucide-icon"
:class="{ customizable }"
/>
</KeepAlive>
</button>
<Tooltip :title="name">
<a
class="icon-button confetti-button vp-raw"
@click="navigateToIcon"
:class="{ active, animate }"
:aria-label="name"
:href="`/icons/${props.name}`"
:data-confetti-text="confettiText"
ref="ref"
>
<KeepAlive>
<component
v-if="!hideIcon"
:is="icon"
class="lucide-icon"
:class="{
customizable,
}"
/>
</KeepAlive>
</a>
</Tooltip>
</template>
<style src="./confetti.css" />
<style scoped>
.icon-button {
display: inline-block;
@@ -72,35 +101,13 @@ function navigateToIcon() {
color: var(--vp-c-text-1);
}
.icon-button:hover:before {
opacity: 1;
transform: translate(-50%, 48px) scale(1);
.confetti-button:before,
.confetti-button:after {
z-index: 100;
}
.icon-button:before {
content: attr(data-title);
display: block;
font-size: 12px;
line-height: 20px;
margin-left: 27px;
transform: translate(-50%, 48px) scale(0.9);
font-weight: 400;
position: absolute;
background: var(--vp-c-brand-dark);
color: white;
z-index: 10;
white-space: nowrap;
padding: 2px 8px;
border-radius: 4px;
box-shadow: var(--vp-shadow-1);
opacity: 0;
pointer-events: none;
transition: cubic-bezier(0.19, 1, 0.22, 1) .2s;
transition-property: opacity, transform;
/* max-width: calc((32px * 2) + 56px); */
overflow: hidden;
white-space: pre-wrap;
word-break: break-word;
.confetti-button:before {
line-height: 80px;
}
.icon-button:active {
@@ -139,6 +146,7 @@ function navigateToIcon() {
.lucide-icon {
margin: auto;
pointer-events: none;
}
.lucide-icon.customizable {
will-change: width, height, stroke-width, stroke;

View File

@@ -6,6 +6,9 @@ import InputSearch from '../base/InputSearch.vue'
import useSearchInput from '../../composables/useSearchInput'
import StickyBar from './StickyBar.vue'
import IconsCategory from './IconsCategory.vue'
import { useFetch } from '@vueuse/core'
import useFetchTags from '../../composables/useFetchTags'
import useFetchCategories from '../../composables/useFetchCategories'
const props = defineProps<{
icons: IconEntity[]
@@ -22,7 +25,26 @@ function setActiveIconName(name: string) {
activeIconName.value = name
}
const searchResults = useSearch(searchQuery, props.icons, [
const { execute: fetchTags, data: tags } = useFetchTags()
const { execute: fetchCategories, data: categoriesMap } = useFetchCategories()
const mappedIcons = computed(() => {
if(tags.value == null) {
return props.icons
}
return props.icons.map((icon) => {
const iconTags = tags.value[icon.name]
const iconCategories = categoriesMap.value?.[icon.name] ?? []
return {
...icon,
tags: iconTags,
categories: iconCategories,
}
})
})
const searchResults = useSearch(searchQuery, mappedIcons, [
{ name: 'name', weight: 2 },
{ name: 'tags', weight: 1 },
])
@@ -37,7 +59,6 @@ const categories = computed(() => {
return iconCategories?.includes(name)
})
const searchedCategoryIcons = isSearching
? categoryIcons.filter(icon => searchResults.value.some((item) => item?.name === icon?.name))
: categoryIcons;
@@ -51,9 +72,14 @@ const categories = computed(() => {
.filter(({ icons }) => icons.length)
})
const activeIcon = computed(() =>
props.icons?.find((icon) => icon.name === activeIconName.value)
)
function onFocusSearchInput() {
if (tags.value == null) {
fetchTags()
}
if (categoriesMap.value == null) {
fetchCategories()
}
}
const NoResults = defineAsyncComponent(() =>
import('./NoResults.vue')
@@ -71,6 +97,7 @@ const IconDetailOverlay = defineAsyncComponent(() =>
v-model="searchQuery"
class="input-wrapper"
ref="searchInput"
@focus="onFocusSearchInput"
/>
</StickyBar>
<NoResults
@@ -87,7 +114,7 @@ const IconDetailOverlay = defineAsyncComponent(() =>
/>
<IconDetailOverlay
v-if="activeIconName != null"
:icon="activeIcon"
:iconName="activeIconName"
@close="setActiveIconName('')"
/>
</template>

View File

@@ -8,6 +8,8 @@ import useSearch from '../../composables/useSearch'
import EndOfPage from '../base/EndOfPage.vue'
import useSearchInput from '../../composables/useSearchInput'
import StickyBar from './StickyBar.vue'
import useFetchTags from '../../composables/useFetchTags'
import useFetchCategories from '../../composables/useFetchCategories'
const props = defineProps<{
icons: IconEntity[]
@@ -22,7 +24,7 @@ const isSmallScreen = useMediaQuery('(min-width: 640px)');
const pageSize = computed(() => {
if(isExtraLargeScreen.value) {
return 16 * 16;
return 16 * 20;
}
if(isLargeScreen.value) {
return 16 * 12;
@@ -38,8 +40,28 @@ const pageSize = computed(() => {
return 10 * 5;
})
const { execute: fetchTags, data: tags } = useFetchTags()
const { execute: fetchCategories, data: categories } = useFetchCategories()
const mappedIcons = computed(() => {
if(tags.value == null) {
return props.icons
}
return props.icons.map((icon) => {
const iconTags = tags.value[icon.name]
const iconCategories = categories.value?.[icon.name] ?? []
return {
...icon,
tags: iconTags,
categories: iconCategories,
}
})
})
const { searchInput, searchQuery, searchQueryThrottled } = useSearchInput()
const searchResults = useSearch(searchQueryThrottled, props.icons, [
const searchResults = useSearch(searchQueryThrottled, mappedIcons, [
{ name: 'name', weight: 3 },
{ name: 'tags', weight: 2 },
{ name: 'categories', weight: 1 },
@@ -58,12 +80,19 @@ function setActiveIconName(name: string) {
activeIconName.value = name
}
const activeIcon = computed(() => props.icons.find((icon) => icon.name === activeIconName.value))
watch(searchQueryThrottled, (searchString) => {
currentPage.value = 1
})
function onFocusSearchInput() {
if (tags.value == null) {
fetchTags()
}
if (categories.value == null) {
fetchCategories()
}
}
const NoResults = defineAsyncComponent(() =>
import('./NoResults.vue')
)
@@ -81,6 +110,7 @@ const IconDetailOverlay = defineAsyncComponent(() =>
v-model="searchQuery"
ref="searchInput"
class="input-wrapper"
@focus="onFocusSearchInput"
/>
</StickyBar>
<NoResults
@@ -97,7 +127,7 @@ const IconDetailOverlay = defineAsyncComponent(() =>
<EndOfPage @end-of-page="next" class="bottom-page"/>
<IconDetailOverlay
v-if="activeIconName != null"
:icon="activeIcon"
:iconName="activeIconName"
@close="setActiveIconName('')"
/>
</template>

View File

@@ -32,8 +32,8 @@ useEventListener(document, 'mousemove', (mouseEvent) => {
No icons found for '{{ searchQuery }}'
</h2>
<VPButton text="Clear your search and try again" theme="alt" @click="$emit('clear')"/>
or
<VPButton text="Check if someone has already requested this icon"
<span class="text-divider">or</span>
<VPButton text="Search on Github issues"
theme="alt"
:href="`https://github.com/lucide-icons/lucide/issues?q=is%3Aopen+${searchQuery}`"
target="_blank"
@@ -74,4 +74,10 @@ useEventListener(document, 'mousemove', (mouseEvent) => {
margin-bottom: 32px;
text-align: center;
}
.text-divider {
margin: 12px 0;
font-size: 16px;
color: var(--vp-c-neutral);
}
</style>

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { shallowRef, type Ref, watch } from 'vue'
import { shallowRef, type Ref, watch, computed } from 'vue'
import { useCssVar, syncRef } from '@vueuse/core'
import { useIconStyleContext } from '../../composables/useIconStyle'
import { STYLE_DEFAULTS, useIconStyleContext } from '../../composables/useIconStyle'
import RangeSlider from '../base/RangeSlider.vue'
import InputField from '../base/InputField.vue'
import ColorPicker from '../base/ColorPicker.vue'
@@ -19,7 +19,7 @@ const colorCssVar = useCssVar(
'--customize-color',
props.rootEl?.value ?? documentRef.value,
{
initialValue: 'default'
initialValue: `${STYLE_DEFAULTS.color}`
}
)
@@ -27,7 +27,7 @@ const strokeWidthCssVar = useCssVar(
'--customize-strokeWidth',
props.rootEl?.value ?? documentRef.value,
{
initialValue: '2'
initialValue: `${STYLE_DEFAULTS.strokeWidth}`
}
)
@@ -35,7 +35,7 @@ const sizeCssVar = useCssVar(
'--customize-size',
props.rootEl?.value ?? documentRef.value,
{
initialValue: '24'
initialValue: `${STYLE_DEFAULTS.size}`
}
)
@@ -44,9 +44,9 @@ syncRef(strokeWidth, strokeWidthCssVar, { direction: 'ltr' })
syncRef(size, sizeCssVar, { direction: 'ltr' })
function resetStyle () {
color.value = 'currentColor'
strokeWidth.value = 2
size.value = 24
color.value = STYLE_DEFAULTS.color
strokeWidth.value = STYLE_DEFAULTS.strokeWidth
size.value = STYLE_DEFAULTS.size
}
watch(absoluteStrokeWidth, (enabled) => {
@@ -54,10 +54,18 @@ watch(absoluteStrokeWidth, (enabled) => {
htmlEl.classList.toggle('absolute-stroke-width', enabled)
})
const customizingActive = computed(() => {
return color.value !== STYLE_DEFAULTS.color
|| strokeWidth.value !== STYLE_DEFAULTS.strokeWidth
|| size.value !== STYLE_DEFAULTS.size
})
</script>
<template>
<div class="customizer-card">
<div class="customizer-card" :class="{ customized: customizingActive }">
<div class="card-header">
<h2 class="card-title">
Customizer
@@ -142,6 +150,12 @@ watch(absoluteStrokeWidth, (enabled) => {
margin-bottom: 24px;
position: relative;
z-index: 0;
border: 1px solid transparent;
transition: border-color .4s ease-in-out;
}
.customizer-card.customized {
border-color: var(--vp-c-brand);
}
.color-picker {

View File

@@ -2,6 +2,7 @@ import { ref } from "vue";
export default function useConfetti() {
const animate = ref(false)
const confettiText = ref('confetti!')
function confetti() {
animate.value = true;
@@ -13,6 +14,7 @@ export default function useConfetti() {
return {
animate,
confetti
confetti,
confettiText
}
}

View File

@@ -0,0 +1,12 @@
import { useFetch } from "@vueuse/core"
const useFetchCategories = () => useFetch<Record<string, string[]>>(
`${import.meta.env.DEV ? 'http://localhost:3000' : ''}/api/categories`,
{
immediate:
typeof window !== 'undefined'
&& new URLSearchParams(window.location.search).has('search'),
}
).json()
export default useFetchCategories

View File

@@ -0,0 +1,12 @@
import { useFetch } from "@vueuse/core"
const useFetchTags = () => useFetch<Record<string, string[]>>(
`${import.meta.env.DEV ? 'http://localhost:3000' : ''}/api/tags`,
{
immediate:
typeof window !== 'undefined'
&& new URLSearchParams(window.location.search).has('search'),
}
).json()
export default useFetchTags

View File

@@ -10,8 +10,16 @@ interface IconSizeContext {
size: Ref<number>
strokeWidth: Ref<number>
color: Ref<string>
absoluteStrokeWidth: Ref<boolean>
}
export const STYLE_DEFAULTS = {
size: 24,
strokeWidth: 2,
color: 'currentColor',
absoluteStrokeWidth: false,
};
export const iconStyleContext = {
size: ref(24),
strokeWidth: ref(2),

View File

@@ -1,20 +1,22 @@
import Fuse from 'fuse.js';
import { shallowRef, computed, Ref } from 'vue';
const useSearch = <T>(query: Ref<string>, collection: T[], keys: Fuse.FuseOptionKey<T>[] = []) => {
const useSearch = <T>(query: Ref<string>, collection: Ref<T[]>, keys: Fuse.FuseOptionKey<T>[] = []) => {
const index = shallowRef(
new Fuse(collection, {
new Fuse(collection.value, {
threshold: 0.2,
keys,
})
)
const results = computed(() => {
index.value.setCollection(collection.value);
if (query.value) {
return index.value.search(query.value).map((result) => result.item);
}
return collection;
return collection.value;
});
return results;

View File

@@ -11,12 +11,16 @@ const useSearchInput = () => {
|| ''
)
)
const searchQueryThrottled = refThrottled(searchQuery, 200)
const searchQueryThrottled = refThrottled(searchQuery, 400)
watch(searchQueryThrottled, (searchString) => {
const newUrl = new URL(window.location.href);
newUrl.searchParams.set('search', searchString);
if(searchString === '') {
newUrl.searchParams.delete('search');
} else {
newUrl.searchParams.set('search', searchString);
}
nextTick(() => {
window.history.replaceState({}, '', newUrl)

View File

@@ -0,0 +1,6 @@
export default function downloadData(filename:string, data:string) {
const link = document.createElement('a');
link.download = filename;
link.href = data
link.click();
}

View File

@@ -0,0 +1,34 @@
const allowedAttrs = [
'xmlns',
'width',
'height',
'viewBox',
'fill',
'stroke',
'stroke-width',
'stroke-linecap',
'stroke-linejoin',
'class',
]
export default function getSVGIcon(element?: HTMLElement, attrs?: Record<string, string>) {
const svg = element ?? document.querySelector('#previewer svg')
if (!svg) return
const clonedSvg = svg.cloneNode(true) as SVGElement
// Filter out attributes that are not allowed in SVGs
for (const attr of Array.from(clonedSvg.attributes)) {
if (!allowedAttrs.includes(attr.name)) {
clonedSvg.removeAttribute(attr.name)
}
}
for (const [key, value] of Object.entries(attrs ?? {})) {
clonedSvg.setAttribute(key, value)
}
const svgString = new XMLSerializer().serializeToString(clonedSvg)
return svgString
}

View File

@@ -1,10 +1,18 @@
declare module "*.vue" {
import Vue from "vue";
declare module '*.vue' {
import Vue from 'vue';
export default Vue;
}
declare module "*.data.ts" {
declare module '*.data.ts' {
const data: any;
export { data };
}
declare module '*.wasm' {}
declare const resvg_wasm: RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
declare module 'node:module' {
function createRequire(filename: string): NodeRequire;
}

View File

@@ -2,60 +2,113 @@
title: Icon Design Guide
---
# Icon Design Principles
## Icon Design Principles
Here are rules that should be followed to keep quality and consistency when making icons for Lucide.
## Summary of the rules we have
1. Icons must be designed on a **24 by 24 pixels** canvas.
2. Icons must have at least **1 pixel padding** within the canvas.
3. Icons must have a **stroke width of 2 pixels**.
4. Icons must use **round joins**.
5. Icons must use **round caps**.
6. Icons must use **centered strokes**.
7. Shapes (such as rectangles) in icons must have **border radius of 2 pixels**.
8. Distinct elements must have **2 pixels of spacing between each other**.
## The Rules Visualized
### 1. Icons must be designed on a 24 by 24 pixels canvas.
### 1. Icons must be designed on a **24 by 24 pixels** canvas.
![24px-24px](../../images/24px-24px.svg?raw=true "24px-24px")
### 2. Icons must have at least 1 pixel padding within the canvas.
### 2. Icons must have at least **1 pixel padding** within the canvas.
![1px-padding](../../images/1px-padding.svg?raw=true "1px-padding")
### 3. Icons must have a stroke width of 2 pixels.
### 3. Icons must have a **stroke width of 2 pixels**.
![2px-stroke](../../images/2px-stroke.svg?raw=true "2px-stroke")
### 4. Icons must use round joins.
### 4. Icons must use **round joins**.
![round-joints](../../images/round-joints.svg?raw=true "round-joints")
### 5. Icons must use round caps.
### 5. Icons must use **round caps**.
![round-caps](../../images/round-caps.svg?raw=true "round-caps")
### 6. Icons must use centered strokes.
### 6. Icons must use **centered strokes**.
![centered-strokes](../../images/centered-strokes.svg?raw=true "centered-strokes")
### 7. Shapes (such as squares) in icons must have border radius of 2 pixels.
### 7. Shapes (such as rectangles) must have a **border radius of**
#### A. **2 pixels** if they are at least 8 pixels in size
![2px-border-radius](../../images/2px-border-radius.svg?raw=true "2px-border-radius")
### 8. Distinct elements must have 2 pixels of spacing between each other.
#### B. **1 pixel** if they are smaller than 8 pixels in size
![1px-border-radius](../../images/1px-border-radius.svg?raw=true "1px-border-radius")
### 8. Distinct elements must have **2 pixels of spacing between each other**
![2px-element-spacing](../../images/2px-element-spacing.svg?raw=true "2px-element-spacing")
### 9. Icons should have a similar optical volume to `circle` and `square`.
![optical-volume-ideal](../../images/optical-volume-ideal.svg?raw=true "optical-volume-ideal")
![optical-volume-low](../../images/optical-volume-low.svg?raw=true "optical-volume-low")
![optical-volume-high](../../images/optical-volume-high.svg?raw=true "optical-volume-high")
**Tip:** place your icon next to circle or square and blur them both; your icon should not feel much darker than the base shape.
### 10. Icons should be visually centered by their center of gravity.
![visually-centered](../../images/visually-centered.svg?raw=true "visually-centered")
![visually-centered-bad](../../images/visually-centered-bad.svg?raw=true "visually-centered-bad")
**Tip:** place your icon both above/below and next to the square or circle icon and check if it feels off center. Symmetrical icons should always be aligned to the center.
### 11. Icons should have similar visual density and level of detail.
![density-ideal](../../images/density-ideal.svg?raw=true "density-ideal")
![density-high](../../images/density-high.svg?raw=true "density-high")
**Tip:** try to make abstractions to dense elements. Blur your icon, and when blurred it should not feel overly dark.
### 12. Continuous curves should join smoothly.
![curvature-smooth](../../images/curvature-smooth.svg?raw=true "curvature-smooth")
![curvature-uneven](../../images/curvature-uneven.svg?raw=true "curvature-uneven")
**Tip:** make sure to use arcs or quadratic curves, when using cubic curves control points should have mirrored angles for smooth curves.
### 13. Icons should aim to be pixel perfect so that they will be sharp on low DPI displays.
![pixel-perfection-ideal](../../images/pixel-perfection-ideal.svg?raw=true "pixel-perfection-ideal")
![pixel-perfection-bad](../../images/pixel-perfection-bad.svg?raw=true "pixel-perfection-bad")
**Tip:** whenever possible align elements and arc centers to the grid.
## Naming conventions
1. Icon names use lower kebab case.\
For example: `arrow-up` instead of `Arrow Up`.
2. Icon names use International English names, as opposed to local variants.\
For example: `color` instead of `colour`.
3. Icons should be named for what they depict rather than their use case or what they represent.\
For example: `floppy-disk` instead of `save` and `circle-slash` rather than `ban`.
4. Icons that are part of a group are named `<group>-<variant>`.\
For example: `badge-plus` is based on `badge`.
5. Icon names for alternate icons should represent what makes the alternate unique instead of being numbered.\
For example: `send-horizontal` instead of `send-2`.
6. Names containing numerals are not allowed, unless the number itself is represented in the icon.\
For example: `arrow-down-0-to-1` contains both numerals.
## Code Conventions
Before an icon is added to the library, we like to have readable and optimized svg code.
Never use [`<use>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use). While it may sometimes seem like a good way to optimize file size, there's no way to ensure that the referenced element IDs will be unique once the SVGs are embedded in HTML documents.
Before an icon is added to the library, we like to have readable and optimized SVG code.
### Global Attributes
@@ -79,11 +132,26 @@ For each icon these attributes are applied, corresponding to the above rules.
### Minify paths
Code of paths can get really big.
To reduce file size we like to minify the code.
We recommend to use the [SVGOMG](https://jakearchibald.github.io/svgomg/) to minify paths.
The code of paths can sometimes get quite large. To reduce file size we like to minify the code.
We recommend to use the [SVGOMG](https://jakearchibald.github.io/svgomg/) to minify paths to 2 points of precision.
### JSON metadata descriptor
### Allowed elements
SVG files may only contain simple path and shape elements, which may not have any attributes other than sizing and spacing.\
In practice only the following elements and attributes are allowed:
* `<path d>`
* `<line x1 x2>`
* `<polygon points>`
* `<polyline points>`
* `<circle cx cy r>`
* `<ellipse cx cy rx ry>`
* `<rect x y width height rx>`
This also means that no transforms, filters, fills or explicit strokes are allowed.
Never use [`<use>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use). While it may sometimes seem like a good way to optimize file size, there's no way to ensure that the referenced element IDs will be unique once the SVGs are embedded in HTML documents.
## JSON metadata descriptor
Each icon added must also come with a matching JSON file listing tags and categories for the icon.
Please use the following template:
@@ -91,6 +159,10 @@ Please use the following template:
```json
{
"$schema": "../icon.schema.json",
"contributors": [
"github-username",
"another-github-username"
],
"tags": [
"foo",
"bar"

View File

@@ -28,7 +28,7 @@ For more details, see the [documentation](packages/lucide.md).
## React
Implementation of the lucide icon library for react applications.
Implementation of the lucide icon library for React applications.
::: code-group
@@ -47,84 +47,138 @@ npm install lucide-react
:::
For more details, see the [documentation](packages/lucide-react.md).
For React Native use the `lucide-react-native` package.
## Vue 2
## Vue
Implementation of the lucide icon library for vue applications.
Implementation of the lucide icon library for Vue applications.
```bash
yarn add lucide-vue
::: code-group
```sh [pnpm]
pnpm install lucide-vue-next
```
or
```sh
npm install lucide-vue
```
For more details, see the [documentation](packages/lucide-vue.md).
## Vue 3
Implementation of the lucide icon library for vue applications.
```bash
```sh [yarn]
yarn add lucide-vue-next
```
or
```sh
```sh [npm]
npm install lucide-vue-next
```
:::
For more details, see the [documentation](packages/lucide-vue-next.md).
For Vue 2 use the `lucide-vue` package.
## Svelte
Implementation of the lucide icon library for vue applications.
Implementation of the lucide icon library for Svelte applications.
```bash
::: code-group
```sh [pnpm]
pnpm install lucide-svelte
```
```sh [yarn]
yarn add lucide-svelte
```
or
```sh
```sh [npm]
npm install lucide-svelte
```
:::
For more details, see the [documentation](packages/lucide-svelte.md).
## Solid
Implementation of the lucide icon library for Solid applications.
::: code-group
```sh [pnpm]
pnpm install lucide-solid
```
```sh [yarn]
yarn add lucide-solid
```
```sh [npm]
npm install lucide-solid
```
:::
For more details, see the [documentation](packages/lucide-solid.md).
## Angular
```bash
Implementation of the lucide icon library for Angular applications.
::: code-group
```sh [pnpm]
pnpm install lucide-angular
```
```sh [yarn]
yarn add lucide-angular
```
or
```sh
```sh [npm]
npm install lucide-angular
```
:::
For more details, see the [documentation](packages/lucide-angular.md).
## Preact
Implementation of the lucide icon library for preact applications.
```bash
::: code-group
```sh [pnpm]
pnpm install lucide-preact
```
```sh [yarn]
yarn add lucide-preact
```
or
```sh
```sh [npm]
npm install lucide-preact
```
For more details, see the [documentation](packages/lucide-preact.md).
:::
## Static usage
Implementation of the lucide icon library for multiple usages that like to use: SVG files icons, SVG Sprite, Icon Fonts and static SVG strings export in Common JS modules (for NodeJS).
::: code-group
```sh [pnpm]
pnpm install lucide-static
```
```sh [yarn]
yarn add lucide-static
```
```sh [npm]
npm install lucide-static
```
:::
For more details, see the [documentation](packages/lucide-static.md).
## Figma
@@ -134,16 +188,6 @@ Visit [Figma community page](https://www.figma.com/community/plugin/939567362549
![Setting Page Size](https://www.figma.com/community/plugin/939567362549682242/thumbnail 'Figma Lucide Cover')
## Laravel
Implementation of Lucide icon's using `blade-icons` for Laravel based projects.
```bash
composer require mallardduck/blade-lucide-icons
```
For more details, see the [documentation](https://github.com/mallardduck/blade-lucide-icons/blob/main/README.md).
## Flutter
Implementation of Lucide icon library for Flutter applications.

View File

@@ -4,16 +4,22 @@ Implementation of the lucide icon library for Angular applications.
## Installation
```bash
::: code-group
```sh [pnpm]
pnpm install lucide-angular
```
```sh [yarn]
yarn add lucide-angular
```
or
```bash
```sh [npm]
npm install lucide-angular
```
:::
## How to use
### Step 1: Import `LucideAngularModule`
@@ -98,7 +104,9 @@ To add custom icons, you will first need to convert them to an [svgson format](h
## Loading all icons
> :warning: You may also opt to import all icons if necessary using the following format but be aware that this will significantly increase your application build size.
::: danger
You may also opt to import all icons if necessary using the following format but be aware that this will significantly increase your application build size.
:::
```js
import { icons } from 'lucide-angular';

View File

@@ -8,28 +8,34 @@ Implementation of the lucide icon library for preact applications.
## Installation
```sh
::: code-group
```sh [pnpm]
pnpm install lucide-preact
```
```sh [yarn]
yarn add lucide-preact
```
or
```sh
```sh [npm]
npm install lucide-preact
```
:::
## How to use
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a preact component.
It's build with ES Modules so it's completely tree-shakable.
Each icon can be imported as a Preact component, what renders a inline SVG Element. This way only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
You can pass additional props to adjust the icon.
Additional props can be passed to adjust the icon:
```js
```jsx
import { Camera } from 'lucide-preact';
// Returns PreactComponent
// Usage
const App = () => {
@@ -39,7 +45,7 @@ const App = () => {
export default App;
```
### Props
## Props
| name | type | default |
| --------------------- | --------- | ------------ |
@@ -48,29 +54,31 @@ export default App;
| `strokeWidth` | *number* | 2 |
| `absoluteStrokeWidth` | *boolean* | false |
### Custom props / svg attributes
### Applying props
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.
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```js
```jsx
// Usage
const App = () => {
return <Camera fill="red" stroke-linejoin="bevel" />;
};
```
> svg attributes in preact aren't transformed, so if want to change e.g. the `stroke-linejoin` you need to pass it in kebabcase, the way svg spec is written so. See this topic in the [preact documentation](https://preactjs.com/guide/v10/differences-to-react/#svg-inside-jsx).
> SVG attributes in Preact aren't transformed, so if you want to change for example the `stroke-linejoin` you need to pass it in kebabcase. Basically how the SVG spec want you to write it. See this topic in the [Preact documentation](https://preactjs.com/guide/v10/differences-to-react/#svg-inside-jsx).
### One generic icon component
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons. It's not recommended.
> ⚠️ Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
:::
#### Icon Component Example
### Icon Component Example
```js
import * as icons from 'lucide-preact';
```jsx
import { icons } from 'lucide-preact';
const Icon = ({ name, color, size }) => {
const LucideIcon = icons[name];
@@ -80,3 +88,15 @@ const Icon = ({ name, color, size }) => {
export default Icon;
```
#### Using the Icon Component
```jsx
import Icon from './Icon';
const App = () => {
return <Icon name="home" />;
};
export default App;
```

View File

@@ -6,28 +6,32 @@ Implementation of the lucide icon library for React Native applications
First, ensure that you have `react-native-svg@^12.0.0` installed. Then, install the package:
```bash
::: code-group
```sh [pnpm]
pnpm install lucide-react-native
```
```sh [yarn]
yarn add lucide-react-native
```
or
```sh
```sh [npm]
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.
Each icon can be imported as a React component.
### Example
You can pass additional props to adjust the icon.
Additional props can be passed to adjust the icon:
```js
```jsx
import { Camera } from 'lucide-react-native';
// Returns ReactComponent
// Usage
const App = () => {
@@ -37,7 +41,7 @@ const App = () => {
export default App;
```
### Props
## Props
| name | type | default |
| --------------------- | --------- | ------------ |
@@ -46,27 +50,29 @@ export default App;
| `strokeWidth` | *number* | 2 |
| `absoluteStrokeWidth` | *boolean* | false |
### Custom props
### Applying props
You can also pass custom props that will be added in the svg as attributes.
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component.
```js
```jsx
// Usage
const App = () => {
return <Camera fill="red" />;
};
```
### One generic icon component
## 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.
::: warning
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
:::
#### Icon Component Example
### Icon Component Example
```js
import * as icons from 'lucide-react';
```jsx
import { icons } from 'lucide-react';
const Icon = ({ name, color, size }) => {
const LucideIcon = icons[name];
@@ -76,3 +82,15 @@ const Icon = ({ name, color, size }) => {
export default Icon;
```
#### Using the Icon Component
```jsx
import Icon from './Icon';
const App = () => {
return <Icon name="home" />;
};
export default App;
```

View File

@@ -4,28 +4,34 @@ Implementation of the lucide icon library for react applications
## Installation
```bash
::: code-group
```sh [pnpm]
pnpm install lucide-react
```
```sh [yarn]
yarn add lucide-react
```
or
```sh
```sh [npm]
npm install lucide-react
```
:::
## How to use
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a react component.
It's build with ES Modules so it's completely tree-shakable.
Each icon can be imported as a React component, what renders a inline SVG Element. This way only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
You can pass additional props to adjust the icon.
Additional props can be passed to adjust the icon:
```js
```jsx
import { Camera } from 'lucide-react';
// Returns ReactComponent
// Usage
const App = () => {
@@ -35,7 +41,7 @@ const App = () => {
export default App;
```
### Props
## Props
| name | type | default |
| --------------------- | --------- | ------------ |
@@ -44,27 +50,31 @@ export default App;
| `strokeWidth` | *number* | 2 |
| `absoluteStrokeWidth` | *boolean* | false |
### Custom props
### Applying props
You can also pass custom props that will be added in the svg as attributes.
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```js
```jsx
// Usage
const App = () => {
return <Camera fill="red" />;
return <Camera size={48} fill="red" />;
};
```
### One generic icon component
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons. It's not recommended.
> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
#### Icon Component Example
This is not the case for the latest NextJS, because it uses server side rendering. The icons will be streamed to the client when needed. For NextJS with Dynamic Imports, see [dynamic imports](#nextjs-example) section for more information.
:::
```js
import * as icons from 'lucide-react';
### Icon Component Example
```jsx
import { icons } from 'lucide-react';
const Icon = ({ name, color, size }) => {
const LucideIcon = icons[name];
@@ -74,3 +84,72 @@ const Icon = ({ name, color, size }) => {
export default Icon;
```
#### Using the Icon Component
```jsx
import Icon from './Icon';
const App = () => {
return <Icon name="Home" />;
};
export default App;
```
#### With Dynamic Imports
> :warning: This is experimental and only works with bundlers that support dynamic imports.
Lucide react exports a dynamic import map `dynamicIconImports`. Useful for applications that want to show icons dynamically by icon name. For example when using a content management system with where icon names are stored in a database.
When using client side rendering, it will fetch the icon component when it's needed. This will reduce the initial bundle size.
The keys of the dynamic import map are the lucide original icon names (kebab case).
Example with React suspense:
```tsx
import React, { lazy, Suspense } from 'react';
import { dynamicIconImports, LucideProps } from 'lucide-react';
const fallback = <div style={{ background: '#ddd', width: 24, height: 24 }}/>
interface IconProps extends Omit<LucideProps, 'ref'> {
name: keyof typeof dynamicIconImports;
}
const Icon = ({ name, ...props }: IconProps) => {
const LucideIcon = lazy(dynamicIconImports[name]);
return (
<Suspense fallback={fallback}>
<LucideIcon {...props} />
</Suspense>
);
}
export default Icon
```
##### NextJS Example
In NextJS [the dynamic function](https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#nextdynamic) can be used to load the icon component dynamically.
```tsx
import dynamic from 'next/dynamic'
import { LucideProps } from 'lucide-react';
import dynamicIconImports from 'lucide-react/dynamicIconImports';
interface IconProps extends LucideProps {
name: keyof typeof dynamicIconImports;
}
const Icon = ({ name, ...props }: IconProps) => {
const LucideIcon = dynamic(dynamicIconImports[name])
return <LucideIcon {...props} />;
};
export default Icon;
```

View File

@@ -4,28 +4,34 @@ Implementation of the lucide icon library for solid applications.
## Installation
```sh
::: code-group
```sh [pnpm]
pnpm install lucide-solid
```
```sh [yarn]
yarn add lucide-solid
```
or
```sh
```sh [npm]
npm install lucide-solid
```
:::
## How to use
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a solid component.
It's build with ES Modules so it's completely tree-shakable.
Each icon can be imported as a Solid component, what renders a inline SVG Element. This way only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
You can pass additional props to adjust the icon.
Additional props can be passed to adjust the icon:
```js
```jsx
import { Camera } from 'lucide-solid';
// Returns SolidComponent
// Usage
const App = () => {
@@ -35,7 +41,7 @@ const App = () => {
export default App;
```
### Props
## Props
| name | type | default |
| --------------------- | --------- | ------------ |
@@ -44,32 +50,37 @@ export default App;
| `strokeWidth` | *number* | 2 |
| `absoluteStrokeWidth` | *boolean* | false |
### Custom props / svg attributes
### Applying props
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.
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```js
```jsx
// Usage
const App = () => {
return <Camera fill="red" stroke-linejoin="bevel" />;
};
```
### One generic icon component
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons. It's not recommended.
> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
:::
#### Icon Component Example
### Icon Component Example
```tsx
import * as icons from 'lucide-solid';
import type { LucideProps } from 'lucide-solid';
import { icons, type LucideProps } from 'lucide-solid';
import { splitProps } from 'solid-js';
import { Dynamic } from 'solid-js/web';
const Icon = (props: { name: keyof typeof icons } & LucideProps) => {
interface IconProps extends LucideProps {
name: keyof typeof icons;
}
const Icon = (props: IconProps) => {
const [local, others] = splitProps(props, ["name"]);
return <Dynamic component={icons[local.name]} {...others} />
@@ -77,3 +88,15 @@ const Icon = (props: { name: keyof typeof icons } & LucideProps) => {
export default Icon;
```
#### Using the Icon Component
```tsx
import Icon from './Icon';
const App = () => {
return <Icon name="home" />;
};
export default App;
```

View File

@@ -11,22 +11,30 @@ This package include the following lucide implementations:
This package is suitable for specific use cases, for example if you want to use icon fonts, SVG sprites, normal SVGs or Common.js SVG strings in your javascript project.
> ⚠️ While they can be useful for prototyping, it is not recommended to use the SVG sprites or icon fonts provided by this package in production web apps as all the available icons are included in the app, hence increasing loading time and data usage. We recommend to use a bundler and treeshaking to make sure only the icons you use are bundled with your app. Threeshaking is only available in these packages: [lucide](lucide), [lucide-react](lucide-react), [lucide-vue](lucide-vue), [lucide-vue-next](lucide-vue-next), [lucide-angular](lucide-angular), [lucide-preact](lucide-preact)
::: warning
While they can be useful for prototyping, it is not recommended to use the SVG sprites or icon fonts provided by this package in production web apps as all the available icons are included in the app, hence increasing loading time and data usage. We recommend to use a bundler and tree-shaking to make sure only the icons you use are bundled with your app. Tree-shaking is only available in these packages: [lucide](lucide), [lucide-react](lucide-react), [lucide-vue](lucide-vue), [lucide-vue-next](lucide-vue-next), [lucide-angular](lucide-angular), [lucide-preact](lucide-preact)
:::
## Installation
## Package Managers
```sh
::: code-group
```sh [pnpm]
pnpm install lucide-static
```
```sh [yarn]
yarn add lucide-static
```
or
```sh
```sh [npm]
npm install lucide-static
```
:::
### CDN
```html

View File

@@ -4,25 +4,33 @@ Implementation of the lucide icon library for svelte applications.
## Installation
```bash
::: code-group
```sh [pnpm]
pnpm install lucide-svelte
```
```sh [yarn]
yarn add lucide-svelte
```
or
```sh
```sh [npm]
npm install lucide-svelte
```
:::
## How to use
All the icons are Svelte components, that ouputs Svg elements. So each icon can be imported and used as a component. This also helps with the use of threeshaking so you only import the icons you use.
It's build with ES Modules so it's completely tree-shakable.
Each icon can be imported as a Svelte component, what renders a inline SVG Element. This way only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
Default usage:
```html
```svelte
<script>
import { Skull } from 'lucide-svelte';
</script>
@@ -30,9 +38,9 @@ Default usage:
<Skull />
```
You can pass additional props to adjust the icon.
Additional props can be passed to adjust the icon:
```html
```svelte
<script>
import { Camera } from 'lucide-svelte';
</script>
@@ -40,7 +48,7 @@ You can pass additional props to adjust the icon.
<Camera color="#ff3e98" />
```
### Available props
## Props
| name | type | default |
| --------------------- | --------- | ------------ |
@@ -48,14 +56,12 @@ You can pass additional props to adjust the icon.
| `color` | *string* | currentColor |
| `strokeWidth` | *number* | 2 |
| `absoluteStrokeWidth` | *boolean* | false |
| `*<SVGProps>` | *string* | - |
### Applying props
\* 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)
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
### Example of custom props
```html
```svelte
<script>
import { Phone } from 'lucide-svelte';
</script>
@@ -65,15 +71,17 @@ You can pass additional props to adjust the icon.
This results a filled phone icon.
### One generic icon component
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons. It's not recommended.
> ⚠️ Example below importing all EsModules, caution using this example, not recommended when you bundle your application,the build size will grow strongly. Because it will import all the icons.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
:::
#### Icon Component Example
### Icon Component Example
```html
```svelte
<script>
import * as icons from 'lucide-svelte';
export let name;
@@ -82,12 +90,13 @@ It is possible to create one generic icon component to load icons.
<svelte:component this="{icons[name]}" {...$$props} />
```
##### Then you can use it like this
#### Using the Icon Component
```html
```svelte
<script>
import LucideIcon from './LucideIcon';
</script>
<LucideIcon name="Menu" />
```

View File

@@ -2,32 +2,41 @@
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](lucide-vue)
## Vue 3 or Vue 2
::: tip
This version of lucide is for Vue 3, For Vue 2 got to [lucide-vue ->](lucide-vue)
:::
## Installation
**With yarn**
::: code-group
```bash
```sh [pnpm]
pnpm install lucide-vue-next
```
```sh [yarn]
yarn add lucide-vue-next
```
**With npm**
```bash
```sh [npm]
npm install lucide-vue-next
```
:::
## How to use
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a vue component.
It's build with ES Modules so it's completely tree-shakable.
Each icon can be imported as a Vue component, what renders a inline SVG Element. This way only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
You can pass additional props to adjust the icon.
``` html
```vue
<template>
<Camera
color="red"
@@ -40,7 +49,7 @@ import { Camera } from 'lucide-vue-next';
</script>
```
### Props
## Props
| name | type | default |
| ----------------------- | --------- | ------------ |
@@ -50,34 +59,27 @@ import { Camera } from 'lucide-vue-next';
| `absolute-stroke-width` | *boolean* | false |
| `default-class` | *string* | lucide-icon |
### Custom props
### Applying props
You can also pass custom props that will be added in the svg as attributes.
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
``` html
```vue
<template>
<Camera fill="red" />
</template>
```
### One generic icon component
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons. It's not recommended.
> ⚠️ Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
:::
#### Icon Component Example
``` html
<template>
<component
:is="icon"
:size="size"
:color="color"
:stroke-width="strokeWidth" :default-class="defaultClass"
/>
</template>
### Icon Component Example
```vue
<script setup>
import { computed } from 'vue';
import * as icons from "lucide-vue-next";
@@ -95,15 +97,25 @@ const props = defineProps({
const icon = computed(() => icons[props.name]);
</script>
<template>
<component
:is="icon"
:size="size"
:color="color"
:stroke-width="strokeWidth" :default-class="defaultClass"
/>
</template>
```
##### Then you can use it like this
### Using the Icon Component
``` html
All other props listed above also work on the `Icon` Component.
```vue
<template>
<div id="app">
<Icon name="Airplay" />
</div>
</template>
```
All other props listed above also work on the `Icon` Component.

View File

@@ -2,36 +2,46 @@
Implementation of the lucide icon library for Vue applications.
> ⚠️ This version of lucide is for Vue 2, For Vue 3 got to [lucide-vue-next](lucide-vue-next)
## Vue 2 or Vue 3
::: tip
This version of lucide is for Vue 2, For Vue 3 go to [lucide-vue-next ->](lucide-vue-next)
:::
## Installation
```sh
::: code-group
```sh [pnpm]
pnpm install lucide-vue
```
```sh [yarn]
yarn add lucide-vue
```
or
```sh
```sh [npm]
npm install lucide-vue
```
:::
## How to use
It's build with ESmodules so it's completely tree-shakable.
Each icon can be imported as a vue component.
It's build with ES Modules so it's completely tree-shakable.
Each icon can be imported as a Vue component, what renders a inline SVG Element. This way only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
You can pass additional props to adjust the icon.
Additional props can be passed to adjust the icon:
```html
```vue
<template>
<Camera color="red" :size="32" />
</template>
<script>
// Returns Vue component
import { Camera } from 'lucide-vue';
export default {
@@ -41,7 +51,7 @@ You can pass additional props to adjust the icon.
</script>
```
### Props
## Props
| name | type | default |
| ----------------------- | --------- | ------------ |
@@ -51,25 +61,27 @@ You can pass additional props to adjust the icon.
| `absolute-stroke-width` | *boolean* | false |
| `default-class` | *string* | lucide-icon |
### Custom props
### Applying props
You can also pass custom props that will be added in the svg as attributes.
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```html
```vue
<template>
<Camera fill="red" />
</template>
```
### One generic icon component
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons. It's not recommended.
> ⚠️ Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
:::
#### Icon Component Example
### Icon Component Example
```html
```vue
<template>
<component :is="icon" />
</template>
@@ -93,9 +105,9 @@ It is possible to create one generic icon component to load icons.
</script>
```
##### Then you can use it like this
#### Using the Icon Component
```html
```vue
<template>
<div id="app">
<Icon name="Airplay" />

View File

@@ -6,15 +6,21 @@ Implementation of the lucide icon library for web applications.
### Package Managers
```sh
::: code-group
```sh [pnpm]
pnpm install lucide
```
```sh [yarn]
yarn add lucide
```
```sh [npm]
npm install lucide
```
or
```sh
yarn add lucide
```
:::
### CDN
@@ -35,9 +41,9 @@ Here is a complete example with unpkg
```html
<!DOCTYPE html>
<body>
<i icon-name="volume-2" class="my-class"></i>
<i icon-name="x"></i>
<i icon-name="menu"></i>
<i data-lucide="volume-2" class="my-class"></i>
<i data-lucide="x"></i>
<i data-lucide="menu"></i>
<script src="https://unpkg.com/lucide@latest"></script>
<script>
@@ -49,11 +55,11 @@ Here is a complete example with unpkg
### With ESModules
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.
The `createIcons` function will search for HTMLElements with the attribute `data-lucide` and replace it with the svg from the given icon name.
```html
<!-- Your HTML file -->
<i icon-name="menu"></i>
<i data-lucide="menu"></i>
```
```js
@@ -74,7 +80,9 @@ createIcons({
});
```
#### Additional Options
## Advanced Usage
### Additional Options
In the `createIcons` function you can pass some extra parameters to adjust the `nameAttr` or add custom attributes like for example classes.
@@ -89,11 +97,11 @@ createIcons({
'stroke-width': 1,
stroke: '#333'
},
nameAttr: 'icon-name' // attribute for the icon name.
nameAttr: 'data-lucide' // attribute for the icon name.
});
```
#### Treeshake the library, only use the icons you use
### Treeshake the library, only use the icons you use
```js
import { createIcons, Menu, ArrowRight, Globe } from 'lucide';
@@ -107,7 +115,7 @@ createIcons({
});
```
#### Custom Element binding
### Custom Element binding
```js
import { createElement, Menu } from 'lucide';

View File

@@ -41,47 +41,47 @@ const codeExample = computed(() => data.codeExamples?.map(
<div :class="$style.iconPreviews">
<IconPreview
id="previewer"
:name="$params.name"
:iconNode="$params.iconNode"
:name="params.name"
:iconNode="params.iconNode"
:class="$style.preview"
/>
<IconPreviewSmall
:name="$params.name"
:iconNode="$params.iconNode"
:name="params.name"
:iconNode="params.iconNode"
:class="$style.smallPreview"
/>
</div>
<div >
<div :class="$style.info">
<IconInfo :icon="$params" />
<IconInfo :icon="params" />
<div :class="$style.meta">
<div
v-if="$params.createdRelease?.version"
v-if="params.createdRelease?.version"
:class="$style.version"
>
<Label>Created:</Label>
<Badge
:href="`https://github.com/lucide-icons/lucide/releases/tag/v${$params.createdRelease.version}`"
:href="`https://github.com/lucide-icons/lucide/releases/tag/v${params.createdRelease.version}`"
target="_blank"
rel="noreferrer noopener"
>
v{{$params.createdRelease.version}}
v{{params.createdRelease.version}}
</Badge>
</div>
<div
v-if="$params.changedRelease?.version"
v-if="params.changedRelease?.version"
:class="$style.version"
>
<Label>Last changed:</Label>
<Badge
:href="`https://github.com/lucide-icons/lucide/releases/tag/v${$params.changedRelease.version}`"
:href="`https://github.com/lucide-icons/lucide/releases/tag/v${params.changedRelease.version}`"
target="_blank"
rel="noreferrer noopener"
>
v{{$params.changedRelease.version}}
v{{params.changedRelease.version}}
</Badge>
</div>
<IconContributors :icon="$params" :class="$style.contributors"/>
<IconContributors :icon="params" :class="$style.contributors"/>
</div>
</div>
<CodeGroup
@@ -97,7 +97,7 @@ const codeExample = computed(() => data.codeExamples?.map(
</div>
</div>
<RelatedIcons :icons="$params.relatedIcons" />
<RelatedIcons :icons="params.relatedIcons" />
<style module>
.preview {
@@ -117,6 +117,10 @@ const codeExample = computed(() => data.codeExamples?.map(
margin-top: 24px;
}
.info {
--tags-gradient-background: var(--vp-c-bg);
}
.version, .contributors {
display: flex;
flex-wrap: wrap;

View File

@@ -1,18 +1,18 @@
import { getAllData } from "../.vitepress/lib/icons";
import relatedIcons from '../.vitepress/data/relatedIcons.json'
import iconNodes from '../.vitepress/data/iconNodes'
import * as iconDetails from '../.vitepress/data/iconDetails'
import { IconEntity } from "../.vitepress/theme/types";
export default {
paths: async () => {
const icons = await getAllData()
return icons.map((iconEntity) => {
return (Object.values(iconDetails) as unknown as IconEntity[]).map((iconEntity) => {
const params = {
...iconEntity,
relatedIcons: relatedIcons[iconEntity.name].map((name: string) => ({
name,
iconNode: iconNodes[name],
})),
}))
}
return {

View File

@@ -1,9 +1,9 @@
import { getAllData } from '../.vitepress/lib/icons'
import iconNodes from '../.vitepress/data/iconNodes'
export default {
async load() {
return {
icons: await getAllData(),
icons: Object.entries(iconNodes).map(([name, iconNode]) => ({ name, iconNode })),
}
}
}

View File

@@ -3,6 +3,10 @@ layout: page
outline: 2
outlineTitle: Categories
sidebar: true
head:
- - link
- rel: canonical
content: https://lucide.dev/icons/
---
<script setup>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 56 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -2,6 +2,11 @@
# https://vitepress.dev/reference/default-theme-home-page
layout: home
head:
- - link
- rel: canonical
content: https://lucide.dev/
hero:
name: |
Beautiful &
@@ -13,10 +18,10 @@ hero:
actions:
- theme: brand
text: View all icons
link: icons/index
link: icons/
- theme: alt
text: Get Started
link: guide/index
link: guide/
- theme: alt
text: GitHub
link: https://github.com/lucide-icons/lucide

View File

@@ -1,4 +1,5 @@
import { defineNitroConfig } from "nitropack";
import copy from 'rollup-plugin-copy';
import replace from '@rollup/plugin-replace';
export default defineNitroConfig({
preset: 'vercel-edge',
@@ -6,15 +7,29 @@ export default defineNitroConfig({
routeRules: {
'/api/**': { cors: false },
},
rollupConfig: {
external: ['@resvg/resvg-wasm/index_bg.wasm', './index_bg.wasm?module'],
plugins: [
copy({
targets: [
{
src: './node_modules/@resvg/resvg-wasm/index_bg.wasm',
dest: './.vercel/output/functions/__nitro.func',
},
],
}),
replace({
include: ['./**/*.ts'],
'/* WASM_IMPORT */': 'import resvg_wasm from "./index_bg.wasm?module";',
delimiters: ['', ''],
preventAssignment: false,
}),
],
},
esbuild: {
options: {
include: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.json'],
loaders: {
'.js': 'js',
'.jsx': 'jsx',
'.ts': 'ts',
'.tsx': 'tsx',
}
jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment',
},
},
})
});

View File

@@ -2,10 +2,10 @@
"name": "@lucide/docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "pnpm run \"/^prebuild:.*/\" && vitepress dev",
"docs:dev": "pnpm prebuild && vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview",
"build:docs": "vitepress build",
@@ -13,23 +13,28 @@
"prebuild:metaJson": "node ../scripts/writeIconMetaIndex.mjs",
"prebuild:releaseJson": "node ../scripts/writeReleaseMetadata.mjs",
"prebuild:relatedIcons": "node ../scripts/writeIconRelatedIcons.mjs",
"prebuild:iconDetails": "node ../scripts/writeIconDetails.mjs",
"postbuild:vercelJson": "node ../scripts/writeVercelOutput.mjs",
"dev": "npx nitropack dev",
"build:api": "npx nitropack build",
"prebuild": "pnpm build:iconNodes && pnpm build:metaJson && pnpm build:releaseJson && pnpm build:relatedIcons && pnpm build:iconDetails",
"build": "pnpm run \"/^prebuild:.*/\" && pnpm build:api && pnpm build:docs && pnpm postbuild:vercelJson",
"prebuild": "pnpm prebuild:iconNodes && pnpm prebuild:metaJson && pnpm prebuild:releaseJson && pnpm prebuild:relatedIcons && pnpm prebuild:iconDetails",
"build": "pnpm prebuild && pnpm build:api && pnpm build:docs && pnpm postbuild:vercelJson",
"preview": "node .output/server/index.mjs"
},
"author": "Eric Fennis",
"license": "ISC",
"devDependencies": {
"h3": "^1.6.4",
"nitropack": "^2.4.1",
"@rollup/plugin-replace": "^5.0.2",
"h3": "^1.8.0",
"nitropack": "npm:nitropack-edge@latest",
"node-fetch": "2",
"vitepress": "1.0.0-beta.1"
"rollup-plugin-copy": "^3.4.0",
"vitepress": "1.0.0-rc.4"
},
"dependencies": {
"@floating-ui/vue": "^1.0.1",
"@headlessui/vue": "^1.7.13",
"@resvg/resvg-wasm": "^2.4.1",
"@vueuse/components": "^10.1.0",
"@vueuse/core": "^10.1.0",
"element-to-path": "^1.2.1",
@@ -42,11 +47,13 @@
"lucide-vue-next": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"semver": "^7.5.0",
"semver": "^7.5.2",
"shiki": "^0.14.2",
"shiki-processor": "^0.1.3",
"simple-git": "^3.18.0",
"sitemap": "^7.1.1",
"svg-pathdata": "^6.0.3",
"svgson": "^5.2.1",
"vue": "^3.2.47"
}
}

BIN
docs/public/og.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

View File

@@ -23,6 +23,17 @@
"source": "/docs/:path*",
"destination": "/guide/:path*",
"permanent": true
},
{
"source": "/",
"has": [
{
"type": "query",
"key": "search"
}
],
"destination": "/icons",
"permanent": false
}
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley"
],
"tags": [
"pulse",
"action",
"motion",
"movement",
"exercise",
"fitness",
"healthcare",
"heart rate monitor",
"vital signs",
"vitals",
"emergency room",
"er",
"intensive care",
"hospital",
"defibrillator",
"earthquake",
"siesmic",
"magnitude",
"richter scale",
"aftershock",
"tremor",
"shockwave",
"audio",
"waveform",
"synthesizer",
"synthesiser",
"music"
],
"categories": [
"medical",
"account",
"social",
"science",
"multimedia",
"shapes"
]
}

14
icons/activity-square.svg Normal file
View File

@@ -0,0 +1,14 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect width="18" height="18" x="3" y="3" rx="2" />
<path d="M17 12h-2l-2 5-2-10-2 5H7" />
</svg>

After

Width:  |  Height:  |  Size: 302 B

View File

@@ -5,13 +5,38 @@
],
"tags": [
"pulse",
"health",
"action",
"motion"
"motion",
"movement",
"exercise",
"fitness",
"healthcare",
"heart rate monitor",
"vital signs",
"vitals",
"emergency room",
"er",
"intensive care",
"hospital",
"defibrillator",
"earthquake",
"siesmic",
"magnitude",
"richter scale",
"aftershock",
"tremor",
"shockwave",
"audio",
"waveform",
"synthesizer",
"synthesiser",
"music"
],
"categories": [
"medical",
"account",
"social"
"social",
"science",
"multimedia"
]
}

View File

@@ -9,5 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" />
<path d="M22 12h-4l-3 9L9 3l-3 9H2" />
</svg>

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 249 B

View File

@@ -10,10 +10,12 @@
"warning",
"alert",
"danger",
"exclamation mark"
"exclamation mark",
"linter"
],
"categories": [
"notifications",
"shapes"
"shapes",
"development"
]
}

View File

@@ -10,6 +10,6 @@
stroke-linejoin="round"
>
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" />
<line x1="12" x2="12" y1="9" y2="13" />
<line x1="12" x2="12.01" y1="17" y2="17" />
<path d="M12 9v4" />
<path d="M12 17h.01" />
</svg>

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 346 B

Some files were not shown because too many files have changed in this diff Show More