@olwiba/ui 0.1.9 → 0.1.11
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 +14 -5
- package/dist/index.js +49 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FlowBracket.tsx +56 -23
- package/src/components/PricingCard.tsx +9 -1
- package/src/marketing/PricingSection.tsx +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -521,10 +521,14 @@ interface PricingCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
521
521
|
cta: string;
|
|
522
522
|
highlighted?: boolean;
|
|
523
523
|
disabled?: boolean;
|
|
524
|
+
/** Disables only the CTA button, leaving the rest of the card interactive. */
|
|
525
|
+
ctaDisabled?: boolean;
|
|
524
526
|
badge?: React.ReactNode;
|
|
527
|
+
/** Rendered directly below the CTA button (e.g. a "Get notified" link). */
|
|
528
|
+
footer?: React.ReactNode;
|
|
525
529
|
onSelect?: () => void;
|
|
526
530
|
}
|
|
527
|
-
declare function PricingCard({ name, price, period, description, features, cta, highlighted, disabled, badge, onSelect, className, ...props }: PricingCardProps): react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare function PricingCard({ name, price, period, description, features, cta, highlighted, disabled, ctaDisabled, badge, footer, onSelect, className, ...props }: PricingCardProps): react_jsx_runtime.JSX.Element;
|
|
528
532
|
|
|
529
533
|
interface PricingPlan {
|
|
530
534
|
name: string;
|
|
@@ -534,6 +538,8 @@ interface PricingPlan {
|
|
|
534
538
|
cta: string;
|
|
535
539
|
highlighted?: boolean;
|
|
536
540
|
disabled?: boolean;
|
|
541
|
+
/** Disables only the CTA button, leaving the rest of the card interactive. */
|
|
542
|
+
ctaDisabled?: boolean;
|
|
537
543
|
features: PricingFeature[];
|
|
538
544
|
/** Overrides computed price display (e.g. "$?" for community/reach-out tiers). */
|
|
539
545
|
priceDisplay?: string;
|
|
@@ -551,8 +557,10 @@ interface PricingSectionProps {
|
|
|
551
557
|
footnote?: string;
|
|
552
558
|
mode?: 'subscription' | 'one-time';
|
|
553
559
|
foundingDeadline?: string;
|
|
560
|
+
/** Rendered below each plan's CTA button (e.g. a "Get notified" link). */
|
|
561
|
+
renderPlanFooter?: (plan: PricingPlan) => React.ReactNode;
|
|
554
562
|
}
|
|
555
|
-
declare function PricingSection({ title, description, badge, plans, saveBadge, isAuthenticated, renderLink, footnote, mode, foundingDeadline, }: PricingSectionProps): react_jsx_runtime.JSX.Element;
|
|
563
|
+
declare function PricingSection({ title, description, badge, plans, saveBadge, isAuthenticated, renderLink, footnote, mode, foundingDeadline, renderPlanFooter, }: PricingSectionProps): react_jsx_runtime.JSX.Element;
|
|
556
564
|
|
|
557
565
|
interface TestimonialsSectionProps {
|
|
558
566
|
title?: string;
|
|
@@ -1066,7 +1074,7 @@ interface FlowBracketProps {
|
|
|
1066
1074
|
* Defaults to 22.
|
|
1067
1075
|
*/
|
|
1068
1076
|
extent?: number;
|
|
1069
|
-
/** Show open-chevron arrowhead at the
|
|
1077
|
+
/** Show open-chevron arrowhead at the destination end. Default: true. */
|
|
1070
1078
|
arrow?: boolean;
|
|
1071
1079
|
/** CSS color for both bracket lines and animated dots. Defaults to muted slate. */
|
|
1072
1080
|
color?: string;
|
|
@@ -1098,8 +1106,9 @@ interface FlowBracketProps {
|
|
|
1098
1106
|
* left and/or right outside edges — connecting the top of the first child down
|
|
1099
1107
|
* to the bottom of the last child (e.g. docs → SYNC direction).
|
|
1100
1108
|
*
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1109
|
+
* Arrowheads are rendered as absolutely-positioned SVGs (not SVG markers) so
|
|
1110
|
+
* they render at a consistent pixel size regardless of the bracket SVG's aspect
|
|
1111
|
+
* ratio (which spans the full section height with preserveAspectRatio="none").
|
|
1103
1112
|
*/
|
|
1104
1113
|
declare function FlowBracket({ anchorTop, anchorBottom, extent, arrow, color, colorLeft, colorRight, left, right, animate, animateDur, reverseRight, style, className, children, }: FlowBracketProps): react_jsx_runtime.JSX.Element;
|
|
1105
1114
|
|
package/dist/index.js
CHANGED
|
@@ -1455,7 +1455,9 @@ function PricingCard({
|
|
|
1455
1455
|
cta,
|
|
1456
1456
|
highlighted = false,
|
|
1457
1457
|
disabled = false,
|
|
1458
|
+
ctaDisabled = false,
|
|
1458
1459
|
badge,
|
|
1460
|
+
footer,
|
|
1459
1461
|
onSelect,
|
|
1460
1462
|
className,
|
|
1461
1463
|
...props
|
|
@@ -1488,10 +1490,11 @@ function PricingCard({
|
|
|
1488
1490
|
variant: highlighted ? "default" : "outline",
|
|
1489
1491
|
className: "mt-6 w-full",
|
|
1490
1492
|
onClick: onSelect,
|
|
1491
|
-
disabled,
|
|
1493
|
+
disabled: disabled || ctaDisabled,
|
|
1492
1494
|
children: cta
|
|
1493
1495
|
}
|
|
1494
1496
|
),
|
|
1497
|
+
footer && /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm", children: footer }),
|
|
1495
1498
|
/* @__PURE__ */ jsx(Separator, { className: "my-6" }),
|
|
1496
1499
|
/* @__PURE__ */ jsx("ul", { className: "space-y-3 text-sm", children: features.map((feat) => /* @__PURE__ */ jsx("li", { className: "flex items-center gap-2", children: feat.included ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1497
1500
|
/* @__PURE__ */ jsx(Check, { className: "size-4 shrink-0 text-primary" }),
|
|
@@ -1583,7 +1586,8 @@ function PricingSection({
|
|
|
1583
1586
|
renderLink = defaultRenderLink7,
|
|
1584
1587
|
footnote,
|
|
1585
1588
|
mode = "subscription",
|
|
1586
|
-
foundingDeadline
|
|
1589
|
+
foundingDeadline,
|
|
1590
|
+
renderPlanFooter
|
|
1587
1591
|
}) {
|
|
1588
1592
|
const [annual, setAnnual] = React29.useState(false);
|
|
1589
1593
|
const isOneTime = mode === "one-time";
|
|
@@ -1647,7 +1651,9 @@ function PricingSection({
|
|
|
1647
1651
|
cta: plan.cta,
|
|
1648
1652
|
highlighted: plan.highlighted,
|
|
1649
1653
|
disabled: plan.disabled,
|
|
1650
|
-
|
|
1654
|
+
ctaDisabled: plan.ctaDisabled,
|
|
1655
|
+
badge: badge2,
|
|
1656
|
+
footer: renderPlanFooter?.(plan)
|
|
1651
1657
|
},
|
|
1652
1658
|
plan.name
|
|
1653
1659
|
);
|
|
@@ -3092,8 +3098,6 @@ function FlowConnector({
|
|
|
3092
3098
|
}
|
|
3093
3099
|
);
|
|
3094
3100
|
}
|
|
3095
|
-
var MARKER_L = "fb-ml";
|
|
3096
|
-
var MARKER_R = "fb-mr";
|
|
3097
3101
|
function FlowBracket({
|
|
3098
3102
|
anchorTop = 8,
|
|
3099
3103
|
anchorBottom = 92,
|
|
@@ -3152,6 +3156,20 @@ function FlowBracket({
|
|
|
3152
3156
|
pointerEvents: "none",
|
|
3153
3157
|
opacity: 0
|
|
3154
3158
|
};
|
|
3159
|
+
const chevronProps = {
|
|
3160
|
+
fill: "none",
|
|
3161
|
+
strokeWidth: "1.5",
|
|
3162
|
+
strokeLinecap: "round",
|
|
3163
|
+
strokeLinejoin: "round"
|
|
3164
|
+
};
|
|
3165
|
+
const arrowBase = {
|
|
3166
|
+
position: "absolute",
|
|
3167
|
+
width: 10,
|
|
3168
|
+
height: 8,
|
|
3169
|
+
overflow: "visible",
|
|
3170
|
+
pointerEvents: "none",
|
|
3171
|
+
transform: "translate(-50%, -50%)"
|
|
3172
|
+
};
|
|
3155
3173
|
return /* @__PURE__ */ jsxs("div", { className, style: { position: "relative", ...style }, children: [
|
|
3156
3174
|
animate && /* @__PURE__ */ jsx("style", { children: dotKeyframes }),
|
|
3157
3175
|
/* @__PURE__ */ jsxs(
|
|
@@ -3163,20 +3181,15 @@ function FlowBracket({
|
|
|
3163
3181
|
className: "pointer-events-none absolute inset-0",
|
|
3164
3182
|
style: { width: "100%", height: "100%", overflow: "visible" },
|
|
3165
3183
|
children: [
|
|
3166
|
-
/* @__PURE__ */ jsxs("defs", { children: [
|
|
3167
|
-
/* @__PURE__ */ jsx("marker", { id: MARKER_L, markerWidth: "10", markerHeight: "8", refX: "8", refY: "4", orient: "auto", children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", fill: "none", stroke: cl, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
3168
|
-
/* @__PURE__ */ jsx("marker", { id: MARKER_R, markerWidth: "10", markerHeight: "8", refX: "8", refY: "4", orient: "auto", children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", fill: "none", stroke: cr, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3169
|
-
] }),
|
|
3170
3184
|
left && /* @__PURE__ */ jsx(
|
|
3171
3185
|
"path",
|
|
3172
3186
|
{
|
|
3173
3187
|
d: leftD,
|
|
3174
3188
|
fill: "none",
|
|
3175
|
-
stroke: cl,
|
|
3189
|
+
style: { stroke: cl },
|
|
3176
3190
|
strokeWidth: 1.5,
|
|
3177
3191
|
strokeDasharray: "5,4",
|
|
3178
|
-
vectorEffect: "non-scaling-stroke"
|
|
3179
|
-
...arrow ? { markerEnd: `url(#${MARKER_L})` } : {}
|
|
3192
|
+
vectorEffect: "non-scaling-stroke"
|
|
3180
3193
|
}
|
|
3181
3194
|
),
|
|
3182
3195
|
right && /* @__PURE__ */ jsx(
|
|
@@ -3184,16 +3197,37 @@ function FlowBracket({
|
|
|
3184
3197
|
{
|
|
3185
3198
|
d: rightD,
|
|
3186
3199
|
fill: "none",
|
|
3187
|
-
stroke: cr,
|
|
3200
|
+
style: { stroke: cr },
|
|
3188
3201
|
strokeWidth: 1.5,
|
|
3189
3202
|
strokeDasharray: "5,4",
|
|
3190
|
-
vectorEffect: "non-scaling-stroke"
|
|
3191
|
-
...arrow ? { markerEnd: `url(#${MARKER_R})` } : {}
|
|
3203
|
+
vectorEffect: "non-scaling-stroke"
|
|
3192
3204
|
}
|
|
3193
3205
|
)
|
|
3194
3206
|
]
|
|
3195
3207
|
}
|
|
3196
3208
|
),
|
|
3209
|
+
arrow && left && /* @__PURE__ */ jsx(
|
|
3210
|
+
"svg",
|
|
3211
|
+
{
|
|
3212
|
+
"aria-hidden": true,
|
|
3213
|
+
viewBox: "0 0 10 8",
|
|
3214
|
+
style: { ...arrowBase, top: `${anchorTop}%`, left: 0 },
|
|
3215
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", style: { stroke: cl }, ...chevronProps })
|
|
3216
|
+
}
|
|
3217
|
+
),
|
|
3218
|
+
arrow && right && /* @__PURE__ */ jsx(
|
|
3219
|
+
"svg",
|
|
3220
|
+
{
|
|
3221
|
+
"aria-hidden": true,
|
|
3222
|
+
viewBox: "0 0 10 8",
|
|
3223
|
+
style: {
|
|
3224
|
+
...arrowBase,
|
|
3225
|
+
top: reverseRight ? `${anchorBottom}%` : `${anchorTop}%`,
|
|
3226
|
+
left: "100%"
|
|
3227
|
+
},
|
|
3228
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "9,1 2,4 9,7", style: { stroke: cr }, ...chevronProps })
|
|
3229
|
+
}
|
|
3230
|
+
),
|
|
3197
3231
|
children,
|
|
3198
3232
|
animate && left && /* @__PURE__ */ jsx(
|
|
3199
3233
|
"div",
|