mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 23:07:43 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc78d27cc3 | ||
|
|
9b0d0edb61 | ||
|
|
6a5f8d3755 | ||
|
|
35c96ab61f | ||
|
|
8fd8007c96 | ||
|
|
621cf6b290 | ||
|
|
a5ce1df506 | ||
|
|
c784dd09c7 | ||
|
|
0f11acdd7f | ||
|
|
2149645895 | ||
|
|
fa6ed02297 | ||
|
|
4a2c6ed8b0 |
@@ -34,6 +34,7 @@ module.exports = {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./site/tsconfig.json', './packages/*/tsconfig.json'],
|
||||
ecmaVersion: 2020,
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
};
|
||||
|
||||
44
.github/actions/build-and-test.yml
vendored
Normal file
44
.github/actions/build-and-test.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: "Build and Test"
|
||||
description: "Builds and test a package"
|
||||
|
||||
inputs:
|
||||
name:
|
||||
description: “Name of the package”
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- uses: pnpm/action-setup@v2.0.1
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-lucide-preact-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-lucide-preact-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --filter lucide-preact
|
||||
|
||||
- name: Build
|
||||
run: pnpm --filter lucide-preact build
|
||||
|
||||
- name: Test
|
||||
run: pnpm --filter lucide-preact test
|
||||
4
.github/workflows/lucide-angular.yml
vendored
4
.github/workflows/lucide-angular.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-angular/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-angular/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-angular:
|
||||
|
||||
4
.github/workflows/lucide-font.yml
vendored
4
.github/workflows/lucide-font.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- icons/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- icons/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-font:
|
||||
|
||||
4
.github/workflows/lucide-preact.yml
vendored
4
.github/workflows/lucide-preact.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-preact/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-preact/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-preact:
|
||||
|
||||
4
.github/workflows/lucide-react-native.yml
vendored
4
.github/workflows/lucide-react-native.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-react-native/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-react-native/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-react-native:
|
||||
|
||||
4
.github/workflows/lucide-react.yml
vendored
4
.github/workflows/lucide-react.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-react/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-react/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-react:
|
||||
|
||||
4
.github/workflows/lucide-solid.yml
vendored
4
.github/workflows/lucide-solid.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-solid/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-solid/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-solid:
|
||||
|
||||
4
.github/workflows/lucide-static.yml
vendored
4
.github/workflows/lucide-static.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-static/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-static/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-static:
|
||||
|
||||
4
.github/workflows/lucide-svelte.yml
vendored
4
.github/workflows/lucide-svelte.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-svelte/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-svelte/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-svelte:
|
||||
|
||||
4
.github/workflows/lucide-vue-next.yml
vendored
4
.github/workflows/lucide-vue-next.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-vue-next/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-vue-next/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-vue-next:
|
||||
|
||||
4
.github/workflows/lucide-vue.yml
vendored
4
.github/workflows/lucide-vue.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide-vue/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide-vue/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide-vue:
|
||||
|
||||
4
.github/workflows/lucide.yml
vendored
4
.github/workflows/lucide.yml
vendored
@@ -5,10 +5,6 @@ on:
|
||||
paths:
|
||||
- packages/lucide/**
|
||||
- pnpm-lock.yaml
|
||||
push:
|
||||
paths:
|
||||
- packages/lucide/**
|
||||
- pnpm-lock.yaml
|
||||
|
||||
jobs:
|
||||
lucide:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,4 +15,6 @@ stats
|
||||
outlined
|
||||
packages/**/src/icons/*.js
|
||||
packages/**/src/icons/*.ts
|
||||
packages/**/src/icons/*.tsx
|
||||
packages/**/src/aliases.ts
|
||||
packages/**/LICENSE
|
||||
|
||||
11
README.md
11
README.md
@@ -39,6 +39,7 @@ Lucide is trying to expand the icon set as much as possible while staying faithf
|
||||
- [Svelte](#svelte)
|
||||
- [Solid](#solid)
|
||||
- [Hyva](#hyva)
|
||||
- [Eleventy](#eleventy)
|
||||
- [Contributing](#contributing)
|
||||
- [Community](#community)
|
||||
- [License](#license)
|
||||
@@ -251,6 +252,16 @@ composer require siteation/magento2-hyva-icons-lucide
|
||||
|
||||
For more details, see the [documentation](https://github.com/Siteation/magento2-hyva-icons-lucide/blob/main/README.md).
|
||||
|
||||
### Eleventy
|
||||
|
||||
Using this plugin, Eleventy projects can incorporate Lucide icons. it makes it simple to use Lucide icons into your themes via shortcodes, improving your website's overall usability and visual appeal.
|
||||
|
||||
```sh
|
||||
npm install @grimlink/eleventy-plugin-lucide-icons
|
||||
```
|
||||
|
||||
For more details, see the [documentation](https://github.com/GrimLink/eleventy-plugin-lucide-icons/blob/main/README.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
module.exports = {
|
||||
presets: ['@babel/env'],
|
||||
// babelrcRoots: ['.', './packages/*'],
|
||||
env: {
|
||||
test: {
|
||||
presets: ['@babel/env'],
|
||||
plugins: ['@babel/plugin-transform-runtime'],
|
||||
},
|
||||
dev: {
|
||||
plugins: [
|
||||
[
|
||||
'transform-inline-environment-variables',
|
||||
{
|
||||
include: ['NODE_ENV'],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -6,16 +6,15 @@ nextPage:
|
||||
---
|
||||
|
||||
# Introduction
|
||||
Lucide is an open source icon library for displaying icons and symbols in digital and non-digital projects. It consists of 850+ Vector (svg) files. To use these icons, lucide provides several official packages to make it easier to use these icons in projects.
|
||||
|
||||
An open source icon library for displaying icons and symbols in digital and non digital projects. It is containing over 500+ Vector (svg) files. To use these icons, lucide provides several official packages to make it easier to use these icons in projects.
|
||||
Lucide contains icons with different variants and states. With that, designers and developers can choose the right icon for themselves. If a desired icon doesn't exist yet, you're free to open a design request. The Lucide community contributors will help to provide new icons.
|
||||
|
||||
Lucide contains icons with different variants and states. With that designers and developers can choose the right icon for them selves. If icons don't exist you're free to open design request. The Lucide community will help.
|
||||
With more icons, we simply have more icons to work with in our projects. Also with rising of new applications with specific features, lucide has the goal to provide the complete set for your project.
|
||||
|
||||
With help of the community, contributors are providing the library of new icons. With more icons, we simply have more icons to work with in your project. Also with rising of new applications with specific features lucide has the goal the provide the complete set for you project.
|
||||
When designing new icons, the community is working with a set of design rules. This is to maintain some standards for the icons: recognizable, consistency in style, and readable on all sizes. The community loves creativity in new icons but recognizable design conventions are important.
|
||||
|
||||
When designing new icons, the community is working with a set of design rules. This is to keep icons: recognizable, consistency in style, and readable on all sizes. The community likes to have creativity in new icons but conventional design is important to have recognizable icons.
|
||||
|
||||
Beside design, code is also important. Assets like icons in for example web projects can increase the transferred bytes significantly. With the growing internet, lucide has the responsibility to keep their assets small as possible. To achieve this, lucide uses SVG compression and specific code architecture for tree-shaking abilities. With tree-shaking used you will only ship the icons you used, helps you to keep the software small as possible when distributed.
|
||||
Beside design, code is also important. Assets like icons in, for example, web projects can increase the bandwidth usage significantly. With the growing internet, lucide has the responsibility to keep their assets as small as possible. To achieve this, lucide uses SVG compression and specific code architecture for tree-shaking abilities. After tree-shaking, you will only ship the icons you used, helps you to keep the software distribution size to a minimum.
|
||||
|
||||
Lucide provides several official packages for: [Web (Vanilla)](https://lucide.dev/docs/lucide), [React](https://lucide.dev/docs/lucide-react), [React Native](https://lucide.dev/docs/lucide-react-native), [Vue](https://lucide.dev/docs/lucide-vue), [Vue 3](https://lucide.dev/docs/lucide-vue-next), [Svelte](https://lucide.dev/docs/lucide-svelte),[Preact](https://lucide.dev/docs/lucide-preact), [Angular](https://lucide.dev/docs/lucide-angular), [NodeJS](https://lucide.dev/docs/lucide-static#nodejs) and [Flutter](https://lucide.dev/docs/lucide-flutter).
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
"account",
|
||||
"social"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
16
icons/beef.json
Normal file
16
icons/beef.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"tags": [
|
||||
"food",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"course",
|
||||
"meal",
|
||||
"meat",
|
||||
"bbq",
|
||||
"steak"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
15
icons/beef.svg
Normal file
15
icons/beef.svg
Normal 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"
|
||||
>
|
||||
<circle cx="12.5" cy="8.5" r="2.5" />
|
||||
<path d="M12.5 2a6.5 6.5 0 0 0-6.22 4.6c-1.1 3.13-.78 3.9-3.18 6.08A3 3 0 0 0 5 18c4 0 8.4-1.8 11.4-4.3A6.5 6.5 0 0 0 12.5 2Z" />
|
||||
<path d="m18.5 6 2.19 4.5a6.48 6.48 0 0 1 .31 2 6.49 6.49 0 0 1-2.6 5.2C15.4 20.2 11 22 7 22a3 3 0 0 1-2.68-1.66L2.4 16.5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 509 B |
@@ -6,5 +6,8 @@
|
||||
],
|
||||
"categories": [
|
||||
"text"
|
||||
],
|
||||
"aliases": [
|
||||
"pen"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,8 @@
|
||||
],
|
||||
"categories": [
|
||||
"text"
|
||||
],
|
||||
"aliases": [
|
||||
"pen-line"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,8 @@
|
||||
],
|
||||
"categories": [
|
||||
"text"
|
||||
],
|
||||
"aliases": [
|
||||
"pen-box"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
19
icons/fish.json
Normal file
19
icons/fish.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"tags": [
|
||||
"food",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"course",
|
||||
"meal",
|
||||
"seafood",
|
||||
"animal",
|
||||
"pet",
|
||||
"sea",
|
||||
"marine"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage",
|
||||
"animals"
|
||||
]
|
||||
}
|
||||
18
icons/fish.svg
Normal file
18
icons/fish.svg
Normal 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="M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z" />
|
||||
<path d="M18 12v.5" />
|
||||
<path d="M16 17.93a9.77 9.77 0 0 1 0-11.86" />
|
||||
<path d="M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33" />
|
||||
<path d="M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4" />
|
||||
<path d="m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 667 B |
15
icons/ice-cream-2.json
Normal file
15
icons/ice-cream-2.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"tags": [
|
||||
"gelato",
|
||||
"food",
|
||||
"dessert",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"course",
|
||||
"meal"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
15
icons/ice-cream-2.svg
Normal file
15
icons/ice-cream-2.svg
Normal 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 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6Zm-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0"/>
|
||||
<path d="M12.14 11a3.5 3.5 0 1 1 6.71 0"/>
|
||||
<path d="M15.5 6.5a3.5 3.5 0 1 0-7 0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 392 B |
17
icons/salad.json
Normal file
17
icons/salad.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"tags": [
|
||||
"food",
|
||||
"vegetarian",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"course",
|
||||
"meal",
|
||||
"side",
|
||||
"vegetables",
|
||||
"health"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
17
icons/salad.svg
Normal file
17
icons/salad.svg
Normal 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="M7 21h10" />
|
||||
<path d="M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z" />
|
||||
<path d="M11.38 12a2.4 2.4 0 0 1-.4-4.77 2.4 2.4 0 0 1 3.2-2.77 2.4 2.4 0 0 1 3.47-.63 2.4 2.4 0 0 1 3.37 3.37 2.4 2.4 0 0 1-1.1 3.7 2.51 2.51 0 0 1 .03 1.1" />
|
||||
<path d="m13 12 4-4" />
|
||||
<path d="M10.9 7.25A3.99 3.99 0 0 0 4 10c0 .73.2 1.41.54 2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 539 B |
14
icons/sandwich.json
Normal file
14
icons/sandwich.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"tags": [
|
||||
"food",
|
||||
"snack",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"lunch",
|
||||
"meal"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
16
icons/sandwich.svg
Normal file
16
icons/sandwich.svg
Normal 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="M3 11v3a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-3" />
|
||||
<path d="M12 19H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-3.83" />
|
||||
<path d="m3 11 7.77-6.04a2 2 0 0 1 2.46 0L21 11H3Z" />
|
||||
<path d="M12.97 19.77 7 15h12.5l-3.75 4.5a2 2 0 0 1-2.78.27Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 483 B |
15
icons/soup.json
Normal file
15
icons/soup.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"tags": [
|
||||
"food",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"course",
|
||||
"meal",
|
||||
"bowl",
|
||||
"starter"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
18
icons/soup.svg
Normal file
18
icons/soup.svg
Normal 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 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z" />
|
||||
<path d="M7 21h10" />
|
||||
<path d="M19.5 12 22 6" />
|
||||
<path d="M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62" />
|
||||
<path d="M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62" />
|
||||
<path d="M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 579 B |
31
package.json
31
package.json
@@ -28,37 +28,16 @@
|
||||
"lint": "eslint --ext .ts,.js,.mjs ./{packages/lucide,scripts}"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
||||
"@babel/cli": "^7.19.3",
|
||||
"@babel/core": "^7.19.6",
|
||||
"@babel/node": "^7.20.0",
|
||||
"@babel/plugin-transform-runtime": "^7.19.6",
|
||||
"@babel/preset-env": "^7.19.4",
|
||||
"@rollup/plugin-babel": "^6.0.2",
|
||||
"@rollup/plugin-commonjs": "^23.0.2",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-replace": "^5.0.1",
|
||||
"@rollup/plugin-typescript": "^9.0.2",
|
||||
"babel-jest": "^29.2.2",
|
||||
"babel-plugin-add-import-extension": "^1.6.0",
|
||||
"core-js": "^3.26.0",
|
||||
"esbuild": "^0.15.12",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^8.0.1",
|
||||
"jest": "^29.2.2",
|
||||
"lint-staged": "^13.0.3",
|
||||
"minimist": "^1.2.7",
|
||||
"node-fetch": "^3.2.10",
|
||||
"prettier": "2.7.1",
|
||||
"rollup": "^3.2.4",
|
||||
"rollup-plugin-license": "^3.0.1",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-visualizer": "^5.8.3",
|
||||
"svg-outline-stroke": "^1.3.1",
|
||||
"svgo": "^3.0.0",
|
||||
"svgson": "^5.2.1"
|
||||
},
|
||||
@@ -70,5 +49,13 @@
|
||||
"lint-staged": {
|
||||
"icons/*.svg": "node ./scripts/optimizeStagedSvgs.mjs"
|
||||
},
|
||||
"packageManager": "pnpm@7.14.0"
|
||||
"packageManager": "pnpm@7.14.0",
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
"ignoreMissing": [
|
||||
"@babel/core",
|
||||
"@babel/preset-env"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-angular",
|
||||
"description": "A Lucide icon library package for Angular applications",
|
||||
"version": "0.102.0",
|
||||
"version": "0.105.0",
|
||||
"author": "SMAH1",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
@@ -28,7 +28,7 @@
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:ng",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf ./src/icons/*.ts",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --iconFileExtention=.ts --exportFileName=index.ts",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --iconFileExtension=.ts --exportFileName=index.ts",
|
||||
"build:ng": "ng build --configuration production",
|
||||
"test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
|
||||
"test:watch": "ng test",
|
||||
@@ -48,6 +48,7 @@
|
||||
"@angular/core": "~14.2.7",
|
||||
"@angular/platform-browser": "~14.2.7",
|
||||
"@angular/platform-browser-dynamic": "~14.2.7",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@types/jasmine": "~4.3.0",
|
||||
"@types/node": "^18.11.4",
|
||||
"codelyzer": "^6.0.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: lucide_icons
|
||||
description: A Lucide icon library package for Flutter applications. Fork of Feather Icons, open for anyone to contribute icons.
|
||||
version: 0.102.0
|
||||
version: 0.105.0
|
||||
homepage: https://lucide.dev
|
||||
repository: https://github.com/lucide-icons/lucide
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
const mainConfig = require('../../babel.config');
|
||||
|
||||
module.exports = {
|
||||
presets: ['preact'],
|
||||
env: mainConfig.env,
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
roots: ['<rootDir>/src/', '<rootDir>/tests/'],
|
||||
moduleFileExtensions: ['js'],
|
||||
transformIgnorePatterns: [`/node_modules`],
|
||||
transform: {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
},
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-preact",
|
||||
"description": "A Lucide icon library package for Preact applications",
|
||||
"version": "0.102.0",
|
||||
"version": "0.105.0",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||
@@ -22,21 +22,26 @@
|
||||
],
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:types && pnpm build:bundles",
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles && pnpm build:types",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
|
||||
"build:es": "babel src -d dist/esm",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --aliasesFileExtension=.ts --iconFileExtension=.ts --exportFileName=index.ts",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"test": "jest",
|
||||
"test": "vitest run",
|
||||
"version": "pnpm version --git-tag-version=false"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@preact/preset-vite": "^2.4.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/preact": "^2.0.1",
|
||||
"babel-preset-preact": "^2.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"preact": "^10.5.13"
|
||||
"preact": "^10.11.2",
|
||||
"rollup": "^3.5.1",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.1.0",
|
||||
"vitest": "^0.24.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"preact": "^10.5.13"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import plugins from '../../rollup.plugins.mjs';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: "json" };
|
||||
|
||||
const packageName = 'LucidePreact';
|
||||
const outputFileName = 'lucide-preact';
|
||||
const outputDir = 'dist';
|
||||
const inputs = [`src/lucide-preact.js`];
|
||||
const inputs = [`src/lucide-preact.ts`];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
@@ -22,17 +22,47 @@ const bundles = [
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'es',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'esm',
|
||||
inputs,
|
||||
outputDir,
|
||||
preserveModules: true,
|
||||
},
|
||||
];
|
||||
|
||||
const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify }) =>
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
plugins: [
|
||||
...(
|
||||
format !== 'esm' ? [
|
||||
replace({
|
||||
"export * from './aliases';": '',
|
||||
"export * as icons from './icons';": '',
|
||||
delimiters: ['', ''],
|
||||
preventAssignment: false,
|
||||
}),
|
||||
] : []
|
||||
),
|
||||
...plugins(pkg, minify)
|
||||
],
|
||||
external: ['preact', 'prop-types'],
|
||||
output: {
|
||||
name: packageName,
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
...(preserveModules
|
||||
? {
|
||||
dir: `${outputDir}/${format}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
}),
|
||||
preserveModules,
|
||||
format,
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
writeFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
appendFile,
|
||||
getCurrentDirPath
|
||||
getCurrentDirPath,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url)
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const srcDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
const writeDeclarationFile = (typesFile, directory, content) => {
|
||||
resetFile(typesFile, directory);
|
||||
writeFile(content, typesFile, directory);
|
||||
};
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-preact.d.ts';
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
let declarationFileContent = `\
|
||||
/// <reference types="preact" />
|
||||
import { JSX, RefObject } from 'preact'
|
||||
|
||||
@@ -24,23 +33,59 @@ interface LucideProps extends Partial<Omit<JSX.SVGAttributes, "ref" | "size">> {
|
||||
strokeWidth?: string | number
|
||||
}
|
||||
|
||||
export type LucideIcon = (props: LucideProps) => JSX.Element;
|
||||
|
||||
export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
|
||||
export declare const createLucideIcon: (iconName: string, iconNode: IconNode) => LucideIcon;
|
||||
|
||||
// Generated icons
|
||||
`;
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../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 => {
|
||||
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);
|
||||
declarationFileContent += `export declare const ${componentName}: LucideIcon;\n`;
|
||||
});
|
||||
|
||||
console.log(`Generated ${TYPES_FILE} file with`, svgFiles.length, 'icons');
|
||||
const aliases = await getAliases(ICONS_DIR);
|
||||
|
||||
declarationFileContent += `
|
||||
// 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 += `export declare const ${componentName}Icon: LucideIcon;\n`;
|
||||
declarationFileContent += `export declare const Lucide${componentName}: LucideIcon;\n`;
|
||||
aliasesCount += 1;
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
declarationFileContent += `export declare const ${componentNameAlias}: LucideIcon;\n`;
|
||||
|
||||
aliasesCount += 1;
|
||||
});
|
||||
}
|
||||
|
||||
declarationFileContent += '\n';
|
||||
});
|
||||
|
||||
writeDeclarationFile(TYPES_FILE, srcDirectory, declarationFileContent);
|
||||
console.log(
|
||||
`Generated ${TYPES_FILE} file with`,
|
||||
svgFiles.length,
|
||||
'icons and with',
|
||||
aliasesCount,
|
||||
'aliases',
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default ({ componentName, children }) => `
|
||||
import createPreactComponent from '../createPreactComponent';
|
||||
import createLucideIcon from '../createLucideIcon';
|
||||
|
||||
const ${componentName} = createPreactComponent('${componentName}', ${JSON.stringify(children)});
|
||||
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
|
||||
|
||||
export default ${componentName};
|
||||
`;
|
||||
|
||||
45
packages/lucide-preact/src/createLucideIcon.ts
Normal file
45
packages/lucide-preact/src/createLucideIcon.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { ComponentType, FunctionComponent, h, JSX, RefObject, toChildArray } from 'preact';
|
||||
import defaultAttributes from './defaultAttributes';
|
||||
|
||||
type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record<string, string>][]
|
||||
|
||||
interface LucideProps extends Partial<Omit<JSX.SVGAttributes, "ref" | "size">> {
|
||||
color?: string
|
||||
size?: string | number
|
||||
strokeWidth?: string | number
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode): FunctionComponent<LucideProps> => {
|
||||
const Component = (
|
||||
{ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }: LucideProps
|
||||
) =>
|
||||
h(
|
||||
'svg' as unknown as ComponentType<Partial<JSX.SVGAttributes<SVGElement> & { 'stroke-width': number | string }>>,
|
||||
{
|
||||
...defaultAttributes,
|
||||
width: String(size),
|
||||
height: size,
|
||||
stroke: color,
|
||||
['stroke-width' as 'strokeWidth']: strokeWidth,
|
||||
class: `lucide lucide-${toKebabCase(iconName)}`,
|
||||
...rest,
|
||||
},
|
||||
[...iconNode.map(([tag, attrs]) => h(tag, attrs)), ...toChildArray(children)],
|
||||
);
|
||||
|
||||
Component.displayName = `${iconName}`;
|
||||
|
||||
return Component;
|
||||
};
|
||||
|
||||
export default createLucideIcon
|
||||
@@ -1,33 +0,0 @@
|
||||
import { h, toChildArray } 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, children, ...rest }) =>
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
...defaultAttributes,
|
||||
width: size,
|
||||
height: size,
|
||||
stroke: color,
|
||||
'stroke-width': strokeWidth,
|
||||
class: `lucide lucide-${toKebabCase(iconName)}`,
|
||||
...rest,
|
||||
},
|
||||
[...iconNode.map(([tag, attrs]) => h(tag, attrs)), ...toChildArray(children)],
|
||||
);
|
||||
|
||||
Component.displayName = `${iconName}`;
|
||||
|
||||
return Component;
|
||||
};
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
viewBox: '0 0 24 24',
|
||||
fill: 'none',
|
||||
stroke: 'currentColor',
|
||||
'stroke-width': 2,
|
||||
'stroke-width': '2',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
export * from './icons';
|
||||
4
packages/lucide-preact/src/lucide-preact.ts
Normal file
4
packages/lucide-preact/src/lucide-preact.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as createLucideIcon } from './createLucideIcon';
|
||||
@@ -1,5 +0,0 @@
|
||||
// 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\\" 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\\" 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>"`;
|
||||
@@ -0,0 +1,5 @@
|
||||
// Vitest Snapshot v1
|
||||
|
||||
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\\" 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,30 +0,0 @@
|
||||
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();
|
||||
});
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react'
|
||||
import { Grid } from '../src/icons'
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { render, cleanup } from '@testing-library/preact'
|
||||
import { Pen, Edit2, Grid } from '../src/lucide-preact';
|
||||
|
||||
describe('Using lucide icon components', () => {
|
||||
it('should render an component', () => {
|
||||
@@ -25,7 +25,33 @@ describe('Using lucide icon components', () => {
|
||||
expect(attributes.width.value).toBe('48');
|
||||
expect(attributes.height.value).toBe('48');
|
||||
expect(attributes['stroke-width'].value).toBe('4');
|
||||
|
||||
expect( container.innerHTML ).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render the alias icon', () => {
|
||||
const testId = 'pen-icon';
|
||||
const { container } = render(
|
||||
<Pen
|
||||
data-testid={testId}
|
||||
size={48}
|
||||
stroke="red"
|
||||
strokeWidth={4}
|
||||
/>,
|
||||
);
|
||||
|
||||
const PenIconRenderedHTML = container.innerHTML
|
||||
|
||||
cleanup()
|
||||
|
||||
const { container: Edit2Container } = render(
|
||||
<Edit2
|
||||
data-testid={testId}
|
||||
size={48}
|
||||
stroke="red"
|
||||
strokeWidth={4}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML)
|
||||
});
|
||||
})
|
||||
1
packages/lucide-preact/tests/setupVitest.js
Normal file
1
packages/lucide-preact/tests/setupVitest.js
Normal file
@@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom';
|
||||
24
packages/lucide-preact/tsconfig.json
Normal file
24
packages/lucide-preact/tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"declaration": false,
|
||||
"noEmitOnError": true,
|
||||
"noEmit": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"lib": ["esnext", "dom"],
|
||||
"skipLibCheck": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"downlevelIteration": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact",
|
||||
},
|
||||
"exclude": ["**/node_modules"]
|
||||
}
|
||||
19
packages/lucide-preact/vitest.config.ts
Normal file
19
packages/lucide-preact/vitest.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import preact from '@preact/preset-vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [preact()],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
transformMode: {
|
||||
web: [/\.jsx?$/],
|
||||
},
|
||||
setupFiles: './tests/setupVitest.js',
|
||||
threads: false,
|
||||
isolate: false,
|
||||
},
|
||||
resolve: {
|
||||
mainFields: ['module'],
|
||||
},
|
||||
});
|
||||
@@ -1,10 +1,10 @@
|
||||
// @flow
|
||||
|
||||
// https://github.com/FormidableLabs/react-native-svg-mock
|
||||
import React from 'react';
|
||||
import type { LucideProps } from '../../src/createReactComponent';
|
||||
export type { SvgProps } from 'react-native-svg';
|
||||
|
||||
const createComponent = function(name) {
|
||||
const component = (props) => {
|
||||
const createComponent = function(name: string) {
|
||||
const component = (props: LucideProps) => {
|
||||
return React.createElement(name, props, props.children);
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
const mainConfig = require('../../babel.config');
|
||||
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/env',
|
||||
{
|
||||
loose: true,
|
||||
modules: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
env: {
|
||||
...mainConfig.env,
|
||||
test: {
|
||||
presets: ['react-app'],
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
roots: ['<rootDir>/src/', '<rootDir>/tests/'],
|
||||
moduleFileExtensions: ['js'],
|
||||
transformIgnorePatterns: [`/node_modules`],
|
||||
transform: {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
},
|
||||
};
|
||||
883
packages/lucide-react-native/lucide-react-native.d.ts
vendored
Normal file
883
packages/lucide-react-native/lucide-react-native.d.ts
vendored
Normal file
@@ -0,0 +1,883 @@
|
||||
/// <reference types="react" />
|
||||
|
||||
declare module 'lucide-react-native'
|
||||
|
||||
// Create interface extending SVGProps
|
||||
export interface LucideProps extends Partial<React.SVGProps<SVGSVGElement>> {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
export declare const createLucideIcon: (iconName: string, iconNode: any[]) => (props: LucideProps) => JSX.Element;
|
||||
|
||||
export type Icon = React.FC<LucideProps>;
|
||||
|
||||
// Generated icons
|
||||
export declare const Accessibility: (props: LucideProps) => JSX.Element;
|
||||
export declare const Activity: (props: LucideProps) => JSX.Element;
|
||||
export declare const AirVent: (props: LucideProps) => JSX.Element;
|
||||
export declare const Airplay: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlarmCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlarmClockOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlarmClock: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlarmMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlarmPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Album: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlertCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlertOctagon: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlertTriangle: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignCenterHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignCenterVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignCenter: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignEndHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignEndVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalDistributeCenter: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalDistributeEnd: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalDistributeStart: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalJustifyCenter: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalJustifyEnd: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalJustifyStart: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalSpaceAround: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignHorizontalSpaceBetween: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignJustify: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignStartHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignStartVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalDistributeCenter: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalDistributeEnd: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalDistributeStart: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalJustifyCenter: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalJustifyEnd: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalJustifyStart: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalSpaceAround: (props: LucideProps) => JSX.Element;
|
||||
export declare const AlignVerticalSpaceBetween: (props: LucideProps) => JSX.Element;
|
||||
export declare const Anchor: (props: LucideProps) => JSX.Element;
|
||||
export declare const Angry: (props: LucideProps) => JSX.Element;
|
||||
export declare const Annoyed: (props: LucideProps) => JSX.Element;
|
||||
export declare const Aperture: (props: LucideProps) => JSX.Element;
|
||||
export declare const Apple: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArchiveRestore: (props: LucideProps) => JSX.Element;
|
||||
export declare const Archive: (props: LucideProps) => JSX.Element;
|
||||
export declare const Armchair: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowBigDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowBigLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowBigRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowBigUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowDownCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowDownLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowDownRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowLeftCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowLeftRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowRightCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowUpCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowUpDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowUpLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowUpRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ArrowUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const Asterisk: (props: LucideProps) => JSX.Element;
|
||||
export declare const AtSign: (props: LucideProps) => JSX.Element;
|
||||
export declare const Award: (props: LucideProps) => JSX.Element;
|
||||
export declare const Axe: (props: LucideProps) => JSX.Element;
|
||||
export declare const Axis3d: (props: LucideProps) => JSX.Element;
|
||||
export declare const Baby: (props: LucideProps) => JSX.Element;
|
||||
export declare const Backpack: (props: LucideProps) => JSX.Element;
|
||||
export declare const BaggageClaim: (props: LucideProps) => JSX.Element;
|
||||
export declare const Banana: (props: LucideProps) => JSX.Element;
|
||||
export declare const Banknote: (props: LucideProps) => JSX.Element;
|
||||
export declare const BarChart2: (props: LucideProps) => JSX.Element;
|
||||
export declare const BarChart3: (props: LucideProps) => JSX.Element;
|
||||
export declare const BarChart4: (props: LucideProps) => JSX.Element;
|
||||
export declare const BarChartHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const BarChart: (props: LucideProps) => JSX.Element;
|
||||
export declare const Baseline: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bath: (props: LucideProps) => JSX.Element;
|
||||
export declare const BatteryCharging: (props: LucideProps) => JSX.Element;
|
||||
export declare const BatteryFull: (props: LucideProps) => JSX.Element;
|
||||
export declare const BatteryLow: (props: LucideProps) => JSX.Element;
|
||||
export declare const BatteryMedium: (props: LucideProps) => JSX.Element;
|
||||
export declare const Battery: (props: LucideProps) => JSX.Element;
|
||||
export declare const Beaker: (props: LucideProps) => JSX.Element;
|
||||
export declare const BeanOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bean: (props: LucideProps) => JSX.Element;
|
||||
export declare const BedDouble: (props: LucideProps) => JSX.Element;
|
||||
export declare const BedSingle: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bed: (props: LucideProps) => JSX.Element;
|
||||
export declare const Beer: (props: LucideProps) => JSX.Element;
|
||||
export declare const BellMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const BellOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const BellPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const BellRing: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bell: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bike: (props: LucideProps) => JSX.Element;
|
||||
export declare const Binary: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bitcoin: (props: LucideProps) => JSX.Element;
|
||||
export declare const BluetoothConnected: (props: LucideProps) => JSX.Element;
|
||||
export declare const BluetoothOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const BluetoothSearching: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bluetooth: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bold: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bomb: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bone: (props: LucideProps) => JSX.Element;
|
||||
export declare const BookOpenCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const BookOpen: (props: LucideProps) => JSX.Element;
|
||||
export declare const Book: (props: LucideProps) => JSX.Element;
|
||||
export declare const BookmarkMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const BookmarkPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bookmark: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bot: (props: LucideProps) => JSX.Element;
|
||||
export declare const BoxSelect: (props: LucideProps) => JSX.Element;
|
||||
export declare const Box: (props: LucideProps) => JSX.Element;
|
||||
export declare const Boxes: (props: LucideProps) => JSX.Element;
|
||||
export declare const Briefcase: (props: LucideProps) => JSX.Element;
|
||||
export declare const Brush: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bug: (props: LucideProps) => JSX.Element;
|
||||
export declare const Building2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Building: (props: LucideProps) => JSX.Element;
|
||||
export declare const Bus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cake: (props: LucideProps) => JSX.Element;
|
||||
export declare const Calculator: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarCheck2: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarClock: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarDays: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarHeart: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarRange: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarSearch: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarX2: (props: LucideProps) => JSX.Element;
|
||||
export declare const CalendarX: (props: LucideProps) => JSX.Element;
|
||||
export declare const Calendar: (props: LucideProps) => JSX.Element;
|
||||
export declare const CameraOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Camera: (props: LucideProps) => JSX.Element;
|
||||
export declare const CandyOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Candy: (props: LucideProps) => JSX.Element;
|
||||
export declare const Car: (props: LucideProps) => JSX.Element;
|
||||
export declare const Carrot: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cast: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cat: (props: LucideProps) => JSX.Element;
|
||||
export declare const CheckCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const CheckCircle2: (props: LucideProps) => JSX.Element;
|
||||
export declare const CheckCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const CheckSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Check: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChefHat: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cherry: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronFirst: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronLast: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsDownUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsLeftRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsRightLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsUpDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ChevronsUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const Chrome: (props: LucideProps) => JSX.Element;
|
||||
export declare const CigaretteOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cigarette: (props: LucideProps) => JSX.Element;
|
||||
export declare const CircleDot: (props: LucideProps) => JSX.Element;
|
||||
export declare const CircleEllipsis: (props: LucideProps) => JSX.Element;
|
||||
export declare const CircleSlashed: (props: LucideProps) => JSX.Element;
|
||||
export declare const Circle: (props: LucideProps) => JSX.Element;
|
||||
export declare const Citrus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clapperboard: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardCopy: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardEdit: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardList: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardSignature: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardType: (props: LucideProps) => JSX.Element;
|
||||
export declare const ClipboardX: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clipboard: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock1: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock10: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock11: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock12: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock3: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock4: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock5: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock6: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock7: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock8: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock9: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clock: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudCog: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudDrizzle: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudFog: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudHail: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudLightning: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudMoonRain: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudMoon: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudRainWind: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudRain: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudSnow: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudSunRain: (props: LucideProps) => JSX.Element;
|
||||
export declare const CloudSun: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cloud: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cloudy: (props: LucideProps) => JSX.Element;
|
||||
export declare const Clover: (props: LucideProps) => JSX.Element;
|
||||
export declare const Code2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Code: (props: LucideProps) => JSX.Element;
|
||||
export declare const Codepen: (props: LucideProps) => JSX.Element;
|
||||
export declare const Codesandbox: (props: LucideProps) => JSX.Element;
|
||||
export declare const Coffee: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cog: (props: LucideProps) => JSX.Element;
|
||||
export declare const Coins: (props: LucideProps) => JSX.Element;
|
||||
export declare const Columns: (props: LucideProps) => JSX.Element;
|
||||
export declare const Command: (props: LucideProps) => JSX.Element;
|
||||
export declare const Compass: (props: LucideProps) => JSX.Element;
|
||||
export declare const Component: (props: LucideProps) => JSX.Element;
|
||||
export declare const ConciergeBell: (props: LucideProps) => JSX.Element;
|
||||
export declare const Contact: (props: LucideProps) => JSX.Element;
|
||||
export declare const Contrast: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cookie: (props: LucideProps) => JSX.Element;
|
||||
export declare const Copy: (props: LucideProps) => JSX.Element;
|
||||
export declare const Copyleft: (props: LucideProps) => JSX.Element;
|
||||
export declare const Copyright: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerDownLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerDownRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerLeftDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerLeftUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerRightDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerRightUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerUpLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const CornerUpRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cpu: (props: LucideProps) => JSX.Element;
|
||||
export declare const CreditCard: (props: LucideProps) => JSX.Element;
|
||||
export declare const Croissant: (props: LucideProps) => JSX.Element;
|
||||
export declare const Crop: (props: LucideProps) => JSX.Element;
|
||||
export declare const Cross: (props: LucideProps) => JSX.Element;
|
||||
export declare const Crosshair: (props: LucideProps) => JSX.Element;
|
||||
export declare const Crown: (props: LucideProps) => JSX.Element;
|
||||
export declare const CupSoda: (props: LucideProps) => JSX.Element;
|
||||
export declare const CurlyBraces: (props: LucideProps) => JSX.Element;
|
||||
export declare const Currency: (props: LucideProps) => JSX.Element;
|
||||
export declare const Database: (props: LucideProps) => JSX.Element;
|
||||
export declare const Delete: (props: LucideProps) => JSX.Element;
|
||||
export declare const Diamond: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dice1: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dice2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dice3: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dice4: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dice5: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dice6: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dices: (props: LucideProps) => JSX.Element;
|
||||
export declare const Diff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Disc: (props: LucideProps) => JSX.Element;
|
||||
export declare const DivideCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const DivideSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Divide: (props: LucideProps) => JSX.Element;
|
||||
export declare const DnaOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dna: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dog: (props: LucideProps) => JSX.Element;
|
||||
export declare const DollarSign: (props: LucideProps) => JSX.Element;
|
||||
export declare const DownloadCloud: (props: LucideProps) => JSX.Element;
|
||||
export declare const Download: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dribbble: (props: LucideProps) => JSX.Element;
|
||||
export declare const Droplet: (props: LucideProps) => JSX.Element;
|
||||
export declare const Droplets: (props: LucideProps) => JSX.Element;
|
||||
export declare const Drumstick: (props: LucideProps) => JSX.Element;
|
||||
export declare const Dumbbell: (props: LucideProps) => JSX.Element;
|
||||
export declare const EarOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Ear: (props: LucideProps) => JSX.Element;
|
||||
export declare const Edit2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Edit3: (props: LucideProps) => JSX.Element;
|
||||
export declare const Edit: (props: LucideProps) => JSX.Element;
|
||||
export declare const EggFried: (props: LucideProps) => JSX.Element;
|
||||
export declare const EggOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Egg: (props: LucideProps) => JSX.Element;
|
||||
export declare const EqualNot: (props: LucideProps) => JSX.Element;
|
||||
export declare const Equal: (props: LucideProps) => JSX.Element;
|
||||
export declare const Eraser: (props: LucideProps) => JSX.Element;
|
||||
export declare const Euro: (props: LucideProps) => JSX.Element;
|
||||
export declare const Expand: (props: LucideProps) => JSX.Element;
|
||||
export declare const ExternalLink: (props: LucideProps) => JSX.Element;
|
||||
export declare const EyeOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Eye: (props: LucideProps) => JSX.Element;
|
||||
export declare const Facebook: (props: LucideProps) => JSX.Element;
|
||||
export declare const Factory: (props: LucideProps) => JSX.Element;
|
||||
export declare const Fan: (props: LucideProps) => JSX.Element;
|
||||
export declare const FastForward: (props: LucideProps) => JSX.Element;
|
||||
export declare const Feather: (props: LucideProps) => JSX.Element;
|
||||
export declare const Figma: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileArchive: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileAudio2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileAudio: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileAxis3d: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileBadge2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileBadge: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileBarChart2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileBarChart: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileBox: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileCheck2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileClock: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileCode: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileCog2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileCog: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileDiff: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileDigit: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileEdit: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileHeart: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileImage: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileInput: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileJson2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileJson: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileKey2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileKey: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileLineChart: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileLock2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileLock: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileMinus2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileOutput: (props: LucideProps) => JSX.Element;
|
||||
export declare const FilePieChart: (props: LucideProps) => JSX.Element;
|
||||
export declare const FilePlus2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FilePlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileQuestion: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileScan: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileSearch2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileSearch: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileSignature: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileSpreadsheet: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileSymlink: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileTerminal: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileText: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileType2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileType: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileVideo2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileVideo: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileVolume2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileVolume: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileWarning: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileX2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FileX: (props: LucideProps) => JSX.Element;
|
||||
export declare const File: (props: LucideProps) => JSX.Element;
|
||||
export declare const Files: (props: LucideProps) => JSX.Element;
|
||||
export declare const Film: (props: LucideProps) => JSX.Element;
|
||||
export declare const Filter: (props: LucideProps) => JSX.Element;
|
||||
export declare const Fingerprint: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlagOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlagTriangleLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlagTriangleRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const Flag: (props: LucideProps) => JSX.Element;
|
||||
export declare const Flame: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlashlightOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Flashlight: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlaskConicalOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlaskConical: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlaskRound: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlipHorizontal2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlipHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlipVertical2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FlipVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const Flower2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Flower: (props: LucideProps) => JSX.Element;
|
||||
export declare const Focus: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderArchive: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderClock: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderClosed: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderCog2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderCog: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderEdit: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderHeart: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderInput: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderKey: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderLock: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderOpen: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderOutput: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderSearch2: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderSearch: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderSymlink: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderTree: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const FolderX: (props: LucideProps) => JSX.Element;
|
||||
export declare const Folder: (props: LucideProps) => JSX.Element;
|
||||
export declare const Folders: (props: LucideProps) => JSX.Element;
|
||||
export declare const FormInput: (props: LucideProps) => JSX.Element;
|
||||
export declare const Forward: (props: LucideProps) => JSX.Element;
|
||||
export declare const Frame: (props: LucideProps) => JSX.Element;
|
||||
export declare const Framer: (props: LucideProps) => JSX.Element;
|
||||
export declare const Frown: (props: LucideProps) => JSX.Element;
|
||||
export declare const Fuel: (props: LucideProps) => JSX.Element;
|
||||
export declare const FunctionSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gamepad2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gamepad: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gauge: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gavel: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gem: (props: LucideProps) => JSX.Element;
|
||||
export declare const Ghost: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gift: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitBranchPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitBranch: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitCommit: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitCompare: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitFork: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitMerge: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitPullRequestClosed: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitPullRequestDraft: (props: LucideProps) => JSX.Element;
|
||||
export declare const GitPullRequest: (props: LucideProps) => JSX.Element;
|
||||
export declare const Github: (props: LucideProps) => JSX.Element;
|
||||
export declare const Gitlab: (props: LucideProps) => JSX.Element;
|
||||
export declare const GlassWater: (props: LucideProps) => JSX.Element;
|
||||
export declare const Glasses: (props: LucideProps) => JSX.Element;
|
||||
export declare const Globe2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Globe: (props: LucideProps) => JSX.Element;
|
||||
export declare const Grab: (props: LucideProps) => JSX.Element;
|
||||
export declare const GraduationCap: (props: LucideProps) => JSX.Element;
|
||||
export declare const Grape: (props: LucideProps) => JSX.Element;
|
||||
export declare const Grid: (props: LucideProps) => JSX.Element;
|
||||
export declare const GripHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const GripVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const Hammer: (props: LucideProps) => JSX.Element;
|
||||
export declare const HandMetal: (props: LucideProps) => JSX.Element;
|
||||
export declare const Hand: (props: LucideProps) => JSX.Element;
|
||||
export declare const HardDrive: (props: LucideProps) => JSX.Element;
|
||||
export declare const HardHat: (props: LucideProps) => JSX.Element;
|
||||
export declare const Hash: (props: LucideProps) => JSX.Element;
|
||||
export declare const Haze: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading1: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading3: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading4: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading5: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading6: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heading: (props: LucideProps) => JSX.Element;
|
||||
export declare const Headphones: (props: LucideProps) => JSX.Element;
|
||||
export declare const HeartCrack: (props: LucideProps) => JSX.Element;
|
||||
export declare const HeartHandshake: (props: LucideProps) => JSX.Element;
|
||||
export declare const HeartOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const HeartPulse: (props: LucideProps) => JSX.Element;
|
||||
export declare const Heart: (props: LucideProps) => JSX.Element;
|
||||
export declare const HelpCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const Hexagon: (props: LucideProps) => JSX.Element;
|
||||
export declare const Highlighter: (props: LucideProps) => JSX.Element;
|
||||
export declare const History: (props: LucideProps) => JSX.Element;
|
||||
export declare const Home: (props: LucideProps) => JSX.Element;
|
||||
export declare const HopOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Hop: (props: LucideProps) => JSX.Element;
|
||||
export declare const Hourglass: (props: LucideProps) => JSX.Element;
|
||||
export declare const IceCream: (props: LucideProps) => JSX.Element;
|
||||
export declare const ImageMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const ImageOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const ImagePlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Image: (props: LucideProps) => JSX.Element;
|
||||
export declare const Import: (props: LucideProps) => JSX.Element;
|
||||
export declare const Inbox: (props: LucideProps) => JSX.Element;
|
||||
export declare const Indent: (props: LucideProps) => JSX.Element;
|
||||
export declare const IndianRupee: (props: LucideProps) => JSX.Element;
|
||||
export declare const Infinity: (props: LucideProps) => JSX.Element;
|
||||
export declare const Info: (props: LucideProps) => JSX.Element;
|
||||
export declare const Inspect: (props: LucideProps) => JSX.Element;
|
||||
export declare const Instagram: (props: LucideProps) => JSX.Element;
|
||||
export declare const Italic: (props: LucideProps) => JSX.Element;
|
||||
export declare const JapaneseYen: (props: LucideProps) => JSX.Element;
|
||||
export declare const Joystick: (props: LucideProps) => JSX.Element;
|
||||
export declare const Key: (props: LucideProps) => JSX.Element;
|
||||
export declare const Keyboard: (props: LucideProps) => JSX.Element;
|
||||
export declare const LampCeiling: (props: LucideProps) => JSX.Element;
|
||||
export declare const LampDesk: (props: LucideProps) => JSX.Element;
|
||||
export declare const LampFloor: (props: LucideProps) => JSX.Element;
|
||||
export declare const LampWallDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const LampWallUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const Lamp: (props: LucideProps) => JSX.Element;
|
||||
export declare const Landmark: (props: LucideProps) => JSX.Element;
|
||||
export declare const Languages: (props: LucideProps) => JSX.Element;
|
||||
export declare const Laptop2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Laptop: (props: LucideProps) => JSX.Element;
|
||||
export declare const LassoSelect: (props: LucideProps) => JSX.Element;
|
||||
export declare const Lasso: (props: LucideProps) => JSX.Element;
|
||||
export declare const Laugh: (props: LucideProps) => JSX.Element;
|
||||
export declare const Layers: (props: LucideProps) => JSX.Element;
|
||||
export declare const LayoutDashboard: (props: LucideProps) => JSX.Element;
|
||||
export declare const LayoutGrid: (props: LucideProps) => JSX.Element;
|
||||
export declare const LayoutList: (props: LucideProps) => JSX.Element;
|
||||
export declare const LayoutTemplate: (props: LucideProps) => JSX.Element;
|
||||
export declare const Layout: (props: LucideProps) => JSX.Element;
|
||||
export declare const Leaf: (props: LucideProps) => JSX.Element;
|
||||
export declare const Library: (props: LucideProps) => JSX.Element;
|
||||
export declare const LifeBuoy: (props: LucideProps) => JSX.Element;
|
||||
export declare const LightbulbOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Lightbulb: (props: LucideProps) => JSX.Element;
|
||||
export declare const LineChart: (props: LucideProps) => JSX.Element;
|
||||
export declare const Link2Off: (props: LucideProps) => JSX.Element;
|
||||
export declare const Link2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Link: (props: LucideProps) => JSX.Element;
|
||||
export declare const Linkedin: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListChecks: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListEnd: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListMusic: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListOrdered: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListStart: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListVideo: (props: LucideProps) => JSX.Element;
|
||||
export declare const ListX: (props: LucideProps) => JSX.Element;
|
||||
export declare const List: (props: LucideProps) => JSX.Element;
|
||||
export declare const Loader2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Loader: (props: LucideProps) => JSX.Element;
|
||||
export declare const LocateFixed: (props: LucideProps) => JSX.Element;
|
||||
export declare const LocateOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Locate: (props: LucideProps) => JSX.Element;
|
||||
export declare const Lock: (props: LucideProps) => JSX.Element;
|
||||
export declare const LogIn: (props: LucideProps) => JSX.Element;
|
||||
export declare const LogOut: (props: LucideProps) => JSX.Element;
|
||||
export declare const Luggage: (props: LucideProps) => JSX.Element;
|
||||
export declare const Magnet: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailOpen: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailQuestion: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailSearch: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailWarning: (props: LucideProps) => JSX.Element;
|
||||
export declare const MailX: (props: LucideProps) => JSX.Element;
|
||||
export declare const Mail: (props: LucideProps) => JSX.Element;
|
||||
export declare const Mails: (props: LucideProps) => JSX.Element;
|
||||
export declare const MapPinOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const MapPin: (props: LucideProps) => JSX.Element;
|
||||
export declare const Map: (props: LucideProps) => JSX.Element;
|
||||
export declare const Martini: (props: LucideProps) => JSX.Element;
|
||||
export declare const Maximize2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Maximize: (props: LucideProps) => JSX.Element;
|
||||
export declare const Medal: (props: LucideProps) => JSX.Element;
|
||||
export declare const MegaphoneOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Megaphone: (props: LucideProps) => JSX.Element;
|
||||
export declare const Meh: (props: LucideProps) => JSX.Element;
|
||||
export declare const Menu: (props: LucideProps) => JSX.Element;
|
||||
export declare const MessageCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const MessageSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Mic2: (props: LucideProps) => JSX.Element;
|
||||
export declare const MicOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Mic: (props: LucideProps) => JSX.Element;
|
||||
export declare const Microscope: (props: LucideProps) => JSX.Element;
|
||||
export declare const Microwave: (props: LucideProps) => JSX.Element;
|
||||
export declare const Milestone: (props: LucideProps) => JSX.Element;
|
||||
export declare const MilkOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Milk: (props: LucideProps) => JSX.Element;
|
||||
export declare const Minimize2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Minimize: (props: LucideProps) => JSX.Element;
|
||||
export declare const MinusCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const MinusSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Minus: (props: LucideProps) => JSX.Element;
|
||||
export declare const MonitorOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const MonitorSmartphone: (props: LucideProps) => JSX.Element;
|
||||
export declare const MonitorSpeaker: (props: LucideProps) => JSX.Element;
|
||||
export declare const Monitor: (props: LucideProps) => JSX.Element;
|
||||
export declare const Moon: (props: LucideProps) => JSX.Element;
|
||||
export declare const MoreHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const MoreVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const MountainSnow: (props: LucideProps) => JSX.Element;
|
||||
export declare const Mountain: (props: LucideProps) => JSX.Element;
|
||||
export declare const MousePointer2: (props: LucideProps) => JSX.Element;
|
||||
export declare const MousePointerClick: (props: LucideProps) => JSX.Element;
|
||||
export declare const MousePointer: (props: LucideProps) => JSX.Element;
|
||||
export declare const Mouse: (props: LucideProps) => JSX.Element;
|
||||
export declare const Move3d: (props: LucideProps) => JSX.Element;
|
||||
export declare const MoveDiagonal2: (props: LucideProps) => JSX.Element;
|
||||
export declare const MoveDiagonal: (props: LucideProps) => JSX.Element;
|
||||
export declare const MoveHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const MoveVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const Move: (props: LucideProps) => JSX.Element;
|
||||
export declare const Music2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Music3: (props: LucideProps) => JSX.Element;
|
||||
export declare const Music4: (props: LucideProps) => JSX.Element;
|
||||
export declare const Music: (props: LucideProps) => JSX.Element;
|
||||
export declare const Navigation2Off: (props: LucideProps) => JSX.Element;
|
||||
export declare const Navigation2: (props: LucideProps) => JSX.Element;
|
||||
export declare const NavigationOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Navigation: (props: LucideProps) => JSX.Element;
|
||||
export declare const Network: (props: LucideProps) => JSX.Element;
|
||||
export declare const Newspaper: (props: LucideProps) => JSX.Element;
|
||||
export declare const NutOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Nut: (props: LucideProps) => JSX.Element;
|
||||
export declare const Octagon: (props: LucideProps) => JSX.Element;
|
||||
export declare const Option: (props: LucideProps) => JSX.Element;
|
||||
export declare const Outdent: (props: LucideProps) => JSX.Element;
|
||||
export declare const Package2: (props: LucideProps) => JSX.Element;
|
||||
export declare const PackageCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const PackageMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const PackageOpen: (props: LucideProps) => JSX.Element;
|
||||
export declare const PackagePlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const PackageSearch: (props: LucideProps) => JSX.Element;
|
||||
export declare const PackageX: (props: LucideProps) => JSX.Element;
|
||||
export declare const Package: (props: LucideProps) => JSX.Element;
|
||||
export declare const PaintBucket: (props: LucideProps) => JSX.Element;
|
||||
export declare const Paintbrush2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Paintbrush: (props: LucideProps) => JSX.Element;
|
||||
export declare const Palette: (props: LucideProps) => JSX.Element;
|
||||
export declare const Palmtree: (props: LucideProps) => JSX.Element;
|
||||
export declare const Paperclip: (props: LucideProps) => JSX.Element;
|
||||
export declare const PartyPopper: (props: LucideProps) => JSX.Element;
|
||||
export declare const PauseCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const PauseOctagon: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pause: (props: LucideProps) => JSX.Element;
|
||||
export declare const PenTool: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pencil: (props: LucideProps) => JSX.Element;
|
||||
export declare const Percent: (props: LucideProps) => JSX.Element;
|
||||
export declare const PersonStanding: (props: LucideProps) => JSX.Element;
|
||||
export declare const PhoneCall: (props: LucideProps) => JSX.Element;
|
||||
export declare const PhoneForwarded: (props: LucideProps) => JSX.Element;
|
||||
export declare const PhoneIncoming: (props: LucideProps) => JSX.Element;
|
||||
export declare const PhoneMissed: (props: LucideProps) => JSX.Element;
|
||||
export declare const PhoneOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const PhoneOutgoing: (props: LucideProps) => JSX.Element;
|
||||
export declare const Phone: (props: LucideProps) => JSX.Element;
|
||||
export declare const PieChart: (props: LucideProps) => JSX.Element;
|
||||
export declare const PiggyBank: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pilcrow: (props: LucideProps) => JSX.Element;
|
||||
export declare const PinOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pin: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pipette: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pizza: (props: LucideProps) => JSX.Element;
|
||||
export declare const Plane: (props: LucideProps) => JSX.Element;
|
||||
export declare const PlayCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const Play: (props: LucideProps) => JSX.Element;
|
||||
export declare const Plug2: (props: LucideProps) => JSX.Element;
|
||||
export declare const PlugZap: (props: LucideProps) => JSX.Element;
|
||||
export declare const Plug: (props: LucideProps) => JSX.Element;
|
||||
export declare const PlusCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const PlusSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Plus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pocket: (props: LucideProps) => JSX.Element;
|
||||
export declare const Podcast: (props: LucideProps) => JSX.Element;
|
||||
export declare const Pointer: (props: LucideProps) => JSX.Element;
|
||||
export declare const PoundSterling: (props: LucideProps) => JSX.Element;
|
||||
export declare const PowerOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Power: (props: LucideProps) => JSX.Element;
|
||||
export declare const Printer: (props: LucideProps) => JSX.Element;
|
||||
export declare const Puzzle: (props: LucideProps) => JSX.Element;
|
||||
export declare const QrCode: (props: LucideProps) => JSX.Element;
|
||||
export declare const Quote: (props: LucideProps) => JSX.Element;
|
||||
export declare const RadioReceiver: (props: LucideProps) => JSX.Element;
|
||||
export declare const Radio: (props: LucideProps) => JSX.Element;
|
||||
export declare const RectangleHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const RectangleVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const Recycle: (props: LucideProps) => JSX.Element;
|
||||
export declare const Redo2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Redo: (props: LucideProps) => JSX.Element;
|
||||
export declare const RefreshCcw: (props: LucideProps) => JSX.Element;
|
||||
export declare const RefreshCw: (props: LucideProps) => JSX.Element;
|
||||
export declare const Refrigerator: (props: LucideProps) => JSX.Element;
|
||||
export declare const Regex: (props: LucideProps) => JSX.Element;
|
||||
export declare const Repeat1: (props: LucideProps) => JSX.Element;
|
||||
export declare const Repeat: (props: LucideProps) => JSX.Element;
|
||||
export declare const ReplyAll: (props: LucideProps) => JSX.Element;
|
||||
export declare const Reply: (props: LucideProps) => JSX.Element;
|
||||
export declare const Rewind: (props: LucideProps) => JSX.Element;
|
||||
export declare const Rocket: (props: LucideProps) => JSX.Element;
|
||||
export declare const RockingChair: (props: LucideProps) => JSX.Element;
|
||||
export declare const Rotate3d: (props: LucideProps) => JSX.Element;
|
||||
export declare const RotateCcw: (props: LucideProps) => JSX.Element;
|
||||
export declare const RotateCw: (props: LucideProps) => JSX.Element;
|
||||
export declare const Rss: (props: LucideProps) => JSX.Element;
|
||||
export declare const Ruler: (props: LucideProps) => JSX.Element;
|
||||
export declare const RussianRuble: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sailboat: (props: LucideProps) => JSX.Element;
|
||||
export declare const Save: (props: LucideProps) => JSX.Element;
|
||||
export declare const Scale3d: (props: LucideProps) => JSX.Element;
|
||||
export declare const Scale: (props: LucideProps) => JSX.Element;
|
||||
export declare const Scaling: (props: LucideProps) => JSX.Element;
|
||||
export declare const ScanFace: (props: LucideProps) => JSX.Element;
|
||||
export declare const ScanLine: (props: LucideProps) => JSX.Element;
|
||||
export declare const Scan: (props: LucideProps) => JSX.Element;
|
||||
export declare const Scissors: (props: LucideProps) => JSX.Element;
|
||||
export declare const ScreenShareOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const ScreenShare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Scroll: (props: LucideProps) => JSX.Element;
|
||||
export declare const Search: (props: LucideProps) => JSX.Element;
|
||||
export declare const Send: (props: LucideProps) => JSX.Element;
|
||||
export declare const SeparatorHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const SeparatorVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const ServerCog: (props: LucideProps) => JSX.Element;
|
||||
export declare const ServerCrash: (props: LucideProps) => JSX.Element;
|
||||
export declare const ServerOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Server: (props: LucideProps) => JSX.Element;
|
||||
export declare const Settings2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Settings: (props: LucideProps) => JSX.Element;
|
||||
export declare const Share2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Share: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sheet: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShieldAlert: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShieldCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShieldClose: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShieldOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Shield: (props: LucideProps) => JSX.Element;
|
||||
export declare const Shirt: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShoppingBag: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShoppingCart: (props: LucideProps) => JSX.Element;
|
||||
export declare const Shovel: (props: LucideProps) => JSX.Element;
|
||||
export declare const ShowerHead: (props: LucideProps) => JSX.Element;
|
||||
export declare const Shrink: (props: LucideProps) => JSX.Element;
|
||||
export declare const Shrub: (props: LucideProps) => JSX.Element;
|
||||
export declare const Shuffle: (props: LucideProps) => JSX.Element;
|
||||
export declare const SidebarClose: (props: LucideProps) => JSX.Element;
|
||||
export declare const SidebarOpen: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sidebar: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sigma: (props: LucideProps) => JSX.Element;
|
||||
export declare const SignalHigh: (props: LucideProps) => JSX.Element;
|
||||
export declare const SignalLow: (props: LucideProps) => JSX.Element;
|
||||
export declare const SignalMedium: (props: LucideProps) => JSX.Element;
|
||||
export declare const SignalZero: (props: LucideProps) => JSX.Element;
|
||||
export declare const Signal: (props: LucideProps) => JSX.Element;
|
||||
export declare const Siren: (props: LucideProps) => JSX.Element;
|
||||
export declare const SkipBack: (props: LucideProps) => JSX.Element;
|
||||
export declare const SkipForward: (props: LucideProps) => JSX.Element;
|
||||
export declare const Skull: (props: LucideProps) => JSX.Element;
|
||||
export declare const Slack: (props: LucideProps) => JSX.Element;
|
||||
export declare const Slash: (props: LucideProps) => JSX.Element;
|
||||
export declare const Slice: (props: LucideProps) => JSX.Element;
|
||||
export declare const SlidersHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sliders: (props: LucideProps) => JSX.Element;
|
||||
export declare const SmartphoneCharging: (props: LucideProps) => JSX.Element;
|
||||
export declare const Smartphone: (props: LucideProps) => JSX.Element;
|
||||
export declare const SmilePlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const Smile: (props: LucideProps) => JSX.Element;
|
||||
export declare const Snowflake: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sofa: (props: LucideProps) => JSX.Element;
|
||||
export declare const SortAsc: (props: LucideProps) => JSX.Element;
|
||||
export declare const SortDesc: (props: LucideProps) => JSX.Element;
|
||||
export declare const Speaker: (props: LucideProps) => JSX.Element;
|
||||
export declare const Spline: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sprout: (props: LucideProps) => JSX.Element;
|
||||
export declare const Square: (props: LucideProps) => JSX.Element;
|
||||
export declare const StarHalf: (props: LucideProps) => JSX.Element;
|
||||
export declare const StarOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Star: (props: LucideProps) => JSX.Element;
|
||||
export declare const Stethoscope: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sticker: (props: LucideProps) => JSX.Element;
|
||||
export declare const StickyNote: (props: LucideProps) => JSX.Element;
|
||||
export declare const StopCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const StretchHorizontal: (props: LucideProps) => JSX.Element;
|
||||
export declare const StretchVertical: (props: LucideProps) => JSX.Element;
|
||||
export declare const Strikethrough: (props: LucideProps) => JSX.Element;
|
||||
export declare const Subscript: (props: LucideProps) => JSX.Element;
|
||||
export declare const Subtitles: (props: LucideProps) => JSX.Element;
|
||||
export declare const SunDim: (props: LucideProps) => JSX.Element;
|
||||
export declare const SunMedium: (props: LucideProps) => JSX.Element;
|
||||
export declare const SunMoon: (props: LucideProps) => JSX.Element;
|
||||
export declare const SunSnow: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sun: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sunrise: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sunset: (props: LucideProps) => JSX.Element;
|
||||
export declare const Superscript: (props: LucideProps) => JSX.Element;
|
||||
export declare const SwissFranc: (props: LucideProps) => JSX.Element;
|
||||
export declare const SwitchCamera: (props: LucideProps) => JSX.Element;
|
||||
export declare const Sword: (props: LucideProps) => JSX.Element;
|
||||
export declare const Swords: (props: LucideProps) => JSX.Element;
|
||||
export declare const Syringe: (props: LucideProps) => JSX.Element;
|
||||
export declare const Table2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Table: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tablet: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tag: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tags: (props: LucideProps) => JSX.Element;
|
||||
export declare const Target: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tent: (props: LucideProps) => JSX.Element;
|
||||
export declare const TerminalSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const Terminal: (props: LucideProps) => JSX.Element;
|
||||
export declare const TextCursorInput: (props: LucideProps) => JSX.Element;
|
||||
export declare const TextCursor: (props: LucideProps) => JSX.Element;
|
||||
export declare const ThermometerSnowflake: (props: LucideProps) => JSX.Element;
|
||||
export declare const ThermometerSun: (props: LucideProps) => JSX.Element;
|
||||
export declare const Thermometer: (props: LucideProps) => JSX.Element;
|
||||
export declare const ThumbsDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const ThumbsUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const Ticket: (props: LucideProps) => JSX.Element;
|
||||
export declare const TimerOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const TimerReset: (props: LucideProps) => JSX.Element;
|
||||
export declare const Timer: (props: LucideProps) => JSX.Element;
|
||||
export declare const ToggleLeft: (props: LucideProps) => JSX.Element;
|
||||
export declare const ToggleRight: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tornado: (props: LucideProps) => JSX.Element;
|
||||
export declare const ToyBrick: (props: LucideProps) => JSX.Element;
|
||||
export declare const Train: (props: LucideProps) => JSX.Element;
|
||||
export declare const Trash2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Trash: (props: LucideProps) => JSX.Element;
|
||||
export declare const TreeDeciduous: (props: LucideProps) => JSX.Element;
|
||||
export declare const TreePine: (props: LucideProps) => JSX.Element;
|
||||
export declare const Trees: (props: LucideProps) => JSX.Element;
|
||||
export declare const Trello: (props: LucideProps) => JSX.Element;
|
||||
export declare const TrendingDown: (props: LucideProps) => JSX.Element;
|
||||
export declare const TrendingUp: (props: LucideProps) => JSX.Element;
|
||||
export declare const Triangle: (props: LucideProps) => JSX.Element;
|
||||
export declare const Trophy: (props: LucideProps) => JSX.Element;
|
||||
export declare const Truck: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tv2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Tv: (props: LucideProps) => JSX.Element;
|
||||
export declare const Twitch: (props: LucideProps) => JSX.Element;
|
||||
export declare const Twitter: (props: LucideProps) => JSX.Element;
|
||||
export declare const Type: (props: LucideProps) => JSX.Element;
|
||||
export declare const Umbrella: (props: LucideProps) => JSX.Element;
|
||||
export declare const Underline: (props: LucideProps) => JSX.Element;
|
||||
export declare const Undo2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Undo: (props: LucideProps) => JSX.Element;
|
||||
export declare const Unlink2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Unlink: (props: LucideProps) => JSX.Element;
|
||||
export declare const Unlock: (props: LucideProps) => JSX.Element;
|
||||
export declare const UploadCloud: (props: LucideProps) => JSX.Element;
|
||||
export declare const Upload: (props: LucideProps) => JSX.Element;
|
||||
export declare const Usb: (props: LucideProps) => JSX.Element;
|
||||
export declare const UserCheck: (props: LucideProps) => JSX.Element;
|
||||
export declare const UserCog: (props: LucideProps) => JSX.Element;
|
||||
export declare const UserMinus: (props: LucideProps) => JSX.Element;
|
||||
export declare const UserPlus: (props: LucideProps) => JSX.Element;
|
||||
export declare const UserX: (props: LucideProps) => JSX.Element;
|
||||
export declare const User: (props: LucideProps) => JSX.Element;
|
||||
export declare const Users: (props: LucideProps) => JSX.Element;
|
||||
export declare const UtensilsCrossed: (props: LucideProps) => JSX.Element;
|
||||
export declare const Utensils: (props: LucideProps) => JSX.Element;
|
||||
export declare const Vegan: (props: LucideProps) => JSX.Element;
|
||||
export declare const VenetianMask: (props: LucideProps) => JSX.Element;
|
||||
export declare const Verified: (props: LucideProps) => JSX.Element;
|
||||
export declare const VibrateOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Vibrate: (props: LucideProps) => JSX.Element;
|
||||
export declare const VideoOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Video: (props: LucideProps) => JSX.Element;
|
||||
export declare const View: (props: LucideProps) => JSX.Element;
|
||||
export declare const Voicemail: (props: LucideProps) => JSX.Element;
|
||||
export declare const Volume1: (props: LucideProps) => JSX.Element;
|
||||
export declare const Volume2: (props: LucideProps) => JSX.Element;
|
||||
export declare const VolumeX: (props: LucideProps) => JSX.Element;
|
||||
export declare const Volume: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wallet: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wand2: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wand: (props: LucideProps) => JSX.Element;
|
||||
export declare const Watch: (props: LucideProps) => JSX.Element;
|
||||
export declare const Waves: (props: LucideProps) => JSX.Element;
|
||||
export declare const Webcam: (props: LucideProps) => JSX.Element;
|
||||
export declare const Webhook: (props: LucideProps) => JSX.Element;
|
||||
export declare const WheatOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wheat: (props: LucideProps) => JSX.Element;
|
||||
export declare const WifiOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wifi: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wind: (props: LucideProps) => JSX.Element;
|
||||
export declare const WineOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wine: (props: LucideProps) => JSX.Element;
|
||||
export declare const WrapText: (props: LucideProps) => JSX.Element;
|
||||
export declare const Wrench: (props: LucideProps) => JSX.Element;
|
||||
export declare const XCircle: (props: LucideProps) => JSX.Element;
|
||||
export declare const XOctagon: (props: LucideProps) => JSX.Element;
|
||||
export declare const XSquare: (props: LucideProps) => JSX.Element;
|
||||
export declare const X: (props: LucideProps) => JSX.Element;
|
||||
export declare const Youtube: (props: LucideProps) => JSX.Element;
|
||||
export declare const ZapOff: (props: LucideProps) => JSX.Element;
|
||||
export declare const Zap: (props: LucideProps) => JSX.Element;
|
||||
export declare const ZoomIn: (props: LucideProps) => JSX.Element;
|
||||
export declare const ZoomOut: (props: LucideProps) => JSX.Element;
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-react-native",
|
||||
"description": "A Lucide icon library package for React Native applications",
|
||||
"version": "0.102.0",
|
||||
"version": "0.105.1",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||
@@ -26,21 +26,29 @@
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles && pnpm build:types",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --iconFileExtension=.ts --exportFileName=index.ts --withAliases --aliasesFileExtension=.ts",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"test": "jest",
|
||||
"test": "vitest",
|
||||
"version": "pnpm version --git-tag-version=false"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"babel-preset-react-app": "^10.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"@types/prop-types": "^15.7.5",
|
||||
"@types/react": "^18.0.21",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-native": "^0.69.0",
|
||||
"react-native-svg": "^13.0.0"
|
||||
"react-native-svg": "^13.0.0",
|
||||
"rollup": "^3.5.1",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.1.0",
|
||||
"vitest": "^0.24.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.7.2",
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
import plugins from '../../rollup.plugins.mjs';
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideReact';
|
||||
const outputFileName = 'lucide-react-native';
|
||||
const outputDir = 'dist';
|
||||
const inputs = ['src/lucide-react-native.js'];
|
||||
const inputs = ['src/lucide-react-native.ts'];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
@@ -36,7 +25,7 @@ const configs = bundles
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
external: ['react', 'prop-types', 'lucide', 'react-native-svg'],
|
||||
external: ['react', 'prop-types', 'react-native-svg'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
@@ -54,7 +43,6 @@ const configs = bundles
|
||||
react: 'react',
|
||||
'react-native-svg': 'react-native-svg',
|
||||
'prop-types': 'PropTypes',
|
||||
lucide: 'lucide',
|
||||
},
|
||||
},
|
||||
})),
|
||||
|
||||
@@ -1,49 +1,91 @@
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
appendFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
writeFile,
|
||||
getCurrentDirPath
|
||||
getCurrentDirPath,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url)
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const srcDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
/// <reference types="react" />
|
||||
import { SVGAttributes } from 'react'
|
||||
|
||||
declare module 'lucide-react-native'
|
||||
|
||||
// Create interface extending SVGProps
|
||||
export interface LucideProps extends Partial<React.SVGProps<SVGSVGElement>> {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
export declare const createReactComponent: (iconName: string, iconNode: any[]) => (props: LucideProps) => JSX.Element;
|
||||
|
||||
export type Icon = React.FC<LucideProps>;
|
||||
|
||||
// Generated icons
|
||||
`;
|
||||
const writeDeclarationFile = (typesFile, directory, content) => {
|
||||
resetFile(typesFile, directory);
|
||||
writeFile(content, typesFile, directory);
|
||||
};
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-react-native.d.ts';
|
||||
|
||||
resetFile(TYPES_FILE, srcDirectory);
|
||||
writeFile(typeDefinitions, TYPES_FILE, srcDirectory);
|
||||
let declarationFileContent = `\
|
||||
/// <reference types="react" />
|
||||
import { ReactSVG, FC, SVGProps } from 'react'
|
||||
|
||||
declare module 'lucide-react-native'
|
||||
|
||||
// Create interface extending SVGProps
|
||||
export interface LucideProps extends Partial<SVGProps<SVGSVGElement>> {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
export type LucideIcon = (props: LucideProps) => JSX.Element;
|
||||
|
||||
export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
|
||||
export declare const createLucideIcon: (iconName: string, iconNode: IconNode) => LucideIcon;
|
||||
|
||||
export type Icon = FC<LucideProps>;
|
||||
|
||||
// Generated icon
|
||||
`;
|
||||
|
||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||
|
||||
svgFiles.forEach(svgFile => {
|
||||
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);
|
||||
declarationFileContent += `export declare const ${componentName}: LucideIcon;\n`;
|
||||
});
|
||||
|
||||
console.log(`Generated ${TYPES_FILE} file with`, svgFiles.length, 'icons');
|
||||
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 += `export declare const ${componentName}Icon: LucideIcon;\n`;
|
||||
declarationFileContent += `export declare const Lucide${componentName}: LucideIcon;\n`;
|
||||
aliasesCount += 1;
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
declarationFileContent += `export declare const ${componentNameAlias}: LucideIcon;\n`;
|
||||
|
||||
aliasesCount += 1;
|
||||
});
|
||||
}
|
||||
|
||||
declarationFileContent += '\n';
|
||||
});
|
||||
|
||||
writeDeclarationFile(TYPES_FILE, srcDirectory, declarationFileContent);
|
||||
console.log(
|
||||
`Generated ${TYPES_FILE} file with`,
|
||||
svgFiles.length,
|
||||
'icons and with',
|
||||
aliasesCount,
|
||||
'aliases',
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default ({ componentName, children }) => `
|
||||
import createReactComponent from '../createReactComponent';
|
||||
import createLucideIcon from '../createLucideIcon';
|
||||
|
||||
const ${componentName} = createReactComponent('${componentName}', ${JSON.stringify(children)});
|
||||
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
|
||||
|
||||
export default ${componentName};
|
||||
`;
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import { forwardRef, createElement } from 'react';
|
||||
import { forwardRef, createElement, ReactSVG, ReactNode, FunctionComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import * as NativeSvg from 'react-native-svg';
|
||||
import defaultAttributes from './defaultAttributes';
|
||||
import type { SvgProps } from 'react-native-svg';
|
||||
type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
|
||||
const createReactComponent = (iconName, iconNode) => {
|
||||
|
||||
export interface LucideProps extends SvgProps {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode) => {
|
||||
const Component = forwardRef(
|
||||
({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }, ref) =>
|
||||
({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }: LucideProps, ref) =>
|
||||
createElement(
|
||||
NativeSvg.Svg,
|
||||
{
|
||||
@@ -19,10 +26,10 @@ const createReactComponent = (iconName, iconNode) => {
|
||||
},
|
||||
[
|
||||
...iconNode.map(([tag, attrs]) => {
|
||||
const uppercasedTag = tag.charAt(0).toUpperCase() + tag.slice(1);
|
||||
return createElement(NativeSvg[uppercasedTag], attrs);
|
||||
const upperCasedTag = (tag.charAt(0).toUpperCase() + tag.slice(1)) as keyof (typeof NativeSvg);
|
||||
return createElement(NativeSvg[upperCasedTag] as FunctionComponent<Record<string, string>>, attrs);
|
||||
}),
|
||||
...(children || []),
|
||||
...(children as ReactNode[] || []),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -38,4 +45,4 @@ const createReactComponent = (iconName, iconNode) => {
|
||||
return Component;
|
||||
};
|
||||
|
||||
export default createReactComponent;
|
||||
export default createLucideIcon;
|
||||
@@ -1,2 +0,0 @@
|
||||
export * from './icons';
|
||||
export { default as createReactComponent } from './createReactComponent';
|
||||
4
packages/lucide-react-native/src/lucide-react-native.ts
Normal file
4
packages/lucide-react-native/src/lucide-react-native.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as createLucideIcon } from './createLucideIcon';
|
||||
@@ -1,5 +0,0 @@
|
||||
// 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,5 @@
|
||||
// Vitest Snapshot v1
|
||||
|
||||
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>"`;
|
||||
@@ -1,10 +1,14 @@
|
||||
import React from 'react';
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render } from '@testing-library/react'
|
||||
import { Grid } from '../src/icons'
|
||||
|
||||
vi.mock('react-native-svg')
|
||||
|
||||
type Attributes = Record<string, { value: unknown}>
|
||||
|
||||
describe('Using lucide icon components', () => {
|
||||
it('should render an component', () => {
|
||||
const { container } = render( <Grid/> );
|
||||
const { container } = render(<Grid /> );
|
||||
|
||||
expect( container.innerHTML ).toMatchSnapshot();
|
||||
});
|
||||
@@ -21,10 +25,10 @@ describe('Using lucide icon components', () => {
|
||||
);
|
||||
|
||||
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((attributes as unknown as Attributes).stroke.value).toBe('red');
|
||||
expect((attributes as unknown as Attributes).width.value).toBe('48');
|
||||
expect((attributes as unknown as Attributes).height.value).toBe('48');
|
||||
expect((attributes as unknown as Attributes)['stroke-width'].value).toBe('4');
|
||||
|
||||
expect( container.innerHTML ).toMatchSnapshot();
|
||||
});
|
||||
1
packages/lucide-react-native/tests/setupVitest.js
Normal file
1
packages/lucide-react-native/tests/setupVitest.js
Normal file
@@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom';
|
||||
24
packages/lucide-react-native/tsconfig.json
Normal file
24
packages/lucide-react-native/tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "ESNext",
|
||||
"lib": [
|
||||
"es2019",
|
||||
"DOM"
|
||||
],
|
||||
"allowJs": true,
|
||||
"jsx": "react-jsx",
|
||||
"noEmit": true,
|
||||
"isolatedModules": true,
|
||||
"strict": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": false
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
]
|
||||
}
|
||||
19
packages/lucide-react-native/vitest.config.ts
Normal file
19
packages/lucide-react-native/vitest.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
transformMode: {
|
||||
web: [/\.jsx?$/],
|
||||
},
|
||||
setupFiles: './tests/setupVitest.js',
|
||||
// threads: false,
|
||||
// isolate: false,
|
||||
mockReset: true,
|
||||
},
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
const mainConfig = require('../../babel.config');
|
||||
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/env',
|
||||
{
|
||||
loose: true,
|
||||
modules: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
env: {
|
||||
...mainConfig.env,
|
||||
test: {
|
||||
presets: ['react-app'],
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
roots: ['<rootDir>/src/', '<rootDir>/tests/'],
|
||||
moduleFileExtensions: ['js'],
|
||||
transformIgnorePatterns: [`/node_modules`],
|
||||
transform: {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
},
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-react",
|
||||
"description": "A Lucide icon library package for React applications",
|
||||
"version": "0.102.0",
|
||||
"version": "0.105.0",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||
@@ -22,26 +22,33 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:types && pnpm build:bundles",
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm typecheck && pnpm build:bundles && pnpm build:types",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
|
||||
"build:es": "babel src -d dist/esm",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --aliasesFileExtension=.ts --iconFileExtension=.ts --exportFileName=index.ts",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"test": "jest",
|
||||
"typecheck": "tsc",
|
||||
"typecheck:watch": "tsc -w",
|
||||
"test": "vitest run",
|
||||
"version": "pnpm version --git-tag-version=false"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^11.2.6",
|
||||
"babel-preset-react-app": "^10.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"prop-types": "^15.7.2",
|
||||
"@types/prop-types": "^15.7.5",
|
||||
"@types/react": "^18.0.21",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
"react-dom": "17.0.2",
|
||||
"rollup": "^3.5.1",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.1.0",
|
||||
"vitest": "^0.24.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import plugins from '../../rollup.plugins.mjs';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideReact';
|
||||
const outputFileName = 'lucide-react';
|
||||
const outputDir = `dist`;
|
||||
const inputs = [`src/lucide-react.js`];
|
||||
const inputs = [`src/lucide-react.ts`];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
@@ -22,23 +22,53 @@ const bundles = [
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'es',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'esm',
|
||||
inputs,
|
||||
outputDir,
|
||||
preserveModules: true,
|
||||
},
|
||||
];
|
||||
|
||||
const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify }) =>
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
external: ['react', 'prop-types', 'lucide'],
|
||||
plugins: [
|
||||
// This for aliases, only for esm
|
||||
...(
|
||||
format !== 'esm' ? [
|
||||
replace({
|
||||
"export * from './aliases';": '',
|
||||
"export * as icons from './icons';": '',
|
||||
delimiters: ['', ''],
|
||||
preventAssignment: false,
|
||||
}),
|
||||
] : []
|
||||
),
|
||||
...plugins(pkg, minify)
|
||||
],
|
||||
external: ['react', 'prop-types'],
|
||||
output: {
|
||||
name: packageName,
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
...(preserveModules
|
||||
? {
|
||||
dir: `${outputDir}/${format}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
}),
|
||||
format,
|
||||
sourcemap: true,
|
||||
preserveModules,
|
||||
globals: {
|
||||
react: 'react',
|
||||
'prop-types': 'PropTypes',
|
||||
lucide: 'lucide',
|
||||
'prop-types': 'PropTypes'
|
||||
},
|
||||
},
|
||||
})),
|
||||
|
||||
@@ -1,49 +1,91 @@
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
appendFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
writeFile,
|
||||
getCurrentDirPath
|
||||
getCurrentDirPath,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url)
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const srcDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
/// <reference types="react" />
|
||||
import { SVGAttributes } from 'react'
|
||||
|
||||
declare module 'lucide-react'
|
||||
|
||||
// Create interface extending SVGProps
|
||||
export interface LucideProps extends Partial<React.SVGProps<SVGSVGElement>> {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
export declare const createReactComponent: (iconName: string, iconNode: any[]) => (props: LucideProps) => JSX.Element;
|
||||
|
||||
export type Icon = React.FC<LucideProps>;
|
||||
|
||||
// Generated icons
|
||||
`;
|
||||
const writeDeclarationFile = (typesFile, directory, content) => {
|
||||
resetFile(typesFile, directory);
|
||||
writeFile(content, typesFile, directory);
|
||||
};
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-react.d.ts';
|
||||
|
||||
resetFile(TYPES_FILE, srcDirectory);
|
||||
writeFile(typeDefinitions, TYPES_FILE, srcDirectory);
|
||||
let declarationFileContent = `\
|
||||
/// <reference types="react" />
|
||||
import { SVGAttributes, FC, SVGProps, ReactSVG } from 'react'
|
||||
|
||||
declare module 'lucide-react'
|
||||
|
||||
// Create interface extending SVGProps
|
||||
export interface LucideProps extends Partial<SVGProps<SVGSVGElement>> {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
export type LucideIcon = (props: LucideProps) => JSX.Element;
|
||||
|
||||
export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
|
||||
export declare const createLucideIcon: (iconName: string, iconNode: IconNode) => LucideIcon;
|
||||
|
||||
export type Icon = FC<LucideProps>;
|
||||
|
||||
// Generated icon
|
||||
`;
|
||||
|
||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||
|
||||
svgFiles.forEach(svgFile => {
|
||||
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);
|
||||
declarationFileContent += `export declare const ${componentName}: LucideIcon;\n`;
|
||||
});
|
||||
|
||||
console.log(`Generated ${TYPES_FILE} file with`, svgFiles.length, 'icons');
|
||||
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 += `export declare const ${componentName}Icon: LucideIcon;\n`;
|
||||
declarationFileContent += `export declare const Lucide${componentName}: LucideIcon;\n`;
|
||||
aliasesCount += 1;
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
declarationFileContent += `export declare const ${componentNameAlias}: LucideIcon;\n`;
|
||||
|
||||
aliasesCount += 1;
|
||||
});
|
||||
}
|
||||
|
||||
declarationFileContent += '\n';
|
||||
});
|
||||
|
||||
writeDeclarationFile(TYPES_FILE, srcDirectory, declarationFileContent);
|
||||
console.log(
|
||||
`Generated ${TYPES_FILE} file with`,
|
||||
svgFiles.length,
|
||||
'icons and with',
|
||||
aliasesCount,
|
||||
'aliases',
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default ({ componentName, children }) => `
|
||||
import createReactComponent from '../createReactComponent';
|
||||
import createLucideIcon from '../createLucideIcon';
|
||||
|
||||
const ${componentName} = createReactComponent('${componentName}', ${JSON.stringify(children)});
|
||||
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
|
||||
|
||||
export default ${componentName};
|
||||
`;
|
||||
|
||||
3480
packages/lucide-react/src/aliases.ts
Normal file
3480
packages/lucide-react/src/aliases.ts
Normal file
File diff suppressed because it is too large
Load Diff
50
packages/lucide-react/src/createLucideIcon.ts
Normal file
50
packages/lucide-react/src/createLucideIcon.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { forwardRef, createElement, ReactSVG, SVGProps } from 'react';
|
||||
import defaultAttributes from './defaultAttributes';
|
||||
|
||||
type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
|
||||
export type SVGAttributes = Partial<SVGProps<SVGSVGElement>>
|
||||
|
||||
export interface LucideProps extends SVGAttributes {
|
||||
size?: string | number
|
||||
}
|
||||
/**
|
||||
* 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) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode) => {
|
||||
const Component = forwardRef<SVGSVGElement, LucideProps>(
|
||||
({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }, ref) =>
|
||||
createElement(
|
||||
'svg',
|
||||
{
|
||||
ref,
|
||||
...defaultAttributes,
|
||||
width: size,
|
||||
height: size,
|
||||
stroke: color,
|
||||
strokeWidth,
|
||||
className: `lucide lucide-${toKebabCase(iconName)}`,
|
||||
...rest,
|
||||
},
|
||||
[
|
||||
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
||||
...(
|
||||
(Array.isArray(children) ? children : [children]) || []
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Component.displayName = `${iconName}`;
|
||||
|
||||
return Component;
|
||||
};
|
||||
|
||||
export default createLucideIcon
|
||||
@@ -1,43 +0,0 @@
|
||||
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, children, ...rest }, ref) =>
|
||||
createElement(
|
||||
'svg',
|
||||
{
|
||||
ref,
|
||||
...defaultAttributes,
|
||||
width: size,
|
||||
height: size,
|
||||
stroke: color,
|
||||
strokeWidth,
|
||||
className: `lucide lucide-${toKebabCase(iconName)}`,
|
||||
...rest,
|
||||
},
|
||||
[...iconNode.map(([tag, attrs]) => createElement(tag, attrs)), ...(children || [])],
|
||||
),
|
||||
);
|
||||
|
||||
Component.propTypes = {
|
||||
color: PropTypes.string,
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
strokeWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
};
|
||||
|
||||
Component.displayName = `${iconName}`;
|
||||
|
||||
return Component;
|
||||
};
|
||||
@@ -1,2 +0,0 @@
|
||||
export * from './icons';
|
||||
export { default as createReactComponent } from './createReactComponent';
|
||||
4
packages/lucide-react/src/lucide-react.ts
Normal file
4
packages/lucide-react/src/lucide-react.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as createLucideIcon } from './createLucideIcon';
|
||||
@@ -1,5 +0,0 @@
|
||||
// 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\\" 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\\" 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>"`;
|
||||
@@ -0,0 +1,5 @@
|
||||
// Vitest Snapshot v1
|
||||
|
||||
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\\" 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>"`;
|
||||
58
packages/lucide-react/tests/lucide-react.spec.tsx
Normal file
58
packages/lucide-react/tests/lucide-react.spec.tsx
Normal file
@@ -0,0 +1,58 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { render, cleanup } from '@testing-library/react'
|
||||
import { Pen, Edit2, Grid } from '../src/lucide-react';
|
||||
|
||||
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) as unknown as{ attributes: Record<string, { value: string }>};
|
||||
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();
|
||||
});
|
||||
|
||||
it('should render the alias icon', () => {
|
||||
const testId = 'pen-icon';
|
||||
const { container } = render(
|
||||
<Pen
|
||||
data-testid={testId}
|
||||
size={48}
|
||||
stroke="red"
|
||||
strokeWidth={4}
|
||||
/>,
|
||||
);
|
||||
|
||||
const PenIconRenderedHTML = container.innerHTML
|
||||
|
||||
cleanup()
|
||||
|
||||
const { container: Edit2Container } = render(
|
||||
<Edit2
|
||||
data-testid={testId}
|
||||
size={48}
|
||||
stroke="red"
|
||||
strokeWidth={4}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML)
|
||||
});
|
||||
})
|
||||
1
packages/lucide-react/tests/setupVitest.js
Normal file
1
packages/lucide-react/tests/setupVitest.js
Normal file
@@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom';
|
||||
23
packages/lucide-react/tsconfig.json
Normal file
23
packages/lucide-react/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"declaration": false,
|
||||
"noEmitOnError": true,
|
||||
"noEmit": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"lib": ["esnext", "dom"],
|
||||
"skipLibCheck": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"downlevelIteration": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"jsx": "react-jsx",
|
||||
},
|
||||
"exclude": ["**/node_modules"]
|
||||
}
|
||||
19
packages/lucide-react/vitest.config.ts
Normal file
19
packages/lucide-react/vitest.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
transformMode: {
|
||||
web: [/\.jsx?$/],
|
||||
},
|
||||
setupFiles: './tests/setupVitest.js',
|
||||
threads: false,
|
||||
isolate: false,
|
||||
},
|
||||
resolve: {
|
||||
conditions: ['development', 'browser'],
|
||||
},
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
const mainConfig = require('../../babel.config');
|
||||
|
||||
module.exports = {
|
||||
presets: ['solid'],
|
||||
env: mainConfig.env,
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-solid",
|
||||
"description": "A Lucide icon library package for Solid applications",
|
||||
"version": "0.88.0-beta.3",
|
||||
"version": "0.105.0-alpha.9",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||
@@ -11,37 +11,45 @@
|
||||
"directory": "packages/lucide-solid"
|
||||
},
|
||||
"author": "Eric Fennis",
|
||||
"amdName": "lucide-solid",
|
||||
"source": "src/lucide-solid.ts",
|
||||
"main": "dist/cjs/lucide-solid.js",
|
||||
"main:umd": "dist/umd/lucide-solid.js",
|
||||
"module": "dist/esm/lucide-solid.js",
|
||||
"unpkg": "dist/umd/lucide-solid.min.js",
|
||||
"typings": "dist/lucide-solid.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"types": "dist/types/lucide-solid.d.ts",
|
||||
"files": ["dist"],
|
||||
"exports": {
|
||||
".": {
|
||||
"solid": "./dist/source/lucide-solid.js",
|
||||
"import": "./dist/esm/lucide-solid.js",
|
||||
"browser": "./dist/esm/lucide-solid.js",
|
||||
"require": "./dist/cjs/lucide-solid.js",
|
||||
"node": "./dist/cjs/lucide-solid.js"
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:es && pnpm build:types && pnpm build:bundles",
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundle && pnpm build:version",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.js",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey",
|
||||
"build:es": "babel src -d dist/esm",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"test:jest": "jest",
|
||||
"test": "vitest",
|
||||
"build:transpile": "tsc --jsx preserve -t es2020 --rootDir src --outDir dist --noEmit false",
|
||||
"build:version": "node ./scripts/replaceVersion.mjs",
|
||||
"build:bundle": "rollup -c rollup.config.mjs",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --aliasesFileExtension=.ts --iconFileExtension=.tsx --exportFileName=index.ts",
|
||||
"test": "vitest run",
|
||||
"version": "pnpm version --git-tag-version=false"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"rollup-plugin-license": "^3.0.1",
|
||||
"babel-preset-solid": "^1.5.4",
|
||||
"jest": "^26.6.3",
|
||||
"jsdom": "^20.0.0",
|
||||
"rollup": "^3.5.1",
|
||||
"rollup-preset-solid": "^2.0.1",
|
||||
"solid-js": "^1.4.7",
|
||||
"solid-testing-library": "^0.3.0",
|
||||
"solid-jest": "^0.2.0",
|
||||
"vite": "^2.6.4",
|
||||
"typescript": "^4.9.4",
|
||||
"vite": "^3.2.4",
|
||||
"vite-plugin-solid": "^2.3.0",
|
||||
"vitest": "^0.23.2"
|
||||
},
|
||||
|
||||
@@ -1,47 +1,20 @@
|
||||
import plugins from '../../rollup.plugins.mjs';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import withSolid from 'rollup-preset-solid';
|
||||
import bundleSize from '@atomico/rollup-plugin-sizes';
|
||||
import license from 'rollup-plugin-license';
|
||||
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideSolid';
|
||||
const outputFileName = 'lucide-solid';
|
||||
const outputDir = 'dist';
|
||||
const inputs = [`src/lucide-solid.js`];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
const config = withSolid({
|
||||
targets: ['esm', 'cjs'],
|
||||
});
|
||||
|
||||
config.plugins = [
|
||||
...config.plugins,
|
||||
license({
|
||||
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`,
|
||||
}),
|
||||
bundleSize(),
|
||||
];
|
||||
|
||||
const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
external: ['solid-js', 'solid-js/h'],
|
||||
output: {
|
||||
name: packageName,
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
format,
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'solid-js': 'solid-js',
|
||||
'solid-js/h': 'solid-js/h',
|
||||
},
|
||||
},
|
||||
})),
|
||||
)
|
||||
.flat();
|
||||
|
||||
export default configs;
|
||||
export default config;
|
||||
|
||||
@@ -1,47 +1,87 @@
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
writeFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
appendFile,
|
||||
getCurrentDirPath
|
||||
getCurrentDirPath,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url)
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const srcDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
const writeDeclarationFile = (typesFile, directory, content) => {
|
||||
resetFile(typesFile, directory);
|
||||
writeFile(content, typesFile, directory);
|
||||
};
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-solid.d.ts';
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
let declarationFileContent = `\
|
||||
/// <reference types="solid-js" />
|
||||
import { JSX } from 'solid-js'
|
||||
|
||||
interface LucideProps extends Partial<JSX.IntrinsicElements & JSX.SvgSVGAttributes<SVGSVGElement>> {
|
||||
interface LucideProps extends Partial<JSX.SvgSVGAttributes<SVGSVGElement>> {
|
||||
key?: string | number;
|
||||
ref?: string | ((component: any) => any);
|
||||
color?: string
|
||||
size?: string | number
|
||||
strokeWidth?: string | number
|
||||
class?: string
|
||||
}
|
||||
|
||||
export type LucideIcon = (props: LucideProps) => JSX.Element;
|
||||
|
||||
// Generated icons
|
||||
`;
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-solid.d.ts';
|
||||
|
||||
resetFile(TYPES_FILE, srcDirectory);
|
||||
writeFile(typeDefinitions, TYPES_FILE, srcDirectory);
|
||||
|
||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||
|
||||
svgFiles.forEach(svgFile => {
|
||||
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);
|
||||
declarationFileContent += `export declare const ${componentName}: LucideIcon;\n`;
|
||||
});
|
||||
|
||||
console.log(`Generated ${TYPES_FILE} file with`, svgFiles.length, 'icons');
|
||||
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 += `export declare const ${componentName}Icon: LucideIcon;\n`;
|
||||
declarationFileContent += `export declare const Lucide${componentName}: LucideIcon;\n`;
|
||||
aliasesCount += 1;
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
declarationFileContent += `export declare const ${componentNameAlias}: LucideIcon;\n`;
|
||||
|
||||
aliasesCount += 1;
|
||||
});
|
||||
}
|
||||
|
||||
declarationFileContent += '\n';
|
||||
});
|
||||
|
||||
writeDeclarationFile(TYPES_FILE, srcDirectory, declarationFileContent);
|
||||
console.log(
|
||||
`Generated ${TYPES_FILE} file with`,
|
||||
svgFiles.length,
|
||||
'icons and with',
|
||||
aliasesCount,
|
||||
'aliases',
|
||||
);
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
export default ({ componentName, children }) => `
|
||||
import createSolidComponent from '../createSolidComponent';
|
||||
import Icon from '../Icon';
|
||||
import type { IconNode, LucideProps } from '../types';
|
||||
|
||||
const ${componentName} = createSolidComponent('${componentName}', ${JSON.stringify(children)});
|
||||
const iconNode: IconNode = ${JSON.stringify(children)};
|
||||
|
||||
const ${componentName} = (props: LucideProps) => (
|
||||
<Icon {...props} name="${componentName}" iconNode={iconNode} />
|
||||
)
|
||||
|
||||
export default ${componentName};
|
||||
`;
|
||||
|
||||
18
packages/lucide-solid/scripts/replaceVersion.mjs
Normal file
18
packages/lucide-solid/scripts/replaceVersion.mjs
Normal file
@@ -0,0 +1,18 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
import pkg from '../package.json' assert { type: 'json' };
|
||||
|
||||
const files = [
|
||||
'dist/source/lucide-solid.js',
|
||||
'dist/types/lucide-solid.d.ts'
|
||||
]
|
||||
|
||||
files.forEach((file) => {
|
||||
const fileContents = fs.readFileSync(path.resolve(file), 'utf-8');
|
||||
const newFileContents = fileContents.replace('{{version}}', pkg.version)
|
||||
|
||||
fs.writeFileSync(path.resolve(file), newFileContents, 'utf-8')
|
||||
})
|
||||
|
||||
|
||||
55
packages/lucide-solid/src/Icon.tsx
Normal file
55
packages/lucide-solid/src/Icon.tsx
Normal file
@@ -0,0 +1,55 @@
|
||||
import { For, JSX, splitProps } from 'solid-js';
|
||||
import { Dynamic } from 'solid-js/web';
|
||||
import defaultAttributes from './defaultAttributes';
|
||||
import { IconNode, LucideProps } from './types';
|
||||
|
||||
/**
|
||||
* 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) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
interface IconProps {
|
||||
name: string
|
||||
iconNode: IconNode
|
||||
}
|
||||
|
||||
const Icon = (props: LucideProps & IconProps) => {
|
||||
const [localProps, rest] = splitProps(props, [
|
||||
'color',
|
||||
'size',
|
||||
'strokeWidth',
|
||||
'children',
|
||||
'class',
|
||||
'name',
|
||||
'iconNode'
|
||||
]);
|
||||
|
||||
return (
|
||||
<svg
|
||||
{...defaultAttributes}
|
||||
width={localProps.size ?? defaultAttributes.width}
|
||||
height={localProps.size ?? defaultAttributes.height}
|
||||
stroke={localProps.color ?? defaultAttributes.stroke}
|
||||
stroke-width={localProps.strokeWidth ?? defaultAttributes['stroke-width']}
|
||||
class={`lucide lucide-${toKebabCase(localProps?.name ?? 'icon')} ${
|
||||
localProps.class != null ? localProps.class : ''
|
||||
}`}
|
||||
{...rest}
|
||||
>
|
||||
<For each={localProps.iconNode}>
|
||||
{([elementName, attrs]) => {
|
||||
return (
|
||||
<Dynamic component={elementName} {...attrs} />
|
||||
);
|
||||
}}
|
||||
</For>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
export default Icon
|
||||
@@ -1,47 +0,0 @@
|
||||
import h from 'solid-js/h';
|
||||
import { splitProps } from 'solid-js';
|
||||
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 = props => {
|
||||
const [localProps, rest] = splitProps(props, [
|
||||
'color',
|
||||
'size',
|
||||
'strokeWidth',
|
||||
'children',
|
||||
'class',
|
||||
]);
|
||||
|
||||
const svgProps = {
|
||||
...defaultAttributes,
|
||||
width: () => (localProps.size != null ? localProps.size : defaultAttributes.width),
|
||||
height: () => (localProps.size != null ? localProps.size : defaultAttributes.height),
|
||||
stroke: () => (localProps.color != null ? localProps.color : defaultAttributes.stroke),
|
||||
'stroke-width': () =>
|
||||
localProps.strokeWidth != null ? localProps.strokeWidth : defaultAttributes['stroke-width'],
|
||||
class: () =>
|
||||
`lucide lucide-${toKebabCase(iconName)} ${
|
||||
localProps.class != null ? localProps.class : ''
|
||||
}`,
|
||||
};
|
||||
|
||||
return h(
|
||||
'svg',
|
||||
[svgProps, rest],
|
||||
[...iconNode.map(([tag, attrs]) => h(tag, attrs)), localProps.children],
|
||||
);
|
||||
};
|
||||
|
||||
Component.displayName = `${iconName}`;
|
||||
return Component;
|
||||
};
|
||||
16
packages/lucide-solid/src/defaultAttributes.ts
Normal file
16
packages/lucide-solid/src/defaultAttributes.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { JSX } from "solid-js/jsx-runtime";
|
||||
import { SVGAttributes } from "./types";
|
||||
|
||||
const defaultAttributes: SVGAttributes = {
|
||||
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',
|
||||
};
|
||||
|
||||
export default defaultAttributes
|
||||
@@ -1 +0,0 @@
|
||||
export * from './icons';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user