@efolusi/meridian 1.13.0 → 1.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/components.css CHANGED
@@ -735,7 +735,7 @@ a.ef-sourcecard:focus-visible{outline:none;box-shadow:var(--focus-ring)}
735
735
  .ef-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:19px;padding:0 5px;border:1px solid var(--border-strong);border-bottom-width:2px;border-radius:var(--radius-sm);background:var(--surface-card);font-family:var(--font-mono);font-size:11px;color:var(--text-secondary);line-height:1}
736
736
  /* components/display/Link.jsx */
737
737
  .ef-link{display:inline-flex;align-items:center;gap:4px;color:var(--text-link);text-decoration:none;font-weight:var(--weight-medium);cursor:pointer;border-radius:var(--radius-sm);transition:color var(--dur-fast) var(--ease-out)}
738
- .ef-link:hover{color:var(--accent-hover);text-decoration:underline;text-underline-offset:3px}
738
+ .ef-link:hover{color:var(--text-link-hover);text-decoration:underline;text-underline-offset:3px}
739
739
  .ef-link:focus-visible{outline:none;box-shadow:var(--focus-ring)}
740
740
  .ef-link--quiet{color:var(--text-secondary)}
741
741
  .ef-link--quiet:hover{color:var(--text-primary)}
@@ -1275,14 +1275,10 @@ a.ef-crumbs__link:hover{color:var(--text-primary);text-decoration:none}
1275
1275
  .ef-hovercard__trigger{display:inline-flex;border-radius:var(--radius-sm)}
1276
1276
  .ef-hovercard__trigger:focus-visible{outline:none;box-shadow:var(--focus-ring)}
1277
1277
  .ef-hovercard__panel{position:absolute;left:0;background:var(--surface-card);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:14px;z-index:var(--z-popover);animation:ef-hovercard-in var(--dur-med) var(--ease-out)}
1278
- .ef-hovercard__panel--bottom{top:calc(100% + 8px)}
1279
- .ef-hovercard__panel--top{bottom:calc(100% + 8px)}
1280
1278
  @keyframes ef-hovercard-in{from{opacity:0;transform:translateY(2px)}}
1281
1279
  /* components/overlay/Menu.jsx */
1282
1280
  .ef-menu{position:relative;display:inline-flex}
1283
1281
  .ef-menu__panel{position:absolute;top:calc(100% + 6px);min-width:190px;background:var(--surface-card);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:4px;z-index:var(--z-dropdown);animation:ef-menu-in var(--dur-fast) var(--ease-out)}
1284
- .ef-menu__panel--left{left:0}
1285
- .ef-menu__panel--right{right:0}
1286
1282
  @keyframes ef-menu-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
1287
1283
  .ef-menu__item{display:flex;align-items:center;gap:9px;width:100%;height:32px;padding:0 10px;border:none;border-radius:var(--radius-sm);background:none;cursor:pointer;text-align:left;font-family:var(--font-sans);font-size:var(--text-sm);color:var(--text-primary);transition:background var(--dur-fast) var(--ease-out)}
1288
1284
  .ef-menu__item:hover:not(:disabled){background:var(--surface-sunken)}
@@ -1296,8 +1292,6 @@ a.ef-crumbs__link:hover{color:var(--text-primary);text-decoration:none}
1296
1292
  /* components/overlay/Popover.jsx */
1297
1293
  .ef-popover{position:relative;display:inline-flex}
1298
1294
  .ef-popover__panel{position:absolute;top:calc(100% + 8px);width:280px;background:var(--surface-card);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:14px;z-index:var(--z-dropdown);animation:ef-pop-in var(--dur-fast) var(--ease-out)}
1299
- .ef-popover__panel--left{left:0}
1300
- .ef-popover__panel--right{right:0}
1301
1295
  @keyframes ef-pop-in{from{opacity:0;transform:translateY(-3px)}}
1302
1296
  /* components/overlay/Portal.jsx */
1303
1297
  .ef-portal{position:fixed;top:0;left:0;width:0;height:0}
package/display/Link.js CHANGED
@@ -2,6 +2,12 @@
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  import React from 'react';
4
4
  import { Icon } from "../icons/Icon.js";
5
+
6
+ // Hover deepens the link's own hue. It used to jump to --accent-hover, which is
7
+ // near-black in the light theme — a warm brown link turning almost black on
8
+ // hover reads as broken, not emphasised. The underline stays: colour alone is
9
+ // not a safe affordance (WCAG 1.4.1).
10
+
5
11
  export function Link({
6
12
  href = '#',
7
13
  external,
@@ -2,6 +2,8 @@
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  import React from 'react';
4
4
  import { Portal, useAnchoredStyle } from "./Portal.js";
5
+ // Panel modifiers pin no edge on purpose; see useAnchoredStyle in Portal.jsx.
6
+
5
7
  export function HoverCard({
6
8
  trigger,
7
9
  side = 'bottom',
package/overlay/Menu.js CHANGED
@@ -4,6 +4,8 @@ import React from 'react';
4
4
  import { Icon } from "../icons/Icon.js";
5
5
  import { mergeRefs } from "../forms/Button.js";
6
6
  import { Portal, useAnchoredStyle } from "./Portal.js";
7
+ // Panel modifiers pin no edge on purpose; see useAnchoredStyle in Portal.jsx.
8
+
7
9
  export const Menu = /*#__PURE__*/React.forwardRef(function Menu({
8
10
  trigger,
9
11
  items,
@@ -3,6 +3,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  import React from 'react';
4
4
  import { mergeRefs } from "../forms/Button.js";
5
5
  import { Portal, useAnchoredStyle } from "./Portal.js";
6
+ // Panel modifiers pin no edge on purpose; see useAnchoredStyle in Portal.jsx.
7
+
6
8
  export const Popover = /*#__PURE__*/React.forwardRef(function Popover({
7
9
  trigger,
8
10
  children,
package/overlay/Portal.js CHANGED
@@ -56,10 +56,17 @@ export function useAnchoredStyle(anchorRef, panelRef, {
56
56
  matchWidth = false
57
57
  } = {}) {
58
58
  const [state, setState] = React.useState({
59
+ // `right`/`bottom` are pinned to auto from the very first frame. A panel
60
+ // whose class also sets `right: 0` (every align="right" menu) would
61
+ // otherwise be laid out with both edges pinned, stretch to the full
62
+ // viewport, and get measured at that width — so the clamp below shoved it
63
+ // against the left edge instead of under its trigger.
59
64
  style: {
60
65
  position: 'fixed',
61
66
  top: 0,
62
67
  left: 0,
68
+ right: 'auto',
69
+ bottom: 'auto',
63
70
  visibility: 'hidden'
64
71
  },
65
72
  side: placement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efolusi/meridian",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "description": "A general-purpose open-source design system by Efolusi: accessible React components, design tokens, blocks and example apps.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://meridian.efolusi.com",
@@ -65,6 +65,7 @@ module.exports = { theme: { extend: {
65
65
  "text-inverse": "var(--text-inverse)",
66
66
  "text-inverse-muted": "var(--text-inverse-muted)",
67
67
  "text-link": "var(--text-link)",
68
+ "text-link-hover": "var(--text-link-hover)",
68
69
  "border-default": "var(--border-default)",
69
70
  "border-strong": "var(--border-strong)",
70
71
  "border-inverse": "var(--border-inverse)",
package/tokens/colors.css CHANGED
@@ -23,7 +23,7 @@
23
23
  --media-backdrop:#141210;/* generation backdrop */--media-backdrop-dot:rgba(243,239,231,.22);/* shimmer dots on the backdrop */
24
24
  --media-scrim:rgba(20,16,12,.55);/* legibility gradient over the finished image */--media-scrim-soft:rgba(20,16,12,.45);/* action chip resting fill */--media-scrim-strong:rgba(20,16,12,.7);/* action chip hover fill */
25
25
  --text-on-media:var(--sand-50);/* prompt text over imagery — stays light in both themes */--text-on-media-muted:rgba(250,249,246,.75);/* status line over imagery */
26
- --text-primary:var(--sand-950);--text-secondary:var(--sand-700);--text-muted:#746A55;/* between sand-600/700: ≥4.5:1 on page, card, and sunken */--text-inverse:var(--sand-50);--text-inverse-muted:rgba(250,249,246,.6);/* dim ink on --surface-inverse (toast close button); remapped in dark where the inverse surface flips light */--text-link:var(--brand-700);
26
+ --text-primary:var(--sand-950);--text-secondary:var(--sand-700);--text-muted:#746A55;/* between sand-600/700: ≥4.5:1 on page, card, and sunken */--text-inverse:var(--sand-50);--text-inverse-muted:rgba(250,249,246,.6);/* dim ink on --surface-inverse (toast close button); remapped in dark where the inverse surface flips light */--text-link:var(--brand-700);--text-link-hover:var(--brand-900);
27
27
  --border-default:var(--sand-200);--border-strong:var(--sand-300);--border-inverse:rgba(250,249,246,.18);
28
28
  --accent:var(--brand-950);--accent-hover:#1D0E04;--accent-active:#120801;--accent-subtle:var(--brand-50);--accent-subtle-border:var(--brand-200);--accent-contrast:#FFFFFF;
29
29
  --danger-contrast:#FFFFFF;/* label on a solid --danger-600 fill; flips in dark where the red lightens */--success-contrast:#FFFFFF;--warning-contrast:#FFFFFF;/* same contract as --danger-contrast, for the green and amber fills */
@@ -37,7 +37,7 @@
37
37
  /* Dark theme — semantic remap only; ramps stay fixed */
38
38
  [data-theme="dark"]{
39
39
  --surface-page:#191512;--surface-card:#211C17;--surface-sunken:#2A251E;--surface-subtle:#1D1814;--surface-inverse:var(--sand-50);--surface-brand:var(--brand-950);
40
- --text-primary:#F3EFE7;--text-secondary:#C9C0B2;--text-muted:#9C9280;--text-inverse:var(--sand-950);--text-inverse-muted:rgba(30,26,20,.55);--text-link:var(--brand-400);
40
+ --text-primary:#F3EFE7;--text-secondary:#C9C0B2;--text-muted:#9C9280;--text-inverse:var(--sand-950);--text-inverse-muted:rgba(30,26,20,.55);--text-link:var(--brand-400);--text-link-hover:var(--brand-300);
41
41
  --border-default:#332C24;--border-strong:#453C31;--border-inverse:rgba(30,26,20,.2);
42
42
  --accent:#F3EFE7;--accent-hover:#FFFFFF;--accent-active:#D5CFC0;--accent-subtle:#2A2119;--accent-subtle-border:#453728;--accent-contrast:#1E1A14;
43
43
  --success-600:#5FB86E;--success-100:#1C2B1F;--success-300:#2E4A34;
package/tokens.json CHANGED
@@ -272,6 +272,10 @@
272
272
  "$value": "var(--brand-700)",
273
273
  "$type": "color"
274
274
  },
275
+ "link-hover": {
276
+ "$value": "var(--brand-900)",
277
+ "$type": "color"
278
+ },
275
279
  "2xs": {
276
280
  "$value": "11px",
277
281
  "$type": "color"