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.
- package/CHANGELOG.md +17 -1
- package/dist/actual.css +1 -0
- package/dist/actual.full.css +480 -117
- package/dist/actual.full.js +1 -1
- package/dist/actual.full.min.css +1 -1
- package/dist/actual.min.css +1 -1
- package/docs/design-notes/browser-support.md +14 -14
- package/docs/design-notes/enhancement-contract.md +30 -13
- package/docs/design-notes/forced-colors.md +11 -7
- package/docs/design-notes/grid.md +4 -4
- package/docs/design-notes/naming.md +15 -9
- package/docs/design-notes/platform-alignment.md +9 -0
- package/docs/design-notes/references.md +4 -0
- package/docs/design-notes/steps.md +748 -0
- package/docs/design-notes/widget-primitives.md +32 -15
- package/docs/navigation.json +1 -0
- package/docs/pages/components/alert.md +13 -8
- package/docs/pages/components/aura.md +102 -6
- package/docs/pages/components/avatar.md +9 -6
- package/docs/pages/components/badge.md +11 -7
- package/docs/pages/components/button.md +17 -17
- package/docs/pages/components/card.md +15 -8
- package/docs/pages/components/chat.md +1 -1
- package/docs/pages/components/dialog.md +10 -7
- package/docs/pages/components/drawer.md +1 -1
- package/docs/pages/components/fab.md +12 -10
- package/docs/pages/components/indicator.md +6 -6
- package/docs/pages/components/list.md +11 -2
- package/docs/pages/components/navbar.md +1 -1
- package/docs/pages/components/pagination.md +1 -1
- package/docs/pages/components/rating.md +4 -4
- package/docs/pages/components/skeleton.md +1 -1
- package/docs/pages/components/spinner.md +1 -1
- package/docs/pages/components/steps.md +376 -52
- package/docs/pages/components/table.md +5 -5
- package/docs/pages/enhancements/flyout.md +12 -10
- package/docs/pages/enhancements/overview.md +2 -2
- package/docs/pages/enhancements/scrollspy.md +1 -1
- package/docs/pages/enhancements/tabs.md +1 -1
- package/docs/pages/examples/overview.md +2 -0
- package/docs/pages/forms/choice-cards.md +4 -4
- package/docs/pages/forms/combobox.md +87 -0
- package/docs/pages/forms/floating-field.md +5 -3
- package/docs/pages/forms/joined-controls.md +4 -4
- package/docs/pages/forms/labels.md +8 -5
- package/docs/pages/forms/overview.md +25 -18
- package/docs/pages/forms/password.md +3 -2
- package/docs/pages/forms/range.md +13 -2
- package/docs/pages/forms/states-and-sizes.md +6 -4
- package/docs/pages/forms/validation.md +13 -9
- package/docs/pages/foundations/tokens.md +9 -6
- package/docs/pages/foundations/typography.md +1 -1
- package/docs/pages/guides/bootstrap.md +3 -3
- package/docs/pages/guides/introduction.md +1 -1
- package/docs/pages/guides/modular-import.md +21 -10
- package/docs/pages/guides/progressive-enhancement.md +75 -54
- package/docs/pages/guides/tailwind.md +2 -2
- package/docs/pages/layout/app-shell.md +4 -4
- package/docs/pages/layout/choosing.md +10 -6
- package/docs/pages/layout/grid.md +11 -10
- package/docs/pages/layout/stack.md +10 -6
- package/docs/pages/patterns/structured-lists.md +7 -7
- package/docs/pages/utilities/accessibility.md +1 -1
- package/docs/pages/utilities/flex.md +20 -13
- package/docs/pages/utilities/links.md +1 -1
- package/docs/pages/utilities/list.md +1 -1
- package/docs/pages/utilities/overflow.md +14 -7
- package/docs/pages/utilities/overview.md +22 -0
- package/docs/pages/utilities/shape.md +1 -1
- package/docs/pages/utilities/sizing-wrapping.md +10 -8
- package/docs/pages/utilities/spacing.md +26 -19
- package/docs/pages/utilities/text.md +1 -1
- package/llms.txt +27 -4
- package/package.json +3 -2
- package/scripts/reserved-classes.json +4 -1
- package/src/css/components/fab.css +44 -8
- package/src/css/components/list.css +3 -1
- package/src/css/components/steps.css +277 -69
- package/src/css/core/tokens.css +1 -0
- package/src/css/effects/aura.css +101 -11
- package/src/css/forms/custom-select.css +1 -1
- package/src/css/forms/floating-field.css +8 -6
- package/src/css/layout/container-query.css +37 -13
- package/src/css/layout/grid.css +7 -7
- package/src/css/layout/index.css +1 -1
- package/src/js/password.js +1 -1
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
/* Convenience helper
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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-
|
|
38
|
+
container: actual-container / inline-size;
|
|
15
39
|
}
|
package/src/css/layout/grid.css
CHANGED
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
min-inline-size: 0;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/* Balanced subdivision, activated by an ancestor container named actual-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
146
|
+
@container actual-container (min-width: 64rem) {
|
|
147
147
|
:where(.grid-4) {
|
|
148
148
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
149
149
|
}
|
package/src/css/layout/index.css
CHANGED
|
@@ -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-
|
|
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
|
package/src/js/password.js
CHANGED
|
@@ -92,7 +92,7 @@ if (typeof document !== "undefined") {
|
|
|
92
92
|
submitRoots.add(document);
|
|
93
93
|
document.addEventListener("submit", handleSubmit);
|
|
94
94
|
|
|
95
|
-
|
|
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.
|