@zazz-ui/core 0.6.1 → 0.6.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/AUTHORING.md +1 -1
- package/CHANGELOG.md +21 -0
- package/README.md +4 -4
- package/dist/sri.json +6 -6
- package/dist/zazz.css +1 -1
- package/editor/zazz.css-data.json +2028 -0
- package/editor/zazz.language-data.json +15 -3
- package/package.json +1 -1
- package/src/base/_reset.css +9 -17
- package/src/base/_variables.css +4 -0
- package/src/primitives/badge/badge.css +61 -111
- package/src/primitives/badge/badge.html +5 -0
- package/src/primitives/button/button.css +55 -53
- package/src/primitives/button/button.html +4 -0
- package/src/primitives/callout/callout.css +35 -10
package/AUTHORING.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Authoring markup with Zazz 0.5
|
|
1
|
+
# Authoring markup with Zazz (0.5 and later)
|
|
2
2
|
|
|
3
3
|
How to write HTML for the Zazz kit: identities, presets, slots, and style utilities. This is the single source for humans, editor rules, and AI assistants. The contract behind it is `SPEC.md`; the vocabulary is `CONTEXT.md`.
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
Notable changes to `@zazz-ui/core`, grouped by primitive or base scope under each version. The grouping is load-bearing: the `zazz-ui` CLI's `update` and `diff` print only the slice that touches the files you've vendored. Breaking entries are flagged **BREAKING** with a one-line migration note. During 0.x, a minor bump means at least one breaking entry (ADR-0010 has the full definition of "breaking").
|
|
2
2
|
|
|
3
|
+
## 0.6.2 (2026-10-12)
|
|
4
|
+
|
|
5
|
+
### base
|
|
6
|
+
|
|
7
|
+
- **BREAKING** The text-selection highlight is the `--color-selection` / `--color-selection-foreground` role pair (default: `--color-primary` / `--color-primary-foreground`), an opaque fill with its own text color. It replaces the `--selection-bg` hook on `html` (a 30% primary tint) and the `contrast-color()` text that went with it. Migration: rename `--selection-bg` to `--color-selection`, give it an opaque color, and set `--color-selection-foreground` to a text color with enough contrast on it; set both on `:root`. Shipped in a patch on purpose, as an exception to the 0.x contract (ADR-0010 makes a custom-property removal a minor): the alpha has few installs, and the selection highlight is the only thing it changes.
|
|
8
|
+
|
|
9
|
+
### button
|
|
10
|
+
|
|
11
|
+
- The info, success, warning, and destructive variants are soft: the status color at 10% alpha (20% in dark mode) as the surface, and the status hue as the text with its lightness clamped (at most 0.45 in light, at least 0.82 in dark) so it holds WCAG AA, 4.5:1, on the tint over the page or a card. A deeper tint on hover and press, no border, and the status color as the focus ring. The solid fills they replace fell below 4.5:1 with white text in light mode (info 4.1:1, success 3.8:1, warning 3.2:1). To keep a solid destructive button (white on `--color-destructive` holds 4.8:1), drop the variant and set the hooks on the button: `--ui-button-bg`, `--ui-button-bg--hover`, `--ui-button-text`, `--ui-button-text--hover`, and `--ui-button-border-color: transparent`. A variant's colors take precedence over the hooks, so the hooks do nothing alongside `data-button-variant`.
|
|
12
|
+
- `--ui-button-leading` defaults to `1` instead of `--leading-sm`. Set the hook to `var(--leading-sm)` to keep the old line height.
|
|
13
|
+
|
|
14
|
+
### badge
|
|
15
|
+
|
|
16
|
+
- The info, success, warning, and destructive variants match the buttons: the same soft status colors, no border. Destructive was solid; it now matches the other three.
|
|
17
|
+
- Badges are a little smaller: `--ui-badge-h` is `calc(var(--spacing) * 5)` (was `5.5`) and `--ui-badge-px` is `calc(var(--spacing) * 1.25)` (was `1.5`). Set the hooks back to keep the old size.
|
|
18
|
+
- The `link` variant matches the link button: plain text that turns primary on hover, with no underline and no hover offset.
|
|
19
|
+
|
|
20
|
+
### callout
|
|
21
|
+
|
|
22
|
+
- The status variants use the same soft status colors and keep their faint status border. Destructive was solid; it now matches the other three.
|
|
23
|
+
|
|
3
24
|
## 0.6.1 (2026-10-12)
|
|
4
25
|
|
|
5
26
|
### base
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Zazz is a CSS and vanilla JavaScript UI kit that does not require a build step.
|
|
|
4
4
|
|
|
5
5
|
Docs: <https://zazz.sh> (guides, a [quick start](https://zazz.sh/docs/quick-start/), and an [API reference](https://zazz.sh/api/) generated from this package's data).
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**Zazz is in alpha (0.6).** The markup contract can change in any minor release before 1.0, and 0.5 and later are not compatible with 0.4; see [`CHANGELOG.md`](./CHANGELOG.md) for every breaking change and its migration note.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ import "@zazz-ui/core"; // custom elements and shared behaviors
|
|
|
20
20
|
From a CDN, the script needs an import map for its dependencies and the Interest Invokers polyfill:
|
|
21
21
|
|
|
22
22
|
```html
|
|
23
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.6.
|
|
23
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.6.2/dist/zazz.css" />
|
|
24
24
|
<script type="importmap">
|
|
25
25
|
{
|
|
26
26
|
"imports": {
|
|
@@ -36,7 +36,7 @@ From a CDN, the script needs an import map for its dependencies and the Interest
|
|
|
36
36
|
type="module"
|
|
37
37
|
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
38
38
|
></script>
|
|
39
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.6.
|
|
39
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.6.2/dist/zazz.js"></script>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Use an exact version in CDN URLs. The [installation guide](https://zazz.sh/docs/install/installation/) has the complete `<head>`, with fonts, the theme script, a per-primitive variant, and integrity hashes on every URL; `buildHead({ cdn: { version } })` from `@zazz-ui/core/head` returns the same markup. Each release also includes `dist/sri.json` with the SHA-384 hash of every published file.
|
|
@@ -112,7 +112,7 @@ pnpm exec playwright install chromium
|
|
|
112
112
|
|
|
113
113
|
Zazz targets the latest Chrome, Firefox, and Safari, two versions back. Features below that floor are feature-detected with a polyfill or a graceful fallback where practical. The kit leans on modern CSS (cascade layers, container style queries, subgrid, `light-dark()`), so older browsers get a degraded but functional experience rather than a pixel-perfect one.
|
|
114
114
|
|
|
115
|
-
The head loads exactly one polyfill: `invokers/interest`, for Interest Invokers (`interestfor`), which is Chromium-only and drives tooltip triggers. Everything else the kit builds on
|
|
115
|
+
The head loads exactly one polyfill: `invokers/interest`, for Interest Invokers (`interestfor`), which is Chromium-only and drives tooltip triggers. Everything else the kit builds on (the Popover API, Invoker Commands, native `<dialog>`, `<details>`) is native across the floor. One gap gets a fallback instead of a polyfill: Safari supports `<dialog closedby>` but not its `any` value, so the dialog script closes a `closedby="any"` dialog on a backdrop tap there. CSS anchor positioning is below the floor and is gated behind `@supports` with a UA-centered fallback.
|
|
116
116
|
|
|
117
117
|
## Package layout
|
|
118
118
|
|
package/dist/sri.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dist/scroll-state-C8mA5gq6.js": "sha384-m9uzgIAkSnk8Es+jgCbChIYFu4rPyr00IB7lrAR/8dcsPc3u75VA7Wq5LIEAvXpT",
|
|
3
|
-
"dist/zazz.css": "sha384
|
|
3
|
+
"dist/zazz.css": "sha384-+ugqJmeaJJnE5K9Mm9KwpGy8FRfV5FcFgMC9pwiZQnQvqBg6Ie91eQh9uBoNGxDC",
|
|
4
4
|
"dist/zazz.js": "sha384-c4tP3H9BECv043jZndOARCngZfcQT5nivRXtERoht68hqwKxkEh+Xcmpz2+Uga2i",
|
|
5
5
|
"src/base/_breakpoints.css": "sha384-vsvdoL+ZjTa5gyCiMp4DlNIbr9rxkLqfQjZ+W3YTp2Apuuu+1/Dd68ACtcBOip3v",
|
|
6
6
|
"src/base/_layers.css": "sha384-5DNbucvN9usFbR5WoM9jF0TkR+sHzIxz3IMOWIWIRSe46yec/ZNTk3OE/OKSdLJZ",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"src/base/_properties-stuck.css": "sha384-/su2OhTygGTODEX4a7bHW+UQaoBbAg/OLZ2GJewPwywLAvPBBc7fgPu0Bkj01+6T",
|
|
21
21
|
"src/base/_properties-xl.css": "sha384-phoaLWHnnCTvIEJeHAW40CAM/koin8EbDApNo22U8q0z32uoHeRSwH2CDhuWiHB/",
|
|
22
22
|
"src/base/_properties.css": "sha384-u0dJNC0jQX2vOvNT78gNpbNHWDZ4Mwx9E8wh1RnAWyqrja2Xxi0cZ/VWuo0kjGrU",
|
|
23
|
-
"src/base/_reset.css": "sha384-
|
|
23
|
+
"src/base/_reset.css": "sha384-yy3858X2KRndBB3iVxs7AWpDjDcX3YZr3X5rtRTR95cX35+joh5bdTHL2ONB2X5e",
|
|
24
24
|
"src/base/_switches.css": "sha384-sGwuSg/A2io3VXsZDzLtawKjhcH2fg0NkvIejLCx4kGsM5QQXZmLyoWz+MvPWlCH",
|
|
25
25
|
"src/base/_typography.css": "sha384-dK5YewnVGNuq8EZk7fAC9IweAn/f9VmumHMA8VZQ2KLX4LrxbwWm34bcny1vhinp",
|
|
26
26
|
"src/base/_utilities-box.css": "sha384-eodP3OPkvsLqO1k73C2cw8twdBTvQ9CeniCKaLHx8fsd7aichCo7q6MMjUEk31lV",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"src/base/_utilities-tier-stuck.css": "sha384-C2V8xg0LSv5F8eQ/s7HuniKgGgehObFZ/BelfVAdAg0bKmrZ3vQPVZ3Gs/FyBMnx",
|
|
49
49
|
"src/base/_utilities-tier-xl.css": "sha384-N5Cm3O4tdycFHd8qGTFSThflShEfPNDSiGN11OraCfnTbGKVtgHCXWuvmalAe6kX",
|
|
50
50
|
"src/base/_utilities-typography.css": "sha384-Qea11V9YQlDGC/5NOHPSWvlNuQJEz/EFCQtvwVRoa2AN/LdlFoy2DqEF9VgjdfZz",
|
|
51
|
-
"src/base/_variables.css": "sha384-
|
|
51
|
+
"src/base/_variables.css": "sha384-avm/99WesRG9GYS2AKRudFn0dhVjw80XfJQ3xgs9unhMiXrD7pKkVvMJzrzu8Jw6",
|
|
52
52
|
"src/base/_view-transitions.css": "sha384-0aNEjsjVLNa3+6y7ektne0C4vgbjg4Sg1m1vY6PCB6ysRbwyqngfy/D5b+BAsYWY",
|
|
53
53
|
"src/base/command-score.js": "sha384-o8BNVjYP6YWyVnMBzMJdBanMFwhsYbp3HsBK4FSYa32A2cWTwI79hm0dBo4z+ZW0",
|
|
54
54
|
"src/base/dialog-lifecycle.js": "sha384-4Bskp0XQUtf2Rz7PIOfTnvj5MPPuyeNNdBKoDwAdub0Lo/chTQmUcLlsXXfc8+Ky",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"src/primitives/alert-dialog/alert-dialog.css": "sha384-4E+JekkG+6cMsj89lI9TSOb5w52mG8dxCncKWd19GLiUydvhCiBzBzTn2LI9CxM9",
|
|
72
72
|
"src/primitives/autocomplete/autocomplete.css": "sha384-6cOSg97IKnshQi1udOlwbwzcq7JnzqlS9QDTTiyPVwdqA60oqxeFuSqWKg3lEbri",
|
|
73
73
|
"src/primitives/autocomplete/autocomplete.js": "sha384-WI2uVoam+LtX3ze2XI9XEQIlLULGg/I1hVlb54zGKcgEiYIjtNcmNO69Age4SmuV",
|
|
74
|
-
"src/primitives/badge/badge.css": "sha384-
|
|
74
|
+
"src/primitives/badge/badge.css": "sha384-E7X4QaidUQ6m/LVRfdFLKJDefbKqX2EWb6wdaVx9qb13oWKNejn7TK1kMvTrPhQO",
|
|
75
75
|
"src/primitives/button-group/button-group.css": "sha384-zELHeHhwdftZ7Rm6i5ttYJZSNOnI62pFul+mG1ICCKlkBGtBRi4UmpZUiHvRnsnV",
|
|
76
|
-
"src/primitives/button/button.css": "sha384-
|
|
77
|
-
"src/primitives/callout/callout.css": "sha384-
|
|
76
|
+
"src/primitives/button/button.css": "sha384-k1C8x3wdX13bkC55kFe9pDiSIUMa21l7qdWp8iGhHY/F3KVb+LxG1r0rkv12wFfD",
|
|
77
|
+
"src/primitives/callout/callout.css": "sha384-Ki2VvC4a/DqBs3VrpDObZRf8TzsbF4BTG/1WTP7X51WzIRVWJXGJKXZK6X6GVMIa",
|
|
78
78
|
"src/primitives/card/card.css": "sha384-VJYsOOkus0R1N8s4NjlGf9wX7Tql6hs8tSCv7wpY4baT9ANTv3R6MJXYo8vuTXNB",
|
|
79
79
|
"src/primitives/carousel/carousel.css": "sha384-6nLbkvD1z68YFv7MUsFoVOUbd9qdL05J/gbBpKVhURS67wXvgDCwfnjJG9scsR3S",
|
|
80
80
|
"src/primitives/carousel/carousel.js": "sha384-1CD4+KGm/93D3ZTAXc16NYIoC15M/nFeSHuAJdHQAoVU1bCx6Mn5JsITdEg4VEqH",
|