actual-css 0.20.2 → 0.21.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 (80) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +6 -6
  3. package/components.json +19 -4
  4. package/dist/actual.full.css +451 -118
  5. package/dist/actual.full.js +2 -2
  6. package/dist/actual.full.min.css +1 -1
  7. package/dist/types/data-flag.d.ts +1 -0
  8. package/dist/types/enhancement-loader-state.d.ts +6 -0
  9. package/dist/types/enhancement-loader.d.ts +0 -2
  10. package/dist/types/parse-config.d.ts +0 -1
  11. package/dist/types/popover-transport.d.ts +2 -0
  12. package/dist/types/status.d.ts +0 -1
  13. package/dist/types/validation.d.ts +6 -2
  14. package/docs/pages/components/app-navigation.md +67 -0
  15. package/docs/pages/components/button.md +3 -0
  16. package/docs/pages/components/dialog.md +3 -0
  17. package/docs/pages/components/list.md +13 -0
  18. package/docs/pages/components/segmented.md +7 -4
  19. package/docs/pages/components/table.md +4 -1
  20. package/docs/pages/enhancements/flyout.md +12 -3
  21. package/docs/pages/enhancements/tooltip.md +1 -0
  22. package/docs/pages/examples/overview.md +29 -1
  23. package/docs/pages/forms/combobox.md +10 -8
  24. package/docs/pages/forms/labels.md +7 -0
  25. package/docs/pages/forms/overview.md +13 -10
  26. package/docs/pages/forms/validation.md +3 -3
  27. package/docs/pages/foundations/philosophy.md +26 -0
  28. package/docs/pages/foundations/theming.md +80 -7
  29. package/docs/pages/foundations/tokens.md +39 -2
  30. package/docs/pages/guides/coding-agents.md +11 -0
  31. package/docs/pages/guides/introduction.md +1 -1
  32. package/docs/pages/guides/progressive-enhancement.md +88 -20
  33. package/docs/pages/guides/tailwind.md +12 -6
  34. package/docs/pages/guides/upgrading.md +52 -0
  35. package/docs/pages/layout/app-layout.md +50 -1
  36. package/docs/pages/patterns/empty-state.md +48 -10
  37. package/forms.json +325 -0
  38. package/llms.txt +2 -1
  39. package/package.json +3 -1
  40. package/reserved-classes.json +1 -0
  41. package/skills/actual-css/SKILL.md +1 -1
  42. package/skills/actual-css/references/api-and-vocabulary.md +2 -1
  43. package/src/cli/actual-css.js +8 -2
  44. package/src/css/components/app-nav.css +75 -18
  45. package/src/css/components/badge.css +7 -1
  46. package/src/css/components/button.css +20 -3
  47. package/src/css/components/flyout.css +5 -2
  48. package/src/css/components/list.css +28 -13
  49. package/src/css/components/menu.css +18 -0
  50. package/src/css/components/meter.css +4 -0
  51. package/src/css/components/progress.css +9 -2
  52. package/src/css/components/segmented.css +22 -12
  53. package/src/css/components/table.css +21 -2
  54. package/src/css/core/theme.css +11 -1
  55. package/src/css/core/tokens.css +16 -2
  56. package/src/css/forms/choice-card.css +4 -3
  57. package/src/css/forms/choice.css +28 -16
  58. package/src/css/forms/control.css +23 -16
  59. package/src/css/forms/custom-select.css +3 -1
  60. package/src/css/forms/form.css +8 -5
  61. package/src/css/forms/otp.css +2 -1
  62. package/src/css/forms/range.css +20 -6
  63. package/src/css/forms/select.css +12 -4
  64. package/src/css/forms/switch.css +11 -5
  65. package/src/css/layout/app-layout.css +104 -5
  66. package/src/js/data-flag.js +4 -0
  67. package/src/js/dialog.js +5 -8
  68. package/src/js/enhancement-loader-state.js +7 -0
  69. package/src/js/enhancement-loader.js +4 -21
  70. package/src/js/keys.js +5 -7
  71. package/src/js/parse-config.js +0 -2
  72. package/src/js/popover-transport.js +18 -0
  73. package/src/js/status.js +0 -2
  74. package/src/js/surface.js +35 -41
  75. package/src/js/tooltip.js +8 -36
  76. package/src/js/validation.js +24 -10
  77. package/src/tooling/css-bundle.js +5 -0
  78. package/src/tooling/design-tokens.js +8 -1
  79. package/src/tooling/theme-contrast.js +45 -17
  80. package/tokens.json +4 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,80 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.21.0] - 2026-11-27
6
+ ### Added
7
+ - The `date` validation rule accepts an explicit format such as `date dd/mm/yyyy`.
8
+ - `.app-layout[data-nav="rail"]`: the side `.app-nav` as a narrow rail, each label a caption under its icon, sized by `--app-nav-rail-size`.
9
+ - `.app-nav > button` tiles, for a "More" drawer trigger or a disabled destination.
10
+ - `.app-nav > header` and `.app-nav > footer`: brand, primary action and account in side navigation, hidden in the bottom bar.
11
+ - `--app-nav-current-bg` and `--app-nav-current-fg` repaint the current `.app-nav` state.
12
+ - `.app-layout`: without an `.app-nav > header`, the topbar spans the side navigation as a global bar.
13
+ - `--app-layout-bar-size`: one top band for the topbar and the side `.app-nav > header` brand row.
14
+ - Design note: `app-navigation-presentations.md`.
15
+ - Docs: List · "Completion beside a navigable row".
16
+ - `--list-current-inset-block` adjusts the current row's indicator independently of `.list` row padding.
17
+ - `--segmented-selected-fg` sets the text and inset focus ring color for a custom selected fill.
18
+ - `.menu-item-desc` adds a wrapping secondary line to `.menu-item-text` and keeps the icon aligned to the label.
19
+ - Docs search links directly to matching demos by title or filename after the documentation results.
20
+ - `--field-label-scale`: `.field-label` and `.field-group.flush` legend size as a fraction of `--control-font-size`; `1` restores labels at the field text size.
21
+ - `actual-css/forms.json`: the `components.json` index for `src/css/forms` (classes, hooks, states, imports, docs URL), verified by `check:catalog`.
22
+ - `--shadow-control`: unset control-scale relief for the selected `.segment`, the `.switch` knob and the `.range` thumb.
23
+ - `--shadow-inset`: unset recess for fields (through `--control-shadow`) and the switch, range, progress, meter and segmented rails.
24
+ - `--finish`: an unset `background-image` over every solid fill: solid `.btn`, checked `.check`, `.radio` and `.switch`, `.progress` value and `.badge.solid`.
25
+ - `tactile` demo theme: raised cards, recessed fields and rails, domed buttons, and the 3:1 `--border-control` field edge.
26
+ - `plush` demo theme: borderless cards, inset-shaded fields and rails, squish and stretch press motion.
27
+ - `surface-form` demo: an Edge treatment, a filled field with the 3:1 cue on its lower edge.
28
+ - Design note: `elevation-and-finish.md`.
29
+ - Docs: a Customize panel replaces the header theme select: preview a demo theme and scheme, or tune the default theme's radius, borders, density, fields, elevation, finish and font, with Copy CSS, Share link and Reset.
30
+ - Docs Customize: the Fields axis offers Framed (the 3:1 edge) beside the quiet default; Edge, Filled and Recessed restore the 3:1 edge under increased contrast.
31
+ - `--table-radius`: corner radius of `.table-wrap`; the edge columns and the caption clear the curve.
32
+ - `tasks` demo: a task workspace on `.app-layout` and `.app-nav`, with completion checkboxes, folding groups, an account flyout and sheet, and a remembered rail toggle.
33
+ - `todomvc` demo: buildless TodoMVC with hash routing, local persistence, and presentation derived from HTML state.
34
+ - `modal-patterns` demo: a confirmation with detached actions.
35
+ - Docs: JavaScript runtime · compact `key:value` configuration for `data-enhance-config` and `parseConfig`.
36
+ - Docs: Empty state filters rows with `hidden` and derives the no-results panel from the list contents.
37
+ - Design note: `css-bundling.md`.
38
+
39
+ ### Changed
40
+ - `actual-css/js/parse-config`, `actual-css/js/status` and `actual-css/js/validation` drop their default exports; import `parseConfig`, `status` and `FormValidator` by name.
41
+ - `.btn` paints `--btn-bg` with `background-color`: a gradient in `--ui-bg` or `--btn-default-bg` no longer renders; use `--finish`.
42
+ - `gradient` demo theme: its gradient moves to `--finish` and reaches checked controls, switches, progress and solid badges.
43
+ - `actual-css contrast` measures solid button pairs under `--finish` instead of reporting them n/a.
44
+ - `.input`, `.textarea` and `.select` share one hover: `--control-hover-border` and `--control-hover-bg` apply to all three, and `.select` no longer fills with `--surface-subtle` by default.
45
+ - `minimal` theme: hovering a field inks its underline.
46
+ - `.select` places its chevron's ink, not its box, at `--control-pad-x`, aligned with native date, time and `.input-icon` icons; `--select-icon-inset` sets the offset for a replacement `--icon-chevron`.
47
+ - `.input`, `.textarea`, `.select`, `.join-addon` and `.otp` cells rest on a quiet `--border` edge: `--control-default-border` defaults to `--border` and to `--border-control` under `prefers-contrast: more`.
48
+ - The quiet field edge does not meet WCAG 1.4.11 on a fill equal to the surface; `--control-default-border: var(--border-control)` on `:root` restores the 3:1 edge (Guides · Upgrading).
49
+ - `actual-css contrast` reads a field's fill as well as its lower edge, and reports a field without a 3:1 cue as a warning instead of a failure.
50
+ - `actual-css contrast` measures the invalid focus line on the focused field: its outline, or its block-end border when a theme clears the outline.
51
+ - `nextItem()` from `actual-css/js/keys` stops at the edges by default, matching `itemForKey()`; pass `{ wrap: true }` to cycle.
52
+ - Dialog toggles accept `false` in any letter case, matching tooltip toggles.
53
+ - The `actual-css/js/enhancement-loader` entry point drops the `__setModuleImporter` and `__reset` test hooks.
54
+ - `.app-nav`: the bottom bar and the rail mark the current and hovered tile with a pill around the icon; the label keeps the bar's ink.
55
+ - Demos: `@lekoala/date-picker` 0.6.3 in `date-fields`, `contrast-contexts`, `neo-brutalist` and `cyberdeck`; `@lekoala/combobox` 0.8.2 in `combobox`, `contrast-contexts` and `neo-brutalist`.
56
+ - Docs: Combobox bridge maps `--cb-focus-width` to `--focus-ring-width`, so chips and remove buttons keep the field's focus width.
57
+ - `cyberdeck`: `.choice-card` and `.chip` show their state in the pressed-button corner tick instead of the leading indicator and check.
58
+ - `cyberdeck`: `.choice-card.chip` is a cut chrome toggle, like a button.
59
+ - `cyberdeck`: a checked `.choice-card` takes the chrome pane of a selected segment; disabled choice cards are hatched.
60
+ - `cyberdeck` demo: Routing fieldset shows choice cards and chips.
61
+ - Demos: `data-grid-component` 3.10.3 in `cyberdeck`, `data-grid` and `focus-bench`; grid checkboxes and radios take `.check` / `.radio` through the `check` and `radio` control roles.
62
+
63
+ ### Fixed
64
+ - A shared tooltip handles pointer exit after its active trigger is removed.
65
+ - Flyout: a click on a text field, select, textarea or its label no longer closes the default `data-flyout-auto-close="true"` panel.
66
+ - `.flyout-trigger.stretch` spans any trigger (`[aria-controls]`), not only `aria-haspopup="menu"` ones.
67
+ - `.app-layout`: side `.app-nav` labels inherit the body size instead of the bottom bar's `--font-size-xs` caption.
68
+ - Demos: `<theme-picker>` instances on one page stay in sync.
69
+ - `.app-layout`: side `.app-nav` scrolls on a short viewport instead of clipping its last destinations.
70
+ - `.list.grouped` rounds the first and last row links inside `<li>` to match the shell.
71
+ - A flyout moved in the DOM while open closes its runtime state too, instead of staying open after the browser hid the popover.
72
+ - `tokens.json` and the design-token exports include `--control-default-border`.
73
+ - Docs home: the invoice specimen keeps its column widths across its two pages.
74
+ - `cyberdeck`: the lit corner tick of `.btn[aria-pressed="true"]` and checked chips stays visible in forced colors.
75
+ - `--icon-check` is the mark of every checked state: `.check` draws it too, so it matches `.choice-card`, `.chip`, menus and the picker.
76
+ - `--icon-check` strokes 3 units, a 2px mark at 1em; `.choice-card` shows it at 80% of the indicator instead of a 1px 60%.
77
+ - `.check` and `.radio` marks stay visible in forced colors (`forced-color-adjust: none` on the pseudo).
78
+
5
79
  ## [0.20.2] - 2026-11-23
6
80
  ### Added
7
81
  - `.timeline-dates-start`: datelines in a shared column before the rail; every rail lines up whatever the dates say.
package/README.md CHANGED
@@ -12,8 +12,8 @@ Documentation: <https://lekoala.github.io/actual-css/site/>
12
12
  Actual CSS claims a documented set of global class names; the package publishes
13
13
  it as [`actual-css/reserved-classes.json`](reserved-classes.json). Tools can
14
14
  also read [`actual-css/components.json`](components.json) (components, imports,
15
- hooks, docs URLs) and [`actual-css/tokens.json`](tokens.json) (public global
16
- tokens).
15
+ hooks, docs URLs), [`actual-css/forms.json`](forms.json) (the same for forms)
16
+ and [`actual-css/tokens.json`](tokens.json) (public global tokens).
17
17
 
18
18
  For existing projects: use cascade layers, import order, or your own build-time
19
19
  prefix transform.
@@ -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.20/dist/actual.full.min.css">
70
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.21/dist/actual.full.min.css">
71
71
  ```
72
72
 
73
73
  ## Usage
@@ -146,7 +146,7 @@ registries:
146
146
  * **Full runtime, zero-config** — every built-in enhancer, compiled:
147
147
 
148
148
  ```html
149
- <script src="https://cdn.jsdelivr.net/npm/actual-css@0.20/dist/actual.full.js" type="module"></script>
149
+ <script src="https://cdn.jsdelivr.net/npm/actual-css@0.21/dist/actual.full.js" type="module"></script>
150
150
  ```
151
151
 
152
152
  * **Your own build** — copy the package's `src/js/full.js` as your entry,
@@ -188,8 +188,8 @@ Actual CSS is before 1.0:
188
188
  * A patch release (`0.12.0` → `0.12.1`) keeps every class and hook. It fixes
189
189
  bugs and may add hooks, so a fix can still move a rendering by a few pixels.
190
190
 
191
- The floating `actual-css@0.20` CDN path takes patches automatically. Pin the exact
192
- version (`actual-css@0.20.0`) when the rendering must not change without a
191
+ The floating `actual-css@0.21` CDN path takes patches automatically. Pin the exact
192
+ version (`actual-css@0.21.0`) when the rendering must not change without a
193
193
  review.
194
194
 
195
195
  ## Browser support
package/components.json CHANGED
@@ -67,11 +67,18 @@
67
67
  "publicHooks": [
68
68
  "--app-nav-size",
69
69
  "--app-nav-gap",
70
- "--app-nav-icon-size"
70
+ "--app-nav-icon-size",
71
+ "--app-nav-current-bg",
72
+ "--app-nav-current-fg"
73
+ ],
74
+ "internalHooks": [
75
+ "--app-nav-fill",
76
+ "--app-nav-ink"
71
77
  ],
72
78
  "states": [
73
79
  "aria-current",
74
- "aria-hidden"
80
+ "aria-hidden",
81
+ "disabled"
75
82
  ],
76
83
  "pseudoElements": {
77
84
  ".app-nav a": [
@@ -401,7 +408,7 @@
401
408
  "--surface-anchor-width"
402
409
  ],
403
410
  "states": [
404
- "aria-haspopup",
411
+ "aria-controls",
405
412
  "hidden",
406
413
  "popover-open"
407
414
  ],
@@ -477,6 +484,7 @@
477
484
  "--list-item-pad-block",
478
485
  "--list-item-pad-inline",
479
486
  "--list-item-gap",
487
+ "--list-current-inset-block",
480
488
  "--list-divider",
481
489
  "--list-radius"
482
490
  ],
@@ -484,6 +492,9 @@
484
492
  "aria-current"
485
493
  ],
486
494
  "pseudoElements": {
495
+ ".list": [
496
+ "::before"
497
+ ],
487
498
  ".list-item": [
488
499
  "::before"
489
500
  ]
@@ -497,6 +508,7 @@
497
508
  "classes": [
498
509
  "menu",
499
510
  "menu-item",
511
+ "menu-item-desc",
500
512
  "menu-item-end",
501
513
  "menu-item-icon",
502
514
  "menu-item-text",
@@ -694,10 +706,12 @@
694
706
  "--segmented-radius",
695
707
  "--segmented-fg",
696
708
  "--segmented-selected-bg",
709
+ "--segmented-selected-fg",
697
710
  "--segmented-selected-border"
698
711
  ],
699
712
  "internalHooks": [
700
- "--segment-min-size"
713
+ "--segment-min-size",
714
+ "--segment-focus"
701
715
  ],
702
716
  "states": [
703
717
  "aria-current",
@@ -854,6 +868,7 @@
854
868
  "publicHooks": [
855
869
  "--table-min",
856
870
  "--table-cell-pad",
871
+ "--table-radius",
857
872
  "--table-header-bg",
858
873
  "--table-header-fg"
859
874
  ]