@r2digisolutions/ui 0.26.1 → 0.26.3

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,6 +1,6 @@
1
1
  export declare const STYLES: {
2
2
  SHELL: string;
3
- SHELL_TRANSPARENT: "backdrop-blur-xl ring-1 ring-neutral-200/80 dark:ring-neutral-800/80 shadow-xs shadow-black/10 bg-white/95";
3
+ SHELL_TRANSPARENT: "backdrop-blur-xl ring-1 ring-neutral-200/80 dark:ring-neutral-800/80 shadow-xs shadow-black/10 bg-white/95 dark:bg-neutral-950/20";
4
4
  SHELL_ROUNDED: string;
5
5
  INPUT_SHELL: string;
6
6
  ITEM_BASE: "flex items-center rounded-xl px-2 py-1.5 select-none transition shadow-none ring-1 ring-transparent border border-transparent";
@@ -1,5 +1,5 @@
1
- const SHELL_TRANSPARENT = "backdrop-blur-xl ring-1 ring-neutral-200/80 dark:ring-neutral-800/80 shadow-xs shadow-black/10 bg-white/95";
2
- const SHELL = 'bg-white/95 dark:bg-neutral-950/95 ' + SHELL_TRANSPARENT;
1
+ const SHELL_TRANSPARENT = "backdrop-blur-xl ring-1 ring-neutral-200/80 dark:ring-neutral-800/80 shadow-xs shadow-black/10 bg-white/95 dark:bg-neutral-950/20";
2
+ const SHELL = 'bg-white/95 dark:!bg-neutral-950/95 ' + SHELL_TRANSPARENT;
3
3
  const ACCENT_GRADIENT = 'from-indigo-500 via-violet-500 to-blue-500';
4
4
  const LOCAL_STYLES = {
5
5
  SHELL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.26.1",
3
+ "version": "0.26.3",
4
4
  "private": false,
5
5
  "packageManager": "bun@1.3.2",
6
6
  "publishConfig": {