@orangecheck/app-design 0.5.7 → 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
  }
@@ -2053,11 +2062,7 @@ function SplitBar({
2053
2062
  children: /* @__PURE__ */ jsxs(
2054
2063
  "span",
2055
2064
  {
2056
- className: cn(
2057
- "oca-tabular leading-none tracking-[-0.02em]",
2058
- // A small share gets a smaller figure, so it fits its segment at any width.
2059
- s.pct < 30 ? "text-[1.125rem] md:text-[1.375rem]" : "text-[1.25rem] md:text-[1.875rem]"
2060
- ),
2065
+ className: "oca-tabular text-[1.125rem] leading-none tracking-[-0.02em] md:text-[1.5rem]",
2061
2066
  children: [
2062
2067
  s.pct,
2063
2068
  "%"
@@ -2531,6 +2536,7 @@ function AppShell({
2531
2536
  nav,
2532
2537
  sections,
2533
2538
  activeSection,
2539
+ page: pageOverride,
2534
2540
  persistent = [],
2535
2541
  home = "/",
2536
2542
  account,
@@ -2545,8 +2551,11 @@ function AppShell({
2545
2551
  warnDuplicateLabels(groups);
2546
2552
  const page = activeItem(groups);
2547
2553
  const place = useMemo(
2548
- () => ({ section: current ? current.title ?? current.label : void 0, page: page?.label }),
2549
- [current, page?.label]
2554
+ () => ({
2555
+ section: current ? current.title ?? current.label : void 0,
2556
+ page: pageOverride ?? page?.label
2557
+ }),
2558
+ [current, page?.label, pageOverride]
2550
2559
  );
2551
2560
  const switcher = sections && current && sections.length > 1 ? /* @__PURE__ */ jsx(SectionSwitch, { sections, current, onNavigate: () => setOpen(false) }) : null;
2552
2561
  return /* @__PURE__ */ jsx(ShellContext.Provider, { value: place, children: /* @__PURE__ */ jsxs("div", { className: cn("min-h-dvh bg-background", className), children: [