@r2digisolutions/ui 0.26.2 → 0.26.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.
@@ -4,18 +4,29 @@
4
4
  import CardHeader from './CardHeader.svelte';
5
5
 
6
6
  const { children, footer, header, onclick, body_class, ...props }: Props = $props();
7
+
8
+ const isInteractive = $derived(typeof onclick === 'function');
9
+ const Tag = $derived(isInteractive ? 'button' : 'article');
7
10
  </script>
8
11
 
9
12
  <svelte:element
10
- this={onclick ? 'button' : 'article'}
13
+ this={Tag}
11
14
  {...props}
12
- role="button"
13
- type={onclick ? 'button' : undefined}
14
- tabindex="0"
15
- aria-label="Card"
16
15
  {onclick}
16
+ type={isInteractive ? 'button' : undefined}
17
+ role={isInteractive ? 'button' : undefined}
18
+ tabindex={isInteractive ? 0 : undefined}
19
+ data-interactive={isInteractive}
17
20
  class={[
18
- 'rounded-3xl border border-white/50 bg-white text-black shadow-sm backdrop-blur-xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-white',
21
+ 'relative flex flex-col overflow-hidden rounded-2xl border text-sm',
22
+ 'border-neutral-200/80 bg-white/80 text-neutral-900 shadow-sm shadow-black/5 backdrop-blur-xl',
23
+ 'dark:border-neutral-800/80 dark:bg-neutral-950/80 dark:text-neutral-50',
24
+
25
+ isInteractive &&
26
+ 'cursor-pointer transition-all duration-150 hover:-translate-y-px hover:border-neutral-300 hover:shadow-md hover:shadow-black/10 dark:hover:border-neutral-600',
27
+ isInteractive &&
28
+ 'focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent focus-visible:outline-none',
29
+
19
30
  props.class
20
31
  ]}
21
32
  >
@@ -1,25 +1,44 @@
1
1
  <script lang="ts">
2
2
  import type { Props } from './type.js';
3
-
4
3
  const { title, subtitle, children, icon: Icon, ...props }: Props = $props();
5
4
  </script>
6
5
 
7
- <div class={['w-full py-20 text-center', props.class]}>
6
+ <div
7
+ class={[
8
+ 'flex w-full flex-col items-center justify-center px-4 py-20 text-center',
9
+ 'rounded-2xl border border-neutral-200/80 bg-white/70 shadow-sm shadow-black/5 backdrop-blur-md',
10
+ 'dark:border-neutral-800/80 dark:bg-neutral-950/80',
11
+ props.class
12
+ ]}
13
+ >
8
14
  {#if Icon}
9
15
  <div
10
- class={[
11
- 'mx-auto mb-6 flex h-24 w-24 items-center justify-center rounded-full bg-gradient-to-br from-blue-100 to-purple-100'
12
- ]}
16
+ class="mx-auto mb-6 flex h-24 w-24 items-center justify-center rounded-full
17
+ bg-linear-to-br from-indigo-100 via-purple-100 to-blue-100
18
+ shadow-inner ring-1 shadow-white/40
19
+ ring-white/40 ring-inset dark:from-indigo-900/30
20
+ dark:via-purple-900/30 dark:to-blue-900/30 dark:shadow-black/20 dark:ring-white/5"
13
21
  >
14
- <Icon class="h-12 w-12 text-gray-400" />
22
+ <Icon
23
+ class="h-12 w-12 text-neutral-400 opacity-90 transition-transform duration-300 group-hover:scale-105 dark:text-neutral-500"
24
+ />
15
25
  </div>
16
26
  {/if}
17
- <h3 class="text-2xl font-bold text-gray-900">{title}</h3>
18
- <p class="text-md mx-auto max-w-md text-gray-500">
19
- {subtitle}
20
- </p>
27
+
28
+ <h3
29
+ class="text-xl font-semibold tracking-tight text-neutral-900 md:text-2xl dark:text-neutral-50"
30
+ >
31
+ {title}
32
+ </h3>
33
+
34
+ {#if subtitle}
35
+ <p class="mx-auto mt-2 max-w-md text-sm text-neutral-600 md:text-base dark:text-neutral-400">
36
+ {subtitle}
37
+ </p>
38
+ {/if}
39
+
21
40
  {#if children}
22
- <div class="mt-4 flex items-center justify-center gap-4">
41
+ <div class="mt-6 flex flex-wrap items-center justify-center gap-3">
23
42
  {@render children?.()}
24
43
  </div>
25
44
  {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.26.2",
3
+ "version": "0.26.4",
4
4
  "private": false,
5
5
  "packageManager": "bun@1.3.2",
6
6
  "publishConfig": {