actual-css 0.7.0 → 0.8.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 (141) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/README.md +13 -11
  3. package/components.json +668 -0
  4. package/dist/actual.css +166 -37
  5. package/dist/actual.full.css +963 -603
  6. package/dist/actual.full.js +1 -1
  7. package/dist/actual.full.min.css +1 -1
  8. package/dist/actual.js +1 -1
  9. package/dist/actual.min.css +1 -1
  10. package/docs/design-notes/accessibility-decisions.md +33 -0
  11. package/docs/design-notes/browser-support.md +62 -30
  12. package/docs/design-notes/column-layout.md +3 -3
  13. package/docs/design-notes/css-anchor.md +75 -21
  14. package/docs/design-notes/enhancement-contract.md +14 -6
  15. package/docs/design-notes/grid.md +4 -4
  16. package/docs/design-notes/naming.md +6 -1
  17. package/docs/design-notes/platform-alignment.md +53 -7
  18. package/docs/design-notes/popover-manual-poc.md +105 -25
  19. package/docs/design-notes/surface-reparenting.md +56 -47
  20. package/docs/design-notes/tooltip-coordinate-space.md +132 -0
  21. package/docs/design-notes/widget-primitives.md +7 -4
  22. package/docs/pages/components/accordion.md +41 -2
  23. package/docs/pages/components/alert.md +80 -30
  24. package/docs/pages/components/app-navigation.md +6 -0
  25. package/docs/pages/components/avatar.md +6 -6
  26. package/docs/pages/components/badge.md +101 -16
  27. package/docs/pages/components/button.md +16 -8
  28. package/docs/pages/components/card.md +10 -10
  29. package/docs/pages/components/dialog.md +16 -6
  30. package/docs/pages/components/fab.md +4 -3
  31. package/docs/pages/components/list.md +42 -4
  32. package/docs/pages/components/navbar.md +17 -1
  33. package/docs/pages/components/pagination.md +2 -2
  34. package/docs/pages/components/steps.md +19 -0
  35. package/docs/pages/components/table.md +3 -2
  36. package/docs/pages/enhancements/flyout.md +66 -36
  37. package/docs/pages/enhancements/overview.md +25 -0
  38. package/docs/pages/enhancements/status-bar.md +1 -1
  39. package/docs/pages/enhancements/tabs.md +45 -37
  40. package/docs/pages/enhancements/tooltip.md +36 -10
  41. package/docs/pages/examples/overview.md +38 -5
  42. package/docs/pages/forms/choice-cards.md +6 -2
  43. package/docs/pages/forms/combobox.md +1 -1
  44. package/docs/pages/forms/floating-field.md +4 -3
  45. package/docs/pages/forms/joined-controls.md +22 -0
  46. package/docs/pages/forms/otp.md +2 -1
  47. package/docs/pages/forms/overview.md +1 -1
  48. package/docs/pages/forms/states-and-sizes.md +16 -18
  49. package/docs/pages/forms/sticky-actions.md +2 -2
  50. package/docs/pages/forms/switch.md +1 -1
  51. package/docs/pages/foundations/philosophy.md +57 -26
  52. package/docs/pages/foundations/theming.md +2 -2
  53. package/docs/pages/foundations/tokens.md +118 -21
  54. package/docs/pages/foundations/typography.md +35 -14
  55. package/docs/pages/guides/introduction.md +11 -9
  56. package/docs/pages/guides/progressive-enhancement.md +115 -30
  57. package/docs/pages/guides/tailwind.md +3 -2
  58. package/docs/pages/layout/media.md +1 -1
  59. package/docs/pages/layout/overview.md +11 -1
  60. package/docs/pages/layout/scroll-snap.md +3 -3
  61. package/docs/pages/layout/stack.md +17 -9
  62. package/docs/pages/patterns/icon-input.md +4 -2
  63. package/docs/pages/patterns/icon-slot.md +2 -0
  64. package/docs/pages/patterns/intent-nesting.md +1 -1
  65. package/docs/pages/utilities/overview.md +23 -2
  66. package/docs/pages/utilities/sizing-wrapping.md +1 -1
  67. package/docs/pages/utilities/spacing.md +10 -8
  68. package/llms.txt +2 -1
  69. package/package.json +17 -8
  70. package/{scripts/reserved-classes.json → reserved-classes.json} +4 -6
  71. package/src/css/components/accordion.css +42 -3
  72. package/src/css/components/alert.css +25 -13
  73. package/src/css/components/app-nav.css +18 -8
  74. package/src/css/components/avatar.css +13 -1
  75. package/src/css/components/badge.css +78 -12
  76. package/src/css/components/breadcrumb.css +2 -3
  77. package/src/css/components/button.css +9 -16
  78. package/src/css/components/card.css +9 -2
  79. package/src/css/components/chat.css +1 -0
  80. package/src/css/components/data-list.css +1 -1
  81. package/src/css/components/drawer.css +79 -25
  82. package/src/css/components/fab.css +0 -6
  83. package/src/css/components/flyout.css +35 -98
  84. package/src/css/components/index.css +0 -1
  85. package/src/css/components/indicator.css +21 -0
  86. package/src/css/components/key.css +10 -0
  87. package/src/css/components/list.css +40 -4
  88. package/src/css/components/menu.css +2 -1
  89. package/src/css/components/modal.css +48 -33
  90. package/src/css/components/navbar.css +37 -4
  91. package/src/css/components/pagination.css +1 -0
  92. package/src/css/components/spinner.css +6 -6
  93. package/src/css/components/status-bar.css +0 -5
  94. package/src/css/components/steps.css +45 -59
  95. package/src/css/components/tab.css +29 -9
  96. package/src/css/components/table.css +5 -5
  97. package/src/css/components/tooltip.css +36 -40
  98. package/src/css/core/base.css +23 -1
  99. package/src/css/core/intents.css +17 -6
  100. package/src/css/core/theme.css +27 -0
  101. package/src/css/core/tokens.css +35 -15
  102. package/src/css/core/variants.css +64 -15
  103. package/src/css/forms/choice-card.css +4 -4
  104. package/src/css/forms/choice.css +6 -3
  105. package/src/css/forms/control.css +2 -1
  106. package/src/css/forms/floating-field.css +3 -3
  107. package/src/css/forms/form.css +4 -3
  108. package/src/css/forms/input-icon.css +20 -14
  109. package/src/css/forms/native.css +6 -1
  110. package/src/css/forms/otp.css +9 -1
  111. package/src/css/forms/range.css +2 -0
  112. package/src/css/forms/select.css +29 -9
  113. package/src/css/forms/switch.css +19 -5
  114. package/src/css/layout/app-layout.css +1 -1
  115. package/src/css/layout/grid.css +50 -76
  116. package/src/css/layout/scroll-snap.css +11 -7
  117. package/src/css/layout/scroller.css +3 -4
  118. package/src/css/layout/stack.css +2 -2
  119. package/src/css/typography/fluid.css +4 -3
  120. package/src/css/typography/prose.css +6 -5
  121. package/src/css/utilities/base.css +2 -1
  122. package/src/css/utilities/extra.css +20 -17
  123. package/src/js/context-menu.js +27 -26
  124. package/src/js/dialog.js +2 -1
  125. package/src/js/dismiss.js +5 -0
  126. package/src/js/enhance.js +34 -2
  127. package/src/js/enhancement-loader.js +36 -43
  128. package/src/js/events.js +0 -3
  129. package/src/js/filter.js +0 -1
  130. package/src/js/floating-space.js +42 -0
  131. package/src/js/flyout.js +9 -44
  132. package/src/js/focus-group.js +7 -0
  133. package/src/js/focus.js +6 -0
  134. package/src/js/menu.js +10 -1
  135. package/src/js/selectors.js +5 -9
  136. package/src/js/status.js +6 -5
  137. package/src/js/surface.js +97 -139
  138. package/src/js/tab.js +6 -1
  139. package/src/js/tooltip.js +150 -51
  140. package/src/js/validation.js +1 -1
  141. package/src/css/components/surface.css +0 -49
package/CHANGELOG.md CHANGED
@@ -2,6 +2,172 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.0] - 2026-09-10
6
+
7
+ Actual CSS 0.8 focuses on a cleaner component contract, more predictable sizing
8
+ and density, simpler surface behavior, stronger progressive enhancement, and a
9
+ more polished JavaScript runtime.
10
+
11
+ ### Breaking changes
12
+
13
+ - The JavaScript browser floor is now Safari 17+, Firefox 125+, and Chromium
14
+ 116+. Older browsers still receive the CSS degradation covered by the
15
+ Degraded tier, but no longer receive the supported JavaScript runtime.
16
+ - The Intermediate browser tier is removed; Minimal now covers the supported
17
+ JavaScript baseline.
18
+ - `.gap-sm`, `.gap-md`, and `.gap-lg` are removed. They changed the `gap`
19
+ property without updating Actual's inherited `--gap` rhythm, which could also
20
+ diverge from `.grid-N` track sizing. Use `gap: var(--space-*)` for a local
21
+ one-off gap, and `--gap` only when intentionally rebinding the rhythm inherited
22
+ by nested layout primitives.
23
+ - `.alert.callout` is now purely a leading-flag treatment. It no longer forces a
24
+ neutral surface, so intents and surface variants compose with it normally.
25
+ - `--font-weight` is renamed to `--font-weight-normal`,
26
+ `--font-weight-strong` to `--font-weight-semibold`, and
27
+ `.font-weight-strong` to `.font-weight-semibold`. Semibold is now 600.
28
+ - Badge sizing is independent from density. `--density-compact-size` is removed;
29
+ use the badge size hooks and `.sm` / `.lg` instead.
30
+ - Flyouts and context menus no longer turn into mobile sheets. They remain
31
+ anchored non-modal popovers at every viewport size.
32
+ `data-flyout-mobile`, `data-flyout-breakpoint`, the responsive sheet
33
+ presentation, and its generated backdrop are removed.
34
+ - `disconnectSurface(menu, { restore })` no longer accepts options; surface
35
+ reparenting is gone.
36
+ - `EVENTS.reposition`, `EVENTS.hide`, and `EVENTS.outOfView` are removed from
37
+ `actual-css/js/events`. No runtime path dispatched them.
38
+
39
+ ### Added
40
+
41
+ - `applyEnhancement(name, selector, root?)` lets applications apply
42
+ `data-enhance` behavior tokens programmatically while preserving existing
43
+ tokens and refreshing registered behaviors.
44
+ - Accordion now supports `.flush` and `.separated` container treatments.
45
+ - `.list` rows can freely combine leading, content, and trailing regions.
46
+ - `--hr-space` customizes an `hr`'s block spacing when used in normal document
47
+ flow.
48
+ - Global `pre` elements now use `overflow-x: auto`, preventing long
49
+ unbreakable lines from widening the page.
50
+ - Badge status dots use `currentColor`, so they compose naturally with badge
51
+ intent and text color.
52
+ - New demos and references:
53
+ - visual guide for spacing, layout primitives, density, and size;
54
+ - color guide for theme islands, intent colors, gradients, and interaction
55
+ colors;
56
+ - popover transport, adaptive filter surface, and settings modal examples;
57
+ - expanded kitchen sink coverage for steps, aura, inverted contexts, density,
58
+ and nested intents.
59
+ - New tooling:
60
+ - `bun run serve` for opening demos from another device;
61
+ - `report:dead-css` for unused demo CSS;
62
+ - `report:neutral-ramp` for preset neutral-ramp analysis;
63
+ - `report:theme-contrast` for soft-state contrast reporting.
64
+
65
+ ### Changed
66
+
67
+ - Updated `@lekoala/floating` to 0.2.0.
68
+ - `.sm` and `.lg` now scale participating component families locally.
69
+ `.compact` and `.spacious` remain inherited density contexts.
70
+ - Text controls now use the shared `--control-pad-x` geometry. Horizontal
71
+ padding scales with the control size, and select/input-icon geometry follows
72
+ the same control frame.
73
+ - Badge size now scales its label, icons, dots, and geometry proportionally.
74
+ Badge inline padding is derived from `--badge-size`, and badges no longer
75
+ shrink inside flex layouts.
76
+ - Badge and button typography now both use the medium font weight.
77
+ - Accordion summaries use the medium font weight and keep hover feedback in the
78
+ current text color instead of switching to the primary color.
79
+ - `.soft` interactions now use one consistent fill change. Soft foreground
80
+ colors resolve per intent through `--intent-soft-fg`, with theme hooks tuned
81
+ for readable hovered states.
82
+ - Surface behavior is simpler:
83
+ - interactive surfaces use `popover="manual"` instead of DOM reparenting;
84
+ - `.is-open` is the only state written by `surface.js`;
85
+ - `prepareSurface()` removes `[hidden]` and normalizes the popover transport;
86
+ - Actual surfaces remain mutually exclusive per document; nested surfaces are
87
+ unsupported.
88
+ - Tooltips now choose their coordinate space based on their trigger:
89
+ scrolling page content uses absolute/document coordinates, while fixed,
90
+ sticky, popover, and modal contexts stay viewport-relative.
91
+ - Tooltips that temporarily leave their positioning boundary are hidden and
92
+ restored rather than torn down.
93
+ - Modal dialogs use the small viewport height (`svh`) for their block-size cap,
94
+ avoiding panel reflow while mobile browser chrome expands or collapses.
95
+ - RTL fallbacks now use `[dir="rtl"]` for the Degraded tier and `:dir()` for
96
+ nested direction changes. Redundant `@supports selector(:dir(...))` wrappers
97
+ were removed.
98
+ - Form controls include `-webkit-appearance` alongside `appearance` where
99
+ needed for older WebKit.
100
+ - `.scroll-snap` now uses `proximity` by default.
101
+ `data-snap="mandatory"` opts into strict snapping and
102
+ `data-snap-align="center"` controls item alignment.
103
+ - Print styles focus on structural repair and preserve semantic component
104
+ content.
105
+ - `reserved-classes.json` now lives at the package root while keeping the same
106
+ public package export.
107
+ - Compatibility checks now explicitly audit against the Degraded CSS floor,
108
+ including structural selectors such as `:has()` and selector lists in
109
+ `:not()`.
110
+
111
+ ### Fixed
112
+
113
+ - `applyEnhancement(name, selector, document)` now refreshes registrations owned
114
+ by either `document` or `document.documentElement`.
115
+ - `enhance()` no longer starts an idle `MutationObserver` when no valid enhancer
116
+ record exists.
117
+ - Context-menu button triggers now use the same opening path as pointer and
118
+ keyboard triggers, including `data-context-menu-scope`.
119
+ - Tooltips shown from touch/focus recover correctly after leaving and re-entering
120
+ their positioning boundary.
121
+ - Reusing one explicit tooltip from another trigger correctly restarts position
122
+ tracking.
123
+ - Tabs skip hidden items during keyboard navigation.
124
+ - Vertical tab focus rings use the correct inline edge.
125
+ - `.tabs` keeps `aria-orientation` inside `:where()`, allowing application
126
+ classes to override layout without fighting framework specificity.
127
+ - An unchecked `.switch` keeps the correct hover treatment without the hover
128
+ selector overriding the checked state.
129
+ - `.input-icon` supports leading and trailing icons at the same time and keeps
130
+ their inset tied to the control frame even when the icon has its own font
131
+ size.
132
+ - `.list-item` correctly lays out rows with no leading region.
133
+ - `.card.subtle` now propagates its subtle surface to contextual aliases and
134
+ busy overlays.
135
+ - `.card`, `.navbar`, and `.app-nav` reset inherited intent state at their
136
+ component boundary, preventing unrelated ancestor intents from tinting their
137
+ variants.
138
+ - `.app-nav` uses the system Highlight colors for its current item in forced
139
+ colors mode.
140
+ - `.background-surface`, `.background-raised`, and `.background-subtle` restore
141
+ their matching text color and heading context, including inside `.inverted`
142
+ sections.
143
+ - All paired themes provide their own `--hover-overlay` and `--shadow-color`
144
+ baseline values instead of inheriting the core tint.
145
+ - `.prose` resets the browser's default inline blockquote margin.
146
+ - `hr` no longer collapses to zero width inside `.stack`.
147
+ - Select styling and modal body scrolling remain functional in Degraded
148
+ Firefox 78–83.
149
+ - Badge dismiss buttons keep a 24px pointer-target floor and empty dismiss
150
+ buttons render their built-in close icon correctly.
151
+ - `.menu-separator` documentation now uses plain `<hr>` without a redundant
152
+ separator role.
153
+ - `--modal-size` can once again be overridden directly on a dialog.
154
+ - Theme, density, inverted, and application custom properties now inherit
155
+ correctly into anchored surfaces.
156
+
157
+ ### Documentation and tooling
158
+
159
+ - Updated the progressive-enhancement, surface, sizing, theme, layout, alert,
160
+ badge, joined-control, and browser-support documentation to match the 0.8
161
+ behavior.
162
+ - Added clearer guidance around `--gap`: setting the custom property changes an
163
+ inherited rhythm, while `.gap-context` applies that rhythm to containers that
164
+ do not already consume it.
165
+ - Updated Biome guidance for known false positives around `<menu role="menu">`
166
+ and `role="group"`.
167
+ - Documentation examples and the examples index were cleaned up to remove stale
168
+ framework classes and retired surface/sheet behavior.
169
+ - Package export tests now cover the documented `applyEnhancement()` and
170
+ `ACTUAL_EVENT_PREFIX` exports.
5
171
 
6
172
  ## [0.7.0] - 2026-09-04
7
173
 
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Plain CSS component framework for new projects. Semantic classes, shared variants, small tokens, theme hooks, and progressive enhancement.
4
4
 
5
5
  Actual CSS claims a documented set of global class names; the package publishes
6
- it as [`actual-css/reserved-classes.json`](scripts/reserved-classes.json).
6
+ it as [`actual-css/reserved-classes.json`](reserved-classes.json).
7
7
 
8
8
  For existing projects: use cascade layers, import order, or your own build-time
9
9
  prefix transform.
@@ -67,7 +67,9 @@ Intents such as `.primary`, `.secondary`, `.success`, `.warning`, and `.danger`
67
67
 
68
68
  Variants such as `.solid`, `.soft`, `.outline`, and `.surface` are shared by components like buttons, badges, alerts, and cards. `.inverted` is a shared surface modifier: it paints any block with the inverse surface. `.ghost` and `.link` are button-only variants.
69
69
 
70
- Size variants `.sm` and `.lg` scale controls consistently.
70
+ Size variants `.sm` and `.lg` scale typography and participating component
71
+ geometry consistently. Density contexts `.compact` and `.spacious` change
72
+ spacing and geometry without changing typography or icons.
71
73
 
72
74
  ## Public Class Grammar
73
75
 
@@ -77,7 +79,7 @@ Actual CSS uses a small unprefixed class grammar:
77
79
  .component [intent] [variant] [size] [modifier]
78
80
  ```
79
81
 
80
- Components, layout helpers, form helpers, and utilities claim their documented class names. Intents are `.primary`, `.secondary`, `.success`, `.warning`, and `.danger`; shared variants are `.solid`, `.soft`, `.outline`, and `.surface`; `.inverted` is a shared surface modifier; button-only variants are `.ghost` and `.link`; shared sizes are `.sm` and `.lg`.
82
+ Components, layout helpers, form helpers, and utilities claim their documented class names. Intents are `.primary`, `.secondary`, `.success`, `.warning`, and `.danger`; shared variants are `.solid`, `.soft`, `.outline`, and `.surface`; `.inverted` is a shared surface modifier; button-only variants are `.ghost` and `.link`; shared sizes are `.sm` and `.lg`; density contexts are `.compact` and `.spacious`.
81
83
 
82
84
  Undocumented `is-*` classes are runtime internals.
83
85
 
@@ -151,19 +153,19 @@ For more conservative fallbacks, import and compose the source entrypoints direc
151
153
 
152
154
  Actual CSS is built around progressive enhancement.
153
155
 
154
- | Tier | Firefox | Safari | Chromium |
155
- | ------------ | ------: | --------: | -------: |
156
- | Degraded | 78+ | 14+ | 88+ |
157
- | **Minimal** | **98+** | **15.4+** | **99+** |
158
- | Intermediate | 121+ | 16+ | 106+ |
159
- | Recommended | 129+ | 17.5+ | 123+ |
156
+ | Tier | Firefox | Safari | Chromium |
157
+ | ----------- | -------: | ------: | -------: |
158
+ | Degraded | 78+ | 14+ | 88+ |
159
+ | **Minimal** | **125+** | **17+** | **116+** |
160
+ | Recommended | 129+ | 17.5+ | 123+ |
160
161
 
161
162
  **Degraded** — semantic HTML and core CSS remain usable. JavaScript
162
163
  enhancements are outside the supported contract.
163
164
 
164
165
  **Minimal** — full Actual support, including the JavaScript runtime. The
165
- runtime assumes modern browser APIs and does not ship legacy compatibility
166
- layers or polyfills.
166
+ runtime assumes modern browser APIs — including the native manual Popover
167
+ transport used by interactive surfaces — and does not ship legacy
168
+ compatibility layers or polyfills.
167
169
 
168
170
  Degraded browsers may execute some enhancements successfully, but this
169
171
  behavior is not tested or preserved.