@mirror-physics/fractal-ui 0.2.0-next.9 → 0.2.0-next.90

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,3 @@
1
+ <svg width="460" height="460" viewBox="0 0 460 460" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M122.969 0.059864C124.824 0.0608223 126.603 0.798262 127.915 2.11016L457.572 331.773C458.882 333.083 459.62 334.859 459.622 336.711L459.809 452.735C459.815 456.607 456.677 459.749 452.805 459.747L336.65 459.685C334.795 459.684 333.016 458.947 331.704 457.635L2.05026 127.981C0.736582 126.667 -0.000997322 124.885 1.01213e-06 123.027L0.0623525 6.99624C0.06443 3.13031 3.20003 -0.00199578 7.06597 9.54104e-07L122.969 0.059864Z" fill="#D9D9D9"/>
3
+ </svg>
package/dist/tokens.css CHANGED
@@ -15,7 +15,7 @@
15
15
  /* Grey — true neutral UI scale, very slight cool lean */
16
16
  --grey-0: #FEFEFE;
17
17
  --grey-50: #FAFAFA;
18
- --grey-100: #F0F0F0;
18
+ --grey-100: #F2F2F3;
19
19
  --grey-200: #E6E6E7;
20
20
  --grey-300: #D4D4D6;
21
21
  --grey-400: #929295;
@@ -123,6 +123,7 @@
123
123
  /* ---- Core ---- */
124
124
  --bg-canvas: var(--grey-0);
125
125
  --bg-surface-1: var(--grey-50);
126
+ --bg-surface-subtle: var(--grey-100);
126
127
  --bg-surface-2: var(--grey-200);
127
128
  --bg-surface-3: var(--grey-400);
128
129
  --bg-inverse: var(--grey-800);
@@ -134,11 +135,11 @@
134
135
  /* Hover */
135
136
  --hover-surface: var(--grey-100);
136
137
  --hover-on-surface: var(--grey-50);
137
- --hover-canvas: var(--grey-100);
138
+ --hover-canvas: #F6F6F7;
138
139
 
139
140
  /* Navigation */
140
141
  --nav-surface: var(--grey-50);
141
- --nav-border: var(--grey-200);
142
+ --nav-border: var(--border-on-surface-1);
142
143
  --nav-hover: var(--grey-100);
143
144
  --nav-selected: var(--grey-100);
144
145
 
@@ -152,10 +153,16 @@
152
153
  --fg-inverse-secondary: var(--grey-300);
153
154
 
154
155
  /* ---- Borders ---- */
155
- --border-subtle: var(--grey-200);
156
- --border-default: var(--grey-300);
156
+ /* Matched Oklab lightness step; calibrated to grey-200 on light canvas. */
157
+ --border-on-canvas: #E6E6E7;
158
+ --border-on-surface-1: #E2E2E2;
159
+ --border-on-surface-2: #CFCFD0;
160
+ --border-on-surface-3: #7D7D7F;
161
+ --border-subtle: var(--border-on-canvas);
162
+ --border-default: var(--border-subtle);
157
163
  --border-strong: var(--grey-400);
158
- --border-focus: var(--blue-500);
164
+ --border-focus: var(--grey-400);
165
+ --focus-surface: color-mix(in srgb, var(--border-focus) 25%, transparent);
159
166
  --border-inverse: rgba(255, 255, 255, 0.12);
160
167
  --border-inverse-strong: rgba(255, 255, 255, 0.20);
161
168
 
@@ -202,6 +209,18 @@
202
209
  --warning-text: var(--yellow-900);
203
210
  --warning-bg: var(--yellow-0);
204
211
 
212
+ /* Filled status and metadata tags — borderless containment. */
213
+ --tag-info-bg: var(--blue-100);
214
+ --tag-info-fg: var(--blue-600);
215
+ --tag-success-bg: var(--green-100);
216
+ --tag-success-fg: var(--green-600);
217
+ --tag-warning-bg: var(--yellow-100);
218
+ --tag-warning-fg: var(--yellow-600);
219
+ --tag-error-bg: var(--red-100);
220
+ --tag-error-fg: var(--red-600);
221
+ --tag-neutral-bg: var(--bg-surface-2);
222
+ --tag-neutral-fg: var(--fg-secondary);
223
+
205
224
  /* ---- Pink ---- */
206
225
  --pink-default: var(--pink-500);
207
226
  --pink-hover: var(--pink-400);
@@ -313,6 +332,7 @@
313
332
  /* ---- Core ---- */
314
333
  --bg-canvas: var(--grey-900);
315
334
  --bg-surface-1: var(--grey-800);
335
+ --bg-surface-subtle: var(--grey-800);
316
336
  --bg-surface-2: var(--grey-700);
317
337
  --bg-surface-3: var(--grey-600);
318
338
  --bg-inverse: var(--grey-50);
@@ -324,11 +344,11 @@
324
344
  /* Hover */
325
345
  --hover-surface: var(--grey-700);
326
346
  --hover-on-surface: var(--grey-800);
327
- --hover-canvas: var(--grey-700);
347
+ --hover-canvas: var(--grey-800);
328
348
 
329
349
  /* Navigation */
330
350
  --nav-surface: var(--grey-700);
331
- --nav-border: var(--grey-600);
351
+ --nav-border: var(--border-on-surface-1);
332
352
  --nav-hover: var(--grey-600);
333
353
  --nav-selected: var(--grey-500);
334
354
 
@@ -342,10 +362,15 @@
342
362
  --fg-inverse-secondary: var(--grey-600);
343
363
 
344
364
  /* ---- Borders ---- */
345
- --border-subtle: var(--grey-700);
346
- --border-default: var(--grey-600);
365
+ /* Matched Oklab lightness step; calibrated to grey-200 on light canvas. */
366
+ --border-on-canvas: #2D2D2F;
367
+ --border-on-surface-1: #3F3F41;
368
+ --border-on-surface-2: #535355;
369
+ --border-on-surface-3: #6A6A6D;
370
+ --border-subtle: var(--border-on-canvas);
371
+ --border-default: var(--border-subtle);
347
372
  --border-strong: var(--grey-500);
348
- --border-focus: var(--blue-400);
373
+ --border-focus: var(--grey-400);
349
374
  --border-inverse: rgba(0, 0, 0, 0.12);
350
375
  --border-inverse-strong: rgba(0, 0, 0, 0.20);
351
376
 
@@ -392,6 +417,18 @@
392
417
  --warning-text: var(--yellow-100);
393
418
  --warning-bg: var(--yellow-900);
394
419
 
420
+ /* Filled status and metadata tags — borderless containment. */
421
+ --tag-info-bg: var(--blue-700);
422
+ --tag-info-fg: var(--blue-200);
423
+ --tag-success-bg: var(--green-700);
424
+ --tag-success-fg: var(--green-200);
425
+ --tag-warning-bg: var(--yellow-700);
426
+ --tag-warning-fg: var(--yellow-200);
427
+ --tag-error-bg: var(--red-700);
428
+ --tag-error-fg: var(--red-200);
429
+ --tag-neutral-bg: var(--bg-surface-2);
430
+ --tag-neutral-fg: var(--fg-secondary);
431
+
395
432
  /* ---- Pink ---- */
396
433
  --pink-default: var(--pink-400);
397
434
  --pink-hover: var(--pink-300);
@@ -430,14 +467,46 @@
430
467
  }
431
468
  }
432
469
 
470
+ /* Select the reference surface for a neutral boundary. This does not set a
471
+ background. Reset the scope at nested boundaries with a different pair. */
472
+ [data-fractal-border-surface="canvas"] {
473
+ --border-subtle: var(--border-on-canvas);
474
+ --border-default: var(--border-subtle);
475
+ --border-dashed-subtle: 1px dashed var(--border-subtle);
476
+ }
477
+ [data-fractal-border-surface="surface-1"] {
478
+ --border-subtle: var(--border-on-surface-1);
479
+ --border-default: var(--border-subtle);
480
+ --border-dashed-subtle: 1px dashed var(--border-subtle);
481
+ }
482
+ [data-fractal-border-surface="surface-2"] {
483
+ --border-subtle: var(--border-on-surface-2);
484
+ --border-default: var(--border-subtle);
485
+ --border-dashed-subtle: 1px dashed var(--border-subtle);
486
+ }
487
+ [data-fractal-border-surface="surface-3"] {
488
+ --border-subtle: var(--border-on-surface-3);
489
+ --border-default: var(--border-subtle);
490
+ --border-dashed-subtle: 1px dashed var(--border-subtle);
491
+ }
492
+
493
+ /* Primary actions share one theme for text and icon-only buttons.
494
+ Products may override these four tokens on their application root. */
495
+ :root {
496
+ --button-primary-bg: var(--fg-primary);
497
+ --button-primary-hover: var(--fg-secondary);
498
+ --button-primary-active: var(--fg-primary);
499
+ --button-primary-fg: var(--fg-inverse);
500
+ }
501
+
433
502
  /* =========================================
434
503
  Typography - Font Declarations & Tokens
435
504
  ========================================= */
436
505
 
437
506
  /* ---- Custom Font Declarations ---- */
438
507
  @font-face {
439
- font-family: 'Figtree';
440
- src: url('./assets/typography/Figtree-VariableFont_wght.ttf') format('truetype-variations');
508
+ font-family: 'Mirror Sans';
509
+ src: url('./assets/typography/MirrorSans-Variable.woff2') format('woff2');
441
510
  font-weight: 300 900;
442
511
  font-style: normal;
443
512
  font-display: swap;
@@ -451,12 +520,12 @@
451
520
  font-display: swap;
452
521
  }
453
522
 
454
- /* Math & Greek fallback. Figtree and Geist Mono have no glyphs for Greek
523
+ /* Math & Greek fallback. Mirror Sans and Geist Mono have no glyphs for Greek
455
524
  letters (α, β, Δ, π, …) or math operators (∑, ∫, ∂, ∇, ≈, √, …), which
456
525
  appear constantly in scientific / chemistry reports. Noto Sans Math is
457
526
  listed after the primary faces so the browser borrows it per-glyph only
458
- for the symbols Figtree/Geist Mono lack — normal Latin text still renders
459
- in Figtree. See typography-guide.md → Math & Greek Fallback. */
527
+ for the symbols Mirror Sans/Geist Mono lack — normal Latin text still renders
528
+ in Mirror Sans. See typography-guide.md → Math & Greek Fallback. */
460
529
  @font-face {
461
530
  font-family: 'Noto Sans Math';
462
531
  src: url('./assets/typography/NotoSansMath-Regular.ttf') format('truetype');
@@ -467,7 +536,7 @@
467
536
 
468
537
  /* ---- Font Family Variables ---- */
469
538
  :root {
470
- --font-sans: 'Figtree', 'Noto Sans Math', system-ui, sans-serif;
539
+ --font-sans: 'Mirror Sans', 'Noto Sans Math', system-ui, sans-serif;
471
540
  --font-mono: 'Geist Mono', 'Noto Sans Math', monospace;
472
541
  }
473
542
 
@@ -620,9 +689,46 @@ body {
620
689
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.08), 0 8px 10px rgba(0,0,0,0.04);
621
690
 
622
691
  /* ---- Layout Constants ---- */
692
+ --shell-header-height: 3.5rem; /* 56px at the default root, including the divider */
693
+ --chart-axis-tick-gap: var(--space-1);
694
+ --chart-axis-title-gap: var(--space-2);
623
695
  --panel-width: 256px;
624
696
  }
625
697
 
698
+ /* Shared single-line control geometry. See layout-guide.md. */
699
+ :root {
700
+ --control-border-width: 1px;
701
+ --control-label-gap: var(--space-2);
702
+ --control-icon-gap: var(--space-2);
703
+ --control-sm-font-size: .75rem;
704
+ --control-sm-line-height: 1.25rem;
705
+ --control-sm-padding-block: var(--space-1);
706
+ --control-sm-padding-inline: var(--space-3);
707
+ --control-sm-icon-size: 1rem;
708
+ --control-md-font-size: .875rem;
709
+ --control-md-line-height: 1.25rem;
710
+ --control-md-padding-block: var(--space-2);
711
+ --control-md-padding-inline: var(--space-3);
712
+ --control-md-icon-size: 1.25rem;
713
+ --control-lg-font-size: .875rem;
714
+ --control-lg-line-height: 1.25rem;
715
+ --control-lg-padding-block: var(--space-3);
716
+ --control-lg-padding-inline: var(--space-4);
717
+ --control-lg-icon-size: 1.25rem;
718
+ --control-xl-font-size: .875rem;
719
+ --control-xl-line-height: 1.25rem;
720
+ --control-xl-padding-block: var(--space-4);
721
+ --control-xl-padding-inline: var(--space-5);
722
+ --control-xl-icon-size: 1.25rem;
723
+ }
724
+
725
+ /* Table content caps; selected by the table container's available width. */
726
+ :root {
727
+ --table-column-max-compact: 16rem;
728
+ --table-column-max-medium: 20rem;
729
+ --table-column-max-wide: 24rem;
730
+ }
731
+
626
732
  /* =========================================
627
733
  Design System Motion Tokens
628
734
  =========================================
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirror-physics/fractal-ui",
3
- "version": "0.2.0-next.9",
4
- "description": "Fractal UI — React components and CSS tokens for Mirror Physics products",
3
+ "version": "0.2.0-next.90",
4
+ "description": "Fractal UI \u2014 React components and CSS tokens for Mirror Physics products",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -13,7 +13,13 @@
13
13
  "require": "./dist/index.cjs"
14
14
  },
15
15
  "./css": "./dist/index.css",
16
- "./tokens.css": "./dist/tokens.css"
16
+ "./tokens.css": "./dist/tokens.css",
17
+ "./column-editor": {
18
+ "types": "./dist/column-editor.d.ts",
19
+ "import": "./dist/column-editor.js",
20
+ "require": "./dist/column-editor.cjs"
21
+ },
22
+ "./column-editor.css": "./dist/column-editor.css"
17
23
  },
18
24
  "files": [
19
25
  "dist"
@@ -24,8 +30,11 @@
24
30
  "scripts": {
25
31
  "build": "tsup",
26
32
  "typecheck": "tsc --noEmit",
33
+ "test:tooltip": "playwright test",
34
+ "test:dropdown": "node --test tests/dropdown-position.test.mjs",
27
35
  "storybook": "storybook dev -p 6006",
28
36
  "build-storybook": "storybook build",
37
+ "publish:next": "set -a && . ./.env.local && set +a && npm publish --tag next",
29
38
  "prepublishOnly": "npm run typecheck && npm run build"
30
39
  },
31
40
  "peerDependencies": {
@@ -33,10 +42,17 @@
33
42
  "react-dom": "^18.0.0 || ^19.0.0"
34
43
  },
35
44
  "dependencies": {
36
- "@mirror-physics/fractal-icons": "^0.4.0",
45
+ "@codemirror/lang-json": "^6.0.2",
46
+ "@codemirror/language": "^6.12.4",
47
+ "@codemirror/view": "^6.43.7",
48
+ "@lezer/highlight": "^1.2.3",
49
+ "@mirror-physics/fractal-icons": "^0.4.3",
50
+ "@radix-ui/react-tooltip": "^1.2.16",
51
+ "@uiw/react-codemirror": "^4.25.11",
37
52
  "clsx": "^2.1.1"
38
53
  },
39
54
  "devDependencies": {
55
+ "@playwright/test": "^1.63.0",
40
56
  "@storybook/addon-a11y": "^10.4.6",
41
57
  "@storybook/addon-docs": "^10.4.6",
42
58
  "@storybook/react-vite": "^10.4.6",
@@ -46,7 +62,8 @@
46
62
  "react-dom": "^19.2.4",
47
63
  "storybook": "^10.4.6",
48
64
  "tsup": "^8.5.1",
49
- "typescript": "^5.9.3"
65
+ "typescript": "^5.9.3",
66
+ "vite": "^7.3.6"
50
67
  },
51
68
  "repository": {
52
69
  "type": "git",