@assure-one/design-system 1.28.0 → 1.29.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/dist/index.d.ts CHANGED
@@ -5695,8 +5695,14 @@ interface DisplayMenuProps {
5695
5695
  /** Page gutter (px) the panel pins its right edge to. Defaults to the
5696
5696
  * 24px dashboard padding; raise it for wider-inset layouts. */
5697
5697
  gutterPx?: number;
5698
- }
5699
- declare function DisplayMenu({ sections, onReset, isAtDefault, tooltip, dataTour, triggerIcon, triggerLabel, className, gutterPx, }: DisplayMenuProps): react_jsx_runtime.JSX.Element;
5698
+ /** Which side of the panel the section flyouts open on. `"auto"` (default)
5699
+ * opens left whenever the panel has room there right for gutter-pinned
5700
+ * panels like the Clients table's Display button. Pass `"right"` when the
5701
+ * trigger lives in a left-anchored surface (e.g. an inbox panel) and the
5702
+ * free space is on the right. */
5703
+ flyoutSide?: "auto" | "left" | "right";
5704
+ }
5705
+ declare function DisplayMenu({ sections, onReset, isAtDefault, tooltip, dataTour, triggerIcon, triggerLabel, className, gutterPx, flyoutSide, }: DisplayMenuProps): react_jsx_runtime.JSX.Element;
5700
5706
 
5701
5707
  declare function cn(...inputs: ClassValue[]): string;
5702
5708
 
package/dist/index.js CHANGED
@@ -18286,7 +18286,8 @@ function DisplayMenu({
18286
18286
  triggerIcon,
18287
18287
  triggerLabel = "Display",
18288
18288
  className,
18289
- gutterPx = DEFAULT_GUTTER_PX
18289
+ gutterPx = DEFAULT_GUTTER_PX,
18290
+ flyoutSide = "auto"
18290
18291
  }) {
18291
18292
  const [open, setOpen] = useState(false);
18292
18293
  const [openKey, setOpenKey] = useState(null);
@@ -18323,9 +18324,9 @@ function DisplayMenu({
18323
18324
  MIN_FLYOUT_HEIGHT,
18324
18325
  window.innerHeight - (panelRect.top + top) - VIEWPORT_MARGIN
18325
18326
  );
18326
- const side = panelRect.left >= FLYOUT_WIDTH + 16 ? "left" : "right";
18327
+ const side = flyoutSide === "auto" ? panelRect.left >= FLYOUT_WIDTH + 16 ? "left" : "right" : flyoutSide;
18327
18328
  setFlyout({ top, side, maxHeight });
18328
- }, []);
18329
+ }, [flyoutSide]);
18329
18330
  const openSection = useCallback(
18330
18331
  (key) => {
18331
18332
  clearTimers();