actual-css 0.2.0 → 0.3.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 +49 -1
- package/README.md +24 -9
- package/dist/actual-themes.min.css +1 -0
- package/dist/actual.css +1532 -1114
- package/dist/actual.js +1 -3
- package/dist/actual.min.css +1 -1
- package/dist/optional.css +1048 -0
- package/dist/optional.min.css +1 -0
- package/docs/design-notes/browser-support.md +94 -14
- package/docs/design-notes/cascade-layer.md +7 -6
- package/docs/design-notes/enhancement-contract.md +11 -14
- package/docs/design-notes/forced-colors.md +105 -0
- package/docs/design-notes/naming.md +2 -1
- package/docs/design-notes/platform-alignment.md +492 -0
- package/docs/design-notes/references.md +8 -0
- package/docs/design-notes/widget-primitives.md +37 -1
- package/docs/navigation.json +135 -0
- package/docs/pages/components/accordion.md +80 -0
- package/docs/pages/components/alert.md +203 -0
- package/docs/pages/components/aura.md +35 -0
- package/docs/pages/components/avatar.md +95 -0
- package/docs/pages/components/badge.md +102 -0
- package/docs/pages/components/breadcrumb.md +19 -0
- package/docs/pages/components/button.md +210 -0
- package/docs/pages/components/card.md +195 -0
- package/docs/pages/components/chat.md +50 -0
- package/docs/pages/components/dialog.md +367 -0
- package/docs/pages/components/drawer.md +113 -0
- package/docs/pages/components/fab.md +118 -0
- package/docs/pages/components/key.md +33 -0
- package/docs/pages/components/meter.md +23 -0
- package/docs/pages/components/navbar.md +92 -0
- package/docs/pages/components/pagination.md +55 -0
- package/docs/pages/components/progress.md +29 -0
- package/docs/pages/components/skeleton.md +38 -0
- package/docs/pages/components/spinner.md +93 -0
- package/docs/pages/components/table.md +102 -0
- package/docs/pages/enhancements/flyout.md +391 -0
- package/docs/pages/enhancements/overview.md +36 -0
- package/docs/pages/enhancements/scrollspy.md +71 -0
- package/docs/pages/enhancements/status-bar.md +72 -0
- package/docs/pages/enhancements/tabs.md +80 -0
- package/docs/pages/enhancements/tooltip.md +130 -0
- package/docs/pages/examples/overview.md +43 -0
- package/docs/pages/forms/choice-cards.md +102 -0
- package/docs/pages/forms/controls.md +32 -0
- package/docs/pages/forms/detached-actions.md +59 -0
- package/docs/pages/forms/floating-field.md +88 -0
- package/docs/pages/forms/form-actions.md +56 -0
- package/docs/pages/forms/input-policy.md +91 -0
- package/docs/pages/forms/joined-controls.md +37 -0
- package/docs/pages/forms/labels.md +42 -0
- package/docs/pages/forms/otp.md +50 -0
- package/docs/pages/forms/overview.md +188 -0
- package/docs/pages/forms/password.md +40 -0
- package/docs/pages/forms/range.md +17 -0
- package/docs/pages/forms/states-and-sizes.md +321 -0
- package/docs/pages/forms/sticky-actions.md +187 -0
- package/docs/pages/forms/switch.md +31 -0
- package/docs/pages/forms/validation.md +241 -0
- package/docs/{mental-model.md → pages/foundations/philosophy.md} +33 -18
- package/docs/pages/foundations/theming.md +99 -0
- package/docs/pages/foundations/tokens.md +421 -0
- package/docs/{typography.md → pages/foundations/typography.md} +27 -9
- package/docs/pages/guides/bootstrap.md +438 -0
- package/docs/pages/guides/introduction.md +157 -0
- package/docs/pages/guides/optional-components.md +33 -0
- package/docs/pages/guides/progressive-enhancement.md +686 -0
- package/docs/pages/guides/tailwind.md +455 -0
- package/docs/pages/layout/app-shell.md +25 -0
- package/docs/pages/layout/center.md +29 -0
- package/docs/pages/layout/cluster.md +59 -0
- package/docs/pages/layout/frame.md +30 -0
- package/docs/pages/layout/grid.md +142 -0
- package/docs/pages/layout/list.md +41 -0
- package/docs/pages/layout/media.md +28 -0
- package/docs/pages/layout/overview.md +37 -0
- package/docs/pages/layout/scroll-snap.md +54 -0
- package/docs/pages/layout/sidebar-layout.md +27 -0
- package/docs/pages/layout/stack.md +55 -0
- package/docs/pages/layout/switcher.md +36 -0
- package/docs/pages/layout/topbar.md +23 -0
- package/docs/pages/patterns/actions.md +52 -0
- package/docs/pages/patterns/code-block.md +36 -0
- package/docs/pages/patterns/exclusive-accordion.md +16 -0
- package/docs/pages/patterns/hierarchical-nav.md +26 -0
- package/docs/pages/patterns/icon-input.md +25 -0
- package/docs/pages/patterns/intent-nesting.md +3 -0
- package/docs/pages/patterns/navigation-list.md +235 -0
- package/docs/pages/patterns/overview.md +58 -0
- package/docs/pages/patterns/structured-lists.md +47 -0
- package/docs/pages/utilities/accessibility.md +34 -0
- package/docs/pages/utilities/flex.md +105 -0
- package/docs/pages/utilities/links.md +18 -0
- package/docs/pages/utilities/list.md +32 -0
- package/docs/pages/utilities/overflow.md +43 -0
- package/docs/pages/utilities/overview.md +18 -0
- package/docs/pages/utilities/shape.md +25 -0
- package/docs/pages/utilities/sizing-wrapping.md +115 -0
- package/docs/pages/utilities/spacing.md +79 -0
- package/docs/pages/utilities/text.md +43 -0
- package/llms.txt +4 -4
- package/package.json +21 -12
- package/src/css/actual.css +16 -2
- package/src/css/base.css +3 -5
- package/src/css/components/accordion.css +18 -30
- package/src/css/components/actions.css +4 -1
- package/src/css/components/alert.css +139 -102
- package/src/css/components/avatar.css +16 -10
- package/src/css/components/badge.css +69 -42
- package/src/css/components/breadcrumb.css +7 -15
- package/src/css/components/busy.css +6 -0
- package/src/css/components/button.css +84 -34
- package/src/css/components/card.css +26 -38
- package/src/css/components/drawer.css +30 -13
- package/src/css/components/flyout.css +39 -109
- package/src/css/components/index.css +1 -0
- package/src/css/components/join.css +14 -2
- package/src/css/components/key.css +2 -0
- package/src/css/components/menu.css +125 -0
- package/src/css/components/meter.css +0 -23
- package/src/css/components/modal.css +162 -7
- package/src/css/components/navbar.css +30 -23
- package/src/css/components/overline.css +8 -9
- package/src/css/components/pagination.css +1 -1
- package/src/css/components/progress.css +8 -26
- package/src/css/components/skeleton.css +7 -0
- package/src/css/components/spinner.css +6 -7
- package/src/css/components/status-bar.css +15 -24
- package/src/css/components/surface.css +2 -8
- package/src/css/components/tab.css +19 -48
- package/src/css/components/table.css +7 -5
- package/src/css/components/tooltip.css +14 -7
- package/src/css/focus.css +14 -38
- package/src/css/forms/choice-card.css +13 -14
- package/src/css/forms/choice.css +21 -27
- package/src/css/forms/control.css +18 -17
- package/src/css/forms/custom-select.css +9 -11
- package/src/css/forms/form-actions.css +14 -3
- package/src/css/forms/form.css +7 -4
- package/src/css/forms/index.css +4 -4
- package/src/css/forms/input-icon.css +30 -12
- package/src/css/forms/native.css +50 -11
- package/src/css/forms/range.css +17 -9
- package/src/css/forms/select.css +8 -8
- package/src/css/forms/switch.css +14 -12
- package/src/css/forms/validation.css +32 -5
- package/src/css/grid.css +32 -18
- package/src/css/intents.css +2 -2
- package/src/css/layout.css +45 -2
- package/src/css/optional/aura.css +93 -0
- package/src/css/optional/chat.css +105 -0
- package/src/css/optional/fab.css +104 -0
- package/src/css/optional/floating-field.css +87 -0
- package/src/css/optional/index.css +5 -0
- package/src/css/optional/layout-extra.css +7 -4
- package/src/css/optional/otp.css +115 -0
- package/src/css/optional/scroll-snap.css +6 -0
- package/src/css/optional/scroller.css +13 -7
- package/src/css/optional/typography-fluid.css +5 -0
- package/src/css/optional/utilities-extra.css +17 -2
- package/src/css/prose.css +18 -8
- package/src/css/reset.css +0 -10
- package/src/css/theme.css +21 -5
- package/src/css/themes/cyberpunk.css +1 -1
- package/src/css/themes/dim.css +3 -3
- package/src/css/themes/edge.css +8 -10
- package/src/css/themes/index.css +8 -4
- package/src/css/themes/{dark.css → indigo.css} +5 -4
- package/src/css/themes/neon.css +5 -5
- package/src/css/themes/square.css +0 -3
- package/src/css/tokens.css +74 -20
- package/src/css/utilities.css +8 -10
- package/src/css/variants.css +51 -66
- package/src/js/command.js +1 -3
- package/src/js/context-menu.js +67 -35
- package/src/js/dialog.js +68 -79
- package/src/js/dismiss.js +15 -0
- package/src/js/enhance.js +54 -23
- package/src/js/enhancement-loader.js +301 -0
- package/src/js/events.js +3 -0
- package/src/js/filter.js +3 -3
- package/src/js/floating.js +101 -131
- package/src/js/flyout.js +104 -87
- package/src/js/focus-group.js +116 -0
- package/src/js/focus.js +6 -1
- package/src/js/index.js +4 -2
- package/src/js/input.js +1 -1
- package/src/js/keys.js +27 -0
- package/src/js/mask.js +7 -6
- package/src/js/menu.js +87 -34
- package/src/js/parse-config.js +47 -0
- package/src/js/password.js +9 -1
- package/src/js/scrollspy.js +12 -4
- package/src/js/selectors.js +0 -7
- package/src/js/status.js +3 -1
- package/src/js/surface.js +187 -136
- package/src/js/tab.js +36 -53
- package/src/js/tooltip.js +70 -35
- package/src/js/validation.js +34 -8
- package/dist/actual.js.map +0 -31
- package/docs/README.md +0 -28
- package/docs/components.md +0 -860
- package/docs/design-notes/previous-work.md +0 -5
- package/docs/forms.md +0 -1265
- package/docs/javascript.md +0 -496
- package/docs/layout.md +0 -480
- package/docs/patterns.md +0 -504
- package/docs/reserved.md +0 -7
- package/docs/tokens.md +0 -455
- package/docs/ui.md +0 -929
- package/docs/utilities.md +0 -384
- package/src/css/dialog-fallback.css +0 -56
- package/src/js/dialog-fallback.js +0 -163
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
> Collapsible regions built on native details and summary, with optional exclusive groups via the name attribute.
|
|
4
|
+
|
|
5
|
+
- Use native `<details>` and `<summary>` for collapsible content.
|
|
6
|
+
- Use the `name` attribute for exclusive accordions.
|
|
7
|
+
- Supports any valid body element (`div`, `p`, `ul`, ...).
|
|
8
|
+
- The toggle marker color is customizable with `--accordion-marker-color`; the marker icon comes from the shared `--icon-chevron` token.
|
|
9
|
+
|
|
10
|
+
```html demo
|
|
11
|
+
<div class="accordion">
|
|
12
|
+
<details open>
|
|
13
|
+
<summary>A paragraph body that is opened</summary>
|
|
14
|
+
<p>This is a paragraph.</p>
|
|
15
|
+
</details>
|
|
16
|
+
|
|
17
|
+
<details>
|
|
18
|
+
<summary>With a list</summary>
|
|
19
|
+
<ul>
|
|
20
|
+
<li>First item</li>
|
|
21
|
+
<li>Second item</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</details>
|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>
|
|
27
|
+
<i class="ti ti-settings" aria-hidden="true"></i>
|
|
28
|
+
<span>With a custom icon</span>
|
|
29
|
+
</summary>
|
|
30
|
+
<div>
|
|
31
|
+
<p>Any valid flow content can be used here.</p>
|
|
32
|
+
</div>
|
|
33
|
+
</details>
|
|
34
|
+
</div>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Exclusive groups
|
|
38
|
+
|
|
39
|
+
```html demo
|
|
40
|
+
<div class="accordion">
|
|
41
|
+
<details name="settings">
|
|
42
|
+
<summary>This is grouped with the next one</summary>
|
|
43
|
+
<p>Using the <code>name</code> attribute groups items like radio buttons.</p>
|
|
44
|
+
</details>
|
|
45
|
+
|
|
46
|
+
<details name="settings">
|
|
47
|
+
<summary>This is grouped with the previous one</summary>
|
|
48
|
+
<p>Only one item in the same named group can be open.</p>
|
|
49
|
+
</details>
|
|
50
|
+
</div>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Custom markers
|
|
54
|
+
|
|
55
|
+
The end marker is a shared token-based chevron; swapping it for a local icon is a demo concern, not part of the base API.
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<div class="accordion accordion-demo">
|
|
59
|
+
<details open>
|
|
60
|
+
<summary>
|
|
61
|
+
<span class="accordion-demo-icon" aria-hidden="true"></span>
|
|
62
|
+
<span>Custom marker at the start</span>
|
|
63
|
+
</summary>
|
|
64
|
+
<p>This demo swaps the default end marker for a local plus/minus icon.</p>
|
|
65
|
+
</details>
|
|
66
|
+
|
|
67
|
+
<details>
|
|
68
|
+
<summary>
|
|
69
|
+
<span class="accordion-demo-icon" aria-hidden="true"></span>
|
|
70
|
+
<span>Another item</span>
|
|
71
|
+
</summary>
|
|
72
|
+
<p>The icon belongs to the example, not the base accordion API.</p>
|
|
73
|
+
</details>
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## CSS hooks
|
|
78
|
+
|
|
79
|
+
- `--accordion-radius` — outer corner radius.
|
|
80
|
+
- `--accordion-marker-color` — color of the end marker; forced-colors mode overrides it to `CanvasText`.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Alert
|
|
2
|
+
|
|
3
|
+
> Inline status messages for confirmations, warnings, and errors, with intents, icons, and action lists.
|
|
4
|
+
|
|
5
|
+
- Supports intent colors.
|
|
6
|
+
- Supports longer text and lists.
|
|
7
|
+
- Links inherit alert color by default.
|
|
8
|
+
- Alerts are soft by default. Use `.solid` or `.outline` when the message needs stronger or quieter emphasis.
|
|
9
|
+
- Use `<menu class="actions cluster">` for alert action lists.
|
|
10
|
+
- Use `role="alert"` only when the alert is injected dynamically and should be announced.
|
|
11
|
+
- Not a toast.
|
|
12
|
+
- Could have simple or complex html content.
|
|
13
|
+
- Alerts may include a decorative leading icon. Use `.alert-icon` on the icon element; the rest of the content flows into the remaining text column.
|
|
14
|
+
- Use `.sm` or `.lg` for density changes. The inline padding stays stable.
|
|
15
|
+
- Use `.alert-dismiss` for a compact dismiss button. It is a direct trailing child in standard alerts and lives inside `.alert-title` in admonitions. It uses the shared `--icon-close` mask and the `--dismiss` runtime command — no icon font or custom JS.
|
|
16
|
+
|
|
17
|
+
## Class reference
|
|
18
|
+
|
|
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
|
+
|
|
32
|
+
## Basic usage
|
|
33
|
+
|
|
34
|
+
```html demo
|
|
35
|
+
<div class="stack">
|
|
36
|
+
<div class="alert success">
|
|
37
|
+
<i class="ti ti-circle-check alert-icon" aria-hidden="true"></i>
|
|
38
|
+
<div>Your changes have been saved. <a href="#">View activity</a>.</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="alert warning" role="alert">
|
|
42
|
+
<svg class="alert-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>
|
|
43
|
+
<div>Please review the <a href="#">failed checks</a> before continuing.</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div class="alert">
|
|
47
|
+
<svg class="alert-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"/></svg>
|
|
48
|
+
<div>This is a default alert message.</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="alert danger" role="alert">
|
|
52
|
+
<strong>Error!</strong>
|
|
53
|
+
<div>Something went wrong.</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="alert danger" role="alert">
|
|
57
|
+
I'm a simple error
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="alert danger" role="alert">
|
|
61
|
+
I'm a simple error <a href="#">with a link and no joke</a>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Content and actions
|
|
67
|
+
|
|
68
|
+
```html demo
|
|
69
|
+
<div class="alert danger" role="alert">
|
|
70
|
+
<i class="ti ti-alert-triangle alert-icon" aria-hidden="true"></i>
|
|
71
|
+
|
|
72
|
+
<div class="stack">
|
|
73
|
+
<strong>Payment failed.</strong>
|
|
74
|
+
<p>Check your billing details or try another card.</p>
|
|
75
|
+
|
|
76
|
+
<menu class="actions cluster">
|
|
77
|
+
<li><a class="btn danger sm" href="/billing">Update billing</a></li>
|
|
78
|
+
<li><a href="/support">Contact support</a></li>
|
|
79
|
+
</menu>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Variants
|
|
85
|
+
|
|
86
|
+
```html demo
|
|
87
|
+
<div class="stack">
|
|
88
|
+
<div class="alert danger sm" role="alert">
|
|
89
|
+
I'm a small error
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="alert danger lg" role="alert">
|
|
93
|
+
I'm a large error
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="alert danger outline" role="alert">
|
|
97
|
+
I'm an outline error <a href="#">with a link</a>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div class="alert danger solid" role="alert">
|
|
101
|
+
I'm a solid error <a href="#">with a link</a>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Dismiss
|
|
107
|
+
|
|
108
|
+
Use `.alert-dismiss` to let a user remove an inline alert. The button is transparent at rest with a muted glyph; it works with any intent because it uses `currentColor` and reduced opacity. It relies on the runtime `--dismiss` command — no custom script.
|
|
109
|
+
|
|
110
|
+
```html demo
|
|
111
|
+
<div class="alert warning" id="warning-alert">
|
|
112
|
+
<i class="ti ti-alert-triangle alert-icon" aria-hidden="true"></i>
|
|
113
|
+
<div>
|
|
114
|
+
<strong>Warning</strong>
|
|
115
|
+
<p>Something needs your attention.</p>
|
|
116
|
+
</div>
|
|
117
|
+
<button
|
|
118
|
+
class="alert-dismiss"
|
|
119
|
+
type="button"
|
|
120
|
+
commandfor="warning-alert"
|
|
121
|
+
command="--dismiss"
|
|
122
|
+
aria-label="Dismiss alert"
|
|
123
|
+
></button>
|
|
124
|
+
</div>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
In an admonition, place `.alert-dismiss` inside `.alert-title`; it rides the inline end of the title bar:
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<div class="alert admonition warning" id="notice">
|
|
131
|
+
<div class="alert-title">
|
|
132
|
+
<span>Warning</span>
|
|
133
|
+
<button
|
|
134
|
+
class="alert-dismiss"
|
|
135
|
+
type="button"
|
|
136
|
+
commandfor="notice"
|
|
137
|
+
command="--dismiss"
|
|
138
|
+
aria-label="Dismiss alert"
|
|
139
|
+
></button>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="alert-body">...</div>
|
|
142
|
+
</div>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Callout
|
|
146
|
+
|
|
147
|
+
Use `.callout` for a neutral panel with a thick accent border on the leading edge. Intent classes tint the border color.
|
|
148
|
+
|
|
149
|
+
```html demo
|
|
150
|
+
<div class="stack">
|
|
151
|
+
<div class="alert callout">
|
|
152
|
+
<strong>Note</strong>
|
|
153
|
+
<p>This is a callout — a neutral panel with a thick accent border on the leading edge.</p>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<div class="alert warning callout" role="alert">
|
|
157
|
+
<strong>Heads up</strong>
|
|
158
|
+
<p>The border color follows the intent. No other borders are drawn.</p>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Admonition
|
|
164
|
+
|
|
165
|
+
An admonition is a structured box with a tinted title bar, an optional icon, and body content on the page surface — like the `!!! note` callouts in mkdocs. Use `.alert-title` for the header and `.alert-body` for the content. Intent classes tint the title bar background and the border.
|
|
166
|
+
|
|
167
|
+
```html demo
|
|
168
|
+
<div class="stack">
|
|
169
|
+
<div class="alert admonition">
|
|
170
|
+
<div class="alert-title">
|
|
171
|
+
<i class="ti ti-info-circle" aria-hidden="true"></i>
|
|
172
|
+
Note
|
|
173
|
+
</div>
|
|
174
|
+
<div class="alert-body">
|
|
175
|
+
<p>An admonition with a tinted title bar. The body rests on the page background.</p>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div class="alert warning admonition">
|
|
180
|
+
<div class="alert-title">
|
|
181
|
+
<i class="ti ti-alert-triangle" aria-hidden="true"></i>
|
|
182
|
+
Warning
|
|
183
|
+
</div>
|
|
184
|
+
<div class="alert-body">
|
|
185
|
+
<p>The intent tints the title bar, the border, and the body uses <code>var(--surface)</code>.</p>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## CSS hooks
|
|
192
|
+
|
|
193
|
+
- `--alert-pad-inline` — inline padding. Stays stable across `.sm`/`.lg`.
|
|
194
|
+
- `--alert-pad-block` — block padding.
|
|
195
|
+
- `--alert-font-size` — base font size.
|
|
196
|
+
- `--alert-icon-size` — size of a leading `.alert-icon`.
|
|
197
|
+
- `--alert-dismiss-size` — inline and block size of the `.alert-dismiss` button.
|
|
198
|
+
- `--alert-dismiss-icon-size` — size of the dismiss glyph.
|
|
199
|
+
- `--alert-radius` — corner radius, when the default `--radius-lg` does not fit.
|
|
200
|
+
- `--alert-border-inline-start-color` / `--alert-border-inline-start-width` — extension points for a callout-style colored flag on the leading edge instead of a uniform border.
|
|
201
|
+
|
|
202
|
+
Prefer intents and shared variants for alert colors rather than overriding the
|
|
203
|
+
internal color plumbing directly.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Aura
|
|
2
|
+
|
|
3
|
+
> **Optional** — import `actual-css/css/optional/aura` or `actual-css/css/optional/index`.
|
|
4
|
+
|
|
5
|
+
Aura adds a decorative intent-colored border and halo around one direct child.
|
|
6
|
+
It is visual emphasis only and does not change the child's semantics.
|
|
7
|
+
|
|
8
|
+
```html demo
|
|
9
|
+
<div class="cluster">
|
|
10
|
+
<span class="aura primary">
|
|
11
|
+
<button class="btn" type="button">Publish</button>
|
|
12
|
+
</span>
|
|
13
|
+
|
|
14
|
+
<span class="aura aura-glow secondary">
|
|
15
|
+
<span class="badge">New</span>
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The animated conic frame runs only when the user has not requested reduced
|
|
21
|
+
motion. Add `.aura-glow` for a static, solid frame. The component uses an
|
|
22
|
+
intent such as `.primary`, `.success`, or `.danger`; it does not introduce
|
|
23
|
+
separate aura color variants.
|
|
24
|
+
|
|
25
|
+
Keep exactly one direct child and set `--aura-radius` when its shape differs
|
|
26
|
+
from the common button, card, alert, and badge shapes detected as a visual
|
|
27
|
+
enhancement.
|
|
28
|
+
|
|
29
|
+
## CSS hooks
|
|
30
|
+
|
|
31
|
+
- `--aura-color` — frame and halo color; follows the local intent.
|
|
32
|
+
- `--aura-width` — frame thickness.
|
|
33
|
+
- `--aura-blur` — halo blur radius.
|
|
34
|
+
- `--aura-radius` — child corner radius used to derive the outer radius.
|
|
35
|
+
- `--aura-duration` — rotation duration when motion is allowed.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Avatar
|
|
2
|
+
|
|
3
|
+
> Initials or image representing a person or entity, composable with a status dot.
|
|
4
|
+
|
|
5
|
+
- Supports initials and images.
|
|
6
|
+
- Can be an inert element, link, or button when the link/button has a real destination or action.
|
|
7
|
+
- Stack avatars with `.avatar-stack` for overlapping group displays.
|
|
8
|
+
- A status dot attaches as an empty `.badge` child; the badge carries an `aria-label` so the dot conveys its meaning to assistive tech.
|
|
9
|
+
- Does not support shape modifiers as public API. Shape is theme-level.
|
|
10
|
+
- Sizes can be adjusted with CSS variables and optional `.sm` or `.lg`.
|
|
11
|
+
- Background is an exposed css variable (and can use `data-tone`).
|
|
12
|
+
|
|
13
|
+
## Class reference
|
|
14
|
+
|
|
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
|
+
|
|
22
|
+
## Basic usage
|
|
23
|
+
|
|
24
|
+
```html demo
|
|
25
|
+
<div class="avatar" role="img" aria-label="John Doe, online">
|
|
26
|
+
<span aria-hidden="true">JD</span>
|
|
27
|
+
<span class="badge success" aria-label="Online"></span>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="avatar lg" role="img" aria-label="John Doe, online">
|
|
31
|
+
<span aria-hidden="true">JD</span>
|
|
32
|
+
<span class="badge success" aria-label="Online"></span>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="avatar sm" role="img" aria-label="John Doe, errors">
|
|
36
|
+
<span aria-hidden="true">JD</span>
|
|
37
|
+
<span class="badge danger" aria-label="2 errors"></span>
|
|
38
|
+
</div>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The avatar keeps the same visual box across semantics — as a link or button it
|
|
42
|
+
gains hover and pressed feedback.
|
|
43
|
+
|
|
44
|
+
```html demo
|
|
45
|
+
<a href="#" class="avatar">
|
|
46
|
+
<img src="https://mockmind-api.uifaces.co/content/human/219.jpg" alt="Jane Doe" />
|
|
47
|
+
</a>
|
|
48
|
+
|
|
49
|
+
<div class="flyout-trigger">
|
|
50
|
+
<button type="button"
|
|
51
|
+
class="avatar"
|
|
52
|
+
data-enhance="flyout"
|
|
53
|
+
aria-haspopup="menu"
|
|
54
|
+
aria-expanded="false"
|
|
55
|
+
aria-controls="profile-menu"
|
|
56
|
+
id="profile-trigger"
|
|
57
|
+
aria-label="Jane Doe, open profile menu">
|
|
58
|
+
<img src="https://mockmind-api.uifaces.co/content/human/219.jpg" alt="" />
|
|
59
|
+
</button>
|
|
60
|
+
<menu class="flyout menu" id="profile-menu" aria-labelledby="profile-trigger" hidden>
|
|
61
|
+
<li><a class="menu-item" href="#profile">View profile</a></li>
|
|
62
|
+
<li><button class="menu-item" type="button">Sign out</button></li>
|
|
63
|
+
</menu>
|
|
64
|
+
</div>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Avatar stack
|
|
68
|
+
|
|
69
|
+
```html demo
|
|
70
|
+
<div class="avatar-stack" role="group" aria-label="Team members">
|
|
71
|
+
<div class="avatar" role="img" aria-label="John Doe" style="--avatar-bg:#E5EEE4">
|
|
72
|
+
<span aria-hidden="true">JD</span>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="avatar" role="img" aria-label="Jane Doe" style="--avatar-bg:#F6F4E8">
|
|
75
|
+
<span aria-hidden="true">JD</span>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="avatar" role="img" aria-label="99 more team members" style="--avatar-bg:#744577;" data-tone="dark">
|
|
78
|
+
<span aria-hidden="true">+99</span>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## CSS hooks
|
|
84
|
+
|
|
85
|
+
- `--avatar-size` — inline and block size.
|
|
86
|
+
- `--avatar-radius` — corner radius; set a smaller value for squared avatars.
|
|
87
|
+
- `--avatar-bg` — background; `data-tone` adjusts the derived foreground.
|
|
88
|
+
- `--avatar-stack-size` — stack-scoped size that each avatar falls back to.
|
|
89
|
+
- `--avatar-stack-overlap` — how far stacked avatars overlap.
|
|
90
|
+
- `--avatar-stack-ring` — separating ring width inside `.avatar-stack`.
|
|
91
|
+
|
|
92
|
+
Prefer intents for avatar colors. Inside `.avatar-stack`, `--avatar-size` falls
|
|
93
|
+
back to a stack-scoped value so the whole group resizes together with `.sm`/`.lg`;
|
|
94
|
+
set `--avatar-size` on an individual avatar to opt one out.
|
|
95
|
+
`--avatar-stack-overlap` is derived from `--avatar-stack-size`, not `--avatar-size`.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
> Compact label for counts, status, or category tags, with shared intents and variants.
|
|
4
|
+
|
|
5
|
+
- Supports intent colors.
|
|
6
|
+
- Soft by default. Use `.solid` for counters and notification badges, or `.outline` for quieter emphasis.
|
|
7
|
+
- Dots stay solid regardless of variant.
|
|
8
|
+
- Use `.sm` or `.lg` for compact density changes.
|
|
9
|
+
- Can be used inline in headings.
|
|
10
|
+
- Can be used as a count badge.
|
|
11
|
+
- Can be used as a stable dot badge when empty and given an accessible name.
|
|
12
|
+
- Empty badges render as dots. The element must be truly empty: no text and no whitespace.
|
|
13
|
+
|
|
14
|
+
A badge is **content-sized**: it never stretches to fill its container, even as a
|
|
15
|
+
direct child of `.stack` (where flex children otherwise stretch). Use
|
|
16
|
+
`inline-size: 100%` — or the optional `.inline-size-full` utility — when a
|
|
17
|
+
full-width badge is intentional.
|
|
18
|
+
|
|
19
|
+
## Class reference
|
|
20
|
+
|
|
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
|
+
|
|
29
|
+
## Basic usage
|
|
30
|
+
|
|
31
|
+
```html demo
|
|
32
|
+
<span class="badge">Default</span>
|
|
33
|
+
<span class="badge secondary">Secondary</span>
|
|
34
|
+
<span class="badge success">Success</span>
|
|
35
|
+
<span class="badge warning">Warning</span>
|
|
36
|
+
<span class="badge danger">Danger</span>
|
|
37
|
+
<span class="badge success outline">Outline success</span>
|
|
38
|
+
<span class="badge warning soft">Soft warning</span>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## In a title
|
|
42
|
+
|
|
43
|
+
```html demo
|
|
44
|
+
<h2>New features <span class="badge success soft">New</span></h2>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Composed
|
|
48
|
+
|
|
49
|
+
```html demo
|
|
50
|
+
<button type="button" class="btn ghost" aria-label="Notifications">
|
|
51
|
+
<i class="ti ti-bell" aria-hidden="true"></i>
|
|
52
|
+
<span class="badge danger solid" aria-label="12 unread notifications">12</span>
|
|
53
|
+
</button>
|
|
54
|
+
|
|
55
|
+
<button type="button" class="btn secondary soft" aria-label="Notifications">
|
|
56
|
+
<i class="ti ti-bell" aria-hidden="true"></i>
|
|
57
|
+
<span class="badge danger" aria-label="Errors!"></span>
|
|
58
|
+
</button>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Empty badge dot
|
|
62
|
+
|
|
63
|
+
```html demo
|
|
64
|
+
<span class="badge success" aria-label="Online"></span>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The dot conveys no text, so an `aria-label` is required for it to mean anything.
|
|
68
|
+
|
|
69
|
+
## Size variants
|
|
70
|
+
|
|
71
|
+
```html demo
|
|
72
|
+
<span class="badge success sm">Small Success</span>
|
|
73
|
+
<span class="badge success">Regular Success</span>
|
|
74
|
+
<span class="badge success lg">Large Success</span>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Removable tag pattern
|
|
78
|
+
|
|
79
|
+
Use `.badge soft` for tag visuals. Add a direct dismiss button only when the tag can actually be removed. There is no separate chip component.
|
|
80
|
+
|
|
81
|
+
```html demo
|
|
82
|
+
<span class="badge primary soft">
|
|
83
|
+
Design
|
|
84
|
+
<button type="button" aria-label="Remove Design">
|
|
85
|
+
<i class="ti ti-x" aria-hidden="true"></i>
|
|
86
|
+
</button>
|
|
87
|
+
</span>
|
|
88
|
+
<span class="badge primary soft">
|
|
89
|
+
<button type="button" aria-label="Remove Design">
|
|
90
|
+
<i class="ti ti-x" aria-hidden="true"></i>
|
|
91
|
+
</button>
|
|
92
|
+
Design
|
|
93
|
+
</span>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## CSS hooks
|
|
97
|
+
|
|
98
|
+
- `--badge-radius` — corner radius.
|
|
99
|
+
- `--badge-size` — minimum block size; also the square size of an `:empty` dot badge.
|
|
100
|
+
- `--badge-dot-size` — size of an `:empty` dot badge.
|
|
101
|
+
- `--badge-font-size` — label font size.
|
|
102
|
+
- `--badge-pad-x` — inline padding.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Breadcrumb
|
|
2
|
+
|
|
3
|
+
> Trail of links showing the current page's location in a hierarchy.
|
|
4
|
+
|
|
5
|
+
- Use a semantic `<nav>` landmark.
|
|
6
|
+
- Put `.breadcrumb` on the ordered list.
|
|
7
|
+
- Use `aria-current="page"` for the current page.
|
|
8
|
+
- Separators are generated with CSS (`li + li::before`).
|
|
9
|
+
|
|
10
|
+
```html demo
|
|
11
|
+
<nav aria-label="Breadcrumb">
|
|
12
|
+
<ol class="breadcrumb">
|
|
13
|
+
<li><a href="/home">Home</a></li>
|
|
14
|
+
<li><a href="/projects">Projects</a></li>
|
|
15
|
+
<li><a href="/projects/docs">Docs</a></li>
|
|
16
|
+
<li><a href="/current" aria-current="page">Breadcrumb</a></li>
|
|
17
|
+
</ol>
|
|
18
|
+
</nav>
|
|
19
|
+
```
|