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.
- package/CHANGELOG.md +109 -3
- package/README.md +35 -30
- package/dist/actual.css +66 -4958
- package/dist/actual.full.css +7548 -0
- package/dist/actual.full.js +1 -0
- package/dist/actual.full.min.css +1 -0
- package/dist/actual.js +1 -1
- package/dist/actual.min.css +1 -1
- package/docs/design-notes/app-ui.md +33 -0
- package/docs/design-notes/cascade-layer.md +34 -13
- package/docs/design-notes/column-layout.md +677 -0
- package/docs/design-notes/enhancement-contract.md +25 -0
- package/docs/design-notes/forced-colors.md +3 -0
- package/docs/design-notes/grid.md +785 -0
- package/docs/design-notes/naming.md +15 -0
- package/docs/design-notes/references.md +1 -1
- package/docs/design-notes/widget-primitives.md +1 -0
- package/docs/navigation.json +12 -2
- package/docs/pages/components/alert.md +21 -14
- package/docs/pages/components/app-navigation.md +34 -0
- package/docs/pages/components/aura.md +1 -1
- package/docs/pages/components/avatar.md +16 -6
- package/docs/pages/components/badge.md +9 -7
- package/docs/pages/components/button.md +46 -16
- package/docs/pages/components/card.md +17 -9
- package/docs/pages/components/chat.md +8 -8
- package/docs/pages/components/dialog.md +7 -7
- package/docs/pages/components/drawer.md +3 -3
- package/docs/pages/components/fab.md +9 -7
- package/docs/pages/components/indicator.md +52 -0
- package/docs/pages/components/list.md +62 -0
- package/docs/pages/components/navbar.md +15 -8
- package/docs/pages/components/pagination.md +4 -3
- package/docs/pages/components/rating.md +68 -0
- package/docs/pages/components/skeleton.md +4 -4
- package/docs/pages/components/spinner.md +5 -5
- package/docs/pages/components/steps.md +57 -0
- package/docs/pages/components/table.md +30 -5
- package/docs/pages/enhancements/flyout.md +15 -15
- package/docs/pages/enhancements/overview.md +1 -1
- package/docs/pages/enhancements/scrollspy.md +6 -6
- package/docs/pages/enhancements/status-bar.md +5 -1
- package/docs/pages/enhancements/tabs.md +7 -8
- package/docs/pages/enhancements/tooltip.md +1 -1
- package/docs/pages/examples/overview.md +47 -22
- package/docs/pages/forms/choice-cards.md +11 -6
- package/docs/pages/forms/controls.md +1 -1
- package/docs/pages/forms/detached-actions.md +1 -1
- package/docs/pages/forms/floating-field.md +10 -5
- package/docs/pages/forms/form-actions.md +1 -1
- package/docs/pages/forms/input-policy.md +1 -1
- package/docs/pages/forms/joined-controls.md +4 -4
- package/docs/pages/forms/labels.md +6 -6
- package/docs/pages/forms/otp.md +33 -1
- package/docs/pages/forms/overview.md +19 -19
- package/docs/pages/forms/password.md +1 -1
- package/docs/pages/forms/range.md +1 -1
- package/docs/pages/forms/states-and-sizes.md +44 -48
- package/docs/pages/forms/sticky-actions.md +3 -3
- package/docs/pages/forms/switch.md +110 -2
- package/docs/pages/forms/validation.md +9 -9
- package/docs/pages/foundations/philosophy.md +1 -1
- package/docs/pages/foundations/theming.md +17 -2
- package/docs/pages/foundations/tokens.md +22 -10
- package/docs/pages/foundations/typography.md +50 -20
- package/docs/pages/guides/bootstrap.md +11 -11
- package/docs/pages/guides/integrating-actual-css.md +192 -0
- package/docs/pages/guides/introduction.md +23 -26
- package/docs/pages/guides/modular-import.md +173 -0
- package/docs/pages/guides/progressive-enhancement.md +81 -78
- package/docs/pages/guides/tailwind.md +6 -8
- package/docs/pages/layout/app-layout.md +57 -0
- package/docs/pages/layout/app-shell.md +28 -7
- package/docs/pages/layout/center.md +12 -1
- package/docs/pages/layout/choosing.md +54 -0
- package/docs/pages/layout/column-layout.md +206 -0
- package/docs/pages/layout/frame.md +6 -1
- package/docs/pages/layout/grid.md +133 -102
- package/docs/pages/layout/media.md +1 -1
- package/docs/pages/layout/overview.md +15 -2
- package/docs/pages/layout/scroll-snap.md +2 -2
- package/docs/pages/layout/scroll-target.md +45 -0
- package/docs/pages/layout/sidebar-layout.md +38 -18
- package/docs/pages/layout/stack.md +70 -1
- package/docs/pages/layout/switcher.md +10 -26
- package/docs/pages/layout/topbar.md +2 -2
- package/docs/pages/patterns/actions.md +1 -1
- package/docs/pages/patterns/code-block.md +1 -1
- package/docs/pages/patterns/exclusive-accordion.md +1 -1
- package/docs/pages/patterns/hierarchical-nav.md +1 -1
- package/docs/pages/patterns/icon-input.md +1 -1
- package/docs/pages/patterns/icon-slot.md +61 -0
- package/docs/pages/patterns/intent-nesting.md +1 -1
- package/docs/pages/patterns/navigation-list.md +1 -1
- package/docs/pages/patterns/overview.md +1 -1
- package/docs/pages/patterns/structured-lists.md +38 -40
- package/docs/pages/utilities/accessibility.md +3 -3
- package/docs/pages/utilities/flex.md +15 -15
- package/docs/pages/utilities/links.md +4 -4
- package/docs/pages/utilities/list.md +8 -8
- package/docs/pages/utilities/overflow.md +8 -8
- package/docs/pages/utilities/overview.md +1 -1
- package/docs/pages/utilities/shape.md +3 -3
- package/docs/pages/utilities/sizing-wrapping.md +23 -16
- package/docs/pages/utilities/spacing.md +20 -20
- package/docs/pages/utilities/text.md +10 -10
- package/llms.txt +46 -4
- package/package.json +43 -13
- package/scripts/reserved-classes.json +278 -0
- package/src/cli/actual-css.js +133 -0
- package/src/css/actual.css +1 -31
- package/src/css/actual.full.css +11 -2
- package/src/css/components/alert.css +17 -4
- package/src/css/components/app-nav.css +76 -0
- package/src/css/components/avatar.css +4 -0
- package/src/css/components/badge.css +19 -19
- package/src/css/components/breadcrumb.css +1 -1
- package/src/css/components/button.css +20 -32
- package/src/css/components/card.css +34 -9
- package/src/css/{optional → components}/chat.css +0 -6
- package/src/css/components/drawer.css +24 -5
- package/src/css/{optional → components}/fab.css +1 -7
- package/src/css/components/flyout.css +5 -0
- package/src/css/components/index.css +37 -27
- package/src/css/components/indicator.css +47 -0
- package/src/css/components/join.css +8 -1
- package/src/css/components/key.css +2 -0
- package/src/css/components/list.css +83 -0
- package/src/css/components/menu.css +11 -8
- package/src/css/components/meter.css +4 -1
- package/src/css/components/modal.css +5 -17
- package/src/css/components/navbar.css +6 -15
- package/src/css/components/pagination.css +11 -0
- package/src/css/components/rating.css +101 -0
- package/src/css/components/spinner.css +5 -0
- package/src/css/components/status-bar.css +5 -0
- package/src/css/components/steps.css +122 -0
- package/src/css/components/surface.css +5 -0
- package/src/css/components/tab.css +20 -22
- package/src/css/components/table.css +6 -0
- package/src/css/components/tooltip.css +3 -7
- package/src/css/{focus.css → core/focus.css} +0 -8
- package/src/css/core/index.css +9 -0
- package/src/css/core/print.css +18 -0
- package/src/css/{theme.css → core/theme.css} +19 -19
- package/src/css/{tokens.css → core/tokens.css} +16 -4
- package/src/css/{variants.css → core/variants.css} +3 -2
- package/src/css/{optional → effects}/aura.css +1 -10
- package/src/css/effects/index.css +2 -0
- package/src/css/forms/base.css +8 -0
- package/src/css/forms/choice-card.css +7 -15
- package/src/css/forms/choice.css +49 -37
- package/src/css/forms/control.css +4 -1
- package/src/css/forms/custom-select.css +2 -0
- package/src/css/{optional → forms}/floating-field.css +25 -7
- package/src/css/forms/index.css +10 -13
- package/src/css/forms/native.css +15 -2
- package/src/css/{optional → forms}/otp.css +25 -16
- package/src/css/forms/range.css +14 -4
- package/src/css/forms/switch.css +31 -29
- package/src/css/layout/app-layout.css +102 -0
- package/src/css/layout/app-shell.css +6 -0
- package/src/css/layout/center.css +14 -0
- package/src/css/layout/cluster.css +21 -0
- package/src/css/layout/column-layout.css +144 -0
- package/src/css/layout/container-query.css +15 -0
- package/src/css/layout/frame.css +19 -0
- package/src/css/layout/grid.css +155 -0
- package/src/css/layout/index.css +44 -0
- package/src/css/layout/measure.css +9 -0
- package/src/css/layout/media.css +10 -0
- package/src/css/layout/scroll-target.css +15 -0
- package/src/css/layout/scroller.css +41 -0
- package/src/css/layout/sidebar-layout.css +52 -0
- package/src/css/layout/stack.css +21 -0
- package/src/css/layout/switcher.css +23 -0
- package/src/css/{optional/layout-extra.css → layout/topbar.css} +0 -20
- package/src/css/typography/index.css +5 -0
- package/src/css/typography/lead.css +7 -0
- package/src/css/{components → typography}/overline.css +2 -2
- package/src/css/{prose.css → typography/prose.css} +57 -38
- package/src/css/{utilities.css → utilities/base.css} +2 -0
- package/src/css/utilities/index.css +3 -0
- package/src/js/escape.js +36 -0
- package/src/js/flyout.js +22 -12
- package/src/js/full.js +26 -0
- package/src/js/index.js +5 -21
- package/src/js/surface.js +1 -31
- package/src/js/tooltip.js +48 -19
- package/src/js/validation.js +1 -1
- package/src/tooling/css-bundle.js +308 -0
- package/dist/actual-themes.min.css +0 -1
- package/dist/optional.css +0 -1048
- package/dist/optional.min.css +0 -1
- package/docs/pages/guides/optional-components.md +0 -33
- package/docs/pages/layout/list.md +0 -41
- package/src/css/grid.css +0 -109
- package/src/css/layout.css +0 -123
- package/src/css/optional/index.css +0 -10
- package/src/css/optional/scroller.css +0 -63
- package/src/css/print.css +0 -47
- package/src/css/themes/corporate.css +0 -60
- package/src/css/themes/cyberpunk.css +0 -60
- package/src/css/themes/dim.css +0 -33
- package/src/css/themes/edge.css +0 -117
- package/src/css/themes/forest.css +0 -65
- package/src/css/themes/gradient.css +0 -97
- package/src/css/themes/index.css +0 -47
- package/src/css/themes/indigo.css +0 -33
- package/src/css/themes/lavender.css +0 -66
- package/src/css/themes/mono.css +0 -60
- package/src/css/themes/neon.css +0 -66
- package/src/css/themes/ocean.css +0 -60
- package/src/css/themes/petrol.css +0 -64
- package/src/css/themes/spruce.css +0 -64
- package/src/css/themes/square.css +0 -65
- package/src/css/themes/sunset.css +0 -66
- /package/src/css/{base.css → core/base.css} +0 -0
- /package/src/css/{intents.css → core/intents.css} +0 -0
- /package/src/css/{reset.css → core/reset.css} +0 -0
- /package/src/css/{optional → layout}/scroll-snap.css +0 -0
- /package/src/css/{optional/typography-fluid.css → typography/fluid.css} +0 -0
- /package/src/css/{optional/utilities-extra.css → utilities/extra.css} +0 -0
|
@@ -4,25 +4,25 @@ Semantic step helpers for gap, padding, and margin — the most common inline-st
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.gap-none`
|
|
10
|
-
| `.py`
|
|
11
|
-
| `.px`
|
|
12
|
-
| `.mbs`
|
|
13
|
-
| `.mbe`
|
|
14
|
-
| `.gap-sm`
|
|
15
|
-
| `.gap-md`
|
|
16
|
-
| `.gap-lg`
|
|
17
|
-
| `.padding-context`
|
|
18
|
-
| `.gap-context`
|
|
19
|
-
| `.row-gap-context`
|
|
20
|
-
| `.column-gap-context`
|
|
21
|
-
| `.margin-inline-auto`
|
|
22
|
-
| `.margin-inline-start-auto` | Utility | Pushes a block toward the inline end. Optional layer.
|
|
23
|
-
| `.margin-inline-end-auto`
|
|
24
|
-
| `.margin-block-start-auto`
|
|
25
|
-
| `.margin-block-end-auto`
|
|
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
26
|
|
|
27
27
|
Spacing helpers follow the density context. The default step is
|
|
28
28
|
`--space-40` (1rem); the `.sm` context tightens it to `--space-20` (0.5rem)
|
|
@@ -76,4 +76,4 @@ No `mbs-none` / `mbe-none` — use `margin: 0` via `.list-reset` for lists, or a
|
|
|
76
76
|
## CSS hooks
|
|
77
77
|
|
|
78
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.
|
|
79
|
+
- `--gap` — base gap of layout primitives; read by the optional `.gap-context`, `.row-gap-context`, and `.column-gap-context` helpers.
|
|
@@ -4,15 +4,15 @@ Lightweight helpers for muted or secondary text without a full color scale.
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class
|
|
8
|
-
|
|
9
|
-
| `.muted`
|
|
10
|
-
| `.text-start`
|
|
11
|
-
| `.text-center`
|
|
12
|
-
| `.text-end`
|
|
13
|
-
| `.text-balance` | Utility | Balanced line wrapping (`text-wrap: balance`).
|
|
14
|
-
| `.text-pretty`
|
|
15
|
-
| `.lead`
|
|
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
16
|
|
|
17
17
|
## Muted
|
|
18
18
|
|
|
@@ -40,4 +40,4 @@ Use `.text-start`, `.text-center`, or `.text-end` when a component or layout pri
|
|
|
40
40
|
|
|
41
41
|
## Lead
|
|
42
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/
|
|
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/typography/fluid.css`.
|
package/llms.txt
CHANGED
|
@@ -10,14 +10,56 @@ Actual CSS uses a small public grammar: `.component [intent] [variant] [size] [m
|
|
|
10
10
|
|
|
11
11
|
## Package Entrypoints
|
|
12
12
|
|
|
13
|
-
`package.json#exports` is the canonical package surface.
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
`package.json#exports` is the canonical package surface.
|
|
14
|
+
|
|
15
|
+
- `actual-css` — the minimal core: tokens, theme contract, reset, base elements, and universal variants. Components and layout primitives are NOT included.
|
|
16
|
+
- `actual-css/full` — the complete framework: core plus every component, form, layout, typography, effect, and utility family.
|
|
17
|
+
- `actual-css/js` — the enhancement loader only; it discovers `data-enhance` markers and loads enhancers on demand.
|
|
18
|
+
- `actual-css/js/full` — the complete runtime with all built-in enhancers pre-registered.
|
|
19
|
+
- `actual-css/reserved-classes.json` — machine-readable list of every class name the framework can generate. Use it to validate class usage in HTML (an "unknown class" checker) instead of guessing names from other frameworks.
|
|
20
|
+
- Individual families and modules are importable separately (`actual-css/css/components`, `actual-css/css/layout/grid`, `actual-css/js/dialog`, …); see [README](README.md) and [Modular imports](docs/pages/guides/modular-import.md).
|
|
21
|
+
|
|
22
|
+
The composition guides in [README](README.md) and [Progressive Enhancements](docs/pages/enhancements/overview.md)
|
|
16
23
|
show supported CSS modules and individual enhancer imports without duplicating
|
|
17
24
|
the full export list here.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
Presentation (`class`) and behavior (`data-enhance`) are separate layers.
|
|
20
27
|
Behaviour primitives (`enhance`, `floating`, `surface`, `keys`, `menu`, `focus`,
|
|
21
28
|
`events`) are independently importable for building custom widgets.
|
|
22
29
|
See [enhancement contract](docs/design-notes/enhancement-contract.md) and
|
|
23
30
|
[widget primitives](docs/design-notes/widget-primitives.md).
|
|
31
|
+
|
|
32
|
+
## Choosing a layout primitive
|
|
33
|
+
|
|
34
|
+
Pick from the relationship between children, not the number of children in one mockup:
|
|
35
|
+
|
|
36
|
+
- Responsive collection of cards/items where an incomplete final row is acceptable → `.grid`
|
|
37
|
+
- Known structural density, at most N columns → `.grid-N`
|
|
38
|
+
- Peer regions that must switch together → `.switcher`
|
|
39
|
+
- Main content plus a secondary region (content + aside) → `.sidebar-layout`
|
|
40
|
+
- Fixed media followed by flexible content → `.media`
|
|
41
|
+
- Explicit region placement on a shared 12-column canvas → `.column-layout`
|
|
42
|
+
- Vertical flow → `.stack`; wrapping inline items → `.cluster`
|
|
43
|
+
|
|
44
|
+
Use `--grid-columns` on `.grid` for exact track templates that do not match a
|
|
45
|
+
built-in layout contract: arbitrary structural counts (seven calendar days),
|
|
46
|
+
asymmetric fractional tracks, or mixed intrinsic/flexible tracks. See
|
|
47
|
+
[Choosing a layout](docs/pages/layout/choosing.md).
|
|
48
|
+
|
|
49
|
+
`.status-bar` is transient feedback only; persistent metrics or application
|
|
50
|
+
state belong in normal content such as cards, badges and alerts.
|
|
51
|
+
|
|
52
|
+
## Before generating application CSS
|
|
53
|
+
|
|
54
|
+
Read [Building with Actual CSS](docs/pages/guides/integrating-actual-css.md)
|
|
55
|
+
before writing application styles.
|
|
56
|
+
|
|
57
|
+
1. Start with Actual's vocabulary: theme tokens, then layout primitives, then components, then their public hooks, then small utilities, then application CSS.
|
|
58
|
+
2. Choose layout primitives by relationship, not item count.
|
|
59
|
+
3. Prefer component/layout hooks over replacement rules (tune before replacing).
|
|
60
|
+
4. Search the class manifest before inventing generic utilities.
|
|
61
|
+
5. Keep literal palette colors inside the theme/token block; derive decorative colors from tokens.
|
|
62
|
+
6. Use application CSS for genuinely product-specific styling — brand marks, unusual geometry, bespoke animation.
|
|
63
|
+
|
|
64
|
+
The goal is no duplicated framework behavior and no palette literals outside the
|
|
65
|
+
token layer, not zero application CSS.
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "actual-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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.
|
|
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/
|
|
34
|
-
"./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
|
|
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/
|
|
91
|
+
"src/css/core",
|
|
92
|
+
"src/css/layout",
|
|
93
|
+
"src/css/typography",
|
|
75
94
|
"src/css/forms",
|
|
76
|
-
"src/css/
|
|
77
|
-
"src/css/
|
|
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,20 +106,26 @@
|
|
|
83
106
|
"README.md"
|
|
84
107
|
],
|
|
85
108
|
"engines": {
|
|
86
|
-
"bun": ">=1.
|
|
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",
|
|
118
|
+
"check:doc-classes": "bun scripts/check-doc-classes.js",
|
|
94
119
|
"check:compat": "bun scripts/check-compat.js",
|
|
95
120
|
"check:css-api": "bun scripts/check-css-api.js",
|
|
121
|
+
"check:color-space": "bun scripts/check-color-space.js",
|
|
122
|
+
"check:architecture": "bun scripts/check-css-architecture.js",
|
|
96
123
|
"build:dist": "bun scripts/build-dist.js",
|
|
97
124
|
"build:js": "bun scripts/build-js.js",
|
|
125
|
+
"build:themes": "bun scripts/build-themes.js",
|
|
98
126
|
"build:size": "bun scripts/build-size.js",
|
|
99
127
|
"check:enhance": "bun run scripts/check-enhance.js",
|
|
128
|
+
"generate:reserved": "bun scripts/generate-reserved-classes.js",
|
|
100
129
|
"check:reserved": "bun scripts/check-reserved.js",
|
|
101
130
|
"check:links": "bun scripts/check-doc-links.js",
|
|
102
131
|
"check:templates": "bun scripts/check-templates.js",
|
|
@@ -106,7 +135,8 @@
|
|
|
106
135
|
"probe": "bun scripts/probe.js",
|
|
107
136
|
"check:sync": "bun scripts/check-sync.js",
|
|
108
137
|
"test": "bun test",
|
|
109
|
-
"
|
|
138
|
+
"test:changed": "bun test --changed=master",
|
|
139
|
+
"build:all": "bun run lint && bun run build:dist && bun run build:js && bun run build:docs && bun run check:docs && bun run check:doc-classes && 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",
|
|
110
140
|
"prepublishOnly": "bun run build:all"
|
|
111
141
|
},
|
|
112
142
|
"devDependencies": {
|
|
@@ -0,0 +1,278 @@
|
|
|
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-layout",
|
|
14
|
+
"app-main",
|
|
15
|
+
"app-nav",
|
|
16
|
+
"app-shell",
|
|
17
|
+
"aura",
|
|
18
|
+
"aura-glow",
|
|
19
|
+
"avatar",
|
|
20
|
+
"avatar-stack",
|
|
21
|
+
"background-raised",
|
|
22
|
+
"background-subtle",
|
|
23
|
+
"background-surface",
|
|
24
|
+
"badge",
|
|
25
|
+
"bleed",
|
|
26
|
+
"block-size-full",
|
|
27
|
+
"border-block-end",
|
|
28
|
+
"border-block-start",
|
|
29
|
+
"border-context",
|
|
30
|
+
"border-inline-end",
|
|
31
|
+
"border-inline-start",
|
|
32
|
+
"bottom",
|
|
33
|
+
"breadcrumb",
|
|
34
|
+
"btn",
|
|
35
|
+
"callout",
|
|
36
|
+
"card",
|
|
37
|
+
"center",
|
|
38
|
+
"chat",
|
|
39
|
+
"chat-avatar",
|
|
40
|
+
"chat-bubble",
|
|
41
|
+
"chat-end",
|
|
42
|
+
"chat-footer",
|
|
43
|
+
"chat-header",
|
|
44
|
+
"chat-start",
|
|
45
|
+
"check",
|
|
46
|
+
"choice",
|
|
47
|
+
"choice-card",
|
|
48
|
+
"circle",
|
|
49
|
+
"cluster",
|
|
50
|
+
"color",
|
|
51
|
+
"column-gap-context",
|
|
52
|
+
"column-layout",
|
|
53
|
+
"column-span-1",
|
|
54
|
+
"column-span-10",
|
|
55
|
+
"column-span-11",
|
|
56
|
+
"column-span-12",
|
|
57
|
+
"column-span-2",
|
|
58
|
+
"column-span-3",
|
|
59
|
+
"column-span-4",
|
|
60
|
+
"column-span-5",
|
|
61
|
+
"column-span-6",
|
|
62
|
+
"column-span-7",
|
|
63
|
+
"column-span-8",
|
|
64
|
+
"column-span-9",
|
|
65
|
+
"column-start-1",
|
|
66
|
+
"column-start-10",
|
|
67
|
+
"column-start-11",
|
|
68
|
+
"column-start-12",
|
|
69
|
+
"column-start-2",
|
|
70
|
+
"column-start-3",
|
|
71
|
+
"column-start-4",
|
|
72
|
+
"column-start-5",
|
|
73
|
+
"column-start-6",
|
|
74
|
+
"column-start-7",
|
|
75
|
+
"column-start-8",
|
|
76
|
+
"column-start-9",
|
|
77
|
+
"compact",
|
|
78
|
+
"complete",
|
|
79
|
+
"container-query",
|
|
80
|
+
"cursor-pointer",
|
|
81
|
+
"danger",
|
|
82
|
+
"dialog-close",
|
|
83
|
+
"dialog-confirmation",
|
|
84
|
+
"dialog-icon",
|
|
85
|
+
"display-block",
|
|
86
|
+
"display-flex",
|
|
87
|
+
"display-grid",
|
|
88
|
+
"display-inline",
|
|
89
|
+
"display-inline-block",
|
|
90
|
+
"display-inline-flex",
|
|
91
|
+
"display-none",
|
|
92
|
+
"dot",
|
|
93
|
+
"drawer",
|
|
94
|
+
"drawer-close",
|
|
95
|
+
"fab",
|
|
96
|
+
"fab-action",
|
|
97
|
+
"fab-actions",
|
|
98
|
+
"fab-label",
|
|
99
|
+
"field",
|
|
100
|
+
"field-error",
|
|
101
|
+
"field-group",
|
|
102
|
+
"field-help",
|
|
103
|
+
"field-label",
|
|
104
|
+
"file",
|
|
105
|
+
"fit",
|
|
106
|
+
"flex-nowrap",
|
|
107
|
+
"flex-wrap",
|
|
108
|
+
"floating-field",
|
|
109
|
+
"flyout",
|
|
110
|
+
"flyout-trigger",
|
|
111
|
+
"font-weight-bold",
|
|
112
|
+
"font-weight-medium",
|
|
113
|
+
"font-weight-normal",
|
|
114
|
+
"font-weight-strong",
|
|
115
|
+
"form-actions",
|
|
116
|
+
"frame",
|
|
117
|
+
"gap-context",
|
|
118
|
+
"gap-lg",
|
|
119
|
+
"gap-md",
|
|
120
|
+
"gap-none",
|
|
121
|
+
"gap-sm",
|
|
122
|
+
"ghost",
|
|
123
|
+
"grid",
|
|
124
|
+
"grid-2",
|
|
125
|
+
"grid-3",
|
|
126
|
+
"grid-4",
|
|
127
|
+
"grid-6",
|
|
128
|
+
"grow",
|
|
129
|
+
"had-scrollbar",
|
|
130
|
+
"has-modal-open",
|
|
131
|
+
"icon-only",
|
|
132
|
+
"indicator",
|
|
133
|
+
"indicator-item",
|
|
134
|
+
"inline-size-full",
|
|
135
|
+
"input",
|
|
136
|
+
"input-icon",
|
|
137
|
+
"inverted",
|
|
138
|
+
"is-open",
|
|
139
|
+
"is-sheet",
|
|
140
|
+
"is-static",
|
|
141
|
+
"items-center",
|
|
142
|
+
"items-end",
|
|
143
|
+
"items-start",
|
|
144
|
+
"join",
|
|
145
|
+
"join-addon",
|
|
146
|
+
"justify-content-center",
|
|
147
|
+
"justify-content-end",
|
|
148
|
+
"justify-content-space-between",
|
|
149
|
+
"justify-content-start",
|
|
150
|
+
"key",
|
|
151
|
+
"lead",
|
|
152
|
+
"lg",
|
|
153
|
+
"link",
|
|
154
|
+
"link-muted",
|
|
155
|
+
"link-plain",
|
|
156
|
+
"list",
|
|
157
|
+
"list-item",
|
|
158
|
+
"list-item-content",
|
|
159
|
+
"list-item-text",
|
|
160
|
+
"list-item-title",
|
|
161
|
+
"list-item-trailing",
|
|
162
|
+
"list-reset",
|
|
163
|
+
"margin-block-end-auto",
|
|
164
|
+
"margin-block-start-auto",
|
|
165
|
+
"margin-inline-auto",
|
|
166
|
+
"margin-inline-end-auto",
|
|
167
|
+
"margin-inline-start-auto",
|
|
168
|
+
"max-inline-size-none",
|
|
169
|
+
"mbe",
|
|
170
|
+
"mbs",
|
|
171
|
+
"measure",
|
|
172
|
+
"media",
|
|
173
|
+
"menu",
|
|
174
|
+
"menu-item",
|
|
175
|
+
"menu-item-end",
|
|
176
|
+
"menu-item-icon",
|
|
177
|
+
"menu-item-text",
|
|
178
|
+
"menu-label",
|
|
179
|
+
"menu-separator",
|
|
180
|
+
"meter",
|
|
181
|
+
"min-block-size-0",
|
|
182
|
+
"min-inline-size-0",
|
|
183
|
+
"modal",
|
|
184
|
+
"muted",
|
|
185
|
+
"native",
|
|
186
|
+
"nav-link",
|
|
187
|
+
"nav-list",
|
|
188
|
+
"navbar",
|
|
189
|
+
"navbar-brand",
|
|
190
|
+
"navbar-nav",
|
|
191
|
+
"needs-validation",
|
|
192
|
+
"neutral",
|
|
193
|
+
"otp",
|
|
194
|
+
"outline",
|
|
195
|
+
"overflow-auto",
|
|
196
|
+
"overflow-clip",
|
|
197
|
+
"overflow-hidden",
|
|
198
|
+
"overflow-x-auto",
|
|
199
|
+
"overflow-y-auto",
|
|
200
|
+
"overline",
|
|
201
|
+
"padding-context",
|
|
202
|
+
"pagination",
|
|
203
|
+
"pill",
|
|
204
|
+
"pointer-events-none",
|
|
205
|
+
"position-absolute",
|
|
206
|
+
"position-fixed",
|
|
207
|
+
"position-relative",
|
|
208
|
+
"position-sticky",
|
|
209
|
+
"primary",
|
|
210
|
+
"progress",
|
|
211
|
+
"prose",
|
|
212
|
+
"px",
|
|
213
|
+
"py",
|
|
214
|
+
"radio",
|
|
215
|
+
"radius-context",
|
|
216
|
+
"radius-lg-context",
|
|
217
|
+
"radius-sm-context",
|
|
218
|
+
"raised",
|
|
219
|
+
"range",
|
|
220
|
+
"rating",
|
|
221
|
+
"required-mark",
|
|
222
|
+
"reverse",
|
|
223
|
+
"row-gap-context",
|
|
224
|
+
"scroll-snap",
|
|
225
|
+
"scroll-target",
|
|
226
|
+
"scrollable",
|
|
227
|
+
"scroller",
|
|
228
|
+
"scrollspy",
|
|
229
|
+
"secondary",
|
|
230
|
+
"select",
|
|
231
|
+
"shadow-context",
|
|
232
|
+
"shadow-popout-context",
|
|
233
|
+
"sidebar-layout",
|
|
234
|
+
"skeleton",
|
|
235
|
+
"sm",
|
|
236
|
+
"soft",
|
|
237
|
+
"solid",
|
|
238
|
+
"spinner",
|
|
239
|
+
"sr-only",
|
|
240
|
+
"stable-gutter",
|
|
241
|
+
"stack",
|
|
242
|
+
"start",
|
|
243
|
+
"status-bar",
|
|
244
|
+
"steps",
|
|
245
|
+
"sticky",
|
|
246
|
+
"stretch",
|
|
247
|
+
"subtle",
|
|
248
|
+
"success",
|
|
249
|
+
"surface-backdrop",
|
|
250
|
+
"switch",
|
|
251
|
+
"switcher",
|
|
252
|
+
"tab",
|
|
253
|
+
"table",
|
|
254
|
+
"table-wrap",
|
|
255
|
+
"tabs",
|
|
256
|
+
"text-balance",
|
|
257
|
+
"text-break",
|
|
258
|
+
"text-capitalize",
|
|
259
|
+
"text-center",
|
|
260
|
+
"text-display",
|
|
261
|
+
"text-end",
|
|
262
|
+
"text-lead",
|
|
263
|
+
"text-lowercase",
|
|
264
|
+
"text-nowrap",
|
|
265
|
+
"text-pretty",
|
|
266
|
+
"text-start",
|
|
267
|
+
"text-title",
|
|
268
|
+
"text-uppercase",
|
|
269
|
+
"textarea",
|
|
270
|
+
"tooltip",
|
|
271
|
+
"topbar",
|
|
272
|
+
"truncate",
|
|
273
|
+
"user-select-none",
|
|
274
|
+
"visibility-hidden",
|
|
275
|
+
"warning",
|
|
276
|
+
"was-validated",
|
|
277
|
+
"white-space-normal"
|
|
278
|
+
]
|
|
@@ -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
|
+
});
|