@alexandregme/zljs 3.12.1 → 3.13.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/CHANGELOG.md +17 -1
- package/dist/{chunk-TMUYZTIH.js → chunk-H4EDTEZB.js} +13 -8
- package/dist/index.d.ts +4 -1
- 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,20 @@ 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
|
+
|
|
19
|
+
## [3.13.0] - 2026-11-12
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `TopNav` doesn't show the menu button when no section has a link, such as with `sections={[]}`: there was nothing for it to open. The home link stays in the middle of the bar. It is for an app that reaches its pages another way, such as tabs at the bottom, and wants only the name of the app and the account at the top. `Navigation` on a small screen follows it
|
|
24
|
+
|
|
11
25
|
## [3.11.0] - 2026-11-12
|
|
12
26
|
|
|
13
27
|
### Added
|
|
@@ -516,7 +530,9 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
516
530
|
|
|
517
531
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
518
532
|
|
|
519
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.
|
|
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
|
|
535
|
+
[3.13.0]: https://github.com/alexandregme/zljs/compare/v3.11.0...v3.13.0
|
|
520
536
|
[3.11.0]: https://github.com/alexandregme/zljs/compare/v3.10.0...v3.11.0
|
|
521
537
|
[3.10.0]: https://github.com/alexandregme/zljs/compare/v3.9.0...v3.10.0
|
|
522
538
|
[3.9.0]: https://github.com/alexandregme/zljs/compare/v3.8.0...v3.9.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",
|
|
@@ -862,13 +862,17 @@ var topNav = tv9({
|
|
|
862
862
|
// bar under the notch of a phone.
|
|
863
863
|
base: "relative shrink-0 bg-neutral-800 pt-[env(safe-area-inset-top)] text-neutral-300",
|
|
864
864
|
bar: "flex h-14 items-center gap-1 px-2",
|
|
865
|
+
// As wide as the menu button it stands in for, so the home link stays in
|
|
866
|
+
// the middle of the bar.
|
|
867
|
+
spacer: "size-10 shrink-0",
|
|
865
868
|
// Takes what the two buttons leave, with the home link in the middle of it.
|
|
866
869
|
home: "flex min-w-0 flex-1 justify-center",
|
|
867
870
|
// Over the page, under the bar, as wide as the screen. It scrolls when the
|
|
868
|
-
// links don't fit in what is left of the screen.
|
|
869
|
-
|
|
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",
|
|
870
874
|
section: "grid gap-1 p-2",
|
|
871
|
-
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",
|
|
872
876
|
// Text takes no className, so the cut of a long name or email is set from here.
|
|
873
877
|
user: "flex min-w-0 flex-1 flex-col text-white [&>*]:truncate"
|
|
874
878
|
}
|
|
@@ -890,6 +894,7 @@ var TopNav = ({
|
|
|
890
894
|
}) => {
|
|
891
895
|
const [open, setOpen] = useState2(null);
|
|
892
896
|
const styles = topNav();
|
|
897
|
+
const hasLinks = sections.some((section2) => section2.items.length > 0);
|
|
893
898
|
const menuOpen = open === "menu";
|
|
894
899
|
const accountOpen = open === "account";
|
|
895
900
|
const menuIcon = menuOpen ? "X" : "Menu";
|
|
@@ -904,7 +909,7 @@ var TopNav = ({
|
|
|
904
909
|
};
|
|
905
910
|
return /* @__PURE__ */ jsxs6("header", { className: styles.base(), children: [
|
|
906
911
|
/* @__PURE__ */ jsxs6("div", { className: styles.bar(), children: [
|
|
907
|
-
/* @__PURE__ */ jsx11(
|
|
912
|
+
hasLinks ? /* @__PURE__ */ jsx11(
|
|
908
913
|
Button,
|
|
909
914
|
{
|
|
910
915
|
color: "ghost",
|
|
@@ -914,7 +919,7 @@ var TopNav = ({
|
|
|
914
919
|
"aria-expanded": menuOpen,
|
|
915
920
|
onClick: toggleMenu
|
|
916
921
|
}
|
|
917
|
-
),
|
|
922
|
+
) : /* @__PURE__ */ jsx11("span", { "aria-hidden": "true", className: styles.spacer() }),
|
|
918
923
|
/* @__PURE__ */ jsx11("div", { className: styles.home(), children: homeHref && /* @__PURE__ */ jsxs6(
|
|
919
924
|
Link,
|
|
920
925
|
{
|
|
@@ -1072,7 +1077,7 @@ var Spinner = ({
|
|
|
1072
1077
|
// features/app/components/loader/loader.styles.ts
|
|
1073
1078
|
import { tv as tv12 } from "tailwind-variants";
|
|
1074
1079
|
var loader = tv12({
|
|
1075
|
-
base: "flex fixed inset-0 justify-center items-center bg-black/20 text-zl-primary z-
|
|
1080
|
+
base: "flex fixed inset-0 justify-center items-center bg-black/20 text-zl-primary z-60"
|
|
1076
1081
|
});
|
|
1077
1082
|
|
|
1078
1083
|
// features/app/components/loader/loader.tsx
|
package/dist/index.d.ts
CHANGED
|
@@ -328,7 +328,10 @@ interface TabsProps {
|
|
|
328
328
|
declare const Tabs: ({ tabs, "aria-label": ariaLabel, defaultTab, onChange, }: TabsProps) => react.JSX.Element;
|
|
329
329
|
|
|
330
330
|
interface TopNavProps {
|
|
331
|
-
/**
|
|
331
|
+
/**
|
|
332
|
+
* The same sections `Sidebar` takes. The menu button opens them. With no
|
|
333
|
+
* link in any section, the menu button isn't shown.
|
|
334
|
+
*/
|
|
332
335
|
sections: SidebarSection[];
|
|
333
336
|
/** The same user `Sidebar` takes. The account button shows it. */
|
|
334
337
|
user: SidebarUser;
|
package/dist/index.js
CHANGED
package/dist/next/index.js
CHANGED