@olwiba/ui 0.2.1 → 0.2.3
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 +5 -1
- package/dist/index.js +25 -10
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/app/AppShell.tsx +12 -5
- package/src/marketing/PricingSection.tsx +9 -3
package/dist/index.d.ts
CHANGED
|
@@ -672,10 +672,14 @@ interface PricingSectionProps {
|
|
|
672
672
|
footnote?: string;
|
|
673
673
|
mode?: 'subscription' | 'one-time';
|
|
674
674
|
foundingDeadline?: string;
|
|
675
|
+
/** Symbol prepended to the computed price. Ignored by plans with `priceDisplay`. */
|
|
676
|
+
currency?: string;
|
|
677
|
+
/** Badge label for `highlighted` plans with no active `foundingDeadline` countdown. Pass '' to show no badge. */
|
|
678
|
+
highlightedBadgeLabel?: string;
|
|
675
679
|
/** Rendered below each plan's CTA button (e.g. a "Get notified" link). */
|
|
676
680
|
renderPlanFooter?: (plan: PricingPlan) => React.ReactNode;
|
|
677
681
|
}
|
|
678
|
-
declare function PricingSection({ title, description, badge, plans, saveBadge, isAuthenticated, renderLink, footnote, mode, foundingDeadline, renderPlanFooter, }: PricingSectionProps): react_jsx_runtime.JSX.Element;
|
|
682
|
+
declare function PricingSection({ title, description, badge, plans, saveBadge, isAuthenticated, renderLink, footnote, mode, foundingDeadline, currency, highlightedBadgeLabel, renderPlanFooter, }: PricingSectionProps): react_jsx_runtime.JSX.Element;
|
|
679
683
|
|
|
680
684
|
interface TestimonialsSectionProps {
|
|
681
685
|
title?: string;
|
package/dist/index.js
CHANGED
|
@@ -268,7 +268,7 @@ function NavUser({ user }) {
|
|
|
268
268
|
SidebarMenuButton,
|
|
269
269
|
{
|
|
270
270
|
size: "lg",
|
|
271
|
-
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
271
|
+
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!min-w-8 group-data-[collapsible=icon]:!max-w-8 group-data-[collapsible=icon]:!p-0",
|
|
272
272
|
children: [
|
|
273
273
|
/* @__PURE__ */ jsxs(Avatar, { mode: avatarMode, size: "sm", className: "grayscale", children: [
|
|
274
274
|
user.avatar && /* @__PURE__ */ jsx(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
@@ -337,13 +337,26 @@ function ShellSidebar({
|
|
|
337
337
|
}) {
|
|
338
338
|
const fallbackLogo = typeof brand.name === "string" ? brand.name.slice(0, 1).toUpperCase() : null;
|
|
339
339
|
return /* @__PURE__ */ jsxs(Sidebar, { side, collapsible, sidebarPosition, children: [
|
|
340
|
-
/* @__PURE__ */ jsx(SidebarHeader, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
340
|
+
/* @__PURE__ */ jsx(SidebarHeader, { className: "py-3", children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
|
|
341
|
+
SidebarMenuButton,
|
|
342
|
+
{
|
|
343
|
+
asChild: true,
|
|
344
|
+
size: "lg",
|
|
345
|
+
tooltip: typeof brand.name === "string" ? brand.name : void 0,
|
|
346
|
+
className: "group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!min-w-8 group-data-[collapsible=icon]:!max-w-8 group-data-[collapsible=icon]:!p-0",
|
|
347
|
+
children: renderLink({
|
|
348
|
+
href: brand.href ?? "#",
|
|
349
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
350
|
+
brand.logo ? (
|
|
351
|
+
// Neutral slot: the consumer's logo owns its own chrome
|
|
352
|
+
// (background, radius). Sized to fill the collapsed icon rail.
|
|
353
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-8 shrink-0 items-center justify-center [&>svg]:size-5", children: brand.logo })
|
|
354
|
+
) : /* @__PURE__ */ jsx("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary text-sm font-semibold text-primary-foreground", children: fallbackLogo }),
|
|
355
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-base font-semibold group-data-[collapsible=icon]:hidden", children: brand.name })
|
|
356
|
+
] })
|
|
357
|
+
})
|
|
358
|
+
}
|
|
359
|
+
) }) }) }),
|
|
347
360
|
/* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsxs(SidebarGroupContent, { className: "flex flex-col gap-2", children: [
|
|
348
361
|
action && /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: action.href ? /* @__PURE__ */ jsx(
|
|
349
362
|
SidebarMenuButton,
|
|
@@ -2121,6 +2134,8 @@ function PricingSection({
|
|
|
2121
2134
|
footnote,
|
|
2122
2135
|
mode = "subscription",
|
|
2123
2136
|
foundingDeadline,
|
|
2137
|
+
currency = "$",
|
|
2138
|
+
highlightedBadgeLabel = "Founding member",
|
|
2124
2139
|
renderPlanFooter
|
|
2125
2140
|
}) {
|
|
2126
2141
|
const [annual, setAnnual] = React32.useState(false);
|
|
@@ -2171,9 +2186,9 @@ function PricingSection({
|
|
|
2171
2186
|
] }),
|
|
2172
2187
|
/* @__PURE__ */ jsx(StaggerChildren, { className: "mt-10 grid gap-4 lg:grid-cols-3", children: plans.map((plan) => {
|
|
2173
2188
|
const rawPrice = isOneTime ? plan.monthly : annual ? plan.annual : plan.monthly;
|
|
2174
|
-
const price = plan.priceDisplay ??
|
|
2189
|
+
const price = plan.priceDisplay ?? `${currency}${rawPrice}`;
|
|
2175
2190
|
const period = plan.periodDisplay ?? (isOneTime ? "one-time" : rawPrice > 0 ? "/mo" : "");
|
|
2176
|
-
const badge2 = plan.highlighted && foundingDeadline ? /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full border bg-secondary px-2.5 py-0.5 text-xs font-semibold text-secondary-foreground", children: /* @__PURE__ */ jsx(CountdownTimer, { deadline: foundingDeadline, compact: true }) }) : plan.highlighted ?
|
|
2191
|
+
const badge2 = plan.highlighted && foundingDeadline ? /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full border bg-secondary px-2.5 py-0.5 text-xs font-semibold text-secondary-foreground", children: /* @__PURE__ */ jsx(CountdownTimer, { deadline: foundingDeadline, compact: true }) }) : plan.highlighted && highlightedBadgeLabel ? highlightedBadgeLabel : void 0;
|
|
2177
2192
|
return /* @__PURE__ */ jsx(
|
|
2178
2193
|
PricingCard,
|
|
2179
2194
|
{
|