actual-css 0.16.0 → 0.17.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 (79) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +8 -4
  3. package/components.json +21 -5
  4. package/dist/actual.full.css +410 -75
  5. package/dist/actual.full.js +2 -1
  6. package/dist/actual.full.min.css +1 -1
  7. package/docs/design-notes/app-ui.md +37 -3
  8. package/docs/design-notes/enhancement-contract.md +3 -1
  9. package/docs/design-notes/tokens.md +2 -0
  10. package/docs/navigation.json +14 -1
  11. package/docs/pages/components/accordion.md +5 -0
  12. package/docs/pages/components/alert.md +45 -17
  13. package/docs/pages/components/button.md +3 -0
  14. package/docs/pages/components/chat.md +20 -0
  15. package/docs/pages/components/dialog.md +36 -0
  16. package/docs/pages/components/drawer.md +52 -8
  17. package/docs/pages/components/navbar.md +26 -2
  18. package/docs/pages/components/rating.md +111 -12
  19. package/docs/pages/components/segmented.md +36 -1
  20. package/docs/pages/components/spinner.md +2 -0
  21. package/docs/pages/components/table.md +77 -0
  22. package/docs/pages/components/timeline.md +3 -1
  23. package/docs/pages/enhancements/flyout.md +83 -14
  24. package/docs/pages/enhancements/status-bar.md +1 -0
  25. package/docs/pages/enhancements/tabs.md +5 -0
  26. package/docs/pages/examples/overview.md +7 -1
  27. package/docs/pages/forms/ajax.md +101 -0
  28. package/docs/pages/forms/color-swatches.md +31 -2
  29. package/docs/pages/forms/date-picker.md +6 -0
  30. package/docs/pages/forms/joined-controls.md +8 -3
  31. package/docs/pages/forms/overview.md +2 -2
  32. package/docs/pages/forms/sticky-actions.md +2 -0
  33. package/docs/pages/forms/unsaved-changes.md +198 -0
  34. package/docs/pages/foundations/philosophy.md +2 -1
  35. package/docs/pages/foundations/theming.md +21 -4
  36. package/docs/pages/foundations/tokens.md +1 -1
  37. package/docs/pages/guides/introduction.md +1 -1
  38. package/docs/pages/guides/progressive-enhancement.md +30 -49
  39. package/docs/pages/guides/upgrading.md +16 -3
  40. package/docs/pages/layout/choosing.md +5 -0
  41. package/docs/pages/layout/column-layout.md +22 -8
  42. package/docs/pages/layout/scroll-snap.md +69 -2
  43. package/docs/pages/layout/sidebar-shell.md +68 -0
  44. package/docs/pages/patterns/empty-state.md +74 -0
  45. package/docs/pages/patterns/hierarchical-nav.md +40 -19
  46. package/docs/pages/patterns/navigation-list.md +3 -60
  47. package/docs/pages/patterns/stat.md +61 -0
  48. package/docs/pages/utilities/accessibility.md +32 -10
  49. package/package.json +4 -1
  50. package/reserved-classes.json +2 -0
  51. package/src/css/components/busy.css +25 -0
  52. package/src/css/components/button.css +3 -0
  53. package/src/css/components/chat.css +5 -1
  54. package/src/css/components/drawer.css +37 -3
  55. package/src/css/components/flyout.css +37 -0
  56. package/src/css/components/modal.css +3 -0
  57. package/src/css/components/navbar.css +99 -38
  58. package/src/css/components/rating.css +50 -5
  59. package/src/css/components/segmented.css +25 -2
  60. package/src/css/components/status-bar.css +4 -2
  61. package/src/css/forms/choice-card.css +5 -2
  62. package/src/css/forms/color-swatch.css +38 -19
  63. package/src/css/forms/custom-select.css +5 -0
  64. package/src/css/forms/form.css +3 -1
  65. package/src/css/layout/index.css +2 -0
  66. package/src/css/layout/sidebar-shell.css +67 -0
  67. package/src/js/ajax.js +148 -0
  68. package/src/js/dialog.js +59 -2
  69. package/src/js/dirty.js +140 -0
  70. package/src/js/dismiss.js +25 -0
  71. package/src/js/events.js +17 -0
  72. package/src/js/focus.js +12 -0
  73. package/src/js/form-submission.js +34 -0
  74. package/src/js/full.js +2 -0
  75. package/src/js/selectors.js +10 -2
  76. package/src/js/status.js +71 -10
  77. package/src/js/tab.js +16 -2
  78. package/src/js/validation.js +12 -4
  79. package/src/tooling/theme-contrast.js +3 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,84 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.17.0] - 2026-11-06
6
+ ### Added
7
+ - `demo/templates/changelog.html`: a release changelog composed from `.timeline`, with a meta column and a scroll-driven light on the rail.
8
+ - `.drawer`: `data-side="bottom"` makes a bottom sheet, content-sized up to `--drawer-size` or 85% of the viewport, clear of the iOS home indicator.
9
+ - `adaptive-surface.html`: the bottom drawer uses `data-side="bottom"`; the page keeps only the choice of surface.
10
+ - `.sidebar-shell`: a persistent `aside` beside the main region from `64rem`, each scrolling on its own; below, the aside hides and the document scrolls (`--sidebar-shell-size`).
11
+ - Docs: Sidebar Shell page with the drawer-closing `matchMedia` recipe; the navigation-list page links to it instead of printing a `.shell-sidebar` recipe.
12
+ - `actual-css/js/dirty`: `data-enhance="dirty"` sets `data-dirty` on a form while its submittable data differs from the baseline, and dispatches `actual:dirty-change`.
13
+ - `FormDirty.capture()`, `FormDirty.markClean()` and `FormDirty.refresh()` move the baseline after an in-page save or programmatic edits; `data-dirty-ignore` leaves a control out.
14
+ - Docs: Unsaved Changes page with `beforeunload` and autosave recipes.
15
+ - `actual-css/js/ajax`: `data-enhance="ajax"` submits a form through `fetch` as a native submission would, and leaves the cases it cannot reproduce to the browser.
16
+ - `data-ajax-target`: an HTML answer with a 2xx or `422` status replaces the target's content.
17
+ - `actual:ajax-start`, `actual:ajax-response` and `actual:ajax-error` report an ajax submission; see the Ajax Submission page.
18
+ - `actual:tab-change` bubbles from a tablist after the selected tab changes, with `{ tab, panel, previousTab }`.
19
+ - `data-dialog-open` opens a dialog at load; on a dialog that also has `open`, it upgrades the no-JS rendering to a modal.
20
+ - `actual-css/js/focus`: `nextTabStop(node)` returns the first tab stop after an element, outside it.
21
+ - `.nav-link`: `--nav-current-bg` and `--nav-current-fg` restyle the current link.
22
+ - `.nav-link`: a default `gap` for icon + label rows.
23
+ - `.nav-link`: `aria-current="true"` marks a section link whose section holds the current page, as on `.tab`.
24
+ - `.nav-list`: a `<summary class="nav-link">` gets a chevron that follows `[open]`, and a nested `.nav-list` is indented (`--nav-list-indent`).
25
+ - `.segmented.vertical` stacks the segments in one column; a segmented tablist with `aria-orientation="vertical"` does the same.
26
+ - `.rating`: `--rating-star-empty` draws empty stars in their own shape, such as an outline, on inputs and read-only displays.
27
+ - Docs: Rating page shows the component in context and with custom star shapes.
28
+ - Docs: Anatomy trees on the Rating, Alert, Segmented and Color swatches pages.
29
+ - Docs: six destinations in the header (`destinations` in `docs/navigation.json`); the sidebar lists the current one's groups, the drawer all of them as a grid.
30
+ - Docs: the homepage opens on six working panels composed from the framework (appearance, review, order, invoices, sharing, chat).
31
+ - Docs: Rating page has a required-rating scenario with its field error.
32
+ - `.flyout.scrollable`: the header and footer stay in view while the one body region scrolls.
33
+ - The `material` theme slides the `.table` row hover between rows through anchor positioning.
34
+ - Docs: Table "Sticky headers" — a header stuck to the page, and a header row and first column stuck in a scroll box.
35
+ - Docs: Empty State pattern, with the no-results case returning focus to the search field.
36
+ - Docs: Stat pattern — label, value, detail and a signed trend, inverted when lower is better.
37
+ - Docs: Column Layout "Uneven feature grids" for bento and mosaic layouts with `grid-row`.
38
+ - Docs: Accessibility page shows a label hidden on narrow screens only, with the `.sr-only` declarations in a media query.
39
+ - Docs: product-wide density is `class="compact"` on `<html>`.
40
+ - Docs: `.join` takes `role="group"` only for several controls acting as a set, not for an input with one attached button.
41
+ - Docs: Ajax — a server that issues a CSRF token per submission re-renders the form with its answer.
42
+ - Docs: Flyout "Panel with actions" — a named `<form>` flyout, and closing a validating form with `closeSurface()` from its success path.
43
+
44
+ ### Changed
45
+ - `.nav-link`: the current link takes `--text` ink on a fill one step above hover instead of the selected accent; `--state-selected-text` no longer applies to it.
46
+ - `.nav-list`: the current-link trait only shows in forced colors; horizontal `.nav-link` gets an underline there.
47
+ - `.color-swatch`: the checked mark is one `--text` ring outside the swatch, past a transparent gap, instead of a double ring inset on the color.
48
+ - `.color-swatch`: `--color-swatch-radius` inherits, so one declaration on the palette shapes every swatch.
49
+ - Docs: demo previews sit on a faintly tinted stage with more padding; the code below them returns to the plain surface.
50
+ - Docs: demo code opens with a bar holding its language and the Copy button, which no longer covers the first line.
51
+ - `.rating`: stars sit `--space-10` apart instead of `0.1rem`, and each radio's hit area is `--space-20` taller than its star.
52
+ - `[aria-busy]` overlay: fades in after `--busy-delay`, so a fast request no longer flashes it.
53
+
54
+ ### Fixed
55
+ - `.modal`: a modal authored inside `.stack` or `.cluster` opens centered instead of pinned to the top of the viewport.
56
+ - `ajax.js`: restores the form's and submitter's authored `aria-busy` after a request instead of removing it, so a resting last-child `.spinner` stays hidden.
57
+ - `dialog.js`: with `data-dialog-view-transition`, a submitter's `formmethod` decides whether a submission closes the dialog, and a control named `method` no longer breaks it.
58
+ - `dialog.js`: a dialog closed and reopened in the same task keeps `has-modal-open` and its focus target when the queued `close` event arrives.
59
+ - `--dismiss`: focus inside the dismissed target moves to the next tab stop instead of staying on the hidden close button.
60
+ - `validation.js`: picking a radio in a required group clears `aria-invalid` on every radio of the group, so its `.field-error` hides.
61
+ - `.drawer`: the body's scrollbar sits on the panel edge and the content keeps `--drawer-pad` on both sides instead of running up to the scrollbar.
62
+ - `.btn.icon-only` stays square beside a full-width control in a `.join` or flex row instead of shrinking.
63
+ - `.segmented` in `.compact` matches the `.btn` height instead of standing 1px taller.
64
+ - `.select` with the customizable picker in `.compact` matches the `.input` height instead of standing 2px taller.
65
+
66
+ ### Removed
67
+ - Docs: the Ajax forms recipe in the progressive enhancement guide; use `data-enhance="ajax"`.
68
+
69
+ ## [0.16.1] - 2026-11-04
70
+ ### Fixed
71
+ - `.field-group.flush`: the legend takes the `.field-label` size (`--control-font-size`) instead of the framed legend's `--font-size-xs`.
72
+ - `status.js`: the status bar rises above a `.form-actions.sticky` bar docked to the bottom edge instead of covering its submit button.
73
+ - `.choice-card` and `.choice-card.chip`: hover preserves the selected border and only applies on devices that support hover.
74
+
75
+ ### Added
76
+ - `.chat`: `--chat-avatar-align` places the avatar beside the header (`start`) instead of the last line (`end`, default).
77
+ - `demo/templates/playful-faq.html`: a separated accordion with a pill marker and a CSS-only open/close animation, linked from the accordion docs.
78
+ - `demo/templates/card-rail.html`: one list as a grid on wide and a `.scroll-snap` rail with CSS scroll markers on narrow, documented in the scroll-snap docs.
79
+
80
+ ### Changed
81
+ - `date-fields.html`, `contrast-contexts.html`, `neo-brutalist.html`: `@lekoala/date-picker` 0.6.1; `date-fields.html` shows its locale entry mask.
82
+
5
83
  ## [0.16.0] - 2026-10-29
6
84
  ### Fixed
7
85
  - `dialog.js`: dialogs inside custom elements or shadow roots keep their native lifecycle and commands unless delegated with `data-enhance="dialog"` or the dialog API.
package/README.md CHANGED
@@ -67,7 +67,7 @@ size is not worth optimizing:
67
67
  ```
68
68
 
69
69
  ```html
70
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.16/dist/actual.full.min.css">
70
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.17/dist/actual.full.min.css">
71
71
  ```
72
72
 
73
73
  ## Usage
@@ -119,6 +119,10 @@ Undocumented `is-*` classes are runtime internals.
119
119
 
120
120
  **Theme hooks** — public tokens for color, radius, shadow, motion, and typography. Reference presets in `src/css/themes/` are demo material, not default CSS or public package entrypoints.
121
121
 
122
+ **Blocks** — copy-paste marketing sections, application screens and navigation
123
+ built with Actual CSS live in a separate gallery:
124
+ [Actual Blocks](https://github.com/lekoala/actual-blocks).
125
+
122
126
  ## Modular CSS
123
127
 
124
128
  The family manifests are the module catalog: `core`, `layout`, `typography`,
@@ -140,7 +144,7 @@ registries:
140
144
  * **Full runtime, zero-config** — every built-in enhancer, compiled:
141
145
 
142
146
  ```html
143
- <script src="https://cdn.jsdelivr.net/npm/actual-css@0.16/dist/actual.full.js" type="module"></script>
147
+ <script src="https://cdn.jsdelivr.net/npm/actual-css@0.17/dist/actual.full.js" type="module"></script>
144
148
  ```
145
149
 
146
150
  * **Your own build** — copy the package's `src/js/full.js` as your entry,
@@ -182,8 +186,8 @@ Actual CSS is before 1.0:
182
186
  * A patch release (`0.12.0` → `0.12.1`) keeps every class and hook. It fixes
183
187
  bugs and may add hooks, so a fix can still move a rendering by a few pixels.
184
188
 
185
- The floating `actual-css@0.16` CDN path takes patches automatically. Pin the exact
186
- version (`actual-css@0.16.0`) when the rendering must not change without a
189
+ The floating `actual-css@0.17` CDN path takes patches automatically. Pin the exact
190
+ version (`actual-css@0.17.0`) when the rendering must not change without a
187
191
  review.
188
192
 
189
193
  ## Browser support
package/components.json CHANGED
@@ -187,7 +187,8 @@
187
187
  "cssImport": "actual-css/css/components/busy",
188
188
  "docs": "https://lekoala.github.io/actual-css/site/components/spinner.html",
189
189
  "publicHooks": [
190
- "--busy-overlay-bg"
190
+ "--busy-overlay-bg",
191
+ "--busy-delay"
191
192
  ],
192
193
  "internalHooks": [
193
194
  "--spinner-size"
@@ -282,7 +283,8 @@
282
283
  ],
283
284
  "publicHooks": [
284
285
  "--chat-gap",
285
- "--chat-max-size"
286
+ "--chat-max-size",
287
+ "--chat-avatar-align"
286
288
  ],
287
289
  "internalHooks": [
288
290
  "--chat-bubble-bg",
@@ -337,6 +339,7 @@
337
339
  ],
338
340
  "internalHooks": [
339
341
  "--drawer-closed-translate",
342
+ "--drawer-closed-transform",
340
343
  "--drawer-focus-bleed",
341
344
  "--drawer-close-reserve",
342
345
  "--drawer-motion-duration",
@@ -381,6 +384,7 @@
381
384
  "flyout",
382
385
  "flyout-trigger",
383
386
  "is-open",
387
+ "scrollable",
384
388
  "stretch"
385
389
  ],
386
390
  "publicHooks": [
@@ -390,6 +394,7 @@
390
394
  ],
391
395
  "internalHooks": [
392
396
  "--menu-item-size",
397
+ "--flyout-focus-bleed",
393
398
  "--available-height",
394
399
  "--surface-anchor-width"
395
400
  ],
@@ -569,16 +574,20 @@
569
574
  "navbar-brand"
570
575
  ],
571
576
  "publicHooks": [
572
- "--state-selected-text"
577
+ "--nav-current-bg",
578
+ "--nav-current-fg",
579
+ "--nav-list-indent"
573
580
  ],
574
581
  "internalHooks": [
575
582
  "--gap"
576
583
  ],
577
584
  "states": [
578
- "aria-current"
585
+ "aria-current",
586
+ "open"
579
587
  ],
580
588
  "pseudoElements": {
581
589
  ".nav-link": [
590
+ "::after",
582
591
  "::before"
583
592
  ]
584
593
  }
@@ -626,10 +635,12 @@
626
635
  "--rating-color",
627
636
  "--rating-empty",
628
637
  "--rating-star",
638
+ "--rating-star-empty",
629
639
  "--rating-value",
630
640
  "--rating-max"
631
641
  ],
632
642
  "internalHooks": [
643
+ "--rating-shape",
633
644
  "--rating-fill",
634
645
  "--rating-direction"
635
646
  ],
@@ -661,7 +672,8 @@
661
672
  "docs": "https://lekoala.github.io/actual-css/site/components/segmented.html",
662
673
  "classes": [
663
674
  "segment",
664
- "segmented"
675
+ "segmented",
676
+ "vertical"
665
677
  ],
666
678
  "publicHooks": [
667
679
  "--segmented-bg",
@@ -671,9 +683,13 @@
671
683
  "--segmented-selected-bg",
672
684
  "--segmented-selected-border"
673
685
  ],
686
+ "internalHooks": [
687
+ "--segment-min-size"
688
+ ],
674
689
  "states": [
675
690
  "aria-current",
676
691
  "aria-disabled",
692
+ "aria-orientation",
677
693
  "aria-selected",
678
694
  "checked",
679
695
  "disabled"