actual-css 0.5.0 → 0.6.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 (86) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/actual.css +1 -0
  3. package/dist/actual.full.css +480 -117
  4. package/dist/actual.full.js +1 -1
  5. package/dist/actual.full.min.css +1 -1
  6. package/dist/actual.min.css +1 -1
  7. package/docs/design-notes/browser-support.md +14 -14
  8. package/docs/design-notes/enhancement-contract.md +30 -13
  9. package/docs/design-notes/forced-colors.md +11 -7
  10. package/docs/design-notes/grid.md +4 -4
  11. package/docs/design-notes/naming.md +15 -9
  12. package/docs/design-notes/platform-alignment.md +9 -0
  13. package/docs/design-notes/references.md +4 -0
  14. package/docs/design-notes/steps.md +748 -0
  15. package/docs/design-notes/widget-primitives.md +32 -15
  16. package/docs/navigation.json +1 -0
  17. package/docs/pages/components/alert.md +13 -8
  18. package/docs/pages/components/aura.md +102 -6
  19. package/docs/pages/components/avatar.md +9 -6
  20. package/docs/pages/components/badge.md +11 -7
  21. package/docs/pages/components/button.md +17 -17
  22. package/docs/pages/components/card.md +15 -8
  23. package/docs/pages/components/chat.md +1 -1
  24. package/docs/pages/components/dialog.md +10 -7
  25. package/docs/pages/components/drawer.md +1 -1
  26. package/docs/pages/components/fab.md +12 -10
  27. package/docs/pages/components/indicator.md +6 -6
  28. package/docs/pages/components/list.md +11 -2
  29. package/docs/pages/components/navbar.md +1 -1
  30. package/docs/pages/components/pagination.md +1 -1
  31. package/docs/pages/components/rating.md +4 -4
  32. package/docs/pages/components/skeleton.md +1 -1
  33. package/docs/pages/components/spinner.md +1 -1
  34. package/docs/pages/components/steps.md +376 -52
  35. package/docs/pages/components/table.md +5 -5
  36. package/docs/pages/enhancements/flyout.md +12 -10
  37. package/docs/pages/enhancements/overview.md +2 -2
  38. package/docs/pages/enhancements/scrollspy.md +1 -1
  39. package/docs/pages/enhancements/tabs.md +1 -1
  40. package/docs/pages/examples/overview.md +2 -0
  41. package/docs/pages/forms/choice-cards.md +4 -4
  42. package/docs/pages/forms/combobox.md +87 -0
  43. package/docs/pages/forms/floating-field.md +5 -3
  44. package/docs/pages/forms/joined-controls.md +4 -4
  45. package/docs/pages/forms/labels.md +8 -5
  46. package/docs/pages/forms/overview.md +25 -18
  47. package/docs/pages/forms/password.md +3 -2
  48. package/docs/pages/forms/range.md +13 -2
  49. package/docs/pages/forms/states-and-sizes.md +6 -4
  50. package/docs/pages/forms/validation.md +13 -9
  51. package/docs/pages/foundations/tokens.md +9 -6
  52. package/docs/pages/foundations/typography.md +1 -1
  53. package/docs/pages/guides/bootstrap.md +3 -3
  54. package/docs/pages/guides/introduction.md +1 -1
  55. package/docs/pages/guides/modular-import.md +21 -10
  56. package/docs/pages/guides/progressive-enhancement.md +75 -54
  57. package/docs/pages/guides/tailwind.md +2 -2
  58. package/docs/pages/layout/app-shell.md +4 -4
  59. package/docs/pages/layout/choosing.md +10 -6
  60. package/docs/pages/layout/grid.md +11 -10
  61. package/docs/pages/layout/stack.md +10 -6
  62. package/docs/pages/patterns/structured-lists.md +7 -7
  63. package/docs/pages/utilities/accessibility.md +1 -1
  64. package/docs/pages/utilities/flex.md +20 -13
  65. package/docs/pages/utilities/links.md +1 -1
  66. package/docs/pages/utilities/list.md +1 -1
  67. package/docs/pages/utilities/overflow.md +14 -7
  68. package/docs/pages/utilities/overview.md +22 -0
  69. package/docs/pages/utilities/shape.md +1 -1
  70. package/docs/pages/utilities/sizing-wrapping.md +10 -8
  71. package/docs/pages/utilities/spacing.md +26 -19
  72. package/docs/pages/utilities/text.md +1 -1
  73. package/llms.txt +27 -4
  74. package/package.json +3 -2
  75. package/scripts/reserved-classes.json +4 -1
  76. package/src/css/components/fab.css +44 -8
  77. package/src/css/components/list.css +3 -1
  78. package/src/css/components/steps.css +277 -69
  79. package/src/css/core/tokens.css +1 -0
  80. package/src/css/effects/aura.css +101 -11
  81. package/src/css/forms/custom-select.css +1 -1
  82. package/src/css/forms/floating-field.css +8 -6
  83. package/src/css/layout/container-query.css +37 -13
  84. package/src/css/layout/grid.css +7 -7
  85. package/src/css/layout/index.css +1 -1
  86. package/src/js/password.js +1 -1
@@ -6,10 +6,10 @@
6
6
 
7
7
  ## Class reference
8
8
 
9
- | Class | Kind | Description |
10
- |---------------|-------------|---------------------------------------------------------------------------------|
11
- | `.join` | Composition | Visually joins adjacent controls into a single unit. |
12
- | `.join-addon` | Composition | Static prefix/suffix content such as currency symbols, units, or protocol text. |
9
+ | Class | Kind | Description |
10
+ | ------------- | ----------- | ------------------------------------------- |
11
+ | `.join` | Composition | Joins adjacent controls into a single unit. |
12
+ | `.join-addon` | Composition | Static prefix or suffix content. |
13
13
 
14
14
  Add `.join` to the wrapper that groups the controls. Use `.join-addon` for static prefix/suffix content such as currency symbols, units, or protocol text. Action buttons inside the group should use `.btn`. The wrapper should still carry `role="group"` with a label for accessibility.
15
15
 
@@ -4,11 +4,14 @@
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |------------------|-------------|----------------------------------------------------------------------------------------------|
9
- | `.field` | Composition | Field wrapper; canonical on `<label>` or `<div>`. |
10
- | `.field-label` | Composition | Label text, element-agnostic — works on `<span>`, a detached `<label for>`, or a `<legend>`. |
11
- | `.required-mark` | Composition | Visual required marker (`aria-hidden`) added inside a label. |
7
+ | Class | Kind | Description |
8
+ | ---------------- | ----------- | ------------------------------------------------- |
9
+ | `.field` | Composition | Field wrapper; canonical on `<label>` or `<div>`. |
10
+ | `.field-label` | Composition | Label text, element-agnostic. |
11
+ | `.required-mark` | Composition | Visual required marker (`aria-hidden`). |
12
+
13
+ `.field-label` works on a `<span>`, on a detached `<label for>`, or on a
14
+ `<legend>`. `.required-mark` goes inside a label.
12
15
 
13
16
  Use a **wrapped label** for simple hand-authored forms. The whole label area becomes the click target, there is no `id` noise, and the markup is harder to break.
14
17
 
@@ -9,27 +9,34 @@
9
9
  - Proper focus style that preserves keyboard navigation.
10
10
  - `.field-group` and `.choice` provide layout without depending on parent scope.
11
11
  - Customizable select is progressive enhancement only — the native select remains the baseline.
12
+ - Searchable selects, tags and autocomplete are a JavaScript widget concern; theme an external combobox with Actual tokens — see the [combobox template](../../demo/templates/combobox.html).
12
13
 
13
14
  ## Class reference
14
15
 
15
- | Class | Kind | Description |
16
- |-----------------|-------------|-------------------------------------------------------------------------------|
17
- | `.input` | Component | Text input; shares the text-control recipe with `.textarea` and `.select`. |
18
- | `.textarea` | Component | Multi-line text control. |
19
- | `.select` | Component | Dropdown — native baseline with a CSS chevron and an opt-in enhanced picker. |
20
- | `.check` | Component | Styled checkbox. |
21
- | `.radio` | Component | Styled radio button. |
22
- | `.switch` | Component | Toggle switch on a checkbox input with `role="switch"`. |
23
- | `.range` | Component | Native range slider with a theme-aware accent color. |
24
- | `.file` | Component | Native file input with a themed picker button. |
25
- | `.color` | Component | Native color picker in a control-sized box. |
26
- | `.field` | Composition | Field wrapper that works on `<label>` and `<div>`. |
27
- | `.field-label` | Composition | Label text; element-agnostic — `<span>`, detached `<label>`, or `<legend>`. |
28
- | `.field-help` | Composition | Supporting helper text under a control. |
29
- | `.field-error` | Composition | Inline error message shown while the field is invalid. |
30
- | `.field-group` | Composition | Grouped `<fieldset>` container with a tunable legend gutter. |
31
- | `.choice` | Composition | Choice-label layout wrapping a `.check`, `.radio`, or `.switch`. |
32
- | `.form-actions` | Composition | Class-only flex row that closes a form; works inside or outside the `<form>`. |
16
+ | Class | Kind | Description |
17
+ | --------------- | ----------- | --------------------------------------------- |
18
+ | `.input` | Component | Text input. |
19
+ | `.textarea` | Component | Multi-line text control. |
20
+ | `.select` | Component | Dropdown, native baseline with a CSS chevron. |
21
+ | `.check` | Component | Styled checkbox. |
22
+ | `.radio` | Component | Styled radio button. |
23
+ | `.switch` | Component | Toggle switch on a `role="switch"` checkbox. |
24
+ | `.range` | Component | Native range slider, theme-aware accent. |
25
+ | `.file` | Component | Native file input, themed picker button. |
26
+ | `.color` | Component | Native color picker in a control-sized box. |
27
+ | `.field` | Composition | Field wrapper, on `<label>` or `<div>`. |
28
+ | `.field-label` | Composition | Label text, element-agnostic. |
29
+ | `.field-help` | Composition | Supporting helper text under a control. |
30
+ | `.field-error` | Composition | Inline error message, shown while invalid. |
31
+ | `.field-group` | Composition | `<fieldset>` with a tunable legend gutter. |
32
+ | `.choice` | Composition | Choice-label layout around an inline control. |
33
+ | `.form-actions` | Composition | Class-only flex row that closes a form. |
34
+
35
+ `.input` shares the text-control recipe with `.textarea` and `.select`, and
36
+ `.select` also has an opt-in enhanced picker. `.field-label` works on a
37
+ `<span>`, a detached `<label>` or a `<legend>`. `.choice` wraps a `.check`,
38
+ `.radio` or `.switch`, and `.form-actions` works inside or outside the
39
+ `<form>`.
33
40
 
34
41
  ## Example form
35
42
 
@@ -1,8 +1,9 @@
1
1
  # Password Toggle
2
2
 
3
3
  > A password field reveals its value through a linked button. The markup is a
4
- > plain command invoker; the behavior ships with the JS runtime
5
- > (`actual-css/js` or `actual-css/js/password`).
4
+ > plain command invoker; the behavior ships with the full JS runtime
5
+ > (`actual-css/js/full`) and can also be imported independently
6
+ > (`actual-css/js/password`).
6
7
 
7
8
  Point a `button` at the input with `commandfor` and
8
9
  `command="--password-toggle"`. Use `.join` when the button should sit attached
@@ -1,8 +1,11 @@
1
1
  # Range
2
2
 
3
- > Native range inputs with theme-aware accent color.
3
+ > Native range input with a lightweight theme-aware custom skin.
4
4
 
5
- Core: native range, enhanced by `accent-color`. Optional richer skin may come later.
5
+ `.range` keeps the native range control and its interaction semantics, while
6
+ customizing the track, thumb, focus state, intents, and disabled state. The
7
+ focus ring targets the thumb — the surface the user actually manipulates —
8
+ rather than the CSS box.
6
9
 
7
10
  **Related terms:** slider, range input, scrubber.
8
11
 
@@ -13,7 +16,15 @@ Core: native range, enhanced by `accent-color`. Optional richer skin may come la
13
16
  </label>
14
17
  ```
15
18
 
19
+ Actual deliberately does not emulate filled tracks, tick marks, value labels,
20
+ or multi-thumb ranges. Those still require engine-specific pseudo-elements or a
21
+ value duplicated out of the HTML into CSS. Prefer the platform as richer range
22
+ styling becomes interoperable — see
23
+ [Enhanced range controls](https://github.com/lekoala/actual-css/blob/master/docs/design-notes/platform-alignment.md).
24
+
16
25
  ## CSS hooks
17
26
 
18
27
  - `--range-thumb-size` — thumb diameter.
19
28
  - `--range-track-height` — track thickness.
29
+ - `--range-thumb-bg` — thumb color. Defaults to the local intent, then `--primary`.
30
+ - `--range-track-bg` — track color.
@@ -4,10 +4,12 @@
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |-------|----------|------------------------------------------------------------------------------------------|
9
- | `.sm` | Modifier | Compact control height and spacing rhythm; sets `--control-size` to `--control-size-sm`. |
10
- | `.lg` | Modifier | Large control height and spacing rhythm; sets `--control-size` to `--control-size-lg`. |
7
+ | Class | Kind | Description |
8
+ | ----- | -------- | ------------------------------------------ |
9
+ | `.sm` | Modifier | Compact control height and spacing rhythm. |
10
+ | `.lg` | Modifier | Large control height and spacing rhythm. |
11
+
12
+ Each sets `--control-size` to `--control-size-sm` or `--control-size-lg`.
11
13
 
12
14
  Use `readonly` for text-like values that can still be focused, selected, and submitted. Use `disabled` for unavailable controls that should not receive focus or submit a value.
13
15
 
@@ -6,14 +6,18 @@
6
6
 
7
7
  ## Class reference
8
8
 
9
- | Class | Kind | Description |
10
- |---------------------|-------------|---------------------------------------------------------------------------------|
11
- | `.field-error` | Composition | Canonical inline error message; shown while the field is invalid. |
12
- | `.field-help` | Composition | Canonical helper text; carries supporting copy before and after validation. |
13
- | `.field.danger` | Modifier | Manual invalid marking on the field wrapper. |
14
- | `.needs-validation` | Modifier | Opt-in class for the validation enhancer and `:user-invalid` styling. |
15
- | `.was-validated` | Modifier | Added to the form by the enhancer after the first submit attempt. |
16
- | `.status-bar` | Component | Optional status element that shows `data-validation-message` on invalid submit. |
9
+ | Class | Kind | Description |
10
+ | ------------------- | ----------- | -------------------------------------------- |
11
+ | `.field-error` | Composition | Canonical inline error message. |
12
+ | `.field-help` | Composition | Canonical helper text. |
13
+ | `.field.danger` | Modifier | Manual invalid marking on the wrapper. |
14
+ | `.needs-validation` | Modifier | Opt-in for the enhancer and `:user-invalid`. |
15
+ | `.was-validated` | Modifier | Set by the enhancer after a submit attempt. |
16
+ | `.status-bar` | Component | Optional form-level status element. |
17
+
18
+ `.field-error` shows while the field is invalid; `.field-help` carries
19
+ supporting copy before and after validation. `.status-bar` shows
20
+ `data-validation-message` on an invalid submit.
17
21
 
18
22
  - `.field-error` is the canonical error message. It is wired to `aria-invalid="true"` via the input, so the visual border and the assistive-tech announcement move together.
19
23
  - `.field-help` is the canonical helper text. It carries supporting copy before and after validation.
@@ -49,7 +53,7 @@
49
53
 
50
54
  Native validation first; the enhancer only adds state and focus behavior.
51
55
 
52
- Actual CSS ships validation *styles*. Invalid fields are marked with `aria-invalid="true"` (or the manual `.field.danger` wrapper class). The default forms bundle imports `forms/validation.css`; custom builds may omit that file when validation styling is app-owned. A small enhancer (`actual-css/js/validation`), included in the default runtime (`actual-css/js`) and also importable on its own, prevents premature error display, marks invalid fields on blur and submit, focuses the first invalid field on submit, and supports a few custom rules. It is not a validation framework — server and AJAX validation stay in app code.
56
+ Actual CSS ships validation *styles*. Invalid fields are marked with `aria-invalid="true"` (or the manual `.field.danger` wrapper class). The default forms bundle imports `forms/validation.css`; custom builds may omit that file when validation styling is app-owned. A small enhancer (`actual-css/js/validation`), included in the full runtime (`actual-css/js/full`) and also importable on its own, prevents premature error display, marks invalid fields on blur and submit, focuses the first invalid field on submit, and supports a few custom rules. It is not a validation framework — server and AJAX validation stay in app code.
53
57
 
54
58
  Opt in with the `.needs-validation` class. Importing the module registers the behavior; there is no init call.
55
59
 
@@ -247,6 +247,7 @@ Icons used by CSS-only controls are public tokens because users may need to repl
247
247
  --icon-chevron: url("data:image/svg+xml,...");
248
248
  --icon-check: url("data:image/svg+xml,...");
249
249
  --icon-close: url("data:image/svg+xml,...");
250
+ --icon-plus: url("data:image/svg+xml,...");
250
251
  }
251
252
  ```
252
253
 
@@ -275,12 +276,14 @@ Under `forced-colors: active`, `--backdrop-fill` maps to `Canvas`.
275
276
 
276
277
  A small z-index scale orders non-dialog overlays. Native `<dialog>` elements (modal, drawer) render on the platform top-layer, which has no numeric z-index and always paints above the page — they never compete with this scale.
277
278
 
278
- | Token | Value | Used by |
279
- |---------------|-------|-----------------------------------------------------------------------------------|
280
- | `--z-sticky` | 10 | Sticky page chrome (`form-actions.sticky`, `topbar`). |
281
- | `--z-menu` | 20 | Floating menus (`flyout`); `.surface-backdrop` sits at `calc(var(--z-menu) - 1)`. |
282
- | `--z-tooltip` | 50 | Tooltips. |
283
- | `--z-status` | 60 | `status-bar`. |
279
+ | Token | Value | Used by |
280
+ | ------------- | ----- | ------------------------------- |
281
+ | `--z-sticky` | 10 | `form-actions.sticky`, `topbar` |
282
+ | `--z-menu` | 20 | Floating menus (`flyout`) |
283
+ | `--z-tooltip` | 50 | Tooltips |
284
+ | `--z-status` | 60 | `status-bar` |
285
+
286
+ `.surface-backdrop` sits just under the menus, at `calc(var(--z-menu) - 1)`.
284
287
 
285
288
  Stacking-context traps: a flyout or tooltip that is a DOM descendant of a dialog, or of a container with `transform`, `filter`, `contain`, `isolation`, or `will-change`, is confined to that ancestor's stacking context. Its z-index token only orders it against siblings within that context. When a dialog's top-layer clips a descendant flyout, move the flyout markup outside the dialog or use a portal/popover to escape the stacking context.
286
289
 
@@ -66,7 +66,7 @@ documentation homepages) import it manually:
66
66
  The module exposes three size tokens and three composed classes. It is deliberately not the foundation: body text, app UI, and the default prose scale stay static.
67
67
 
68
68
  | Token | Class | Purpose |
69
- |-------------------|-----------------|---------------------------------------|
69
+ | ----------------- | --------------- | ------------------------------------- |
70
70
  | `--fluid-display` | `.text-display` | Hero / display sizes. |
71
71
  | `--fluid-title` | `.text-title` | Section titles. |
72
72
  | `--fluid-lead` | `.text-lead` | Intro paragraphs on display surfaces. |
@@ -43,7 +43,7 @@ Remove the compatibility mechanism when Bootstrap is gone. The public Actual API
43
43
  Many common Bootstrap components translate directly.
44
44
 
45
45
  | Bootstrap | Actual CSS |
46
- |----------------------------|-------------------------|
46
+ | -------------------------- | ----------------------- |
47
47
  | `.btn .btn-primary` | `.btn .primary` |
48
48
  | `.btn .btn-outline-danger` | `.btn .danger .outline` |
49
49
  | `.btn .btn-sm` | `.btn .sm` |
@@ -101,7 +101,7 @@ Actual:
101
101
  Common translations include:
102
102
 
103
103
  | Bootstrap | Actual CSS |
104
- |-------------------------------|--------------------------------|
104
+ | ----------------------------- | ------------------------------ |
105
105
  | `.form-control` on an input | `.input` |
106
106
  | `.form-control` on a textarea | `.textarea` |
107
107
  | `.form-select` | `.select` |
@@ -213,7 +213,7 @@ Think in terms of the relationship between children rather than translating each
213
213
  Typical choices are:
214
214
 
215
215
  | Bootstrap pattern | Actual approach |
216
- |--------------------------------------------|--------------------------------------------|
216
+ | ------------------------------------------ | ------------------------------------------ |
217
217
  | flex row that may wrap | `.cluster` |
218
218
  | vertical flex stack | `.stack` |
219
219
  | exact structural columns | `.grid-2`, `.grid-3`, `.grid-4`, `.grid-6` |
@@ -140,7 +140,7 @@ internal design documents for contributors.
140
140
  Actual CSS is built around progressive enhancement.
141
141
 
142
142
  | Tier | Firefox | Safari | Chromium |
143
- |--------------|---------|-----------|----------|
143
+ | ------------ | ------- | --------- | -------- |
144
144
  | Degraded | 78+ | 14+ | 88+ |
145
145
  | **Minimal** | **98+** | **15.4+** | **99+** |
146
146
  | Intermediate | 121+ | 16+ | 106+ |
@@ -29,16 +29,27 @@ When an interactive state replaces the outline, it must preserve a visible focus
29
29
 
30
30
  ## Family manifests
31
31
 
32
- | Family | Import | Contents |
33
- | ---------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
34
- | Core | `actual-css/css` | reset, tokens, theme, base, intents, variants, focus, print |
35
- | Typography | `actual-css/css/typography` | prose, overline, fluid |
36
- | Layout | `actual-css/css/layout` | stack, cluster, center, frame, media, switcher, sidebar-layout, grid, scroller, scroll-snap, topbar, container-query, app-shell |
37
- | Forms | `actual-css/css/forms` | native control baseline |
38
- | Forms (complete) | `actual-css/css/forms/all` | base plus input-icon, switch, range, choice-card, custom-select, floating-field, otp |
39
- | Components | `actual-css/css/components` | buttons, surfaces, overlays, feedback, navigation, data and composed controls |
40
- | Effects | `actual-css/css/effects` | aura |
41
- | Utilities | `actual-css/css/utilities` | base and extra utilities |
32
+ Each family is one import. The contents are enumerations rather than table
33
+ cells, so they read as a list:
34
+
35
+ - **Core** — `actual-css/css`
36
+ reset, tokens, theme, base, intents, variants, focus, print
37
+ - **Typography** — `actual-css/css/typography`
38
+ prose, overline, fluid
39
+ - **Layout** — `actual-css/css/layout`
40
+ stack, cluster, center, frame, media, switcher, sidebar-layout, grid,
41
+ scroller, scroll-snap, topbar, container-query, app-shell
42
+ - **Forms** — `actual-css/css/forms`
43
+ native control baseline
44
+ - **Forms (complete)** — `actual-css/css/forms/all`
45
+ base plus input-icon, switch, range, choice-card, custom-select,
46
+ floating-field, otp
47
+ - **Components** — `actual-css/css/components`
48
+ buttons, surfaces, overlays, feedback, navigation, data and composed controls
49
+ - **Effects** — `actual-css/css/effects`
50
+ aura
51
+ - **Utilities** — `actual-css/css/utilities`
52
+ base and extra utilities
42
53
 
43
54
  Individual modules can be imported through their domain path:
44
55
 
@@ -3,7 +3,7 @@
3
3
  > The optional JavaScript runtime that progressively enhances Actual's semantic markup — self-registering side-effect modules, the `enhance()` DOM lifecycle, stateless command routing, and the floating and surface contracts for custom widgets.
4
4
 
5
5
  Actual's JavaScript modules are optional. Importing `actual-css/js/full`
6
- registers the complete default runtime — every built-in enhancer, including
6
+ registers the full runtime — every built-in enhancer, including
7
7
  validation and status. Importing `actual-css/js` registers only the enhancement
8
8
  manifest loader; importing a specific module registers only that behavior. The
9
9
  runtime does not require `DOMContentLoaded` or manual init calls, and it never
@@ -18,7 +18,7 @@ runtime evolves. The runtime assumes the modern platform primitives available
18
18
  across Minimal and ships no compatibility layer or polyfill.
19
19
 
20
20
  | Tier | Firefox | Safari | Chromium |
21
- |--------------|---------|-----------|----------|
21
+ | ------------ | ------- | --------- | -------- |
22
22
  | Degraded | 78+ | 14+ | 88+ |
23
23
  | **Minimal** | **98+** | **15.4+** | **99+** |
24
24
  | Intermediate | 121+ | 16+ | 106+ |
@@ -56,7 +56,7 @@ Modules are safe to import during SSR — registration is a no-op when there is
56
56
  DOM. The runtime remains active until the page unloads; there is no teardown
57
57
  handle, and cleanup happens per element when an element leaves the DOM.
58
58
 
59
- ## The default runtime
59
+ ## The full runtime
60
60
 
61
61
  Loading `dist/actual.full.js` as a plain `<script>` (no `type="module"`, no
62
62
  bundler, no `import`) gets the full runtime. Static HTML that needs to trigger
@@ -74,22 +74,25 @@ example:
74
74
  </script>
75
75
  ```
76
76
 
77
- | Module | Behavior |
78
- |------------------------------------|-------------------------------------------------------------------------------|
79
- | `actual-css/js/flyout` | Trigger → panel surface: positioning, open/close, sheet mode (token `flyout`) |
80
- | `actual-css/js/context-menu` | Context menus on `data-context-menu` |
81
- | `actual-css/js/focus-group` | Reusable roving-focus controller; no automatic discovery |
82
- | `actual-css/js/dialog` | Native `<dialog>` behavior, focus management, dismissal |
83
- | `actual-css/js/dismiss` | The generic `--dismiss` command |
84
- | `actual-css/js/tab` | Tab panels and arrow-key navigation (token `tabs`) |
85
- | `actual-css/js/tooltip` | Tooltips on `data-tooltip` |
86
- | `actual-css/js/scrollspy` | Scroll-driven nav highlighting (token `scrollspy`) |
87
- | `actual-css/js/filter` | Input value filtering on `data-filter` |
88
- | `actual-css/js/mask` | Input masks on `data-mask` |
89
- | `actual-css/js/password` | Password reveal toggle |
90
- | `actual-css/js/validation` | Form validation (token `validation`) |
91
- | `actual-css/js/status` | Singleton status bar on `[data-status][role="status"]` |
92
- | `actual-css/js/enhancement-loader` | Declared enhancement manifests (`data-enhance-modules`, `Enhance-Modules`) |
77
+ | Module | Behavior |
78
+ | ---------------------------------- | ----------------------------------------------------------- |
79
+ | `actual-css/js/flyout` | Trigger → panel positioning and open/close (token `flyout`) |
80
+ | `actual-css/js/context-menu` | Context menus on `data-context-menu` |
81
+ | `actual-css/js/focus-group` | Reusable roving-focus controller; no automatic discovery |
82
+ | `actual-css/js/dialog` | Native `<dialog>` behavior, focus management, dismissal |
83
+ | `actual-css/js/dismiss` | The generic `--dismiss` command |
84
+ | `actual-css/js/tab` | Tab panels and arrow-key navigation (token `tabs`) |
85
+ | `actual-css/js/tooltip` | Tooltips on `data-tooltip` |
86
+ | `actual-css/js/scrollspy` | Scroll-driven nav highlighting (token `scrollspy`) |
87
+ | `actual-css/js/filter` | Input value filtering on `data-filter` |
88
+ | `actual-css/js/mask` | Input masks on `data-mask` |
89
+ | `actual-css/js/password` | Password reveal toggle |
90
+ | `actual-css/js/validation` | Form validation (token `validation`) |
91
+ | `actual-css/js/status` | Singleton status bar on `[data-status][role="status"]` |
92
+ | `actual-css/js/enhancement-loader` | Declared enhancement manifests |
93
+
94
+ The enhancement loader reads its manifests from `data-enhance-modules` or the
95
+ `Enhance-Modules` header.
93
96
 
94
97
  Use `actual-css/js/full` for demos, playgrounds, and smoke tests where one import
95
98
  enables every built-in behavior. Production apps can import individual modules
@@ -125,7 +128,7 @@ see the widget-primitives design note. Every primitive subpath is published in
125
128
  `package.json#exports`:
126
129
 
127
130
  | Subpath | Purpose |
128
- |--------------------------|------------------------------------------------------------------|
131
+ | ------------------------ | ---------------------------------------------------------------- |
129
132
  | `actual-css/js/enhance` | DOM lifecycle engine: `enhance()`, `registerEnhancement`, tokens |
130
133
  | `actual-css/js/escape` | Per-document LIFO Escape dismissal stack |
131
134
  | `actual-css/js/events` | The `actual:*` event name constants |
@@ -155,14 +158,16 @@ const stop = autoUpdate(float, () => {
155
158
 
156
159
  Options passed to `reposition()`:
157
160
 
158
- | Option | Default | Contract |
159
- |----------------|------------------|------------------------------------------------------------------|
160
- | `placement` | `"bottom-start"` | Preferred side and alignment (`-start` / `-end`) |
161
- | `distance` | `0` | Gap between the reference and the floating element |
162
- | `flip` | `true` | Flip to the opposite side when the preferred side is out of view |
163
- | `shift` | `true` | Shift along the main axis to stay within the boundary |
164
- | `shiftPadding` | `4` | Minimum space kept from the boundary |
165
- | `scope` | viewport | Boundary element for overflow decisions |
161
+ | Option | Default | Contract |
162
+ | -------------- | ---------------- | ------------------------------------------- |
163
+ | `placement` | `"bottom-start"` | Preferred side and alignment |
164
+ | `distance` | `0` | Gap from the reference element |
165
+ | `flip` | `true` | Flip when the preferred side is out of view |
166
+ | `shift` | `true` | Shift along the main axis to stay in bounds |
167
+ | `shiftPadding` | `4` | Minimum space kept from the boundary |
168
+ | `scope` | viewport | Boundary element for overflow decisions |
169
+
170
+ `placement` takes a `-start` or `-end` alignment suffix.
166
171
 
167
172
  `autoUpdate(element, callback)` batches scroll, resize, and element-resize
168
173
  callbacks per document and returns a stop handle; it does not keep a closed or
@@ -206,22 +211,33 @@ visible dismissable UI to the shared per-document Escape stack.
206
211
  widgets can veto or decorate opens, and context menus inject their own
207
212
  `source`/`restoreFocusTo` through it.
208
213
 
209
- | Option | Default | Contract |
210
- |-------------------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
211
- | `trigger` | — | Anchoring element; also the focus-restore target by default |
212
- | `source` | — | Alternate anchor when there is no trigger |
213
- | `x`, `y` | — | Position at a fixed viewport point instead of an anchor (context menus) |
214
- | `placement` | `"bottom-start"` | Preferred placement |
215
- | `distance` | `4` | Gap between anchor and surface |
216
- | `flip` | `true` | Flip when the preferred side is out of view |
217
- | `shift` | `true` | Shift to stay within the boundary |
218
- | `shiftPadding` | `4` | Minimum space kept from the boundary |
219
- | `scope` | viewport | Boundary element |
220
- | `mobile` | `"auto"` | `"auto"`, `"sheet"`, `"none"`, or `"anchored"` sheet behavior |
221
- | `breakpoint` | `768` | Max viewport width for an automatic sheet |
222
- | `autoClose` | `"outside"` | `"true"` closes for inside and outside clicks; `"inside"` and `"outside"` limit the side; `"false"` disables automatic click closing. Invalid values use `"true"` |
223
- | `dismissOnScroll` | `false` | Close when scrolling outside the surface follows a new user input; opening/focus scroll is ignored |
224
- | `restoreFocusTo` | `trigger` or `source` | Element focused on close |
214
+ | Option | Default | Contract |
215
+ | ----------------- | ---------------- | ------------------------------------------- |
216
+ | `trigger` | — | Anchoring element, and focus-restore target |
217
+ | `source` | — | Alternate anchor when there is no trigger |
218
+ | `x`, `y` | — | Position at a fixed viewport point |
219
+ | `placement` | `"bottom-start"` | Preferred placement |
220
+ | `distance` | `4` | Gap between anchor and surface |
221
+ | `flip` | `true` | Flip when the preferred side is hidden |
222
+ | `shift` | `true` | Shift to stay within the boundary |
223
+ | `shiftPadding` | `4` | Minimum space kept from the boundary |
224
+ | `scope` | viewport | Boundary element |
225
+ | `mobile` | `"auto"` | Sheet behavior |
226
+ | `breakpoint` | `768` | Max viewport width for an automatic sheet |
227
+ | `autoClose` | `"outside"` | Which clicks close the surface |
228
+ | `dismissOnScroll` | `false` | Close on a scroll the user just started |
229
+ | `restoreFocusTo` | `trigger` | Element focused on close |
230
+
231
+ `x`, `y` replace the anchor entirely, which is what a context menu needs.
232
+ `mobile` takes `"auto"`, `"sheet"`, `"none"` or `"anchored"`.
233
+
234
+ `autoClose` takes `"true"` to close on inside and outside clicks, `"inside"` or
235
+ `"outside"` to limit it to one side, and `"false"` to disable automatic click
236
+ closing; an invalid value reads as `"true"`.
237
+
238
+ `dismissOnScroll` only fires when the scroll follows a new user input — the
239
+ scroll that opening or focusing causes is ignored. `restoreFocusTo` falls back
240
+ to `source` when there is no `trigger`.
225
241
 
226
242
  The click policy belongs to the surface rather than to a particular menu
227
243
  anatomy. The generic primitive defaults to outside-click dismissal; flyout and
@@ -242,14 +258,18 @@ The runtime dispatches a small set of public `actual:*` events. All are
242
258
  listenable on the document; cancelable events veto the associated action when
243
259
  `preventDefault()` is called.
244
260
 
245
- | Event | Dispatch | Contract |
246
- |------------------------|--------------------------------------------|------------------------------------------------------------------------------------------------|
247
- | `actual:surface-open` | `openSurface()`, before a surface opens | Cancelable. `detail: { surface, options }` |
248
- | `actual:context-menu` | context-menu, before its menu opens | Cancelable. `detail: { menu, context, origin, trigger }` |
249
- | `actual:status` | status module, or any code | Show or clear the status bar. `detail: { message, intent, duration }`; omit `message` to clear |
250
- | `actual:invalid` | validation, after a submit was blocked | `detail: { form, firstInvalid, message }` |
251
- | `actual:dialog-cancel` | dialog, before native cancel close | Cancelable. `detail: { dialog, sourceEvent }` |
252
- | `actual:dismiss` | `--dismiss` command, after hiding a target | `detail: { trigger }` |
261
+ | Event | Dispatch | `detail` |
262
+ | ---------------------- | ------------------------------ | ------------------------------------ |
263
+ | `actual:surface-open` | before a surface opens | `{ surface, options }` |
264
+ | `actual:context-menu` | before a context menu opens | `{ menu, context, origin, trigger }` |
265
+ | `actual:status` | status module, or any code | `{ message, intent, duration }` |
266
+ | `actual:invalid` | after a submit was blocked | `{ form, firstInvalid, message }` |
267
+ | `actual:dialog-cancel` | before a native cancel close | `{ dialog, sourceEvent }` |
268
+ | `actual:dismiss` | after `--dismiss` hid a target | `{ trigger }` |
269
+
270
+ `actual:surface-open`, `actual:context-menu` and `actual:dialog-cancel` are
271
+ cancelable. `actual:status` both shows and clears the status bar — omit
272
+ `message` to clear it.
253
273
 
254
274
  ## Extending the runtime
255
275
 
@@ -388,7 +408,8 @@ import { loadEnhancement, loadEnhancements, loadResponse } from "actual-css/js/e
388
408
 
389
409
  await loadEnhancements(); // every manifest block in the document
390
410
  await loadEnhancement("autosubmit", "/js/autosubmit.js");
391
- await loadResponse(fetch("/...").then((r) => r)); // Enhance-Modules header
411
+ const response = await fetch("/...");
412
+ await loadResponse(response); // Enhance-Modules header
392
413
  ```
393
414
 
394
415
  The `Enhance-Modules` HTTP header carries the same JSON object. Loaded modules
@@ -638,7 +659,7 @@ enhance({
638
659
 
639
660
  ## Form validation
640
661
 
641
- `actual-css/js/validation` is part of the default runtime and also importable on
662
+ `actual-css/js/validation` is part of the full runtime and also importable on
642
663
  its own — it is an enhancer, not a validation framework. Forms opt in with the
643
664
  `data-enhance="validation"` token (`.needs-validation` is a presentation class
644
665
  for CSS-only `:user-invalid` feedback and does not by itself register the
@@ -205,7 +205,7 @@ Actual does not prohibit media queries. It simply does not encode every media qu
205
205
  ## Utility translation guide
206
206
 
207
207
  | Tailwind usage | Actual approach |
208
- |--------------------------------------|---------------------------------------------------|
208
+ | ------------------------------------ | ------------------------------------------------- |
209
209
  | `flex flex-col gap-*` | `.stack` |
210
210
  | `flex flex-wrap items-center gap-*` | `.cluster` |
211
211
  | `grid grid-cols-*` | `.grid`, `.grid-2`, `.grid-3`, etc. |
@@ -407,7 +407,7 @@ Do not remove Tailwind from the build until migrated screens no longer depend on
407
407
  ## Where migration is genuinely harder
408
408
 
409
409
  | Existing Tailwind usage | Migration cost |
410
- |----------------------------------------------------|----------------|
410
+ | -------------------------------------------------- | -------------- |
411
411
  | buttons, badges, alerts, forms | low |
412
412
  | repeated card/panel patterns | low |
413
413
  | basic flex/grid composition | low to medium |
@@ -1,11 +1,11 @@
1
1
  # App Shell
2
2
 
3
- Full-height, single-column document flow. Despite its historical name, this is
4
- the general shell for ordinary pages as well as simple applications.
3
+ Full-height, single-column document flow. Use it as the outer shell for ordinary pages,
4
+ simple applications, and other layouts that need a header / main / footer structure spanning the viewport.
5
5
 
6
6
  Header and footer are document landmarks, not required layout classes.
7
- Use semantic elements by default. `.app-shell` already supplies the outer
8
- column, so do not add a `.stack` solely to arrange the page landmarks.
7
+ Use semantic elements by default. .app-shell already supplies the outer column,
8
+ so do not add a .stack solely to arrange the page landmarks.
9
9
 
10
10
  ```html demo
11
11
  <body class="app-shell">
@@ -5,10 +5,14 @@ number of children visible in one mockup.
5
5
 
6
6
  ## Page and application shells
7
7
 
8
- | Situation | Recipe |
9
- |---|---|
10
- | Public, marketing, editorial, or normally scrolling page | Semantic landmarks; optionally `.app-shell`, with `.navbar` for site navigation |
11
- | Persistent topbar + independently scrolling main + bottom-to-side primary navigation | `.app-layout` with its exact direct-child contract |
8
+ | Situation | Recipe |
9
+ | -------------------------------------- | ------------------------------------------- |
10
+ | A normally scrolling page | Semantic landmarks, optionally `.app-shell` |
11
+ | Topbar + scrolling main + adaptive nav | `.app-layout` |
12
+
13
+ The first covers public, marketing and editorial pages; add `.navbar` for site
14
+ navigation. The second is `.app-layout` with its exact direct-child contract,
15
+ where the primary navigation moves from bottom to side.
12
16
 
13
17
  Do not choose `.app-layout` from the word "app" or from the presence of a
14
18
  header. Its viewport-sized grid, hidden shell overflow, internal main scroll,
@@ -19,11 +23,11 @@ below.
19
23
  ## Content relationships
20
24
 
21
25
  | Situation | Primitive |
22
- |--------------------------------------------------------------|-------------------|
26
+ | ------------------------------------------------------------ | ----------------- |
23
27
  | Vertical flow | `.stack` |
24
28
  | Inline actions, tags, or navigation that may wrap | `.cluster` |
25
29
  | Responsive collection; an incomplete final row is acceptable | `.grid` |
26
- | Known structural density, at most N columns | `.grid-N` |
30
+ | Known structural density, at most N columns | `.grid-N` |
27
31
  | Peer regions that must switch together | `.switcher` |
28
32
  | Main content followed by a secondary region | `.sidebar-layout` |
29
33
  | Fixed media followed by flexible content | `.media` |