@luminescent/ui-qwik 6.2.0 → 6.2.1

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.
@@ -1083,12 +1083,17 @@ const Toggle = qwik.component$(({ checkbox, round, ...props }) => {
1083
1083
  });
1084
1084
  const Hoverable = {
1085
1085
  onMouseMove$: (e, el) => {
1086
- const mousex = e.clientX - el.getBoundingClientRect().left;
1087
- const mousey = e.clientY - el.getBoundingClientRect().top;
1088
- el.style.transform = `perspective(500px) rotateX(${(mousey / el.clientHeight - 0.5) * 10}deg) rotateY(${(mousex / el.clientWidth - 0.5) * 10}deg)`;
1086
+ const rect = el.getBoundingClientRect();
1087
+ const mouseX = e.clientX - rect.left;
1088
+ const mouseY = e.clientY - rect.top;
1089
+ const rotateX = (mouseY / rect.height - 0.5) * -10;
1090
+ const rotateY = (mouseX / rect.width - 0.5) * 10;
1091
+ el.style.transition = "transform 0.05s ease-out";
1092
+ el.style.transform = `perspective(500px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
1089
1093
  },
1090
- onMouseLeave$: (e, el) => {
1091
- el.style.transform = "rotateX(0deg) rotateY(0deg)";
1094
+ onMouseLeave$: (_e, el) => {
1095
+ el.style.transition = "transform 0.3s ease-out";
1096
+ el.style.transform = "perspective(500px) rotateX(0deg) rotateY(0deg)";
1092
1097
  }
1093
1098
  };
1094
1099
  const LogoBirdflop = qwik.component$(({ confused, fillGradient, size, ...props }) => {
@@ -1081,12 +1081,17 @@ const Toggle = component$(({ checkbox, round, ...props }) => {
1081
1081
  });
1082
1082
  const Hoverable = {
1083
1083
  onMouseMove$: (e, el) => {
1084
- const mousex = e.clientX - el.getBoundingClientRect().left;
1085
- const mousey = e.clientY - el.getBoundingClientRect().top;
1086
- el.style.transform = `perspective(500px) rotateX(${(mousey / el.clientHeight - 0.5) * 10}deg) rotateY(${(mousex / el.clientWidth - 0.5) * 10}deg)`;
1084
+ const rect = el.getBoundingClientRect();
1085
+ const mouseX = e.clientX - rect.left;
1086
+ const mouseY = e.clientY - rect.top;
1087
+ const rotateX = (mouseY / rect.height - 0.5) * -10;
1088
+ const rotateY = (mouseX / rect.width - 0.5) * 10;
1089
+ el.style.transition = "transform 0.05s ease-out";
1090
+ el.style.transform = `perspective(500px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
1087
1091
  },
1088
- onMouseLeave$: (e, el) => {
1089
- el.style.transform = "rotateX(0deg) rotateY(0deg)";
1092
+ onMouseLeave$: (_e, el) => {
1093
+ el.style.transition = "transform 0.3s ease-out";
1094
+ el.style.transform = "perspective(500px) rotateX(0deg) rotateY(0deg)";
1090
1095
  }
1091
1096
  };
1092
1097
  const LogoBirdflop = component$(({ confused, fillGradient, size, ...props }) => {
@@ -1,4 +1,4 @@
1
1
  export declare const Hoverable: {
2
2
  readonly onMouseMove$: (e: MouseEvent, el: HTMLElement) => void;
3
- readonly onMouseLeave$: (e: MouseEvent, el: HTMLElement) => void;
3
+ readonly onMouseLeave$: (_e: MouseEvent, el: HTMLElement) => void;
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminescent/ui-qwik",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "Luminescent UI library - Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",
@@ -50,7 +50,7 @@
50
50
  "vite-tsconfig-paths": "^5.1.4"
51
51
  },
52
52
  "peerDependencies": {
53
- "@luminescent/ui": "6.2.0"
53
+ "@luminescent/ui": "6.2.1"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "qwik build",