@designa8/vibedesign-supabase-deepseek-image-v1-2-176b 0.3.2 → 0.3.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/README.md +1 -1
- package/dist/index.cjs +181 -112
- package/dist/index.js +181 -112
- package/dist/styles.css +13 -0
- package/package.json +1 -1
- package/src/atoms/BillingPeriodToggleDesktop/BillingPeriodToggleDesktop.tsx +14 -6
- package/src/atoms/PricingTable/PricingTable.tsx +37 -4
- package/src/atoms/PricingTable/preview.tsx +33 -7
- package/src/atoms/PricingTableDesktop/PricingTableDesktop.tsx +78 -23
- package/src/atoms/PricingTableDesktop/preview.tsx +33 -7
- package/src/atoms/PricingTableMobile/PricingTableMobile.tsx +12 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @designa8/vibedesign-supabase-deepseek-image-v1-2-176b
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **0.3.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.3.3**.
|
|
4
4
|
Tokens, atoms, molecules, organisms, and templates — import from the package root;
|
|
5
5
|
never hardcode visual values in consumer code.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -1605,60 +1605,55 @@ var BillingPeriodToggleDesktop = React12.forwardRef(
|
|
|
1605
1605
|
buttonRefs.current[next]?.focus();
|
|
1606
1606
|
};
|
|
1607
1607
|
const indicator = selectedIndex >= 0 ? rects[selectedIndex] : void 0;
|
|
1608
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { ref, className: cn9("inline-flex", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1609
1609
|
"div",
|
|
1610
1610
|
{
|
|
1611
|
-
ref,
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
{
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
);
|
|
1656
|
-
})
|
|
1657
|
-
]
|
|
1658
|
-
}
|
|
1659
|
-
)
|
|
1611
|
+
ref: trackRef,
|
|
1612
|
+
role: "group",
|
|
1613
|
+
"aria-label": label,
|
|
1614
|
+
onKeyDown: handleKeyDown,
|
|
1615
|
+
className: "relative inline-flex items-center gap-xxs rounded-lg border border-hairline bg-surface-soft p-xxs",
|
|
1616
|
+
children: [
|
|
1617
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1618
|
+
"span",
|
|
1619
|
+
{
|
|
1620
|
+
"aria-hidden": "true",
|
|
1621
|
+
className: "pointer-events-none absolute left-0 top-0 rounded-md border border-hairline bg-surface shadow-sm transition-[transform,width,height,opacity] duration-200 ease-out",
|
|
1622
|
+
style: {
|
|
1623
|
+
width: indicator?.width ?? 0,
|
|
1624
|
+
height: indicator?.height ?? 0,
|
|
1625
|
+
transform: `translate(${indicator?.x ?? 0}px, ${indicator?.y ?? 0}px)`,
|
|
1626
|
+
opacity: indicator ? 1 : 0
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
),
|
|
1630
|
+
options.map((option, index) => {
|
|
1631
|
+
const selected = index === selectedIndex;
|
|
1632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1633
|
+
Button,
|
|
1634
|
+
{
|
|
1635
|
+
ref: (node) => {
|
|
1636
|
+
buttonRefs.current[index] = node;
|
|
1637
|
+
},
|
|
1638
|
+
variant: "bare",
|
|
1639
|
+
size: "sm",
|
|
1640
|
+
"aria-pressed": selected,
|
|
1641
|
+
onClick: () => select(option.value),
|
|
1642
|
+
className: cn9(
|
|
1643
|
+
"relative z-10 px-md",
|
|
1644
|
+
selected ? "text-ink" : "text-muted hover:text-ink"
|
|
1645
|
+
),
|
|
1646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: option.label }),
|
|
1648
|
+
option.badge ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "rounded-full bg-primary/10 px-xs py-xxs text-caption text-primary-ink", children: option.badge }) : null
|
|
1649
|
+
] })
|
|
1650
|
+
},
|
|
1651
|
+
option.value
|
|
1652
|
+
);
|
|
1653
|
+
})
|
|
1654
|
+
]
|
|
1660
1655
|
}
|
|
1661
|
-
);
|
|
1656
|
+
) });
|
|
1662
1657
|
}
|
|
1663
1658
|
);
|
|
1664
1659
|
BillingPeriodToggleDesktop.displayName = "BillingPeriodToggleDesktop";
|
|
@@ -14677,6 +14672,7 @@ function resolveBilling(plan, period) {
|
|
|
14677
14672
|
}
|
|
14678
14673
|
var PricingTableDesktop = React72.forwardRef(
|
|
14679
14674
|
({
|
|
14675
|
+
surface = "canvas",
|
|
14680
14676
|
eyebrow = "Pricing table",
|
|
14681
14677
|
title = "Pricing table",
|
|
14682
14678
|
plans = DEFAULT_PRICING_PLANS,
|
|
@@ -14685,6 +14681,8 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
14685
14681
|
defaultPeriod,
|
|
14686
14682
|
onPeriodChange,
|
|
14687
14683
|
showPeriodToggle = true,
|
|
14684
|
+
featuredLabel,
|
|
14685
|
+
size = "md",
|
|
14688
14686
|
onPlanAction,
|
|
14689
14687
|
className,
|
|
14690
14688
|
...rest
|
|
@@ -14697,11 +14695,16 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
14697
14695
|
if (period === void 0) setUncontrolled(next);
|
|
14698
14696
|
onPeriodChange?.(next);
|
|
14699
14697
|
};
|
|
14698
|
+
const large = size === "lg";
|
|
14700
14699
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
14701
14700
|
"section",
|
|
14702
14701
|
{
|
|
14703
14702
|
ref,
|
|
14704
|
-
className: cn57(
|
|
14703
|
+
className: cn57(
|
|
14704
|
+
"w-full",
|
|
14705
|
+
surface === "canvas" ? "bg-canvas px-lg py-xl" : "bg-transparent",
|
|
14706
|
+
className
|
|
14707
|
+
),
|
|
14705
14708
|
...rest,
|
|
14706
14709
|
children: [
|
|
14707
14710
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex flex-col gap-base md:flex-row md:items-end md:justify-between", children: [
|
|
@@ -14726,54 +14729,85 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
14726
14729
|
"article",
|
|
14727
14730
|
{
|
|
14728
14731
|
className: cn57(
|
|
14729
|
-
"col-span-12 flex flex-col rounded-lg border
|
|
14730
|
-
|
|
14732
|
+
"col-span-12 flex h-full flex-col rounded-lg border transition duration-200 ease-out md:col-span-4",
|
|
14733
|
+
"hover:-translate-y-xs hover:shadow-card motion-reduce:transform-none",
|
|
14734
|
+
large ? "p-lg" : "p-base",
|
|
14735
|
+
featured ? "border-primary/40 bg-primary/10" : "border-hairline bg-surface",
|
|
14736
|
+
large && featured ? "shadow-card" : ""
|
|
14731
14737
|
),
|
|
14732
14738
|
children: [
|
|
14739
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
14740
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14741
|
+
"h3",
|
|
14742
|
+
{
|
|
14743
|
+
className: cn57(
|
|
14744
|
+
large ? "text-heading-sm" : "text-body-md",
|
|
14745
|
+
featured ? "text-primary-ink" : "text-ink"
|
|
14746
|
+
),
|
|
14747
|
+
children: plan.name
|
|
14748
|
+
}
|
|
14749
|
+
),
|
|
14750
|
+
featured && featuredLabel ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "whitespace-nowrap rounded-full border border-primary/40 bg-surface px-sm py-xxs text-caption text-primary-ink", children: featuredLabel }) : null
|
|
14751
|
+
] }),
|
|
14752
|
+
large ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "mt-base flex items-baseline gap-sm", children: [
|
|
14753
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-display-lg text-ink", children: billing.price }),
|
|
14754
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-caption text-muted", children: billing.period })
|
|
14755
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "mt-sm flex flex-col gap-xxs", children: [
|
|
14756
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-heading-md text-ink", children: billing.price }),
|
|
14757
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-caption text-muted", children: billing.period })
|
|
14758
|
+
] }),
|
|
14733
14759
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14734
|
-
"
|
|
14760
|
+
"p",
|
|
14735
14761
|
{
|
|
14736
14762
|
className: cn57(
|
|
14737
|
-
"
|
|
14738
|
-
|
|
14763
|
+
"mt-base",
|
|
14764
|
+
large ? "text-body-md text-muted" : "text-body-sm text-muted"
|
|
14739
14765
|
),
|
|
14740
|
-
children: plan.
|
|
14766
|
+
children: plan.description
|
|
14741
14767
|
}
|
|
14742
14768
|
),
|
|
14743
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "mt-sm flex flex-col gap-xxs", children: [
|
|
14744
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-heading-md text-ink", children: billing.price }),
|
|
14745
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-caption text-muted", children: billing.period })
|
|
14746
|
-
] }),
|
|
14747
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-base text-body-sm text-muted", children: plan.description }),
|
|
14748
14769
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "mt-base", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14749
14770
|
Button,
|
|
14750
14771
|
{
|
|
14751
14772
|
variant: featured ? "primary" : "secondary",
|
|
14752
|
-
size: "sm",
|
|
14773
|
+
size: large ? "md" : "sm",
|
|
14753
14774
|
align: "center",
|
|
14775
|
+
fullWidth: large,
|
|
14754
14776
|
onClick: () => onPlanAction?.(plan),
|
|
14755
14777
|
children: plan.ctaLabel
|
|
14756
14778
|
}
|
|
14757
14779
|
) }),
|
|
14758
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14759
|
-
"
|
|
14780
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14781
|
+
"ul",
|
|
14760
14782
|
{
|
|
14761
|
-
className:
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14783
|
+
className: cn57(
|
|
14784
|
+
"flex flex-col",
|
|
14785
|
+
large ? "mt-lg gap-md" : "mt-lg gap-sm"
|
|
14786
|
+
),
|
|
14787
|
+
children: plan.features.map((feature) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
14788
|
+
"li",
|
|
14789
|
+
{
|
|
14790
|
+
className: cn57(
|
|
14791
|
+
"flex items-center gap-sm",
|
|
14792
|
+
large ? "text-body-md text-body" : "text-body-sm text-body"
|
|
14793
|
+
),
|
|
14794
|
+
children: [
|
|
14795
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14796
|
+
Icon,
|
|
14797
|
+
{
|
|
14798
|
+
name: "check",
|
|
14799
|
+
size: 16,
|
|
14800
|
+
tone: "inherit",
|
|
14801
|
+
className: featured ? "text-primary-ink" : "text-muted"
|
|
14802
|
+
}
|
|
14803
|
+
),
|
|
14804
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: feature })
|
|
14805
|
+
]
|
|
14806
|
+
},
|
|
14807
|
+
feature
|
|
14808
|
+
))
|
|
14809
|
+
}
|
|
14810
|
+
)
|
|
14777
14811
|
]
|
|
14778
14812
|
},
|
|
14779
14813
|
plan.id
|
|
@@ -14840,6 +14874,7 @@ function resolveBilling2(plan, period) {
|
|
|
14840
14874
|
}
|
|
14841
14875
|
var PricingTableMobile = React73.forwardRef(
|
|
14842
14876
|
({
|
|
14877
|
+
surface = "canvas",
|
|
14843
14878
|
eyebrow,
|
|
14844
14879
|
title,
|
|
14845
14880
|
plans = DEFAULT_MOBILE_PRICING_PLANS,
|
|
@@ -14865,7 +14900,11 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
14865
14900
|
"section",
|
|
14866
14901
|
{
|
|
14867
14902
|
ref,
|
|
14868
|
-
className: cn58(
|
|
14903
|
+
className: cn58(
|
|
14904
|
+
"w-full",
|
|
14905
|
+
surface === "canvas" ? "bg-canvas px-base py-lg" : "bg-transparent",
|
|
14906
|
+
className
|
|
14907
|
+
),
|
|
14869
14908
|
...rest,
|
|
14870
14909
|
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "mx-auto flex w-full max-w-[24rem] flex-col gap-base", children: [
|
|
14871
14910
|
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-label-caps text-muted", children: eyebrow }) : null,
|
|
@@ -14951,6 +14990,7 @@ PricingTableMobile.displayName = "PricingTableMobile";
|
|
|
14951
14990
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
14952
14991
|
var PricingTable = React74.forwardRef(
|
|
14953
14992
|
({
|
|
14993
|
+
surface = "canvas",
|
|
14954
14994
|
eyebrow,
|
|
14955
14995
|
title,
|
|
14956
14996
|
plans,
|
|
@@ -14960,6 +15000,7 @@ var PricingTable = React74.forwardRef(
|
|
|
14960
15000
|
onPeriodChange,
|
|
14961
15001
|
showPeriodToggle = true,
|
|
14962
15002
|
featuredLabel,
|
|
15003
|
+
size = "md",
|
|
14963
15004
|
onPlanAction,
|
|
14964
15005
|
desktopClassName,
|
|
14965
15006
|
mobileClassName,
|
|
@@ -14974,35 +15015,63 @@ var PricingTable = React74.forwardRef(
|
|
|
14974
15015
|
if (period === void 0) setUncontrolledPeriod(next);
|
|
14975
15016
|
onPeriodChange?.(next);
|
|
14976
15017
|
};
|
|
14977
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
15019
|
+
"div",
|
|
15020
|
+
{
|
|
15021
|
+
ref,
|
|
15022
|
+
className: [
|
|
15023
|
+
"w-full",
|
|
15024
|
+
surface === "transparent" ? "bg-transparent" : "bg-canvas",
|
|
15025
|
+
className
|
|
15026
|
+
].filter(Boolean).join(" "),
|
|
15027
|
+
...rest,
|
|
15028
|
+
children: [
|
|
15029
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15030
|
+
"div",
|
|
15031
|
+
{
|
|
15032
|
+
className: ["hidden md:block", desktopClassName].filter(Boolean).join(" "),
|
|
15033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15034
|
+
PricingTableDesktop,
|
|
15035
|
+
{
|
|
15036
|
+
surface,
|
|
15037
|
+
eyebrow,
|
|
15038
|
+
title,
|
|
15039
|
+
plans,
|
|
15040
|
+
periods,
|
|
15041
|
+
period: currentPeriod,
|
|
15042
|
+
onPeriodChange: handlePeriodChange,
|
|
15043
|
+
showPeriodToggle,
|
|
15044
|
+
featuredLabel,
|
|
15045
|
+
size,
|
|
15046
|
+
onPlanAction
|
|
15047
|
+
}
|
|
15048
|
+
)
|
|
15049
|
+
}
|
|
15050
|
+
),
|
|
15051
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15052
|
+
"div",
|
|
15053
|
+
{
|
|
15054
|
+
className: ["md:hidden", mobileClassName].filter(Boolean).join(" "),
|
|
15055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15056
|
+
PricingTableMobile,
|
|
15057
|
+
{
|
|
15058
|
+
surface,
|
|
15059
|
+
eyebrow,
|
|
15060
|
+
title,
|
|
15061
|
+
plans,
|
|
15062
|
+
periods,
|
|
15063
|
+
period: currentPeriod,
|
|
15064
|
+
onPeriodChange: handlePeriodChange,
|
|
15065
|
+
showPeriodToggle,
|
|
15066
|
+
featuredLabel,
|
|
15067
|
+
onPlanAction
|
|
15068
|
+
}
|
|
15069
|
+
)
|
|
15070
|
+
}
|
|
15071
|
+
)
|
|
15072
|
+
]
|
|
15073
|
+
}
|
|
15074
|
+
);
|
|
15006
15075
|
}
|
|
15007
15076
|
);
|
|
15008
15077
|
PricingTable.displayName = "PricingTable";
|
package/dist/index.js
CHANGED
|
@@ -1479,60 +1479,55 @@ var BillingPeriodToggleDesktop = React12.forwardRef(
|
|
|
1479
1479
|
buttonRefs.current[next]?.focus();
|
|
1480
1480
|
};
|
|
1481
1481
|
const indicator = selectedIndex >= 0 ? rects[selectedIndex] : void 0;
|
|
1482
|
-
return /* @__PURE__ */ jsx12(
|
|
1482
|
+
return /* @__PURE__ */ jsx12("div", { ref, className: cn9("inline-flex", className), ...rest, children: /* @__PURE__ */ jsxs11(
|
|
1483
1483
|
"div",
|
|
1484
1484
|
{
|
|
1485
|
-
ref,
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
{
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
);
|
|
1530
|
-
})
|
|
1531
|
-
]
|
|
1532
|
-
}
|
|
1533
|
-
)
|
|
1485
|
+
ref: trackRef,
|
|
1486
|
+
role: "group",
|
|
1487
|
+
"aria-label": label,
|
|
1488
|
+
onKeyDown: handleKeyDown,
|
|
1489
|
+
className: "relative inline-flex items-center gap-xxs rounded-lg border border-hairline bg-surface-soft p-xxs",
|
|
1490
|
+
children: [
|
|
1491
|
+
/* @__PURE__ */ jsx12(
|
|
1492
|
+
"span",
|
|
1493
|
+
{
|
|
1494
|
+
"aria-hidden": "true",
|
|
1495
|
+
className: "pointer-events-none absolute left-0 top-0 rounded-md border border-hairline bg-surface shadow-sm transition-[transform,width,height,opacity] duration-200 ease-out",
|
|
1496
|
+
style: {
|
|
1497
|
+
width: indicator?.width ?? 0,
|
|
1498
|
+
height: indicator?.height ?? 0,
|
|
1499
|
+
transform: `translate(${indicator?.x ?? 0}px, ${indicator?.y ?? 0}px)`,
|
|
1500
|
+
opacity: indicator ? 1 : 0
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
),
|
|
1504
|
+
options.map((option, index) => {
|
|
1505
|
+
const selected = index === selectedIndex;
|
|
1506
|
+
return /* @__PURE__ */ jsx12(
|
|
1507
|
+
Button,
|
|
1508
|
+
{
|
|
1509
|
+
ref: (node) => {
|
|
1510
|
+
buttonRefs.current[index] = node;
|
|
1511
|
+
},
|
|
1512
|
+
variant: "bare",
|
|
1513
|
+
size: "sm",
|
|
1514
|
+
"aria-pressed": selected,
|
|
1515
|
+
onClick: () => select(option.value),
|
|
1516
|
+
className: cn9(
|
|
1517
|
+
"relative z-10 px-md",
|
|
1518
|
+
selected ? "text-ink" : "text-muted hover:text-ink"
|
|
1519
|
+
),
|
|
1520
|
+
children: /* @__PURE__ */ jsxs11("span", { className: "inline-flex items-center gap-xs", children: [
|
|
1521
|
+
/* @__PURE__ */ jsx12("span", { children: option.label }),
|
|
1522
|
+
option.badge ? /* @__PURE__ */ jsx12("span", { className: "rounded-full bg-primary/10 px-xs py-xxs text-caption text-primary-ink", children: option.badge }) : null
|
|
1523
|
+
] })
|
|
1524
|
+
},
|
|
1525
|
+
option.value
|
|
1526
|
+
);
|
|
1527
|
+
})
|
|
1528
|
+
]
|
|
1534
1529
|
}
|
|
1535
|
-
);
|
|
1530
|
+
) });
|
|
1536
1531
|
}
|
|
1537
1532
|
);
|
|
1538
1533
|
BillingPeriodToggleDesktop.displayName = "BillingPeriodToggleDesktop";
|
|
@@ -14551,6 +14546,7 @@ function resolveBilling(plan, period) {
|
|
|
14551
14546
|
}
|
|
14552
14547
|
var PricingTableDesktop = React72.forwardRef(
|
|
14553
14548
|
({
|
|
14549
|
+
surface = "canvas",
|
|
14554
14550
|
eyebrow = "Pricing table",
|
|
14555
14551
|
title = "Pricing table",
|
|
14556
14552
|
plans = DEFAULT_PRICING_PLANS,
|
|
@@ -14559,6 +14555,8 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
14559
14555
|
defaultPeriod,
|
|
14560
14556
|
onPeriodChange,
|
|
14561
14557
|
showPeriodToggle = true,
|
|
14558
|
+
featuredLabel,
|
|
14559
|
+
size = "md",
|
|
14562
14560
|
onPlanAction,
|
|
14563
14561
|
className,
|
|
14564
14562
|
...rest
|
|
@@ -14571,11 +14569,16 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
14571
14569
|
if (period === void 0) setUncontrolled(next);
|
|
14572
14570
|
onPeriodChange?.(next);
|
|
14573
14571
|
};
|
|
14572
|
+
const large = size === "lg";
|
|
14574
14573
|
return /* @__PURE__ */ jsxs69(
|
|
14575
14574
|
"section",
|
|
14576
14575
|
{
|
|
14577
14576
|
ref,
|
|
14578
|
-
className: cn57(
|
|
14577
|
+
className: cn57(
|
|
14578
|
+
"w-full",
|
|
14579
|
+
surface === "canvas" ? "bg-canvas px-lg py-xl" : "bg-transparent",
|
|
14580
|
+
className
|
|
14581
|
+
),
|
|
14579
14582
|
...rest,
|
|
14580
14583
|
children: [
|
|
14581
14584
|
/* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-base md:flex-row md:items-end md:justify-between", children: [
|
|
@@ -14600,54 +14603,85 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
14600
14603
|
"article",
|
|
14601
14604
|
{
|
|
14602
14605
|
className: cn57(
|
|
14603
|
-
"col-span-12 flex flex-col rounded-lg border
|
|
14604
|
-
|
|
14606
|
+
"col-span-12 flex h-full flex-col rounded-lg border transition duration-200 ease-out md:col-span-4",
|
|
14607
|
+
"hover:-translate-y-xs hover:shadow-card motion-reduce:transform-none",
|
|
14608
|
+
large ? "p-lg" : "p-base",
|
|
14609
|
+
featured ? "border-primary/40 bg-primary/10" : "border-hairline bg-surface",
|
|
14610
|
+
large && featured ? "shadow-card" : ""
|
|
14605
14611
|
),
|
|
14606
14612
|
children: [
|
|
14613
|
+
/* @__PURE__ */ jsxs69("div", { className: "flex items-center gap-sm", children: [
|
|
14614
|
+
/* @__PURE__ */ jsx71(
|
|
14615
|
+
"h3",
|
|
14616
|
+
{
|
|
14617
|
+
className: cn57(
|
|
14618
|
+
large ? "text-heading-sm" : "text-body-md",
|
|
14619
|
+
featured ? "text-primary-ink" : "text-ink"
|
|
14620
|
+
),
|
|
14621
|
+
children: plan.name
|
|
14622
|
+
}
|
|
14623
|
+
),
|
|
14624
|
+
featured && featuredLabel ? /* @__PURE__ */ jsx71("span", { className: "whitespace-nowrap rounded-full border border-primary/40 bg-surface px-sm py-xxs text-caption text-primary-ink", children: featuredLabel }) : null
|
|
14625
|
+
] }),
|
|
14626
|
+
large ? /* @__PURE__ */ jsxs69("div", { className: "mt-base flex items-baseline gap-sm", children: [
|
|
14627
|
+
/* @__PURE__ */ jsx71("span", { className: "text-display-lg text-ink", children: billing.price }),
|
|
14628
|
+
/* @__PURE__ */ jsx71("span", { className: "text-caption text-muted", children: billing.period })
|
|
14629
|
+
] }) : /* @__PURE__ */ jsxs69("div", { className: "mt-sm flex flex-col gap-xxs", children: [
|
|
14630
|
+
/* @__PURE__ */ jsx71("span", { className: "text-heading-md text-ink", children: billing.price }),
|
|
14631
|
+
/* @__PURE__ */ jsx71("span", { className: "text-caption text-muted", children: billing.period })
|
|
14632
|
+
] }),
|
|
14607
14633
|
/* @__PURE__ */ jsx71(
|
|
14608
|
-
"
|
|
14634
|
+
"p",
|
|
14609
14635
|
{
|
|
14610
14636
|
className: cn57(
|
|
14611
|
-
"
|
|
14612
|
-
|
|
14637
|
+
"mt-base",
|
|
14638
|
+
large ? "text-body-md text-muted" : "text-body-sm text-muted"
|
|
14613
14639
|
),
|
|
14614
|
-
children: plan.
|
|
14640
|
+
children: plan.description
|
|
14615
14641
|
}
|
|
14616
14642
|
),
|
|
14617
|
-
/* @__PURE__ */ jsxs69("div", { className: "mt-sm flex flex-col gap-xxs", children: [
|
|
14618
|
-
/* @__PURE__ */ jsx71("span", { className: "text-heading-md text-ink", children: billing.price }),
|
|
14619
|
-
/* @__PURE__ */ jsx71("span", { className: "text-caption text-muted", children: billing.period })
|
|
14620
|
-
] }),
|
|
14621
|
-
/* @__PURE__ */ jsx71("p", { className: "mt-base text-body-sm text-muted", children: plan.description }),
|
|
14622
14643
|
/* @__PURE__ */ jsx71("div", { className: "mt-base", children: /* @__PURE__ */ jsx71(
|
|
14623
14644
|
Button,
|
|
14624
14645
|
{
|
|
14625
14646
|
variant: featured ? "primary" : "secondary",
|
|
14626
|
-
size: "sm",
|
|
14647
|
+
size: large ? "md" : "sm",
|
|
14627
14648
|
align: "center",
|
|
14649
|
+
fullWidth: large,
|
|
14628
14650
|
onClick: () => onPlanAction?.(plan),
|
|
14629
14651
|
children: plan.ctaLabel
|
|
14630
14652
|
}
|
|
14631
14653
|
) }),
|
|
14632
|
-
/* @__PURE__ */ jsx71(
|
|
14633
|
-
"
|
|
14654
|
+
/* @__PURE__ */ jsx71(
|
|
14655
|
+
"ul",
|
|
14634
14656
|
{
|
|
14635
|
-
className:
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14657
|
+
className: cn57(
|
|
14658
|
+
"flex flex-col",
|
|
14659
|
+
large ? "mt-lg gap-md" : "mt-lg gap-sm"
|
|
14660
|
+
),
|
|
14661
|
+
children: plan.features.map((feature) => /* @__PURE__ */ jsxs69(
|
|
14662
|
+
"li",
|
|
14663
|
+
{
|
|
14664
|
+
className: cn57(
|
|
14665
|
+
"flex items-center gap-sm",
|
|
14666
|
+
large ? "text-body-md text-body" : "text-body-sm text-body"
|
|
14667
|
+
),
|
|
14668
|
+
children: [
|
|
14669
|
+
/* @__PURE__ */ jsx71(
|
|
14670
|
+
Icon,
|
|
14671
|
+
{
|
|
14672
|
+
name: "check",
|
|
14673
|
+
size: 16,
|
|
14674
|
+
tone: "inherit",
|
|
14675
|
+
className: featured ? "text-primary-ink" : "text-muted"
|
|
14676
|
+
}
|
|
14677
|
+
),
|
|
14678
|
+
/* @__PURE__ */ jsx71("span", { children: feature })
|
|
14679
|
+
]
|
|
14680
|
+
},
|
|
14681
|
+
feature
|
|
14682
|
+
))
|
|
14683
|
+
}
|
|
14684
|
+
)
|
|
14651
14685
|
]
|
|
14652
14686
|
},
|
|
14653
14687
|
plan.id
|
|
@@ -14714,6 +14748,7 @@ function resolveBilling2(plan, period) {
|
|
|
14714
14748
|
}
|
|
14715
14749
|
var PricingTableMobile = React73.forwardRef(
|
|
14716
14750
|
({
|
|
14751
|
+
surface = "canvas",
|
|
14717
14752
|
eyebrow,
|
|
14718
14753
|
title,
|
|
14719
14754
|
plans = DEFAULT_MOBILE_PRICING_PLANS,
|
|
@@ -14739,7 +14774,11 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
14739
14774
|
"section",
|
|
14740
14775
|
{
|
|
14741
14776
|
ref,
|
|
14742
|
-
className: cn58(
|
|
14777
|
+
className: cn58(
|
|
14778
|
+
"w-full",
|
|
14779
|
+
surface === "canvas" ? "bg-canvas px-base py-lg" : "bg-transparent",
|
|
14780
|
+
className
|
|
14781
|
+
),
|
|
14743
14782
|
...rest,
|
|
14744
14783
|
children: /* @__PURE__ */ jsxs70("div", { className: "mx-auto flex w-full max-w-[24rem] flex-col gap-base", children: [
|
|
14745
14784
|
eyebrow ? /* @__PURE__ */ jsx72("span", { className: "text-label-caps text-muted", children: eyebrow }) : null,
|
|
@@ -14825,6 +14864,7 @@ PricingTableMobile.displayName = "PricingTableMobile";
|
|
|
14825
14864
|
import { jsx as jsx73, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
14826
14865
|
var PricingTable = React74.forwardRef(
|
|
14827
14866
|
({
|
|
14867
|
+
surface = "canvas",
|
|
14828
14868
|
eyebrow,
|
|
14829
14869
|
title,
|
|
14830
14870
|
plans,
|
|
@@ -14834,6 +14874,7 @@ var PricingTable = React74.forwardRef(
|
|
|
14834
14874
|
onPeriodChange,
|
|
14835
14875
|
showPeriodToggle = true,
|
|
14836
14876
|
featuredLabel,
|
|
14877
|
+
size = "md",
|
|
14837
14878
|
onPlanAction,
|
|
14838
14879
|
desktopClassName,
|
|
14839
14880
|
mobileClassName,
|
|
@@ -14848,35 +14889,63 @@ var PricingTable = React74.forwardRef(
|
|
|
14848
14889
|
if (period === void 0) setUncontrolledPeriod(next);
|
|
14849
14890
|
onPeriodChange?.(next);
|
|
14850
14891
|
};
|
|
14851
|
-
return /* @__PURE__ */ jsxs71(
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14892
|
+
return /* @__PURE__ */ jsxs71(
|
|
14893
|
+
"div",
|
|
14894
|
+
{
|
|
14895
|
+
ref,
|
|
14896
|
+
className: [
|
|
14897
|
+
"w-full",
|
|
14898
|
+
surface === "transparent" ? "bg-transparent" : "bg-canvas",
|
|
14899
|
+
className
|
|
14900
|
+
].filter(Boolean).join(" "),
|
|
14901
|
+
...rest,
|
|
14902
|
+
children: [
|
|
14903
|
+
/* @__PURE__ */ jsx73(
|
|
14904
|
+
"div",
|
|
14905
|
+
{
|
|
14906
|
+
className: ["hidden md:block", desktopClassName].filter(Boolean).join(" "),
|
|
14907
|
+
children: /* @__PURE__ */ jsx73(
|
|
14908
|
+
PricingTableDesktop,
|
|
14909
|
+
{
|
|
14910
|
+
surface,
|
|
14911
|
+
eyebrow,
|
|
14912
|
+
title,
|
|
14913
|
+
plans,
|
|
14914
|
+
periods,
|
|
14915
|
+
period: currentPeriod,
|
|
14916
|
+
onPeriodChange: handlePeriodChange,
|
|
14917
|
+
showPeriodToggle,
|
|
14918
|
+
featuredLabel,
|
|
14919
|
+
size,
|
|
14920
|
+
onPlanAction
|
|
14921
|
+
}
|
|
14922
|
+
)
|
|
14923
|
+
}
|
|
14924
|
+
),
|
|
14925
|
+
/* @__PURE__ */ jsx73(
|
|
14926
|
+
"div",
|
|
14927
|
+
{
|
|
14928
|
+
className: ["md:hidden", mobileClassName].filter(Boolean).join(" "),
|
|
14929
|
+
children: /* @__PURE__ */ jsx73(
|
|
14930
|
+
PricingTableMobile,
|
|
14931
|
+
{
|
|
14932
|
+
surface,
|
|
14933
|
+
eyebrow,
|
|
14934
|
+
title,
|
|
14935
|
+
plans,
|
|
14936
|
+
periods,
|
|
14937
|
+
period: currentPeriod,
|
|
14938
|
+
onPeriodChange: handlePeriodChange,
|
|
14939
|
+
showPeriodToggle,
|
|
14940
|
+
featuredLabel,
|
|
14941
|
+
onPlanAction
|
|
14942
|
+
}
|
|
14943
|
+
)
|
|
14944
|
+
}
|
|
14945
|
+
)
|
|
14946
|
+
]
|
|
14947
|
+
}
|
|
14948
|
+
);
|
|
14880
14949
|
}
|
|
14881
14950
|
);
|
|
14882
14951
|
PricingTable.displayName = "PricingTable";
|
package/dist/styles.css
CHANGED
|
@@ -2407,6 +2407,14 @@
|
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
}
|
|
2410
|
+
.hover\:-translate-y-xs {
|
|
2411
|
+
&:hover {
|
|
2412
|
+
@media (hover: hover) {
|
|
2413
|
+
--tw-translate-y: calc(var(--spacing-xs) * -1);
|
|
2414
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2410
2418
|
.hover\:scale-110 {
|
|
2411
2419
|
&:hover {
|
|
2412
2420
|
@media (hover: hover) {
|
|
@@ -2816,6 +2824,11 @@
|
|
|
2816
2824
|
animation: var(--animate-pulse);
|
|
2817
2825
|
}
|
|
2818
2826
|
}
|
|
2827
|
+
.motion-reduce\:transform-none {
|
|
2828
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2829
|
+
transform: none;
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2819
2832
|
.motion-reduce\:animate-none {
|
|
2820
2833
|
@media (prefers-reduced-motion: reduce) {
|
|
2821
2834
|
animation: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designa8/vibedesign-supabase-deepseek-image-v1-2-176b",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Complete design system \"My Project supabase-deepseek-image-v1\" generated by Atoms Design.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -6,6 +6,8 @@ export interface BillingPeriodOption {
|
|
|
6
6
|
value: string;
|
|
7
7
|
/** Visible segment label. */
|
|
8
8
|
label: string;
|
|
9
|
+
/** Optional short note rendered after the label, e.g. a discount. */
|
|
10
|
+
badge?: string;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
export interface BillingPeriodToggleDesktopProps
|
|
@@ -47,6 +49,9 @@ function cn(...parts: Array<string | false | null | undefined>) {
|
|
|
47
49
|
* change reads as a single object moving rather than a fill swapping on each
|
|
48
50
|
* label. The pill's edge is the same neutral hairline as the track, so the only
|
|
49
51
|
* colour in the control comes from the selected label and the brand badge.
|
|
52
|
+
*
|
|
53
|
+
* A segment may carry an optional `badge` note, painted as a small
|
|
54
|
+
* `primary`-tinted pill after its label.
|
|
50
55
|
*/
|
|
51
56
|
export const BillingPeriodToggleDesktop = React.forwardRef<
|
|
52
57
|
HTMLDivElement,
|
|
@@ -143,11 +148,7 @@ export const BillingPeriodToggleDesktop = React.forwardRef<
|
|
|
143
148
|
const indicator = selectedIndex >= 0 ? rects[selectedIndex] : undefined;
|
|
144
149
|
|
|
145
150
|
return (
|
|
146
|
-
<div
|
|
147
|
-
ref={ref}
|
|
148
|
-
className={cn("inline-flex", className)}
|
|
149
|
-
{...rest}
|
|
150
|
-
>
|
|
151
|
+
<div ref={ref} className={cn("inline-flex", className)} {...rest}>
|
|
151
152
|
<div
|
|
152
153
|
ref={trackRef}
|
|
153
154
|
role="group"
|
|
@@ -182,7 +183,14 @@ export const BillingPeriodToggleDesktop = React.forwardRef<
|
|
|
182
183
|
selected ? "text-ink" : "text-muted hover:text-ink",
|
|
183
184
|
)}
|
|
184
185
|
>
|
|
185
|
-
|
|
186
|
+
<span className="inline-flex items-center gap-xs">
|
|
187
|
+
<span>{option.label}</span>
|
|
188
|
+
{option.badge ? (
|
|
189
|
+
<span className="rounded-full bg-primary/10 px-xs py-xxs text-caption text-primary-ink">
|
|
190
|
+
{option.badge}
|
|
191
|
+
</span>
|
|
192
|
+
) : null}
|
|
193
|
+
</span>
|
|
186
194
|
</Button>
|
|
187
195
|
);
|
|
188
196
|
})}
|
|
@@ -12,6 +12,12 @@ export type {
|
|
|
12
12
|
|
|
13
13
|
export interface PricingTableProps
|
|
14
14
|
extends React.ComponentPropsWithoutRef<"div"> {
|
|
15
|
+
/**
|
|
16
|
+
* Page surface forwarded to both layouts. `canvas` paints the page background
|
|
17
|
+
* and owns each section's padding; `transparent` drops both so the table sits
|
|
18
|
+
* inside a container the consumer already pads.
|
|
19
|
+
*/
|
|
20
|
+
surface?: "canvas" | "transparent";
|
|
15
21
|
/** Uppercase line above the section title. */
|
|
16
22
|
eyebrow?: string;
|
|
17
23
|
/** Section title. */
|
|
@@ -31,8 +37,10 @@ export interface PricingTableProps
|
|
|
31
37
|
onPeriodChange?: (value: string) => void;
|
|
32
38
|
/** Hide the billing switch for a single-price table. */
|
|
33
39
|
showPeriodToggle?: boolean;
|
|
34
|
-
/** Ribbon copy on the highlighted tier
|
|
40
|
+
/** Ribbon copy on the highlighted tier, in both layouts. */
|
|
35
41
|
featuredLabel?: string;
|
|
42
|
+
/** Card density forwarded to the desktop layout. */
|
|
43
|
+
size?: "md" | "lg";
|
|
36
44
|
/** Fires with the clicked plan. */
|
|
37
45
|
onPlanAction?: (plan: PricingPlan) => void;
|
|
38
46
|
/** Extra classes for the desktop section wrapper. */
|
|
@@ -46,10 +54,14 @@ export interface PricingTableProps
|
|
|
46
54
|
* visibility flips at the `md` breakpoint, so no viewport measurement happens
|
|
47
55
|
* in JavaScript. The wrapper keeps a single shared billing period, so switching
|
|
48
56
|
* plans or periods on one layout carries across the breakpoint.
|
|
57
|
+
*
|
|
58
|
+
* Presentation props (`surface`, `featuredLabel`, `size`) are forwarded to the
|
|
59
|
+
* layouts so consumers configure the pair through one component.
|
|
49
60
|
*/
|
|
50
61
|
export const PricingTable = React.forwardRef<HTMLDivElement, PricingTableProps>(
|
|
51
62
|
(
|
|
52
63
|
{
|
|
64
|
+
surface = "canvas",
|
|
53
65
|
eyebrow,
|
|
54
66
|
title,
|
|
55
67
|
plans,
|
|
@@ -59,6 +71,7 @@ export const PricingTable = React.forwardRef<HTMLDivElement, PricingTableProps>(
|
|
|
59
71
|
onPeriodChange,
|
|
60
72
|
showPeriodToggle = true,
|
|
61
73
|
featuredLabel,
|
|
74
|
+
size = "md",
|
|
62
75
|
onPlanAction,
|
|
63
76
|
desktopClassName,
|
|
64
77
|
mobileClassName,
|
|
@@ -79,9 +92,24 @@ export const PricingTable = React.forwardRef<HTMLDivElement, PricingTableProps>(
|
|
|
79
92
|
};
|
|
80
93
|
|
|
81
94
|
return (
|
|
82
|
-
<div
|
|
83
|
-
|
|
95
|
+
<div
|
|
96
|
+
ref={ref}
|
|
97
|
+
className={[
|
|
98
|
+
"w-full",
|
|
99
|
+
surface === "transparent" ? "bg-transparent" : "bg-canvas",
|
|
100
|
+
className,
|
|
101
|
+
]
|
|
102
|
+
.filter(Boolean)
|
|
103
|
+
.join(" ")}
|
|
104
|
+
{...rest}
|
|
105
|
+
>
|
|
106
|
+
<div
|
|
107
|
+
className={["hidden md:block", desktopClassName]
|
|
108
|
+
.filter(Boolean)
|
|
109
|
+
.join(" ")}
|
|
110
|
+
>
|
|
84
111
|
<PricingTableDesktop
|
|
112
|
+
surface={surface}
|
|
85
113
|
eyebrow={eyebrow}
|
|
86
114
|
title={title}
|
|
87
115
|
plans={plans}
|
|
@@ -89,12 +117,17 @@ export const PricingTable = React.forwardRef<HTMLDivElement, PricingTableProps>(
|
|
|
89
117
|
period={currentPeriod}
|
|
90
118
|
onPeriodChange={handlePeriodChange}
|
|
91
119
|
showPeriodToggle={showPeriodToggle}
|
|
120
|
+
featuredLabel={featuredLabel}
|
|
121
|
+
size={size}
|
|
92
122
|
onPlanAction={onPlanAction}
|
|
93
123
|
/>
|
|
94
124
|
</div>
|
|
95
125
|
|
|
96
|
-
<div
|
|
126
|
+
<div
|
|
127
|
+
className={["md:hidden", mobileClassName].filter(Boolean).join(" ")}
|
|
128
|
+
>
|
|
97
129
|
<PricingTableMobile
|
|
130
|
+
surface={surface}
|
|
98
131
|
eyebrow={eyebrow}
|
|
99
132
|
title={title}
|
|
100
133
|
plans={plans}
|
|
@@ -3,15 +3,41 @@ import { PricingTable } from "./PricingTable";
|
|
|
3
3
|
|
|
4
4
|
export default function PricingTablePreview() {
|
|
5
5
|
const [period, setPeriod] = React.useState("monthly");
|
|
6
|
+
const [largePeriod, setLargePeriod] = React.useState("monthly");
|
|
7
|
+
|
|
8
|
+
const periods = React.useMemo(
|
|
9
|
+
() => [
|
|
10
|
+
{ value: "monthly", label: "Monthly" },
|
|
11
|
+
{ value: "yearly", label: "Yearly", badge: "Save 20%" },
|
|
12
|
+
],
|
|
13
|
+
[],
|
|
14
|
+
);
|
|
6
15
|
|
|
7
16
|
return (
|
|
8
|
-
<div className="w-full">
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
<div className="w-full max-w-5xl mx-auto p-lg space-y-xl">
|
|
18
|
+
<div className="rounded-xl border border-hairline overflow-hidden">
|
|
19
|
+
<PricingTable
|
|
20
|
+
eyebrow="Pricing table"
|
|
21
|
+
title="Pricing built for every stage"
|
|
22
|
+
periods={periods}
|
|
23
|
+
period={period}
|
|
24
|
+
onPeriodChange={setPeriod}
|
|
25
|
+
featuredLabel="Most popular"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="rounded-xl border border-hairline bg-surface-soft p-base">
|
|
30
|
+
<PricingTable
|
|
31
|
+
surface="transparent"
|
|
32
|
+
size="lg"
|
|
33
|
+
eyebrow="Large density"
|
|
34
|
+
title="Roomier cards for a hero section"
|
|
35
|
+
periods={periods}
|
|
36
|
+
period={largePeriod}
|
|
37
|
+
onPeriodChange={setLargePeriod}
|
|
38
|
+
featuredLabel="Best value"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
15
41
|
</div>
|
|
16
42
|
);
|
|
17
43
|
}
|
|
@@ -30,6 +30,12 @@ export interface PricingPlan {
|
|
|
30
30
|
|
|
31
31
|
export interface PricingTableDesktopProps
|
|
32
32
|
extends React.ComponentPropsWithoutRef<"section"> {
|
|
33
|
+
/**
|
|
34
|
+
* Page surface for the section. `canvas` paints the page background and owns
|
|
35
|
+
* its own padding; `transparent` drops both so the table sits inside a
|
|
36
|
+
* container the consumer already pads.
|
|
37
|
+
*/
|
|
38
|
+
surface?: "canvas" | "transparent";
|
|
33
39
|
/** Uppercase line above the section title. */
|
|
34
40
|
eyebrow?: string;
|
|
35
41
|
/** Section title. */
|
|
@@ -37,7 +43,7 @@ export interface PricingTableDesktopProps
|
|
|
37
43
|
/** Plans in visual order. Three is the intended range. */
|
|
38
44
|
plans?: PricingPlan[];
|
|
39
45
|
/** Billing period buttons rendered above the cards. */
|
|
40
|
-
periods?: Array<{ value: string; label: string }>;
|
|
46
|
+
periods?: Array<{ value: string; label: string; badge?: string }>;
|
|
41
47
|
/** Controlled billing period. */
|
|
42
48
|
period?: string;
|
|
43
49
|
/** Initial billing period when uncontrolled. */
|
|
@@ -46,6 +52,10 @@ export interface PricingTableDesktopProps
|
|
|
46
52
|
onPeriodChange?: (value: string) => void;
|
|
47
53
|
/** Hide the billing switch for a single-price table. */
|
|
48
54
|
showPeriodToggle?: boolean;
|
|
55
|
+
/** Ribbon copy on the highlighted tier, next to its plan name. */
|
|
56
|
+
featuredLabel?: string;
|
|
57
|
+
/** Card density. `lg` enlarges the type and padding for a hero tier row. */
|
|
58
|
+
size?: "md" | "lg";
|
|
49
59
|
/** Fires with the clicked plan. */
|
|
50
60
|
onPlanAction?: (plan: PricingPlan) => void;
|
|
51
61
|
}
|
|
@@ -105,7 +115,8 @@ function resolveBilling(plan: PricingPlan, period: string): PricingPlanBilling {
|
|
|
105
115
|
|
|
106
116
|
/**
|
|
107
117
|
* A three-tier pricing section for a full-width page. Cards share one column
|
|
108
|
-
* grid, the middle tier can take the tinted highlight
|
|
118
|
+
* grid and an equal height, the middle tier can take the tinted highlight
|
|
119
|
+
* treatment with an optional ribbon next to its plan name, and the billing
|
|
109
120
|
* switch rewrites every amount in place so the comparison stays aligned.
|
|
110
121
|
*
|
|
111
122
|
* The highlight is mixed from the `primary` token at paint time
|
|
@@ -119,6 +130,7 @@ export const PricingTableDesktop = React.forwardRef<
|
|
|
119
130
|
>(
|
|
120
131
|
(
|
|
121
132
|
{
|
|
133
|
+
surface = "canvas",
|
|
122
134
|
eyebrow = "Pricing table",
|
|
123
135
|
title = "Pricing table",
|
|
124
136
|
plans = DEFAULT_PRICING_PLANS,
|
|
@@ -127,6 +139,8 @@ export const PricingTableDesktop = React.forwardRef<
|
|
|
127
139
|
defaultPeriod,
|
|
128
140
|
onPeriodChange,
|
|
129
141
|
showPeriodToggle = true,
|
|
142
|
+
featuredLabel,
|
|
143
|
+
size = "md",
|
|
130
144
|
onPlanAction,
|
|
131
145
|
className,
|
|
132
146
|
...rest
|
|
@@ -143,10 +157,16 @@ export const PricingTableDesktop = React.forwardRef<
|
|
|
143
157
|
onPeriodChange?.(next);
|
|
144
158
|
};
|
|
145
159
|
|
|
160
|
+
const large = size === "lg";
|
|
161
|
+
|
|
146
162
|
return (
|
|
147
163
|
<section
|
|
148
164
|
ref={ref}
|
|
149
|
-
className={cn(
|
|
165
|
+
className={cn(
|
|
166
|
+
"w-full",
|
|
167
|
+
surface === "canvas" ? "bg-canvas px-lg py-xl" : "bg-transparent",
|
|
168
|
+
className,
|
|
169
|
+
)}
|
|
150
170
|
{...rest}
|
|
151
171
|
>
|
|
152
172
|
<div className="flex flex-col gap-base md:flex-row md:items-end md:justify-between">
|
|
@@ -174,50 +194,85 @@ export const PricingTableDesktop = React.forwardRef<
|
|
|
174
194
|
<article
|
|
175
195
|
key={plan.id}
|
|
176
196
|
className={cn(
|
|
177
|
-
"col-span-12 flex flex-col rounded-lg border
|
|
197
|
+
"col-span-12 flex h-full flex-col rounded-lg border transition duration-200 ease-out md:col-span-4",
|
|
198
|
+
"hover:-translate-y-xs hover:shadow-card motion-reduce:transform-none",
|
|
199
|
+
large ? "p-lg" : "p-base",
|
|
178
200
|
featured
|
|
179
201
|
? "border-primary/40 bg-primary/10"
|
|
180
202
|
: "border-hairline bg-surface",
|
|
203
|
+
large && featured ? "shadow-card" : "",
|
|
181
204
|
)}
|
|
182
205
|
>
|
|
183
|
-
<
|
|
206
|
+
<div className="flex items-center gap-sm">
|
|
207
|
+
<h3
|
|
208
|
+
className={cn(
|
|
209
|
+
large ? "text-heading-sm" : "text-body-md",
|
|
210
|
+
featured ? "text-primary-ink" : "text-ink",
|
|
211
|
+
)}
|
|
212
|
+
>
|
|
213
|
+
{plan.name}
|
|
214
|
+
</h3>
|
|
215
|
+
{featured && featuredLabel ? (
|
|
216
|
+
<span className="whitespace-nowrap rounded-full border border-primary/40 bg-surface px-sm py-xxs text-caption text-primary-ink">
|
|
217
|
+
{featuredLabel}
|
|
218
|
+
</span>
|
|
219
|
+
) : null}
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
{large ? (
|
|
223
|
+
<div className="mt-base flex items-baseline gap-sm">
|
|
224
|
+
<span className="text-display-lg text-ink">
|
|
225
|
+
{billing.price}
|
|
226
|
+
</span>
|
|
227
|
+
<span className="text-caption text-muted">
|
|
228
|
+
{billing.period}
|
|
229
|
+
</span>
|
|
230
|
+
</div>
|
|
231
|
+
) : (
|
|
232
|
+
<div className="mt-sm flex flex-col gap-xxs">
|
|
233
|
+
<span className="text-heading-md text-ink">
|
|
234
|
+
{billing.price}
|
|
235
|
+
</span>
|
|
236
|
+
<span className="text-caption text-muted">
|
|
237
|
+
{billing.period}
|
|
238
|
+
</span>
|
|
239
|
+
</div>
|
|
240
|
+
)}
|
|
241
|
+
|
|
242
|
+
<p
|
|
184
243
|
className={cn(
|
|
185
|
-
"
|
|
186
|
-
|
|
244
|
+
"mt-base",
|
|
245
|
+
large ? "text-body-md text-muted" : "text-body-sm text-muted",
|
|
187
246
|
)}
|
|
188
247
|
>
|
|
189
|
-
{plan.name}
|
|
190
|
-
</h3>
|
|
191
|
-
|
|
192
|
-
<div className="mt-sm flex flex-col gap-xxs">
|
|
193
|
-
<span className="text-heading-md text-ink">
|
|
194
|
-
{billing.price}
|
|
195
|
-
</span>
|
|
196
|
-
<span className="text-caption text-muted">
|
|
197
|
-
{billing.period}
|
|
198
|
-
</span>
|
|
199
|
-
</div>
|
|
200
|
-
|
|
201
|
-
<p className="mt-base text-body-sm text-muted">
|
|
202
248
|
{plan.description}
|
|
203
249
|
</p>
|
|
204
250
|
|
|
205
251
|
<div className="mt-base">
|
|
206
252
|
<Button
|
|
207
253
|
variant={featured ? "primary" : "secondary"}
|
|
208
|
-
size="sm"
|
|
254
|
+
size={large ? "md" : "sm"}
|
|
209
255
|
align="center"
|
|
256
|
+
fullWidth={large}
|
|
210
257
|
onClick={() => onPlanAction?.(plan)}
|
|
211
258
|
>
|
|
212
259
|
{plan.ctaLabel}
|
|
213
260
|
</Button>
|
|
214
261
|
</div>
|
|
215
262
|
|
|
216
|
-
<ul
|
|
263
|
+
<ul
|
|
264
|
+
className={cn(
|
|
265
|
+
"flex flex-col",
|
|
266
|
+
large ? "mt-lg gap-md" : "mt-lg gap-sm",
|
|
267
|
+
)}
|
|
268
|
+
>
|
|
217
269
|
{plan.features.map((feature) => (
|
|
218
270
|
<li
|
|
219
271
|
key={feature}
|
|
220
|
-
className=
|
|
272
|
+
className={cn(
|
|
273
|
+
"flex items-center gap-sm",
|
|
274
|
+
large ? "text-body-md text-body" : "text-body-sm text-body",
|
|
275
|
+
)}
|
|
221
276
|
>
|
|
222
277
|
<Icon
|
|
223
278
|
name="check"
|
|
@@ -3,15 +3,41 @@ import { PricingTableDesktop } from "./PricingTableDesktop";
|
|
|
3
3
|
|
|
4
4
|
export default function Preview() {
|
|
5
5
|
const [period, setPeriod] = React.useState("monthly");
|
|
6
|
+
const [largePeriod, setLargePeriod] = React.useState("monthly");
|
|
7
|
+
|
|
8
|
+
const periods = React.useMemo(
|
|
9
|
+
() => [
|
|
10
|
+
{ value: "monthly", label: "Monthly" },
|
|
11
|
+
{ value: "yearly", label: "Yearly", badge: "Save 20%" },
|
|
12
|
+
],
|
|
13
|
+
[],
|
|
14
|
+
);
|
|
6
15
|
|
|
7
16
|
return (
|
|
8
|
-
<div className="w-full
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
<div className="w-full max-w-5xl mx-auto space-y-xl">
|
|
18
|
+
<div className="rounded-xl border border-hairline overflow-hidden">
|
|
19
|
+
<PricingTableDesktop
|
|
20
|
+
eyebrow="Pricing table"
|
|
21
|
+
title="Pricing table"
|
|
22
|
+
periods={periods}
|
|
23
|
+
period={period}
|
|
24
|
+
onPeriodChange={setPeriod}
|
|
25
|
+
featuredLabel="Most popular"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="rounded-xl border border-hairline bg-surface-soft p-base">
|
|
30
|
+
<PricingTableDesktop
|
|
31
|
+
surface="transparent"
|
|
32
|
+
size="lg"
|
|
33
|
+
eyebrow="Large density"
|
|
34
|
+
title="Roomier cards for a hero section"
|
|
35
|
+
periods={periods}
|
|
36
|
+
period={largePeriod}
|
|
37
|
+
onPeriodChange={setLargePeriod}
|
|
38
|
+
featuredLabel="Best value"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
15
41
|
</div>
|
|
16
42
|
);
|
|
17
43
|
}
|
|
@@ -30,6 +30,12 @@ export interface PricingTableMobilePlan {
|
|
|
30
30
|
|
|
31
31
|
export interface PricingTableMobileProps
|
|
32
32
|
extends React.ComponentPropsWithoutRef<"section"> {
|
|
33
|
+
/**
|
|
34
|
+
* Page surface for the section. `canvas` paints the page background and owns
|
|
35
|
+
* its own padding; `transparent` drops both so the table sits inside a
|
|
36
|
+
* container the consumer already pads.
|
|
37
|
+
*/
|
|
38
|
+
surface?: "canvas" | "transparent";
|
|
33
39
|
/** Optional uppercase line above the table. */
|
|
34
40
|
eyebrow?: string;
|
|
35
41
|
/** Optional section title. */
|
|
@@ -127,6 +133,7 @@ export const PricingTableMobile = React.forwardRef<
|
|
|
127
133
|
>(
|
|
128
134
|
(
|
|
129
135
|
{
|
|
136
|
+
surface = "canvas",
|
|
130
137
|
eyebrow,
|
|
131
138
|
title,
|
|
132
139
|
plans = DEFAULT_MOBILE_PRICING_PLANS,
|
|
@@ -155,7 +162,11 @@ export const PricingTableMobile = React.forwardRef<
|
|
|
155
162
|
return (
|
|
156
163
|
<section
|
|
157
164
|
ref={ref}
|
|
158
|
-
className={cn(
|
|
165
|
+
className={cn(
|
|
166
|
+
"w-full",
|
|
167
|
+
surface === "canvas" ? "bg-canvas px-base py-lg" : "bg-transparent",
|
|
168
|
+
className,
|
|
169
|
+
)}
|
|
159
170
|
{...rest}
|
|
160
171
|
>
|
|
161
172
|
<div className="mx-auto flex w-full max-w-[24rem] flex-col gap-base">
|