@r2digisolutions/ui 0.21.3 → 0.21.4
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.
- package/dist/components/ui/Card/Card.svelte +8 -8
- package/dist/components/ui/Card/CardContent.svelte +11 -3
- package/dist/components/ui/Card/CardContent.svelte.d.ts +8 -10
- package/dist/components/ui/Card/CardFooter.svelte +12 -2
- package/dist/components/ui/Card/CardFooter.svelte.d.ts +7 -3
- package/dist/components/ui/Card/CardHeader.svelte +10 -2
- package/dist/components/ui/Card/CardHeader.svelte.d.ts +7 -3
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Props } from './type.js';
|
|
3
|
+
import CardFooter from './CardFooter.svelte';
|
|
4
|
+
import CardHeader from './CardHeader.svelte';
|
|
3
5
|
|
|
4
|
-
const { children, footer, header, onclick, ...props }: Props = $props();
|
|
6
|
+
const { children, footer, header, onclick, body_class, ...props }: Props = $props();
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<svelte:element
|
|
@@ -18,20 +20,18 @@
|
|
|
18
20
|
]}
|
|
19
21
|
>
|
|
20
22
|
{#if header}
|
|
21
|
-
<
|
|
23
|
+
<CardHeader>
|
|
22
24
|
{@render header()}
|
|
23
|
-
</
|
|
25
|
+
</CardHeader>
|
|
24
26
|
{/if}
|
|
25
27
|
|
|
26
|
-
<section class={['flex flex-1 flex-col',
|
|
28
|
+
<section class={['flex flex-1 flex-col', body_class]}>
|
|
27
29
|
{@render children()}
|
|
28
30
|
</section>
|
|
29
31
|
|
|
30
32
|
{#if footer}
|
|
31
|
-
<
|
|
32
|
-
class="flex justify-between rounded-b-xl border-t border-gray-200 bg-gray-50 p-3 pt-2 dark:border-neutral-700 dark:bg-neutral-800"
|
|
33
|
-
>
|
|
33
|
+
<CardFooter>
|
|
34
34
|
{@render footer()}
|
|
35
|
-
</
|
|
35
|
+
</CardFooter>
|
|
36
36
|
{/if}
|
|
37
37
|
</svelte:element>
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
children: Snippet;
|
|
7
|
+
class?: ClassValue;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { children, ...props }: Props = $props();
|
|
3
11
|
</script>
|
|
4
12
|
|
|
5
|
-
<div class=
|
|
13
|
+
<div class={['flex flex-1 flex-col p-3', props.class]}>
|
|
6
14
|
{@render children()}
|
|
7
15
|
</div>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
|
+
interface Props {
|
|
4
|
+
children: Snippet;
|
|
5
|
+
class?: ClassValue;
|
|
6
|
+
}
|
|
7
|
+
declare const CardContent: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type CardContent = ReturnType<typeof CardContent>;
|
|
1
9
|
export default CardContent;
|
|
2
|
-
type CardContent = {
|
|
3
|
-
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
-
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
-
};
|
|
6
|
-
declare const CardContent: import("svelte").Component<{
|
|
7
|
-
children: any;
|
|
8
|
-
}, {}, "">;
|
|
9
|
-
type $$ComponentProps = {
|
|
10
|
-
children: any;
|
|
11
|
-
};
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
children: Snippet;
|
|
7
|
+
class?: ClassValue;
|
|
8
|
+
}
|
|
9
|
+
const { children, ...props }: Props = $props();
|
|
3
10
|
</script>
|
|
4
11
|
|
|
5
12
|
<footer
|
|
6
|
-
class=
|
|
13
|
+
class={[
|
|
14
|
+
'flex justify-between rounded-b-xl border-t border-gray-200 bg-gray-50 p-3 pt-2 dark:border-neutral-700 dark:bg-neutral-800',
|
|
15
|
+
props.class
|
|
16
|
+
]}
|
|
7
17
|
>
|
|
8
18
|
{@render children()}
|
|
9
19
|
</footer>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
|
+
interface Props {
|
|
4
|
+
children: Snippet;
|
|
5
|
+
class?: ClassValue;
|
|
6
|
+
}
|
|
7
|
+
declare const CardFooter: import("svelte").Component<Props, {}, "">;
|
|
4
8
|
type CardFooter = ReturnType<typeof CardFooter>;
|
|
5
9
|
export default CardFooter;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
children: Snippet;
|
|
7
|
+
class?: ClassValue;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { children, ...props }: Props = $props();
|
|
3
11
|
</script>
|
|
4
12
|
|
|
5
|
-
<header class=
|
|
13
|
+
<header class={['flex flex-row gap-2 p-3 pb-2', props.class]}>
|
|
6
14
|
{@render children()}
|
|
7
15
|
</header>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
|
+
interface Props {
|
|
4
|
+
children: Snippet;
|
|
5
|
+
class?: ClassValue;
|
|
6
|
+
}
|
|
7
|
+
declare const CardHeader: import("svelte").Component<Props, {}, "">;
|
|
4
8
|
type CardHeader = ReturnType<typeof CardHeader>;
|
|
5
9
|
export default CardHeader;
|