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.
Files changed (223) hide show
  1. package/CHANGELOG.md +109 -3
  2. package/README.md +35 -30
  3. package/dist/actual.css +66 -4958
  4. package/dist/actual.full.css +7548 -0
  5. package/dist/actual.full.js +1 -0
  6. package/dist/actual.full.min.css +1 -0
  7. package/dist/actual.js +1 -1
  8. package/dist/actual.min.css +1 -1
  9. package/docs/design-notes/app-ui.md +33 -0
  10. package/docs/design-notes/cascade-layer.md +34 -13
  11. package/docs/design-notes/column-layout.md +677 -0
  12. package/docs/design-notes/enhancement-contract.md +25 -0
  13. package/docs/design-notes/forced-colors.md +3 -0
  14. package/docs/design-notes/grid.md +785 -0
  15. package/docs/design-notes/naming.md +15 -0
  16. package/docs/design-notes/references.md +1 -1
  17. package/docs/design-notes/widget-primitives.md +1 -0
  18. package/docs/navigation.json +12 -2
  19. package/docs/pages/components/alert.md +21 -14
  20. package/docs/pages/components/app-navigation.md +34 -0
  21. package/docs/pages/components/aura.md +1 -1
  22. package/docs/pages/components/avatar.md +16 -6
  23. package/docs/pages/components/badge.md +9 -7
  24. package/docs/pages/components/button.md +46 -16
  25. package/docs/pages/components/card.md +17 -9
  26. package/docs/pages/components/chat.md +8 -8
  27. package/docs/pages/components/dialog.md +7 -7
  28. package/docs/pages/components/drawer.md +3 -3
  29. package/docs/pages/components/fab.md +9 -7
  30. package/docs/pages/components/indicator.md +52 -0
  31. package/docs/pages/components/list.md +62 -0
  32. package/docs/pages/components/navbar.md +15 -8
  33. package/docs/pages/components/pagination.md +4 -3
  34. package/docs/pages/components/rating.md +68 -0
  35. package/docs/pages/components/skeleton.md +4 -4
  36. package/docs/pages/components/spinner.md +5 -5
  37. package/docs/pages/components/steps.md +57 -0
  38. package/docs/pages/components/table.md +30 -5
  39. package/docs/pages/enhancements/flyout.md +15 -15
  40. package/docs/pages/enhancements/overview.md +1 -1
  41. package/docs/pages/enhancements/scrollspy.md +6 -6
  42. package/docs/pages/enhancements/status-bar.md +5 -1
  43. package/docs/pages/enhancements/tabs.md +7 -8
  44. package/docs/pages/enhancements/tooltip.md +1 -1
  45. package/docs/pages/examples/overview.md +47 -22
  46. package/docs/pages/forms/choice-cards.md +11 -6
  47. package/docs/pages/forms/controls.md +1 -1
  48. package/docs/pages/forms/detached-actions.md +1 -1
  49. package/docs/pages/forms/floating-field.md +10 -5
  50. package/docs/pages/forms/form-actions.md +1 -1
  51. package/docs/pages/forms/input-policy.md +1 -1
  52. package/docs/pages/forms/joined-controls.md +4 -4
  53. package/docs/pages/forms/labels.md +6 -6
  54. package/docs/pages/forms/otp.md +33 -1
  55. package/docs/pages/forms/overview.md +19 -19
  56. package/docs/pages/forms/password.md +1 -1
  57. package/docs/pages/forms/range.md +1 -1
  58. package/docs/pages/forms/states-and-sizes.md +44 -48
  59. package/docs/pages/forms/sticky-actions.md +3 -3
  60. package/docs/pages/forms/switch.md +110 -2
  61. package/docs/pages/forms/validation.md +9 -9
  62. package/docs/pages/foundations/philosophy.md +1 -1
  63. package/docs/pages/foundations/theming.md +17 -2
  64. package/docs/pages/foundations/tokens.md +22 -10
  65. package/docs/pages/foundations/typography.md +50 -20
  66. package/docs/pages/guides/bootstrap.md +11 -11
  67. package/docs/pages/guides/integrating-actual-css.md +192 -0
  68. package/docs/pages/guides/introduction.md +23 -26
  69. package/docs/pages/guides/modular-import.md +173 -0
  70. package/docs/pages/guides/progressive-enhancement.md +81 -78
  71. package/docs/pages/guides/tailwind.md +6 -8
  72. package/docs/pages/layout/app-layout.md +57 -0
  73. package/docs/pages/layout/app-shell.md +28 -7
  74. package/docs/pages/layout/center.md +12 -1
  75. package/docs/pages/layout/choosing.md +54 -0
  76. package/docs/pages/layout/column-layout.md +206 -0
  77. package/docs/pages/layout/frame.md +6 -1
  78. package/docs/pages/layout/grid.md +133 -102
  79. package/docs/pages/layout/media.md +1 -1
  80. package/docs/pages/layout/overview.md +15 -2
  81. package/docs/pages/layout/scroll-snap.md +2 -2
  82. package/docs/pages/layout/scroll-target.md +45 -0
  83. package/docs/pages/layout/sidebar-layout.md +38 -18
  84. package/docs/pages/layout/stack.md +70 -1
  85. package/docs/pages/layout/switcher.md +10 -26
  86. package/docs/pages/layout/topbar.md +2 -2
  87. package/docs/pages/patterns/actions.md +1 -1
  88. package/docs/pages/patterns/code-block.md +1 -1
  89. package/docs/pages/patterns/exclusive-accordion.md +1 -1
  90. package/docs/pages/patterns/hierarchical-nav.md +1 -1
  91. package/docs/pages/patterns/icon-input.md +1 -1
  92. package/docs/pages/patterns/icon-slot.md +61 -0
  93. package/docs/pages/patterns/intent-nesting.md +1 -1
  94. package/docs/pages/patterns/navigation-list.md +1 -1
  95. package/docs/pages/patterns/overview.md +1 -1
  96. package/docs/pages/patterns/structured-lists.md +38 -40
  97. package/docs/pages/utilities/accessibility.md +3 -3
  98. package/docs/pages/utilities/flex.md +15 -15
  99. package/docs/pages/utilities/links.md +4 -4
  100. package/docs/pages/utilities/list.md +8 -8
  101. package/docs/pages/utilities/overflow.md +8 -8
  102. package/docs/pages/utilities/overview.md +1 -1
  103. package/docs/pages/utilities/shape.md +3 -3
  104. package/docs/pages/utilities/sizing-wrapping.md +23 -16
  105. package/docs/pages/utilities/spacing.md +20 -20
  106. package/docs/pages/utilities/text.md +10 -10
  107. package/llms.txt +46 -4
  108. package/package.json +43 -13
  109. package/scripts/reserved-classes.json +278 -0
  110. package/src/cli/actual-css.js +133 -0
  111. package/src/css/actual.css +1 -31
  112. package/src/css/actual.full.css +11 -2
  113. package/src/css/components/alert.css +17 -4
  114. package/src/css/components/app-nav.css +76 -0
  115. package/src/css/components/avatar.css +4 -0
  116. package/src/css/components/badge.css +19 -19
  117. package/src/css/components/breadcrumb.css +1 -1
  118. package/src/css/components/button.css +20 -32
  119. package/src/css/components/card.css +34 -9
  120. package/src/css/{optional → components}/chat.css +0 -6
  121. package/src/css/components/drawer.css +24 -5
  122. package/src/css/{optional → components}/fab.css +1 -7
  123. package/src/css/components/flyout.css +5 -0
  124. package/src/css/components/index.css +37 -27
  125. package/src/css/components/indicator.css +47 -0
  126. package/src/css/components/join.css +8 -1
  127. package/src/css/components/key.css +2 -0
  128. package/src/css/components/list.css +83 -0
  129. package/src/css/components/menu.css +11 -8
  130. package/src/css/components/meter.css +4 -1
  131. package/src/css/components/modal.css +5 -17
  132. package/src/css/components/navbar.css +6 -15
  133. package/src/css/components/pagination.css +11 -0
  134. package/src/css/components/rating.css +101 -0
  135. package/src/css/components/spinner.css +5 -0
  136. package/src/css/components/status-bar.css +5 -0
  137. package/src/css/components/steps.css +122 -0
  138. package/src/css/components/surface.css +5 -0
  139. package/src/css/components/tab.css +20 -22
  140. package/src/css/components/table.css +6 -0
  141. package/src/css/components/tooltip.css +3 -7
  142. package/src/css/{focus.css → core/focus.css} +0 -8
  143. package/src/css/core/index.css +9 -0
  144. package/src/css/core/print.css +18 -0
  145. package/src/css/{theme.css → core/theme.css} +19 -19
  146. package/src/css/{tokens.css → core/tokens.css} +16 -4
  147. package/src/css/{variants.css → core/variants.css} +3 -2
  148. package/src/css/{optional → effects}/aura.css +1 -10
  149. package/src/css/effects/index.css +2 -0
  150. package/src/css/forms/base.css +8 -0
  151. package/src/css/forms/choice-card.css +7 -15
  152. package/src/css/forms/choice.css +49 -37
  153. package/src/css/forms/control.css +4 -1
  154. package/src/css/forms/custom-select.css +2 -0
  155. package/src/css/{optional → forms}/floating-field.css +25 -7
  156. package/src/css/forms/index.css +10 -13
  157. package/src/css/forms/native.css +15 -2
  158. package/src/css/{optional → forms}/otp.css +25 -16
  159. package/src/css/forms/range.css +14 -4
  160. package/src/css/forms/switch.css +31 -29
  161. package/src/css/layout/app-layout.css +102 -0
  162. package/src/css/layout/app-shell.css +6 -0
  163. package/src/css/layout/center.css +14 -0
  164. package/src/css/layout/cluster.css +21 -0
  165. package/src/css/layout/column-layout.css +144 -0
  166. package/src/css/layout/container-query.css +15 -0
  167. package/src/css/layout/frame.css +19 -0
  168. package/src/css/layout/grid.css +155 -0
  169. package/src/css/layout/index.css +44 -0
  170. package/src/css/layout/measure.css +9 -0
  171. package/src/css/layout/media.css +10 -0
  172. package/src/css/layout/scroll-target.css +15 -0
  173. package/src/css/layout/scroller.css +41 -0
  174. package/src/css/layout/sidebar-layout.css +52 -0
  175. package/src/css/layout/stack.css +21 -0
  176. package/src/css/layout/switcher.css +23 -0
  177. package/src/css/{optional/layout-extra.css → layout/topbar.css} +0 -20
  178. package/src/css/typography/index.css +5 -0
  179. package/src/css/typography/lead.css +7 -0
  180. package/src/css/{components → typography}/overline.css +2 -2
  181. package/src/css/{prose.css → typography/prose.css} +57 -38
  182. package/src/css/{utilities.css → utilities/base.css} +2 -0
  183. package/src/css/utilities/index.css +3 -0
  184. package/src/js/escape.js +36 -0
  185. package/src/js/flyout.js +22 -12
  186. package/src/js/full.js +26 -0
  187. package/src/js/index.js +5 -21
  188. package/src/js/surface.js +1 -31
  189. package/src/js/tooltip.js +48 -19
  190. package/src/js/validation.js +1 -1
  191. package/src/tooling/css-bundle.js +308 -0
  192. package/dist/actual-themes.min.css +0 -1
  193. package/dist/optional.css +0 -1048
  194. package/dist/optional.min.css +0 -1
  195. package/docs/pages/guides/optional-components.md +0 -33
  196. package/docs/pages/layout/list.md +0 -41
  197. package/src/css/grid.css +0 -109
  198. package/src/css/layout.css +0 -123
  199. package/src/css/optional/index.css +0 -10
  200. package/src/css/optional/scroller.css +0 -63
  201. package/src/css/print.css +0 -47
  202. package/src/css/themes/corporate.css +0 -60
  203. package/src/css/themes/cyberpunk.css +0 -60
  204. package/src/css/themes/dim.css +0 -33
  205. package/src/css/themes/edge.css +0 -117
  206. package/src/css/themes/forest.css +0 -65
  207. package/src/css/themes/gradient.css +0 -97
  208. package/src/css/themes/index.css +0 -47
  209. package/src/css/themes/indigo.css +0 -33
  210. package/src/css/themes/lavender.css +0 -66
  211. package/src/css/themes/mono.css +0 -60
  212. package/src/css/themes/neon.css +0 -66
  213. package/src/css/themes/ocean.css +0 -60
  214. package/src/css/themes/petrol.css +0 -64
  215. package/src/css/themes/spruce.css +0 -64
  216. package/src/css/themes/square.css +0 -65
  217. package/src/css/themes/sunset.css +0 -66
  218. /package/src/css/{base.css → core/base.css} +0 -0
  219. /package/src/css/{intents.css → core/intents.css} +0 -0
  220. /package/src/css/{reset.css → core/reset.css} +0 -0
  221. /package/src/css/{optional → layout}/scroll-snap.css +0 -0
  222. /package/src/css/{optional/typography-fluid.css → typography/fluid.css} +0 -0
  223. /package/src/css/{optional/utilities-extra.css → utilities/extra.css} +0 -0
@@ -37,3 +37,18 @@ Actual CSS is intended for new projects. Existing projects with class collisions
37
37
  - Shared runtime primitives may have public JavaScript APIs without becoming author-facing CSS or HTML vocabulary. Do not introduce `.surface` or `data-surface-*`; components keep their feature-specific author APIs (`data-flyout-*`, `data-context-menu-*`, CSS `.flyout`, `.menu`, …).
38
38
  - `data-enhance` is the one un-namespaced attribute — it carries *opt-in* for any feature, not *configuration* for one feature. Feature-namespaced attributes carry configuration.
39
39
  - Custom events use the `actual:*` namespace.
40
+
41
+ ## Utilities
42
+
43
+ Utilities ship in two layers that follow the same class grammar.
44
+
45
+ - **Base utilities** are a curated set of common ergonomic shortcuts
46
+ (`.overflow-auto`, `.gap-none`, `.text-nowrap`, `.px`, `.py`).
47
+ - **Optional utilities** use explicit property/value names
48
+ (`.overflow-hidden`, `.gap-sm`, `.white-space-normal`).
49
+
50
+ Base utilities may use compact names for a small set of frequent operations
51
+ (`.px`, `.py`, `.mbs`, `.mbe`). Extra utilities use explicit property/value
52
+ names and must not duplicate an operation already provided by base. The two
53
+ sets may cover the same CSS property, but must not expose competing names for
54
+ the same declaration.
@@ -221,7 +221,7 @@ Prior Actual CSS libraries:
221
221
  - https://smolcss.dev/#smol-container
222
222
  - https://every-layout.dev/layouts/center/
223
223
 
224
- ### Layout: List
224
+ ### Component: List
225
225
 
226
226
  - https://daisyui.com/components/list/
227
227
  - https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element
@@ -7,6 +7,7 @@ The JS runtime doubles as a primitive kit for building custom widgets.
7
7
  | Need | Primitive | Import |
8
8
  |------|-----------|--------|
9
9
  | Opt-in discovery + lifecycle + cleanup | `enhance`, `registerEnhancement` | `actual-css/js/enhance` |
10
+ | Per-document LIFO Escape dismissal | `escape` (`registerEscapeDismissal`) | `actual-css/js/escape` |
10
11
  | Positioning, flip/shift, `--available-height`, `data-placement` | `floating` (`track`, `reposition`, `repositionAt`) | `actual-css/js/floating` |
11
12
  | Open/close, sheet on mobile, backdrop, outside-click, Escape, focus restore | `surface` | `actual-css/js/surface` |
12
13
  | Directional item lookup, edges, wrapping, RTL | `keys` (`itemForKey`, `firstItem`, `lastItem`, `nextItem`) | `actual-css/js/keys` |
@@ -5,7 +5,8 @@
5
5
  "slug": "guides",
6
6
  "pages": [
7
7
  "introduction",
8
- "optional-components",
8
+ "integrating-actual-css",
9
+ "modular-import",
9
10
  "progressive-enhancement",
10
11
  "bootstrap",
11
12
  "tailwind"
@@ -21,18 +22,21 @@
21
22
  "slug": "layout",
22
23
  "pages": [
23
24
  "overview",
25
+ "choosing",
24
26
  "stack",
25
27
  "cluster",
26
28
  "grid",
29
+ "column-layout",
27
30
  "center",
28
31
  "sidebar-layout",
29
32
  "media",
30
33
  "switcher",
31
34
  "topbar",
32
35
  "scroll-snap",
36
+ "scroll-target",
33
37
  "frame",
34
38
  "app-shell",
35
- "list"
39
+ "app-layout"
36
40
  ]
37
41
  },
38
42
  {
@@ -41,6 +45,7 @@
41
45
  "pages": [
42
46
  "accordion",
43
47
  "alert",
48
+ "app-navigation",
44
49
  "aura",
45
50
  "avatar",
46
51
  "badge",
@@ -51,13 +56,17 @@
51
56
  "dialog",
52
57
  "drawer",
53
58
  "fab",
59
+ "indicator",
54
60
  "key",
61
+ "list",
55
62
  "meter",
56
63
  "navbar",
57
64
  "pagination",
58
65
  "progress",
66
+ "rating",
59
67
  "skeleton",
60
68
  "spinner",
69
+ "steps",
61
70
  "table"
62
71
  ]
63
72
  },
@@ -91,6 +100,7 @@
91
100
  "actions",
92
101
  "navigation-list",
93
102
  "icon-input",
103
+ "icon-slot",
94
104
  "structured-lists",
95
105
  "hierarchical-nav",
96
106
  "code-block",
@@ -14,20 +14,25 @@
14
14
  - Use `.sm` or `.lg` for density changes. The inline padding stays stable.
15
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
16
 
17
+ Because alerts are soft by default, adding `.soft` to an intent (`.alert.soft.primary`,
18
+ `.alert.soft.danger`, …) is a no-op: it already resolves to a soft version of that
19
+ intent. Reach for `.solid` (stronger) or `.outline` (quieter) when the emphasis
20
+ itself needs to change, not `.soft`.
21
+
17
22
  ## Class reference
18
23
 
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. |
24
+ | Class | Kind | Description |
25
+ |------------------|-------------|-----------------------------------------------------------------------------------|
26
+ | `.alert` | Component | Inline status surface; soft by default. |
27
+ | `.alert-icon` | Composition | Decorative leading icon; pins to the first grid column. |
28
+ | `.alert-dismiss` | Modifier | Compact dismiss button using the `--icon-close` mask and the `--dismiss` command. |
29
+ | `.callout` | Variant | Neutral panel with a thick accent border on the leading edge. |
30
+ | `.admonition` | Variant | Structured box with a tinted title bar and body on the page surface. |
31
+ | `.alert-title` | Composition | Admonition title bar; hosts the dismiss button. |
32
+ | `.alert-body` | Composition | Admonition body resting on the page surface. |
33
+ | Shared intents | Intent | `.primary`, `.secondary`, `.success`, `.warning`, `.danger`. |
34
+ | Shared variants | Variant | `.solid` and `.outline` emphasis. |
35
+ | `.sm` / `.lg` | Size | Density; inline padding stays stable. |
31
36
 
32
37
  ## Basic usage
33
38
 
@@ -70,8 +75,10 @@
70
75
  <i class="ti ti-alert-triangle alert-icon" aria-hidden="true"></i>
71
76
 
72
77
  <div class="stack">
73
- <strong>Payment failed.</strong>
74
- <p>Check your billing details or try another card.</p>
78
+ <div class="stack" style="--gap: var(--space-10)">
79
+ <strong>Payment failed.</strong>
80
+ <p>Check your billing details or try another card.</p>
81
+ </div>
75
82
 
76
83
  <menu class="actions cluster">
77
84
  <li><a class="btn danger sm" href="/billing">Update billing</a></li>
@@ -0,0 +1,34 @@
1
+ # App Navigation
2
+
3
+ > Primary application destinations in a persistent bottom bar or labelled side navigation.
4
+
5
+ Use one `.app-nav` landmark for the application's primary destinations. Links
6
+ remain links, and `aria-current="page"` is the only current-page state.
7
+
8
+ ```html demo
9
+ <nav class="app-nav" aria-label="Primary">
10
+ <a href="#today" aria-current="page">
11
+ <span aria-hidden="true">☀</span>
12
+ <span>Today</span>
13
+ </a>
14
+ <a href="#tasks">
15
+ <span aria-hidden="true">✓</span>
16
+ <span>Tasks</span>
17
+ </a>
18
+ <a href="#settings">
19
+ <span aria-hidden="true">⚙</span>
20
+ <span>Settings</span>
21
+ </a>
22
+ </nav>
23
+ ```
24
+
25
+ On its own, `.app-nav` is a sticky bottom bar. Compose it as a direct child of
26
+ `.app-layout` to let the layout turn the same landmark into side navigation when space
27
+ permits. The component contains no JavaScript and does not manage routing.
28
+ The icon slot accepts SVGs, images, and decorative elements such as icon-font
29
+ `i` elements marked with `aria-hidden="true"`.
30
+
31
+ ### Hooks
32
+
33
+ - `--app-nav-size` controls the minimum bottom-bar size.
34
+ - `--app-nav-gap` controls spacing between destinations.
@@ -1,6 +1,6 @@
1
1
  # Aura
2
2
 
3
- > **Optional** — import `actual-css/css/optional/aura` or `actual-css/css/optional/index`.
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 | 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`. |
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
 
@@ -41,6 +41,16 @@
41
41
  The avatar keeps the same visual box across semantics — as a link or button it
42
42
  gains hover and pressed feedback.
43
43
 
44
+ For an accessible initials label, prefer `<abbr title="Full name">` so the
45
+ expansion is available to assistive tech; the UA dotted underline it would draw
46
+ is suppressed inside the avatar.
47
+
48
+ ```html demo
49
+ <div class="avatar" role="img">
50
+ <abbr title="Ada Meridian">AM</abbr>
51
+ </div>
52
+ ```
53
+
44
54
  ```html demo
45
55
  <a href="#" class="avatar">
46
56
  <img src="https://mockmind-api.uifaces.co/content/human/219.jpg" alt="Jane Doe" />
@@ -18,13 +18,13 @@ full-width badge is intentional.
18
18
 
19
19
  ## Class reference
20
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. |
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
 
@@ -77,6 +77,8 @@ The dot conveys no text, so an `aria-label` is required for it to mean anything.
77
77
  ## Removable tag pattern
78
78
 
79
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
+ For a compact action or filter, use `.btn.sm` instead; badges describe content
81
+ and must not be turned into toggle controls merely to obtain a compact shape.
80
82
 
81
83
  ```html demo
82
84
  <span class="badge primary soft">
@@ -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 | 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. |
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
 
@@ -61,6 +61,18 @@ foreground by default, including on a contrasting `.inverted` surface. A local
61
61
  intent class still wins: `.danger.outline` uses the danger color in either
62
62
  context. Filled buttons own their surface and keep their normal intent recipe.
63
63
 
64
+ `.btn.link` is a link-style action: it keeps button behavior and states, but
65
+ remains intrinsically sized like text instead of stretching with its layout
66
+ container. For a plain text link, use a bare `<a>` with no class.
67
+
68
+ ```html demo
69
+ <div class="cluster">
70
+ <a href="#">Normal link</a>
71
+ <a class="btn link" href="#">Button-like link</a>
72
+ <button class="btn link" type="button">Button with link appearance</button>
73
+ </div>
74
+ ```
75
+
64
76
  ```html demo
65
77
  <div class="cluster">
66
78
  <button class="btn outline" type="button">Outline</button>
@@ -117,6 +129,24 @@ change typography.
117
129
 
118
130
  ## States
119
131
 
132
+ ### Compact filters and actions
133
+
134
+ A compact filter is still a button, not a separate chip semantic. Compose the
135
+ small size with `aria-pressed`; application code owns the state change.
136
+
137
+ ```html demo
138
+ <div class="cluster" aria-label="Task filters">
139
+ <button class="btn sm" type="button" aria-pressed="true">All</button>
140
+ <button class="btn sm outline" type="button" aria-pressed="false">Open</button>
141
+ <button class="btn sm outline" type="button" aria-pressed="false">Done</button>
142
+ </div>
143
+ ```
144
+
145
+ Use `.badge` for a passive category or count and the removable-tag composition
146
+ when a displayed value needs its own remove action. Actual intentionally has no
147
+ generic `.chip` component: action, selection, and information retain their HTML
148
+ semantics.
149
+
120
150
  ### Disabled
121
151
 
122
152
  Disable a `<button>` or `<input>` with the native `disabled` attribute. Anchors
@@ -4,19 +4,24 @@ Flexible content container with optional header, body, and footer regions, plus
4
4
 
5
5
  ## Class reference
6
6
 
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. |
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` | Variant | Tighter padding for dense contexts. |
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. Cards do not own page spacing — compose them with
19
- layout primitives like `.grid`.
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`. A bare card owns the rhythm between its direct
22
+ children through `--card-gap`; applying a layout primitive such as `.stack` or
23
+ `.media` to the same element gives that primitive control of the layout and
24
+ gap.
20
25
 
21
26
  ```html demo
22
27
  <div style="max-inline-size: 32rem">
@@ -95,7 +100,9 @@ colored headers, or footers.
95
100
 
96
101
  ## In grids
97
102
 
98
- Cards display nicely in grids with equal-height behavior.
103
+ Cards display nicely in grids with equal-height behavior. Each card in a row
104
+ stretches to the row height, and a direct `<footer>` anchors to the bottom, so
105
+ all footers in the row line up regardless of body length.
99
106
 
100
107
  ```html demo
101
108
  <section class="grid">
@@ -193,3 +200,4 @@ variants.
193
200
  - `--card-radius` — corner radius.
194
201
  - `--card-max-inline-size` — maximum width.
195
202
  - `--card-pad` — inner padding; also drives the negative offsets that let a `.bleed` child reach the card edge. `.compact` lowers it.
203
+ - `--card-gap` — space between direct children of a bare card. A composed layout primitive owns its own gap instead. `.compact` does not change this hook.
@@ -1,6 +1,6 @@
1
1
  # Chat
2
2
 
3
- > **Optional** — import `actual-css/css/optional/chat` or `actual-css/css/optional/index`.
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 | 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. |
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 | 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. |
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 | Kind | Description |
8
- |---|---|---|
9
- | `.drawer` | Component | Modal side-sheet built on the native `<dialog>` element. |
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,9 +1,11 @@
1
1
  # Floating action button
2
2
 
3
- > **Optional** — import `actual-css/css/optional/fab` or `actual-css/css/optional/index`.
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.
7
+ As a direct child of `.app-layout`, it instead overlays the main grid area so
8
+ the layout keeps it clear of adaptive application navigation and safe areas.
7
9
 
8
10
  ```html
9
11
  <div class="fab">
@@ -102,12 +104,12 @@ the open state so a plus naturally becomes a close symbol.
102
104
 
103
105
  ## Class reference
104
106
 
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. |
107
+ | Class | Description |
108
+ |----------------|-----------------------------------------------------------|
109
+ | `.fab` | Fixed viewport placement; use `details` for a speed dial. |
110
+ | `.fab-actions` | Collapsible vertical action list. |
111
+ | `.fab-action` | One horizontal label-and-button unit. |
112
+ | `.fab-label` | Compact floating label for an action. |
111
113
 
112
114
  ## CSS hooks
113
115
 
@@ -0,0 +1,52 @@
1
+ # Indicator
2
+
3
+ > Attach any component to one of a container's four corners.
4
+
5
+ `.indicator` creates the positioning context and `.indicator-item` positions
6
+ its child at the top-end corner. The primitive does not add a background,
7
+ size, border, or contrast ring: compose it with `.badge` or another component
8
+ that owns its appearance.
9
+
10
+ ## Class reference
11
+
12
+ | Class | Kind | Description |
13
+ |-------------------|-----------|--------------------------------------------------|
14
+ | `.indicator` | Component | Positioning context for an overlaid child. |
15
+ | `.indicator-item` | Part | Item attached to the top-end corner by default. |
16
+ | `.start` | Placement | Moves the item to the inline-start corner. |
17
+ | `.bottom` | Placement | Moves the item to the bottom corner. |
18
+
19
+ Combine `.bottom.start` for bottom-start. Logical inline placement follows the
20
+ document direction automatically.
21
+
22
+ ```html demo
23
+ <div class="cluster" style="padding: var(--space-40);">
24
+ <button class="btn indicator" type="button">
25
+ Inbox
26
+ <span class="indicator-item badge danger solid">3</span>
27
+ </button>
28
+
29
+ <article class="card indicator" style="max-inline-size: 18rem;">
30
+ <span class="indicator-item start badge success">New</span>
31
+ <h2>Quarterly report</h2>
32
+ <p>The latest figures are ready to review.</p>
33
+ </article>
34
+ </div>
35
+ ```
36
+
37
+ ## Four corners
38
+
39
+ ```html demo
40
+ <div class="indicator card" style="inline-size: 12rem; min-block-size: 7rem; margin: var(--space-40);">
41
+ <span class="indicator-item badge solid" aria-label="Top end">TE</span>
42
+ <span class="indicator-item start badge solid" aria-label="Top start">TS</span>
43
+ <span class="indicator-item bottom badge solid" aria-label="Bottom end">BE</span>
44
+ <span class="indicator-item bottom start badge solid" aria-label="Bottom start">BS</span>
45
+ <p class="muted">Four logical corners</p>
46
+ </div>
47
+ ```
48
+
49
+ The item extends beyond the container edge. An ancestor with clipped overflow
50
+ can cut it off; leave overflow visible or provide enough inset space in that
51
+ composition. Avatar status dots keep their dedicated circle-aware placement
52
+ and contrast ring; continue to use `.avatar > .badge:empty` for that pattern.
@@ -0,0 +1,62 @@
1
+ # List
2
+
3
+ > Repeated application rows with optional leading and trailing regions.
4
+
5
+ Use `.list` when a collection repeatedly needs leading content, flexible text,
6
+ and trailing metadata or controls. Use `.media` for a single two-part
7
+ media/content relationship, `.nav-list` for navigation structure, and native
8
+ list markers when order or bullets carry meaning.
9
+
10
+ ```html demo
11
+ <ul class="list">
12
+ <li class="list-item">
13
+ <span class="avatar sm"><abbr>AM</abbr></span>
14
+ <span class="list-item-content">
15
+ <strong class="list-item-title">Ada Morgan</strong>
16
+ <span class="list-item-text">Design systems · Brussels</span>
17
+ </span>
18
+ <span class="badge success">Online</span>
19
+ </li>
20
+ <li class="list-item">
21
+ <input class="check" type="checkbox" aria-label="Select quarterly review">
22
+ <span class="list-item-content">
23
+ <strong class="list-item-title">Quarterly review</strong>
24
+ <span class="list-item-text">Due tomorrow</span>
25
+ </span>
26
+ <time class="list-item-trailing" datetime="09:30">09:30</time>
27
+ </li>
28
+ </ul>
29
+ ```
30
+
31
+ Leading and trailing content are unconstrained: avatars, native choices,
32
+ badges, text, switches, and buttons retain their own component sizing. The
33
+ middle region has no minimum content floor, so supporting text and long tokens
34
+ wrap instead of widening the page.
35
+
36
+ For a navigable row, keep the list semantics and put `.list-item` on the link:
37
+
38
+ ```html demo
39
+ <ul class="list">
40
+ <li>
41
+ <a class="list-item" href="#profile">
42
+ <span aria-hidden="true">👤</span>
43
+ <span class="list-item-content">
44
+ <strong class="list-item-title">Profile</strong>
45
+ <span class="list-item-text">Name, photo, and contact details</span>
46
+ </span>
47
+ <span class="list-item-trailing" aria-hidden="true">›</span>
48
+ </a>
49
+ </li>
50
+ </ul>
51
+ ```
52
+
53
+ Do not attach click JavaScript to the entire row. Use a link for navigation and
54
+ a button or native control for actions.
55
+
56
+ ### Hooks
57
+
58
+ - `--list-item-min-size` controls the row's minimum touch height.
59
+ - `--list-item-pad-block` and `--list-item-pad-inline` control row padding.
60
+ - `--list-item-gap` controls spacing between the three regions.
61
+ - `--list-divider` controls the leading and inter-row dividers. The final row
62
+ deliberately has no trailing divider.