actual-css 0.9.0 → 0.9.2

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 (94) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +2 -1
  3. package/components.json +2 -0
  4. package/dist/actual.css +26 -6
  5. package/dist/actual.full.css +260 -74
  6. package/dist/actual.full.js +1 -1
  7. package/dist/actual.full.min.css +1 -1
  8. package/dist/actual.min.css +1 -1
  9. package/docs/pages/components/table.md +3 -2
  10. package/docs/pages/examples/overview.md +1 -0
  11. package/docs/pages/forms/input-policy.md +59 -0
  12. package/docs/pages/forms/validation.md +37 -1
  13. package/docs/pages/foundations/tokens.md +23 -4
  14. package/docs/pages/foundations/typography.md +10 -0
  15. package/docs/pages/guides/introduction.md +2 -1
  16. package/docs/pages/guides/progressive-enhancement.md +15 -10
  17. package/package.json +160 -159
  18. package/src/css/components/accordion.css +2 -0
  19. package/src/css/components/actions.css +2 -0
  20. package/src/css/components/alert.css +2 -0
  21. package/src/css/components/app-nav.css +2 -0
  22. package/src/css/components/avatar.css +2 -0
  23. package/src/css/components/badge.css +2 -0
  24. package/src/css/components/breadcrumb.css +2 -0
  25. package/src/css/components/busy.css +2 -0
  26. package/src/css/components/button.css +2 -0
  27. package/src/css/components/card.css +2 -0
  28. package/src/css/components/chat.css +2 -0
  29. package/src/css/components/data-list.css +2 -0
  30. package/src/css/components/drawer.css +35 -22
  31. package/src/css/components/fab.css +2 -0
  32. package/src/css/components/flyout.css +2 -0
  33. package/src/css/components/indicator.css +2 -0
  34. package/src/css/components/join.css +2 -0
  35. package/src/css/components/key.css +2 -0
  36. package/src/css/components/list.css +2 -0
  37. package/src/css/components/meter.css +2 -0
  38. package/src/css/components/modal.css +47 -40
  39. package/src/css/components/navbar.css +2 -0
  40. package/src/css/components/pagination.css +2 -0
  41. package/src/css/components/progress.css +2 -0
  42. package/src/css/components/rating.css +2 -0
  43. package/src/css/components/scrollspy.css +2 -0
  44. package/src/css/components/skeleton.css +2 -0
  45. package/src/css/components/spinner.css +2 -0
  46. package/src/css/components/status-bar.css +2 -0
  47. package/src/css/components/steps.css +2 -0
  48. package/src/css/components/tab.css +2 -0
  49. package/src/css/components/table.css +2 -0
  50. package/src/css/components/tooltip.css +2 -0
  51. package/src/css/core/base.css +2 -0
  52. package/src/css/core/print.css +3 -0
  53. package/src/css/core/tokens.css +2 -0
  54. package/src/css/core/variants.css +19 -6
  55. package/src/css/effects/aura.css +2 -0
  56. package/src/css/forms/choice-card.css +4 -0
  57. package/src/css/forms/control.css +2 -0
  58. package/src/css/forms/floating-field.css +5 -1
  59. package/src/css/forms/form-actions.css +2 -0
  60. package/src/css/forms/form.css +8 -0
  61. package/src/css/forms/input-icon.css +2 -0
  62. package/src/css/forms/native.css +2 -0
  63. package/src/css/forms/otp.css +10 -0
  64. package/src/css/forms/range.css +2 -0
  65. package/src/css/forms/select.css +2 -0
  66. package/src/css/forms/switch.css +2 -0
  67. package/src/css/forms/validation.css +2 -0
  68. package/src/css/layout/app-layout.css +2 -0
  69. package/src/css/layout/app-shell.css +5 -1
  70. package/src/css/layout/center.css +2 -0
  71. package/src/css/layout/cluster.css +2 -0
  72. package/src/css/layout/column-layout.css +2 -0
  73. package/src/css/layout/frame.css +2 -0
  74. package/src/css/layout/grid.css +2 -0
  75. package/src/css/layout/media.css +2 -1
  76. package/src/css/layout/scroll-snap.css +2 -0
  77. package/src/css/layout/scroll-target.css +2 -0
  78. package/src/css/layout/sidebar-layout.css +2 -0
  79. package/src/css/layout/stack.css +2 -1
  80. package/src/css/layout/switcher.css +2 -0
  81. package/src/css/layout/topbar.css +2 -0
  82. package/src/css/typography/fluid.css +2 -0
  83. package/src/css/typography/lead.css +2 -1
  84. package/src/css/typography/overline.css +2 -0
  85. package/src/css/typography/prose.css +2 -0
  86. package/src/css/utilities/base.css +6 -1
  87. package/src/js/context-menu.js +56 -15
  88. package/src/js/enhancement-loader.js +5 -1
  89. package/src/js/escape.js +11 -1
  90. package/src/js/flyout.js +6 -1
  91. package/src/js/focus.js +8 -3
  92. package/src/js/surface.js +28 -0
  93. package/src/js/tooltip.js +10 -4
  94. package/src/js/validation.js +31 -0
package/package.json CHANGED
@@ -1,159 +1,160 @@
1
- {
2
- "name": "actual-css",
3
- "version": "0.9.0",
4
- "description": "Plain CSS component framework with semantic classes, universal variants, small tokens, theme hooks, and progressive enhancements.",
5
- "type": "module",
6
- "packageManager": "bun@1.4.2",
7
- "license": "MIT",
8
- "author": "Thomas <thomas@lekoala.be>",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/lekoala/actual-css.git"
12
- },
13
- "homepage": "https://github.com/lekoala/actual-css",
14
- "bugs": {
15
- "url": "https://github.com/lekoala/actual-css/issues"
16
- },
17
- "keywords": [
18
- "css",
19
- "css-framework",
20
- "component-library",
21
- "semantic",
22
- "accessibility",
23
- "dark-mode",
24
- "themable",
25
- "no-build",
26
- "progressive-enhancement"
27
- ],
28
- "exports": {
29
- ".": "./dist/actual.min.css",
30
- "./full": "./dist/actual.full.min.css",
31
- "./css": "./src/css/actual.css",
32
- "./css/components": "./src/css/components/index.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",
43
- "./css/themes": null,
44
- "./css/themes/*": null,
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",
49
- "./js": "./src/js/index.js",
50
- "./js/full": "./src/js/full.js",
51
- "./js/command": "./src/js/command.js",
52
- "./js/context-menu": "./src/js/context-menu.js",
53
- "./js/dialog": "./src/js/dialog.js",
54
- "./js/dismiss": "./src/js/dismiss.js",
55
- "./js/escape": "./src/js/escape.js",
56
- "./js/enhance": "./src/js/enhance.js",
57
- "./js/enhancement-loader": "./src/js/enhancement-loader.js",
58
- "./js/parse-config": "./src/js/parse-config.js",
59
- "./js/events": "./src/js/events.js",
60
- "./js/filter": "./src/js/filter.js",
61
- "./js/flyout": "./src/js/flyout.js",
62
- "./js/focus": "./src/js/focus.js",
63
- "./js/focus-group": "./src/js/focus-group.js",
64
- "./js/input": "./src/js/input.js",
65
- "./js/keys": "./src/js/keys.js",
66
- "./js/mask": "./src/js/mask.js",
67
- "./js/menu": "./src/js/menu.js",
68
- "./js/password": "./src/js/password.js",
69
- "./js/scrollspy": "./src/js/scrollspy.js",
70
- "./js/selectors": "./src/js/selectors.js",
71
- "./js/tab": "./src/js/tab.js",
72
- "./js/tooltip": "./src/js/tooltip.js",
73
- "./js/validation": "./src/js/validation.js",
74
- "./js/status": "./src/js/status.js",
75
- "./js/surface": "./src/js/surface.js",
76
- "./reserved-classes.json": "./reserved-classes.json",
77
- "./components.json": "./components.json",
78
- "./package.json": "./package.json"
79
- },
80
- "bin": {
81
- "actual-css": "./src/cli/actual-css.js"
82
- },
83
- "main": "./dist/actual.js",
84
- "style": "./dist/actual.min.css",
85
- "unpkg": "./dist/actual.min.css",
86
- "jsdelivr": "./dist/actual.min.css",
87
- "sideEffects": true,
88
- "files": [
89
- "dist",
90
- "src/css/*.css",
91
- "src/css/core",
92
- "src/css/layout",
93
- "src/css/typography",
94
- "src/css/forms",
95
- "src/css/components",
96
- "src/css/effects",
97
- "src/css/utilities",
98
- "src/cli",
99
- "src/js",
100
- "src/tooling",
101
- "reserved-classes.json",
102
- "components.json",
103
- "docs",
104
- "CHANGELOG.md",
105
- "llms.txt",
106
- "LICENSE",
107
- "README.md"
108
- ],
109
- "engines": {
110
- "bun": ">=1.4.0",
111
- "node": ">=18"
112
- },
113
- "scripts": {
114
- "lint": "biome check",
115
- "lint:fix": "biome check --write",
116
- "build:docs": "bun run build:themes && bun scripts/build-docs.js",
117
- "watch:docs": "bun run build:themes && bun scripts/build-docs.js --watch",
118
- "check:docs": "bun scripts/check-docs.js",
119
- "format:docs": "bun scripts/format-doc-tables.js",
120
- "check:doc-classes": "bun scripts/check-doc-classes.js",
121
- "check:compat": "bun scripts/check-compat.js",
122
- "check:css-api": "bun scripts/check-css-api.js",
123
- "check:color-space": "bun scripts/check-color-space.js",
124
- "report:theme-contrast": "bun scripts/report-theme-contrast.js",
125
- "report:neutral-ramp": "bun scripts/report-neutral-ramp.js",
126
- "report:dead-css": "bun scripts/report-dead-css.js",
127
- "report:overflow": "bun scripts/report-overflow.js",
128
- "check:architecture": "bun scripts/check-css-architecture.js",
129
- "build:dist": "bun scripts/build-dist.js",
130
- "build:js": "bun scripts/build-js.js",
131
- "build:themes": "bun scripts/build-themes.js",
132
- "build:size": "bun scripts/build-size.js",
133
- "check:enhance": "bun run scripts/check-enhance.js",
134
- "generate:reserved": "bun scripts/generate-reserved-classes.js",
135
- "check:reserved": "bun scripts/check-reserved.js",
136
- "generate:catalog": "bun scripts/build-catalog.js",
137
- "check:catalog": "bun scripts/check-catalog.js",
138
- "check:links": "bun scripts/check-doc-links.js",
139
- "check:templates": "bun scripts/check-templates.js",
140
- "check:markup": "bun scripts/check-markup.js",
141
- "shot:forced": "bun scripts/forced-colors-shot.js",
142
- "shot:multi": "bun scripts/multi-shot.js",
143
- "shot:page": "bun scripts/page-shot.js",
144
- "probe": "bun scripts/probe.js",
145
- "serve": "bun scripts/serve.js",
146
- "check:sync": "bun scripts/check-sync.js",
147
- "test": "bun test",
148
- "test:changed": "bun test --changed=master",
149
- "build:all": "bun run lint && bun run build:dist && bun run build:js && bun run build:size && bun run format:docs && 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 generate:catalog && bun run check:catalog && bun run check:sync && bun run check:links && bun run check:templates && bun run check:markup && bun run test",
150
- "prepublishOnly": "bun run build:all"
151
- },
152
- "devDependencies": {
153
- "@biomejs/biome": "^2.5.12",
154
- "happy-dom": "^20.14.0"
155
- },
156
- "dependencies": {
157
- "@lekoala/floating": "^0.2.0"
158
- }
159
- }
1
+ {
2
+ "name": "actual-css",
3
+ "version": "0.9.2",
4
+ "description": "Plain CSS component framework with semantic classes, universal variants, small tokens, theme hooks, and progressive enhancements.",
5
+ "type": "module",
6
+ "packageManager": "bun@1.4.2",
7
+ "license": "MIT",
8
+ "author": "Thomas <thomas@lekoala.be>",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/lekoala/actual-css.git"
12
+ },
13
+ "homepage": "https://github.com/lekoala/actual-css",
14
+ "bugs": {
15
+ "url": "https://github.com/lekoala/actual-css/issues"
16
+ },
17
+ "keywords": [
18
+ "css",
19
+ "css-framework",
20
+ "component-library",
21
+ "semantic",
22
+ "accessibility",
23
+ "dark-mode",
24
+ "themable",
25
+ "no-build",
26
+ "progressive-enhancement"
27
+ ],
28
+ "exports": {
29
+ ".": "./dist/actual.min.css",
30
+ "./full": "./dist/actual.full.min.css",
31
+ "./css": "./src/css/actual.css",
32
+ "./css/components": "./src/css/components/index.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",
43
+ "./css/themes": null,
44
+ "./css/themes/*": null,
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",
49
+ "./js": "./src/js/index.js",
50
+ "./js/full": "./src/js/full.js",
51
+ "./js/command": "./src/js/command.js",
52
+ "./js/context-menu": "./src/js/context-menu.js",
53
+ "./js/dialog": "./src/js/dialog.js",
54
+ "./js/dismiss": "./src/js/dismiss.js",
55
+ "./js/escape": "./src/js/escape.js",
56
+ "./js/enhance": "./src/js/enhance.js",
57
+ "./js/enhancement-loader": "./src/js/enhancement-loader.js",
58
+ "./js/parse-config": "./src/js/parse-config.js",
59
+ "./js/events": "./src/js/events.js",
60
+ "./js/filter": "./src/js/filter.js",
61
+ "./js/flyout": "./src/js/flyout.js",
62
+ "./js/focus": "./src/js/focus.js",
63
+ "./js/focus-group": "./src/js/focus-group.js",
64
+ "./js/input": "./src/js/input.js",
65
+ "./js/keys": "./src/js/keys.js",
66
+ "./js/mask": "./src/js/mask.js",
67
+ "./js/menu": "./src/js/menu.js",
68
+ "./js/password": "./src/js/password.js",
69
+ "./js/scrollspy": "./src/js/scrollspy.js",
70
+ "./js/selectors": "./src/js/selectors.js",
71
+ "./js/tab": "./src/js/tab.js",
72
+ "./js/tooltip": "./src/js/tooltip.js",
73
+ "./js/validation": "./src/js/validation.js",
74
+ "./js/status": "./src/js/status.js",
75
+ "./js/surface": "./src/js/surface.js",
76
+ "./reserved-classes.json": "./reserved-classes.json",
77
+ "./components.json": "./components.json",
78
+ "./package.json": "./package.json"
79
+ },
80
+ "bin": {
81
+ "actual-css": "./src/cli/actual-css.js"
82
+ },
83
+ "main": "./dist/actual.js",
84
+ "style": "./dist/actual.min.css",
85
+ "unpkg": "./dist/actual.min.css",
86
+ "jsdelivr": "./dist/actual.min.css",
87
+ "sideEffects": true,
88
+ "files": [
89
+ "dist",
90
+ "src/css/*.css",
91
+ "src/css/core",
92
+ "src/css/layout",
93
+ "src/css/typography",
94
+ "src/css/forms",
95
+ "src/css/components",
96
+ "src/css/effects",
97
+ "src/css/utilities",
98
+ "src/cli",
99
+ "src/js",
100
+ "src/tooling",
101
+ "reserved-classes.json",
102
+ "components.json",
103
+ "docs",
104
+ "CHANGELOG.md",
105
+ "llms.txt",
106
+ "LICENSE",
107
+ "README.md"
108
+ ],
109
+ "engines": {
110
+ "bun": ">=1.4.0",
111
+ "node": ">=18"
112
+ },
113
+ "scripts": {
114
+ "lint": "biome check",
115
+ "lint:fix": "biome check --write",
116
+ "build:docs": "bun run build:themes && bun scripts/build-docs.js",
117
+ "watch:docs": "bun run build:themes && bun scripts/build-docs.js --watch",
118
+ "check:docs": "bun scripts/check-docs.js",
119
+ "format:docs": "bun scripts/format-doc-tables.js",
120
+ "check:doc-classes": "bun scripts/check-doc-classes.js",
121
+ "check:compat": "bun scripts/check-compat.js",
122
+ "check:css-api": "bun scripts/check-css-api.js",
123
+ "check:color-space": "bun scripts/check-color-space.js",
124
+ "report:theme-contrast": "bun scripts/report-theme-contrast.js",
125
+ "report:neutral-ramp": "bun scripts/report-neutral-ramp.js",
126
+ "report:dead-css": "bun scripts/report-dead-css.js",
127
+ "report:overflow": "bun scripts/report-overflow.js",
128
+ "check:architecture": "bun scripts/check-css-architecture.js",
129
+ "build:dist": "bun scripts/build-dist.js",
130
+ "build:js": "bun scripts/build-js.js",
131
+ "build:themes": "bun scripts/build-themes.js",
132
+ "build:size": "bun scripts/build-size.js",
133
+ "check:enhance": "bun run scripts/check-enhance.js",
134
+ "generate:reserved": "bun scripts/generate-reserved-classes.js",
135
+ "check:reserved": "bun scripts/check-reserved.js",
136
+ "generate:catalog": "bun scripts/build-catalog.js",
137
+ "check:catalog": "bun scripts/check-catalog.js",
138
+ "check:links": "bun scripts/check-doc-links.js",
139
+ "check:templates": "bun scripts/check-templates.js",
140
+ "check:markup": "bun scripts/check-markup.js",
141
+ "shot:forced": "bun scripts/forced-colors-shot.js",
142
+ "shot:multi": "bun scripts/multi-shot.js",
143
+ "shot:page": "bun scripts/page-shot.js",
144
+ "probe": "bun scripts/probe.js",
145
+ "serve": "bun scripts/serve.js",
146
+ "check:sync": "bun scripts/check-sync.js",
147
+ "release:notes": "bun scripts/release-notes.js",
148
+ "test": "bun test",
149
+ "test:changed": "bun test --changed=master",
150
+ "build:all": "bun run lint && bun run build:dist && bun run build:js && bun run build:size && bun run format:docs && 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 generate:catalog && bun run check:catalog && bun run check:sync && bun run check:links && bun run check:templates && bun run check:markup && bun run test",
151
+ "prepublishOnly": "bun run build:all"
152
+ },
153
+ "devDependencies": {
154
+ "@biomejs/biome": "^2.5.12",
155
+ "happy-dom": "^20.14.0"
156
+ },
157
+ "dependencies": {
158
+ "@lekoala/floating": "^0.2.0"
159
+ }
160
+ }
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Accordion disclosures built on native details and summary.
3
3
  *
4
+ * Docs: docs/pages/components/accordion.md
5
+ *
4
6
  * Keeps the clickable summary affordance aligned and usable without JavaScript
5
7
  * or demo styles. Decorative palettes and custom markers belong outside the
6
8
  * base component.
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Actions — a horizontal action-button cluster.
3
3
  *
4
+ * Docs: docs/pages/patterns/actions.md
5
+ *
4
6
  * Composes with .btn (or any inline element) and feeds layout via the shared
5
7
  * --gap token.
6
8
  *
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Alerts for inline feedback and status messages.
3
3
  *
4
+ * Docs: docs/pages/components/alert.md
5
+ *
4
6
  * Keeps alert defaults local while consuming the shared --ui-* variant
5
7
  * plumbing for emphasis.
6
8
  *
@@ -3,6 +3,8 @@
3
3
  * and item states; app-layout owns whether that surface is a bottom bar or
4
4
  * labelled side navigation.
5
5
  *
6
+ * Docs: docs/pages/components/app-navigation.md
7
+ *
6
8
  * Public hooks:
7
9
  * --app-nav-size
8
10
  * --app-nav-gap
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Avatars for initials, images, links, and buttons.
3
3
  *
4
+ * Docs: docs/pages/components/avatar.md
5
+ *
4
6
  * The visual box stays the same across semantic elements. Grouping and status
5
7
  * dots (an empty .badge child) compose around the avatar without changing its
6
8
  * meaning.
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Badges for compact labels, counts, and state hints.
3
3
  *
4
+ * Docs: docs/pages/components/badge.md
5
+ *
4
6
  * Soft by default. .solid for counters and notification badges. The dot
5
7
  * (.badge:empty) stays solid regardless — a soft dot is pointless.
6
8
  * Shared .outline variant stays available.
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Breadcrumb — current-location trail from the site root.
3
3
  *
4
+ * Docs: docs/pages/components/breadcrumb.md
5
+ *
4
6
  * Inline list separated by "/". Mark the current page with `aria-current="page"`
5
7
  * either on the item or on the current link.
6
8
  */
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Busy overlay — non-button loading state.
3
3
  *
4
+ * Docs: docs/pages/components/spinner.md
5
+ *
4
6
  * A non-button element with aria-busy="true" and a direct last-child .spinner
5
7
  * shows that spinner as a centered overlay over a faded surface. Buttons keep
6
8
  * their spinners inline (e.g. .btn[aria-busy] > .spinner stays inline-flex).
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Buttons for actions and button-like links.
3
3
  *
4
+ * Docs: docs/pages/components/button.md
5
+ *
4
6
  * .btn is primarily for actionable elements: <button>, <a href>,
5
7
  * input[type="button"|"submit"|"reset"].
6
8
  *
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Cards provide a neutral raised surface for grouped content.
3
3
  *
4
+ * Docs: docs/pages/components/card.md
5
+ *
4
6
  * Surface, border, radius, padding, density, and elevation stay local here.
5
7
  * Direct header/footer children are structural slots; a direct footer is
6
8
  * anchored to the card's bottom edge when extra block space is available (so
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Message rows composed from an optional avatar, metadata, and bubble.
3
3
  *
4
+ * Docs: docs/pages/components/chat.md
5
+ *
4
6
  * Public hooks:
5
7
  * --chat-gap
6
8
  * --chat-max-size
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Data list — term/value pairs for the properties of a single object.
3
3
  *
4
+ * Docs: docs/pages/components/data-list.md
5
+ *
4
6
  * Expects alternating <dt>/<dd> children: one term, one value per property.
5
7
  * A plain <dl> handles richer relationships (several terms or descriptions)
6
8
  * and stays untouched by this component.
@@ -1,6 +1,12 @@
1
1
  /*
2
2
  * Drawer — modal side-sheet built on the native dialog element.
3
3
  *
4
+ * Docs: docs/pages/components/drawer.md
5
+ *
6
+ * Open with a native command button:
7
+ * command="show-modal" commandfor="<drawer-id>".
8
+ * For stacked navigation, compose with .nav-list from navbar.css.
9
+ *
4
10
  * Top-layer rendering, ::backdrop, Escape, and modal focus come from the
5
11
  * native dialog. CSS owns progressive enter/exit motion where browsers support
6
12
  * discrete display/overlay transitions. The drawer is a layout shell only —
@@ -13,10 +19,11 @@
13
19
  *
14
20
  * Internal:
15
21
  * --drawer-closed-translate (side/RTL positioning state)
22
+ * --drawer-focus-bleed
16
23
  * --drawer-motion-duration (shared by panel and ::backdrop so exit duration
17
24
  * changes in one place; entry state redefines it longer)
18
25
  */
19
- dialog.drawer {
26
+ :where(dialog).drawer {
20
27
  --drawer-size: 20rem;
21
28
  --drawer-pad: var(--space-40);
22
29
  --drawer-closed-translate: -100%;
@@ -59,7 +66,7 @@ dialog.drawer {
59
66
  transform var(--drawer-motion-duration) var(--ease-exit);
60
67
  }
61
68
 
62
- dialog.drawer[open] {
69
+ :where(dialog).drawer[open] {
63
70
  --drawer-motion-duration: var(--duration-slow);
64
71
  display: grid;
65
72
  grid-template-rows: auto minmax(0, 1fr) auto;
@@ -74,7 +81,7 @@ dialog.drawer[open] {
74
81
  /* A form is the drawer's content wrapper when actions need method="dialog".
75
82
  Span the drawer tracks so the form can keep the header at the top, let the
76
83
  body absorb the available height, and keep the footer at the bottom. */
77
- dialog.drawer > form {
84
+ :where(dialog).drawer > form {
78
85
  display: grid;
79
86
  grid-row: 1 / -1;
80
87
  grid-template-rows: auto minmax(0, 1fr) auto;
@@ -83,7 +90,7 @@ dialog.drawer > form {
83
90
  }
84
91
 
85
92
  /* The shared backdrop token keeps drawer and modal scrims consistent. */
86
- dialog.drawer::backdrop {
93
+ :where(dialog).drawer::backdrop {
87
94
  background: var(--backdrop-fill);
88
95
  opacity: 0;
89
96
  /* Scrim curve stays neutral `ease`; only the panel's character curves
@@ -91,7 +98,7 @@ dialog.drawer::backdrop {
91
98
  transition: opacity var(--drawer-motion-duration) ease;
92
99
  }
93
100
 
94
- dialog.drawer[data-side="end"] {
101
+ :where(dialog).drawer[data-side="end"] {
95
102
  --drawer-closed-translate: 100%;
96
103
 
97
104
  margin-inline-start: auto;
@@ -100,17 +107,17 @@ dialog.drawer[data-side="end"] {
100
107
  border-inline-start: var(--border-width) solid var(--border);
101
108
  }
102
109
 
103
- dialog.drawer[open]::backdrop {
110
+ :where(dialog).drawer[open]::backdrop {
104
111
  opacity: 1;
105
112
  }
106
113
 
107
114
  @starting-style {
108
- dialog.drawer[open] {
115
+ :where(dialog).drawer[open] {
109
116
  opacity: 0;
110
117
  transform: translateX(var(--drawer-closed-translate));
111
118
  }
112
119
 
113
- dialog.drawer[open]::backdrop {
120
+ :where(dialog).drawer[open]::backdrop {
114
121
  opacity: 0;
115
122
  }
116
123
  }
@@ -120,15 +127,21 @@ dialog.drawer[open]::backdrop {
120
127
  modal, which sizes to its content and opts in with .scrollable. Header and
121
128
  footer keep their own tracks; .drawer-close is named because a generic
122
129
  exclusion list is easier to trust than its `position: absolute`. */
123
- dialog.drawer > :not(:is(header, footer, form, .drawer-close)),
124
- dialog.drawer > form > :not(:is(header, footer, .drawer-close)) {
130
+ :where(dialog).drawer > :not(:is(header, footer, form, .drawer-close)),
131
+ :where(dialog).drawer > form > :not(:is(header, footer, .drawer-close)) {
132
+ --drawer-focus-bleed: calc(var(--focus-outline-offset) + var(--border-width) * 2);
133
+
125
134
  min-block-size: 0;
135
+ /* Keep focus paint inside the clip without moving the body off the fixed
136
+ header and footer edges. */
137
+ margin-inline: calc(var(--drawer-focus-bleed) * -1);
138
+ padding-inline: var(--drawer-focus-bleed);
126
139
  overflow: auto;
127
140
  overscroll-behavior: contain;
128
141
  }
129
142
 
130
143
  @supports (transition-behavior: allow-discrete) {
131
- dialog.drawer {
144
+ :where(dialog).drawer {
132
145
  transition:
133
146
  opacity var(--drawer-motion-duration) var(--ease-exit),
134
147
  transform var(--drawer-motion-duration) var(--ease-exit),
@@ -136,7 +149,7 @@ dialog.drawer > form > :not(:is(header, footer, .drawer-close)) {
136
149
  display var(--drawer-motion-duration) allow-discrete;
137
150
  }
138
151
 
139
- dialog.drawer[open] {
152
+ :where(dialog).drawer[open] {
140
153
  transition:
141
154
  opacity var(--drawer-motion-duration) var(--ease-enter),
142
155
  transform var(--drawer-motion-duration) var(--ease-enter),
@@ -144,7 +157,7 @@ dialog.drawer > form > :not(:is(header, footer, .drawer-close)) {
144
157
  display var(--drawer-motion-duration) allow-discrete;
145
158
  }
146
159
 
147
- dialog.drawer::backdrop {
160
+ :where(dialog).drawer::backdrop {
148
161
  transition:
149
162
  opacity var(--drawer-motion-duration) ease,
150
163
  overlay var(--drawer-motion-duration) allow-discrete,
@@ -158,40 +171,40 @@ dialog.drawer > form > :not(:is(header, footer, .drawer-close)) {
158
171
  directionality and handles nested direction changes; the explicit ltr rules
159
172
  neutralize an outer RTL fallback selector. Each specificity group keeps the
160
173
  fallback before the :dir() rules. */
161
- [dir="rtl"] dialog.drawer {
174
+ [dir="rtl"] :where(dialog).drawer {
162
175
  --drawer-closed-translate: 100%;
163
176
  }
164
177
 
165
- dialog.drawer:dir(ltr) {
178
+ :where(dialog).drawer:dir(ltr) {
166
179
  --drawer-closed-translate: -100%;
167
180
  }
168
181
 
169
- dialog.drawer:dir(rtl) {
182
+ :where(dialog).drawer:dir(rtl) {
170
183
  --drawer-closed-translate: 100%;
171
184
  }
172
185
 
173
- [dir="rtl"] dialog.drawer[data-side="end"] {
186
+ [dir="rtl"] :where(dialog).drawer[data-side="end"] {
174
187
  --drawer-closed-translate: -100%;
175
188
  }
176
189
 
177
- dialog.drawer[data-side="end"]:dir(ltr) {
190
+ :where(dialog).drawer[data-side="end"]:dir(ltr) {
178
191
  --drawer-closed-translate: 100%;
179
192
  }
180
193
 
181
- dialog.drawer[data-side="end"]:dir(rtl) {
194
+ :where(dialog).drawer[data-side="end"]:dir(rtl) {
182
195
  --drawer-closed-translate: -100%;
183
196
  }
184
197
 
185
198
  @media (prefers-reduced-motion: no-preference) {
186
- dialog.drawer.is-static {
199
+ :where(dialog).drawer.is-static {
187
200
  animation: actual-dialog-static var(--duration-slow) ease;
188
201
  }
189
202
  }
190
203
 
191
204
  /* The header reserves inline room so the title never runs under the close
192
205
  control. */
193
- dialog.drawer > header,
194
- dialog.drawer > form > header {
206
+ :where(dialog).drawer > header,
207
+ :where(dialog).drawer > form > header {
195
208
  padding-inline-end: calc(var(--control-size) + var(--space-30));
196
209
  }
197
210
 
@@ -3,6 +3,8 @@
3
3
  * Button owns the trigger's size, shape, and intent; FAB owns placement and
4
4
  * the speed dial's structural open/close markers (--icon-plus / --icon-close).
5
5
  *
6
+ * Docs: docs/pages/components/fab.md
7
+ *
6
8
  * Public hooks:
7
9
  * --fab-offset
8
10
  * --fab-gap
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Flyout — floating panel for actions and links.
3
3
  *
4
+ * Docs: docs/pages/enhancements/flyout.md
5
+ *
4
6
  * JavaScript promotes the panel to the top layer and chooses viewport or
5
7
  * document coordinates from its anchor. It also owns state (.is-open), focus,
6
8
  * and keyboard behavior. CSS owns the surfaced panel appearance, item styles,
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Indicator — generic corner positioning for overlaid component content.
3
3
  *
4
+ * Docs: docs/pages/components/indicator.md
5
+ *
4
6
  * The container only establishes the containing block. The item owns no
5
7
  * paint, size, or ring so badges and other components keep their own visual
6
8
  * contract.