actual-css 0.5.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 (86) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/actual.css +1 -0
  3. package/dist/actual.full.css +480 -117
  4. package/dist/actual.full.js +1 -1
  5. package/dist/actual.full.min.css +1 -1
  6. package/dist/actual.min.css +1 -1
  7. package/docs/design-notes/browser-support.md +14 -14
  8. package/docs/design-notes/enhancement-contract.md +30 -13
  9. package/docs/design-notes/forced-colors.md +11 -7
  10. package/docs/design-notes/grid.md +4 -4
  11. package/docs/design-notes/naming.md +15 -9
  12. package/docs/design-notes/platform-alignment.md +9 -0
  13. package/docs/design-notes/references.md +4 -0
  14. package/docs/design-notes/steps.md +748 -0
  15. package/docs/design-notes/widget-primitives.md +32 -15
  16. package/docs/navigation.json +1 -0
  17. package/docs/pages/components/alert.md +13 -8
  18. package/docs/pages/components/aura.md +102 -6
  19. package/docs/pages/components/avatar.md +9 -6
  20. package/docs/pages/components/badge.md +11 -7
  21. package/docs/pages/components/button.md +17 -17
  22. package/docs/pages/components/card.md +15 -8
  23. package/docs/pages/components/chat.md +1 -1
  24. package/docs/pages/components/dialog.md +10 -7
  25. package/docs/pages/components/drawer.md +1 -1
  26. package/docs/pages/components/fab.md +12 -10
  27. package/docs/pages/components/indicator.md +6 -6
  28. package/docs/pages/components/list.md +11 -2
  29. package/docs/pages/components/navbar.md +1 -1
  30. package/docs/pages/components/pagination.md +1 -1
  31. package/docs/pages/components/rating.md +4 -4
  32. package/docs/pages/components/skeleton.md +1 -1
  33. package/docs/pages/components/spinner.md +1 -1
  34. package/docs/pages/components/steps.md +376 -52
  35. package/docs/pages/components/table.md +5 -5
  36. package/docs/pages/enhancements/flyout.md +12 -10
  37. package/docs/pages/enhancements/overview.md +2 -2
  38. package/docs/pages/enhancements/scrollspy.md +1 -1
  39. package/docs/pages/enhancements/tabs.md +1 -1
  40. package/docs/pages/examples/overview.md +2 -0
  41. package/docs/pages/forms/choice-cards.md +4 -4
  42. package/docs/pages/forms/combobox.md +87 -0
  43. package/docs/pages/forms/floating-field.md +5 -3
  44. package/docs/pages/forms/joined-controls.md +4 -4
  45. package/docs/pages/forms/labels.md +8 -5
  46. package/docs/pages/forms/overview.md +25 -18
  47. package/docs/pages/forms/password.md +3 -2
  48. package/docs/pages/forms/range.md +13 -2
  49. package/docs/pages/forms/states-and-sizes.md +6 -4
  50. package/docs/pages/forms/validation.md +13 -9
  51. package/docs/pages/foundations/tokens.md +9 -6
  52. package/docs/pages/foundations/typography.md +1 -1
  53. package/docs/pages/guides/bootstrap.md +3 -3
  54. package/docs/pages/guides/introduction.md +1 -1
  55. package/docs/pages/guides/modular-import.md +21 -10
  56. package/docs/pages/guides/progressive-enhancement.md +75 -54
  57. package/docs/pages/guides/tailwind.md +2 -2
  58. package/docs/pages/layout/app-shell.md +4 -4
  59. package/docs/pages/layout/choosing.md +10 -6
  60. package/docs/pages/layout/grid.md +11 -10
  61. package/docs/pages/layout/stack.md +10 -6
  62. package/docs/pages/patterns/structured-lists.md +7 -7
  63. package/docs/pages/utilities/accessibility.md +1 -1
  64. package/docs/pages/utilities/flex.md +20 -13
  65. package/docs/pages/utilities/links.md +1 -1
  66. package/docs/pages/utilities/list.md +1 -1
  67. package/docs/pages/utilities/overflow.md +14 -7
  68. package/docs/pages/utilities/overview.md +22 -0
  69. package/docs/pages/utilities/shape.md +1 -1
  70. package/docs/pages/utilities/sizing-wrapping.md +10 -8
  71. package/docs/pages/utilities/spacing.md +26 -19
  72. package/docs/pages/utilities/text.md +1 -1
  73. package/llms.txt +27 -4
  74. package/package.json +3 -2
  75. package/scripts/reserved-classes.json +4 -1
  76. package/src/css/components/fab.css +44 -8
  77. package/src/css/components/list.css +3 -1
  78. package/src/css/components/steps.css +277 -69
  79. package/src/css/core/tokens.css +1 -0
  80. package/src/css/effects/aura.css +101 -11
  81. package/src/css/forms/custom-select.css +1 -1
  82. package/src/css/forms/floating-field.css +8 -6
  83. package/src/css/layout/container-query.css +37 -13
  84. package/src/css/layout/grid.css +7 -7
  85. package/src/css/layout/index.css +1 -1
  86. package/src/js/password.js +1 -1
@@ -1,15 +1,39 @@
1
- /* Convenience helper: establishes a query container named actual-grid for
2
- descendants. Use it for a component that changes representation according
3
- to its allocated inline size, and to give .grid-N the named context it needs
4
- for balanced subdivision (see grid.css). The name matters: grids only respond
5
- to an explicitly actual-grid-named container, never to an incidental
6
- query container. Layout primitives are responsive without it; this adds
7
- precision, it is never a prerequisite.
8
-
9
- The element takes inline-size containment, so put it on a normal
10
- block-level wrapper, never on a shrink-to-fit item (a .cluster child, a
11
- float, an inline-block): its contents would stop contributing to its own
12
- inline size and it would collapse. */
1
+ /* Convenience helper for size-aware components: establishes an inline-size
2
+ query container named actual-container. The name is the contract, not this
3
+ class — an author can declare `container: actual-container / inline-size` on
4
+ their own region and get the same result.
5
+
6
+ actual-container is shared. Granting it to a region may enable size-aware
7
+ enhancements for any Actual component inside that region, not only the one
8
+ that motivated the container: .grid-N reads it for balanced subdivision,
9
+ .steps for its label collapse, and future components will read the same
10
+ context. That is the scope of the API, not a caveat.
11
+
12
+ An anonymous query container is not part of it. A region that declares
13
+ `container-type: inline-size` for the application's own purposes carries no
14
+ actual-container name, so no framework component changes behaviour there.
15
+ Opting into the protocol is always explicit. Nothing here is a prerequisite
16
+ either — every primitive is responsive without it; this adds precision.
17
+
18
+ Place it where the width you want measured lives: usually a wrapper for a
19
+ grid, whose queried children sit inside it, and the component itself for
20
+ .steps, whose own row is the width in question.
21
+
22
+ The rule for where it is safe is the containment rule, not a list of
23
+ primitives. Query containment removes the element's intrinsic inline-size
24
+ contribution, so:
25
+
26
+ safe the element's width is imposed by its context
27
+ (.steps sets inline-size: 100%, so it survives even as a
28
+ .cluster child — it wraps and fills)
29
+
30
+ unsafe the element's width depends on its contents' intrinsic
31
+ contribution (a bare .grid child of .cluster measures 0 once
32
+ contained, as does a float, inline-block, table, grid auto track,
33
+ max-content parent, or an abspos box sized by its contents)
34
+
35
+ So .cluster is neither safe nor unsafe; what matters is where the child's
36
+ width comes from. */
13
37
  .container-query {
14
- container: actual-grid / inline-size;
38
+ container: actual-container / inline-size;
15
39
  }
@@ -86,13 +86,13 @@
86
86
  min-inline-size: 0;
87
87
  }
88
88
 
89
- /* Balanced subdivision, activated by an ancestor container named actual-grid.
89
+ /* Balanced subdivision, activated by an ancestor container named actual-container.
90
90
  * A .grid-N inside such a container enters only divisor states of N. The name
91
91
  * is deliberate: a grid must not key off the nearest anonymous query container,
92
92
  * or a region that sets container-type: inline-size for an unrelated reason
93
93
  * would silently change the grid. The author opts the grid in by naming the
94
94
  * context — .container-query is the official helper, or declare
95
- * container: actual-grid / inline-size on your own region.
95
+ * container: actual-container / inline-size on your own region.
96
96
  *
97
97
  * .grid-2 2 -> 1
98
98
  * .grid-3 3 -> 1
@@ -109,7 +109,7 @@
109
109
  * inline contribution and collapses it inside .cluster, .topbar, floats, and
110
110
  * any shrink-to-fit box. See docs/design-notes/grid.md.
111
111
  *
112
- * Without an actual-grid ancestor none of these @container rules resolve, so
112
+ * Without an actual-container ancestor none of these @container rules resolve, so
113
113
  * the auto-fill baseline above stays. The min-width: 0 rule is the lowest
114
114
  * step: it pins the grid to one column inside a container before any larger
115
115
  * threshold fires (a bare grid would otherwise show a 2 + 1 orphan at 28-48rem).
@@ -125,25 +125,25 @@
125
125
  * Ascending min-width only: the last matching step wins by cascade order.
126
126
  */
127
127
  @supports (container-type: inline-size) {
128
- @container actual-grid (min-width: 0px) {
128
+ @container actual-container (min-width: 0px) {
129
129
  :where(.grid-2, .grid-3, .grid-4, .grid-6) {
130
130
  grid-template-columns: 1fr;
131
131
  }
132
132
  }
133
133
 
134
- @container actual-grid (min-width: 28rem) {
134
+ @container actual-container (min-width: 28rem) {
135
135
  :where(.grid-2, .grid-4, .grid-6) {
136
136
  grid-template-columns: repeat(2, minmax(0, 1fr));
137
137
  }
138
138
  }
139
139
 
140
- @container actual-grid (min-width: 48rem) {
140
+ @container actual-container (min-width: 48rem) {
141
141
  :where(.grid-3, .grid-6) {
142
142
  grid-template-columns: repeat(3, minmax(0, 1fr));
143
143
  }
144
144
  }
145
145
 
146
- @container actual-grid (min-width: 64rem) {
146
+ @container actual-container (min-width: 64rem) {
147
147
  :where(.grid-4) {
148
148
  grid-template-columns: repeat(4, minmax(0, 1fr));
149
149
  }
@@ -14,7 +14,7 @@
14
14
  * .sidebar-layout main content + secondary aside
15
15
  * .grid responsive collection; item width is the contract
16
16
  * .grid-N structural density of N; balanced inside a container named
17
- * actual-grid (in grid.css)
17
+ * actual-container (in grid.css)
18
18
  * .column-layout explicit 12-column region composition; the author owns
19
19
  * narrow-container recomposition
20
20
  * .scroller theme-aware scrollbar density and colour
@@ -92,7 +92,7 @@ if (typeof document !== "undefined") {
92
92
  submitRoots.add(document);
93
93
  document.addEventListener("submit", handleSubmit);
94
94
 
95
- window.addEventListener("pagehide", () => {
95
+ document.defaultView?.addEventListener("pagehide", () => {
96
96
  for (const input of revealed) {
97
97
  // Opportunistic housekeeping: an input removed from the DOM before
98
98
  // navigation no longer needs reverting and can leave the set.