Skip to content

Commit

Permalink
Merge branch 'main' into studio/spotlight
Browse files Browse the repository at this point in the history
  • Loading branch information
chessurisme authored Oct 30, 2024
2 parents 19534b7 + b8cd54f commit 182ad15
Show file tree
Hide file tree
Showing 74 changed files with 3,296 additions and 3,233 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lucide-preact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-preact/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lucide-react-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-react-native/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lucide-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-react/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- scripts/generateNextJSAliases.mjs
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/lucide-shared.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
node-version: 18
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test
run: pnpm --filter lucide-react test
1 change: 1 addition & 0 deletions .github/workflows/lucide-solid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-solid/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lucide-svelte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-svelte/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lucide-vue-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-vue-next/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lucide-vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-vue/**
- packages/shared/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
Expand Down
2 changes: 1 addition & 1 deletion categories/charts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../category.schema.json",
"title": "Charts",
"icon": "pie-chart"
"icon": "chart-pie"
}
19 changes: 19 additions & 0 deletions docs/.vitepress/data/packageData.thirdParty.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
2 changes: 1 addition & 1 deletion docs/.vitepress/data/teamData.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"icon": "x",
"link": "https://github.com/ericfennis"
"link": "https://x.com/ericfennis"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/components/base/Tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ onMounted(() => {
font-weight: 400;
background: var(--vp-c-brand-dark);
color: white;
z-index: 10;
z-index: 99;
white-space: nowrap;
padding: 2px 8px;
border-radius: 4px;
Expand Down
76 changes: 38 additions & 38 deletions docs/.vitepress/theme/components/icons/CopyCodeButton.vue
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
<script setup lang="ts">
import { computed } from 'vue';
import { startCase, camelCase } from 'lodash-es'
import ButtonMenu from '../base/ButtonMenu.vue'
import { toPascalCase } from '@lucide/shared';
import ButtonMenu from '../base/ButtonMenu.vue';
import { useIconStyleContext } from '../../composables/useIconStyle';
import useConfetti from '../../composables/useConfetti';
const props = defineProps<{
name: string
popoverPosition?: 'top' | 'bottom'
}>()
const { size, color, strokeWidth, absoluteStrokeWidth } = useIconStyleContext()
const { animate, confetti } = useConfetti()
name: string;
popoverPosition?: 'top' | 'bottom';
}>();
const { size, color, strokeWidth, absoluteStrokeWidth } = useIconStyleContext();
const { animate, confetti } = useConfetti();
const componentName = computed(() => {
return startCase(camelCase(props.name)).replace(/\s/g, '')
})
return (toPascalCase(props.name) as string).replace(/\s/g, '');
});
function copyJSX() {
let attrs = ['']
let attrs = [''];
if (size.value && size.value !== 24) {
attrs.push(`size={${size.value}}`)
attrs.push(`size={${size.value}}`);
}
if (color.value && color.value !== 'currentColor') {
attrs.push(`color="${color.value}"`)
attrs.push(`color="${color.value}"`);
}
if (strokeWidth.value && strokeWidth.value !== 2) {
attrs.push(`strokeWidth={${strokeWidth.value}}`)
attrs.push(`strokeWidth={${strokeWidth.value}}`);
}
if (absoluteStrokeWidth.value) {
attrs.push(`absoluteStrokeWidth`)
attrs.push(`absoluteStrokeWidth`);
}
const code = `<${componentName.value}${attrs.join(' ')} />`
const code = `<${componentName.value}${attrs.join(' ')} />`;
navigator.clipboard.writeText(code)
navigator.clipboard.writeText(code);
}
function copyComponentName() {
const code = componentName.value
const code = componentName.value;
navigator.clipboard.writeText(code)
navigator.clipboard.writeText(code);
}
function copyVue() {
let attrs = ['']
let attrs = [''];
if (size.value && size.value !== 24) {
attrs.push(`:size="${size.value}"`)
attrs.push(`:size="${size.value}"`);
}
if (color.value && color.value !== 'currentColor') {
attrs.push(`color="${color.value}"`)
attrs.push(`color="${color.value}"`);
}
if (strokeWidth.value && strokeWidth.value !== 2) {
attrs.push(`:stroke-width="${strokeWidth.value}"`)
attrs.push(`:stroke-width="${strokeWidth.value}"`);
}
if (absoluteStrokeWidth.value) {
attrs.push(`absoluteStrokeWidth`)
attrs.push(`absoluteStrokeWidth`);
}
const code = `<${componentName.value}${attrs.join(' ')} />`
const code = `<${componentName.value}${attrs.join(' ')} />`;
navigator.clipboard.writeText(code)
navigator.clipboard.writeText(code);
}
function copyAngular() {
let attrs = ['']
let attrs = [''];
attrs.push(`name="${props.name}"`)
attrs.push(`name="${props.name}"`);
if (size.value && size.value !== 24) {
attrs.push(`[size]="${size.value}"`)
attrs.push(`[size]="${size.value}"`);
}
if (color.value && color.value !== 'currentColor') {
attrs.push(`color="${color.value}"`)
attrs.push(`color="${color.value}"`);
}
if (strokeWidth.value && strokeWidth.value !== 2) {
attrs.push(`[strokeWidth]="${strokeWidth.value}"`)
attrs.push(`[strokeWidth]="${strokeWidth.value}"`);
}
if (absoluteStrokeWidth.value) {
attrs.push(`[absoluteStrokeWidth]="true"`)
attrs.push(`[absoluteStrokeWidth]="true"`);
}
const code = `<lucide-icon${attrs.join(' ')}></lucide-icon>`
const code = `<lucide-icon${attrs.join(' ')}></lucide-icon>`;
navigator.clipboard.writeText(code)
navigator.clipboard.writeText(code);
}
</script>

Expand All @@ -106,11 +106,11 @@ function copyAngular() {
data-confetti-text="Copied!"
:popoverPosition="popoverPosition"
:options="[
{ text: 'Copy JSX' , onClick: copyJSX },
{ text: 'Copy Component Name' , onClick: copyComponentName },
{ text: 'Copy Vue' , onClick: copyVue },
{ text: 'Copy Svelte' , onClick: copyJSX },
{ text: 'Copy Angular' , onClick: copyAngular },
{ text: 'Copy JSX', onClick: copyJSX },
{ text: 'Copy Component Name', onClick: copyComponentName },
{ text: 'Copy Vue', onClick: copyVue },
{ text: 'Copy Svelte', onClick: copyJSX },
{ text: 'Copy Angular', onClick: copyAngular },
]"
/>
</template>
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/design/icon-design-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -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

Expand Down
13 changes: 8 additions & 5 deletions docs/guide/packages/lucide-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
```
Expand Down
7 changes: 3 additions & 4 deletions docs/icons/[name].md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import RelatedIcons from '~/.vitepress/theme/components/icons/RelatedIcons.vue'
import CodeGroup from '~/.vitepress/theme/components/base/CodeGroup.vue'
import Badge from '~/.vitepress/theme/components/base/Badge.vue'
import Label from '~/.vitepress/theme/components/base/Label.vue'
import VPButton from 'vitepress/dist/client/theme-default/components/VPButton.vue';
import { data } from './codeExamples.data'
import { camelCase, startCase } from 'lodash-es'
import { toCamelCase, toPascalCase } from '@lucide/shared'
import { satisfies } from 'semver'

const { params } = useData()
Expand All @@ -31,8 +30,8 @@ const tabs = computed(() => data.codeExamples?.map(

const codeExample = computed(() => data.codeExamples?.map(
(codeExample) => {
const pascalCaseName = startCase(camelCase( params.value.name)).replace(/\s/g, '')
const camelCaseName = camelCase(params.value.name)
const pascalCaseName = toPascalCase( params.value.name)
const camelCaseName = toCamelCase(params.value.name)

return codeExample.code
.replace(/\$(?:<[^>]+>)*PascalCase/g, pascalCaseName)
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Binary file added docs/public/framework-logos/lustre.webp
Binary file not shown.
6 changes: 3 additions & 3 deletions icons/align-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions icons/align-justify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions icons/align-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 182ad15

Please sign in to comment.