@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.
- package/dist/DynamicIcon.svelte +0 -1
- package/dist/Icon.svelte +22 -5
- package/dist/Icon.svelte.d.ts +1 -1
- package/dist/IconBase.svelte +0 -1
- package/package.json +1 -1
package/dist/DynamicIcon.svelte
CHANGED
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
|
-
//
|
|
32
|
-
|
|
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}
|
package/dist/Icon.svelte.d.ts
CHANGED
|
@@ -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;
|
package/dist/IconBase.svelte
CHANGED