actual-css 0.4.2 → 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 (117) hide show
  1. package/CHANGELOG.md +66 -3
  2. package/README.md +2 -2
  3. package/dist/actual.css +54 -14
  4. package/dist/actual.full.css +744 -185
  5. package/dist/actual.full.js +1 -1
  6. package/dist/actual.full.min.css +1 -1
  7. package/dist/actual.min.css +1 -1
  8. package/docs/design-notes/browser-support.md +14 -14
  9. package/docs/design-notes/enhancement-contract.md +30 -13
  10. package/docs/design-notes/forced-colors.md +11 -7
  11. package/docs/design-notes/grid.md +4 -4
  12. package/docs/design-notes/naming.md +15 -9
  13. package/docs/design-notes/platform-alignment.md +9 -0
  14. package/docs/design-notes/references.md +4 -0
  15. package/docs/design-notes/spacing-units.md +286 -0
  16. package/docs/design-notes/steps.md +748 -0
  17. package/docs/design-notes/widget-primitives.md +32 -15
  18. package/docs/navigation.json +2 -0
  19. package/docs/pages/components/alert.md +14 -9
  20. package/docs/pages/components/app-navigation.md +2 -0
  21. package/docs/pages/components/aura.md +102 -6
  22. package/docs/pages/components/avatar.md +9 -6
  23. package/docs/pages/components/badge.md +27 -9
  24. package/docs/pages/components/button.md +25 -18
  25. package/docs/pages/components/card.md +27 -7
  26. package/docs/pages/components/chat.md +1 -1
  27. package/docs/pages/components/data-list.md +72 -0
  28. package/docs/pages/components/dialog.md +12 -7
  29. package/docs/pages/components/drawer.md +3 -1
  30. package/docs/pages/components/fab.md +14 -10
  31. package/docs/pages/components/indicator.md +6 -6
  32. package/docs/pages/components/list.md +11 -2
  33. package/docs/pages/components/meter.md +56 -1
  34. package/docs/pages/components/navbar.md +1 -1
  35. package/docs/pages/components/pagination.md +1 -1
  36. package/docs/pages/components/progress.md +10 -0
  37. package/docs/pages/components/rating.md +4 -4
  38. package/docs/pages/components/skeleton.md +3 -1
  39. package/docs/pages/components/spinner.md +1 -1
  40. package/docs/pages/components/steps.md +379 -47
  41. package/docs/pages/components/table.md +6 -5
  42. package/docs/pages/enhancements/flyout.md +14 -10
  43. package/docs/pages/enhancements/overview.md +2 -2
  44. package/docs/pages/enhancements/scrollspy.md +1 -1
  45. package/docs/pages/enhancements/status-bar.md +10 -1
  46. package/docs/pages/enhancements/tabs.md +1 -1
  47. package/docs/pages/examples/overview.md +4 -1
  48. package/docs/pages/forms/choice-cards.md +4 -4
  49. package/docs/pages/forms/combobox.md +87 -0
  50. package/docs/pages/forms/floating-field.md +5 -3
  51. package/docs/pages/forms/joined-controls.md +6 -4
  52. package/docs/pages/forms/labels.md +8 -5
  53. package/docs/pages/forms/overview.md +26 -19
  54. package/docs/pages/forms/password.md +3 -2
  55. package/docs/pages/forms/range.md +15 -2
  56. package/docs/pages/forms/states-and-sizes.md +7 -5
  57. package/docs/pages/forms/validation.md +15 -9
  58. package/docs/pages/foundations/philosophy.md +11 -1
  59. package/docs/pages/foundations/tokens.md +16 -9
  60. package/docs/pages/foundations/typography.md +11 -3
  61. package/docs/pages/guides/bootstrap.md +3 -3
  62. package/docs/pages/guides/introduction.md +2 -2
  63. package/docs/pages/guides/modular-import.md +21 -10
  64. package/docs/pages/guides/progressive-enhancement.md +75 -54
  65. package/docs/pages/guides/tailwind.md +2 -2
  66. package/docs/pages/layout/app-shell.md +4 -4
  67. package/docs/pages/layout/choosing.md +10 -6
  68. package/docs/pages/layout/grid.md +11 -10
  69. package/docs/pages/layout/scroll-snap.md +2 -0
  70. package/docs/pages/layout/sidebar-layout.md +2 -0
  71. package/docs/pages/layout/stack.md +10 -6
  72. package/docs/pages/layout/topbar.md +2 -0
  73. package/docs/pages/patterns/structured-lists.md +7 -7
  74. package/docs/pages/utilities/accessibility.md +19 -1
  75. package/docs/pages/utilities/flex.md +20 -13
  76. package/docs/pages/utilities/links.md +1 -1
  77. package/docs/pages/utilities/list.md +1 -1
  78. package/docs/pages/utilities/overflow.md +14 -7
  79. package/docs/pages/utilities/overview.md +22 -0
  80. package/docs/pages/utilities/shape.md +1 -1
  81. package/docs/pages/utilities/sizing-wrapping.md +10 -8
  82. package/docs/pages/utilities/spacing.md +26 -19
  83. package/docs/pages/utilities/text.md +1 -1
  84. package/llms.txt +27 -4
  85. package/package.json +3 -2
  86. package/scripts/reserved-classes.json +8 -1
  87. package/src/css/components/data-list.css +27 -0
  88. package/src/css/components/drawer.css +30 -11
  89. package/src/css/components/fab.css +44 -8
  90. package/src/css/components/flyout.css +17 -12
  91. package/src/css/components/index.css +1 -0
  92. package/src/css/components/list.css +3 -1
  93. package/src/css/components/meter.css +28 -1
  94. package/src/css/components/modal.css +28 -11
  95. package/src/css/components/progress.css +5 -0
  96. package/src/css/components/status-bar.css +31 -15
  97. package/src/css/components/steps.css +289 -55
  98. package/src/css/components/surface.css +5 -3
  99. package/src/css/components/tooltip.css +5 -8
  100. package/src/css/core/base.css +7 -1
  101. package/src/css/core/intents.css +6 -0
  102. package/src/css/core/tokens.css +24 -9
  103. package/src/css/core/variants.css +17 -4
  104. package/src/css/effects/aura.css +101 -11
  105. package/src/css/forms/custom-select.css +1 -1
  106. package/src/css/forms/floating-field.css +8 -6
  107. package/src/css/forms/form.css +4 -4
  108. package/src/css/layout/container-query.css +37 -13
  109. package/src/css/layout/grid.css +7 -7
  110. package/src/css/layout/index.css +1 -1
  111. package/src/css/typography/prose.css +2 -3
  112. package/src/css/utilities/base.css +16 -0
  113. package/src/js/password.js +1 -1
  114. package/src/js/selectors.js +1 -0
  115. package/src/js/status.js +88 -7
  116. package/src/js/surface.js +2 -11
  117. package/src/js/transition.js +20 -0
package/CHANGELOG.md CHANGED
@@ -1,13 +1,76 @@
1
1
  # Actual CSS Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## [0.6.0] - 2026-09-03
4
+
5
+ ### Changed
6
+
7
+ - `.list` are now top-aligned.
8
+ - `.aura` improvements.
9
+
10
+ ### Breaking
11
+
12
+ - Reworked completely the `.steps`. Read the updated documentation for changes.
13
+ - The framework query-container name is now `actual-container` instead of
14
+ `actual-grid`. `.container-query` is unchanged.
15
+
16
+ ## Fixed
17
+
18
+ - `.fab` icons.
19
+ - `.floating-field` with password managers.
20
+
21
+
22
+ ## [0.5.0] - 2026-09-01
23
+
24
+ ### Added
25
+
26
+ * `surface` shared variant: the page surface with the theme border, intent in the text only.
27
+ Fills the gap between `soft` (always intent-tinted) and `outline` (no fill at all).
28
+ * `--link` is now read by the base `a` rule, so a theme that sets it colors bare links and
29
+ prose links at once. Unset, nothing changes.
30
+ * `touch-target` for small buttons.
31
+ * `data-list` for compact term–value pairs describing the properties of a single object.
32
+ * Segmented `meter`.
33
+ * `intent-color` to apply color based on intent.
34
+ * `demo/templates/motion.html` — a motion catalogue that replays each overlay's
35
+ entry/exit side by side, stretches durations to read the presence curves, and
36
+ simulates reduced motion.
37
+
38
+ ### Changed
39
+
40
+ * `--bar-height` is a public hook. It was classified Internal by mistake while both
41
+ `progress` and `meter` used it as their only thickness mechanism. Size variants stay
42
+ unsupported on those two: a bar keeps its inline size and only changes thickness, which
43
+ the hook expresses better than a three-step scale.
44
+ * Removed the `.field-group + .field-group` sibling margin (breaking, pre-1.0). A component
45
+ cannot know whether its siblings are stacked or gridded; space consecutive groups with
46
+ `.stack` on the form.
47
+ * `steps` now separates the two accented states: `.complete` is a filled marker with an
48
+ accented connector, `[aria-current="step"]` an outlined one with a thicker ring. They were
49
+ visually identical, so a numbered stepper could not show position without a check glyph.
50
+ A step carrying both renders entirely as current, connector and completion glyph included.
51
+ * `status-bar` visibility is driven by the `.is-open` state class instead of `:empty`,
52
+ and `status.clear()` now empties the text and intent only after the exit transition,
53
+ so the bar animates out at the size and color it was shown at. A message dispatched
54
+ during that exit cancels the pending cleanup. An empty message now clears instead of
55
+ opening a blank pill. The runtime also lifts the bar above the mobile software keyboard
56
+ via `visualViewport`. Deferred component cleanup now shares one CSS-transition helper,
57
+ so unrelated or infinite author animations cannot strand a status bar or surface.
58
+ * Removed the generic `--ease` motion token (breaking, pre-1.0). Generic interaction and
59
+ state transitions now use the CSS default `ease` directly; the dialog shake and the
60
+ `actual-dialog` View Transition keep that default deliberately, so no behavior changes.
61
+ * Introduced `--ease-enter` / `--ease-exit` presence curves for one-shot open/close, applied
62
+ to `status-bar`, `modal`, and `drawer`. The drawer exit shortens to `--duration` (entry
63
+ stays `--duration-slow`) and its `::backdrop` follows the panel duration. Flyout, tooltip,
64
+ and all backdrops keep the neutral `ease`; they share a single fast transition list or are
65
+ pure-opacity scrims where the presence pair does not resolve.
66
+
4
67
 
5
68
  ## [0.4.2] - 2026-08-25
6
69
 
7
70
  ### Fixed
8
71
 
9
- * `card` + `cluster` regression
10
- * Some markup in demos
72
+ * `card` + `cluster` regression.
73
+ * Some markup in demos.
11
74
 
12
75
 
13
76
  ## [0.4.1] - 2026-08-25
package/README.md CHANGED
@@ -65,7 +65,7 @@ Add classes to your HTML. Components define the structure, variants change the s
65
65
 
66
66
  Intents such as `.primary`, `.secondary`, `.success`, `.warning`, and `.danger` work across components.
67
67
 
68
- Variants such as `.solid`, `.soft`, and `.outline` are shared by components like buttons, badges, alerts, and cards. `.inverted` is a shared surface modifier: it paints any block with the inverse surface. `.ghost` and `.link` are button-only variants.
68
+ Variants such as `.solid`, `.soft`, `.outline`, and `.surface` are shared by components like buttons, badges, alerts, and cards. `.inverted` is a shared surface modifier: it paints any block with the inverse surface. `.ghost` and `.link` are button-only variants.
69
69
 
70
70
  Size variants `.sm` and `.lg` scale controls consistently.
71
71
 
@@ -77,7 +77,7 @@ Actual CSS uses a small unprefixed class grammar:
77
77
  .component [intent] [variant] [size] [modifier]
78
78
  ```
79
79
 
80
- Components, layout helpers, form helpers, and utilities claim their documented class names. Intents are `.primary`, `.secondary`, `.success`, `.warning`, and `.danger`; shared variants are `.solid`, `.soft`, and `.outline`; `.inverted` is a shared surface modifier; button-only variants are `.ghost` and `.link`; shared sizes are `.sm` and `.lg`.
80
+ Components, layout helpers, form helpers, and utilities claim their documented class names. Intents are `.primary`, `.secondary`, `.success`, `.warning`, and `.danger`; shared variants are `.solid`, `.soft`, `.outline`, and `.surface`; `.inverted` is a shared surface modifier; button-only variants are `.ghost` and `.link`; shared sizes are `.sm` and `.lg`.
81
81
 
82
82
  Undocumented `is-*` classes are runtime internals.
83
83
 
package/dist/actual.css CHANGED
@@ -56,8 +56,8 @@ select {
56
56
  *
57
57
  * Derived: "Theme-derived aliases" and "State tokens" reference intent and
58
58
  * surface tokens and follow the theme; do not hard-code values into them.
59
- * Internal: indicator offsets, --bar-height, --disabled-opacity and the
60
- * like are consumed by components, not authored.
59
+ * Internal: indicator offsets, --disabled-opacity and the like are
60
+ * consumed by components, not authored.
61
61
  *
62
62
  * Component-local hooks and internal state relays live with their
63
63
  * components. See docs/pages/foundations/tokens.md for the public/internal
@@ -81,9 +81,10 @@ select {
81
81
  --font-size-md: 1rem;
82
82
  --font-size-lg: 1.125rem;
83
83
 
84
- /* Spacing — official steps are named in tens so the scale stays open for
85
- application themes to intercalate intermediate values (--space-15,
86
- --space-45…) without colliding with future framework steps. */
84
+ /* Spacing — official steps are named in tens so the scale stays open.
85
+ Actual CSS will never define a --space-* that is not a multiple of 10:
86
+ the intermediate names (--space-15, --space-45…) are reserved for
87
+ applications, and no future framework step can collide with them. */
87
88
  --gap: 0.75rem;
88
89
  --density-space: var(--space-40);
89
90
  --density-compact-size: 1.5rem;
@@ -101,14 +102,25 @@ select {
101
102
  --shadow-popout: 0 0.25rem 0.75rem rgb(0 0 0 / 0.15);
102
103
 
103
104
  /* Motion — see reset.css for the prefers-reduced-motion hard reset.
104
- --duration drives component transitions (hover/focus); the dedicated
105
- animation rates below tune one-shot open/close and decorative loops. */
105
+ --duration scales component transitions (hover/focus); the dedicated
106
+ animation rates below tune one-shot open/close and decorative loops.
107
+ Generic state/interaction motion uses the CSS default `ease` directly
108
+ (registered nowhere). --ease-enter/--ease-exit express the character of
109
+ one-shot presence changes, owned by the open/closed state rules that
110
+ separate them (status-bar, drawer, modal). The pair follows the standard
111
+ M3 rhythm; the more aggressive emphasized-decelerate entrance is
112
+ deliberately not offered because it only pays off on 250–400ms motions,
113
+ beyond this vocabulary. Toggles that share one transition list at
114
+ --duration-fast (flyout, tooltip) and pure-opacity backdrops stay on
115
+ `ease`: at 100ms the curve has almost no resolving time, and a scrim is
116
+ not traveling anywhere. */
106
117
  --duration: 150ms;
107
118
  --duration-fast: 100ms;
108
119
  --duration-slow: 200ms;
109
120
  --duration-spin: 0.75s;
110
121
  --duration-shimmer: 1.2s;
111
- --ease: ease;
122
+ --ease-enter: cubic-bezier(0.2, 0, 0, 1);
123
+ --ease-exit: cubic-bezier(0.4, 0, 1, 1);
112
124
 
113
125
  /* Focus ring — shared by every interactive component's :focus-visible */
114
126
  --focus-outline-color: currentColor;
@@ -126,7 +138,9 @@ select {
126
138
  --backdrop-opacity: 0.45;
127
139
  --backdrop-fill: rgb(0 0 0 / var(--backdrop-opacity));
128
140
 
129
- /* Progress / meter track height */
141
+ /* Bar thickness shared by .progress and .meter — two conceptual variants of
142
+ the same geometry. Public: set it on the element or on an application
143
+ class rather than reaching for a size variant. */
130
144
  --bar-height: 0.65rem;
131
145
 
132
146
  /* Controls — inputs and buttons share --control-size so heights always match.
@@ -183,6 +197,7 @@ select {
183
197
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a8594' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
184
198
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
185
199
  --icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
200
+ --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
186
201
 
187
202
  /* Viewport size tokens — fallback vh/vw with dvh/vi enhancement.
188
203
  Consumed by full-viewport components (app-shell, drawer, modal, flyout).
@@ -449,6 +464,9 @@ select {
449
464
  *
450
465
  * Sits between reset (browser defaults) and prose (rich content scope).
451
466
  * These styles apply everywhere — cards, dialogs, heroes — not only in prose.
467
+ *
468
+ * Public hooks:
469
+ * --link
452
470
  */
453
471
 
454
472
  body {
@@ -458,8 +476,11 @@ body {
458
476
  line-height: var(--line-height);
459
477
  }
460
478
 
479
+ /* Bare links inherit their ink by default, so nothing changes unless a theme
480
+ opts in by setting --link. Because this is an element selector, any component
481
+ rule that colors its own anchors still wins. */
461
482
  a {
462
- color: inherit;
483
+ color: var(--link, inherit);
463
484
  text-underline-offset: 0.18em;
464
485
  }
465
486
 
@@ -543,11 +564,17 @@ small {
543
564
  --intent-fg: var(--neutral-fg);
544
565
  }
545
566
 
567
+ /* Paint an inherited or local intent on a simple foreground element without
568
+ turning the intent classes into general-purpose color utilities. */
569
+ .intent-color {
570
+ color: var(--intent);
571
+ }
572
+
546
573
  /*
547
574
  * Cross-cutting variant token mapping.
548
575
  *
549
- * Variant scope: .solid/.soft/.outline set --ui-* for components that opt into
550
- * shared variants. .inverted is a surface modifier, not a variant: it paints
576
+ * Variant scope: .solid/.soft/.outline/.surface set --ui-* for components that
577
+ * opt into shared variants. .inverted is a surface modifier, not a variant: it paints
551
578
  * the element directly (background/color/border-color) so it works on any bare
552
579
  * block, and remaps the shared --ui-* tokens so participating components
553
580
  * (.card, .navbar, .alert, .badge) invert through their own rules. Loaded
@@ -566,8 +593,10 @@ small {
566
593
  * components may consume --density-* when the density context should affect
567
594
  * their local rhythm. Compact components may consume --density-compact-size.
568
595
  * Components with bespoke sizing (spinner, avatar) define local .sm/.lg;
569
- * applying .sm/.lg to card, dialog, accordion, navbar, table is
570
- * a no-op.
596
+ * applying .sm/.lg to card, dialog, accordion, navbar, table, progress, meter
597
+ * is a no-op. Progress and meter are deliberate: a bar keeps its inline size
598
+ * and only changes thickness, which --bar-height expresses better than a
599
+ * three-step scale.
571
600
  *
572
601
  * Intent list source of truth: intents.css. Components consume --intent* tokens
573
602
  * instead of re-listing intent classes.
@@ -590,6 +619,17 @@ small {
590
619
  --ui-border: var(--intent, currentColor);
591
620
  }
592
621
 
622
+ /* Neutral chrome, intent only in the ink: the page surface with the theme
623
+ border. .soft is the intent-tinted treatment (its baseline fallback uses
624
+ --surface-subtle) and .outline has no fill at all, so neither can express
625
+ it. Deliberately literal — no color-mix enhancement — so this stays the one
626
+ variant that reads exactly as the theme's own surface. */
627
+ .surface {
628
+ --ui-bg: var(--surface);
629
+ --ui-fg: var(--intent, var(--text));
630
+ --ui-border: var(--border);
631
+ }
632
+
593
633
  /* Inverse surface treatment. Paints the element directly (so it works on any
594
634
  bare block) and remaps the shared --ui-* tokens so opt-in components
595
635
  (.card, .navbar) invert through their own rules. Because this loads before