@olwiba/ui 0.2.13 → 0.2.14

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
@@ -335,9 +335,21 @@ interface AuthSectionProps extends AuthFormProps {
335
335
  children?: React.ReactNode;
336
336
  /** (split layout only) Custom content for the left decorative panel */
337
337
  panel?: React.ReactNode;
338
+ /**
339
+ * Render inside an existing page frame — one already providing the
340
+ * background, the horizontal padding, and a navbar and footer.
341
+ *
342
+ * Standalone (the default) the section owns the whole viewport, which is
343
+ * right for an auth screen that is the only thing on the page. It is wrong
344
+ * the moment there is chrome around it: the padding lands on top of the
345
+ * frame's own, and `min-h-dvh` guarantees the footer starts below the fold.
346
+ *
347
+ * (centered layout only)
348
+ */
349
+ framed?: boolean;
338
350
  className?: string;
339
351
  }
340
- declare function AuthSection({ layout, children, panel, className, ...formProps }: AuthSectionProps): react_jsx_runtime.JSX.Element;
352
+ declare function AuthSection({ layout, children, panel, framed, className, ...formProps }: AuthSectionProps): react_jsx_runtime.JSX.Element;
341
353
 
342
354
  interface SettingsSectionProps {
343
355
  title: string;
package/dist/index.js CHANGED
@@ -472,7 +472,24 @@ function AppShell({
472
472
  return inner;
473
473
  }
474
474
  var defaultRenderLink2 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
475
- function CenteredAuth({ children, brand, className }) {
475
+ function CenteredAuth({ children, brand, framed, className }) {
476
+ if (framed) {
477
+ return (
478
+ // Framed: a page frame is already supplying the background, the page
479
+ // padding, and — with a navbar and footer around it — the height. All
480
+ // three have to come off here or they are applied twice: padding inside
481
+ // padding, and a full-viewport section that pushes the footer below the
482
+ // fold on every auth screen.
483
+ //
484
+ // The card fills the content column on a phone, matching the contact
485
+ // form, and only takes its reading width once there is room for the
486
+ // page to centre it.
487
+ /* @__PURE__ */ jsx("section", { className: cn$1("flex flex-col py-6 sm:py-10", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-none sm:my-auto sm:max-w-md", children: [
488
+ brand && /* @__PURE__ */ jsx("div", { className: "mb-8 text-center", children: brand }),
489
+ children
490
+ ] }) })
491
+ );
492
+ }
476
493
  return (
477
494
  // `min-h-dvh`, not `min-h-screen`: on mobile `100vh` is the viewport with
478
495
  // the browser chrome *retracted*, so a screen-height box is always taller
@@ -650,6 +667,7 @@ function AuthSection({
650
667
  layout = "centered",
651
668
  children,
652
669
  panel,
670
+ framed,
653
671
  className,
654
672
  ...formProps
655
673
  }) {
@@ -659,7 +677,7 @@ function AuthSection({
659
677
  }
660
678
  const { brand, ...restFormProps } = formProps;
661
679
  const form = children ?? /* @__PURE__ */ jsx(DefaultForm, { ...restFormProps });
662
- return /* @__PURE__ */ jsx(CenteredAuth, { brand, className, children: form });
680
+ return /* @__PURE__ */ jsx(CenteredAuth, { brand, framed, className, children: form });
663
681
  }
664
682
  function SettingsSection({ title, description, children, danger = false, className }) {
665
683
  return /* @__PURE__ */ jsxs("div", { className: cn$1("grid grid-cols-1 gap-x-8 gap-y-6 py-10 sm:grid-cols-3", className), children: [