@olwiba/ui 0.0.29 → 0.0.30
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 +2 -0
- package/dist/index.js +24 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/app/AuthSection.tsx +15 -11
package/dist/index.d.ts
CHANGED
|
@@ -139,6 +139,8 @@ interface AuthFormProps {
|
|
|
139
139
|
error?: string;
|
|
140
140
|
/** Disables the submit button and shows a loading label */
|
|
141
141
|
loading?: boolean;
|
|
142
|
+
/** Render prop for links — use to inject framework-native link components (e.g. TanStack Router Link) */
|
|
143
|
+
renderLink?: AppShellRenderLink;
|
|
142
144
|
}
|
|
143
145
|
interface AuthSectionProps extends AuthFormProps {
|
|
144
146
|
/** Visual layout of the auth screen. @default 'centered' */
|
package/dist/index.js
CHANGED
|
@@ -253,6 +253,7 @@ function AppShell({
|
|
|
253
253
|
}
|
|
254
254
|
return inner;
|
|
255
255
|
}
|
|
256
|
+
var defaultRenderLink2 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
256
257
|
function CenteredAuth({ children }) {
|
|
257
258
|
return /* @__PURE__ */ jsx("section", { className: "flex h-full min-h-[720px] w-full flex-col items-center justify-center gap-6 rounded-2xl bg-muted p-6 md:p-10", children: /* @__PURE__ */ jsx("div", { className: "flex w-full max-w-sm flex-col gap-6", children }) });
|
|
258
259
|
}
|
|
@@ -295,7 +296,8 @@ function DefaultForm({
|
|
|
295
296
|
forgotPasswordHref = "#",
|
|
296
297
|
brand,
|
|
297
298
|
error,
|
|
298
|
-
loading
|
|
299
|
+
loading,
|
|
300
|
+
renderLink = defaultRenderLink2
|
|
299
301
|
}) {
|
|
300
302
|
const isSignUp = mode === "signup";
|
|
301
303
|
return /* @__PURE__ */ jsxs(Card$1, { className: "w-full max-w-md", children: [
|
|
@@ -317,7 +319,11 @@ function DefaultForm({
|
|
|
317
319
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
318
320
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
319
321
|
/* @__PURE__ */ jsx(Label, { htmlFor: "auth-password", children: "Password" }),
|
|
320
|
-
!isSignUp && forgotPasswordHref &&
|
|
322
|
+
!isSignUp && forgotPasswordHref && renderLink({
|
|
323
|
+
href: forgotPasswordHref,
|
|
324
|
+
className: "text-xs text-muted-foreground underline underline-offset-4 hover:text-foreground",
|
|
325
|
+
children: "Forgot password?"
|
|
326
|
+
})
|
|
321
327
|
] }),
|
|
322
328
|
/* @__PURE__ */ jsx(
|
|
323
329
|
Input$1,
|
|
@@ -339,11 +345,11 @@ function DefaultForm({
|
|
|
339
345
|
/* @__PURE__ */ jsx("p", { className: "text-center text-xs text-muted-foreground", children: isSignUp ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
340
346
|
"Already have an account?",
|
|
341
347
|
" ",
|
|
342
|
-
|
|
348
|
+
renderLink({ href: signInHref, className: "text-foreground underline underline-offset-4", children: "Sign in" })
|
|
343
349
|
] }) : signUpHref && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
344
350
|
"New here?",
|
|
345
351
|
" ",
|
|
346
|
-
|
|
352
|
+
renderLink({ href: signUpHref, className: "text-foreground underline underline-offset-4", children: "Create an account" })
|
|
347
353
|
] }) })
|
|
348
354
|
] })
|
|
349
355
|
] });
|
|
@@ -378,14 +384,14 @@ function EmptyState({ icon: Icon, title, description, action, className, ...prop
|
|
|
378
384
|
}
|
|
379
385
|
);
|
|
380
386
|
}
|
|
381
|
-
var
|
|
387
|
+
var defaultRenderLink3 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
382
388
|
function ErrorPage({
|
|
383
389
|
statusCode = "404",
|
|
384
390
|
title = "Page not found",
|
|
385
391
|
description = "The page you're looking for doesn't exist or has been moved. Check the URL or head back home.",
|
|
386
392
|
action = { label: "Take me home", href: "/" },
|
|
387
393
|
backAction = { label: "Go back" },
|
|
388
|
-
renderLink =
|
|
394
|
+
renderLink = defaultRenderLink3
|
|
389
395
|
}) {
|
|
390
396
|
return /* @__PURE__ */ jsx("section", { className: "overflow-hidden rounded-2xl border bg-card", children: /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-[560px] flex-col items-center justify-center px-6 py-16 text-center", children: [
|
|
391
397
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_center,hsl(var(--muted)/0.8),transparent_70%)]" }),
|
|
@@ -596,7 +602,7 @@ function SectionTitle({ title, description, badge, className }) {
|
|
|
596
602
|
description && /* @__PURE__ */ jsx("p", { className: "mx-auto mt-4 max-w-2xl text-pretty text-muted-foreground", children: description })
|
|
597
603
|
] }) });
|
|
598
604
|
}
|
|
599
|
-
var
|
|
605
|
+
var defaultRenderLink4 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
600
606
|
function HeroSection({
|
|
601
607
|
heading,
|
|
602
608
|
badge,
|
|
@@ -606,7 +612,7 @@ function HeroSection({
|
|
|
606
612
|
heroImage,
|
|
607
613
|
avatarUrls,
|
|
608
614
|
socialProofText,
|
|
609
|
-
renderLink =
|
|
615
|
+
renderLink = defaultRenderLink4
|
|
610
616
|
}) {
|
|
611
617
|
return /* @__PURE__ */ jsx("section", { className: "overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "px-6 py-14 sm:px-10 sm:py-20", children: [
|
|
612
618
|
/* @__PURE__ */ jsxs("div", { className: "mx-auto grid max-w-6xl items-center gap-10 lg:grid-cols-2 lg:gap-16", children: [
|
|
@@ -736,14 +742,14 @@ function FeaturesSection({
|
|
|
736
742
|
)) })
|
|
737
743
|
] }) }) });
|
|
738
744
|
}
|
|
739
|
-
var
|
|
745
|
+
var defaultRenderLink5 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
740
746
|
function CtaSection({
|
|
741
747
|
heading,
|
|
742
748
|
description,
|
|
743
749
|
primaryCta,
|
|
744
750
|
secondaryCta,
|
|
745
751
|
footnote,
|
|
746
|
-
renderLink =
|
|
752
|
+
renderLink = defaultRenderLink5
|
|
747
753
|
}) {
|
|
748
754
|
return /* @__PURE__ */ jsx("section", { className: "overflow-hidden rounded-2xl border bg-card", children: /* @__PURE__ */ jsxs("div", { className: "relative px-6 py-16 sm:px-10 sm:py-24", children: [
|
|
749
755
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[radial-gradient(ellipse_at_center,hsl(var(--primary)/0.15),transparent_70%)]" }),
|
|
@@ -821,7 +827,7 @@ function PricingCard({
|
|
|
821
827
|
}
|
|
822
828
|
);
|
|
823
829
|
}
|
|
824
|
-
var
|
|
830
|
+
var defaultRenderLink6 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
825
831
|
function PricingSection({
|
|
826
832
|
title = "Simple, transparent pricing",
|
|
827
833
|
description = "Start for free. Scale as you grow. No hidden fees.",
|
|
@@ -829,7 +835,7 @@ function PricingSection({
|
|
|
829
835
|
plans,
|
|
830
836
|
saveBadge = "Save 34%",
|
|
831
837
|
isAuthenticated,
|
|
832
|
-
renderLink =
|
|
838
|
+
renderLink = defaultRenderLink6,
|
|
833
839
|
footnote
|
|
834
840
|
}) {
|
|
835
841
|
const [annual, setAnnual] = React25.useState(false);
|
|
@@ -1264,13 +1270,13 @@ function ThemeSwitchMinimal() {
|
|
|
1264
1270
|
};
|
|
1265
1271
|
return /* @__PURE__ */ jsx(Button$1, { variant: "ghost", size: "icon", onClick: toggle, className: "size-8", "aria-label": "Toggle theme", children: theme === "dark" ? /* @__PURE__ */ jsx(Sun, { className: "size-4" }) : /* @__PURE__ */ jsx(Moon, { className: "size-4" }) });
|
|
1266
1272
|
}
|
|
1267
|
-
var
|
|
1273
|
+
var defaultRenderLink7 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
1268
1274
|
function Navbar({
|
|
1269
1275
|
brand,
|
|
1270
1276
|
navLinks,
|
|
1271
1277
|
cta,
|
|
1272
1278
|
showThemeToggle = false,
|
|
1273
|
-
renderLink =
|
|
1279
|
+
renderLink = defaultRenderLink7
|
|
1274
1280
|
}) {
|
|
1275
1281
|
const [open, setOpen] = React25.useState(false);
|
|
1276
1282
|
const brandHref = brand.href ?? "/";
|
|
@@ -1340,13 +1346,13 @@ function Navbar({
|
|
|
1340
1346
|
] })
|
|
1341
1347
|
] }) });
|
|
1342
1348
|
}
|
|
1343
|
-
var
|
|
1349
|
+
var defaultRenderLink8 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
1344
1350
|
function Footer({
|
|
1345
1351
|
brand,
|
|
1346
1352
|
navLinks,
|
|
1347
1353
|
socialLinks,
|
|
1348
1354
|
legal,
|
|
1349
|
-
renderLink =
|
|
1355
|
+
renderLink = defaultRenderLink8
|
|
1350
1356
|
}) {
|
|
1351
1357
|
const brandHref = brand.href ?? "/";
|
|
1352
1358
|
const copyrightText = legal ?? `\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} ${brand.name}. All rights reserved.`;
|
|
@@ -1864,13 +1870,13 @@ function FullPageSpinner({ message }) {
|
|
|
1864
1870
|
message && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: message })
|
|
1865
1871
|
] });
|
|
1866
1872
|
}
|
|
1867
|
-
var
|
|
1873
|
+
var defaultRenderLink9 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
1868
1874
|
function PageHeader({
|
|
1869
1875
|
title,
|
|
1870
1876
|
description,
|
|
1871
1877
|
breadcrumbs,
|
|
1872
1878
|
backButton,
|
|
1873
|
-
renderLink =
|
|
1879
|
+
renderLink = defaultRenderLink9,
|
|
1874
1880
|
className,
|
|
1875
1881
|
children
|
|
1876
1882
|
}) {
|