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.
- package/CHANGELOG.md +66 -3
- package/README.md +2 -2
- package/dist/actual.css +54 -14
- package/dist/actual.full.css +744 -185
- 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/spacing-units.md +286 -0
- package/docs/design-notes/steps.md +748 -0
- package/docs/design-notes/widget-primitives.md +32 -15
- package/docs/navigation.json +2 -0
- package/docs/pages/components/alert.md +14 -9
- package/docs/pages/components/app-navigation.md +2 -0
- package/docs/pages/components/aura.md +102 -6
- package/docs/pages/components/avatar.md +9 -6
- package/docs/pages/components/badge.md +27 -9
- package/docs/pages/components/button.md +25 -18
- package/docs/pages/components/card.md +27 -7
- package/docs/pages/components/chat.md +1 -1
- package/docs/pages/components/data-list.md +72 -0
- package/docs/pages/components/dialog.md +12 -7
- package/docs/pages/components/drawer.md +3 -1
- package/docs/pages/components/fab.md +14 -10
- package/docs/pages/components/indicator.md +6 -6
- package/docs/pages/components/list.md +11 -2
- package/docs/pages/components/meter.md +56 -1
- package/docs/pages/components/navbar.md +1 -1
- package/docs/pages/components/pagination.md +1 -1
- package/docs/pages/components/progress.md +10 -0
- package/docs/pages/components/rating.md +4 -4
- package/docs/pages/components/skeleton.md +3 -1
- package/docs/pages/components/spinner.md +1 -1
- package/docs/pages/components/steps.md +379 -47
- package/docs/pages/components/table.md +6 -5
- package/docs/pages/enhancements/flyout.md +14 -10
- package/docs/pages/enhancements/overview.md +2 -2
- package/docs/pages/enhancements/scrollspy.md +1 -1
- package/docs/pages/enhancements/status-bar.md +10 -1
- package/docs/pages/enhancements/tabs.md +1 -1
- package/docs/pages/examples/overview.md +4 -1
- 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 +6 -4
- package/docs/pages/forms/labels.md +8 -5
- package/docs/pages/forms/overview.md +26 -19
- package/docs/pages/forms/password.md +3 -2
- package/docs/pages/forms/range.md +15 -2
- package/docs/pages/forms/states-and-sizes.md +7 -5
- package/docs/pages/forms/validation.md +15 -9
- package/docs/pages/foundations/philosophy.md +11 -1
- package/docs/pages/foundations/tokens.md +16 -9
- package/docs/pages/foundations/typography.md +11 -3
- package/docs/pages/guides/bootstrap.md +3 -3
- package/docs/pages/guides/introduction.md +2 -2
- 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/scroll-snap.md +2 -0
- package/docs/pages/layout/sidebar-layout.md +2 -0
- package/docs/pages/layout/stack.md +10 -6
- package/docs/pages/layout/topbar.md +2 -0
- package/docs/pages/patterns/structured-lists.md +7 -7
- package/docs/pages/utilities/accessibility.md +19 -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 +8 -1
- package/src/css/components/data-list.css +27 -0
- package/src/css/components/drawer.css +30 -11
- package/src/css/components/fab.css +44 -8
- package/src/css/components/flyout.css +17 -12
- package/src/css/components/index.css +1 -0
- package/src/css/components/list.css +3 -1
- package/src/css/components/meter.css +28 -1
- package/src/css/components/modal.css +28 -11
- package/src/css/components/progress.css +5 -0
- package/src/css/components/status-bar.css +31 -15
- package/src/css/components/steps.css +289 -55
- package/src/css/components/surface.css +5 -3
- package/src/css/components/tooltip.css +5 -8
- package/src/css/core/base.css +7 -1
- package/src/css/core/intents.css +6 -0
- package/src/css/core/tokens.css +24 -9
- package/src/css/core/variants.css +17 -4
- 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/forms/form.css +4 -4
- 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/css/typography/prose.css +2 -3
- package/src/css/utilities/base.css +16 -0
- package/src/js/password.js +1 -1
- package/src/js/selectors.js +1 -0
- package/src/js/status.js +88 -7
- package/src/js/surface.js +2 -11
- package/src/js/transition.js +20 -0
|
@@ -7,13 +7,17 @@ The existing button component owns its size, shape, intent, and interaction.
|
|
|
7
7
|
As a direct child of `.app-layout`, it instead overlays the main grid area so
|
|
8
8
|
the layout keeps it clear of adaptive application navigation and safe areas.
|
|
9
9
|
|
|
10
|
+
**Related terms:** fab.
|
|
11
|
+
|
|
10
12
|
```html
|
|
11
13
|
<div class="fab">
|
|
12
14
|
<button class="btn circle primary lg icon-only" type="button" aria-label="Create">
|
|
13
|
-
<
|
|
15
|
+
<i class="ti ti-plus" aria-hidden="true"></i>
|
|
14
16
|
</button>
|
|
15
17
|
</div>
|
|
16
18
|
```
|
|
19
|
+
The plain FAB button carries the application's own icon — it is a product
|
|
20
|
+
action, not a toggle.
|
|
17
21
|
|
|
18
22
|
Use native `details` for a no-JavaScript speed dial. List actions in their
|
|
19
23
|
visual top-to-bottom order so keyboard focus follows the same sequence.
|
|
@@ -24,9 +28,7 @@ visual top-to-bottom order so keyboard focus follows the same sequence.
|
|
|
24
28
|
class="btn circle primary icon-only"
|
|
25
29
|
style="--btn-min-size: 3.5rem"
|
|
26
30
|
aria-label="Create"
|
|
27
|
-
>
|
|
28
|
-
<span aria-hidden="true">+</span>
|
|
29
|
-
</summary>
|
|
31
|
+
></summary>
|
|
30
32
|
|
|
31
33
|
<div class="fab-actions">
|
|
32
34
|
<div class="fab-action">
|
|
@@ -63,9 +65,7 @@ not the FAB's containing component. Production `.fab` remains viewport-fixed.
|
|
|
63
65
|
class="btn circle primary icon-only"
|
|
64
66
|
style="--btn-min-size: 3.5rem"
|
|
65
67
|
aria-label="Create"
|
|
66
|
-
>
|
|
67
|
-
<span aria-hidden="true">+</span>
|
|
68
|
-
</summary>
|
|
68
|
+
></summary>
|
|
69
69
|
|
|
70
70
|
<div class="fab-actions">
|
|
71
71
|
<div class="fab-action">
|
|
@@ -99,13 +99,16 @@ Each `.fab-action` keeps its `.fab-label` and secondary button on one compact
|
|
|
99
99
|
line. The example uses the button's existing `.lg` density for 44px secondary
|
|
100
100
|
actions and its `--btn-min-size` hook for a dominant 56px trigger. Size still
|
|
101
101
|
belongs to Button rather than introducing FAB-specific size modifiers.
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
Unlike the plain FAB, the speed dial trigger takes no icon: FAB owns it as a
|
|
103
|
+
toggle and masks the shared `--icon-plus` glyph while closed and `--icon-close` —
|
|
104
|
+
the same close symbol used by alerts and dialogs — while open, both sized by
|
|
105
|
+
`--fab-icon-size`. No application icon and no rotated glyph is involved, so the
|
|
106
|
+
two states stay visually identical in size and stroke.
|
|
104
107
|
|
|
105
108
|
## Class reference
|
|
106
109
|
|
|
107
110
|
| Class | Description |
|
|
108
|
-
|
|
111
|
+
| -------------- | --------------------------------------------------------- |
|
|
109
112
|
| `.fab` | Fixed viewport placement; use `details` for a speed dial. |
|
|
110
113
|
| `.fab-actions` | Collapsible vertical action list. |
|
|
111
114
|
| `.fab-action` | One horizontal label-and-button unit. |
|
|
@@ -115,6 +118,7 @@ the open state so a plus naturally becomes a close symbol.
|
|
|
115
118
|
|
|
116
119
|
- `--fab-offset` — minimum viewport-edge offset.
|
|
117
120
|
- `--fab-gap` — gap between actions and between the trigger and action list.
|
|
121
|
+
- `--fab-icon-size` — size of the speed dial toggle's open and close markers.
|
|
118
122
|
|
|
119
123
|
FAB is hidden in print and uses `--z-menu`, leaving tooltips and status UI above
|
|
120
124
|
it. Dialogs remain in the browser's top layer.
|
|
@@ -9,12 +9,12 @@ that owns its appearance.
|
|
|
9
9
|
|
|
10
10
|
## Class reference
|
|
11
11
|
|
|
12
|
-
| Class | Kind | Description
|
|
13
|
-
|
|
14
|
-
| `.indicator` | Component | Positioning context for an overlaid child.
|
|
15
|
-
| `.indicator-item` | Part | Item attached to the top-end corner by default.
|
|
16
|
-
| `.start` | Placement | Moves the item to the inline-start corner.
|
|
17
|
-
| `.bottom` | Placement | Moves the item to the bottom corner.
|
|
12
|
+
| Class | Kind | Description |
|
|
13
|
+
| ----------------- | --------- | ----------------------------------------------- |
|
|
14
|
+
| `.indicator` | Component | Positioning context for an overlaid child. |
|
|
15
|
+
| `.indicator-item` | Part | Item attached to the top-end corner by default. |
|
|
16
|
+
| `.start` | Placement | Moves the item to the inline-start corner. |
|
|
17
|
+
| `.bottom` | Placement | Moves the item to the bottom corner. |
|
|
18
18
|
|
|
19
19
|
Combine `.bottom.start` for bottom-start. Logical inline placement follows the
|
|
20
20
|
document direction automatically.
|
|
@@ -33,18 +33,27 @@ badges, text, switches, and buttons retain their own component sizing. The
|
|
|
33
33
|
middle region has no minimum content floor, so supporting text and long tokens
|
|
34
34
|
wrap instead of widening the page.
|
|
35
35
|
|
|
36
|
+
Regions align to the row's first line: the leading check or avatar, the title,
|
|
37
|
+
and the trailing metadata or control sit on one horizontal line while
|
|
38
|
+
supporting text wraps beneath — a structured row, not a centered button. For a
|
|
39
|
+
shared two-line arrangement where leading and trailing truly need to center,
|
|
40
|
+
the app composes the alignment itself rather than switching this default.
|
|
41
|
+
A pure traversal affordance such as a trailing caret can opt out of the
|
|
42
|
+
first-line rule on its own item with `align-self: center`, keeping metadata
|
|
43
|
+
rows unaffected.
|
|
44
|
+
|
|
36
45
|
For a navigable row, keep the list semantics and put `.list-item` on the link:
|
|
37
46
|
|
|
38
47
|
```html demo
|
|
39
48
|
<ul class="list">
|
|
40
49
|
<li>
|
|
41
50
|
<a class="list-item" href="#profile">
|
|
42
|
-
<span aria-hidden="true"
|
|
51
|
+
<span class="avatar sm" aria-hidden="true"><i class="ti ti-user" aria-hidden="true"></i></span>
|
|
43
52
|
<span class="list-item-content">
|
|
44
53
|
<strong class="list-item-title">Profile</strong>
|
|
45
54
|
<span class="list-item-text">Name, photo, and contact details</span>
|
|
46
55
|
</span>
|
|
47
|
-
<
|
|
56
|
+
<i class="ti ti-chevron-right list-item-trailing" style="align-self: center" aria-hidden="true"></i>
|
|
48
57
|
</a>
|
|
49
58
|
</li>
|
|
50
59
|
</ul>
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
> Scalar measurement within a known range, not a progress indicator.
|
|
4
4
|
|
|
5
5
|
- Use native `<meter class="meter">`.
|
|
6
|
+
- Use a segmented `<div class="meter" role="meter">` when the measurement
|
|
7
|
+
needs a category breakdown.
|
|
6
8
|
- Shares progress styling DNA.
|
|
7
9
|
- Represents a scalar measurement within a known range, not task completion.
|
|
8
10
|
- Use explicit bar height to avoid padding issues.
|
|
@@ -18,6 +20,59 @@
|
|
|
18
20
|
The three standard meter zones (optimum, suboptimum, even-less-good) map to the
|
|
19
21
|
shared `--success`, `--warning`, and `--danger` colors.
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Segmented meters keep the overall measurement on the meter itself and expose
|
|
24
|
+
the category breakdown as composition. A segmented `.meter` is a flex container
|
|
25
|
+
whose direct children are weighted by `--meter-value`; child intent classes
|
|
26
|
+
define segment colors. The values are relative weights, so they do not need to
|
|
27
|
+
be converted to percentages. Keep the segments decorative with
|
|
28
|
+
`aria-hidden="true"` and provide category names and values in a nearby legend.
|
|
29
|
+
An unintentional child remains transparent, so the meter background can
|
|
30
|
+
represent an available or otherwise unclassified portion. Match its legend
|
|
31
|
+
marker to that background rather than to the neutral intent.
|
|
32
|
+
|
|
33
|
+
```html demo
|
|
34
|
+
<div class="stack">
|
|
35
|
+
<div
|
|
36
|
+
class="meter"
|
|
37
|
+
role="meter"
|
|
38
|
+
aria-label="Storage usage"
|
|
39
|
+
aria-valuemin="0"
|
|
40
|
+
aria-valuemax="8192"
|
|
41
|
+
aria-valuenow="6854.45"
|
|
42
|
+
aria-valuetext="6854.45 MB used of 8 GB"
|
|
43
|
+
>
|
|
44
|
+
<span class="primary" style="--meter-value: 4600" aria-hidden="true"></span>
|
|
45
|
+
<span class="secondary" style="--meter-value: 1350" aria-hidden="true"></span>
|
|
46
|
+
<span class="success" style="--meter-value: 904.45" aria-hidden="true"></span>
|
|
47
|
+
<span style="--meter-value: 1337.55" aria-hidden="true"></span>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="cluster">
|
|
51
|
+
<span>
|
|
52
|
+
<span class="badge primary" aria-hidden="true"></span>
|
|
53
|
+
Regular <span class="muted">4600 MB</span>
|
|
54
|
+
</span>
|
|
55
|
+
<span>
|
|
56
|
+
<span class="badge secondary" aria-hidden="true"></span>
|
|
57
|
+
System <span class="muted">1350 MB</span>
|
|
58
|
+
</span>
|
|
59
|
+
<span>
|
|
60
|
+
<span class="badge success" aria-hidden="true"></span>
|
|
61
|
+
Shared <span class="muted">904.45 MB</span>
|
|
62
|
+
</span>
|
|
63
|
+
<span>
|
|
64
|
+
<span class="badge" style="--intent: var(--surface-subtle)" aria-hidden="true"></span>
|
|
65
|
+
Free <span class="muted">1337.55 MB</span>
|
|
66
|
+
</span>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Hooks
|
|
22
72
|
|
|
23
73
|
- `--bar-height` — bar thickness, shared with `.progress`.
|
|
74
|
+
- `--meter-value` — relative weight of a direct child in a segmented meter.
|
|
75
|
+
|
|
76
|
+
`.sm` / `.lg` are intentionally not supported: a bar keeps its inline size and only changes
|
|
77
|
+
thickness, and a design asks for a 4px or a 12px bar, not for a "small" one. Set the hook
|
|
78
|
+
on the element, or better, on an application class.
|
|
@@ -19,7 +19,7 @@ flex list, `.nav-list` a vertical grid. Putting both on one element resolves to
|
|
|
19
19
|
## Class reference
|
|
20
20
|
|
|
21
21
|
| Class | Kind | Description |
|
|
22
|
-
|
|
22
|
+
| --------------- | ----------- | ----------------------------------------------------- |
|
|
23
23
|
| `.navbar` | Component | Horizontal bar shell. |
|
|
24
24
|
| `.navbar-brand` | Composition | Brand link at the inline start. |
|
|
25
25
|
| `.navbar-nav` | Composition | Horizontal link list. |
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
## Class reference
|
|
16
16
|
|
|
17
17
|
| Class | Kind | Description |
|
|
18
|
-
|
|
18
|
+
| ------------- | --------- | ------------------------------ |
|
|
19
19
|
| `.pagination` | Component | Ordered list of page controls. |
|
|
20
20
|
| `.sm` / `.lg` | Size | Control density. |
|
|
21
21
|
|
|
@@ -27,3 +27,13 @@
|
|
|
27
27
|
- `--progress-track` — unfilled track color.
|
|
28
28
|
- `--progress-value` — filled bar color. Prefer an intent class over setting this directly.
|
|
29
29
|
- `--bar-height` — bar thickness, shared with `.meter`.
|
|
30
|
+
|
|
31
|
+
`.sm` / `.lg` are intentionally not supported: a bar keeps its inline size and only changes
|
|
32
|
+
thickness, and a design asks for a 4px or a 12px bar, not for a "small" one. Set the hook
|
|
33
|
+
on the element, or better, on an application class.
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
.storage-meter {
|
|
37
|
+
--bar-height: 0.375rem;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
@@ -10,10 +10,10 @@ filled while the control remains fully functional.
|
|
|
10
10
|
|
|
11
11
|
## Class reference
|
|
12
12
|
|
|
13
|
-
| Class | Kind | Description
|
|
14
|
-
|
|
15
|
-
| `.rating` | Component | Radio group presented as stars.
|
|
16
|
-
| `.sm` / `.lg` | Size | Smaller or larger star geometry.
|
|
13
|
+
| Class | Kind | Description |
|
|
14
|
+
| ------------- | --------- | -------------------------------- |
|
|
15
|
+
| `.rating` | Component | Radio group presented as stars. |
|
|
16
|
+
| `.sm` / `.lg` | Size | Smaller or larger star geometry. |
|
|
17
17
|
|
|
18
18
|
```html demo
|
|
19
19
|
<fieldset class="field">
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
- Use layout utilities for placeholder arrangement.
|
|
9
9
|
- Only relevant for simple placeholders - use more structural solutions like phantom-ui for complex cases.
|
|
10
10
|
|
|
11
|
+
**Related terms:** skeleton screen, shimmer, loading placeholder.
|
|
12
|
+
|
|
11
13
|
## Class reference
|
|
12
14
|
|
|
13
15
|
| Class | Kind | Description |
|
|
14
|
-
|
|
16
|
+
| ------------ | --------- | --------------------------------------------------- |
|
|
15
17
|
| `.skeleton` | Component | Animated placeholder shape. |
|
|
16
18
|
| `data-shape` | Modifier | Geometry presets: `text`, `title`, `avatar`, `box`. |
|
|
17
19
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
## Class reference
|
|
14
14
|
|
|
15
15
|
| Class | Kind | Description |
|
|
16
|
-
|
|
16
|
+
| -------------- | --------- | ------------------------------------------------------------------ |
|
|
17
17
|
| `.spinner` | Component | Circular loading indicator using `currentColor`. |
|
|
18
18
|
| `.sm` / `.lg` | Size | Smaller (`0.75em`) or larger (`2rem`) spinner. |
|
|
19
19
|
| Shared intents | Intent | `.primary`, `.secondary`, `.success`, `.warning`, `.danger` color. |
|