Compare commits

..
36 Commits
Author SHA1 Message Date
Sri Aspari 3e61ee5832 Add more bookmark icon variant (#413)
* Add bookmark-add icon

Signed-off-by: Sri Aspari <mail@siarie.me>

* Rename icon to bookmark-plus and add tags

Signed-off-by: Sri Aspari <mail@siarie.me>

* Fix icon size

Signed-off-by: Sri Aspari <mail@siarie.me>

* Fix bookmark icon

* Add bookmark-minus icon

Signed-off-by: Sri Aspari <mail@siarie.me>

* Fix coding style
2021-09-27 21:10:33 +02:00
Eric Fennis 38b14425a0 try to speed up the font build 2021-09-27 20:52:21 +02:00
Eric Fennis 87a18985f1 Add yarn --prefer-offline 2021-09-27 20:32:16 +02:00
Eric Fennis 6e5af5fb49 Fix sort icons, Switch asc desc stack (#412)
* Switch asc desc stack

* Update sort-asc.svg
2021-09-27 20:02:30 +02:00
Eric Fennis 6b90ff364c Merge branch 'master' of github.com:lucide-icons/lucide 2021-09-26 22:42:29 +02:00
Eric Fennis 96989ea74c Fix workflow tagname 2021-09-26 22:42:16 +02:00
Lucide Bot 90914f53e1 📦 Bump lucide package versions to 0.16.3 2021-09-26 19:57:54 +00:00
Yashu MittalandEric Fennis a98692b37c add alarm-clock-off icon (#201)
* add alarm-clock-off icon

* Update alarm-clock-off.svg

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2021-09-26 21:44:55 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> a843cf6d6b Bump ansi-regex from 5.0.0 to 5.0.1 in /site (#410)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-26 17:53:29 +02:00
Eric Fennis 72736a6879 Merge branch 'master' of github.com:lucide-icons/lucide 2021-09-26 17:50:44 +02:00
Eric Fennis 296bb35317 Fix bash if statement in release workflow 2021-09-26 17:50:15 +02:00
Christoph Nölke 7adecdc5df add landmark icon (#406) 2021-09-26 17:25:38 +02:00
Eric Fennis 23259c9e3f revert temp code 2021-09-26 12:48:31 +02:00
Eric Fennis 5770517a71 revert commented code 2021-09-26 12:46:47 +02:00
Eric Fennis 601b7ad1fc Fix some version adding 2021-09-26 12:22:25 +02:00
Eric Fennis e79d778606 add yd 2021-09-26 11:53:15 +02:00
Eric Fennis 04dad48bc5 add yd 2021-09-26 11:45:10 +02:00
Eric Fennis dd9c48196d disable some 2021-09-26 11:18:26 +02:00
Eric Fennis db9cd7af52 disable check 2021-09-26 11:17:07 +02:00
Eric Fennis 893dc9e0e8 try to fix flutter workflow 2021-09-26 11:13:38 +02:00
Eric Fennis b172f4316e Merge branch 'master' of github.com:lucide-icons/lucide 2021-09-26 11:08:59 +02:00
Eric Fennis 60e42bd350 Merge branch 'master' of github.com:ericfennis/lucide 2021-09-22 08:46:59 +02:00
Eric Fennis 272e33d320 📦 Roll up version numbers 2021-09-22 08:46:50 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 0af9969e53 Bump tmpl from 1.0.4 to 1.0.5 (#405)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-22 08:42:12 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> afbe6576d6 Bump tmpl from 1.0.4 to 1.0.5 in /site (#404)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 12:33:33 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> a61276c72e Bump semver-regex from 3.1.2 to 3.1.3 (#403)
Bumps [semver-regex](https://github.com/sindresorhus/semver-regex) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/sindresorhus/semver-regex/releases)
- [Commits](https://github.com/sindresorhus/semver-regex/commits)

---
updated-dependencies:
- dependency-name: semver-regex
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 09:25:40 +02:00
Eric Fennis e43c2a7f23 Set package json version 2021-09-20 08:38:56 +02:00
Eric Fennis 06fe7d6a3f Add event listeners to vue component, fix #400 2021-09-20 08:33:32 +02:00
Eric Fennis 81ff3fc1d1 Update figma plugin 2021-09-20 08:32:57 +02:00
Eric Fennis 776ef4f43c revert disable workflow 2021-09-17 17:50:07 +02:00
Eric Fennis e4edabddb9 add other docker image 2021-09-17 17:26:54 +02:00
Eric Fennis 028afec837 Temporary disable CI for packages 2021-09-17 17:03:02 +02:00
Eric Fennis 049c4cd61e Fix directory names 2021-09-17 16:58:47 +02:00
Eric Fennis b13a7bf1ab Add custom build again 2021-09-17 16:44:25 +02:00
Eric Fennis e278f27a61 fix versions 2021-09-17 16:33:23 +02:00
Eric Fennis f70a0e1945 Add default classnames, fix #317 2021-09-17 16:23:17 +02:00
32 changed files with 229 additions and 102 deletions
+35 -32
View File
@@ -5,9 +5,15 @@ on:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
jobs:
pre-build:
if: github.repository == 'lucide-icons/lucide'
if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey"]', github.actor)
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
@@ -27,13 +33,13 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Install dependencies
run: yarn
run: yarn --prefer-offline
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
@@ -62,13 +68,13 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Install dependencies
run: yarn
run: yarn --prefer-offline
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
@@ -97,13 +103,13 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Install dependencies
run: yarn
run: yarn --prefer-offline
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
@@ -132,13 +138,13 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Install dependencies
run: yarn
run: yarn --prefer-offline
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
@@ -167,13 +173,13 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Install dependencies
run: yarn --pure-lockfile
run: yarn --prefer-offline
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
@@ -202,13 +208,13 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Install dependencies
run: yarn
run: yarn --prefer-offline
- name: Set Auth Token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
@@ -237,14 +243,11 @@ jobs:
needs: pre-build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
- name: Update repos
run: sudo apt-get update
- name: Install FontForge
run: sudo apt-get install zlib1g-dev fontforge
@@ -269,11 +272,8 @@ jobs:
- name: Install Font Custom dependency
run: sudo gem install fontcustom
- name: Install "outline-stroke"
run: sudo yarn add svg-outline-stroke -W
- name: "Outline SVG"
run: yarn build:outline-icons
- name: Install
run: yarn --prefer-offline
- name: Build Icon Font
run: |
@@ -282,12 +282,12 @@ jobs:
command=''
for name in "${list[@]}"
do
subcommand="(yarn build:outline-icons --outputDir=converted_icons${name} && fontcustom compile "./converted_icons${name}" -h -n "lucide${name}" -o ./build -F)"
if [ -z "$command" ]
subcommand="(fontcustom compile "./converted_icons${name}" -h -n "lucide${name}" -o ./tmp -F && mv ./tmp/* build)"
then
command="$subcommand";
else
command="$command & $subcommand";
then
command="$subcommand";
else
command="$command & $subcommand";
fi
done
@@ -304,7 +304,7 @@ jobs:
runs-on: ubuntu-latest
needs: [pre-build, lucide-font]
container:
image: google/dart:latest
image: cirrusci/flutter:latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
@@ -330,9 +330,12 @@ jobs:
EOF
- name: Get packages
run: pub get
run: flutter pub get
working-directory: packages/lucide-flutter
- name: List lucide-font folder
run: ls lucide-font
- name: Move the ttf file
run: mv lucide-font/lucide.ttf packages/lucide-flutter/assets/Lucide.ttf
@@ -341,11 +344,11 @@ jobs:
working-directory: packages/lucide-flutter
- name: Update yaml
run: yq e -i -f '.version = "${{ needs.pre-build.outputs.VERSION }}"' pubspec.yaml
run: sed -E 's/(version:)[^\n]*/\1 ${{ needs.pre-build.outputs.VERSION }}/;' pubspec.yaml > pubspec && mv pubspec pubspec.yaml
working-directory: packages/lucide-flutter
- name: Flutter publish
run: pub publish -f
run: flutter pub publish -f
working-directory: packages/lucide-flutter
- name: Upload pubspec.yaml
@@ -392,7 +395,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
with:
tag_name: v${{ steps.new-version.outputs.VERSION }}
tag_name: v${{ needs.pre-build.outputs.VERSION }}
files: |
lucide-font-${{ needs.pre-build.outputs.VERSION }}.zip
lucide-icons-${{ needs.pre-build.outputs.VERSION }}.zip
+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.94 14A8 8 0 0 0 10 5.25m8.13 12.89A8 8 0 1 1 6.87 6.86" />
<path d="m22 6-3-3" />
<path d="m6 19-2 2" />
<path d="m2 2 20 20" />
<path d="M4 4 2 6" />
</svg>

After

Width:  |  Height:  |  Size: 382 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="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16Z" />
<line x1="15" x2="9" y1="10" y2="10" />
</svg>

After

Width:  |  Height:  |  Size: 317 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="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16Z" />
<line x1="12" x2="12" y1="7" y2="13" />
<line x1="15" x2="9" y1="10" y2="10" />
</svg>

After

Width:  |  Height:  |  Size: 359 B

+1 -1
View File
@@ -9,5 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M19 21l-7-5-7 5V5a2 2 0 012-2h10a2 2 0 012 2z" />
<path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16Z" />
</svg>

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 275 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"
>
<line x1="3" y1="22" x2="21" y2="22" />
<line x1="6" y1="18" x2="6" y2="11" />
<line x1="10" y1="18" x2="10" y2="11" />
<line x1="14" y1="18" x2="14" y2="11" />
<line x1="18" y1="18" x2="18" y2="11" />
<polygon points="12 2 20 7 4 7" />
</svg>

After

Width:  |  Height:  |  Size: 457 B

+2 -2
View File
@@ -9,9 +9,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 5h10" />
<path d="M11 5h4" />
<path d="M11 9h7" />
<path d="M11 13h4" />
<path d="M11 13h10" />
<path d="M3 17l3 3 3-3" />
<path d="M6 18V4" />
</svg>

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

+2 -2
View File
@@ -9,9 +9,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 5h4" />
<path d="M11 5h10" />
<path d="M11 9h7" />
<path d="M11 13h10" />
<path d="M11 13h4" />
<path d="M3 17l3 3 3-3" />
<path d="M6 18V4" />
</svg>

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

+1 -1
View File
@@ -1,7 +1,7 @@
{
"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.30",
"version": "0.16.3",
"author": "SMAH1",
"license": "ISC",
"homepage": "https://lucide.dev",
+2 -1
View File
@@ -3,5 +3,6 @@
"id": "939567362549682242",
"api": "1.0.0",
"ui": "build/ui.html",
"main": "build/main.js"
"main": "build/main.js",
"editorType": ["figma"]
}
+1 -1
View File
@@ -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.15.11",
"lucide-react": "0.16.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"style-loader": "^0.23.1",
+5 -1
View File
@@ -1,20 +1,24 @@
name: lucide_icons
description: Lucide icon pack for Flutter
version: 0.15.30
version: 0.16.3
homepage: https://lucide.dev
repository: https://github.com/lucide-icons/lucide
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
html: ^0.15.0
recase: ^4.0.0
lint: ^1.5.3
flutter:
fonts:
- family: Lucide
+1 -1
View File
@@ -1,7 +1,7 @@
{
"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.30",
"version": "0.16.3",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
@@ -1,6 +1,16 @@
import { h } from 'preact';
import defaultAttributes from './defaultAttributes';
/**
* Converts string to KebabCase
* Copied from scripts/helper. If anyone knows how to properly import it here
* then please fix it.
*
* @param {string} string
* @returns {string} A kebabized string
*/
export const toKebabCase = string => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
export default (iconName, iconNode) => {
const Component = ({ color = 'currentColor', size = 24, strokeWidth = 2, ...rest }) =>
h(
@@ -11,6 +21,7 @@ export default (iconName, iconNode) => {
height: size,
stroke: color,
'stroke-width': strokeWidth,
class: `lucide lucide-${toKebabCase(iconName)}`,
...rest,
},
iconNode.map(([tag, attrs]) => h(tag, attrs)),
@@ -1,5 +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 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\\" class=\\"lucide lucide-grid\\" 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>"`;
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\\" class=\\"lucide lucide-grid\\"><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 -1
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.15.30",
"version": "0.16.3",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
@@ -2,6 +2,16 @@ import { forwardRef, createElement } from 'react';
import PropTypes from 'prop-types';
import defaultAttributes from './defaultAttributes';
/**
* Converts string to KebabCase
* Copied from scripts/helper. If anyone knows how to properly import it here
* then please fix it.
*
* @param {string} string
* @returns {string} A kebabized string
*/
export const toKebabCase = string => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
export default (iconName, iconNode) => {
const Component = forwardRef(
({ color = 'currentColor', size = 24, strokeWidth = 2, ...rest }, ref) =>
@@ -14,6 +24,7 @@ export default (iconName, iconNode) => {
height: size,
stroke: color,
strokeWidth,
className: `lucide lucide-${toKebabCase(iconName)}`,
...rest,
},
iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
@@ -1,5 +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 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\\" class=\\"lucide lucide-grid\\" 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>"`;
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\\" class=\\"lucide lucide-grid\\"><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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lucide-vue-next",
"version": "0.15.30",
"version": "0.16.3",
"author": "Eric Fennis",
"description": "Lucide Vue 3 Package",
"license": "ISC",
@@ -1,15 +1,24 @@
import { h } from 'vue';
import defaultAttributes from './defaultAttributes';
/**
* Converts string to KebabCase
* Copied from scripts/helper. If anyone knows how to properly import it here
* then please fix it.
*
* @param {string} string
* @returns {string} A kebabized string
*/
export const toKebabCase = string => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
const createVueComponent = (iconName, iconNode) => (props, context) =>
h(
'svg',
{
...defaultAttributes,
...{
width: props.size || defaultAttributes.width,
height: props.size || defaultAttributes.height,
},
width: props.size || defaultAttributes.width,
height: props.size || defaultAttributes.height,
class: ['lucide', `lucide-${toKebabCase(iconName)}`],
...context.attrs,
...props,
},
@@ -160,6 +160,7 @@ VueWrapper {
data-v-app=""
>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
@@ -253,6 +254,7 @@ VueWrapper {
},
"rootVM": Object {},
"wrapperElement": <svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
@@ -304,6 +306,7 @@ VueWrapper {
data-v-app=""
>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="48"
size="48"
@@ -398,6 +401,7 @@ VueWrapper {
},
"rootVM": Object {},
"wrapperElement": <svg
class="lucide lucide-smile-icon"
fill="none"
height="48"
size="48"
@@ -450,6 +454,7 @@ VueWrapper {
data-v-app=""
>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
@@ -542,6 +547,7 @@ VueWrapper {
},
"rootVM": Object {},
"wrapperElement": <svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lucide-vue",
"version": "0.15.30",
"version": "0.16.3",
"author": "Eric Fennis",
"description": "Lucide Vue Package",
"license": "ISC",
@@ -52,6 +52,7 @@ export default (iconName, iconNode) => ({
'stroke-width': strokeWidth,
...data.attrs,
},
on: data?.on || {}
},
iconNode.map(([tag, attrs]) => createElement(tag, { attrs })),
);
@@ -41,4 +41,16 @@ describe('Using lucide icon components', () => {
expect(wrapper).toMatchSnapshot();
expect(wrapper.attributes('style')).toContain('position: absolute')
});
it('should call the onClick event', () => {
const onClick = jest.fn()
const wrapper = mount(Smile, {
listeners: {
click: onClick
}
})
wrapper.trigger('click')
expect(onClick).toHaveBeenCalled()
});
});
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "lucide",
"description": "Lucide is a community-run fork of Feather Icons, open for anyone to contribute icons.",
"version": "0.15.30",
"version": "0.16.3",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
+1 -1
View File
@@ -73,7 +73,7 @@ export default (element, { nameAttr, icons, attrs }) => {
...attrs,
};
const classNames = combineClassNames(['lucide', elementAttrs, attrs]);
const classNames = combineClassNames(['lucide', `lucide-${iconName}`, elementAttrs, attrs]);
if (classNames) {
iconAttrs.class = classNames;
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`createIcons should add custom attributes 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"black\\" stroke=\\"currentColor\\" stroke-width=\\"2\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" icon-name=\\"volume-2\\" class=\\"lucide icon custom-class\\"><polygon points=\\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\\"></polygon><path d=\\"M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07\\"></path></svg>"`;
exports[`createIcons should add custom attributes 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"black\\" stroke=\\"currentColor\\" stroke-width=\\"2\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" icon-name=\\"volume-2\\" class=\\"lucide lucide-volume-2 icon custom-class\\"><polygon points=\\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\\"></polygon><path d=\\"M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07\\"></path></svg>"`;
exports[`createIcons should read elements from DOM and replace it with icons 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\\" icon-name=\\"volume-2\\" class=\\"lucide\\"><polygon points=\\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\\"></polygon><path d=\\"M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07\\"></path></svg>"`;
exports[`createIcons should read elements from DOM and replace it with icons 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\\" icon-name=\\"volume-2\\" class=\\"lucide lucide-volume-2\\"><polygon points=\\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\\"></polygon><path d=\\"M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07\\"></path></svg>"`;
+2 -2
View File
@@ -11,7 +11,7 @@ const getOriginalSvg = (iconName) => {
const svgParsed = parseSync(svgContent);
svgParsed.attributes['icon-name'] = iconName;
svgParsed.attributes['class'] = 'lucide';
svgParsed.attributes['class'] = `lucide lucide-${iconName}`;
return stringify(svgParsed, { selfClose: false });
};
@@ -45,7 +45,7 @@ describe('createIcons', () => {
document.body.innerHTML = `<i icon-name="volume-2" class="lucide"></i>`;
const attrs = {
class: 'lucide icon custom-class',
class: 'lucide lucide-volume-2 icon custom-class',
fill: 'black',
};
+22 -23
View File
@@ -1,18 +1,18 @@
import { promises as fs } from 'fs';
import outlineStroke from 'svg-outline-stroke';
import { parse, stringify } from 'svgson'; // eslint-disable-line import/no-extraneous-dependencies
// const { promises: fs } = require('fs');
// const outlineStroke = require('svg-outline-stroke');
// const { parse, stringify } = require('svgson');
import getArgumentOptions from 'minimist';
const inputDir = `./icons/`;
const outputDirs = {
converted_icons_200: '1',
converted_icons_300: '1.5',
const cliArguments = getArgumentOptions(process.argv.slice(2));
const { outputDir } = cliArguments;
const widthMap = {
'converted_icons-200': '1',
'converted_icons-300': '1.5',
converted_icons: '2',
converted_icons_500: '2.5',
converted_icons_600: '3',
'converted_icons-500': '2.5',
'converted_icons-600': '3',
};
function transformForward(node) {
@@ -43,8 +43,7 @@ function transformBackwards(node) {
async function init() {
console.time('icon outliner');
try {
const createDirectories = Object.keys(outputDirs).map(directory => fs.mkdir(`./${directory}`));
await Promise.all(createDirectories);
await fs.mkdir(`./${outputDir}`);
const icons = await fs.readdir(inputDir);
const parsedIconNodes = await Promise.all(
@@ -57,19 +56,19 @@ async function init() {
}),
);
await Promise.all(
Object.entries(outputDirs).map(async ([directory, width]) => {
await Promise.all(
parsedIconNodes.map(async ([file, iconNode]) => {
iconNode.attributes['stroke-width'] = width;
const outlined = await outlineStroke(stringify(iconNode));
const outlinedWithoutAttrs = await parse(outlined, {
transformNode: transformBackwards,
});
if (widthMap?.[outputDir] === undefined) {
throw new Error(`Could not find the directory: ${outputDir}.`)
}
await fs.writeFile(`./${directory}/${file}`, stringify(outlinedWithoutAttrs));
}),
);
await Promise.all(
parsedIconNodes.map(async ([file, iconNode]) => {
iconNode.attributes['stroke-width'] = widthMap[outputDir];
const outlined = await outlineStroke(stringify(iconNode));
const outlinedWithoutAttrs = await parse(outlined, {
transformNode: transformBackwards,
});
await fs.writeFile(`./${outputDir}/${file}`, stringify(outlinedWithoutAttrs));
}),
);
+6 -6
View File
@@ -1825,9 +1825,9 @@ ansi-escapes@^4.2.1:
type-fest "^0.21.3"
ansi-regex@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-styles@^3.2.1:
version "3.2.1"
@@ -6597,9 +6597,9 @@ tinycolor2@1.4.2, tinycolor2@^1.4.1:
integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==
tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
version "1.0.5"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
to-arraybuffer@^1.0.0:
version "1.0.1"
+14
View File
@@ -251,6 +251,13 @@
"marker",
"tag"
],
"bookmark-minus": [
"delete",
"remove"
],
"bookmark-plus": [
"add"
],
"bot": [
"robot"
],
@@ -1005,6 +1012,13 @@
"languages": [
"translate"
],
"landmark": [
"bank",
"building",
"capitol",
"finance",
"money"
],
"laptop": [
"computer"
],
+6 -14
View File
@@ -9310,14 +9310,6 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
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 "^16.5.1"
lz-string@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
@@ -12354,9 +12346,9 @@ semver-intersect@1.4.0:
semver "^5.0.0"
semver-regex@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.2.tgz#34b4c0d361eef262e07199dbef316d0f2ab11807"
integrity sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA==
version "3.1.3"
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.3.tgz#b2bcc6f97f63269f286994e297e229b6245d0dc3"
integrity sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==
"semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0:
version "5.7.1"
@@ -13481,9 +13473,9 @@ tmp@^0.0.33:
os-tmpdir "~1.0.2"
tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
version "1.0.5"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
to-arraybuffer@^1.0.0:
version "1.0.1"