Merge branch 'master' of github.com:lucide-icons/lucide

This commit is contained in:
Eric Fennis
2021-10-14 12:44:58 +02:00
16 changed files with 242 additions and 235 deletions
-1
View File
@@ -71,4 +71,3 @@ jobs:
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
+5 -5
View File
@@ -1,7 +1,7 @@
name: 'Close stale issues and PR'
name: Close stale issues and PR
on:
schedule:
- cron: '45 1 * * *'
- cron: "45 1 * * *"
jobs:
stale:
@@ -10,9 +10,9 @@ jobs:
- 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'
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
+62 -44
View File
@@ -3,12 +3,12 @@ name: Release Packages
on:
push:
tags:
- 'v*'
- "v*"
workflow_dispatch:
inputs:
version:
description: 'Version'
description: Version
required: true
jobs:
@@ -35,8 +35,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
@@ -70,8 +70,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
@@ -105,8 +105,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
@@ -140,8 +140,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
@@ -175,8 +175,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
@@ -210,8 +210,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
@@ -245,8 +245,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '14'
cache: 'yarn'
node-version: "14"
cache: yarn
- name: Install FontForge
run: sudo apt-get install zlib1g-dev fontforge
@@ -256,18 +256,18 @@ jobs:
- name: Install and move sfnt2woff-zopfli
run: |
cd sfnt2woff-zopfli
make
sudo mv sfnt2woff-zopfli /usr/local/bin/sfnt2woff
cd sfnt2woff-zopfli
make
sudo mv sfnt2woff-zopfli /usr/local/bin/sfnt2woff
- name: Clone woff2
run: git clone --recursive https://github.com/google/woff2.git
- name: Install woff2
run: |
cd woff2
sudo make clean all
sudo mv woff2_compress /usr/local/bin/ && sudo mv woff2_decompress /usr/local/bin/
cd woff2
sudo make clean all
sudo mv woff2_compress /usr/local/bin/ && sudo mv woff2_decompress /usr/local/bin/
- name: Install Font Custom dependency
run: sudo gem install fontcustom
@@ -277,23 +277,23 @@ jobs:
- name: Build Icon Font
run: |
mkdir build
list=(-200 -300 "" -500 -600)
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" ]
then
command="$subcommand";
else
command="$command & $subcommand";
fi
done
mkdir build
list=(-200 -300 "" -500 -600)
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" ]
then
command="$subcommand";
else
command="$command & $subcommand";
fi
done
eval $command
eval $command
- name: 'Upload to Artifacts'
- name: "Upload to Artifacts"
uses: actions/upload-artifact@v1
with:
name: lucide-font
@@ -304,13 +304,13 @@ jobs:
runs-on: ubuntu-latest
needs: [pre-build, lucide-font]
container:
image: cirrusci/flutter:latest
image: cirrusci/flutter:latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/cache@v2
with:
path: '~/.pub-cache'
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('~/.pub-cache') }}
restore-keys: |
${{ runner.os }}-pub-
@@ -336,13 +336,21 @@ jobs:
- name: List lucide-font folder
run: ls lucide-font
- name: Move the assets files
run: mv lucide-font packages/lucide-flutter/assets
- name: Copy assets from lucide-font directory
run: |
mkdir packages/lucide-flutter/assets
cp lucide-font/lucide.ttf packages/lucide-flutter/assets/lucide.ttf
cp lucide-font/lucide-preview.html packages/lucide-flutter/assets/lucide-preview.html
- name: Generate exports file
run: dart tool/generate_fonts.dart assets/lucide-preview.html
run: |
dart tool/generate_fonts.dart assets/lucide-preview.html
flutter format .
working-directory: packages/lucide-flutter
- name: Test
run: flutter test
- name: Update yaml
run: sed -E 's/(version:)[^\n]*/\1 ${{ needs.pre-build.outputs.VERSION }}/;' pubspec.yaml > pubspec && mv pubspec pubspec.yaml
working-directory: packages/lucide-flutter
@@ -357,11 +365,21 @@ jobs:
name: lucide-flutter-pubspec-yaml
path: packages/lucide-flutter/pubspec.yaml
post-release:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: [pre-build, lucide, lucide-react, lucide-vue, lucide-vue-next, lucide-angular, lucide-preact, lucide-flutter, lucide-font]
needs:
[
pre-build,
lucide,
lucide-react,
lucide-vue,
lucide-vue-next,
lucide-angular,
lucide-preact,
lucide-flutter,
lucide-font,
]
steps:
- uses: actions/checkout@v2
+1 -1
View File
@@ -113,7 +113,7 @@ yarn add lucide-angular
npm install lucide-angular
```
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/packages/lucide-angular#lucide-angular).
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/master/packages/lucide-angular#lucide-angular).
### Preact
+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"
>
<polygon points="6 3 18 3 22 9 12 22 2 9" />
<path d="M12 22l4-13-3-6" />
<path d="M12 22L8 9l3-6" />
<path d="M2 9h20" />
</svg>

After

Width:  |  Height:  |  Size: 339 B

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "lucide-angular",
"description": "A Lucide icon library package for Angular applications",
"version": "0.16.7",
"version": "0.16.10",
"author": "SMAH1",
"license": "ISC",
"homepage": "https://lucide.dev",
+1
View File
@@ -30,6 +30,7 @@
.pub/
build/
assets
pubspec.lock
# Android related
**/android/**/gradle-wrapper.jar
@@ -1,4 +1,5 @@
library lucide_icons;
import "package:flutter/widgets.dart";
import "src/icon_data.dart";
-175
View File
@@ -1,175 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: "direct dev"
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
lint:
dependency: "direct dev"
description:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
recase:
dependency: "direct dev"
description:
name: recase
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.13.0 <3.0.0"
flutter: ">=1.17.0"
+3 -3
View File
@@ -1,6 +1,6 @@
name: lucide_icons
description: A Lucide icon library package for Flutter applications.
version: 0.16.7
description: A Lucide icon library package for Flutter applications. Fork of Feather Icons, open for anyone to contribute icons.
version: 0.16.10
homepage: https://lucide.dev
repository: https://github.com/lucide-icons/lucide
@@ -23,4 +23,4 @@ flutter:
fonts:
- family: Lucide
fonts:
- asset: assets/Lucide.ttf
- asset: assets/lucide.ttf
+147
View File
@@ -0,0 +1,147 @@
// Tests adapted from https://github.com/fluttercommunity/font_awesome_flutter/blob/master/test/fa_icon_test.dart
// Copyright 2014 The Flutter Authors. All rights reserved.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/widgets.dart';
import 'package:lucide_icons/lucide_icons.dart';
void main() {
testWidgets('Can set opacity for an Icon', (WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: IconTheme(
data: IconThemeData(
color: Color(0xFF666666),
opacity: 0.5,
),
child: Icon(LucideIcons.bot),
),
),
);
final RichText text = tester.widget(find.byType(RichText));
expect(text.text.style!.color, const Color(0xFF666666).withOpacity(0.5));
});
testWidgets('Icon sizing - no theme, default size',
(WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: Icon(LucideIcons.bot),
),
),
);
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
expect(renderObject.size, equals(const Size.square(24.0)));
});
testWidgets('Icon sizing - no theme, explicit size',
(WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: Icon(
LucideIcons.bot,
size: 96.0,
),
),
),
);
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
expect(renderObject.size, equals(const Size.square(96.0)));
});
testWidgets('Icon sizing - sized theme', (WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: IconTheme(
data: IconThemeData(size: 36.0),
child: Icon(LucideIcons.bot),
),
),
),
);
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
expect(renderObject.size, equals(const Size.square(36.0)));
});
testWidgets('Icon sizing - sized theme, explicit size',
(WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: IconTheme(
data: IconThemeData(size: 36.0),
child: Icon(
LucideIcons.bot,
size: 48.0,
),
),
),
),
);
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
expect(renderObject.size, equals(const Size.square(48.0)));
});
testWidgets('Icon sizing - sizeless theme, default size',
(WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: IconTheme(
data: IconThemeData(),
child: Icon(LucideIcons.bot),
),
),
),
);
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
expect(renderObject.size, equals(const Size.square(24.0)));
});
testWidgets("Changing semantic label from null doesn't rebuild tree ",
(WidgetTester tester) async {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: Icon(LucideIcons.bot),
),
),
);
final Element richText1 = tester.element(find.byType(RichText));
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: Center(
child: Icon(
LucideIcons.bot,
semanticLabel: 'a label',
),
),
),
);
final Element richText2 = tester.element(find.byType(RichText));
// Compare a leaf Element in the Icon subtree before and after changing the
// semanticLabel to make sure the subtree was not rebuilt.
expect(richText2, same(richText1));
});
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "lucide-preact",
"description": "A Lucide icon library package for Preact applications",
"version": "0.16.7",
"version": "0.16.10",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "lucide-react",
"description": "A Lucide icon library package for React applications",
"version": "0.16.7",
"version": "0.16.10",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lucide-vue-next",
"version": "0.16.7",
"version": "0.16.10",
"author": "Eric Fennis",
"description": "A Lucide icon library package for Vue 3 applications",
"license": "ISC",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lucide-vue",
"version": "0.16.7",
"version": "0.16.10",
"author": "Eric Fennis",
"description": "A Lucide icon library package for Vue 2 applications",
"license": "ISC",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "lucide",
"description": "A Lucide icon library package for web and javascript applications.",
"version": "0.16.7",
"version": "0.16.10",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",