diff --git a/.changeset/better-areas-hide.md b/.changeset/better-areas-hide.md new file mode 100644 index 0000000..5e19c3e --- /dev/null +++ b/.changeset/better-areas-hide.md @@ -0,0 +1,5 @@ +--- +'@fuxui/social': patch +--- + +improve emoji picker diff --git a/apps/docs/src/lib/cards/social/CardEmojiPicker.svelte b/apps/docs/src/lib/cards/social/CardEmojiPicker.svelte new file mode 100644 index 0000000..4a37301 --- /dev/null +++ b/apps/docs/src/lib/cards/social/CardEmojiPicker.svelte @@ -0,0 +1,119 @@ + + +
+
+ {#each emojis as emoji} +
+ {emoji} +
+ {/each} +
+
diff --git a/apps/docs/src/lib/site-components/components_social.ts b/apps/docs/src/lib/site-components/components_social.ts index d7c8b95..c439d12 100644 --- a/apps/docs/src/lib/site-components/components_social.ts +++ b/apps/docs/src/lib/site-components/components_social.ts @@ -4,6 +4,7 @@ import CardUserProfile from '$lib/cards/social/CardUserProfile.svelte'; import CardGithubCorner from '$lib/cards/social/CardGithubCorner.svelte'; import CardBlueskyLogin from '$lib/cards/social/CardBlueskyLogin.svelte'; import CardStarRating from '$lib/cards/social/CardStarRating.svelte'; +import CardEmojiPicker from '$lib/cards/social/CardEmojiPicker.svelte'; export const socialComponents: ComponentCard[] = [ { @@ -30,5 +31,10 @@ export const socialComponents: ComponentCard[] = [ component: CardStarRating, label: 'Star Rating', href: 'star-rating' + }, + { + component: CardEmojiPicker, + label: 'Emoji Picker', + href: 'emoji-picker' } ].sort((a, b) => a.label.localeCompare(b.label)); diff --git a/apps/docs/src/routes/(main)/components/3d/depth-3d/Depth3D.md b/apps/docs/src/routes/(main)/components/3d/depth-3d/Depth3D.md index 550c049..00a7c10 100644 --- a/apps/docs/src/routes/(main)/components/3d/depth-3d/Depth3D.md +++ b/apps/docs/src/routes/(main)/components/3d/depth-3d/Depth3D.md @@ -16,7 +16,7 @@ ```svelte - import { ModelPicker } from 'fuchs'; + import { ModelPicker } from '@fuxui/3d'; const items = [ { diff --git a/apps/docs/src/routes/(main)/components/3d/voxel-art/VoxelArt.md b/apps/docs/src/routes/(main)/components/3d/voxel-art/VoxelArt.md index eced57d..8a90ac1 100644 --- a/apps/docs/src/routes/(main)/components/3d/voxel-art/VoxelArt.md +++ b/apps/docs/src/routes/(main)/components/3d/voxel-art/VoxelArt.md @@ -14,7 +14,7 @@ Create your voxel art model with [this tool](https://voxels.layoutit.com/), down ```svelte diff --git a/apps/docs/src/routes/(main)/components/time/stopwatch/Stopwatch.md b/apps/docs/src/routes/(main)/components/time/stopwatch/Stopwatch.md index 72f5492..1c17387 100644 --- a/apps/docs/src/routes/(main)/components/time/stopwatch/Stopwatch.md +++ b/apps/docs/src/routes/(main)/components/time/stopwatch/Stopwatch.md @@ -12,7 +12,7 @@ ```svelte diff --git a/apps/docs/src/routes/(main)/components/time/timer/Timer.md b/apps/docs/src/routes/(main)/components/time/timer/Timer.md index 991c387..c1bb83e 100644 --- a/apps/docs/src/routes/(main)/components/time/timer/Timer.md +++ b/apps/docs/src/routes/(main)/components/time/timer/Timer.md @@ -12,7 +12,7 @@ ```svelte diff --git a/apps/docs/src/routes/+page.svelte b/apps/docs/src/routes/+page.svelte index 8f98e56..27c07af 100644 --- a/apps/docs/src/routes/+page.svelte +++ b/apps/docs/src/routes/+page.svelte @@ -5,6 +5,7 @@ import Navbar from '$lib/site-components/Navbar.svelte'; import Sidebar from '$lib/site-components/Sidebar.svelte'; import { components } from '$lib/site-components/components_all'; + import { dev } from '$app/environment'; let count = components.flatMap((c) => c.components).length; @@ -14,9 +15,12 @@

- {count} UI components built with Tailwind 4 and Svelte 5 + {#if dev} + {count} + {/if} + UI components built with Tailwind 4 and Svelte 5

diff --git a/packages/social/src/lib/components/emoji-picker/EmojiPicker.svelte b/packages/social/src/lib/components/emoji-picker/EmojiPicker.svelte index 04addc6..b331041 100644 --- a/packages/social/src/lib/components/emoji-picker/EmojiPicker.svelte +++ b/packages/social/src/lib/components/emoji-picker/EmojiPicker.svelte @@ -1,64 +1,52 @@
- {#if !emojiGroups[currentGroup] || emojiGroups[currentGroup].length === 0} -
-

Loading emojis...

-
- {/if} - {#each emojiGroups[currentGroup] as emoji} - - {/each} + {#await db?.getEmojiByGroup(currentGroup) then emojis} + {#if emojis} + {#each emojis as emoji} + {#if isEmojiSupported(emoji.unicode)} + + {/if} + {/each} + {/if} + {/await}
-
+
{#each allGroups as group}