mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-11 13:28:19 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c29c276f16 | ||
|
|
02eb9161b5 |
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"ypotti",
|
||||
"karsa-mistmere",
|
||||
"ericfennis",
|
||||
"jguddas",
|
||||
"colebemis",
|
||||
"AlexandrePhilibert"
|
||||
],
|
||||
"use-cases": [
|
||||
"Navigating to the bottom of a page or feed",
|
||||
"Fast-scrolling downwards in long document readers",
|
||||
"Collapsing expanded panels or drawers downward",
|
||||
"Jumping to the latest message in chat and activity feeds"
|
||||
],
|
||||
"tags": [
|
||||
"bottom",
|
||||
"descend",
|
||||
"page",
|
||||
"page down",
|
||||
"scroll",
|
||||
"jump",
|
||||
"south",
|
||||
"caret",
|
||||
"button",
|
||||
"skip",
|
||||
"end",
|
||||
"last page",
|
||||
"latest",
|
||||
"feed",
|
||||
"chat",
|
||||
"pagination",
|
||||
"fast",
|
||||
"media"
|
||||
],
|
||||
"categories": [
|
||||
"arrows",
|
||||
"navigation"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M9 14L12 17L15 14" />
|
||||
<path d="M9 8L12 11L15 8" />
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 308 B |
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"ypotti",
|
||||
"karsa-mistmere",
|
||||
"ericfennis",
|
||||
"jguddas",
|
||||
"colebemis",
|
||||
"AlexandrePhilibert"
|
||||
],
|
||||
"use-cases": [
|
||||
"Skipping to the first page in pagination controls",
|
||||
"Rewinding playback in audio or video media players",
|
||||
"Fast-navigating backward through steps in multi-step wizards",
|
||||
"Jumping to the first track or chapter in playlists"
|
||||
],
|
||||
"tags": [
|
||||
"previous",
|
||||
"rewind",
|
||||
"backward",
|
||||
"first",
|
||||
"beginning",
|
||||
"start",
|
||||
"west",
|
||||
"music",
|
||||
"caret",
|
||||
"button",
|
||||
"pagination",
|
||||
"skip",
|
||||
"skip-back",
|
||||
"seek-back",
|
||||
"media-controls",
|
||||
"player",
|
||||
"playlist",
|
||||
"track",
|
||||
"chapter",
|
||||
"jump",
|
||||
"timeline",
|
||||
"controls"
|
||||
],
|
||||
"categories": [
|
||||
"arrows",
|
||||
"navigation",
|
||||
"multimedia"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M10 9L7 12L10 15" />
|
||||
<path d="M16 9L13 12L16 15" />
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 309 B |
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"ypotti",
|
||||
"karsa-mistmere",
|
||||
"ericfennis",
|
||||
"jguddas",
|
||||
"colebemis",
|
||||
"AlexandrePhilibert"
|
||||
],
|
||||
"use-cases": [
|
||||
"Skipping to the last page in pagination controls",
|
||||
"Fast-forwarding playback in audio or video media players",
|
||||
"Fast-navigating forward through steps in multi-step wizards",
|
||||
"Advancing to the final chapter or track in playlists and audiobooks"
|
||||
],
|
||||
"tags": [
|
||||
"next",
|
||||
"forward",
|
||||
"skip",
|
||||
"fast forward",
|
||||
"last",
|
||||
"end",
|
||||
"east",
|
||||
"music",
|
||||
"caret",
|
||||
"button",
|
||||
"pagination",
|
||||
"jump",
|
||||
"seek",
|
||||
"seek forward",
|
||||
"player control",
|
||||
"chapter",
|
||||
"track",
|
||||
"timeline",
|
||||
"navigation control"
|
||||
],
|
||||
"categories": [
|
||||
"arrows",
|
||||
"navigation",
|
||||
"multimedia"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M14 15L17 12L14 9" />
|
||||
<path d="M8 15L11 12L8 9" />
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 308 B |
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"ypotti",
|
||||
"karsa-mistmere",
|
||||
"ericfennis",
|
||||
"jguddas",
|
||||
"colebemis",
|
||||
"AlexandrePhilibert"
|
||||
],
|
||||
"use-cases": [
|
||||
"Navigating to the top of a page or feed",
|
||||
"Fast-scrolling upwards in long document readers",
|
||||
"Expanding collapsed panels or drawers upward"
|
||||
],
|
||||
"tags": [
|
||||
"top",
|
||||
"ascend",
|
||||
"page",
|
||||
"page up",
|
||||
"back to top",
|
||||
"scroll",
|
||||
"jump",
|
||||
"north",
|
||||
"caret",
|
||||
"button",
|
||||
"skip",
|
||||
"pagination",
|
||||
"first page",
|
||||
"fast",
|
||||
"fast scroll",
|
||||
"rewind",
|
||||
"jump to start",
|
||||
"floating action button",
|
||||
"anchor",
|
||||
"timeline"
|
||||
],
|
||||
"categories": [
|
||||
"arrows",
|
||||
"navigation"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M15 10L12 7L9 10" />
|
||||
<path d="M15 16L12 13L9 16" />
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 309 B |
@@ -9,14 +9,23 @@ export default defineExportTemplate(
|
||||
|
||||
return `\
|
||||
${getHTMLBanner()}
|
||||
<script module lang="ts">
|
||||
import type { LucideIconData, LucideIconNode } from '../types.js';
|
||||
|
||||
export const __iconData: LucideIconData = ${JSON.stringify(iconData)};
|
||||
|
||||
/**
|
||||
* @deprecated Access \`__iconData\` instead.
|
||||
*/
|
||||
export const __iconNode: LucideIconNode[] = __iconData.node;
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import Icon from '../Icon.svelte';
|
||||
import type { LucideProps, LucideIconData } from '../types.js';
|
||||
import type { LucideProps } from '../types.js';
|
||||
|
||||
let props: LucideProps = $props();
|
||||
|
||||
const iconData: LucideIconData = ${JSON.stringify(iconData)};
|
||||
|
||||
</script>
|
||||
|
||||
<!--
|
||||
@@ -29,7 +38,7 @@ Lucide SVG icon component, renders SVG Element with children.
|
||||
${deprecated ? `\n@deprecated ${deprecationReason}\n` : ''}\
|
||||
-->
|
||||
|
||||
<Icon {...props} icon={iconData} />
|
||||
<Icon {...props} icon={__iconData} />
|
||||
`;
|
||||
},
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { describe, it, expect, afterEach } from 'vitest';
|
||||
import { render, cleanup } from '@testing-library/svelte';
|
||||
import { Smile, Pen, Edit2 } from '../src/lucide-svelte.js';
|
||||
import { __iconData, __iconNode } from '../src/icons/face-slightly-smiling.svelte';
|
||||
import TestSlots from './TestSlots.svelte';
|
||||
import ContextWrapper from './ContextWrapper.svelte';
|
||||
|
||||
@@ -132,3 +133,14 @@ describe('Icon Component Accessibility', () => {
|
||||
expect(container.firstChild).not.toHaveAttribute('aria-hidden');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Per-icon data export', () => {
|
||||
it('should export __iconData and __iconNode from the svelte component module', () => {
|
||||
expect(__iconData).toBeDefined();
|
||||
expect(__iconData.name).toBe('face-slightly-smiling');
|
||||
expect(__iconData.size).toBe(24);
|
||||
expect(Array.isArray(__iconData.node)).toBe(true);
|
||||
expect(__iconData.node.length).toBeGreaterThan(0);
|
||||
expect(__iconNode).toEqual(__iconData.node);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user