actual-css 0.2.0 → 0.3.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.
Files changed (214) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/README.md +24 -9
  3. package/dist/actual-themes.min.css +1 -0
  4. package/dist/actual.css +1244 -915
  5. package/dist/actual.js +1 -3
  6. package/dist/actual.min.css +1 -1
  7. package/dist/optional.css +1048 -0
  8. package/dist/optional.min.css +1 -0
  9. package/docs/design-notes/browser-support.md +94 -14
  10. package/docs/design-notes/cascade-layer.md +1 -1
  11. package/docs/design-notes/enhancement-contract.md +11 -14
  12. package/docs/design-notes/forced-colors.md +105 -0
  13. package/docs/design-notes/naming.md +2 -1
  14. package/docs/design-notes/platform-alignment.md +492 -0
  15. package/docs/design-notes/references.md +8 -0
  16. package/docs/design-notes/widget-primitives.md +37 -1
  17. package/docs/navigation.json +135 -0
  18. package/docs/pages/components/accordion.md +80 -0
  19. package/docs/pages/components/alert.md +203 -0
  20. package/docs/pages/components/aura.md +35 -0
  21. package/docs/pages/components/avatar.md +95 -0
  22. package/docs/pages/components/badge.md +102 -0
  23. package/docs/pages/components/breadcrumb.md +19 -0
  24. package/docs/pages/components/button.md +205 -0
  25. package/docs/pages/components/card.md +183 -0
  26. package/docs/pages/components/chat.md +50 -0
  27. package/docs/pages/components/dialog.md +367 -0
  28. package/docs/pages/components/drawer.md +113 -0
  29. package/docs/pages/components/fab.md +118 -0
  30. package/docs/pages/components/key.md +33 -0
  31. package/docs/pages/components/meter.md +23 -0
  32. package/docs/pages/components/navbar.md +92 -0
  33. package/docs/pages/components/pagination.md +55 -0
  34. package/docs/pages/components/progress.md +29 -0
  35. package/docs/pages/components/skeleton.md +38 -0
  36. package/docs/pages/components/spinner.md +93 -0
  37. package/docs/pages/components/table.md +102 -0
  38. package/docs/pages/enhancements/flyout.md +391 -0
  39. package/docs/pages/enhancements/overview.md +36 -0
  40. package/docs/pages/enhancements/scrollspy.md +71 -0
  41. package/docs/pages/enhancements/status-bar.md +72 -0
  42. package/docs/pages/enhancements/tabs.md +80 -0
  43. package/docs/pages/enhancements/tooltip.md +130 -0
  44. package/docs/pages/examples/overview.md +41 -0
  45. package/docs/pages/forms/choice-cards.md +102 -0
  46. package/docs/pages/forms/controls.md +32 -0
  47. package/docs/pages/forms/detached-actions.md +59 -0
  48. package/docs/pages/forms/floating-field.md +88 -0
  49. package/docs/pages/forms/form-actions.md +56 -0
  50. package/docs/pages/forms/input-policy.md +91 -0
  51. package/docs/pages/forms/joined-controls.md +37 -0
  52. package/docs/pages/forms/labels.md +42 -0
  53. package/docs/pages/forms/otp.md +50 -0
  54. package/docs/pages/forms/overview.md +188 -0
  55. package/docs/pages/forms/password.md +40 -0
  56. package/docs/pages/forms/range.md +17 -0
  57. package/docs/pages/forms/states-and-sizes.md +321 -0
  58. package/docs/pages/forms/sticky-actions.md +187 -0
  59. package/docs/pages/forms/switch.md +31 -0
  60. package/docs/pages/forms/validation.md +241 -0
  61. package/docs/{mental-model.md → pages/foundations/philosophy.md} +33 -18
  62. package/docs/pages/foundations/theming.md +92 -0
  63. package/docs/pages/foundations/tokens.md +421 -0
  64. package/docs/{typography.md → pages/foundations/typography.md} +27 -9
  65. package/docs/pages/guides/bootstrap.md +438 -0
  66. package/docs/pages/guides/introduction.md +157 -0
  67. package/docs/pages/guides/optional-components.md +33 -0
  68. package/docs/pages/guides/progressive-enhancement.md +686 -0
  69. package/docs/pages/guides/tailwind.md +455 -0
  70. package/docs/pages/layout/app-shell.md +25 -0
  71. package/docs/pages/layout/center.md +29 -0
  72. package/docs/pages/layout/cluster.md +57 -0
  73. package/docs/pages/layout/frame.md +30 -0
  74. package/docs/pages/layout/grid.md +142 -0
  75. package/docs/pages/layout/list.md +41 -0
  76. package/docs/pages/layout/media.md +21 -0
  77. package/docs/pages/layout/overview.md +37 -0
  78. package/docs/pages/layout/scroll-snap.md +54 -0
  79. package/docs/pages/layout/sidebar-layout.md +27 -0
  80. package/docs/pages/layout/stack.md +18 -0
  81. package/docs/pages/layout/switcher.md +36 -0
  82. package/docs/pages/layout/topbar.md +23 -0
  83. package/docs/pages/patterns/actions.md +52 -0
  84. package/docs/pages/patterns/code-block.md +36 -0
  85. package/docs/pages/patterns/exclusive-accordion.md +16 -0
  86. package/docs/pages/patterns/hierarchical-nav.md +26 -0
  87. package/docs/pages/patterns/icon-input.md +25 -0
  88. package/docs/pages/patterns/intent-nesting.md +3 -0
  89. package/docs/pages/patterns/navigation-list.md +235 -0
  90. package/docs/pages/patterns/overview.md +58 -0
  91. package/docs/pages/patterns/structured-lists.md +47 -0
  92. package/docs/pages/utilities/accessibility.md +34 -0
  93. package/docs/pages/utilities/flex.md +105 -0
  94. package/docs/pages/utilities/links.md +18 -0
  95. package/docs/pages/utilities/list.md +31 -0
  96. package/docs/pages/utilities/overflow.md +43 -0
  97. package/docs/pages/utilities/overview.md +18 -0
  98. package/docs/pages/utilities/shape.md +25 -0
  99. package/docs/pages/utilities/sizing-wrapping.md +115 -0
  100. package/docs/pages/utilities/spacing.md +79 -0
  101. package/docs/pages/utilities/text.md +43 -0
  102. package/llms.txt +4 -4
  103. package/package.json +20 -12
  104. package/src/css/actual.css +12 -1
  105. package/src/css/base.css +3 -5
  106. package/src/css/components/accordion.css +18 -30
  107. package/src/css/components/actions.css +4 -1
  108. package/src/css/components/alert.css +126 -99
  109. package/src/css/components/avatar.css +16 -10
  110. package/src/css/components/badge.css +55 -35
  111. package/src/css/components/breadcrumb.css +7 -15
  112. package/src/css/components/busy.css +6 -0
  113. package/src/css/components/button.css +78 -32
  114. package/src/css/components/card.css +17 -37
  115. package/src/css/components/drawer.css +30 -13
  116. package/src/css/components/flyout.css +39 -109
  117. package/src/css/components/index.css +1 -0
  118. package/src/css/components/join.css +14 -2
  119. package/src/css/components/key.css +2 -0
  120. package/src/css/components/menu.css +125 -0
  121. package/src/css/components/meter.css +0 -23
  122. package/src/css/components/modal.css +162 -7
  123. package/src/css/components/navbar.css +17 -18
  124. package/src/css/components/overline.css +0 -7
  125. package/src/css/components/pagination.css +1 -1
  126. package/src/css/components/progress.css +8 -26
  127. package/src/css/components/skeleton.css +7 -0
  128. package/src/css/components/spinner.css +6 -7
  129. package/src/css/components/status-bar.css +15 -24
  130. package/src/css/components/surface.css +2 -8
  131. package/src/css/components/tab.css +19 -48
  132. package/src/css/components/table.css +7 -5
  133. package/src/css/components/tooltip.css +14 -7
  134. package/src/css/focus.css +14 -38
  135. package/src/css/forms/choice-card.css +13 -14
  136. package/src/css/forms/choice.css +21 -27
  137. package/src/css/forms/control.css +16 -17
  138. package/src/css/forms/custom-select.css +9 -11
  139. package/src/css/forms/form-actions.css +14 -3
  140. package/src/css/forms/form.css +7 -4
  141. package/src/css/forms/index.css +4 -4
  142. package/src/css/forms/input-icon.css +30 -12
  143. package/src/css/forms/native.css +50 -11
  144. package/src/css/forms/range.css +17 -9
  145. package/src/css/forms/select.css +8 -8
  146. package/src/css/forms/switch.css +14 -12
  147. package/src/css/forms/validation.css +32 -5
  148. package/src/css/grid.css +19 -18
  149. package/src/css/intents.css +2 -2
  150. package/src/css/layout.css +29 -1
  151. package/src/css/optional/aura.css +93 -0
  152. package/src/css/optional/chat.css +105 -0
  153. package/src/css/optional/fab.css +104 -0
  154. package/src/css/optional/floating-field.css +87 -0
  155. package/src/css/optional/index.css +5 -0
  156. package/src/css/optional/layout-extra.css +7 -4
  157. package/src/css/optional/otp.css +115 -0
  158. package/src/css/optional/scroll-snap.css +6 -0
  159. package/src/css/optional/scroller.css +13 -7
  160. package/src/css/optional/typography-fluid.css +5 -0
  161. package/src/css/optional/utilities-extra.css +17 -2
  162. package/src/css/prose.css +18 -8
  163. package/src/css/reset.css +0 -10
  164. package/src/css/theme.css +21 -5
  165. package/src/css/themes/cyberpunk.css +1 -1
  166. package/src/css/themes/dim.css +3 -3
  167. package/src/css/themes/edge.css +8 -10
  168. package/src/css/themes/index.css +3 -3
  169. package/src/css/themes/{dark.css → indigo.css} +5 -4
  170. package/src/css/themes/neon.css +5 -5
  171. package/src/css/themes/square.css +0 -3
  172. package/src/css/tokens.css +74 -20
  173. package/src/css/utilities.css +8 -10
  174. package/src/css/variants.css +37 -65
  175. package/src/js/command.js +1 -3
  176. package/src/js/context-menu.js +67 -35
  177. package/src/js/dialog.js +68 -79
  178. package/src/js/dismiss.js +15 -0
  179. package/src/js/enhance.js +54 -23
  180. package/src/js/enhancement-loader.js +301 -0
  181. package/src/js/events.js +3 -0
  182. package/src/js/filter.js +3 -3
  183. package/src/js/floating.js +101 -131
  184. package/src/js/flyout.js +104 -87
  185. package/src/js/focus-group.js +116 -0
  186. package/src/js/focus.js +6 -1
  187. package/src/js/index.js +4 -2
  188. package/src/js/input.js +1 -1
  189. package/src/js/keys.js +27 -0
  190. package/src/js/mask.js +7 -6
  191. package/src/js/menu.js +87 -34
  192. package/src/js/parse-config.js +47 -0
  193. package/src/js/password.js +9 -1
  194. package/src/js/scrollspy.js +12 -4
  195. package/src/js/selectors.js +0 -7
  196. package/src/js/status.js +3 -1
  197. package/src/js/surface.js +185 -136
  198. package/src/js/tab.js +36 -53
  199. package/src/js/tooltip.js +53 -31
  200. package/src/js/validation.js +34 -8
  201. package/dist/actual.js.map +0 -31
  202. package/docs/README.md +0 -28
  203. package/docs/components.md +0 -860
  204. package/docs/design-notes/previous-work.md +0 -5
  205. package/docs/forms.md +0 -1265
  206. package/docs/javascript.md +0 -496
  207. package/docs/layout.md +0 -480
  208. package/docs/patterns.md +0 -504
  209. package/docs/reserved.md +0 -7
  210. package/docs/tokens.md +0 -455
  211. package/docs/ui.md +0 -929
  212. package/docs/utilities.md +0 -384
  213. package/src/css/dialog-fallback.css +0 -56
  214. package/src/js/dialog-fallback.js +0 -163
@@ -0,0 +1,115 @@
1
+ # Sizing And Wrapping
2
+
3
+ Small layout corrections for controls, labels, and compact rails.
4
+
5
+ ## Class reference
6
+
7
+ | Class | Kind | Description |
8
+ |---|---|---|
9
+ | `.fit` | Utility | Shrinks a control or element to its content width. |
10
+ | `.text-nowrap` | Utility | Keeps text on one line. |
11
+ | `.truncate` | Utility | Ellipsizes overflowing single-line text. |
12
+ | `.scroller` | Utility | Quiet custom scrollbar chrome for scroll containers. Optional layer. |
13
+ | `.scroller.stable-gutter` | Variant | Reserves scrollbar gutter space so layout does not shift. Optional layer. |
14
+
15
+ Use `.fit` when a control or element should shrink to its content instead of filling the available inline space.
16
+
17
+ ```html demo
18
+ <select class="select fit" aria-label="Theme">
19
+ <option>System</option>
20
+ <option>Light</option>
21
+ <option>Dark</option>
22
+ </select>
23
+ ```
24
+
25
+ Use `.text-nowrap` to keep text on one line inside a cell or label. To stop a
26
+ layout primitive from wrapping — for example to force a `.cluster` onto a single
27
+ row — set `--cluster-wrap: nowrap`.
28
+
29
+ ```html demo
30
+ <div class="cluster sm" style="--cluster-wrap: nowrap;">
31
+ <select class="select sm fit" aria-label="Segment">
32
+ <option>All segments</option>
33
+ </select>
34
+ <button class="btn sm outline" type="button">Filter</button>
35
+ </div>
36
+ ```
37
+
38
+ Use `.truncate` on the flexible item that should ellipsize inside a constrained row.
39
+
40
+ ```html demo
41
+ <header class="cluster" style="--cluster-wrap: nowrap;">
42
+ <strong class="truncate">A long account name that should not push actions away</strong>
43
+ <button class="btn sm ghost" type="button">Open</button>
44
+ </header>
45
+ ```
46
+
47
+ ```css
48
+ .fit {
49
+ inline-size: fit-content;
50
+ max-inline-size: 100%;
51
+ }
52
+
53
+ .text-nowrap {
54
+ white-space: nowrap;
55
+ }
56
+
57
+ .truncate {
58
+ min-inline-size: 0;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
61
+ white-space: nowrap;
62
+ }
63
+ ```
64
+
65
+ ## Scroller
66
+
67
+ Use `.scroller` to apply optional framework scrollbar treatment to a scroll container. It styles the scrollbar only; pair it with `.overflow-auto` or a component that already creates overflow.
68
+
69
+ `scroller` is not imported by `actual.css`. Import it explicitly when a project wants Actual CSS scrollbar chrome instead of the native OS default:
70
+
71
+ ```css
72
+ @import "actual-css/css/optional/scroller";
73
+ ```
74
+
75
+ ```html demo
76
+ <div class="overflow-auto scroller" style="max-block-size: 12rem">
77
+ <div class="stack">
78
+ <p>Scrollable content keeps the native scrollbar but makes it quieter.</p>
79
+ <p>Long content can keep flowing without forcing every component to invent its own scrollbar rules.</p>
80
+ <p>The utility exposes local custom properties for one-off tuning.</p>
81
+ </div>
82
+ </div>
83
+ ```
84
+
85
+ ```css
86
+ .scroller {
87
+ --scroller-size: 0.625rem;
88
+ --scroller-padding: 0.125rem;
89
+ --scroller-track: transparent;
90
+ --scroller-thumb: var(--border);
91
+ --scroller-thumb-hover: var(--text-muted);
92
+
93
+ scrollbar-color: var(--scroller-thumb) var(--scroller-track);
94
+ scrollbar-width: thin;
95
+ }
96
+ ```
97
+
98
+ Customize locally when a scroll surface needs more contrast:
99
+
100
+ ```html
101
+ <div class="overflow-auto scroller"
102
+ style="--scroller-thumb: var(--text-muted); --scroller-thumb-hover: var(--text)">
103
+ ...
104
+ </div>
105
+ ```
106
+
107
+ For rounded scroll containers, keep the thumb visually away from the edge by tuning `--scroller-padding` rather than adding extra wrappers or masking pseudo-elements.
108
+
109
+ ## CSS hooks
110
+
111
+ - `--scroller-size` — scrollbar thickness.
112
+ - `--scroller-padding` — inset between the thumb and the track edge.
113
+ - `--scroller-track` — scrollbar track color.
114
+ - `--scroller-thumb` — scrollbar thumb color.
115
+ - `--scroller-thumb-hover` — scrollbar thumb color on hover.
@@ -0,0 +1,79 @@
1
+ # Spacing Helpers
2
+
3
+ Semantic step helpers for gap, padding, and margin — the most common inline-style escape hatches.
4
+
5
+ ## Class reference
6
+
7
+ | Class | Kind | Description |
8
+ |---|---|---|
9
+ | `.gap-none` | Utility | `gap: 0` on the element itself. |
10
+ | `.py` | Utility | Block (vertical) padding at the current density step. |
11
+ | `.px` | Utility | Inline (horizontal) padding at the current density step. |
12
+ | `.mbs` | Utility | Block-start margin at the current density step. |
13
+ | `.mbe` | Utility | Block-end margin at the current density step. |
14
+ | `.gap-sm` | Utility | `gap: var(--space-20)` — denser row rhythm. Optional layer. |
15
+ | `.gap-md` | Utility | `gap: var(--space-40)` — default row rhythm. Optional layer. |
16
+ | `.gap-lg` | Utility | `gap: var(--space-50)` — roomier row rhythm. Optional layer. |
17
+ | `.padding-context` | Utility | All-side padding at the current density step. Optional layer. |
18
+ | `.gap-context` | Utility | `gap: var(--gap)`. Optional layer. |
19
+ | `.row-gap-context` | Utility | `row-gap: var(--gap)`. Optional layer. |
20
+ | `.column-gap-context` | Utility | `column-gap: var(--gap)`. Optional layer. |
21
+ | `.margin-inline-auto` | Utility | Horizontally centers a block. Optional layer. |
22
+ | `.margin-inline-start-auto` | Utility | Pushes a block toward the inline end. Optional layer. |
23
+ | `.margin-inline-end-auto` | Utility | Pushes a block toward the inline start. Optional layer. |
24
+ | `.margin-block-start-auto` | Utility | Pushes content toward the block end. Optional layer. |
25
+ | `.margin-block-end-auto` | Utility | Pushes content toward the block start. Optional layer. |
26
+
27
+ Spacing helpers follow the density context. The default step is
28
+ `--space-40` (1rem); the `.sm` context tightens it to `--space-20` (0.5rem)
29
+ and the `.lg` context loosens it to `--space-50` (1.5rem). All helpers read
30
+ `--density-space` and map to logical properties (`padding-block`,
31
+ `margin-block-end`, etc.) for writing-direction safety.
32
+
33
+ ## Gap
34
+
35
+ Override the default gap from layout primitives (`.stack`, `.cluster`, `.grid`):
36
+
37
+ ```html demo
38
+ <ul class="cluster">
39
+ <li><a href="/about" class="btn ghost">About</a></li>
40
+ <li><a href="/contact" class="btn ghost">Contact</a></li>
41
+ </ul>
42
+ ```
43
+
44
+ - `.gap-none` → `gap: 0`
45
+
46
+ `.gap-none` sets the element's own gap directly and does not change `--gap`
47
+ for nested layouts. For a denser or roomier rhythm, use the `.sm` / `.lg`
48
+ density contexts or override `--gap` on the layout instance.
49
+
50
+ ## Padding
51
+
52
+ Block (vertical) and inline (horizontal) padding. Values respond to the density context.
53
+
54
+ ```html demo
55
+ <section role="tabpanel" class="py">
56
+ Panel content with breathing room above and below.
57
+ </section>
58
+ ```
59
+
60
+ - `.py` → `padding-block: var(--density-space)`
61
+ - `.px` → `padding-inline: var(--density-space)`
62
+
63
+ ## Margin
64
+
65
+ Block-start and block-end margin for giving elements room:
66
+
67
+ ```html demo
68
+ <h2 class="mbs">A section heading with space above</h2>
69
+ ```
70
+
71
+ - `.mbs` → `margin-block-start: var(--density-space)`
72
+ - `.mbe` → `margin-block-end: var(--density-space)`
73
+
74
+ No `mbs-none` / `mbe-none` — use `margin: 0` via `.list-reset` for lists, or a layout primitive that already resets margins (`.stack > *`).
75
+
76
+ ## CSS hooks
77
+
78
+ - `--density-space` — the step every padding and margin helper reads; `.sm` sets it to `--space-20`, default to `--space-40`, `.lg` to `--space-50`.
79
+ - `--gap` — base gap of layout primitives; read by the optional `.gap-context`, `.row-gap-context`, and `.column-gap-context` helpers.
@@ -0,0 +1,43 @@
1
+ # Text Helpers
2
+
3
+ Lightweight helpers for muted or secondary text without a full color scale.
4
+
5
+ ## Class reference
6
+
7
+ | Class | Kind | Description |
8
+ |---|---|---|
9
+ | `.muted` | Utility | Secondary text color. |
10
+ | `.text-start` | Utility | Logical start-aligned text; sets `--text-align`. |
11
+ | `.text-center` | Utility | Centered text; sets `--text-align`. |
12
+ | `.text-end` | Utility | Logical end-aligned text; sets `--text-align`. |
13
+ | `.text-balance` | Utility | Balanced line wrapping (`text-wrap: balance`). |
14
+ | `.text-pretty` | Utility | Pretty line wrapping (`text-wrap: pretty`). |
15
+ | `.lead` | Utility | Slightly larger, relaxed reading-introduction paragraph. |
16
+
17
+ ## Muted
18
+
19
+ Use `.muted` for secondary text when no semantic element already carries the meaning.
20
+
21
+ ```html demo
22
+ <p class="muted">Last updated June 12, 2026.</p>
23
+ ```
24
+
25
+ ```css
26
+ .muted {
27
+ color: var(--text-muted);
28
+ }
29
+ ```
30
+
31
+ Do not create a full text color utility scale. Intent colors belong to components and state, not arbitrary text decoration.
32
+
33
+ ## Text alignment
34
+
35
+ Use `.text-start`, `.text-center`, or `.text-end` when a component or layout primitive does not already set alignment. These use logical properties so they follow the writing direction.
36
+
37
+ ## Text wrap
38
+
39
+ `.text-balance` and `.text-pretty` opt elements outside `.prose` into balanced or pretty text wrapping. They are safe progressive enhancements: browsers that do not support a `text-wrap` value ignore that declaration and keep normal wrapping.
40
+
41
+ ## Lead
42
+
43
+ `.lead` is a slightly larger, more relaxed reading-introduction paragraph (`1.125em`, `--line-height-relaxed`). Use it for introductory text in editorial surfaces. For fluid headline sizing, use `src/css/optional/typography-fluid.css`.
package/llms.txt CHANGED
@@ -6,15 +6,15 @@ Actual CSS uses a small public grammar: `.component [intent] [variant] [size] [m
6
6
 
7
7
  ## Documentation
8
8
 
9
- - [Docs index](docs/README.md): the maintained map of user docs and design notes.
9
+ - [Documentation source](docs/pages/): the docs pages, generated into `site/` by `bun run build:docs` (start at `site/index.html`).
10
10
 
11
11
  ## Package Entrypoints
12
12
 
13
13
  `package.json#exports` is the canonical package surface. Use `actual-css` for the
14
14
  full CSS framework and `actual-css/js` for the complete runtime. The composition
15
- guides in [README](README.md) and [JavaScript](docs/javascript.md) show supported
16
- CSS modules and individual enhancer imports without duplicating the full export
17
- list here.
15
+ guides in [README](README.md) and [Progressive Enhancements](docs/pages/enhancements/overview.md)
16
+ show supported CSS modules and individual enhancer imports without duplicating
17
+ the full export list here.
18
18
 
19
19
  In 0.2, presentation (`class`) and behavior (`data-enhance`) are separate layers.
20
20
  Behaviour primitives (`enhance`, `floating`, `surface`, `keys`, `menu`, `focus`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "actual-css",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Plain CSS component framework with semantic classes, universal variants, small tokens, theme hooks, and progressive enhancements.",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.14",
@@ -31,6 +31,7 @@
31
31
  "./css/layer": "./src/css/actual.layer.css",
32
32
  "./css/components": "./src/css/components/index.css",
33
33
  "./css/forms": "./src/css/forms/index.css",
34
+ "./css/optional": "./dist/optional.min.css",
34
35
  "./css/themes": null,
35
36
  "./css/themes/*": null,
36
37
  "./css/*": "./src/css/*.css",
@@ -38,13 +39,16 @@
38
39
  "./js/command": "./src/js/command.js",
39
40
  "./js/context-menu": "./src/js/context-menu.js",
40
41
  "./js/dialog": "./src/js/dialog.js",
41
- "./js/dialog-fallback": "./src/js/dialog-fallback.js",
42
+ "./js/dismiss": "./src/js/dismiss.js",
42
43
  "./js/enhance": "./src/js/enhance.js",
44
+ "./js/enhancement-loader": "./src/js/enhancement-loader.js",
45
+ "./js/parse-config": "./src/js/parse-config.js",
43
46
  "./js/events": "./src/js/events.js",
44
47
  "./js/filter": "./src/js/filter.js",
45
48
  "./js/floating": "./src/js/floating.js",
46
49
  "./js/flyout": "./src/js/flyout.js",
47
50
  "./js/focus": "./src/js/focus.js",
51
+ "./js/focus-group": "./src/js/focus-group.js",
48
52
  "./js/input": "./src/js/input.js",
49
53
  "./js/keys": "./src/js/keys.js",
50
54
  "./js/mask": "./src/js/mask.js",
@@ -66,10 +70,11 @@
66
70
  "sideEffects": true,
67
71
  "files": [
68
72
  "dist",
69
- "!dist/actual-themes.min.css",
70
- "!dist/actual-themes.min.css.map",
71
- "src/css",
72
- "!src/css/themes",
73
+ "src/css/*.css",
74
+ "src/css/components",
75
+ "src/css/forms",
76
+ "src/css/optional",
77
+ "src/css/themes",
73
78
  "src/js",
74
79
  "docs",
75
80
  "CHANGELOG.md",
@@ -78,13 +83,16 @@
78
83
  "README.md"
79
84
  ],
80
85
  "engines": {
81
- "bun": ">=1.0.0"
86
+ "bun": ">=1.3.14"
82
87
  },
83
88
  "scripts": {
84
89
  "lint": "biome check",
85
90
  "lint:fix": "biome check --write",
86
- "build:demo": "bun scripts/build-demo.js",
87
- "watch:demo": "bun scripts/build-demo.js --watch",
91
+ "build:docs": "bun scripts/build-docs.js",
92
+ "watch:docs": "bun scripts/build-docs.js --watch",
93
+ "check:docs": "bun scripts/check-docs.js",
94
+ "check:compat": "bun scripts/check-compat.js",
95
+ "check:css-api": "bun scripts/check-css-api.js",
88
96
  "build:dist": "bun scripts/build-dist.js",
89
97
  "build:js": "bun scripts/build-js.js",
90
98
  "build:size": "bun scripts/build-size.js",
@@ -94,14 +102,14 @@
94
102
  "check:templates": "bun scripts/check-templates.js",
95
103
  "shot:forced": "bun scripts/forced-colors-shot.js",
96
104
  "shot:page": "bun scripts/page-shot.js",
105
+ "probe": "bun scripts/probe.js",
97
106
  "check:sync": "bun scripts/check-sync.js",
98
107
  "test": "bun test",
99
- "build:all": "bun run build:demo && bun run build:dist && bun run check:enhance && bun run check:reserved && bun run check:sync && bun run check:links && bun run check:templates && bun run test && bun run build:js && bun run build:size",
108
+ "build:all": "bun run build:dist && bun run build:js && bun run build:docs && bun run check:docs && bun run check:compat && bun run check:css-api && bun run check:enhance && bun run check:reserved && bun run check:sync && bun run check:links && bun run check:templates && bun run test && bun run build:size",
100
109
  "prepublishOnly": "bun run build:all"
101
110
  },
102
111
  "devDependencies": {
103
112
  "@biomejs/biome": "^2.5",
104
- "happy-dom": "^20.11",
105
- "prismjs": "^1.30"
113
+ "happy-dom": "^20.11"
106
114
  }
107
115
  }
@@ -1,5 +1,4 @@
1
1
  @import "./reset.css";
2
- @import "./dialog-fallback.css";
3
2
  @import "./tokens.css";
4
3
  @import "./theme.css";
5
4
  @import "./base.css";
@@ -15,3 +14,15 @@
15
14
  @import "./components/join.css";
16
15
  @import "./focus.css";
17
16
  @import "./print.css";
17
+
18
+ /*
19
+ * NOTE: The 'optional/' directory contains layout and utility extensions
20
+ * (such as optional grids, split, visual effects, and extra utility classes
21
+ * like .gap-sm, .flex-nowrap, .shadow-sm, etc.). These are intentionally not
22
+ * bundled here. Two entry points ship them:
23
+ *
24
+ * actual-css/css/optional/index optional layer only
25
+ * actual-css/css/actual.full core + optional
26
+ *
27
+ * Import one of these paths in your project when you need them.
28
+ */
package/src/css/base.css CHANGED
@@ -17,10 +17,8 @@ a {
17
17
  text-underline-offset: 0.18em;
18
18
  }
19
19
 
20
- @media (hover: hover) {
21
- a:hover {
22
- text-decoration-thickness: 0.12em;
23
- }
20
+ a:hover {
21
+ text-decoration-thickness: 0.12em;
24
22
  }
25
23
 
26
24
  /* Global heading chrome: color (--heading or inherit), a tight line-height,
@@ -46,7 +44,7 @@ hgroup > * {
46
44
  hr {
47
45
  border: 0;
48
46
  border-block-start: var(--border-width) solid var(--border);
49
- margin-block: var(--space-6);
47
+ margin-block: var(--space-60);
50
48
  }
51
49
 
52
50
  code,
@@ -4,9 +4,14 @@
4
4
  * Keeps the clickable summary affordance aligned and usable without JavaScript
5
5
  * or demo styles. Decorative palettes and custom markers belong outside the
6
6
  * base component.
7
+ *
8
+ * Public hooks:
9
+ * --accordion-radius
10
+ * --accordion-marker-color
7
11
  */
8
12
  .accordion {
9
13
  --accordion-radius: var(--radius);
14
+ --accordion-marker-color: var(--text-muted);
10
15
 
11
16
  border: var(--border-width) solid var(--border);
12
17
  border-radius: var(--accordion-radius);
@@ -20,14 +25,18 @@
20
25
  .accordion summary {
21
26
  display: flex;
22
27
  align-items: center;
23
- gap: var(--space-3);
28
+ gap: var(--space-30);
24
29
  cursor: pointer;
25
30
  list-style: none;
26
- padding: var(--space-4);
31
+ padding: var(--space-40);
27
32
  color: var(--text);
28
33
  font-weight: var(--font-weight-bold);
29
34
  }
30
35
 
36
+ .accordion summary:hover {
37
+ color: var(--primary);
38
+ }
39
+
31
40
  .accordion summary::-webkit-details-marker {
32
41
  display: none;
33
42
  }
@@ -38,15 +47,9 @@
38
47
  margin-inline-start: auto;
39
48
  inline-size: 1rem;
40
49
  block-size: 1rem;
41
- background-color: var(--text-muted);
42
- -webkit-mask-image: var(--icon-chevron-mask);
43
- mask-image: var(--icon-chevron-mask);
44
- -webkit-mask-repeat: no-repeat;
45
- mask-repeat: no-repeat;
46
- -webkit-mask-size: contain;
47
- mask-size: contain;
48
- -webkit-mask-position: center;
49
- mask-position: center;
50
+ background-color: var(--accordion-marker-color);
51
+ -webkit-mask: var(--icon-chevron) center / contain no-repeat;
52
+ mask: var(--icon-chevron) center / contain no-repeat;
50
53
  transition: transform var(--duration);
51
54
  }
52
55
 
@@ -55,14 +58,14 @@
55
58
  }
56
59
 
57
60
  .accordion details > summary + * {
58
- padding-block: 0 var(--space-4);
59
- padding-inline: var(--space-4);
61
+ padding-block: 0 var(--space-40);
62
+ padding-inline: var(--space-40);
60
63
  color: var(--text-muted);
61
64
  margin-block: 0;
62
65
  }
63
66
 
64
67
  .accordion details[open] > summary + * {
65
- padding-block-start: var(--space-1);
68
+ padding-block-start: var(--space-10);
66
69
  }
67
70
 
68
71
  .accordion details > summary + * > :first-child {
@@ -77,21 +80,6 @@
77
80
 
78
81
  @media (forced-colors: active) {
79
82
  .accordion {
80
- border-color: ButtonText;
81
- background: Canvas;
82
- color: CanvasText;
83
- }
84
-
85
- .accordion > details + details {
86
- border-block-start-color: ButtonText;
87
- }
88
-
89
- .accordion summary {
90
- color: CanvasText;
91
- }
92
-
93
- .accordion summary::after {
94
- background-color: ButtonText;
95
- forced-color-adjust: none;
83
+ --accordion-marker-color: CanvasText;
96
84
  }
97
85
  }
@@ -3,9 +3,12 @@
3
3
  *
4
4
  * Composes with .btn (or any inline element) and feeds layout via the shared
5
5
  * --gap token.
6
+ *
7
+ * Internal:
8
+ * --gap (local value for the shared gap token)
6
9
  */
7
10
  .actions {
8
- --gap: var(--space-2);
11
+ --gap: var(--space-20);
9
12
 
10
13
  display: flex;
11
14
  flex-wrap: wrap;