@cargo-ai/ui 0.0.0-stage → 1.0.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/README.md +111 -2
- package/build/blocks/Banner/Banner.d.ts +19 -0
- package/build/blocks/Banner/Banner.d.ts.map +1 -0
- package/build/blocks/Banner/Banner.js +7 -0
- package/build/blocks/BeforeAfter/BeforeAfter.d.ts +21 -0
- package/build/blocks/BeforeAfter/BeforeAfter.d.ts.map +1 -0
- package/build/blocks/BeforeAfter/BeforeAfter.js +13 -0
- package/build/blocks/CardGrid/CardGrid.d.ts +19 -0
- package/build/blocks/CardGrid/CardGrid.d.ts.map +1 -0
- package/build/blocks/CardGrid/CardGrid.js +17 -0
- package/build/blocks/CtaBand/CtaBand.d.ts +18 -0
- package/build/blocks/CtaBand/CtaBand.d.ts.map +1 -0
- package/build/blocks/CtaBand/CtaBand.js +13 -0
- package/build/blocks/Faq/Faq.d.ts +25 -0
- package/build/blocks/Faq/Faq.d.ts.map +1 -0
- package/build/blocks/Faq/Faq.js +20 -0
- package/build/blocks/FeatureGrid/FeatureGrid.d.ts +23 -0
- package/build/blocks/FeatureGrid/FeatureGrid.d.ts.map +1 -0
- package/build/blocks/FeatureGrid/FeatureGrid.js +12 -0
- package/build/blocks/FeatureRows/FeatureRows.d.ts +22 -0
- package/build/blocks/FeatureRows/FeatureRows.d.ts.map +1 -0
- package/build/blocks/FeatureRows/FeatureRows.js +14 -0
- package/build/blocks/HeroCentered/HeroCentered.d.ts +27 -0
- package/build/blocks/HeroCentered/HeroCentered.d.ts.map +1 -0
- package/build/blocks/HeroCentered/HeroCentered.js +13 -0
- package/build/blocks/HeroSplit/HeroSplit.d.ts +28 -0
- package/build/blocks/HeroSplit/HeroSplit.d.ts.map +1 -0
- package/build/blocks/HeroSplit/HeroSplit.js +18 -0
- package/build/blocks/LogoCloud/LogoCloud.d.ts +17 -0
- package/build/blocks/LogoCloud/LogoCloud.d.ts.map +1 -0
- package/build/blocks/LogoCloud/LogoCloud.js +8 -0
- package/build/blocks/Pricing/Pricing.d.ts +33 -0
- package/build/blocks/Pricing/Pricing.d.ts.map +1 -0
- package/build/blocks/Pricing/Pricing.js +33 -0
- package/build/blocks/Showcase/Showcase.d.ts +27 -0
- package/build/blocks/Showcase/Showcase.d.ts.map +1 -0
- package/build/blocks/Showcase/Showcase.js +40 -0
- package/build/blocks/SiteFooter/SiteFooter.d.ts +25 -0
- package/build/blocks/SiteFooter/SiteFooter.d.ts.map +1 -0
- package/build/blocks/SiteFooter/SiteFooter.js +14 -0
- package/build/blocks/SiteHeader/SiteHeader.d.ts +27 -0
- package/build/blocks/SiteHeader/SiteHeader.d.ts.map +1 -0
- package/build/blocks/SiteHeader/SiteHeader.js +101 -0
- package/build/blocks/Stats/Stats.d.ts +17 -0
- package/build/blocks/Stats/Stats.d.ts.map +1 -0
- package/build/blocks/Stats/Stats.js +9 -0
- package/build/blocks/Steps/Steps.d.ts +26 -0
- package/build/blocks/Steps/Steps.d.ts.map +1 -0
- package/build/blocks/Steps/Steps.js +23 -0
- package/build/blocks/Testimonials/Testimonials.d.ts +26 -0
- package/build/blocks/Testimonials/Testimonials.d.ts.map +1 -0
- package/build/blocks/Testimonials/Testimonials.js +30 -0
- package/build/blocks/types.d.ts +44 -0
- package/build/blocks/types.d.ts.map +1 -0
- package/build/blocks/types.js +1 -0
- package/build/components/CargoMark/CargoMark.d.ts +7 -0
- package/build/components/CargoMark/CargoMark.d.ts.map +1 -0
- package/build/components/CargoMark/CargoMark.js +16 -0
- package/build/components/CheckList/CheckList.d.ts +9 -0
- package/build/components/CheckList/CheckList.d.ts.map +1 -0
- package/build/components/CheckList/CheckList.js +8 -0
- package/build/components/CodeWindow/CodeWindow.d.ts +15 -0
- package/build/components/CodeWindow/CodeWindow.d.ts.map +1 -0
- package/build/components/CodeWindow/CodeWindow.js +53 -0
- package/build/components/CodeWindow/highlight.d.ts +4 -0
- package/build/components/CodeWindow/highlight.d.ts.map +1 -0
- package/build/components/CodeWindow/highlight.js +48 -0
- package/build/components/ComparisonTable/ComparisonTable.d.ts +62 -0
- package/build/components/ComparisonTable/ComparisonTable.d.ts.map +1 -0
- package/build/components/ComparisonTable/ComparisonTable.js +60 -0
- package/build/components/CountUp/CountUp.d.ts +13 -0
- package/build/components/CountUp/CountUp.d.ts.map +1 -0
- package/build/components/CountUp/CountUp.js +52 -0
- package/build/components/Eyebrow/Eyebrow.d.ts +21 -0
- package/build/components/Eyebrow/Eyebrow.d.ts.map +1 -0
- package/build/components/Eyebrow/Eyebrow.js +29 -0
- package/build/components/FeatureCard/FeatureCard.d.ts +12 -0
- package/build/components/FeatureCard/FeatureCard.d.ts.map +1 -0
- package/build/components/FeatureCard/FeatureCard.js +8 -0
- package/build/components/GlowCard/GlowCard.d.ts +11 -0
- package/build/components/GlowCard/GlowCard.d.ts.map +1 -0
- package/build/components/GlowCard/GlowCard.js +14 -0
- package/build/components/Highlight/Highlight.d.ts +12 -0
- package/build/components/Highlight/Highlight.d.ts.map +1 -0
- package/build/components/Highlight/Highlight.js +10 -0
- package/build/components/InstallCommand/InstallCommand.d.ts +9 -0
- package/build/components/InstallCommand/InstallCommand.d.ts.map +1 -0
- package/build/components/InstallCommand/InstallCommand.js +30 -0
- package/build/components/Logo/Logo.d.ts +16 -0
- package/build/components/Logo/Logo.d.ts.map +1 -0
- package/build/components/Logo/Logo.js +7 -0
- package/build/components/Marquee/Marquee.d.ts +17 -0
- package/build/components/Marquee/Marquee.d.ts.map +1 -0
- package/build/components/Marquee/Marquee.js +19 -0
- package/build/components/Marquee/index.d.ts +3 -0
- package/build/components/Marquee/index.d.ts.map +1 -0
- package/build/components/Marquee/index.js +1 -0
- package/build/components/Marquee/types.d.ts +9 -0
- package/build/components/Marquee/types.d.ts.map +1 -0
- package/build/components/Marquee/types.js +1 -0
- package/build/components/MaskedHeadline/MaskedHeadline.d.ts +10 -0
- package/build/components/MaskedHeadline/MaskedHeadline.d.ts.map +1 -0
- package/build/components/MaskedHeadline/MaskedHeadline.js +8 -0
- package/build/components/MediaFrame/MediaFrame.d.ts +17 -0
- package/build/components/MediaFrame/MediaFrame.d.ts.map +1 -0
- package/build/components/MediaFrame/MediaFrame.js +15 -0
- package/build/components/Prose/Prose.d.ts +23 -0
- package/build/components/Prose/Prose.d.ts.map +1 -0
- package/build/components/Prose/Prose.js +15 -0
- package/build/components/ResourceCard/ResourceCard.d.ts +31 -0
- package/build/components/ResourceCard/ResourceCard.d.ts.map +1 -0
- package/build/components/ResourceCard/ResourceCard.js +20 -0
- package/build/components/Reveal/Reveal.d.ts +14 -0
- package/build/components/Reveal/Reveal.d.ts.map +1 -0
- package/build/components/Reveal/Reveal.js +26 -0
- package/build/components/Terminal/Terminal.d.ts +11 -0
- package/build/components/Terminal/Terminal.d.ts.map +1 -0
- package/build/components/Terminal/Terminal.js +69 -0
- package/build/components/Terminal/index.d.ts +3 -0
- package/build/components/Terminal/index.d.ts.map +1 -0
- package/build/components/Terminal/index.js +1 -0
- package/build/components/Terminal/types.d.ts +10 -0
- package/build/components/Terminal/types.d.ts.map +1 -0
- package/build/components/Terminal/types.js +1 -0
- package/build/components/ThemeIsland/ThemeIsland.d.ts +22 -0
- package/build/components/ThemeIsland/ThemeIsland.d.ts.map +1 -0
- package/build/components/ThemeIsland/ThemeIsland.js +25 -0
- package/build/components/ThemeIsland/context.d.ts +5 -0
- package/build/components/ThemeIsland/context.d.ts.map +1 -0
- package/build/components/ThemeIsland/context.js +4 -0
- package/build/components/ThemeIsland/index.d.ts +3 -0
- package/build/components/ThemeIsland/index.d.ts.map +1 -0
- package/build/components/ThemeIsland/index.js +1 -0
- package/build/foundations/type-scale.d.ts +12 -0
- package/build/foundations/type-scale.d.ts.map +1 -0
- package/build/foundations/type-scale.js +11 -0
- package/build/hooks/use-mobile.d.ts +2 -0
- package/build/hooks/use-mobile.d.ts.map +1 -0
- package/build/hooks/use-mobile.js +15 -0
- package/build/hooks/use-reduced-motion.d.ts +6 -0
- package/build/hooks/use-reduced-motion.d.ts.map +1 -0
- package/build/hooks/use-reduced-motion.js +14 -0
- package/build/layout/Container/Container.d.ts +10 -0
- package/build/layout/Container/Container.d.ts.map +1 -0
- package/build/layout/Container/Container.js +7 -0
- package/build/layout/Page/Page.d.ts +9 -0
- package/build/layout/Page/Page.d.ts.map +1 -0
- package/build/layout/Page/Page.js +7 -0
- package/build/layout/Section/Section.d.ts +12 -0
- package/build/layout/Section/Section.d.ts.map +1 -0
- package/build/layout/Section/Section.js +9 -0
- package/build/layout/SectionHeading/SectionHeading.d.ts +18 -0
- package/build/layout/SectionHeading/SectionHeading.d.ts.map +1 -0
- package/build/layout/SectionHeading/SectionHeading.js +14 -0
- package/build/lib/utils.d.ts +2 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +1 -0
- package/build/primitives/accordion.d.ts +8 -0
- package/build/primitives/accordion.d.ts.map +1 -0
- package/build/primitives/accordion.js +18 -0
- package/build/primitives/alert-dialog.d.ts +19 -0
- package/build/primitives/alert-dialog.d.ts.map +1 -0
- package/build/primitives/alert-dialog.js +43 -0
- package/build/primitives/alert.d.ts +10 -0
- package/build/primitives/alert.d.ts.map +1 -0
- package/build/primitives/alert.js +24 -0
- package/build/primitives/aspect-ratio.d.ts +5 -0
- package/build/primitives/aspect-ratio.d.ts.map +1 -0
- package/build/primitives/aspect-ratio.js +6 -0
- package/build/primitives/avatar.d.ts +12 -0
- package/build/primitives/avatar.d.ts.map +1 -0
- package/build/primitives/avatar.js +22 -0
- package/build/primitives/badge.d.ts +10 -0
- package/build/primitives/badge.d.ts.map +1 -0
- package/build/primitives/badge.js +28 -0
- package/build/primitives/breadcrumb.d.ts +12 -0
- package/build/primitives/breadcrumb.d.ts.map +1 -0
- package/build/primitives/breadcrumb.js +27 -0
- package/build/primitives/button-group.d.ts +13 -0
- package/build/primitives/button-group.d.ts.map +1 -0
- package/build/primitives/button-group.js +27 -0
- package/build/primitives/button.d.ts +11 -0
- package/build/primitives/button.d.ts.map +1 -0
- package/build/primitives/button.js +37 -0
- package/build/primitives/calendar.d.ts +9 -0
- package/build/primitives/calendar.d.ts.map +1 -0
- package/build/primitives/calendar.js +77 -0
- package/build/primitives/card.d.ts +10 -0
- package/build/primitives/card.d.ts.map +1 -0
- package/build/primitives/card.js +24 -0
- package/build/primitives/carousel.d.ts +20 -0
- package/build/primitives/carousel.d.ts.map +1 -0
- package/build/primitives/carousel.js +91 -0
- package/build/primitives/chart.d.ts +45 -0
- package/build/primitives/chart.d.ts.map +1 -0
- package/build/primitives/chart.js +136 -0
- package/build/primitives/checkbox.d.ts +5 -0
- package/build/primitives/checkbox.d.ts.map +1 -0
- package/build/primitives/checkbox.js +8 -0
- package/build/primitives/collapsible.d.ts +7 -0
- package/build/primitives/collapsible.d.ts.map +1 -0
- package/build/primitives/collapsible.js +13 -0
- package/build/primitives/command.d.ts +19 -0
- package/build/primitives/command.d.ts.map +1 -0
- package/build/primitives/command.js +33 -0
- package/build/primitives/context-menu.d.ts +26 -0
- package/build/primitives/context-menu.d.ts.map +1 -0
- package/build/primitives/context-menu.js +51 -0
- package/build/primitives/dialog.d.ts +18 -0
- package/build/primitives/dialog.d.ts.map +1 -0
- package/build/primitives/dialog.js +37 -0
- package/build/primitives/drawer.d.ts +14 -0
- package/build/primitives/drawer.d.ts.map +1 -0
- package/build/primitives/drawer.js +36 -0
- package/build/primitives/dropdown-menu.d.ts +26 -0
- package/build/primitives/dropdown-menu.d.ts.map +1 -0
- package/build/primitives/dropdown-menu.js +51 -0
- package/build/primitives/empty.d.ts +13 -0
- package/build/primitives/empty.d.ts.map +1 -0
- package/build/primitives/empty.js +33 -0
- package/build/primitives/field.d.ts +26 -0
- package/build/primitives/field.d.ts.map +1 -0
- package/build/primitives/field.js +76 -0
- package/build/primitives/form.d.ts +25 -0
- package/build/primitives/form.d.ts.map +1 -0
- package/build/primitives/form.js +59 -0
- package/build/primitives/hover-card.d.ts +7 -0
- package/build/primitives/hover-card.d.ts.map +1 -0
- package/build/primitives/hover-card.js +14 -0
- package/build/primitives/input-group.d.ts +17 -0
- package/build/primitives/input-group.d.ts.map +1 -0
- package/build/primitives/input-group.js +63 -0
- package/build/primitives/input-otp.d.ts +12 -0
- package/build/primitives/input-otp.d.ts.map +1 -0
- package/build/primitives/input-otp.js +21 -0
- package/build/primitives/input.d.ts +4 -0
- package/build/primitives/input.d.ts.map +1 -0
- package/build/primitives/input.js +6 -0
- package/build/primitives/item.d.ts +24 -0
- package/build/primitives/item.d.ts.map +1 -0
- package/build/primitives/item.js +66 -0
- package/build/primitives/kbd.d.ts +5 -0
- package/build/primitives/kbd.d.ts.map +1 -0
- package/build/primitives/kbd.js +9 -0
- package/build/primitives/label.d.ts +5 -0
- package/build/primitives/label.d.ts.map +1 -0
- package/build/primitives/label.js +7 -0
- package/build/primitives/menubar.d.ts +27 -0
- package/build/primitives/menubar.d.ts.map +1 -0
- package/build/primitives/menubar.js +55 -0
- package/build/primitives/navigation-menu.d.ts +15 -0
- package/build/primitives/navigation-menu.d.ts.map +1 -0
- package/build/primitives/navigation-menu.js +31 -0
- package/build/primitives/pagination.d.ts +14 -0
- package/build/primitives/pagination.d.ts.map +1 -0
- package/build/primitives/pagination.js +29 -0
- package/build/primitives/popover.d.ts +11 -0
- package/build/primitives/popover.d.ts.map +1 -0
- package/build/primitives/popover.js +27 -0
- package/build/primitives/progress.d.ts +5 -0
- package/build/primitives/progress.d.ts.map +1 -0
- package/build/primitives/progress.js +7 -0
- package/build/primitives/radio-group.d.ts +6 -0
- package/build/primitives/radio-group.d.ts.map +1 -0
- package/build/primitives/radio-group.js +12 -0
- package/build/primitives/resizable.d.ts +9 -0
- package/build/primitives/resizable.d.ts.map +1 -0
- package/build/primitives/resizable.js +14 -0
- package/build/primitives/scroll-area.d.ts +6 -0
- package/build/primitives/scroll-area.d.ts.map +1 -0
- package/build/primitives/scroll-area.js +13 -0
- package/build/primitives/select.d.ts +16 -0
- package/build/primitives/select.d.ts.map +1 -0
- package/build/primitives/select.js +39 -0
- package/build/primitives/separator.d.ts +5 -0
- package/build/primitives/separator.d.ts.map +1 -0
- package/build/primitives/separator.js +8 -0
- package/build/primitives/sheet.d.ts +15 -0
- package/build/primitives/sheet.d.ts.map +1 -0
- package/build/primitives/sheet.js +41 -0
- package/build/primitives/sidebar.d.ts +70 -0
- package/build/primitives/sidebar.d.ts.map +1 -0
- package/build/primitives/sidebar.js +212 -0
- package/build/primitives/skeleton.d.ts +4 -0
- package/build/primitives/skeleton.d.ts.map +1 -0
- package/build/primitives/skeleton.js +6 -0
- package/build/primitives/slider.d.ts +5 -0
- package/build/primitives/slider.d.ts.map +1 -0
- package/build/primitives/slider.js +14 -0
- package/build/primitives/sonner.d.ts +5 -0
- package/build/primitives/sonner.d.ts.map +1 -0
- package/build/primitives/sonner.js +19 -0
- package/build/primitives/spinner.d.ts +4 -0
- package/build/primitives/spinner.d.ts.map +1 -0
- package/build/primitives/spinner.js +7 -0
- package/build/primitives/switch.d.ts +7 -0
- package/build/primitives/switch.d.ts.map +1 -0
- package/build/primitives/switch.js +8 -0
- package/build/primitives/table.d.ts +11 -0
- package/build/primitives/table.d.ts.map +1 -0
- package/build/primitives/table.js +28 -0
- package/build/primitives/tabs.d.ts +12 -0
- package/build/primitives/tabs.d.ts.map +1 -0
- package/build/primitives/tabs.js +28 -0
- package/build/primitives/textarea.d.ts +4 -0
- package/build/primitives/textarea.d.ts.map +1 -0
- package/build/primitives/textarea.js +6 -0
- package/build/primitives/toggle-group.d.ts +10 -0
- package/build/primitives/toggle-group.d.ts.map +1 -0
- package/build/primitives/toggle-group.js +22 -0
- package/build/primitives/toggle.d.ts +10 -0
- package/build/primitives/toggle.d.ts.map +1 -0
- package/build/primitives/toggle.js +25 -0
- package/build/primitives/tooltip.d.ts +8 -0
- package/build/primitives/tooltip.d.ts.map +1 -0
- package/build/primitives/tooltip.js +18 -0
- package/build/shadcn.css +650 -0
- package/build/styles.css +699 -0
- package/package.json +187 -4
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { CheckList } from "../../components/CheckList/CheckList";
|
|
6
|
+
import { Reveal } from "../../components/Reveal/Reveal";
|
|
7
|
+
import { TYPE } from "../../foundations/type-scale";
|
|
8
|
+
import { Container } from "../../layout/Container/Container";
|
|
9
|
+
import { Section } from "../../layout/Section/Section";
|
|
10
|
+
import { SectionHeading } from "../../layout/SectionHeading/SectionHeading";
|
|
11
|
+
import { cn } from "../../lib/utils";
|
|
12
|
+
import { Badge } from "../../primitives/badge";
|
|
13
|
+
import { Card } from "../../primitives/card";
|
|
14
|
+
import { ToggleGroup, ToggleGroupItem } from "../../primitives/toggle-group";
|
|
15
|
+
/** Plan cards. A monthly and yearly switch appears once any plan has a yearly price, and every price springs. */
|
|
16
|
+
export const Pricing = (props) => {
|
|
17
|
+
const { id, className, eyebrow, title, description, plans, monthlyLabel = "Monthly", yearlyLabel = "Yearly", } = props;
|
|
18
|
+
const [cycle, setCycle] = React.useState("monthly");
|
|
19
|
+
const hasYearly = plans.some((plan) => plan.price.yearly !== undefined);
|
|
20
|
+
return (_jsx(Section, { id: id, className: className, children: _jsxs(Container, { className: "flex flex-col gap-[clamp(28px,4cqi,52px)]", children: [_jsx(Reveal, { children: _jsx(SectionHeading, { eyebrow: eyebrow, title: title, description: description, isCentered: true }) }), hasYearly === true ? (_jsxs(ToggleGroup, { type: "single", variant: "outline", value: cycle, onValueChange: (next) => {
|
|
21
|
+
if (next === "monthly" || next === "yearly") {
|
|
22
|
+
setCycle(next);
|
|
23
|
+
}
|
|
24
|
+
}, className: "mx-auto", "aria-label": "Billing", children: [_jsx(ToggleGroupItem, { value: "monthly", className: "px-5", children: monthlyLabel }), _jsx(ToggleGroupItem, { value: "yearly", className: "px-5", children: yearlyLabel })] })) : null, _jsx("div", { className: "grid grid-cols-[minmax(0,1fr)] gap-3.5 @xl/page:grid-cols-2 @5xl/page:grid-cols-4", children: plans.map((plan, index) => (_jsx(Reveal, { delayMs: index * 60, children: _jsx(PlanCard, { plan: plan, cycle: cycle }) }, plan.name))) })] }) }));
|
|
25
|
+
};
|
|
26
|
+
const PlanCard = (props) => {
|
|
27
|
+
const { plan, cycle } = props;
|
|
28
|
+
const price = cycle === "yearly" && plan.price.yearly !== undefined
|
|
29
|
+
? plan.price.yearly
|
|
30
|
+
: plan.price.monthly;
|
|
31
|
+
return (_jsxs(Card, { className: cn("h-full gap-4 px-6", plan.isHighlighted === true &&
|
|
32
|
+
"border-brand-border shadow-[0_0_0_4px_var(--brand-subtle)]"), children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("b", { className: TYPE.display3, children: plan.name }), plan.badge !== undefined ? (_jsx(Badge, { variant: "brand", children: plan.badge })) : null] }), _jsxs("div", { className: "flex h-10 items-baseline gap-1 overflow-hidden", children: [_jsx(AnimatePresence, { mode: "popLayout", initial: false, children: _jsx(motion.span, { className: "text-4xl font-semibold tracking-[-0.035em] tabular-nums", initial: { y: "-60%", opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: "60%", opacity: 0 }, transition: { type: "spring", stiffness: 380, damping: 26 }, children: price }, price) }), plan.period !== undefined ? (_jsx("small", { className: "text-muted-foreground text-sm", children: plan.period })) : null] }), _jsx(CheckList, { items: plan.features, className: "flex-1 text-sm" }), plan.cta] }));
|
|
33
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { NavLink } from "../types";
|
|
3
|
+
type ShowcaseItem = {
|
|
4
|
+
/** The tab's label, such as "Inbound". */
|
|
5
|
+
label: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: React.ReactNode;
|
|
8
|
+
link?: NavLink;
|
|
9
|
+
/** The picture beside the copy. */
|
|
10
|
+
media: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
type Props = {
|
|
13
|
+
/** The anchor a link points at, such as "pricing" for `#pricing`. Set on the title's `<h2>`. */
|
|
14
|
+
id?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Words, shown as the default eyebrow, or an `<Eyebrow>` with another variant. */
|
|
17
|
+
eyebrow?: React.ReactNode;
|
|
18
|
+
title: React.ReactNode;
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
items: ShowcaseItem[];
|
|
21
|
+
/** Milliseconds per tab. Advances on its own until hovered; omit to hold still. */
|
|
22
|
+
autoplayMs?: number;
|
|
23
|
+
};
|
|
24
|
+
/** Tabs of use cases, each copy beside a picture. Panels stay mounted so their pictures are already drawn. */
|
|
25
|
+
export declare const Showcase: React.FC<Props>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=Showcase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Showcase.d.ts","sourceRoot":"","sources":["../../../src/blocks/Showcase/Showcase.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,KAAK,YAAY,GAAG;IAClB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,gGAAgG;IAChG,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,8GAA8G;AAC9G,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmGpC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowRight } from "lucide-react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Reveal } from "../../components/Reveal/Reveal";
|
|
6
|
+
import { TYPE } from "../../foundations/type-scale";
|
|
7
|
+
import { useReducedMotion } from "../../hooks/use-reduced-motion";
|
|
8
|
+
import { Container } from "../../layout/Container/Container";
|
|
9
|
+
import { Section } from "../../layout/Section/Section";
|
|
10
|
+
import { SectionHeading } from "../../layout/SectionHeading/SectionHeading";
|
|
11
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../primitives/tabs";
|
|
12
|
+
/** Tabs of use cases, each copy beside a picture. Panels stay mounted so their pictures are already drawn. */
|
|
13
|
+
export const Showcase = (props) => {
|
|
14
|
+
const { id, className, eyebrow, title, description, items, autoplayMs } = props;
|
|
15
|
+
const first = items[0];
|
|
16
|
+
const [value, setValue] = React.useState(first !== undefined ? first.label : "");
|
|
17
|
+
const isHoveredRef = React.useRef(false);
|
|
18
|
+
const isReducedMotion = useReducedMotion();
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
if (autoplayMs === undefined || isReducedMotion === true) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const interval = setInterval(() => {
|
|
24
|
+
if (isHoveredRef.current === true) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
setValue((current) => {
|
|
28
|
+
const index = items.findIndex((item) => item.label === current);
|
|
29
|
+
const next = items[(index + 1) % items.length];
|
|
30
|
+
return next !== undefined ? next.label : current;
|
|
31
|
+
});
|
|
32
|
+
}, autoplayMs);
|
|
33
|
+
return () => clearInterval(interval);
|
|
34
|
+
}, [autoplayMs, isReducedMotion, items]);
|
|
35
|
+
return (_jsx(Section, { className: className, children: _jsx(Container, { children: _jsxs(Tabs, { value: value, onValueChange: setValue, className: "items-center gap-7", onPointerEnter: () => {
|
|
36
|
+
isHoveredRef.current = true;
|
|
37
|
+
}, onPointerLeave: () => {
|
|
38
|
+
isHoveredRef.current = false;
|
|
39
|
+
}, children: [_jsx(Reveal, { children: _jsx(SectionHeading, { id: id, eyebrow: eyebrow, title: title, description: description, isCentered: true }) }), _jsx(TabsList, { className: "h-11 max-w-full justify-start overflow-x-auto rounded-xl p-1", children: items.map((item) => (_jsx(TabsTrigger, { value: item.label, className: "rounded-lg px-4", children: item.label }, item.label))) }), items.map((item) => (_jsx(TabsContent, { value: item.label, forceMount: true, className: "w-full data-[state=inactive]:hidden", children: _jsxs("div", { className: "animate-in fade-in-0 slide-in-from-bottom-2 grid w-full grid-cols-[minmax(0,1fr)] items-center gap-8 duration-500 @4xl/page:grid-cols-[1fr_1.6fr]", children: [_jsxs("div", { className: "flex flex-col gap-3.5", children: [_jsx("div", { className: TYPE.display3, children: _jsx("h3", { children: item.title }) }), _jsx("p", { className: TYPE.body, children: item.description }), item.link !== undefined ? (_jsxs("a", { href: item.link.href, className: "group inline-flex items-center gap-1.5 font-semibold", children: [item.link.label, _jsx(ArrowRight, { className: "size-4 transition-transform group-hover:translate-x-0.5" })] })) : null] }), _jsx("div", { className: "min-w-0", children: item.media })] }) }, item.label)))] }) }) }));
|
|
40
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LinkComponent, NavLink, NavLinkGroup } from "../types";
|
|
3
|
+
type Props = {
|
|
4
|
+
/** The anchor a link points at, such as "pricing" for `#pricing`. */
|
|
5
|
+
id?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Usually a `Logo`. */
|
|
8
|
+
logo: React.ReactNode;
|
|
9
|
+
tagline?: string;
|
|
10
|
+
/** Under the tagline: a status line, a theme switch. */
|
|
11
|
+
extra?: React.ReactNode;
|
|
12
|
+
/** Up to four sit beside the logo; more, and the logo takes a row of its own above them. */
|
|
13
|
+
columns: NavLinkGroup[];
|
|
14
|
+
/** Left of the bottom line, such as "© 2026 Cargo". */
|
|
15
|
+
legal: React.ReactNode;
|
|
16
|
+
legalLinks?: NavLink[];
|
|
17
|
+
/** The giant word the footer stands on. */
|
|
18
|
+
wordmark?: string;
|
|
19
|
+
/** What the links render with. See `LinkComponent`. */
|
|
20
|
+
linkComponent?: LinkComponent;
|
|
21
|
+
};
|
|
22
|
+
/** Link columns, the legal line, and the product's name as the floor. */
|
|
23
|
+
export declare const SiteFooter: React.FC<Props>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=SiteFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteFooter.d.ts","sourceRoot":"","sources":["../../../src/blocks/SiteFooter/SiteFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAErE,KAAK,KAAK,GAAG;IACX,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,4FAA4F;IAC5F,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,uDAAuD;IACvD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAgGtC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Container } from "../../layout/Container/Container";
|
|
3
|
+
import { Section } from "../../layout/Section/Section";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
/** Link columns, the legal line, and the product's name as the floor. */
|
|
6
|
+
export const SiteFooter = (props) => {
|
|
7
|
+
const { id, className, logo, tagline, extra, columns, legal, legalLinks = [], wordmark, linkComponent: Anchor = "a", } = props;
|
|
8
|
+
// Beside the logo, four columns fit. A fifth or sixth would wrap under it, so past four the logo takes the first
|
|
9
|
+
// row and the columns share the next one.
|
|
10
|
+
const isWide = columns.length > 4;
|
|
11
|
+
return (_jsxs("footer", { className: "relative overflow-hidden border-t", children: [_jsx(Section, { id: id, isTight: true, className: className, children: _jsxs(Container, { className: "flex flex-col gap-10", children: [_jsxs("div", { style: { "--cui-footer-columns": columns.length }, className: cn("grid grid-cols-2 gap-8", isWide === true
|
|
12
|
+
? "@xl/page:grid-cols-3 @6xl/page:grid-cols-[repeat(var(--cui-footer-columns),minmax(0,1fr))]"
|
|
13
|
+
: "@4xl/page:grid-cols-[1.6fr_repeat(4,1fr)]"), children: [_jsxs("div", { className: cn("col-span-full flex flex-col items-start gap-3", isWide === false && "@4xl/page:col-span-1"), children: [logo, tagline !== undefined ? (_jsx("p", { className: "text-muted-foreground text-sm", children: tagline })) : null, extra] }), columns.map((column) => (_jsxs("div", { className: "text-muted-foreground flex flex-col gap-2.5 text-sm", children: [_jsx("p", { className: "text-foreground mb-1 font-mono text-[11.5px] font-semibold tracking-[.14em] uppercase", children: column.title }), column.links.map((link) => (_jsx(Anchor, { href: link.href, target: link.target, className: "hover:text-foreground transition-colors", children: link.label }, link.label)))] }, column.title)))] }), _jsxs("div", { className: "text-muted-foreground flex flex-wrap justify-between gap-3 border-t pt-5 text-[13px]", children: [_jsx("span", { children: legal }), legalLinks.length > 0 ? (_jsx("span", { className: "flex flex-wrap gap-4", children: legalLinks.map((link) => (_jsx(Anchor, { href: link.href, target: link.target, className: "hover:text-foreground transition-colors", children: link.label }, link.label))) })) : null] })] }) }), wordmark !== undefined ? (_jsx("div", { className: "cui-giant-word -mb-[0.12em] text-[clamp(80px,22cqi,300px)]", "aria-hidden": true, children: wordmark })) : null] }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LinkComponent, NavLink, NavLinkGroup, NavMenu } from "../types";
|
|
3
|
+
type Props = {
|
|
4
|
+
/** The anchor a link points at, such as "pricing" for `#pricing`. */
|
|
5
|
+
id?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Usually a `Logo`. */
|
|
8
|
+
logo: React.ReactNode;
|
|
9
|
+
/** After `menu`, in order. An entry with `groups` is a dropdown of its own, such as Customers. */
|
|
10
|
+
links: (NavLink | NavMenu)[];
|
|
11
|
+
/** A dropdown before the links, such as Product. */
|
|
12
|
+
menu?: NavMenu;
|
|
13
|
+
/** Right side on wide pages: search, sign in, the call to action. */
|
|
14
|
+
actions?: React.ReactNode;
|
|
15
|
+
/** Bottom of the mobile menu. */
|
|
16
|
+
mobileActions?: React.ReactNode;
|
|
17
|
+
/** The mobile menu's own list, in titled sections. Without it, the mobile menu lists every dropdown item, then the links. */
|
|
18
|
+
mobileGroups?: NavLinkGroup[];
|
|
19
|
+
/** What the links render with. See `LinkComponent`. */
|
|
20
|
+
linkComponent?: LinkComponent;
|
|
21
|
+
/** Sticks to the top and turns glassy once the page scrolls. */
|
|
22
|
+
isSticky?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** The site's top bar: logo, an optional product menu, links and actions, folding into a sheet on narrow pages. */
|
|
25
|
+
export declare const SiteHeader: React.FC<Props>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=SiteHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteHeader.d.ts","sourceRoot":"","sources":["../../../src/blocks/SiteHeader/SiteHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,YAAY,EACZ,OAAO,EAER,MAAM,UAAU,CAAC;AAElB,KAAK,KAAK,GAAG;IACX,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,kGAAkG;IAClG,KAAK,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7B,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iCAAiC;IACjC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,6HAA6H;IAC7H,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,uDAAuD;IACvD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,mHAAmH;AACnH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2HtC,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowRight, Menu } from "lucide-react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Eyebrow } from "../../components/Eyebrow/Eyebrow";
|
|
6
|
+
import { Container } from "../../layout/Container/Container";
|
|
7
|
+
import { cn } from "../../lib/utils";
|
|
8
|
+
import { Button } from "../../primitives/button";
|
|
9
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, } from "../../primitives/navigation-menu";
|
|
10
|
+
import { Sheet, SheetClose, SheetContent, SheetHeader, SheetTitle, SheetTrigger, } from "../../primitives/sheet";
|
|
11
|
+
/** The site's top bar: logo, an optional product menu, links and actions, folding into a sheet on narrow pages. */
|
|
12
|
+
export const SiteHeader = (props) => {
|
|
13
|
+
const { id, className, logo, links, menu, actions, mobileActions, mobileGroups, linkComponent = "a", isSticky = true, } = props;
|
|
14
|
+
const [isScrolled, setIsScrolled] = React.useState(false);
|
|
15
|
+
React.useEffect(() => {
|
|
16
|
+
if (isSticky === false) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const onScroll = () => setIsScrolled(window.scrollY > 8);
|
|
20
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
21
|
+
onScroll();
|
|
22
|
+
return () => window.removeEventListener("scroll", onScroll);
|
|
23
|
+
}, [isSticky]);
|
|
24
|
+
return (_jsx("header", { id: id, className: cn("z-30 border-b border-transparent transition-[background,border-color,backdrop-filter] duration-300", isSticky === true ? "sticky top-0" : "border-border relative", isScrolled === true &&
|
|
25
|
+
"border-border bg-background/75 backdrop-blur-xl backdrop-saturate-150", className), children: _jsxs(Container, { className: "flex h-16 items-center gap-6", children: [logo, _jsx(NavigationMenu, { viewport: false, className: "hidden @4xl/page:flex", children: _jsxs(NavigationMenuList, { children: [menu !== undefined ? (_jsx(HeaderMenu, { menu: menu, linkComponent: linkComponent })) : null, links.map((link) => isNavMenu(link) === true ? (_jsx(HeaderMenu, { menu: link, linkComponent: linkComponent }, link.label)) : (_jsx(NavigationMenuItem, { children: _jsx(NavigationMenuLink, { asChild: true, className: "text-muted-foreground hover:text-foreground px-3 py-2 font-medium", children: _jsx(NavAnchor, { link: link, linkComponent: linkComponent, children: link.label }) }) }, link.label)))] }) }), _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [actions, _jsxs(Sheet, { children: [_jsx(SheetTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", size: "icon-sm", className: "@4xl/page:hidden", "aria-label": "Open menu", children: _jsx(Menu, {}) }) }), _jsxs(SheetContent, { className: "flex w-full flex-col gap-0 p-0 sm:max-w-sm", children: [_jsx(SheetHeader, { className: "h-16 justify-center border-b", children: _jsx(SheetTitle, { asChild: true, children: _jsx("span", { children: logo }) }) }), _jsx("nav", { className: "flex min-h-0 flex-col overflow-y-auto px-4 py-2", children: mobileGroups !== undefined
|
|
26
|
+
? mobileGroups.map((group) => (_jsxs("div", { className: "flex flex-col pt-4 first:pt-2", children: [_jsx(Eyebrow, { variant: "label", className: "pb-1", children: group.title }), group.links.map((link) => (_jsx(MobileLink, { link: link, linkComponent: linkComponent }, link.label)))] }, group.title)))
|
|
27
|
+
: mobileLinks(menu, links).map((link) => (_jsx(MobileLink, { link: link, linkComponent: linkComponent }, `${link.label}${link.href}`))) }), mobileActions !== undefined ? (_jsx("div", { className: "mt-auto grid gap-2 p-4", children: mobileActions })) : null] })] })] })] }) }));
|
|
28
|
+
};
|
|
29
|
+
const isNavMenu = (link) => "groups" in link;
|
|
30
|
+
const toNavLink = (item) => ({
|
|
31
|
+
label: item.title,
|
|
32
|
+
href: item.href,
|
|
33
|
+
target: item.target,
|
|
34
|
+
});
|
|
35
|
+
/** What the mobile menu lists without `mobileGroups`: every dropdown's items where the dropdown sits, and the links. */
|
|
36
|
+
const mobileLinks = (menu, links) => {
|
|
37
|
+
const entries = menu !== undefined ? [menu, ...links] : links;
|
|
38
|
+
return entries.flatMap((entry) => isNavMenu(entry) === true
|
|
39
|
+
? entry.groups.flatMap((group) => group.items.map(toNavLink))
|
|
40
|
+
: [entry]);
|
|
41
|
+
};
|
|
42
|
+
/** A link rendered with the app's `linkComponent`, passing through what a Radix `asChild` parent hands it. */
|
|
43
|
+
const NavAnchor = (props) => {
|
|
44
|
+
const { link, linkComponent: Anchor, ...rest } = props;
|
|
45
|
+
return _jsx(Anchor, { ...rest, href: link.href, target: link.target });
|
|
46
|
+
};
|
|
47
|
+
const HeaderMenu = (props) => {
|
|
48
|
+
const { menu, linkComponent } = props;
|
|
49
|
+
const contentRef = React.useRef(null);
|
|
50
|
+
const triggerRef = React.useRef(null);
|
|
51
|
+
const hasMedia = menu.groups.some((group) => group.items.some((item) => item.media !== undefined));
|
|
52
|
+
const ignoreWhileClosed = (event) => {
|
|
53
|
+
if (contentRef.current !== null &&
|
|
54
|
+
contentRef.current.getAttribute("data-state") !== "open") {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
// Escape is handled by the topmost dismissable layer, and every dropdown is one, mounted or not: when that is a
|
|
59
|
+
// closed dropdown, it dismisses the menu but has no focus to give back, so focus fell to the body. The open
|
|
60
|
+
// dropdown hands it to its own trigger.
|
|
61
|
+
const onKeyDown = (event) => {
|
|
62
|
+
if (event.key === "Escape" && triggerRef.current !== null) {
|
|
63
|
+
triggerRef.current.focus();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return (_jsxs(NavigationMenuItem, { children: [_jsx(NavigationMenuTrigger, { ref: triggerRef, className: "bg-transparent", children: menu.label }), _jsx(NavigationMenuContent, { ref: contentRef, forceMount: true,
|
|
67
|
+
// Every dropdown stays mounted, so a closed one still listens for presses outside itself, and a press on a
|
|
68
|
+
// link in the open dropdown is outside the closed one: it dismissed the whole menu on pointerdown, hiding the
|
|
69
|
+
// link before the click landed. A closed dropdown has nothing to dismiss, so it ignores them.
|
|
70
|
+
onPointerDownOutside: ignoreWhileClosed, onFocusOutside: ignoreWhileClosed, onKeyDown: onKeyDown, className: "data-[state=closed]:hidden", children: _jsxs("div", {
|
|
71
|
+
// One column per group, never wider than the page minus the room left of the trigger. 18rem each, or 28rem
|
|
72
|
+
// when items carry a logo: the 8rem tile leaves the description room for more than two words a line.
|
|
73
|
+
style: {
|
|
74
|
+
"--cui-menu-columns": menu.groups.length,
|
|
75
|
+
"--cui-menu-column": hasMedia === true ? "28rem" : "18rem",
|
|
76
|
+
}, className: cn("grid gap-2 p-2", menu.feature !== undefined
|
|
77
|
+
? "w-[640px] grid-cols-[1fr_1fr_.9fr]"
|
|
78
|
+
: "w-[min(calc(var(--cui-menu-columns)*var(--cui-menu-column)),calc(100cqi-12rem))] grid-cols-[repeat(var(--cui-menu-columns),minmax(0,1fr))]"), children: [menu.groups.map((group) => (_jsxs("div", { className: "flex flex-col gap-0.5", children: [menu.groups.length > 1 ? (_jsx(Eyebrow, { variant: "label", className: "px-2 pt-1 pb-2", children: group.title })) : null, group.items.map((item) => (_jsx(NavigationMenuLink, { asChild: true, className: cn("group/item flex-row rounded-xl p-2.5", isPlainItem(item) === true
|
|
79
|
+
? "text-muted-foreground hover:text-foreground items-center gap-1.5 text-sm font-medium"
|
|
80
|
+
: "items-start gap-3"), children: _jsx(NavAnchor, { link: item, linkComponent: linkComponent, children: isPlainItem(item) === true ? (_jsxs(_Fragment, { children: [item.title, _jsx(ArrowRight, { className: "size-3.5" })] })) : (_jsxs(_Fragment, { children: [_jsx(MenuItemPicture, { item: item }), _jsxs("span", { className: "min-w-0", children: [_jsx("b", { className: "block text-sm", children: item.title }), item.description !== undefined ? (_jsx("span", { className: "text-muted-foreground text-[13px]", children: item.description })) : null] })] })) }) }, `${item.title}${item.href}`)))] }, group.title))), menu.feature] }) })] }));
|
|
81
|
+
};
|
|
82
|
+
/** An item with nothing but a title, such as "See all": a small link with an arrow, not a card. */
|
|
83
|
+
const isPlainItem = (item) => item.media === undefined &&
|
|
84
|
+
item.icon === undefined &&
|
|
85
|
+
item.description === undefined;
|
|
86
|
+
/** The item's picture (a logo) or its icon, on a neutral tile at the start of the row, or nothing. A logo's tile runs the full height of the row, beside a title and a description of any length. */
|
|
87
|
+
const MenuItemPicture = (props) => {
|
|
88
|
+
const { item } = props;
|
|
89
|
+
if (item.media !== undefined) {
|
|
90
|
+
return (_jsx("span", { className: "bg-card text-muted-foreground group-hover/item:text-foreground grid min-h-10 w-32 shrink-0 place-items-center self-stretch overflow-hidden rounded-[10px] border px-3 transition-colors duration-200 [&>*]:max-h-5 [&>*]:max-w-full", children: item.media }));
|
|
91
|
+
}
|
|
92
|
+
if (item.icon === undefined) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const Icon = item.icon;
|
|
96
|
+
return (_jsx("span", { className: "bg-muted grid size-9 shrink-0 place-items-center rounded-[10px] shadow-[inset_0_0_0_1px_var(--border)]", children: _jsx(Icon, { className: "text-muted-foreground group-hover/item:text-foreground size-[18px] transition-colors duration-200" }) }));
|
|
97
|
+
};
|
|
98
|
+
const MobileLink = (props) => {
|
|
99
|
+
const { link, linkComponent } = props;
|
|
100
|
+
return (_jsx(SheetClose, { asChild: true, children: _jsxs(NavAnchor, { link: link, linkComponent: linkComponent, className: "flex h-13 items-center justify-between border-b text-lg font-semibold tracking-[-0.02em]", children: [link.label, _jsx(ArrowRight, { className: "text-faint size-4" })] }) }));
|
|
101
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Stat = {
|
|
3
|
+
value: number;
|
|
4
|
+
suffix?: string;
|
|
5
|
+
decimals?: number;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
/** The anchor a link points at, such as "pricing" for `#pricing`. */
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
items: Stat[];
|
|
13
|
+
};
|
|
14
|
+
/** A row of big numbers that count up once, each over a hairline. */
|
|
15
|
+
export declare const Stats: React.FC<Props>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stats.d.ts","sourceRoot":"","sources":["../../../src/blocks/Stats/Stats.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqBjC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CountUp } from "../../components/CountUp/CountUp";
|
|
3
|
+
import { Container } from "../../layout/Container/Container";
|
|
4
|
+
import { Section } from "../../layout/Section/Section";
|
|
5
|
+
/** A row of big numbers that count up once, each over a hairline. */
|
|
6
|
+
export const Stats = (props) => {
|
|
7
|
+
const { id, className, items } = props;
|
|
8
|
+
return (_jsx(Section, { id: id, isTight: true, className: className, children: _jsx(Container, { className: "grid grid-cols-2 gap-8 @4xl/page:grid-cols-4", children: items.map((item) => (_jsxs("div", { className: "flex flex-col gap-1.5 border-t pt-4", children: [_jsx("b", { className: "text-[clamp(34px,4.6cqi,52px)] leading-none font-semibold tracking-[-0.035em]", children: _jsx(CountUp, { to: item.value, suffix: item.suffix, decimals: item.decimals }) }), _jsx("span", { className: "text-muted-foreground text-sm", children: item.label })] }, item.label))) }) }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
type Step = {
|
|
4
|
+
title?: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon?: LucideIcon;
|
|
7
|
+
/** The step a person takes, dashed so it stands out from what runs on its own. */
|
|
8
|
+
isHuman?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type Props = {
|
|
11
|
+
/** The anchor a link points at, such as "pricing" for `#pricing`. */
|
|
12
|
+
id?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Words, shown as the default eyebrow, or an `<Eyebrow>` with another variant. */
|
|
15
|
+
eyebrow?: React.ReactNode;
|
|
16
|
+
title: React.ReactNode;
|
|
17
|
+
description?: React.ReactNode;
|
|
18
|
+
isCentered?: boolean;
|
|
19
|
+
steps: Step[];
|
|
20
|
+
/** Below the cards, such as an example of a step's output. */
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
/** Numbered step cards, for when the order is the point. */
|
|
24
|
+
export declare const Steps: React.FC<Props>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/blocks/Steps/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,KAAK,IAAI,GAAG;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AASF,4DAA4D;AAC5D,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmEjC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Reveal } from "../../components/Reveal/Reveal";
|
|
3
|
+
import { Container } from "../../layout/Container/Container";
|
|
4
|
+
import { Section } from "../../layout/Section/Section";
|
|
5
|
+
import { SectionHeading } from "../../layout/SectionHeading/SectionHeading";
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
|
+
import { Card } from "../../primitives/card";
|
|
8
|
+
// written out so Tailwind sees every class
|
|
9
|
+
const COLUMNS = {
|
|
10
|
+
3: "@4xl/page:grid-cols-3",
|
|
11
|
+
4: "@5xl/page:grid-cols-4",
|
|
12
|
+
5: "@5xl/page:grid-cols-5",
|
|
13
|
+
};
|
|
14
|
+
/** Numbered step cards, for when the order is the point. */
|
|
15
|
+
export const Steps = (props) => {
|
|
16
|
+
const { id, className, eyebrow, title, description, isCentered = false, steps, children, } = props;
|
|
17
|
+
return (_jsx(Section, { id: id, className: className, children: _jsxs(Container, { className: "flex flex-col gap-[clamp(28px,4cqi,52px)]", children: [_jsx(Reveal, { children: _jsx(SectionHeading, { eyebrow: eyebrow, title: title, description: description, isCentered: isCentered }) }), _jsx("div", { className: cn("grid grid-cols-[minmax(0,1fr)] gap-3.5 @xl/page:grid-cols-2", COLUMNS[steps.length]), children: steps.map((step, index) => (_jsx(Reveal, { delayMs: index * 60,
|
|
18
|
+
// an odd last card spans the two-column layout rather than sitting alone
|
|
19
|
+
className: cn(index === steps.length - 1 &&
|
|
20
|
+
steps.length % 2 === 1 &&
|
|
21
|
+
"@xl/page:col-span-2 @5xl/page:col-span-1"), children: _jsxs(Card, { className: cn("h-full gap-2.5 px-5", step.isHuman === true &&
|
|
22
|
+
"border-brand-border border-dashed bg-[color-mix(in_srgb,var(--brand)_5%,var(--card))]"), children: [_jsxs("span", { className: "text-brand-text flex items-center gap-2 font-mono text-xs font-semibold tracking-[.08em]", children: [step.icon !== undefined ? (_jsx(step.icon, { className: "size-3.5" })) : null, String(index + 1).padStart(2, "0")] }), step.title !== undefined ? (_jsx("b", { className: "text-[15px] font-semibold", children: step.title })) : null, _jsx("p", { className: "text-muted-foreground text-sm", children: step.description })] }) }, step.description))) }), children] }) }));
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Quote = {
|
|
3
|
+
quote: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Title, company, or both. */
|
|
6
|
+
role: string;
|
|
7
|
+
/** A portrait beside the name. */
|
|
8
|
+
avatar?: React.ReactNode;
|
|
9
|
+
/** The company's logo, above the quote. */
|
|
10
|
+
logo?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
type Props = {
|
|
13
|
+
/** The anchor a link points at, such as "pricing" for `#pricing`. Set on the title's `<h2>` when there is one. */
|
|
14
|
+
id?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Words, shown as the default eyebrow, or an `<Eyebrow>` with another variant. */
|
|
17
|
+
eyebrow?: React.ReactNode;
|
|
18
|
+
title?: React.ReactNode;
|
|
19
|
+
quotes: Quote[];
|
|
20
|
+
/** Milliseconds per quote. */
|
|
21
|
+
autoplayMs?: number;
|
|
22
|
+
};
|
|
23
|
+
/** One large quote at a time, rotating, with dots to pick one, at the height of the longest quote. Holds still under reduced motion. */
|
|
24
|
+
export declare const Testimonials: React.FC<Props>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Testimonials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Testimonials.d.ts","sourceRoot":"","sources":["../../../src/blocks/Testimonials/Testimonials.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,kHAAkH;IAClH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wIAAwI;AACxI,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAyFxC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Reveal } from "../../components/Reveal/Reveal";
|
|
5
|
+
import { useReducedMotion } from "../../hooks/use-reduced-motion";
|
|
6
|
+
import { Container } from "../../layout/Container/Container";
|
|
7
|
+
import { Section } from "../../layout/Section/Section";
|
|
8
|
+
import { SectionHeading } from "../../layout/SectionHeading/SectionHeading";
|
|
9
|
+
import { cn } from "../../lib/utils";
|
|
10
|
+
/** One large quote at a time, rotating, with dots to pick one, at the height of the longest quote. Holds still under reduced motion. */
|
|
11
|
+
export const Testimonials = (props) => {
|
|
12
|
+
const { id, className, eyebrow, title, quotes, autoplayMs = 6500 } = props;
|
|
13
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
14
|
+
const isReducedMotion = useReducedMotion();
|
|
15
|
+
React.useEffect(() => {
|
|
16
|
+
if (isReducedMotion === true || quotes.length < 2) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const interval = setInterval(() => setActiveIndex((index) => (index + 1) % quotes.length), autoplayMs);
|
|
20
|
+
return () => clearInterval(interval);
|
|
21
|
+
}, [autoplayMs, isReducedMotion, quotes.length]);
|
|
22
|
+
if (quotes.length === 0) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return (_jsx(Section, { id: title === undefined ? id : undefined, className: className, children: _jsxs(Container, { className: "flex flex-col gap-[clamp(28px,4cqi,52px)]", children: [title !== undefined ? (_jsx(Reveal, { children: _jsx(SectionHeading, { id: id, eyebrow: eyebrow, title: title, isCentered: true }) })) : null, _jsx(Reveal, { children: _jsxs("div", { className: "mx-auto flex max-w-[860px] flex-col items-center gap-5 text-center", children: [_jsx("div", { className: "grid w-full", children: quotes.map((item, index) => (_jsxs("figure", { "aria-hidden": index === activeIndex ? undefined : true, className: cn("col-start-1 row-start-1 m-0 flex flex-col items-center justify-center gap-4 transition-[opacity,visibility] duration-500", index === activeIndex
|
|
26
|
+
? "visible opacity-100"
|
|
27
|
+
: "invisible opacity-0"), children: [item.logo, _jsxs("blockquote", { className: "m-0 text-[clamp(20px,2.6cqi,28px)] leading-snug font-normal tracking-[-0.015em] text-balance", children: ["\u201C", item.quote, "\u201D"] }), _jsxs("figcaption", { className: "text-muted-foreground flex items-center gap-3 text-sm", children: [item.avatar, _jsxs("span", { children: [_jsx("b", { className: "text-foreground font-medium", children: item.name }), " ", "\u00B7 ", item.role] })] })] }, item.name))) }), quotes.length > 1 ? (_jsx("div", { className: "flex gap-2", children: quotes.map((item, index) => (_jsx("button", { type: "button", "aria-label": `Quote from ${item.name}`, "aria-pressed": index === activeIndex, onClick: () => setActiveIndex(index), className: cn("h-1.5 rounded-full transition-all", index === activeIndex
|
|
28
|
+
? "bg-brand w-6"
|
|
29
|
+
: "bg-muted-foreground/40 hover:bg-muted-foreground w-1.5") }, item.name))) })) : null] }) })] }) }));
|
|
30
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export type NavLink = {
|
|
3
|
+
label: string;
|
|
4
|
+
href: string;
|
|
5
|
+
/** `_blank` for a page on another site, such as the docs. */
|
|
6
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
7
|
+
};
|
|
8
|
+
export type NavMenuItem = {
|
|
9
|
+
/** A Lucide icon, or any icon component that takes `className`. */
|
|
10
|
+
icon?: React.ComponentType<{
|
|
11
|
+
className?: string;
|
|
12
|
+
}>;
|
|
13
|
+
/** A picture in place of the icon, such as a customer's logo. */
|
|
14
|
+
media?: React.ReactNode;
|
|
15
|
+
title: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
href: string;
|
|
18
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
19
|
+
};
|
|
20
|
+
export type NavMenuGroup = {
|
|
21
|
+
title: string;
|
|
22
|
+
items: NavMenuItem[];
|
|
23
|
+
};
|
|
24
|
+
/** A dropdown in the nav: its label, and the groups it opens. */
|
|
25
|
+
export type NavMenu = {
|
|
26
|
+
label: string;
|
|
27
|
+
groups: NavMenuGroup[];
|
|
28
|
+
/** A card in the dropdown's last column. */
|
|
29
|
+
feature?: React.ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/** A titled list of links: a footer column, a section of the mobile menu. */
|
|
32
|
+
export type NavLinkGroup = {
|
|
33
|
+
title: string;
|
|
34
|
+
links: NavLink[];
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* What a block renders its links with: `"a"` by default. An app passes its router's link (Next's `Link`) so the
|
|
38
|
+
* header and footer navigate and prefetch like the rest of the app. It must forward its ref and spread the props it
|
|
39
|
+
* does not use onto its `<a>`, as a router's link does.
|
|
40
|
+
*/
|
|
41
|
+
export type LinkComponent = React.ElementType<React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
42
|
+
href: string;
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/blocks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,MAAM,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,mEAAmE;IACnE,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,iEAAiE;AACjE,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAC3C,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CargoMark.d.ts","sourceRoot":"","sources":["../../../src/components/CargoMark/CargoMark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmBrC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
const MARK_PATHS = [
|
|
4
|
+
"M21.9303 50.3218L0.761719 38.0911V25.8604L21.9303 38.0911V50.3218Z",
|
|
5
|
+
"M11.393 19.7451L0.761719 25.8605L21.9303 38.0912L32.5616 31.9758L11.393 19.7451Z",
|
|
6
|
+
"M32.5615 31.9756L21.9302 38.0909V50.3217L32.5615 44.2063V31.9756Z",
|
|
7
|
+
"M22.0239 1.49316L11.3926 7.63287L21.9298 13.818L32.5611 7.60852L22.0239 1.49316Z",
|
|
8
|
+
"M21.9298 25.9545V13.8178L11.3926 7.6084V19.8391L21.9298 25.9545Z",
|
|
9
|
+
"M32.561 32.0698V7.6084L21.9297 13.8178V25.9545L32.561 32.0698Z",
|
|
10
|
+
];
|
|
11
|
+
// each face of the cube at its own opacity, so the mark reads as a solid in one color
|
|
12
|
+
const MARK_OPACITIES = [0.75, 1, 0.88, 1, 0.75, 0.88];
|
|
13
|
+
export const CargoMark = (props) => {
|
|
14
|
+
const { className } = props;
|
|
15
|
+
return (_jsx("svg", { viewBox: "0 0 34 52", className: cn("h-auto w-5", className), "aria-hidden": true, children: MARK_PATHS.map((path, index) => (_jsx("path", { d: path, fill: "currentColor", opacity: MARK_OPACITIES[index] }, path))) }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
items: React.ReactNode[];
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
/** A list where every line is a check in the brand colour: what you get, never a step order. */
|
|
7
|
+
export declare const CheckList: React.FC<Props>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=CheckList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckList.d.ts","sourceRoot":"","sources":["../../../src/components/CheckList/CheckList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAarC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Check } from "lucide-react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
/** A list where every line is a check in the brand colour: what you get, never a step order. */
|
|
5
|
+
export const CheckList = (props) => {
|
|
6
|
+
const { items, className } = props;
|
|
7
|
+
return (_jsx("ul", { className: cn("flex flex-col gap-2.5", className), children: items.map((item, index) => (_jsxs("li", { className: "flex items-baseline gap-2.5", children: [_jsx(Check, { className: "text-brand size-3.5 shrink-0 translate-y-0.5" }), item] }, index))) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type CodeTab = {
|
|
3
|
+
label: string;
|
|
4
|
+
code: string;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
tabs: CodeTab[];
|
|
8
|
+
/** Milliseconds per tab. Walks through the tabs on its own until someone picks one. */
|
|
9
|
+
autoplayMs?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
/** The Terminal's frame with tabs for files and commands, code highlighted line by line. */
|
|
13
|
+
export declare const CodeWindow: React.FC<Props>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=CodeWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeWindow.d.ts","sourceRoot":"","sources":["../../../src/components/CodeWindow/CodeWindow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAoHtC,CAAC"}
|