@genarou/blazir-icons 1.1.2 → 1.1.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.
@@ -19,7 +19,6 @@
19
19
  });
20
20
  </script>
21
21
 
22
- // 📁 src/lib/DynamicIcon.svelte - Componente que usa el registry
23
22
  {#if IconComponent}
24
23
  <IconComponent {...iconProps} />
25
24
  {:else}
package/dist/Icon.svelte CHANGED
@@ -23,15 +23,27 @@
23
23
  titleId = $bindable(""),
24
24
  testId = $bindable(undefined),
25
25
  attrs = $bindable({}),
26
+ animationDuration = $bindable(undefined),
27
+ animationDelay = $bindable(undefined),
28
+ animationEasing = $bindable(undefined),
29
+ ...restProps
26
30
  }: { name: IconName } & Partial<IconProps> = $props();
27
31
 
28
- // Componente dinámico
29
32
  const Comp = $derived(iconRegistry[name]);
30
33
 
31
- // Props a pasar - con lógica mejorada para color
32
- const passProps: Partial<IconProps> = $derived({
34
+ // Normalizar valores de animación
35
+ function normalizeAnimationValue(
36
+ value: number | string | undefined
37
+ ): string | undefined {
38
+ if (typeof value === "number") {
39
+ return `${value}ms`;
40
+ }
41
+ return value;
42
+ }
43
+
44
+ // Props a pasar - obteniendo valores directamente, no funciones derivadas
45
+ const passProps = $derived(() => ({
33
46
  size,
34
- // Si se pasa color, override fill y stroke para asegurar que funcione
35
47
  color,
36
48
  stroke: color ? (stroke ?? "none") : stroke,
37
49
  fill: color ? (fill ?? color) : fill,
@@ -49,7 +61,12 @@
49
61
  titleId,
50
62
  testId,
51
63
  attrs,
52
- });
64
+ // Normalizar las propiedades de animación
65
+ animationDuration: normalizeAnimationValue(animationDuration),
66
+ animationDelay: normalizeAnimationValue(animationDelay),
67
+ animationEasing,
68
+ ...restProps,
69
+ }));
53
70
  </script>
54
71
 
55
72
  {#if Comp}
@@ -3,6 +3,6 @@ import type { IconProps } from "./types";
3
3
  type $$ComponentProps = {
4
4
  name: IconName;
5
5
  } & Partial<IconProps>;
6
- declare const Icon: import("svelte").Component<$$ComponentProps, {}, "size" | "stroke" | "strokeWidth" | "fill" | "className" | "ariaLabel" | "title" | "rotate" | "flipH" | "flipV" | "spin" | "color" | "nonScalingStroke" | "preserveAspectRatio" | "decorative" | "titleId" | "testId" | "attrs">;
6
+ declare const Icon: import("svelte").Component<$$ComponentProps, {}, "size" | "stroke" | "strokeWidth" | "fill" | "className" | "ariaLabel" | "title" | "rotate" | "flipH" | "flipV" | "spin" | "color" | "nonScalingStroke" | "preserveAspectRatio" | "decorative" | "titleId" | "testId" | "attrs" | "animationDuration" | "animationDelay" | "animationEasing">;
7
7
  type Icon = ReturnType<typeof Icon>;
8
8
  export default Icon;
@@ -55,7 +55,6 @@
55
55
  );
56
56
  </script>
57
57
 
58
- // 📁 src/lib/Icon.svelte
59
58
  <svg
60
59
  xmlns="http://www.w3.org/2000/svg"
61
60
  width={typeof common.size === "number" ? `${common.size}px` : common.size}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genarou/blazir-icons",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {