@cahyo-dimas/freeday 1.18.0 → 1.20.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/COMPONENTS.md +748 -0
  3. package/README.id.md +9 -1
  4. package/README.md +16 -2
  5. package/USAGE.md +34 -11
  6. package/adapters/blazor/FdyTable.razor.cs +66 -7
  7. package/adapters/blazor/TableTypes.cs +6 -0
  8. package/adapters/react/components/FdyTable.tsx +32 -8
  9. package/adapters/vue/components/FdyTable.vue +30 -6
  10. package/dist/freeday.bundle.css +35 -1
  11. package/dist/freeday.css +30 -0
  12. package/dist/freeday.tokens.css +5 -1
  13. package/docs/agent-onboarding.md +151 -0
  14. package/docs/getting-started.md +454 -0
  15. package/docs/integrations.md +321 -0
  16. package/docs/reference-screen.html +461 -0
  17. package/package.json +9 -3
  18. package/src/components/list.css +29 -0
  19. package/tokens/breakpoints.d.ts +3 -0
  20. package/tokens/breakpoints.mjs +8 -1
  21. package/src/components/.gitkeep +0 -0
  22. package/src/freeday-autocomplete.js +0 -135
  23. package/src/freeday-breakpoint.js +0 -51
  24. package/src/freeday-carousel.js +0 -111
  25. package/src/freeday-cascade.js +0 -256
  26. package/src/freeday-cfl.js +0 -213
  27. package/src/freeday-chart.js +0 -429
  28. package/src/freeday-chip.js +0 -83
  29. package/src/freeday-datepicker.js +0 -321
  30. package/src/freeday-datetime.js +0 -83
  31. package/src/freeday-drawer.js +0 -43
  32. package/src/freeday-form.js +0 -181
  33. package/src/freeday-mask.js +0 -114
  34. package/src/freeday-menu.js +0 -93
  35. package/src/freeday-popover.js +0 -69
  36. package/src/freeday-rating.js +0 -50
  37. package/src/freeday-select.js +0 -218
  38. package/src/freeday-slider.js +0 -34
  39. package/src/freeday-stepper.js +0 -90
  40. package/src/freeday-table.js +0 -475
  41. package/src/freeday-tabs.js +0 -68
  42. package/src/freeday-timepicker.js +0 -180
  43. package/src/freeday-toast.js +0 -105
  44. package/src/freeday-tree.js +0 -94
  45. package/src/freeday-upload.js +0 -206
package/CHANGELOG.md CHANGED
@@ -3,6 +3,168 @@
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.20.0] — 2026-08-12
7
+ Two bodies of work in one release (1.19.0 was prepared but never committed, tagged or published, so
8
+ it is folded in here rather than left as a phantom version):
9
+ **(a)** make the kit consumable by an **AI coding agent** in a new or migrating project, and clean the
10
+ repo to production level; **(b)** act on the fourth round of real-app consumption feedback — five
11
+ confirmed gaps, one rejected premise, and one documentation bug of our own that chasing it exposed.
12
+ ### Added — from consumption round 4
13
+ - **`.fdy-list` / `.fdy-list__row` — the flat row container** (`src/components/list.css`). One bordered
14
+ surface, `--color-border-muted` hairline dividers, **no shadow**; `--interactive` for hover, and
15
+ `--button` for when the row *is* the control (UA box reset without losing the list surface), plus
16
+ `__main` / `__title` / `__meta` / `__aside` internals. `USAGE.md` §3 has always said list rows should
17
+ be flat, but the only container the kit shipped was `.fdy-card` — which carries `--shadow-lift`, a
18
+ real 34px lift, so a responsive table that becomes a list below `md` had to choose between ten
19
+ floating cards or a hand-built box that needs a colour and escapes the token system.
20
+ - **`FdyTable`: controlled client-side page index.** `pageIndex` + `update:pageIndex` (Vue) /
21
+ `pageIndex` + `onPageIndexChange` (React) / `PageIndex` + `PageIndexChanged` (Blazor). The table
22
+ still filters/sorts/paginates; only *which page* moves to the parent. This is what makes the
23
+ `process` event from 1.18 pay off on a **responsive** screen: the pager renders inside
24
+ `.fdy-datatable`, so a screen that hides the table below `md` loses it — and in client mode the index
25
+ was a private ref with no prop, no event and no `goTo`. The two available options were "lose
26
+ pagination on mobile" or "own the page index in server mode", where `process` hands back exactly the
27
+ array you passed in. One index can now also span several tables, which is what a grouped list needs.
28
+ Reported after a real rebuild where `process` deleted, by measurement, zero lines.
29
+ - **`breakpoints.nav` (721)** in `tokens/breakpoints.mjs` + its type. `.fdy-app` switches the sidebar
30
+ between off-canvas drawer and static column at 721px — a number that was in `app-shell.css` and
31
+ nowhere else, so every consumer of the shell hand-mirrored it. Getting it wrong is not cosmetic:
32
+ aligning to `md` (960) leaves 721–959px with a static sidebar that the script still treats as an
33
+ overlay, so opening the nav makes the page `inert` around a user with no way back out. A new test
34
+ asserts `nav` equals the CSS's `min-width` and that the `max-width` query is `nav - 1`, so the two
35
+ cannot drift.
36
+ - **Blazor `FdyTable` gained `Process`** (+ the `FdyTableProcess<TRow>` record) — 1.18 added the
37
+ `process` event to Vue and React only, which left Blazor unable to drive a card list from the
38
+ processed set at all.
39
+ - **Browser guards for the controlled page index**, Vue and React, in `browser/adapter.mjs`: a table
40
+ whose pager lives *outside* the component, asserting both directions (parent → rows, and internal
41
+ pager → parent event). Mutation-checked: reverting the component to its private index fails them.
42
+ ### Changed — from consumption round 4
43
+ - **`data-density="compact"` is no longer root-scoped.** The generated selector was
44
+ `:root[data-density="compact"]`; it is now a bare `[data-density="compact"]`. These are inheriting
45
+ custom properties, so density can be set on a route wrapper or a single section — which is how it is
46
+ actually decided (per screen), not on `<html>` for the whole app. Setting it on the root still works
47
+ identically. A build test now asserts the selector is not root-scoped.
48
+ ### Fixed — from consumption round 4
49
+ - **`USAGE.md` §3 misdescribed the kit's own elevation scale** — our bug, found while checking the
50
+ report. It prescribed `--shadow-1` for "a card" and `--shadow-4` for "modal / drawer", but `.fdy-card`
51
+ uses `--shadow-lift` (≈6× heavier than `--shadow-1`) and `.fdy-modal` uses `--shadow-lift-hover`;
52
+ `--shadow-1` is what the *data containers* use. §3 now carries the real component→token map, names
53
+ the two shadow families, and points rows at `.fdy-list`. Exactly the drift the repo's own invariant
54
+ warns about: docs restating a scale the components don't follow.
55
+ - **`.fdy-toolbar` vs `.fdy-filterbar` is now documented.** `.fdy-toolbar` is `align-items:center`
56
+ (right for bare controls); a `.fdy-field` with a *visible* label sits half a label-height low in it.
57
+ Labelled fields belong in `.fdy-filterbar` (`align-items:flex-end` — which is why 1.11.2 had to
58
+ arbitrate the composed case). The difference existed but was written down nowhere, so the wrong
59
+ choice was only visible once rendered. Documented in `USAGE.md` §7 and `COMPONENTS.md`; no CSS
60
+ changed, so no existing screen shifts.
61
+ ### Notes — one report item rejected
62
+ - **"`.fdy-page-section` and `.fdy-table-scroll` do not compose" does not reproduce, and the proposed
63
+ `min-width:0` fix is a no-op.** Measured on `docs/reference-screen.html` (the same
64
+ section → datatable → scroller chain) with the table forced to 1400px in a 688px column: page
65
+ overflow **0px**, the datatable held its column, the scroller scrolled internally — and adding
66
+ `min-width:0` changed nothing. Two mechanisms explain it: `.fdy-page-section` is flex **column**, so
67
+ `min-width:auto` (a main-axis rule) cannot cause horizontal growth; and `.fdy-table-scroll` has
68
+ `overflow-x:auto`, which gives it an automatic minimum size of **0**, so no ancestor flex can stretch
69
+ it. The kit also already sets `min-width:0` at the one row-flex boundary it owns
70
+ (`.fdy-app__content`). The 129px overflow the reporter measured is real but originates in their own
71
+ wrapper chain; to locate it, walk the datatable's ancestors at the failing width and find the first
72
+ with `scrollWidth > clientWidth`. Third round in a row where a proposed fix would have changed
73
+ nothing — the premise gets verified before the patch, every time.
74
+ ### Added
75
+ - **`COMPONENTS.md` — the complete public class surface in one flat file.** Every component with its
76
+ block/element/modifier classes, a minimal markup skeleton, its enhancer hook and its a11y contract,
77
+ plus the full enhancer table (markup hook → script → global → events). The gap it closes: 425
78
+ `.fdy-*` classes exist in `src/components/`, but only ~33 appeared as literal strings anywhere in
79
+ the shipped docs — the rest lived in a 2,552-line HTML page and in the CSS source, neither of which
80
+ an agent (or a hurried human) reads.
81
+ - **`docs/agent-onboarding.md`** — the entry point for an agent working in a *consuming* project: a
82
+ paste-ready block for that project's `CLAUDE.md`/`AGENTS.md`, what ships in the package and which
83
+ question each file answers, the order to build a new screen in, a **migration mapping table**
84
+ (Bootstrap / MudBlazor / utility-class conventions → Freeday) with a safe conversion order, and a
85
+ pre-completion verification checklist.
86
+ - **`docs/reference-screen.html`** — one complete business screen assembled the intended way:
87
+ `.fdy-app` → `.fdy-page` → `.fdy-page__header` → `.fdy-stats` → sections holding a chart and a
88
+ full data table, plus a native-`<dialog>` modal, theme/density toggles and the shell's nav-toggle
89
+ wiring. v1.18.0 shipped the composition primitives but nothing demonstrated them end-to-end.
90
+ - **`test/docs.test.mjs` — drift guard for the agent-facing docs.** Every fully-written `.fdy-*`
91
+ class named in `COMPONENTS.md`, `USAGE.md`, `docs/agent-onboarding.md` and
92
+ `docs/reference-screen.html` must exist in the kit (CSS selectors ∪ classes the enhancers
93
+ query/set), and every stylesheet in `src/components/` must be represented in `COMPONENTS.md`. An
94
+ API doc that names a class the CSS never defines is worse than an omission: it invites markup that
95
+ silently does nothing.
96
+ - **`reference/` — the two source assets moved out of the repo root** (`git mv`, so history follows):
97
+ `Foundation Design System.html` → `reference/foundation-design-system.html`, and
98
+ `auth_web_ui_layout_patterns.png` → `reference/layout-patterns.png` (the `auth_` prefix was
99
+ misleading — the sheet is about app layout archetypes, not authentication). Neither was ever in the
100
+ tarball and neither is now; the folder name states that. `reference/README.md` carries their
101
+ provenance plus a **15 archetypes → Freeday primitives** table that names, per archetype, what the
102
+ kit covers and which shapes it has **no** component for (kanban columns, calendar month grid, chat
103
+ bubbles, canvas) — so those get built as layout instead of as invented `fdy-` classes. The drift
104
+ guard checks this file too.
105
+ ### Removed
106
+ - **`src/*.js` no longer ships.** All 24 enhancers in `src/` were **byte-identical** to their `dist/`
107
+ copies, and no `exports` path points into `src/` — so a bundler-based consumer could never import
108
+ them. `files` now lists `src/base.css` + `src/components` (kept: per-component CSS is genuinely
109
+ easier to read than the 117 kB bundle, and `docs/agent-onboarding.md` points agents at it).
110
+ **−25 files, −196 kB unpacked** per install (the compressed tarball barely moves — identical files
111
+ deflate to almost nothing — but the install footprint and "what am I even looking at" do).
112
+ - **4 completed SDD implementation plans + 1 superseded spec deleted** (`docs/superpowers/plans/*`,
113
+ `specs/2026-07-22-…-polish-design.md`, **−1452 lines**). Cited by nobody, served publicly by Pages,
114
+ and describing work that shipped months of releases ago — `CHANGELOG.md` plus git history already
115
+ record it. Only the canonical design spec remains.
116
+ - **`NEXT-UP.md`: 421 → ~125 lines.** Held 15 `Update …` release-log blocks (v1.8.0–v1.18.0), three
117
+ 2026-07-27 post-mortems of resolved items, and a frozen "current condition" snapshot still claiming
118
+ `main` = **v1.7.0** with `npm test` 9/9. A stale snapshot is worse than no snapshot. What's left is
119
+ purely forward-looking: the demand-driven backlog, the deliberate YAGNI list, two durable invariants,
120
+ and the release runbook.
121
+ - **`HANDOFF.md`: 134 → 85 lines.** Its "where we are" section was 90 lines re-narrating every release
122
+ back to v1.3.1 — a third copy of the changelog. Now: current state, then a pointer.
123
+ - `src/components/.gitkeep`, in a directory holding 47 stylesheets.
124
+ ### Fixed
125
+ - **`CLAUDE.md`'s roadmap said "v0.1 (sekarang, token-first)"** at v1.19.0, and listed datepicker,
126
+ data grid, filter bar, pagination, states and wizard as *future* work — all shipped long ago. It is
127
+ the first file every agent session reads, so it was the most expensive stale text in the repo.
128
+ Replaced with the actual status (feature-complete, demand-driven) plus a real structure map that
129
+ distinguishes authored `src/` from generated `dist/`, and names `freeday.bundle.css` as the file to link.
130
+ - **The release runbook listed version-reference locations from memory, and was wrong** — it named
131
+ `examples/*/README.md` (no version in them) and claimed `docs/getting-started.md` has 4 (it has 1).
132
+ Replaced the hand-maintained list with the command that derives it:
133
+ `git grep -n '<old-version>' -- . | grep -v CHANGELOG`.
134
+ - Stale counts trued up: `node --test` 20/20 → **28/28**, "46 komponen" → 47 stylesheets (44 components
135
+ + composition/breakpoints primitives), and the "one-off harness in the session scratchpad" note now
136
+ points at the permanent `browser/` harness.
137
+ - **`CLAUDE.md` claimed the Foundation artifact has base64-embedded fonts that can be re-extracted.**
138
+ It does not: its `@font-face` rules point at dead UUID resources left over from the tool that
139
+ exported it, there is no `data:…;base64` font anywhere in the file, and it renders via the Google
140
+ Fonts CDN it preconnects to. Corrected, so no future session goes looking for fonts that aren't there.
141
+ - **`docs/getting-started.md` §5 pointed consumers at `Foundation Design System.html` for component
142
+ markup** — a file that is not in the npm package, which became a dangling reference the moment this
143
+ release started shipping that doc. Now points at `COMPONENTS.md` and `reference-screen.html`.
144
+ - **`docs/getting-started.md`'s app-shell snippet was structurally wrong** — and it is the first thing
145
+ a consumer copies. It showed `__topbar` as a direct child *before* `__sidebar`, put `__brand` inside
146
+ the topbar, and nested `__content` *inside* `__main`. `.fdy-app` is a flex **row** of
147
+ `[__sidebar | __content]`, `__content` is the column holding `__topbar` + `__main` (it gives the
148
+ sticky topbar a tall containing block), and `__brand` belongs in the sidebar. Copying the old
149
+ snippet rendered the topbar *below* the content, off-screen. Corrected, and the correct nesting is
150
+ now stated in `COMPONENTS.md` and `USAGE.md` too. Caught by driving
151
+ `docs/reference-screen.html` in real Chrome: the nav toggle sat at y≈1021 in a 900px viewport.
152
+ - Same file: "compose the screen inside `__content`" → **`__main`** (which is the padded area).
153
+ ### Changed
154
+ - **`files` now ships the docs an agent needs**: `COMPONENTS.md`, `docs/getting-started.md`,
155
+ `docs/integrations.md`, `docs/agent-onboarding.md`, `docs/reference-screen.html` — listed
156
+ **file-by-file, not as `"docs"`**, so the internal planning docs under `docs/superpowers/` stay out
157
+ of the tarball. (`files` does not honour `.gitignore`; whitelisting a directory ships whatever sits
158
+ inside it — the v1.16.0 `bin/obj` lesson.) Tarball 263.6 kB → 297.9 kB, 177 → 182 files.
159
+ The `examples/` apps are deliberately **not** shipped (127 MB of `node_modules` + 208 MB of .NET
160
+ `bin/obj` live under them); the repo link in `docs/agent-onboarding.md` covers that need.
161
+ ### Notes
162
+ - Documenting the surface surfaced one inconsistency, recorded rather than patched (this release
163
+ touches no CSS): **`.fdy-pagination` has no CSS rule** — the block class on the `<nav>` is a naming
164
+ hook only, its `__list`/`__link`/`__ellipsis` elements carry all the styling, and the data table
165
+ targets `data-fdy-table-pagination`. `COMPONENTS.md` says so, and the drift guard lists it as a
166
+ known structural hook.
167
+
6
168
  ## [1.18.0] — 2026-08-11
7
169
  ### Fixed
8
170
  - **`FdyModal` / `FdyDrawer` (Vue) were non-dismissible when `dismissible` was omitted — an