fjkit 0.1.0.dev0__py3-none-any.whl

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 (127) hide show
  1. fjkit/__init__.py +49 -0
  2. fjkit/auth/__init__.py +54 -0
  3. fjkit/auth/csrf.py +88 -0
  4. fjkit/auth/errors.py +31 -0
  5. fjkit/auth/plugin.py +496 -0
  6. fjkit/auth/sources.py +24 -0
  7. fjkit/auth/stores.py +141 -0
  8. fjkit/auth/types.py +141 -0
  9. fjkit/cli/__init__.py +67 -0
  10. fjkit/cli/build_css.py +135 -0
  11. fjkit/cli/check.py +193 -0
  12. fjkit/cli/eject.py +562 -0
  13. fjkit/cli/ejected.py +202 -0
  14. fjkit/cli/vocabulary.py +85 -0
  15. fjkit/config.py +130 -0
  16. fjkit/errors.py +156 -0
  17. fjkit/flash.py +189 -0
  18. fjkit/forms.py +145 -0
  19. fjkit/htmx.py +76 -0
  20. fjkit/icons.py +60 -0
  21. fjkit/messages.py +227 -0
  22. fjkit/mounting.py +72 -0
  23. fjkit/plugins.py +223 -0
  24. fjkit/py.typed +0 -0
  25. fjkit/rendering.py +554 -0
  26. fjkit/signing.py +63 -0
  27. fjkit/static/brand/torii-bolt.png +0 -0
  28. fjkit/static/dist/fjkit-luma.css +2 -0
  29. fjkit/static/dist/fjkit-lyra.css +2 -0
  30. fjkit/static/dist/fjkit-maia.css +2 -0
  31. fjkit/static/dist/fjkit-mira.css +2 -0
  32. fjkit/static/dist/fjkit-nova.css +2 -0
  33. fjkit/static/dist/fjkit-rhea.css +2 -0
  34. fjkit/static/dist/fjkit-sera.css +2 -0
  35. fjkit/static/dist/fjkit-vega.css +2 -0
  36. fjkit/static/icons/lucide.json +1 -0
  37. fjkit/static/js/errors.js +117 -0
  38. fjkit/static/js/multiselect.js +126 -0
  39. fjkit/static/js/reveal.js +51 -0
  40. fjkit/static/js/select.js +113 -0
  41. fjkit/static/src/fjkit.css +385 -0
  42. fjkit/static/vendor/basecoat/base/base.css +136 -0
  43. fjkit/static/vendor/basecoat/basecoat-base.css +2 -0
  44. fjkit/static/vendor/basecoat/basecoat-components.css +39 -0
  45. fjkit/static/vendor/basecoat/basecoat-luma.css +2 -0
  46. fjkit/static/vendor/basecoat/basecoat-lyra.css +2 -0
  47. fjkit/static/vendor/basecoat/basecoat-maia.css +2 -0
  48. fjkit/static/vendor/basecoat/basecoat-mira.css +2 -0
  49. fjkit/static/vendor/basecoat/basecoat-nova.css +2 -0
  50. fjkit/static/vendor/basecoat/basecoat-rhea.css +2 -0
  51. fjkit/static/vendor/basecoat/basecoat-sera.css +2 -0
  52. fjkit/static/vendor/basecoat/basecoat-vega.css +2 -0
  53. fjkit/static/vendor/basecoat/basecoat.all.css +1 -0
  54. fjkit/static/vendor/basecoat/basecoat.css +1 -0
  55. fjkit/static/vendor/basecoat/components/accordion.css +27 -0
  56. fjkit/static/vendor/basecoat/components/alert.css +38 -0
  57. fjkit/static/vendor/basecoat/components/avatar.css +47 -0
  58. fjkit/static/vendor/basecoat/components/badge.css +6 -0
  59. fjkit/static/vendor/basecoat/components/breadcrumb.css +30 -0
  60. fjkit/static/vendor/basecoat/components/button-group.css +54 -0
  61. fjkit/static/vendor/basecoat/components/button.css +6 -0
  62. fjkit/static/vendor/basecoat/components/card.css +26 -0
  63. fjkit/static/vendor/basecoat/components/chart.css +56 -0
  64. fjkit/static/vendor/basecoat/components/checkbox.css +12 -0
  65. fjkit/static/vendor/basecoat/components/collapsible.css +21 -0
  66. fjkit/static/vendor/basecoat/components/combobox.css +99 -0
  67. fjkit/static/vendor/basecoat/components/command.css +140 -0
  68. fjkit/static/vendor/basecoat/components/dialog.css +101 -0
  69. fjkit/static/vendor/basecoat/components/drawer.css +89 -0
  70. fjkit/static/vendor/basecoat/components/dropdown-menu.css +56 -0
  71. fjkit/static/vendor/basecoat/components/empty.css +26 -0
  72. fjkit/static/vendor/basecoat/components/field.css +82 -0
  73. fjkit/static/vendor/basecoat/components/form.css +9 -0
  74. fjkit/static/vendor/basecoat/components/input-group.css +74 -0
  75. fjkit/static/vendor/basecoat/components/input.css +32 -0
  76. fjkit/static/vendor/basecoat/components/item.css +50 -0
  77. fjkit/static/vendor/basecoat/components/kbd.css +6 -0
  78. fjkit/static/vendor/basecoat/components/label.css +13 -0
  79. fjkit/static/vendor/basecoat/components/native-select.css +12 -0
  80. fjkit/static/vendor/basecoat/components/popover.css +107 -0
  81. fjkit/static/vendor/basecoat/components/progress.css +14 -0
  82. fjkit/static/vendor/basecoat/components/radio.css +11 -0
  83. fjkit/static/vendor/basecoat/components/range.css +50 -0
  84. fjkit/static/vendor/basecoat/components/scrollbar.css +46 -0
  85. fjkit/static/vendor/basecoat/components/select.css +64 -0
  86. fjkit/static/vendor/basecoat/components/sidebar.css +101 -0
  87. fjkit/static/vendor/basecoat/components/skeleton.css +6 -0
  88. fjkit/static/vendor/basecoat/components/switch.css +8 -0
  89. fjkit/static/vendor/basecoat/components/table.css +34 -0
  90. fjkit/static/vendor/basecoat/components/tabs.css +31 -0
  91. fjkit/static/vendor/basecoat/components/textarea.css +7 -0
  92. fjkit/static/vendor/basecoat/components/toast.css +57 -0
  93. fjkit/static/vendor/basecoat/components/tooltip.css +82 -0
  94. fjkit/static/vendor/basecoat/js/all.min.js +1 -0
  95. fjkit/static/vendor/basecoat/styles/luma.css +1376 -0
  96. fjkit/static/vendor/basecoat/styles/lyra.css +1379 -0
  97. fjkit/static/vendor/basecoat/styles/maia.css +1364 -0
  98. fjkit/static/vendor/basecoat/styles/mira.css +1373 -0
  99. fjkit/static/vendor/basecoat/styles/nova.css +1387 -0
  100. fjkit/static/vendor/basecoat/styles/rhea.css +1381 -0
  101. fjkit/static/vendor/basecoat/styles/sera.css +1397 -0
  102. fjkit/static/vendor/basecoat/styles/vega.css +1386 -0
  103. fjkit/static/vendor/htmx/htmx.min.js +1 -0
  104. fjkit/static/vendor/htmx/json-enc.js +38 -0
  105. fjkit/styles.py +30 -0
  106. fjkit/templates/errors/page.html +92 -0
  107. fjkit/templates/ui/attrs.html +18 -0
  108. fjkit/templates/ui/button.html +64 -0
  109. fjkit/templates/ui/data.html +362 -0
  110. fjkit/templates/ui/disclosure.html +89 -0
  111. fjkit/templates/ui/feedback.html +313 -0
  112. fjkit/templates/ui/form.html +595 -0
  113. fjkit/templates/ui/icon.html +13 -0
  114. fjkit/templates/ui/layout.html +189 -0
  115. fjkit/templates/ui/nav.html +110 -0
  116. fjkit/templates/ui/overlay.html +624 -0
  117. fjkit/templates/ui/shell.html +170 -0
  118. fjkit/templates/ui/sidebar.html +170 -0
  119. fjkit/templates/ui/table.html +427 -0
  120. fjkit/templates/ui/tabs.html +133 -0
  121. fjkit/templating.py +365 -0
  122. fjkit/vendored.py +46 -0
  123. fjkit-0.1.0.dev0.dist-info/METADATA +119 -0
  124. fjkit-0.1.0.dev0.dist-info/RECORD +127 -0
  125. fjkit-0.1.0.dev0.dist-info/WHEEL +4 -0
  126. fjkit-0.1.0.dev0.dist-info/entry_points.txt +2 -0
  127. fjkit-0.1.0.dev0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,385 @@
1
+ /* ============================================================================
2
+ * fjkit — the one place a colour is defined.
3
+ *
4
+ * Every colour the kit renders is defined here or inherited from Basecoat's
5
+ * token set. Templates name a role (bg-primary, text-muted-foreground,
6
+ * data-variant="destructive"), never a hue.
7
+ *
8
+ * Apps rebrand by redefining the section 1 tokens in their own stylesheet,
9
+ * loaded after this one. That is plain CSS: no build step, no Tailwind, no
10
+ * config file. See CHARTER.md A3.
11
+ *
12
+ * This file is compiled when fjkit is released, not when an app runs:
13
+ * uv run fjkit build-css
14
+ * ========================================================================= */
15
+
16
+ /* `source(none)` turns off Tailwind's directory auto-detection, so the class
17
+ * scan is an explicit, reviewable list. Without it Tailwind walks the repo and
18
+ * scans .venv/ and the bench fixtures.
19
+ *
20
+ * Only the kit's own templates are scanned. An app's templates are NOT: they
21
+ * must contain no class the kit did not already emit, and `fjkit check`
22
+ * enforces that. */
23
+ @import "tailwindcss" source(none);
24
+ @source "../../templates";
25
+ /* First-party plugins ship templates in their own distribution, so each one
26
+ * adds a line here — and the path leaves this package, because since the 0.1
27
+ * split `fjkit-apidocs` and `fjkit-charts` are siblings under `packages/`.
28
+ *
29
+ * Omitting a line is not a build error, and neither is a path that no longer
30
+ * exists: Tailwind scans nothing and says nothing, the templates render with
31
+ * every utility class in them missing from the stylesheet, and the page is
32
+ * quietly broken. `test_apidocs.py` holds these two paths for that reason.
33
+ *
34
+ * This only resolves inside this repository, which is where `fjkit build-css`
35
+ * is ever run — a released wheel carries the stylesheet already built. The
36
+ * limit it implies is real and deliberate: a plugin outside this repo cannot
37
+ * add a class to fjkit's stylesheet, so it must compose `ui/*` macros and write
38
+ * no utility class of its own. `fjkit-admin` is the worked example. */
39
+ @source "../../../../../fjkit-apidocs/src/fjkit_apidocs/templates";
40
+ @source "../../../../../fjkit-charts/src/fjkit_charts/templates";
41
+ @source "../vendor/basecoat/js";
42
+
43
+ /* Basecoat ships Tailwind source CSS: @apply rules plus the shadcn token
44
+ * vocabulary (--primary, --card, --muted-foreground, …) and the dark variant
45
+ * `html.dark`. Loaded after Tailwind's preflight, as upstream requires.
46
+ * Building from source rather than shipping the 220 KB prebuilt CDN file keeps
47
+ * the kit's stylesheet an order of magnitude smaller. */
48
+ @import "../vendor/basecoat/basecoat-vega.css"; /* fjkit:style-pack */
49
+
50
+ /* That last line is the style pack, and it is the one line `fjkit build-css`
51
+ * rewrites. Upstream ships eight packs side by side — vega, nova, maia, lyra,
52
+ * mira, luma, sera, rhea — over one shared base and one shared selector set;
53
+ * they differ in geometry (control heights, radii, borders, shadows), never in
54
+ * the class names or tokens a template writes. The builder emits one stylesheet
55
+ * per pack, so the marker comment has to survive: the substitution finds it.
56
+ * Everything below this point is pack-neutral and compiles into all eight
57
+ * unchanged. */
58
+
59
+ /* ---------------------------------------------------------------------------
60
+ * 1. Brand — the only tokens tied to identity. Override these in your app.
61
+ * ------------------------------------------------------------------------ */
62
+ :root {
63
+ --primary: oklch(0.52 0.19 275);
64
+ --primary-foreground: oklch(0.985 0.005 275);
65
+ --ring: oklch(0.52 0.19 275);
66
+
67
+ /* Neutrals carry a trace of the brand hue so surfaces do not read as flat
68
+ * grey beside it. They stay surface tokens, not brand tokens. */
69
+ --background: oklch(0.995 0.002 275);
70
+ --card: oklch(1 0 0);
71
+ --muted: oklch(0.968 0.004 275);
72
+ --accent: oklch(0.955 0.008 275);
73
+ --border: oklch(0.918 0.005 275);
74
+ --input: oklch(0.918 0.005 275);
75
+
76
+ --radius: 0.625rem;
77
+
78
+ /* The sidebar is a surface, not a brand: it borrows the same neutrals as
79
+ * everything else, so redefining section 1 still repaints the whole app.
80
+ * Basecoat defines these as pure greys, which shows the moment a tinted page
81
+ * body sits next to them — most of all in dark mode. Redefined rather than
82
+ * deleted because Basecoat's own component CSS reads these names. */
83
+ --sidebar: var(--card);
84
+ --sidebar-foreground: var(--foreground);
85
+ --sidebar-primary: var(--primary);
86
+ --sidebar-primary-foreground: var(--primary-foreground);
87
+ --sidebar-accent: var(--accent);
88
+ --sidebar-accent-foreground: var(--accent-foreground);
89
+ --sidebar-border: var(--border);
90
+ --sidebar-ring: var(--ring);
91
+
92
+ /* -------------------------------------------------------------------------
93
+ * 2. Semantic status — deliberately NOT derived from --primary.
94
+ *
95
+ * "Green means done" has to survive a rebrand, so status colours do not
96
+ * follow the brand tokens. They still have exactly one definition: here.
97
+ * Basecoat ships --destructive; success, warning and info are fjkit's.
98
+ * ---------------------------------------------------------------------- */
99
+ --success: oklch(0.62 0.15 152);
100
+ --success-foreground: oklch(0.99 0 0);
101
+ --warning: oklch(0.75 0.16 78);
102
+ --warning-foreground: oklch(0.25 0.05 78);
103
+ --info: oklch(0.62 0.13 235);
104
+ --info-foreground: oklch(0.99 0 0);
105
+ }
106
+
107
+ .dark {
108
+ --primary: oklch(0.72 0.15 275);
109
+ --primary-foreground: oklch(0.18 0.03 275);
110
+ --ring: oklch(0.55 0.14 275);
111
+
112
+ --background: oklch(0.16 0.012 275);
113
+ --card: oklch(0.21 0.014 275);
114
+ --popover: oklch(0.21 0.014 275);
115
+ --muted: oklch(0.27 0.014 275);
116
+ --accent: oklch(0.32 0.02 275);
117
+ --border: oklch(1 0 0 / 11%);
118
+ --input: oklch(1 0 0 / 15%);
119
+
120
+ /* Repeated, not inherited: Basecoat redefines every --sidebar-* token inside
121
+ * its own `.dark` block, which overrides a single definition in :root and
122
+ * drops the dark sidebar back to grey. */
123
+ --sidebar: var(--card);
124
+ --sidebar-foreground: var(--foreground);
125
+ --sidebar-primary: var(--primary);
126
+ --sidebar-primary-foreground: var(--primary-foreground);
127
+ --sidebar-accent: var(--accent);
128
+ --sidebar-accent-foreground: var(--accent-foreground);
129
+ --sidebar-border: var(--border);
130
+ --sidebar-ring: var(--ring);
131
+
132
+ --success: oklch(0.7 0.14 152);
133
+ --success-foreground: oklch(0.16 0.03 152);
134
+ --warning: oklch(0.8 0.15 78);
135
+ --warning-foreground: oklch(0.22 0.05 78);
136
+ --info: oklch(0.7 0.12 235);
137
+ --info-foreground: oklch(0.16 0.03 235);
138
+ }
139
+
140
+ /* Registers the status tokens as Tailwind colours, so `bg-success` and
141
+ * `text-warning` exist as utilities the way Basecoat's own do. */
142
+ @theme inline {
143
+ --color-success: var(--success);
144
+ --color-success-foreground: var(--success-foreground);
145
+ --color-warning: var(--warning);
146
+ --color-warning-foreground: var(--warning-foreground);
147
+ --color-info: var(--info);
148
+ --color-info-foreground: var(--info-foreground);
149
+ }
150
+
151
+ /* ---------------------------------------------------------------------------
152
+ * 3. Status variants, extending Basecoat's own `data-variant` API rather than
153
+ * inventing a second one. Templates write
154
+ * <span class="badge" data-variant="success">
155
+ * exactly as they write data-variant="destructive", and never assemble
156
+ * `bg-success/12 text-success border-…` at the call site.
157
+ * ------------------------------------------------------------------------ */
158
+ @layer components {
159
+ .badge[data-variant="success"] {
160
+ @apply bg-success/12 text-success border-success/25;
161
+ }
162
+ .badge[data-variant="warning"] {
163
+ @apply bg-warning/18 text-warning border-warning/35;
164
+ }
165
+ .badge[data-variant="info"] {
166
+ @apply bg-info/12 text-info border-info/25;
167
+ }
168
+ .alert[data-variant="success"] {
169
+ @apply text-success border-success/30 bg-success/8;
170
+ }
171
+ .alert[data-variant="success"] > svg {
172
+ @apply text-success;
173
+ }
174
+
175
+ /* Dialog widths. Basecoat caps `.dialog > *` at one size and ships a
176
+ * `data-size` only for `.alert-dialog`, so the two extra widths extend that
177
+ * attribute rather than inventing a `dialog-lg` class. `default` needs no
178
+ * rule: it is Basecoat's own. */
179
+ .dialog[data-size="sm"] > * {
180
+ @apply sm:max-w-sm;
181
+ }
182
+ .dialog[data-size="lg"] > * {
183
+ @apply sm:max-w-2xl;
184
+ }
185
+
186
+ /* The panel is already capped at `max-h-[calc(100%-2rem)]`; without this rule
187
+ * the body of a long dialog overflows past the viewport, where a mouse still
188
+ * reaches it by scrolling the page but a keyboard cannot reach it at all.
189
+ *
190
+ * The margin/padding swap moves the panel's 24px inline padding into the
191
+ * section (the panel is `p-6`, so the two cancel exactly and nothing moves).
192
+ * Scrolling has to happen inside the section, and everything a scroll
193
+ * container puts at its own edges was landing on the content:
194
+ *
195
+ * - a classic scrollbar track sat on the right edge of a full-bleed child,
196
+ * drawing over its border;
197
+ * - a macOS overlay scrollbar takes no layout width, so no gutter helps it
198
+ * — the thumb floats over whatever is at the right edge;
199
+ * - a focus ring is painted outside the border box, so on a child at the
200
+ * section's edge the overflow clipped it.
201
+ *
202
+ * With the padding inside the scroll container, all three now happen in the
203
+ * section's own 24px band instead of on the content. `scrollbar-gutter:
204
+ * stable` still matters, for one thing only: without it a classic scrollbar
205
+ * appears by taking layout width, and the body reflows the moment it grows
206
+ * long enough to scroll. */
207
+ .dialog > * > section {
208
+ @apply -mx-6 overflow-y-auto px-6;
209
+ scrollbar-gutter: stable;
210
+ }
211
+
212
+ /* A button group inside a field. Basecoat's field-group rule —
213
+ * `.field > :is(fieldset, [role="group"], [role="radiogroup"]):not(.field)` —
214
+ * reads any grouped child of a `.field` as a stack of fields: `flex-col`,
215
+ * `w-full`, and 1.75rem between the items. A `.button-group` is a row of
216
+ * joined buttons, so labelling one with the role its ARIA pattern asks for
217
+ * turned it into a column of detached buttons a gap apart. The role is not
218
+ * the mistake; the assumption behind the rule is.
219
+ *
220
+ * `:not(.field)` is dead weight that matches the specificity of the rule
221
+ * above — three class-level parts — so source order decides and this one,
222
+ * imported later, wins. Same trick as the tabs rules below. */
223
+ .field > .button-group:not(.field),
224
+ .fieldset > .button-group:not(.field) {
225
+ @apply w-fit gap-0;
226
+ /* The same rule also makes the group an `inline-size` query container, and
227
+ * sizing containment lays the box out as if it had no contents — so `w-fit`
228
+ * resolved to 0 and the buttons hung out of a zero-width box. */
229
+ container-type: normal;
230
+ }
231
+
232
+ /* Direction is a separate rule because a `data-orientation="vertical"` group
233
+ * is already a column: it needs only the width and gap reset above. */
234
+ .field > .button-group:not([data-orientation="vertical"]),
235
+ .fieldset > .button-group:not([data-orientation="vertical"]) {
236
+ @apply flex-row;
237
+ }
238
+
239
+ /* Tabs. `components/tabs.css` is structure only — flex direction, the tablist
240
+ * axis, `outline-none` on the panels — but the style pack (vega) does ship a
241
+ * skin, and it is a pill strip: `h-9 p-[3px] rounded-lg bg-muted`, with the
242
+ * selected tab as a raised white pill. fjkit draws underline tabs instead, so
243
+ * every one of those has to be turned back off here. Leaving any of them
244
+ * standing is not cosmetic: `h-9` is 6px shorter than the tabs this file sizes,
245
+ * and `overflow-x-auto` below makes overflow-y compute to `auto` too, so the
246
+ * strip grew a phantom vertical scrollbar on the card's edge. */
247
+ /* The second selector is dead weight on its own — the pack paints the strip
248
+ * from `[role="tablist"]:not([data-variant="line"])`, one attribute more
249
+ * specific than the plain selector, so `bg-transparent` written here alone
250
+ * loses and the grey pill bar stays. Same specificity-matching trick as the
251
+ * selected-tab rule below. */
252
+ .tabs > [role="tablist"],
253
+ .tabs > [role="tablist"]:not([data-variant="line"]) {
254
+ @apply h-auto w-full justify-start gap-0 rounded-none bg-transparent p-0;
255
+ @apply overflow-x-auto border-b;
256
+ }
257
+
258
+ /* `after:hidden` drops the pack's underline pseudo-element. It is positioned
259
+ * `bottom-[-5px]`, which in a strip sized by its content is 5px of overflow
260
+ * rather than a mark under the tab. */
261
+ /* `rounded-none` undoes the pack's `rounded-md`. A rounded corner makes a tab
262
+ * read as a button rather than as a label on a strip, and the radius survived
263
+ * the first pass because only the tablist was reset. */
264
+ .tabs > [role="tablist"] > [role="tab"] {
265
+ @apply text-muted-foreground shrink-0 grow-0 cursor-pointer rounded-none border-e px-3.5 py-2 text-sm after:hidden;
266
+ }
267
+
268
+ .tabs > [role="tablist"] > [role="tab"]:hover {
269
+ @apply text-foreground;
270
+ }
271
+
272
+ /* The selected tab is marked by an inset ring rather than a border, so the
273
+ * strip does not shift by a pixel when the selection moves.
274
+ *
275
+ * The first selector is dead weight on its own — it exists to match the
276
+ * specificity of the pack's `:not([data-variant='line'])` pill rule, which
277
+ * otherwise outranks this one and repaints the tab white. */
278
+ .tabs > [role="tablist"]:not([data-variant="line"]) > [role="tab"][aria-selected="true"],
279
+ .tabs > [role="tablist"] > [role="tab"][aria-selected="true"] {
280
+ @apply text-foreground bg-transparent shadow-[inset_0_-2px_0_var(--primary)];
281
+ }
282
+
283
+ /* The pack fills and outlines the selected tab again under `html.dark`, which
284
+ * is one class and one type more specific than the rule above. This rule
285
+ * matches that specificity and lands later, so the underline is the only
286
+ * selection mark in both themes.
287
+ *
288
+ * Written as its own rule with a single selector, not a `dark:` utility added
289
+ * to the pair above: Tailwind splices the variant onto the last selector of a
290
+ * comma-separated list and emits `…[aria-selected="true"]):is(html.dark *)` —
291
+ * one bracket too many, which drops the whole rule. */
292
+ .tabs > [role="tablist"]:not([data-variant="line"]) > [role="tab"][aria-selected="true"] {
293
+ @apply dark:border-transparent dark:bg-transparent;
294
+ }
295
+
296
+ .tabs > [role="tablist"] > [role="tab"]:focus-visible {
297
+ @apply outline-ring -outline-offset-2 outline-2;
298
+ }
299
+
300
+ .tabs > [role="tablist"][aria-orientation="vertical"] {
301
+ @apply w-fit border-e border-b-0;
302
+ }
303
+
304
+ .tabs > [role="tablist"][aria-orientation="vertical"] > [role="tab"] {
305
+ @apply justify-start border-e-0 border-b text-start;
306
+ }
307
+
308
+ /* A code region. `tabindex="0"` in the macro makes it reachable; this makes
309
+ * the focus visible, the other half of the same requirement. */
310
+ .code-block {
311
+ @apply bg-muted text-foreground max-h-[34rem] overflow-x-auto p-4 font-mono text-xs leading-relaxed;
312
+ tab-size: 2;
313
+ }
314
+
315
+ .code-block:focus-visible {
316
+ @apply outline-ring -outline-offset-2 outline-2;
317
+ }
318
+
319
+ .code-block[data-wrap="true"] {
320
+ @apply break-words whitespace-pre-wrap;
321
+ }
322
+
323
+ /* Basecoat clamps `.item p` to two lines, which is right for a feed and wrong
324
+ * for a definition list. Extends `data-*` like the badge and dialog rules
325
+ * above rather than adding a second class. */
326
+ .item[data-clamp="false"] p {
327
+ @apply line-clamp-none;
328
+ }
329
+
330
+ /* A description list is a native <dl>, and the browser's own stylesheet gives
331
+ * every <dd> a 40px inline-start margin. Tailwind's preflight — which would
332
+ * have removed it — is not loaded here, so without this rule every value sits
333
+ * one indent to the right of the term above it. That is the whole reason the
334
+ * layout lives in CSS rather than in a class string on the macro. */
335
+ .description-list {
336
+ @apply grid gap-3;
337
+ }
338
+
339
+ .description-list > div {
340
+ @apply grid gap-1;
341
+ }
342
+
343
+ .description-list dt {
344
+ @apply text-muted-foreground text-sm;
345
+ }
346
+
347
+ .description-list dd {
348
+ @apply text-foreground m-0 text-sm;
349
+ }
350
+
351
+ /* `rows` puts the term beside its value once there is width for two columns,
352
+ * and stacks below that — a phone has no room for a label column that does
353
+ * not shrink. `stacked` never pairs them, which is what a narrow card wants
354
+ * at any width. */
355
+ .description-list[data-layout="rows"] > div {
356
+ @apply sm:grid-cols-[minmax(0,12rem)_1fr] sm:items-baseline sm:gap-4;
357
+ }
358
+ }
359
+
360
+ /* ---------------------------------------------------------------------------
361
+ * 4. Motion.
362
+ *
363
+ * A spinner is the one thing on the page that never stops moving, which is what
364
+ * `prefers-reduced-motion` asks about. Slowed rather than frozen: a still
365
+ * "loading" glyph reads as a hung page, so removing the animation would trade a
366
+ * comfort problem for a correctness one.
367
+ *
368
+ * Unlayered on purpose. Tailwind's `animate-spin` lives in `@layer utilities`,
369
+ * and unlayered rules beat every layer regardless of source order, so this wins
370
+ * without a specificity fight or an `!important`.
371
+ * ------------------------------------------------------------------------ */
372
+ @media (prefers-reduced-motion: reduce) {
373
+ .animate-spin {
374
+ animation-duration: 2.5s;
375
+ }
376
+ }
377
+
378
+ /* ---------------------------------------------------------------------------
379
+ * 5. Closed list of intentional literals.
380
+ *
381
+ * Anything hard-coded that is NOT in this list is a violation. Verify with:
382
+ * uv run fjkit check
383
+ *
384
+ * (currently empty — every colour above is a token)
385
+ * ------------------------------------------------------------------------ */
@@ -0,0 +1,136 @@
1
+ @custom-variant dark (&:is(html.dark *));
2
+
3
+ :root {
4
+ --radius: 0.625rem;
5
+ --background: oklch(1 0 0);
6
+ --foreground: oklch(0.145 0 0);
7
+ --card: oklch(1 0 0);
8
+ --card-foreground: oklch(0.145 0 0);
9
+ --popover: oklch(1 0 0);
10
+ --popover-foreground: oklch(0.145 0 0);
11
+ --primary: oklch(0.205 0 0);
12
+ --primary-foreground: oklch(0.985 0 0);
13
+ --secondary: oklch(0.97 0 0);
14
+ --secondary-foreground: oklch(0.205 0 0);
15
+ --muted: oklch(0.97 0 0);
16
+ --muted-foreground: oklch(0.556 0 0);
17
+ --accent: oklch(0.97 0 0);
18
+ --accent-foreground: oklch(0.205 0 0);
19
+ --destructive: oklch(0.577 0.245 27.325);
20
+ --border: oklch(0.922 0 0);
21
+ --input: oklch(0.922 0 0);
22
+ --ring: oklch(0.708 0 0);
23
+ --chart-1: #93c5fd;
24
+ --chart-2: #3b82f6;
25
+ --chart-3: #2563eb;
26
+ --chart-4: #1d4ed8;
27
+ --chart-5: #1e40af;
28
+ --sidebar: oklch(0.985 0 0);
29
+ --sidebar-foreground: oklch(0.145 0 0);
30
+ --sidebar-primary: oklch(0.205 0 0);
31
+ --sidebar-primary-foreground: oklch(0.985 0 0);
32
+ --sidebar-accent: oklch(0.97 0 0);
33
+ --sidebar-accent-foreground: oklch(0.205 0 0);
34
+ --sidebar-border: oklch(0.922 0 0);
35
+ --sidebar-ring: oklch(0.708 0 0);
36
+ --sidebar-width: 16rem;
37
+ --sidebar-mobile-width: 18rem;
38
+ --scrollbar-track: transparent;
39
+ --scrollbar-thumb: var(--border);
40
+ --scrollbar-width: 0.625rem;
41
+ --scrollbar-sm-width: 0.375rem;
42
+ --scrollbar-radius: 9999px;
43
+ --chevron-down-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.556 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground */
44
+ --chevron-down-icon-50: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.556 0 0 / 0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground + 50% opacity */
45
+ --check-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.556 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>'); /* --muted-foreground */
46
+ }
47
+
48
+ .dark {
49
+ --background: oklch(0.145 0 0);
50
+ --foreground: oklch(0.985 0 0);
51
+ --card: oklch(0.205 0 0);
52
+ --card-foreground: oklch(0.985 0 0);
53
+ --popover: oklch(0.205 0 0);
54
+ --popover-foreground: oklch(0.985 0 0);
55
+ --primary: oklch(0.922 0 0);
56
+ --primary-foreground: oklch(0.205 0 0);
57
+ --secondary: oklch(0.269 0 0);
58
+ --secondary-foreground: oklch(0.985 0 0);
59
+ --muted: oklch(0.269 0 0);
60
+ --muted-foreground: oklch(0.708 0 0);
61
+ --accent: oklch(0.371 0 0);
62
+ --accent-foreground: oklch(0.985 0 0);
63
+ --destructive: oklch(0.704 0.191 22.216);
64
+ --border: oklch(1 0 0 / 10%);
65
+ --input: oklch(1 0 0 / 15%);
66
+ --ring: oklch(0.556 0 0);
67
+ --chart-1: #93c5fd;
68
+ --chart-2: #3b82f6;
69
+ --chart-3: #2563eb;
70
+ --chart-4: #1d4ed8;
71
+ --chart-5: #1e40af;
72
+ --sidebar: oklch(0.205 0 0);
73
+ --sidebar-foreground: oklch(0.985 0 0);
74
+ --sidebar-primary: oklch(0.488 0.243 264.376);
75
+ --sidebar-primary-foreground: oklch(0.985 0 0);
76
+ --sidebar-accent: oklch(0.269 0 0);
77
+ --sidebar-accent-foreground: oklch(0.985 0 0);
78
+ --sidebar-border: oklch(1 0 0 / 10%);
79
+ --sidebar-ring: oklch(0.439 0 0);
80
+ --chevron-down-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.708 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground */
81
+ --chevron-down-icon-50: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.708 0 0 / 0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground + 50% opacity */
82
+ --check-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.708 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>');/* --muted-foreground */
83
+ color-scheme: dark;
84
+ }
85
+
86
+ @theme {
87
+ --font-sans: "Geist Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
88
+ --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
89
+ --radius-sm: calc(var(--radius) - 4px);
90
+ --radius-md: calc(var(--radius) - 2px);
91
+ --radius-lg: var(--radius);
92
+ --radius-xl: calc(var(--radius) + 4px);
93
+ --color-background: var(--background);
94
+ --color-foreground: var(--foreground);
95
+ --color-card: var(--card);
96
+ --color-card-foreground: var(--card-foreground);
97
+ --color-popover: var(--popover);
98
+ --color-popover-foreground: var(--popover-foreground);
99
+ --color-primary: var(--primary);
100
+ --color-primary-foreground: var(--primary-foreground);
101
+ --color-secondary: var(--secondary);
102
+ --color-secondary-foreground: var(--secondary-foreground);
103
+ --color-muted: var(--muted);
104
+ --color-muted-foreground: var(--muted-foreground);
105
+ --color-accent: var(--accent);
106
+ --color-accent-foreground: var(--accent-foreground);
107
+ --color-destructive: var(--destructive);
108
+ --color-border: var(--border);
109
+ --color-input: var(--input);
110
+ --color-ring: var(--ring);
111
+ --color-chart-1: var(--chart-1);
112
+ --color-chart-2: var(--chart-2);
113
+ --color-chart-3: var(--chart-3);
114
+ --color-chart-4: var(--chart-4);
115
+ --color-chart-5: var(--chart-5);
116
+ --color-sidebar: var(--sidebar);
117
+ --color-sidebar-foreground: var(--sidebar-foreground);
118
+ --color-sidebar-primary: var(--sidebar-primary);
119
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
120
+ --color-sidebar-accent: var(--sidebar-accent);
121
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
122
+ --color-sidebar-border: var(--sidebar-border);
123
+ --color-sidebar-ring: var(--sidebar-ring);
124
+ }
125
+
126
+ @layer base {
127
+ * {
128
+ @apply border-border outline-ring/50;
129
+ }
130
+ html {
131
+ @apply scroll-smooth;
132
+ }
133
+ body {
134
+ @apply bg-background text-foreground overscroll-none;
135
+ }
136
+ }
@@ -0,0 +1,2 @@
1
+ @import "./base/base.css";
2
+ @import "./basecoat-components.css";
@@ -0,0 +1,39 @@
1
+ /* Components */
2
+ @import "./components/accordion.css";
3
+ @import "./components/alert.css";
4
+ @import "./components/avatar.css";
5
+ @import "./components/badge.css";
6
+ @import "./components/breadcrumb.css";
7
+ @import "./components/button.css";
8
+ @import "./components/button-group.css";
9
+ @import "./components/card.css";
10
+ @import "./components/chart.css";
11
+ @import "./components/collapsible.css";
12
+ @import "./components/command.css";
13
+ @import "./components/combobox.css";
14
+ @import "./components/dialog.css";
15
+ @import "./components/drawer.css";
16
+ @import "./components/dropdown-menu.css";
17
+ @import "./components/empty.css";
18
+ @import "./components/field.css";
19
+ @import "./components/checkbox.css";
20
+ @import "./components/input.css";
21
+ @import "./components/item.css";
22
+ @import "./components/kbd.css";
23
+ @import "./components/label.css";
24
+ @import "./components/native-select.css";
25
+ @import "./components/popover.css";
26
+ @import "./components/progress.css";
27
+ @import "./components/radio.css";
28
+ @import "./components/range.css";
29
+ @import "./components/select.css";
30
+ @import "./components/sidebar.css";
31
+ @import "./components/scrollbar.css";
32
+ @import "./components/skeleton.css";
33
+ @import "./components/switch.css";
34
+ @import "./components/table.css";
35
+ @import "./components/tabs.css";
36
+ @import "./components/textarea.css";
37
+ @import "./components/input-group.css";
38
+ @import "./components/toast.css";
39
+ @import "./components/tooltip.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/luma.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/lyra.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/maia.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/mira.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/nova.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/rhea.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/sera.css";
@@ -0,0 +1,2 @@
1
+ @import "./basecoat-base.css";
2
+ @import "./styles/vega.css";
@@ -0,0 +1 @@
1
+ @import "./basecoat.css";
@@ -0,0 +1 @@
1
+ @import "./basecoat-vega.css";
@@ -0,0 +1,27 @@
1
+ /* Accordion */
2
+ @layer components {
3
+ .accordion {
4
+ @apply flex w-full flex-col;
5
+ }
6
+
7
+ .accordion > details > summary {
8
+ @apply relative flex w-full flex-1 cursor-pointer list-none items-start justify-between border border-transparent transition-all outline-none;
9
+ }
10
+
11
+ .accordion > details > summary > svg:last-child {
12
+ @apply pointer-events-none shrink-0 transition-transform;
13
+ }
14
+
15
+ .accordion > details[open] > summary > svg:last-child {
16
+ @apply rotate-180;
17
+ }
18
+
19
+ .accordion > details[aria-disabled='true'] > summary,
20
+ .accordion > details > summary[aria-disabled='true'] {
21
+ @apply pointer-events-none opacity-50;
22
+ }
23
+
24
+ .accordion > details > :not(summary) {
25
+ @apply overflow-hidden;
26
+ }
27
+ }
@@ -0,0 +1,38 @@
1
+ /* Alert */
2
+ @layer components {
3
+ .alert {
4
+ @apply relative w-full;
5
+ }
6
+
7
+ .alert:has(> footer) {
8
+ @apply pe-[4.5rem];
9
+ }
10
+
11
+ .alert > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
12
+ @apply min-h-4;
13
+ }
14
+
15
+ .alert > section {
16
+ @apply grid justify-items-start gap-1;
17
+
18
+ :where(p, ul, ol) {
19
+ @apply m-0;
20
+ }
21
+
22
+ :where(p, ul, ol):not(:last-child) {
23
+ @apply mb-4;
24
+ }
25
+
26
+ ul {
27
+ @apply list-inside list-disc;
28
+ }
29
+
30
+ ol {
31
+ @apply list-inside list-decimal;
32
+ }
33
+ }
34
+
35
+ .alert > footer {
36
+ @apply absolute;
37
+ }
38
+ }