actual-css 0.10.0 → 0.11.1
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 +99 -1
- package/README.md +6 -2
- package/components.json +14 -3
- package/dist/actual.full.css +483 -128
- package/dist/actual.full.js +1 -1
- package/dist/actual.full.min.css +1 -1
- package/docs/design-notes/enhancement-contract.md +16 -7
- package/docs/design-notes/platform-alignment.md +8 -4
- package/docs/design-notes/rich-text.md +61 -0
- package/docs/design-notes/steps.md +2 -2
- package/docs/navigation.json +4 -1
- package/docs/pages/components/aura.md +12 -13
- package/docs/pages/components/badge.md +10 -0
- package/docs/pages/components/bleed.md +5 -4
- package/docs/pages/components/button.md +1 -1
- package/docs/pages/components/chat.md +5 -0
- package/docs/pages/components/close.md +9 -3
- package/docs/pages/components/dialog.md +145 -13
- package/docs/pages/components/meter.md +2 -0
- package/docs/pages/components/pagination.md +15 -15
- package/docs/pages/components/shimmer.md +57 -0
- package/docs/pages/components/skeleton.md +2 -1
- package/docs/pages/components/spinner.md +11 -6
- package/docs/pages/components/table.md +13 -0
- package/docs/pages/enhancements/flyout.md +2 -0
- package/docs/pages/enhancements/tabs.md +4 -0
- package/docs/pages/examples/overview.md +1 -0
- package/docs/pages/forms/choice-cards.md +77 -4
- package/docs/pages/forms/combobox.md +16 -1
- package/docs/pages/forms/overview.md +4 -1
- package/docs/pages/forms/range.md +110 -5
- package/docs/pages/forms/rich-text.md +110 -0
- package/docs/pages/forms/validation.md +5 -1
- package/docs/pages/foundations/theming.md +49 -3
- package/docs/pages/foundations/tokens.md +15 -5
- package/docs/pages/guides/bootstrap.md +2 -1
- package/docs/pages/guides/design-tools.md +36 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/docs/pages/guides/modular-import.md +1 -1
- package/docs/pages/guides/progressive-enhancement.md +13 -14
- package/docs/pages/guides/tailwind.md +4 -2
- package/llms.txt +4 -3
- package/package.json +6 -1
- package/reserved-classes.json +1 -0
- package/skills/actual-css/references/enhancements.md +35 -0
- package/src/cli/actual-css.js +49 -6
- package/src/css/components/avatar.css +1 -1
- package/src/css/components/bleed.css +5 -5
- package/src/css/components/button.css +14 -1
- package/src/css/components/close.css +17 -6
- package/src/css/components/flyout.css +4 -1
- package/src/css/components/meter.css +6 -3
- package/src/css/components/modal.css +123 -7
- package/src/css/components/pagination.css +3 -2
- package/src/css/components/rating.css +1 -1
- package/src/css/components/status-bar.css +2 -2
- package/src/css/components/steps.css +3 -3
- package/src/css/components/tab.css +3 -3
- package/src/css/components/table.css +6 -0
- package/src/css/components/tooltip.css +1 -1
- package/src/css/core/focus.css +14 -4
- package/src/css/core/theme.css +8 -0
- package/src/css/core/tokens.css +8 -4
- package/src/css/core/variants.css +2 -1
- package/src/css/effects/aura.css +51 -33
- package/src/css/effects/index.css +1 -0
- package/src/css/effects/shimmer.css +57 -0
- package/src/css/forms/choice-card.css +71 -23
- package/src/css/forms/control.css +2 -2
- package/src/css/forms/native.css +5 -1
- package/src/css/forms/otp.css +9 -1
- package/src/css/forms/range.css +64 -21
- package/src/js/command.js +61 -32
- package/src/js/dialog.js +8 -23
- package/src/js/dismiss.js +1 -2
- package/src/js/enhance.js +84 -123
- package/src/js/full.js +1 -0
- package/src/js/password.js +1 -8
- package/src/js/range.js +151 -0
- package/src/js/scrollspy.js +4 -5
- package/src/js/status.js +2 -10
- package/src/js/tooltip.js +11 -1
- package/src/js/validation.js +4 -10
- package/src/tooling/design-components.js +286 -0
- package/src/tooling/design-export.js +69 -0
- package/src/tooling/design-tokens.js +466 -0
- package/src/tooling/penpot-plugin/manifest.json +7 -0
- package/src/tooling/penpot-plugin/plugin.js +272 -0
- package/src/tooling/penpot-plugin/ui.html +58 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.11.1] - 2026-09-30
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `dialog.modal > header` provides aligned icon/title/action chrome through `--modal-header-bg`; modal body wrappers expose `--modal-pad` and support `.bleed` bands.
|
|
10
|
+
- `actual-css design` (Bun) exports a theme to Figma and Penpot tokens; see `docs/pages/guides/design-tools.md`.
|
|
11
|
+
- `actual-css design` writes a Penpot plugin that builds Button, Input, Badge, Alert and Card bound to those tokens.
|
|
12
|
+
- Soft fills and borders export as recipe tokens named `<variant>-<intent>-<role>` (`soft-danger-bg`).
|
|
13
|
+
- `scripts/serve.js --cors` serves the repository to another origin, such as penpot.app loading a local plugin.
|
|
14
|
+
- `--meter-track` sets the `.meter` track, matching `--progress-track`.
|
|
15
|
+
- `--close-bg` sets the dialog corner `.close` background, so a dialog over a painted band can drop the default chip.
|
|
16
|
+
- `--close-color` and `--close-hover-color` set the X ink at rest and on hover, so a bare X can take a painted band's foreground.
|
|
17
|
+
- `--close-hover-overlay` routes the `.close` hover/active wash (matching `--btn-hover-overlay`); the modal/drawer corner sets it transparent so only the ink changes.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- `dialog.modal` is borderless: the raised surface and shadow define the panel, so a full-bleed header, footer, or hero band no longer meets a hard edge; a forced-colors border keeps the outline.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- A corner `.close` that is a direct child of `dialog.modal > header` reserves inline room for itself; previously only the wrapper `<header>` did, so a long chrome title could run under it.
|
|
26
|
+
- `dialog.modal` derives one `--dialog-inner-radius` for the body wrapper, the header band, and the `.dialog-confirmation` footer, so an edge band keeps the panel corner instead of taking its own radius.
|
|
27
|
+
- The `.dialog-confirmation` action band spreads a two-action decision to its edges, keeping a cancel action apart from the committing one.
|
|
28
|
+
- `.dialog-confirmation` centers its leading icon on the title while keeping supporting copy in the same text column.
|
|
29
|
+
- `.btn` and the `.file` selector button take their borders out of the block padding, so they match `.input` height at every size instead of standing 2px taller outside a `.join`.
|
|
30
|
+
- `tests/browser/control-geometry.test.js` measures controls outside a `.join`, whose stretch had hidden the mismatch.
|
|
31
|
+
|
|
32
|
+
## [0.11.0] - 2026-09-30
|
|
33
|
+
|
|
34
|
+
### Breaking changes
|
|
35
|
+
|
|
36
|
+
- `enhancementSelector()` and `hasEnhancement()` are no longer exported from `actual-css/js/enhance`; query `[data-enhance~="name"]` directly.
|
|
37
|
+
- `registerCommands()` drops the `prepare` callback; write `aria-controls`, `aria-haspopup`, and `aria-pressed` on command buttons in the markup.
|
|
38
|
+
- `registerCommands()` and `commandSelector()` throw on a name that is neither a native `command` keyword nor a custom `--` command.
|
|
39
|
+
- `FormValidator.init()` is removed; the module self-registers, and `applyEnhancement("validation", selector)` opts forms in by selector.
|
|
40
|
+
- The non-modal dialog command is `command="--show"`; `command="show"` is not an HTML keyword and no longer opens a dialog.
|
|
41
|
+
- `.choice-card` shows its control on the leading edge — a ring (radio) or box (checkbox) at rest that fills with the check — instead of a corner badge shown only once checked; the badge is now the "Corner badge" recipe in `docs/pages/forms/choice-cards.md`.
|
|
42
|
+
- `.choice-card` is a two-column grid: each child element of the label becomes a row beside the indicator, so loose text needs an element.
|
|
43
|
+
- `--choice-card-check-size` defaults to `1.25em` and also sets the width of the `.choice-card` indicator column.
|
|
44
|
+
- `--aura-width` is the whole painted `.aura` frame (the border, no padding); `--aura-width: 3px` reproduces the former default frame.
|
|
45
|
+
- `.aura` defaults to a thin lit line: `--aura-width: 1px` and `--aura-intensity: 0.4`.
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- `--surface-opaque` and `--surface-solid-fg` let a theme paint translucent surfaces while rings, separators and inverse text stay opaque.
|
|
50
|
+
- `report:theme-contrast` reports the `--surface-solid-fg` on `--surface-solid` text pair.
|
|
51
|
+
- `scripts/utils/color.js` holds the WCAG contrast and OKLCH math for reports and browser tests; `contrast()` refuses translucent colors.
|
|
52
|
+
- `glass` demo theme: translucent surfaces over a theme-painted backdrop, a stress test of the opaque surface roles.
|
|
53
|
+
- `tests/browser/translucent-surface.test.js` keeps rings, separators, step markers, and inverse text opaque over translucent surfaces.
|
|
54
|
+
- `--choice-card-gap` sets the space between a `.choice-card` indicator and its label.
|
|
55
|
+
- `tests/browser/choice-card.test.js` locks the leading indicator: visible at rest, level with the first line of a wrapping label, and kept under forced colors.
|
|
56
|
+
- `.shimmer` (`actual-css/css/effects/shimmer`) sweeps a highlight across a text label for an activity in progress; hooks `--shimmer-color` and `--shimmer-highlight`.
|
|
57
|
+
- `.range` moves to a `1.125rem` thumb on a `0.625rem` track with a `data-enhance="range"` fill (`--range-progress`) and named `datalist` values (`aria-valuetext` plus `output` sync).
|
|
58
|
+
- `--flyout-pad` gives rich flyout panels dialog air.
|
|
59
|
+
- `tests/browser/control-geometry.test.js` locks the shared control block geometry: input, select, addon, and buttons (including busy and icon-only) share one height per size, and the spinner follows its context at `1em`.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- `--indicator-ring`, the `.avatar-stack` ring, the `.range` thumb separator, segmented `.meter` separators and `.steps` markers read `--surface-opaque`.
|
|
64
|
+
- `.tooltip` text reads `--surface-solid-fg`.
|
|
65
|
+
- `.aura` masks its frame under the child with `--surface-opaque`, so a transparent or translucent child is framed rather than filled.
|
|
66
|
+
- The `.aura` far halo is an outer `box-shadow`, so it never paints under the child.
|
|
67
|
+
- `.status-bar` without an intent paints `--surface-solid` / `--surface-solid-fg` instead of `--text` / `--surface`.
|
|
68
|
+
- `registerEnhancement()` discovers every named behavior through one shared `[data-enhance]` query per root instead of one `[data-enhance~="name"]` selector each.
|
|
69
|
+
- The command router calls `event.preventDefault()` once a target resolves, before `handle`; handlers no longer cancel the click themselves.
|
|
70
|
+
- `--focus-outline` (the generic `currentColor` focus fallback) is `--focus-ring-width` wide instead of `2 × --border-width`: 3px instead of 4px under `prefers-contrast: more`.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- `actual-css/js/range` synchronizes fill, `aria-valuetext`, and outputs after a native form reset, including controls associated through `form="…"`, while respecting cancellation and teardown.
|
|
75
|
+
- Docs search leaves Enter on the close button and IME confirmation alone, and ArrowUp from no selection reaches the last result.
|
|
76
|
+
- `demo/sites/admini/chat.html` loads the shared composer recipe before local overrides so the bottom bar keeps its flat border and compact textarea.
|
|
77
|
+
- `.otp` with `.input` on its native input no longer draws the field focus ring around all the cells.
|
|
78
|
+
- Docs search keeps focus in the input while arrowing through results (`aria-activedescendant` + `Home`/`End`), so the second and later matches are reachable by keyboard; `Enter` follows the highlight instead of closing the dialog.
|
|
79
|
+
- `.tab` and `.rating` draw the component focus ring (`--focus-ring-width` solid `--focus`): an intent on the rating no longer becomes the focus color, and neither ring is 4px under `prefers-contrast: more`.
|
|
80
|
+
- `commandSelector()` matches native command keywords case-insensitively, as the router does.
|
|
81
|
+
- The command router ignores a trigger disabled through a `<fieldset disabled>` ancestor.
|
|
82
|
+
- `tooltip.js` shows on focus only when the trigger matches `:focus-visible`: a pointer press, or focus handed back by a dialog closed with the pointer, no longer brings the tooltip back.
|
|
83
|
+
|
|
84
|
+
### Documentation and tooling
|
|
85
|
+
|
|
86
|
+
- Choice cards: a stacked-list demo, and a "Corner badge" recipe (`.choice-tile`) that the Neon Ramen item page uses for its tiles.
|
|
87
|
+
- `tests/browser/choice-chip.test.js` asserts the chip's dot layer keeps its height, not just its clip and colour.
|
|
88
|
+
- `tests/exports.test.js` keys its inventory on every JS subpath of `package.json#exports`, so a new subpath or an export on an unlisted module now fails the suite.
|
|
89
|
+
- Docs search ranks a query token inside a longer alias (`select` finds the Combobox page via `searchable select`) and matches body text on word boundaries, so `selection` no longer outranks `select`; Combobox and Forms carry `select`, `custom select`, and `form controls` aliases.
|
|
90
|
+
- `focus.css` documents two focus contracts: text-like elements keep the `currentColor` fallback, boxed components draw the `--focus` ring, and an invalid field's `--form-invalid-border` ring is the one exception.
|
|
91
|
+
- `tests/css-audit.test.js` fails on any framework `outline` outside the two focus contracts.
|
|
92
|
+
- `report:theme-contrast` reports each preset's invalid-field focus line against the field background.
|
|
93
|
+
- `check:sync` fails when the `.sm` and `.lg` participant lists in `variants.css` diverge.
|
|
94
|
+
- Tailwind guide: `.outline` is named as the dangerous collision, with `.table`, `.sticky`, `.truncate`, `.prose`, and `.sr-only`.
|
|
95
|
+
- Tailwind and Bootstrap guides: a prefix transform is consumer-pipeline work and must also rename the runtime state classes in `actual-css/js/selectors`.
|
|
96
|
+
- Table: clarified the responsive boundary — horizontal overflow (`.table-wrap` + `--table-min` + accessible scroll) stays the strategy, and the docs now name the alternatives (list/media view, `.data-list`, dedicated data grid).
|
|
97
|
+
- Badge vs choice chip vs removable tag vocabulary: a badge is information (non-interactive), `choice-card.chip` is a selectable label (never nest a `.close` inside it), and removable tags belong to the widget that produced them.
|
|
98
|
+
- Combobox: a "Bridge contract" section names what Actual owns (tokens, focus, invalid, `.join`, contrast) versus the widget (behavior, multi-value, i18n), and keeps the bridge CSS in docs/demo.
|
|
99
|
+
- Tabs: the `.tabs` strip / `.tab` trigger pair is documented as the container/item convention, with the `tab` module versus `tabs` token split stated.
|
|
100
|
+
- Pagination: items are documented as `.btn.ghost` with chevrons on Previous/Next, so `aria-current="page"` is the only filled item.
|
|
101
|
+
- Rich text: `demo/templates/rich-text.html` is now an `@lekoala/rich-text` integration (`@0.2` from jsDelivr) instead of a hand-wired Squire prototype, with the skin reduced to a `--rt-*` token bridge plus a rich composer reusing `.composer` chrome.
|
|
102
|
+
|
|
5
103
|
## [0.10.0] - 2026-09-25
|
|
6
104
|
|
|
7
105
|
### Breaking changes
|
|
@@ -81,7 +179,7 @@
|
|
|
81
179
|
- Button: a dark button (formerly `.btn.inverted`) is a custom intent, `--intent: var(--surface-solid)` / `--intent-fg: var(--surface)`.
|
|
82
180
|
- `demo/templates/surfaces.html` is removed; `contrast-contexts.html` covers surface boundaries.
|
|
83
181
|
- `tests/browser/inverted.test.js` becomes `surface-context.test.js`, on an application-painted band.
|
|
84
|
-
- Pushing a version tag publishes the GitHub release:
|
|
182
|
+
- Pushing a version tag publishes the GitHub release: `bun run release` bumps, dates, rebuilds, commits and tags on the bare format, `bun run release:notes` extracts (and validates) the dated changelog section, and the CI `release` job attaches `dist/`.
|
|
85
183
|
- Theming: a "Replace the palette with my own brand" entry names the tinted neutrals and soft-ink tokens a partial override leaves behind, and points at the minimal recolor set.
|
|
86
184
|
- Tokens: the minimal recolor theme includes `--shadow-color`.
|
|
87
185
|
- Tokens: a "Where a token is declared" section separates global, component-scoped, and relay properties, and shows the `var(--card-pad, <default>)` form for reading a component hook from outside.
|
package/README.md
CHANGED
|
@@ -42,6 +42,10 @@ Flatten the composition for production with
|
|
|
42
42
|
resolves package subpaths and relative files, then inlines them without
|
|
43
43
|
transpiling modern CSS.
|
|
44
44
|
|
|
45
|
+
Hand your theme to designers with `bunx actual-css design --theme theme.css --out design/`:
|
|
46
|
+
Figma and Penpot tokens, plus a Penpot plugin that builds the core components.
|
|
47
|
+
See [Design tools](docs/pages/guides/design-tools.md).
|
|
48
|
+
|
|
45
49
|
### Full bundle (zero-config)
|
|
46
50
|
|
|
47
51
|
The bare `actual-css` entrypoint and `actual-css/full` both resolve to the
|
|
@@ -53,7 +57,7 @@ size is not worth optimizing:
|
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
```html
|
|
56
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
60
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.11/dist/actual.full.min.css">
|
|
57
61
|
```
|
|
58
62
|
|
|
59
63
|
## Usage
|
|
@@ -127,7 +131,7 @@ registries:
|
|
|
127
131
|
* **Full runtime, zero-config** — every built-in enhancer, compiled:
|
|
128
132
|
|
|
129
133
|
```html
|
|
130
|
-
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
134
|
+
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.11/dist/actual.full.js" type="module"></script>
|
|
131
135
|
```
|
|
132
136
|
|
|
133
137
|
* **Your own build** — copy the package's `src/js/full.js` as your entry,
|
package/components.json
CHANGED
|
@@ -135,7 +135,8 @@
|
|
|
135
135
|
"source": "src/css/components/bleed.css",
|
|
136
136
|
"cssImport": "actual-css/css/components/bleed",
|
|
137
137
|
"classes": [
|
|
138
|
-
"bleed"
|
|
138
|
+
"bleed",
|
|
139
|
+
"stack"
|
|
139
140
|
],
|
|
140
141
|
"publicHooks": [
|
|
141
142
|
"--bleed-pad"
|
|
@@ -198,6 +199,7 @@
|
|
|
198
199
|
"--btn-default-hover-bg",
|
|
199
200
|
"--btn-border-block-end-color",
|
|
200
201
|
"--btn-border-block-end-width",
|
|
202
|
+
"--btn-border-block",
|
|
201
203
|
"--spinner-width"
|
|
202
204
|
],
|
|
203
205
|
"states": [
|
|
@@ -262,7 +264,11 @@
|
|
|
262
264
|
],
|
|
263
265
|
"publicHooks": [
|
|
264
266
|
"--close-size",
|
|
265
|
-
"--close-icon-size"
|
|
267
|
+
"--close-icon-size",
|
|
268
|
+
"--close-bg",
|
|
269
|
+
"--close-color",
|
|
270
|
+
"--close-hover-color",
|
|
271
|
+
"--close-hover-overlay"
|
|
266
272
|
]
|
|
267
273
|
},
|
|
268
274
|
{
|
|
@@ -326,7 +332,8 @@
|
|
|
326
332
|
],
|
|
327
333
|
"publicHooks": [
|
|
328
334
|
"--flyout-inline-size",
|
|
329
|
-
"--flyout-max-inline-size"
|
|
335
|
+
"--flyout-max-inline-size",
|
|
336
|
+
"--flyout-pad"
|
|
330
337
|
],
|
|
331
338
|
"internalHooks": [
|
|
332
339
|
"--menu-item-size",
|
|
@@ -443,6 +450,7 @@
|
|
|
443
450
|
"meter"
|
|
444
451
|
],
|
|
445
452
|
"publicHooks": [
|
|
453
|
+
"--meter-track",
|
|
446
454
|
"--meter-value",
|
|
447
455
|
"--bar-height"
|
|
448
456
|
]
|
|
@@ -462,11 +470,14 @@
|
|
|
462
470
|
],
|
|
463
471
|
"publicHooks": [
|
|
464
472
|
"--modal-size",
|
|
473
|
+
"--modal-pad",
|
|
474
|
+
"--modal-header-bg",
|
|
465
475
|
"--dialog-viewport-gap",
|
|
466
476
|
"--dialog-icon-size",
|
|
467
477
|
"--dialog-icon-glyph-size"
|
|
468
478
|
],
|
|
469
479
|
"internalHooks": [
|
|
480
|
+
"--dialog-inner-radius",
|
|
470
481
|
"--dialog-focus-bleed",
|
|
471
482
|
"--dialog-viewport-block",
|
|
472
483
|
"--dialog-viewport-gap-default",
|