@alexandregme/zljs 3.13.0 → 3.13.2
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/CHANGELOG.md +10 -1
- package/dist/{chunk-EBJF4GLR.js → chunk-ZB76FFTW.js} +33 -12
- package/dist/index.js +1 -1
- package/dist/next/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,14 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.13.1] - 2026-11-12
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- The open panels of `TopNav`, the menu and the account, showed under what a page layers on itself, such as a filter over a map. They are now `z-40`, so a page can layer its own content up to `z-30` under them
|
|
16
|
+
- `Modal` showed under anything with a `z-index`, such as the account panel of `TopNav` the logout modal opens from. It is now `z-50`, over the page and the panels
|
|
17
|
+
- `Loader` is now `z-60`, so it still covers an open modal
|
|
18
|
+
|
|
11
19
|
## [3.13.0] - 2026-11-12
|
|
12
20
|
|
|
13
21
|
### Changed
|
|
@@ -522,7 +530,8 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
522
530
|
|
|
523
531
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
524
532
|
|
|
525
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.13.
|
|
533
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.13.1...HEAD
|
|
534
|
+
[3.13.1]: https://github.com/alexandregme/zljs/compare/v3.13.0...v3.13.1
|
|
526
535
|
[3.13.0]: https://github.com/alexandregme/zljs/compare/v3.11.0...v3.13.0
|
|
527
536
|
[3.11.0]: https://github.com/alexandregme/zljs/compare/v3.10.0...v3.11.0
|
|
528
537
|
[3.10.0]: https://github.com/alexandregme/zljs/compare/v3.9.0...v3.10.0
|
|
@@ -251,10 +251,10 @@ import * as Dialog from "@radix-ui/react-dialog";
|
|
|
251
251
|
// core/modal/modal.styles.ts
|
|
252
252
|
import { tv as tv4 } from "tailwind-variants";
|
|
253
253
|
var overlay = tv4({
|
|
254
|
-
base: "fixed inset-0 bg-black/50"
|
|
254
|
+
base: "fixed inset-0 z-50 bg-black/50"
|
|
255
255
|
});
|
|
256
256
|
var content = tv4({
|
|
257
|
-
base: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-lg shadow-lg p-6 w-full focus:outline-none max-h-[90vh] overflow-y-auto",
|
|
257
|
+
base: "fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2 rounded-lg shadow-lg p-6 w-full focus:outline-none max-h-[90vh] overflow-y-auto",
|
|
258
258
|
variants: {
|
|
259
259
|
size: {
|
|
260
260
|
xs: "max-w-xs",
|
|
@@ -852,7 +852,7 @@ var Sidebar = ({
|
|
|
852
852
|
};
|
|
853
853
|
|
|
854
854
|
// core/top-nav/top-nav.tsx
|
|
855
|
-
import { useState as useState2 } from "react";
|
|
855
|
+
import { useEffect, useRef, useState as useState2 } from "react";
|
|
856
856
|
|
|
857
857
|
// core/top-nav/top-nav.styles.ts
|
|
858
858
|
import { tv as tv9 } from "tailwind-variants";
|
|
@@ -868,10 +868,11 @@ var topNav = tv9({
|
|
|
868
868
|
// Takes what the two buttons leave, with the home link in the middle of it.
|
|
869
869
|
home: "flex min-w-0 flex-1 justify-center",
|
|
870
870
|
// Over the page, under the bar, as wide as the screen. It scrolls when the
|
|
871
|
-
// links don't fit in what is left of the screen.
|
|
872
|
-
|
|
871
|
+
// links don't fit in what is left of the screen. `z-40` puts it over what
|
|
872
|
+
// the page layers on itself (a filter over a map), and under a modal.
|
|
873
|
+
menu: "absolute inset-x-0 top-full z-40 max-h-[calc(100dvh-3.5rem)] divide-y divide-neutral-600/50 overflow-y-auto border-t border-neutral-600/50 bg-neutral-800 shadow-lg",
|
|
873
874
|
section: "grid gap-1 p-2",
|
|
874
|
-
account: "absolute inset-x-0 top-full z-
|
|
875
|
+
account: "absolute inset-x-0 top-full z-40 flex items-center gap-3 border-t border-neutral-600/50 bg-neutral-800 p-3 shadow-lg",
|
|
875
876
|
// Text takes no className, so the cut of a long name or email is set from here.
|
|
876
877
|
user: "flex min-w-0 flex-1 flex-col text-white [&>*]:truncate"
|
|
877
878
|
}
|
|
@@ -892,7 +893,27 @@ var TopNav = ({
|
|
|
892
893
|
onLogout
|
|
893
894
|
}) => {
|
|
894
895
|
const [open, setOpen] = useState2(null);
|
|
896
|
+
const pressedInside = useRef(false);
|
|
895
897
|
const styles = topNav();
|
|
898
|
+
useEffect(() => {
|
|
899
|
+
if (!open) {
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
pressedInside.current = false;
|
|
903
|
+
const closeOnPressOutside = () => {
|
|
904
|
+
if (!pressedInside.current) {
|
|
905
|
+
setOpen(null);
|
|
906
|
+
}
|
|
907
|
+
pressedInside.current = false;
|
|
908
|
+
};
|
|
909
|
+
document.addEventListener("pointerdown", closeOnPressOutside);
|
|
910
|
+
return () => {
|
|
911
|
+
document.removeEventListener("pointerdown", closeOnPressOutside);
|
|
912
|
+
};
|
|
913
|
+
}, [open]);
|
|
914
|
+
const markPressInside = () => {
|
|
915
|
+
pressedInside.current = true;
|
|
916
|
+
};
|
|
896
917
|
const hasLinks = sections.some((section2) => section2.items.length > 0);
|
|
897
918
|
const menuOpen = open === "menu";
|
|
898
919
|
const accountOpen = open === "account";
|
|
@@ -906,7 +927,7 @@ var TopNav = ({
|
|
|
906
927
|
const close = () => {
|
|
907
928
|
setOpen(null);
|
|
908
929
|
};
|
|
909
|
-
return /* @__PURE__ */ jsxs6("header", { className: styles.base(), children: [
|
|
930
|
+
return /* @__PURE__ */ jsxs6("header", { className: styles.base(), onPointerDown: markPressInside, children: [
|
|
910
931
|
/* @__PURE__ */ jsxs6("div", { className: styles.bar(), children: [
|
|
911
932
|
hasLinks ? /* @__PURE__ */ jsx11(
|
|
912
933
|
Button,
|
|
@@ -984,7 +1005,7 @@ var TopNav = ({
|
|
|
984
1005
|
};
|
|
985
1006
|
|
|
986
1007
|
// features/toaster/components/toaster/toaster.tsx
|
|
987
|
-
import { useEffect } from "react";
|
|
1008
|
+
import { useEffect as useEffect2 } from "react";
|
|
988
1009
|
import { Toaster as SonnerToaster, toast } from "sonner";
|
|
989
1010
|
|
|
990
1011
|
// features/toaster/components/toaster/toaster.styles.ts
|
|
@@ -1017,7 +1038,7 @@ var Toaster = () => {
|
|
|
1017
1038
|
const toasts = useToastStore((s) => s.toasts);
|
|
1018
1039
|
const removeToast = useToastStore((s) => s.removeToast);
|
|
1019
1040
|
const { toast: toastStyles, closeButton } = toaster();
|
|
1020
|
-
|
|
1041
|
+
useEffect2(() => {
|
|
1021
1042
|
toasts.forEach((t) => {
|
|
1022
1043
|
toast[t.type](t.message, { id: `store-${t.id}` });
|
|
1023
1044
|
removeToast(t.id);
|
|
@@ -1076,7 +1097,7 @@ var Spinner = ({
|
|
|
1076
1097
|
// features/app/components/loader/loader.styles.ts
|
|
1077
1098
|
import { tv as tv12 } from "tailwind-variants";
|
|
1078
1099
|
var loader = tv12({
|
|
1079
|
-
base: "flex fixed inset-0 justify-center items-center bg-black/20 text-zl-primary z-
|
|
1100
|
+
base: "flex fixed inset-0 justify-center items-center bg-black/20 text-zl-primary z-60"
|
|
1080
1101
|
});
|
|
1081
1102
|
|
|
1082
1103
|
// features/app/components/loader/loader.tsx
|
|
@@ -1364,7 +1385,7 @@ var AccessPending = ({
|
|
|
1364
1385
|
};
|
|
1365
1386
|
|
|
1366
1387
|
// features/auth/components/auth-provider/auth-provider.tsx
|
|
1367
|
-
import { useEffect as
|
|
1388
|
+
import { useEffect as useEffect3 } from "react";
|
|
1368
1389
|
import { Fragment as Fragment5, jsx as jsx19 } from "react/jsx-runtime";
|
|
1369
1390
|
var AuthProvider = ({
|
|
1370
1391
|
adapter,
|
|
@@ -1374,7 +1395,7 @@ var AuthProvider = ({
|
|
|
1374
1395
|
const configure = useAuthStore((s) => s.configure);
|
|
1375
1396
|
const setSession = useAuthStore((s) => s.setSession);
|
|
1376
1397
|
const reset = useAuthStore((s) => s.reset);
|
|
1377
|
-
|
|
1398
|
+
useEffect3(() => {
|
|
1378
1399
|
configure(adapter, appId);
|
|
1379
1400
|
const unsubscribe = adapter.onSessionChange(setSession);
|
|
1380
1401
|
return () => {
|
package/dist/index.js
CHANGED
package/dist/next/index.js
CHANGED