Compare commits
34 Commits
build-conf
...
new-releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
248d1c31eb | ||
|
|
b6a978ec6a | ||
|
|
de454e4d98 | ||
|
|
13c4163843 | ||
|
|
c0d4147fe6 | ||
|
|
0640cd0938 | ||
|
|
7ab9b83991 | ||
|
|
0c08347e5e | ||
|
|
35e9cb4b6f | ||
|
|
2095ba6aa7 | ||
|
|
ddfc5cadc1 | ||
|
|
f3c6929c98 | ||
|
|
9b46e0dcba | ||
|
|
ef449fd5c5 | ||
|
|
2892be8229 | ||
|
|
2b1ad320fe | ||
|
|
61a86a959a | ||
|
|
d92e7796e4 | ||
|
|
bde9e1cb6b | ||
|
|
a5e07c28bd | ||
|
|
2a68b12cbe | ||
|
|
493382b4fd | ||
|
|
6588971ead | ||
|
|
13cea45e8b | ||
|
|
5dfcfc8d1a | ||
|
|
db24b1d517 | ||
|
|
e1202b545e | ||
|
|
2e1a5cf6ea | ||
|
|
f49ecd73a5 | ||
|
|
a72cbc2d49 | ||
|
|
d4976890e5 | ||
|
|
8c8d1d3338 | ||
|
|
542507f835 | ||
|
|
d237803413 |
102
.github/workflows/ci.yml
vendored
@@ -3,71 +3,67 @@ name: Continuous integration icons
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- icons/**/*.svg
|
||||
# - main
|
||||
- '*'
|
||||
# paths:
|
||||
# - icons/**/*.svg
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
if: github.repository == 'lucide-icons/lucide'
|
||||
# Only create a new releases for new icons
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
packages: read
|
||||
actions: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
outputs:
|
||||
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||
VERSION: ${{ steps.semantic.outputs.new_release_version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: actions/setup-node@v4
|
||||
|
||||
- name: Semantic Release
|
||||
id: semantic
|
||||
uses: cycjimmy/semantic-release-action@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'pnpm'
|
||||
tag_format: ${version}
|
||||
branches: |
|
||||
['new-release-workflow']
|
||||
extends: |
|
||||
semantic-release-monorepo
|
||||
extra_plugins: |
|
||||
@semantic-release/github
|
||||
@semantic-release/git
|
||||
@semantic-release/release-notes-generator
|
||||
conventional-changelog-conventionalcommits
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Fetch tags
|
||||
run: git fetch --all --tags
|
||||
|
||||
- name: Get latest tag
|
||||
id: latest-tag
|
||||
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if we can patch
|
||||
run: .github/workflows/version-up.sh --minor
|
||||
|
||||
- name: Create new version
|
||||
id: new-version
|
||||
run: echo "NEW_VERSION=$(.github/workflows/version-up.sh --minor)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create change log
|
||||
id: change-log
|
||||
run: |
|
||||
CHANGE_LOG=$(pnpm run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
|
||||
CHANGE_LOG=$(tail -n +5 <<< $CHANGE_LOG)
|
||||
echo $CHANGE_LOG
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "CHANGE_LOG<<$EOF" >> $GITHUB_OUTPUT
|
||||
echo "$CHANGE_LOG" >> $GITHUB_OUTPUT
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check output
|
||||
- name: Do something when a new release published
|
||||
if: steps.semantic.outputs.new_release_published == 'true'
|
||||
run: |
|
||||
echo '${{ steps.new-version.outputs.NEW_VERSION }}'
|
||||
echo '${{ steps.change-log.outputs.CHANGE_LOG }}'
|
||||
echo ${{ steps.semantic.outputs.new_release_version }}
|
||||
echo ${{ steps.semantic.outputs.new_release_major_version }}
|
||||
echo ${{ steps.semantic.outputs.new_release_minor_version }}
|
||||
echo ${{ steps.semantic.outputs.new_release_patch_version }}
|
||||
# - name: Create Release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# tag_name: ${{ steps.semantic.outputs.new_release_version }}
|
||||
# name: Version ${{ steps.semantic.outputs.new_release_version }}
|
||||
# body: ${{ steps.semantic.outputs.new_release_notes }}
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
|
||||
|
||||
start-release:
|
||||
if: github.repository == 'lucide-icons/lucide'
|
||||
needs: create-release
|
||||
uses: './.github/workflows/release.yml'
|
||||
secrets: inherit
|
||||
with:
|
||||
version: ${{ needs.create-release.outputs.VERSION }}
|
||||
# start-release:
|
||||
# if: github.repository == 'lucide-icons/lucide'
|
||||
# needs: create-release
|
||||
# uses: './.github/workflows/release.yml'
|
||||
# secrets: inherit
|
||||
# with:
|
||||
# version: ${{ needs.create-release.outputs.VERSION }}
|
||||
|
||||
21
.github/workflows/linting.yml
vendored
@@ -21,3 +21,24 @@ jobs:
|
||||
|
||||
- name: Run Linter
|
||||
run: pnpm lint
|
||||
|
||||
pr-title:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
types: |
|
||||
fix
|
||||
feat
|
||||
perf
|
||||
refactor
|
||||
test
|
||||
style
|
||||
docs
|
||||
ci
|
||||
build
|
||||
requireScope: true
|
||||
ignoreLabels: |
|
||||
bot
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../category.schema.json",
|
||||
"title": "Charts",
|
||||
"icon": "pie-chart"
|
||||
"icon": "chart-pie"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
{
|
||||
"icon": "x",
|
||||
"link": "https://github.com/ericfennis"
|
||||
"link": "https://x.com/ericfennis"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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()
|
||||
@@ -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)
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M5.5 8.5 9 12l-3.5 3.5L2 12l3.5-3.5Z" />
|
||||
<path d="m12 2 3.5 3.5L12 9 8.5 5.5 12 2Z" />
|
||||
<path d="M18.5 8.5 22 12l-3.5 3.5L15 12l3.5-3.5Z" />
|
||||
<path d="m12 15 3.5 3.5L12 22l-3.5-3.5L12 15Z" />
|
||||
<path d="M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" />
|
||||
<path d="M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z" />
|
||||
<path d="M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z" />
|
||||
<path d="M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 763 B |
23
icons/eye-closed.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"tags": [
|
||||
"view",
|
||||
"watch",
|
||||
"see",
|
||||
"hide",
|
||||
"conceal",
|
||||
"mask",
|
||||
"hidden",
|
||||
"visibility",
|
||||
"vision"
|
||||
],
|
||||
"categories": [
|
||||
"accessibility",
|
||||
"photography",
|
||||
"design",
|
||||
"security"
|
||||
]
|
||||
}
|
||||
17
icons/eye-closed.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="m15 18-.722-3.25" />
|
||||
<path d="M2 8a10.645 10.645 0 0 0 20 0" />
|
||||
<path d="m20 15-1.726-2.05" />
|
||||
<path d="m4 15 1.726-2.05" />
|
||||
<path d="m9 18 .722-3.25" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 381 B |
@@ -9,11 +9,18 @@
|
||||
"tags": [
|
||||
"view",
|
||||
"watch",
|
||||
"see",
|
||||
"hide",
|
||||
"hidden"
|
||||
"conceal",
|
||||
"mask",
|
||||
"hidden",
|
||||
"visibility",
|
||||
"vision"
|
||||
],
|
||||
"categories": [
|
||||
"accessibility",
|
||||
"photography"
|
||||
"photography",
|
||||
"design",
|
||||
"security"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,10 +7,22 @@
|
||||
],
|
||||
"tags": [
|
||||
"view",
|
||||
"watch"
|
||||
"watch",
|
||||
"see",
|
||||
"show",
|
||||
"expose",
|
||||
"reveal",
|
||||
"display",
|
||||
"visible",
|
||||
"visibility",
|
||||
"vision",
|
||||
"preview",
|
||||
"read"
|
||||
],
|
||||
"categories": [
|
||||
"accessibility",
|
||||
"photography"
|
||||
"photography",
|
||||
"design",
|
||||
"security"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"deprecated": true,
|
||||
"deprecationReason": "icon.brand",
|
||||
"toBeRemovedInVersion": "v1.0",
|
||||
"contributors": [
|
||||
"okcoker",
|
||||
"csandman",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="5 11 5 5 11 5" />
|
||||
<polyline points="19 13 19 19 13 19" />
|
||||
<line x1="5" x2="19" y1="5" y2="19" />
|
||||
<path d="M19 13v6h-6" />
|
||||
<path d="M5 11V5h6" />
|
||||
<path d="m5 5 14 14" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 286 B |
@@ -9,7 +9,7 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="13 5 19 5 19 11" />
|
||||
<polyline points="11 19 5 19 5 13" />
|
||||
<line x1="19" x2="5" y1="5" y2="19" />
|
||||
<path d="M11 19H5v-6" />
|
||||
<path d="M13 5h6v6" />
|
||||
<path d="M19 5 5 19" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 286 B |
@@ -9,7 +9,7 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="18 8 22 12 18 16" />
|
||||
<polyline points="6 8 2 12 6 16" />
|
||||
<line x1="2" x2="22" y1="12" y2="12" />
|
||||
<path d="m18 8 4 4-4 4" />
|
||||
<path d="M2 12h20" />
|
||||
<path d="m6 8-4 4 4 4" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 289 B |
@@ -9,7 +9,7 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="8 18 12 22 16 18" />
|
||||
<polyline points="8 6 12 2 16 6" />
|
||||
<line x1="12" x2="12" y1="2" y2="22" />
|
||||
<path d="M12 2v20" />
|
||||
<path d="m8 18 4 4 4-4" />
|
||||
<path d="m8 6 4-4 4 4" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 289 B |
@@ -9,10 +9,10 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="5 9 2 12 5 15" />
|
||||
<polyline points="9 5 12 2 15 5" />
|
||||
<polyline points="15 19 12 22 9 19" />
|
||||
<polyline points="19 9 22 12 19 15" />
|
||||
<line x1="2" x2="22" y1="12" y2="12" />
|
||||
<line x1="12" x2="12" y1="2" y2="22" />
|
||||
<path d="M12 2v20" />
|
||||
<path d="m15 19-3 3-3-3" />
|
||||
<path d="m19 9 3 3-3 3" />
|
||||
<path d="M2 12h20" />
|
||||
<path d="m5 9-3 3 3 3" />
|
||||
<path d="m9 5 3-3 3 3" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 371 B |
@@ -5,7 +5,8 @@
|
||||
"csandman",
|
||||
"ericfennis",
|
||||
"karsa-mistmere",
|
||||
"danielbayley"
|
||||
"danielbayley",
|
||||
"jguddas"
|
||||
],
|
||||
"tags": [
|
||||
"box",
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m7.5 4.27 9 5.15" />
|
||||
<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" />
|
||||
<path d="m3.3 7 8.7 5 8.7-5" />
|
||||
<path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" />
|
||||
<path d="M12 22V12" />
|
||||
<path d="m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7" />
|
||||
<path d="m7.5 4.27 9 5.15" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 460 B |
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley"
|
||||
"danielbayley",
|
||||
"jguddas"
|
||||
],
|
||||
"tags": [
|
||||
"driving",
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M9 9a3 3 0 1 1 6 0" />
|
||||
<path d="M12 12v3" />
|
||||
<path d="M11 15h2" />
|
||||
<path d="M19 9a7 7 0 1 0-13.6 2.3C6.4 14.4 8 19 8 19h8s1.6-4.6 2.6-7.7c.3-.8.4-1.5.4-2.3" />
|
||||
<path d="M12 12v3" />
|
||||
<path d="M12 19v3" />
|
||||
<path d="M15.282 19a1 1 0 0 0 .948-.68l2.37-6.988a7 7 0 1 0-13.2 0l2.37 6.988a1 1 0 0 0 .948.68z" />
|
||||
<path d="M9 9a3 3 0 1 1 6 0" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 417 B |
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"kemie"
|
||||
"kemie",
|
||||
"jamiemlaw"
|
||||
],
|
||||
"tags": [
|
||||
"food",
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
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" />
|
||||
<path d="m2.37 11.223 8.372-6.777a2 2 0 0 1 2.516 0l8.371 6.777" />
|
||||
<path d="M21 15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-5.25" />
|
||||
<path d="M3 15a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9" />
|
||||
<path d="m6.67 15 6.13 4.6a2 2 0 0 0 2.8-.4l3.15-4.2" />
|
||||
<rect width="20" height="4" x="2" y="11" rx="1" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 501 B |
@@ -4,7 +4,8 @@
|
||||
"llaenowyd",
|
||||
"mishkaio",
|
||||
"ericfennis",
|
||||
"karsa-mistmere"
|
||||
"karsa-mistmere",
|
||||
"chessurisme"
|
||||
],
|
||||
"tags": [
|
||||
"selection",
|
||||
@@ -12,10 +13,14 @@
|
||||
"rectangular",
|
||||
"marquee",
|
||||
"tool",
|
||||
"dashed"
|
||||
"dashed",
|
||||
"box"
|
||||
],
|
||||
"categories": [
|
||||
"text",
|
||||
"design"
|
||||
],
|
||||
"aliases": [
|
||||
"box-select"
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 532 B |
37
icons/volleyball.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"danielbayley",
|
||||
"jguddas"
|
||||
],
|
||||
"tags": [
|
||||
"beach",
|
||||
"sand",
|
||||
"net",
|
||||
"holiday",
|
||||
"vacation",
|
||||
"summer",
|
||||
"soccer",
|
||||
"football",
|
||||
"futbol",
|
||||
"kick",
|
||||
"pitch",
|
||||
"goal",
|
||||
"score",
|
||||
"bounce",
|
||||
"leather",
|
||||
"wool",
|
||||
"yarn",
|
||||
"knitting",
|
||||
"sewing",
|
||||
"thread",
|
||||
"embroidery",
|
||||
"textile"
|
||||
],
|
||||
"categories": [
|
||||
"sports",
|
||||
"gaming",
|
||||
"travel",
|
||||
"home"
|
||||
]
|
||||
}
|
||||
18
icons/volleyball.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="M11.1 7.1a16.55 16.55 0 0 1 10.9 4" />
|
||||
<path d="M12 12a12.6 12.6 0 0 1-8.7 5" />
|
||||
<path d="M16.8 13.6a16.55 16.55 0 0 1-9 7.5" />
|
||||
<path d="M20.7 17a12.8 12.8 0 0 0-8.7-5 13.3 13.3 0 0 1 0-10" />
|
||||
<path d="M6.3 3.8a16.55 16.55 0 0 0 1.9 11.5" />
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 506 B |
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "@lucide/monorepo",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "pnpm -r --filter './packages/**' build",
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"@testing-library/preact": "^3.2.3",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"preact": "^10.19.2",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "5.0.13",
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"react-dom": "^18.0.0",
|
||||
"react-native": "^0.73.1",
|
||||
"react-native-svg": "^15.0.0",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "5.0.13",
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "5.0.13",
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
"@testing-library/jest-dom": "^6.4.2",
|
||||
"babel-preset-solid": "^1.8.12",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"solid-js": "^1.8.7",
|
||||
"typescript": "^4.9.4",
|
||||
"vite": "5.0.13",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/helpers": "workspace:*",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-dts": "^6.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"@testing-library/vue": "^8.0.3",
|
||||
"@vitejs/plugin-vue": "^4.6.2",
|
||||
"@vue/test-utils": "2.4.5",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"vite": "5.0.13",
|
||||
"vitest": "^1.4.0",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"@testing-library/jest-dom": "^6.1.6",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "5.0.13",
|
||||
|
||||
@@ -7,5 +7,12 @@
|
||||
"types": "src/index.ts",
|
||||
"type": "module",
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
"license": "ISC",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^2.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,17 @@ import { CamelToPascal } from './utility-types';
|
||||
export const toKebabCase = (string: string) =>
|
||||
string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
/**
|
||||
* Converts string to camel case
|
||||
*
|
||||
* @param {string} string
|
||||
* @returns {string} A camelized string
|
||||
*/
|
||||
export const toCamelCase = <T extends string>(string: T) =>
|
||||
string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) =>
|
||||
p2 ? p2.toUpperCase() : p1.toLowerCase(),
|
||||
);
|
||||
|
||||
/**
|
||||
* Converts string to pascal case
|
||||
*
|
||||
@@ -16,9 +27,7 @@ export const toKebabCase = (string: string) =>
|
||||
* @returns {string} A pascalized string
|
||||
*/
|
||||
export const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {
|
||||
const camelCase = string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) =>
|
||||
p2 ? p2.toUpperCase() : p1.toLowerCase(),
|
||||
);
|
||||
const camelCase = toCamelCase(string);
|
||||
|
||||
return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;
|
||||
};
|
||||
|
||||
21
packages/shared/tests/utils.spec.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { mergeClasses } from '../src/utils';
|
||||
|
||||
describe('mergeClasses', () => {
|
||||
it('merges classes', async () => {
|
||||
const classes = mergeClasses('lucide', 'lucide-circle', 'custom-class');
|
||||
expect(classes).toBe('lucide lucide-circle custom-class');
|
||||
});
|
||||
it('ignores empty string', async () => {
|
||||
const classes = mergeClasses('lucide', 'lucide-circle', '');
|
||||
expect(classes).toBe('lucide lucide-circle');
|
||||
});
|
||||
it('ignores undefined', async () => {
|
||||
const classes = mergeClasses('lucide', 'lucide-circle', undefined);
|
||||
expect(classes).toBe('lucide lucide-circle');
|
||||
});
|
||||
it('removes duplicates', async () => {
|
||||
const classes = mergeClasses('lucide', 'lucide-circle', 'lucide');
|
||||
expect(classes).toBe('lucide lucide-circle');
|
||||
});
|
||||
});
|
||||
531
pnpm-lock.yaml
generated
6
release.config.mjs
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @type {import('semantic-release').GlobalConfig}
|
||||
*/
|
||||
export default {
|
||||
branches: ['main', 'new-release-workflow'],
|
||||
};
|
||||
@@ -12,7 +12,7 @@
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"esbuild": "^0.19.11",
|
||||
"rollup": "^4.9.2",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-esbuild": "^6.1.0",
|
||||
"rollup-plugin-license": "^3.2.0",
|
||||
"rollup-plugin-visualizer": "^5.12.0"
|
||||
|
||||