@kolkrabbi/kol-theme 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,359 @@
1
+ /* ---------------------------------------------------------------------------
2
+ * Dashboard Grid — responsive via container queries
3
+ * --------------------------------------------------------------------------- */
4
+
5
+ .dash-grid {
6
+ display: grid;
7
+ grid-auto-flow: dense;
8
+ grid-template-columns: repeat(2, 1fr);
9
+ grid-auto-rows: minmax(240px, auto);
10
+ gap: 1rem;
11
+ width: 100%;
12
+ align-items: stretch;
13
+ }
14
+
15
+ @container (min-width: 540px) {
16
+ .dash-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
17
+ }
18
+ @container (min-width: 1024px) {
19
+ .dash-grid { gap: 1.5rem; }
20
+ }
21
+
22
+ /* On 2-col mobile grid, clamp oversized spans via data attribute + !important
23
+ to override inline styles. At 540px+ the grid is 4-col so no clamping needed. */
24
+ @container (max-width: 539px) {
25
+ .dash-grid > [data-cols="3"],
26
+ .dash-grid > [data-cols="4"] {
27
+ grid-column: span 2 !important;
28
+ }
29
+ }
30
+
31
+ /* Hide the scrollbar on the dashboard's horizontal strips (timeline, host
32
+ pills) while keeping them scrollable. Firefox uses scrollbar-width; WebKit
33
+ the pseudo-element. */
34
+ .scrollbar-none {
35
+ scrollbar-width: none;
36
+ -ms-overflow-style: none;
37
+ }
38
+ .scrollbar-none::-webkit-scrollbar {
39
+ display: none;
40
+ }
41
+
42
+ /* ---------------------------------------------------------------------------
43
+ * Dashboard Card Base
44
+ * --------------------------------------------------------------------------- */
45
+
46
+ .dash-card {
47
+ display: flex;
48
+ flex-direction: column;
49
+ gap: 1rem;
50
+ padding: 1rem;
51
+ background-color: color-mix(in srgb, var(--kol-surface-on-primary, currentColor) 2%, transparent);
52
+ border: 1px solid color-mix(in srgb, var(--kol-surface-on-primary, currentColor) 4%, transparent);
53
+ border-radius: 0.25rem;
54
+ overflow: visible;
55
+ min-height: 0;
56
+ }
57
+
58
+ @container (min-width: 768px) {
59
+ .dash-card {
60
+ padding: 1.5rem;
61
+ }
62
+ }
63
+
64
+ @container (min-width: 1024px) {
65
+ .dash-card {
66
+ padding: 2rem;
67
+ }
68
+ }
69
+
70
+ .dash-card__footer {
71
+ margin-top: auto;
72
+ padding-top: 1rem;
73
+ border-top: 1px solid color-mix(in srgb, var(--kol-surface-on-primary, currentColor) 8%, transparent);
74
+ }
75
+
76
+ /* ---------------------------------------------------------------------------
77
+ * Dashboard Typography (JetBrains Mono)
78
+ * --------------------------------------------------------------------------- */
79
+
80
+ /* Card titles — 16px → 20px, medium weight */
81
+ .dash-title {
82
+ font-family: var(--kol-font-family-mono);
83
+ font-weight: 500;
84
+ font-size: 16px;
85
+ line-height: 120%;
86
+ color: var(--kol-surface-on-primary);
87
+ }
88
+
89
+ @container (min-width: 768px) {
90
+ .dash-title {
91
+ font-size: 20px;
92
+ }
93
+ }
94
+
95
+ /* Big metric values — 24px → 32px, medium weight */
96
+ .dash-value {
97
+ font-family: var(--kol-font-family-mono);
98
+ font-weight: 500;
99
+ font-size: 24px;
100
+ line-height: 1;
101
+ color: var(--kol-surface-on-primary);
102
+ }
103
+
104
+ @container (min-width: 768px) {
105
+ .dash-value {
106
+ font-size: 28px;
107
+ }
108
+ }
109
+
110
+ @container (min-width: 1024px) {
111
+ .dash-value {
112
+ font-size: 32px;
113
+ }
114
+ }
115
+
116
+ /* Sub-headings — 16px → 22px, medium weight */
117
+ .dash-subtitle {
118
+ font-family: var(--kol-font-family-mono);
119
+ font-weight: 500;
120
+ font-size: 16px;
121
+ line-height: 125%;
122
+ color: var(--kol-surface-on-primary);
123
+ }
124
+
125
+ @container (min-width: 768px) {
126
+ .dash-subtitle {
127
+ font-size: 22px;
128
+ }
129
+ }
130
+
131
+ /* List items, descriptions — 12px → 14px, regular weight */
132
+ .dash-body {
133
+ font-family: var(--kol-font-family-mono);
134
+ font-weight: 400;
135
+ font-size: 12px;
136
+ line-height: 125%;
137
+ color: var(--kol-surface-on-primary);
138
+ }
139
+
140
+ @container (min-width: 768px) {
141
+ .dash-body {
142
+ font-size: 14px;
143
+ }
144
+ }
145
+
146
+ /* Footers, secondary text — 10px → 12px, regular weight */
147
+ .dash-detail {
148
+ font-family: var(--kol-font-family-mono);
149
+ font-weight: 400;
150
+ font-size: 10px;
151
+ line-height: 1;
152
+ color: var(--kol-surface-on-primary);
153
+ }
154
+
155
+ @container (min-width: 768px) {
156
+ .dash-detail {
157
+ font-size: 12px;
158
+ }
159
+ }
160
+
161
+ /* Chart axes, compact items, legends — 8px → 11px, regular weight */
162
+ .dash-caption {
163
+ font-family: var(--kol-font-family-mono);
164
+ font-weight: 400;
165
+ font-size: 8px;
166
+ line-height: 1;
167
+ color: var(--kol-surface-on-primary);
168
+ }
169
+
170
+ @container (min-width: 768px) {
171
+ .dash-caption {
172
+ font-size: 10px;
173
+ }
174
+ }
175
+
176
+ @container (min-width: 1024px) {
177
+ .dash-caption {
178
+ font-size: 11px;
179
+ }
180
+ }
181
+
182
+ /* ---------------------------------------------------------------------------
183
+ * Chart Utilities
184
+ * --------------------------------------------------------------------------- */
185
+
186
+ .chart__dot {
187
+ width: 8px;
188
+ height: 8px;
189
+ border-radius: 999px;
190
+ background-color: var(--chart-color-value, var(--kol-accent-primary));
191
+ transition: opacity 0.2s ease;
192
+ }
193
+
194
+ .chart__segment {
195
+ stroke: var(--chart-color-value, var(--kol-accent-primary));
196
+ fill: none;
197
+ transition: opacity 0.2s ease;
198
+ }
199
+
200
+ .chart__bar-fill {
201
+ height: 100%;
202
+ border-radius: 999px;
203
+ background-color: var(--chart-color-value, var(--kol-accent-primary));
204
+ transition: width 0.3s ease, opacity 0.2s ease;
205
+ }
206
+
207
+ .chart__dot.is-muted,
208
+ .chart__segment.is-muted,
209
+ .chart__bar-fill.is-muted {
210
+ opacity: 0.35;
211
+ }
212
+
213
+ /* ---------------------------------------------------------------------------
214
+ * Chart Color Classes (palette-based)
215
+ * --------------------------------------------------------------------------- */
216
+
217
+ .chart-color-blue { --chart-color-value: var(--kol-palette-blue); }
218
+ .chart-color-green { --chart-color-value: var(--kol-palette-green); }
219
+ .chart-color-yellow { --chart-color-value: var(--kol-palette-yellow); }
220
+ .chart-color-red { --chart-color-value: var(--kol-palette-red); }
221
+ .chart-color-orange { --chart-color-value: var(--kol-palette-orange); }
222
+ .chart-color-purple { --chart-color-value: var(--kol-palette-purple); }
223
+ .chart-color-teal { --chart-color-value: var(--kol-palette-teal); }
224
+
225
+ /* ---------------------------------------------------------------------------
226
+ * Chart Tooltips
227
+ * --------------------------------------------------------------------------- */
228
+
229
+ .dash-tooltip {
230
+ position: absolute;
231
+ left: var(--tx);
232
+ top: var(--ty);
233
+ transform: translate(-50%, -110%);
234
+ z-index: 10;
235
+ pointer-events: none;
236
+ display: inline-flex;
237
+ align-items: center;
238
+ padding: 0.125rem 0.25rem;
239
+ background-color: var(--kol-surface-primary);
240
+ border: 1px solid color-mix(in srgb, var(--kol-surface-on-primary, currentColor) 12%, transparent);
241
+ border-radius: 0.25rem;
242
+ white-space: nowrap;
243
+ line-height: 1;
244
+ }
245
+
246
+ .dash-chart-element--active {
247
+ filter: brightness(1.2);
248
+ }
249
+
250
+ /* ---------------------------------------------------------------------------
251
+ * Scatter Plot Hit Area
252
+ * --------------------------------------------------------------------------- */
253
+
254
+ .dash-scatter-point {
255
+ width: 10px;
256
+ height: 10px;
257
+ border-radius: 9999px;
258
+ }
259
+
260
+ .dash-scatter-point::before {
261
+ content: '';
262
+ position: absolute;
263
+ top: 50%;
264
+ left: 50%;
265
+ width: 12px;
266
+ height: 12px;
267
+ transform: translate(-50%, -50%);
268
+ }
269
+
270
+ /* ---------------------------------------------------------------------------
271
+ * List Item Hover
272
+ * --------------------------------------------------------------------------- */
273
+
274
+ .dash-list-item {
275
+ padding: 0.375rem 0.5rem;
276
+ margin: -0.375rem -0.5rem;
277
+ border-radius: 0.25rem;
278
+ transition: background-color 0.15s ease;
279
+ }
280
+
281
+ .dash-list-item:hover {
282
+ background-color: color-mix(in srgb, var(--kol-surface-on-primary) 4%, transparent);
283
+ }
284
+
285
+ .dash-list-item__detail {
286
+ max-height: 0;
287
+ overflow: hidden;
288
+ opacity: 0;
289
+ transition: max-height 0.2s ease, opacity 0.15s ease;
290
+ }
291
+
292
+ .dash-list-item:hover .dash-list-item__detail {
293
+ max-height: 2rem;
294
+ opacity: 1;
295
+ }
296
+
297
+ /* ---------------------------------------------------------------------------
298
+ * Metric Card Cycling
299
+ * --------------------------------------------------------------------------- */
300
+
301
+ .dash-metric--interactive {
302
+ cursor: pointer;
303
+ }
304
+
305
+ .dash-metric-dots {
306
+ display: flex;
307
+ gap: 0.375rem;
308
+ }
309
+
310
+ .dash-metric-dot {
311
+ width: 6px;
312
+ height: 6px;
313
+ border-radius: 9999px;
314
+ background-color: var(--kol-surface-on-primary);
315
+ opacity: 0.3;
316
+ transition: opacity 0.2s ease;
317
+ }
318
+
319
+ .dash-metric-dot--active {
320
+ opacity: 1;
321
+ }
322
+
323
+ .dash-metric-value {
324
+ transition: opacity 0.15s ease;
325
+ }
326
+
327
+ .dash-metric-value--fading {
328
+ opacity: 0;
329
+ }
330
+
331
+ /* ---------------------------------------------------------------------------
332
+ * Line Chart
333
+ * --------------------------------------------------------------------------- */
334
+
335
+ .dash-line-path {
336
+ stroke-width: 2;
337
+ fill: none;
338
+ }
339
+
340
+ .dash-line-area {
341
+ stroke: none;
342
+ }
343
+
344
+ /* ---------------------------------------------------------------------------
345
+ * Donut Chart
346
+ * --------------------------------------------------------------------------- */
347
+
348
+ .dash-donut-segment {
349
+ transition: opacity 0.2s ease;
350
+ }
351
+
352
+ /* ---------------------------------------------------------------------------
353
+ * Heatmap
354
+ * --------------------------------------------------------------------------- */
355
+
356
+ .dash-heatmap-cell {
357
+ border-radius: 2px;
358
+ transition: opacity 0.2s ease, filter 0.2s ease;
359
+ }