@alexandregme/zljs 1.18.1 → 1.19.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 +21 -1
- package/dist/{chunk-KPSFYQYV.js → chunk-O6UAZGBC.js} +18 -5
- package/dist/index.d.ts +2 -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,25 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.19.0] - 2026-11-02
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `label` on `Spinner`: the name screen readers announce, `Loading` by default
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `Spinner` is a status with a name (`role="status"`) and has no color of its own. It was always white, and now inherits the color from around it
|
|
20
|
+
- `Loader` draws its spinner in the `primary` color, which holds 3:1 over the overlay on a white page. It was white, at 1.6:1. The `status` role moved from the overlay to the spinner, which takes the `label`
|
|
21
|
+
|
|
22
|
+
#### Migration
|
|
23
|
+
|
|
24
|
+
Search the app for `<Spinner`. On a dark surface, set a light text color around it, such as `text-white`. Remove a `role="status"` the app put around a `Spinner`, so there aren't two. `Loader` needs no change.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- `Loader` covers the whole page. It had no position of its own, so it started where it was rendered, below anything before it
|
|
29
|
+
|
|
11
30
|
## [1.18.1] - 2026-11-02
|
|
12
31
|
|
|
13
32
|
### Removed
|
|
@@ -263,7 +282,8 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
263
282
|
|
|
264
283
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
265
284
|
|
|
266
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v1.
|
|
285
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v1.19.0...HEAD
|
|
286
|
+
[1.19.0]: https://github.com/alexandregme/zljs/compare/v1.18.1...v1.19.0
|
|
267
287
|
[1.18.1]: https://github.com/alexandregme/zljs/compare/v1.18.0...v1.18.1
|
|
268
288
|
[1.18.0]: https://github.com/alexandregme/zljs/compare/v1.17.0...v1.18.0
|
|
269
289
|
[1.17.0]: https://github.com/alexandregme/zljs/compare/v1.16.0...v1.17.0
|
|
@@ -352,17 +352,30 @@ var spinnerIcons = {
|
|
|
352
352
|
// core/spinner/spinner.styles.ts
|
|
353
353
|
import { tv as tv4 } from "tailwind-variants";
|
|
354
354
|
var spinner = tv4({
|
|
355
|
-
base: "inline-flex animate-spin
|
|
355
|
+
base: "inline-flex animate-spin"
|
|
356
356
|
});
|
|
357
357
|
|
|
358
358
|
// core/spinner/spinner.tsx
|
|
359
359
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
360
|
-
var Spinner = ({
|
|
360
|
+
var Spinner = ({
|
|
361
|
+
variant = "circle",
|
|
362
|
+
size = "md",
|
|
363
|
+
label = "Loading"
|
|
364
|
+
}) => /* @__PURE__ */ jsx6(
|
|
365
|
+
"span",
|
|
366
|
+
{
|
|
367
|
+
"data-testid": "spinner",
|
|
368
|
+
role: "status",
|
|
369
|
+
"aria-label": label,
|
|
370
|
+
className: spinner(),
|
|
371
|
+
children: /* @__PURE__ */ jsx6(Icon, { name: spinnerIcons[variant], size })
|
|
372
|
+
}
|
|
373
|
+
);
|
|
361
374
|
|
|
362
375
|
// core/loader/loader.styles.ts
|
|
363
376
|
import { tv as tv5 } from "tailwind-variants";
|
|
364
|
-
var
|
|
365
|
-
base: "flex fixed justify-center items-center
|
|
377
|
+
var loader = tv5({
|
|
378
|
+
base: "flex fixed inset-0 justify-center items-center bg-black/20 text-zl-primary z-50"
|
|
366
379
|
});
|
|
367
380
|
|
|
368
381
|
// core/loader/loader.tsx
|
|
@@ -370,7 +383,7 @@ import { jsx as jsx7 } from "react/jsx-runtime";
|
|
|
370
383
|
var Loader = ({ label = "Loading" }) => {
|
|
371
384
|
const fetching = useAppStore((s) => s.fetching);
|
|
372
385
|
if (!fetching) return null;
|
|
373
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
386
|
+
return /* @__PURE__ */ jsx7("div", { className: loader(), children: /* @__PURE__ */ jsx7(Spinner, { size: "lg", label }) });
|
|
374
387
|
};
|
|
375
388
|
|
|
376
389
|
export {
|
package/dist/index.d.ts
CHANGED
|
@@ -431,9 +431,10 @@ type SpinnerVariant = "circle" | "dots" | "refresh";
|
|
|
431
431
|
interface SpinnerProps {
|
|
432
432
|
variant?: SpinnerVariant;
|
|
433
433
|
size?: Size;
|
|
434
|
+
label?: string;
|
|
434
435
|
}
|
|
435
436
|
|
|
436
|
-
declare const Spinner: ({ variant, size }: SpinnerProps) => react.JSX.Element;
|
|
437
|
+
declare const Spinner: ({ variant, size, label, }: SpinnerProps) => react.JSX.Element;
|
|
437
438
|
|
|
438
439
|
interface LoaderProps {
|
|
439
440
|
label?: string;
|
package/dist/index.js
CHANGED
package/dist/next/index.js
CHANGED