actual-css 0.1.0 → 0.2.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.
- package/CHANGELOG.md +53 -1
- package/README.md +2 -0
- package/dist/actual.css +356 -124
- package/dist/actual.js +2 -2
- package/dist/actual.js.map +13 -13
- package/dist/actual.min.css +1 -1
- package/docs/README.md +2 -0
- package/docs/components.md +2 -2
- package/docs/design-notes/browser-support.md +9 -0
- package/docs/design-notes/enhancement-contract.md +104 -0
- package/docs/design-notes/naming.md +1 -0
- package/docs/design-notes/widget-primitives.md +83 -0
- package/docs/forms.md +4 -4
- package/docs/javascript.md +104 -34
- package/docs/patterns.md +89 -0
- package/docs/ui.md +22 -30
- package/llms.txt +6 -0
- package/package.json +14 -8
- package/src/css/base.css +0 -4
- package/src/css/components/alert.css +88 -2
- package/src/css/components/badge.css +30 -7
- package/src/css/components/busy.css +1 -0
- package/src/css/components/button.css +6 -8
- package/src/css/components/flyout.css +0 -1
- package/src/css/components/join.css +1 -2
- package/src/css/components/scrollspy.css +2 -2
- package/src/css/components/spinner.css +4 -4
- package/src/css/components/status-bar.css +3 -4
- package/src/css/components/tab.css +1 -0
- package/src/css/focus.css +37 -0
- package/src/css/forms/choice-card.css +1 -2
- package/src/css/forms/choice.css +1 -2
- package/src/css/forms/control.css +1 -10
- package/src/css/forms/index.css +1 -0
- package/src/css/forms/native.css +8 -32
- package/src/css/forms/range.css +95 -0
- package/src/css/forms/switch.css +1 -2
- package/src/css/optional/scroller.css +6 -0
- package/src/css/theme.css +9 -9
- package/src/css/themes/edge.css +3 -27
- package/src/css/tokens.css +9 -3
- package/src/js/context-menu.js +21 -34
- package/src/js/enhance.js +26 -0
- package/src/js/flyout.js +12 -19
- package/src/js/menu.js +15 -14
- package/src/js/scrollspy.js +125 -62
- package/src/js/selectors.js +14 -24
- package/src/js/status.js +13 -13
- package/src/js/surface.js +57 -12
- package/src/js/tab.js +10 -13
- package/src/js/validation.js +11 -43
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,59 @@ All notable changes will be documented here.
|
|
|
4
4
|
|
|
5
5
|
This project follows Keep a Changelog and uses semver, including during 0.x.
|
|
6
6
|
|
|
7
|
-
## [0.
|
|
7
|
+
## [0.2.0] - 2026-07-28
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Enhancement contract: `class` = presentation, `data-enhance` = behaviour,
|
|
11
|
+
ARIA/HTML = semantics, `data-*` = configuration.
|
|
12
|
+
- `enhancementSelector()`, `hasEnhancement()`, `registerEnhancement()` in
|
|
13
|
+
`actual-css/js/enhance`.
|
|
14
|
+
- Primitive subpath exports: `events`, `focus`, `keys`, `menu`, `surface`.
|
|
15
|
+
- `.alert.callout` — neutral surface with inset intent accent band.
|
|
16
|
+
- `.alert.admonition` + `.alert-title` / `.alert-body` — structured anatomy.
|
|
17
|
+
- `.scroller.stable-gutter` — opt-in `scrollbar-gutter: stable`.
|
|
18
|
+
- `--shadow-xs` and two-layer `--shadow` token.
|
|
19
|
+
- `data-scrollspy-offset` attribute with deterministic geometry-based
|
|
20
|
+
activation (pixels or percentage, replaces IntersectionObserver).
|
|
21
|
+
- Widget primitives catalogue (`docs/design-notes/widget-primitives.md`).
|
|
22
|
+
- `.range` — fully custom-styled range slider (`appearance: none`) with
|
|
23
|
+
intent-tinted thumb, focus ring on the thumb surface, and disabled state.
|
|
24
|
+
- `check:enhance` guardrail script.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Behaviour discovery moved from presentation classes to `data-enhance` tokens
|
|
28
|
+
(`tabs`, `flyout`, `scrollspy`, `validation`). The old classes remain valid
|
|
29
|
+
for presentation-only or CSS-only modes.
|
|
30
|
+
- `status.js` now resolves its target via `[data-status][role="status"]` instead
|
|
31
|
+
of `.status-bar[data-status]`.
|
|
32
|
+
- `.badge` is soft by default; use `.solid` for counters. `:empty` dots
|
|
33
|
+
unchanged.
|
|
34
|
+
- `.btn` gap tightened to `0.375em` and weight to `--font-weight-medium`.
|
|
35
|
+
- `.spinner` default size is `1em` (was `1.5rem`), `.sm` = `0.75em`,
|
|
36
|
+
`.lg` = `2rem`.
|
|
37
|
+
- `--shadow` is a two-layer shadow (was single-layer), `--shadow-popout`
|
|
38
|
+
unchanged.
|
|
39
|
+
- Focus ring is now neutral (`--neutral:focus`), with a single consistent recipe
|
|
40
|
+
across all interactive controls. `forced-colors` fallback is centralised, and
|
|
41
|
+
theme-specific exceptions (Edge) removed.
|
|
42
|
+
- `selectors.js` holds written-state vocabulary only (discovery entries removed).
|
|
43
|
+
- `surface.js` owns its own teardown via `data-actual-surface` marker and
|
|
44
|
+
per-document binding.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- Menu-item detection no longer matches items of a neighbouring surface (D11).
|
|
48
|
+
- Keyboard navigation and click-autoclose work on surfaces with custom CSS.
|
|
49
|
+
- Orphaned mounted surfaces close when their trigger/context target is removed (D9).
|
|
50
|
+
- `surface.js` teardown and outside-click listener bind per owning document (D22).
|
|
51
|
+
|
|
52
|
+
### Removed
|
|
53
|
+
- `FormValidator.init()` default selector changed from `.needs-validation` to
|
|
54
|
+
the `data-enhance="validation"` token. The live opt-out (removing the class
|
|
55
|
+
from a connected form) is gone — the marker is read once at connect.
|
|
56
|
+
- Five runtime `.needs-validation` re-checks removed — `init(customSelector)`
|
|
57
|
+
now actually works.
|
|
58
|
+
|
|
59
|
+
## [0.1.0] - 2025-04
|
|
8
60
|
|
|
9
61
|
- Initial pre-1.0 package surface.
|
|
10
62
|
- Public class grammar, theme contract, runtime DOM tests, and build guardrails.
|
package/README.md
CHANGED
|
@@ -109,6 +109,8 @@ Browse [`src/css/optional/`](src/css/optional/) for available modules such as cu
|
|
|
109
109
|
|
|
110
110
|
Some components can be enhanced with JavaScript: dialog/drawer, flyout, tooltip, tabs, scrollspy, context menu, floating UI, opt-in `data-filter` input filtering, and input masks.
|
|
111
111
|
|
|
112
|
+
In 0.2, presentation (`class`) and behaviour (`data-enhance`) are separate layers — import any primitive independently to build custom widgets. See [enhancement contract](docs/design-notes/enhancement-contract.md) and [widget primitives](docs/design-notes/widget-primitives.md).
|
|
113
|
+
|
|
112
114
|
Use the full module:
|
|
113
115
|
|
|
114
116
|
```html
|