@fiestaboard/ui 5.3.0 → 5.4.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 (56) hide show
  1. package/README.md +18 -0
  2. package/dist/components/chrome/nav-list.d.ts +53 -0
  3. package/dist/components/chrome/nav-list.js +84 -0
  4. package/dist/components/chrome/nav-list.js.map +1 -0
  5. package/dist/components/containment/icon-tile.d.ts +67 -0
  6. package/dist/components/containment/icon-tile.js +44 -0
  7. package/dist/components/containment/icon-tile.js.map +1 -0
  8. package/dist/components/containment/json-tree.js +1 -1
  9. package/dist/components/containment/json-tree.js.map +1 -1
  10. package/dist/components/containment/scroll-area.d.ts +17 -0
  11. package/dist/components/containment/scroll-area.js +2 -2
  12. package/dist/components/containment/scroll-area.js.map +1 -1
  13. package/dist/components/containment/tabs.js +2 -2
  14. package/dist/components/containment/tabs.js.map +1 -1
  15. package/dist/components/editor/formula/formula-editor-panel.js +2 -2
  16. package/dist/components/editor/formula/formula-editor-panel.js.map +1 -1
  17. package/dist/components/editor/template-editor-toolbar.d.ts +27 -3
  18. package/dist/components/editor/template-editor-toolbar.js +99 -96
  19. package/dist/components/editor/template-editor-toolbar.js.map +1 -1
  20. package/dist/components/forms/button.d.ts +1 -1
  21. package/dist/components/forms/button.js +2 -0
  22. package/dist/components/forms/button.js.map +1 -1
  23. package/dist/components/forms/selection-group.d.ts +82 -0
  24. package/dist/components/forms/selection-group.js +51 -0
  25. package/dist/components/forms/selection-group.js.map +1 -0
  26. package/dist/components/forms/swatch.d.ts +81 -0
  27. package/dist/components/forms/swatch.js +91 -0
  28. package/dist/components/forms/swatch.js.map +1 -0
  29. package/dist/components/forms/timezone-picker.d.ts +163 -0
  30. package/dist/components/forms/timezone-picker.js +158 -0
  31. package/dist/components/forms/timezone-picker.js.map +1 -0
  32. package/dist/components/forms/toggle-card.d.ts +45 -35
  33. package/dist/components/forms/toggle-card.js +187 -122
  34. package/dist/components/forms/toggle-card.js.map +1 -1
  35. package/dist/components/forms/toggle.d.ts +1 -1
  36. package/dist/components/layout/flex.d.ts +1 -1
  37. package/dist/components/layout/grid.d.ts +1 -1
  38. package/dist/components/layout/stack.d.ts +1 -1
  39. package/dist/components/overlays/lightbox.js +1 -1
  40. package/dist/components/overlays/lightbox.js.map +1 -1
  41. package/dist/components/overlays/overlay-close.js +1 -1
  42. package/dist/components/overlays/overlay-close.js.map +1 -1
  43. package/dist/components/plugin/board-showcase.js +1 -1
  44. package/dist/components/plugin/board-showcase.js.map +1 -1
  45. package/dist/components/typography/heading.d.ts +1 -1
  46. package/dist/components/typography/text-link.d.ts +27 -3
  47. package/dist/components/typography/text-link.js +1 -1
  48. package/dist/components/typography/text-link.js.map +1 -1
  49. package/dist/components/typography/text.d.ts +1 -1
  50. package/dist/components/wizard/wizard-shell.d.ts +6 -1
  51. package/dist/components/wizard/wizard-shell.js +38 -35
  52. package/dist/components/wizard/wizard-shell.js.map +1 -1
  53. package/dist/index.d.ts +4 -0
  54. package/dist/index.js +104 -100
  55. package/dist/theme.css +85 -4
  56. package/package.json +9 -2
package/dist/theme.css CHANGED
@@ -361,6 +361,28 @@
361
361
  --border: color-mix(in oklch, var(--foreground) 11%, transparent);
362
362
  --input: color-mix(in oklch, var(--foreground) 50%, transparent);
363
363
  --ring: var(--primary); /* = --primary, see the invariant above */
364
+ /* ============================================================
365
+ * THE FOCUS RING, AS A VALUE (#228 item 5).
366
+ *
367
+ * The recipe itself is argued at `.focus-ring` near the bottom of this
368
+ * file; this is the same three stops written ONCE, so that the class and
369
+ * every other caller are the same value rather than two copies of it.
370
+ *
371
+ * `.focus-ring` is a class, and a class needs a call site. MDX prose
372
+ * anchors do not have one — a docs pipeline styles them from a stylesheet
373
+ * it owns — so the docs site hand-mirrored the three stops and the copy
374
+ * has already gone stale once. With the recipe published as a property, a
375
+ * CSS-only consumer writes
376
+ *
377
+ * a:focus-visible { box-shadow: var(--focus-ring-shadow); outline: none; }
378
+ *
379
+ * and tracks a retune here by construction.
380
+ *
381
+ * Declared in :root only: both stops resolve through --ring and
382
+ * --ring-edge, which are already themed, so the value re-resolves per
383
+ * theme without a second declaration to keep in sync.
384
+ * ============================================================ */
385
+ --focus-ring-shadow: 0 0 0 1px var(--ring-edge), 0 0 0 3px var(--ring), 0 0 0 4px var(--ring-edge);
364
386
  /* ============================================================
365
387
  * THE RAIL FOLLOWS THE THEME (#231).
366
388
  *
@@ -406,6 +428,56 @@
406
428
  Alert enforces this — status color never touches a sentence. */
407
429
  --warning: oklch(0.62 0.131 104);
408
430
  --warning-foreground: oklch(0.205 0.008 73);
431
+ /* ============================================================
432
+ * TAG TINTS ARE A PAIR ACROSS AN UNKNOWN SURFACE (#231).
433
+ *
434
+ * badge.tsx paints the three tag variants as `bg-tag-x/15` with
435
+ * `text-tag-x-foreground` on top (and lifts the fill to 25% when the badge
436
+ * is an anchor being hovered). The fill is TRANSLUCENT, so the thing the
437
+ * text is actually measured against is not a token at all — it is the tint
438
+ * composited over whatever surface the badge landed on. Retuning either
439
+ * half without re-measuring the whole matrix is how this drifts.
440
+ *
441
+ * So the matrix is measured, and it is measured by CI rather than by
442
+ * comment: scripts/ci/tests/theme-contrast.test.mjs recomputes every
443
+ * variant x surface x theme x tint cell from this file and fails under
444
+ * 4.5:1. Worst cell in the palette today (SC 1.4.3, AA):
445
+ *
446
+ * --background --card/--popover worst surface
447
+ * variable light 7.09/6.11 7.68/6.59 6.35 (--secondary)
448
+ * success light 6.62/5.77 7.17/6.22 5.22 (--secondary)
449
+ * formula light 6.74/5.81 7.31/6.27 5.25 (--secondary)
450
+ * variable dark 9.95/7.92 8.83/7.02 5.98 (--secondary)
451
+ * success dark 10.39/8.11 9.20/7.18 6.11 (--secondary)
452
+ * formula dark 10.11/7.96 8.96/7.04 5.99 (--secondary)
453
+ * ^15% / ^25% (rest / anchor-hover fill)
454
+ *
455
+ * The pairs hold, and the ~1.5:1 in #231 IS NOT REPRODUCIBLE FROM THIS
456
+ * FILE. The issue's cell — dark `success` on `--card` — recomputes to
457
+ * 9.20:1 at the 15% fill and 7.18:1 at the 25% one, and the pre-4.0.0
458
+ * palette this replaced does not produce a sub-4.5:1 cell anywhere either,
459
+ * so it is not a number these tokens used to have. It is quoted here
460
+ * because #231 stays OPEN on it: the tokens are proven, the report is not
461
+ * explained, and inventing a cause for it would be the same mistake as
462
+ * inventing a ratio.
463
+ *
464
+ * In particular it is NOT the downstream override. fiestaboard.github.io
465
+ * pins the "New" badge to hexes with `!important`, which is a hex fork of
466
+ * a token pair and a real maintenance defect — a fork stops tracking a
467
+ * retune here — but it is theme-AWARE (`.newBadge` plus a
468
+ * `[data-theme="dark"] .newBadge`, and their build widens every compiled
469
+ * `.dark` selector to that attribute), so the light pigment never lands on
470
+ * a dark fill. Both halves clear AA on their own fills: 6.49:1 light,
471
+ * 7.52:1 dark. It is redundant, not broken. Dropping it downstream is a
472
+ * cleanup, not a fix, and it does not close #231.
473
+ *
474
+ * Opaque fills (mixing the tint into --background instead of compositing
475
+ * over the live surface) were prototyped and REJECTED: they make the pair
476
+ * surface-independent, but a fill baked from --background measures 1.01:1
477
+ * against --popover in dark, so the chip's field disappears on exactly the
478
+ * surface the variable picker uses. Alpha is what keeps the chip visible on
479
+ * every surface; the CI matrix is what keeps it legible.
480
+ * ============================================================ */
409
481
  --tag-variable: oklch(0.52 0.16 315);
410
482
  --tag-variable-foreground: oklch(0.4 0.1 315);
411
483
  --tag-success: oklch(0.52 0.147 133);
@@ -800,6 +872,10 @@
800
872
  13.05:1 on --background; board-ink label 11.81:1. */
801
873
  --warning: oklch(0.86 0.17 104);
802
874
  --warning-foreground: oklch(0.205 0.008 73);
875
+ /* The dark half of the #231 matrix — see the table in :root. These measure
876
+ 7.90-10.39:1 at the 15% fill on every surface a Badge can land on, which
877
+ includes the dark `--card` cell #231 reports as ~1.5:1 (9.20:1 here). The
878
+ reported figure is unexplained, not reproduced; #231 stays open on it. */
803
879
  --tag-variable: oklch(0.78 0.164 315);
804
880
  --tag-variable-foreground: oklch(0.86 0.1 315);
805
881
  --tag-success: oklch(0.78 0.17 133);
@@ -1435,16 +1511,21 @@ html[data-board-switch="backward"]::view-transition-new(board-page) {
1435
1511
  * merges into the page (1.11:1) and the orange band — 9.77:1 there — carries
1436
1512
  * the indicator directly, which is why the recipe is safe in both themes for
1437
1513
  * different reasons.
1514
+ *
1515
+ * The three stops themselves live in :root as --focus-ring-shadow (#228
1516
+ * item 5). This class is now one CALLER of that value rather than the place
1517
+ * it is defined, which is what lets a CSS-only consumer — MDX prose anchors
1518
+ * have no call site to add a class to — say `box-shadow:
1519
+ * var(--focus-ring-shadow)` and stay in sync instead of hand-mirroring the
1520
+ * geometry. The rendered output is byte-identical to the inline recipe it
1521
+ * replaces; if it were not, every VRT baseline in the repo would move.
1438
1522
  * ============================================================ */
1439
1523
  .focus-ring {
1440
1524
  outline: none;
1441
1525
  }
1442
1526
  .focus-ring:focus-visible {
1443
1527
  outline: none;
1444
- box-shadow:
1445
- 0 0 0 1px var(--ring-edge),
1446
- 0 0 0 3px var(--ring),
1447
- 0 0 0 4px var(--ring-edge);
1528
+ box-shadow: var(--focus-ring-shadow);
1448
1529
  }
1449
1530
 
1450
1531
  /* ============================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiestaboard/ui",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "FiestaUI — the FiestaBoard design system. React components on Base UI with Tailwind v4 design tokens.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,6 +38,8 @@
38
38
  "scripts": {
39
39
  "build": "vite build && tsc -p tsconfig.build.json && cp src/styles/theme.css dist/theme.css && cp src/styles/fonts.css dist/fonts.css && cp src/styles/editor.css dist/editor.css",
40
40
  "typecheck": "tsc --noEmit",
41
+ "test": "vitest run",
42
+ "test:watch": "vitest",
41
43
  "lint": "eslint",
42
44
  "lint:fix": "eslint --fix",
43
45
  "format": "prettier --write .",
@@ -89,6 +91,10 @@
89
91
  "@storybook/react-vite": "^10.5.5",
90
92
  "@storybook/test-runner": "^0.24.4",
91
93
  "@tailwindcss/vite": "^4",
94
+ "@testing-library/dom": "^10.4.1",
95
+ "@testing-library/jest-dom": "^7.0.1",
96
+ "@testing-library/react": "^16.3.2",
97
+ "@testing-library/user-event": "^14.6.5",
92
98
  "@tiptap/core": "^3.29.2",
93
99
  "@tiptap/pm": "^3.29.2",
94
100
  "@tiptap/react": "^3.29.2",
@@ -118,7 +124,8 @@
118
124
  "tailwindcss": "^4",
119
125
  "typescript": "6.0.3",
120
126
  "typescript-eslint": "^8.65.0",
121
- "vite": "^8.1.5"
127
+ "vite": "^8.1.5",
128
+ "vitest": "^4.1.11"
122
129
  },
123
130
  "publishConfig": {
124
131
  "registry": "https://registry.npmjs.org",