asta-ui 0.3.0 → 0.4.0
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/accordion.js +1 -1
- package/dist/base/card-checkout.js +1 -1
- package/dist/base/footer-aui-025.d.ts +2 -0
- package/dist/base/footer-aui-025.js +9 -0
- package/dist/base/footer-aui-026.d.ts +2 -0
- package/dist/base/footer-aui-026.js +9 -0
- package/dist/base/footer-aui-027.d.ts +2 -0
- package/dist/base/footer-aui-027.js +9 -0
- package/dist/base/footer-aui-028.d.ts +2 -0
- package/dist/base/footer-aui-028.js +9 -0
- package/dist/base/navbar-aui-009.d.ts +2 -0
- package/dist/base/navbar-aui-009.js +9 -0
- package/dist/base/navbar-aui-010.d.ts +2 -0
- package/dist/base/navbar-aui-010.js +9 -0
- package/dist/base/navbar-aui-011.d.ts +2 -0
- package/dist/base/navbar-aui-011.js +9 -0
- package/dist/base/navbar-aui-012.d.ts +2 -0
- package/dist/base/navbar-aui-012.js +9 -0
- package/dist/base/navbar-aui-013.d.ts +2 -0
- package/dist/base/navbar-aui-013.js +9 -0
- package/dist/base/navbar-aui-014.d.ts +2 -0
- package/dist/base/navbar-aui-014.js +9 -0
- package/dist/base/now-playing.js +1 -1
- package/dist/base/payment-received.js +1 -1
- package/dist/base/pricing-aui-021.d.ts +2 -0
- package/dist/base/pricing-aui-021.js +9 -0
- package/dist/base/pricing-aui-022.d.ts +2 -0
- package/dist/base/pricing-aui-022.js +9 -0
- package/dist/base/pricing-aui-023.d.ts +2 -0
- package/dist/base/pricing-aui-023.js +9 -0
- package/dist/base/pricing-aui-024.d.ts +2 -0
- package/dist/base/pricing-aui-024.js +9 -0
- package/dist/base/sign-in-aui-015.d.ts +2 -0
- package/dist/base/sign-in-aui-015.js +9 -0
- package/dist/base/sign-in-aui-016.d.ts +2 -0
- package/dist/base/sign-in-aui-016.js +9 -0
- package/dist/base/sign-in-aui-017.d.ts +2 -0
- package/dist/base/sign-in-aui-017.js +9 -0
- package/dist/base/sign-in-aui-018.d.ts +2 -0
- package/dist/base/sign-in-aui-018.js +9 -0
- package/dist/base/sign-in-aui-019.d.ts +2 -0
- package/dist/base/sign-in-aui-019.js +9 -0
- package/dist/base/sign-in-aui-020.d.ts +2 -0
- package/dist/base/sign-in-aui-020.js +9 -0
- package/dist/base/spinner.js +1 -1
- package/dist/base.js +124 -4
- package/dist/card-checkout.js +1 -1
- package/dist/chunk-2SQQFICY.js +493 -0
- package/dist/{chunk-QJXPS55V.js → chunk-5TSQZY34.js} +1 -1
- package/dist/chunk-5U4H2CXC.js +308 -0
- package/dist/chunk-5WGDQ62P.js +122 -0
- package/dist/chunk-6B6NTRMC.js +293 -0
- package/dist/chunk-6NNHSXFD.js +539 -0
- package/dist/chunk-746WX2DF.js +480 -0
- package/dist/chunk-7GKCX4IE.js +636 -0
- package/dist/chunk-7SNVRPED.js +223 -0
- package/dist/chunk-BGVAXPHD.js +305 -0
- package/dist/chunk-F526V5BA.js +254 -0
- package/dist/chunk-LPTY5WXM.js +231 -0
- package/dist/chunk-MDI73RL6.js +245 -0
- package/dist/chunk-MUDW65ZT.js +220 -0
- package/dist/chunk-NZRQL3SA.js +201 -0
- package/dist/chunk-OFYGJUKP.js +278 -0
- package/dist/{chunk-NDBLIYMX.js → chunk-OKCSTMX3.js} +2 -2
- package/dist/chunk-P37H477M.js +236 -0
- package/dist/chunk-QSLS3ENY.js +469 -0
- package/dist/chunk-RRHQBGRO.js +327 -0
- package/dist/{chunk-2OGTIQVU.js → chunk-UEOEWP7L.js} +1 -1
- package/dist/{chunk-BP3LXM3X.js → chunk-UTGEGGSE.js} +1 -1
- package/dist/chunk-WNPMHOXE.js +136 -0
- package/dist/chunk-WTNNS7AX.js +362 -0
- package/dist/{chunk-AS6RA64I.js → chunk-XTP6ITUJ.js} +3 -1
- package/dist/footer-aui-025.d.ts +2 -0
- package/dist/footer-aui-025.js +9 -0
- package/dist/footer-aui-026.d.ts +2 -0
- package/dist/footer-aui-026.js +9 -0
- package/dist/footer-aui-027.d.ts +2 -0
- package/dist/footer-aui-027.js +9 -0
- package/dist/footer-aui-028.d.ts +2 -0
- package/dist/footer-aui-028.js +9 -0
- package/dist/index.js +125 -5
- package/dist/navbar-aui-009.d.ts +2 -0
- package/dist/navbar-aui-009.js +9 -0
- package/dist/navbar-aui-010.d.ts +2 -0
- package/dist/navbar-aui-010.js +9 -0
- package/dist/navbar-aui-011.d.ts +2 -0
- package/dist/navbar-aui-011.js +9 -0
- package/dist/navbar-aui-012.d.ts +2 -0
- package/dist/navbar-aui-012.js +9 -0
- package/dist/navbar-aui-013.d.ts +2 -0
- package/dist/navbar-aui-013.js +9 -0
- package/dist/navbar-aui-014.d.ts +2 -0
- package/dist/navbar-aui-014.js +9 -0
- package/dist/now-playing.js +1 -1
- package/dist/payment-received.js +1 -1
- package/dist/pricing-aui-021.d.ts +2 -0
- package/dist/pricing-aui-021.js +9 -0
- package/dist/pricing-aui-022.d.ts +2 -0
- package/dist/pricing-aui-022.js +9 -0
- package/dist/pricing-aui-023.d.ts +2 -0
- package/dist/pricing-aui-023.js +9 -0
- package/dist/pricing-aui-024.d.ts +2 -0
- package/dist/pricing-aui-024.js +9 -0
- package/dist/sign-in-aui-015.d.ts +2 -0
- package/dist/sign-in-aui-015.js +9 -0
- package/dist/sign-in-aui-016.d.ts +2 -0
- package/dist/sign-in-aui-016.js +9 -0
- package/dist/sign-in-aui-017.d.ts +2 -0
- package/dist/sign-in-aui-017.js +9 -0
- package/dist/sign-in-aui-018.d.ts +2 -0
- package/dist/sign-in-aui-018.js +9 -0
- package/dist/sign-in-aui-019.d.ts +2 -0
- package/dist/sign-in-aui-019.js +9 -0
- package/dist/sign-in-aui-020.d.ts +2 -0
- package/dist/sign-in-aui-020.js +9 -0
- package/dist/spinner.js +1 -1
- package/dist/types/components/kit/variants/footer-aui-025.d.ts +22 -0
- package/dist/types/components/kit/variants/footer-aui-026.d.ts +21 -0
- package/dist/types/components/kit/variants/footer-aui-027.d.ts +36 -0
- package/dist/types/components/kit/variants/footer-aui-028.d.ts +34 -0
- package/dist/types/components/kit/variants/navbar-aui-009.d.ts +62 -0
- package/dist/types/components/kit/variants/navbar-aui-010.d.ts +30 -0
- package/dist/types/components/kit/variants/navbar-aui-011.d.ts +65 -0
- package/dist/types/components/kit/variants/navbar-aui-012.d.ts +50 -0
- package/dist/types/components/kit/variants/navbar-aui-013.d.ts +70 -0
- package/dist/types/components/kit/variants/navbar-aui-014.d.ts +31 -0
- package/dist/types/components/kit/variants/pricing-aui-021.d.ts +30 -0
- package/dist/types/components/kit/variants/pricing-aui-022.d.ts +34 -0
- package/dist/types/components/kit/variants/pricing-aui-023.d.ts +26 -0
- package/dist/types/components/kit/variants/pricing-aui-024.d.ts +29 -0
- package/dist/types/components/kit/variants/sign-in-aui-015.d.ts +21 -0
- package/dist/types/components/kit/variants/sign-in-aui-016.d.ts +28 -0
- package/dist/types/components/kit/variants/sign-in-aui-017.d.ts +21 -0
- package/dist/types/components/kit/variants/sign-in-aui-018.d.ts +22 -0
- package/dist/types/components/kit/variants/sign-in-aui-019.d.ts +22 -0
- package/dist/types/components/kit/variants/sign-in-aui-020.d.ts +27 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-025.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-026.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-027.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-028.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-009.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-010.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-011.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-012.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-013.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-014.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-021.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-022.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-023.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-024.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-015.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-016.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-017.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-018.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-019.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-020.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base.d.ts +40 -0
- package/dist/types/packages/asta-ui/src/footer-aui-025.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-026.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-027.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-028.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/index.d.ts +40 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-009.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-010.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-011.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-012.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-013.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-014.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-021.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-022.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-023.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-024.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-015.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-016.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-017.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-018.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-019.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-020.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/pricing-aui-022.tsx
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
|
|
8
|
+
var CSS = `
|
|
9
|
+
@keyframes aui-splan-rise { from { opacity: 0; transform: translateY(10px) } }
|
|
10
|
+
@keyframes aui-splan-art { from { opacity: 0; transform: scale(1.06) } }
|
|
11
|
+
.aui-splan-rise { animation: aui-splan-rise .7s cubic-bezier(.16,1,.3,1) both }
|
|
12
|
+
.aui-splan-art { animation: aui-splan-art 1.4s cubic-bezier(.16,1,.3,1) both }
|
|
13
|
+
@media (prefers-reduced-motion: reduce) {
|
|
14
|
+
.aui-splan-rise, .aui-splan-art { animation: none }
|
|
15
|
+
.aui-splan-parallax, .aui-splan-digit { transition: none !important; transform: none }
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
function RollDigit({ d, delay }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("span", { className: "relative inline-block h-[1em] w-[0.6em] overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
className: cx("aui-splan-digit absolute inset-x-0 top-0 flex flex-col transition-transform duration-700", EASE),
|
|
23
|
+
style: { transform: `translateY(${-d * 10}%)`, transitionDelay: `${delay}ms` },
|
|
24
|
+
children: Array.from({ length: 10 }, (_, n) => /* @__PURE__ */ jsx("span", { className: "block h-[1em] text-center leading-[1em]", children: n }, n))
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
}
|
|
28
|
+
function Roll({ value }) {
|
|
29
|
+
const digits = String(Math.max(0, Math.round(value))).split("").map(Number);
|
|
30
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex tabular-nums", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: value }),
|
|
32
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-flex", children: digits.map((d, i) => /* @__PURE__ */ jsx(RollDigit, { d, delay: (digits.length - 1 - i) * 80 }, digits.length - i)) })
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
function SinglePlan({
|
|
36
|
+
name = "Astabyte",
|
|
37
|
+
eyebrow = "One plan, everything in it",
|
|
38
|
+
description = "Boards, docs and client portals for small studios. One price, every feature.",
|
|
39
|
+
price = { monthly: 29, yearly: 23 },
|
|
40
|
+
currency = "$",
|
|
41
|
+
saving = "\u221220%",
|
|
42
|
+
defaultYearly = false,
|
|
43
|
+
included = ["Unlimited projects and client portals", "Up to 25 members", "A year of version history", "Custom domain and branding"],
|
|
44
|
+
cta = { label: "Start a 14-day trial", href: "#" },
|
|
45
|
+
note = "No card needed. Cancel any time.",
|
|
46
|
+
image = "/lab/art/parasol.webp",
|
|
47
|
+
imageAlt = "Claude Monet, Woman with a Parasol: a woman on a grassy hill under a bright, windy sky.",
|
|
48
|
+
imageCaption = "Monet, Woman with a Parasol, 1875",
|
|
49
|
+
hint = false,
|
|
50
|
+
className
|
|
51
|
+
}) {
|
|
52
|
+
const [yearly, setYearly] = useState(defaultYearly);
|
|
53
|
+
const touched = useRef(false);
|
|
54
|
+
const art = useRef(null);
|
|
55
|
+
const opts = useRef([]);
|
|
56
|
+
const amount = yearly ? price.yearly : price.monthly;
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!hint || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
59
|
+
const t = setTimeout(() => {
|
|
60
|
+
if (!touched.current) setYearly(true);
|
|
61
|
+
}, 1800);
|
|
62
|
+
return () => clearTimeout(t);
|
|
63
|
+
}, [hint]);
|
|
64
|
+
function choose(y, focus = false) {
|
|
65
|
+
touched.current = true;
|
|
66
|
+
setYearly(y);
|
|
67
|
+
if (focus) opts.current[y ? 1 : 0]?.focus();
|
|
68
|
+
}
|
|
69
|
+
function onKey(e) {
|
|
70
|
+
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
choose(!yearly, true);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function parallax(e) {
|
|
76
|
+
const el = art.current;
|
|
77
|
+
if (!el || e.pointerType !== "mouse") return;
|
|
78
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
79
|
+
const x = (e.clientX - r.left) / r.width - 0.5;
|
|
80
|
+
const y = (e.clientY - r.top) / r.height - 0.5;
|
|
81
|
+
el.style.transform = `translate3d(${x * -14}px, ${y * -10}px, 0) scale(1.05)`;
|
|
82
|
+
}
|
|
83
|
+
const rise = (n) => ({ animationDelay: `${120 + n * 55}ms` });
|
|
84
|
+
return /* @__PURE__ */ jsxs(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
onPointerMove: parallax,
|
|
88
|
+
onPointerLeave: () => {
|
|
89
|
+
if (art.current) art.current.style.transform = "";
|
|
90
|
+
},
|
|
91
|
+
className: cx(
|
|
92
|
+
"@container w-full max-w-[760px] rounded-[16px] bg-paper p-2 text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_1px_2px_rgb(0_0_0/0.05),0_30px_60px_-28px_rgb(0_0_0/0.45)]",
|
|
93
|
+
className
|
|
94
|
+
),
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-2 @min-[620px]:grid-cols-[minmax(0,0.9fr)_minmax(0,1fr)]", children: [
|
|
97
|
+
/* @__PURE__ */ jsxs("div", { className: "relative h-[220px] overflow-hidden rounded-[11px] @min-[620px]:h-auto", children: [
|
|
98
|
+
/* @__PURE__ */ jsx("div", { ref: art, className: cx("aui-splan-parallax absolute -inset-3 transition-transform duration-[900ms]", EASE), children: /* @__PURE__ */ jsx("img", { src: image, alt: imageAlt, loading: "lazy", decoding: "async", className: "aui-splan-art h-full w-full object-cover object-[50%_30%]" }) }),
|
|
99
|
+
imageCaption && /* @__PURE__ */ jsx("span", { className: "aui-splan-rise absolute bottom-3 left-3 rounded-[6px] bg-paper/85 px-2 py-1 text-[11px] text-ink-2 backdrop-blur-sm", style: rise(10), children: imageCaption })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col px-4 pb-4 pt-5 @min-[620px]:px-6 @min-[620px]:pb-6 @min-[620px]:pt-7", children: [
|
|
102
|
+
/* @__PURE__ */ jsx("p", { className: "aui-splan-rise text-[13px] text-mute", style: rise(0), children: eyebrow }),
|
|
103
|
+
/* @__PURE__ */ jsx("h3", { className: "aui-splan-rise mt-2 font-serif text-[44px] font-normal leading-[1.02] tracking-[-0.02em] @min-[620px]:text-[50px]", style: rise(1), children: name }),
|
|
104
|
+
/* @__PURE__ */ jsx("p", { className: "aui-splan-rise mt-3 max-w-[34ch] text-[14px] leading-relaxed text-mute", style: rise(2), children: description }),
|
|
105
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-splan-rise mt-6 flex flex-wrap items-end justify-between gap-x-4 gap-y-3", style: rise(3), children: [
|
|
106
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-end gap-2", children: [
|
|
108
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-start font-medium leading-none tracking-[-0.045em]", children: [
|
|
109
|
+
/* @__PURE__ */ jsx("span", { className: "mr-0.5 mt-1 text-[18px]", children: currency }),
|
|
110
|
+
/* @__PURE__ */ jsx("span", { className: "text-[48px]", children: /* @__PURE__ */ jsx(Roll, { value: amount }) })
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ jsxs("span", { className: "relative pb-1.5 text-[13px] text-mute", children: [
|
|
113
|
+
/* @__PURE__ */ jsxs(
|
|
114
|
+
"span",
|
|
115
|
+
{
|
|
116
|
+
"aria-hidden": !yearly,
|
|
117
|
+
className: cx("absolute bottom-[26px] left-0 whitespace-nowrap text-[12px] line-through decoration-ink/40 transition-[opacity,transform] duration-500", EASE, yearly ? "translate-y-0 opacity-100" : "translate-y-1.5 opacity-0"),
|
|
118
|
+
children: [
|
|
119
|
+
currency,
|
|
120
|
+
price.monthly
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
"/ month"
|
|
125
|
+
] })
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1.5 h-4 text-[12px] text-mute", "aria-live": "polite", children: /* @__PURE__ */ jsx("span", { className: "aui-splan-rise inline-block", children: yearly ? `${currency}${price.yearly * 12} billed once a year` : "Billed monthly" }, String(yearly)) })
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ jsxs("div", { role: "radiogroup", "aria-label": "Billing period", className: "relative grid grid-cols-2 rounded-[10px] bg-paper-2 p-1", children: [
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
"span",
|
|
132
|
+
{
|
|
133
|
+
"aria-hidden": true,
|
|
134
|
+
className: cx(
|
|
135
|
+
"absolute bottom-1 left-1 top-1 w-[calc(50%-4px)] rounded-[7px] bg-paper shadow-[0_1px_2px_rgb(0_0_0/0.1),0_0_0_1px_color-mix(in_srgb,var(--ink)_7%,transparent)] transition-transform duration-500",
|
|
136
|
+
EASE,
|
|
137
|
+
yearly ? "translate-x-full" : "translate-x-0"
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
["Monthly", "Yearly"].map((label, i) => {
|
|
142
|
+
const on = yearly === (i === 1);
|
|
143
|
+
return /* @__PURE__ */ jsxs(
|
|
144
|
+
"button",
|
|
145
|
+
{
|
|
146
|
+
ref: (el) => {
|
|
147
|
+
opts.current[i] = el;
|
|
148
|
+
},
|
|
149
|
+
type: "button",
|
|
150
|
+
role: "radio",
|
|
151
|
+
"aria-checked": on,
|
|
152
|
+
tabIndex: on ? 0 : -1,
|
|
153
|
+
onClick: () => choose(i === 1),
|
|
154
|
+
onKeyDown: onKey,
|
|
155
|
+
className: cx(
|
|
156
|
+
"relative z-10 flex h-8 items-center justify-center gap-1.5 rounded-[7px] px-3.5 text-[13px] font-medium outline-none transition-colors duration-300 focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
157
|
+
on ? "text-ink" : "text-mute hover:text-ink"
|
|
158
|
+
),
|
|
159
|
+
children: [
|
|
160
|
+
label,
|
|
161
|
+
i === 1 && saving && /* @__PURE__ */ jsx("span", { className: "rounded-[4px] bg-brand/10 px-1 text-[10.5px] leading-[16px] text-brand", children: saving })
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
label
|
|
165
|
+
);
|
|
166
|
+
})
|
|
167
|
+
] })
|
|
168
|
+
] }),
|
|
169
|
+
/* @__PURE__ */ jsxs(
|
|
170
|
+
"a",
|
|
171
|
+
{
|
|
172
|
+
href: cta.href,
|
|
173
|
+
className: cx(
|
|
174
|
+
"aui-splan-rise group mt-6 flex h-11 w-full items-center justify-center gap-2 rounded-[9px] bg-brand text-[14px] font-medium text-white shadow-[0_10px_24px_-12px_var(--brand)] outline-none transition-[transform,box-shadow] duration-300 hover:-translate-y-px hover:shadow-[0_14px_28px_-12px_var(--brand)] active:translate-y-0 active:scale-[.985] focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
|
|
175
|
+
EASE
|
|
176
|
+
),
|
|
177
|
+
style: rise(4),
|
|
178
|
+
children: [
|
|
179
|
+
cta.label,
|
|
180
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-4 w-4 transition-transform duration-300 group-hover:translate-x-0.5", EASE), fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 8h10M9 4l4 4-4 4" }) })
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
note && /* @__PURE__ */ jsx("p", { className: "aui-splan-rise mt-2.5 text-center text-[12px] text-mute", style: rise(5), children: note }),
|
|
185
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-6 grid gap-2.5", children: included.map((f, i) => /* @__PURE__ */ jsxs("li", { className: "aui-splan-rise flex items-start gap-2.5 text-[13.5px] leading-snug text-ink-2", style: rise(6 + i), children: [
|
|
186
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "mt-[2px] h-3.5 w-3.5 shrink-0 text-brand", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7" }) }),
|
|
187
|
+
f
|
|
188
|
+
] }, f)) })
|
|
189
|
+
] })
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ jsx("style", { href: "asta-pricing-aui-022", precedence: "asta", children: CSS })
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
var pricing_aui_022_default = SinglePlan;
|
|
197
|
+
|
|
198
|
+
export {
|
|
199
|
+
SinglePlan,
|
|
200
|
+
pricing_aui_022_default
|
|
201
|
+
};
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/pricing-aui-023.tsx
|
|
4
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var TIERS = [
|
|
8
|
+
{ label: "Starter", upTo: 10, unitPrice: 12 },
|
|
9
|
+
{ label: "Team", upTo: 50, unitPrice: 10 },
|
|
10
|
+
{ label: "Scale", upTo: 150, unitPrice: 8 },
|
|
11
|
+
{ label: "Volume", upTo: Infinity, unitPrice: 6 }
|
|
12
|
+
];
|
|
13
|
+
var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
|
|
14
|
+
var THUMB = 20;
|
|
15
|
+
var BARS = 44;
|
|
16
|
+
var CSS = `
|
|
17
|
+
@keyframes aui-usage-rise { from { opacity: 0; transform: translateY(10px) } }
|
|
18
|
+
@keyframes aui-usage-bar { from { transform: scaleY(0) } }
|
|
19
|
+
.aui-usage-rise { animation: aui-usage-rise .65s cubic-bezier(.16,1,.3,1) both }
|
|
20
|
+
.aui-usage-bar { animation: aui-usage-bar .8s cubic-bezier(.16,1,.3,1) both; transform-origin: bottom }
|
|
21
|
+
.aui-usage-range { -webkit-appearance: none; appearance: none; background: transparent }
|
|
22
|
+
.aui-usage-range::-webkit-slider-runnable-track { height: ${THUMB}px; background: transparent }
|
|
23
|
+
.aui-usage-range::-moz-range-track { height: ${THUMB}px; background: transparent }
|
|
24
|
+
.aui-usage-range::-webkit-slider-thumb {
|
|
25
|
+
-webkit-appearance: none; appearance: none; width: ${THUMB}px; height: ${THUMB}px; border-radius: 999px; cursor: grab;
|
|
26
|
+
background: var(--paper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent), 0 4px 12px rgb(0 0 0 / .4);
|
|
27
|
+
transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s cubic-bezier(.16,1,.3,1);
|
|
28
|
+
}
|
|
29
|
+
.aui-usage-range::-moz-range-thumb {
|
|
30
|
+
width: ${THUMB}px; height: ${THUMB}px; border: 0; border-radius: 999px; cursor: grab;
|
|
31
|
+
background: var(--paper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent), 0 4px 12px rgb(0 0 0 / .4);
|
|
32
|
+
transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s cubic-bezier(.16,1,.3,1);
|
|
33
|
+
}
|
|
34
|
+
.aui-usage-range:hover::-webkit-slider-thumb { transform: scale(1.08) }
|
|
35
|
+
.aui-usage-range:hover::-moz-range-thumb { transform: scale(1.08) }
|
|
36
|
+
.aui-usage-range:active::-webkit-slider-thumb { transform: scale(1.15); cursor: grabbing }
|
|
37
|
+
.aui-usage-range:active::-moz-range-thumb { transform: scale(1.15); cursor: grabbing }
|
|
38
|
+
.aui-usage-range:focus-visible { outline: none }
|
|
39
|
+
.aui-usage-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--brand), 0 0 0 9px color-mix(in srgb, var(--brand) 25%, transparent) }
|
|
40
|
+
.aui-usage-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--brand), 0 0 0 9px color-mix(in srgb, var(--brand) 25%, transparent) }
|
|
41
|
+
@media (prefers-reduced-motion: reduce) {
|
|
42
|
+
.aui-usage-rise, .aui-usage-bar { animation: none }
|
|
43
|
+
.aui-usage-range::-webkit-slider-thumb { transition: none }
|
|
44
|
+
.aui-usage-range::-moz-range-thumb { transition: none }
|
|
45
|
+
.aui-usage-move { transition: none !important }
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
function RollChar({ c, delay }) {
|
|
49
|
+
if (!/\d/.test(c)) return /* @__PURE__ */ jsx("span", { className: "inline-block", children: c });
|
|
50
|
+
const d = Number(c);
|
|
51
|
+
return /* @__PURE__ */ jsx("span", { className: "relative inline-block h-[1em] w-[0.6em] overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
className: cx("aui-usage-move absolute inset-x-0 top-0 flex flex-col transition-transform duration-500", EASE),
|
|
55
|
+
style: { transform: `translateY(${-d * 10}%)`, transitionDelay: `${delay}ms` },
|
|
56
|
+
children: Array.from({ length: 10 }, (_, n) => /* @__PURE__ */ jsx("span", { className: "block h-[1em] text-center leading-[1em]", children: n }, n))
|
|
57
|
+
}
|
|
58
|
+
) });
|
|
59
|
+
}
|
|
60
|
+
function Roll({ text }) {
|
|
61
|
+
const chars = text.split("");
|
|
62
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-flex tabular-nums", children: chars.map((c, i) => /* @__PURE__ */ jsx(RollChar, { c, delay: (chars.length - 1 - i) * 30 }, chars.length - i)) });
|
|
63
|
+
}
|
|
64
|
+
function UsagePricing({
|
|
65
|
+
tiers = TIERS,
|
|
66
|
+
unit = "seat",
|
|
67
|
+
min = 1,
|
|
68
|
+
max = 200,
|
|
69
|
+
step = 1,
|
|
70
|
+
defaultValue = 36,
|
|
71
|
+
currency = "$",
|
|
72
|
+
onChange,
|
|
73
|
+
cta,
|
|
74
|
+
intro = false,
|
|
75
|
+
className
|
|
76
|
+
}) {
|
|
77
|
+
const id = useId();
|
|
78
|
+
const clamp = (n) => Math.min(max, Math.max(min, n));
|
|
79
|
+
const target = clamp(defaultValue);
|
|
80
|
+
const [value, setValue] = useState(intro ? min : target);
|
|
81
|
+
const touched = useRef(false);
|
|
82
|
+
const tierFor = (n) => Math.max(0, tiers.findIndex((t) => n <= t.upTo));
|
|
83
|
+
const totalFor = (n) => Math.round(n * (tiers[tierFor(n)]?.unitPrice ?? 0));
|
|
84
|
+
const tierIndex = tierFor(value);
|
|
85
|
+
const tier = tiers[tierIndex];
|
|
86
|
+
const total = totalFor(value);
|
|
87
|
+
const fmt = (n) => n.toLocaleString("en-US");
|
|
88
|
+
const pct = (n) => (n - min) / (max - min || 1);
|
|
89
|
+
const plural = (n) => n === 1 ? unit : `${unit}s`;
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (!intro) return;
|
|
92
|
+
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
93
|
+
let raf = 0;
|
|
94
|
+
let start = 0;
|
|
95
|
+
const tick = (t) => {
|
|
96
|
+
if (touched.current) return;
|
|
97
|
+
if (!start) start = t + 500;
|
|
98
|
+
const k = reduce ? 1 : Math.min(1, Math.max(0, (t - start) / 1400));
|
|
99
|
+
const e = 1 - Math.pow(1 - k, 4);
|
|
100
|
+
setValue(Math.round(min + (target - min) * e));
|
|
101
|
+
if (k < 1) raf = requestAnimationFrame(tick);
|
|
102
|
+
};
|
|
103
|
+
raf = requestAnimationFrame(tick);
|
|
104
|
+
return () => cancelAnimationFrame(raf);
|
|
105
|
+
}, [intro, min, target]);
|
|
106
|
+
function set(n) {
|
|
107
|
+
touched.current = true;
|
|
108
|
+
const next = clamp(n);
|
|
109
|
+
setValue(next);
|
|
110
|
+
onChange?.(next, totalFor(next));
|
|
111
|
+
}
|
|
112
|
+
const breaks = tiers.filter((t) => Number.isFinite(t.upTo) && t.upTo > min && t.upTo < max);
|
|
113
|
+
const bars = Array.from({ length: BARS }, (_, i) => {
|
|
114
|
+
const v = min + (i + 0.5) / BARS * (max - min);
|
|
115
|
+
return { v, h: totalFor(v) };
|
|
116
|
+
});
|
|
117
|
+
const peak = Math.max(1, ...bars.map((b) => b.h));
|
|
118
|
+
const rise = (n) => ({ animationDelay: `${80 + n * 55}ms` });
|
|
119
|
+
const action = cta ?? { label: `Start with ${tier?.label ?? "this plan"}`, href: "#" };
|
|
120
|
+
return /* @__PURE__ */ jsxs(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
className: cx(
|
|
124
|
+
"relative w-full max-w-[460px] overflow-hidden rounded-[14px] bg-ink p-6 text-paper shadow-[0_1px_2px_rgb(0_0_0/0.1),0_30px_60px_-28px_rgb(0_0_0/0.6)] sm:p-7",
|
|
125
|
+
className
|
|
126
|
+
),
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ jsx(
|
|
129
|
+
"span",
|
|
130
|
+
{
|
|
131
|
+
"aria-hidden": true,
|
|
132
|
+
className: "pointer-events-none absolute -right-24 -top-24 h-72 w-72 rounded-full",
|
|
133
|
+
style: { background: "radial-gradient(closest-side, color-mix(in srgb, var(--brand) 32%, transparent), transparent)" }
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-usage-rise relative flex items-center justify-between gap-3", style: rise(0), children: [
|
|
137
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[11px] uppercase tracking-[0.08em] text-paper/50", children: "Estimate \xB7 monthly" }),
|
|
138
|
+
/* @__PURE__ */ jsxs("span", { className: "flex h-6 items-center gap-1.5 rounded-[6px] bg-paper/[0.08] px-2 text-[12px] text-paper/80", children: [
|
|
139
|
+
/* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-brand", "aria-hidden": true }),
|
|
140
|
+
/* @__PURE__ */ jsx("span", { className: "aui-usage-rise inline-block", children: tier?.label }, tier?.label)
|
|
141
|
+
] })
|
|
142
|
+
] }),
|
|
143
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-usage-rise relative mt-4", style: rise(1), children: [
|
|
144
|
+
/* @__PURE__ */ jsxs("p", { className: "flex items-start font-medium leading-none tracking-[-0.045em]", children: [
|
|
145
|
+
/* @__PURE__ */ jsx("span", { className: "mr-1 mt-1.5 text-[20px] text-paper/70", children: currency }),
|
|
146
|
+
/* @__PURE__ */ jsx("span", { className: "text-[56px]", children: /* @__PURE__ */ jsx(Roll, { text: fmt(total) }) }),
|
|
147
|
+
/* @__PURE__ */ jsx("span", { className: "ml-2 self-end pb-2 text-[13px] font-normal tracking-normal text-paper/50", children: "/ month" })
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-2 text-[13px] text-paper/55", children: [
|
|
150
|
+
fmt(value),
|
|
151
|
+
" ",
|
|
152
|
+
plural(value),
|
|
153
|
+
" \xD7 ",
|
|
154
|
+
currency,
|
|
155
|
+
tier?.unitPrice,
|
|
156
|
+
" per ",
|
|
157
|
+
unit
|
|
158
|
+
] })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-usage-rise relative mt-8", style: rise(2), children: [
|
|
161
|
+
/* @__PURE__ */ jsxs("div", { className: "relative h-[92px]", style: { marginLeft: THUMB / 2, marginRight: THUMB / 2 }, children: [
|
|
162
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "absolute inset-x-0 top-0 h-0", children: /* @__PURE__ */ jsx("div", { className: cx("aui-usage-move w-full transition-transform duration-150", EASE), style: { transform: `translateX(${pct(value) * 100}%)` }, children: /* @__PURE__ */ jsxs("span", { className: "absolute left-0 top-0 -translate-x-1/2 whitespace-nowrap rounded-[6px] bg-paper px-2 py-1 text-[12px] font-medium text-ink shadow-[0_6px_16px_-6px_rgb(0_0_0/0.5)]", children: [
|
|
163
|
+
fmt(value),
|
|
164
|
+
" ",
|
|
165
|
+
plural(value),
|
|
166
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-full h-1.5 w-1.5 -translate-x-1/2 -translate-y-1 rotate-45 bg-paper" })
|
|
167
|
+
] }) }) }),
|
|
168
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "absolute inset-x-0 bottom-0 flex h-[56px] items-end gap-[3px]", children: bars.map((b, i) => /* @__PURE__ */ jsx("span", { className: "flex h-full flex-1 items-end", children: /* @__PURE__ */ jsx(
|
|
169
|
+
"span",
|
|
170
|
+
{
|
|
171
|
+
className: cx("aui-usage-bar block w-full rounded-t-[2px] transition-colors duration-200", b.v <= value ? "bg-brand" : "bg-paper/[0.12]"),
|
|
172
|
+
style: { height: `${Math.max(8, b.h / peak * 100)}%`, animationDelay: `${240 + i * 14}ms` }
|
|
173
|
+
}
|
|
174
|
+
) }, i)) })
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ jsxs("div", { className: "relative mt-2", style: { height: THUMB }, children: [
|
|
177
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute inset-y-0", style: { left: THUMB / 2, right: THUMB / 2 }, children: [
|
|
178
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 overflow-hidden rounded-full bg-paper/[0.12]", children: /* @__PURE__ */ jsx("div", { className: cx("aui-usage-move h-full w-full origin-left bg-brand transition-transform duration-150", EASE), style: { transform: `scaleX(${pct(value)})` } }) }),
|
|
179
|
+
breaks.map((t) => /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cx("absolute top-1/2 h-2.5 w-0.5 -translate-x-1/2 -translate-y-1/2 rounded-full", value > t.upTo ? "bg-paper/80" : "bg-paper/25"), style: { left: `${pct(t.upTo) * 100}%` } }, t.upTo))
|
|
180
|
+
] }),
|
|
181
|
+
/* @__PURE__ */ jsxs("label", { htmlFor: id, className: "sr-only", children: [
|
|
182
|
+
"Number of ",
|
|
183
|
+
unit,
|
|
184
|
+
"s"
|
|
185
|
+
] }),
|
|
186
|
+
/* @__PURE__ */ jsx(
|
|
187
|
+
"input",
|
|
188
|
+
{
|
|
189
|
+
id,
|
|
190
|
+
type: "range",
|
|
191
|
+
min,
|
|
192
|
+
max,
|
|
193
|
+
step,
|
|
194
|
+
value,
|
|
195
|
+
onPointerDown: () => touched.current = true,
|
|
196
|
+
onKeyDown: () => touched.current = true,
|
|
197
|
+
onChange: (e) => set(Number(e.target.value)),
|
|
198
|
+
"aria-valuetext": `${fmt(value)} ${plural(value)}, ${currency}${fmt(total)} per month, ${tier?.label} tier`,
|
|
199
|
+
className: "aui-usage-range absolute inset-0 m-0 h-full w-full cursor-pointer"
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
] }),
|
|
203
|
+
/* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: "relative mt-2 h-4 font-mono text-[11px] tabular-nums text-paper/40", style: { marginLeft: THUMB / 2, marginRight: THUMB / 2 }, children: [
|
|
204
|
+
!breaks.some((t) => pct(t.upTo) < 0.08) && /* @__PURE__ */ jsx("span", { className: "absolute left-0 -translate-x-1/2", children: min }),
|
|
205
|
+
breaks.map((t) => /* @__PURE__ */ jsx("span", { className: "absolute -translate-x-1/2", style: { left: `${pct(t.upTo) * 100}%` }, children: t.upTo }, t.upTo)),
|
|
206
|
+
!breaks.some((t) => pct(t.upTo) > 0.92) && /* @__PURE__ */ jsx("span", { className: "absolute right-0 translate-x-1/2", children: max })
|
|
207
|
+
] })
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-usage-rise relative mt-6 grid rounded-[10px] bg-paper/[0.05] p-1", style: { ...rise(3), gridTemplateColumns: `repeat(${tiers.length}, minmax(0, 1fr))` }, role: "group", "aria-label": "Tiers", children: [
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
"span",
|
|
212
|
+
{
|
|
213
|
+
"aria-hidden": true,
|
|
214
|
+
className: cx("aui-usage-move absolute bottom-1 left-1 top-1 rounded-[7px] bg-paper/[0.1] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--brand)_70%,transparent)] transition-transform duration-500", EASE),
|
|
215
|
+
style: { width: `calc((100% - 8px) / ${tiers.length})`, transform: `translateX(${tierIndex * 100}%)` }
|
|
216
|
+
}
|
|
217
|
+
),
|
|
218
|
+
tiers.map((t, i) => {
|
|
219
|
+
const on = i === tierIndex;
|
|
220
|
+
const from = i === 0 ? min : Math.min(max, (tiers[i - 1]?.upTo ?? min) + 1);
|
|
221
|
+
return /* @__PURE__ */ jsxs(
|
|
222
|
+
"button",
|
|
223
|
+
{
|
|
224
|
+
type: "button",
|
|
225
|
+
"aria-current": on ? "true" : void 0,
|
|
226
|
+
"aria-label": `${t.label}: ${currency}${t.unitPrice} per ${unit}, from ${from}`,
|
|
227
|
+
onClick: () => set(from),
|
|
228
|
+
className: cx(
|
|
229
|
+
"relative z-10 flex flex-col items-start rounded-[7px] px-2.5 py-2 text-left outline-none transition-[color,transform] duration-300 active:scale-[.97] focus-visible:ring-2 focus-visible:ring-brand/60",
|
|
230
|
+
EASE,
|
|
231
|
+
on ? "text-paper" : "text-paper/50 hover:text-paper/80"
|
|
232
|
+
),
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ jsx("span", { className: "text-[13px] font-medium", children: t.label }),
|
|
235
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[11.5px] tabular-nums opacity-70", children: [
|
|
236
|
+
currency,
|
|
237
|
+
t.unitPrice,
|
|
238
|
+
"/",
|
|
239
|
+
unit
|
|
240
|
+
] })
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
t.label
|
|
244
|
+
);
|
|
245
|
+
})
|
|
246
|
+
] }),
|
|
247
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-usage-rise relative mt-6 flex items-center justify-between gap-3", style: rise(4), children: [
|
|
248
|
+
/* @__PURE__ */ jsxs("p", { className: "text-[12.5px] leading-snug text-paper/50", children: [
|
|
249
|
+
"Prorated daily. Change ",
|
|
250
|
+
unit,
|
|
251
|
+
"s any time."
|
|
252
|
+
] }),
|
|
253
|
+
/* @__PURE__ */ jsxs(
|
|
254
|
+
"a",
|
|
255
|
+
{
|
|
256
|
+
href: action.href,
|
|
257
|
+
className: cx(
|
|
258
|
+
"group inline-flex h-10 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-brand px-4 text-[13.5px] font-medium text-white shadow-[0_10px_24px_-12px_var(--brand)] outline-none transition-transform duration-300 hover:-translate-y-px active:translate-y-0 active:scale-[.97] focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-ink",
|
|
259
|
+
EASE
|
|
260
|
+
),
|
|
261
|
+
children: [
|
|
262
|
+
action.label,
|
|
263
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-3.5 w-3.5 transition-transform duration-300 group-hover:translate-x-0.5", EASE), fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 8h10M9 4l4 4-4 4" }) })
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ jsx("style", { href: "asta-pricing-aui-023", precedence: "asta", children: CSS })
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
var pricing_aui_023_default = UsagePricing;
|
|
274
|
+
|
|
275
|
+
export {
|
|
276
|
+
UsagePricing,
|
|
277
|
+
pricing_aui_023_default
|
|
278
|
+
};
|
|
@@ -7,7 +7,7 @@ var KEYFRAMES = `
|
|
|
7
7
|
@keyframes kit-spin { to { transform: rotate(360deg) } }
|
|
8
8
|
@keyframes kit-dot { 0%, 80%, 100% { transform: scale(.55); opacity: .35 } 40% { transform: scale(1); opacity: 1 } }
|
|
9
9
|
@keyframes kit-bar { 0%, 100% { transform: scaleY(.35) } 50% { transform: scaleY(1) } }
|
|
10
|
-
@keyframes kit-indet { 0% {
|
|
10
|
+
@keyframes kit-indet { 0% { transform: translateX(-100%) scaleX(.8) } 60% { transform: translateX(110%) scaleX(1.2) } 100% { transform: translateX(250%) scaleX(.8) } }
|
|
11
11
|
@media (prefers-reduced-motion: reduce) { .kit-spinner * { animation-duration: 2.4s !important } }
|
|
12
12
|
`;
|
|
13
13
|
function Spinner({ variant = "ring", label = "Loading", className }) {
|
|
@@ -47,7 +47,7 @@ function Progress({ value, label, showValue, className }) {
|
|
|
47
47
|
className: "kit-spinner relative h-1.5 w-full overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_9%,transparent)]",
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ jsx("style", { href: "asta-spinner-2", precedence: "asta", children: KEYFRAMES }),
|
|
50
|
-
v === void 0 ? /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 rounded-full bg-brand", style: { animation: "kit-indet 1.3s cubic-bezier(.65,0,.35,1) infinite" } }) : /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-0 rounded-full bg-brand transition-[width] duration-700 ease-[cubic-bezier(.16,1,.3,1)]", style: { width: `${v}%` } })
|
|
50
|
+
v === void 0 ? /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-0 w-[40%] rounded-full bg-brand", style: { animation: "kit-indet 1.3s cubic-bezier(.65,0,.35,1) infinite" } }) : /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-0 rounded-full bg-brand transition-[width] duration-700 ease-[cubic-bezier(.16,1,.3,1)]", style: { width: `${v}%` } })
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
)
|