@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.
@@ -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
- <header class="flex flex-row p-6 pb-2">
23
+ <CardHeader>
22
24
  {@render header()}
23
- </header>
25
+ </CardHeader>
24
26
  {/if}
25
27
 
26
- <section class={['flex flex-1 flex-col', props.body_class]}>
28
+ <section class={['flex flex-1 flex-col', body_class]}>
27
29
  {@render children()}
28
30
  </section>
29
31
 
30
32
  {#if footer}
31
- <footer
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
- </footer>
35
+ </CardFooter>
36
36
  {/if}
37
37
  </svelte:element>
@@ -1,7 +1,15 @@
1
- <script>
2
- const { children } = $props();
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="flex flex-1 flex-col gap-2 p-6">
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
- const { children } = $props();
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="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"
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
- declare const CardFooter: import("svelte").Component<{
2
- children: any;
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
- const { children } = $props();
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="flex flex-row gap-2">
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
- declare const CardHeader: import("svelte").Component<{
2
- children: any;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "private": false,
5
5
  "packageManager": "bun@1.2.19",
6
6
  "publishConfig": {