@windrun-huaiin/third-ui 5.12.2 → 5.12.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/main/index.js +27 -46
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +27 -46
- package/dist/main/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/main/price-plan.tsx +45 -65
package/dist/main/index.js
CHANGED
|
@@ -3643,77 +3643,58 @@ function PricePlan({ currency = "$", pricePlanConfig, sectionClassName }) {
|
|
|
3643
3643
|
top: Math.max(8, y),
|
|
3644
3644
|
zIndex: 9999,
|
|
3645
3645
|
maxWidth: 200,
|
|
3646
|
-
|
|
3647
|
-
color: "#fff",
|
|
3648
|
-
borderRadius: 10,
|
|
3649
|
-
padding: "16px",
|
|
3650
|
-
boxShadow: "0 4px 24px 0 rgba(0,0,0,0.25)",
|
|
3651
|
-
fontSize: 15,
|
|
3652
|
-
lineHeight: 1.6,
|
|
3646
|
+
transform: "translateY(-50%)",
|
|
3653
3647
|
pointerEvents: "none",
|
|
3654
|
-
whiteSpace: "pre-line"
|
|
3655
|
-
transform: "translateY(-50%)"
|
|
3648
|
+
whiteSpace: "pre-line"
|
|
3656
3649
|
};
|
|
3657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3651
|
+
"div",
|
|
3652
|
+
{
|
|
3653
|
+
style,
|
|
3654
|
+
className: "bg-gray-700 dark:bg-gray-200 text-gray-100 dark:text-gray-800 text-xs leading-relaxed px-3 py-2 rounded-lg shadow-lg border border-gray-300 dark:border-gray-600 backdrop-blur-sm",
|
|
3655
|
+
children: content
|
|
3656
|
+
}
|
|
3657
|
+
);
|
|
3658
3658
|
};
|
|
3659
3659
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { id: "pricing", className: cn("px-4 py-10 md:px-16 md:py-16 mx-auto max-w-7xl scroll-mt-10", sectionClassName), children: [
|
|
3660
3660
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-3", children: t("title") }),
|
|
3661
3661
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-8 text-base md:text-lg mx-auto", children: t("subtitle") }),
|
|
3662
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex
|
|
3663
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex
|
|
3662
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
3663
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center relative mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-full p-1", children: [
|
|
3664
3664
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3665
3665
|
"button",
|
|
3666
3666
|
{
|
|
3667
3667
|
className: cn(
|
|
3668
|
-
"min-w-[120px] px-6 py-2
|
|
3669
|
-
billingKey === "monthly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600
|
|
3670
|
-
"mr-4"
|
|
3668
|
+
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3669
|
+
billingKey === "monthly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm" : "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3671
3670
|
),
|
|
3672
3671
|
onClick: () => setBillingKey("monthly"),
|
|
3673
3672
|
type: "button",
|
|
3674
3673
|
children: ((_a = billingSwitch.options.find((opt) => opt.key === "monthly")) == null ? void 0 : _a.name) || "Monthly"
|
|
3675
3674
|
}
|
|
3676
3675
|
),
|
|
3677
|
-
(() => {
|
|
3678
|
-
const opt = billingSwitch.options.find((opt2) => opt2.key === "monthly");
|
|
3679
|
-
const bOpt = billingOptions.find((opt2) => opt2.key === "monthly");
|
|
3680
|
-
if (!(opt && bOpt && opt.discountText && bOpt.discount !== 0)) return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-[80px] px-2 py-1 text-xs rounded invisible" });
|
|
3681
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: cn(
|
|
3682
|
-
"min-w-[80px] px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap",
|
|
3683
|
-
billingKey !== "monthly" && "invisible"
|
|
3684
|
-
), children: opt.discountText.replace(
|
|
3685
|
-
"{percent}",
|
|
3686
|
-
String(Math.round(Math.abs(bOpt.discount) * 100))
|
|
3687
|
-
) });
|
|
3688
|
-
})()
|
|
3689
|
-
] }),
|
|
3690
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2 w-[180px] justify-start", children: [
|
|
3691
3676
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3692
3677
|
"button",
|
|
3693
3678
|
{
|
|
3694
3679
|
className: cn(
|
|
3695
|
-
"min-w-[120px] px-6 py-2
|
|
3696
|
-
billingKey === "yearly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600
|
|
3697
|
-
"ml-4"
|
|
3680
|
+
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3681
|
+
billingKey === "yearly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm" : "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3698
3682
|
),
|
|
3699
3683
|
onClick: () => setBillingKey("yearly"),
|
|
3700
3684
|
type: "button",
|
|
3701
3685
|
children: ((_b = billingSwitch.options.find((opt) => opt.key === "yearly")) == null ? void 0 : _b.name) || "Yearly"
|
|
3702
3686
|
}
|
|
3703
|
-
)
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
)
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
) });
|
|
3715
|
-
})()
|
|
3716
|
-
] })
|
|
3687
|
+
)
|
|
3688
|
+
] }) }),
|
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-8 flex items-center justify-center mb-3", children: (() => {
|
|
3690
|
+
const opt = billingSwitch.options.find((opt2) => opt2.key === billingKey);
|
|
3691
|
+
const bOpt = billingOptions.find((opt2) => opt2.key === billingKey);
|
|
3692
|
+
if (!(opt && bOpt && opt.discountText && bOpt.discount !== 0)) return null;
|
|
3693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap", children: opt.discountText.replace(
|
|
3694
|
+
"{percent}",
|
|
3695
|
+
String(Math.round(Math.abs(bOpt.discount) * 100))
|
|
3696
|
+
) });
|
|
3697
|
+
})() })
|
|
3717
3698
|
] }),
|
|
3718
3699
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: plans.map((plan, _idx) => {
|
|
3719
3700
|
var _a2, _b2, _c;
|