@orangecheck/app-design 0.5.8 → 0.5.9

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.mjs CHANGED
@@ -378,16 +378,25 @@ function Field({ label, hint, optional, error, children, className, hideLabel, a
378
378
  "aria-describedby": describedBy,
379
379
  "aria-invalid": error ? true : void 0
380
380
  }) : children;
381
+ const hintNode = hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null;
381
382
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
382
383
  /* @__PURE__ */ jsxs(Label, { htmlFor: id, className: hideLabel ? "sr-only" : "flex items-baseline gap-2", children: [
383
384
  label,
384
385
  optional ? /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-normal text-muted-foreground", children: "Optional" }) : null
385
386
  ] }),
386
- action ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start", children: [
387
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 [&>*]:w-full", children: control }),
388
- /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
389
- ] }) : control,
390
- hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null,
387
+ action ? (
388
+ // The hint belongs to the input, so it sits under the input, not under the button.
389
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start", children: [
390
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-2 [&>input]:w-full", children: [
391
+ control,
392
+ hintNode
393
+ ] }),
394
+ /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
395
+ ] })
396
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
397
+ control,
398
+ hintNode
399
+ ] }),
391
400
  error ? /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
392
401
  ] });
393
402
  }
@@ -2527,6 +2536,7 @@ function AppShell({
2527
2536
  nav,
2528
2537
  sections,
2529
2538
  activeSection,
2539
+ page: pageOverride,
2530
2540
  persistent = [],
2531
2541
  home = "/",
2532
2542
  account,
@@ -2541,8 +2551,11 @@ function AppShell({
2541
2551
  warnDuplicateLabels(groups);
2542
2552
  const page = activeItem(groups);
2543
2553
  const place = useMemo(
2544
- () => ({ section: current ? current.title ?? current.label : void 0, page: page?.label }),
2545
- [current, page?.label]
2554
+ () => ({
2555
+ section: current ? current.title ?? current.label : void 0,
2556
+ page: pageOverride ?? page?.label
2557
+ }),
2558
+ [current, page?.label, pageOverride]
2546
2559
  );
2547
2560
  const switcher = sections && current && sections.length > 1 ? /* @__PURE__ */ jsx(SectionSwitch, { sections, current, onNavigate: () => setOpen(false) }) : null;
2548
2561
  return /* @__PURE__ */ jsx(ShellContext.Provider, { value: place, children: /* @__PURE__ */ jsxs("div", { className: cn("min-h-dvh bg-background", className), children: [