@functionalcms/svelte-components 5.18.0 → 5.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { SolidIcons } from '../icons';
|
|
3
|
+
import { default as Icon } from '../Icon.svelte';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
items: Array<any>;
|
|
8
|
+
icon: string;
|
|
9
|
+
label: string;
|
|
10
|
+
children: Snippet;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { items = [], icon = SolidIcons.Folder, label = '', children }: Partial<Props> = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if items.length === 0}
|
|
17
|
+
<div class="flex min-h-64 flex-col items-center justify-center gap-2 text-gray-400">
|
|
18
|
+
<Icon {icon} class="h-12 w-12" />
|
|
19
|
+
<p>{label}</p>
|
|
20
|
+
</div>
|
|
21
|
+
{:else}
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
{/if}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type EmptyStateProps = typeof __propDef.props;
|
|
10
|
+
export type EmptyStateEvents = typeof __propDef.events;
|
|
11
|
+
export type EmptyStateSlots = typeof __propDef.slots;
|
|
12
|
+
export default class EmptyState extends SvelteComponentTyped<EmptyStateProps, EmptyStateEvents, EmptyStateSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -24,3 +24,4 @@ export { type BlogPost } from './components/blog/Post.js';
|
|
|
24
24
|
export { type getTags } from './components/blog/blogService.js';
|
|
25
25
|
export { getPosts } from './components/blog/blogService.js';
|
|
26
26
|
export { Tree } from '@keenmate/svelte-treeview';
|
|
27
|
+
export { default as EmptyState } from './components/content/EmptyState.svelte';
|
package/dist/index.js
CHANGED
|
@@ -23,3 +23,4 @@ export {} from './components/blog/Post.js';
|
|
|
23
23
|
export {} from './components/blog/blogService.js';
|
|
24
24
|
export { getPosts } from './components/blog/blogService.js';
|
|
25
25
|
export { Tree } from '@keenmate/svelte-treeview';
|
|
26
|
+
export { default as EmptyState } from './components/content/EmptyState.svelte';
|