@cahyo-dimas/freeday 2.2.0 → 3.0.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 CHANGED
@@ -9,6 +9,183 @@ benar. Perubahan seperti itu ditulis di bawah `### Changed: BREAKING (types)`
9
9
  lama → tipe baru, dan cara menyempitkannya — bukan di bawah `### Added`, betapapun aditifnya dari
10
10
  sisi kit.
11
11
 
12
+ ## [3.0.0] - 2026-08-26
13
+
14
+ **Kenapa MAJOR padahal rilis ini seluruhnya aditif.** Tak ada satu pun perubahan di bawah yang
15
+ mematahkan konsumen: prop-nya opsional, class-nya baru, dan `fdy-step-before-change` tanpa listener
16
+ berperilaku persis seperti sebelumnya. Secara semver murni ini MINOR. Nomor mayor diambil sebagai
17
+ keputusan pemilik untuk **membuka lini adopsi back-office** yang dispesifikasikan di
18
+ [`docs/superpowers/specs/2026-08-26-back-office-adoption-design.md`](docs/superpowers/specs/2026-08-26-back-office-adoption-design.md):
19
+ delapan item, empat di antaranya terkirim di sini, dan **paruh yang benar-benar breaking masih di
20
+ depan** — sumbu `data-style` mengubah arti atribut yang sudah terdokumentasi, `FdyTableColumn`
21
+ melebar untuk edit sel, `FdyAppShell` mendapat mode nav baru. Konsumen 2.x bisa naik ke 3.0.0 tanpa
22
+ mengubah satu baris pun.
23
+
24
+ ### Added
25
+ - **Row selection terkontrol di keempat stack** (`NEXT-UP.md` #3). Enhancer vanilla sudah punya
26
+ `.fdy-table-bulkbar` + kolom pilih sejak awal; adapter typed tidak, jadi tiap layar list yang
27
+ butuh aksi massal merakit kolom checkbox sendiri di samping tabel terkontrol. Kini `selectable` +
28
+ `selectedKeys` di Vue/React/Blazor, ber-key `rowKey` — identitas yang sudah dipakai
29
+ `expandedKeys`, karena sebuah key selamat dari re-fetch yang mengganti seluruh objek baris,
30
+ sedangkan identitas objek tidak. Select-all menyentuh **halaman yang terlihat**, bukan seluruh
31
+ hasil filter: checkbox header yang diam-diam memilih baris yang tak bisa dilihat pembaca adalah
32
+ cara bulk delete jadi bencana. Key dari halaman lain dipertahankan, jadi hitungan di bulk bar
33
+ bisa lebih besar dari jumlah baris di layar — didokumentasikan, karena kalau tidak terbaca
34
+ seperti bug.
35
+ - **`.fdy-table--striped`** + prop `striped` di keempat adapter, plus token Tier-3
36
+ `--fdy-table-stripe`. Warnanya **setengah** langkah surface, bukan langkah penuh yang dipakai
37
+ hover: stripe dengan warna hover membuat hover tak terlihat di setiap baris genap. Kolom beku
38
+ ikut dicat ulang, karena sel beku membawa background opak sendiri.
39
+ - **`Freeday.busy()` / `Freeday.idle()`** — overlay yang menghalangi layar selama operasi yang tak
40
+ boleh diinterupsi. Imperatif seperti `toast()`, dan alasannya lebih tajam: API komponen mengundang
41
+ dua instans, dan dua scrim dengan dua caption dari dua komponen yang sama-sama merasa memiliki
42
+ layar adalah kegagalan yang komponen ini cegah. Bukan dialog — tak ada yang ditanyakan dan tak ada
43
+ yang bisa ditutup, jadi interaksi dicabut dengan `inert`, bukan dengan focus trap. Jeda default
44
+ 120 ms supaya operasi 80 ms tak mengedipkan scrim, dan `idle()` membatalkan tampilan yang masih
45
+ tertunda alih-alih menyembunyikannya setelah terlanjur terlihat.
46
+ - **Token semantic `--color-scrim`**, sengaja identik di light dan dark: scrim menggelapkan apa pun
47
+ di belakangnya, jadi ia tak ikut membalik bersama palet.
48
+ - **`.fdy-step__badge`** dan status `is-error` stepper yang **sudah ada di CSS tapi tak
49
+ terdokumentasi**, sehingga tak terjangkau siapa pun. Label kini ikut ke danger, dan badge memuat
50
+ jumlahnya — karena cincin merah bilang "ada sesuatu" dan tak mengatakan apa-apa kepada pembaca
51
+ yang tak bisa melihat merah. Badge adalah **saudara** marker, bukan anaknya: enhancer menulis
52
+ ulang `__marker.innerHTML` di tiap render.
53
+ - **`fdy-step-before-change`**, event cancelable yang membuat Lanjut bisa ditolak. Event saja tak
54
+ cukup — validasi biasanya sejauh satu round-trip — jadi handler bisa `preventDefault()` **atau**
55
+ menitipkan promise ke `detail.waitFor`. Selama promise itu tertunda kedua tombol nav dinonaktifkan
56
+ dan header membawa `aria-busy`. Menjawab apa pun selain `false` meneruskan (handler yang lupa
57
+ `return` bukan penolakan), dan guard yang **melempar** tak meneruskan apa pun karena ia tak
58
+ memutuskan apa pun. Mundur tak pernah ditanya; lompat maju ke langkah yang sudah dicapai ditanya.
59
+ **Cara validitas diputuskan tetap milik aplikasi** — kit tak berpendapat soal library form, dan
60
+ event inilah batasnya.
61
+ - **`FreedayBlazor.setIndeterminate`**, satu helper interop, karena `indeterminate` adalah properti
62
+ DOM tanpa atribut HTML: renderer Blazor tak bisa mengekspresikannya, dan halaman yang separuh
63
+ terpilih akan tampil polos "belum tercentang".
64
+ - **Mode nav overlay di layar lebar** — `.fdy-app--nav-overlay`, dan `navMode` di keempat adapter
65
+ (Blazor: enum `FdyNavMode`). Nav mengambang di atas konten alih-alih menggesernya, yaitu pilihan
66
+ yang selama ini hanya bisa terjadi di layar sempit. **Modifier ini mengubah tata letak, bukan
67
+ perilaku**: backdrop, Escape, tutup-saat-link-diikuti, fokus masuk-dan-kembali, `inert`, dan Tab
68
+ trap semuanya jalur kode drawer yang sudah ada — shell kini bertanya pada sebuah class, bukan pada
69
+ media query, sehingga layar lebar tak lagi berarti "kolom". Konsekuensinya melintasi breakpoint
70
+ **tidak** menutup panel yang mengambang di kedua sisi. `FreedayAppShell.refresh(root)` ditambahkan
71
+ untuk jalur mentah yang mengubah class itu sendiri.
72
+
73
+ - **Sumbu palet primary: `data-primary`, 18 pilihan.** `azure` (default) · `sky` `blue` `indigo`
74
+ `violet` `purple` `fuchsia` `pink` `rose` · `orange` `amber` `yellow` `lime` `green` `emerald`
75
+ `teal` `cyan` · `noir`. Dipasang di mana pun `data-theme` bisa, termasuk di wrapper untuk
76
+ me-rebrand satu region.
77
+
78
+ Yang di-redefinisi sebuah palet adalah **ramp alias delapan shade**, bukan token semantic-nya.
79
+ Pemetaan "shade mana yang jadi fill, mana hover, mana wash" ditulis **sekali** di `color.primary*`,
80
+ jadi palet yang salah memetakan salah satunya bukan bentuk yang bisa dihasilkan sistem ini — dan
81
+ `--color-primary`, `-hover`, `-active`, `-soft`, `-border`, `-strong` serta `--focus-ring`
82
+ semuanya ikut, di kedua tema, tanpa apa pun untuk disetel.
83
+
84
+ **Ke-18 dijaga gerbang kontras di kedua tema**: label di atas fill (AA 4.5), fill terhadap surface
85
+ dan cincin fokus (1.4.11, 3:1), dan `primary-strong` di atas wash-nya sendiri di atas ketiga
86
+ surface. 36 kombinasi, dan tiga hasilnya **dipaksa oleh pengukuran, bukan selera**: `yellow`
87
+ memakai fill lebih gelap di tema terang (di shade aslinya cuma 2.94:1 di atas putih, di bawah
88
+ ambang untuk sebuah fill UI) dan karena itu berlabel putih sementara semua palet hangat lain
89
+ berlabel gelap; `indigo` dan `violet` bergeser satu langkah lebih terang di tema gelap, karena di
90
+ shade tengahnya tak ada — putih maupun mendekati-hitam — yang mencapai 4.5:1. Ketiganya
91
+ didokumentasikan, karena tanpa penjelasan mereka terlihat seperti kekeliruan.
92
+
93
+ `noir` bukan hue: ia mengarahkan ramp alias ke ramp netral, jadi "primary" jadi mendekati hitam di
94
+ terang dan mendekati putih di gelap.
95
+
96
+ - **Sumbu gaya visual: `data-style="soft | glass"`.** `soft` default dan tampilan kit selama ini;
97
+ `glass` memfrost **permukaan terangkat** — card, modal, drawer, menu, appbar, sidebar & topbar app
98
+ shell. Dipasang di mana pun `data-theme` bisa, dan `[data-style="soft"]` adalah **rule sungguhan**,
99
+ jadi satu region bisa keluar dari root yang kaca. Sumbu ini menyerap toggle glass yang selama ini
100
+ jadi fitur terpisah di app konsumen: satu sumbu dua nilai, bukan empat kombinasi yang dua di
101
+ antaranya tak punya definisi visual.
102
+
103
+ Yang difrost adalah `--color-surface-raised`, **bukan `--color-surface`**: token itu juga isian
104
+ input, chip, sel tabel dan **kolom beku**, dan kolom beku yang tembus pandang memperlihatkan baris
105
+ yang menggulung di bawahnya. Komponen tak membawa selector `[data-style]` sama sekali; mereka
106
+ membaca tiga knob yang no-op di `soft` — `--color-surface-raised`, `--surface-filter`,
107
+ `--surface-inset`.
108
+
109
+ **Seberapa tembus kaca boleh jadi ditentukan gerbang kontras, bukan selera.** Di bawah `.82`
110
+ (terang) / `.90` (gelap), tinta muted dan `primary-strong` berhenti lolos 4.5:1 begitu panel
111
+ dikomposit di atas latar sembarang. Gerbangnya sengaja diuji terhadap **dua ekstrem — di atas hitam
112
+ dan di atas putih** — bukan terhadap warna halaman kit sendiri: versi pertama memakai warna halaman,
113
+ dan panel empat kali lebih tembus pun lolos, jadi gerbangnya nyaris hampa. Konsekuensinya jujur:
114
+ kaca di sini **halus**, dan frost yang terlihat datang dari blur-nya, bukan dari alpha-nya.
115
+
116
+ ### Fixed
117
+ - **`--color-surface-raised` tak ikut saat satu subtree di-gelapkan.** Custom property beralias
118
+ `var(--color-surface)` di-compute di tempat ia dideklarasikan, jadi tanpa nilai `$dark` sendiri ia
119
+ membeku pada permukaan terang dan sebuah `.fdy-card` di dalam panel `data-theme="dark"` tetap
120
+ mengecat terang. Ditangkap spec browser `theme.mjs` yang sudah ada, bukan oleh review.
121
+ - **`resolveValue` melewatkan referensi token di dalam ekspresi.** Pola lamanya mengikat seluruh
122
+ string, jadi `{primary.600}` di dalam `color-mix(...)` lolos mentah ke stylesheet sebagai teks
123
+ literal. Ketahuan saat wash `-soft` gelap diturunkan dari alias alih-alih memaku warna azure.
124
+ - **Gerbang kontras memipihkan alpha-nya sendiri.** Cabang `color-mix` mengembalikan `a: 1` apa pun
125
+ masukannya, jadi setiap wash `-soft` diuji seolah-olah opak — kekeliruan yang justru merupakan
126
+ hal yang pasangan `-soft` itu ada untuk menangkapnya, bersembunyi di dalam alatnya. Kini
127
+ premultiplied dan alpha-nya dibawa keluar.
128
+ - **`--focus-ring` menunjuk ramp brand langsung**, jadi cincin fokus akan tetap biru di aplikasi
129
+ yang memilih palet hijau. Kini ikut alias primary.
130
+ - **`CLAUDE.md` mengklaim `data-style` sudah ada.** Grep ke `src/`, `dist/` dan `tokens/`
131
+ mengembalikan nol: kit belum punya sumbu gaya sama sekali, dan `soft` adalah deskripsi tampilan,
132
+ bukan sebuah nilai. Spec `2026-07-21` §6 juga menyebut knob `--blur`/`--sat`/`--inset`
133
+ "dicadangkan, default no-op" — ketiganya tak pernah dibuat. Keduanya kini dikoreksi, karena klaim
134
+ palsu di dokumen menaikkan estimasi pekerjaan yang bergantung padanya.
135
+ - **`.fdy-busy__panel` disamakan dengan doktrin elevasi** (`USAGE.md`): panel di atas scrim adalah
136
+ kerabat modal, jadi `--shadow-lift`, bukan `--shadow-3` yang dipakai benda melayang di atas
137
+ halaman.
138
+ - **Backdrop app-shell menelan klik selama transisinya.** `visibility` adalah properti yang
139
+ di-transisi, jadi backdrop yang sedang menghilang tetap `visible` sepanjang durasinya dan terus
140
+ menangkap klik yang ditujukan ke topbar di bawahnya — dan masuk ke mode overlay lebih buruk lagi,
141
+ karena elemennya berpindah `display:none` → `display:block` dengan visibility beranimasi dari
142
+ `visible` bawaan, sehingga **sekadar mengganti mode memberi halaman ~200 ms klik mati**. Terukur:
143
+ `elementFromPoint` di atas tombol nav mengembalikan backdrop-nya. Kini `pointer-events:none`
144
+ selama tertutup, di jalur mobile maupun overlay. Spec app-shell yang lama sudah menyebut gejala
145
+ ini dan menyiasatinya dengan menunggu; ini menghapus sebabnya.
146
+ - **Backdrop mobile berhenti memakai warna mentah** (`rgba(8,10,20,.45)`), nilai kasar terakhir yang
147
+ tersisa di stylesheet komponen. Kini `--color-scrim`, jadi ia menggelap persis seperti overlay lain.
148
+
149
+ ### Guarded
150
+ - **Harness Blazor Server + prerender yang sungguhan** (`test/blazor-server/`, `npm run
151
+ test:blazor-server`) — host Blazor Server betulan, bukan double bUnit, digerakkan lewat CDP. bUnit
152
+ merender in-process dengan JS runtime tiruan, jadi setiap test Blazor selama ini **berangkat dari
153
+ dunia di mana interop sudah bekerja**; justru itu yang tak bisa menjawab `NEXT-UP` #2. **4/4
154
+ hijau**: prerender mengeluarkan markup penuh tanpa satu pun penanda hidrasi, enhancer hidrat begitu
155
+ circuit tersambung, `<dialog>` yang dibuka dari .NET benar-benar terbuka lalu tertutup Escape, dan
156
+ combo yang dipilih dengan mouse asli sampai ke binding .NET.
157
+
158
+ **Satu check sempat merah dan sempat dilaporkan sebagai cacat kit. Ia bukan cacat kit.** Enhancer
159
+ auto-init saat `DOMContentLoaded`, jadi mereka menstempel `data-fdy-*-ready` pada markup
160
+ **prerender yang sebentar lagi dibuang** Blazor ketika circuit tersambung. Test yang menunggu
161
+ penanda itu menunggu hal yang salah, dan klik-nya mendarat di node yang akan dilepas — persis
162
+ gejala "node dilepas, bukan fokus berpindah" yang terukur. Menunggu komponen benar-benar interaktif
163
+ membuatnya hijau, 3 dari 3 run. Pelajarannya tetap berlaku meski cacatnya tidak ada: **di bawah
164
+ prerendering, penanda hidrasi bisa benar tentang DOM yang tak punya masa depan.**
165
+ - 4 test node baru (invariant urutan stripe + warnanya), 11 test Chrome baru (selection lintas
166
+ halaman & non-aktivasi baris, `inert` yang mendarat **dan dilepas**, operasi cepat yang tak
167
+ melukis apa pun, guard stepper yang menolak), 7 test bUnit baru. **Setiap invariant diverifikasi
168
+ dengan mutasi**, bukan hanya dijalankan sekali.
169
+ - node 68 → 113 · browser 83 → 92 · bUnit 14 → 21 · **suite baru** blazor-server 4.
170
+
171
+ ### Fixed: the kit's own suite
172
+ - **A coordinate click now reaches its target on a window that is not the author's.** CI went red
173
+ on a **docs-only** commit — five lines of `HANDOFF.md` — with three unrelated specs failing at
174
+ once: the stretched card target, the app shell's wide toggle, and the Vue combo's mouse select.
175
+ All three click at coordinates. The tree that failed differs from the tree that passed by nothing
176
+ a browser can see, so the cause was the runner's window, not the commit: a target below the fold
177
+ is clicked where nobody can see it, `elementFromPoint` there is `null`, the click reaches nothing,
178
+ and the run reports whatever assertion came three lines later. `clickCenter` scrolls the target
179
+ into view before measuring, and refuses an empty point with an error naming the viewport and the
180
+ element's rect. Demonstrated on the real failure mode: with the target pushed below a 420×240
181
+ window the point is provably empty, and the click lands anyway.
182
+ - **`browser/harness-contract.mjs`** (2 tests) pins both halves, because a harness that quietly
183
+ stops clicking is the one bug the rest of the suite cannot report.
184
+ - An earlier attempt at this also rejected *intercepted* clicks and was reverted: `.fdy-btn--stretch`
185
+ covers its card through an `::after` pseudo-element that `getBoundingClientRect` cannot see, so
186
+ the check fired on two tests that were asserting exactly that behaviour. A check with false
187
+ positives on a documented pattern is worse than no check.
188
+
12
189
  ## [2.2.0] - 2026-08-26
13
190
  ### Added
14
191
  - **The raw path can disable, lock and invalidate a picker** (`NEXT-UP.md` #12). `datepicker.css`
package/COMPONENTS.md CHANGED
@@ -126,6 +126,7 @@ which is why React's list is longer while offering the same thing.
126
126
  |---|---|---|
127
127
  | `navOpen?` | `boolean` | Whether the nav is visible. Optional because the default is the **viewport's**, and a caller cannot state that in one initial value. Vue binds `v-model:navOpen`. |
128
128
  | `onNavOpenChange?` | `(open: boolean) => void` | React. Visibility changed: the toggle, Escape, the backdrop, or a followed nav item. Vue emits `update:navOpen`. |
129
+ | `navMode?` | `'push' \| 'overlay'` | How a **visible** nav sits on a **wide** viewport: `push` (default) is the column that displaces the content, `overlay` floats it over the page with a backdrop. Below the nav breakpoint it is ignored — the nav is off-canvas there by definition, so there is nothing to choose. Blazor takes the enum `FdyNavMode`. |
129
130
  | `title?` | `string` (Vue) · `ReactNode` | Topbar title. |
130
131
  | `toggleLabel?` | `string` | Accessible name for the nav toggle button. |
131
132
  | `toggleIcon?` | `ReactNode` | React. Replaces the default hamburger; Vue uses the slot of that name. |
@@ -141,8 +142,18 @@ off-canvas drawer and backdrop are built in.
141
142
 
142
143
  - Parts: `__sidebar` `__brand` (`__brand-mark` `__brand-text` `__brand-title` `__brand-subtitle`)
143
144
  `__content` `__topbar` `__navtoggle` `__title` `__main` `__backdrop`
144
- - Modifiers: `--nav-open` (mobile drawer open, ≤720px) · `--nav-collapsed` (collapse to zero width,
145
- ≥721px) · `--static` (embed the shell in a page instead of filling the viewport)
145
+ - Modifiers: `--nav-open` (drawer open) · `--nav-collapsed` (collapse to zero width, ≥721px) ·
146
+ `--nav-overlay` (≥721px: float the nav over the content instead of displacing it) · `--static`
147
+ (embed the shell in a page instead of filling the viewport)
148
+
149
+ **`--nav-overlay` is a layout choice, not a second behaviour.** With it the nav floats at *every*
150
+ width, so the drawer's whole code path — backdrop, Escape, close-on-follow, focus into the panel and
151
+ back, `inert` on the content, the Tab trap — is reused rather than re-implemented; only the
152
+ positioning rules differ, and only above the breakpoint. It also changes which state class means
153
+ "visible": `--nav-open` instead of the absence of `--nav-collapsed`, exactly as on a narrow screen.
154
+ On the raw path, if you add or remove the class yourself, call
155
+ **`FreedayAppShell.refresh(root)`** afterwards — the shell has to re-read the DOM, or `inert` and
156
+ `aria-expanded` keep describing the arrangement you just left.
146
157
  - Also: `.fdy-skip`, the skip-to-content link, first child of the shell.
147
158
  - **Behaviour: `freeday-app-shell.js`.** Opt in with `data-fdy-app` on the root. The markup below
148
159
  is unchanged. It owns the toggle in both modes plus everything an overlay needs that hand-rolling
@@ -278,6 +289,57 @@ sidebar from off-canvas drawer to static column at 721px, *not* at `md`. Any `ma
278
289
  utility variant that has to agree with the shell must use `nav`; using `md` leaves 721–959px broken
279
290
  (sidebar already static while your script still treats it as an overlay).
280
291
 
292
+ **Visual style: `data-style="soft | glass"`.** `soft` is the default and the look the kit has always
293
+ had; `glass` frosts the **raised** surfaces — card, modal, drawer, menu, appbar, the app shell's
294
+ sidebar and topbar. Set it wherever `data-theme` goes, and `[data-style="soft"]` is a real rule, so a
295
+ region can opt back **out** of a glass root.
296
+
297
+ ```html
298
+ <html data-style="glass">
299
+ <section data-style="soft"><!-- this region stays flat --></section>
300
+ ```
301
+
302
+ It frosts `--color-surface-raised`, **never `--color-surface`** — that token is also the fill of
303
+ inputs, chips, table cells and frozen columns, and a translucent frozen column shows the rows
304
+ scrolling underneath it. Components carry no `[data-style]` selector of their own; they read three
305
+ knobs that are no-ops under `soft`: `--color-surface-raised`, `--surface-filter` (the
306
+ `backdrop-filter` value) and `--surface-inset` (a hairline top edge, chained onto the panel's
307
+ shadow). A component that cannot follow the axis through those is reporting a **missing token**, not
308
+ asking for a rule.
309
+
310
+ **How transparent glass may be is decided by the contrast gate, not by taste.** Below `.82` in light
311
+ and `.90` in dark, muted text and `primary-strong` stop clearing 4.5:1 once the panel is composited
312
+ over an arbitrary ground — measured, and asserted against the two extremes (over black and over
313
+ white) rather than against the kit's own page colour, which is close enough to the panel's own
314
+ lightness that a panel four times more transparent still passed. So glass here is a **subtle** frost:
315
+ the effect people actually see comes from the blur, not from the alpha. Put a photo or a gradient
316
+ behind a panel and the promise still holds; that is what "over any ground" buys.
317
+
318
+ **Primary palette: `data-primary`.** 18 options — `azure` (the default, and what you get with no
319
+ attribute) · `sky` `blue` `indigo` `violet` `purple` `fuchsia` `pink` `rose` · `orange` `amber`
320
+ `yellow` `lime` `green` `emerald` `teal` `cyan` · `noir`. Set it anywhere `data-theme` works,
321
+ including on a wrapper to re-brand one region:
322
+
323
+ ```html
324
+ <html data-primary="emerald" data-theme="dark">
325
+ ```
326
+
327
+ A palette redefines an eight-shade **alias ramp**, never the semantic tokens. Which shade is the
328
+ fill, which is hover, which is the soft wash is stated once in the token source, so a palette cannot
329
+ disagree with the others about what "primary" means — and `--color-primary`, `--color-primary-hover`,
330
+ `--color-primary-soft`, `--color-primary-border`, `--color-primary-strong` and `--focus-ring` all
331
+ follow, in both themes, with nothing to wire.
332
+
333
+ **Every palette is contrast-gated, and two carry an exception the gate forced.** All 18 are asserted
334
+ in both themes for the label on a primary fill (AA 4.5), the fill against the surface and the focus
335
+ ring (1.4.11, 3:1), and `primary-strong` on its soft wash over all three surfaces. Three results
336
+ worth knowing, because they look like mistakes otherwise: `yellow` uses a **darker** fill in light
337
+ than the other palettes (at its natural shade it is 2.94:1 on white — below the floor for a UI
338
+ fill), and takes a **white** label there while every other warm palette takes a dark one; `indigo`
339
+ and `violet` shift one step lighter in dark, because at their mid shade neither white nor near-black
340
+ reaches 4.5:1. `noir` is not a hue at all — it re-points the alias ramp at the neutral ramp, so
341
+ "primary" becomes near-black in light and near-white in dark.
342
+
281
343
  Density: `data-density="compact"` works on `<html>` **or any wrapper**, because the selector is a bare
282
344
  `[data-density="compact"]` over inheriting custom properties, so one screen can be dense while the
283
345
  rest of the app is not. `data-density="comfortable"` is a real rule too, so the reverse also works:
@@ -853,11 +915,42 @@ variant is `role="img"` + `aria-label`; each interactive star needs a `.fdy-visu
853
915
  Linear multi-step flow: marker → check, one panel at a time, back/next. Needs
854
916
  `freeday-stepper.js`.
855
917
 
856
- - `.fdy-stepper` (`<ol>`) of `.fdy-step` (`is-active` / `is-complete` set by JS) ·
857
- `.fdy-step__btn` `__marker` `__label`
918
+ - `.fdy-stepper` (`<ol>`) of `.fdy-step` (`is-active` / `is-complete` set by JS, `is-error` set by
919
+ **you**) · `.fdy-step__btn` `__marker` `__badge` `__label`
858
920
  - `.fdy-step-panels` wrapping one `.fdy-step-panel` per step (`hidden` on the inactive ones)
859
921
  - `.fdy-step-nav` with `data-fdy-step-prev` / `data-fdy-step-next` buttons
860
922
 
923
+ **A step with problems: `is-error` + `__badge`.** The marker turns danger and the label with it,
924
+ but colour is never the carrier — put the count in `.fdy-step__badge` and name it in text, because
925
+ a red ring says "something" and a reader who cannot see red is told nothing at all. The badge is a
926
+ **sibling** of the marker, not a child: the enhancer rewrites the marker's contents on every render,
927
+ so a badge inside it would vanish the first time the reader moved a step.
928
+
929
+ ```html
930
+ <li class="fdy-step is-error">
931
+ <span class="fdy-step__marker">2</span>
932
+ <span class="fdy-step__badge" aria-hidden="true">3</span>
933
+ <span class="fdy-step__label">Lines <span class="fdy-visually-hidden">— 3 problems</span></span>
934
+ </li>
935
+ ```
936
+
937
+ **Leaving a step is refusable.** Next, and a forward jump to an already-reached step, both fire a
938
+ cancelable `fdy-step-before-change` (`detail: { from, to, waitFor }`). Going *back* never asks —
939
+ nothing is being committed.
940
+
941
+ ```js
942
+ el.addEventListener('fdy-step-before-change', (e) => {
943
+ e.preventDefault(); // refuse now, when the answer is already known
944
+ e.detail.waitFor = validate(e.detail.from); // …or defer: a promise resolving false refuses
945
+ });
946
+ ```
947
+
948
+ The enhancer disables both nav buttons and sets `aria-busy` on the `.fdy-stepper` while a promise is
949
+ outstanding, so a second click has nothing to aim at. Resolving to anything but `false` advances —
950
+ a handler that forgets to return is not read as a rejection — and a guard that **throws** advances
951
+ nothing, since it decided nothing. **How validity is decided stays with you**: the kit takes no
952
+ opinion on form libraries, and this event is the line that keeps it that way.
953
+
861
954
  ---
862
955
 
863
956
  # Data
@@ -879,6 +972,12 @@ Semantic static table. Wrap in `.fdy-table-wrap` (bordered surface) or `.fdy-tab
879
972
  (horizontal scroll). Always a `<caption>` (use `.fdy-visually-hidden` if it shouldn't show) and
880
973
  `<th scope="col">`. Numeric cells get `.fdy-table__num` (right-aligned, tabular).
881
974
 
975
+ **`--striped`** zebras the even body rows. The tint is deliberately *half* a surface step, not the
976
+ full one hover uses, so hover still reads on a striped row instead of matching it — and stripe,
977
+ hover and selection are ordered so the later state always wins. Override the colour through the
978
+ Tier-3 token **`--fdy-table-stripe`** (set it on any ancestor; the rule reads it as a `var()`
979
+ fallback, so your value wins without a specificity fight). Frozen columns stay striped.
980
+
882
981
  ```html
883
982
  <div class="fdy-table-wrap">
884
983
  <table class="fdy-table">
@@ -991,6 +1090,12 @@ provide the state prop for a concern and you own that concern instead. React nam
991
1090
  | `rowActivatable?` · `onRowActivate?` | `boolean` · `(row) => void` | Rows become focusable and activate on click, Enter or Space. |
992
1091
  | `rowClass?` | `(row: Row) => string \| undefined` | Per-row class hook, e.g. marking the selected row. |
993
1092
  | `expandedKeys?` · `renderRowDetail?` | `ReadonlyArray<string \| number>` · `(row) => ReactNode` | Controlled expansion: these keys get a full-width detail row. Vue uses the `row-detail` slot. |
1093
+ | `striped?` | `boolean` | Zebra-stripe the body rows (`.fdy-table--striped`). |
1094
+ | `selectable?` | `boolean` | Render the checkbox column and the bulk bar. |
1095
+ | `selectedKeys?` · `onSelectedKeysChange?` | `ReadonlyArray<string \| number>` · `(keys) => void` | Controlled selection, as `rowKey` values — the same identity `expandedKeys` uses, because a key survives the re-fetch that replaces every row object. Omit `selectedKeys` and the column still works, keeping the selection internally. The callback fires in **both** modes, so a screen can watch the selection without owning it. Vue emits `update:selectedKeys`; Blazor binds `@bind-SelectedKeys`. |
1096
+ | `bulkActions?` | `ReactNode` | React. Content in the bulk bar beside the count; Vue uses the `bulk-actions` slot (scoped: `keys`, `clear`), Blazor `BulkContent`. |
1097
+ | `selectedText?` · `clearSelectionText?` | `string` | Bulk-bar copy. Defaults `{n} selected` (with `{n}` substituted) and `Clear`. |
1098
+ | `selectAllLabel?` · `selectRowLabel?` · `bulkLabel?` | `string` | Accessible names for the header checkbox, each row checkbox, and the bulk-bar region. Defaults `Select all rows on this page`, `Select row`, `Bulk actions`. |
994
1099
  | `renderCell?` | `(column, row, value) => ReactNode` | React. Custom cell rendering; Vue uses the `cell` slot. |
995
1100
  | `toolbar?` | `ReactNode` | React. Content above the table; Vue uses the `toolbar` slot. |
996
1101
  | `onProcess?` | `(result: { rows, total }) => void` | React. The processed page after filter/sort/paginate, in **both** modes. Vue emits `process`, Blazor calls it `Process`. Render the same set elsewhere — a card list, a summary, a CSV export — without re-deriving the pipeline. |
@@ -999,6 +1104,14 @@ Blazor matches this surface (`LoadingText` and `EmptyContent` in place of `empty
999
1104
  `Toolbar` and `RowDetail` as `RenderFragment`s) and is the one adapter that also exposes
1000
1105
  `FiltersChanged`.
1001
1106
 
1107
+ **Select-all ticks the current page, not the whole result set.** A header checkbox that silently
1108
+ selects rows the reader cannot see is how a bulk delete goes wrong, so it acts on the rows on
1109
+ screen — and it is `indeterminate` while only some of them are ticked. Keys picked on *other* pages
1110
+ are kept rather than dropped, so paging away and back does not lose them; the bulk bar's count is
1111
+ the true total across pages, which is why it can read higher than the rows in view. `Clear` empties
1112
+ the whole selection. A row checkbox stops its own click, so ticking a row in a `rowActivatable`
1113
+ table selects it instead of navigating away from it.
1114
+
1002
1115
  The interactive table: global search, sort, per-column filters, row selection + bulk bar,
1003
1116
  pagination. Needs `freeday-table.js`. Wrap the whole thing in `.fdy-datatable` + `data-fdy-table`
1004
1117
  (`data-page-size="N"`).
@@ -1242,9 +1355,13 @@ Transient notification in a live region. Imperative only:
1242
1355
  ```js
1243
1356
  const node = Freeday.toast({ variant: 'success', title: 'Saved', message: 'INV-1042 saved.' })
1244
1357
  Freeday.toast({ variant: 'danger', title: 'Failed', message: '…', key: 'net-fail' }) // same key replaces
1358
+ Freeday.toast({ message: 'Still uploading…', timeout: 0 }) // 0 = stays until dismissed
1245
1359
  Freeday.dismiss('net-fail') // or Freeday.dismiss(node)
1246
1360
  ```
1247
- Every field is optional; it returns the toast element. Classes (rendered for you):
1361
+ Every field is optional; it returns the toast element. **`timeout`** is ms before it auto-dismisses,
1362
+ default `4000`, and `0` makes it stick — the enhancer has honoured it since it was written, but this
1363
+ line did not exist until 3.0.0, so every app that needed a sticky error toast hand-rolled one.
1364
+ Classes (rendered for you):
1248
1365
  `.fdy-toast-region`, `.fdy-toast` (+`--info` `--success` `--warning` `--danger`) · `__accent`
1249
1366
  `__body` `__title` `__text` `__close`.
1250
1367
 
@@ -1264,6 +1381,41 @@ gets `aria-describedby` → the `.fdy-tooltip[role="tooltip"]` `id`.
1264
1381
  duration. `role="progressbar"` with `aria-valuenow/min/max` (omit `valuenow` when indeterminate).
1265
1382
  `.fdy-spinner` (+`--sm` `--lg`) with `role="status"` + `aria-label`.
1266
1383
 
1384
+ ## Busy overlay — `Freeday.busy()`
1385
+ Blocks the screen while an operation runs — a save that must not be double-submitted, a report the
1386
+ server is still building. Imperative only, and that is the design, not a shortcut:
1387
+
1388
+ ```js
1389
+ Freeday.busy({ caption: 'Posting invoice…' }) // returns the element
1390
+ Freeday.idle() // releases it
1391
+ ```
1392
+
1393
+ - `caption?` — what is happening. Announced politely (`role="status"`). Omitted, it falls back to
1394
+ the kit's default, overridable page-wide with `data-fdy-text-caption` on `<html>`.
1395
+ - `delay?` — ms before it appears, default `120`, `0` shows immediately. An operation that finishes
1396
+ in 80ms should never flash a scrim; that reads as a glitch rather than as progress. `idle()`
1397
+ cancels a still-pending show, so a fast operation leaves nothing behind.
1398
+ - `mark?` — an `Element` to use instead of the spinner. **Element only, never an HTML string** — a
1399
+ string here would be an injection point in every app that passed user text through it. Brand marks
1400
+ are yours; the kit ships the box and one spinner.
1401
+
1402
+ Classes (rendered for you): `.fdy-busy` (+`.is-open`) · `__panel` `__mark` `__caption`.
1403
+
1404
+ **One overlay, always.** A second `busy()` while one is up replaces the caption instead of stacking
1405
+ a second scrim. That is the whole reason there is no component API and no markup to hand-write: two
1406
+ of these on screen, with two captions, from two components that each thought they owned it, is the
1407
+ bug this prevents.
1408
+
1409
+ **It is not a dialog.** Nothing asks a question and nothing can be dismissed, so there is no focus
1410
+ trap and no Escape. Interaction is removed with `inert` on every other child of `<body>` — and only
1411
+ on the ones the kit set it on, so an app's own `inert` is never cleared. Focus is parked on the panel
1412
+ and handed back to the element that had it once `idle()` runs, because by then that element's
1413
+ ancestor is inert and the browser would otherwise have dropped focus to `<body>`.
1414
+
1415
+ **Above modals, and not by z-index.** Like the toast region it is a `popover`, so it enters the top
1416
+ layer over an open `<dialog>`. Where the Popover API is missing it falls back to a fixed layer at
1417
+ `z-index: 190`, which cannot clear an open modal — the same trade the toast region documents.
1418
+
1267
1419
  ## Skeleton — `.fdy-skeleton`
1268
1420
  Size-matched placeholders so nothing shifts when data lands: `--title` `--text` `--circle`
1269
1421
  `--avatar` (+`--avatar-sm` `--avatar-lg`, exactly `.fdy-avatar`'s box).
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-v2.2.0-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v2.2.0)
8
+ [![Release](https://img.shields.io/badge/release-v3.0.0-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v3.0.0)
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-v2.2.0-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v2.2.0)
8
+ [![Release](https://img.shields.io/badge/release-v3.0.0-0078d4?style=flat-square)](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v3.0.0)
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/USAGE.md CHANGED
@@ -65,7 +65,7 @@ Shadow is a signal, not decoration. There are two families, and the difference m
65
65
  | Raised | `--shadow-2` | `.fdy-tooltip`, `.fdy-appbar--elevated` |
66
66
  | Floating | `--shadow-3` | Things that float over the page: `.fdy-menu`, `.fdy-filter`, `.fdy-toast`, `.fdy-fab` |
67
67
  | Overlay | `--shadow-4` | `.fdy-drawer` |
68
- | **Lift** | `--shadow-lift` / `--shadow-lift-hover` | **`.fdy-card`** (and `--elevated` / `--interactive:hover`), `.fdy-modal` |
68
+ | **Lift** | `--shadow-lift` / `--shadow-lift-hover` | **`.fdy-card`** (and `--elevated` / `--interactive:hover`), `.fdy-modal`, `.fdy-busy__panel` |
69
69
 
70
70
  **`.fdy-card` is a lifted surface, not a hairline one.** `--shadow-lift` is a real 34px lift, ~6×
71
71
  heavier than `--shadow-1`. That is the whole point of a card, and it is also why a *stack* of them
@@ -6,7 +6,7 @@
6
6
  `data-fdy-app` and binds to it: the enhancer announces changes as a bubbling `fdy-app-nav` event
7
7
  and accepts them through FreedayAppShell.setVisible. That is the bridge's own doctrine: the
8
8
  enhancers stay the source of truth, and it keeps the focus trap from existing a third time. *@
9
- <div @ref="Root" class="fdy-app" data-fdy-app>
9
+ <div @ref="Root" class="@ShellClass" data-fdy-app>
10
10
  @SkipContent
11
11
 
12
12
  <aside class="fdy-app__sidebar">
@@ -43,8 +43,20 @@ public partial class FdyAppShell
43
43
 
44
44
  [Parameter] public string ToggleLabel { get; set; } = "Toggle navigation";
45
45
 
46
+ /// <summary>
47
+ /// How a VISIBLE nav sits on a wide viewport: <see cref="FdyNavMode.Push"/> (default) makes it
48
+ /// a column that displaces the content, <see cref="FdyNavMode.Overlay"/> floats it over the page
49
+ /// with a backdrop. Below the nav breakpoint it is ignored — the nav is off-canvas there by
50
+ /// definition, so there is nothing to choose.
51
+ /// </summary>
52
+ [Parameter] public FdyNavMode NavMode { get; set; } = FdyNavMode.Push;
53
+
54
+ private string ShellClass =>
55
+ NavMode == FdyNavMode.Overlay ? "fdy-app fdy-app--nav-overlay" : "fdy-app";
56
+
46
57
  private int _navToken;
47
58
  private bool? _lastNavOpen;
59
+ private FdyNavMode _lastNavMode = FdyNavMode.Push;
48
60
 
49
61
  protected override async ValueTask HydrateAsync()
50
62
  {
@@ -77,6 +89,15 @@ public partial class FdyAppShell
77
89
  _lastNavOpen = wanted;
78
90
  await JS.InvokeVoidAsync("FreedayAppShell.setVisible", Root, wanted);
79
91
  }
92
+
93
+ // Switching the mode moves the answer to "is the nav visible?" from one state class to the
94
+ // other, so `inert` and `aria-expanded` describe the old arrangement until the shell re-reads
95
+ // the DOM. Blazor has rendered the new class by now; this tells the enhancer to look again.
96
+ if (_navToken != 0 && NavMode != _lastNavMode)
97
+ {
98
+ _lastNavMode = NavMode;
99
+ await JS.InvokeVoidAsync("FreedayAppShell.refresh", Root);
100
+ }
80
101
  }
81
102
 
82
103
  /// <summary>Invoked by the bridge when the shell's nav visibility changes for any reason,
@@ -112,3 +133,17 @@ public partial class FdyAppShell
112
133
 
113
134
  public sealed record NavDetail(bool Visible);
114
135
  }
136
+
137
+ /// <summary>
138
+ /// How a visible nav sits on a wide viewport. The JS adapters take the same idea as the string
139
+ /// union <c>'push' | 'overlay'</c>; C# gets an enum, for the same reason the column filter type is
140
+ /// one — a typo in a string reaches the renderer, a typo in an enum member does not compile.
141
+ /// </summary>
142
+ public enum FdyNavMode
143
+ {
144
+ /// <summary>A column that displaces the content (the default, and what every 2.x shell did).</summary>
145
+ Push,
146
+
147
+ /// <summary>Floats over the page with a backdrop, the way it already behaves on a narrow one.</summary>
148
+ Overlay,
149
+ }
@@ -17,10 +17,34 @@
17
17
  </div>
18
18
  }
19
19
 
20
+ @if (Selectable)
21
+ {
22
+ <div class="fdy-table-bulkbar" hidden="@(SelectedCount == 0)" role="region" aria-label="@BulkLabel">
23
+ <span class="fdy-table-bulkbar__count" aria-live="polite">@SelectedLabel()</span>
24
+ <span class="fdy-table-bulkbar__spacer"></span>
25
+ <div class="fdy-table-bulkbar__actions">
26
+ @BulkContent
27
+ <button type="button" class="fdy-btn fdy-btn--ghost fdy-btn--sm" @onclick="ClearSelection">@ClearSelectionText</button>
28
+ </div>
29
+ </div>
30
+ }
31
+
20
32
  <div class="fdy-table-scroll">
21
- <table class="fdy-table" aria-label="@AriaLabel">
33
+ <table class="fdy-table @(Striped ? "fdy-table--striped" : null)" aria-label="@AriaLabel">
22
34
  <thead>
23
35
  <tr>
36
+ @if (Selectable)
37
+ {
38
+ <th class="fdy-table__selcol" scope="col">
39
+ <input type="checkbox"
40
+ class="fdy-checkbox"
41
+ data-fdy-select-all
42
+ @ref="_selectAllRef"
43
+ checked="@AllPageSelected"
44
+ aria-label="@SelectAllLabel"
45
+ @onchange="e => ToggleAllOnPage((bool)(e.Value ?? false))" />
46
+ </th>
47
+ }
24
48
  @foreach (FdyTableColumn<TRow> col in Columns)
25
49
  {
26
50
  <th scope="col" style="@AlignStyle(col)" aria-sort="@AriaSortOf(col)">
@@ -47,12 +71,12 @@
47
71
  <tbody>
48
72
  @if (Loading)
49
73
  {
50
- <tr><td colspan="@Columns.Count" class="fdy-table__state" role="status">@LoadingText</td></tr>
74
+ <tr><td colspan="@ColSpan" class="fdy-table__state" role="status">@LoadingText</td></tr>
51
75
  }
52
76
  else if (_displayRows.Count == 0)
53
77
  {
54
78
  <tr>
55
- <td colspan="@Columns.Count" class="fdy-table__state">
79
+ <td colspan="@ColSpan" class="fdy-table__state">
56
80
  @if (EmptyContent is not null)
57
81
  {
58
82
  @EmptyContent
@@ -72,8 +96,24 @@
72
96
  <tr class="@RowClasses(r)"
73
97
  tabindex="@(RowActivatable ? 0 : (int?)null)"
74
98
  aria-expanded="@ExpandedAttr(r)"
99
+ aria-selected="@SelectedAttr(r)"
75
100
  @onclick="() => OnRowClick(r)"
76
101
  @onkeydown="e => OnRowKeydown(e, r)">
102
+ @if (Selectable)
103
+ {
104
+ @* @onclick:stopPropagation: without it, ticking a checkbox in an
105
+ activatable row also raises RowActivate, so selecting a row
106
+ would navigate away from it. *@
107
+ <td class="fdy-table__selcol">
108
+ <input type="checkbox"
109
+ class="fdy-checkbox"
110
+ data-fdy-row-select
111
+ checked="@IsSelected(r)"
112
+ aria-label="@SelectRowLabel"
113
+ @onclick:stopPropagation="true"
114
+ @onchange="e => ToggleRow(r, (bool)(e.Value ?? false))" />
115
+ </td>
116
+ }
77
117
  @foreach (FdyTableColumn<TRow> col in Columns)
78
118
  {
79
119
  <td class="@CellClass(col)" style="@AlignStyle(col)">
@@ -91,7 +131,7 @@
91
131
  @if (RowDetail is not null && IsExpanded(r))
92
132
  {
93
133
  <tr class="fdy-table__detailrow">
94
- <td colspan="@Columns.Count">@RowDetail(r)</td>
134
+ <td colspan="@ColSpan">@RowDetail(r)</td>
95
135
  </tr>
96
136
  }
97
137
  }