actual-css 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/CHANGELOG.md +78 -3
  2. package/README.md +35 -30
  3. package/dist/actual.css +98 -4882
  4. package/dist/actual.full.css +7090 -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/cascade-layer.md +35 -13
  10. package/docs/design-notes/column-layout.md +677 -0
  11. package/docs/design-notes/forced-colors.md +3 -0
  12. package/docs/design-notes/grid.md +612 -0
  13. package/docs/design-notes/naming.md +15 -0
  14. package/docs/design-notes/widget-primitives.md +1 -0
  15. package/docs/navigation.json +5 -1
  16. package/docs/pages/components/alert.md +16 -14
  17. package/docs/pages/components/aura.md +1 -1
  18. package/docs/pages/components/avatar.md +6 -6
  19. package/docs/pages/components/badge.md +7 -7
  20. package/docs/pages/components/button.md +22 -17
  21. package/docs/pages/components/card.md +29 -13
  22. package/docs/pages/components/chat.md +8 -8
  23. package/docs/pages/components/dialog.md +7 -7
  24. package/docs/pages/components/drawer.md +3 -3
  25. package/docs/pages/components/fab.md +7 -7
  26. package/docs/pages/components/navbar.md +9 -8
  27. package/docs/pages/components/pagination.md +4 -3
  28. package/docs/pages/components/skeleton.md +4 -4
  29. package/docs/pages/components/spinner.md +5 -5
  30. package/docs/pages/components/table.md +30 -5
  31. package/docs/pages/enhancements/flyout.md +13 -13
  32. package/docs/pages/enhancements/overview.md +1 -1
  33. package/docs/pages/enhancements/scrollspy.md +6 -6
  34. package/docs/pages/enhancements/status-bar.md +5 -1
  35. package/docs/pages/enhancements/tabs.md +6 -6
  36. package/docs/pages/enhancements/tooltip.md +1 -1
  37. package/docs/pages/examples/overview.md +41 -22
  38. package/docs/pages/forms/choice-cards.md +11 -6
  39. package/docs/pages/forms/controls.md +1 -1
  40. package/docs/pages/forms/detached-actions.md +1 -1
  41. package/docs/pages/forms/floating-field.md +10 -5
  42. package/docs/pages/forms/form-actions.md +1 -1
  43. package/docs/pages/forms/input-policy.md +1 -1
  44. package/docs/pages/forms/joined-controls.md +4 -4
  45. package/docs/pages/forms/labels.md +6 -6
  46. package/docs/pages/forms/otp.md +1 -1
  47. package/docs/pages/forms/overview.md +19 -19
  48. package/docs/pages/forms/password.md +1 -1
  49. package/docs/pages/forms/range.md +1 -1
  50. package/docs/pages/forms/states-and-sizes.md +41 -45
  51. package/docs/pages/forms/sticky-actions.md +3 -3
  52. package/docs/pages/forms/switch.md +110 -2
  53. package/docs/pages/forms/validation.md +9 -9
  54. package/docs/pages/foundations/philosophy.md +1 -1
  55. package/docs/pages/foundations/theming.md +29 -7
  56. package/docs/pages/foundations/tokens.md +22 -10
  57. package/docs/pages/foundations/typography.md +50 -20
  58. package/docs/pages/guides/bootstrap.md +11 -11
  59. package/docs/pages/guides/integrating-actual-css.md +186 -0
  60. package/docs/pages/guides/introduction.md +23 -26
  61. package/docs/pages/guides/modular-import.md +173 -0
  62. package/docs/pages/guides/progressive-enhancement.md +81 -78
  63. package/docs/pages/guides/tailwind.md +6 -8
  64. package/docs/pages/layout/app-shell.md +1 -1
  65. package/docs/pages/layout/center.md +1 -1
  66. package/docs/pages/layout/choosing.md +39 -0
  67. package/docs/pages/layout/cluster.md +4 -2
  68. package/docs/pages/layout/column-layout.md +206 -0
  69. package/docs/pages/layout/frame.md +6 -1
  70. package/docs/pages/layout/grid.md +100 -102
  71. package/docs/pages/layout/list.md +1 -1
  72. package/docs/pages/layout/media.md +10 -3
  73. package/docs/pages/layout/overview.md +15 -2
  74. package/docs/pages/layout/scroll-snap.md +2 -2
  75. package/docs/pages/layout/scroll-target.md +45 -0
  76. package/docs/pages/layout/sidebar-layout.md +20 -19
  77. package/docs/pages/layout/stack.md +90 -1
  78. package/docs/pages/layout/switcher.md +10 -26
  79. package/docs/pages/layout/topbar.md +2 -2
  80. package/docs/pages/patterns/actions.md +1 -1
  81. package/docs/pages/patterns/code-block.md +1 -1
  82. package/docs/pages/patterns/exclusive-accordion.md +1 -1
  83. package/docs/pages/patterns/hierarchical-nav.md +1 -1
  84. package/docs/pages/patterns/icon-input.md +1 -1
  85. package/docs/pages/patterns/intent-nesting.md +1 -1
  86. package/docs/pages/patterns/navigation-list.md +1 -1
  87. package/docs/pages/patterns/overview.md +1 -1
  88. package/docs/pages/patterns/structured-lists.md +1 -1
  89. package/docs/pages/utilities/accessibility.md +3 -3
  90. package/docs/pages/utilities/flex.md +15 -15
  91. package/docs/pages/utilities/links.md +4 -4
  92. package/docs/pages/utilities/list.md +8 -7
  93. package/docs/pages/utilities/overflow.md +8 -8
  94. package/docs/pages/utilities/overview.md +1 -1
  95. package/docs/pages/utilities/shape.md +3 -3
  96. package/docs/pages/utilities/sizing-wrapping.md +23 -16
  97. package/docs/pages/utilities/spacing.md +20 -20
  98. package/docs/pages/utilities/text.md +10 -10
  99. package/llms.txt +46 -4
  100. package/package.json +43 -13
  101. package/scripts/reserved-classes.json +261 -0
  102. package/src/cli/actual-css.js +133 -0
  103. package/src/css/actual.css +1 -28
  104. package/src/css/actual.full.css +11 -2
  105. package/src/css/components/alert.css +33 -10
  106. package/src/css/components/badge.css +38 -19
  107. package/src/css/components/breadcrumb.css +1 -1
  108. package/src/css/components/button.css +35 -13
  109. package/src/css/components/card.css +37 -4
  110. package/src/css/components/drawer.css +27 -2
  111. package/src/css/components/flyout.css +5 -0
  112. package/src/css/components/index.css +32 -27
  113. package/src/css/components/join.css +8 -1
  114. package/src/css/components/key.css +2 -0
  115. package/src/css/components/menu.css +11 -1
  116. package/src/css/components/meter.css +4 -1
  117. package/src/css/components/modal.css +5 -0
  118. package/src/css/components/navbar.css +13 -5
  119. package/src/css/components/pagination.css +11 -0
  120. package/src/css/components/spinner.css +5 -0
  121. package/src/css/components/status-bar.css +5 -0
  122. package/src/css/components/surface.css +5 -0
  123. package/src/css/components/table.css +6 -0
  124. package/src/css/components/tooltip.css +5 -0
  125. package/src/css/core/index.css +9 -0
  126. package/src/css/core/print.css +18 -0
  127. package/src/css/{theme.css → core/theme.css} +20 -10
  128. package/src/css/{tokens.css → core/tokens.css} +15 -2
  129. package/src/css/{variants.css → core/variants.css} +27 -13
  130. package/src/css/effects/index.css +2 -0
  131. package/src/css/forms/base.css +8 -0
  132. package/src/css/forms/choice-card.css +5 -4
  133. package/src/css/forms/choice.css +49 -37
  134. package/src/css/forms/control.css +6 -1
  135. package/src/css/forms/custom-select.css +2 -0
  136. package/src/css/{optional → forms}/floating-field.css +25 -7
  137. package/src/css/forms/index.css +10 -13
  138. package/src/css/forms/native.css +15 -2
  139. package/src/css/{optional → forms}/otp.css +20 -16
  140. package/src/css/forms/switch.css +31 -29
  141. package/src/css/layout/app-shell.css +6 -0
  142. package/src/css/layout/center.css +13 -0
  143. package/src/css/layout/cluster.css +21 -0
  144. package/src/css/layout/column-layout.css +144 -0
  145. package/src/css/layout/container-query.css +13 -0
  146. package/src/css/layout/frame.css +19 -0
  147. package/src/css/layout/grid.css +141 -0
  148. package/src/css/layout/index.css +42 -0
  149. package/src/css/layout/measure.css +9 -0
  150. package/src/css/layout/media.css +10 -0
  151. package/src/css/layout/scroll-target.css +15 -0
  152. package/src/css/layout/scroller.css +41 -0
  153. package/src/css/layout/sidebar-layout.css +31 -0
  154. package/src/css/layout/stack.css +21 -0
  155. package/src/css/layout/switcher.css +23 -0
  156. package/src/css/{optional/layout-extra.css → layout/topbar.css} +0 -20
  157. package/src/css/typography/index.css +5 -0
  158. package/src/css/typography/lead.css +7 -0
  159. package/src/css/{components → typography}/overline.css +10 -4
  160. package/src/css/{prose.css → typography/prose.css} +53 -38
  161. package/src/css/{utilities.css → utilities/base.css} +2 -0
  162. package/src/css/utilities/index.css +3 -0
  163. package/src/js/escape.js +36 -0
  164. package/src/js/flyout.js +22 -12
  165. package/src/js/full.js +26 -0
  166. package/src/js/index.js +5 -21
  167. package/src/js/surface.js +4 -32
  168. package/src/js/tooltip.js +65 -24
  169. package/src/js/validation.js +1 -1
  170. package/src/tooling/css-bundle.js +308 -0
  171. package/dist/actual-themes.min.css +0 -1
  172. package/dist/optional.css +0 -1048
  173. package/dist/optional.min.css +0 -1
  174. package/docs/pages/guides/optional-components.md +0 -33
  175. package/src/css/grid.css +0 -96
  176. package/src/css/layout.css +0 -108
  177. package/src/css/optional/index.css +0 -10
  178. package/src/css/optional/scroller.css +0 -63
  179. package/src/css/print.css +0 -47
  180. package/src/css/themes/corporate.css +0 -60
  181. package/src/css/themes/cyberpunk.css +0 -60
  182. package/src/css/themes/dim.css +0 -33
  183. package/src/css/themes/edge.css +0 -117
  184. package/src/css/themes/forest.css +0 -65
  185. package/src/css/themes/gradient.css +0 -97
  186. package/src/css/themes/index.css +0 -43
  187. package/src/css/themes/indigo.css +0 -33
  188. package/src/css/themes/lavender.css +0 -66
  189. package/src/css/themes/mono.css +0 -60
  190. package/src/css/themes/neon.css +0 -66
  191. package/src/css/themes/ocean.css +0 -60
  192. package/src/css/themes/petrol.css +0 -64
  193. package/src/css/themes/spruce.css +0 -64
  194. package/src/css/themes/square.css +0 -65
  195. package/src/css/themes/sunset.css +0 -66
  196. /package/src/css/{optional → components}/chat.css +0 -0
  197. /package/src/css/{optional → components}/fab.css +0 -0
  198. /package/src/css/{base.css → core/base.css} +0 -0
  199. /package/src/css/{focus.css → core/focus.css} +0 -0
  200. /package/src/css/{intents.css → core/intents.css} +0 -0
  201. /package/src/css/{reset.css → core/reset.css} +0 -0
  202. /package/src/css/{optional → effects}/aura.css +0 -0
  203. /package/src/css/{optional → layout}/scroll-snap.css +0 -0
  204. /package/src/css/{optional/typography-fluid.css → typography/fluid.css} +0 -0
  205. /package/src/css/{optional/utilities-extra.css → utilities/extra.css} +0 -0
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "actual-css",
3
- "version": "0.3.0",
3
+ "version": "0.4.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
- "packageManager": "bun@1.3.14",
6
+ "packageManager": "bun@1.4.0",
7
7
  "license": "MIT",
8
8
  "author": "Thomas <thomas@lekoala.be>",
9
9
  "repository": {
@@ -27,19 +27,32 @@
27
27
  ],
28
28
  "exports": {
29
29
  ".": "./dist/actual.min.css",
30
+ "./full": "./dist/actual.full.min.css",
30
31
  "./css": "./src/css/actual.css",
31
- "./css/layer": "./src/css/actual.layer.css",
32
32
  "./css/components": "./src/css/components/index.css",
33
- "./css/forms": "./src/css/forms/index.css",
34
- "./css/optional": "./dist/optional.min.css",
33
+ "./css/components/*": "./src/css/components/*.css",
34
+ "./css/effects": "./src/css/effects/index.css",
35
+ "./css/effects/*": "./src/css/effects/*.css",
36
+ "./css/forms": "./src/css/forms/base.css",
37
+ "./css/forms/all": "./src/css/forms/index.css",
38
+ "./css/forms/*": "./src/css/forms/*.css",
39
+ "./css/full": "./src/css/actual.full.css",
40
+ "./css/layer": "./src/css/actual.layer.css",
41
+ "./css/layout": "./src/css/layout/index.css",
42
+ "./css/layout/*": "./src/css/layout/*.css",
35
43
  "./css/themes": null,
36
44
  "./css/themes/*": null,
37
- "./css/*": "./src/css/*.css",
45
+ "./css/typography": "./src/css/typography/index.css",
46
+ "./css/typography/*": "./src/css/typography/*.css",
47
+ "./css/utilities": "./src/css/utilities/index.css",
48
+ "./css/utilities/*": "./src/css/utilities/*.css",
38
49
  "./js": "./src/js/index.js",
50
+ "./js/full": "./src/js/full.js",
39
51
  "./js/command": "./src/js/command.js",
40
52
  "./js/context-menu": "./src/js/context-menu.js",
41
53
  "./js/dialog": "./src/js/dialog.js",
42
54
  "./js/dismiss": "./src/js/dismiss.js",
55
+ "./js/escape": "./src/js/escape.js",
43
56
  "./js/enhance": "./src/js/enhance.js",
44
57
  "./js/enhancement-loader": "./src/js/enhancement-loader.js",
45
58
  "./js/parse-config": "./src/js/parse-config.js",
@@ -61,8 +74,12 @@
61
74
  "./js/validation": "./src/js/validation.js",
62
75
  "./js/status": "./src/js/status.js",
63
76
  "./js/surface": "./src/js/surface.js",
77
+ "./reserved-classes.json": "./scripts/reserved-classes.json",
64
78
  "./package.json": "./package.json"
65
79
  },
80
+ "bin": {
81
+ "actual-css": "./src/cli/actual-css.js"
82
+ },
66
83
  "main": "./dist/actual.js",
67
84
  "style": "./dist/actual.min.css",
68
85
  "unpkg": "./dist/actual.min.css",
@@ -71,11 +88,17 @@
71
88
  "files": [
72
89
  "dist",
73
90
  "src/css/*.css",
74
- "src/css/components",
91
+ "src/css/core",
92
+ "src/css/layout",
93
+ "src/css/typography",
75
94
  "src/css/forms",
76
- "src/css/optional",
77
- "src/css/themes",
95
+ "src/css/components",
96
+ "src/css/effects",
97
+ "src/css/utilities",
98
+ "src/cli",
78
99
  "src/js",
100
+ "src/tooling",
101
+ "scripts/reserved-classes.json",
79
102
  "docs",
80
103
  "CHANGELOG.md",
81
104
  "llms.txt",
@@ -83,29 +106,36 @@
83
106
  "README.md"
84
107
  ],
85
108
  "engines": {
86
- "bun": ">=1.3.14"
109
+ "bun": ">=1.4.0",
110
+ "node": ">=18"
87
111
  },
88
112
  "scripts": {
89
113
  "lint": "biome check",
90
114
  "lint:fix": "biome check --write",
91
- "build:docs": "bun scripts/build-docs.js",
92
- "watch:docs": "bun scripts/build-docs.js --watch",
115
+ "build:docs": "bun run build:themes && bun scripts/build-docs.js",
116
+ "watch:docs": "bun run build:themes && bun scripts/build-docs.js --watch",
93
117
  "check:docs": "bun scripts/check-docs.js",
94
118
  "check:compat": "bun scripts/check-compat.js",
95
119
  "check:css-api": "bun scripts/check-css-api.js",
120
+ "check:color-space": "bun scripts/check-color-space.js",
121
+ "check:architecture": "bun scripts/check-css-architecture.js",
96
122
  "build:dist": "bun scripts/build-dist.js",
97
123
  "build:js": "bun scripts/build-js.js",
124
+ "build:themes": "bun scripts/build-themes.js",
98
125
  "build:size": "bun scripts/build-size.js",
99
126
  "check:enhance": "bun run scripts/check-enhance.js",
127
+ "generate:reserved": "bun scripts/generate-reserved-classes.js",
100
128
  "check:reserved": "bun scripts/check-reserved.js",
101
129
  "check:links": "bun scripts/check-doc-links.js",
102
130
  "check:templates": "bun scripts/check-templates.js",
103
131
  "shot:forced": "bun scripts/forced-colors-shot.js",
132
+ "shot:multi": "bun scripts/multi-shot.js",
104
133
  "shot:page": "bun scripts/page-shot.js",
105
134
  "probe": "bun scripts/probe.js",
106
135
  "check:sync": "bun scripts/check-sync.js",
107
136
  "test": "bun test",
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",
137
+ "test:changed": "bun test --changed=master",
138
+ "build:all": "bun run lint && 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:color-space && bun run check:architecture && bun run check:enhance && bun run generate:reserved && bun run check:reserved && bun run check:sync && bun run check:links && bun run check:templates && bun run test && bun run build:size",
109
139
  "prepublishOnly": "bun run build:all"
110
140
  },
111
141
  "devDependencies": {
@@ -0,0 +1,261 @@
1
+ [
2
+ "accordion",
3
+ "actions",
4
+ "admonition",
5
+ "alert",
6
+ "alert-body",
7
+ "alert-dismiss",
8
+ "alert-icon",
9
+ "alert-title",
10
+ "align-self-center",
11
+ "align-self-end",
12
+ "align-self-start",
13
+ "app-shell",
14
+ "aura",
15
+ "aura-glow",
16
+ "avatar",
17
+ "avatar-stack",
18
+ "background-raised",
19
+ "background-subtle",
20
+ "background-surface",
21
+ "badge",
22
+ "bleed",
23
+ "block-size-full",
24
+ "border-block-end",
25
+ "border-block-start",
26
+ "border-context",
27
+ "border-inline-end",
28
+ "border-inline-start",
29
+ "breadcrumb",
30
+ "btn",
31
+ "callout",
32
+ "card",
33
+ "center",
34
+ "chat",
35
+ "chat-avatar",
36
+ "chat-bubble",
37
+ "chat-end",
38
+ "chat-footer",
39
+ "chat-header",
40
+ "chat-start",
41
+ "check",
42
+ "choice",
43
+ "choice-card",
44
+ "circle",
45
+ "cluster",
46
+ "color",
47
+ "column-gap-context",
48
+ "column-layout",
49
+ "column-span-1",
50
+ "column-span-10",
51
+ "column-span-11",
52
+ "column-span-12",
53
+ "column-span-2",
54
+ "column-span-3",
55
+ "column-span-4",
56
+ "column-span-5",
57
+ "column-span-6",
58
+ "column-span-7",
59
+ "column-span-8",
60
+ "column-span-9",
61
+ "column-start-1",
62
+ "column-start-10",
63
+ "column-start-11",
64
+ "column-start-12",
65
+ "column-start-2",
66
+ "column-start-3",
67
+ "column-start-4",
68
+ "column-start-5",
69
+ "column-start-6",
70
+ "column-start-7",
71
+ "column-start-8",
72
+ "column-start-9",
73
+ "compact",
74
+ "container-query",
75
+ "cursor-pointer",
76
+ "danger",
77
+ "dialog-close",
78
+ "dialog-confirmation",
79
+ "dialog-icon",
80
+ "display-block",
81
+ "display-flex",
82
+ "display-grid",
83
+ "display-inline",
84
+ "display-inline-block",
85
+ "display-inline-flex",
86
+ "display-none",
87
+ "dot",
88
+ "drawer",
89
+ "drawer-close",
90
+ "fab",
91
+ "fab-action",
92
+ "fab-actions",
93
+ "fab-label",
94
+ "field",
95
+ "field-error",
96
+ "field-group",
97
+ "field-help",
98
+ "field-label",
99
+ "file",
100
+ "fit",
101
+ "flex-nowrap",
102
+ "flex-wrap",
103
+ "floating-field",
104
+ "flyout",
105
+ "flyout-trigger",
106
+ "font-weight-bold",
107
+ "font-weight-medium",
108
+ "font-weight-normal",
109
+ "font-weight-strong",
110
+ "form-actions",
111
+ "frame",
112
+ "gap-context",
113
+ "gap-lg",
114
+ "gap-md",
115
+ "gap-none",
116
+ "gap-sm",
117
+ "ghost",
118
+ "grid",
119
+ "grid-2",
120
+ "grid-3",
121
+ "grid-4",
122
+ "grid-6",
123
+ "grow",
124
+ "had-scrollbar",
125
+ "has-modal-open",
126
+ "icon-only",
127
+ "inline-size-full",
128
+ "input",
129
+ "input-icon",
130
+ "inverted",
131
+ "is-open",
132
+ "is-sheet",
133
+ "is-static",
134
+ "items-center",
135
+ "items-end",
136
+ "items-start",
137
+ "join",
138
+ "join-addon",
139
+ "justify-content-center",
140
+ "justify-content-end",
141
+ "justify-content-space-between",
142
+ "justify-content-start",
143
+ "key",
144
+ "lead",
145
+ "lg",
146
+ "link",
147
+ "link-muted",
148
+ "link-plain",
149
+ "list-reset",
150
+ "margin-block-end-auto",
151
+ "margin-block-start-auto",
152
+ "margin-inline-auto",
153
+ "margin-inline-end-auto",
154
+ "margin-inline-start-auto",
155
+ "max-inline-size-none",
156
+ "mbe",
157
+ "mbs",
158
+ "measure",
159
+ "media",
160
+ "menu",
161
+ "menu-item",
162
+ "menu-item-end",
163
+ "menu-item-icon",
164
+ "menu-item-text",
165
+ "menu-label",
166
+ "menu-separator",
167
+ "meter",
168
+ "min-block-size-0",
169
+ "min-inline-size-0",
170
+ "modal",
171
+ "muted",
172
+ "native",
173
+ "nav-link",
174
+ "nav-list",
175
+ "navbar",
176
+ "navbar-brand",
177
+ "navbar-nav",
178
+ "needs-validation",
179
+ "neutral",
180
+ "otp",
181
+ "outline",
182
+ "overflow-auto",
183
+ "overflow-clip",
184
+ "overflow-hidden",
185
+ "overflow-x-auto",
186
+ "overflow-y-auto",
187
+ "overline",
188
+ "padding-context",
189
+ "pagination",
190
+ "pill",
191
+ "pointer-events-none",
192
+ "position-absolute",
193
+ "position-fixed",
194
+ "position-relative",
195
+ "position-sticky",
196
+ "primary",
197
+ "progress",
198
+ "prose",
199
+ "px",
200
+ "py",
201
+ "radio",
202
+ "radius-context",
203
+ "radius-lg-context",
204
+ "radius-sm-context",
205
+ "raised",
206
+ "range",
207
+ "required-mark",
208
+ "row-gap-context",
209
+ "scroll-snap",
210
+ "scroll-target",
211
+ "scrollable",
212
+ "scroller",
213
+ "scrollspy",
214
+ "secondary",
215
+ "select",
216
+ "shadow-context",
217
+ "shadow-popout-context",
218
+ "sidebar-layout",
219
+ "skeleton",
220
+ "sm",
221
+ "soft",
222
+ "solid",
223
+ "spinner",
224
+ "sr-only",
225
+ "stable-gutter",
226
+ "stack",
227
+ "status-bar",
228
+ "sticky",
229
+ "stretch",
230
+ "subtle",
231
+ "success",
232
+ "surface-backdrop",
233
+ "switch",
234
+ "switcher",
235
+ "tab",
236
+ "table",
237
+ "table-wrap",
238
+ "tabs",
239
+ "text-balance",
240
+ "text-break",
241
+ "text-capitalize",
242
+ "text-center",
243
+ "text-display",
244
+ "text-end",
245
+ "text-lead",
246
+ "text-lowercase",
247
+ "text-nowrap",
248
+ "text-pretty",
249
+ "text-start",
250
+ "text-title",
251
+ "text-uppercase",
252
+ "textarea",
253
+ "tooltip",
254
+ "topbar",
255
+ "truncate",
256
+ "user-select-none",
257
+ "visibility-hidden",
258
+ "warning",
259
+ "was-validated",
260
+ "white-space-normal"
261
+ ]
@@ -0,0 +1,133 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
4
+ import { dirname, resolve } from "node:path";
5
+ import { inlineImports, minifyCss } from "../tooling/css-bundle.js";
6
+
7
+ function usage() {
8
+ return [
9
+ "actual-css bundle INPUT --out FILE [--minify]",
10
+ "",
11
+ " -o, --out FILE write the bundle to FILE (required)",
12
+ " --minify collapse comments and whitespace",
13
+ " -h, --help show this message",
14
+ " --version print the actual-css version",
15
+ "",
16
+ "Bundle plain CSS @import chains from relative files and actual-css/css/* subpaths.",
17
+ "A layer or layer(name) import is flattened into the @layer block it stands for.",
18
+ "Remote imports are kept and hoisted to the top of the bundle.",
19
+ "Leaves modern CSS syntax untouched; this is a bundler, not a transpiler.",
20
+ ].join("\n");
21
+ }
22
+
23
+ async function version() {
24
+ const pkg = await readFile(new URL("../../package.json", import.meta.url), "utf8");
25
+ return JSON.parse(pkg).version;
26
+ }
27
+
28
+ function parseArgs(argv) {
29
+ const [command, ...rest] = argv;
30
+
31
+ if (!command || command === "--help" || command === "-h") {
32
+ return { help: true };
33
+ }
34
+
35
+ if (command === "--version" || command === "-v") {
36
+ return { version: true };
37
+ }
38
+
39
+ if (command !== "bundle") {
40
+ throw new Error(`Unknown command: ${command}`);
41
+ }
42
+
43
+ let input = "";
44
+ let out = "";
45
+ let minify = false;
46
+
47
+ for (let i = 0; i < rest.length; i += 1) {
48
+ const arg = rest[i];
49
+
50
+ if (arg === "--help" || arg === "-h") {
51
+ return { help: true };
52
+ }
53
+
54
+ if (arg === "--minify") {
55
+ minify = true;
56
+ continue;
57
+ }
58
+
59
+ if (arg === "--out" || arg === "-o") {
60
+ const value = rest[i + 1];
61
+
62
+ if (!value) {
63
+ throw new Error("Missing value for --out.");
64
+ }
65
+
66
+ out = value;
67
+ i += 1;
68
+ continue;
69
+ }
70
+
71
+ if (arg.startsWith("-")) {
72
+ throw new Error(`Unknown option: ${arg}`);
73
+ }
74
+
75
+ if (input) {
76
+ throw new Error(`Unexpected extra argument: ${arg}`);
77
+ }
78
+
79
+ input = arg;
80
+ }
81
+
82
+ if (!input) {
83
+ throw new Error("Missing input file.");
84
+ }
85
+
86
+ if (!out) {
87
+ throw new Error("Missing required --out FILE option.");
88
+ }
89
+
90
+ return { help: false, input, out, minify };
91
+ }
92
+
93
+ async function bundle({ input, out, minify }) {
94
+ const inputPath = resolve(input);
95
+ const outputPath = resolve(out);
96
+ const css = await inlineImports(inputPath);
97
+ const code = minify ? minifyCss(css) : css;
98
+
99
+ await mkdir(dirname(outputPath), { recursive: true });
100
+ await writeFile(outputPath, code);
101
+
102
+ console.log(`Bundled ${inputPath} -> ${outputPath}${minify ? " (minified)" : ""}`);
103
+ }
104
+
105
+ async function main() {
106
+ let args;
107
+
108
+ try {
109
+ args = parseArgs(process.argv.slice(2));
110
+ } catch (error) {
111
+ console.error(error.message);
112
+ console.error("");
113
+ console.error(usage());
114
+ process.exit(1);
115
+ }
116
+
117
+ if (args.help) {
118
+ console.log(usage());
119
+ return;
120
+ }
121
+
122
+ if (args.version) {
123
+ console.log(await version());
124
+ return;
125
+ }
126
+
127
+ await bundle(args);
128
+ }
129
+
130
+ main().catch((error) => {
131
+ console.error(error.message);
132
+ process.exit(1);
133
+ });
@@ -1,28 +1 @@
1
- @import "./reset.css";
2
- @import "./tokens.css";
3
- @import "./theme.css";
4
- @import "./base.css";
5
- @import "./intents.css";
6
- @import "./layout.css";
7
- @import "./grid.css";
8
- @import "./variants.css";
9
- @import "./prose.css";
10
- @import "./components/index.css";
11
- @import "./forms/index.css";
12
- @import "./utilities.css";
13
- /* Joined controls are a component, but must load after the controls it groups. */
14
- @import "./components/join.css";
15
- @import "./focus.css";
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
- */
1
+ @import "./core/index.css";
@@ -1,2 +1,11 @@
1
- @import "actual.css";
2
- @import "optional/index.css";
1
+ /* Core, then every shipped functional family in cascade order. Typography
2
+ precedes Layout because direct-child layout resets intentionally win over
3
+ equal-specificity prose flow margins. Forms precede Components because of
4
+ join. Do not alphabetize these top-level imports. */
5
+ @import "./actual.css";
6
+ @import "./typography/index.css";
7
+ @import "./layout/index.css";
8
+ @import "./forms/index.css";
9
+ @import "./components/index.css";
10
+ @import "./effects/index.css";
11
+ @import "./utilities/index.css";
@@ -15,8 +15,13 @@
15
15
  * --alert-radius
16
16
  * --alert-icon-size
17
17
  * --alert-dismiss-size
18
+ * --alert-border-inline-start-color
19
+ * --alert-border-inline-start-width
18
20
  *
19
21
  * Internal:
22
+ * --alert-default-bg
23
+ * --alert-default-fg
24
+ * --alert-default-border
20
25
  * --alert-bg
21
26
  * --alert-fg
22
27
  * --alert-border
@@ -37,9 +42,12 @@
37
42
  --alert-pad-inline: var(--space-40);
38
43
  --alert-font-size: var(--font-size-md);
39
44
  --alert-icon-size: 1.25rem;
40
- --alert-bg: var(--ui-bg, var(--surface-subtle));
41
- --alert-fg: var(--ui-fg, var(--intent, var(--text)));
42
- --alert-border: var(--ui-border, var(--border));
45
+ --alert-default-bg: var(--surface-subtle);
46
+ --alert-default-fg: var(--intent, var(--text));
47
+ --alert-default-border: var(--border);
48
+ --alert-bg: var(--ui-bg, var(--alert-default-bg));
49
+ --alert-fg: var(--ui-fg, var(--alert-default-fg));
50
+ --alert-border: var(--ui-border, var(--alert-default-border));
43
51
 
44
52
  padding-block: var(--alert-pad-block);
45
53
  padding-inline: var(--alert-pad-inline);
@@ -64,17 +72,26 @@
64
72
  margin-block-end: 0;
65
73
  }
66
74
 
67
- /* Alerts are soft by default. .solid and .outline need no local rules — the
68
- shared variant plumbing in variants.css sets --ui-* that alert consumes. */
75
+ /* Alerts are soft by default. The recipe writes local defaults rather than
76
+ --ui-* so an explicit shared treatment always wins without exclusions. */
69
77
  @supports (color: color-mix(in oklch, red, white)) {
70
- .alert:where(:not(.solid, .outline, .callout)) {
78
+ .alert {
71
79
  /* @sync soft-recipe */
72
- --ui-bg: color-mix(in oklch, var(--surface) var(--soft-bg-mix), var(--intent, var(--neutral)));
73
- --ui-border: color-mix(
74
- in oklch,
80
+ --alert-default-bg: color-mix(
81
+ in oklab,
82
+ var(--surface) var(--soft-bg-mix),
83
+ var(--intent, var(--neutral))
84
+ );
85
+ --alert-default-border: color-mix(
86
+ in oklab,
75
87
  var(--surface) var(--soft-border-mix),
76
88
  var(--intent, var(--neutral))
77
89
  );
90
+ --alert-default-fg: color-mix(
91
+ in oklab,
92
+ var(--text),
93
+ var(--intent, var(--text)) var(--soft-fg-mix)
94
+ );
78
95
  /* @sync soft-recipe */
79
96
  }
80
97
  }
@@ -220,7 +237,7 @@
220
237
  @supports (color: color-mix(in oklch, red, white)) {
221
238
  .alert.admonition > .alert-title {
222
239
  background: color-mix(
223
- in oklch,
240
+ in oklab,
224
241
  var(--surface) var(--soft-bg-mix),
225
242
  var(--intent, var(--neutral))
226
243
  );
@@ -248,3 +265,9 @@
248
265
  .alert.admonition > .alert-body > :last-child {
249
266
  margin-block-end: 0;
250
267
  }
268
+ @media print {
269
+ .alert {
270
+ border: var(--border-width) solid CanvasText;
271
+ break-inside: avoid;
272
+ }
273
+ }