@luminescent/ui-qwik 6.1.2 → 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.
package/lib/index.qwik.cjs
CHANGED
|
@@ -685,8 +685,18 @@ const Menu = qwik.component$(({ size, ...props }) => {
|
|
|
685
685
|
]
|
|
686
686
|
});
|
|
687
687
|
});
|
|
688
|
-
const Nav = qwik.component$(({ fixed, floating, noblur, nohamburger, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
688
|
+
const Nav = qwik.component$(({ fixed, floating, noblur, nohamburger, nodismiss, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
689
689
|
const menu = qwik.useSignal(false);
|
|
690
|
+
qwik.useTask$(({ track }) => {
|
|
691
|
+
track(() => menu.value);
|
|
692
|
+
if (menu.value && !nodismiss) {
|
|
693
|
+
const onClick = () => {
|
|
694
|
+
menu.value = false;
|
|
695
|
+
window.removeEventListener("click", onClick);
|
|
696
|
+
};
|
|
697
|
+
window.addEventListener("click", onClick);
|
|
698
|
+
}
|
|
699
|
+
});
|
|
690
700
|
return /* @__PURE__ */ jsxRuntime.jsxs("nav", {
|
|
691
701
|
...props,
|
|
692
702
|
class: {
|
|
@@ -1073,12 +1083,17 @@ const Toggle = qwik.component$(({ checkbox, round, ...props }) => {
|
|
|
1073
1083
|
});
|
|
1074
1084
|
const Hoverable = {
|
|
1075
1085
|
onMouseMove$: (e, el) => {
|
|
1076
|
-
const
|
|
1077
|
-
const
|
|
1078
|
-
|
|
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)`;
|
|
1079
1093
|
},
|
|
1080
|
-
onMouseLeave$: (
|
|
1081
|
-
el.style.
|
|
1094
|
+
onMouseLeave$: (_e, el) => {
|
|
1095
|
+
el.style.transition = "transform 0.3s ease-out";
|
|
1096
|
+
el.style.transform = "perspective(500px) rotateX(0deg) rotateY(0deg)";
|
|
1082
1097
|
}
|
|
1083
1098
|
};
|
|
1084
1099
|
const LogoBirdflop = qwik.component$(({ confused, fillGradient, size, ...props }) => {
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import { component$, Slot, useStore, $, useSignal, useStyles$ } from "@builder.io/qwik";
|
|
2
|
+
import { component$, Slot, useStore, $, useSignal, useTask$, useStyles$ } from "@builder.io/qwik";
|
|
3
3
|
const Link = component$(({ size, ...props }) => {
|
|
4
4
|
return /* @__PURE__ */ jsxs("svg", {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -683,8 +683,18 @@ const Menu = component$(({ size, ...props }) => {
|
|
|
683
683
|
]
|
|
684
684
|
});
|
|
685
685
|
});
|
|
686
|
-
const Nav = component$(({ fixed, floating, noblur, nohamburger, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
686
|
+
const Nav = component$(({ fixed, floating, noblur, nohamburger, nodismiss, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
687
687
|
const menu = useSignal(false);
|
|
688
|
+
useTask$(({ track }) => {
|
|
689
|
+
track(() => menu.value);
|
|
690
|
+
if (menu.value && !nodismiss) {
|
|
691
|
+
const onClick = () => {
|
|
692
|
+
menu.value = false;
|
|
693
|
+
window.removeEventListener("click", onClick);
|
|
694
|
+
};
|
|
695
|
+
window.addEventListener("click", onClick);
|
|
696
|
+
}
|
|
697
|
+
});
|
|
688
698
|
return /* @__PURE__ */ jsxs("nav", {
|
|
689
699
|
...props,
|
|
690
700
|
class: {
|
|
@@ -1071,12 +1081,17 @@ const Toggle = component$(({ checkbox, round, ...props }) => {
|
|
|
1071
1081
|
});
|
|
1072
1082
|
const Hoverable = {
|
|
1073
1083
|
onMouseMove$: (e, el) => {
|
|
1074
|
-
const
|
|
1075
|
-
const
|
|
1076
|
-
|
|
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)`;
|
|
1077
1091
|
},
|
|
1078
|
-
onMouseLeave$: (
|
|
1079
|
-
el.style.
|
|
1092
|
+
onMouseLeave$: (_e, el) => {
|
|
1093
|
+
el.style.transition = "transform 0.3s ease-out";
|
|
1094
|
+
el.style.transform = "perspective(500px) rotateX(0deg) rotateY(0deg)";
|
|
1080
1095
|
}
|
|
1081
1096
|
};
|
|
1082
1097
|
const LogoBirdflop = component$(({ confused, fillGradient, size, ...props }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luminescent/ui-qwik",
|
|
3
|
-
"version": "6.1
|
|
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.1
|
|
53
|
+
"@luminescent/ui": "6.2.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "qwik build",
|