@expressivecss/expressive 0.8.0 → 0.9.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 +48 -1
- package/README.md +69 -26
- package/dist/css/expressive.css +657 -85
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/fonts/LICENSE-material-symbols +93 -0
- package/dist/fonts/LICENSE-noto-sans +93 -0
- package/dist/fonts/LICENSE-roboto +93 -0
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-400.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-500.woff2 +0 -0
- package/dist/fonts/roboto-latin-400.woff2 +0 -0
- package/dist/fonts/roboto-latin-500.woff2 +0 -0
- package/dist/js/expressive.cjs +501 -144
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +501 -144
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -10
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +501 -144
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/components/appBar.d.ts +26 -0
- package/dist/types/components/buttonGroup.d.ts +39 -0
- package/dist/types/components/cards.d.ts +11 -13
- package/dist/types/components/expandingCard.d.ts +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/menu.d.ts +4 -0
- package/dist/types/components/registry.d.ts +10 -0
- package/dist/types/components/timepicker.d.ts +0 -1
- package/dist/types/components/tooltip.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +25 -3
- package/src/sass/abstracts/_mixins.scss +52 -0
- package/src/sass/abstracts/_variables.scss +19 -0
- package/src/sass/base/_fonts.scss +63 -0
- package/src/sass/components/_badges.scss +1 -2
- package/src/sass/components/_button-groups.scss +252 -80
- package/src/sass/components/_cards.scss +108 -93
- package/src/sass/components/_expanding-card.scss +1 -35
- package/src/sass/components/_icon-buttons.scss +2 -24
- package/src/sass/components/_icons-material-design.scss +6 -6
- package/src/sass/components/_navbar.scss +180 -27
- package/src/sass/components/_navigation-bar.scss +9 -1
- package/src/sass/components/_navigation-rail.scss +9 -1
- package/src/sass/components/_transitions.scss +8 -1
- package/src/sass/components/forms/_select.scss +38 -0
- package/src/sass/expressive.scss +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,52 @@ the format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.9.0] - 2026-09-08
|
|
9
|
+
|
|
10
|
+
### Migration from 0.8.0
|
|
11
|
+
|
|
12
|
+
- Replace card-reveal `.activator` headings and separate close controls with a
|
|
13
|
+
native `<button type="button" class="card-reveal-trigger" aria-controls="details">`.
|
|
14
|
+
Its closest card must contain exactly one direct reveal panel with the matching
|
|
15
|
+
`id="details"`. Use unique IDs for each card and give every trigger an accessible
|
|
16
|
+
name. The runtime owns `aria-expanded`; legacy triggers no longer toggle panels.
|
|
17
|
+
- Use `<div class="actions">` for card command groups instead of `<nav>`.
|
|
18
|
+
- Review layouts that depend on medium or large app-bar heights and typography;
|
|
19
|
+
their flexible-bar sizes now follow the mappings listed below.
|
|
20
|
+
- Include `dist/fonts/` beside `dist/css/` when copying the compiled distribution.
|
|
21
|
+
Sass consumers that load their own fonts can set `$expressive-include-fonts: false`.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Community contribution and security policies, required CI, independently versioned MCP releases, and stable-release documentation deployment. Tracks [#134](https://github.com/BaezFJ/ExpressiveCSS/issues/134).
|
|
26
|
+
- **Self-hosted fonts.** The compiled stylesheet ships `@font-face` rules and `dist/fonts/` holds the woff2 files the tokens name: variable Material Symbols (outlined, rounded, sharp), Latin Roboto 400/500, and Latin Noto Sans 400/500. Keep `dist/fonts/` next to `dist/css/`. Sass consumers can set `$expressive-font-path` or `$expressive-include-fonts: false`.
|
|
27
|
+
- **M3 Expressive Button Groups.** Standard groups now redistribute a pressed item's 15% width growth from adjacent items; connected groups support native-button single and multiple selection through `data-selection` and `aria-pressed`. All five sizes support common and icon buttons, explicit child-size overrides, fast-spatial shape motion, 48dp minimum targets, selected color/shape/icon cues, and optional required selection.
|
|
28
|
+
- **M3 Expressive app bar.** `.medium` and `.large` are the flexible bars: 112dp / `headline-medium` and 120dp / `display-small`. A subtitle is `<hgroup>` plus a `<p>` (136dp / 152dp). Titles wrap to two lines. `center` works on all three sizes. The search app bar is a `<search class="search-bar">` in the header. `AppBar` collapses the flexible bars on scroll and opens the related search view when the search field is selected.
|
|
29
|
+
- **ExpressiveCSS design and review skill.** The workflow now uses explicit Implement, Refine, Redesign, Critique, and Audit modes; turns product and brand decisions into Material 3 Expressive components and tokens; covers every reachable state and relevant localization or offline behavior; and closes with responsive browser evidence, an independent finish review when delegation is available, and a non-numeric review matrix with pass, intentional-adaptation, fail, and not-applicable outcomes.
|
|
30
|
+
- **Deterministic skill review evidence.** Critique, Audit, and component-contract checks now use stable criterion IDs, falsifiable claims, criterion-owned evidence rules, a fixture-owned state and responsive-boundary ledger, explicit `Blocked` handling, and exact matched captures collected before Refine or Redesign edits.
|
|
31
|
+
- **Versioned skill contracts and component decisions.** Generated guides now carry framework version, stable component-rule IDs, and source-hash provenance across every contract input. A portable resolver requires a direct dependency, selects one active lockfile, records structured conflicts, and fails closed on ambiguous, malformed, symbolic-linked, or unreadable npm, pnpm, or Yarn metadata. Contract equality follows SemVer precedence, so build metadata does not create a false mismatch. One structured catalogue owns guide extraction and selection guidance for all 46 components.
|
|
32
|
+
- **Behavioral skill evaluations.** Root-only replay cases count exact-path guide reads from tool traces and fail closed on missing, duplicate, unknown, or unevaluated critical invariant IDs. Mutation cases verify no-edit modes, required reads, evidence and event order, fixture-owned states, matched captures, older-version handling, token-based branding, dynamic ARIA, runtime ownership, and scoped MCP claims. Root-skill, case, and replay reads are descriptor-bounded; nested keys and values are capped; matched-capture chronology is bound to the first trusted edit. The runner rejects executable regular-expression assertions. Reports and adapter failures redact credential-shaped keys and values, authorization headers, credential-bearing URLs, and local paths before storage or display.
|
|
33
|
+
- **Bounded MCP evidence.** MCP setup, rule, syntax, and quality steps work independently and report checks performed, evidence sources, inspected and uninspected files, unchecked areas, coverage, blocked checks, and contract compatibility. Static checks detect retired markup, duplicate initialization, missing teardown evidence tied to the initialized variable, raw authored colors, and semantics violations. MCP guide content comes only from its synchronized package data and is checked against the bundled contract; local framework-source contracts affect source provenance but cannot replace package guidance or diverge from its version and source hash. Installed and locked versions outside their direct manifest range are blocked. Missing inputs, failed commands, timeouts, stale or divergent provenance, unresolved contracts, aggregate file limits, and partial static scans block instead of producing a broad pass. Command execution requires an operator allowlist, uses a credential-free environment, and has bounded input and runtime limits. A command timeout still force-kills the process group after SIGTERM.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Menu cancels superseded transition and deferred event callbacks on reversal and destruction, preserving visibility, focus and end-callback ownership.
|
|
38
|
+
- Menu installs keyboard handlers before moving initial focus, so Escape works immediately after a zero-duration opening.
|
|
39
|
+
- Filled enhanced selects reserve label space so enlarged and multiline RTL/LTR labels do not overlap the selected value.
|
|
40
|
+
|
|
41
|
+
- Scale transitions now honor reduced-motion preferences, including changes during motion.
|
|
42
|
+
- Expanding-card close cleanup follows the CSS container transition instead of a fixed timer. Reopening, cancellation, native close, and teardown cannot leave stale cleanup closing a new dialog or moving focus.
|
|
43
|
+
|
|
44
|
+
- Tooltip teardown now cancels pending entry, exit, and animation callbacks.
|
|
45
|
+
- FormSelect retains ownership of its generated Menu during repeated AutoInit, preventing a retained Menu registry entry.
|
|
46
|
+
|
|
47
|
+
- **Card reveal accessibility.** Reveal panels now use a native `.card-reveal-trigger` button with a verified `aria-controls` relationship, runtime-owned `aria-expanded`, `inert` closed content, Escape handling, and focus return. AutoInit skips incomplete or disabled-only disclosures, and explicit initialization no longer hides a panel when it lacks a usable enabled `type="button"` trigger or exactly one identified direct panel. Closed-panel CSS is activated only after successful runtime setup, so rejected disclosures remain visible without JavaScript-managed state. This is a markup change: legacy `.activator` headings and separate heading-based close controls no longer toggle the panel.
|
|
48
|
+
- **App bar search dialog.** Closing a full-screen search view no longer reopens it when focus returns to the field.
|
|
49
|
+
- **Badge hosts.** Sibling badges on the stacked navigation bar and collapsed rail use logical inset and flip in RTL. Tabs nest a badge in the destination icon.
|
|
50
|
+
- **Card action semantics.** Material 3 card anatomy now uses `<div class="actions">` for command buttons instead of creating a false `<nav>` landmark.
|
|
51
|
+
- **Card layout and state parity.** Elevated, filled, and outlined cards now keep their Material variant elevations through hover, press, drag, and disabled states; dragged and picked-up elevation plus the 16% state layer take precedence over retained hover or active pointer state. Horizontal cards, including directly actionable cards and fixed-size helpers, keep intrinsic or specified heights when expanded and stack below 600px with fixed heights reset to content. Reveal content is no longer capped in browsers without intrinsic-size interpolation.
|
|
52
|
+
- **Nested card disclosure isolation.** Reveal triggers and Escape handling now belong to their closest card, so nested cards—including a complete card inside an outer reveal panel—retain their own disclosure ownership and cannot initialize, open, or close the outer card.
|
|
53
|
+
|
|
8
54
|
## [0.8.0] - 2026-08-27
|
|
9
55
|
|
|
10
56
|
Completes the HTML semantics sweep. Component markup is corrected so that
|
|
@@ -1447,7 +1493,8 @@ are no compatibility aliases.
|
|
|
1447
1493
|
- `.tabs` nested in a header or app bar as a secondary row. `.tabs` is a
|
|
1448
1494
|
standalone component; the `.tabs.transparent` app bar variant is gone with it.
|
|
1449
1495
|
|
|
1450
|
-
[Unreleased]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.
|
|
1496
|
+
[Unreleased]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.9.0...HEAD
|
|
1497
|
+
[0.9.0]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.8.0...v0.9.0
|
|
1451
1498
|
[0.8.0]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.7.0...v0.8.0
|
|
1452
1499
|
[0.7.0]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.6.0...v0.7.0
|
|
1453
1500
|
[0.7.0-rc.0]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.6.0...v0.7.0-rc.0
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ ExpressiveCSS is a Material Design 3 front-end framework built with Sass and
|
|
|
4
4
|
TypeScript. It provides theme tokens, layout and utility classes, styled form
|
|
5
5
|
controls, and JavaScript components in browser, ES module, and CommonJS builds.
|
|
6
6
|
|
|
7
|
-
> ExpressiveCSS is currently at version `0.
|
|
7
|
+
> ExpressiveCSS is currently at version `0.9.0` and under active development.
|
|
8
8
|
|
|
9
9
|
Documentation: [www.expressivecss.com](https://www.expressivecss.com)
|
|
10
10
|
|
|
@@ -24,15 +24,44 @@ Documentation: [www.expressivecss.com](https://www.expressivecss.com)
|
|
|
24
24
|
- [Node.js](https://nodejs.org/) 20 or newer
|
|
25
25
|
- npm
|
|
26
26
|
|
|
27
|
-
Node
|
|
28
|
-
|
|
27
|
+
Use Node 24 for repository development, selected by `.nvmrc`. The framework's
|
|
28
|
+
runtime compatibility range remains unchanged. See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
29
|
+
for setup, checks, and the community workflow.
|
|
30
|
+
|
|
31
|
+
## MCP server for AI workflows
|
|
32
|
+
|
|
33
|
+
This repository includes a local MCP server at `mcp/expressivecss/` that exposes an
|
|
34
|
+
ExpressiveCSS design-to-QA workflow:
|
|
35
|
+
|
|
36
|
+
- Setup Expert
|
|
37
|
+
- Rules Enforcer
|
|
38
|
+
- Creative Director
|
|
39
|
+
- Page Arcjitect (`page_arcjitect`, with conventional `page_architect` compatibility)
|
|
40
|
+
- Component Syntax Expert
|
|
41
|
+
- Quality Inspector
|
|
42
|
+
|
|
43
|
+
The MCP entry point is `mcp/expressivecss/server.js`, with sample config in
|
|
44
|
+
`mcp/expressivecss/mcp.json`.
|
|
45
|
+
|
|
46
|
+
Quick start:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
cd mcp/expressivecss
|
|
50
|
+
npm ci
|
|
51
|
+
node server.js
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
To use it with your MCP client, point the command to:
|
|
55
|
+
|
|
56
|
+
- `node mcp/expressivecss/server.js`
|
|
57
|
+
- or `node ./server.js` from `mcp/expressivecss` as the working directory.
|
|
29
58
|
|
|
30
59
|
## Getting started
|
|
31
60
|
|
|
32
61
|
Clone the repository and install the JavaScript dependencies:
|
|
33
62
|
|
|
34
63
|
```sh
|
|
35
|
-
npm
|
|
64
|
+
npm ci
|
|
36
65
|
npm run build
|
|
37
66
|
```
|
|
38
67
|
|
|
@@ -43,6 +72,14 @@ dist/
|
|
|
43
72
|
├── css/
|
|
44
73
|
│ ├── expressive.css
|
|
45
74
|
│ └── expressive.min.css
|
|
75
|
+
├── fonts/
|
|
76
|
+
│ ├── material-symbols-outlined.woff2
|
|
77
|
+
│ ├── material-symbols-rounded.woff2
|
|
78
|
+
│ ├── material-symbols-sharp.woff2
|
|
79
|
+
│ ├── roboto-latin-400.woff2
|
|
80
|
+
│ ├── roboto-latin-500.woff2
|
|
81
|
+
│ ├── noto-sans-latin-400.woff2
|
|
82
|
+
│ └── noto-sans-latin-500.woff2
|
|
46
83
|
├── js/
|
|
47
84
|
│ ├── expressive.cjs
|
|
48
85
|
│ ├── expressive.js
|
|
@@ -51,7 +88,9 @@ dist/
|
|
|
51
88
|
└── types/
|
|
52
89
|
```
|
|
53
90
|
|
|
54
|
-
Source maps are produced alongside the CSS and JavaScript bundles.
|
|
91
|
+
Source maps are produced alongside the CSS and JavaScript bundles. The
|
|
92
|
+
stylesheet loads fonts from `../fonts/`, so keep `dist/fonts/` next to
|
|
93
|
+
`dist/css/`.
|
|
55
94
|
|
|
56
95
|
## Usage
|
|
57
96
|
|
|
@@ -137,8 +176,9 @@ Available npm commands include:
|
|
|
137
176
|
| `npm run build:js` | Build ESM, CommonJS, and browser bundles |
|
|
138
177
|
| `npm run build:types` | Generate TypeScript declarations |
|
|
139
178
|
| `npm run watch` | Watch Sass and TypeScript sources |
|
|
179
|
+
| `npm run verify` | Build, typecheck, test, check generated data, and verify docs |
|
|
140
180
|
| `npm run typecheck` | Check the TypeScript source without emitting files |
|
|
141
|
-
| `npm test` | Build
|
|
181
|
+
| `npm test` | Build all JavaScript bundles and CSS, then run the test suite |
|
|
142
182
|
| `npm run clean` | Remove generated build output |
|
|
143
183
|
| `npm run docs:dev` | Build the framework, then watch it beside the docs server |
|
|
144
184
|
| `npm run docs:build` | Build the documentation site into `_site/` and verify it |
|
|
@@ -150,9 +190,9 @@ Run the documentation and smoke-test site:
|
|
|
150
190
|
npm run docs:dev
|
|
151
191
|
```
|
|
152
192
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
193
|
+
This builds the framework, then starts the Sass and esbuild watchers alongside
|
|
194
|
+
the documentation server. Refresh the browser to see source changes. Astro
|
|
195
|
+
prints the server URL.
|
|
156
196
|
|
|
157
197
|
It is the same site published at
|
|
158
198
|
[www.expressivecss.com](https://www.expressivecss.com), authored in
|
|
@@ -160,18 +200,20 @@ It is the same site published at
|
|
|
160
200
|
|
|
161
201
|
## Project structure
|
|
162
202
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
203
|
+
| Location | Purpose | Tracked? |
|
|
204
|
+
| --- | --- | --- |
|
|
205
|
+
| `src/sass`, `src/ts` | Framework source | Yes |
|
|
206
|
+
| `docs/src` | Astro documentation and examples | Yes |
|
|
207
|
+
| `mcp/expressivecss` | Independently versioned MCP package | Yes |
|
|
208
|
+
| `skills/expressivecss` | Agent guidance and generated component references | Yes |
|
|
209
|
+
| `scripts`, `tests`, `visual` | Generators, verification, and test tooling | Source only |
|
|
210
|
+
| `semantics.json`, `llm.md`, `m3-guidelines.md` | Markup rules, API reference, design guidance | Yes |
|
|
211
|
+
| `SEMANTICS.md`, generated skill/MCP data | Derived files checked for drift | Yes |
|
|
212
|
+
| `dist`, `_site`, visual reports and caches | Build output | No |
|
|
213
|
+
| `.design-sync` | Optional external design previews | Configuration and source only |
|
|
214
|
+
|
|
215
|
+
See [Sass architecture](src/sass/README.md), [TypeScript conventions](src/ts/README.md),
|
|
216
|
+
and [development notes](docs/development-notes.md).
|
|
175
217
|
|
|
176
218
|
## Testing
|
|
177
219
|
|
|
@@ -188,8 +230,9 @@ behavior rather than geometry or visual transitions.
|
|
|
188
230
|
|
|
189
231
|
## Contributing
|
|
190
232
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
233
|
+
Start with [CONTRIBUTING.md](CONTRIBUTING.md). Use
|
|
234
|
+
[Discussions](https://github.com/BaezFJ/ExpressiveCSS/discussions) for questions and
|
|
235
|
+
proposals, and [Issues](https://github.com/BaezFJ/ExpressiveCSS/issues) for accepted
|
|
236
|
+
work and reproducible bugs. Read our [governance](GOVERNANCE.md),
|
|
237
|
+
[code of conduct](CODE_OF_CONDUCT.md), [security policy](SECURITY.md), and
|
|
238
|
+
[release workflow](RELEASING.md).
|