@r2digisolutions/ui 0.13.1 → 0.13.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.
@@ -14,7 +14,7 @@
14
14
  }: Props = $props();
15
15
 
16
16
  const baseClasses =
17
- 'inline-flex items-center justify-center font-semibold rounded-md transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2 transform hover:scale-[1.02] active:scale-[0.98] shadow-sm hover:shadow-md';
17
+ 'inline-flex items-center justify-center font-semibold rounded-md transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2 transform hover:scale-[1.02] active:scale-[0.98] shadow-sm hover:shadow-md cursor-pointer';
18
18
 
19
19
  const variantClasses: Record<typeof variant, string> = {
20
20
  primary:
@@ -51,15 +51,15 @@
51
51
  '8xl': 'px-11 py-3 text-base gap-3'
52
52
  };
53
53
 
54
- const classes: ClassValue = [
54
+ const classes: ClassValue = $derived([
55
55
  baseClasses,
56
56
  variantClasses[variant],
57
57
  sizeClasses[size],
58
58
  disabled || isLoading ? 'opacity-50 cursor-not-allowed transform-none hover:scale-100' : '',
59
59
  props.class
60
- ];
60
+ ]);
61
61
 
62
- const Tag = props.href ? 'a' : 'button';
62
+ const Tag = $derived(props.href ? 'a' : 'button');
63
63
  </script>
64
64
 
65
65
  <svelte:element this={Tag} {...props} class={classes} disabled={disabled || isLoading}>
@@ -4,7 +4,7 @@ import type { Snippet } from "svelte";
4
4
  export type TButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'gradient' | 'danger' | 'success' | 'warning' | 'info';
5
5
  export type TButtonType = 'submit' | 'reset' | 'button';
6
6
  export interface Props extends IBaseProps {
7
- onclick?: () => void;
7
+ onclick?: (event: MouseEvent) => void;
8
8
  variant?: TButtonVariant;
9
9
  size?: TSize;
10
10
  isLoading?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "private": false,
5
5
  "packageManager": "bun@1.2.18",
6
6
  "publishConfig": {