Compare commits

..
14 Commits
Author SHA1 Message Date
Jakob GuddasandKarsa 01d36ad363 fix(icons): added rounding to sigma icon (#2149)
* Updated icons/sigma.svg

* Update icons/sigma.svg

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

---------

Co-authored-by: Karsa <contact@karsa.org>
2024-06-06 11:06:56 +02:00
Karsa 548cb9cdf5 feat(icons): added biceps-flexed icon (#2127) 2024-06-06 11:06:19 +02:00
Jakob GuddasandEric Fennis 79430da42e fix(icons): arcified tractor icon (#2112)
* Updated icons/tractor.svg

* Updated icons/tractor.json

* Updated icons/tractor.svg

* Updated icons/tractor.svg

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-06-06 11:02:31 +02:00
0620843f4c fix(icons): added rounding to paintbrush (#2147)
* fix(icons): arcified paintbrush

* Update icons/paintbrush.svg

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

---------

Co-authored-by: Karsa <karsa@sztaki.hu>
Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-06-06 10:59:42 +02:00
Quill Zhou 34d063302a Add copy component name (#2169) 2024-06-05 23:22:19 +02:00
Jakub Różbicki 0abc3389db Update circle-slash.svg (#2183)
Having <line> after <circle> allows to set `fill` as a background and line would still be visible
2024-06-05 21:43:33 +02:00
Jakob Guddas ebb8ec66af fix(icons): added rounding radical icon (#2150)
* Updated icons/radical.svg

* Updated icons/radical.svg

* Updated icons/radical.json
2024-06-02 12:05:05 +02:00
Jakob Guddas f55ced97a5 fix(icons): added rounding to compass icon (#2143)
* Updated icons/compass.svg

* Updated icons/compass.json
2024-06-02 10:41:30 +02:00
KarsaandKarsa 8458345535 feat(icons): added pill-bottle icon (#2174)
Co-authored-by: Karsa <karsa@sztaki.hu>
2024-06-02 10:39:11 +02:00
KarsaandKarsa 66d6c2fe4b feat(icons): added lectern icon (#2171)
Co-authored-by: Karsa <karsa@sztaki.hu>
2024-05-30 12:56:40 +02:00
KarsaandKarsa 053808685c feat(icons): added section icon (#2172)
Co-authored-by: Karsa <karsa@sztaki.hu>
2024-05-30 12:03:14 +02:00
Sayakie 4f2a6b70d8 fix license typos (#2161) 2024-05-24 12:06:03 +02:00
KarsaandKarsa d8004e471a feat(angular): add support for ng 18 (#2167)
Co-authored-by: Karsa <karsa@sztaki.hu>
2024-05-24 12:04:15 +02:00
e2b46eac8e feat(icons): add deprecationReason and alias deprecation feature (#1960)
* feat(icons): add deprecationReason and alias deprecation feature

* chore(tools): run prettier. again.

* fix(scripts): overall alias as object support

* fix(icon.schema.json): add dependentRequired on deprecated properties

* fix(icon.schema.json): remove unicode for now

* fix(icon.schema.json): use const true for deprecated

* fix(build): convert deprecation reason to enum

* fix(build): fix linting of icon.schema.json

* fix(build): renamed gracePeriod => toBeRemovedInVersion

* fix(build): fix aliases map in related icons generation

* fix(build): deprecate aliases using numbers

* feat(icon-schema): separate deprecation reason enumerations, extract removal notice

* fix(icon-schema): fix linting

* Update tools/build-icons/utils/deprecationReasonTemplate.mjs

* fix(icons): add deprecation reason to some more icons

* fix(docs): fix linting issue

---------

Co-authored-by: Karsa <karsa@sztaki.hu>
Co-authored-by: Jakob Guddas <github@jguddas.de>
2024-05-22 13:08:34 +02:00
91 changed files with 521 additions and 191 deletions
@@ -39,6 +39,12 @@ function copyJSX() {
navigator.clipboard.writeText(code)
}
function copyComponentName() {
const code = componentName.value
navigator.clipboard.writeText(code)
}
function copyVue() {
let attrs = ['']
@@ -101,6 +107,7 @@ function copyAngular() {
:popoverPosition="popoverPosition"
:options="[
{ text: 'Copy JSX' , onClick: copyJSX },
{ text: 'Copy Component Name' , onClick: copyComponentName },
{ text: 'Copy Vue' , onClick: copyVue },
{ text: 'Copy Svelte' , onClick: copyJSX },
{ text: 'Copy Angular' , onClick: copyAngular },
+1 -2
View File
@@ -23,7 +23,7 @@ function getAllCategoryFiles() {
const categoriesFile = path.resolve(dataDirectory, `categoriesData.json`);
const categoriesData = getAllCategoryFiles()
const categoriesData = getAllCategoryFiles();
fs.promises
.writeFile(categoriesFile, JSON.stringify(categoriesData, null, 2), 'utf-8')
@@ -33,4 +33,3 @@ fs.promises
.catch((error) => {
throw new Error(`Something went wrong generating the categoriesData.json file,\n ${error}`);
});
+51 -3
View File
@@ -21,7 +21,32 @@
"aliases": {
"type": "array",
"items": {
"type": "string"
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"deprecated": {
"const": true
},
"deprecationReason": {
"$ref": "#/$defs/aliasDeprecationReasons"
},
"toBeRemovedInVersion": {
"$ref": "#/$defs/versionNumber",
"description": "The version this icon will be removed in."
}
},
"dependentRequired": {
"deprecated": ["deprecationReason", "toBeRemovedInVersion"]
}
}
]
},
"uniqueItems": true
},
@@ -49,8 +74,31 @@
"uniqueItems": true
},
"deprecated": {
"type": "boolean",
"default": false
"const": true
},
"deprecationReason": {
"$ref": "#/$defs/iconDeprecationReasons"
},
"toBeRemovedInVersion": {
"$ref": "#/$defs/versionNumber",
"description": "The version this icon will be removed in."
}
},
"dependentRequired": {
"deprecated": ["deprecationReason", "toBeRemovedInVersion"]
},
"$defs": {
"iconDeprecationReasons": {
"type": "string",
"enum": ["icon.brand"]
},
"aliasDeprecationReasons": {
"type": "string",
"enum": ["alias.typo", "alias.name"]
},
"versionNumber": {
"type": "string",
"pattern": "v[0-9]+(\\.[0-9]+)+"
}
},
"description": "A JSON Schema for icons defined by Lucide Icons."
+6 -1
View File
@@ -33,6 +33,11 @@
"account"
],
"aliases": [
"between-horizonal-end"
{
"name": "between-horizonal-end",
"deprecated": true,
"deprecationReason": "alias.typo",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -33,6 +33,11 @@
"account"
],
"aliases": [
"between-horizonal-start"
{
"name": "between-horizonal-start",
"deprecated": true,
"deprecationReason": "alias.typo",
"toBeRemovedInVersion": "v1.0"
}
]
}
+20
View File
@@ -0,0 +1,20 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"karsa-mistmere"
],
"tags": [
"arm",
"muscle",
"strong",
"working out",
"athletic",
"toned",
"muscular",
"forelimb",
"curled"
],
"categories": [
"emoji"
]
}
+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="M12.409 13.017A5 5 0 0 1 22 15c0 3.866-4 7-9 7-4.077 0-8.153-.82-10.371-2.462-.426-.316-.631-.832-.62-1.362C2.118 12.723 2.627 2 10 2a3 3 0 0 1 3 3 2 2 0 0 1-2 2c-1.105 0-1.64-.444-2-1" />
<path d="M15 14a5 5 0 0 0-7.584 2" />
<path d="M9.964 6.825C8.019 7.977 9.5 13 8 15" />
</svg>

After

Width:  |  Height:  |  Size: 500 B

+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"ericfennis"
+1 -1
View File
@@ -9,6 +9,6 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="9" x2="15" y1="15" y2="9" />
<circle cx="12" cy="12" r="10" />
<line x1="9" x2="15" y1="15" y2="9" />
</svg>

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 285 B

+6 -1
View File
@@ -13,6 +13,11 @@
"shapes"
],
"aliases": [
"user-circle-2"
{
"name": "user-circle-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -15,6 +15,11 @@
"development"
],
"aliases": [
"code-2"
{
"name": "code-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"ericfennis"
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+2 -1
View File
@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis"
"colebemis",
"jguddas"
],
"tags": [
"direction",
+1 -1
View File
@@ -9,6 +9,6 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />
<circle cx="12" cy="12" r="10" />
<polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" />
</svg>

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 351 B

+6 -1
View File
@@ -19,6 +19,11 @@
"social"
],
"aliases": [
"contact-2"
{
"name": "contact-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"ahtohbi4"
],
+6 -1
View File
@@ -17,6 +17,11 @@
"navigation"
],
"aliases": [
"globe-2"
{
"name": "globe-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+6 -1
View File
@@ -15,6 +15,11 @@
"files"
],
"aliases": [
"file-cog-2"
{
"name": "file-cog-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+8 -3
View File
@@ -1,8 +1,5 @@
{
"$schema": "../icon.schema.json",
"aliases": [
"folder-cog-2"
],
"contributors": [
"karsa-mistmere"
],
@@ -17,5 +14,13 @@
],
"categories": [
"files"
],
"aliases": [
{
"name": "folder-cog-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+6 -1
View File
@@ -19,6 +19,11 @@
"food-beverage"
],
"aliases": [
"ice-cream-2"
{
"name": "ice-cream-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+6 -1
View File
@@ -12,6 +12,11 @@
"devices"
],
"aliases": [
"laptop-2"
{
"name": "laptop-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+16
View File
@@ -0,0 +1,16 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"gurtt",
"karsa-mistmere"
],
"tags": [
"pulpit",
"podium",
"stand"
],
"categories": [
"communication",
"multimedia"
]
}
+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 12h3a2 2 0 0 0 1.902-1.38l1.056-3.333A1 1 0 0 0 21 6H3a1 1 0 0 0-.958 1.287l1.056 3.334A2 2 0 0 0 5 12h3" />
<path d="M18 6V3a1 1 0 0 0-1-1h-3" />
<rect width="8" height="12" x="8" y="10" rx="1" />
</svg>

After

Width:  |  Height:  |  Size: 425 B

+6 -1
View File
@@ -22,6 +22,11 @@
"multimedia"
],
"aliases": [
"mic-2"
{
"name": "mic-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+3 -3
View File
@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z" />
<path d="M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7" />
<path d="M14.5 17.5 4.5 15" />
<path d="m14.622 17.897-10.68-2.913" />
<path d="M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z" />
<path d="M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15" />
</svg>

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 623 B

+6 -1
View File
@@ -26,6 +26,11 @@
"tools"
],
"aliases": [
"edit-3"
{
"name": "edit-3",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -26,6 +26,11 @@
"tools"
],
"aliases": [
"edit-2"
{
"name": "edit-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+23
View File
@@ -0,0 +1,23 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"karsa-mistmere"
],
"tags": [
"medicine",
"medication",
"prescription",
"drug",
"supplement",
"vitamin",
"capsule",
"jar",
"container",
"healthcare",
"pharmaceutical",
"tablet"
],
"categories": [
"medical"
]
}
+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 11h-4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h4" />
<path d="M6 7v13a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7" />
<rect width="16" height="5" x="4" y="2" rx="1" />
</svg>

After

Width:  |  Height:  |  Size: 372 B

+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+2 -1
View File
@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"smnandre"
"smnandre",
"jguddas"
],
"tags": [
"calculate",
+1 -1
View File
@@ -9,5 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M3 12h4l3 9 4-17h7" />
<path d="M3 12h3.28a1 1 0 0 1 .948.684l2.298 7.934a.5.5 0 0 0 .96-.044L13.82 4.771A1 1 0 0 1 14.792 4H21" />
</svg>

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 319 B

+20
View File
@@ -0,0 +1,20 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"gurtt",
"karsa-mistmere"
],
"tags": [
"mark",
"typography",
"punctuation",
"legal",
"type",
"text",
"prose",
"symbol"
],
"categories": [
"text"
]
}
+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="M16 5a4 3 0 0 0-8 0c0 4 8 3 8 7a4 3 0 0 1-8 0" />
<path d="M8 19a4 3 0 0 0 8 0c0-4-8-3-8-7a4 3 0 0 1 8 0" />
</svg>

After

Width:  |  Height:  |  Size: 330 B

+6 -1
View File
@@ -17,6 +17,11 @@
"connectivity"
],
"aliases": [
"send-horizonal"
{
"name": "send-horizonal",
"deprecated": true,
"deprecationReason": "alias.typo",
"toBeRemovedInVersion": "v1.0"
}
]
}
+1 -1
View File
@@ -9,5 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M18 7V4H6l6 8-6 8h12v-3" />
<path d="M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2" />
</svg>

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 330 B

+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"ashygee",
+6 -1
View File
@@ -13,6 +13,11 @@
"shapes"
],
"aliases": [
"user-square-2"
{
"name": "user-square-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2 -2
View File
@@ -9,10 +9,10 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="m10 11 11 .9c.6 0 .9.5.8 1.1l-.8 5h-1" />
<path d="m10 11 11 .9a1 1 0 0 1 .8 1.1l-.665 4.158a1 1 0 0 1-.988.842H20" />
<path d="M16 18h-5" />
<path d="M18 5a1 1 0 0 0-1 1v5.573" />
<path d="M3 4h9l1 7.246" />
<path d="M3 4h8.129a1 1 0 0 1 .99.863L13 11.246" />
<path d="M4 11V4" />
<path d="M7 15h.01" />
<path d="M8 10.1V4" />

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 549 B

+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"bdbch",
"csandman",
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"ahtohbi4",
"johnletey"
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+6 -1
View File
@@ -14,6 +14,11 @@
"maps"
],
"aliases": [
"school-2"
{
"name": "school-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -16,6 +16,11 @@
"account"
],
"aliases": [
"user-check-2"
{
"name": "user-check-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -13,6 +13,11 @@
"account"
],
"aliases": [
"user-cog-2"
{
"name": "user-cog-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -13,6 +13,11 @@
"account"
],
"aliases": [
"user-minus-2"
{
"name": "user-minus-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -14,6 +14,11 @@
"account"
],
"aliases": [
"user-plus-2"
{
"name": "user-plus-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -14,6 +14,11 @@
"account"
],
"aliases": [
"user-x-2"
{
"name": "user-x-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -12,6 +12,11 @@
"account"
],
"aliases": [
"user-2"
{
"name": "user-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -11,6 +11,11 @@
"account"
],
"aliases": [
"users-2"
{
"name": "users-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -12,6 +12,11 @@
"money"
],
"aliases": [
"wallet-2"
{
"name": "wallet-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+6 -1
View File
@@ -15,6 +15,11 @@
"photography"
],
"aliases": [
"wand-2"
{
"name": "wand-2",
"deprecated": true,
"deprecationReason": "alias.name",
"toBeRemovedInVersion": "v1.0"
}
]
}
+2
View File
@@ -1,6 +1,8 @@
{
"$schema": "../icon.schema.json",
"deprecated": true,
"deprecationReason": "icon.brand",
"toBeRemovedInVersion": "v1.0",
"contributors": [
"colebemis",
"csandman",
+1 -1
View File
@@ -35,7 +35,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
+2 -2
View File
@@ -74,7 +74,7 @@
"zone.js": "~0.11.4"
},
"peerDependencies": {
"@angular/common": "13.x - 17.x",
"@angular/core": "13.x - 17.x"
"@angular/common": "13.x - 18.x",
"@angular/core": "13.x - 18.x"
}
}
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import { LucideIconData } from './types';
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {FunctionalComponent} Vue component
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName}: LucideIconData = ${JSON.stringify(children)}; //eslint-disable-line no-shadow-restricted-names
+1 -1
View File
@@ -35,7 +35,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import createLucideIcon from '../createLucideIcon';
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
+1 -1
View File
@@ -38,7 +38,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import createLucideIcon from '../createLucideIcon';
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
+1 -1
View File
@@ -36,7 +36,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
-1
View File
@@ -40,7 +40,6 @@
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts && rm -f dynamicIconImports.*",
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --withDynamicImports --separateAliasesFile --aliasesFileExtension=.ts --iconFileExtension=.ts --exportFileName=index.ts",
"build:types": "node ./scripts/buildTypes.mjs",
"build:bundles": "rollup -c ./rollup.config.mjs",
"typecheck": "tsc",
"typecheck:watch": "tsc -w",
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import createLucideIcon from '../createLucideIcon';
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
@@ -11,5 +11,7 @@ export default async function getAliasesEntryNames() {
const aliases = iconWithAliases.flatMap(({ aliases }) => aliases);
return aliases.map((alias) => path.join('src/icons', `${alias}.ts`));
return aliases
.map((alias) => (typeof alias === 'string' ? alias : alias.name))
.map((alias) => path.join('src/icons', `${alias}.ts`));
}
+1 -1
View File
@@ -36,7 +36,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -20,7 +20,7 @@ const iconNode: IconNode = ${JSON.stringify(children)};
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName} = (props: LucideProps) => (
<Icon {...props} name="${componentName}" iconNode={iconNode} />
+1 -1
View File
@@ -50,7 +50,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
let svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -21,7 +21,7 @@ export default ({ componentName, iconName, children, getSvg, deprecated }) => {
* @see https://lucide.dev/guide/packages/lucide-static - Documentation
*
* @returns {String}
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName}: string = \`\
${svgContents}\
+1 -1
View File
@@ -36,7 +36,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,96 +0,0 @@
import path from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies
import { getAliases } from '@lucide/build-icons';
import {
writeFile,
readSvgDirectory,
resetFile,
toPascalCase,
getCurrentDirPath,
} from '../../../scripts/helpers.mjs';
const currentDir = getCurrentDirPath(import.meta.url);
const targetDirectory = path.join(currentDir, '../dist');
const writeDeclarationFile = (typesFile, directory, content) => {
resetFile(typesFile, directory);
writeFile(content, typesFile, directory);
};
const getComponentImport = (componentName) =>
`export declare class ${componentName} extends SvelteComponent<IconProps, IconEvents, {}> {}\n`;
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
const TYPES_FILE = 'lucide-svelte.d.ts';
// Declare type definitions
let declarationFileContent = `\
/// <reference types="svelte" />
/// <reference types="svelte-check/dist/src/svelte-jsx" />
import { SvelteComponent } from "svelte";
interface IconProps extends Partial<svelte.JSX.SVGProps<SVGSVGElement>> {
color?: string
size?: number|string
strokeWidth?: number|string
absoluteStrokeWidth?: boolean
class?: string
}
interface IconEvents {
[evt: string]: CustomEvent<any>;
}
export type Icon = SvelteComponent<IconProps, IconEvents, {}>
// Generated icons
`;
const svgFiles = readSvgDirectory(ICONS_DIR);
svgFiles.forEach((svgFile) => {
const iconName = path.basename(svgFile, '.svg');
const componentName = toPascalCase(iconName);
declarationFileContent += getComponentImport(componentName);
});
const aliases = await getAliases(ICONS_DIR);
declarationFileContent += `\n
// Generated icon aliases
`;
let aliasesCount = 0;
svgFiles.forEach((svgFile) => {
const iconName = path.basename(svgFile, '.svg');
const componentName = toPascalCase(iconName);
const iconAliases = aliases[iconName]?.aliases;
declarationFileContent += `// ${componentName} aliases\n`;
declarationFileContent += getComponentImport(`${componentName}Icon`);
declarationFileContent += getComponentImport(`Lucide${componentName}`);
aliasesCount += 1;
if (iconAliases != null && Array.isArray(iconAliases)) {
iconAliases.forEach((alias) => {
const componentNameAlias = toPascalCase(alias);
declarationFileContent += getComponentImport(componentNameAlias);
aliasesCount += 1;
});
}
declarationFileContent += '\n';
});
writeDeclarationFile(TYPES_FILE, targetDirectory, declarationFileContent);
console.log(
`Generated ${TYPES_FILE} file with`,
svgFiles.length,
'icons and with',
aliasesCount,
'aliases',
);
@@ -2,7 +2,7 @@
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
import { getJSBanner } from './license.mjs';
export default ({ iconName, children, componentName, getSvg, deprecated }) => {
export default ({ iconName, children, componentName, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -25,7 +25,7 @@ const iconNode: IconNode = ${JSON.stringify(children)};
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {FunctionalComponent} Svelte component
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
</script>
+1 -1
View File
@@ -37,7 +37,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import createLucideIcon from '../createLucideIcon';
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {FunctionalComponent} Vue component
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName} = createLucideIcon('${componentName}Icon', ${JSON.stringify(children)});
+1 -1
View File
@@ -37,7 +37,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import createLucideIcon from '../createLucideIcon';
*
* @param {Object} props - Lucide icons props and any valid SVG attribute
* @returns {Component} Vue Component
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName} = createLucideIcon('${componentName}Icon', ${JSON.stringify(children)});
+1 -1
View File
@@ -47,7 +47,7 @@ Join the [Discord server](https://discord.gg/EH6nSts) to chat with the maintaine
## License
Lucide is licensed under the ICS license. See [LICENSE](https://lucide.dev/license).
Lucide is licensed under the ISC license. See [LICENSE](https://lucide.dev/license).
## Sponsors
+2 -2
View File
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
@@ -17,7 +17,7 @@ import type { IconNode } from '../types';
* @see https://lucide.dev/guide/packages/lucide - Documentation
*
* @returns {Array}
* ${deprecated ? '@deprecated' : ''}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const ${componentName}: IconNode = [
'svg',
+2
View File
@@ -22,6 +22,8 @@ const iconSvgTemplate = `<svg
const iconJsonTemplate = `{
"$schema": "../icon.schema.json",
"contributors": [
],
"tags": [
],
"categories": [
+3 -1
View File
@@ -46,7 +46,9 @@ export async function renameIcon(ICONS_DIR, oldName, newName, logInfo = true, ad
const json = fs.readFileSync(newJsonPath, 'utf8');
const jsonData = JSON.parse(json);
if (Array.isArray(jsonData.aliases)) {
jsonData.aliases = jsonData.aliases.filter((name) => name !== newName);
jsonData.aliases = jsonData.aliases.filter(
(alias) => (typeof alias === 'string' ? alias : alias.name) !== newName,
);
jsonData.aliases.push(oldName);
} else {
jsonData.aliases = [oldName];
+4 -1
View File
@@ -30,7 +30,10 @@ const arrayMatches = (a, b) => {
};
const nameParts = (icon) =>
[icon.name, ...(icon.aliases ?? [])]
[
icon.name,
...(icon.aliases?.map((alias) => (typeof alias === 'string' ? alias : alias.name)) ?? []),
]
.join('-')
.split('-')
.filter((word) => word.length > 2);
+10 -8
View File
@@ -145,7 +145,7 @@ try {
const iconName = path.basename(iconJsonFile, '.json');
const metaDir = path.resolve(releaseMetaDataDirectory, `${iconName}.json`);
if (iconName in newReleaseMetaData === false) {
if (!(iconName in newReleaseMetaData)) {
console.error(`Could not find release metadata for icon '${iconName}'.`);
}
@@ -159,14 +159,16 @@ try {
const aliases = iconMetaData.aliases ?? [];
if (aliases.length) {
aliases.forEach((alias) => {
if (alias in newReleaseMetaData === false) {
return;
}
aliases
.map((alias) => (typeof alias === 'string' ? alias : alias.name))
.forEach((alias) => {
if (!(alias in newReleaseMetaData)) {
return;
}
contents.createdRelease =
newReleaseMetaData[alias].createdRelease ?? defaultReleaseMetaData.createdRelease;
});
contents.createdRelease =
newReleaseMetaData[alias].createdRelease ?? defaultReleaseMetaData.createdRelease;
});
}
const output = JSON.stringify(contents, null, 2);
@@ -1,9 +1,21 @@
import path from 'path';
import fs from 'fs';
import { toPascalCase, resetFile, appendFile } from '../../../scripts/helpers.mjs';
import { deprecationReasonTemplate } from '../utils/deprecationReasonTemplate.mjs';
const getImportString = (componentName, iconName, aliasImportFileExtension = '') =>
`export { default as ${componentName} } from './icons/${iconName}${aliasImportFileExtension}';\n`;
const getImportString = (
componentName,
iconName,
aliasImportFileExtension,
deprecated,
deprecationReason = '',
) =>
deprecated
? `export {\n` +
` /** @deprecated ${deprecationReason} */\n` +
` default as ${componentName}\n` +
`} from './icons/${iconName}${aliasImportFileExtension}';\n`
: `export { default as ${componentName} } from './icons/${iconName}${aliasImportFileExtension}';\n`;
export default async function generateAliasesFile({
iconNodes,
@@ -27,7 +39,15 @@ export default async function generateAliasesFile({
await Promise.all(
icons.map(async (iconName, index) => {
const componentName = toPascalCase(iconName);
const iconAliases = iconMetaData[iconName]?.aliases;
const iconAliases = iconMetaData[iconName]?.aliases?.map((alias) => {
if (typeof alias === 'string') {
return {
name: alias,
deprecated: false,
};
}
return alias;
});
let importString = '';
@@ -51,11 +71,18 @@ export default async function generateAliasesFile({
if (iconAliases != null && Array.isArray(iconAliases)) {
await Promise.all(
iconAliases.map(async (alias) => {
const componentNameAlias = toPascalCase(alias);
const componentNameAlias = toPascalCase(alias.name);
const deprecationReason = alias.deprecated
? deprecationReasonTemplate(alias.deprecationReason, {
componentName: toPascalCase(iconName),
iconName,
toBeRemovedInVersion: alias.toBeRemovedInVersion,
})
: '';
if (separateAliasesFile) {
const output = `export { default } from "./${iconName}"`;
const location = path.join(iconsDistDirectory, `${alias}${iconFileExtension}`);
const location = path.join(iconsDistDirectory, `${alias.name}${iconFileExtension}`);
await fs.promises.writeFile(location, output, 'utf-8');
}
@@ -65,12 +92,14 @@ export default async function generateAliasesFile({
return;
}
const exportFileIcon = separateAliasesFile ? alias : iconName;
const exportFileIcon = separateAliasesFile ? alias.name : iconName;
importString += getImportString(
componentNameAlias,
exportFileIcon,
aliasImportFileExtension,
alias.deprecated,
deprecationReason,
);
if (!aliasNamesOnly) {
@@ -78,12 +107,16 @@ export default async function generateAliasesFile({
`${componentNameAlias}Icon`,
exportFileIcon,
aliasImportFileExtension,
alias.deprecated,
deprecationReason,
);
importString += getImportString(
`Lucide${componentNameAlias}`,
exportFileIcon,
aliasImportFileExtension,
alias.deprecated,
deprecationReason,
);
}
}),
@@ -2,6 +2,7 @@ import fs from 'fs';
import path from 'path';
import prettier from 'prettier';
import { readSvg, toPascalCase } from '../../../scripts/helpers.mjs';
import { deprecationReasonTemplate } from '../utils/deprecationReasonTemplate.mjs';
export default ({
iconNodes,
@@ -28,9 +29,23 @@ export default ({
children = children.map(({ name, attributes }) => [name, attributes]);
const getSvg = () => readSvg(`${iconName}.svg`, iconsDir);
const { deprecated = false } = iconMetaData[iconName];
const { deprecated = false, toBeRemovedInVersion = null } = iconMetaData[iconName];
const deprecationReason = deprecated
? deprecationReasonTemplate(iconMetaData[iconName].deprecationReason, {
componentName,
iconName,
toBeRemovedInVersion,
})
: '';
const elementTemplate = template({ componentName, iconName, children, getSvg, deprecated });
const elementTemplate = template({
componentName,
iconName,
children,
getSvg,
deprecated,
deprecationReason,
});
const output = pretty
? prettier.format(elementTemplate, {
singleQuote: true,
@@ -0,0 +1,17 @@
export function deprecationReasonTemplate(
deprecationReason,
{ componentName, iconName, toBeRemovedInVersion },
) {
const removalNotice = toBeRemovedInVersion
? ` This ${deprecationReason.startsWith('icon') ? 'icon' : 'alias'} will be removed in ${toBeRemovedInVersion}`
: '';
switch (deprecationReason) {
case 'alias.typo':
return `Renamed because of typo, use {@link ${componentName}} instead.${removalNotice}`;
case 'alias.naming':
return `The name of this icon was changed because it didn't meet our guidelines anymore, use {@link ${componentName}} instead.${removalNotice}`;
case 'icon.brand':
return `Brand icons have been deprecated and are due to be removed, please refer to https://github.com/lucide-icons/lucide/issues/670. We recommend using https://simpleicons.org/?q=${iconName} instead.${removalNotice}`;
}
}