@efolusi/meridian 1.14.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
@@ -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}
@@ -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.14.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",