mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 17:37:42 +01:00
Add support for aliases (#899)
* extract workflow * Add aliases build * Setup types building for aliases * Add types generation for aliases * Finish React Aliases * Finish aliases for lucide-react * setup aliases preact * Fix aliases in preact * Add aliases preact * Add aliases lucide-react-native * Fix solid js build * update lock file * Improve solid for solid start * update import * update import * lucide solid fix types generation * Fix lucide sold * Fix svelte aliases * update lockfile * Fix imports * Fix solid js issues * Add aliases to the vue packages * Fix lucide react native * Test alpha versions lucide-vue, lucide-vue-next, lucide-svelte
This commit is contained in:
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
|
||||
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
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -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 --iconFileExtension=.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",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"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 --iconFileExtension=.ts --exportFileName=index.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": "vitest run",
|
||||
@@ -33,6 +33,7 @@
|
||||
},
|
||||
"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",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: "json" };
|
||||
|
||||
const packageName = 'LucidePreact';
|
||||
@@ -39,7 +39,19 @@ const configs = bundles
|
||||
.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,
|
||||
|
||||
@@ -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};
|
||||
`;
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { ComponentType, h, JSX, toChildArray } from 'preact';
|
||||
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 Omit<JSX.SVGAttributes<SVGElement>, "ref" | "size"> {
|
||||
interface LucideProps extends Partial<Omit<JSX.SVGAttributes, "ref" | "size">> {
|
||||
color?: string
|
||||
size?: string | number
|
||||
color: string
|
||||
strokeWidth?: string | number
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Converts string to KebabCase
|
||||
* Copied from scripts/helper. If anyone knows how to properly import it here
|
||||
@@ -20,7 +19,7 @@ interface LucideProps extends Omit<JSX.SVGAttributes<SVGElement>, "ref" | "size"
|
||||
*/
|
||||
export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
const createPreactComponent = (iconName: string, iconNode: IconNode) => {
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode): FunctionComponent<LucideProps> => {
|
||||
const Component = (
|
||||
{ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }: LucideProps
|
||||
) =>
|
||||
@@ -43,4 +42,4 @@ const createPreactComponent = (iconName: string, iconNode: IconNode) => {
|
||||
return Component;
|
||||
};
|
||||
|
||||
export default createPreactComponent
|
||||
export default createLucideIcon
|
||||
@@ -1 +1,4 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as createLucideIcon } from './createLucideIcon';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { render } from '@testing-library/preact'
|
||||
import { Grid } from '../src/icons'
|
||||
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', () => {
|
||||
@@ -27,4 +27,31 @@ describe('Using lucide icon components', () => {
|
||||
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,7 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"declaration": true,
|
||||
"declaration": false,
|
||||
"noEmitOnError": true,
|
||||
"noEmit": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
@@ -17,7 +17,6 @@
|
||||
"downlevelIteration": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"declarationMap": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact",
|
||||
},
|
||||
|
||||
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;
|
||||
@@ -26,7 +26,7 @@
|
||||
"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 --iconFileExtension=.ts --exportFileName=index.ts",
|
||||
"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": "vitest",
|
||||
@@ -34,6 +34,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@types/prop-types": "^15.7.5",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideReact';
|
||||
@@ -6,28 +6,12 @@ const outputFileName = 'lucide-react-native';
|
||||
const outputDir = 'dist';
|
||||
const inputs = ['src/lucide-react-native.ts'];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
outputDir,
|
||||
preserveModules: true,
|
||||
},
|
||||
{
|
||||
format: 'es',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'esm',
|
||||
inputs,
|
||||
@@ -40,7 +24,20 @@ const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
plugins: [
|
||||
// This for aliases, only for esm
|
||||
...(
|
||||
format !== 'esm' || format !== 'cjs' ? [
|
||||
replace({
|
||||
"export * from './aliases';": '',
|
||||
"export * as icons from './icons';": '',
|
||||
delimiters: ['', ''],
|
||||
preventAssignment: false,
|
||||
}),
|
||||
] : []
|
||||
),
|
||||
...plugins(pkg, minify)
|
||||
],
|
||||
external: ['react', 'prop-types', 'react-native-svg'],
|
||||
output: {
|
||||
name: packageName,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
appendFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
@@ -11,29 +12,35 @@ import {
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const srcDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
/// <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 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);
|
||||
|
||||
@@ -41,8 +48,44 @@ 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};
|
||||
`;
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface LucideProps extends SvgProps {
|
||||
size?: string | number
|
||||
}
|
||||
|
||||
const createReactComponent = (iconName: string, iconNode: IconNode) => {
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode) => {
|
||||
const Component = forwardRef(
|
||||
({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }: LucideProps, ref) =>
|
||||
createElement(
|
||||
@@ -45,4 +45,4 @@ const createReactComponent = (iconName: string, iconNode: IconNode) => {
|
||||
return Component;
|
||||
};
|
||||
|
||||
export default createReactComponent;
|
||||
export default createLucideIcon;
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from './icons';
|
||||
export { default as createReactComponent } from './createReactComponent';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as createLucideIcon } from './createLucideIcon';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-react",
|
||||
"description": "A Lucide icon library package for React applications",
|
||||
"version": "0.104.1",
|
||||
"version": "0.105.0-alpha.4",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||
@@ -25,7 +25,7 @@
|
||||
"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/*.ts",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --iconFileExtension=.ts --exportFileName=index.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",
|
||||
"typecheck": "tsc",
|
||||
@@ -34,13 +34,13 @@
|
||||
"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",
|
||||
"@types/prop-types": "^15.7.5",
|
||||
"@types/react": "^18.0.21",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"rollup": "^3.5.1",
|
||||
@@ -49,7 +49,6 @@
|
||||
"vitest": "^0.24.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideReact';
|
||||
@@ -39,7 +39,20 @@ const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
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,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
appendFile,
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
toPascalCase,
|
||||
@@ -11,30 +12,35 @@ import {
|
||||
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);
|
||||
|
||||
@@ -42,8 +48,44 @@ 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
@@ -1,5 +1,4 @@
|
||||
import { forwardRef, createElement, ReactSVG, SVGProps } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import defaultAttributes from './defaultAttributes';
|
||||
|
||||
type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][]
|
||||
@@ -19,7 +18,7 @@ export interface LucideProps extends SVGAttributes {
|
||||
*/
|
||||
export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
const createReactComponent = (iconName: string, iconNode: IconNode) => {
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode) => {
|
||||
const Component = forwardRef<SVGSVGElement, LucideProps>(
|
||||
({ color = 'currentColor', size = 24, strokeWidth = 2, children, ...rest }, ref) =>
|
||||
createElement(
|
||||
@@ -43,15 +42,9 @@ const createReactComponent = (iconName: string, iconNode: IconNode) => {
|
||||
),
|
||||
);
|
||||
|
||||
Component.propTypes = {
|
||||
color: PropTypes.string,
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
strokeWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
};
|
||||
|
||||
Component.displayName = `${iconName}`;
|
||||
|
||||
return Component;
|
||||
};
|
||||
|
||||
export default createReactComponent
|
||||
export default createLucideIcon
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from './icons';
|
||||
export { default as createReactComponent } from './createReactComponent';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as createLucideIcon } from './createLucideIcon';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react'
|
||||
import { Grid } from '../src/icons'
|
||||
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', () => {
|
||||
@@ -29,4 +28,31 @@ describe('Using lucide icon components', () => {
|
||||
|
||||
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,7 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"declaration": true,
|
||||
"declaration": false,
|
||||
"noEmitOnError": true,
|
||||
"noEmit": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
@@ -17,7 +17,6 @@
|
||||
"downlevelIteration": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"declarationMap": true,
|
||||
"jsx": "react-jsx",
|
||||
},
|
||||
"exclude": ["**/node_modules"]
|
||||
|
||||
@@ -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,34 +11,44 @@
|
||||
"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:bundles && pnpm build:types",
|
||||
"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 --iconFileExtension=.ts --exportFileName=index.ts",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"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/rollup-plugins": "workspace:*",
|
||||
"@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",
|
||||
"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",
|
||||
"typescript": "^4.9.4",
|
||||
"vite": "^3.2.4",
|
||||
"vite-plugin-solid": "^2.3.0",
|
||||
"vitest": "^0.23.2"
|
||||
|
||||
@@ -1,65 +1,20 @@
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
// 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.ts`];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
minify: true,
|
||||
},
|
||||
{
|
||||
format: 'umd',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'cjs',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'es',
|
||||
inputs,
|
||||
outputDir,
|
||||
},
|
||||
{
|
||||
format: 'esm',
|
||||
inputs,
|
||||
outputDir,
|
||||
preserveModules: true,
|
||||
},
|
||||
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, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
external: ['solid-js', 'solid-js/h'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
? {
|
||||
dir: `${outputDir}/${format}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
|
||||
}),
|
||||
preserveModules,
|
||||
format,
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'solid-js': 'solid-js',
|
||||
'solid-js/h': 'solid-js/h',
|
||||
},
|
||||
},
|
||||
})),
|
||||
)
|
||||
.flat();
|
||||
|
||||
export default configs;
|
||||
export default config;
|
||||
|
||||
@@ -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,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
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'
|
||||
|
||||
@@ -24,23 +33,55 @@ interface LucideProps extends Partial<JSX.SvgSVGAttributes<SVGSVGElement>> {
|
||||
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) => {
|
||||
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,57 +0,0 @@
|
||||
import h from 'solid-js/h';
|
||||
import { JSX, splitProps } from 'solid-js';
|
||||
import defaultAttributes from './defaultAttributes';
|
||||
|
||||
type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record<string, string>][]
|
||||
|
||||
interface LucideProps extends Partial<JSX.SvgSVGAttributes<SVGSVGElement>> {
|
||||
key?: string | number;
|
||||
color?: string
|
||||
size?: string | number
|
||||
strokeWidth?: string | number
|
||||
class?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
export default (iconName: string, iconNode: IconNode) => {
|
||||
const Component = (props: LucideProps) => {
|
||||
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;
|
||||
};
|
||||
@@ -1,4 +1,7 @@
|
||||
export default {
|
||||
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,
|
||||
@@ -9,3 +12,5 @@ export default {
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
};
|
||||
|
||||
export default defaultAttributes
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
/**
|
||||
* lucide-solid {{version}} - ISC
|
||||
*/
|
||||
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
|
||||
12
packages/lucide-solid/src/types.ts
Normal file
12
packages/lucide-solid/src/types.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { JSX } from "solid-js/jsx-runtime";
|
||||
|
||||
export type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record<string, string>][]
|
||||
export type SVGAttributes = Partial<JSX.SvgSVGAttributes<SVGSVGElement>>
|
||||
|
||||
export interface LucideProps extends SVGAttributes {
|
||||
key?: string | number;
|
||||
color?: string
|
||||
size?: string | number
|
||||
strokeWidth?: string | number
|
||||
class?: string
|
||||
}
|
||||
@@ -1,5 +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\\" key=\\"maln0c\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\" key=\\"1uch6j\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\" key=\\"1xojw2\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\" key=\\"nvcl17\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\" key=\\"jcv93v\\"></line></svg>"`;
|
||||
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\\" class=\\"lucide lucide-grid \\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\" key=\\"maln0c\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\" key=\\"1uch6j\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\" key=\\"1xojw2\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\" key=\\"nvcl17\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\" key=\\"jcv93v\\"></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\\" key=\\"maln0c\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\" key=\\"1uch6j\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\" key=\\"1xojw2\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\" key=\\"nvcl17\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\" key=\\"jcv93v\\"></line></svg>"`;
|
||||
|
||||
@@ -15,7 +15,7 @@ describe('Using lucide icon components', () => {
|
||||
<Grid
|
||||
data-testid={testId}
|
||||
size={48}
|
||||
stroke="red"
|
||||
color="red"
|
||||
strokeWidth={4}
|
||||
/>,
|
||||
);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"jsxImportSource": "solid-js",
|
||||
"types": ["vite/client"],
|
||||
"noEmit": true,
|
||||
"isolatedModules": true
|
||||
"isolatedModules": true,
|
||||
"outDir": "dist"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lucide-svelte",
|
||||
"description": "A Lucide icon library package for Svelte applications",
|
||||
"version": "0.104.0",
|
||||
"version": "0.105.0-alpha.0",
|
||||
"license": "ISC",
|
||||
"homepage": "https://lucide.dev",
|
||||
"bugs": "https://github.com/lucide-icons/lucide/issues",
|
||||
@@ -25,7 +25,7 @@
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles && pnpm build:strip && pnpm build:types",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.svelte && rm -f index.js",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --exportFileName=index.ts --iconFileExtension=.svelte --pretty=false",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --exportFileName=index.ts --iconFileExtension=.svelte --importImportFileExtension=.svelte --withAliases --aliasesFileExtension=.ts --aliasImportFileExtension=.svelte --pretty=false",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"build:strip": "svelte-strip strip src/ dist/svelte",
|
||||
@@ -34,6 +34,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^1.2.0",
|
||||
"@testing-library/jest-dom": "^5.16.2",
|
||||
|
||||
@@ -59,7 +59,7 @@ const configs = bundles
|
||||
] : []),
|
||||
...plugins(pkg, minify),
|
||||
],
|
||||
external: format === 'svelte' ? [/\.svelte/] : ['svelte'],
|
||||
external: format === 'svelte' ? [/\.svelte/] : ['svelte', 'svelte/internal'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
|
||||
@@ -1,18 +1,30 @@
|
||||
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,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const srcDirectory = path.join(currentDir, '../dist');
|
||||
const targetDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
const writeDeclarationFile = (typesFile, directory, content) => {
|
||||
resetFile(typesFile, directory);
|
||||
writeFile(content, typesFile, directory);
|
||||
};
|
||||
|
||||
const getComponentImport = (componentName) =>
|
||||
`export declare class ${componentName} extends SvelteComponentTyped<IconProps, IconEvents, {}> {}\n`;
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-svelte.d.ts';
|
||||
|
||||
// Declare type definitions
|
||||
const typeDefinitions = `\
|
||||
let declarationFileContent = `\
|
||||
/// <reference types="svelte" />
|
||||
/// <reference types="svelte-check/dist/src/svelte-jsx" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
@@ -33,20 +45,51 @@ export type Icon = SvelteComponentTyped<IconProps, IconEvents, {}>
|
||||
// Generated icons
|
||||
`;
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE = 'lucide-svelte.d.ts';
|
||||
|
||||
resetFile(TYPES_FILE, srcDirectory);
|
||||
writeFile(typeDefinitions, TYPES_FILE, srcDirectory);
|
||||
|
||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||
|
||||
svgFiles.forEach((svgFile) => {
|
||||
const iconName = path.basename(svgFile, '.svg');
|
||||
const componentName = toPascalCase(iconName);
|
||||
|
||||
const exportTypeString = `export declare class ${componentName} extends SvelteComponentTyped<IconProps, IconEvents, {}> {}\n`;
|
||||
appendFile(exportTypeString, TYPES_FILE, srcDirectory);
|
||||
declarationFileContent += getComponentImport(componentName);
|
||||
});
|
||||
|
||||
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 += getComponentImport(`${componentName}Icon`);
|
||||
declarationFileContent += getComponentImport(`Lucide${componentName}`);
|
||||
|
||||
aliasesCount += 1;
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
declarationFileContent += getComponentImport(componentNameAlias);
|
||||
|
||||
aliasesCount += 1;
|
||||
});
|
||||
}
|
||||
|
||||
declarationFileContent += '\n';
|
||||
});
|
||||
|
||||
writeDeclarationFile(TYPES_FILE, targetDirectory, declarationFileContent);
|
||||
console.log(
|
||||
`Generated ${TYPES_FILE} file with`,
|
||||
svgFiles.length,
|
||||
'icons and with',
|
||||
aliasesCount,
|
||||
'aliases',
|
||||
);
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
export { default as defaultAttributes } from './defaultAttributes'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lucide-vue-next",
|
||||
"version": "0.104.0",
|
||||
"version": "0.105.0-alpha.0",
|
||||
"author": "Eric Fennis",
|
||||
"description": "A Lucide icon library package for Vue 3 applications",
|
||||
"license": "ISC",
|
||||
@@ -27,7 +27,7 @@
|
||||
"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 ./src/icons/*.ts",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --iconFileExtension=.ts --exportFileName=index.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": "vitest",
|
||||
@@ -35,6 +35,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/vue": "^6.6.1",
|
||||
"@vue/compiler-sfc": "3.2.45",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideVueNext';
|
||||
@@ -39,7 +39,20 @@ const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
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: ['vue'],
|
||||
output: {
|
||||
name: packageName,
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
import path from 'path';
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { getAliases } from '@lucide/build-icons';
|
||||
import {
|
||||
readSvgDirectory,
|
||||
resetFile,
|
||||
appendFile,
|
||||
writeFile,
|
||||
toPascalCase,
|
||||
getCurrentDirPath,
|
||||
} from '../../../scripts/helpers.mjs';
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
const targetDirectory = path.join(currentDir, '../dist');
|
||||
|
||||
const writeDeclarationFile = (typesFile, directory, content) => {
|
||||
resetFile(typesFile, directory);
|
||||
writeFile(content, typesFile, directory);
|
||||
};
|
||||
|
||||
const getComponentImport = (componentName) => `export declare const ${componentName}: Icon;\n`;
|
||||
|
||||
const TARGET_DIR = path.join(currentDir, '../dist');
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../../icons');
|
||||
const TYPES_FILE_NAME = 'lucide-vue-next.d.ts';
|
||||
const TYPES_FILE = 'lucide-vue-next.d.ts';
|
||||
|
||||
// Generates header of d.ts file include some types and functions
|
||||
const typeDefinitions = `\
|
||||
let declarationFileContent = `\
|
||||
import { SVGAttributes, FunctionalComponent } from 'vue';
|
||||
declare module 'lucide-vue-next'
|
||||
|
||||
@@ -24,23 +32,56 @@ export interface SVGProps extends Partial<SVGAttributes> {
|
||||
size?: 24 | number
|
||||
}
|
||||
|
||||
export type Icon = (props: SVGProps) => FunctionalComponent<SVGProps>
|
||||
|
||||
// Generated icons
|
||||
`;
|
||||
|
||||
resetFile(TYPES_FILE_NAME, TARGET_DIR);
|
||||
appendFile(typeDefinitions, TYPES_FILE_NAME, TARGET_DIR);
|
||||
|
||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||
|
||||
svgFiles.forEach((svgFile) => {
|
||||
const nameSvg = path.basename(svgFile, '.svg');
|
||||
const componentName = toPascalCase(nameSvg);
|
||||
|
||||
appendFile(
|
||||
`export declare const ${componentName}: (props: SVGProps) => FunctionalComponent<SVGProps>;\n`,
|
||||
TYPES_FILE_NAME,
|
||||
TARGET_DIR,
|
||||
);
|
||||
declarationFileContent += getComponentImport(componentName);
|
||||
});
|
||||
|
||||
console.log(`Generated ${TYPES_FILE_NAME} 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 += getComponentImport(`${componentName}Icon`);
|
||||
declarationFileContent += getComponentImport(`Lucide${componentName}`);
|
||||
|
||||
aliasesCount += 1;
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
declarationFileContent += getComponentImport(componentNameAlias);
|
||||
|
||||
aliasesCount += 1;
|
||||
});
|
||||
}
|
||||
|
||||
declarationFileContent += '\n';
|
||||
});
|
||||
|
||||
writeDeclarationFile(TYPES_FILE, targetDirectory, declarationFileContent);
|
||||
console.log(
|
||||
`Generated ${TYPES_FILE} file with`,
|
||||
svgFiles.length,
|
||||
'icons and with',
|
||||
aliasesCount,
|
||||
'aliases',
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default ({ componentName, children }) => `
|
||||
import createVueComponent from '../createVueComponent';
|
||||
import createLucideIcon from '../createLucideIcon';
|
||||
|
||||
const ${componentName} = createVueComponent('${componentName}Icon', ${JSON.stringify(children)});
|
||||
const ${componentName} = createLucideIcon('${componentName}Icon', ${JSON.stringify(children)});
|
||||
|
||||
export default ${componentName};
|
||||
`;
|
||||
|
||||
@@ -20,7 +20,7 @@ type IconNode = [elementName: string, attrs: Record<string, string>][]
|
||||
*/
|
||||
export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
|
||||
const createVueComponent = (iconName: string, iconNode: IconNode): FunctionalComponent<SVGProps> => (
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode): FunctionalComponent<SVGProps> => (
|
||||
{ size, color, ...props }, // props
|
||||
{ attrs, slots } // context
|
||||
) => {
|
||||
@@ -42,4 +42,4 @@ const createVueComponent = (iconName: string, iconNode: IconNode): FunctionalCom
|
||||
);
|
||||
};
|
||||
|
||||
export default createVueComponent;
|
||||
export default createLucideIcon;
|
||||
@@ -1 +1,3 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lucide-vue",
|
||||
"version": "0.104.0",
|
||||
"version": "0.105.0-alpha.0",
|
||||
"author": "Eric Fennis",
|
||||
"description": "A Lucide icon library package for Vue 2 applications",
|
||||
"license": "ISC",
|
||||
@@ -26,13 +26,14 @@
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles",
|
||||
"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 --iconFileExtention=.ts --exportFileName=index.ts",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --aliasesFileExtension=.ts --iconFileExtention=.ts --exportFileName=index.ts",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"test": "vitest",
|
||||
"version": "pnpm version --git-tag-version=false"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@testing-library/jest-dom": "^5.16.2",
|
||||
"@testing-library/vue": "^5.8.2",
|
||||
"@vitejs/plugin-vue2": "^2.0.1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import plugins from '@lucide/rollup-plugins';
|
||||
import plugins, { replace } from '@lucide/rollup-plugins';
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
const packageName = 'LucideVue';
|
||||
@@ -39,7 +39,20 @@ const configs = bundles
|
||||
.map(({ inputs, outputDir, format, minify, preserveModules }) =>
|
||||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: plugins(pkg, minify),
|
||||
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: ['vue'],
|
||||
output: {
|
||||
name: packageName,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
export * from './icons';
|
||||
export * as icons from './icons';
|
||||
export * from './aliases';
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts",
|
||||
"build:icons": "node ../../scripts/buildIcons.mjs --output=./src --templateSrc=./scripts/exportTemplate.mjs --iconFileExtension=.ts",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --iconFileExtension=.ts",
|
||||
"build:types": "node ./scripts/buildTypes.mjs",
|
||||
"build:bundles": "rollup -c rollup.config.mjs",
|
||||
"test": "vitest",
|
||||
@@ -33,6 +33,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@rollup/plugin-replace": "^5.0.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"rollup": "^3.5.1",
|
||||
|
||||
2001
pnpm-lock.yaml
generated
2001
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -76,8 +76,8 @@ export const writeFile = (content, fileName, outputDirectory) =>
|
||||
* @param {string} directory
|
||||
* @returns {array} An array of file paths containig svgs
|
||||
*/
|
||||
export const readSvgDirectory = (directory) =>
|
||||
fs.readdirSync(directory).filter((file) => path.extname(file) === '.svg');
|
||||
export const readSvgDirectory = (directory, fileExtension = '.svg') =>
|
||||
fs.readdirSync(directory).filter((file) => path.extname(file) === fileExtension);
|
||||
|
||||
/**
|
||||
* Read svg from directory
|
||||
|
||||
48
tools/build-icons/building/generateAliasesFile.mjs
Normal file
48
tools/build-icons/building/generateAliasesFile.mjs
Normal file
@@ -0,0 +1,48 @@
|
||||
import path from 'path';
|
||||
import { toPascalCase, resetFile, appendFile } from '../../../scripts/helpers.mjs';
|
||||
|
||||
const getImportString = (componentName, iconName, aliasImportFileExtension = '') =>
|
||||
`export { default as ${componentName} } from './icons/${iconName}${aliasImportFileExtension}';\n`;
|
||||
|
||||
export default function generateAliasesFile({
|
||||
iconNodes,
|
||||
outputDirectory,
|
||||
fileExtension,
|
||||
aliases,
|
||||
aliasImportFileExtension,
|
||||
showLog = true,
|
||||
}) {
|
||||
const fileName = path.basename(`aliases${fileExtension}`);
|
||||
const icons = Object.keys(iconNodes);
|
||||
|
||||
// Reset file
|
||||
resetFile(fileName, outputDirectory);
|
||||
|
||||
// Generate Import for Icon VNodes
|
||||
icons.forEach((iconName) => {
|
||||
const componentName = toPascalCase(iconName);
|
||||
const iconAliases = aliases[iconName]?.aliases;
|
||||
|
||||
let importString = `// ${componentName} aliases\n`;
|
||||
|
||||
importString += getImportString(`${componentName}Icon`, iconName, aliasImportFileExtension);
|
||||
importString += getImportString(`Lucide${componentName}`, iconName, aliasImportFileExtension);
|
||||
|
||||
if (iconAliases != null && Array.isArray(iconAliases)) {
|
||||
iconAliases.forEach((alias) => {
|
||||
const componentNameAlias = toPascalCase(alias);
|
||||
importString += getImportString(componentNameAlias, iconName, aliasImportFileExtension);
|
||||
});
|
||||
}
|
||||
|
||||
importString += '\n';
|
||||
|
||||
appendFile(importString, fileName, outputDirectory);
|
||||
});
|
||||
|
||||
appendFile('\n', fileName, outputDirectory);
|
||||
|
||||
if (showLog) {
|
||||
console.log(`Successfully generated ${fileName} file`);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from 'path';
|
||||
|
||||
import { toPascalCase, resetFile, appendFile } from '../helpers.mjs';
|
||||
import { toPascalCase, resetFile, appendFile } from '../../../scripts/helpers.mjs';
|
||||
|
||||
export default (inputEntry, outputDirectory, iconNodes, iconFileExtension = '') => {
|
||||
const fileName = path.basename(inputEntry);
|
||||
@@ -10,13 +10,10 @@ export default (inputEntry, outputDirectory, iconNodes, iconFileExtension = '')
|
||||
|
||||
const icons = Object.keys(iconNodes);
|
||||
|
||||
const fileExtention =
|
||||
iconFileExtension === '.ts' || iconFileExtension === '.js' ? '' : iconFileExtension;
|
||||
|
||||
// Generate Import for Icon VNodes
|
||||
icons.forEach((iconName) => {
|
||||
const componentName = toPascalCase(iconName);
|
||||
const importString = `export { default as ${componentName} } from './${iconName}${fileExtention}';\n`;
|
||||
const importString = `export { default as ${componentName} } from './${iconName}${iconFileExtension}';\n`;
|
||||
appendFile(importString, fileName, outputDirectory);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import prettier from 'prettier';
|
||||
import { toPascalCase } from '../helpers.mjs';
|
||||
import { toPascalCase } from '../../../scripts/helpers.mjs';
|
||||
|
||||
export default ({
|
||||
iconNodes,
|
||||
2
tools/build-icons/index.mjs
Normal file
2
tools/build-icons/index.mjs
Normal file
@@ -0,0 +1,2 @@
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export { default as getAliases } from './utils/getAliases.mjs';
|
||||
85
tools/build-icons/main.mjs
Executable file
85
tools/build-icons/main.mjs
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env node
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import getArgumentOptions from 'minimist';
|
||||
|
||||
import renderIconsObject from './render/renderIconsObject.mjs';
|
||||
import generateIconFiles from './building/generateIconFiles.mjs';
|
||||
import generateExportsFile from './building/generateExportsFile.mjs';
|
||||
|
||||
import { readSvgDirectory, getCurrentDirPath } from '../../scripts/helpers.mjs';
|
||||
import generateAliasesFile from './building/generateAliasesFile.mjs';
|
||||
import getAliases from './utils/getAliases.mjs';
|
||||
|
||||
const cliArguments = getArgumentOptions(process.argv.slice(2));
|
||||
|
||||
const currentDir = getCurrentDirPath(import.meta.url);
|
||||
|
||||
const ICONS_DIR = path.resolve(currentDir, '../../icons');
|
||||
const OUTPUT_DIR = path.resolve(process.cwd(), cliArguments.output || '../build');
|
||||
|
||||
if (!fs.existsSync(OUTPUT_DIR)) {
|
||||
fs.mkdirSync(OUTPUT_DIR);
|
||||
}
|
||||
|
||||
const {
|
||||
renderUniqueKey = false,
|
||||
templateSrc,
|
||||
silent = false,
|
||||
iconFileExtension = '.js',
|
||||
importImportFileExtension = '',
|
||||
exportFileName = 'index.js',
|
||||
withAliases = false,
|
||||
aliasesFileExtension = '.js',
|
||||
aliasImportFileExtension = '',
|
||||
pretty = true,
|
||||
} = cliArguments;
|
||||
|
||||
async function buildIcons() {
|
||||
if (templateSrc == null) {
|
||||
throw new Error('No `templateSrc` argument given.');
|
||||
}
|
||||
|
||||
const svgFiles = readSvgDirectory(ICONS_DIR);
|
||||
|
||||
const icons = renderIconsObject(svgFiles, ICONS_DIR, renderUniqueKey);
|
||||
|
||||
const { default: iconFileTemplate } = await import(path.resolve(process.cwd(), templateSrc));
|
||||
|
||||
// Generates iconsNodes files for each icon
|
||||
generateIconFiles({
|
||||
iconNodes: icons,
|
||||
outputDirectory: OUTPUT_DIR,
|
||||
template: iconFileTemplate,
|
||||
showLog: !silent,
|
||||
iconFileExtension,
|
||||
pretty: JSON.parse(pretty),
|
||||
});
|
||||
|
||||
if (withAliases) {
|
||||
const aliases = await getAliases(ICONS_DIR);
|
||||
|
||||
generateAliasesFile({
|
||||
iconNodes: icons,
|
||||
aliases,
|
||||
outputDirectory: OUTPUT_DIR,
|
||||
fileExtension: aliasesFileExtension,
|
||||
aliasImportFileExtension,
|
||||
showLog: !silent,
|
||||
});
|
||||
}
|
||||
|
||||
// Generates entry files for the compiler filled with icons exports
|
||||
generateExportsFile(
|
||||
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
||||
path.join(OUTPUT_DIR, 'icons'),
|
||||
icons,
|
||||
importImportFileExtension,
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
buildIcons();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
27
tools/build-icons/package.json
Normal file
27
tools/build-icons/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@lucide/build-icons",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.mjs",
|
||||
"type":"module",
|
||||
"scripts": {
|
||||
"start": "node ./main.mjs"
|
||||
},
|
||||
"bin": {
|
||||
"build-icons": "./main.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.7",
|
||||
"node-fetch": "^3.2.10",
|
||||
"prettier": "2.7.1",
|
||||
"svgo": "^3.0.0",
|
||||
"svgson": "^5.2.1"
|
||||
}
|
||||
}
|
||||
11
tools/build-icons/render/default-attrs.json
Normal file
11
tools/build-icons/render/default-attrs.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
39
tools/build-icons/render/renderIconsObject.mjs
Normal file
39
tools/build-icons/render/renderIconsObject.mjs
Normal file
@@ -0,0 +1,39 @@
|
||||
import { basename } from 'path';
|
||||
import { parseSync } from 'svgson';
|
||||
import { generateHashedKey, readSvg, hasDuplicatedChildren } from '../../../scripts/helpers.mjs';
|
||||
|
||||
/**
|
||||
* Build an object in the format: `{ <name>: <contents> }`.
|
||||
* @param {string[]} svgFiles - A list of filenames.
|
||||
* @param {Function} getSvg - A function that returns the contents of an SVG file given a filename.
|
||||
* @returns {Object}
|
||||
*/
|
||||
export default (svgFiles, iconsDirectory, renderUniqueKey = false) =>
|
||||
svgFiles
|
||||
.map((svgFile) => {
|
||||
const name = basename(svgFile, '.svg');
|
||||
const svg = readSvg(svgFile, iconsDirectory);
|
||||
const contents = parseSync(svg);
|
||||
|
||||
if (!(contents.children && contents.children.length)) {
|
||||
throw new Error(`${name}.svg has no children!`);
|
||||
}
|
||||
|
||||
if (hasDuplicatedChildren(contents.children)) {
|
||||
throw new Error(`Duplicated children in ${name}.svg`);
|
||||
}
|
||||
|
||||
if (renderUniqueKey) {
|
||||
contents.children = contents.children.map((child) => {
|
||||
child.attributes.key = generateHashedKey(child);
|
||||
|
||||
return child;
|
||||
});
|
||||
}
|
||||
|
||||
return { name, contents };
|
||||
})
|
||||
.reduce((icons, icon) => {
|
||||
icons[icon.name] = icon.contents;
|
||||
return icons;
|
||||
}, {});
|
||||
16
tools/build-icons/utils/getAliases.mjs
Normal file
16
tools/build-icons/utils/getAliases.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import path from 'path';
|
||||
import { readSvgDirectory } from '../../../scripts/helpers.mjs';
|
||||
|
||||
async function getAliases(iconDirectory) {
|
||||
const iconJsons = readSvgDirectory(iconDirectory, '.json');
|
||||
const aliasesEntries = await Promise.all(
|
||||
iconJsons.map(async (jsonFile) => {
|
||||
const file = await import( path.join(iconDirectory, jsonFile), { assert: { type: 'json' } });
|
||||
return [path.basename(jsonFile, '.json'), file.default]
|
||||
})
|
||||
)
|
||||
|
||||
return Object.fromEntries(aliasesEntries);
|
||||
}
|
||||
|
||||
export default getAliases
|
||||
@@ -10,6 +10,7 @@
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
||||
"@rollup/plugin-replace": "^5.0.1",
|
||||
"esbuild": "^0.15.16",
|
||||
"rollup": "^3.5.1",
|
||||
"rollup-plugin-esbuild": "^4.10.2",
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import bundleSize from '@atomico/rollup-plugin-sizes';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import bundleSize from '@atomico/rollup-plugin-sizes';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import license from 'rollup-plugin-license';
|
||||
import esbuild from 'rollup-plugin-esbuild';
|
||||
|
||||
const plugins = (pkg, minify) =>
|
||||
const plugins = (pkg, minify, esbuildOptions = {}) =>
|
||||
[
|
||||
esbuild({
|
||||
minify,
|
||||
...esbuildOptions,
|
||||
}),
|
||||
license({
|
||||
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`,
|
||||
@@ -19,4 +21,6 @@ const plugins = (pkg, minify) =>
|
||||
}),
|
||||
].filter(Boolean);
|
||||
|
||||
export { bundleSize, license, visualizer, replace };
|
||||
|
||||
export default plugins;
|
||||
|
||||
Reference in New Issue
Block a user