Compare commits

...

169 Commits

Author SHA1 Message Date
Eric Fennis 9e63e97f31 Lucide preact package (#291)
* Add preact package

* Fix types

* update types

* fix types

* remove dependecies

* bump version

* improve test setup for react as well

* Add workflow for preact

* Fix types

* bump version

* Add white space

* remove forward ref

* bump package

* Fix types

* Fix types

* bump version

* Remove proptypings

* Test new version

* Add some extra documentation
2021-05-23 13:13:18 +02:00
Eric Fennis 81b85839eb Add vue 3 package (#293)
* init vue next package

* Refactor naming

* adjust readme

* add typescript support

* Fix es module build

* Bump alpha version

* Fix size property not working

* Fix issue with default attributes in this PR

* small fixes

* Update README.md

* Fix peer dep

* Add return

* update release workflow

Co-authored-by: AdamSGit <adamelio@protonmail.com>
2021-05-20 21:24:54 +02:00
Lucide Bot 15ac2cf282 📦 Bump lucide package versions to 2021-05-20 18:41:43 +00:00
Thijs-Jan 1c1b6c7732 Add tent icon (#331)
* Add campsite icon

* Add campsite and tent to tags.json

* Replace campsite with tent
2021-05-20 20:38:11 +02:00
Lucide Bot 29236b45d1 📦 Bump lucide package versions to 2021-05-18 20:28:12 +00:00
Yashu Mittal 1e9a09e8f3 add circle-check-2 icon (#237) 2021-05-18 22:24:17 +02:00
Eric Fennis 9031285357 Add bell ring icon (#300) 2021-05-18 22:21:33 +02:00
Yashu Mittal 03fd0452f3 add clipboard-copy icon (#241)
* add clipboard-copy icon

* Update clipboard-copy.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-05-18 22:20:45 +02:00
Lucide Bot e4adf28a48 📦 Bump lucide package versions to 2021-05-18 19:13:58 +00:00
Eric Fennis 9af28b9247 Add vibrate icon (#297) 2021-05-18 21:09:58 +02:00
Eric Fennis e9879d5db0 Update tags for the website (#329)
* update tags

* update tags
2021-05-18 21:09:07 +02:00
Yashu Mittal 95f66ca5b0 add clipboard-x icon (#325) 2021-05-16 13:45:22 +02:00
Locness b72d86604b Update new-icon.md (#328) 2021-05-16 12:32:45 +02:00
Yashu Mittal 97c03c7d15 add arrow's icons (#211)
* add arrow's icons

* Delete top-bottom.svg

* Delete left-right.svg

* fix: icon padding 2px border

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-05-16 12:32:17 +02:00
Yashu Mittal f8f98394f4 add clipboard check icon (#323) 2021-05-16 12:31:25 +02:00
Eric Fennis ff0901bf0c add skull icon (#298) 2021-05-16 12:30:59 +02:00
delnyn 66f2dc24b1 New settings icon - replacement? (#296)
* Add settings-2 file

* Update tags

* Delete settings-2.svg

* Change settings.svg to new settings icon

* Update tags.json

* Clean the SVG

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

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-05-16 12:27:19 +02:00
Eric Fennis fd20bc5fd9 Merge branch 'master' of github.com:lucide-icons/lucide 2021-05-16 12:26:31 +02:00
Eric Fennis 997daac4e6 update shell script 2021-05-16 12:26:10 +02:00
Eric Fennis d218851416 Fix ci workflow 2021-05-16 12:24:45 +02:00
dependabot[bot] acf51993d7 Bump hosted-git-info from 2.8.8 to 2.8.9 (#318)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 22:43:11 +02:00
dependabot[bot] 02cb296050 Bump hosted-git-info from 2.8.8 to 2.8.9 in /packages/lucide-react (#319)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 22:43:03 +02:00
dependabot[bot] df3bd24540 Bump lodash from 4.17.20 to 4.17.21 in /packages/lucide-react (#320)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 22:42:56 +02:00
dependabot[bot] 75887dc14c Bump lodash from 4.17.20 to 4.17.21 in /packages/lucide-figma (#321)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 22:42:41 +02:00
dependabot[bot] a50076fcb9 Bump lodash from 4.17.20 to 4.17.21 in /packages/lucide-vue (#322)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 22:42:32 +02:00
Eric Fennis eeff4e2718 Merge branch 'master' of github.com:lucide-icons/lucide 2021-05-04 17:42:57 +02:00
Eric Fennis f065767560 Add stale issue workflow 2021-05-04 17:42:29 +02:00
Yashu Mittal 7cbc2ac5a7 add pause octagon icon (#307) 2021-05-04 17:24:31 +02:00
Yashu Mittal 494292618b add accessibility icon (#199)
* add accessibility icon

* Update and rename accessibility.svg to person-standing.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-05-03 23:05:04 +02:00
Yashu Mittal 820727329d add sidebar open & close icon (#204)
* add sidebar open & close icon

* fix sidebar open/close icon

* Update sidebar-close.svg

* Update sidebar-open.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-05-03 22:37:50 +02:00
Locness c51bffbd54 Add pull request template for new icons (#312)
* Create new-icon.md

* Use proper label for icon request issue template

* Use proper label for bug report template
2021-05-03 22:00:10 +02:00
dependabot[bot] cad3214584 Bump ssri from 6.0.1 to 6.0.2 (#299)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-30 21:48:30 +02:00
Yashu Mittal 733448d041 add 2-fa icon (#235)
* add 2-fa icon

* rename to "form-input"

* Update form-input.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-30 21:15:15 +02:00
Eric Fennis c7b9f9aaae Merge branch 'master' of github.com:lucide-icons/lucide 2021-04-30 21:12:13 +02:00
Eric Fennis d0e6b9c015 bump package version 2021-04-30 21:11:43 +02:00
Lucide Bot 0e83769729 📦 Bump lucide package versions to 2021-04-30 15:09:54 +00:00
Eric Fennis da5a92746f Add check in Ci workflow 2021-04-30 17:04:37 +02:00
Yashu Mittal 551cc30e79 add zero-config icon (#288)
* add zero-config icon

* Update and rename zero-config.svg to circle-slashed.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-30 16:15:09 +02:00
Eric Fennis 09edf6d16c Add more weather icons (#289)
* Add more weather icons

* Add new design

* Rename icon
2021-04-30 16:11:43 +02:00
Eric Fennis 7cc4041a35 Fix site 2021-04-30 13:23:53 +02:00
Eric Fennis 5418c63468 Fix lucide site 2021-04-30 01:24:34 +02:00
Eric Fennis 269d5fa2d0 update packages 2021-04-30 01:19:45 +02:00
Lucide Bot c130e58c46 📦 Bump lucide package versions to 2021-04-23 21:05:19 +00:00
Yashu Mittal 2a8f734a19 add scale icon (#205)
* add scale icon

* make side handle lines bit curvy
2021-04-23 23:00:26 +02:00
Yashu Mittal 1ddce5b3cb add selector icon (#238)
* add selector icon

* update icon

* Rename selector.svg to chevrons-up-down.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-23 22:58:32 +02:00
Yashu Mittal 859577768c add power-on icon (#185)
* add power-on icon

* v2 design for power-on icon

* Rename power-on.svg to plug-zap.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-23 22:56:46 +02:00
Yashu Mittal 606b6b2b22 add desktop icon (#217)
* add desktop icon

* Rename desktop.svg to monitor-speaker.svg

* Update monitor-speaker.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-23 22:54:56 +02:00
Lucide Bot 10749409f1 📦 Bump lucide package versions to 2021-04-23 20:50:35 +00:00
Yashu Mittal 77727bc40c add ticket icon (#220) 2021-04-23 22:45:32 +02:00
dependabot[bot] 59fe65b705 Bump ssri from 6.0.1 to 6.0.2 in /site (#295)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-22 20:57:31 +02:00
dependabot[bot] 5e0d287cda Bump ssri from 6.0.1 to 6.0.2 in /packages/lucide-figma (#294)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-22 20:57:11 +02:00
Eric Fennis 910b2432ce Fix workflow for angular 2021-04-22 20:54:16 +02:00
Eric Fennis 3b05f0e574 Merge branch 'master' of github.com:lucide-icons/lucide 2021-04-22 20:49:31 +02:00
Eric Fennis 62e5aae150 Merge branch 'lucide-angular-fix-structure' 2021-04-22 20:47:56 +02:00
SMAH1 2dbf8ffaa3 Add workflow for release lucide-angular (#282) 2021-04-21 23:47:44 +02:00
Eric Fennis 938f7efeba Merge branch 'master' of github.com:lucide-icons/lucide 2021-04-20 00:00:18 +02:00
Yashu Mittal ab00747371 add ghost icon (#285)
* add ghost icon

* fix: ghost wavely lines

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

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-19 23:43:08 +02:00
Eric Fennis 4c42ebfcff add move command 2021-04-19 23:41:15 +02:00
Yashu Mittal 182b127c12 fix: add 1px spacing around settings icon (#212)
* add 1px spacing around settings icon

* Update icons/settings.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-19 22:54:52 +02:00
Eric Fennis 2f3dfb4404 Change release step 2021-04-19 22:48:14 +02:00
Eric Fennis 3348c1050d readme changes 2021-04-17 23:16:34 +02:00
Eric Fennis d0f26f4110 minor fixes 2021-04-17 23:11:59 +02:00
Eric Fennis b450764c68 Add new version 2021-04-17 22:22:02 +02:00
Eric Fennis b71ae1e055 simplify exports 2021-04-17 22:00:21 +02:00
Eric Fennis 35d41c1763 Move files 2021-04-17 01:09:23 +02:00
Eric Fennis 7cdabd67be add styling 2021-04-14 23:49:43 +02:00
Eric Fennis 0922e72e3d move files 2021-04-14 23:43:47 +02:00
Eric Fennis f2582af4a3 fix tsconfig 2021-04-14 23:02:35 +02:00
Eric Fennis 61124e4619 Fix link 2021-04-14 22:15:35 +02:00
Eric Fennis 60efb731fe Merge branch 'master' of github.com:lucide-icons/lucide 2021-04-14 17:58:21 +02:00
Alexandr Antonov 96357adbe7 feat: Add glasses icon (#149)
* feat: Add glasses icon

* Update icons/glasses.svg

Co-authored-by: Alexander Antonov <aantonov@131.ru>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-14 17:42:55 +02:00
Locness 74c077b3ae Add note about brand icons to issue template (#287) 2021-04-13 16:06:42 +02:00
SMAH1 af9dc9f510 Fix link of README (#286) 2021-04-13 16:06:08 +02:00
Eric Fennis abb6323d5e 📦 Bump package versions 2021-04-11 20:41:13 +02:00
Eric Fennis 8fcec2a0b2 Add personal token 2021-04-11 20:37:49 +02:00
Eric Fennis 69397ee269 Add bug icon (#256) 2021-04-11 19:47:06 +02:00
Eric Fennis 770d5a7557 Format directories 2021-04-11 19:04:24 +02:00
Eric Fennis 58c11879c5 Merge branch 'master' of github.com:lucide-icons/lucide 2021-04-11 13:42:16 +02:00
SMAH1 d14a85d644 Add lucide-angular again! (#281)
* Add lucide-angular

* README of lucide-angular
2021-04-11 13:18:50 +02:00
Eric Fennis 22ea86dad5 Add fix for release workflow 2021-04-11 12:29:18 +02:00
Eric Fennis cd75f0c384 add github repo check in workflow 2021-04-11 02:03:49 +02:00
Eric Fennis 8d9df97208 fix wind icon 2021-04-11 02:01:32 +02:00
Eric Fennis d87b423044 some formatting 2021-04-11 01:55:11 +02:00
Eric Fennis 1877c1b2a8 turn on path check 2021-04-11 01:53:52 +02:00
Eric Fennis 739242a4f5 tes release workflow 2021-04-11 01:47:40 +02:00
Eric Fennis 398d8fc9bb make yarn silent 2021-04-11 01:43:09 +02:00
Eric Fennis 74a1ef8d9b Fix changelog in workflow 2021-04-11 01:35:28 +02:00
Eric Fennis 3357de226b test workflow 2021-04-11 01:29:34 +02:00
Eric Fennis 270936bce1 fix step output 2021-04-07 23:36:18 +02:00
Eric Fennis 7021b19039 remove check 2021-04-07 23:31:35 +02:00
Eric Fennis 17491235cb test workflow 2021-04-07 23:24:38 +02:00
Eric Fennis fd1aa0893c move vercel 2021-04-07 22:35:08 +02:00
Eric Fennis 262f906322 Fix site 2021-04-07 22:27:09 +02:00
Eric Fennis d58db71163 Adjust changelog generation 2021-04-07 09:04:17 +02:00
Eric Fennis 9e9efbe40b fix workflow 2021-04-05 18:41:27 +02:00
Eric Fennis 4e8acabf44 remove check workflow 2021-04-05 18:33:04 +02:00
Eric Fennis e0b585ddd3 get highest tag 2021-04-05 18:31:44 +02:00
Eric Fennis ef5ef2f76a Test workflow 2021-04-05 18:29:06 +02:00
Eric Fennis b1d5af7bd3 check output 2021-04-05 18:25:15 +02:00
Eric Fennis efe345db5e test workflow 2021-04-05 18:15:28 +02:00
Eric Fennis d6ebff0b78 test ci workflow 2021-04-05 18:06:31 +02:00
Eric Fennis f6afdc70cf Fix formatting 2021-04-05 18:03:21 +02:00
Eric Fennis 0358960400 test workflow 2021-04-05 18:00:05 +02:00
Yashu Mittal 5a1e09073d Add template icon (#179)
* add template icon

* rename to layout-template icon

* update icon with consisent layout structure
2021-04-05 17:47:00 +02:00
Eric Fennis fb6ce6eb0b test ci workflow 2021-04-05 17:44:24 +02:00
Eric Fennis 435fbc9e26 add config for vercel 2021-04-05 17:18:26 +02:00
Eric Fennis 01f577212c Merge branch 'feature/fix-workflows' 2021-04-05 17:17:49 +02:00
Eric Fennis a5d1f2964b small fixes workflow 2021-04-05 17:17:29 +02:00
Eric Fennis 33caa024d2 Merge branch 'feature/fix-types' 2021-04-05 16:52:57 +02:00
SMAH1 c7fc71a66e Build d.ts for use in typescript (#277)
* Add lucide-angular

* Build d.ts for use in typescript

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

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

* Update packages/lucide/scripts/buildTypes.js

* Update package.json

* Update package.json

* Delete .gitignore

* Delete angular.json

* Delete package.json

* Delete README.md

* Delete default-attributes.ts

* Delete icons-index.ts

* Delete package.json

* Delete karma.conf.js

* Delete lucide.ts

* Delete ng-package.json

* Delete package.json

* Delete lib-index.ts

* Delete icons.provider.ts

* Delete lucide-angular.component.spec.ts

* Delete lucide-angular.component.ts

* Delete lucide-angular.module.ts

* Delete test.ts

* Delete tsconfig.lib.json

* Delete tsconfig.lib.prod.json

* Delete tsconfig.spec.json

* Delete tslint.json

* Delete buildIconsIndex.js

* Delete exportTemplate.js

* Delete tsconfig.json

* Delete tslint.json

* Update buildTypes.js

Pretty code

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-05 16:50:00 +02:00
Eric Fennis 1dba15f03b Fix bugs in types 2021-04-05 16:48:25 +02:00
Eric Fennis c3e7e0c834 format file 2021-04-04 23:46:18 +02:00
Yashu Mittal 456cb01982 add power-off icon (#207) 2021-04-04 22:48:25 +02:00
Eric Fennis 38fb2ca283 fix indentation 2021-04-04 14:47:01 +02:00
Eric Fennis b5201d2b38 improve workflows 2021-04-04 14:45:49 +02:00
SMAH1 9ca395c9ba Update buildTypes.js
Pretty code
2021-04-04 09:38:09 +04:30
SMAH1 d95e2170c5 Delete tslint.json 2021-04-04 09:34:55 +04:30
SMAH1 676ded84ac Delete tsconfig.json 2021-04-04 09:34:46 +04:30
SMAH1 dcef099aca Delete exportTemplate.js 2021-04-04 09:34:27 +04:30
SMAH1 1c0d763f70 Delete buildIconsIndex.js 2021-04-04 09:34:14 +04:30
SMAH1 a7e2399621 Delete tslint.json 2021-04-04 09:33:56 +04:30
SMAH1 a3345217c2 Delete tsconfig.spec.json 2021-04-04 09:33:49 +04:30
SMAH1 c707c9438b Delete tsconfig.lib.prod.json 2021-04-04 09:33:42 +04:30
SMAH1 bd0bdda5f2 Delete tsconfig.lib.json 2021-04-04 09:33:37 +04:30
SMAH1 e9d24e0086 Delete test.ts 2021-04-04 09:33:28 +04:30
SMAH1 686d6f8aec Delete lucide-angular.module.ts 2021-04-04 09:33:05 +04:30
SMAH1 78cbae1061 Delete lucide-angular.component.ts 2021-04-04 09:32:57 +04:30
SMAH1 4021f6954d Delete lucide-angular.component.spec.ts 2021-04-04 09:32:50 +04:30
SMAH1 8cdd66a1db Delete icons.provider.ts 2021-04-04 09:32:43 +04:30
SMAH1 9266183e95 Delete lib-index.ts 2021-04-04 09:32:26 +04:30
SMAH1 b6e474908f Delete package.json 2021-04-04 09:32:17 +04:30
SMAH1 7a088181cc Delete ng-package.json 2021-04-04 09:32:02 +04:30
SMAH1 8aa0295c9e Delete lucide.ts 2021-04-04 09:31:55 +04:30
SMAH1 49dffc9f43 Delete karma.conf.js 2021-04-04 09:31:45 +04:30
SMAH1 74dfc929df Delete package.json 2021-04-04 09:31:33 +04:30
SMAH1 80239f7c8a Delete icons-index.ts 2021-04-04 09:31:26 +04:30
SMAH1 49e0889b63 Delete default-attributes.ts 2021-04-04 09:31:19 +04:30
SMAH1 e968bf51e3 Delete README.md 2021-04-04 09:31:08 +04:30
SMAH1 4eb4837052 Delete package.json 2021-04-04 09:30:17 +04:30
SMAH1 ded1a24668 Delete angular.json 2021-04-04 09:30:01 +04:30
SMAH1 3fa2ca3789 Delete .gitignore 2021-04-04 09:29:48 +04:30
SMAH1 486f4fa260 Update package.json 2021-04-04 09:29:17 +04:30
SMAH1 ecc1b1262a Update package.json 2021-04-04 09:28:50 +04:30
Eric Fennis 343ebd3d7b test 2021-04-03 18:45:12 +02:00
Eric Fennis 46975e4b77 Merge branch 'feature/add-changelog-generator' into feature/fix-workflows 2021-04-03 18:10:26 +02:00
Eric Fennis 081a24d973 Add rm stats dir to clean command (#279) 2021-04-03 16:40:14 +02:00
Yashu Mittal b131832876 add lightbulb-off icon (#206)
* add lightbulb-off icon

* fix 2px spacing on one side

* update icon
2021-04-03 16:19:26 +02:00
SMAH1 a01d5c6f1e Update packages/lucide/scripts/buildTypes.js 2021-04-03 11:05:08 +04:30
SMAH1 9de8e78460 Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 11:00:09 +04:30
SMAH1 b07c5fe0cb Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 11:00:02 +04:30
SMAH1 08e4ff1e85 Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 10:59:54 +04:30
SMAH1 d9981fc309 Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 10:59:48 +04:30
SMAH1 d883fc2c79 Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 10:59:42 +04:30
SMAH1 7e676e35e4 Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 10:59:36 +04:30
SMAH1 c40df12e05 Update packages/lucide/scripts/buildTypes.js
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-03 10:59:17 +04:30
Eric Fennis b46b157dbc Add code-2 icon 2021-04-02 22:06:40 +02:00
Eric Fennis e749b67774 Merge branch 'master' of github.com:ericfennis/lucide 2021-04-02 21:58:42 +02:00
Yashu Mittal 4ad6bb1b77 Add terminal-2 icon (#181)
* Add terminal-2 icon

* rename terminal-square icon

* use base square shape

* Update icons/terminal-square.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-01 20:48:52 +02:00
Yashu Mittal 0b3b8ba09e Add star-half icon (#180)
* Add star-half icon

* Update icons/star-half.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-04-01 20:44:33 +02:00
dependabot[bot] 0c81502532 chore(deps): Bump y18n from 4.0.0 to 4.0.1 in /packages/lucide-react (#278)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 20:44:09 +02:00
SMAH1 ef3da7d14d Build d.ts for use in typescript 2021-03-31 11:58:04 +04:30
SMAH1 53d3a31574 Add lucide-angular 2021-03-30 18:52:38 +04:30
Eric Fennis a2a7adfde8 bump version figma 2021-03-28 22:54:08 +02:00
Eric Fennis 73b242a611 Bump version lucide to 0.15.0 2021-03-23 20:21:14 +01:00
Lucide Bot 9ed00c4266 📦 Bump version lucide-vue to 0.15.0 2021-03-23 19:18:09 +00:00
Eric Fennis c2427cea6b Merge branch 'master' of github.com:lucide-icons/lucide into feature/add-changelog-generator 2021-02-22 20:37:37 +01:00
Eric Fennis 7f1dc27ee3 Add Changelog generator 2021-02-21 18:57:11 +01:00
Eric Fennis 381dca62d1 Merge branch 'master' of github.com:lucide-icons/lucide into feature/add-changelog-generator 2021-02-21 13:49:40 +01:00
Eric Fennis 431a7b834a init changelog script 2021-02-21 13:48:23 +01:00
141 changed files with 14506 additions and 8201 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
labels: bug
labels: "🐛 bug"
---
<!--
+5 -2
View File
@@ -1,15 +1,18 @@
---
name: Icon request
about: Suggest an new icon for this project
labels: "icon request"
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:
* _Screenshots_ of similar icons:
+15
View File
@@ -0,0 +1,15 @@
---
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/master/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 tags.json) :
- **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? :
+74
View File
@@ -0,0 +1,74 @@
name: Continuous integration icons
on:
push:
branches:
- master
paths:
- icons/**
jobs:
create-release:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch tags
run: git fetch --all --tags
- name: Get latest tag
id: latest-tag
run: echo "::set-output name=LATEST_TAG::$(git describe --tags `git rev-list --tags --max-count=1`)"
- name: Get yarn cache directory path
id: yarn_cache
run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)"
- name: Get cached packaged
uses: actions/cache@v2
with:
path: ${{ steps.yarn_cache.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --pure-lockfile
- name: Check if we can patch
run: .github/workflows/version-up.sh --patch
- name: Create new version
id: new-version
run: echo "::set-output name=NEW_VERSION::$(.github/workflows/version-up.sh --patch)"
- name: Create change log
id: change-log
run: |
CHANGE_LOG=$(yarn --silent run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
CHANGE_LOG="${CHANGE_LOG//'%'/'%25'}"
CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}"
CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}"
echo $CHANGE_LOG
echo "::set-output name=CHANGE_LOG::$CHANGE_LOG"
env:
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
- name: Check output
run: |
echo "${{ steps.new-version.outputs.NEW_VERSION }}"
echo "${{ steps.change-log.outputs.CHANGE_LOG }}"
- name: 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 }}
+18
View File
@@ -0,0 +1,18 @@
name: 'Close stale issues and PR'
on:
schedule:
- cron: '45 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-pr-message: 'This PR was closed because it has been stalled for 5 days with no activity.'
close-pr-label: '🧶 stale'
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
+1
View File
@@ -2,6 +2,7 @@ name: Build Lucide
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
+156 -35
View File
@@ -28,12 +28,7 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -41,7 +36,6 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --pure-lockfile
- name: Set Auth Token
@@ -59,13 +53,11 @@ jobs:
- name: Publish
run: yarn workspace lucide publish
- name: Commit package.json
run: |
git add packages/lucide/package.json
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
commit -m ":package: Bump version lucide to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet
git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
git push origin HEAD:master
- 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'
@@ -73,12 +65,7 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -86,7 +73,6 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --pure-lockfile
- name: Set Auth Token
@@ -104,13 +90,11 @@ jobs:
- name: Publish
run: yarn workspace lucide-react publish
- name: Commit package.json
run: |
git add packages/lucide-react/package.json
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
commit -m ":package: Bump version lucide-react to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet
git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
git push origin HEAD:master
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-react-package-json
path: packages/lucide-react/package.json
lucide-vue:
if: github.repository == 'lucide-icons/lucide'
@@ -123,7 +107,6 @@ jobs:
node-version: '12.x'
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -131,7 +114,6 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --pure-lockfile
- name: Set Auth Token
@@ -149,10 +131,149 @@ jobs:
- name: Publish
run: yarn workspace lucide-vue publish
- name: Commit package.json
run: |
git add packages/lucide-vue/package.json
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
commit -m ":package: Bump version lucide-vue to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet
git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
git push origin HEAD:master
- 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@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
- uses: actions/cache@v2
with:
path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --pure-lockfile
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set new version
run: yarn workspace lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-vue-next build
- name: Test
run: yarn workspace lucide-vue-next test
- name: Publish
run: yarn workspace lucide-vue-next publish
- 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@v2
- uses: actions/cache@v2
with:
path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --pure-lockfile
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-angular build
- name: Test
run: yarn workspace lucide-angular test:headless
- name: Publish
run: yarn workspace lucide-angular publish dist
- 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@v2
- uses: actions/cache@v2
with:
path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --pure-lockfile
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Set package.json version lucide
run: yarn workspace lucide-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
- name: Build
run: yarn workspace lucide-preact build
- name: Test
run: yarn workspace lucide-preact test
- name: Publish
run: yarn workspace lucide-preact publish
- name: Upload package.json
uses: actions/upload-artifact@v2
with:
name: lucide-preact-package-json
path: packages/lucide-preact/package.json
upload-package-jsons:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: [pre-build, lucide, lucide-react, lucide-vue, lucide-vue-next, lucide-angular, lucide-preact]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Commit package.jsons
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-vue-package-json/package.json packages/lucide-vue/package.json
mv lucide-preact-package-json/package.json packages/lucide-preact/package.json
mv lucide-vue-next-package-json/package.json packages/lucide-vue-next/package.json
mv lucide-angular-json/package.json packages/lucide-angular/package.json
- name: Commit package.jsons
run: |
git add packages/*/package.json
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
commit -m ":package: Bump lucide package versions to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet
git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
git push origin HEAD:master
+284
View File
@@ -0,0 +1,284 @@
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
## get highest version tag for all branches
function highest_tag(){
local TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "$TAG"
}
## extract current branch name
function current_branch(){
## expected: heads/{branch_name}
## expected: {branch_name}
local BRANCH=$(git rev-parse --abbrev-ref HEAD | cut -d"/" -f2)
echo "$BRANCH"
}
## get latest/head commit hash number
function head_hash(){
local COMMIT_HASH=$(git rev-parse --verify HEAD)
echo "$COMMIT_HASH"
}
## extract tag commit hash code, tag name provided by argument
function tag_hash(){
local TAG_HASH=$(git log -1 --format=format:"%H" $1 2>/dev/null | tail -n1)
echo "$TAG_HASH"
}
## get latest revision number
function latest_revision(){
local REV=$(git rev-list --count HEAD 2>/dev/null)
echo "$REV"
}
## parse last found tag, extract it PARTS
function parse_last(){
local position=$(($1-1))
# two parts found only
local SUBS=( ${PARTS[$position]//-/ } )
#echo ${SUBS[@]}, size: ${#SUBS}
# found NUMBER
PARTS[$position]=${SUBS[0]}
#echo ${PARTS[@]}
# found SUFFIX
if [[ ${#SUBS} -ge 1 ]]; then
PARTS[4]=${SUBS[1],,} #lowercase
#echo ${PARTS[@]}, ${SUBS[@]}
fi
}
## increment REVISION part, don't touch STAGE
function increment_revision(){
PARTS[3]=$(( PARTS[3] + 1 ))
IS_DIRTY=1
}
## increment PATCH part, reset all other lower PARTS, don't touch STAGE
function increment_patch(){
PARTS[2]=$(( PARTS[2] + 1 ))
PARTS[3]=0
IS_DIRTY=1
}
## increment MINOR part, reset all other lower PARTS, don't touch STAGE
function increment_minor(){
PARTS[1]=$(( PARTS[1] + 1 ))
PARTS[2]=0
PARTS[3]=0
IS_DIRTY=1
}
## increment MAJOR part, reset all other lower PARTS, don't touch STAGE
function incremet_major(){
PARTS[0]="v$(( PARTS[0] + 1 ))"
PARTS[1]=0
PARTS[2]=0
PARTS[3]=0
IS_DIRTY=1
}
## increment the number only of last found PART: REVISION --> PATCH --> MINOR. don't touch STAGE
function increment_last_found(){
if [[ "${#PARTS[3]}" == 0 || "${PARTS[3]}" == "0" ]]; then
if [[ "${#PARTS[2]}" == 0 || "${PARTS[2]}" == "0" ]]; then
increment_minor
else
increment_patch
fi
else
increment_revision
fi
# stage part is not EMPTY
if [[ "${#PARTS[4]}" != 0 ]]; then
IS_SHIFT=1
fi
}
## compose version from PARTS
function compose(){
MAJOR="${PARTS[0]}"
MINOR=".${PARTS[1]}"
PATCH=".${PARTS[2]}"
REVISION=".${PARTS[3]}"
SUFFIX="-${PARTS[4]}"
if [[ "${#PATCH}" == 1 ]]; then # if empty {PATCH}
PATCH=""
fi
if [[ "${#REVISION}" == 1 ]]; then # if empty {REVISION}
REVISION=""
fi
if [[ "${PARTS[3]}" == "0" ]]; then # if revision is ZERO
REVISION=""
fi
# shrink patch and revision
if [[ -z "${REVISION// }" ]]; then
if [[ "${PARTS[2]}" == "0" ]]; then
PATCH=".0"
fi
else # revision is not EMPTY
if [[ "${#PATCH}" == 0 ]]; then
PATCH=".0"
fi
fi
# remove suffix if we don't have a alpha/beta/rc
if [[ "${#SUFFIX}" == 1 ]]; then
SUFFIX=""
fi
echo "${MAJOR}${MINOR}${PATCH}${REVISION}${SUFFIX}" #full format
}
# initial version used for repository without tags
INIT_VERSION=0.0.0.0-alpha
# do GIT data extracting
TAG=$(highest_tag)
REVISION=$(latest_revision)
BRANCH=$(current_branch)
TAG_HASH=$(tag_hash $TAG)
HEAD_HASH=$(head_hash)
# if tag and branch commit hashes are different, than print info about that
#echo $HEAD_HASH vs $TAG_HASH
if [[ "$@" == "" ]]; then
if [[ "$TAG_HASH" == "$HEAD_HASH" ]]; then
echo "Tag $TAG and HEAD are aligned. We will stay on the TAG version."
echo ""
NO_ARGS_VALUE='--stay'
else
PATTERN="^[0-9]+.[0-9]+(.[0-9]+)*(-(alpha|beta|rc))*$"
if [[ "$BRANCH" =~ $PATTERN ]]; then
echo "Detected version branch '$BRANCH'. We will auto-increment the last version PART."
echo ""
NO_ARGS_VALUE='--default'
else
echo "Detected branch name '$BRANCH' than does not match version pattern. We will increase MINOR."
echo ""
NO_ARGS_VALUE='--minor'
fi
fi
fi
#
# {MAJOR}.{MINOR}[.{PATCH}[.{REVISION}][-(.*)]
#
# Suffix: alpha, beta, rc
# No Suffix --> {NEW_VERSION}-alpha
# alpha --> beta
# beta --> rc
# rc --> {VERSION}
#
PARTS=( ${TAG//./ } )
parse_last ${#PARTS[@]} # array size as argument
#echo ${PARTS[@]}
# if no parameters than emulate --default parameter
if [[ "$@" == "" ]]; then
set -- $NO_ARGS_VALUE
fi
# parse input parameters
for i in "$@"
do
key="$i"
case $key in
-a|--alpha) # switched to ALPHA
PARTS[4]="alpha"
IS_SHIFT=1
;;
-b|--beta) # switched to BETA
PARTS[4]="beta"
IS_SHIFT=1
;;
-c|--release-candidate) # switched to RC
PARTS[4]="rc"
IS_SHIFT=1
;;
-r|--release) # switched to RELEASE
PARTS[4]=""
IS_SHIFT=1
;;
-p|--patch) # increment of PATCH
increment_patch
;;
-e|--revision) # increment of REVISION
increment_revision
;;
-g|--git-revision) # use git revision number as a revision part§
PARTS[3]=$(( REVISION ))
IS_DIRTY=1
;;
-i|--minor) # increment of MINOR by default
increment_minor
;;
--default) # stay on the same stage, but increment only last found PART of version code
increment_last_found
;;
-m|--major) # increment of MAJOR
incremet_major
;;
-s|--stay) # extract version info
IS_DIRTY=1
NO_APPLY_MSG=1
;;
-t|--tag-only) # extract version info
TAG_ONLY=1
;;
--apply)
DO_APPLY=1
;;
-h|--help)
help
;;
esac
shift
done
# detected shift, but no increment
if [[ "$IS_SHIFT" == "1" ]]; then
# temporary disable stage shift
stage=${PARTS[4]}
PARTS[4]=''
# detect first run on repository, INIT_VERSION was used
if [[ "$(compose)" == "0.0" ]]; then
increment_minor
fi
PARTS[4]=$stage
fi
# no increment applied yet and no shift of state, do minor increase
if [[ "$IS_DIRTY$IS_SHIFT" == "" ]]; then
increment_minor
fi
compose
# is proposed tag in conflict with any other TAG
PROPOSED_HASH=$(tag_hash $(compose))
if [[ "${#PROPOSED_HASH}" -gt 0 && "$NO_APPLY_MSG" == "" ]]; then
echo -e "\033[31mERROR:\033[0m "
echo -e "\033[31mERROR:\033[0m Found conflict with existing tag \033[32m$(compose)\033[0m / $PROPOSED_HASH"
echo -e "\033[31mERROR:\033[0m Only manual resolving is possible now."
echo -e "\033[31mERROR:\033[0m "
echo -e "\033[31mERROR:\033[0m To Resolve try to add --revision or --patch modifier."
echo -e "\033[31mERROR:\033[0m "
echo ""
exit 1
fi
+1
View File
@@ -10,3 +10,4 @@ coverage
stats
*.log
packages/**/src/icons/*.js
packages/**/src/icons/*.ts
+4 -2
View File
@@ -12,12 +12,13 @@ Feel free to open a pull-request to contribute to this project.
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
Guidelines for pull requests:
- __Make your commit messages as descriptive as possible.__ Include as much information as you can. Explain anything that the file diffs themselves wont make apparent.
- __Document your pull request__. Explain your fix, link to the relevant issue, add screenshots when adding new icons.
- __Make sure the target of your pull request is the relevant branch__. Most of bugfix or new feature should go to the `master` branch.
- __Include only related work__. If your pull request has unrelated commit, it won't be accepted.
### Pull Requests Including Icons
### Pull Requests Including Icons
#### Guidelines
@@ -27,7 +28,7 @@ Read it here: [ICON_GUIDELINES](docs/ICON_DESIGN_GUIDE.md)
#### Submitting Mulitple Icons
If you want submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keep the thread clean and scoped.
So don't submit multiple icons in one PR that have noting to do with each other.
So don't submit multiple icons in one PR that have noting to do with each other.
So for example don't create one PR with icons: `arrow-up`, `bicycle`, `arrow-down`.
Seperate them by two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`.
@@ -38,4 +39,5 @@ Before creating an icon request, please search to see if someone has requested t
If the icon has not already been requested, [create an issue](https://github.com/lucide-icons/lucide/issues/new?title=Icon%20Request:) with a title of `Icon request: <icon name>` and add as much information as possible.
## Icon Requests from Feather
If you are a designer who wants to contribute to Lucide but you don't know what icons to work on, then have a look at the Requests from Feather. All open, unfinished and valid requests can be found in [Feather Icon Requests](https://github.com/lucide-icons/lucide/issues/119).
+46 -3
View File
@@ -27,7 +27,10 @@ We're trying to expanding the icon set as much as possible while keeping it nice
* [Usage](#usage)
* [Web](#web)
* [React](#react)
* [Vue](#vue)
* [Vue 2](#vue-2)
* [Vue 3](#vue-3)
* [Angular](#angular)
* [Preact](#preact)
* [Figma](#figma)
* [Contributing](#contributing)
* [Community](#community)
@@ -52,7 +55,7 @@ npm install lucide
yarn add lucide
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/blob/master/packages/lucide-react/README.md).
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide#lucide).
### React
@@ -68,7 +71,7 @@ npm install lucide-react
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-react#lucide-react).
### Vue
### Vue 2
Implementation of the lucide icon library for vue applications.
@@ -82,6 +85,46 @@ npm install lucide-vue
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-vue#lucide-vue).
### Vue 3
Implementation of the lucide icon library for vue applications.
```sh
yarn add lucide-vue-next
# or
npm install lucide-vue-next
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-vue-next#lucide-vue-next).
### Angular
```sh
yarn add lucide-angular
# or
npm install lucide-angular
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/packages/lucide-angular#lucide-angular).
### Preact
Implementation of the lucide icon library for preact applications.
```sh
yarn add lucide-preact
# or
npm install lucide-preact
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-preact#lucide-preact).
### Figma
The lucide figma plugin.
+1
View File
@@ -1,5 +1,6 @@
module.exports = {
presets: ['@babel/env'],
// babelrcRoots: ['.', './packages/*'],
env: {
test: {
presets: ['@babel/env'],
+16
View File
@@ -0,0 +1,16 @@
<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"
>
<path d="M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" />
<path d="M13.73 21a2 2 0 01-3.46 0" />
<path d="M2 8c0-2.2.7-4.3 2-6" />
<path d="M22 8a10 10 0 00-2-6" />
</svg>

After

Width:  |  Height:  |  Size: 378 B

+22
View File
@@ -0,0 +1,22 @@
<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="8" height="14" x="8" y="6" rx="4" />
<path d="M19 7l-3 2" />
<path d="M5 7l3 2" />
<path d="M19 19l-3-2" />
<path d="M5 19l3-2" />
<path d="M20 13h-4" />
<path d="M4 13h4" />
<path d="M10 4l1 2" />
<path d="M14 4l-1 2" />
</svg>

After

Width:  |  Height:  |  Size: 462 B

+14
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"
>
<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z" />
<path d="M9 12l2 2 4-4" />
</svg>

After

Width:  |  Height:  |  Size: 325 B

+14
View File
@@ -0,0 +1,14 @@
<svg
width="24"
height="24"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M7 15l5 5 5-5" />
<path d="M7 9l5-5 5 5" />
</svg>

After

Width:  |  Height:  |  Size: 265 B

+14
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"
>
<circle cx="12" cy="12" r="10" />
<path d="M22 2L2 22" />
</svg>

After

Width:  |  Height:  |  Size: 270 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" />
<path d="M15 2H9a1 1 0 00-1 1v2a1 1 0 001 1h6a1 1 0 001-1V3a1 1 0 00-1-1z" />
<path d="M9 13l2 2 4-4" />
</svg>

After

Width:  |  Height:  |  Size: 399 B

+16
View File
@@ -0,0 +1,16 @@
<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"
>
<path d="M16 4h2a2 2 0 012 2v4M8 4H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2v-2" />
<rect x="8" y="2" width="8" height="4" rx="1" ry="1" />
<path d="M21 14H11" />
<path d="M15 10l-4 4 4 4" />
</svg>

After

Width:  |  Height:  |  Size: 411 B

+16
View File
@@ -0,0 +1,16 @@
<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"
>
<path d="M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" />
<path d="M15 2H9a1 1 0 00-1 1v2a1 1 0 001 1h6a1 1 0 001-1V3a1 1 0 00-1-1z" />
<path d="M15 11l-6 6" />
<path d="M9 11l6 6" />
</svg>

After

Width:  |  Height:  |  Size: 422 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M20 16.2A4.5 4.5 0 0017.5 8h-1.8A7 7 0 104 14.9" />
<path d="M16 17L7 17" />
<path d="M17 21L9 21" />
</svg>

After

Width:  |  Height:  |  Size: 325 B

+14
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"
>
<path d="M13.63 22A3.3 3.3 0 0017 18.79a3.3 3.3 0 00-3.38-3.22h-1.34A5.23 5.23 0 007.25 12 5.13 5.13 0 002 17c0 2.76 2.35 5 5.25 5h6.38z" />
<path d="M9.95 9a6.13 6.13 0 015.5-5.18 4.77 4.77 0 006.67 6.67A6.13 6.13 0 0119.46 15" />
</svg>

After

Width:  |  Height:  |  Size: 444 B

+18
View File
@@ -0,0 +1,18 @@
<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"
>
<path d="M12 2v2" />
<path d="M5.22 5.22l1.42 1.42" />
<path d="M20 12h2" />
<path d="M15.97 12.5A4 4 0 009.5 8.88" />
<path d="M13.63 22A3.3 3.3 0 0017 18.79a3.3 3.3 0 00-3.38-3.22h-1.34A5.23 5.23 0 007.25 12 5.13 5.13 0 002 17c0 2.76 2.35 5 5.25 5h6.38z" />
<path d="M17.36 6.64l1.42-1.42" />
</svg>

After

Width:  |  Height:  |  Size: 515 B

+14
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"
>
<path d="M17.5 21a4.5 4.5 0 100-9h-1.8A7 7 0 109 21h8.5z" />
<path d="M22 10c0-1.5-1.5-3-3.5-3H17c-.7-2.3-2.9-4-5.4-4-2.7 0-5 2-5.5 4.5" />
</svg>

After

Width:  |  Height:  |  Size: 352 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M18 16L22 12L18 8" />
<path d="M6 8L2 12L6 16" />
<path d="M14.5 4L9.5 20" />
</svg>

After

Width:  |  Height:  |  Size: 301 B

+16
View File
@@ -0,0 +1,16 @@
<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"
>
<path d="M21 21l-6-6m6 6v-4.8m0 4.8h-4.8" />
<path d="M3 16.2V21m0 0h4.8M3 21l6-6" />
<path d="M21 7.8V3m0 0h-4.8M21 3l-6 6" />
<path d="M3 7.8V3m0 0h4.8M3 3l6 6" />
</svg>

After

Width:  |  Height:  |  Size: 382 B

+16
View File
@@ -0,0 +1,16 @@
<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 x="2" y="6" width="20" height="12" rx="2" />
<path d="M12 12h.01" />
<path d="M17 12h.01" />
<path d="M7 12h.01" />
</svg>

After

Width:  |  Height:  |  Size: 338 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M9 10h.01" />
<path d="M15 10h.01" />
<path d="M12 2a8 8 0 00-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 00-8-8z" />
</svg>

After

Width:  |  Height:  |  Size: 349 B

+17
View File
@@ -0,0 +1,17 @@
<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"
>
<circle cx="6" cy="15" r="4" />
<circle cx="18" cy="15" r="4" />
<path d="M14 15a2 2 0 00-2-2 2 2 0 00-2 2" />
<path d="M2.5 13L5 7c.7-1.3 1.4-2 3-2" />
<path d="M21.5 13L19 7c-.7-1.3-1.5-2-3-2" />
</svg>

After

Width:  |  Height:  |  Size: 416 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M21 3H3v7h18V3z" />
<path d="M21 14h-5v7h5v-7z" />
<path d="M12 14H3v7h9v-7z" />
</svg>

After

Width:  |  Height:  |  Size: 304 B

+16
View File
@@ -0,0 +1,16 @@
<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"
>
<path d="M9 18h6" />
<path d="M10 22h4" />
<path d="M2 2l20 20" />
<path d="M8.91 14a4.61 4.61 0 00-1.41-2.5C6.23 10.23 6 9 6 8a6 6 0 01.084-1M9 2.804A6 6 0 0118 8a4.651 4.651 0 01-1.031 3" />
</svg>

After

Width:  |  Height:  |  Size: 409 B

+17
View File
@@ -0,0 +1,17 @@
<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"
>
<path d="M5.5 20H8" />
<path d="M17 9h.01" />
<rect x="12" y="4" width="10" height="16" rx="2" />
<path d="M8 6H4a2 2 0 00-2 2v6a2 2 0 002 2h4" />
<circle cx="17" cy="15" r="1" />
</svg>

After

Width:  |  Height:  |  Size: 398 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M10 15V9" />
<path d="M14 15V9" />
<path d="M7.714 2h8.572L22 7.714v8.572L16.286 22H7.714L2 16.286V7.714L7.714 2z" />
</svg>

After

Width:  |  Height:  |  Size: 341 B

+16
View File
@@ -0,0 +1,16 @@
<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"
>
<circle cx="12" cy="5" r="1" />
<path d="M9 20L12 14L15 20" />
<path d="M6 8L12 10L18 8" />
<path d="M12 10V14" />
</svg>

After

Width:  |  Height:  |  Size: 331 B

+18
View File
@@ -0,0 +1,18 @@
<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"
>
<path d="M13 2l-2 2.5h3L12 7" />
<path d="M12 22v-3" />
<path d="M10 13v-2.5" />
<path d="M10 12.5v-2" />
<path d="M14 12.5v-2" />
<path d="M16 15a2 2 0 00-2-2h-4a2 2 0 00-2 2v2a2 2 0 002 2h4a2 2 0 002-2v-2z" />
</svg>

After

Width:  |  Height:  |  Size: 432 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M18.36 6.64A9 9 0 0120.77 15M5.63 6.64A9 9 0 1018.706 19" />
<path d="M12 2v4" />
<path d="M2 2l20 20" />
</svg>

After

Width:  |  Height:  |  Size: 329 B

+17
View File
@@ -0,0 +1,17 @@
<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"
>
<path d="M16 16l3-8 3.001 8A5.002 5.002 0 0116 16z" />
<path d="M2 16l3-8 3.001 8A5.002 5.002 0 012 16z" />
<path d="M7 21h10" />
<path d="M12 3v18" />
<path d="M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" />
</svg>

After

Width:  |  Height:  |  Size: 416 B

+1 -1
View File
@@ -9,6 +9,6 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12.22 2h-.44a2 2 0 00-2 2v.18a2 2 0 01-1 1.73l-.43.25a2 2 0 01-2 0l-.15-.08a2 2 0 00-2.73.73l-.22.38a2 2 0 00.73 2.73l.15.1a2 2 0 011 1.72v.51a2 2 0 01-1 1.74l-.15.09a2 2 0 00-.73 2.73l.22.38a2 2 0 002.73.73l.15-.08a2 2 0 012 0l.43.25a2 2 0 011 1.73V20a2 2 0 002 2h.44a2 2 0 002-2v-.18a2 2 0 011-1.73l.43-.25a2 2 0 012 0l.15.08a2 2 0 002.73-.73l.22-.39a2 2 0 00-.73-2.73l-.15-.08a2 2 0 01-1-1.74v-.5a2 2 0 011-1.74l.15-.09a2 2 0 00.73-2.73l-.22-.38a2 2 0 00-2.73-.73l-.15.08a2 2 0 01-2 0l-.43-.25a2 2 0 01-1-1.73V4a2 2 0 00-2-2z" />
<circle cx="12" cy="12" r="3" />
<path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z" />
</svg>

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 788 B

+16
View File
@@ -0,0 +1,16 @@
<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"
>
<path d="M15 15l6 6m-6-6v4.8m0-4.8h4.8" />
<path d="M9 19.8V15m0 0H4.2M9 15l-6 6" />
<path d="M15 4.2V9m0 0h4.8M15 9l6-6" />
<path d="M9 4.2V9m0 0H4.2M9 9L3 3" />
</svg>

After

Width:  |  Height:  |  Size: 379 B

+15
View File
@@ -0,0 +1,15 @@
<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 x="3" y="3" width="18" height="18" rx="2" ry="2" />
<line x1="9" y1="3" x2="9" y2="21" />
<path d="M17 16L13 12L17 8" />
</svg>

After

Width:  |  Height:  |  Size: 341 B

+15
View File
@@ -0,0 +1,15 @@
<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 x="3" y="3" width="18" height="18" rx="2" ry="2" />
<line x1="9" y1="3" x2="9" y2="21" />
<path d="M13 8L17 12L13 16" />
</svg>

After

Width:  |  Height:  |  Size: 341 B

+17
View File
@@ -0,0 +1,17 @@
<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"
>
<circle cx="9" cy="12" r="1" />
<circle cx="15" cy="12" r="1" />
<path d="M8 20v2h8v-2" />
<path d="M12.5 17l-.5-1-.5 1h1z" />
<path d="M16 20a2 2 0 001.56-3.25 8 8 0 10-11.12 0A2 2 0 008 20" />
</svg>

After

Width:  |  Height:  |  Size: 413 B

+13
View File
@@ -0,0 +1,13 @@
<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"
>
<path d="M12 17.8L5.8 21 7 14.1 2 9.3l7-1L12 2" />
</svg>

After

Width:  |  Height:  |  Size: 261 B

+17
View File
@@ -0,0 +1,17 @@
<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"
>
<path d="M19 20L10 4" />
<path d="M5 20l9-16" />
<path d="M3 20h18" />
<path d="M12 15l-3 5" />
<path d="M12 15l3 5" />
</svg>

After

Width:  |  Height:  |  Size: 338 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M7 11l2-2-2-2" />
<path d="M11 13h4" />
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
</svg>

After

Width:  |  Height:  |  Size: 321 B

+18
View File
@@ -0,0 +1,18 @@
<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"
>
<path d="M3 9V7a2 2 0 012-2h14a2 2 0 012 2v2M3 15v2a2 2 0 002 2h14a2 2 0 002-2v-2" />
<path d="M21 15a3 3 0 110-6" />
<path d="M3 15a3 3 0 100-6" />
<path d="M13 5v2" />
<path d="M13 17v2" />
<path d="M13 11v2" />
</svg>

After

Width:  |  Height:  |  Size: 434 B

+17
View File
@@ -0,0 +1,17 @@
<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"
>
<path d="M21 4H3" />
<path d="M18 8H6" />
<path d="M19 12H9" />
<path d="M16 16h-6" />
<path d="M11 20H9" />
</svg>

After

Width:  |  Height:  |  Size: 327 B

+15
View File
@@ -0,0 +1,15 @@
<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"
>
<path d="M2 8l2 2-2 2 2 2-2 2" />
<path d="M22 8l-2 2 2 2-2 2 2 2" />
<rect x="8" y="5" width="8" height="14" rx="1" />
</svg>

After

Width:  |  Height:  |  Size: 334 B

+3 -1
View File
@@ -9,5 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M9.59 4.59A2 2 0 1111 8H2m10.59 11.41A2 2 0 1014 16H2m15.73-8.27A2.5 2.5 0 1119.5 12H2" />
<path d="M17.7 7.7a2.5 2.5 0 111.8 4.3H2" />
<path d="M9.6 4.6A2 2 0 1111 8H2" />
<path d="M12.6 19.4A2 2 0 1014 16H2" />
</svg>

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 336 B

+18 -5
View File
@@ -1,18 +1,30 @@
{
"private": true,
"workspaces": [
"packages/*",
"site"
],
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/jest", "**/jest/**",
"**/jasmine", "**/jasmine/**",
"**/react", "**/react/**",
"**/testing-library__jest-dom", "**/testing-library__jest-dom/**",
"**/testing-library__react-hooks", "**/testing-library__react-hooks/**",
"**/react-dom", "**/react-dom/**",
"**/react-test-renderer", "**/react-test-renderer/**"
]
},
"scripts": {
"build": "yarn lucide build && yarn lucide-react build && yarn lucide-vue build",
"test": "yarn lucide build:icons && yarn lucide-react build:icons && yarn lucide-vue build:icons && jest",
"lucide": "yarn workspace lucide",
"lucide-angular": "yarn workspace lucide-angular",
"lucide-react": "yarn workspace lucide-react",
"lucide-vue": "yarn workspace lucide-vue",
"build:icons": "babel-node ./scripts/buildIcons.js --presets @babel/env",
"optimize": "babel-node ./scripts/optimizeSvgs.js --presets @babel/env",
"addtags": "babel-node ./scripts/addMissingKeysToTags.js --presets @babel/env"
"addtags": "babel-node ./scripts/addMissingKeysToTags.js --presets @babel/env",
"generate:changelog": "babel-node ./scripts/generateChangelog.js --presets @babel/env"
},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.25.2",
@@ -38,6 +50,7 @@
"jest": "^26.4.2",
"lint-staged": "^10.5.3",
"minimist": "^1.2.5",
"node-fetch": "^2.6.1",
"prettier": "1.17.1",
"rollup": "^2.7.3",
"rollup-plugin-license": "^2.0.0",
+51
View File
@@ -0,0 +1,51 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
.editorconfig
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
#npm-yarn
package-lock.json
src/createElement.js
+15
View File
@@ -0,0 +1,15 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+163
View File
@@ -0,0 +1,163 @@
# Lucide Angular
Implementation of the lucide icon library for angular applications.
> What is lucide? Read it [here](https://github.com/lucide-icons/lucide#what-is-lucide).
## Installation
``` sh
yarn add lucide-angular
# or
npm install lucide-angular
```
## How to use
There are three ways for use this library.
### Method 1: createElement
After install `lucide-angular` change content of file `app.component.html` and `app.component.ts`.
``` html
<!-- app.component.html -->
<div id="lucide-icon"></div>
```
``` js
// app.component.ts
import { Component, OnInit } from '@angular/core';
import { createElement } from 'lucide-angular';
import { Activity } from 'lucide-angular/icons';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
ngOnInit(): void {
const div = document.getElementById('lucide-icon');
const elm = createElement(Activity);
elm.setAttribute('color', 'red'); // or set `width`, `height`, `fill`, `stroke-width`, ...
if (div) {
div.appendChild(elm);
}
}
}
```
### Method 2: User __Tag__ with __name__ property
After install `lucide-angular` change content of file `app.component.html`, `app.component.ts`, `app.component.css` and `app.module.ts`.
``` js
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { LucideAngularModule, AlarmCheck, Edit } from 'lucide-angular';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
LucideAngularModule.pick({ AlarmCheck, Edit }) // add all of icons that is imported.
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```
``` html
<!-- app.component.html -->
<lucide-icon name="alarm-check" class="myicon"></lucide-icon>
<lucide-icon name="edit" class="myicon"></lucide-icon>
```
### Method 3: User __Tag__ with __img__ property
After install `lucide-angular` change content of file `app.component.html`, `app.component.ts`, `app.component.css` and `app.module.ts`.
``` js
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { LucideAngularModule } from 'lucide-angular';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
LucideAngularModule.pick({ })
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```
``` xml
<!-- app.component.html -->
<lucide-icon [img]="ico1" class="myicon"></lucide-icon>
<lucide-icon [img]="ico2" class="myicon"></lucide-icon>
```
``` js
// app.component.ts
import { Component } from '@angular/core';
import { Airplay, Circle } from 'lucide-angular';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
ico1 = Airplay;
ico2 = Circle;
}
```
## Notes
### Import all icons
In `Method 2`: import all icons in `app.module.ts` by:
``` js
...
import { icons } from 'lucide-angular/icons';
....
LucideAngularModule.pick(icons)
....
```
### Tags
You can use the following tags instead of `lucide-icon`:
- lucide-angular
- i-lucide
- span-lucide
All of the above are the same
+48
View File
@@ -0,0 +1,48 @@
{
"$schema": "../../node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "",
"projects": {
"lucide-angular": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "tsconfig.lib.json",
"project": "ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.lib.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "lucide-angular"
}
+49
View File
@@ -0,0 +1,49 @@
/* eslint-disable import/no-extraneous-dependencies, global-require, func-names */
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/lucide-angular'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadlessCI'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
},
singleRun: false,
restartOnFileChange: true,
});
};
+7
View File
@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"dest": "dist",
"lib": {
"entryFile": "src/index.ts"
}
}
+68
View File
@@ -0,0 +1,68 @@
{
"name": "lucide-angular",
"description": "Lucide Angular package, Lucide is a community-run fork of Feather Icons, open for anyone to contribute icons.",
"version": "0.15.1-beta.1",
"author": "SMAH1",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
"repository": {
"type": "git",
"url": "https://github.com/lucide-icons/lucide.git",
"directory": "packages/lucide-angular"
},
"keywords": [
"Lucide",
"Angular",
"Feather",
"Icons",
"Icon",
"Feather Icons",
"Fontawesome",
"Font Awesome"
],
"scripts": {
"build": "yarn clean && yarn build:icons && yarn build:ng",
"clean": "rm -rf dist && rm -rf ./src/icons/*.ts",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-angular/src --templateSrc=../packages/lucide-angular/scripts/exportTemplate --iconFileExtention=.ts --exportFileName=index.ts",
"build:ng": "ng build --prod",
"test:headless": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc"
},
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/common": "^11.2.6",
"@angular/core": "^11.2.6"
},
"devDependencies": {
"@angular/common": "~11.2.6",
"@angular/compiler": "~11.2.6",
"@angular/core": "~11.2.6",
"@angular/platform-browser": "~11.2.6",
"@angular/platform-browser-dynamic": "~11.2.6",
"@angular-devkit/build-angular": "~0.1102.5",
"@angular/cli": "~11.2.5",
"@angular/compiler-cli": "~11.2.6",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.0.0",
"protractor": "~7.0.0",
"puppeteer": "^8.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.1.5"
}
}
@@ -0,0 +1,12 @@
export default ({ componentName, children }) => `
import { IconData } from './types';
import defaultAttributes from './constants/default-attributes';
const ${componentName}: IconData = [
'svg',
defaultAttributes,
${JSON.stringify(children)}
];
export default ${componentName};
`;
@@ -0,0 +1,26 @@
import { IconData } from '../icons/types'
/**
* Creates a new SVGElement from icon node
* @param {string} tag
* @param {object} attrs
* @param {array} children
* @returns {SVGElement}
*/
export const createElement = ([tag, attrs, children = []]: IconData): SVGElement => {
const element = document.createElementNS('http://www.w3.org/2000/svg', tag);
Object.keys(attrs).forEach(name => {
element.setAttribute(name, attrs[name]);
});
if (children.length) {
children.forEach((child: IconData) => {
const childElement = createElement(child);
element.appendChild(childElement);
});
}
return element;
};
@@ -0,0 +1,11 @@
export default {
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,0 +1,8 @@
{
"ngPackage": {
"dest": "dist",
"lib": {
"entryFile": "./index.ts"
}
}
}
@@ -0,0 +1,3 @@
export type IconNode = readonly [string, object];
export type IconData = readonly [string, object, IconNode[]? ];
export type Icons = { [key: string]: IconData }
+7
View File
@@ -0,0 +1,7 @@
import * as icons from './icons';
export * from './lib/lucide-angular.component';
export * from './lib/lucide-angular.module';
export * from './helpers/create-element';
export * from './icons';
export { icons };
+3
View File
@@ -0,0 +1,3 @@
export class Icons {
constructor(private icons: object) {}
}
@@ -0,0 +1,28 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LucideAngularModule } from './lucide-angular.module';
import { LucideAngularComponent } from './lucide-angular.component';
describe('LucideAngularComponent', () => {
let component: LucideAngularComponent;
let fixture: ComponentFixture<LucideAngularComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ LucideAngularComponent ],
imports: [
LucideAngularModule.pick({ })
],
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(LucideAngularComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,72 @@
import { Component, ElementRef, Input, Inject, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
import { Icons } from './icons.provider';
import { IconData } from '../icons/types';
import { createElement } from '../helpers/create-element';
@Component({
selector: 'lucide-angular, lucide-icon, i-lucide, span-lucide',
template: `<ng-content></ng-content>`,
styles: [`
:host {
display: inline-block;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
width: 24px;
height: 24px;
}
`]
})
export class LucideAngularComponent implements OnChanges {
@Input() name!: string;
@Input() img!: IconData;
constructor(
@Inject(ElementRef) private elem: ElementRef,
@Inject(ChangeDetectorRef) private changeDetector: ChangeDetectorRef,
@Inject(Icons) private icons: Icons
) { }
ngOnChanges(changes: SimpleChanges): void {
if (changes.name) {
// icons are provided as an array of objects because of "multi: true"
const icons = Object.assign({}, ...(this.icons as any as object[]));
const icoOfName = icons[this.toPascalCase(changes.name.currentValue)] || '';
if (!icoOfName) {
console.warn(
`Icon not found: ${changes.name.currentValue}\n` +
`Please check icon name or \'lucide icon list\'`
);
} else {
const icoElement = createElement(icoOfName);
icoElement.setAttribute('stroke-width', 'inherit');
icoElement.setAttribute('fill', 'inherit');
icoElement.removeAttribute('width');
icoElement.removeAttribute('height');
this.elem.nativeElement.innerHTML = '';
this.elem.nativeElement.append(icoElement);
}
}
else if (changes.img) {
const icoElement = createElement(changes.img.currentValue);
icoElement.setAttribute('stroke-width', 'inherit');
icoElement.setAttribute('fill', 'inherit');
icoElement.removeAttribute('width');
icoElement.removeAttribute('height');
this.elem.nativeElement.innerHTML = '';
this.elem.nativeElement.append(icoElement);
}
this.changeDetector.markForCheck();
}
toPascalCase(str: string): string {
return str.replace(/(\w)([a-z0-9]*)(_|-|\s*)/g, (g0, g1, g2) => g1.toUpperCase() + g2.toLowerCase());
}
}
@@ -0,0 +1,30 @@
import { NgModule, ModuleWithProviders, Optional } from '@angular/core';
import { LucideAngularComponent } from './lucide-angular.component';
import { Icons } from './icons.provider';
import { IconData } from '../icons/types';
@NgModule({
declarations: [LucideAngularComponent],
imports: [
],
exports: [LucideAngularComponent]
})
export class LucideAngularModule {
constructor(@Optional() private icons: Icons) {
if (!this.icons) {
throw new Error(
`No icon provided. Make sure to use 'LucideAngularModule.pick({ ... })' when importing the module\n`
);
}
}
static pick(icons: { [key: string]: IconData }): ModuleWithProviders<LucideAngularModule> {
return {
ngModule: LucideAngularModule,
providers: [
{ provide: Icons, multi: true, useValue: icons }
]
};
}
}
+26
View File
@@ -0,0 +1,26 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
+32
View File
@@ -0,0 +1,32 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": true,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"paths": {
"lucide-angular": [
"dist"
],
"lucide-angular/*": [
"dist/*"
],
},
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false
}
}
+27
View File
@@ -0,0 +1,27 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true,
"fullTemplateTypeCheck": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
@@ -0,0 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}
}
@@ -0,0 +1,17 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
+152
View File
@@ -0,0 +1,152 @@
{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": {
"align": {
"options": [
"parameters",
"statements"
]
},
"array-type": false,
"arrow-return-shorthand": true,
"curly": true,
"deprecation": {
"severity": "warning"
},
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"",
"kebab-case"
],
"eofline": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": {
"options": [
"spaces"
]
},
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"quotemark": [
true,
"single"
],
"semicolon": {
"options": [
"always"
]
},
"space-before-function-paren": {
"options": {
"anonymous": "never",
"asyncArrow": "always",
"constructor": "never",
"method": "never",
"named": "never"
}
},
"typedef": [
true,
"call-signature"
],
"typedef-whitespace": {
"options": [
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
]
},
"variable-name": {
"options": [
"ban-keywords",
"check-format",
"allow-pascal-case"
]
},
"whitespace": {
"options": [
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type",
"check-typecast"
]
},
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "lucide-figma",
"version": "0.13.0",
"version": "0.15.11",
"license": "ISC",
"private": true,
"main": "build/ui.js",
@@ -15,7 +15,7 @@
"css-loader": "^3.0.0",
"html-webpack-inline-source-plugin": "^0.0.10",
"html-webpack-plugin": "^3.2.0",
"lucide-react": "^0.13.0",
"lucide-react": "0.15.11",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"style-loader": "^0.23.1",
+12 -20
View File
@@ -2054,9 +2054,9 @@ locate-path@^3.0.0:
path-exists "^3.0.0"
lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
@@ -2077,13 +2077,13 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"
lucide-react@^0.13.0:
version "0.13.0"
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.13.0.tgz#7bcc60f85c207b9eed6f4a6c713dfdcb5928d2b3"
integrity sha512-4BmILrkeydq8YhHjDRe9qKd42nsog77ZW/bgqy3A56d9pV5v3/2a2gK8qDbAAwpYZva+MIhOTRWpJW8BgtQGUA==
lucide-react@0.15.11:
version "0.15.11"
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.15.11.tgz#34f2d76d1e7fda978f4a8b2d0538b84ecbecf106"
integrity sha512-2NOpAVt2ScBkwlRvub7adfmWZX1o+so+3elAtyp5g9jaAKthszAgKZwNEFhB2Gl1tT5CuvVLPsjaRjhnpNjq9w==
dependencies:
prop-types "^15.7.2"
react "^17.0.1"
react "^16.5.1"
make-dir@^2.0.0:
version "2.1.0"
@@ -2723,7 +2723,7 @@ react-is@^16.8.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react@^16.8.6:
react@^16.5.1, react@^16.8.6:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
@@ -2732,14 +2732,6 @@ react@^16.8.6:
object-assign "^4.1.1"
prop-types "^15.6.2"
react@^17.0.1:
version "17.0.1"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.1.tgz#6e0600416bd57574e3f86d92edba3d9008726127"
integrity sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
@@ -3084,9 +3076,9 @@ split-string@^3.0.1, split-string@^3.0.2:
extend-shallow "^3.0.0"
ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
version "6.0.2"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
dependencies:
figgy-pudding "^3.5.1"
+9
View File
@@ -0,0 +1,9 @@
stats
node_modules
tests
scripts
build
src
babel.config.js
jest.config.js
rollup.config.js
+15
View File
@@ -0,0 +1,15 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+77
View File
@@ -0,0 +1,77 @@
# Lucide Preact
Implementation of the lucide icon library for preact applications.
> What is lucide? Read it [here](https://github.com/lucide-icons/lucide#what-is-lucide).
## Installation
```sh
yarn add lucide-preact
# or
npm install lucide-preact
```
## How to use
It's build with ESmodules so it's completely threeshakable.
Each icon can be imported as a preact component.
### Example
You can pass additional props to adjust the icon.
``` js
import { Camera } from 'lucide-preact';
// Returns PreactComponent
// Usage
const App = () => {
return <Camera color="red" size={48}/>
};
export default App;
```
### Props
| name | type | default
| ------------ | -------- | --------
| `size` | *Number* | 24
| `color` | *String* | currentColor
| `strokeWidth`| *Number* | 2
### Custom props / svg attributes
You can also pass custom props that will be added in the as attributes. With that you can modify the icons look by passing svg attributes.
``` js
// 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).
### One generic icon component
It is possible to create one generic icon component to load icons.
> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
#### Icon Component Example
``` js
import * as icons from 'lucide-preact';
const Icon = ({name, color, size}) => {
const LucideIcon = icons[name];
return <LucideIcon color={color} size={size} />
};
export default Icon;
```
+6
View File
@@ -0,0 +1,6 @@
const mainConfig = require('../../babel.config');
module.exports = {
presets: ['preact'],
env: mainConfig.env,
};
+9
View File
@@ -0,0 +1,9 @@
module.exports = {
verbose: true,
roots: ['<rootDir>/src/', '<rootDir>/tests/'],
moduleFileExtensions: ['js'],
transformIgnorePatterns: [`/node_modules`],
transform: {
'^.+\\.js$': 'babel-jest',
},
};
+38
View File
@@ -0,0 +1,38 @@
{
"name": "lucide-preact",
"description": "Lucide Preact package, Lucide is a community-run fork of Feather Icons, open for anyone to contribute icons.",
"version": "0.15.10-beta.7",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
"repository": {
"type": "git",
"url": "https://github.com/lucide-icons/lucide.git",
"directory": "packages/lucide-preact"
},
"author": "Eric Fennis",
"amdName": "lucide-preact",
"main": "dist/cjs/lucide-preact.js",
"main:umd": "dist/umd/lucide-preact.js",
"module": "dist/esm/lucide-preact.js",
"unpkg": "dist/umd/lucide-preact.min.js",
"typings": "dist/lucide-preact.d.ts",
"scripts": {
"build": "yarn clean && yarn build:icons && yarn build:es && yarn build:types && yarn build:bundles",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-preact/src --templateSrc=../packages/lucide-preact/scripts/exportTemplate --renderUniqueKey",
"build:es": "babel src -d dist/esm",
"build:types": "yarn --cwd ../../ babel-node packages/lucide-preact/scripts/buildTypes.js",
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-preact/rollup.config.js",
"test": "jest"
},
"devDependencies": {
"@testing-library/preact": "^2.0.1",
"babel-preset-preact": "^2.0.0",
"jest": "^26.6.3",
"preact": "^10.5.13"
},
"peerDependencies": {
"preact": "^10.5.13"
}
}
+48
View File
@@ -0,0 +1,48 @@
import plugins from '../../rollup.plugins';
import pkg from './package.json';
const packageName = 'LucidePreact';
const outputFileName = 'lucide-preact';
const rootDir = 'packages/lucide-preact'; // It runs from the root
const outputDir = `${rootDir}/dist`;
const inputs = [`${rootDir}/src/lucide-preact.js`];
const bundles = [
{
format: 'umd',
inputs,
outputDir,
minify: true,
},
{
format: 'umd',
inputs,
outputDir,
},
{
format: 'cjs',
inputs,
outputDir,
},
];
const configs = bundles
.map(({ inputs, outputDir, format, minify }) =>
inputs.map(input => ({
input,
plugins: plugins(pkg, minify),
external: ['preact', 'prop-types', 'lucide'],
output: {
name: packageName,
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
format,
sourcemap: true,
globals: {
preact: 'preact',
'prop-types': 'PropTypes',
},
},
})),
)
.flat();
export default configs;
@@ -0,0 +1,43 @@
import path from 'path';
import {
writeFile,
readSvgDirectory,
resetFile,
toPascalCase,
appendFile,
} from '../../../scripts/helpers';
const srcDirectory = path.join(__dirname, '../dist');
// Declare type definitions
const typeDefinitions = `\
/// <reference types="preact" />
import { JSX, RefObject } from 'preact'
interface LucideProps extends Partial<Omit<JSX.SVGAttributes, "ref" | "size">> {
key?: string | number;
ref?: string | ((component: any) => any) | RefObject<any>;
color?: string
size?: string | number
}
// Generated icons
`;
const ICONS_DIR = path.resolve(__dirname, '../../../icons');
const TYPES_FILE = 'lucide-preact.d.ts';
resetFile(TYPES_FILE, srcDirectory);
writeFile(typeDefinitions, TYPES_FILE, srcDirectory);
const svgFiles = readSvgDirectory(ICONS_DIR);
svgFiles.forEach(svgFile => {
const iconName = path.basename(svgFile, '.svg');
const componentName = toPascalCase(iconName);
const exportTypeString = `export declare const ${componentName}: (props: LucideProps) => JSX.Element;\n`;
appendFile(exportTypeString, TYPES_FILE, srcDirectory);
});
console.log(`Generated ${TYPES_FILE} file with`, svgFiles.length, 'icons');
@@ -0,0 +1,7 @@
export default ({ componentName, children }) => `
import createPreactComponent from '../createPreactComponent';
const ${componentName} = createPreactComponent('${componentName}', ${JSON.stringify(children)});
export default ${componentName};
`;
@@ -0,0 +1,22 @@
import { h } from 'preact';
import defaultAttributes from './defaultAttributes';
export default (iconName, iconNode) => {
const Component = ({ color = 'currentColor', size = 24, strokeWidth = 2, ...rest }) =>
h(
'svg',
{
...defaultAttributes,
width: size,
height: size,
stroke: color,
'stroke-width': strokeWidth,
...rest,
},
iconNode.map(([tag, attrs]) => h(tag, attrs)),
);
Component.displayName = `${iconName}`;
return Component;
};
@@ -0,0 +1,11 @@
export default {
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,0 +1 @@
Folder for generated icons
@@ -0,0 +1 @@
export * from './icons';
@@ -0,0 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"48\\" height=\\"48\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"red\\" stroke-width=\\"4\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" data-testid=\\"grid-icon\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
exports[`Using lucide icon components should render an component 1`] = `"<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 x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
@@ -0,0 +1,30 @@
import { h } from 'preact'
import { render } from '@testing-library/preact'
import { Grid } from '../src/icons'
describe('Using lucide icon components', () => {
it('should render an component', () => {
const { container } = render( <Grid/> );
expect( container.innerHTML ).toMatchSnapshot();
});
it('should adjust the size, stroke color and stroke width', () => {
const testId = 'grid-icon';
const { container, getByTestId } = render(
<Grid
data-testid={testId}
size={48}
stroke="red"
strokeWidth={4}
/>,
);
const { attributes } = getByTestId(testId);
expect(attributes.stroke.value).toBe('red');
expect(attributes.width.value).toBe('48');
expect(attributes.height.value).toBe('48');
expect(attributes['stroke-width'].value).toBe('4');
expect( container.innerHTML ).toMatchSnapshot();
});
})
+15 -2
View File
@@ -1,6 +1,19 @@
const mainConfig = require('../../babel.config');
module.exports = {
presets: ['react-app'],
env: mainConfig.env,
presets: [
[
'@babel/env',
{
loose: true,
modules: false,
},
],
],
env: {
...mainConfig.env,
test: {
presets: ['react-app'],
},
},
};
+7 -8
View File
@@ -1,7 +1,7 @@
{
"name": "lucide-react",
"description": "Lucide React package, Lucide is a community-run fork of Feather Icons, open for anyone to contribute icons.",
"version": "0.14.1",
"version": "0.15.17",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
@@ -19,21 +19,20 @@
"typings": "dist/lucide-react.d.ts",
"scripts": {
"build": "yarn clean && yarn build:icons && yarn build:es && yarn build:types && yarn build:bundles",
"clean": "rm -rf dist && rm -rf ./src/icons/*.js",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
"build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-react/src --templateSrc=../packages/lucide-react/scripts/exportTemplate --renderUniqueKey",
"build:es": "yarn --cwd ../../ babel packages/lucide-react/src -d packages/lucide-react/dist/esm",
"build:es": "babel src -d dist/esm",
"build:types": "yarn --cwd ../../ babel-node packages/lucide-react/scripts/buildTypes.js",
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-react/rollup.config.js",
"test": "jest"
},
"dependencies": {
"prop-types": "^15.7.2",
"react": "^16.5.1"
},
"devDependencies": {
"@testing-library/react": "^11.2.6",
"babel-preset-react-app": "^10.0.0",
"jest": "^26.6.3",
"react-test-renderer": "^16.5.1"
"prop-types": "^15.7.2",
"react": "^16.5.1",
"react-dom": "^17.0.2"
},
"peerDependencies": {
"prop-types": "^15.7.2",
+4 -2
View File
@@ -11,8 +11,10 @@ const srcDirectory = path.join(__dirname, '../dist');
// Declare type definitions
const typeDefinitions = `\
/// <reference types="react" />
import { SVGAttributes } from 'react'
/// <reference types="vue" />
import { SVGAttributes } from 'vue'
declare module 'lucide-vue-next'
// Create interface extending SVGAttributes
export interface LucideProps extends Partial<React.SVGProps<SVGSVGElement>> {
@@ -1,95 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `
<svg
fill="none"
height={48}
stroke="red"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={4}
viewBox="0 0 24 24"
width={48}
xmlns="http://www.w3.org/2000/svg"
>
<rect
height="18"
rx="2"
ry="2"
width="18"
x="3"
y="3"
/>
<line
x1="3"
x2="21"
y1="9"
y2="9"
/>
<line
x1="3"
x2="21"
y1="15"
y2="15"
/>
<line
x1="9"
x2="9"
y1="3"
y2="21"
/>
<line
x1="15"
x2="15"
y1="3"
y2="21"
/>
</svg>
`;
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"48\\" height=\\"48\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"red\\" stroke-width=\\"4\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" data-testid=\\"grid-icon\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
exports[`Using lucide icon components should render an component 1`] = `
<svg
fill="none"
height={24}
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<rect
height="18"
rx="2"
ry="2"
width="18"
x="3"
y="3"
/>
<line
x1="3"
x2="21"
y1="9"
y2="9"
/>
<line
x1="3"
x2="21"
y1="15"
y2="15"
/>
<line
x1="9"
x2="9"
y1="3"
y2="21"
/>
<line
x1="15"
x2="15"
y1="3"
y2="21"
/>
</svg>
`;
exports[`Using lucide icon components should render an component 1`] = `"<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 x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
@@ -1,27 +1,31 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { render } from '@testing-library/react'
import { Grid } from '../src/icons'
describe('Using lucide icon components', () => {
it('should render an component', () => {
const component = renderer.create(
<Grid/>,
);
const { container } = render( <Grid/> );
let tree = component.toJSON();
expect(tree).toMatchSnapshot();
expect( container.innerHTML ).toMatchSnapshot();
});
it('should adjust the size, stroke color and stroke width', () => {
const component = renderer.create(
const testId = 'grid-icon';
const { container, getByTestId } = render(
<Grid
data-testid={testId}
size={48}
stroke="red"
strokeWidth={4}
/>,
);
let tree = component.toJSON();
expect(tree).toMatchSnapshot();
const { attributes } = getByTestId(testId);
expect(attributes.stroke.value).toBe('red');
expect(attributes.width.value).toBe('48');
expect(attributes.height.value).toBe('48');
expect(attributes['stroke-width'].value).toBe('4');
expect( container.innerHTML ).toMatchSnapshot();
});
})
+9 -9
View File
@@ -2406,9 +2406,9 @@ has@^1.0.3:
function-bind "^1.1.1"
hosted-git-info@^2.1.4:
version "2.8.8"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
version "2.8.9"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
html-encoding-sniffer@^2.0.1:
version "2.0.1"
@@ -3228,9 +3228,9 @@ lodash.sortby@^4.7.0:
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
lodash@^4.17.19:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
@@ -4593,9 +4593,9 @@ xmlchars@^2.2.0:
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
y18n@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
version "4.0.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
yallist@^4.0.0:
version "4.0.0"
+9
View File
@@ -0,0 +1,9 @@
stats
node_modules
tests
scripts
build
src
babel.config.js
jest.config.js
rollup.config.js
+15
View File
@@ -0,0 +1,15 @@
ISC License
Copyright (c) 2020, Lucide Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+107
View File
@@ -0,0 +1,107 @@
# Lucide Vue Next
Implementation of the lucide icon library for Vue 3 applications.
> What is lucide? Read it [here](https://github.com/lucide-icons/lucide#what-is-lucide).
> :warning: This version of lucide is for Vue 3, For Vue 2 got to [lucide-vue-next](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-vue#lucide-vue)
## Installation
```sh
yarn add lucide-vue-next
# or
npm install lucide-vue-next
```
## How to use
It's build with ESmodules so it's completely threeshakable.
Each icon can be imported as a vue component.
### Example
You can pass additional props to adjust the icon.
``` vue
<template>
<Camera
color="red"
:size="32"
/>
</template>
<script>
// Returns Vue component
import { Camera } from 'lucide-vue-next';
export default {
name: "My Component",
components: { Camera }
}
</script>
```
### Props
| name | type | default
| ------------ | -------- | --------
| `size` | *Number* | 24
| `color` | *String* | currentColor
| `strokeWidth`| *Number* | 2
| `defaultClass`| *String* | lucide-icon
### Custom props
You can also pass custom props that will be added in the svg as attributes.
``` vue
<template>
<Camera fill="red" />
</template>
```
### One generic icon component
It is possible to create one generic icon component to load icons.
> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
#### Icon Component Example
``` vue
<template>
<component :is="icon" />
</template>
<script>
import * as icons from "lucide-vue-next";
export default {
props: {
name: {
type: String,
required: true,
},
},
computed: {
icon() {
return icons[this.name];
},
},
};
</script>
```
##### Then you can use it like this
``` vue
<template>
<div id="app">
<Icon name="Airplay" />
</div>
</template>
```
+14
View File
@@ -0,0 +1,14 @@
const mainConfig = require('../../babel.config');
module.exports = {
presets: [
[
'@babel/env',
{
loose: true,
modules: false,
},
],
],
env: mainConfig.env,
};

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