Compare commits

...

15 Commits

Author SHA1 Message Date
Jamie Law
d2f7a0931d feat(icons): added air-pressure icon (#2554)
* Add `air-pressure` icon

And slightly modified the `wind` icon to match

* Rename `air-pressure` to `wind-arrow-down`

And update the JSON file with contributors to the original `wind` icon and add `pressure` as a tag
2024-11-08 09:53:10 +01:00
Jakob Guddas
98bbcc4b06 fix(icons): changed slice icon (#2500)
* Updated icons/slice.svg

* Updated icons/slice.json
2024-11-08 09:40:38 +01:00
Jan
c253cb821b update code example for lucide-svelte direct import (#2589)
* update code example for lucide-svelte direct import

* use single quotes
2024-11-08 08:45:19 +01:00
Jakob Guddas
484dc38b0a Updated icons/undo-dot.svg (#2557) 2024-11-05 08:33:56 +01:00
dependabot[bot]
11b95f883a build(deps-dev): bump rollup from 3.27.0 to 3.29.5 (#2571)
Bumps [rollup](https://github.com/rollup/rollup) from 3.27.0 to 3.29.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.27.0...v3.29.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 10:23:32 +01:00
Eric Fennis
b8cd54f1b2 chore: Update dependencies (#2570)
* Update dependencies

* Revert dep change site

* Update lockfile

* Fix indentation
2024-10-30 13:31:28 +01:00
Jakob Guddas
98b3b6fae7 fix(icons): changed file-music icon (#2536)
* Updated icons/file-music.svg

* Updated icons/file-music.json
2024-10-30 10:12:25 +01:00
Mofiro Jean
3ca465ee11 (docs) update lucide angular guide for standalone components (#2569) 2024-10-30 09:32:47 +01:00
Jamie Law
dcd19cedc9 fix(icons): changed pizza icon (#2476)
* Lucidified pizza.svg

Rounded the corners of the pizza slice and spaced out the pepperoni to address the two-pixel-gap rule

* Update pizza.json

* Update pizza.svg

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-10-28 14:41:30 +01:00
Jakob Guddas
8cea9feecc fix(icons): added rounding to star icon (#1987)
* Updated icons/star.svg

* Updated icons/star.json

* Updated icons/star.svg

* Updated icons/star-half.svg

* Updated icons/star-half.json

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-10-28 14:30:02 +01:00
Willem Dinkelspiel
e80d98040f Add Lustre Lucide third party package (#2543)
* add lucide lustre to third party packages

* add lustre logo
2024-10-28 13:54:13 +01:00
Eric Fennis
a1641a372b fix(shared): Add trim to mergeClasses (#2522)
* Add trim to merge classes

* Add trim to merge classes

* Adds extra utils check

* Update packages/shared/src/utils.ts

Co-authored-by: Max Malm <benjick@dumfan.net>

---------

Co-authored-by: Max Malm <benjick@dumfan.net>
2024-10-28 13:53:42 +01:00
Peter Uithoven
757bf0fb85 feat(icons): added calendar-1 icon (#2520)
* Added icons/calendar-single.svg

* Added icons/calendar-single.json

* Adjust calendar position

Adjust calendar position based on original

* Update name

* Add tag 1

* Optimize 1 path

* Add first tag

---------

Co-authored-by: peteruithoven <peter@metabolic.nl>
2024-10-15 04:11:47 +02:00
Ishaan
dd3aed1ecd Update icon-design-guide.md (#2530) 2024-10-13 23:39:41 +02:00
Jamie Law
4d98681f05 refactor(icons): optimised some align-, indent- and list-icons (#2528)
* Update `align`- icons

* Update `indent`- icons

* Update `list`- icons
2024-10-11 20:29:36 +02:00
53 changed files with 2701 additions and 3246 deletions

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-preact/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-react-native/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-react/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- scripts/generateNextJSAliases.mjs

24
.github/workflows/lucide-shared.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Lucide Shared Checks
on:
pull_request:
paths:
- packages/shared/**
- pnpm-lock.yaml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm --filter lucide-react test

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-solid/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-svelte/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-vue-next/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-vue/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml

View File

@@ -76,5 +76,24 @@
],
"source": "https://github.com/swisnl/nuxt-lucide-icons",
"documentation": "https://github.com/swisnl/nuxt-lucide-icons/blob/main/README.md"
},
{
"name": "lucide-lustre",
"description": "A library providing https://lucide.dev icons to lustre",
"icon": "/framework-logos/lustre.webp",
"shields": [
{
"alt": "Latest Stable Version",
"src": "https://img.shields.io/hexpm/v/lucide_lustre",
"href": "https://hex.pm/packages/lucide_lustre"
},
{
"alt": "Total Downloads",
"src": "https://img.shields.io/hexpm/dw/lucide_lustre",
"href": "https://hex.pm/packages/lucide_lustre"
}
],
"source": "https://github.com/dinkelspiel/lucide_lustre",
"documentation": "https://github.com/dinkelspiel/lucide_lustre/blob/master/README.md"
}
]

View File

@@ -52,7 +52,7 @@ Here are rules that should be followed to keep quality and consistency when maki
![optical-volume-high](../../images/optical-volume-high.svg?raw=true "optical-volume-high")
**Tip:** place your icon next to circle or square and blur them both; your icon should not feel much darker than the base shape.
**Tip:** place your icon next to the circle or square icon and blur them both; your icon should not feel much darker than the base shape.
### 10. Icons should be visually centered by their center of gravity.
@@ -76,7 +76,7 @@ Here are rules that should be followed to keep quality and consistency when maki
![curvature-uneven](../../images/curvature-uneven.svg?raw=true "curvature-uneven")
**Tip:** make sure to use arcs or quadratic curves, when using cubic curves control points should have mirrored angles for smooth curves.
**Tip:** make sure to use arcs or quadratic curves. When using cubic curves control points should have mirrored angles for smooth curves.
### 13. Icons should aim to be pixel perfect so that they will be sharp on low DPI displays.
@@ -142,7 +142,7 @@ For each icon these attributes are applied, corresponding to the above rules.
### Minify paths
The code of paths can sometimes get quite large. To reduce file size we like to minify the code.
We recommend to use the [SVGOMG](https://jakearchibald.github.io/svgomg/) to minify paths to 2 points of precision.
We recommend to use [SVGOMG](https://jakearchibald.github.io/svgomg/) to minify paths to 2 points of precision.
### Allowed elements

View File

@@ -40,14 +40,17 @@ export class AppModule { }
or using standalone version:
```js
import { Component } from '@angular/core';
import { LucideAngularModule, FileIcon } from 'lucide-angular';
@NgModule({
imports: [
LucideAngularModule
]
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
imports: [LucideAngularModule]
})
export class AppModule {
export class AppComponent {
readonly FileIcon = FileIcon;
}
```

View File

@@ -52,10 +52,10 @@ For faster builds and load times, you can import icons directly from the `lucide
```svelte
<script>
import AlertCircle from 'lucide-svelte/icons/alert-circle';
import CircleAlert from 'lucide-svelte/icons/circle-alert';
</script>
<AlertCircle color="#ff3e98" />
<CircleAlert color="#ff3e98" />
```
## Props

View File

@@ -28,7 +28,7 @@
"@lucide/build-icons": "workspace:*",
"@lucide/helpers": "workspace:*",
"@lucide/shared": "workspace:*",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-replace": "^6.0.1",
"@types/semver": "^7.5.3",
"h3": "^1.8.0",
"nitropack": "2.8.1",

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="21" x2="3" y1="6" y2="6" />
<line x1="17" x2="7" y1="12" y2="12" />
<line x1="19" x2="5" y1="18" y2="18" />
<path d="M17 12H7" />
<path d="M19 18H5" />
<path d="M21 6H3" />
</svg>

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 279 B

View File

@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="3" x2="21" y1="6" y2="6" />
<line x1="3" x2="21" y1="12" y2="12" />
<line x1="3" x2="21" y1="18" y2="18" />
<path d="M3 12h18" />
<path d="M3 18h18" />
<path d="M3 6h18" />
</svg>

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 279 B

View File

@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="21" x2="3" y1="6" y2="6" />
<line x1="15" x2="3" y1="12" y2="12" />
<line x1="17" x2="3" y1="18" y2="18" />
<path d="M15 12H3" />
<path d="M17 18H3" />
<path d="M21 6H3" />
</svg>

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 279 B

View File

@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="21" x2="3" y1="6" y2="6" />
<line x1="21" x2="9" y1="12" y2="12" />
<line x1="21" x2="7" y1="18" y2="18" />
<path d="M21 12H9" />
<path d="M21 18H7" />
<path d="M21 6H3" />
</svg>

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 279 B

22
icons/calendar-1.json Normal file
View File

@@ -0,0 +1,22 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"ericfennis",
"peteruithoven"
],
"tags": [
"date",
"month",
"year",
"event",
"single",
"singular",
"once",
"1",
"first"
],
"categories": [
"time"
]
}

17
icons/calendar-1.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 14h1v4" />
<path d="M16 2v4" />
<path d="M3 10h18" />
<path d="M8 2v4" />
<rect x="3" y="4" width="18" height="18" rx="2" />
</svg>

After

Width:  |  Height:  |  Size: 356 B

View File

@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley"
"danielbayley",
"jguddas"
],
"tags": [
"audio",

View File

@@ -9,8 +9,8 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M10.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v8.4" />
<path d="M8 18v-7.7L16 9v7" />
<circle cx="14" cy="16" r="2" />
<circle cx="6" cy="18" r="2" />
<path d="M4 12.4V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2h-7.5" />
<path d="M8 18v-7.7L16 9v7" />
</svg>

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 378 B

View File

@@ -9,8 +9,8 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="7 8 3 12 7 16" />
<line x1="21" x2="11" y1="12" y2="12" />
<line x1="21" x2="11" y1="6" y2="6" />
<line x1="21" x2="11" y1="18" y2="18" />
<path d="M21 12H11" />
<path d="M21 18H11" />
<path d="M21 6H11" />
<path d="m7 8-4 4 4 4" />
</svg>

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 310 B

View File

@@ -9,8 +9,8 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="3 8 7 12 3 16" />
<line x1="21" x2="11" y1="12" y2="12" />
<line x1="21" x2="11" y1="6" y2="6" />
<line x1="21" x2="11" y1="18" y2="18" />
<path d="M21 12H11" />
<path d="M21 18H11" />
<path d="M21 6H11" />
<path d="m3 8 4 4-4 4" />
</svg>

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 310 B

View File

@@ -9,10 +9,10 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="10" x2="21" y1="6" y2="6" />
<line x1="10" x2="21" y1="12" y2="12" />
<line x1="10" x2="21" y1="18" y2="18" />
<path d="M4 6h1v4" />
<path d="M10 12h11" />
<path d="M10 18h11" />
<path d="M10 6h11" />
<path d="M4 10h2" />
<path d="M4 6h1v4" />
<path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1" />
</svg>

Before

Width:  |  Height:  |  Size: 428 B

After

Width:  |  Height:  |  Size: 375 B

View File

@@ -9,10 +9,10 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="8" x2="21" y1="6" y2="6" />
<line x1="8" x2="21" y1="12" y2="12" />
<line x1="8" x2="21" y1="18" y2="18" />
<line x1="3" x2="3.01" y1="6" y2="6" />
<line x1="3" x2="3.01" y1="12" y2="12" />
<line x1="3" x2="3.01" y1="18" y2="18" />
<path d="M3 12h.01" />
<path d="M3 18h.01" />
<path d="M3 6h.01" />
<path d="M8 12h13" />
<path d="M8 18h13" />
<path d="M8 6h13" />
</svg>

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 353 B

View File

@@ -3,7 +3,8 @@
"contributors": [
"karsa-mistmere",
"ericfennis",
"jguddas"
"jguddas",
"jamiemlaw"
],
"tags": [
"pie",

View File

@@ -9,9 +9,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M15 11h.01" />
<path d="M11 15h.01" />
<path d="M16 16h.01" />
<path d="m2 16 20 6-6-20A20 20 0 0 0 2 16" />
<path d="M5.71 17.11a17.04 17.04 0 0 1 11.4-11.4" />
<path d="m12 14-1 1" />
<path d="m13.75 18.25-1.25 1.42" />
<path d="M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12" />
<path d="M18.8 9.3a1 1 0 0 0 2.1 7.7" />
<path d="M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z" />
</svg>

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 506 B

View File

@@ -2,7 +2,8 @@
"$schema": "../icon.schema.json",
"contributors": [
"karsa-mistmere",
"danielbayley"
"danielbayley",
"jguddas"
],
"tags": [
"cutter",

View File

@@ -9,6 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="m8 14-6 6h9v-3" />
<path d="M18.37 3.63 8 14l3 3L21.37 6.63a2.12 2.12 0 1 0-3-3Z" />
<path d="M11 16.586V19a1 1 0 0 1-1 1H2L18.37 3.63a1 1 0 1 1 3 3l-9.663 9.663a1 1 0 0 1-1.414 0L8 14" />
</svg>

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 314 B

View File

@@ -2,7 +2,8 @@
"$schema": "../icon.schema.json",
"contributors": [
"mittalyashu",
"ericfennis"
"ericfennis",
"jguddas"
],
"tags": [
"bookmark",

View File

@@ -9,5 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 17.8 5.8 21 7 14.1 2 9.3l7-1L12 2" />
<path d="M12 18.338a2.1 2.1 0 0 0-.987.244L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16l2.309-4.679A.53.53 0 0 1 12 2" />
</svg>

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 430 B

View File

@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis"
"colebemis",
"jguddas"
],
"tags": [
"bookmark",

View File

@@ -9,5 +9,5 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />
<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />
</svg>

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 588 B

View File

@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="12" cy="17" r="1" />
<path d="M21 17a9 9 0 0 0-15-6.7L3 13" />
<path d="M3 7v6h6" />
<path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" />
<circle cx="12" cy="17" r="1" />
</svg>

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 311 B

View File

@@ -0,0 +1,19 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"csandman",
"ericfennis",
"jamiemlaw"
],
"tags": [
"weather",
"air",
"pressure",
"blow"
],
"categories": [
"weather",
"sustainability"
]
}

16
icons/wind-arrow-down.svg Normal file
View File

@@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M10 2v8" />
<path d="M12.8 21.6A2 2 0 1 0 14 18H2" />
<path d="M17.5 10a2.5 2.5 0 1 1 2 4H2" />
<path d="m6 6 4 4 4-4" />
</svg>

After

Width:  |  Height:  |  Size: 347 B

View File

@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2" />
<path d="M9.6 4.6A2 2 0 1 1 11 8H2" />
<path d="M12.6 19.4A2 2 0 1 0 14 16H2" />
<path d="M12.8 19.6A2 2 0 1 0 14 16H2" />
<path d="M17.5 8a2.5 2.5 0 1 1 2 4H2" />
<path d="M9.8 4.4A2 2 0 1 1 11 8H2" />
</svg>

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 336 B

View File

@@ -43,26 +43,26 @@
"@html-eslint/eslint-plugin": "^0.19.1",
"@html-eslint/parser": "^0.19.1",
"@octokit/rest": "^19.0.13",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"ajv-cli": "^5.0.0",
"eslint": "^8.56.0",
"eslint": "^8.57.1",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-custom-alias": "^1.3.2",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"husky": "^8.0.3",
"lint-staged": "^13.3.0",
"minimist": "^1.2.8",
"p-memoize": "^7.1.1",
"prettier": "3.2.4",
"semver": "^7.5.4",
"simple-git": "^3.25.0",
"svgo": "^3.1.0",
"semver": "^7.6.3",
"simple-git": "^3.27.0",
"svgo": "^3.3.2",
"svgson": "^5.3.1",
"yargs": "^17.7.2"
},

View File

@@ -53,7 +53,7 @@
"rollup": "^4.22.4",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^5.3.3",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^1.1.1"
},
"peerDependencies": {

View File

@@ -54,12 +54,12 @@
"jest-serializer-html": "^7.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-native": "^0.73.1",
"react-native-svg": "^15.0.0",
"react-native": "^0.76.0",
"react-native-svg": "^15.8.0",
"rollup": "^4.22.4",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^4.8.4",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^1.1.1"
},
"peerDependencies": {

View File

@@ -61,7 +61,7 @@
"rollup": "^4.22.4",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^4.9.5",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^1.1.1"
},
"peerDependencies": {

View File

@@ -83,7 +83,7 @@
"rollup": "^4.22.4",
"solid-js": "^1.8.7",
"typescript": "^4.9.4",
"vite": "5.0.13",
"vite": "5.1.8",
"vite-plugin-solid": "^2.10.1",
"vitest": "^1.1.1",
"esbuild": "^0.19.11"

View File

@@ -69,7 +69,7 @@
"svelte-check": "^3.4.4",
"svelte-preprocess": "^5.0.4",
"typescript": "^5.1.6",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^1.1.1"
},
"peerDependencies": {

View File

@@ -54,7 +54,7 @@
"@vue/test-utils": "2.4.5",
"rollup": "^4.22.4",
"rollup-plugin-dts": "^6.1.0",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^1.4.0",
"vue": "^3.4.21"
},

View File

@@ -50,9 +50,9 @@
"@testing-library/vue": "^5.9.0",
"@vitejs/plugin-vue2": "2.2.0",
"@vue/test-utils": "1.3.0",
"rollup": "^3.23.0",
"rollup": "^3.29.5",
"typescript": "^4.9.5",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^0.32.2",
"vue": "2.7.14",
"vue-template-compiler": "2.7.14"

View File

@@ -44,13 +44,13 @@
"devDependencies": {
"@lucide/build-icons": "workspace:*",
"@lucide/rollup-plugins": "workspace:*",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-replace": "^6.0.1",
"@testing-library/jest-dom": "^6.1.6",
"jest-serializer-html": "^7.1.0",
"rollup": "^4.22.4",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^4.9.3",
"vite": "5.0.13",
"vite": "5.1.8",
"vitest": "^1.1.1"
}
}

View File

@@ -41,6 +41,11 @@ export const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {
export const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>
classes
.filter((className, index, array) => {
return Boolean(className) && array.indexOf(className) === index;
return (
Boolean(className) &&
(className as string).trim() !== '' &&
array.indexOf(className) === index
);
})
.join(' ');
.join(' ')
.trim();

View File

@@ -18,4 +18,12 @@ describe('mergeClasses', () => {
const classes = mergeClasses('lucide', 'lucide-circle', 'lucide');
expect(classes).toBe('lucide lucide-circle');
});
it('trims the string', async () => {
const classes = mergeClasses('lucide', 'lucide-circle', ' ');
expect(classes).toBe('lucide lucide-circle');
});
it('trims the sub strings', async () => {
const classes = mergeClasses('lucide', ' ', 'lucide-circle');
expect(classes).toBe('lucide lucide-circle');
});
});

5625
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"fs-extra": "^11.1.1",
"fs-extra": "^11.2.0",
"minimist": "^1.2.8",
"svgtofont": "^3.25.4"
"svgtofont": "^6.0.0"
}
}

View File

@@ -12,6 +12,6 @@
"license": "ISC",
"dependencies": {
"minimist": "^1.2.8",
"oslllo-svg-fixer": "^3.0.0"
"oslllo-svg-fixer": "^5.0.0"
}
}

View File

@@ -10,7 +10,7 @@
"dependencies": {
"@atomico/rollup-plugin-sizes": "^1.1.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-replace": "^6.0.1",
"esbuild": "^0.19.11",
"rollup": "^4.22.4",
"rollup-plugin-esbuild": "^6.1.0",