@mosaic-media/sdui-react 0.1.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 (87) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +54 -0
  3. package/dist/components/controls.d.ts +34 -0
  4. package/dist/components/controls.d.ts.map +1 -0
  5. package/dist/components/controls.js +93 -0
  6. package/dist/components/controls.js.map +1 -0
  7. package/dist/components/definitions.d.ts +3 -0
  8. package/dist/components/definitions.d.ts.map +1 -0
  9. package/dist/components/definitions.js +494 -0
  10. package/dist/components/definitions.js.map +1 -0
  11. package/dist/components/definitions.layout.d.ts +3 -0
  12. package/dist/components/definitions.layout.d.ts.map +1 -0
  13. package/dist/components/definitions.layout.js +197 -0
  14. package/dist/components/definitions.layout.js.map +1 -0
  15. package/dist/components/feedback/Unknown.d.ts +4 -0
  16. package/dist/components/feedback/Unknown.d.ts.map +1 -0
  17. package/dist/components/feedback/Unknown.js +13 -0
  18. package/dist/components/feedback/Unknown.js.map +1 -0
  19. package/dist/components/feedback.d.ts +6 -0
  20. package/dist/components/feedback.d.ts.map +1 -0
  21. package/dist/components/feedback.js +10 -0
  22. package/dist/components/feedback.js.map +1 -0
  23. package/dist/components/host.d.ts +11 -0
  24. package/dist/components/host.d.ts.map +1 -0
  25. package/dist/components/host.js +15 -0
  26. package/dist/components/host.js.map +1 -0
  27. package/dist/components/index.d.ts +3 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/components/index.js +60 -0
  30. package/dist/components/index.js.map +1 -0
  31. package/dist/components/layout.d.ts +9 -0
  32. package/dist/components/layout.d.ts.map +1 -0
  33. package/dist/components/layout.js +23 -0
  34. package/dist/components/layout.js.map +1 -0
  35. package/dist/components/media.d.ts +5 -0
  36. package/dist/components/media.d.ts.map +1 -0
  37. package/dist/components/media.js +15 -0
  38. package/dist/components/media.js.map +1 -0
  39. package/dist/components/primitives.d.ts +39 -0
  40. package/dist/components/primitives.d.ts.map +1 -0
  41. package/dist/components/primitives.js +75 -0
  42. package/dist/components/primitives.js.map +1 -0
  43. package/dist/components/shared.d.ts +13 -0
  44. package/dist/components/shared.d.ts.map +1 -0
  45. package/dist/components/shared.js +36 -0
  46. package/dist/components/shared.js.map +1 -0
  47. package/dist/index.d.ts +19 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +26 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/lib/platform.d.ts +12 -0
  52. package/dist/lib/platform.d.ts.map +1 -0
  53. package/dist/lib/platform.js +74 -0
  54. package/dist/lib/platform.js.map +1 -0
  55. package/dist/sdui/Renderer.d.ts +16 -0
  56. package/dist/sdui/Renderer.d.ts.map +1 -0
  57. package/dist/sdui/Renderer.js +40 -0
  58. package/dist/sdui/Renderer.js.map +1 -0
  59. package/dist/sdui/ShellProvider.d.ts +24 -0
  60. package/dist/sdui/ShellProvider.d.ts.map +1 -0
  61. package/dist/sdui/ShellProvider.js +110 -0
  62. package/dist/sdui/ShellProvider.js.map +1 -0
  63. package/dist/sdui/context.d.ts +17 -0
  64. package/dist/sdui/context.d.ts.map +1 -0
  65. package/dist/sdui/context.js +18 -0
  66. package/dist/sdui/context.js.map +1 -0
  67. package/dist/sdui/registry.d.ts +13 -0
  68. package/dist/sdui/registry.d.ts.map +1 -0
  69. package/dist/sdui/registry.js +26 -0
  70. package/dist/sdui/registry.js.map +1 -0
  71. package/dist/sdui/style.d.ts +81 -0
  72. package/dist/sdui/style.d.ts.map +1 -0
  73. package/dist/sdui/style.js +149 -0
  74. package/dist/sdui/style.js.map +1 -0
  75. package/dist/sdui/template.d.ts +19 -0
  76. package/dist/sdui/template.d.ts.map +1 -0
  77. package/dist/sdui/template.js +111 -0
  78. package/dist/sdui/template.js.map +1 -0
  79. package/dist/sdui/types.d.ts +96 -0
  80. package/dist/sdui/types.d.ts.map +1 -0
  81. package/dist/sdui/types.js +4 -0
  82. package/dist/sdui/types.js.map +1 -0
  83. package/dist/styles/components.css +772 -0
  84. package/dist/styles/global.css +80 -0
  85. package/dist/styles/index.css +5 -0
  86. package/dist/styles/tokens.css +150 -0
  87. package/package.json +37 -0
@@ -0,0 +1,772 @@
1
+ /* SPDX-License-Identifier: AGPL-3.0-only */
2
+ /* SPDX-FileCopyrightText: 2026 the Mosaic authors */
3
+
4
+ /*
5
+ * Skin for the native primitives and the app chrome only. Every *component* is
6
+ * a definition that styles itself inline from tokens (sdui/style.ts), so this
7
+ * file covers just: the interactive primitives whose native elements need CSS
8
+ * (inputs, tabs, menu, slider, rating, progress, seasons), the Pressable/
9
+ * placeholder helpers, the shell chrome, overlays/toasts, and the gallery.
10
+ * Nothing here reaches past a --token.
11
+ */
12
+
13
+ /* ───────────────────────── icon ───────────────────────── */
14
+ .msc-icon {
15
+ display: inline-block;
16
+ flex: none;
17
+ vertical-align: -0.15em;
18
+ }
19
+
20
+ /* ─────────────────────── primitives ─────────────────────── */
21
+ /* Box/Text/Image/Icon/Spacer style themselves inline from tokens; only the
22
+ Pressable primitive and the Image placeholder need CSS here. */
23
+ .msc-pressable {
24
+ border: none;
25
+ margin: 0;
26
+ background: transparent;
27
+ color: inherit;
28
+ font: inherit;
29
+ text-align: left;
30
+ cursor: pointer;
31
+ }
32
+ .msc-pressable:disabled {
33
+ opacity: 0.5;
34
+ cursor: not-allowed;
35
+ }
36
+ .msc-pressable--lift {
37
+ transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
38
+ }
39
+ .msc-pressable--lift:hover:not(:disabled) {
40
+ transform: translateY(-4px);
41
+ }
42
+ .msc-prim-placeholder {
43
+ color: var(--color-text-faint);
44
+ font-size: var(--text-xs);
45
+ text-transform: uppercase;
46
+ letter-spacing: 0.08em;
47
+ background: linear-gradient(140deg, var(--color-surface-raised), var(--color-surface-overlay));
48
+ }
49
+
50
+ /* ─────────────────────── app chrome ─────────────────────── */
51
+ .msc-app {
52
+ display: grid;
53
+ grid-template-columns: 248px 1fr;
54
+ min-height: 100vh;
55
+ }
56
+
57
+ .msc-sidebar {
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: var(--space-5);
61
+ padding: var(--space-5) var(--space-4);
62
+ background: var(--color-surface);
63
+ border-right: 1px solid var(--color-border);
64
+ position: sticky;
65
+ top: 0;
66
+ height: 100vh;
67
+ }
68
+ .msc-sidebar__brand {
69
+ display: flex;
70
+ align-items: center;
71
+ gap: var(--space-3);
72
+ padding: 0 var(--space-2);
73
+ }
74
+ .msc-sidebar__logo {
75
+ width: 30px;
76
+ height: 30px;
77
+ border-radius: 8px;
78
+ background: conic-gradient(from 210deg, var(--color-accent), #8b5cf6, #22d3ee, var(--color-accent));
79
+ box-shadow: var(--shadow-1);
80
+ }
81
+ .msc-sidebar__name {
82
+ font-size: var(--text-lg);
83
+ font-weight: var(--weight-bold);
84
+ letter-spacing: 0.02em;
85
+ }
86
+ .msc-sidebar__nav {
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: var(--space-1);
90
+ }
91
+ .msc-sidebar__sep {
92
+ height: 1px;
93
+ background: var(--color-border);
94
+ margin: var(--space-3) var(--space-2);
95
+ }
96
+ .msc-navitem {
97
+ display: flex;
98
+ align-items: center;
99
+ gap: var(--space-3);
100
+ padding: var(--space-3) var(--space-3);
101
+ border: none;
102
+ background: transparent;
103
+ color: var(--color-text-muted);
104
+ border-radius: var(--radius-md);
105
+ cursor: pointer;
106
+ font-size: var(--text-md);
107
+ font-weight: var(--weight-medium);
108
+ text-align: left;
109
+ transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
110
+ }
111
+ .msc-navitem .msc-icon {
112
+ font-size: 1.2em;
113
+ }
114
+ .msc-navitem:hover {
115
+ background: var(--color-surface-raised);
116
+ color: var(--color-text);
117
+ }
118
+ .msc-navitem.is-active {
119
+ background: var(--color-accent-quiet);
120
+ color: var(--color-accent);
121
+ }
122
+ .msc-sidebar__foot {
123
+ margin-top: auto;
124
+ padding: 0 var(--space-2);
125
+ }
126
+ .msc-sidebar__version {
127
+ font-size: var(--text-xs);
128
+ color: var(--color-text-faint);
129
+ }
130
+
131
+ .msc-main {
132
+ min-width: 0;
133
+ display: flex;
134
+ flex-direction: column;
135
+ }
136
+ .msc-topbar {
137
+ position: sticky;
138
+ top: 0;
139
+ z-index: 10;
140
+ display: flex;
141
+ align-items: center;
142
+ justify-content: space-between;
143
+ gap: var(--space-4);
144
+ padding: var(--space-3) var(--shell-gutter);
145
+ background: color-mix(in srgb, var(--color-bg) 82%, transparent);
146
+ backdrop-filter: blur(12px);
147
+ border-bottom: 1px solid var(--color-border);
148
+ }
149
+ .msc-topbar__left,
150
+ .msc-topbar__right {
151
+ display: flex;
152
+ align-items: center;
153
+ gap: var(--space-3);
154
+ }
155
+ .msc-topbar__crumb {
156
+ font-weight: var(--weight-medium);
157
+ color: var(--color-text-muted);
158
+ }
159
+ .msc-avatar {
160
+ width: 32px;
161
+ height: 32px;
162
+ border-radius: var(--radius-pill);
163
+ display: grid;
164
+ place-items: center;
165
+ background: var(--color-accent);
166
+ color: var(--color-text-on-accent);
167
+ font-weight: var(--weight-bold);
168
+ font-size: var(--text-sm);
169
+ }
170
+ .msc-content {
171
+ flex: 1;
172
+ padding: var(--space-6) var(--shell-gutter) var(--space-8);
173
+ max-width: var(--shell-max);
174
+ width: 100%;
175
+ margin: 0 auto;
176
+ }
177
+
178
+ /* ──────────── interactive primitives (native elements) ──────────── */
179
+ .msc-tabs__list {
180
+ display: flex;
181
+ gap: var(--space-1);
182
+ border-bottom: 1px solid var(--color-border);
183
+ }
184
+ .msc-tabs__tab {
185
+ border: none;
186
+ background: transparent;
187
+ color: var(--color-text-muted);
188
+ padding: var(--space-3) var(--space-4);
189
+ cursor: pointer;
190
+ font-weight: var(--weight-medium);
191
+ border-bottom: 2px solid transparent;
192
+ margin-bottom: -1px;
193
+ }
194
+ .msc-tabs__tab:hover {
195
+ color: var(--color-text);
196
+ }
197
+ .msc-tabs__tab.is-active {
198
+ color: var(--color-text);
199
+ border-bottom-color: var(--color-accent);
200
+ }
201
+ .msc-tabs__panel {
202
+ padding-top: var(--space-4);
203
+ }
204
+
205
+ .msc-iconbtn {
206
+ display: inline-grid;
207
+ place-items: center;
208
+ width: 38px;
209
+ height: 38px;
210
+ border-radius: var(--radius-md);
211
+ border: none;
212
+ cursor: pointer;
213
+ font-size: 1.1rem;
214
+ transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
215
+ }
216
+ .msc-iconbtn--ghost {
217
+ background: transparent;
218
+ color: var(--color-text-muted);
219
+ }
220
+ .msc-iconbtn--ghost:hover:not(:disabled) {
221
+ background: var(--color-surface-raised);
222
+ color: var(--color-text);
223
+ }
224
+ .msc-iconbtn:disabled {
225
+ opacity: 0.4;
226
+ cursor: not-allowed;
227
+ }
228
+
229
+ .msc-menu {
230
+ position: relative;
231
+ display: inline-block;
232
+ }
233
+ .msc-menu__list {
234
+ position: absolute;
235
+ right: 0;
236
+ top: calc(100% + var(--space-1));
237
+ min-width: 180px;
238
+ background: var(--color-surface-overlay);
239
+ border: 1px solid var(--color-border);
240
+ border-radius: var(--radius-md);
241
+ box-shadow: var(--shadow-2);
242
+ padding: var(--space-1);
243
+ z-index: 20;
244
+ display: flex;
245
+ flex-direction: column;
246
+ }
247
+ .msc-menu__item {
248
+ display: flex;
249
+ align-items: center;
250
+ gap: var(--space-3);
251
+ padding: var(--space-2) var(--space-3);
252
+ border: none;
253
+ background: transparent;
254
+ color: var(--color-text);
255
+ border-radius: var(--radius-sm);
256
+ cursor: pointer;
257
+ text-align: left;
258
+ font-size: var(--text-sm);
259
+ }
260
+ .msc-menu__item:hover {
261
+ background: var(--color-surface-raised);
262
+ }
263
+ .msc-menu__item.is-danger {
264
+ color: var(--color-danger);
265
+ }
266
+
267
+ .msc-search {
268
+ display: flex;
269
+ align-items: center;
270
+ gap: var(--space-3);
271
+ background: var(--color-surface-raised);
272
+ border: 1px solid var(--color-border);
273
+ border-radius: var(--radius-pill);
274
+ padding: var(--space-3) var(--space-4);
275
+ max-width: 560px;
276
+ }
277
+ .msc-search:focus-within {
278
+ border-color: var(--color-accent);
279
+ }
280
+ .msc-search__icon {
281
+ color: var(--color-text-faint);
282
+ font-size: 1.2em;
283
+ }
284
+ .msc-search__input {
285
+ flex: 1;
286
+ border: none;
287
+ background: transparent;
288
+ outline: none;
289
+ }
290
+
291
+ .msc-field {
292
+ display: flex;
293
+ flex-direction: column;
294
+ gap: var(--space-2);
295
+ }
296
+ .msc-field__label {
297
+ font-size: var(--text-sm);
298
+ font-weight: var(--weight-medium);
299
+ color: var(--color-text-muted);
300
+ }
301
+ .msc-field__input {
302
+ width: 100%;
303
+ background: var(--color-surface-raised);
304
+ border: 1px solid var(--color-border);
305
+ border-radius: var(--radius-md);
306
+ padding: var(--space-3) var(--space-4);
307
+ outline: none;
308
+ transition: border-color var(--dur-fast) var(--ease);
309
+ }
310
+ .msc-field__input:focus {
311
+ border-color: var(--color-accent);
312
+ }
313
+
314
+ .msc-select {
315
+ position: relative;
316
+ display: flex;
317
+ align-items: center;
318
+ }
319
+ .msc-select__el {
320
+ appearance: none;
321
+ width: 100%;
322
+ background: var(--color-surface-raised);
323
+ border: 1px solid var(--color-border);
324
+ border-radius: var(--radius-md);
325
+ padding: var(--space-3) var(--space-6) var(--space-3) var(--space-4);
326
+ outline: none;
327
+ cursor: pointer;
328
+ }
329
+ .msc-select__el:focus {
330
+ border-color: var(--color-accent);
331
+ }
332
+ .msc-select__chevron {
333
+ position: absolute;
334
+ right: var(--space-3);
335
+ pointer-events: none;
336
+ color: var(--color-text-faint);
337
+ }
338
+
339
+ .msc-toggle__track {
340
+ position: relative;
341
+ width: 44px;
342
+ height: 26px;
343
+ border-radius: var(--radius-pill);
344
+ border: none;
345
+ background: var(--color-progress-track);
346
+ cursor: pointer;
347
+ transition: background var(--dur-med) var(--ease);
348
+ flex: none;
349
+ }
350
+ .msc-toggle__track.is-on {
351
+ background: var(--color-accent);
352
+ }
353
+ .msc-toggle__thumb {
354
+ position: absolute;
355
+ top: 3px;
356
+ left: 3px;
357
+ width: 20px;
358
+ height: 20px;
359
+ border-radius: var(--radius-pill);
360
+ background: #fff;
361
+ box-shadow: var(--shadow-1);
362
+ transition: transform var(--dur-med) var(--ease);
363
+ }
364
+ .msc-toggle__track.is-on .msc-toggle__thumb {
365
+ transform: translateX(18px);
366
+ }
367
+
368
+ .msc-slider__label {
369
+ display: flex;
370
+ justify-content: space-between;
371
+ }
372
+ .msc-slider__value {
373
+ color: var(--color-accent);
374
+ font-variant-numeric: tabular-nums;
375
+ }
376
+ .msc-slider {
377
+ -webkit-appearance: none;
378
+ appearance: none;
379
+ width: 100%;
380
+ height: 6px;
381
+ border-radius: var(--radius-pill);
382
+ background: var(--color-progress-track);
383
+ outline: none;
384
+ }
385
+ .msc-slider::-webkit-slider-thumb {
386
+ -webkit-appearance: none;
387
+ width: 18px;
388
+ height: 18px;
389
+ border-radius: var(--radius-pill);
390
+ background: var(--color-accent);
391
+ cursor: pointer;
392
+ border: 3px solid var(--color-bg);
393
+ }
394
+ .msc-slider::-moz-range-thumb {
395
+ width: 14px;
396
+ height: 14px;
397
+ border-radius: var(--radius-pill);
398
+ background: var(--color-accent);
399
+ cursor: pointer;
400
+ border: 3px solid var(--color-bg);
401
+ }
402
+
403
+ .msc-rating {
404
+ display: inline-flex;
405
+ gap: var(--space-1);
406
+ }
407
+ .msc-rating__star {
408
+ border: none;
409
+ background: transparent;
410
+ color: var(--color-text-faint);
411
+ cursor: pointer;
412
+ font-size: 1.25rem;
413
+ padding: 2px;
414
+ }
415
+ .msc-rating__star.is-filled {
416
+ color: var(--color-rating);
417
+ }
418
+
419
+ .msc-progress {
420
+ height: 6px;
421
+ border-radius: var(--radius-pill);
422
+ background: var(--color-progress-track);
423
+ overflow: hidden;
424
+ width: 100%;
425
+ }
426
+ .msc-progress__fill {
427
+ height: 100%;
428
+ border-radius: inherit;
429
+ background: var(--color-accent);
430
+ transition: width var(--dur-med) var(--ease);
431
+ }
432
+ .msc-progress__fill--success {
433
+ background: var(--color-success);
434
+ }
435
+ .msc-progress__fill--warning {
436
+ background: var(--color-warning);
437
+ }
438
+ .msc-progress__fill--danger {
439
+ background: var(--color-danger);
440
+ }
441
+
442
+ .msc-seasons {
443
+ display: flex;
444
+ gap: var(--space-2);
445
+ flex-wrap: wrap;
446
+ }
447
+ .msc-seasons__pill {
448
+ padding: var(--space-2) var(--space-4);
449
+ border-radius: var(--radius-pill);
450
+ border: 1px solid var(--color-border);
451
+ background: var(--color-surface-raised);
452
+ color: var(--color-text-muted);
453
+ cursor: pointer;
454
+ font-size: var(--text-sm);
455
+ font-weight: var(--weight-medium);
456
+ }
457
+ .msc-seasons__pill.is-active {
458
+ background: var(--color-accent);
459
+ color: var(--color-text-on-accent);
460
+ border-color: transparent;
461
+ }
462
+
463
+ /* ──────────── computed / animated primitives ──────────── */
464
+ .msc-skeleton-group {
465
+ display: flex;
466
+ flex-direction: column;
467
+ gap: var(--space-3);
468
+ }
469
+ .msc-skeleton-group--rail {
470
+ flex-direction: row;
471
+ }
472
+ .msc-skeleton {
473
+ background: linear-gradient(
474
+ 100deg,
475
+ var(--color-surface-raised) 30%,
476
+ var(--color-surface-overlay) 50%,
477
+ var(--color-surface-raised) 70%
478
+ );
479
+ background-size: 200% 100%;
480
+ animation: msc-shimmer 1.4s linear infinite;
481
+ border-radius: var(--radius-md);
482
+ }
483
+ .msc-skeleton--poster {
484
+ width: 150px;
485
+ aspect-ratio: 2 / 3;
486
+ flex: none;
487
+ }
488
+ .msc-skeleton--line {
489
+ height: 12px;
490
+ border-radius: var(--radius-pill);
491
+ }
492
+ .msc-skeleton--block {
493
+ height: 120px;
494
+ }
495
+ .msc-skeleton--circle {
496
+ width: 48px;
497
+ height: 48px;
498
+ border-radius: var(--radius-pill);
499
+ }
500
+ @keyframes msc-shimmer {
501
+ from {
502
+ background-position: 200% 0;
503
+ }
504
+ to {
505
+ background-position: -200% 0;
506
+ }
507
+ }
508
+
509
+ /* ──────────── Unknown fallback ──────────── */
510
+ .msc-unknown {
511
+ display: inline-flex;
512
+ align-items: center;
513
+ gap: var(--space-2);
514
+ padding: var(--space-2) var(--space-3);
515
+ border-radius: var(--radius-sm);
516
+ border: 1px dashed var(--color-border-strong);
517
+ background: color-mix(in srgb, var(--color-warning) 8%, transparent);
518
+ font-size: var(--text-xs);
519
+ }
520
+ .msc-unknown__dot {
521
+ width: 8px;
522
+ height: 8px;
523
+ border-radius: var(--radius-pill);
524
+ background: var(--color-warning);
525
+ }
526
+ .msc-unknown__type {
527
+ font-family: var(--font-mono);
528
+ color: var(--color-text);
529
+ }
530
+ .msc-unknown__hint {
531
+ color: var(--color-text-faint);
532
+ }
533
+
534
+ /* ──────────────────────── host ──────────────────────── */
535
+ .msc-overlay {
536
+ position: fixed;
537
+ inset: 0;
538
+ z-index: var(--z-overlay);
539
+ display: flex;
540
+ }
541
+ .msc-overlay__scrim {
542
+ position: absolute;
543
+ inset: 0;
544
+ background: var(--color-scrim);
545
+ backdrop-filter: blur(2px);
546
+ }
547
+ .msc-overlay__panel {
548
+ position: relative;
549
+ background: var(--color-surface);
550
+ box-shadow: var(--shadow-3);
551
+ overflow: auto;
552
+ animation: msc-pop var(--dur-med) var(--ease);
553
+ }
554
+ .msc-overlay__content {
555
+ padding: var(--space-6);
556
+ }
557
+ .msc-overlay__close {
558
+ position: absolute;
559
+ top: var(--space-3);
560
+ right: var(--space-3);
561
+ z-index: 1;
562
+ display: grid;
563
+ place-items: center;
564
+ width: 34px;
565
+ height: 34px;
566
+ border-radius: var(--radius-pill);
567
+ border: none;
568
+ background: var(--color-surface-raised);
569
+ color: var(--color-text-muted);
570
+ cursor: pointer;
571
+ }
572
+ .msc-overlay--modal {
573
+ align-items: center;
574
+ justify-content: center;
575
+ padding: var(--space-5);
576
+ }
577
+ .msc-overlay--modal .msc-overlay__panel {
578
+ width: min(560px, 100%);
579
+ max-height: 86vh;
580
+ border-radius: var(--radius-lg);
581
+ }
582
+ .msc-overlay--sheet {
583
+ align-items: flex-end;
584
+ justify-content: center;
585
+ }
586
+ .msc-overlay--sheet .msc-overlay__panel {
587
+ width: 100%;
588
+ max-width: var(--shell-max);
589
+ max-height: 80vh;
590
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
591
+ }
592
+ .msc-overlay--drawer {
593
+ justify-content: flex-end;
594
+ }
595
+ .msc-overlay--drawer .msc-overlay__panel {
596
+ width: min(420px, 100%);
597
+ height: 100%;
598
+ }
599
+ @keyframes msc-pop {
600
+ from {
601
+ opacity: 0;
602
+ transform: translateY(8px) scale(0.98);
603
+ }
604
+ to {
605
+ opacity: 1;
606
+ transform: none;
607
+ }
608
+ }
609
+
610
+ .msc-toasts {
611
+ position: fixed;
612
+ bottom: var(--space-5);
613
+ right: var(--space-5);
614
+ z-index: var(--z-toast);
615
+ display: flex;
616
+ flex-direction: column;
617
+ gap: var(--space-2);
618
+ max-width: min(380px, calc(100vw - 2 * var(--space-5)));
619
+ }
620
+ .msc-toast {
621
+ display: flex;
622
+ align-items: center;
623
+ gap: var(--space-3);
624
+ padding: var(--space-3) var(--space-4);
625
+ border-radius: var(--radius-md);
626
+ background: var(--color-surface-overlay);
627
+ border: 1px solid var(--color-border-strong);
628
+ box-shadow: var(--shadow-2);
629
+ animation: msc-pop var(--dur-med) var(--ease);
630
+ }
631
+ .msc-toast__message {
632
+ flex: 1;
633
+ font-size: var(--text-sm);
634
+ }
635
+ .msc-toast__close {
636
+ border: none;
637
+ background: transparent;
638
+ color: var(--color-text-muted);
639
+ cursor: pointer;
640
+ display: grid;
641
+ place-items: center;
642
+ }
643
+ .msc-toast--accent {
644
+ border-left: 3px solid var(--color-accent);
645
+ }
646
+ .msc-toast--success {
647
+ border-left: 3px solid var(--color-success);
648
+ }
649
+ .msc-toast--warning {
650
+ border-left: 3px solid var(--color-warning);
651
+ }
652
+ .msc-toast--danger {
653
+ border-left: 3px solid var(--color-danger);
654
+ }
655
+ .msc-toast--info {
656
+ border-left: 3px solid var(--color-info);
657
+ }
658
+
659
+ /* ──────────────────────── gallery ──────────────────────── */
660
+ .msc-gallery {
661
+ display: flex;
662
+ flex-direction: column;
663
+ gap: var(--space-7);
664
+ }
665
+ .msc-gallery__intro {
666
+ display: flex;
667
+ flex-direction: column;
668
+ gap: var(--space-3);
669
+ }
670
+ .msc-gallery__intro h1 {
671
+ font-size: var(--text-2xl);
672
+ font-weight: var(--weight-bold);
673
+ }
674
+ .msc-gallery__intro p {
675
+ color: var(--color-text-muted);
676
+ }
677
+ .msc-gallery__types {
678
+ display: flex;
679
+ flex-wrap: wrap;
680
+ gap: var(--space-2);
681
+ }
682
+ .msc-gallery__type {
683
+ font-family: var(--font-mono);
684
+ font-size: var(--text-xs);
685
+ padding: 2px var(--space-2);
686
+ border-radius: var(--radius-sm);
687
+ background: var(--color-surface-raised);
688
+ color: var(--color-text-muted);
689
+ }
690
+ .msc-gallery__group {
691
+ display: flex;
692
+ flex-direction: column;
693
+ gap: var(--space-4);
694
+ }
695
+ .msc-gallery__grouphead h2 {
696
+ font-size: var(--text-xl);
697
+ font-weight: var(--weight-bold);
698
+ }
699
+ .msc-gallery__grouphead p {
700
+ color: var(--color-text-muted);
701
+ font-size: var(--text-sm);
702
+ }
703
+ .msc-gallery__demos {
704
+ display: grid;
705
+ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
706
+ gap: var(--space-4);
707
+ }
708
+ .msc-gallery__demo {
709
+ display: flex;
710
+ flex-direction: column;
711
+ gap: var(--space-3);
712
+ padding: var(--space-4);
713
+ border-radius: var(--radius-lg);
714
+ border: 1px solid var(--color-border);
715
+ background: var(--color-surface);
716
+ }
717
+ .msc-gallery__demo--wide {
718
+ grid-column: 1 / -1;
719
+ }
720
+ .msc-gallery__demoname {
721
+ font-family: var(--font-mono);
722
+ font-size: var(--text-xs);
723
+ color: var(--color-text-faint);
724
+ }
725
+ .msc-gallery__stage {
726
+ display: flex;
727
+ flex-wrap: wrap;
728
+ gap: var(--space-3);
729
+ align-items: center;
730
+ }
731
+ .msc-gallery__stage > * {
732
+ min-width: 0;
733
+ }
734
+
735
+ /* ──────────────────────── responsive ──────────────────────── */
736
+ @media (max-width: 860px) {
737
+ .msc-app {
738
+ grid-template-columns: 1fr;
739
+ }
740
+ .msc-sidebar {
741
+ position: fixed;
742
+ bottom: 0;
743
+ top: auto;
744
+ left: 0;
745
+ right: 0;
746
+ height: auto;
747
+ flex-direction: row;
748
+ align-items: center;
749
+ gap: var(--space-2);
750
+ border-right: none;
751
+ border-top: 1px solid var(--color-border);
752
+ padding: var(--space-2);
753
+ z-index: 50;
754
+ overflow-x: auto;
755
+ }
756
+ .msc-sidebar__brand,
757
+ .msc-sidebar__foot,
758
+ .msc-sidebar__sep {
759
+ display: none;
760
+ }
761
+ .msc-sidebar__nav {
762
+ flex-direction: row;
763
+ width: 100%;
764
+ justify-content: space-around;
765
+ }
766
+ .msc-navitem span:not(.msc-icon) {
767
+ display: none;
768
+ }
769
+ .msc-content {
770
+ padding-bottom: var(--space-8);
771
+ }
772
+ }