@barodoc/theme-docs 2.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/package.json +2 -2
  2. package/src/components/Breadcrumb.astro +8 -8
  3. package/src/components/CodeCopy.astro +14 -13
  4. package/src/components/DocHeader.tsx +24 -24
  5. package/src/components/DocsSidebar.tsx +11 -15
  6. package/src/components/LanguageSwitcher.astro +3 -3
  7. package/src/components/MobileNavSheet.tsx +1 -1
  8. package/src/components/Search.tsx +10 -10
  9. package/src/components/SearchDialog.tsx +8 -8
  10. package/src/components/TableOfContents.astro +5 -5
  11. package/src/components/ThemeToggle.tsx +4 -4
  12. package/src/components/api/ApiEndpoint.astro +5 -5
  13. package/src/components/api/ApiParam.astro +4 -4
  14. package/src/components/api/ApiParams.astro +3 -3
  15. package/src/components/api/ApiResponse.astro +2 -2
  16. package/src/components/mdx/Accordion.tsx +6 -6
  17. package/src/components/mdx/Badge.tsx +1 -1
  18. package/src/components/mdx/Callout.astro +20 -20
  19. package/src/components/mdx/Card.astro +5 -5
  20. package/src/components/mdx/CodeGroup.astro +23 -20
  21. package/src/components/mdx/CodeGroup.tsx +6 -6
  22. package/src/components/mdx/DocAccordion.tsx +5 -5
  23. package/src/components/mdx/DocCard.tsx +2 -2
  24. package/src/components/mdx/DocTabs.tsx +3 -3
  25. package/src/components/mdx/Expandable.tsx +11 -11
  26. package/src/components/mdx/FileTree.tsx +6 -6
  27. package/src/components/mdx/Frame.tsx +2 -2
  28. package/src/components/mdx/Mermaid.tsx +3 -3
  29. package/src/components/mdx/ParamField.tsx +7 -7
  30. package/src/components/mdx/ResponseField.tsx +6 -6
  31. package/src/components/mdx/Step.astro +2 -2
  32. package/src/components/mdx/Steps.astro +3 -3
  33. package/src/components/mdx/Steps.tsx +10 -19
  34. package/src/components/mdx/Tabs.tsx +5 -8
  35. package/src/components/mdx/Tooltip.tsx +20 -19
  36. package/src/components/ui/accordion.tsx +2 -2
  37. package/src/components/ui/alert.tsx +1 -1
  38. package/src/components/ui/button.tsx +3 -3
  39. package/src/components/ui/card.tsx +2 -2
  40. package/src/components/ui/dialog.tsx +2 -2
  41. package/src/components/ui/scroll-area.tsx +1 -1
  42. package/src/components/ui/separator.tsx +1 -1
  43. package/src/components/ui/sheet.tsx +3 -3
  44. package/src/components/ui/tabs.tsx +2 -2
  45. package/src/components/ui/tooltip.tsx +1 -1
  46. package/src/index.ts +6 -0
  47. package/src/layouts/BaseLayout.astro +7 -1
  48. package/src/layouts/DocsLayout.astro +39 -22
  49. package/src/pages/404.astro +5 -5
  50. package/src/pages/docs/[...slug].astro +2 -2
  51. package/src/pages/index.astro +21 -21
  52. package/src/styles/global.css +473 -166
@@ -1,11 +1,17 @@
1
1
  @import "tailwindcss";
2
2
  @plugin "@tailwindcss/typography";
3
3
 
4
- /* Scan theme package files */
5
4
  @source "../**/*.{astro,tsx}";
6
5
 
6
+ @custom-variant dark (&:where(.dark, .dark *));
7
+
8
+ /* ==========================================================================
9
+ Accent (primary) palette — generates Tailwind utilities:
10
+ bg-primary-600, text-primary-400, border-primary-500, etc.
11
+ Override via barodoc.config.json theme.colors.accent
12
+ ========================================================================== */
13
+
7
14
  @theme {
8
- /* Primary color palette - Blue */
9
15
  --color-primary-50: oklch(0.97 0.02 250);
10
16
  --color-primary-100: oklch(0.94 0.04 250);
11
17
  --color-primary-200: oklch(0.88 0.08 250);
@@ -19,40 +25,92 @@
19
25
  --color-primary-950: oklch(0.20 0.04 250);
20
26
  }
21
27
 
28
+ /* ==========================================================================
29
+ Gray scale — single source of truth, defined once.
30
+ Override via barodoc.config.json theme.colors.gray
31
+ Default: Zinc
32
+ ========================================================================== */
33
+
22
34
  @layer base {
23
35
  :root {
24
- /* Mintlify-style soft colors */
25
- --color-bg: #ffffff;
26
- --color-bg-secondary: #f8fafc;
27
- --color-bg-tertiary: #f1f5f9;
28
- --color-bg-hover: #f1f5f9;
29
- --color-text: #0f172a;
30
- --color-text-secondary: #64748b;
31
- --color-text-muted: #94a3b8;
32
- --color-border: #e2e8f0;
33
- --color-border-light: #f1f5f9;
34
-
35
- /* Shadows */
36
- --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
37
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
38
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
36
+ --bd-gray-50: #fafafa;
37
+ --bd-gray-100: #f4f4f5;
38
+ --bd-gray-200: #e4e4e7;
39
+ --bd-gray-300: #d4d4d8;
40
+ --bd-gray-400: #a1a1aa;
41
+ --bd-gray-500: #71717a;
42
+ --bd-gray-600: #52525b;
43
+ --bd-gray-700: #3f3f46;
44
+ --bd-gray-800: #27272a;
45
+ --bd-gray-900: #18181b;
46
+ --bd-gray-950: #09090b;
47
+ }
48
+
49
+ /* ==========================================================================
50
+ Semantic tokens map scale indices to roles.
51
+ Light/dark only swap which end of the scale each role points to.
52
+ ========================================================================== */
53
+
54
+ :root {
55
+ --bd-bg: #ffffff;
56
+ --bd-bg-subtle: var(--bd-gray-50);
57
+ --bd-bg-muted: var(--bd-gray-100);
58
+ --bd-bg-hover: var(--bd-gray-100);
59
+ --bd-bg-code: var(--bd-gray-50);
60
+
61
+ --bd-text: var(--bd-gray-900);
62
+ --bd-text-heading: var(--bd-gray-950);
63
+ --bd-text-secondary: var(--bd-gray-600);
64
+ --bd-text-muted: var(--bd-gray-400);
65
+
66
+ --bd-border: var(--bd-gray-200);
67
+ --bd-border-subtle: var(--bd-gray-100);
68
+
69
+ --bd-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
70
+ --bd-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
71
+ --bd-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
72
+
73
+ --bd-sidebar-active-bg: var(--color-primary-50);
74
+ --bd-sidebar-active-border: var(--color-primary-500);
75
+ --bd-sidebar-active-text: var(--color-primary-600);
76
+
77
+ /* Backward compat aliases */
78
+ --color-bg: var(--bd-bg);
79
+ --color-bg-secondary: var(--bd-bg-subtle);
80
+ --color-bg-tertiary: var(--bd-bg-muted);
81
+ --color-bg-hover: var(--bd-bg-hover);
82
+ --color-text: var(--bd-text);
83
+ --color-text-secondary: var(--bd-text-secondary);
84
+ --color-text-muted: var(--bd-text-muted);
85
+ --color-border: var(--bd-border);
86
+ --color-border-light: var(--bd-border-subtle);
87
+ --shadow-sm: var(--bd-shadow-sm);
88
+ --shadow-md: var(--bd-shadow-md);
89
+ --shadow-lg: var(--bd-shadow-lg);
39
90
  }
40
91
 
41
92
  .dark {
42
- --color-bg: #0c0c0c;
43
- --color-bg-secondary: #141414;
44
- --color-bg-tertiary: #1c1c1c;
45
- --color-bg-hover: #1c1c1c;
46
- --color-text: #fafafa;
47
- --color-text-secondary: #a1a1aa;
48
- --color-text-muted: #71717a;
49
- --color-border: #27272a;
50
- --color-border-light: #1c1c1c;
51
-
52
- /* Dark shadows */
53
- --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
54
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
55
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
93
+ --bd-bg: var(--bd-gray-950);
94
+ --bd-bg-subtle: var(--bd-gray-900);
95
+ --bd-bg-muted: var(--bd-gray-800);
96
+ --bd-bg-hover: var(--bd-gray-800);
97
+ --bd-bg-code: var(--bd-gray-900);
98
+
99
+ --bd-text: var(--bd-gray-200);
100
+ --bd-text-heading: var(--bd-gray-50);
101
+ --bd-text-secondary: var(--bd-gray-400);
102
+ --bd-text-muted: var(--bd-gray-500);
103
+
104
+ --bd-border: var(--bd-gray-800);
105
+ --bd-border-subtle: var(--bd-gray-900);
106
+
107
+ --bd-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
108
+ --bd-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.4);
109
+ --bd-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
110
+
111
+ --bd-sidebar-active-bg: var(--color-primary-950);
112
+ --bd-sidebar-active-border: var(--color-primary-400);
113
+ --bd-sidebar-active-text: var(--color-primary-400);
56
114
  }
57
115
 
58
116
  html {
@@ -60,199 +118,249 @@
60
118
  }
61
119
 
62
120
  body {
63
- background-color: var(--color-bg);
64
- color: var(--color-text);
121
+ background-color: var(--bd-bg);
122
+ color: var(--bd-text);
65
123
  font-feature-settings: "rlig" 1, "calt" 1;
66
124
  overflow-x: hidden;
67
125
  }
68
126
 
69
- /* Smooth transitions for all interactive elements */
70
127
  a, button, input, [role="button"] {
71
128
  transition: all 150ms ease-out;
72
129
  }
73
-
74
- /* Ensure cursor pointer for interactive elements */
130
+
75
131
  a[href], button, [role="button"] {
76
132
  cursor: pointer;
77
133
  }
78
134
  }
79
135
 
80
- /* Prose styling for MDX content - */
136
+ /* ==========================================================================
137
+ Prose / Typography overrides
138
+ Placed outside @layer so they override @tailwindcss/typography defaults
139
+ without needing !important.
140
+ ========================================================================== */
141
+
81
142
  .prose {
82
- --tw-prose-body: var(--color-text);
83
- --tw-prose-headings: var(--color-text);
143
+ --tw-prose-body: var(--bd-text);
144
+ --tw-prose-headings: var(--bd-text-heading);
145
+ --tw-prose-bold: var(--bd-text-heading);
84
146
  --tw-prose-links: var(--color-primary-600);
85
- --tw-prose-code: var(--color-text);
86
- --tw-prose-pre-bg: var(--color-bg-secondary);
87
- /* font-size: 0.875rem !important; */
88
- /* line-height: 1.6 !important; */
147
+ --tw-prose-code: var(--bd-text);
148
+ --tw-prose-pre-bg: var(--bd-bg-code);
149
+ --tw-prose-counters: var(--bd-text-muted);
150
+ --tw-prose-bullets: var(--bd-text-muted);
151
+ --tw-prose-quotes: var(--bd-text);
152
+ --tw-prose-quote-borders: var(--color-primary-500);
153
+ --tw-prose-captions: var(--bd-text-secondary);
154
+ --tw-prose-th-borders: var(--bd-border);
155
+ --tw-prose-td-borders: var(--bd-border);
89
156
  }
90
157
 
91
158
  .dark .prose {
92
159
  --tw-prose-links: var(--color-primary-400);
93
160
  }
94
161
 
95
- /* Headings - */
96
162
  .prose :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
97
- font-size: 1.75rem !important;
98
- font-weight: 700 !important;
99
- letter-spacing: -0.025em !important;
100
- margin-top: 0 !important;
101
- margin-bottom: 0.375rem !important;
102
- /* line-height: 1.25 !important; */
163
+ font-size: 2rem;
164
+ font-weight: 700;
165
+ letter-spacing: -0.03em;
166
+ line-height: 1.2;
167
+ margin-top: 0;
168
+ margin-bottom: 0.25rem;
103
169
  }
104
170
 
105
171
  .prose :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
106
- font-size: 1.1875rem !important;
107
- font-weight: 600 !important;
108
- letter-spacing: -0.02em !important;
109
- margin-top: 1.25rem !important;
110
- margin-bottom: 0.375rem !important;
111
- padding-bottom: 0.25rem !important;
112
- border-bottom: 1px solid var(--color-border) !important;
172
+ font-size: 1.25rem;
173
+ font-weight: 600;
174
+ letter-spacing: -0.02em;
175
+ line-height: 1.3;
176
+ margin-top: 2rem;
177
+ margin-bottom: 0.75rem;
113
178
  }
114
179
 
115
180
  .prose :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
116
- font-size: 1rem !important;
117
- font-weight: 600 !important;
118
- margin-top: 1rem !important;
119
- margin-bottom: 0.25rem !important;
181
+ font-size: 1.0625rem;
182
+ font-weight: 600;
183
+ line-height: 1.4;
184
+ margin-top: 1.5rem;
185
+ margin-bottom: 0.5rem;
120
186
  }
121
187
 
122
188
  .prose :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
123
- font-size: 0.9375rem !important;
124
- font-weight: 600 !important;
125
- margin-top: 0.875rem !important;
126
- margin-bottom: 0.25rem !important;
189
+ font-size: 0.9375rem;
190
+ font-weight: 600;
191
+ line-height: 1.4;
192
+ margin-top: 1.25rem;
193
+ margin-bottom: 0.375rem;
127
194
  }
128
195
 
129
- /* Paragraphs - tighter spacing */
130
196
  .prose :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
131
- margin-top: 0.5rem !important;
132
- margin-bottom: 0.5rem !important;
197
+ margin-top: 0.625rem;
198
+ margin-bottom: 0.625rem;
199
+ line-height: 1.7;
133
200
  }
134
201
 
135
- /* Links with underline on hover */
136
202
  .prose :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
137
- font-weight: 500 !important;
138
- text-decoration: none !important;
203
+ font-weight: 500;
204
+ text-decoration: underline;
205
+ text-decoration-color: color-mix(in srgb, var(--tw-prose-links) 35%, transparent);
206
+ text-underline-offset: 3px;
207
+ text-decoration-thickness: 1px;
208
+ transition: text-decoration-color 200ms ease;
139
209
  }
140
210
 
141
211
  .prose :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)):hover {
142
- text-decoration: underline !important;
143
- text-underline-offset: 2px !important;
212
+ text-decoration-color: var(--tw-prose-links);
144
213
  }
145
214
 
146
- /* Code block styling - */
147
215
  .prose :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
148
- background-color: var(--color-bg) !important;
149
- border: 1px solid var(--color-border) !important;
150
- border-radius: 0.5rem !important;
151
- padding: 0.75rem 1rem !important;
152
- font-size: 0.8125rem !important;
153
- line-height: 1.45 !important;
154
- overflow-x: auto !important;
155
- margin: 0.75rem 0 !important;
216
+ background-color: var(--bd-bg-code);
217
+ border: 1px solid var(--bd-border);
218
+ border-radius: 0.5rem;
219
+ padding: 0.875rem 1rem;
220
+ font-size: 0.8125rem;
221
+ line-height: 1.5;
222
+ overflow-x: auto;
223
+ margin: 1rem 0;
156
224
  }
157
225
 
158
226
  .prose :where(code):not(:where(pre code, [class~="not-prose"],[class~="not-prose"] *)) {
159
- background-color: var(--color-bg-tertiary) !important;
160
- padding: 0.125rem 0.375rem !important;
161
- border-radius: 0.25rem !important;
162
- font-size: 0.85em !important;
163
- font-weight: 500 !important;
164
- border: 1px solid var(--color-border) !important;
227
+ background-color: var(--bd-bg-muted);
228
+ padding: 0.125rem 0.375rem;
229
+ border-radius: 0.25rem;
230
+ font-size: 0.85em;
231
+ font-weight: 500;
232
+ border: 1px solid var(--bd-border);
165
233
  }
166
234
 
167
235
  .prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))::before,
168
236
  .prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))::after {
169
- content: none !important;
237
+ content: none;
170
238
  }
171
239
 
172
- /* Lists - tighter spacing */
173
240
  .prose :where(ul, ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
174
- margin-top: 0.375rem !important;
175
- margin-bottom: 0.375rem !important;
176
- padding-left: 1.25rem !important;
241
+ margin-top: 0.375rem;
242
+ margin-bottom: 0.375rem;
243
+ padding-left: 1.25rem;
177
244
  }
178
245
 
179
246
  .prose :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
180
- margin-top: 0.125rem !important;
181
- margin-bottom: 0.125rem !important;
247
+ margin-top: 0.125rem;
248
+ margin-bottom: 0.125rem;
182
249
  }
183
250
 
184
251
  .prose :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {
185
- color: var(--color-text-muted) !important;
252
+ color: var(--bd-text-muted);
186
253
  }
187
254
 
188
- /* Blockquotes - */
189
255
  .prose :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
190
- border-left: 3px solid var(--color-primary-500) !important;
191
- background-color: var(--color-bg-secondary) !important;
192
- padding: 0.5rem 0.75rem !important;
193
- margin: 0.625rem 0 !important;
194
- border-radius: 0 0.5rem 0.5rem 0 !important;
195
- font-style: normal !important;
256
+ border-left: 3px solid var(--color-primary-500);
257
+ background-color: var(--bd-bg-subtle);
258
+ padding: 0.5rem 0.75rem;
259
+ margin: 0.625rem 0;
260
+ border-radius: 0 0.5rem 0.5rem 0;
261
+ font-style: normal;
196
262
  }
197
263
 
198
264
  .prose :where(blockquote p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
199
- margin: 0 !important;
265
+ margin: 0;
200
266
  }
201
267
 
202
- /* Tables - cleaner look */
203
268
  .prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
204
- width: 100% !important;
205
- border-collapse: collapse !important;
206
- margin: 0.625rem 0 !important;
207
- font-size: 0.8125rem !important;
269
+ width: 100%;
270
+ border-collapse: collapse;
271
+ margin: 1rem 0;
272
+ font-size: 0.8125rem;
273
+ border: 1px solid var(--bd-border);
208
274
  }
209
275
 
210
276
  .prose :where(th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
211
- background-color: var(--color-bg-secondary) !important;
212
- font-weight: 600 !important;
213
- text-align: left !important;
214
- padding: 0.5rem 0.75rem !important;
215
- border-bottom: 2px solid var(--color-border) !important;
277
+ background-color: var(--bd-bg-subtle);
278
+ font-weight: 600;
279
+ text-align: left;
280
+ padding: 0.625rem 1rem;
281
+ border-bottom: 1px solid var(--bd-border);
282
+ font-size: 0.75rem;
283
+ text-transform: uppercase;
284
+ letter-spacing: 0.04em;
285
+ color: var(--bd-text-secondary);
216
286
  }
217
287
 
218
288
  .prose :where(td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
219
- padding: 0.5rem 0.75rem !important;
220
- border-bottom: 1px solid var(--color-border) !important;
289
+ padding: 0.625rem 1rem;
290
+ border-bottom: 1px solid var(--bd-border-subtle);
221
291
  }
222
292
 
223
293
  .prose :where(tr:last-child td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
224
- border-bottom: none !important;
294
+ border-bottom: none;
295
+ }
296
+
297
+ .prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)):hover {
298
+ background-color: var(--bd-bg-subtle);
225
299
  }
226
300
 
227
- /* Horizontal rule */
228
301
  .prose :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
229
- border: none !important;
230
- border-top: 1px solid var(--color-border) !important;
231
- margin: 1.5rem 0 !important;
302
+ border: none;
303
+ border-top: 1px solid var(--bd-border);
304
+ margin: 1.5rem 0;
232
305
  }
233
306
 
234
- /* Images */
235
307
  .prose :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
236
- border-radius: 0.5rem !important;
237
- border: 1px solid var(--color-border) !important;
308
+ border-radius: 0.5rem;
309
+ border: 1px solid var(--bd-border);
310
+ }
311
+
312
+ /* ==========================================================================
313
+ Heading anchors
314
+ ========================================================================== */
315
+
316
+ .prose :where(h2, h3, h4)[id] {
317
+ scroll-margin-top: 5rem;
318
+ }
319
+
320
+ .prose :where(h2, h3, h4)[id] > a.heading-anchor {
321
+ color: var(--color-primary-400);
322
+ opacity: 0;
323
+ margin-left: 0.25em;
324
+ font-weight: 400;
325
+ text-decoration: none !important;
326
+ transition: opacity 150ms ease;
327
+ }
328
+
329
+ .prose :where(h2, h3, h4)[id]:hover > a.heading-anchor {
330
+ opacity: 0.7;
331
+ }
332
+
333
+ .prose :where(h2, h3, h4)[id] > a.heading-anchor:hover {
334
+ opacity: 1;
335
+ }
336
+
337
+ /* ==========================================================================
338
+ List bullet accent
339
+ ========================================================================== */
340
+
341
+ .prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {
342
+ color: var(--color-primary-400);
238
343
  }
239
344
 
240
- /* Shiki dual theme support */
345
+ /* ==========================================================================
346
+ Shiki code highlighting
347
+ ========================================================================== */
348
+
241
349
  .astro-code {
242
- background-color: var(--color-bg) !important;
350
+ background-color: var(--bd-bg-code) !important;
243
351
  border-radius: 0.5rem;
244
- line-height: 1.45;
352
+ line-height: 1.5;
245
353
  }
246
354
 
247
355
  .astro-code code {
248
356
  display: flex;
249
357
  flex-direction: column;
358
+ font-size: 0.8125rem;
250
359
  }
251
360
 
252
- /* Tighter line spacing: Shiki outputs each line as span.line */
253
361
  .astro-code span.line {
254
362
  display: block;
255
- line-height: 1.45;
363
+ line-height: 1.6;
256
364
  margin: 0;
257
365
  padding: 0;
258
366
  }
@@ -263,7 +371,6 @@
263
371
  background-color: var(--shiki-dark-bg) !important;
264
372
  }
265
373
 
266
- /* Line numbers: applied when barodoc.config.json has "lineNumbers": true */
267
374
  .astro-code.line-numbers {
268
375
  counter-reset: line;
269
376
  }
@@ -280,22 +387,28 @@
280
387
  margin-right: 1rem;
281
388
  padding-right: 0.5rem;
282
389
  text-align: right;
283
- color: var(--color-text-muted);
390
+ color: var(--bd-text-muted);
284
391
  user-select: none;
285
- border-right: 1px solid var(--color-border);
392
+ border-right: 1px solid var(--bd-border);
286
393
  }
287
394
 
288
- /* Pagefind search styling */
395
+ /* ==========================================================================
396
+ Pagefind search
397
+ ========================================================================== */
398
+
289
399
  .pagefind-ui {
290
400
  --pagefind-ui-scale: 1;
291
401
  --pagefind-ui-primary: var(--color-primary-600);
292
- --pagefind-ui-text: var(--color-text);
293
- --pagefind-ui-background: var(--color-bg);
294
- --pagefind-ui-border: var(--color-border);
295
- --pagefind-ui-tag: var(--color-bg-secondary);
402
+ --pagefind-ui-text: var(--bd-text);
403
+ --pagefind-ui-background: var(--bd-bg);
404
+ --pagefind-ui-border: var(--bd-border);
405
+ --pagefind-ui-tag: var(--bd-bg-subtle);
296
406
  }
297
407
 
298
- /* Scrollbar styling */
408
+ /* ==========================================================================
409
+ Scrollbar
410
+ ========================================================================== */
411
+
299
412
  ::-webkit-scrollbar {
300
413
  width: 8px;
301
414
  height: 8px;
@@ -306,15 +419,40 @@
306
419
  }
307
420
 
308
421
  ::-webkit-scrollbar-thumb {
309
- background: var(--color-border);
422
+ background: var(--bd-border);
310
423
  border-radius: 4px;
311
424
  }
312
425
 
313
426
  ::-webkit-scrollbar-thumb:hover {
314
- background: var(--color-text-muted);
427
+ background: var(--bd-text-muted);
428
+ }
429
+
430
+ .sidebar-scroll {
431
+ scrollbar-width: thin;
432
+ scrollbar-color: transparent transparent;
433
+ }
434
+
435
+ .sidebar-scroll:hover {
436
+ scrollbar-color: var(--bd-border) transparent;
437
+ }
438
+
439
+ .sidebar-scroll::-webkit-scrollbar {
440
+ width: 6px;
441
+ }
442
+
443
+ .sidebar-scroll::-webkit-scrollbar-thumb {
444
+ background: transparent;
445
+ border-radius: 3px;
315
446
  }
316
447
 
317
- /* Selection styling */
448
+ .sidebar-scroll:hover::-webkit-scrollbar-thumb {
449
+ background: var(--bd-border);
450
+ }
451
+
452
+ /* ==========================================================================
453
+ Selection
454
+ ========================================================================== */
455
+
318
456
  ::selection {
319
457
  background-color: var(--color-primary-200);
320
458
  color: var(--color-primary-900);
@@ -325,41 +463,28 @@
325
463
  color: var(--color-primary-100);
326
464
  }
327
465
 
328
- /* Animations for shadcn/ui components */
466
+ /* ==========================================================================
467
+ Animations (Radix UI)
468
+ ========================================================================== */
469
+
329
470
  @keyframes accordion-down {
330
- from {
331
- height: 0;
332
- }
333
- to {
334
- height: var(--radix-accordion-content-height);
335
- }
471
+ from { height: 0; }
472
+ to { height: var(--radix-accordion-content-height); }
336
473
  }
337
474
 
338
475
  @keyframes accordion-up {
339
- from {
340
- height: var(--radix-accordion-content-height);
341
- }
342
- to {
343
- height: 0;
344
- }
476
+ from { height: var(--radix-accordion-content-height); }
477
+ to { height: 0; }
345
478
  }
346
479
 
347
480
  @keyframes collapsible-down {
348
- from {
349
- height: 0;
350
- }
351
- to {
352
- height: var(--radix-collapsible-content-height);
353
- }
481
+ from { height: 0; }
482
+ to { height: var(--radix-collapsible-content-height); }
354
483
  }
355
484
 
356
485
  @keyframes collapsible-up {
357
- from {
358
- height: var(--radix-collapsible-content-height);
359
- }
360
- to {
361
- height: 0;
362
- }
486
+ from { height: var(--radix-collapsible-content-height); }
487
+ to { height: 0; }
363
488
  }
364
489
 
365
490
  .animate-accordion-down {
@@ -377,3 +502,185 @@
377
502
  .animate-collapsible-up {
378
503
  animation: collapsible-up 0.2s ease-out;
379
504
  }
505
+
506
+ /* ==========================================================================
507
+ Steps component
508
+ ========================================================================== */
509
+
510
+ .bd-steps {
511
+ counter-reset: bd-step;
512
+ display: flex;
513
+ flex-direction: column;
514
+ gap: 0;
515
+ margin: 1.5rem 0;
516
+ }
517
+
518
+ .bd-step {
519
+ display: grid;
520
+ grid-template-columns: 2rem 1fr;
521
+ gap: 0 0.875rem;
522
+ counter-increment: bd-step;
523
+ min-height: 0;
524
+ }
525
+
526
+ .bd-step-indicator {
527
+ display: flex;
528
+ flex-direction: column;
529
+ align-items: center;
530
+ grid-row: 1 / -1;
531
+ }
532
+
533
+ .bd-step-number {
534
+ flex-shrink: 0;
535
+ display: flex;
536
+ align-items: center;
537
+ justify-content: center;
538
+ width: 2rem;
539
+ height: 2rem;
540
+ border-radius: 9999px;
541
+ font-size: 0.8125rem;
542
+ font-weight: 600;
543
+ background-color: var(--color-primary-500);
544
+ color: #fff;
545
+ }
546
+
547
+ .bd-step-number::before {
548
+ content: counter(bd-step);
549
+ }
550
+
551
+ .dark .bd-step-number {
552
+ background-color: var(--color-primary-400);
553
+ color: var(--color-primary-950);
554
+ }
555
+
556
+ .bd-step-connector {
557
+ flex: 1;
558
+ width: 2px;
559
+ background-color: var(--bd-border);
560
+ margin: 0.375rem 0 0;
561
+ min-height: 0.75rem;
562
+ }
563
+
564
+ .bd-step:last-child .bd-step-connector {
565
+ display: none;
566
+ }
567
+
568
+ .bd-step-content {
569
+ padding-bottom: 1.75rem;
570
+ }
571
+
572
+ .bd-step:last-child .bd-step-content {
573
+ padding-bottom: 0;
574
+ }
575
+
576
+ .bd-step-title {
577
+ font-size: 0.9375rem;
578
+ font-weight: 600;
579
+ color: var(--bd-text);
580
+ line-height: 2rem;
581
+ margin: 0;
582
+ }
583
+
584
+ .bd-step-body {
585
+ margin-top: 0.375rem;
586
+ font-size: 0.875rem;
587
+ color: var(--bd-text-secondary);
588
+ }
589
+
590
+ .bd-step-body > p {
591
+ margin: 0;
592
+ }
593
+
594
+ .bd-step-body > p + p {
595
+ margin-top: 0.5rem;
596
+ }
597
+
598
+ .bd-step-body .code-block-wrapper {
599
+ margin-top: 0.5rem;
600
+ }
601
+
602
+ /* ==========================================================================
603
+ Tooltip component
604
+ ========================================================================== */
605
+
606
+ .bd-tooltip-trigger {
607
+ cursor: help;
608
+ text-decoration: underline;
609
+ text-decoration-style: dotted;
610
+ text-decoration-color: var(--color-primary-400);
611
+ text-underline-offset: 3px;
612
+ text-decoration-thickness: 1.5px;
613
+ color: var(--bd-text);
614
+ border-radius: 2px;
615
+ transition: background-color 150ms ease, text-decoration-color 150ms ease;
616
+ }
617
+
618
+ .bd-tooltip-trigger:hover {
619
+ background-color: color-mix(in srgb, var(--color-primary-400) 12%, transparent);
620
+ text-decoration-color: var(--color-primary-500);
621
+ }
622
+
623
+ .dark .bd-tooltip-trigger:hover {
624
+ background-color: color-mix(in srgb, var(--color-primary-400) 15%, transparent);
625
+ }
626
+
627
+ .bd-tooltip-content {
628
+ z-index: 9999;
629
+ max-width: 20rem;
630
+ overflow: hidden;
631
+ border-radius: 0.5rem;
632
+ padding: 0.5rem 0.75rem;
633
+ font-size: 0.8125rem;
634
+ line-height: 1.5;
635
+ font-weight: 450;
636
+ letter-spacing: -0.01em;
637
+ background-color: var(--bd-gray-900);
638
+ color: var(--bd-gray-100);
639
+ box-shadow:
640
+ 0 4px 16px -2px rgba(0, 0, 0, 0.2),
641
+ 0 0 0 1px rgba(0, 0, 0, 0.06);
642
+ animation: tooltip-in 150ms cubic-bezier(0.16, 1, 0.3, 1);
643
+ transform-origin: var(--radix-tooltip-content-transform-origin);
644
+ }
645
+
646
+ .dark .bd-tooltip-content {
647
+ background-color: var(--bd-gray-100);
648
+ color: var(--bd-gray-900);
649
+ box-shadow:
650
+ 0 4px 20px -2px rgba(0, 0, 0, 0.4),
651
+ 0 0 0 1px rgba(255, 255, 255, 0.08);
652
+ }
653
+
654
+ .bd-tooltip-content[data-state="closed"] {
655
+ animation: tooltip-out 100ms ease-in;
656
+ }
657
+
658
+ .bd-tooltip-arrow {
659
+ fill: var(--bd-gray-900);
660
+ }
661
+
662
+ .dark .bd-tooltip-arrow {
663
+ fill: var(--bd-gray-100);
664
+ }
665
+
666
+ @keyframes tooltip-in {
667
+ from {
668
+ opacity: 0;
669
+ transform: scale(0.96) translateY(2px);
670
+ }
671
+ to {
672
+ opacity: 1;
673
+ transform: scale(1) translateY(0);
674
+ }
675
+ }
676
+
677
+ @keyframes tooltip-out {
678
+ from {
679
+ opacity: 1;
680
+ transform: scale(1) translateY(0);
681
+ }
682
+ to {
683
+ opacity: 0;
684
+ transform: scale(0.96) translateY(2px);
685
+ }
686
+ }