actual-css 0.3.1 → 0.4.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.
- package/CHANGELOG.md +109 -3
- package/README.md +35 -30
- package/dist/actual.css +66 -4958
- package/dist/actual.full.css +7548 -0
- package/dist/actual.full.js +1 -0
- package/dist/actual.full.min.css +1 -0
- package/dist/actual.js +1 -1
- package/dist/actual.min.css +1 -1
- package/docs/design-notes/app-ui.md +33 -0
- package/docs/design-notes/cascade-layer.md +34 -13
- package/docs/design-notes/column-layout.md +677 -0
- package/docs/design-notes/enhancement-contract.md +25 -0
- package/docs/design-notes/forced-colors.md +3 -0
- package/docs/design-notes/grid.md +785 -0
- package/docs/design-notes/naming.md +15 -0
- package/docs/design-notes/references.md +1 -1
- package/docs/design-notes/widget-primitives.md +1 -0
- package/docs/navigation.json +12 -2
- package/docs/pages/components/alert.md +21 -14
- package/docs/pages/components/app-navigation.md +34 -0
- package/docs/pages/components/aura.md +1 -1
- package/docs/pages/components/avatar.md +16 -6
- package/docs/pages/components/badge.md +9 -7
- package/docs/pages/components/button.md +46 -16
- package/docs/pages/components/card.md +17 -9
- package/docs/pages/components/chat.md +8 -8
- package/docs/pages/components/dialog.md +7 -7
- package/docs/pages/components/drawer.md +3 -3
- package/docs/pages/components/fab.md +9 -7
- package/docs/pages/components/indicator.md +52 -0
- package/docs/pages/components/list.md +62 -0
- package/docs/pages/components/navbar.md +15 -8
- package/docs/pages/components/pagination.md +4 -3
- package/docs/pages/components/rating.md +68 -0
- package/docs/pages/components/skeleton.md +4 -4
- package/docs/pages/components/spinner.md +5 -5
- package/docs/pages/components/steps.md +57 -0
- package/docs/pages/components/table.md +30 -5
- package/docs/pages/enhancements/flyout.md +15 -15
- package/docs/pages/enhancements/overview.md +1 -1
- package/docs/pages/enhancements/scrollspy.md +6 -6
- package/docs/pages/enhancements/status-bar.md +5 -1
- package/docs/pages/enhancements/tabs.md +7 -8
- package/docs/pages/enhancements/tooltip.md +1 -1
- package/docs/pages/examples/overview.md +47 -22
- package/docs/pages/forms/choice-cards.md +11 -6
- package/docs/pages/forms/controls.md +1 -1
- package/docs/pages/forms/detached-actions.md +1 -1
- package/docs/pages/forms/floating-field.md +10 -5
- package/docs/pages/forms/form-actions.md +1 -1
- package/docs/pages/forms/input-policy.md +1 -1
- package/docs/pages/forms/joined-controls.md +4 -4
- package/docs/pages/forms/labels.md +6 -6
- package/docs/pages/forms/otp.md +33 -1
- package/docs/pages/forms/overview.md +19 -19
- package/docs/pages/forms/password.md +1 -1
- package/docs/pages/forms/range.md +1 -1
- package/docs/pages/forms/states-and-sizes.md +44 -48
- package/docs/pages/forms/sticky-actions.md +3 -3
- package/docs/pages/forms/switch.md +110 -2
- package/docs/pages/forms/validation.md +9 -9
- package/docs/pages/foundations/philosophy.md +1 -1
- package/docs/pages/foundations/theming.md +17 -2
- package/docs/pages/foundations/tokens.md +22 -10
- package/docs/pages/foundations/typography.md +50 -20
- package/docs/pages/guides/bootstrap.md +11 -11
- package/docs/pages/guides/integrating-actual-css.md +192 -0
- package/docs/pages/guides/introduction.md +23 -26
- package/docs/pages/guides/modular-import.md +173 -0
- package/docs/pages/guides/progressive-enhancement.md +81 -78
- package/docs/pages/guides/tailwind.md +6 -8
- package/docs/pages/layout/app-layout.md +57 -0
- package/docs/pages/layout/app-shell.md +28 -7
- package/docs/pages/layout/center.md +12 -1
- package/docs/pages/layout/choosing.md +54 -0
- package/docs/pages/layout/column-layout.md +206 -0
- package/docs/pages/layout/frame.md +6 -1
- package/docs/pages/layout/grid.md +133 -102
- package/docs/pages/layout/media.md +1 -1
- package/docs/pages/layout/overview.md +15 -2
- package/docs/pages/layout/scroll-snap.md +2 -2
- package/docs/pages/layout/scroll-target.md +45 -0
- package/docs/pages/layout/sidebar-layout.md +38 -18
- package/docs/pages/layout/stack.md +70 -1
- package/docs/pages/layout/switcher.md +10 -26
- package/docs/pages/layout/topbar.md +2 -2
- package/docs/pages/patterns/actions.md +1 -1
- package/docs/pages/patterns/code-block.md +1 -1
- package/docs/pages/patterns/exclusive-accordion.md +1 -1
- package/docs/pages/patterns/hierarchical-nav.md +1 -1
- package/docs/pages/patterns/icon-input.md +1 -1
- package/docs/pages/patterns/icon-slot.md +61 -0
- package/docs/pages/patterns/intent-nesting.md +1 -1
- package/docs/pages/patterns/navigation-list.md +1 -1
- package/docs/pages/patterns/overview.md +1 -1
- package/docs/pages/patterns/structured-lists.md +38 -40
- package/docs/pages/utilities/accessibility.md +3 -3
- package/docs/pages/utilities/flex.md +15 -15
- package/docs/pages/utilities/links.md +4 -4
- package/docs/pages/utilities/list.md +8 -8
- package/docs/pages/utilities/overflow.md +8 -8
- package/docs/pages/utilities/overview.md +1 -1
- package/docs/pages/utilities/shape.md +3 -3
- package/docs/pages/utilities/sizing-wrapping.md +23 -16
- package/docs/pages/utilities/spacing.md +20 -20
- package/docs/pages/utilities/text.md +10 -10
- package/llms.txt +46 -4
- package/package.json +43 -13
- package/scripts/reserved-classes.json +278 -0
- package/src/cli/actual-css.js +133 -0
- package/src/css/actual.css +1 -31
- package/src/css/actual.full.css +11 -2
- package/src/css/components/alert.css +17 -4
- package/src/css/components/app-nav.css +76 -0
- package/src/css/components/avatar.css +4 -0
- package/src/css/components/badge.css +19 -19
- package/src/css/components/breadcrumb.css +1 -1
- package/src/css/components/button.css +20 -32
- package/src/css/components/card.css +34 -9
- package/src/css/{optional → components}/chat.css +0 -6
- package/src/css/components/drawer.css +24 -5
- package/src/css/{optional → components}/fab.css +1 -7
- package/src/css/components/flyout.css +5 -0
- package/src/css/components/index.css +37 -27
- package/src/css/components/indicator.css +47 -0
- package/src/css/components/join.css +8 -1
- package/src/css/components/key.css +2 -0
- package/src/css/components/list.css +83 -0
- package/src/css/components/menu.css +11 -8
- package/src/css/components/meter.css +4 -1
- package/src/css/components/modal.css +5 -17
- package/src/css/components/navbar.css +6 -15
- package/src/css/components/pagination.css +11 -0
- package/src/css/components/rating.css +101 -0
- package/src/css/components/spinner.css +5 -0
- package/src/css/components/status-bar.css +5 -0
- package/src/css/components/steps.css +122 -0
- package/src/css/components/surface.css +5 -0
- package/src/css/components/tab.css +20 -22
- package/src/css/components/table.css +6 -0
- package/src/css/components/tooltip.css +3 -7
- package/src/css/{focus.css → core/focus.css} +0 -8
- package/src/css/core/index.css +9 -0
- package/src/css/core/print.css +18 -0
- package/src/css/{theme.css → core/theme.css} +19 -19
- package/src/css/{tokens.css → core/tokens.css} +16 -4
- package/src/css/{variants.css → core/variants.css} +3 -2
- package/src/css/{optional → effects}/aura.css +1 -10
- package/src/css/effects/index.css +2 -0
- package/src/css/forms/base.css +8 -0
- package/src/css/forms/choice-card.css +7 -15
- package/src/css/forms/choice.css +49 -37
- package/src/css/forms/control.css +4 -1
- package/src/css/forms/custom-select.css +2 -0
- package/src/css/{optional → forms}/floating-field.css +25 -7
- package/src/css/forms/index.css +10 -13
- package/src/css/forms/native.css +15 -2
- package/src/css/{optional → forms}/otp.css +25 -16
- package/src/css/forms/range.css +14 -4
- package/src/css/forms/switch.css +31 -29
- package/src/css/layout/app-layout.css +102 -0
- package/src/css/layout/app-shell.css +6 -0
- package/src/css/layout/center.css +14 -0
- package/src/css/layout/cluster.css +21 -0
- package/src/css/layout/column-layout.css +144 -0
- package/src/css/layout/container-query.css +15 -0
- package/src/css/layout/frame.css +19 -0
- package/src/css/layout/grid.css +155 -0
- package/src/css/layout/index.css +44 -0
- package/src/css/layout/measure.css +9 -0
- package/src/css/layout/media.css +10 -0
- package/src/css/layout/scroll-target.css +15 -0
- package/src/css/layout/scroller.css +41 -0
- package/src/css/layout/sidebar-layout.css +52 -0
- package/src/css/layout/stack.css +21 -0
- package/src/css/layout/switcher.css +23 -0
- package/src/css/{optional/layout-extra.css → layout/topbar.css} +0 -20
- package/src/css/typography/index.css +5 -0
- package/src/css/typography/lead.css +7 -0
- package/src/css/{components → typography}/overline.css +2 -2
- package/src/css/{prose.css → typography/prose.css} +57 -38
- package/src/css/{utilities.css → utilities/base.css} +2 -0
- package/src/css/utilities/index.css +3 -0
- package/src/js/escape.js +36 -0
- package/src/js/flyout.js +22 -12
- package/src/js/full.js +26 -0
- package/src/js/index.js +5 -21
- package/src/js/surface.js +1 -31
- package/src/js/tooltip.js +48 -19
- package/src/js/validation.js +1 -1
- package/src/tooling/css-bundle.js +308 -0
- package/dist/actual-themes.min.css +0 -1
- package/dist/optional.css +0 -1048
- package/dist/optional.min.css +0 -1
- package/docs/pages/guides/optional-components.md +0 -33
- package/docs/pages/layout/list.md +0 -41
- package/src/css/grid.css +0 -109
- package/src/css/layout.css +0 -123
- package/src/css/optional/index.css +0 -10
- package/src/css/optional/scroller.css +0 -63
- package/src/css/print.css +0 -47
- package/src/css/themes/corporate.css +0 -60
- package/src/css/themes/cyberpunk.css +0 -60
- package/src/css/themes/dim.css +0 -33
- package/src/css/themes/edge.css +0 -117
- package/src/css/themes/forest.css +0 -65
- package/src/css/themes/gradient.css +0 -97
- package/src/css/themes/index.css +0 -47
- package/src/css/themes/indigo.css +0 -33
- package/src/css/themes/lavender.css +0 -66
- package/src/css/themes/mono.css +0 -60
- package/src/css/themes/neon.css +0 -66
- package/src/css/themes/ocean.css +0 -60
- package/src/css/themes/petrol.css +0 -64
- package/src/css/themes/spruce.css +0 -64
- package/src/css/themes/square.css +0 -65
- package/src/css/themes/sunset.css +0 -66
- /package/src/css/{base.css → core/base.css} +0 -0
- /package/src/css/{intents.css → core/intents.css} +0 -0
- /package/src/css/{reset.css → core/reset.css} +0 -0
- /package/src/css/{optional → layout}/scroll-snap.css +0 -0
- /package/src/css/{optional/typography-fluid.css → typography/fluid.css} +0 -0
- /package/src/css/{optional/utilities-extra.css → utilities/extra.css} +0 -0
|
@@ -8,19 +8,23 @@
|
|
|
8
8
|
- `.nav-list` is the shared vertical navigation list, reused by `.drawer` for stacked links.
|
|
9
9
|
- Mark the current page with `aria-current="page"` on the active `.nav-link`.
|
|
10
10
|
|
|
11
|
+
For a public or normally scrolling page, `.navbar` belongs inside the semantic
|
|
12
|
+
site header. Do not use `.topbar` or `.app-layout` unless the page actually has
|
|
13
|
+
the specialized persistent application-shell behavior those APIs describe.
|
|
14
|
+
|
|
11
15
|
`.navbar-nav` and `.nav-list` are mutually exclusive: `.navbar-nav` is a horizontal
|
|
12
16
|
flex list, `.nav-list` a vertical grid. Putting both on one element resolves to
|
|
13
17
|
`.nav-list` (vertical) — pick one per container.
|
|
14
18
|
|
|
15
19
|
## Class reference
|
|
16
20
|
|
|
17
|
-
| Class
|
|
18
|
-
|
|
19
|
-
| `.navbar`
|
|
20
|
-
| `.navbar-brand` | Composition | Brand link at the inline start.
|
|
21
|
-
| `.navbar-nav`
|
|
22
|
-
| `.nav-link`
|
|
23
|
-
| `.nav-list`
|
|
21
|
+
| Class | Kind | Description |
|
|
22
|
+
|-----------------|-------------|-------------------------------------------------------|
|
|
23
|
+
| `.navbar` | Component | Horizontal bar shell. |
|
|
24
|
+
| `.navbar-brand` | Composition | Brand link at the inline start. |
|
|
25
|
+
| `.navbar-nav` | Composition | Horizontal link list. |
|
|
26
|
+
| `.nav-link` | Component | A link item; current page via `aria-current="page"`. |
|
|
27
|
+
| `.nav-list` | Component | Shared vertical navigation list, reused by `.drawer`. |
|
|
24
28
|
|
|
25
29
|
## Basic usage
|
|
26
30
|
|
|
@@ -36,13 +40,16 @@ flex list, `.nav-list` a vertical grid. Putting both on one element resolves to
|
|
|
36
40
|
```
|
|
37
41
|
|
|
38
42
|
For a vertical sidebar nav, use `.nav-list` inside the drawer or sidebar.
|
|
43
|
+
Links inside `.nav-list` stretch to the available inline size, providing a
|
|
44
|
+
full-row hit target for vertical navigation.
|
|
39
45
|
|
|
40
46
|
## Responsive: navbar + drawer
|
|
41
47
|
|
|
42
48
|
There is no collapse/toggler mechanism. For a responsive navigation, keep the
|
|
43
49
|
horizontal `.navbar` for the desktop bar and compose the mobile experience from
|
|
44
50
|
a `.drawer` with a vertical `.nav-list`, opened by a `command="show-modal"` /
|
|
45
|
-
`commandfor` trigger.
|
|
51
|
+
`commandfor` trigger. Keep that trigger outside the `<nav>` subtree you hide at
|
|
52
|
+
narrow widths, or hiding the nav hides the control that opens it.
|
|
46
53
|
|
|
47
54
|
```html demo
|
|
48
55
|
<nav class="navbar" aria-label="Main">
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
- Numeric links may use `aria-label="Page N"` for clearer screen reader output.
|
|
10
10
|
- Prefer text labels for Previous and Next. Icon-only controls need an accessible name.
|
|
11
11
|
- Page links can compose with `.btn` for button-like hit targets.
|
|
12
|
+
- Arrows, page numbers, and truncation ellipses share one geometric system: every item gets the same minimum footprint, and wider content (100, 1000, text labels) grows past it naturally.
|
|
12
13
|
- Truncated ranges are plain text with `.muted` and `aria-hidden="true"`, not `.btn` — they are decorative, not actionable.
|
|
13
14
|
|
|
14
15
|
## Class reference
|
|
15
16
|
|
|
16
|
-
| Class
|
|
17
|
-
|
|
17
|
+
| Class | Kind | Description |
|
|
18
|
+
|---------------|-----------|--------------------------------|
|
|
18
19
|
| `.pagination` | Component | Ordered list of page controls. |
|
|
19
|
-
| `.sm` / `.lg` | Size
|
|
20
|
+
| `.sm` / `.lg` | Size | Control density. |
|
|
20
21
|
|
|
21
22
|
## Basic usage
|
|
22
23
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Rating
|
|
2
|
+
|
|
3
|
+
> Integer star rating built from native radio inputs.
|
|
4
|
+
|
|
5
|
+
Each star is a real `input[type="radio"]`, so submission, `required`, disabled
|
|
6
|
+
state, form reset, and keyboard navigation remain native. Keep values and DOM
|
|
7
|
+
order ascending. The cumulative fill and hover preview use `:has()` as a
|
|
8
|
+
progressive enhancement; older supported browsers show only the selected star
|
|
9
|
+
filled while the control remains fully functional.
|
|
10
|
+
|
|
11
|
+
## Class reference
|
|
12
|
+
|
|
13
|
+
| Class | Kind | Description |
|
|
14
|
+
|---------------|-----------|-------------------------------------|
|
|
15
|
+
| `.rating` | Component | Radio group presented as stars. |
|
|
16
|
+
| `.sm` / `.lg` | Size | Smaller or larger star geometry. |
|
|
17
|
+
|
|
18
|
+
```html demo
|
|
19
|
+
<fieldset class="field">
|
|
20
|
+
<legend class="field-label">Rate your experience</legend>
|
|
21
|
+
<div class="rating">
|
|
22
|
+
<input type="radio" name="experience" value="1" aria-label="1 star" />
|
|
23
|
+
<input type="radio" name="experience" value="2" aria-label="2 stars" />
|
|
24
|
+
<input type="radio" name="experience" value="3" aria-label="3 stars" checked />
|
|
25
|
+
<input type="radio" name="experience" value="4" aria-label="4 stars" />
|
|
26
|
+
<input type="radio" name="experience" value="5" aria-label="5 stars" />
|
|
27
|
+
</div>
|
|
28
|
+
</fieldset>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use a visible `<legend>` to name the group and an `aria-label` on every radio
|
|
32
|
+
to name its value. Add `required` to the radios when the form must receive a
|
|
33
|
+
rating. In forced-colors mode the stars deliberately return to native platform
|
|
34
|
+
radios so checked and focus states remain unambiguous.
|
|
35
|
+
|
|
36
|
+
Intent classes change the active color without changing the interaction model.
|
|
37
|
+
|
|
38
|
+
```html demo
|
|
39
|
+
<div class="cluster">
|
|
40
|
+
<fieldset class="field">
|
|
41
|
+
<legend class="field-label">Small rating</legend>
|
|
42
|
+
<div class="rating primary sm">
|
|
43
|
+
<input type="radio" name="small-rating" value="1" aria-label="1 star" />
|
|
44
|
+
<input type="radio" name="small-rating" value="2" aria-label="2 stars" checked />
|
|
45
|
+
<input type="radio" name="small-rating" value="3" aria-label="3 stars" />
|
|
46
|
+
</div>
|
|
47
|
+
</fieldset>
|
|
48
|
+
|
|
49
|
+
<fieldset class="field">
|
|
50
|
+
<legend class="field-label">Large rating</legend>
|
|
51
|
+
<div class="rating danger lg">
|
|
52
|
+
<input type="radio" name="large-rating" value="1" aria-label="1 star" />
|
|
53
|
+
<input type="radio" name="large-rating" value="2" aria-label="2 stars" />
|
|
54
|
+
<input type="radio" name="large-rating" value="3" aria-label="3 stars" />
|
|
55
|
+
<input type="radio" name="large-rating" value="4" aria-label="4 stars" checked />
|
|
56
|
+
<input type="radio" name="large-rating" value="5" aria-label="5 stars" />
|
|
57
|
+
</div>
|
|
58
|
+
</fieldset>
|
|
59
|
+
</div>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Hooks
|
|
63
|
+
|
|
64
|
+
- `--rating-size` — size of each star; `.sm` and `.lg` set this hook.
|
|
65
|
+
- `--rating-gap` — visual space between stars without creating inactive hover zones.
|
|
66
|
+
- `--rating-color` — star color. Prefer an intent class for semantic color.
|
|
67
|
+
- `--rating-empty` — color of unselected stars; use a surface or border token.
|
|
68
|
+
- `--rating-star` — mask image used to draw a star; override it when a strict CSP disallows data URLs.
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
## Class reference
|
|
12
12
|
|
|
13
|
-
| Class
|
|
14
|
-
|
|
15
|
-
| `.skeleton`
|
|
16
|
-
| `data-shape` | Modifier
|
|
13
|
+
| Class | Kind | Description |
|
|
14
|
+
|--------------|-----------|-----------------------------------------------------|
|
|
15
|
+
| `.skeleton` | Component | Animated placeholder shape. |
|
|
16
|
+
| `data-shape` | Modifier | Geometry presets: `text`, `title`, `avatar`, `box`. |
|
|
17
17
|
|
|
18
18
|
## Basic usage
|
|
19
19
|
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
## Class reference
|
|
14
14
|
|
|
15
|
-
| Class
|
|
16
|
-
|
|
17
|
-
| `.spinner`
|
|
18
|
-
| `.sm` / `.lg`
|
|
19
|
-
| Shared intents | Intent
|
|
15
|
+
| Class | Kind | Description |
|
|
16
|
+
|----------------|-----------|--------------------------------------------------------------------|
|
|
17
|
+
| `.spinner` | Component | Circular loading indicator using `currentColor`. |
|
|
18
|
+
| `.sm` / `.lg` | Size | Smaller (`0.75em`) or larger (`2rem`) spinner. |
|
|
19
|
+
| Shared intents | Intent | `.primary`, `.secondary`, `.success`, `.warning`, `.danger` color. |
|
|
20
20
|
|
|
21
21
|
## Basic usage
|
|
22
22
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Steps
|
|
2
|
+
|
|
3
|
+
> Semantic ordered-list progression for a multi-step process.
|
|
4
|
+
|
|
5
|
+
Use an `<ol>` because order is part of the meaning. Add `.complete` to finished
|
|
6
|
+
steps and `aria-current="step"` to exactly one current step. Unmarked items are
|
|
7
|
+
future steps. The component needs no JavaScript.
|
|
8
|
+
|
|
9
|
+
## Class reference
|
|
10
|
+
|
|
11
|
+
| Class | Kind | Description |
|
|
12
|
+
|-------------------------|-----------|--------------------------------------------|
|
|
13
|
+
| `.steps` | Component | Ordered progression with numbered markers. |
|
|
14
|
+
| `.complete` | State | A finished step. |
|
|
15
|
+
| `[aria-current="step"]` | State | The current step. |
|
|
16
|
+
|
|
17
|
+
```html demo
|
|
18
|
+
<ol class="steps">
|
|
19
|
+
<li class="complete">Account</li>
|
|
20
|
+
<li aria-current="step">Payment</li>
|
|
21
|
+
<li>Confirm</li>
|
|
22
|
+
</ol>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Intrinsic responsiveness
|
|
26
|
+
|
|
27
|
+
`.steps` fills its row when the steps fit and holds each item at `--step-min`
|
|
28
|
+
otherwise, so the sequence scrolls horizontally only when it genuinely cannot
|
|
29
|
+
fit — no breakpoint. The threshold is space-driven: how many steps fit depends
|
|
30
|
+
on their number and the configurable minimum item width `--step-min`. Labels
|
|
31
|
+
wrap inside their item when needed.
|
|
32
|
+
|
|
33
|
+
Because `.steps` is an `<ol>` that can scroll horizontally, its overflow is not
|
|
34
|
+
focusable by default in every browser. Prefer a `--step-min` that fits the
|
|
35
|
+
common case, and only give a step flow `tabindex="0"` when your content
|
|
36
|
+
genuinely needs keyboard access to the overflow — the framework adds neither
|
|
37
|
+
JavaScript nor a tabindex automatically.
|
|
38
|
+
|
|
39
|
+
Keep state classes aligned with the real process state; they are visual, while
|
|
40
|
+
`aria-current="step"` also exposes the current position to assistive technology.
|
|
41
|
+
Do not put links or buttons around a step unless the workflow genuinely allows
|
|
42
|
+
the user to navigate to it.
|
|
43
|
+
|
|
44
|
+
### Hooks
|
|
45
|
+
|
|
46
|
+
- `--step-size` — marker diameter.
|
|
47
|
+
- `--step-min` — minimum item width; below this the sequence scrolls instead of
|
|
48
|
+
squishing labels.
|
|
49
|
+
- `--step-gap` — space between each marker and label.
|
|
50
|
+
- `--step-line-size` — connector thickness.
|
|
51
|
+
- `--step-marker-radius` — marker corner radius (round by default).
|
|
52
|
+
- `--step-connector` — connector background; when set it overrides the color
|
|
53
|
+
(defaults to each step's own line, so a `.complete` step's connector follows
|
|
54
|
+
its selected color). A plain color by default, but any background (e.g. a
|
|
55
|
+
dashed `repeating-linear-gradient`) works.
|
|
56
|
+
- `--step-complete-mark` — replaces the number on a `.complete` step with any
|
|
57
|
+
`content` value (e.g. `"✓"`); defaults to the step number.
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
## Class reference
|
|
13
13
|
|
|
14
|
-
| Class
|
|
15
|
-
|
|
16
|
-
| `.table-wrap`
|
|
17
|
-
| `.table`
|
|
14
|
+
| Class | Kind | Description |
|
|
15
|
+
|-----------------|-----------|--------------------------------------------------------------|
|
|
16
|
+
| `.table-wrap` | Component | Scroll container and outer chrome (surface, border, radius). |
|
|
17
|
+
| `.table` | Component | The table itself; row and cell rules. |
|
|
18
|
+
| `.table.compact`| Density | Tighter cell padding; typography is unchanged. |
|
|
18
19
|
|
|
19
20
|
## Basic usage
|
|
20
21
|
|
|
@@ -96,7 +97,31 @@ table width before the wrapper scrolls horizontally.
|
|
|
96
97
|
</div>
|
|
97
98
|
```
|
|
98
99
|
|
|
100
|
+
## Compact tables
|
|
101
|
+
|
|
102
|
+
`.compact` lowers the cell padding only — density never changes typography.
|
|
103
|
+
It is the same vocabulary as `.card.compact`.
|
|
104
|
+
|
|
105
|
+
```html demo
|
|
106
|
+
<div class="table-wrap">
|
|
107
|
+
<table class="table compact">
|
|
108
|
+
<caption>Standings by position</caption>
|
|
109
|
+
<thead>
|
|
110
|
+
<tr>
|
|
111
|
+
<th scope="col">Pos</th>
|
|
112
|
+
<th scope="col">Name</th>
|
|
113
|
+
</tr>
|
|
114
|
+
</thead>
|
|
115
|
+
<tbody>
|
|
116
|
+
<tr><td>1</td><td>John Nemo</td></tr>
|
|
117
|
+
<tr><td>2</td><td>Jane Doe</td></tr>
|
|
118
|
+
<tr><td>3</td><td>Ada Morgan</td></tr>
|
|
119
|
+
</tbody>
|
|
120
|
+
</table>
|
|
121
|
+
</div>
|
|
122
|
+
```
|
|
123
|
+
|
|
99
124
|
## CSS hooks
|
|
100
125
|
|
|
101
|
-
- `--table-cell-pad` — cell padding.
|
|
126
|
+
- `--table-cell-pad` — cell padding; `.compact` re-declares it tighter.
|
|
102
127
|
- `--table-min` — minimum table width before `.table-wrap` scrolls horizontally.
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.flyout-trigger` | Composition | Positioning wrapper for a trigger and its panel
|
|
10
|
-
| `.stretch`
|
|
11
|
-
| `.flyout`
|
|
12
|
-
| `.menu`
|
|
13
|
-
| `.menu-item`
|
|
14
|
-
| `.menu-item-icon` | Slot
|
|
15
|
-
| `.menu-item-text` | Slot
|
|
16
|
-
| `.menu-item-end`
|
|
17
|
-
| `.menu-label`
|
|
18
|
-
| `.menu-separator` | Variant
|
|
19
|
-
| `.sm` / `.lg`
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|-------------------|-------------|----------------------------------------------------------------------|
|
|
9
|
+
| `.flyout-trigger` | Composition | Positioning wrapper for a trigger and its panel. |
|
|
10
|
+
| `.stretch` | Modifier | Stretches a `.flyout-trigger` to span its container. |
|
|
11
|
+
| `.flyout` | Component | Floating action or nav surface, positioned by JavaScript. |
|
|
12
|
+
| `.menu` | Component | Action-list primitive with strict `.menu > li > .menu-item` anatomy. |
|
|
13
|
+
| `.menu-item` | Component | One action row; participates in roving focus. |
|
|
14
|
+
| `.menu-item-icon` | Slot | Fixed leading column for a decorative icon. |
|
|
15
|
+
| `.menu-item-text` | Slot | Flexible label column; truncates when the row is constrained. |
|
|
16
|
+
| `.menu-item-end` | Slot | Trailing metadata such as a shortcut, badge, or status. |
|
|
17
|
+
| `.menu-label` | Variant | Muted section heading inside a menu; not interactive. |
|
|
18
|
+
| `.menu-separator` | Variant | Divider between menu groups (`<hr role="separator">`). |
|
|
19
|
+
| `.sm` / `.lg` | Variant | Compact or large density. |
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
@@ -350,12 +350,12 @@ delay; a number sets the delay in milliseconds.
|
|
|
350
350
|
More
|
|
351
351
|
</button>
|
|
352
352
|
</div>
|
|
353
|
-
<p class="
|
|
353
|
+
<p class="muted">Right click a detail below, press the context-menu key, or use More.</p>
|
|
354
354
|
<div class="cluster">
|
|
355
355
|
<span class="badge" data-context-item="File name">File.pdf</span>
|
|
356
356
|
<span class="badge" data-context-item="Owner">Design team</span>
|
|
357
357
|
</div>
|
|
358
|
-
<output id="context-result" class="
|
|
358
|
+
<output id="context-result" class="muted" aria-live="polite">No context selected.</output>
|
|
359
359
|
|
|
360
360
|
<menu class="flyout menu"
|
|
361
361
|
id="file-actions"
|
|
@@ -33,4 +33,4 @@ is a no-op until the module is loaded again with a DOM.
|
|
|
33
33
|
Each interactive component has its own page documenting the exact markup its
|
|
34
34
|
enhancement expects: Dialog, Drawer, Flyout, Tooltip, Tabs, Scrollspy, and
|
|
35
35
|
Status Bar. The default runtime is loaded on the docs pages, so the examples
|
|
36
|
-
work with the documented markup alone.
|
|
36
|
+
work with the documented markup alone.
|
|
@@ -8,11 +8,11 @@ or style `[aria-current]` yourself.
|
|
|
8
8
|
|
|
9
9
|
## Class reference
|
|
10
10
|
|
|
11
|
-
| Class
|
|
12
|
-
|
|
13
|
-
| `.scrollspy` | Component
|
|
14
|
-
| `.nav-list`
|
|
15
|
-
| `.nav-link`
|
|
11
|
+
| Class | Kind | Description |
|
|
12
|
+
|--------------|-------------|-----------------------------------------------------------------|
|
|
13
|
+
| `.scrollspy` | Component | Marks the nav region for the enhancer; adds no visual styles. |
|
|
14
|
+
| `.nav-list` | Composition | Vertical list of navigation links. |
|
|
15
|
+
| `.nav-link` | Component | Navigation link whose active state comes from `[aria-current]`. |
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
@@ -68,4 +68,4 @@ without JavaScript.
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Keep this as progressive enhancement. The JavaScript enhancement remains the
|
|
71
|
-
portable fallback — the same markup serves both paths.
|
|
71
|
+
portable fallback — the same markup serves both paths.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> Singleton floating area for short, non-critical, transient feedback.
|
|
4
4
|
|
|
5
|
+
`status-bar` is for transient feedback, not persistent application status. For
|
|
6
|
+
persistent status, metrics, or operational state, compose regular content
|
|
7
|
+
primitives such as cards, badges, and clusters.
|
|
8
|
+
|
|
5
9
|
A status bar is a single live region, not a stacked toaster. New messages
|
|
6
10
|
replace the previous one. Keep one element in the HTML, styled with
|
|
7
11
|
`.status-bar` and carrying the `[data-status][role="status"]` contract that the
|
|
@@ -69,4 +73,4 @@ document.dispatchEvent(new CustomEvent("actual:status", {
|
|
|
69
73
|
- `--status-bg` — bar background.
|
|
70
74
|
- `--status-fg` — bar text color.
|
|
71
75
|
|
|
72
|
-
Prefer an intent class over setting these directly.
|
|
76
|
+
Prefer an intent class over setting these directly.
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.tabs`
|
|
10
|
-
| `.tab`
|
|
11
|
-
| `.primary` | Intent
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|------------|-----------|----------------------------------------------|
|
|
9
|
+
| `.tabs` | Component | Tab strip; pairs with `role="tablist"`. |
|
|
10
|
+
| `.tab` | Component | One tab trigger; pairs with `role="tab"`. |
|
|
11
|
+
| `.primary` | Intent | Tints the selected tab's indicator and text. |
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
- A `.tab` with an icon uses `--tab-gap` (default `0.375em`) for the space between icon and label.
|
|
21
21
|
|
|
22
22
|
```html demo
|
|
23
|
-
<div class="
|
|
24
|
-
<div class="tabs" data-enhance="tabs" role="tablist" aria-label="Settings">
|
|
23
|
+
<div class="tabs" data-enhance="tabs" role="tablist" aria-label="Settings">
|
|
25
24
|
<button class="tab primary"
|
|
26
25
|
type="button"
|
|
27
26
|
role="tab"
|
|
@@ -77,4 +76,4 @@ JavaScript involved:
|
|
|
77
76
|
|
|
78
77
|
## CSS hooks
|
|
79
78
|
|
|
80
|
-
- `--tab-gap` — space between an icon and the label text (default `0.375em`).
|
|
79
|
+
- `--tab-gap` — space between an icon and the label text (default `0.375em`).
|
|
@@ -127,4 +127,4 @@ and solid colors both work.
|
|
|
127
127
|
- `--tooltip-arrow-size` — arrow size.
|
|
128
128
|
|
|
129
129
|
`--arrow-x` and `--arrow-y` are written by the positioner at runtime, not set by
|
|
130
|
-
the author. See the JavaScript runtime documentation.
|
|
130
|
+
the author. See the JavaScript runtime documentation.
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
# Examples
|
|
2
2
|
|
|
3
|
-
> Real pages built with Actual CSS
|
|
3
|
+
> Real pages built with Actual CSS to see the primitives, components, and patterns composed the way they are meant to be used.
|
|
4
4
|
|
|
5
|
-
The examples live in the repository under `demo/` and load
|
|
6
|
-
|
|
7
|
-
`
|
|
8
|
-
|
|
9
|
-
## Admin application
|
|
10
|
-
|
|
11
|
-
`demo/admini/` is a complete admin interface: application shell, navigation,
|
|
12
|
-
tables, forms, dialogs, and feedback states.
|
|
13
|
-
|
|
14
|
-
- [Dashboard](../../demo/admini/index.html) - app shell, navbar, stat cards, charts, recent activity
|
|
15
|
-
- [Login](../../demo/admini/login.html) - centered auth card with social actions
|
|
16
|
-
- [Forms](../../demo/admini/forms.html) - inputs, choice cards, validation, joined controls, sticky actions
|
|
17
|
-
- [Tables](../../demo/admini/tables.html) - data tables, status badges, bulk actions
|
|
18
|
-
- [Kanban](../../demo/admini/kanban.html) - drag-free column layout with cards
|
|
19
|
-
- [Chat](../../demo/admini/chat.html) - conversation list, message thread, composer
|
|
20
|
-
- [Calendar](../../demo/admini/calendar.html) - month grid with event cards
|
|
21
|
-
- [Invoice](../../demo/admini/invoice.html) - structured document layout
|
|
22
|
-
- [Profile](../../demo/admini/profile.html) - avatar, tabs, settings rows
|
|
23
|
-
- [Settings](../../demo/admini/settings.html) - grouped settings with switches
|
|
24
|
-
- [User grid](../../demo/admini/user-grid.html) - avatar grid, filters, pagination
|
|
25
|
-
- [404](../../demo/admini/404.html) - empty state
|
|
5
|
+
The examples live in the repository under `demo/` and load `actual.full.css`
|
|
6
|
+
and `actual.full.js` from `dist/`, plus the theme palettes bundle from
|
|
7
|
+
`demo/assets/` (`bun run build:themes`).
|
|
26
8
|
|
|
27
9
|
## Templates
|
|
28
10
|
|
|
@@ -37,7 +19,50 @@ tables, forms, dialogs, and feedback states.
|
|
|
37
19
|
- [Blog](../../demo/templates/blog.html) - article page with prose
|
|
38
20
|
- [Blocks](../../demo/templates/blocks.html) - layout building blocks
|
|
39
21
|
- [Layout reference](../../demo/templates/layouts.html) - canonical compositions built only with the layout primitives
|
|
22
|
+
- [Grid density](../../demo/templates/grid.html) - the grid contracts on resizable stages, with the pitfalls called out
|
|
40
23
|
- [Density](../../demo/templates/density.html) - compact control density
|
|
41
24
|
|
|
25
|
+
## Sites
|
|
26
|
+
|
|
27
|
+
Full sites demo living in `demo/sites`.
|
|
28
|
+
|
|
29
|
+
### Mobile PWA
|
|
30
|
+
|
|
31
|
+
[Actual Tasks](../../demo/sites/actual-tasks/index.html) is a mobile task demo
|
|
32
|
+
with one bottom/side navigation landmark, application lists, tabs,
|
|
33
|
+
dialog validation, project cards, an activity feed, loading and empty states,
|
|
34
|
+
theme preferences, switches, and passive status feedback. Its local
|
|
35
|
+
stylesheet includes a rule-by-rule framework friction audit.
|
|
36
|
+
|
|
37
|
+
### Admin application
|
|
38
|
+
|
|
39
|
+
`demo/sites/admini/` is a complete admin interface: application shell, navigation,
|
|
40
|
+
tables, forms, dialogs, and feedback states.
|
|
41
|
+
|
|
42
|
+
- [Dashboard](../../demo/sites/admini/index.html) - app shell, navbar, stat cards, quota meter, recent activity
|
|
43
|
+
- [Login](../../demo/sites/admini/login.html) - centered auth card with social actions
|
|
44
|
+
- [Forms](../../demo/sites/admini/forms.html) - inputs, choice cards, validation, joined controls
|
|
45
|
+
- [Tables](../../demo/sites/admini/tables.html) - data tables, status badges, right-click row actions
|
|
46
|
+
- [Kanban](../../demo/sites/admini/kanban.html) - drag-and-drop columns with card context menus
|
|
47
|
+
- [Chat](../../demo/sites/admini/chat.html) - conversation list, message thread, composer
|
|
48
|
+
- [Calendar](../../demo/sites/admini/calendar.html) - month grid with event chips and month navigation
|
|
49
|
+
- [Invoice](../../demo/sites/admini/invoice.html) - structured document layout, print styles
|
|
50
|
+
- [Profile](../../demo/sites/admini/profile.html) - avatar header, tabs, activity feed
|
|
51
|
+
- [Settings](../../demo/sites/admini/settings.html) - vertical tabs, validation, confirmation dialog
|
|
52
|
+
- [User grid](../../demo/sites/admini/user-grid.html) - avatar grid with live search and role filter
|
|
53
|
+
- [404](../../demo/sites/admini/404.html) - error state
|
|
54
|
+
|
|
55
|
+
### Neon ramen
|
|
56
|
+
|
|
57
|
+
`demo/sites/neon-ramen/` is a complete restaurant storefront: campaign home,
|
|
58
|
+
menu browsing, item customization, locations, and checkout validation flow.
|
|
59
|
+
|
|
60
|
+
- [Home](../../demo/sites/neon-ramen/index.html) - campaign landing, hero story, live cart summary
|
|
61
|
+
- [Menu](../../demo/sites/neon-ramen/menu.html) - tabbed categories with equal-height product cards
|
|
62
|
+
- [Item](../../demo/sites/neon-ramen/item.html) - product configurator with choice cards and form controls
|
|
63
|
+
- [Locations](../../demo/sites/neon-ramen/locations.html) - responsive shop list with practical location metadata
|
|
64
|
+
- [Order](../../demo/sites/neon-ramen/order.html) - checkout form with validation feedback states
|
|
65
|
+
|
|
66
|
+
|
|
42
67
|
> Note: the examples reference the repository's source files, so they open from
|
|
43
68
|
> the checkout, not from a standalone copy of `site`.
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.choice-card`
|
|
10
|
-
| `.primary` / `.secondary` | Intent
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|---------------------------|-----------|---------------------------------------------------------------|
|
|
9
|
+
| `.choice-card` | Component | Card-style `<label>` wrapping a native radio or checkbox. |
|
|
10
|
+
| `.primary` / `.secondary` | Intent | Intent accent for the selected state (supported on the card). |
|
|
11
11
|
|
|
12
12
|
- Use `.choice-card` on a `<label>` wrapping a native `<input type="radio">` or `<input type="checkbox">`. The input is visually hidden; in browsers without `:has()` it stays visible so selection state never disappears.
|
|
13
13
|
- Selected items show a primary border, subtle background tint, and a checkmark badge at the top-right corner — round for radio, rounded square for checkbox.
|
|
@@ -96,7 +96,12 @@ Sizes follow the shared `.sm` and `.lg` modifiers. Intent classes (`.primary`, `
|
|
|
96
96
|
- `--choice-card-radius` — corner radius.
|
|
97
97
|
- `--choice-card-check-size` — size of the check indicator.
|
|
98
98
|
|
|
99
|
-
Plain `.check` / `.radio` controls expose
|
|
99
|
+
Plain `.check` / `.radio` controls expose two hooks:
|
|
100
100
|
|
|
101
|
+
- `--choice-control-size` — the control's own size, in `em` off the surrounding
|
|
102
|
+
type. The switch track derives from it too, so a checkbox and a switch on the
|
|
103
|
+
same line stay proportionate. `.sm` / `.lg` do not touch it.
|
|
101
104
|
- `--choice-control-offset` — top offset that aligns the control with the first
|
|
102
|
-
line of a multi-line label.
|
|
105
|
+
line of a multi-line label. Left unset, each control derives its own offset
|
|
106
|
+
from its height and the line box, which keeps a checkbox and a taller switch
|
|
107
|
+
level with each other. Setting one constant applies it to both.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Floating labels
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **Module** — import `actual-css/css/forms/floating-field` or `actual-css/css/forms/all`.
|
|
4
4
|
|
|
5
5
|
`.floating-field` turns a control and its label into a floating-label cell:
|
|
6
6
|
the label rests inside the control and floats to the top when the control is
|
|
@@ -28,8 +28,9 @@ prefills a field still lifts the label.
|
|
|
28
28
|
|
|
29
29
|
## Textarea
|
|
30
30
|
|
|
31
|
-
A textarea's
|
|
32
|
-
|
|
31
|
+
A textarea's empty label starts at the control's normal first-line position,
|
|
32
|
+
then floats to the same top anchor as the other controls when focused or
|
|
33
|
+
filled. The control still reserves headroom so its text position never jumps.
|
|
33
34
|
|
|
34
35
|
```html demo
|
|
35
36
|
<div class="field">
|
|
@@ -75,8 +76,12 @@ line on top of the control's minimum size.
|
|
|
75
76
|
|
|
76
77
|
## CSS hooks
|
|
77
78
|
|
|
79
|
+
- `--floating-label-top` — shared top anchor for floated labels.
|
|
80
|
+
- `--floating-label-opacity` — resting label opacity; floated labels return to
|
|
81
|
+
full opacity.
|
|
78
82
|
- `--floating-pad-block-start` — headroom reserved above the control for the
|
|
79
|
-
floated label;
|
|
83
|
+
floated label; it also anchors an empty textarea label to its first text
|
|
84
|
+
line.
|
|
80
85
|
|
|
81
86
|
Validation and focus come from the existing form contracts: the control's
|
|
82
87
|
border and focus ring flip through `--form-invalid-border` and the shared
|
|
@@ -85,4 +90,4 @@ left to the surrounding recipe — the joined floating form in the
|
|
|
85
90
|
[blocks demo](../../demo/templates/blocks.html) shows one such recipe.
|
|
86
91
|
|
|
87
92
|
> Not currently compatible with `.input-icon`; use standard labels when an
|
|
88
|
-
> embedded leading icon is required.
|
|
93
|
+
> embedded leading icon is required.
|
|
@@ -53,4 +53,4 @@ container to apply one arrangement to every `.form-actions` inside it.
|
|
|
53
53
|
> The sticky variant adds `--form-actions-sticky-block-offset`,
|
|
54
54
|
> `--form-actions-sticky-padding`, and `--form-actions-sticky-inline-offset` —
|
|
55
55
|
> see Sticky Actions. `.form-actions` is class-only and works inside or
|
|
56
|
-
> outside the form — see Detached Actions.
|
|
56
|
+
> outside the form — see Detached Actions.
|
|
@@ -88,4 +88,4 @@ Use `data-mask` when the input has a fixed shape. Tokens are `9` for a digit,
|
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
Masks enforce shape, not domain validity. Use application validation when a date
|
|
91
|
-
must reject impossible values such as `2026-13-40`.
|
|
91
|
+
must reject impossible values such as `2026-13-40`.
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.join`
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|---------------|-------------|---------------------------------------------------------------------------------|
|
|
9
|
+
| `.join` | Composition | Visually joins adjacent controls into a single unit. |
|
|
10
10
|
| `.join-addon` | Composition | Static prefix/suffix content such as currency symbols, units, or protocol text. |
|
|
11
11
|
|
|
12
12
|
Add `.join` to the wrapper that groups the controls. Use `.join-addon` for static prefix/suffix content such as currency symbols, units, or protocol text. Action buttons inside the group should use `.btn`. The wrapper should still carry `role="group"` with a label for accessibility.
|
|
@@ -34,4 +34,4 @@ identifiable.
|
|
|
34
34
|
## CSS hooks
|
|
35
35
|
|
|
36
36
|
- `--join-radius` — outer corner radius of the joined group. The per-corner
|
|
37
|
-
values of each child are derived from it.
|
|
37
|
+
values of each child are derived from it.
|