@alexandregme/zljs 3.9.0 → 3.11.0
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 +40 -1
- package/dist/{chunk-JMEGXQKC.js → chunk-XRJCFNLC.js} +354 -289
- package/dist/index.d.ts +61 -19
- package/dist/index.js +98 -53
- package/dist/next/index.d.ts +9 -2
- package/dist/next/index.js +18 -47
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,43 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.11.0] - 2026-11-12
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `variant` on `Link`: `inline`, the default, is the link as it was, and `nav` is a row of a menu, 40px tall, with no underline and a translucent background on hover that works on a light or a dark surface
|
|
16
|
+
- `active` on `Link`, which marks the link to the current page with `aria-current="page"`, and gives a `nav` link a background
|
|
17
|
+
- `aria-label` on `Link`, the name of a link whose children have no text, such as only an icon
|
|
18
|
+
- The type `LinkVariant`
|
|
19
|
+
- `onSignOut` on `SignOutButton`: the app's own function, called when the user confirms in the modal, instead of the adapter of `AuthProvider`. With it the button needs no `AuthProvider`, so an app whose auth doesn't come from zljs can use it. A function that throws or rejects shows the `errorMessage` toast
|
|
20
|
+
- `logout` on `Sidebar`, the texts of its logout button and of the modal it opens: `label`, `confirmTitle`, `confirmLabel`, `cancelLabel` and `errorMessage`, all with English defaults
|
|
21
|
+
- `navLabel` and `expandLabel` on `Sidebar`, the accessible names of the navigation and of the collapse button while collapsed. They were fixed in English, and those are now the defaults: `Main navigation` and `Expand sidebar`
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The logout button of `Sidebar` is a `SignOutButton`. A click opens a modal that asks first, and `onLogout` is called only when the user confirms. `onLogout` may return a promise, and one that rejects shows an error toast, so the app needs a `Toaster`. The default name of the button is `Sign out`, it was `Logout`
|
|
26
|
+
- The links of `Sidebar` are `Link` with `variant="nav"`. Their text takes the color of the sidebar, also on hover and when active, where it was gray and turned white. Collapsed, the labels are no longer rendered, where they faded out, and each link keeps its name
|
|
27
|
+
- `SignOutButton` takes the color of the text around it, so it works on a dark surface. It was gray
|
|
28
|
+
- The collapse button of `Sidebar` always has an `aria-label`: `collapseLabel` while expanded, `expandLabel` while collapsed
|
|
29
|
+
|
|
30
|
+
#### Migration
|
|
31
|
+
|
|
32
|
+
- A test of the app that finds the logout button of `Sidebar` by the name `Logout`: the name is now `Sign out`, or what the app passes in `logout.label`. To keep the old name, pass `logout={{ label: "Logout" }}`
|
|
33
|
+
- A test that clicks the logout button and expects `onLogout` to be called: also click the confirm button of the modal, named `Sign out` by default
|
|
34
|
+
- An `onLogout` that asks for confirmation on its own, such as with `window.confirm`: remove the question, the modal already asks
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- `Sidebar` is as tall as the visible part of the screen (`100dvh`). It was `100vh`, which on a phone is taller than what the browser shows, so the collapse button ended up under the browser's bar
|
|
39
|
+
|
|
40
|
+
## [3.10.0] - 2026-11-12
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- `Tabs`, which splits a page into panels and shows one at a time. It takes `tabs`, each with an `id`, a `label`, its panel in `children`, and optionally a `subtitle` under the label and a `count` at the right edge of the tab, and an `aria-label` that names the list. `defaultTab` picks the tab selected at first, and `onChange` is called with the `id` of the tab the user selects. A border goes around the tabs and the panel. Only the selected panel is rendered, and the URL doesn't change. In a parent with a height, the panel fills what the list of tabs leaves
|
|
45
|
+
- The types `TabsProps` and `TabsItem`
|
|
46
|
+
- `@radix-ui/react-tabs` as a dependency
|
|
47
|
+
|
|
11
48
|
## [3.9.0] - 2026-11-12
|
|
12
49
|
|
|
13
50
|
### Changed
|
|
@@ -471,7 +508,9 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
471
508
|
|
|
472
509
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
473
510
|
|
|
474
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.
|
|
511
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.11.0...HEAD
|
|
512
|
+
[3.11.0]: https://github.com/alexandregme/zljs/compare/v3.10.0...v3.11.0
|
|
513
|
+
[3.10.0]: https://github.com/alexandregme/zljs/compare/v3.9.0...v3.10.0
|
|
475
514
|
[3.9.0]: https://github.com/alexandregme/zljs/compare/v3.8.0...v3.9.0
|
|
476
515
|
[3.8.0]: https://github.com/alexandregme/zljs/compare/v3.7.0...v3.8.0
|
|
477
516
|
[3.7.0]: https://github.com/alexandregme/zljs/compare/v3.6.0...v3.7.0
|