@assure-one/design-system 1.27.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
@@ -2705,6 +2705,15 @@ interface ProposalPackageCardProps extends Omit<React.HTMLAttributes<HTMLDivElem
2705
2705
  servicesLabel?: ReactNode;
2706
2706
  /** Service rows (`ProposalServiceRow`) or any content. */
2707
2707
  children?: ReactNode;
2708
+ /**
2709
+ * Cap the service list's height (any CSS length, e.g. `"14rem"`). Past it the
2710
+ * list scrolls rather than growing, so a package with many services keeps its
2711
+ * select control in view instead of pushing it below the fold — and cards
2712
+ * sitting in a row stay the same height.
2713
+ *
2714
+ * Omit for the previous behaviour: the list grows to fit.
2715
+ */
2716
+ servicesMaxHeight?: string;
2708
2717
  /** Select / toggle handler — makes the card interactive. */
2709
2718
  onSelect?: () => void;
2710
2719
  disabled?: boolean;
@@ -5686,8 +5695,14 @@ interface DisplayMenuProps {
5686
5695
  /** Page gutter (px) the panel pins its right edge to. Defaults to the
5687
5696
  * 24px dashboard padding; raise it for wider-inset layouts. */
5688
5697
  gutterPx?: number;
5689
- }
5690
- 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;
5691
5706
 
5692
5707
  declare function cn(...inputs: ClassValue[]): string;
5693
5708
 
package/dist/index.js CHANGED
@@ -10639,6 +10639,7 @@ var ProposalPackageCard = forwardRef(
10639
10639
  badge,
10640
10640
  servicesLabel = "Included services",
10641
10641
  children,
10642
+ servicesMaxHeight,
10642
10643
  onSelect,
10643
10644
  disabled = false,
10644
10645
  className,
@@ -10674,7 +10675,31 @@ var ProposalPackageCard = forwardRef(
10674
10675
  ] }),
10675
10676
  children && /* @__PURE__ */ jsxs(Fragment, { children: [
10676
10677
  /* @__PURE__ */ jsx("div", { className: "text-fg-3 mt-4 mb-1 text-[11.5px] font-semibold tracking-wide", children: servicesLabel }),
10677
- /* @__PURE__ */ jsx("div", { children })
10678
+ /* @__PURE__ */ jsx(
10679
+ "div",
10680
+ {
10681
+ className: cn(
10682
+ servicesMaxHeight && [
10683
+ "min-h-0 overflow-y-auto",
10684
+ // pr-3 keeps the rail off the service text; -mr-1 gives that
10685
+ // padding back to the card so the rail still sits near its
10686
+ // edge rather than floating in from it.
10687
+ "-mr-1 pr-3",
10688
+ // A 2px hairline. `scrollbar-thin` is 8px, and on
10689
+ // Chrome-for-Windows an unstyled bar also carries stepper
10690
+ // arrows, which is most of what made it read as heavy.
10691
+ "[scrollbar-width:thin]",
10692
+ "[&::-webkit-scrollbar]:w-[2px]",
10693
+ "[&::-webkit-scrollbar-button]:hidden",
10694
+ "[&::-webkit-scrollbar-track]:bg-transparent",
10695
+ "[&::-webkit-scrollbar-thumb]:rounded-full",
10696
+ "[&::-webkit-scrollbar-thumb]:bg-rule-strong"
10697
+ ]
10698
+ ),
10699
+ style: servicesMaxHeight ? { maxHeight: servicesMaxHeight } : void 0,
10700
+ children
10701
+ }
10702
+ )
10678
10703
  ] }),
10679
10704
  /* @__PURE__ */ jsx("div", { className: "mt-auto pt-4", children: interactive ? /* @__PURE__ */ jsx(
10680
10705
  "button",
@@ -18261,7 +18286,8 @@ function DisplayMenu({
18261
18286
  triggerIcon,
18262
18287
  triggerLabel = "Display",
18263
18288
  className,
18264
- gutterPx = DEFAULT_GUTTER_PX
18289
+ gutterPx = DEFAULT_GUTTER_PX,
18290
+ flyoutSide = "auto"
18265
18291
  }) {
18266
18292
  const [open, setOpen] = useState(false);
18267
18293
  const [openKey, setOpenKey] = useState(null);
@@ -18298,9 +18324,9 @@ function DisplayMenu({
18298
18324
  MIN_FLYOUT_HEIGHT,
18299
18325
  window.innerHeight - (panelRect.top + top) - VIEWPORT_MARGIN
18300
18326
  );
18301
- const side = panelRect.left >= FLYOUT_WIDTH + 16 ? "left" : "right";
18327
+ const side = flyoutSide === "auto" ? panelRect.left >= FLYOUT_WIDTH + 16 ? "left" : "right" : flyoutSide;
18302
18328
  setFlyout({ top, side, maxHeight });
18303
- }, []);
18329
+ }, [flyoutSide]);
18304
18330
  const openSection = useCallback(
18305
18331
  (key) => {
18306
18332
  clearTimers();