actual-css 0.8.0 → 0.9.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/components.json +2 -0
  3. package/dist/actual.css +10 -3
  4. package/dist/actual.full.css +360 -109
  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/pages/components/alert.md +6 -1
  9. package/docs/pages/components/dialog.md +5 -0
  10. package/docs/pages/components/drawer.md +13 -0
  11. package/docs/pages/components/skeleton.md +3 -1
  12. package/docs/pages/enhancements/flyout.md +16 -2
  13. package/docs/pages/forms/choice-cards.md +5 -4
  14. package/docs/pages/foundations/tokens.md +1 -1
  15. package/docs/pages/guides/progressive-enhancement.md +12 -8
  16. package/package.json +3 -2
  17. package/src/css/components/accordion.css +2 -0
  18. package/src/css/components/actions.css +2 -0
  19. package/src/css/components/alert.css +2 -0
  20. package/src/css/components/app-nav.css +2 -0
  21. package/src/css/components/avatar.css +2 -0
  22. package/src/css/components/badge.css +2 -0
  23. package/src/css/components/breadcrumb.css +2 -0
  24. package/src/css/components/busy.css +2 -0
  25. package/src/css/components/button.css +2 -0
  26. package/src/css/components/card.css +2 -0
  27. package/src/css/components/chat.css +2 -0
  28. package/src/css/components/data-list.css +2 -0
  29. package/src/css/components/drawer.css +55 -27
  30. package/src/css/components/fab.css +2 -0
  31. package/src/css/components/flyout.css +2 -0
  32. package/src/css/components/indicator.css +2 -0
  33. package/src/css/components/join.css +2 -0
  34. package/src/css/components/key.css +2 -0
  35. package/src/css/components/list.css +2 -0
  36. package/src/css/components/meter.css +2 -0
  37. package/src/css/components/modal.css +47 -40
  38. package/src/css/components/navbar.css +2 -0
  39. package/src/css/components/pagination.css +2 -0
  40. package/src/css/components/progress.css +2 -0
  41. package/src/css/components/rating.css +2 -0
  42. package/src/css/components/scrollspy.css +2 -0
  43. package/src/css/components/skeleton.css +17 -4
  44. package/src/css/components/spinner.css +2 -0
  45. package/src/css/components/status-bar.css +2 -0
  46. package/src/css/components/steps.css +2 -0
  47. package/src/css/components/tab.css +2 -0
  48. package/src/css/components/table.css +10 -0
  49. package/src/css/components/tooltip.css +2 -0
  50. package/src/css/core/print.css +3 -0
  51. package/src/css/core/variants.css +7 -3
  52. package/src/css/effects/aura.css +2 -0
  53. package/src/css/forms/choice-card.css +4 -0
  54. package/src/css/forms/choice.css +70 -26
  55. package/src/css/forms/control.css +2 -0
  56. package/src/css/forms/floating-field.css +5 -1
  57. package/src/css/forms/form-actions.css +2 -0
  58. package/src/css/forms/form.css +2 -0
  59. package/src/css/forms/input-icon.css +2 -0
  60. package/src/css/forms/native.css +2 -0
  61. package/src/css/forms/otp.css +10 -0
  62. package/src/css/forms/range.css +2 -0
  63. package/src/css/forms/select.css +2 -0
  64. package/src/css/forms/switch.css +11 -3
  65. package/src/css/forms/validation.css +2 -0
  66. package/src/css/layout/app-layout.css +2 -0
  67. package/src/css/layout/app-shell.css +5 -1
  68. package/src/css/layout/center.css +2 -0
  69. package/src/css/layout/cluster.css +2 -0
  70. package/src/css/layout/column-layout.css +2 -0
  71. package/src/css/layout/frame.css +2 -0
  72. package/src/css/layout/grid.css +2 -0
  73. package/src/css/layout/media.css +2 -1
  74. package/src/css/layout/scroll-snap.css +2 -0
  75. package/src/css/layout/scroll-target.css +2 -0
  76. package/src/css/layout/sidebar-layout.css +2 -0
  77. package/src/css/layout/stack.css +2 -1
  78. package/src/css/layout/switcher.css +2 -0
  79. package/src/css/layout/topbar.css +2 -0
  80. package/src/css/typography/fluid.css +2 -0
  81. package/src/css/typography/lead.css +2 -1
  82. package/src/css/typography/overline.css +2 -0
  83. package/src/css/typography/prose.css +2 -0
  84. package/src/css/utilities/base.css +6 -1
  85. package/src/js/context-menu.js +56 -15
  86. package/src/js/enhancement-loader.js +5 -1
  87. package/src/js/escape.js +11 -1
  88. package/src/js/flyout.js +6 -1
  89. package/src/js/focus.js +8 -3
  90. package/src/js/surface.js +28 -0
  91. package/src/js/tooltip.js +10 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,82 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ### Fixed
6
+
7
+ - `.modal.scrollable` and `.drawer` body scrollports reserve inline focus-ring space without changing header, body, or footer alignment, so full-width controls no longer clip their focus indicator.
8
+ - `:where(dialog).modal` and `:where(dialog).drawer` roots now have 0-1-0 specificity like other components, allowing a later application class to override their defaults and documented hooks normally.
9
+ - `[data-context-menu]` resolves its menu per interaction: a target declared before its `<menu>` exists and a same-id menu replacement now open correctly instead of staying dead.
10
+ - `escape.js` ignores `Escape` presses already consumed (`defaultPrevented`) or chorded with `metaKey`.
11
+ - `isElementVisible()` in `focus.js` passes `visibilityProperty` to `checkVisibility()`, so `visibility:hidden` content is no longer reported focusable on modern engines.
12
+ - A flyout `<a>` trigger calls `preventDefault()` once its panel resolved — clicking it no longer navigates, while an unresolved trigger still navigates and bubbles.
13
+ - `data-tooltip` triggers containing focusable children now hide correctly: the non-bubbling `blur` listener was replaced by `focusout` with a `relatedTarget` containment check.
14
+ - `--dismiss` on an open surface finalizes the surface lifecycle — `.is-open`, the Escape entry, position tracking — and restores focus to the opener; the surface consumes `actual:dismiss` itself, keeping `dismiss.js` generic.
15
+ - `.link-muted:hover` and `.link-muted:focus-visible` are separate rules, so the hover color survives browsers without `:focus-visible`.
16
+ - `.choice-card` and `.floating-field` participate in `.sm` / `.lg` (and `.choice-card` consumes `--control-font-size`), so their documented size modifiers actually work.
17
+ - The `.floating-field` label rests on `--control-pad-x`, the same geometry as the control's text — both now share an inline start edge at every size.
18
+ - `.modal` header/footer resets are bounded to the dialog's structural `form` / `.stack` slots, so a header or footer inside the content keeps its own rhythm.
19
+ - `.otp` forced-colors styling covers the `:user-invalid` route.
20
+ - `print.css` forces `[data-theme]` islands to `color-scheme: light` with a white background and black text, so a dark-themed section no longer prints dark.
21
+ - The 11 paired themes declare `color-scheme: light` in their fallback block and `light dark` under `@supports (color: light-dark(...))` — dark UA controls no longer appear on the light fallback palette.
22
+
23
+ ### Documentation and tooling
24
+
25
+ - Public CSS sources carry a `Docs:` pointer to their canonical usage page, verified by `check:architecture`.
26
+ - `check:compat` rejects selector lists mixing an above-floor pseudo with baseline selectors.
27
+ - Docs TOC and search headings decode HTML entities, so a heading like `Linting role="menu"` no longer shows `&quot;` in the sidebar.
28
+ - `tokens.md` describes the actual forced-colors contract; `enhancement-loader` documents that manifests are trusted application configuration.
29
+
30
+
31
+ ## [0.9.0] - 2026-09-13
32
+
33
+ ### Breaking changes
34
+
35
+ - `--choice-control-offset` is renamed `--choice-control-nudge` and adds to the
36
+ derived first-line offset instead of replacing it — an old value is a whole
37
+ offset and will sit that far too low.
38
+ - `--skeleton-width` is a maximum inline size, not a width: a placeholder fills
39
+ its container and stops there, so it no longer gives every shrink-to-fit
40
+ ancestor a min-content floor. A placeholder in a container sized by its own
41
+ content now collapses instead of forcing that container open.
42
+
43
+ ### Fixed
44
+
45
+ - `.choice` aligns its control on the first line's cap height with the `cap`
46
+ unit, so a checkbox, radio or switch is level with the label text in any
47
+ font — the previous constant was tuned for Segoe UI and sat ~2px low on
48
+ Roboto.
49
+ - `.switch` lays its knob out of flow, so the track's baseline is its own
50
+ border box.
51
+ - `dialog.drawer` is `--viewport-block` tall again, so a mobile browser's
52
+ collapsing URL bar no longer pushes its footer below the fold.
53
+ - `dialog.drawer` scrolls its body region, so the footer stays reachable
54
+ whatever the content length; the rule replaces the `nav`-only one.
55
+ - `.table-wrap` is `position: relative`, so an `.sr-only` header inside a wide
56
+ table no longer escapes the scroller and gives the page a phantom horizontal
57
+ scrollbar on small viewports.
58
+
59
+ ### Documentation and tooling
60
+
61
+ - `tests/browser/mobile-overflow.test.js` asserts that no component scrolls the
62
+ page sideways at 320px and 360px, and that wide content scrolls inside its
63
+ own container.
64
+ - `bun run report:overflow` surveys demo and site pages at phone width and
65
+ bisects each failure down to the element that owns it.
66
+ - `tests/browser/mega-menu.test.js` exercises three wide sibling nav panels —
67
+ takeover, toggle, focus handover, keyboard open, Escape, clamping at both
68
+ viewport edges, and no drawer mutation on a phone.
69
+ - The flyout hooks are documented as a preferred width and a width cap, with
70
+ the cap's `20rem` default stated: a wide panel sets both, like `width` and
71
+ `max-width`.
72
+ - The drawer and scrollable-modal pages state that a scrolling body region is
73
+ keyboard-focusable, takes a focus ring, and can claim a dialog's initial
74
+ focus — put the close control in the `header`, or use `autofocus`.
75
+ - The kitchen-sink, blocks, blog, combobox and select-intents templates no
76
+ longer scroll sideways at phone widths.
77
+ - The alert trailing-action recipe and the dashboard template add `.items-center`:
78
+ a trailing control makes the row taller than a line of text, which left the
79
+ start-aligned `.alert-icon` above the message.
80
+
5
81
  ## [0.8.0] - 2026-09-10
6
82
 
7
83
  Actual CSS 0.8 focuses on a cleaner component contract, more predictable sizing
package/components.json CHANGED
@@ -266,6 +266,7 @@
266
266
  ],
267
267
  "internalHooks": [
268
268
  "--drawer-closed-translate",
269
+ "--drawer-focus-bleed",
269
270
  "--drawer-motion-duration"
270
271
  ],
271
272
  "states": [
@@ -446,6 +447,7 @@
446
447
  ],
447
448
  "internalHooks": [
448
449
  "--dialog-close-icon-size",
450
+ "--dialog-focus-bleed",
449
451
  "--dialog-viewport-block",
450
452
  "--dialog-viewport-gap-default",
451
453
  "--dialog-viewport-gap-2x"
package/dist/actual.css CHANGED
@@ -744,9 +744,9 @@ small {
744
744
  }
745
745
 
746
746
  /* Shared control scale. Wrappers are listed when their descendants form one
747
- component (field, input-icon, join, pagination, tabs, flyout). A local size
748
- declaration beats inherited density because it is declared on the sized
749
- component itself. */
747
+ component (field, choice-card, floating-field, input-icon, join, pagination,
748
+ tabs, flyout). A local size declaration beats inherited density because it
749
+ is declared on the sized component itself. */
750
750
  :where(
751
751
  .btn,
752
752
  .input,
@@ -756,7 +756,9 @@ small {
756
756
  .file,
757
757
  .field,
758
758
  .choice,
759
+ .choice-card,
759
760
  .input-icon,
761
+ .floating-field,
760
762
  .otp,
761
763
  .join,
762
764
  .pagination,
@@ -778,7 +780,9 @@ small {
778
780
  .file,
779
781
  .field,
780
782
  .choice,
783
+ .choice-card,
781
784
  .input-icon,
785
+ .floating-field,
782
786
  .otp,
783
787
  .join,
784
788
  .pagination,
@@ -838,6 +842,9 @@ small {
838
842
 
839
843
  @media print {
840
844
  :root,
845
+ /* The doubled attribute intentionally outranks single-attribute preset
846
+ islands (data-theme="dark", paired themes) loaded after the core. */
847
+ [data-theme][data-theme],
841
848
  body {
842
849
  /* Save some ink in dark mode */
843
850
  color-scheme: light;