@mobile-reality/mdma-renderer-react 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/styles.css CHANGED
@@ -1,7 +1,213 @@
1
+ /* ===== MDMA Theme Tokens =====
2
+ *
3
+ * Every color/radius/size below is driven by a CSS custom property so the look
4
+ * can be themed without touching component markup. The default values encode
5
+ * the built-in *light* theme, so importing this stylesheet with no theme set
6
+ * renders exactly as before — theming is opt-in.
7
+ *
8
+ * How the knobs are set:
9
+ * - No theme → these defaults apply (light).
10
+ * - theme="light|dark" → `data-theme` on the root swaps the palette (below).
11
+ * - theme="auto" → follows `prefers-color-scheme`.
12
+ * - a custom MdmaTheme → `MdmaThemeProvider` writes the public `--mdma-*`
13
+ * tokens inline on the root, overriding these.
14
+ *
15
+ * `--mdma-color-*` names ending without a `-text`/`-bg` suffix that also appear
16
+ * on the `MdmaTheme` TS type are the *public* tokens a custom theme can set.
17
+ * The rest are internal derivations that follow the light/dark palette.
18
+ */
19
+ .mdma-document,
20
+ .mdma-theme-root {
21
+ /* Public palette (mirrors the MdmaTheme `colors` shape) */
22
+ --mdma-color-background: #ffffff;
23
+ --mdma-color-surface: #f8f9fa;
24
+ --mdma-color-text: #333333;
25
+ --mdma-color-text-muted: #666666;
26
+ --mdma-color-border: #e0e0e0;
27
+ --mdma-color-primary: #6c5ce7;
28
+ --mdma-color-on-primary: #ffffff;
29
+ --mdma-color-secondary: #dfe6e9;
30
+ --mdma-color-on-secondary: #2d3436;
31
+ --mdma-color-danger: #e74c3c;
32
+ --mdma-color-on-danger: #ffffff;
33
+ --mdma-color-info: #3498db;
34
+ --mdma-color-info-bg: #ebf5fb;
35
+ --mdma-color-warning: #f39c12;
36
+ --mdma-color-warning-bg: #fef9e7;
37
+ --mdma-color-error: #e74c3c;
38
+ --mdma-color-error-bg: #fdedec;
39
+ --mdma-color-success: #27ae60;
40
+ --mdma-color-success-bg: #eafaf1;
41
+
42
+ /* Internal derivations (follow the palette; not on the public TS type) */
43
+ --mdma-color-heading: #1a1a2e;
44
+ --mdma-color-text-subtle: #555555;
45
+ --mdma-color-border-subtle: #f0f0f0;
46
+ --mdma-color-primary-hover: color-mix(in srgb, var(--mdma-color-primary) 85%, #000000);
47
+ --mdma-color-secondary-hover: color-mix(in srgb, var(--mdma-color-secondary) 88%, #000000);
48
+ --mdma-color-danger-hover: color-mix(in srgb, var(--mdma-color-danger) 84%, #000000);
49
+ --mdma-color-input-bg: #fafafa;
50
+ --mdma-color-focus-ring: color-mix(in srgb, var(--mdma-color-primary) 22%, transparent);
51
+ --mdma-color-info-text: #1a5276;
52
+ --mdma-color-warning-text: #7d6608;
53
+ --mdma-color-error-text: #78281f;
54
+ --mdma-color-success-text: #1e8449;
55
+ --mdma-color-code-bg: #1e1e2e;
56
+ --mdma-color-code-text: #e0e0e0;
57
+ --mdma-color-inline-code-bg: #f0f0f5;
58
+ --mdma-color-inline-code-text: #c0392b;
59
+ --mdma-color-loading-bg: #ffffff;
60
+ --mdma-color-loading-border: #c4bfff;
61
+ --mdma-color-loading-accent: #6c63ff;
62
+ --mdma-color-loading-text: #8b82d4;
63
+ --mdma-color-table-header-bg: #f8f9fa;
64
+ --mdma-color-row-hover: #f8f9fa;
65
+ --mdma-color-blockquote-bg: #f8f8ff;
66
+ --mdma-color-chart-bg: rgba(255, 255, 255, 0.02);
67
+ --mdma-color-chart-border: rgba(108, 92, 231, 0.15);
68
+ --mdma-color-chart-label: #a29bfe;
69
+ --mdma-color-chart-axis: #636e72;
70
+ --mdma-color-chart-legend: #b2bec3;
71
+ --mdma-color-chart-tooltip-bg: #1a1a2e;
72
+ --mdma-color-unknown-bg: #fff3cd;
73
+ --mdma-color-unknown-border: #ffc107;
74
+ --mdma-color-unknown-text: #856404;
75
+
76
+ /* Radius / spacing / font-size scales (mirror the MdmaTheme numeric tokens) */
77
+ --mdma-radius-sm: 6px;
78
+ --mdma-radius-md: 10px;
79
+ --mdma-spacing-xs: 4px;
80
+ --mdma-spacing-sm: 8px;
81
+ --mdma-spacing-md: 12px;
82
+ --mdma-spacing-lg: 16px;
83
+ --mdma-font-size-small: 13px;
84
+ --mdma-font-size-body: 14px;
85
+ --mdma-font-size-label: 15px;
86
+ --mdma-font-size-title: 18px;
87
+ }
88
+
89
+ /* ===== Built-in dark palette ===== */
90
+ .mdma-document[data-theme="dark"],
91
+ .mdma-theme-root[data-theme="dark"] {
92
+ --mdma-color-background: #151a26;
93
+ --mdma-color-surface: #1c2333;
94
+ --mdma-color-text: #e5e7eb;
95
+ --mdma-color-text-muted: #9ca3af;
96
+ --mdma-color-border: #2a3140;
97
+ --mdma-color-primary: #8b7ff0;
98
+ --mdma-color-on-primary: #ffffff;
99
+ --mdma-color-secondary: #2a3140;
100
+ --mdma-color-on-secondary: #e5e7eb;
101
+ --mdma-color-danger: #ef4444;
102
+ --mdma-color-on-danger: #ffffff;
103
+ --mdma-color-info: #5dade2;
104
+ --mdma-color-info-bg: #16283a;
105
+ --mdma-color-warning: #f5b041;
106
+ --mdma-color-warning-bg: #2a2412;
107
+ --mdma-color-error: #ef4444;
108
+ --mdma-color-error-bg: #2a1717;
109
+ --mdma-color-success: #2ecc71;
110
+ --mdma-color-success-bg: #12251a;
111
+
112
+ --mdma-color-heading: #f3f4f6;
113
+ --mdma-color-text-subtle: #cbd0d8;
114
+ --mdma-color-border-subtle: #232a38;
115
+ --mdma-color-primary-hover: color-mix(in srgb, var(--mdma-color-primary) 80%, #ffffff);
116
+ --mdma-color-secondary-hover: color-mix(in srgb, var(--mdma-color-secondary) 78%, #ffffff);
117
+ --mdma-color-danger-hover: color-mix(in srgb, var(--mdma-color-danger) 80%, #ffffff);
118
+ --mdma-color-input-bg: #10141d;
119
+ --mdma-color-focus-ring: color-mix(in srgb, var(--mdma-color-primary) 35%, transparent);
120
+ --mdma-color-info-text: #aed6f1;
121
+ --mdma-color-warning-text: #f8c471;
122
+ --mdma-color-error-text: #f5b7b1;
123
+ --mdma-color-success-text: #a9dfbf;
124
+ --mdma-color-code-bg: #0d1017;
125
+ --mdma-color-code-text: #e0e0e0;
126
+ --mdma-color-inline-code-bg: #232a38;
127
+ --mdma-color-inline-code-text: #f19999;
128
+ --mdma-color-loading-bg: #1c2333;
129
+ --mdma-color-loading-border: #3a3466;
130
+ --mdma-color-loading-accent: #8b7ff0;
131
+ --mdma-color-loading-text: #a29bfe;
132
+ --mdma-color-table-header-bg: #1c2333;
133
+ --mdma-color-row-hover: #1c2333;
134
+ --mdma-color-blockquote-bg: #1c2333;
135
+ --mdma-color-chart-bg: rgba(255, 255, 255, 0.02);
136
+ --mdma-color-chart-border: rgba(162, 155, 254, 0.2);
137
+ --mdma-color-chart-label: #a29bfe;
138
+ --mdma-color-chart-axis: #9ca3af;
139
+ --mdma-color-chart-legend: #b2bec3;
140
+ --mdma-color-chart-tooltip-bg: #0d1017;
141
+ --mdma-color-unknown-bg: #2a2412;
142
+ --mdma-color-unknown-border: #b7950b;
143
+ --mdma-color-unknown-text: #f8c471;
144
+ }
145
+
146
+ /* theme="auto" — same dark palette, gated on the OS preference. */
147
+ @media (prefers-color-scheme: dark) {
148
+ .mdma-document[data-theme="auto"],
149
+ .mdma-theme-root[data-theme="auto"] {
150
+ --mdma-color-background: #151a26;
151
+ --mdma-color-surface: #1c2333;
152
+ --mdma-color-text: #e5e7eb;
153
+ --mdma-color-text-muted: #9ca3af;
154
+ --mdma-color-border: #2a3140;
155
+ --mdma-color-primary: #8b7ff0;
156
+ --mdma-color-on-primary: #ffffff;
157
+ --mdma-color-secondary: #2a3140;
158
+ --mdma-color-on-secondary: #e5e7eb;
159
+ --mdma-color-danger: #ef4444;
160
+ --mdma-color-on-danger: #ffffff;
161
+ --mdma-color-info: #5dade2;
162
+ --mdma-color-info-bg: #16283a;
163
+ --mdma-color-warning: #f5b041;
164
+ --mdma-color-warning-bg: #2a2412;
165
+ --mdma-color-error: #ef4444;
166
+ --mdma-color-error-bg: #2a1717;
167
+ --mdma-color-success: #2ecc71;
168
+ --mdma-color-success-bg: #12251a;
169
+
170
+ --mdma-color-heading: #f3f4f6;
171
+ --mdma-color-text-subtle: #cbd0d8;
172
+ --mdma-color-border-subtle: #232a38;
173
+ --mdma-color-primary-hover: color-mix(in srgb, var(--mdma-color-primary) 80%, #ffffff);
174
+ --mdma-color-secondary-hover: color-mix(in srgb, var(--mdma-color-secondary) 78%, #ffffff);
175
+ --mdma-color-danger-hover: color-mix(in srgb, var(--mdma-color-danger) 80%, #ffffff);
176
+ --mdma-color-input-bg: #10141d;
177
+ --mdma-color-focus-ring: color-mix(in srgb, var(--mdma-color-primary) 35%, transparent);
178
+ --mdma-color-info-text: #aed6f1;
179
+ --mdma-color-warning-text: #f8c471;
180
+ --mdma-color-error-text: #f5b7b1;
181
+ --mdma-color-success-text: #a9dfbf;
182
+ --mdma-color-code-bg: #0d1017;
183
+ --mdma-color-code-text: #e0e0e0;
184
+ --mdma-color-inline-code-bg: #232a38;
185
+ --mdma-color-inline-code-text: #f19999;
186
+ --mdma-color-loading-bg: #1c2333;
187
+ --mdma-color-loading-border: #3a3466;
188
+ --mdma-color-loading-accent: #8b7ff0;
189
+ --mdma-color-loading-text: #a29bfe;
190
+ --mdma-color-table-header-bg: #1c2333;
191
+ --mdma-color-row-hover: #1c2333;
192
+ --mdma-color-blockquote-bg: #1c2333;
193
+ --mdma-color-chart-bg: rgba(255, 255, 255, 0.02);
194
+ --mdma-color-chart-border: rgba(162, 155, 254, 0.2);
195
+ --mdma-color-chart-label: #a29bfe;
196
+ --mdma-color-chart-axis: #9ca3af;
197
+ --mdma-color-chart-legend: #b2bec3;
198
+ --mdma-color-chart-tooltip-bg: #0d1017;
199
+ --mdma-color-unknown-bg: #2a2412;
200
+ --mdma-color-unknown-border: #b7950b;
201
+ --mdma-color-unknown-text: #f8c471;
202
+ }
203
+ }
204
+
1
205
  /* ===== MDMA Document ===== */
2
206
  .mdma-document {
3
207
  max-width: 720px;
4
208
  margin: 0 auto;
209
+ color: var(--mdma-color-text);
210
+ font-size: var(--mdma-font-size-body);
5
211
  }
6
212
 
7
213
  /* ===== Entrance animation for all MDMA children ===== */
@@ -35,9 +241,9 @@
35
241
  .mdma-block-loading {
36
242
  position: relative;
37
243
  overflow: hidden;
38
- background: #fff;
39
- border: 1px dashed #c4bfff;
40
- border-radius: 10px;
244
+ background: var(--mdma-color-loading-bg);
245
+ border: 1px dashed var(--mdma-color-loading-border);
246
+ border-radius: var(--mdma-radius-md);
41
247
  padding: 28px 24px;
42
248
  margin-bottom: 20px;
43
249
  min-height: 80px;
@@ -75,7 +281,7 @@
75
281
  display: flex;
76
282
  align-items: center;
77
283
  gap: 10px;
78
- color: #8b82d4;
284
+ color: var(--mdma-color-loading-text);
79
285
  font-size: 13px;
80
286
  }
81
287
 
@@ -83,7 +289,7 @@
83
289
  width: 18px;
84
290
  height: 18px;
85
291
  border: 2px solid rgba(108, 99, 255, 0.2);
86
- border-top-color: #6c63ff;
292
+ border-top-color: var(--mdma-color-loading-accent);
87
293
  border-radius: 50%;
88
294
  animation: mdma-spin 0.8s linear infinite;
89
295
  }
@@ -136,7 +342,7 @@
136
342
  margin: 16px 0 8px;
137
343
  font-weight: 600;
138
344
  line-height: 1.3;
139
- color: #1a1a2e;
345
+ color: var(--mdma-color-heading);
140
346
  }
141
347
 
142
348
  .mdma-markdown-content h1 {
@@ -178,9 +384,9 @@
178
384
  .mdma-markdown-content blockquote {
179
385
  margin: 0 0 10px;
180
386
  padding: 8px 16px;
181
- border-left: 3px solid #6c63ff;
182
- background: #f8f8ff;
183
- color: #444;
387
+ border-left: 3px solid var(--mdma-color-primary);
388
+ background: var(--mdma-color-blockquote-bg);
389
+ color: var(--mdma-color-text-subtle);
184
390
  }
185
391
 
186
392
  .mdma-markdown-content blockquote p:last-child {
@@ -190,9 +396,9 @@
190
396
  .mdma-markdown-content pre.mdast-code-block {
191
397
  margin: 0 0 10px;
192
398
  padding: 12px 16px;
193
- background: #1e1e2e;
194
- color: #e0e0e0;
195
- border-radius: 6px;
399
+ background: var(--mdma-color-code-bg);
400
+ color: var(--mdma-color-code-text);
401
+ border-radius: var(--mdma-radius-sm);
196
402
  overflow-x: auto;
197
403
  font-size: 13px;
198
404
  line-height: 1.5;
@@ -206,21 +412,21 @@
206
412
  }
207
413
 
208
414
  .mdma-markdown-content code.mdast-inline-code {
209
- background: #f0f0f5;
415
+ background: var(--mdma-color-inline-code-bg);
210
416
  padding: 2px 6px;
211
417
  border-radius: 3px;
212
418
  font-size: 0.9em;
213
- color: #c0392b;
419
+ color: var(--mdma-color-inline-code-text);
214
420
  }
215
421
 
216
422
  .mdma-markdown-content hr {
217
423
  margin: 16px 0;
218
424
  border: none;
219
- border-top: 1px solid #ddd;
425
+ border-top: 1px solid var(--mdma-color-border);
220
426
  }
221
427
 
222
428
  .mdma-markdown-content a {
223
- color: #6c63ff;
429
+ color: var(--mdma-color-primary);
224
430
  text-decoration: none;
225
431
  }
226
432
 
@@ -231,7 +437,7 @@
231
437
  .mdma-markdown-content img {
232
438
  max-width: 100%;
233
439
  height: auto;
234
- border-radius: 6px;
440
+ border-radius: var(--mdma-radius-sm);
235
441
  }
236
442
 
237
443
  .mdma-markdown-content table.mdast-table {
@@ -244,17 +450,17 @@
244
450
  .mdma-markdown-content table.mdast-table th,
245
451
  .mdma-markdown-content table.mdast-table td {
246
452
  padding: 8px 12px;
247
- border: 1px solid #e0e0e0;
453
+ border: 1px solid var(--mdma-color-border);
248
454
  text-align: left;
249
455
  }
250
456
 
251
457
  .mdma-markdown-content table.mdast-table th {
252
- background: #f5f6fa;
458
+ background: var(--mdma-color-table-header-bg);
253
459
  font-weight: 600;
254
460
  }
255
461
 
256
462
  .mdma-markdown-content table.mdast-table tbody tr:hover {
257
- background: #f9f9fc;
463
+ background: var(--mdma-color-row-hover);
258
464
  }
259
465
 
260
466
  .mdma-markdown-content strong {
@@ -267,39 +473,40 @@
267
473
 
268
474
  .mdma-markdown-content del {
269
475
  text-decoration: line-through;
270
- color: #888;
476
+ color: var(--mdma-color-text-muted);
271
477
  }
272
478
 
273
479
  /* ===== Form ===== */
274
480
  .mdma-form {
275
- background: #fff;
276
- border: 1px solid #e0e0e0;
277
- border-radius: 10px;
481
+ background: var(--mdma-color-background);
482
+ border: 1px solid var(--mdma-color-border);
483
+ border-radius: var(--mdma-radius-md);
278
484
  padding: 24px;
279
485
  margin-bottom: 20px;
280
486
  }
281
487
 
282
488
  .mdma-form-label {
283
- font-size: 18px;
489
+ font-size: var(--mdma-font-size-title);
284
490
  font-weight: 600;
285
491
  margin-bottom: 16px;
286
- color: #1a1a2e;
492
+ color: var(--mdma-color-heading);
287
493
  }
288
494
 
289
495
  .mdma-form-field {
290
- margin-bottom: 16px;
496
+ margin-bottom: var(--mdma-spacing-lg);
291
497
  }
292
498
 
293
499
  .mdma-form-field label {
294
500
  display: block;
295
501
  font-size: 13px;
296
502
  font-weight: 600;
297
- color: #444;
298
- margin-bottom: 4px;
503
+ color: var(--mdma-color-text-subtle);
504
+ margin-bottom: var(--mdma-spacing-xs);
299
505
  }
300
506
 
301
507
  .mdma-form-field input[type="text"],
302
508
  .mdma-form-field input[type="email"],
509
+ .mdma-form-field input[type="password"],
303
510
  .mdma-form-field input[type="number"],
304
511
  .mdma-form-field input[type="datetime"],
305
512
  .mdma-form-field input[type="datetime-local"],
@@ -308,10 +515,10 @@
308
515
  width: 100%;
309
516
  padding: 8px 12px;
310
517
  font-size: 14px;
311
- border: 1px solid #d1d5db;
312
- border-radius: 6px;
313
- background: #fafafa;
314
- color: #1a1a2e;
518
+ border: 1px solid var(--mdma-color-border);
519
+ border-radius: var(--mdma-radius-sm);
520
+ background: var(--mdma-color-input-bg);
521
+ color: var(--mdma-color-text);
315
522
  transition: border-color 0.15s, box-shadow 0.15s;
316
523
  outline: none;
317
524
  }
@@ -319,8 +526,8 @@
319
526
  .mdma-form-field input:focus,
320
527
  .mdma-form-field select:focus,
321
528
  .mdma-form-field textarea:focus {
322
- border-color: #6c5ce7;
323
- box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
529
+ border-color: var(--mdma-color-primary);
530
+ box-shadow: 0 0 0 3px var(--mdma-color-focus-ring);
324
531
  }
325
532
 
326
533
  .mdma-form-field textarea {
@@ -331,7 +538,51 @@
331
538
  .mdma-form-field input[type="checkbox"] {
332
539
  width: auto;
333
540
  margin-right: 8px;
334
- accent-color: #6c5ce7;
541
+ accent-color: var(--mdma-color-primary);
542
+ }
543
+
544
+ .mdma-input-wrapper {
545
+ display: flex;
546
+ align-items: center;
547
+ position: relative;
548
+ }
549
+
550
+ .mdma-input-wrapper input,
551
+ .mdma-input-wrapper textarea {
552
+ flex: 1;
553
+ padding-right: 36px;
554
+ }
555
+
556
+ .mdma-sensitive-toggle {
557
+ position: absolute;
558
+ right: 8px;
559
+ top: 50%;
560
+ transform: translateY(-50%);
561
+ background: none;
562
+ border: none;
563
+ cursor: pointer;
564
+ font-size: 11px;
565
+ font-weight: 600;
566
+ letter-spacing: 0.04em;
567
+ color: var(--mdma-color-primary);
568
+ padding: 2px 4px;
569
+ opacity: 0.7;
570
+ transition: opacity 0.15s;
571
+ }
572
+
573
+ .mdma-sensitive-toggle:hover {
574
+ opacity: 1;
575
+ }
576
+
577
+ /* File inputs stack their file list below, so the wrapper is a column, not an overlay row. */
578
+ .mdma-input--file {
579
+ flex-direction: column;
580
+ align-items: flex-start;
581
+ gap: 8px;
582
+ }
583
+
584
+ .mdma-input--file input[type="file"] {
585
+ padding-right: 0;
335
586
  }
336
587
 
337
588
  .mdma-form-submit {
@@ -339,16 +590,16 @@
339
590
  padding: 8px 20px;
340
591
  font-size: 14px;
341
592
  font-weight: 600;
342
- color: #fff;
343
- background: #6c5ce7;
593
+ color: var(--mdma-color-on-primary);
594
+ background: var(--mdma-color-primary);
344
595
  border: none;
345
- border-radius: 6px;
596
+ border-radius: var(--mdma-radius-sm);
346
597
  cursor: pointer;
347
598
  transition: background 0.15s;
348
599
  }
349
600
 
350
601
  .mdma-form-submit:hover {
351
- background: #5a4bd1;
602
+ background: var(--mdma-color-primary-hover);
352
603
  }
353
604
 
354
605
  /* ===== Button ===== */
@@ -358,7 +609,7 @@
358
609
  font-size: 14px;
359
610
  font-weight: 600;
360
611
  border: none;
361
- border-radius: 6px;
612
+ border-radius: var(--mdma-radius-sm);
362
613
  cursor: pointer;
363
614
  transition: background 0.15s, transform 0.1s;
364
615
  margin-bottom: 20px;
@@ -369,46 +620,46 @@
369
620
  }
370
621
 
371
622
  .mdma-button--primary {
372
- background: #6c5ce7;
373
- color: #fff;
623
+ background: var(--mdma-color-primary);
624
+ color: var(--mdma-color-on-primary);
374
625
  }
375
626
 
376
627
  .mdma-button--primary:hover {
377
- background: #5a4bd1;
628
+ background: var(--mdma-color-primary-hover);
378
629
  }
379
630
 
380
631
  .mdma-button--secondary {
381
- background: #dfe6e9;
382
- color: #2d3436;
632
+ background: var(--mdma-color-secondary);
633
+ color: var(--mdma-color-on-secondary);
383
634
  }
384
635
 
385
636
  .mdma-button--secondary:hover {
386
- background: #c8d6db;
637
+ background: var(--mdma-color-secondary-hover);
387
638
  }
388
639
 
389
640
  .mdma-button--danger {
390
- background: #e74c3c;
391
- color: #fff;
641
+ background: var(--mdma-color-danger);
642
+ color: var(--mdma-color-on-danger);
392
643
  }
393
644
 
394
645
  .mdma-button--danger:hover {
395
- background: #c0392b;
646
+ background: var(--mdma-color-danger-hover);
396
647
  }
397
648
 
398
649
  /* ===== Tasklist ===== */
399
650
  .mdma-tasklist {
400
- background: #fff;
401
- border: 1px solid #e0e0e0;
402
- border-radius: 10px;
651
+ background: var(--mdma-color-background);
652
+ border: 1px solid var(--mdma-color-border);
653
+ border-radius: var(--mdma-radius-md);
403
654
  padding: 24px;
404
655
  margin-bottom: 20px;
405
656
  }
406
657
 
407
658
  .mdma-tasklist-label {
408
- font-size: 18px;
659
+ font-size: var(--mdma-font-size-title);
409
660
  font-weight: 600;
410
661
  margin-bottom: 12px;
411
- color: #1a1a2e;
662
+ color: var(--mdma-color-heading);
412
663
  }
413
664
 
414
665
  .mdma-tasklist-items {
@@ -417,7 +668,7 @@
417
668
 
418
669
  .mdma-tasklist-item {
419
670
  padding: 8px 0;
420
- border-bottom: 1px solid #f0f0f0;
671
+ border-bottom: 1px solid var(--mdma-color-border-subtle);
421
672
  }
422
673
 
423
674
  .mdma-tasklist-item:last-child {
@@ -430,35 +681,35 @@
430
681
  gap: 8px;
431
682
  cursor: pointer;
432
683
  font-size: 14px;
433
- color: #333;
684
+ color: var(--mdma-color-text);
434
685
  }
435
686
 
436
687
  .mdma-tasklist-item input[type="checkbox"] {
437
- accent-color: #6c5ce7;
688
+ accent-color: var(--mdma-color-primary);
438
689
  width: 16px;
439
690
  height: 16px;
440
691
  }
441
692
 
442
693
  .mdma-tasklist-item input[type="checkbox"]:checked + span {
443
694
  text-decoration: line-through;
444
- color: #999;
695
+ color: var(--mdma-color-text-muted);
445
696
  }
446
697
 
447
698
  /* ===== Table ===== */
448
699
  .mdma-table {
449
- background: #fff;
450
- border: 1px solid #e0e0e0;
451
- border-radius: 10px;
700
+ background: var(--mdma-color-background);
701
+ border: 1px solid var(--mdma-color-border);
702
+ border-radius: var(--mdma-radius-md);
452
703
  padding: 24px;
453
704
  margin-bottom: 20px;
454
705
  overflow-x: auto;
455
706
  }
456
707
 
457
708
  .mdma-table-label {
458
- font-size: 18px;
709
+ font-size: var(--mdma-font-size-title);
459
710
  font-weight: 600;
460
711
  margin-bottom: 12px;
461
- color: #1a1a2e;
712
+ color: var(--mdma-color-heading);
462
713
  }
463
714
 
464
715
  .mdma-table table {
@@ -473,32 +724,32 @@
473
724
  font-weight: 600;
474
725
  text-transform: uppercase;
475
726
  letter-spacing: 0.5px;
476
- color: #666;
477
- background: #f8f9fa;
478
- border-bottom: 2px solid #e0e0e0;
727
+ color: var(--mdma-color-text-muted);
728
+ background: var(--mdma-color-table-header-bg);
729
+ border-bottom: 2px solid var(--mdma-color-border);
479
730
  }
480
731
 
481
732
  .mdma-table td {
482
733
  padding: 10px 12px;
483
734
  font-size: 14px;
484
- border-bottom: 1px solid #f0f0f0;
485
- color: #333;
735
+ border-bottom: 1px solid var(--mdma-color-border-subtle);
736
+ color: var(--mdma-color-text);
486
737
  }
487
738
 
488
739
  .mdma-table tr:hover td {
489
- background: #f8f9fa;
740
+ background: var(--mdma-color-row-hover);
490
741
  }
491
742
 
492
743
  .mdma-table-empty {
493
744
  text-align: center;
494
745
  padding: 20px;
495
- color: #999;
746
+ color: var(--mdma-color-text-muted);
496
747
  font-style: italic;
497
748
  }
498
749
 
499
750
  /* ===== Callout ===== */
500
751
  .mdma-callout {
501
- border-radius: 10px;
752
+ border-radius: var(--mdma-radius-md);
502
753
  padding: 16px 20px;
503
754
  margin-bottom: 20px;
504
755
  position: relative;
@@ -506,27 +757,27 @@
506
757
  }
507
758
 
508
759
  .mdma-callout--info {
509
- background: #ebf5fb;
510
- border-left-color: #3498db;
511
- color: #1a5276;
760
+ background: var(--mdma-color-info-bg);
761
+ border-left-color: var(--mdma-color-info);
762
+ color: var(--mdma-color-info-text);
512
763
  }
513
764
 
514
765
  .mdma-callout--warning {
515
- background: #fef9e7;
516
- border-left-color: #f39c12;
517
- color: #7d6608;
766
+ background: var(--mdma-color-warning-bg);
767
+ border-left-color: var(--mdma-color-warning);
768
+ color: var(--mdma-color-warning-text);
518
769
  }
519
770
 
520
771
  .mdma-callout--error {
521
- background: #fdedec;
522
- border-left-color: #e74c3c;
523
- color: #78281f;
772
+ background: var(--mdma-color-error-bg);
773
+ border-left-color: var(--mdma-color-error);
774
+ color: var(--mdma-color-error-text);
524
775
  }
525
776
 
526
777
  .mdma-callout--success {
527
- background: #eafaf1;
528
- border-left-color: #27ae60;
529
- color: #1e8449;
778
+ background: var(--mdma-color-success-bg);
779
+ border-left-color: var(--mdma-color-success);
780
+ color: var(--mdma-color-success-text);
530
781
  }
531
782
 
532
783
  .mdma-callout-title {
@@ -559,43 +810,43 @@
559
810
 
560
811
  /* ===== Approval Gate ===== */
561
812
  .mdma-approval-gate {
562
- background: #fff;
563
- border: 2px solid #e0e0e0;
564
- border-radius: 10px;
813
+ background: var(--mdma-color-background);
814
+ border: 2px solid var(--mdma-color-border);
815
+ border-radius: var(--mdma-radius-md);
565
816
  padding: 24px;
566
817
  margin-bottom: 20px;
567
818
  }
568
819
 
569
820
  .mdma-approval-gate--pending {
570
- border-color: #f39c12;
821
+ border-color: var(--mdma-color-warning);
571
822
  }
572
823
 
573
824
  .mdma-approval-gate--approved {
574
- border-color: #27ae60;
575
- background: #f0faf4;
825
+ border-color: var(--mdma-color-success);
826
+ background: var(--mdma-color-success-bg);
576
827
  }
577
828
 
578
829
  .mdma-approval-gate--denied {
579
- border-color: #e74c3c;
580
- background: #fdf2f2;
830
+ border-color: var(--mdma-color-error);
831
+ background: var(--mdma-color-error-bg);
581
832
  }
582
833
 
583
834
  .mdma-approval-gate-title {
584
835
  font-size: 16px;
585
836
  font-weight: 600;
586
837
  margin-bottom: 8px;
587
- color: #1a1a2e;
838
+ color: var(--mdma-color-heading);
588
839
  }
589
840
 
590
841
  .mdma-approval-gate-description {
591
842
  font-size: 14px;
592
- color: #555;
843
+ color: var(--mdma-color-text-subtle);
593
844
  margin-bottom: 12px;
594
845
  }
595
846
 
596
847
  .mdma-approval-gate-status {
597
848
  font-size: 13px;
598
- color: #666;
849
+ color: var(--mdma-color-text-muted);
599
850
  margin-bottom: 16px;
600
851
  }
601
852
 
@@ -605,13 +856,13 @@
605
856
  }
606
857
 
607
858
  .mdma-approval-gate--pending .mdma-approval-gate-status strong {
608
- color: #f39c12;
859
+ color: var(--mdma-color-warning);
609
860
  }
610
861
  .mdma-approval-gate--approved .mdma-approval-gate-status strong {
611
- color: #27ae60;
862
+ color: var(--mdma-color-success);
612
863
  }
613
864
  .mdma-approval-gate--denied .mdma-approval-gate-status strong {
614
- color: #e74c3c;
865
+ color: var(--mdma-color-error);
615
866
  }
616
867
 
617
868
  .mdma-approval-gate-actions {
@@ -625,8 +876,8 @@
625
876
  align-items: center;
626
877
  gap: 10px;
627
878
  padding: 12px 16px;
628
- background: #fff;
629
- border: 1px solid #e0e0e0;
879
+ background: var(--mdma-color-background);
880
+ border: 1px solid var(--mdma-color-border);
630
881
  border-radius: 8px;
631
882
  margin-bottom: 20px;
632
883
  font-size: 13px;
@@ -634,7 +885,7 @@
634
885
 
635
886
  .mdma-webhook-label {
636
887
  font-weight: 600;
637
- color: #333;
888
+ color: var(--mdma-color-text);
638
889
  }
639
890
 
640
891
  .mdma-webhook-status {
@@ -645,8 +896,8 @@
645
896
  }
646
897
 
647
898
  .mdma-webhook-status--idle {
648
- background: #f0f0f0;
649
- color: #666;
899
+ background: var(--mdma-color-surface);
900
+ color: var(--mdma-color-text-muted);
650
901
  }
651
902
  .mdma-webhook-status--executing {
652
903
  background: #ffeaa7;
@@ -664,17 +915,17 @@
664
915
  /* ===== Unknown Component ===== */
665
916
  .mdma-unknown-component {
666
917
  padding: 12px 16px;
667
- background: #fff3cd;
668
- border: 1px solid #ffc107;
918
+ background: var(--mdma-color-unknown-bg);
919
+ border: 1px solid var(--mdma-color-unknown-border);
669
920
  border-radius: 8px;
670
- color: #856404;
921
+ color: var(--mdma-color-unknown-text);
671
922
  font-size: 13px;
672
923
  margin-bottom: 20px;
673
924
  }
674
925
 
675
926
  .mdma-chart {
676
- background: rgba(255, 255, 255, 0.02);
677
- border: 1px solid rgba(108, 92, 231, 0.15);
927
+ background: var(--mdma-color-chart-bg);
928
+ border: 1px solid var(--mdma-color-chart-border);
678
929
  border-radius: 14px;
679
930
  padding: 18px;
680
931
  margin-bottom: 20px;
@@ -684,7 +935,7 @@
684
935
  .mdma-chart-label {
685
936
  font-size: 14px;
686
937
  font-weight: 700;
687
- color: #a29bfe;
938
+ color: var(--mdma-color-chart-label);
688
939
  margin-bottom: 12px;
689
940
  }
690
941
 
@@ -699,32 +950,32 @@
699
950
  display: flex;
700
951
  align-items: center;
701
952
  justify-content: center;
702
- color: #636e72;
953
+ color: var(--mdma-color-text-muted);
703
954
  font-size: 13px;
704
955
  font-style: italic;
705
956
  }
706
957
 
707
958
  /* recharts overrides for MDMA theme */
708
959
  .mdma-chart .recharts-text {
709
- fill: #636e72;
960
+ fill: var(--mdma-color-chart-axis);
710
961
  }
711
962
 
712
963
  .mdma-chart .recharts-legend-item-text {
713
- color: #b2bec3 !important;
964
+ color: var(--mdma-color-chart-legend) !important;
714
965
  font-size: 12px;
715
966
  }
716
967
 
717
968
  .mdma-chart .recharts-default-tooltip {
718
- background: #1a1a2e !important;
969
+ background: var(--mdma-color-chart-tooltip-bg) !important;
719
970
  border: 1px solid rgba(162, 155, 254, 0.3) !important;
720
971
  border-radius: 8px !important;
721
972
  }
722
973
  /* ─── Thinking Component (basic) ─────────────────────────────────────────── */
723
974
 
724
975
  .mdma-thinking {
725
- background: #fff;
726
- border: 1px solid #e0e0e0;
727
- border-radius: 10px;
976
+ background: var(--mdma-color-background);
977
+ border: 1px solid var(--mdma-color-border);
978
+ border-radius: var(--mdma-radius-md);
728
979
  margin: 16px 0;
729
980
  overflow: hidden;
730
981
  }
@@ -737,7 +988,7 @@
737
988
  cursor: pointer;
738
989
  font-size: 14px;
739
990
  font-weight: 600;
740
- color: #555;
991
+ color: var(--mdma-color-text-subtle);
741
992
  user-select: none;
742
993
  list-style: none;
743
994
  }
@@ -751,7 +1002,7 @@
751
1002
  font-size: 10px;
752
1003
  margin-left: auto;
753
1004
  transition: transform 0.2s;
754
- color: #999;
1005
+ color: var(--mdma-color-text-muted);
755
1006
  }
756
1007
 
757
1008
  .mdma-thinking[open] .mdma-thinking-summary::after {
@@ -763,7 +1014,7 @@
763
1014
  width: 8px;
764
1015
  height: 8px;
765
1016
  border-radius: 50%;
766
- background: #6c5ce7;
1017
+ background: var(--mdma-color-primary);
767
1018
  animation: mdma-thinking-pulse 1.5s ease-in-out infinite;
768
1019
  }
769
1020
 
@@ -787,8 +1038,8 @@
787
1038
  padding: 0 16px 16px;
788
1039
  font-size: 13px;
789
1040
  line-height: 1.6;
790
- color: #555;
1041
+ color: var(--mdma-color-text-subtle);
791
1042
  white-space: pre-wrap;
792
- border-top: 1px solid #f0f0f0;
1043
+ border-top: 1px solid var(--mdma-color-border-subtle);
793
1044
  padding-top: 12px;
794
1045
  }