@cahyo-dimas/freeday 1.51.0 → 1.51.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 CHANGED
@@ -3,6 +3,33 @@
3
3
  Semua perubahan penting dicatat di sini. Format longgar mengikuti
4
4
  [Keep a Changelog](https://keepachangelog.com/); tiap versi = git tag.
5
5
 
6
+ ## [1.51.1] — 2026-08-24
7
+ ### Docs
8
+ - **`COMPONENTS.md` never said whether two overlays may be open at once** (#046). Modal and Drawer
9
+ were documented in isolation, so "can a confirm modal open over an open drawer?" had no answer in
10
+ the file — and the built CSS does not answer it either: the only overlay `z-index` in the bundle
11
+ belongs to the toast region. Both entries now state the rule, because both components are
12
+ `<dialog>` opened with `showModal()` and therefore enter the **top layer**, where paint order is
13
+ the order they were opened: the later modal is above the drawer with no `z-index` from either,
14
+ Escape closes the topmost first (so cancelling returns to the still-open drawer), and closing them
15
+ out of order leaves the survivor painted and dismissible.
16
+ - **The one caveat is the browser's, and it is now written down**: open each overlay from the
17
+ gesture that asked for it. A `showModal()` with no user activation — from a timer, or after an
18
+ `await` that outlived the click — has its close watcher GROUPED with the dialog below it, and a
19
+ single Escape then closes both. Measured, not assumed: two untrusted `.click()` opens, one Escape,
20
+ both dialogs shut.
21
+ ### Added — guards
22
+ - `browser/overlay-stack.mjs` (3 tests) proves that paragraph instead of restating it — the #041
23
+ lesson applied to a documentation change. Paint order is asserted in **pixels** at the overlap of
24
+ the two, because a modal dialog makes the rest of the document inert and `elementFromPoint` will
25
+ name the dialog whatever is really on top; the overlays are opened with **trusted** clicks, or the
26
+ close-watcher grouping above would fail the Escape assertion for a reason that is not the kit's.
27
+ - **`pressKey` in the browser harness sent every key but Tab with virtual-key code 0** — delivered
28
+ to the page, but not acted on by the browser: Escape reached a `keydown` listener yet never closed
29
+ a native `<dialog>`. A dismissal guard written with it would have passed for the wrong reason and
30
+ reported a broken kit as fine. It now carries the real `windowsVirtualKeyCode` /
31
+ `nativeVirtualKeyCode` for the keys the suite presses.
32
+
6
33
  ## [1.51.0] — 2026-08-21
7
34
  ### Fixed
8
35
  - **A cartesian chart's axis text and dots grew with the container** (#042). `renderCartesian` built
package/COMPONENTS.md CHANGED
@@ -1049,6 +1049,18 @@ painted on top of a modal, because it will tell you the dialog is, even when it
1049
1049
  `__close`. The body scrolls; the footer never clips. `aria-labelledby` → the title's `id`;
1050
1050
  `data-close` on any button that should close it.
1051
1051
 
1052
+ **Stacking two overlays is supported.** Modal and drawer are both `<dialog>` opened with
1053
+ `showModal()`, so both enter the top layer and paint in the order they were opened — a confirm
1054
+ modal opened from inside an open drawer paints **above** it, and neither needs a `z-index` for
1055
+ that. Escape closes the topmost first, so cancelling returns to the still-open drawer; a second
1056
+ Escape then closes the drawer. Closing them out of order is fine too: closing the drawer while the
1057
+ modal is up leaves the modal open, painted and dismissible.
1058
+
1059
+ One caveat, and it is the browser's rather than the kit's: **open each overlay from the gesture
1060
+ that asked for it.** A `showModal()` that runs with no user activation — from a timer, or after an
1061
+ `await` that outlived the click — has its close watcher grouped with the dialog below it, and then
1062
+ a single Escape closes both at once instead of the topmost only.
1063
+
1052
1064
  ## Drawer — `.fdy-drawer`
1053
1065
  > **Typed wrapper: `<FdyDrawer>`** — Vue (`:open` + `@close`) · React (`open` + `onClose`) · Blazor (`@bind-Open`). In those stacks use the wrapper; the markup below is for stacks without an adapter (and is what the wrapper renders).
1054
1066
 
@@ -1056,6 +1068,11 @@ Temporary side panel on native `<dialog>` — left by default, `--right` to flip
1056
1068
  `__title` `__body` `__footer` `__close`. Open it from any
1057
1069
  `<button data-fdy-drawer="<dialog id>">`. Needs `freeday-drawer.js`.
1058
1070
 
1071
+ Opened with `showModal()`, so it is in the **top layer** on the same terms as the modal — including
1072
+ opening a modal over an open drawer, which is supported and described under
1073
+ [Modal → *Stacking two overlays*](#modal--fdy-modal). It slides in on `transform` and never animates
1074
+ opacity: wait on its position, not on `opacity`, if you need to know when it has arrived.
1075
+
1059
1076
  ## Accordion — `.fdy-accordion`
1060
1077
  Native `<details>`, zero JS: `.fdy-accordion__item` on each `<details>`, content in
1061
1078
  `.fdy-accordion__panel`, the trigger is the `<summary>`.
package/README.id.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > **Lebih banyak _free day_ buat dev — UI kit-nya sudah siap pakai.**
6
6
 
7
7
  [![Live docs](https://img.shields.io/badge/docs-live-2050d8?style=flat-square)](https://cahyo-dimas.github.io/freeday-ui-kit/)
8
- [![Release](https://img.shields.io/badge/release-v1.51.0-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.51.0)
8
+ [![Release](https://img.shields.io/badge/release-v1.51.1-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.51.1)
9
9
 
10
10
  UI KIT yang token-driven & framework-agnostic — satu sumber kebenaran untuk warna, tipografi,
11
11
  spasi, dan komponen. Blueprint: `docs/superpowers/specs/2026-07-21-freeday-ui-kit-design.md`.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > **More free days for devs — the UI kit is ready to use.**
6
6
 
7
7
  [![Live docs](https://img.shields.io/badge/docs-live-2050d8?style=flat-square)](https://cahyo-dimas.github.io/freeday-ui-kit/)
8
- [![Release](https://img.shields.io/badge/release-v1.51.0-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.51.0)
8
+ [![Release](https://img.shields.io/badge/release-v1.51.1-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.51.1)
9
9
 
10
10
  A token-driven, framework-agnostic UI kit — one source of truth for color, typography,
11
11
  spacing, and components. Blueprint: `docs/superpowers/specs/2026-07-21-freeday-ui-kit-design.md`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cahyo-dimas/freeday",
3
- "version": "1.51.0",
3
+ "version": "1.51.1",
4
4
  "description": "Freeday — token-driven, framework-agnostic UI KIT (design source-of-truth).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -92,7 +92,7 @@
92
92
  "scripts": {
93
93
  "build": "node tokens/build.mjs",
94
94
  "test": "node --test",
95
- "test:browser": "node --test browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/text-override.mjs browser/control-heights.mjs browser/cfl-multi.mjs browser/crowding.mjs browser/over-dialog.mjs browser/chart-scale.mjs",
95
+ "test:browser": "node --test browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/text-override.mjs browser/control-heights.mjs browser/cfl-multi.mjs browser/crowding.mjs browser/over-dialog.mjs browser/chart-scale.mjs browser/overlay-stack.mjs",
96
96
  "prepack": "node tokens/build.mjs",
97
97
  "version": "node tokens/build.mjs && git add dist",
98
98
  "typecheck:react": "tsc -p adapters/react/tsconfig.json --noEmit"