@expressivecss/expressive 0.4.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 (69) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/README.md +4 -9
  3. package/dist/css/expressive.css +2617 -951
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/js/expressive.cjs +643 -804
  8. package/dist/js/expressive.cjs.map +4 -4
  9. package/dist/js/expressive.js +643 -804
  10. package/dist/js/expressive.js.map +4 -4
  11. package/dist/js/expressive.min.js +11 -11
  12. package/dist/js/expressive.min.js.map +4 -4
  13. package/dist/js/expressive.mjs +643 -804
  14. package/dist/js/expressive.mjs.map +4 -4
  15. package/dist/types/behaviors/bottomSheets.d.ts +18 -0
  16. package/dist/types/behaviors/sideSheets.d.ts +18 -0
  17. package/dist/types/components/autocomplete.d.ts +11 -11
  18. package/dist/types/components/index.d.ts +3 -5
  19. package/dist/types/components/{dropdown.d.ts → menu.d.ts} +38 -37
  20. package/dist/types/components/navigationRail.d.ts +53 -0
  21. package/dist/types/components/range.d.ts +3 -0
  22. package/dist/types/components/registry.d.ts +7 -15
  23. package/dist/types/components/select.d.ts +12 -12
  24. package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
  25. package/dist/types/index.d.ts +3 -1
  26. package/package.json +3 -2
  27. package/src/sass/README.md +13 -11
  28. package/src/sass/abstracts/_breakpoints.scss +14 -3
  29. package/src/sass/abstracts/_mixins.scss +3 -3
  30. package/src/sass/abstracts/_variables.scss +27 -2
  31. package/src/sass/base/_global.scss +1 -1
  32. package/src/sass/base/_grid.scss +66 -116
  33. package/src/sass/base/_index.scss +1 -1
  34. package/src/sass/components/_badges.scss +80 -60
  35. package/src/sass/components/_bottom-sheet.scss +137 -0
  36. package/src/sass/components/_cards.scss +4 -4
  37. package/src/sass/components/_chips.scss +6 -5
  38. package/src/sass/components/_dialog.scss +268 -0
  39. package/src/sass/components/_index.scss +9 -7
  40. package/src/sass/components/_list.scss +253 -0
  41. package/src/sass/components/_menu.scss +341 -0
  42. package/src/sass/components/_navbar.scss +65 -117
  43. package/src/sass/components/_navigation-bar.scss +165 -0
  44. package/src/sass/components/_navigation-rail.scss +308 -0
  45. package/src/sass/components/_page-footer.scss +7 -3
  46. package/src/sass/components/_panes.scss +294 -0
  47. package/src/sass/components/_side-sheet.scss +193 -0
  48. package/src/sass/components/_sidenav.scss +78 -49
  49. package/src/sass/components/{_toast.scss → _snackbar.scss} +35 -34
  50. package/src/sass/components/_tabs.scss +1 -27
  51. package/src/sass/components/_toolbar.scss +91 -25
  52. package/src/sass/components/_tooltip.scss +1 -1
  53. package/src/sass/components/forms/_fieldset.scss +1 -1
  54. package/src/sass/components/forms/_input-fields.scss +3 -3
  55. package/src/sass/components/forms/_range.scss +423 -98
  56. package/src/sass/components/forms/_select.scss +19 -17
  57. package/src/sass/tokens/_reference.scss +37 -13
  58. package/src/sass/tokens/_theme.scss +5 -13
  59. package/src/sass/utilities/_colors.scss +16 -74
  60. package/src/sass/utilities/_visibility.scss +8 -0
  61. package/dist/types/components/collapsible.d.ts +0 -79
  62. package/dist/types/components/pushpin.d.ts +0 -51
  63. package/dist/types/components/tapTarget.d.ts +0 -57
  64. package/src/sass/components/_collapsible.scss +0 -179
  65. package/src/sass/components/_collection.scss +0 -180
  66. package/src/sass/components/_dropdown.scss +0 -225
  67. package/src/sass/components/_modal.scss +0 -190
  68. package/src/sass/components/_pushpin.scss +0 -11
  69. package/src/sass/components/_tapTarget.scss +0 -187
package/CHANGELOG.md ADDED
@@ -0,0 +1,127 @@
1
+ # Changelog
2
+
3
+ Notable changes to ExpressiveCSS. Versions follow [semver](https://semver.org/);
4
+ the format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.6.0] - 2026-08-21
9
+
10
+ Adds the Material 3 canonical pane layouts and an LLM-oriented Material 3
11
+ guidelines document. No breaking changes.
12
+
13
+ ### Added
14
+
15
+ - **Panes** (`.panes`, `.list-detail`, `.supporting-pane-layout`, `.pane-layout`,
16
+ CSS only) — the M3 canonical adaptive layouts. List-detail (360dp list + 1fr
17
+ detail), supporting pane (1fr primary + 360dp supporting, leading or trailing),
18
+ equal, and three-pane. Below 840px one pane shows at a time — the first, or the
19
+ one marked `.active`. The container is an inline-size query container, so a
20
+ layout nested in a narrow column collapses on its own width rather than the
21
+ viewport's. Coplanar by default (full-bleed with an `outline-variant` divider)
22
+ or `.separated` / `.floating` (16dp `surface-container-low` cards, 24dp gap,
23
+ with per-pane `.elevated` and `.outlined`). Panes have anatomy: a `header` is a
24
+ 64dp title bar, `main` is the scrolling body, `footer` is a 56dp action bar.
25
+ Sized by `--md-comp-pane-*` tokens.
26
+ - **`m3-guidelines.md`** — a companion to `llm.md` covering Material 3 usage,
27
+ anatomy, placement, adaptive design, and component behaviors: what to reach for
28
+ and when, rather than which classes to write.
29
+ - A **Panes** documentation page, and a `Panes` section in `llm.md`.
30
+
31
+ ### Fixed
32
+
33
+ - Badges anchored to an icon mirrored to the wrong side in RTL. The badge is
34
+ positioned with logical `inset-inline-end`, but the `translate(50%, -50%)` that
35
+ centres it on the icon corner is physical, so it pushed the badge inward. It is
36
+ now negated under `:dir(rtl)`.
37
+
38
+ ## [0.5.0] - 2026-08-19
39
+
40
+ The release that finishes moving the vendored Materialize surface onto Material
41
+ Design 3 Expressive. Components with no M3 counterpart are gone, several were
42
+ renamed to their M3 names, and the color layer now carries the full role set.
43
+ Pre-1.0, so the breaking changes below are not gated behind a deprecation cycle
44
+ — but every retired docs URL still 301s to its replacement.
45
+
46
+ ### Added
47
+
48
+ - **Menu** (`Menu`, `.menu-trigger` + `<menu>`) — M3 vertical menus, replacing
49
+ `Dropdown`. Nested flyout submenus, a selected-item state, a vibrant color
50
+ mode, and per-menu sizing.
51
+ - **Navigation bar** (`.navigation-bar`, CSS only) and **navigation rail**
52
+ (`NavigationRail`, `.navigation-rail`, auto-inits) — compact and medium/large
53
+ navigation, with stacked, horizontal, collapsed, expanded, and modal layouts.
54
+ - **Bottom sheets** (`.bottom-sheet`, started by `BottomSheets.Init()`) — modal
55
+ and standard variants with drag-to-dismiss; 28dp top corners, 640dp max width.
56
+ - **Side sheets** (`.side-sheet`, started by `SideSheets.Init()`) — modal and
57
+ standard variants, 400px wide, drag-to-dismiss from the header or the inner
58
+ 24dp edge.
59
+ - **Lists** (`.list`) — standard and segmented variants, replacing `.collection`.
60
+ - **Dialogs** — basic and full-screen variants on native `<dialog>`, on M3 tokens
61
+ (`surface-container-high`, `on-surface-variant`).
62
+ - **Snackbar** (`Snackbar`) — `Toast` under its M3 name, with a reworked options
63
+ object: `snackbarId` replaces `toastId`, `displayLength` accepts `Infinity` to
64
+ stay until the user acts, and defaults to 10000 when an `action` is set.
65
+ - **Widescreen layout** — an `xxlarge` breakpoint at 1601px, the `.xxl` grid
66
+ prefix, wider container caps (1920px at `xxlarge`, `.container.wide` 2400px,
67
+ `.container.max` uncapped), and `.hide-on-xxl-only` / `.show-on-xxl`.
68
+ - **Slider variants** — `.centered` (active track grows from the midpoint),
69
+ dual-handle ranges in one host, sizes `.s` / `.m` / `.l` / `.xl`, `.stops`
70
+ discrete ticks, and an optional inset leading icon.
71
+ - **M3 Expressive color roles** — the surface containers
72
+ (`surface-container-lowest` … `surface-container-highest`), `surface-dim`,
73
+ `surface-bright`, the fixed roles, and `outline-variant`. Utility classes are
74
+ generated from the role list, so every role has both `.role` (fill) and
75
+ `.role-text` (foreground).
76
+ - **Badges** — M3 anatomy: a 6dp dot and a 16dp stadium with a label, positioned
77
+ against navigation, list, and sidenav icons.
78
+
79
+ ### Changed
80
+
81
+ - **Breaking:** `Autocomplete`'s `menuOptions.onItemClick` now receives the clicked
82
+ `li` and is called on the `Menu` instance, matching the documented `MenuOptions`
83
+ contract. It previously received the autocomplete's `<input>` element, so a
84
+ handler written against the documented signature got the wrong node. Handlers
85
+ that used the argument need updating; handlers that ignored it are unaffected.
86
+ - App bars separate from the body on scroll with a `surface-container` fill
87
+ instead of elevation, interpolated through the new
88
+ `--md-comp-top-app-bar-scrolled-container-color`.
89
+ - The sidenav trigger stays visible at every breakpoint; it used to be hidden at
90
+ `large`, which left an M3 app bar with no leading navigation control.
91
+ - Collapsible sections inside the sidenav are now `<details>` / `<summary>`.
92
+ - Components were repointed at accurate M3 container roles rather than
93
+ `surface-variant` aliases, which is what fixes their dark-mode contrast.
94
+ - **Breaking for direct Sass importers:** component partials were renamed to
95
+ match the components they now hold — `components/_modal.scss` →
96
+ `_dialog.scss`, `_dropdown.scss` → `_menu.scss`, `_collection.scss` →
97
+ `_list.scss`, `_toast.scss` → `_snackbar.scss`. `_collapsible.scss`,
98
+ `_pushpin.scss`, and `_tapTarget.scss` are gone. Only code that `@use`s a
99
+ partial by path is affected — the renames themselves change nothing about the
100
+ compiled CSS, and importing `expressive.scss` still pulls in everything.
101
+ - Retired docs routes 301 to their replacements: `/dropdown` → `/menu`,
102
+ `/collections` → `/lists`, `/modals` → `/dialogs`, `/toasts` → `/snackbar`,
103
+ `/range` → `/sliders`, `/collapsible` → `/sidenav`,
104
+ `/feature-discovery` is gone.
105
+
106
+ ### Removed
107
+
108
+ Every entry here is breaking. The replacement is named where there is one; there
109
+ are no compatibility aliases.
110
+
111
+ - `Dropdown` and `.dropdown-trigger` / `.dropdown-content` — use `Menu` and
112
+ `.menu-trigger`.
113
+ - `Toast` — use `Snackbar`.
114
+ - `.collection` and its modifiers — use `.list`.
115
+ - `Collapsible` and `.collapsible` — use native `<details>` / `<summary>`.
116
+ - `Pushpin` and `.pushpin` / `.pin-*` — use `position: sticky`.
117
+ - Feature Discovery (`TapTarget`, `.tap-target`). It is not an M3 component.
118
+ - `.modal` and its modifiers — dialogs are native `<dialog>` elements.
119
+ - `dialog.top` / `dialog.top-sheet`. M3 has no top sheet; use a side sheet or a
120
+ bottom sheet. The unused `--md-comp-basic-dialog-sheet-width` token is gone
121
+ with them.
122
+ - `.tabs` nested in a header or app bar as a secondary row. `.tabs` is a
123
+ standalone component; the `.tabs.transparent` app bar variant is gone with it.
124
+
125
+ [Unreleased]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.6.0...HEAD
126
+ [0.6.0]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.5.0...v0.6.0
127
+ [0.5.0]: https://github.com/BaezFJ/ExpressiveCSS/compare/v0.4.0...v0.5.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.4.0` and under active development.
7
+ > ExpressiveCSS is currently at version `0.6.0` and under active development.
8
8
 
9
9
  ## Features
10
10
 
@@ -12,8 +12,8 @@ controls, and JavaScript components in browser, ES module, and CommonJS builds.
12
12
  - Light and dark themes using CSS custom properties
13
13
  - Responsive grid and utility classes
14
14
  - Buttons, cards, forms, navigation, and other styled components
15
- - Interactive components including carousels, collapsibles, date pickers,
16
- dropdowns, side navigation, tabs, tooltips, and more
15
+ - Interactive components including carousels, date pickers, menus,
16
+ side navigation, tabs, tooltips, and more
17
17
  - ES module, CommonJS, browser IIFE, CSS, and TypeScript declaration outputs
18
18
  - Automatic component initialization with an opt-out mechanism
19
19
 
@@ -62,12 +62,7 @@ after the page has loaded:
62
62
  ```html
63
63
  <link rel="stylesheet" href="dist/css/expressive.min.css">
64
64
 
65
- <div class="collapsible">
66
- <details name="intro">
67
- <summary>Details</summary>
68
- <p>ExpressiveCSS is ready.</p>
69
- </details>
70
- </div>
65
+ <a class="button tooltipped" data-tooltip="ExpressiveCSS is ready.">Hover</a>
71
66
 
72
67
  <script src="dist/js/expressive.min.js"></script>
73
68
  <script>