actual-css 0.3.0 → 0.4.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 +78 -3
- package/README.md +35 -30
- package/dist/actual.css +98 -4882
- package/dist/actual.full.css +7090 -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/cascade-layer.md +35 -13
- package/docs/design-notes/column-layout.md +677 -0
- package/docs/design-notes/forced-colors.md +3 -0
- package/docs/design-notes/grid.md +612 -0
- package/docs/design-notes/naming.md +15 -0
- package/docs/design-notes/widget-primitives.md +1 -0
- package/docs/navigation.json +5 -1
- package/docs/pages/components/alert.md +16 -14
- package/docs/pages/components/aura.md +1 -1
- package/docs/pages/components/avatar.md +6 -6
- package/docs/pages/components/badge.md +7 -7
- package/docs/pages/components/button.md +22 -17
- package/docs/pages/components/card.md +29 -13
- 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 +7 -7
- package/docs/pages/components/navbar.md +9 -8
- package/docs/pages/components/pagination.md +4 -3
- package/docs/pages/components/skeleton.md +4 -4
- package/docs/pages/components/spinner.md +5 -5
- package/docs/pages/components/table.md +30 -5
- package/docs/pages/enhancements/flyout.md +13 -13
- 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 +6 -6
- package/docs/pages/enhancements/tooltip.md +1 -1
- package/docs/pages/examples/overview.md +41 -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 +1 -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 +41 -45
- 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 +29 -7
- 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 +186 -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-shell.md +1 -1
- package/docs/pages/layout/center.md +1 -1
- package/docs/pages/layout/choosing.md +39 -0
- package/docs/pages/layout/cluster.md +4 -2
- package/docs/pages/layout/column-layout.md +206 -0
- package/docs/pages/layout/frame.md +6 -1
- package/docs/pages/layout/grid.md +100 -102
- package/docs/pages/layout/list.md +1 -1
- package/docs/pages/layout/media.md +10 -3
- 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 +20 -19
- package/docs/pages/layout/stack.md +90 -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/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 +1 -1
- 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 -7
- 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 +261 -0
- package/src/cli/actual-css.js +133 -0
- package/src/css/actual.css +1 -28
- package/src/css/actual.full.css +11 -2
- package/src/css/components/alert.css +33 -10
- package/src/css/components/badge.css +38 -19
- package/src/css/components/breadcrumb.css +1 -1
- package/src/css/components/button.css +35 -13
- package/src/css/components/card.css +37 -4
- package/src/css/components/drawer.css +27 -2
- package/src/css/components/flyout.css +5 -0
- package/src/css/components/index.css +32 -27
- package/src/css/components/join.css +8 -1
- package/src/css/components/key.css +2 -0
- package/src/css/components/menu.css +11 -1
- package/src/css/components/meter.css +4 -1
- package/src/css/components/modal.css +5 -0
- package/src/css/components/navbar.css +13 -5
- package/src/css/components/pagination.css +11 -0
- package/src/css/components/spinner.css +5 -0
- package/src/css/components/status-bar.css +5 -0
- package/src/css/components/surface.css +5 -0
- package/src/css/components/table.css +6 -0
- package/src/css/components/tooltip.css +5 -0
- package/src/css/core/index.css +9 -0
- package/src/css/core/print.css +18 -0
- package/src/css/{theme.css → core/theme.css} +20 -10
- package/src/css/{tokens.css → core/tokens.css} +15 -2
- package/src/css/{variants.css → core/variants.css} +27 -13
- package/src/css/effects/index.css +2 -0
- package/src/css/forms/base.css +8 -0
- package/src/css/forms/choice-card.css +5 -4
- package/src/css/forms/choice.css +49 -37
- package/src/css/forms/control.css +6 -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 +20 -16
- package/src/css/forms/switch.css +31 -29
- package/src/css/layout/app-shell.css +6 -0
- package/src/css/layout/center.css +13 -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 +13 -0
- package/src/css/layout/frame.css +19 -0
- package/src/css/layout/grid.css +141 -0
- package/src/css/layout/index.css +42 -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 +31 -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 +10 -4
- package/src/css/{prose.css → typography/prose.css} +53 -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 +4 -32
- package/src/js/tooltip.js +65 -24
- 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/src/css/grid.css +0 -96
- package/src/css/layout.css +0 -108
- 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 -43
- 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/{optional → components}/chat.css +0 -0
- /package/src/css/{optional → components}/fab.css +0 -0
- /package/src/css/{base.css → core/base.css} +0 -0
- /package/src/css/{focus.css → core/focus.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 → effects}/aura.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
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
|
|
17
17
|
## Class reference
|
|
18
18
|
|
|
19
|
-
| Class
|
|
20
|
-
|
|
21
|
-
| `.alert`
|
|
22
|
-
| `.alert-icon`
|
|
23
|
-
| `.alert-dismiss` | Modifier
|
|
24
|
-
| `.callout`
|
|
25
|
-
| `.admonition`
|
|
26
|
-
| `.alert-title`
|
|
27
|
-
| `.alert-body`
|
|
28
|
-
| Shared intents
|
|
29
|
-
| Shared variants
|
|
30
|
-
| `.sm` / `.lg`
|
|
19
|
+
| Class | Kind | Description |
|
|
20
|
+
|------------------|-------------|-----------------------------------------------------------------------------------|
|
|
21
|
+
| `.alert` | Component | Inline status surface; soft by default. |
|
|
22
|
+
| `.alert-icon` | Composition | Decorative leading icon; pins to the first grid column. |
|
|
23
|
+
| `.alert-dismiss` | Modifier | Compact dismiss button using the `--icon-close` mask and the `--dismiss` command. |
|
|
24
|
+
| `.callout` | Variant | Neutral panel with a thick accent border on the leading edge. |
|
|
25
|
+
| `.admonition` | Variant | Structured box with a tinted title bar and body on the page surface. |
|
|
26
|
+
| `.alert-title` | Composition | Admonition title bar; hosts the dismiss button. |
|
|
27
|
+
| `.alert-body` | Composition | Admonition body resting on the page surface. |
|
|
28
|
+
| Shared intents | Intent | `.primary`, `.secondary`, `.success`, `.warning`, `.danger`. |
|
|
29
|
+
| Shared variants | Variant | `.solid` and `.outline` emphasis. |
|
|
30
|
+
| `.sm` / `.lg` | Size | Density; inline padding stays stable. |
|
|
31
31
|
|
|
32
32
|
## Basic usage
|
|
33
33
|
|
|
@@ -70,8 +70,10 @@
|
|
|
70
70
|
<i class="ti ti-alert-triangle alert-icon" aria-hidden="true"></i>
|
|
71
71
|
|
|
72
72
|
<div class="stack">
|
|
73
|
-
<
|
|
74
|
-
|
|
73
|
+
<div class="stack" style="--gap: var(--space-10)">
|
|
74
|
+
<strong>Payment failed.</strong>
|
|
75
|
+
<p>Check your billing details or try another card.</p>
|
|
76
|
+
</div>
|
|
75
77
|
|
|
76
78
|
<menu class="actions cluster">
|
|
77
79
|
<li><a class="btn danger sm" href="/billing">Update billing</a></li>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Aura
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **Module** — import `actual-css/css/effects/aura` or `actual-css/css/effects`.
|
|
4
4
|
|
|
5
5
|
Aura adds a decorative intent-colored border and halo around one direct child.
|
|
6
6
|
It is visual emphasis only and does not change the child's semantics.
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
## Class reference
|
|
14
14
|
|
|
15
|
-
| Class
|
|
16
|
-
|
|
17
|
-
| `.avatar`
|
|
18
|
-
| `.avatar-stack`
|
|
19
|
-
| `.badge:empty` (inside `.avatar`) | Composition | Status dot at the bottom-end corner; give it an `aria-label`.
|
|
20
|
-
| `.sm` / `.lg`
|
|
15
|
+
| Class | Kind | Description |
|
|
16
|
+
|-----------------------------------|-------------|-------------------------------------------------------------------------|
|
|
17
|
+
| `.avatar` | Component | Initials or image in a circular box; works on `div`, `a`, and `button`. |
|
|
18
|
+
| `.avatar-stack` | Composition | Overlapping avatar group. |
|
|
19
|
+
| `.badge:empty` (inside `.avatar`) | Composition | Status dot at the bottom-end corner; give it an `aria-label`. |
|
|
20
|
+
| `.sm` / `.lg` | Size | Density; also rescales the whole `.avatar-stack`. |
|
|
21
21
|
|
|
22
22
|
## Basic usage
|
|
23
23
|
|
|
@@ -18,13 +18,13 @@ full-width badge is intentional.
|
|
|
18
18
|
|
|
19
19
|
## Class reference
|
|
20
20
|
|
|
21
|
-
| Class
|
|
22
|
-
|
|
23
|
-
| `.badge`
|
|
24
|
-
| `.badge:empty`
|
|
25
|
-
| Shared intents
|
|
26
|
-
| Shared variants | Variant
|
|
27
|
-
| `.sm` / `.lg`
|
|
21
|
+
| Class | Kind | Description |
|
|
22
|
+
|-----------------|-------------|--------------------------------------------------------------|
|
|
23
|
+
| `.badge` | Component | Compact label; soft by default. |
|
|
24
|
+
| `.badge:empty` | Composition | Truly-empty badge renders as a solid dot. |
|
|
25
|
+
| Shared intents | Intent | `.primary`, `.secondary`, `.success`, `.warning`, `.danger`. |
|
|
26
|
+
| Shared variants | Variant | `.solid` (filled) and `.outline` (bordered) emphasis. |
|
|
27
|
+
| `.sm` / `.lg` | Size | Compact density. |
|
|
28
28
|
|
|
29
29
|
## Basic usage
|
|
30
30
|
|
|
@@ -4,22 +4,22 @@ Actions and navigation with shared intents, variants, sizes, and loading, presse
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.btn`
|
|
10
|
-
| `.primary`
|
|
11
|
-
| `.secondary`
|
|
12
|
-
| `.success`
|
|
13
|
-
| `.warning`
|
|
14
|
-
| `.danger`
|
|
15
|
-
| `.neutral`
|
|
16
|
-
| `.soft`
|
|
17
|
-
| `.outline`
|
|
18
|
-
| `.solid`
|
|
19
|
-
| `.ghost`
|
|
20
|
-
| `.link`
|
|
21
|
-
| `.sm` / `.lg` | Size
|
|
22
|
-
| `.icon-only`
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|---------------|-----------|--------------------------------------------------------------------------------------------|
|
|
9
|
+
| `.btn` | Component | Base button. Solid by default; works on `<button>`, `<a href>`, and button-like `<input>`. |
|
|
10
|
+
| `.primary` | Intent | Primary action. |
|
|
11
|
+
| `.secondary` | Intent | Secondary action. |
|
|
12
|
+
| `.success` | Intent | Positive outcome. |
|
|
13
|
+
| `.warning` | Intent | Caution. |
|
|
14
|
+
| `.danger` | Intent | Destructive action. |
|
|
15
|
+
| `.neutral` | Intent | Neutral tone (the `.btn` default). |
|
|
16
|
+
| `.soft` | Variant | Muted intent-tinted surface. |
|
|
17
|
+
| `.outline` | Variant | Transparent with an intent-colored border. |
|
|
18
|
+
| `.solid` | Variant | Filled intent background — the `.btn` default. |
|
|
19
|
+
| `.ghost` | Variant | Borderless text button (button-only). |
|
|
20
|
+
| `.link` | Variant | Underlined text button (button-only). |
|
|
21
|
+
| `.sm` / `.lg` | Size | Compact or large control height. |
|
|
22
|
+
| `.icon-only` | Variant | Square icon button sized to the control height. |
|
|
23
23
|
|
|
24
24
|
## Basic usage
|
|
25
25
|
|
|
@@ -56,6 +56,11 @@ Shared intent classes set color meaning. They compose with every variant.
|
|
|
56
56
|
`.ghost` and `.link` are button-only; `.soft`, `.outline`, and `.solid` are
|
|
57
57
|
shared with other components.
|
|
58
58
|
|
|
59
|
+
Transparent treatments (`.outline`, `.ghost`, `.link`) follow the surrounding
|
|
60
|
+
foreground by default, including on a contrasting `.inverted` surface. A local
|
|
61
|
+
intent class still wins: `.danger.outline` uses the danger color in either
|
|
62
|
+
context. Filled buttons own their surface and keep their normal intent recipe.
|
|
63
|
+
|
|
59
64
|
```html demo
|
|
60
65
|
<div class="cluster">
|
|
61
66
|
<button class="btn outline" type="button">Outline</button>
|
|
@@ -202,4 +207,4 @@ For exclusive groups, manage a single pressed button:
|
|
|
202
207
|
|
|
203
208
|
- `--btn-radius` — corner radius.
|
|
204
209
|
- `--btn-focus-color` — focus ring base color; the ring itself is derived from it.
|
|
205
|
-
- `--btn-gap` — space between an icon and the label text (default `0.375em`).
|
|
210
|
+
- `--btn-gap` — space between an icon and the label text (default `0.375em`).
|
|
@@ -4,19 +4,21 @@ Flexible content container with optional header, body, and footer regions, plus
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.card`
|
|
10
|
-
| `.raised`
|
|
11
|
-
| `.subtle`
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|-------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
9
|
+
| `.card` | Component | Neutral raised surface for grouped content. |
|
|
10
|
+
| `.raised` | Variant | Elevated surface with a soft shadow. |
|
|
11
|
+
| `.subtle` | Variant | Lower contrast against the page surface. |
|
|
12
12
|
| `.inverted` | Surface modifier | Inverse surface treatment: paints `--surface-solid` and swaps the foreground to `--surface`, so it inverts in dark themes instead of always reading as dark. Apply as `class="card inverted"`, or on any block. |
|
|
13
|
-
| `.compact`
|
|
13
|
+
| `.compact` | Variant | Tighter padding for dense contexts. |
|
|
14
14
|
|
|
15
15
|
## Basic usage
|
|
16
16
|
|
|
17
17
|
Use semantic elements inside the card. A direct `<header>` or `<footer>` is the
|
|
18
|
-
card's structural slot.
|
|
19
|
-
|
|
18
|
+
card's structural slot. A direct `<footer>` is anchored to the bottom of the
|
|
19
|
+
card when extra block space is available, so prices and actions line up across
|
|
20
|
+
equal-height cards. Cards do not own page spacing — compose them with layout
|
|
21
|
+
primitives like `.grid`.
|
|
20
22
|
|
|
21
23
|
```html demo
|
|
22
24
|
<div style="max-inline-size: 32rem">
|
|
@@ -95,7 +97,9 @@ colored headers, or footers.
|
|
|
95
97
|
|
|
96
98
|
## In grids
|
|
97
99
|
|
|
98
|
-
Cards display nicely in grids with equal-height behavior.
|
|
100
|
+
Cards display nicely in grids with equal-height behavior. Each card in a row
|
|
101
|
+
stretches to the row height, and a direct `<footer>` anchors to the bottom, so
|
|
102
|
+
all footers in the row line up regardless of body length.
|
|
99
103
|
|
|
100
104
|
```html demo
|
|
101
105
|
<section class="grid">
|
|
@@ -133,9 +137,21 @@ Cards display nicely in grids with equal-height behavior.
|
|
|
133
137
|
|
|
134
138
|
## Surfaces
|
|
135
139
|
|
|
136
|
-
`.inverted`
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
`.inverted` creates a contrasting surface context, not a complete theme island.
|
|
141
|
+
On a bare block (`<header class="inverted">`, `<section class="inverted">`) it
|
|
142
|
+
paints the surface directly; contextual content and transparent treatments such
|
|
143
|
+
as `.btn.outline`, `.btn.ghost`, and `.btn.link` follow its foreground.
|
|
144
|
+
|
|
145
|
+
Apply it directly to a component that consumes the shared `--ui-*` surface
|
|
146
|
+
contract (`.card`, `.navbar`, `.alert`, `.badge`) to treat that component as the
|
|
147
|
+
contrasting surface. A surface-owning component nested inside an inverted block
|
|
148
|
+
keeps its own surface and establishes a new context for its descendants. Use a
|
|
149
|
+
`data-theme` island when every component and form control in a subtree must use
|
|
150
|
+
another theme.
|
|
151
|
+
|
|
152
|
+
More specific component states or explicit surface variants still take
|
|
153
|
+
precedence: `.card.inverted.subtle` keeps the `.subtle` background while the
|
|
154
|
+
foreground stays inverted.
|
|
139
155
|
|
|
140
156
|
`.inverted` and `.subtle` are competing surface treatments — do not combine
|
|
141
157
|
them. `.subtle` paints the card's background directly while `.inverted` swaps
|
|
@@ -180,4 +196,4 @@ variants.
|
|
|
180
196
|
|
|
181
197
|
- `--card-radius` — corner radius.
|
|
182
198
|
- `--card-max-inline-size` — maximum width.
|
|
183
|
-
- `--card-pad` — inner padding; also drives the negative offsets that let a `.bleed` child reach the card edge. `.compact` lowers it.
|
|
199
|
+
- `--card-pad` — inner padding; also drives the negative offsets that let a `.bleed` child reach the card edge. `.compact` lowers it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Chat
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **Module** — import `actual-css/css/components/chat` or `actual-css/css/components`.
|
|
4
4
|
|
|
5
5
|
Chat lays out message metadata, an optional avatar, and a content-sized bubble
|
|
6
6
|
at either edge of a conversation.
|
|
@@ -36,13 +36,13 @@ put `role="log"` on individual messages.
|
|
|
36
36
|
|
|
37
37
|
## Class reference
|
|
38
38
|
|
|
39
|
-
| Class
|
|
40
|
-
|
|
41
|
-
| `.chat`
|
|
42
|
-
| `.chat-start` / `.chat-end`
|
|
43
|
-
| `.chat-avatar`
|
|
44
|
-
| `.chat-header` / `.chat-footer` | Muted message metadata.
|
|
45
|
-
| `.chat-bubble`
|
|
39
|
+
| Class | Description |
|
|
40
|
+
|---------------------------------|----------------------------------------------|
|
|
41
|
+
| `.chat` | Message row grid. |
|
|
42
|
+
| `.chat-start` / `.chat-end` | Logical inline placement. |
|
|
43
|
+
| `.chat-avatar` | Avatar grid slot; compose it with `.avatar`. |
|
|
44
|
+
| `.chat-header` / `.chat-footer` | Muted message metadata. |
|
|
45
|
+
| `.chat-bubble` | Content-sized message surface. |
|
|
46
46
|
|
|
47
47
|
## CSS hooks
|
|
48
48
|
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.modal`
|
|
10
|
-
| `.scrollable`
|
|
11
|
-
| `.dialog-confirmation` | Variant
|
|
12
|
-
| `.dialog-icon`
|
|
13
|
-
| `.dialog-close`
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|------------------------|-----------|----------------------------------------------------------------------------------|
|
|
9
|
+
| `.modal` | Component | Centered modal surface built on the native `<dialog>` element. |
|
|
10
|
+
| `.scrollable` | Variant | Keeps the header and footer visible while the dialog body scrolls. |
|
|
11
|
+
| `.dialog-confirmation` | Variant | Separates a confirmation message from its full-width action band. |
|
|
12
|
+
| `.dialog-icon` | Component | Circular intent-aware icon well for confirmation messages. |
|
|
13
|
+
| `.dialog-close` | Component | Icon-only close button anchored to the modal's top end, out of the content flow. |
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.drawer`
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
|-----------------|-----------|------------------------------------------------------------|
|
|
9
|
+
| `.drawer` | Component | Modal side-sheet built on the native `<dialog>` element. |
|
|
10
10
|
| `.drawer-close` | Component | Icon-only close button that sits inside the drawer header. |
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Floating action button
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **Module** — import `actual-css/css/components/fab` or `actual-css/css/components`.
|
|
4
4
|
|
|
5
5
|
FAB fixes a primary action near the viewport's block-end and inline-end edges.
|
|
6
6
|
The existing button component owns its size, shape, intent, and interaction.
|
|
@@ -102,12 +102,12 @@ the open state so a plus naturally becomes a close symbol.
|
|
|
102
102
|
|
|
103
103
|
## Class reference
|
|
104
104
|
|
|
105
|
-
| Class
|
|
106
|
-
|
|
107
|
-
| `.fab`
|
|
108
|
-
| `.fab-actions` | Collapsible vertical action list.
|
|
109
|
-
| `.fab-action`
|
|
110
|
-
| `.fab-label`
|
|
105
|
+
| Class | Description |
|
|
106
|
+
|----------------|-----------------------------------------------------------|
|
|
107
|
+
| `.fab` | Fixed viewport placement; use `details` for a speed dial. |
|
|
108
|
+
| `.fab-actions` | Collapsible vertical action list. |
|
|
109
|
+
| `.fab-action` | One horizontal label-and-button unit. |
|
|
110
|
+
| `.fab-label` | Compact floating label for an action. |
|
|
111
111
|
|
|
112
112
|
## CSS hooks
|
|
113
113
|
|
|
@@ -14,13 +14,13 @@ flex list, `.nav-list` a vertical grid. Putting both on one element resolves to
|
|
|
14
14
|
|
|
15
15
|
## Class reference
|
|
16
16
|
|
|
17
|
-
| Class
|
|
18
|
-
|
|
19
|
-
| `.navbar`
|
|
20
|
-
| `.navbar-brand` | Composition | Brand link at the inline start.
|
|
21
|
-
| `.navbar-nav`
|
|
22
|
-
| `.nav-link`
|
|
23
|
-
| `.nav-list`
|
|
17
|
+
| Class | Kind | Description |
|
|
18
|
+
|-----------------|-------------|-------------------------------------------------------|
|
|
19
|
+
| `.navbar` | Component | Horizontal bar shell. |
|
|
20
|
+
| `.navbar-brand` | Composition | Brand link at the inline start. |
|
|
21
|
+
| `.navbar-nav` | Composition | Horizontal link list. |
|
|
22
|
+
| `.nav-link` | Component | A link item; current page via `aria-current="page"`. |
|
|
23
|
+
| `.nav-list` | Component | Shared vertical navigation list, reused by `.drawer`. |
|
|
24
24
|
|
|
25
25
|
## Basic usage
|
|
26
26
|
|
|
@@ -42,7 +42,8 @@ For a vertical sidebar nav, use `.nav-list` inside the drawer or sidebar.
|
|
|
42
42
|
There is no collapse/toggler mechanism. For a responsive navigation, keep the
|
|
43
43
|
horizontal `.navbar` for the desktop bar and compose the mobile experience from
|
|
44
44
|
a `.drawer` with a vertical `.nav-list`, opened by a `command="show-modal"` /
|
|
45
|
-
`commandfor` trigger.
|
|
45
|
+
`commandfor` trigger. Keep that trigger outside the `<nav>` subtree you hide at
|
|
46
|
+
narrow widths, or hiding the nav hides the control that opens it.
|
|
46
47
|
|
|
47
48
|
```html demo
|
|
48
49
|
<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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -77,4 +77,4 @@ JavaScript involved:
|
|
|
77
77
|
|
|
78
78
|
## CSS hooks
|
|
79
79
|
|
|
80
|
-
- `--tab-gap` — space between an icon and the label text (default `0.375em`).
|
|
80
|
+
- `--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.
|