@flytedan/flytebot-design-system 0.13.0 → 0.15.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flytedan/flytebot-design-system",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "flytedesk Design System — shared component library, tokens, and business-logic kits for flytedesk apps.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
package/styles/tokens.css CHANGED
@@ -409,6 +409,50 @@
409
409
  :root{--dur-instant:40ms;/* @kind other */--dur-fast:80ms;/* @kind other */--dur-base:120ms;/* @kind other */--dur-slow:160ms;/* @kind other */--dur-panel:200ms;/* @kind other */--skeleton-dur:0ms/* @kind other */}
410
410
  }
411
411
 
412
+ /* ============ tokens/appearance.css ============ */
413
+ /* MP-208 — the [data-text-scale]/[data-contrast]/[data-motion] rules AppearanceMenu
414
+ (components/platform/AppearanceMenu.tsx) and its store (kits/appearance.ts) drive by
415
+ setting attributes on document.documentElement. Consolidated from this repo's own
416
+ docs-site demo (text scale, high contrast) and media-planner's local copy (adds the
417
+ reduced-motion override) — every consuming app gets all three from importing this
418
+ stylesheet alone, none of it re-implemented per app. */
419
+
420
+ /* Text scale: a zoom multiplier, same mechanism the pre-MP-208 copies used (JS-set
421
+ body.style.zoom) but expressed as a CSS token+rule pair instead, so no per-app JS is
422
+ needed to apply it. "md" is 100% — the default, absent-attribute case below. */
423
+ :root{--text-scale-zoom:1;/* @kind other */}
424
+ :root[data-text-scale="sm"]{--text-scale-zoom:.9;/* @kind other */}
425
+ :root[data-text-scale="lg"]{--text-scale-zoom:1.15;/* @kind other */}
426
+ :root[data-text-scale="xl"]{--text-scale-zoom:1.3;/* @kind other */}
427
+ body{zoom:var(--text-scale-zoom);}
428
+
429
+ /* High contrast: sharpen the two tokens that carry most of the system's "quiet" UI —
430
+ hairline borders and secondary/muted text — up to the next, stronger step the theme
431
+ already defines for both light and dark (this file's colors.css section above). Also
432
+ widens the focus ring so keyboard focus reads unmistakably against every surface. */
433
+ [data-contrast="high"]{
434
+ --border:var(--border-strong);
435
+ --text-muted:var(--text-2);
436
+ --focus-ring:0 0 0 2px var(--page),0 0 0 4px var(--text);
437
+ }
438
+
439
+ /* Reduced motion: forces every duration token above down to (near) zero, regardless of
440
+ the OS setting — this can only ever ADD reduced motion on top of the
441
+ `prefers-reduced-motion` floor already applied above, never remove it, since that
442
+ media query keeps applying underneath this attribute. */
443
+ [data-motion="reduce"]{
444
+ --dur-instant:0ms;--dur-fast:0ms;--dur-base:0ms;--dur-slow:0ms;--dur-panel:0ms;--skeleton-dur:0ms;
445
+ }
446
+ [data-motion="reduce"] *,
447
+ [data-motion="reduce"] *::before,
448
+ [data-motion="reduce"] *::after{
449
+ animation-duration:.001ms!important;
450
+ animation-delay:0ms!important;
451
+ animation-iteration-count:1!important;
452
+ transition-duration:.001ms!important;
453
+ scroll-behavior:auto!important;
454
+ }
455
+
412
456
  /* ============ tokens/layout.css ============ */
413
457
  :root{
414
458
  --sidebar-w:264px;/* @kind spacing */